Request: Device that forces "retrigger" when playing notes

Learn about building and using Max for Live devices.
Post Reply
Zyko1
Posts: 46
Joined: Tue May 27, 2014 8:26 am

Request: Device that forces "retrigger" when playing notes

Post by Zyko1 » Tue Apr 26, 2016 9:27 am

Hi there

I am searching for a while now for a simple device that forces retriggering of notes. Maybe I am using the wrong words... let me explain what I mean:
Some synth's don't have a "retrigger" setting, which means when playing legato the envelopes are not retriggered. Some synth's offer a switch or smth, or react to MidiCC 68 (Legato) to force them to retrigger whenever a new note is played, independent of if they were played overlapping or not. I thought this could maybe done with a small M4L Midi-Effect for synth's which don't have a "retrigger" setting.
I was a bit brainstorming how this could be done as a MidiFX: when a new note is played, the midifx sends a "note off" for all currently played notes, then waits for some miliseconds, then forwards the new note. this would create gaps between notes which are played legato, and therefore force a retrigger of the envelopes.
Could this be done in M4L? Anyone care to make a little thingy like that?
Or you have better ideas? Maybe already existing devices or workarounds which I missed?

Thanks a lot in advance!
Z

doghouse
Posts: 1502
Joined: Fri Aug 29, 2008 5:30 pm

Re: Request: Device that forces "retrigger" when playing notes

Post by doghouse » Wed Apr 27, 2016 11:22 am

Impossible.

It's strictly up to the receiving synth how the triggering works. There is nothing you can do from a sequencer to force a change in triggering behavior unless it is supported by the synth (such as CC 68).

Zyko1
Posts: 46
Joined: Tue May 27, 2014 8:26 am

Re: Request: Device that forces "retrigger" when playing notes

Post by Zyko1 » Wed Apr 27, 2016 11:51 am

Thanks for your reply. Although I think it's not valid.

I already brought up a conceptual solution, just lacking the skills/knowledge if and how this could be done in M4L. It's just a question of manipulating the Midi-data, which itself may be impossible with M4L, but not entirely impossible with other technologies. Ofc you cannot alter the synth's trigger behaviour, but you can alter the Midistream in a way that you get the desired retriggering effect. That's not rocketscience, I can't believe that this should be entirely impossible.

stringtapper
Posts: 6321
Joined: Sat Aug 28, 2004 6:21 pm

Re: Request: Device that forces "retrigger" when playing notes

Post by stringtapper » Wed Apr 27, 2016 6:43 pm

I can get the delay between the note-offs and note-ons, but the problem is that in order to do so you have to strip the normal note-offs from all incoming notes, which means that the last note you play will have to be manually sent a note off message or it will hold indefinitely.

If you don't strip the note-offs from all incoming notes then you have to keep the key pressed down for the previous note or its note off message will kill the current note.

I think the overall problem is that the request requires some prediction, i.e. the computer has to either know how long each note is going to be in advance or it somehow has to know which note is going to be the last note. If we can't give the machine this information in advance (i.e. we want it to be spontaneously playable) then we're basically asking it to see into the future or read our minds.

A more seasoned Max vet than I might have some betters ideas, but all of those folks are probably over at the Max forum.

Here's the code I slapped together. You'll have to hit that button to kill the last note.

<pre><code>
----------begin_max5_patcher----------
715.3oc0X1tbhBCEF923UAC+l0IIP3i8hXuA1YmN7QTSKDXfPW6zo26KIApV
ETTiT2+nSBwj2m7dxIG78EFVwEaI0Vl+z72lFFuuvvP1knCit1FV4QaSxhpk
CyJoHOmv3V1pmwIa4x9+UAmXVrZU+CXM4EM7LBW9y.c8VyeKiHGe+3Ji3Ian
r0OUQR3Jg3CWBrMgg3kXaSLR1HXIv7Oc+DZpbFJhe9GNv8VOJqe4fh99XwBw
G1SDr3FNufMr7gWh7CvBEifR4ibkMb2S9p4k+VIQMdq3H1ZqgnCEpM5xI00Q
qIGYadXSH.nApgAARRQRyKvW1.bJrGFY+AQFcEHyH+scFOh3TRVKx5iXnxuc
BOOwiaztZiZsEFCwdR7bQ8QvWcbrm1BiGwSq4UzRVaFng4FcEbq7Sry4cUpH
an5qA8V8EP2jGSpz.hHnDQOEhfIbT09DtKbXBget9UQ4DNo5IBKJVINv2I8c
FrtnGLOzObfeYTxKl.SfFOuCvSdeYn8if6c96UYM0azWX.JPFG33dyGzgg2a
zEY3ZUkFJwB1lIGKRxEJ9x83aq2mqAwxQuXQG4JKmqI0s3CWvEYnmvW802sW
ZKEVfx9vPYIx2ZNLD9+rL3H8huyMgubJsxnrCeQJoxE8+08j5hlpjdg0m3vD
9oxRI0bJKhSaKia2fDdj4NB2PSSIr8O2mRqEpKcb24hzC3b5wY1zi+T1d9xX
t2pALA0LO6MASPMdylZ7lfZNH556dyA4elHmbZZYQ6cCcGtgdx2qG5HSAg1q
0tERa.HduvoQvii+dflumxA4+XEugBevzyDRbBQypbN6tCX9tlaJ5IX1tW4.
xGWNyjYgmhaMa6NGTtw3x4Z1cTUvEUV9JoptaJkJos90mKpDM8skMoLUSY4p
VUjWo8iWVsnUTUasp71BUapTUwt0S8W6YkWjRpXMzt2cnck+Xw+.ZzGSu.
-----------end_max5_patcher-----------
</code></pre>
Unsound Designer

Zyko1
Posts: 46
Joined: Tue May 27, 2014 8:26 am

Re: Request: Device that forces "retrigger" when playing notes

Post by Zyko1 » Thu Apr 28, 2016 11:27 am

Hi stringtapper

Thank you very much! Almost there! :)

I just testet it and it does exactly what was meant. I tried to understand the M4L-patch but I am not quiet there yet.
Thought a little about that last note issue and came up with these ideas:
- is it possible to let "note off" message still get through? Ofc this would lead to "double note offs" for all notes (except the last note played), but as far as I understand the Midiprotocol, that's not an issue and would just be ignored by the receiving device. As you can't play legato the same note twice it also shouldn't be an issue if you play the same note twice in a row, as it is physically impossible to play the same note legato style (hope it's understandable what I mean, but doesn't really matter if you didn't, as its not relevant for this question)
- maybe you can tell the M4L device to send an "all note off" midimessage when there was no new note and no held note for 10 miliseconds (or something in that range)?

Best regards
Z

Post Reply