Forum Replies Created
-
AuthorPosts
-
PhilippeKeymaster
Salut,
Voici un exemple de macro qui monte le fader à -5 puis revient à – 76 à l’aide de deux boucles DoRepeat//While.
Si ça n’est pas clair n’hésite pas à reposer des questions.
Bonne journée,
Philippe// On doit déclarer toutes les variables en début de macro
// celle-ce va servir à incrémenter ou décrémenter à chaque tour de la boucle DoRepeat//While
Declare int $mavariable$ = -76
TrackVolume trk1 = $mavariable$
// On lance la boucle DoRepeat
DoRepeat
// On affecte la valeur de la variable au fader de piste 1
TrackVolume trk1 = $mavariable$
// On incrémente la variable de 1
$mavariable$ = {$mavariable$ + 1}
// Un temps de pause est nécéssaire à l’intérieur de toute boucle DoRepeat//While,
// sinon, la machine s’emballe et tout se bloque
Sleep 20
// la condition entre les accolades doit être vraie pour que l’on revienne au début de la boucle DoRepeat
// ici elle sera fausse lorsque la variable atteint -5 et on sort alors de la boucle
// pour passer à l’action suivante…
While {$mavariable$ <= -5} // Même chose mais dans cette boucle on décrémente pour ramener le fader à -76...
DoRepeat
TrackVolume trk1 = $mavariable$$mavariable$ = {$mavariable$-1}
Sleep 20
While {$mavariable$ > -77}PhilippeKeymasterBonjour Youssra,
Dans le cas d’un changement de valeur d’un fader en un temps donné, il y a une fonction pour cela et c’est donc assez simple.Si dans la macro tu mets :
During 2000 Reach -5 TrackVolume trk3
Le fader de volume de la track 3 partira de son niveau actuel et va atteindre la valeur de -5 dB en 2000 ms.
During fonctionne aussi avec d’autres commandes telles que TrackSpeed, TrackPitch, TrackAuxVolume, etc.
Philippe20 February 2024 at 7 h 19 min in reply to: How can I retrigger Matrix Macro so new Case Branch triggers? #6307PhilippeKeymasterHi,
The issue here comes from the fact we cannot stop the RepeatWhile loop from outside.I think you can set the buttons in toggle mode and add a condition to stop the RepeatWhile loop if the button is set to off or another button is pushed.
I don’t know if this will work in your situation, but it could be a solution.
Below is a simple example of this.
Best,
Philippe//******************************** Matrix ! Tab Items ********************************
Declare Local Once boolean $firstTime$ = true
Declare Local Once int $itemSize$ = 56
Declare Local Once int $lastPushedItem$ = -1If { $firstTime$ }
$firstTime$ = false
SendData thispatcher itemamount 8
WaitDuration 200
SendData mainWindow setsize 463 {30 + ($itemSize$ * 1)}// Toggle mode On
SendData item 0 mode 1SendData thispatcher basicdisposition
SendData MacroInitialized
MacroStop
EndIfCaseBranch 1
SendData item $lastPushedItem$ set 0
$lastPushedItem$ = {currentCaseValueInt()}RepeatWhile {(currentCaseValueInt()==1) && (currentCaseOptionValueInt(0) == 1)}
Post {“Loop ” + (currentCaseValueInt())}
WaitDuration 30
EndRepeat
BreakCaseBranchCaseBranch 2
SendData item $lastPushedItem$ set 0
$lastPushedItem$ = {currentCaseValueInt()}RepeatWhile {(currentCaseValueInt()==2) && (currentCaseOptionValueInt(0) == 1)}
Post {“Loop ” + (currentCaseValueInt())}
WaitDuration 30
EndRepeat
BreakCaseBranchCaseBranch 3
SendData item $lastPushedItem$ set 0
$lastPushedItem$ = {currentCaseValueInt()}RepeatWhile {(currentCaseValueInt()==3) && (currentCaseOptionValueInt(0) == 1)}
Post {“Loop ” + (currentCaseValueInt())}
WaitDuration 30
EndRepeat
BreakCaseBranchCaseBranch 4
SendData item $lastPushedItem$ set 0
$lastPushedItem$ = {currentCaseValueInt()}RepeatWhile {(currentCaseValueInt()==4) && (currentCaseOptionValueInt(0) == 1)}
Post {“Loop ” + (currentCaseValueInt())}
WaitDuration 30
EndRepeat
BreakCaseBranchPhilippeKeymasterQuelques explications :
Par défaut, Matrix charge des boutons.
Donc, dans un second temps, après avoir créé la matrice de buttons, tu peux changer le type de certains boutons.
Cela se fait en utilisant la syntaxe suivante :SendData thispatcher itemtype 1 dial
Ici, je l’utilise dans une boucle DoRepeat//While avec la variable $itemID$ pour définir le numéro de l’item que je souhaite modifier.
PhilippePhilippeKeymasterSalut,
Oui, c’est possible en mettant le code ci-dessous en entête de macro
PhilippeDeclare Local Once boolean $firstTime$ = true
Declare Local int $itemID$ = 1
Declare Local int $itemSize$ = 56If { $firstTime$ }
$firstTime$ = false
SendData thispatcher itemamount 0
SendData mainWindow setsize 463 {30 + ($itemSize$ * 2)}
SendData thispatcher itemamount 16WaitDuration 100
$itemID$ = 5
DoRepeat
SendData thispatcher itemtype $itemID$ dial
SendData thispatcher itemtype {$itemID$ + 8} dial
SendData item dial $itemID$ name $itemID$
$itemID$ = {$itemID$ + 1}
WaitDuration 10
While {$itemID$ < 9}SendData item button 0 fontface regular
SendData item button 0 bgcolor 0. 0. 0. 1.
SendData item button 0 bgoncolor 0.773 0.145 0.196 1.
SendData item button 0 bordercolor 0.251 0.533 0.643 1.
SendData item button 0 borderoncolor 0.2 0.2 0.2 1.
SendData item button 0 textcolor 0.827 0.827 0.824 1.
SendData item button 0 textoncolor 0.827 0.827 0.824 1.SendData item dial defaultSettings
SendData thispatcher basicdisposition
SendData MacroInitialized
MacroStop
EndIf// Which Case is it ?
Message { “Button or Dial number ” + currentCaseValueString() + ” : ” + currentCaseOptionValueFloat(0)}PhilippeKeymasterSalut,
Oui c’est possible en utilisant cette syntaxe :SendData item 11 name “boom”
Philippe
- This reply was modified 9 months, 1 week ago by Philippe.
14 February 2024 at 21 h 34 min in reply to: Matrix – Comment mémoriser l’assignation des boutons #6287PhilippeKeymasterSalut William,
Les mappings midi des matrix sont mémorisés dans le preset principal.
Normalement, il ne sont pas effacé lors de l’édition de la macro.
Toutefois, tu peux les perdre si la macro contient une information pour les écraser, genre :SendData midiMapping clearAll
Si c’est le cas, mets cette ligne en commentaire en mettant de slash au début de la ligne, comme ceci :
//SendData midiMapping clearAll
Si tu souhaites associer une macro de manière définitive à un appareil Midi, tu peux mettre les midi mappings en dur dans le macro avec ce genre de commendes :
SendData midiMapping 1 nt 8 11
SendData midiMapping 2 nt 9 11
//…//
SendData midiMapping 12 cc 2 11
SendData midiMapping 13 cc 3 11nt signifiant que tu associes une note midi à l’item et cc signifiant que tu associes un contrôleur à l’item.
Avec ces lignes, dès que la macro est chargée, elle est mappée !
Bonne journée,
PhilippePhilippeKeymasterHi Trevor,
It’s great to read that you had a great performance with Logelloop this weekend!If your Sonoma version is earlier than 14.3, I’d encourage you to upgrade, as in previous versions there seems to be a performance issue that causes some Logelloop functions to be throttled.
By the way, we are currently working on some Link issues and the next release will probably be more accurate.
Best regard,
Philippe31 January 2024 at 17 h 02 min in reply to: Loopers will not reset In and Out selection within Matrix Macro #6279PhilippeKeymasterThank you.
So I could make some investigation…
And it appears that Sleep is the culprit !In the Sleep documentation it is written “Important difference with WaitDuration: A Sleep action will be interrupted if the macro receives a User Action. No option can change this behaviour. If you want to wait a duration without the risk to interrupt it, use WaitDuration action.”
And in a Matrix, the macro will receive many user actions like button down, button up, button long press, etc. So, if the macro is Sleeping and receives a new action, it will stop immediately. That will not be the case with all Wait… actions. So you should use WaitDuration in place of all Sleep.
I recommend using WaitDuration in every situation as it is more robust. Sleep was an old action, we keep it for legacy compatibility.
We will see if that’s possible to produce an error when a Sleep appears in a matrix macro.
Best,
Philippe31 January 2024 at 16 h 04 min in reply to: Missing two Macro functions: SlicerInsertState and “ResetInOutSelection” #6278PhilippeKeymasterHi Daniel,
1 – in the next release you will be able to toggle the Slicer’s inserts button state with the SlicerInsertState macro
2 – I have added the SelectionReset macro message for modular loopers. The <> will still work as an alias but will not appear anymore in the documentation.Best,
Philippe31 January 2024 at 11 h 55 min in reply to: Loopers will not reset In and Out selection within Matrix Macro #6276PhilippeKeymasterPlease, send the entire macro code.
Thanks,
Philippe31 January 2024 at 11 h 44 min in reply to: Insert Looper is not updated by changes to SelectionIn/SelectionOut variables #6273PhilippeKeymaster29 January 2024 at 20 h 19 min in reply to: Missing two Macro functions: SlicerInsertState and “ResetInOutSelection” #6265PhilippeKeymasterHi Daniel,
1. to be sure, you need to be able to toggle off/on the inserts red button of the slicer by macro ?
2. That was probably not a good idea, but this function is named <> ! -)
InsertSendMessage fx1 1 <>
And it is at the first line in the help window.
Do you think I should rename it as ResetSelection or even better SelectionReset ?Best,
Philippe29 January 2024 at 20 h 19 min in reply to: Missing two Macro functions: SlicerInsertState and “ResetInOutSelection” #6264PhilippeKeymasterHi Daniel,
1. to be sure, you need to be able to toggle off/on the inserts red button of the slicer by macro ?
2. That was probably not a good idea, but this function is named <> ! -)
InsertSendMessage fx1 1 <>
And it is at the first line in the help window.
Do you think I should rename it as ResetSelection or even better SelectionReset ?Best,
PhilippePhilippeKeymasterHi Trevor,
What is your OS ?
Thanks,
Philippe -
AuthorPosts