Go Back   Cockos Incorporated Forums > REAPER Forums > REAPER Bug Reports

Reply
 
Thread Tools Display Modes
Old 11-27-2016, 05:23 PM   #1
lb0
Human being with feelings
 
Join Date: Apr 2014
Posts: 4,171
Default Possible bug in API: GetMediaTrackInfo_Value when querying master channel

Hi,

I'm querying the master channel mute/solo/vol/pan etc. using GetMediaTrackInfo_Value.

The vol, pan, phase and others I've tried - all return correct values - but the mute and solo state always returns 0. I'm using 'B_MUTE' and 'I_SOLO' parmname.

Works fine for all other channels - but not for master.

Simple test code:
reaper.ShowConsoleMsg(reaper.GetMediaTrackInfo_Val ue(reaper.GetMasterTrack(0), 'B_MUTE'))

I know there is a deprecated GetMasterMuteSoloFlags API call - but would prefer not to use deprecated APIs - unless you suggest to do so.

Is this a bug - or am I doing something wrong?

Many thanks,
Leon.
__________________
Projects - Reascripts - Lua:
Smart Knobs 2 | LBX Stripper | LBX Floating FX Positioner
Donate via Paypal | LBX Tools Website
lb0 is offline   Reply With Quote
Old 11-27-2016, 09:39 PM   #2
FnA
Human being with feelings
 
FnA's Avatar
 
Join Date: Jun 2012
Posts: 2,173
Default

I think you are right.

This seems to work:

mt = reaper.GetMasterTrack(0)
retval, muteOut = reaper.GetTrackUIMute(mt)
FnA is offline   Reply With Quote
Old 11-28-2016, 12:44 AM   #3
lb0
Human being with feelings
 
Join Date: Apr 2014
Posts: 4,171
Default

Quote:
Originally Posted by FnA View Post
I think you are right.

This seems to work:

mt = reaper.GetMasterTrack(0)
retval, muteOut = reaper.GetTrackUIMute(mt)
Awesome - thanks! Didn't know there was a UI one for track (found the send one) - that's better than media_info call as the UI one's can record automation.

I'll look for the solo one too - and hoping there is a volume one. I've searched for ages in the API and only found UI send ones... Maybe I missed them or they aren't documented...

Whattttt - they are in there ))) But I swear they weren't a few days back... d'oh


EDIT: ah no - only Get UI ones for track vol/pan etc. I also wanted the Set ones (which are available for sends - but not for track - odd)!! Anyway - I can still use the Get's for this purpose...

Thanks again.
__________________
Projects - Reascripts - Lua:
Smart Knobs 2 | LBX Stripper | LBX Floating FX Positioner
Donate via Paypal | LBX Tools Website
lb0 is offline   Reply With Quote
Old 11-28-2016, 02:35 AM   #4
lb0
Human being with feelings
 
Join Date: Apr 2014
Posts: 4,171
Default

Well I've got the MUTE working ok - but no luck for the SOLO still..

I could use the deprecated GetMasterMuteSoloFlags API - but at the point in my code where I need to make the call - I do not have access to the track number so no idea whether it's the master or not (I only have theh mediatrack object). I don't want to have to backtrack and send through the track number as well - as it will make the code far less efficient (and efficiency is what I'm aiming for).

Is there either a way to work out track number from the MediaTrack object - or better still - get the GetMediaTrackInfo_Value working properly for master track

Or doubly better still (x1000) - add UI versions for Set Mute/Solo/Pan/Volume for tracks (like is available for the sends) and add a GetUITrackSolo too? (this in my mind will make the API more complete).
__________________
Projects - Reascripts - Lua:
Smart Knobs 2 | LBX Stripper | LBX Floating FX Positioner
Donate via Paypal | LBX Tools Website

Last edited by lb0; 11-28-2016 at 02:36 AM. Reason: spelling
lb0 is offline   Reply With Quote
Old 11-28-2016, 02:44 AM   #5
lb0
Human being with feelings
 
Join Date: Apr 2014
Posts: 4,171
Default

Ah - just noticed GetMediaTrackInfo_Value IP_TRACKNUMBER... will help if I use the deprecated api.

Still wish for the UI Get/Set UI track functions though (guess this is the wrong forum subsection to make such wishes )
__________________
Projects - Reascripts - Lua:
Smart Knobs 2 | LBX Stripper | LBX Floating FX Positioner
Donate via Paypal | LBX Tools Website
lb0 is offline   Reply With Quote
Old 12-01-2016, 06:59 PM   #6
FnA
Human being with feelings
 
FnA's Avatar
 
Join Date: Jun 2012
Posts: 2,173
Default

Quote:
Originally Posted by lb0 View Post
better still - get the GetMediaTrackInfo_Value working properly for master track
I think so too.

Thanks for your work on the channel strip. Interesting project.
FnA is offline   Reply With Quote
Old 12-09-2016, 03:59 PM   #7
lb0
Human being with feelings
 
Join Date: Apr 2014
Posts: 4,171
Default

Quote:
Originally Posted by FnA View Post
Thanks for your work on the channel strip. Interesting project.
Thanks!
__________________
Projects - Reascripts - Lua:
Smart Knobs 2 | LBX Stripper | LBX Floating FX Positioner
Donate via Paypal | LBX Tools Website
lb0 is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 04:41 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.