Momentary button to send effect with max value

3.08K viewsCSS Questions
0

I have a momentary button and I wanna send my send1 to max value (127). I also have a Knob1 that controls the send1. But additionally I want to have a that momentary button. For some reason I can’t manage to send the value of the send1 to max when pressed.

I tried with reaction, but without success (but maybe there is a easier way):

Listener: Button 1o was pressed
Action Block1:
Condition: Button 10 latest velocity value is equal – 127
Action: MIDI Controller – send MIDI velocity value to Controller input Knob1 Value 127
Action Block2:
Condition: Button 10 latest velocity value is not equal – 127
Action: MIDI Controller – send MIDI velocity value to Controller input Knob1 Value 0

Maybe it’s wront to send the velocity value to Knob1, but I couldn’t find an option how to set the send1 directly.

Any ideas on how I can achieve this?
Any help is appreciated

Rouz Answered question
Attached Files:
1

The channels you’re getting from hovering over a button on the controller template, starts counting from 1 (to 16). But in the code it starts counting from 0 (to 15). So you just need to detract 1 from the channel.

You could also temporarily start making a condition in a reaction with that button, then the code for that button will appear below the condition (if you’re ever uncertain). Remember to throw away the Condition afterwards, or it might produce an error.

Inside the structure of ‘midi_cc_ch_1_val_61’ there are 3 variables that can change depending of how your template is set up:

  • cc could also be note
  • the channel (counting from 0 to 15)
  • the value (counting from 0 to 127)

About the Listener Number logging

There must be a line of code I forgot to comment out, near the top of the function. It logs twice because the function is called both on press and on release.

The Exit Reaction shouldn’t be necessary, but it won’t hurt either.

Glenn V. Answered question
You are viewing 1 out of 16 answers, click here to view all answers.