apc 40mk 2: making other rotatory knobs output like the tempo knob

I would like to make 4 of the top row of Assignable Knobs send the same kind of notes as the tempo knob does currently.

The end result is to us the apc's Assignable Knobs to control the 4 x encoders for pan, tilt and so on on a ma2 I have created macro's within ma2 to move the encoders by tapping one macro to move it ccw and another macro for cw. so i would like to have midi which reacts like the tempo does with the notches.

I refer to the tempo knob as i have got this to do what i want by simply having 2 translators which change the cc to on note's and one translator sending a value at full 127 then the other at o.

I have mapped all the other button's and led's as desired this is one thing i couldn't figure out.

Hi, Please see the attached.

Each knob has a separate global variable to track the current knob position.

The knob position is compared to the last known knob position and send out ether 127 for left turn or 1 for right turn, just like the tempo knob.

The positions of the knobs are stored in global variables.

Knob 1 - ga

Knob 2 - gb

Knob 3 - gc

Knob 4 - gd

 

Here are the rules for knob 1

 

rr=0

if qq>ga then rr=1

if qq<ga then rr=127

if qq==127 then rr=1

if qq==0 then rr=127

ga=qq

 

The only different in the rules from knobs 2-4 is the global variable used.

 

Steve Caldwell
Bome Q and A Moderator and
Independent Bome Consultant/Specialist
bome@sniz.biz

 


Attachments:
1587087698404_APC-40MKII-Top-4-Encolders-Absolute-to-Relative.bmtp

I have made the velocity of knob 1 ga and the out going note ga.

Then made a blank translator with the above rules in and it doesn't seem to work. i feel that theirs some crushal stuff missing?

Hi, you need to pick a specific outgoing note. Not ga. Then leave the velocity at ga and it will work. You can map MA2 to the note you chose.

I think i’ve found out what’s wrong, i’ll up date here as soon as i’ve confirmed what i did wrong

I opened your file then compared the difference, now it work’s.

but now every time i open different presets with in bome software now and it freezes for a while, and the pc run’s hot, i load task manager to see what’s happening at i see that the cpu bumps up to 50% could there be a reason why this may be happening?

I opened your file then compared the difference, now it work's. but now every time i open different presets with in bome software now and it freezes for a while, and the pc run's hot, i load task manager to see what's happening at i see that the cpu bumps up to 50% could there be a reason why this may be happening?

 

Hi, not without looking at your project file. The file I sent you won't cause that but it is possible to incorrectly write rules or translators to drive CPU usage up. If you don't feel like sharing your project file publicly, you can send it to me in email and I will take a look.

 

Steve Caldwell
Bome Q and A Moderator and
Independent Bome Consultant/Specialist
bome@sniz.biz

email sent to : bome@sniz.biz

Hi Chris, 

I fixed the project file you sent. Apparently you had entered some random text into an incoming raw MIDI field. It is important that when you are entering into the raw MIDI field that you only put valid raw MIDI data.  I had to remove that preset so you will have to re-create it.  

I sent the corrected project file in email along with a text file of the removed preset.

The first hint that something was wrong is that when opening the project file you get an error message that says "Invalid MIDI Message".

I'm checking to see if there is a way to halt the project if this occurs instead of having the projec just hang.

Ideally it should call out the translator that created the issue and then halt allowing the user to fix it instead of just hanging MT Pro. I'm not sure if that will be possible, however.  In the meantime just be extremely careful with any translator that uses raw MIDI.

 

Steve Caldwell
Bome Q and A Moderator and
Independent Bome Consultant/Specialist
bome@sniz.biz

Thanks Steve, one thing that still stands, how can i grab the two different rr values and send them as two different translators.

Another way of explaining what i want to archive:

when the rr value = 1 translate: on note 61 channel 1 velocity pp (ma macro 1)
when the rr value = 127 translate: on note 61 channel 2 velocity pp (ma macro 2)

Thanks

Chris

Thanks Steve, one thing that still stands, how can i grab the two different rr values and send them as two different translators. Another way of explaining what i want to archive: when the rr value = 1 translate: on note 61 channel 1 velocity pp (ma macro 1) when the rr value = 127 translate: on note 61 channel 2 velocity pp (ma macro 2) Thanks Chris

SJC>Example

Incoming - CC 24 on MIDI CH 1 any value set value to rr

Rules:

// MIDI CH 1

if rr==1 then pp==1 then oo=0

//MIDI CH 2

if rr==127 then oo = 1

// default pp value set to whatever you want

pp=0

if rr==1 then pp=12

if rr==127 then pp=56

Outgoing - Note 61 on MIDI channel 00 velocity pp

 

Steve Caldwell
Bome Q and A Moderator and
Independent Bome Consultant/Specialist
bome@sniz.biz

how would i change the variables for the other knobs?

The same. These are all using local variables so as long as the incoming trigger is different you can use the same local variable names and they will not interfere with each other.

when typing in the “if rr==1 then pp==1 then oo=0” its highlighted in red?

The rest of the code didn’t seem to work in the rules.

I got the first knob to work with a tweaked version of the original code, but it gets confused when i added it to the next knob.

Each rule needs to be on its own line. There are no complex expressions or operations allowed on a single line.

If it is highlighted in red, then there is an error in that line.

You can post or email the project file letting me know the problem translator and I will have a look.

Steve Caldwell
Bome Q and A Moderator and
Independent Bome Consultant/Specialist
bome@sniz.biz

sent the updated file, i have added all the out going notes which i need to trigger when each of the knobs are turned left or right.

sent the updated file, i have added all the out going notes which i need to trigger when each of the knobs are turned left or right.

SJC> I see you left out the other rules for the first part you wanted

//part 1 convert absolute to relative

rr=0

if qq>ga then rr=1

if qq<ga then rr=127

if qq==127 then rr=1

if qq==0 then rr=127

ga=qq

//part 2 covert to note and MIDI channel

// Default to MIDI CH 1

oo=0

//MIDI CH 2

if rr==127 then oo=1

// default pp value set to whatever you want

pp=0

if rr==1 then pp=12

if rr==127 then pp=56

I’m posting the solution here but will also update your project file posting the solution into 2 of your translators.

You also didn’t have the outgoing MIDI channel set to oo and you had the wrong variable for incoming value

One side affect is that the notes continue as you continue to turn right or left. If you only want the note to go out once for each direction (no duplicates), I’l have to add some more rules.

Attachments:

1587405130066_APC-40MKII-Top-4-Encolders-Absolute-to-Note-2020-04-20.bmtp

aha, I’ve checked the file above and ma doesn’t work with control change notes, as per before with the out put i would need to take the outgoing velocity’s 1 and 127 and changing them into 2 translators, as when i turn the knobs left (velocity 127) i need to trigger one ma macro’s with a on note then when i rotate the knob the other way (velocity 1) i need to trigger another macro with an on note.

i basically need to end up with 2x outgoing ON notes to sent to ma

Just change the outgoing message from Control Change to Note-On and you should be all set.