Forums > MaxMSP

Individual Note-Off problem


Ady
January 23, 2006 | 12:18 pm

Hi!

I want to use my MIDI Keyboard to play samples with MAX.

I’m having problems separating note on and off:

I want to use :

1. Note C1 as trigger ( no note off ) – I use strip note to ignore note off,
2. Note C2 as Note On and Off – I want the sound to be played as I hold the note, and to stop the sound when I release my finger from the note.

The problem is when I play and hold C2 and press and release note C1, my C1 sends note-off on both notes (C1 and C2).

How can I manage note off for each note separately ( C1 and C2 ) ?

Thank you.


January 23, 2006 | 1:15 pm



Ady
January 23, 2006 | 2:09 pm

Sorry – I’m new in Max –

Can you explain more?

Maybe an exemple.

Thank you.


January 23, 2006 | 2:19 pm

>> The problem is when I play and hold C2 and press and release note C1,
>> my C1
>> sends note-off on both notes (C1 and C2).

Are you sure this isn’t something your keyboard is doing? (Local
control).

Suggest posting a short patch with your attempt. If it works for other
people, then you know it’s your keyboard. If it doesn’t work for
others, it will be easier to see why.

– P.

>>
————– http://www.bek.no/~pcastine/Litter/ ————–
Peter Castine | ^
| Litter Power & Litter Bundle for Jitter
pcastine@gmx.net |
pcastine@bek.no | iCE: Sequencing, Recording, and Interface Building
4-15@kagi.com | for Max/MSP
| Extremely cool
| http://www.dspaudio.com
| http://www.dspaudio.com/software/software.html



Ady
January 23, 2006 | 8:40 pm

STORY:

I have two sliders and two bangs.
I need to send note On and note-Off to the sliders (126/0),
and note on (only note on) to the two bangs.

Problem #1:

When receiving, note off is sent on both the sliders even if there is sent to the notes who control the bangs:
(It looks like message "note-off", is a message that it is sent by all midi notes, but it is an overall message ).

Another thing:

If I’m using midi in and midiout, and I’m playing with my keyboard, I can hold notes, send note on and note off to midiout.

How can I use this in my patch without having problems with "overall note-off"…???

Problem #2:

As you will see in the patch, the bang from the sliders (just before the message "0", it is active when I release the note but it is not sending "bang")…and when I press with my mouse on him, it does sends "bang"…is this a BUG ?

OK here is the patch that’s making me problems:

max v2;
#N vpatcher 123 123 849 691;
#P origin 100 0;
#P window setfont "Sans Serif" 12.;
#P comment 65 25 275 9109516 Same MIDI Keyboard must be used for this patch The notes are C1 , D1 , C2 , D2;
#P window setfont "Sans Serif" 9.;
#P comment 211 112 153 9109513 ant It must not send note-off to the < ---left;
#P comment 213 96 146 9109513 This must NOT receive note-off;
#P comment 47 122 121 9109513 but not from the Right —>;
#P button 97 267 15 0;
#P button 156 268 15 0;
#P window setfont "Sans Serif" 18.;
#P number 226 236 41 18 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P button 292 314 15 0;
#P button 254 180 15 0;
#P window setfont "Sans Serif" 9.;
#P newex 268 144 40 9109513 notein;
#P newex 268 202 43 9109513 stripnote;
#P window setfont "Sans Serif" 18.;
#P number 178 236 41 18 0 0 256 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P button 268 314 15 0;
#P window setfont "Sans Serif" 9.;
#P newex 268 272 58 9109513 select 36 38;
#P message 129 306 23 9109513 126;
#P message 156 306 14 9109513 0;
#P slider 142 341 15 128 0 1;
#P message 68 307 23 9109513 126;
#P message 97 307 14 9109513 0;
#P newex 89 209 64 9109513 select 48 50 0;
#P slider 80 341 15 128 0 1;
#P newex 89 159 40 9109513 notein;
#P comment 47 95 121 9109513 This must receive note-off;
#P connect 3 0 5 0;
#P connect 5 0 2 0;
#P connect 4 0 2 0;
#P connect 1 1 3 0;
#P connect 1 0 3 0;
#P connect 3 2 18 0;
#P connect 18 0 4 0;
#P connect 3 1 8 0;
#P connect 7 0 6 0;
#P connect 8 0 6 0;
#P connect 3 2 17 0;
#P connect 17 0 7 0;
#P connect 12 0 11 0;
#P connect 12 0 16 0;
#P connect 13 0 14 0;
#P connect 13 0 12 0;
#P connect 11 0 9 0;
#P connect 9 0 10 0;
#P connect 9 1 15 0;
#P connect 13 1 12 1;
#P pop;

Please help.
Thank you!


January 23, 2006 | 10:23 pm

Does this work for you?

#P user kslider 127 84 35 1 36 48 19 7 1 128 128 128 128 128 128 255 255 255 0 0 0 0 0 0;
#P button 250 281 15 0;
#P button 212 281 15 0;
#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P newex 250 253 32 196617 sel 1;
#P newex 250 222 27 196617 > 0;
#P newex 212 252 32 196617 sel 1;
#P newex 212 221 27 196617 > 0;
#P newex 146 246 35 196617 t 126;
#P newex 92 246 35 196617 t 126;
#P slider 146 304 15 128 0 1;
#P message 70 246 14 196617 0;
#P slider 84 304 15 128 0 1;
#P newex 122 211 32 196617 sel 0;
#P newex 70 211 32 196617 sel 0;
#P newex 70 175 219 196617 route 48 50 36 38;
#P newex 70 137 42 196617 pack i i;
#P newex 70 97 40 196617 notein;
#P connect 16 0 1 0;
#P connect 16 1 1 1;
#P connect 13 0 15 0;
#P connect 11 0 14 0;
#P connect 2 3 12 0;
#P connect 12 0 13 0;
#P connect 10 0 11 0;
#P connect 2 2 10 0;
#P connect 1 0 2 0;
#P connect 2 0 3 0;
#P connect 2 1 4 0;
#P connect 6 0 5 0;
#P connect 6 0 7 0;
#P connect 9 0 7 0;
#P connect 4 1 9 0;
#P connect 4 0 6 0;
#P connect 8 0 5 0;
#P connect 3 0 6 0;
#P connect 3 1 8 0;
#P connect 0 1 1 1;
#P connect 0 0 1 0;
#P window clipboard copycount 17;


