Jump to content

Trigger sustain on/off with two keys from MIDI controller?


Patrickroyh
Go to solution Solved by polanoid,

Recommended Posts

I would like to trigger “sustain on” for notes and “sustain off” for notes using two keys from a midi controller. Specifically, I would like to press C5 and have it trigger “sustain on” and I would like to press  B4 and have it trigger “sustain off”. I want to do this in real time, as I play.s

Surely there must be a way to execute this with the transformer (or a combination of transformers) in the Environment. But I have not figured out how to do so.

Any help or insight would be appreciated.

Link to comment
Share on other sites

  • David Nahmani changed the title to Trigger sustain on/off with two keys from MIDI controller?
1 hour ago, Patrickroyh said:

I would like to trigger “sustain on” for notes and “sustain off” for notes using two keys from a midi controller. Specifically, I would like to press C5 and have it trigger “sustain on” and I would like to press  B4 and have it trigger “sustain off”. I want to do this in real time, as I play.s

Surely there must be a way to execute this with the transformer (or a combination of transformers) in the Environment. But I have not figured out how to do so.

Any help or insight would be appreciated.

I think it's best to just provide an example project doing this, so here is one. Look at the two transformers cabled between Physical Input and Input Notes object.Trigger Sustain via MIDI Notes.logicx.zip

Link to comment
Share on other sites

10 minutes ago, JakobP said:

Damn it you're fast, @polanoid !! 😄

Thanks 😉 That said, can you (or someone else here) figure out why I need to use this 

image.png.a55e7f0dc60d324c7a69d60a631ebe19.png

and cannot simply use

image.png.9b31db645c7797d5dd29d00f3b98c2ae.png

? I know that Note Offs can be Note Ons with Velocity 0, but if I tell the Transformer to use a fixed event value of 127, it should use that value for Velocity 0 too if Velocity is set to All, no?

Instead it creates a Sustain OFF (Value 0) event instead when it receives the Note Off, unless I let the Note Off event pass unmodified by setting the above condition.

Link to comment
Share on other sites

48 minutes ago, polanoid said:

Instead it creates a Sustain OFF (Value 0) event instead when it receives the Note Off, unless I let the Note Off event pass unmodified by setting the above condition.

Yeah, I find that weird too, maybe one of those "gotcha's" that's always been there ? 

  • Like 1
Link to comment
Share on other sites

Quote

And here's a version that toggles Sustain using just the C5 key, saving you one key.

A lovey idea. But it seems to work like a sustain pedal. If C5 is held down, other notes sustain, and when C5 is released, sustain is terminated.

Is there a way for C5 to toggle as follows: C5 pressed and released creates sustain. If C5 is pressed and released  a second time, sustain is terminated.

For my purposes, this would be very nice indeed. 

 

Link to comment
Share on other sites

12 hours ago, Patrickroyh said:

Is there a way for C5 to toggle as follows: C5 pressed and released creates sustain. If C5 is pressed and released  a second time, sustain is terminated.

Looks like @polanoid's one note version of his environment setup already works that way. It toggles between CC64 127 and CC64 0 with C5 Note Ons (i.e, whenever the key is down) and Note Offs are ignored.

 J.

  • Like 2
Link to comment
Share on other sites

13 hours ago, Patrickroyh said:

it seems to work like a sustain pedal. If C5 is held down, other notes sustain, and when C5 is released, sustain is terminated.

Is there a way for C5 to toggle as follows: C5 pressed and released creates sustain. If C5 is pressed and released  a second time, sustain is terminated.

I just double checked, the song I sent last works exactly like that. When you have your MIDI Environment open, I even added a nice square that lights up while Sustain is on:

image.png.8217eb904e630cf585bc9f3eb82d71e5.png

Tried with Musical Typing keyboard and with external keyboard (Komplete Kontrol). So it doesn't work for you? Which MIDI keyboard are you using?

Edited by polanoid
  • Like 1
Link to comment
Share on other sites

Well this is definitely a Weird Harold.

I have three MIDI controller keyboards. They are all legacy boards, in the sense that they all have MIDI interfaces, and not simply a USB interface. They are all connected via their MIDI Out to a MIDI Express XT. And this is connected to my 2017 Intel iMac, running 12.6.7 and Logic Pro 10.7.9 (This will soon be upgraded to an M2 ultra and Logic 10.8).

The boards are:

A Roland Edirol PCM-800 (61 keys)

A Fatar Studiologic (88 keys)

An M-Audio Keystation 88

And here is what happens: C5 does indeed work as a toggle on the Edirol, but only on Ch 1. On other channels, it does not work at all, either as a toggle or a simple switch.

On the Fatar, it works like a sustain pedal, not a toggle. But again, only on Ch 1.

On the Keystation 88, there is the same behaviour as on the Fatar.

There is no designated MIDI in the signal path of this macro, so this makes no sense at all to me.

And the variance in behaviour also makes no sense.

Any idea what is happening?

Link to comment
Share on other sites

On the Environment page, if I insert a keyboard object just after the Physical Input, it behaves like a sustain pedal. That is, if I press and hold C5, it sustains, and cancels sustain when I release the key.

But again, it only works if the keyboard object is set to Ch 1. On other channels, it does not work at all.

 

If I insert a keyboard object after the Physical input in the Environment page of the original macro (i.e. C5 pressed and released triggers sustain, and B5 pressed and released cancels sustain) everything works fine.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...