Keyboard key note-off cancels any midi to specific port

sveva

2010-06-13 17:15:40

Hi there
Anyone knows if it is possible to make a translator that cancels any midi sent to a specific midi port, and that this action be triggered from a midi keyboard key?
sveva

Attigo

2010-06-15 21:58:29

Hi Sveva,

You could always just 'swallow' the MIDI message, just take an input and send no output, or if you want to add a keystroke that stops the message passing through you can use global variables... Like this:

Code: Select all

Translator 0: MIDI Through
Options: stop=false
Incoming: MIDI B0 01 oo 
Rules: 
  if ga==1 then exit rules, skip Outgoing Action
Outgoing: MIDI B0 01 oo 

Translator 1: Through Key Toggle
Options: stop=false
Incoming: Keystroke: A
Rules: 
  ga=ga+1
  if ga>=2 then ga=0
Outgoing: (none)
This toggles whether or not the message is 'allowed' through. The A key toggles the global variable 'ga' between 0 and 1.

Or if you don't want this to be a 'toggle' feature you can use it as a 'hold' feature. When you hold down the key it will stop the message getting through.

Code: Select all

Translator 2: Through Key Hold
Options: stop=false
Incoming: Key down: A
Rules: 
  ga=1
Outgoing: (none)

Translator 3: Through Key Hold
Options: stop=false
Incoming: Key up: A
Rules: 
  ga=0
Outgoing: (none)
If you wanted it the other way around, you could swap the 1 in the Key Down event to 0 and the Key Up event to 1 and this will only allow a message through if you hold the key down.

Hope this helps!!

Scott

sveva

2010-06-16 19:20:54

Hi Scott

Tried it. It cancels out the key fine (it doesn´t reach Ableton)
but all the other notes pass through :( key down or up
So I am trying to find out what part I dont understand

The first line says : Options: stop=false what does it mean, where can I find it?

So in translator 0 (which is named Midi Through) My Incoming trigger should be B0 01 oo and not keyboard key 90 2D oo which I push?

Rules:
if ga==1 then exit rules, skip Outgoing Action --- here I am fine

Outgoing: MIDI B0 01 oo --- ? same as above




Translator 1: Through Key Toggle
Options: stop=false --- ?
Incoming: Keystroke: A -----? Is it here I capture my key 90 2d oo ?
Rules:
ga=ga+1 _´---- ?
if ga>=2 then ga=0 ---- ? both these lines dont fit into one rule. How do I make them fit?
Outgoing: (none)

sveva

Attigo

2010-06-16 19:46:09

Sveva,

I thought you meant a Key on a Keyboard (QWERTY), sorry, If you want to use a Key on a MIDI Keyboard, then you would replace the 'Keystroke' inputs with the MIDI message of your (MIDI) Key... Like so:

Code: Select all

Translator 0: MIDI Through
Options: stop=false
Incoming: MIDI B0 01 oo 
Rules: 
  if ga==1 then exit rules, skip Outgoing Action
Outgoing: MIDI B0 01 oo 

Translator 1: Through Key Toggle
Options: stop=false
Incoming: MIDI 90 2D oo 
Rules: 
  ga=ga+1
  if ga>=2 then ga=0
Outgoing: (none)
The 'stop=false' is nothing you need to worry about, it's just the way the translator is displayed then you copy and paste it as text (like I did above).

Translator 0 is just passing through a MIDI message, but it doesn't allow it if the variable 'ga' is 1. B0 01 oo is just an example CC message I pulled from the top of my head... Replace it with the MIDI message you want to receive from and send on, whether that is a CC or Note message.

The second translator is just defining the 'ga' variable; whether or not the first translator is to allow the message through or not. 1=NO, 0=YES (although this may seem a little backwards, 0 is the default value of a global variable, and by default you want the message to pass through, right?)

Both the rules do not need to fit onto 1 line, they read like text in a book, left to right, top to bottom. You can have as many rules as you like in 1 translator.

Maybe I'm not understanding what you want to do correctly? Are you wanting to stop/allow a message through on a key press? if so, do you want it to only pass through if the key is held down, or toggle whether it allows or not?

Scott

sveva

2010-06-17 10:00:16

Hi Scott

I was not to clear about what I want to achieve. I´ll try:

What I want to do is: have two armed tracks in Ableton. Use them to play Ableton instuments.
I want to play my midi keyboard; sometimes through one track, sometimes through the other.
I want to choose which one, by holding down the lowest key (here MT should allow all the keys on the
keyboard to go through to track 1). Or not hold down the lowest key, and all the keys on the keyboard
go through to the other track, say track 2.

I know how to do this by having MT send midimessages or emulated keystrokes and then Midimap and Keymap in ableton.
But arming tracks this way is a little unpractical, it takes Ableton a little while to prepare especially when
Using sampled instruments. So by having both tracks open armed all the time, it goes smoother.
I guess sending to two different midichannels (midiyoke 1 and 2) is part of the solution.

sveva

Attigo

2010-06-17 11:09:45

Ok, maybe just send on different MIDI channels?

Can you have more than one track armed to record at one time? Surely you just want to have a button that selects a track and arms it and just have the standard MIDI key notes sending through?

Scott

sveva

2010-06-17 14:50:09

Hi Scott

Yes send to two different midi channels.
Yes I can have two tracks armed in Ableton (control + mouse click) no problem ;)

