Skip to content
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

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

BR_GetMediaTrackLayouts and Break Lines #760

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


Copy link

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)

Can you reproduce that ?

Cheers !

@Breeder Breeder self-assigned this Aug 21, 2015
Copy link

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.

Copy link

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 --

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 
      if mcpLayout=="BUS\n" then
      if mcpLayout=="VSTi\n" then
      if mcpLayout=="FX\n" then
      reaper.UpdateArrange() --refresh to see changes

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.

Copy link

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.


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

No branches or pull requests

3 participants