new user macro help

Home Forums Macros (French) new user macro help

This topic contains 2 replies, has 2 voices, and was last updated by  Philippe Ollivier 1 month ago.

Viewing 3 posts - 1 through 3 (of 3 total)
Author Posts
Author Posts
18/12/2018 - 07:29:44 #3605

Ploughman

I am starting to make some macros, but still have some issues. The reference guide is helpful, but more examples would be even more helpful.

Here is the task that was vexing me today. I want to to use a bank on my foot controller to mute and un-mute tracks 1-10 using control change values 11 though 20 on my peddle board. So I made 10 macros, one for each track. However the WaitUserAction seems to unmute the prior track rather then mute the next one when I try and mute track 1 then 2, for example. There must be a way to do this with one macro and a variable. If not, how do I stop the prior WaitUserAction, or simply toggle on to off or visa versa without having to know the current state?

Here is the simple macro I made 10 of,
———-
Macro for track 1:

//Track 1 Select and Mute_Unmute

SelectTrack @ trk1

TrackMute trk_sel ON

WaitUserAction

TrackMute trk_sel OFF
———
via Google Translate

Je commence à faire des macros, mais j’ai encore quelques problèmes. Le guide de référence est utile, mais d’autres exemples le seraient encore plus.

Voici la tâche qui me vexait aujourd’hui. Je souhaite utiliser une banque sur ma pédale pour assourdir et réactiver les pistes 1 à 10 à l’aide des valeurs de changement de commande 11 à 20 sur mon tableau de colportage. J’ai donc créé 10 macros, une pour chaque piste. Cependant, WaitUserAction semble réactiver la piste précédente plutôt que de couper la suivante lorsque j’essaie de couper la piste 1 puis 2, par exemple. Il doit y avoir un moyen de faire cela avec une macro et une variable. Si ce n’est pas le cas, comment puis-je arrêter l’actuelle WaitUserAction ou simplement l’activer ou l’inverser sans avoir à connaître l’état actuel?

Voici la macro simple dont j’ai fait 10,
———-
Macro pour la piste 1:

// Track 1 Select et Mute_Unmute

SelectTrack @ trk1

TrackMute trk_sel ON

WaitUserAction

TrackMute trk_sel OFF
———

Meilleures salutations,

18/12/2018 - 08:12:01 #3606

Philippe Ollivier

Hi Ploughman,
We will add some more macro examples of Logelloop 5.

The issue in your macro is that the track is selected only when you first launch the macro.
There is no track selection after the WaitUserAction, that’s the issue.

Your macro should contain :

WaitUserAction
SelectTrack @ trk1
TrackMute trk_sel OFF

Your Macro could also be like this :

//***************** Begin ************
//***************** Mute or unMute the selected track ************
DeclareOnce int $trk1_muted$ = 0

SelectTrack @ trk1

If {$trk1_muted$ == 0}
TrackMute trk_sel ON
Set $trk1_muted$ = 1
MacroStop
EndIf

If {$trk1_muted$ == 1}
TrackMute trk_sel OFF
Set $trk1_muted$ = 0
MacroStop
EndIf
//***************** End ************

Or even, with the possibility to know the current state of the mute button :

//***************** Begin ************
//***************** Mute or unMute the selected track ************
SelectTrack @ trk1

If {valueOfReactionNamed(“TrackMute_trk1”) == 0}
TrackMute trk_sel ON
Else
TrackMute trk_sel OFF
EndIf
//***************** End ************

There is an example of the use of valueOfReactionNamed in the macro “Track Settings Copy And Paste”.
Hope this help!
Thank you,
Philippe

22/12/2018 - 00:09:10 #3609

Philippe Ollivier

Hi Ploughman,
After some more work on this case, I can also say that you can do it with only one macro and the track selection system. And the macro will only need one line :

TrackMute trk_sel {(valueOfReactionNamed(“TrackMute_trk” + $current_selected_track$) == 0) ? 1 : 0 }

This track takes the current state of the selected track and reverse to the other value… If the track mute state is 1 (muted), it put it at 0 (unmuted), and so on…

OK, that’s not direct, you first need to select the track and then push the macro button.
—> It’s possible to select a track with a Midi command…

Philippe

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.