"Surely you just want to have a button that selects a track and arms it" -not arms it, it is armed all the time. Just send midi to the designated track(controlled by lowest key on keyboard) (to be done from MT if possible).

"and just have the standard MIDI key notes sending through?" Yes

sveva

sveva

2010-06-20 20:23:29

Hi Scott
Do you think MT is capable of this?

sveva

Attigo

2010-06-22 02:34:18

Sveva,

Sveva, for a standard set of MIDI (Keyboard) notes, that can only be one range and used for one channel at a time. Maybe each (Audio) channel wants to hear MIDI on a different (MIDI) channel? As far as I know you cannot 'map' keyboard notes...? In this case you would use the solution I previously provided.

As for different MIDI channels, yes this is possible. You will need to install more virtual ports, maybe MIDI Yoke. You would just have different translators route out to different ports (Bome or MIDI Yoke).

Scott

sveva

2010-06-23 01:25:19

Hi Scott
Yes! thats what iwant to do.
I have 2 virtual bome ports (could make more if neccesary) and 8 midiyoke channels.
i just dont know how to route to different channels. (controlled by keyboard key being held down or up)

Thanks sveva

Attigo

2010-06-23 01:50:13

Ok, it's not too difficult to do. You just want the output channel to change, so you would make that a 'global' variable...

Assuming your keyboard sends Notes on MIDI Channel 1 (90 xx xx) and you want to switch the output to Ableton between channels 1 and 2 (90 xx xx and 91 xx xx) and the key you want to use as the trigger is 90 01 oo then you would do it like this:

On Preset load, this sets the variable so the default output channel is 1 (144 is the decimal number the the hexidecimal number 90).

Code: Select all

Translator 0: Set Toggle Variable (CH1)
Options: stop=false
Incoming: on activation of this preset
Rules: 
  ga=144
Outgoing: (none)
Use the key on your keyboard to toggle between MIDI channels 1 and 2 (1 as default, 2 when pressed).

Code: Select all

Translator 1: Key - Toggle Channel (CH2)
Options: stop=false
Incoming: MIDI 90 01 oo 
Rules: 
  ga=145
Outgoing: (none)

Translator 2: Key - Toggle Channel (CH1)
Options: stop=false
Incoming: MIDI 80 01 oo 
Rules: 
  ga=144
Outgoing: (none)
And then you want to receive the MIDI from your keyboard and pass it through to Ableton on the desired Channel.

Code: Select all

Translator 3: Keyboard Through
Options: stop=false
Incoming: MIDI 90 oo pp 
Rules: 
  if oo==1 then exit rules, skip Outgoing Action
Outgoing: MIDI ga oo pp 
The rules in the above Translator just 'swallow' any input from the 'toggle' key (assuming it is 90 01 oo). oo and pp are local variables used for just passing through a value.

Hope this makes sense!

Scott

sveva

2010-06-23 17:53:30

Hi Scott
This makes sense. I think it is very close to work

