makenote cancel note off for specific pitch (beginner)

jan's icon

Hi,
I made a sequencer sendig pitch, velocity and duration to a makenote object. Problem is that when a note on arrives before a note off for the previous note with the same pitch is send out, it got cut off by this note off. So actually i want to cancel the note off for a specific pitch when a note on with the same pitch arrives. The clear function doen't work cause it clears note offs for all pitches. Should i use an other object? Or is there a trick to do this? Hope this makes sense.

The attached patch demonstrates the problem.

Chris Muir's icon

On Jul 23, 2008, at 7:52 AM, jan wrote:

> Or is there a trick to do this?

I have an example that enforces a monophonic note stream, called
cbm.mono, on my examples page: http://www.xfade.com/max/examples/

Your problem is that MIDI isn't really set up to cope with the case of
multiple notes with the same pitch at the same time, so many voice
allocators choke on this sort of thing.

-C

Chris Muir
cbm@well.com    
http://www.xfade.com

mzed's icon

Quote: jan wrote on Wed, 23 July 2008 07:52
----------------------------------------------------
> Hi,
> I made a sequencer sendig pitch, velocity and duration to a makenote object. Problem is that when a note on arrives before a note off for the previous note with the same pitch is send out, it got cut off by this note off. So actually i want to cancel the note off for a specific pitch when a note on with the same pitch arrives. The clear function doen't work cause it clears note offs for all pitches. Should i use an other object? Or is there a trick to do this? Hope this makes sense.
>
> The attached patch demonstrates the problem.
----------------------------------------------------

Check out the examples in:

/Max5/examples/max-tricks/notes-and-pitch/repeated notes/ You're looking for a file called "repnote.maxhelp".

mz

jan's icon

Thanks for the answers but i don't think this is a solution for me.

@Chris: Your programm turns the note stream into a monophonic notes while mine are polyphonic. I want to send a note off only for te repeated note, cancel the original duration and retrigger this note with the new duration.

@mz: That repnote example looks a lot like my problem. Thing is it sends a stop after a repeated note which makes makenote to send notes off for all current played notes, not only for the repeated one.

I hoped i could makenote send a message like stop 64 to only force a note off for note 64, then retrigger it and keep all other notes (durations) uneffected.

Guess i ran into a fundamental midi problem. Any other solutions for this?

Thanks a lot.

Chris Muir's icon

On Jul 24, 2008, at 12:59 AM, jan wrote:
> Any other solutions for this?

What would the behavior of your ideal solution be?

1 - allow for overlapping notes (new attack for the new note, while
the old note was still sounding)
2 - a legato approach where the second not was not articulated, but
the overall note duration was as long as both notes
3 - chopping the old note so that the new note could sound

The first approach would have to happen inside the synthesizer itself,
the last two could be programmed in Max, with a little work.

-C

Chris Muir
cbm@well.com    
http://www.xfade.com

jan's icon

Nr 3 would be the perfect solution. I guess this is not possible with the makenote object cause as far as i know you can't chop the old note without chopping all the notes in the makenote object (the stop message). I could route all different pitches to their own makenote object but there are so many of them that this isn't an elegant solution. Should i forget about the makenote object and programm something from scratch that keeps track of all incoming notes, send a note off at the right time, or.. when a note with the same pitch arrives send out a note off immediately and set the new note off time. Mmm... maybe i can make this but i hoped i just missed a clever makenote trick. Isn't this a common problem with a common solution?

Chris Muir's icon

On Jul 24, 2008, at 10:45 AM, jan wrote:
> Isn't this a common problem with a common solution?

With MIDI, if you can't do it from a keyboard controller, it is not
considered common. You can't have two notes on on the same note
without an intervening note-off with a keyboard controller.

Here's an abstraction, which I call NoOverlap, which keeps a reference
count of sounding notes, and sends manages note-offs. Insert between
your makenote and your noteout:

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

-C

Chris Muir
cbm@well.com    
http://www.xfade.com

jan's icon

This abstraction works perfect! (although i didn't figure out why yet)

Thank you very much Chris.