This forum is read-only. Please post new topics in our Q&A forum.

1 MIDI message to cycle 4 keystrokes

General discussion about MIDI Translator

Moderators: florian, DvlsAdvct

Post Reply
Jazzid
New User
Posts: 2
Joined: Mon Jan 07, 2008 10:34 am

1 MIDI message to cycle 4 keystrokes

Post by Jazzid » Mon Jan 07, 2008 11:13 am

Sending 1 midi message (a button on a keyboard) needs to cycle 4 keystrokes.

The key strokes are [Ctrl and 1], [Ctrl and 2], [Ctrl and 3], [Ctrl and 4]

After output [Ctrl and 4], I want the rule to cycle back to [Ctrl and 1] at next button-press.

I've fiddled around with the rules, but I've been unable to solve this one.

Can anyone point me in the right direction?

Regards

Jazzid

metastatik
Power User
Posts: 61
Joined: Wed Sep 26, 2007 6:02 pm

Post by metastatik » Tue Jan 08, 2008 4:39 pm

You need 5 translators and they’d be set up like this.

Translator 1:
Options: Stop processing unchecked
Incoming: B0 01 pp (replace this with the MIDI message you want to use)
Rules: ga=1+ga (every time the MIDI message is sent, the value of ga will increase by 1)
If ga>4 then ga=1 (if the value of ga is greater than 4, the value of ga will return to 1)
Outgoing: None

Translator 2:
Options: Stop processing checked
Incoming: B0 01 pp
Rules: If ga !=1 then exit rules, skip Outgoing Action (if ga doesn’t equal 1, this translator will be skipped)
Outgoing: Ctrl+1

Translator 3:
Options: Stop processing checked
Incoming: B0 01 pp
Rules: If ga !=2 then exit rules, skip Outgoing Action
Outgoing: Ctrl+2

Translator 4:
Options: Stop processing checked
Incoming: B0 01 pp
Rules: If ga !=3 then exit rules, skip Outgoing Action
Outgoing: Ctrl+3

Translator 5:
Options: Stop processing checked
Incoming: B0 01 pp
Rules: If ga !=4 then exit rules, skip Outgoing Action
Outgoing: Ctrl+4

Jazzid
New User
Posts: 2
Joined: Mon Jan 07, 2008 10:34 am

Post by Jazzid » Tue Jan 08, 2008 5:20 pm

Well, I realize that there are people out there smarter than myself. Not that that comes as a big surprise. :wink:

Anyway, thanks a lot for helping me out with this one. I can't wait to give this receipt a go.

I've been looking at the setup, and it seems really clever!

Metastatic, I owe you one :D

Aphid
New User
Posts: 3
Joined: Sat Apr 04, 2009 3:29 pm

Post by Aphid » Sun Apr 05, 2009 5:10 am

Hi,

This is almost exactly what I've been looking for - but there's one problem.

I'm using this for a beatjuggling hybrid I'm working on - the unfortunate part is that once it get's to the end of the cycle using the above code, it requires a fifth press to return to the beginning.

So, it goes 1st press, 2nd press, third, fourth and then to cycle back to 1, it requires a 5th press (the one where it determines that it needs to reset to 1, from 4).

We need to avoid this for a continuous cycle ie. 1,2,3,4,1,2,3,4,1,2,3,4 NOT 1,2,3,4. 5, 1,2,3,4. 5, 1,2,3,4 etc. Any suggestions?

ruediger
Bome Software: Partner
Posts: 194
Joined: Mon Nov 05, 2007 12:02 pm

Post by ruediger » Mon Apr 06, 2009 4:42 pm

Hi,

this should be easy.

Translator 1:
Options: Stop processing unchecked
Incoming: B0 01 pp (replace this with the MIDI message you want to use)
Rules: ga=1+ga (every time the MIDI message is sent, the value of ga will increase by 1)
Outgoing: None

Translator 2:
Options: Stop processing checked
Incoming: B0 01 pp
Rules: If ga !=1 then exit rules, skip Outgoing Action (if ga doesn’t equal 1, this translator will be skipped)
Outgoing: Ctrl+1

Translator 3:
Options: Stop processing checked
Incoming: B0 01 pp
Rules: If ga !=2 then exit rules, skip Outgoing Action
Outgoing: Ctrl+2

Translator 4:
Options: Stop processing checked
Incoming: B0 01 pp
Rules: If ga !=3 then exit rules, skip Outgoing Action
Outgoing: Ctrl+3

Translator 5:
Options: Stop processing checked
Incoming: B0 01 pp
Rules: If ga !=4 then exit rules, skip Outgoing Action
ga=0 (if the value of ga is greater than 4, the value of ga will return to 0)
Outgoing: Ctrl+4

Best regards,
Rüdi

Aphid
New User
Posts: 3
Joined: Sat Apr 04, 2009 3:29 pm

Post by Aphid » Tue Apr 07, 2009 5:05 am

Wow it worked! Thank you so much!

:D Blam!!!!

8)

Post Reply