View Single Post
Old 03-06-2018, 03:14 PM   #90
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 14,773
Default

Quote:
Originally Posted by pipelineaudio View Post
I dont understand what to put in there to have it get the specific track
I got it from the documentation of the API functions.

"get_action_context(#filename,sectionID,cmdID,mode ,resolution,val);"

In val gives the CC value when the script has been fired by "it's" action, and this action is called by a Midi message with the Midi Channel and the CC , the action had been learned to. (Beware: I found that scripts are not fired by actions as long as the Script-IDE editor is open for that script.)

then
tr = GetTrack(0,val);
provides the ID of the track that features the track number val (which is the one that is labeled as No "val+1" in the GUI, as here tracks are counted 1, 2, 3, ... instead of "technically" 0, 1, 2 ...)

With this set up, you simply make Midi CC Map send a message with the Midi Channel and CC # you learned the message to and the CC val according to the Track No (subtract one) of the track you want to mute or unmute.

-Michael
mschnell is offline   Reply With Quote