New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BR_GetMediaTrackLayouts and Break Lines #760

Closed
X-Raym opened this Issue Aug 21, 2015 · 3 comments

Comments

Projects
None yet
3 participants
@X-Raym

X-Raym commented Aug 21, 2015

Hi !

it seems that some MCP names are returned with a break line "\n".
(custom names BUS, VSTi and FX)

We have the problem on this forum thread (starts post 19)
http://forum.cockos.com/showthread.php?p=1561433

Can you reproduce that ?

Cheers !

@Breeder Breeder self-assigned this Aug 21, 2015

@Breeder

This comment has been minimized.

Show comment
Hide comment
@Breeder

Breeder Aug 21, 2015

Contributor

Thanks for the report, I'll have a look. In the mean time, can you get some kind of project that displays the issue? I don't remember seeing newlines in any layout names when I tested this function.

Contributor

Breeder commented Aug 21, 2015

Thanks for the report, I'll have a look. In the mean time, can you get some kind of project that displays the issue? I don't remember seeing newlines in any layout names when I tested this function.

@SpacemenTree

This comment has been minimized.

Show comment
Hide comment
@SpacemenTree

SpacemenTree Aug 23, 2015

Hi Breeder. I am the one who stumbled onto this potencial bug when I was going through the ropes of a lua script with the help of X-Raym.

I don't know if a project will be helpful as I can reproduce this in a new project every time.
As you can read in the corresponding Reaper forum thread, I have three layouts named "BUS", "FX" and "VSTi". The same thing happens in all of them. As I use a custom theme, I did the following test for you benefit:

  1. Open Reaper and create a new Project
  2. Switch to another theme (tested "Spin" and "Eyssina") to check if the problem was somehow with my own theme.
  3. In "Spin" I renamed a layout to "BUS". Result: Same bug behaviour.
  4. In Eyssina, I used "VCA/GM" layout for testing, to discount a problem with "BUS" as name per se. Result: Same bug behaviour.

The lua script I'm using right now is this:

-- Get how many tracks there are --
track_count=reaper.CountTracks(0)

for i=0, track_count-1 do
    cur_track=reaper.GetTrack(0,i)   -- current track number
    mcpLayout, tcpLayout=reaper.BR_GetMediaTrackLayouts(cur_track)  -- get layout of current track
   -- reaper.ShowConsoleMsg(mcpLayout) shows layouts are retrieved correctly


      if mcpLayout=="" then 
      reaper.SetTrackColor(cur_track,0)
      end
      if mcpLayout=="BUS\n" then
      reaper.SetTrackColor(cur_track,0x2266022)
      end
      if mcpLayout=="VSTi\n" then
      reaper.SetTrackColor(cur_track,0x8866022)
      end
      if mcpLayout=="FX\n" then
      reaper.SetTrackColor(cur_track,0x6611022)
      end
      reaper.UpdateArrange() --refresh to see changes
end

Since I added the "\n" as per Heda's suggestion, it works great. If I remove it, it does not identify the layout being tested.

Hope this helps. If you require any more info, or if (even I I can reproduce this everytime in a new project) you want me to send you a .rpp, just let me know.

Thanks for taking time to look into this. And thanks for making it availiable in the first place :)

Take care.

Hi Breeder. I am the one who stumbled onto this potencial bug when I was going through the ropes of a lua script with the help of X-Raym.

I don't know if a project will be helpful as I can reproduce this in a new project every time.
As you can read in the corresponding Reaper forum thread, I have three layouts named "BUS", "FX" and "VSTi". The same thing happens in all of them. As I use a custom theme, I did the following test for you benefit:

  1. Open Reaper and create a new Project
  2. Switch to another theme (tested "Spin" and "Eyssina") to check if the problem was somehow with my own theme.
  3. In "Spin" I renamed a layout to "BUS". Result: Same bug behaviour.
  4. In Eyssina, I used "VCA/GM" layout for testing, to discount a problem with "BUS" as name per se. Result: Same bug behaviour.

The lua script I'm using right now is this:

-- Get how many tracks there are --
track_count=reaper.CountTracks(0)

for i=0, track_count-1 do
    cur_track=reaper.GetTrack(0,i)   -- current track number
    mcpLayout, tcpLayout=reaper.BR_GetMediaTrackLayouts(cur_track)  -- get layout of current track
   -- reaper.ShowConsoleMsg(mcpLayout) shows layouts are retrieved correctly


      if mcpLayout=="" then 
      reaper.SetTrackColor(cur_track,0)
      end
      if mcpLayout=="BUS\n" then
      reaper.SetTrackColor(cur_track,0x2266022)
      end
      if mcpLayout=="VSTi\n" then
      reaper.SetTrackColor(cur_track,0x8866022)
      end
      if mcpLayout=="FX\n" then
      reaper.SetTrackColor(cur_track,0x6611022)
      end
      reaper.UpdateArrange() --refresh to see changes
end

Since I added the "\n" as per Heda's suggestion, it works great. If I remove it, it does not identify the layout being tested.

Hope this helps. If you require any more info, or if (even I I can reproduce this everytime in a new project) you want me to send you a .rpp, just let me know.

Thanks for taking time to look into this. And thanks for making it availiable in the first place :)

Take care.

@Breeder

This comment has been minimized.

Show comment
Hide comment
@Breeder

Breeder Aug 25, 2015

Contributor

Still can't replicate with Default theme nor one of the Jannes theme I've been using lately.

Can you please upload the theme you're using and the example project for the script you pasted in your last post.

Thanks.

Contributor

Breeder commented Aug 25, 2015

Still can't replicate with Default theme nor one of the Jannes theme I've been using lately.

Can you please upload the theme you're using and the example project for the script you pasted in your last post.

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment