Tagged: Midi Feedback, MidiNoteSend, TrackPitchState
- This topic has 9 replies, 3 voices, and was last updated 3 years, 7 months ago by nay-seven.
-
AuthorPosts
-
30 April 2021 at 15 h 46 min #5069DanielAkerbergMember
Hello,
I am trying to create a macro where I can use my Lanuchpad toggle a tracks Pitch state on and off, and at the same time send visual feedback to the control surface. Here is my initial draft. Logelloop does however not like the use of TrackPitchState in the If statement. Could I please get some help with how to proceed with this? Thanks!
If { TrackPitchState == 0 }
TrackPitchState trk1 1MidiNoteSend 11 1 1 “Launchpad mk2”
Else
TrackPitchState trk1 0MidiNoteSend 11 0 1 “Launchpad mk2”
EndIf//
Daniel1 May 2021 at 10 h 22 min #5070PhilippeKeymasterHi Daniel,
This one is a bit tricky ! -)In Logelloop native macro examples, you will find “Track Settings Copy And Paste”.
In this macro you will see how we get the user interface state when there is no variable to share the UI state.To get the state of the Pitch of track 1, you put :
valueOfReactionNamed(“TrackPitchState_trk1”)This value can be directly put as a value in the midiNoteSend line after being scaled.
So, the scale expression below will convert a value of 0 or 1 to 0 or 127
scale(valueOfReactionNamed(“TrackPitchState_trk1”), 0, 1, 0, 127)As Midi values must be integers, you need to convert the float value in integer using the floor expression :
floor(scale(valueOfReactionNamed(“TrackPitchState_trk1”), 0, 1, 0, 127))As we do not want to cause too much communication with the Midi device, we have inserted a “Sleep 100” in the evaluation loop
The final macro will look like this :
//************************************************* Macro Begin *************************************************
DoRepeat
Sleep 100
MidiNoteSend 16 {floor(scale(valueOfReactionNamed(“TrackPitchState_trk1”), 0, 1, 0, 127))} 11 “X-TOUCH MINI”
While true
//************************************************* Macro End *************************************************I will try to insert a native Midi feedback for all tracks states in a future Logelloop release.
Best regards,
Philippe3 May 2021 at 12 h 04 min #5072nay-sevenParticipantThanks, I’m also interested by this kind of macro,
when i make “verify” your macro i have this error:
Ligne: 4, Commande erronée: MidiNoteSend
Bad parameter :The number of parameters (5 instead of 4) is incorrect for MidiNoteSendAn idea ?
3 May 2021 at 12 h 28 min #5073PhilippeKeymasterDid you put the device name inside “…”?
If yes, that should work.
Maybe, you can send a green copy by email.
Thansks, Philippe3 May 2021 at 12 h 28 min #5074PhilippeKeymasterDid you put the device name inside “…”?
If yes, that should work.
Maybe, you can send a green copy by email.
Thansks, Philippe3 May 2021 at 14 h 17 min #5075nay-sevenParticipantyes,
after some testing, i discover it was a copy/paste issue
when i paste your code, the ” characters was copied in black, when i rewrite them , they turn (with their content) to green
and no more errors in verification process
Maybe a pc/mac issue ? , I’m on mac Mojave.Now about the macro itself, if i start it , the pad light up, but no variation when pitch change ( or maybe i misunderstood something)
tested with x touch mini and launchpadthere ‘s a tricky interaction with Launchpad colors, they change depending only with specific velocity values
3 May 2021 at 14 h 28 min #5076PhilippeKeymasterHa, to obtain a feedback from the pitch value, you need to associate a Midi controller to this pitch and the feedback is already working for the pitch value.
Do you need something more particular?there ‘s a tricky interaction with Launchpad colors, they change depending only with specific velocity values
I Will probably need more explanations about that. Maybe a video?
I will look at the copy/.paste issue.
Philippe
3 May 2021 at 14 h 53 min #5077nay-sevenParticipantho, it’s ok,
i first think the author of this post want to have not only on/off feedback but also color variation depending of the pitch 😉
about color, i ‘ll send you the info i know3 May 2021 at 15 h 06 min #5078PhilippeKeymasterTo get the pitch value, you need this :
{floor(scale(valueOfReactionNamed(“TrackPitch_trk1”), 0, 1, 0, 127))}
But you will need some math to obtain the color variation depending on the pitch value… -)
3 May 2021 at 20 h 41 min #5079nay-sevenParticipantok, so i try to post the macro here, but was considered as spam..;-)
so here a link if someone interested
i use second row of a launchpad mini (mk1) to control the reverse
third row the pitch on/off -
AuthorPosts
- You must be logged in to reply to this topic.