Take pitch from midi file but use velocity and timing from keyboard input
Hi,
I'm pretty new to Max/MSP. It would be great if somebody could help me. Either by explaining to me how that could be achieved or alternatively in case it is too complex for a beginner, to do it for me against a payment.
Here is what I would like to achieve:
A midi plug in for live that loads a midi file (standard midi file). If I play keys on my keyboard, the plug in transforms those notes into the ones provided by the midi file in real time. The output of the plug in uses the pitch information of the midi file but the velocity, tempo/rhythm and note length from the midi input. In other words, I could play just one note on my keyboard and the plug in outputs the midi-melody/song/ chords which had been loaded as a midi file into the plug in. Similar to a midi scale plug in that matches input notes to a music scale but instead of the scale it uses a complete song (coming in form of a midi file).
Is that difficult? Is there anybody who could realise that and would do it for a fair hourly rate (whatever that is for Max/MSP)? I would need it as a plug in for live.
Thanks a lot.
Pete
That depends a bit on the midi file itself, number of midi channels, is it polyphonic, is it quantised etc.
In case of single channel, quantised midi file You just need next trigger with velocity set, and "all notes off" when midi key gets released.
But midi file has to be converted to coll or text file containing note pitch lines.
in case of coll :
1, 44 48 30;
2, 61;
3, 48 61;
etc
Midi keyboard would trigger message next, and set played velocity to all notes in the line.
Is that what You want ?
Hi, thanks for your help.
Yes, pretty much. The midi file would be 1 channel, polyphonic, not quantized. Does your example represent a polyphonic midi message at time = 1? So the 44 48 30 are the pitches of the notes of a chord, correct? Would "not quantized" be a problem?
I assume there are ways to convert a standard midi file into a txt or xls file?
One potential issues might be the note length. For example, the bass note might play longer than the melody notes. Two possible solutions: the output takes each individual note length from the midi file and not the keyboard midi input. Or, I could use two plug-ins on two midi channels, one is playing the lower registers, for example from C0 - C3 and the other one the higher registers (melody) C#3-C8.
Thanks again.
No, it is not time but adress in coll, so every time key is played next row with notes
gets played with measured velocity.
I wil post the patch, You have to deal with Max4Live part, I am not using that,
so midi part is just standard max midi objects.
It works in following way :
wenn midi file is loaded it gets converted to coll. containing only Note Pitch infos.
All notes that are played at the same time get collected together in one coll line.
That is why quantised or not plays a role.
Midi Keyboard triggers with every key press ( expected is single note) next row of notes,
which get measured velocity. On key release note ( notes) get turned off.
Amazing, thank you very much. I cannot test it at the moment but will do so as soon as I get into my studio and let you know.
Hi Source Audio, I know this thread is ancient but I picked up the idea and would love to get back to it. Your patch works nicely but the note length is a problem. Is it possible to ignore the input note length and take the not lengths also from the midi file?
Thanks a lot.
p.s. again, I am more than happy to compensate your work, just get in touch via email on my profile