My keyboard sends 90 xx xx.
My Keyboard key that I want to use for toggle is 90 2D oo - 80 2D oo
In translator 0 : do I find "on activation of this preset" in : incoming : select incoming trigger type: preset type - first option(out of six) : the current preset is activated ?
For translator 1 : I should use incoming 90 2D oo (since it is my keyboard toggle key). Right?
For translator 2 : I should use incoming 80 2D oo (since it is my keyboard toggle key). right?
For translator 3 : when I use 90 oo pp for incoming : nothing comes through

following the last post and using my keyboard key for toggle: in the MT monitor Router-out only blinks when releasing keys. and the same in Ableton(midiactivity blinks only on key-release

in router I have usb midi port going to midi yoke out 1 and 2. this should be fine no?

sveva

2010-06-23 22:13:18

Hi Scott

Replacing the midiyokes 1-2 with Bomes miditranslators 1-3 , using using the 3. (third on) in Ableton and choosing channel 1 for track 1 and channel 2 for track 2 , it actually works!!!!!!!
But the notes on track 2 hang ( dont get note-off from MT)

Allmost there!!!!! So close!!!!!! It HURTS!
Please put me out of this missery!

sveva

sveva

2010-06-26 23:18:47

Hi Scott

Returning to the issue now with more meat:

All the 91 notes hang, dont get their note-off.

The key 91 2D triggers sound. How do I deny its acces to Ableton?

I am using the translators: ""Key Toggle ch 1 , "Key Toggle ch 2" and "Keyboard Through" mentioned by you in earlier reply.

Following Log window in MT , it says :
When key down
in 0.1 : midi 90 2D 56 , oo=0x56 assignmet: (ga=145) =145
in 0.3 : midi 90 2D 56 , oo=0x2D pp = 0x56
out 0.3 midi 91 2D 56 (this is the note I want to avoid)
when key up
in 0.2 : midi 80 2D 5A , oo=ox5 A assignment : (ga=144) = 144

Concentrating on one thing: How do I deny 91 2D xx access to ableton?
Sveva

Attigo

2010-06-28 03:32:24

Sorry sveva, I think I explained all ok before, you may be misunderstanding me...

Maybe it's best you send me your Preset to have a look at?

Scott

sveva

2010-06-28 16:20:16

Hi Scott

Here is the preset

sveva
Attachments
Toggle 1-2 preset.bmtp
(1.3 KiB) Downloaded 219 times

sveva

2010-06-28 16:23:02

Hi Scott
Preset
Toggle 1-2 preset.bmtp
(1.3 KiB) Downloaded 252 times
sveva

Attigo

2010-07-02 04:35:59

Hi sveva,

I see the problem, you have not changed the variable in the keyboard through to the specific key you want to stop. In the example I used '1' but the key you are stopping is MIDI (Hex) Note 2D (A2), the Decimal value for this is 45.

As for the Note OFF messages, this is my bad, I never took this into consideration in the example. Before in the 'Through' Translator, I used 90 oo pp. This is only allowing Channel 1 Note ONs through.

Below is how your Preset should be to fix this issues...

Code: Select all

Translator 0: Set Toggle Variable
Options: stop=false
Incoming: on activation of this preset
Rules: 
  ga=144
Outgoing: (none)

Translator 1: Key-Toggle Channel (2)
Options: stop=false
Incoming: MIDI 90 2D oo 
Rules: 
  ga=145
Outgoing: (none)

Translator 2: Key Toggle Channel (1)
Options: stop=false
Incoming: MIDI 80 2D oo 
Rules: 
  ga=144
Outgoing: (none)

Translator 3: Keyboard Through
Options: stop=false
Incoming: MIDI oo pp qq 
Rules: 
  if pp==45 then exit rules, skip Outgoing Action
Outgoing: MIDI ga pp qq 
I hope this works for you!

Scott

sveva

2010-07-02 13:06:53

Hi Scott
Great, inputting 45 as decimal value for 2D help in translator 3 straightened out the issue with toggle key going through! and note-ons go to their designated tracks. Thanks

As for ch1 and ch2 they now work fine, except that they send note-on for key-down and note-on for key-up.
So I get double note-ons to Ableton.

Checking in midimonitor confirms this

Sveva