differents realtime quantisation for note on and note off

schlam's icon

Hello

I know there are several post about that but I don't find a reliable solution.

I am looking for a way to quantize noteon and noteoff with differents values

But I would like that the device works like the repeatmode 3 of makenote.

If the notein quantize value is for example 1 bar and for the noteoff value : 1/2 bar.

The noteoff should be triggered only for the last note.

A flow of the same note shorter than 1/2 bar long will be passed without outputting noteoff, but if there is no notein since more than 1.2 bar, then : shut the note after 1/2 bar.

I hope I am clear enough..

Here is where I am for now..

...it's almost working. But there is another thing that don't work well, the noteoff arrive a bit late and I have to do a messy trick to avoid that... (see red object in the patch) and I would like to avoid the use of midiflush.

When the patch will be cleaner, I plan to put this in a [poly~ @voices 128] to have independent timing for each note. Should it work ?

Max Patch
Copy patch and select New From Clipboard in Max.

Thank you a lot !

Roman Thilenius's icon

realtime quantisation can be simple: write incoming data into registers and countinously trigger them from a clock.
to make sure that multiple data will also be stored, i would use something like [coll] as register.

using poly~ is not a bad idea - even if you also want to provide a mode where the change of settings should immediately affect running notes, you can still limit yourself to voice #1.

schlam's icon

Thank you Roman, allways there to help !

I understand the logical but I don't manage to make it.

My problem is to have a clock for notein and another clock for noteoff, with different values and with a behaviour similar to [makenote @repeatmode 3]..

Did you look at my (messy) patch ?

Source Audio's icon

you could assign note length and send it to makenote set in repeatmode that you want.
I guess you mean repeatmode 2, there is no mode 3
Set note length to Note On length + Note Off length
to auto turn the note off, as you describe.
If note gets retriggered before that time elapses , game stars from beginning.

schlam's icon

Hello Source Audio;

There is really a mode 3 for Makenote ! And it is cool !

I have almost manage to do what I was looking for, but it seems to be much more complicated than it should...

The 1st note arriving is quantized for example at 1 bar, then I want to choose another value, for example 2n, and while each incoming note arrive before this value, the 1st note continue to be triggered each 1bar, then if during 2n there is no new note, trigg a note off on the next 2n, or whatever value choosen.

Max Patch
Copy patch and select New From Clipboard in Max.

I precise it is to be used in a maxforlive context, mainly to trigger rythmic patterns

What I don't understand is why I need the red [* 0.95] object to make it work almost perfectly.

I have to make the ''note off quantisation" a bit shorter, if I don't, the note off is a bit late. And when The sound stops I hear the short beginning of the next bar... With a quantuisation of 95% of the value, It's cleaner at stop...but it's not normal that I have to do that...I am surely doing something wrong...

Roman Thilenius's icon

you could start with the beat and tempo output of plugsync and then do everything in milliseconds using a metro.

also, i would use 2 independent, parallel versions of the right part of the patch, one time for note-on and one time for note-off, with their respective different quantisation settings.

the 95% thing could be caused by a message order problem or maybe live introduces latency somehow when notes are passign a plug-in?

using append->messagebox is a good solution for managing the list.

schlam's icon

Thank Roman for your advice, I will try what you are proposing.
When you talk about the "right part of the patch", you are talking about the idea to use a line to block incoming informations in conjunction with pipe ? For now, it's not really working as the repeatmode 3 of makenote..

And yes I used append>messagebox to store the list but I read so much time in the forum that we should never use messagebox for this kind of stuff that I am a bit surprised you said it's a good solution...

Source Audio's icon

that mode 3 must have been added after max 8.1.11
which I currently use.
I checked it in Max 8.3.3 and found irritiating that also repeated note off
extends note duration.
I would rather see note off to immediately stop the note,
and ony note on acts as update duration.

You say you trigger patterns, which makes it clear that stop mesage
on the beat possibly gets executed too late, in first case in Live with it's crappy timing.