Home › Forums › Logelloop 6 (English spoken) › Matrix Macros › Reply To: Matrix Macros
27 December 2024 at 9 h 05 min
#6729
Pacocreative
Participant
Sure. I don’t think it’s a problem of my specific macros.
Here’s a template where I only added labels.
They show up, but the code breaks – i.e. when button is pressed or dial moved, the action stops working.
If labels are removed, they work fine (see dial 1&2 vs 3)
The code is one of your templates:
Declare Local Once boolean $firstTime$ = true
Declare Local int $itemID$ = 1
Declare Local int $itemSize$ = 56
Declare Local int $verticalPosition$ = 1
If { $firstTime$ }
$firstTime$ = false
//SendData midiMapping clearAll
SendData itemamount 32
WaitDuration 300
DoRepeat
SendData itemtype $itemID$ dial
SendData item dial $itemID$ name $itemID$
$itemID$ = {$itemID$ + 1}
WaitDuration 10
While {$itemID$ < 9}
SendData mainWindow setsize 463 {30 + ($itemSize$ * 4)}
SendData item button 0 fontface regular
//SendData button 0 fontsize 40
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.2 0.2 0.2 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.;
// Labels, for some reason they don't work
SendData item 1 name "Vol 1"
SendData item 2 name "Vol 2"
SendData item 30 name "Button 30"
SendData item 31 name "Button 31"
SendData item 32 name "Button 32"
SendData item dial defaultSettings
SendData basicdisposition
SendData MacroInitialized
MacroStop
EndIf
// Which Case is it ?
Message { "Button or Dial number " + currentCaseValueString() + " : " + currentCaseOptionValueFloat(0)}
CaseBranch 1
MessageMain { "Dial " + (currentCaseValueString()) + " value is : " + currentCaseOptionValueFloat(0)}
TrackVolume trk1 = {scale(currentCaseOptionValueFloat(0), 0, 127, -76, 0)}
BreakCaseBranch
CaseBranch 2
MessageMain { "Dial " + (currentCaseValueString()) + " value is : " + currentCaseOptionValueFloat(0)}
TrackVolume trk2 = {scale(currentCaseOptionValueFloat(0), 0, 127, -76, 0)}
BreakCaseBranch
CaseBranch 3
MessageMain { "Dial " + (currentCaseValueString()) + " value is : " + currentCaseOptionValueFloat(0)}
TrackVolume trk3 = {scale(currentCaseOptionValueFloat(0), 0, 127, -76, 0)}
BreakCaseBranch
CaseBranch 4
MessageMain { "Dial " + (currentCaseValueString()) + " value is : " + currentCaseOptionValueFloat(0)}
BreakCaseBranch
CaseBranch 9_toggleOn
// Your code here
MessageMain { "Dial " + (currentCaseValueString()) + " value is : " + currentCaseOptionValueFloat(0)}
Message "The button number 9 is On"
BreakCaseBranch
CaseBranch 9_toggleOff
// Your code here
Message "The button number " + (currentCaseValueString()) + " is Off"
BreakCaseBranch
CaseBranch 10_toggleOn
// Your code here
Message "The button number " + (currentCaseValueString()) + " is On"
BreakCaseBranch
CaseBranch 10_toggleOff
// Your code here
Message "The button number " + (currentCaseValueString()) + " is Off"
BreakCaseBranch
CaseBranch 11_toggleOn
// Your code here
Message "The button number " + (currentCaseValueString()) + " is On"
BreakCaseBranch
CaseBranch 11_toggleOff
// Your code here
Message "The button number " + (currentCaseValueString()) + " is Off"
BreakCaseBranch
CaseBranch 9
// Your code here
Message "The button number 9 was pushed"
BreakCaseBranch
CaseBranch 9_up
// Your code here
Message "The button number 9 was released"
BreakCaseBranch
CaseBranch 10
// Your code here
Message "The button number 10 was pushed"
BreakCaseBranch
CaseBranch 11
// Your code here
Message "The button number 11 was pushed"
BreakCaseBranch
CaseBranch 12
// Your code here
Message "The button number 12 was pushed"
BreakCaseBranch
CaseBranch 30
// Your code here
Message "The button number 30 was pushed"
BreakCaseBranch
CaseBranch 31
// Your code here
Message "The button number 31 was pushed"
BreakCaseBranch
CaseBranch 32
// Your code here
Message "The button number 32 was pushed"
BreakCaseBranch
EndCaseBranches
// Put here some code that will be interpreted after each CaseBranch