Forums > MaxMSP

midi notes keep sustaining

September 20, 2010 | 9:24 pm

hi everybody,
i have a problem which is driving me near to nuts,
what my patch does is take midi notes from notein then
send the pitch data through a processing part which then manipulates
the number and sends it out of the processing part to the noteout where it should meet with the appropriate velocity value. now this works whenever i’m playing single notes or playing slowly, but when i play a chord, often the notes don’t receive the note-off and they get sustained.
anybody have a good suggestion how to get rid of this problem?
i try’d it with pack/unpack, but does’nt seem to work with alot of simultaneous notes.
thanx alot.

thom


September 20, 2010 | 9:52 pm

As you surmise the notes are probably not getting their proper associated note-off message sent. From your description it sounds like you’re transposing the pitch of incoming notes, so you need to be certain that the note-off has the same transposition. And it sounds like any time you play more than one note at a time, the second note is changing the transposition before the first note gets a note-off sent for it. So to solve that you need to keep track of what transposition you give to each incoming note. Something like this.

– Pasted Max Patch, click to expand. –

September 20, 2010 | 10:01 pm

hi christopher,

im really sorry i forgot to say i’m running max 4.5, cant load your patch.
like you say there’s transposing involved as well. could you
explain to me shortly what objects your patch holds?
thanx a million!

thom


September 20, 2010 | 10:43 pm

max v2;
#N vpatcher 548 110 947 370;
#P window setfont Times 10.;
#P window linecount 3;
#P comment 2 151 120 1310730 The initial transposition can be provided as an argument in the parent patcher.;
#P window linecount 8;
#P comment 2 36 104 1310730 This patch transposes notes , and makes sure that note-offs get the same transposition as note-ons , even if the interval of transposition changes while the note is being played.;
#P window linecount 1;
#P comment 215 206 43 1310730 Velocity;
#N comlet Velocity;
#P outlet 228 191 15 0;
#P window setfont "Fixedwidth Serif" 10.;
#N vtable 128 10 59 220 226 0 128;
#P newobj 139 155 56 1441802 table;
#N comlet Transposed Pitch;
#P outlet 139 191 15 0;
#P window setfont Times 10.;
#P comment 111 206 77 1310730 Transposed Pitch;
#P window setfont "Fixedwidth Serif" 10.;
#P newex 185 90 38 1441802 gate;
#P newex 185 125 34 1441802 + $1;
#N comlet Velocity;
#P inlet 228 47 15 0;
#N comlet Pitch;
#P inlet 139 47 15 0;
#P window setfont Times 10.;
#P comment 133 33 29 1310730 Pitch;
#P comment 216 33 43 1310730 Velocity;
#P comment 297 33 63 1310730 Transposition;
#N comlet Interval of Transposition (in semitones);
#P inlet 316 47 15 0;
#P window linecount 4;
#P comment 237 68 75 1310730 Only note-ons get through the "transpose and store" gate.;
#P window linecount 7;
#P comment 254 122 126 1310730 Note-on: untransposed pitch and transposed pitch are stored as an x , y pair. Note-on and note-off: the transposed pitch is sent out , triggered by the untransposed pitch in the left inlet of table.;
#P connect 9 0 12 0;
#P connect 6 0 12 0;
#P connect 12 0 11 0;
#P fasten 7 0 9 0 233 85 190 85;
#P connect 9 0 8 0;
#P connect 8 0 12 1;
#P fasten 2 0 8 1 321 121 214 121;
#P fasten 6 0 9 1 144 71 218 71;
#P connect 7 0 13 0;
#P pop;


September 20, 2010 | 10:50 pm

Thanx alot!!! this looks like a good trick :)


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