January 24, 2006 | 6:54 am

Dear Ady,

Without getting into the details of exactly what you’re trying to accomplish there seems to be a "bug" in the way you handle the data coming out of the left "noteout" object.

You’re sending the pitch AND the velocity from a "notein" object to the same "select" object without turning this date into a list first. This fits the description of comparing apples with oranges because the "select" object has no way to differentiate whether a particular item is pitch or velocity (in theory there could be pitch 48 or velocity 48).

What I would suggest on that left "notein" is first to determine whether the "pitch" is of interest to you (using a "select" only on the incoming pitches) – if so then do what needs to be done depending on the velocity.

Sydney B.



Ady
January 24, 2006 | 8:28 am

Thank you mzed !

That patch work in 90%.

The problem is with the sliders separation:

When I hit and hold notes C1 and D1, and release ONLY ONE of them, both sliders go down:

max v2;
#N vpatcher 122 67 603 581;
#P origin 100 0;
#P window setfont "Sans Serif" 12.;
#P comment 65 25 275 9109516 Same MIDI Keyboard must be used for this patch The notes are C1 , D1 , C2 , D2;
#P user kslider 127 84 35 1 36 48 19 7 1 128 128 128 128 128 128 255 255 255 0 0 0 0 0 0;
#P button 250 281 15 0;
#P button 212 281 15 0;
#P window setfont "Sans Serif" 9.;
#P newex 250 253 32 9109513 sel 1;
#P newex 250 222 27 9109513 > 0;
#P newex 212 252 32 9109513 sel 1;
#P newex 212 221 27 9109513 > 0;
#P newex 146 246 35 9109513 t 126;
#P newex 92 246 35 9109513 t 126;
#P slider 146 304 15 128 0 1;
#P message 70 246 14 9109513 0;
#P slider 84 304 15 128 0 1;
#P newex 122 211 32 9109513 sel 0;
#P newex 70 211 32 9109513 sel 0;
#P newex 70 175 219 9109513 route 48 50 36 38;
#P newex 70 137 42 9109513 pack i i;
#P newex 70 97 40 9109513 notein;
#P connect 16 0 1 0;
#P connect 0 0 1 0;
#P connect 1 0 2 0;
#P connect 2 0 3 0;
#P connect 4 0 6 0;
#P connect 3 0 6 0;
#P connect 6 0 5 0;
#P connect 8 0 5 0;
#P connect 3 1 8 0;
#P connect 16 1 1 1;
#P connect 0 1 1 1;
#P connect 2 1 4 0;
#P connect 4 1 9 0;
#P connect 6 0 7 0;
#P connect 9 0 7 0;
#P connect 2 2 10 0;
#P connect 10 0 11 0;
#P connect 11 0 14 0;
#P connect 2 3 12 0;
#P connect 12 0 13 0;
#P connect 13 0 15 0;
#P pop;



Ady
January 24, 2006 | 8:44 am

OK I got it.

Thank you all.


January 24, 2006 | 12:21 pm

Ady wrote:
> The problem is when I play and hold C2 and press and
> release note C1, my C1 sends note-off on both notes (C1 and C2).

I bet this is a missinterpretation, no keyboard I know would do that.
An example patch would show the problem (select all with the open patch,
and then paste it into the e-mail)

In general you would have to split or route the note events before you
strip anything. Example:

#P window setfont "Sans Serif" 9.;
#P number 325 192 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 287 192 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P window linecount 1;
#P newex 287 170 48 196617 unpack;
#P button 195 219 15 0;
#P newex 195 192 36 196617 sel 1;
#P newex 195 170 36 196617 > 0;
#P newex 195 123 69 196617 pack;
#P newex 195 147 102 196617 route 36;
#P newex 195 99 128 196617 notein;
#P comment 367 196 128 196617 < - notes which are not C1;
#P comment 217 220 107 196617 < - trigger with C1 on;
#P connect 8 1 10 0;
#P connect 8 0 9 0;
#P connect 3 1 8 0;
#P connect 6 0 7 0;
#P connect 5 0 6 0;
#P connect 3 0 5 0;
#P connect 4 0 3 0;
#P connect 2 1 4 1;
#P connect 2 0 4 0;
#P window clipboard copycount 11;

[][] [][][] [][] [][][] [][] [][][] [][] [][][]
[][][][][][][][][][][][][][][][][][][][][][][][][][][][]

Stefan Tiedje
Klanggestalter
Electronic Composition
&
Improvisation

/~~~~~
\ /|() ()|
))))) )| | |( \
/// _/)/ )))))
___/ ///

————————-x—
–_____———–|———-
–(_|_ —-|—–|—–()—
– _|_)—-|—–()———-
———-()————x—-

14, Av. Pr. Franklin Roosevelt, 94320 Thiais, France
Phone at CCMIX +33-1-49 77 51 72


Viewing 10 posts - 1 through 10 (of 10 total)