Building a MIDI piano in Max MSP
I'm having a slight bit of trouble building a piano controlled via a MIDI keyboard into max.
I'm a beginner at this and I'm using Max 4.5. I don't need it to control any audio just MIDI information using Notein and noteout.
Please help
I'll try be more specific
"Controlling note-off with stripnote and flush
The second patch in our tutorial deals with eliminating the note-off messages received from a MIDI device and then controlling them explicitly from a patcher. In many cases, we may want to prevent a keyboard (or other MIDI input device) from turning off a note, preferring to generate the note-off programmatically. In the second patch, we route received MIDI notes from the notein object through the stripnote object, which will eliminate all note-off messages that are coming from our MIDI device. As a result, the remainder of the patch will only see note-on messages, and we will be responsible for turning the notes off when necessary.
One of the most useful tools for maintaining note-on tracking is the flush object. It will create an internal table of note-on messages that have not yet received a corresponding note-off; it can then generate note-off messages for all sustained notes whenever a bang is received in its left inlet. In this case, we are stripping all of the note-off messages, so this table will contain all of the notes that we play on our MIDI device. When we want to turn these notes off, we can hit the button object, which will send a bang message to the flush object. This will generate note-off messages for all of the played notes, then clear the internal table of notes in preparation for the next set of events. Double-click the notein object to select a valid MIDI input device; using your MIDI keyboard source, generate some notes - they will continue to sound until you click the button to flush them. We've also routed the notes to the Max window (using the print object) so we can see what's going on.
Using the stripnote object to control the use of MIDI notes is useful when our playback engine needs to be sensitive to controllers other than the keyboard. Combining stripnote with flush allows us to be certain that MIDI note-off messages will be generated for any notes that were not specifically turned off."
this is in the Max tutorials. Flush is great and all but it seems to clear ALL notes. I tried using Flush with a select 0 but it allows me to hold more than 1 notes but If i let go of another. It all clears. Am I missing an object here that could help me ?
thanks guys
Post the patch you have so far and let us know where you're running in to trouble and we might be able to help.
[borax] might also be of interest.
does this help?
If not heres a link to a screenshot of it.
http://i1081.photobucket.com/albums/j353/MikeyOConnell/Untitled.jpg?t=1301854558
@Seejayjames
I tried Borax before. It seems to be completely incompatible with Stripnote.. Wouldn't work for me anyway
i'm kinda surprised this isn't easier to do to be honest. I think i'm just missing something really small.
Turns out all I needed was the Poly object :D
thanks anyway forum :)
It not possible to send you any response because on my macbook this patch create a crash of MAX 5.1.8
My midi integrator project https://cycling74.com/project/midi-integrator/ has annotated patches for processing midi keyboard input and then sending it out to a virtual synth.
Hope it helps.
Ken.