PLEASE HELP! Single value CC to send all CCs on dif Channel?

famusvictim

2013-07-30 18:07:38

Hey Everyone.

I'm finishing a huge project and could really use your help here. THANKS!!!

Is there any way to translate a single, exact CC message from one channel (i.e. B1 57 01) into sending out ALL the CC messages for a different channel, all with identical third byte values (i.e. BA pp 6C), by using either rule-based local or global variables to send out ALL 128 values???

I appreciate your generous help!

Muchos Gracias!

Erik MS


Please excuse the Big Font - but it's a small post, and I wanted to grab your attention - this is killing me, and I hope to avoid using 128 translators.

DvlsAdvct

2013-07-30 18:55:03

You can either:

Set up 128 translators, obviously not ideal.

Set up one translator with 128 output messages in a list, also not ideal

Use a repeating timer, but there will be a delay on the output, or use a series of timers, with less delays.

So, for example, you can have a single timer get triggered by an incoming MIDI signal which repeats 128 times using a global variable which is constantly being added, or you can use a single timer to trigger other repeating timers, possibly 10, which uses different math. The problem is there will be a slight delay. The more timers you use the less delay there will be. For example, 10 timers will have to trigger 12 or 13 values, so there will be 13ms delay, at most, from beginning to end, which is not that bad.

Thoughts?

famusvictim

2013-07-31 17:10:51

Hi man,

thank for the advice! I definitely would like to use it instead of wrecking my brain with 111 translators (the actual number of requisite messages for this case).

But... I'm ashamed to say that the Timer is the one MT function I have not used in this project (though it probably could have helped).

Could you please give an example for this specific case, for a single timer that would cycle 7 times?

I am going to use 18 7-cycle timers to do this, as that will cut delay, and it intuitively works for my arrangement of the outgoing messages (groups of seven consecutive CC messages, all on one channel)

DvlsAdvct

2013-07-31 17:20:36

Nothing to be ashamed of. Timers are, generally speaking, one of the last pieces of the application people delve into.

You will need to create 16 translators, one for each timer, all with the same incoming message, but each with different timers, all repeating every 1ms 7 times.. Then you will have a translator for each timer that timer that counts the global variables for the output. So the first one will look like:

Code: Select all

Translator 1: Trigger Timer 1
Incoming Message: 90 00 7F
Rules: g0=0
Outgoing message: Timer 1 Repeat 7 init delay 0 repeat delay 1ms

Translator 2: Timer 1
Rules: g0=g0+1
Outgoing Message: BA g0 6C

Translator 3: Trigger Timer 2
Incoming Message: 90 00 7F
Rules: g1=7
Outgoing message: Timer 2 Repeat 7 init delay 0 repeat delay 1ms

Translator 4: Timer 2
Rules: g1=g1+1
Outgoing Message: BA g1 6C
Make sense?

famusvictim

2013-08-05 16:08:15

Makes perfect sense.
I tried it, but it seemed to not allow multiple timers to run like this.
It should work - totally get it and did it, but every time, it would only allow the first translator to run.


then... JUST AS I WROTE THIS, i realized that I may have only used one global variable for all translators instead of a different one for each translator - I'm stupid.... /sigh

For everyone else's knowledge - doing this type of translation and forgetting to use a new global var for every translator will cause an obvious translator conflict and render your efforts useless, as they will overlap at the exact same time. At least others can learn from my absent mindedness!


my bad....

great advice - I've sent a copy of the project out to a few people for perusing and advice, using the slower translation method. But it's a beta/developer-test version and that's just one of many issues to sort out, so it's no so big of a deal right now. thanks anyway - great idea!

everyone else - this is a great solution to the problem of using one exact midi message to trigger a slew of messages that share a variable value.

I will fix it.

peace