Midiout not working but noteout does

David Siah's icon

Hi folks,

I was working on a max 4 live midi instrument last night and I discovered that midiout doesn't transmit the note messages I send in my patch. I was able to get it working when I sent the midi through noteout, but the problem is that when i was trying to record from the midi device (it's a device to play chords from a monome grid) i only got the root note since I am sending 4 midi notes individually through the noteout object.

I'll post the patch and the version shortly, but in the meantime does anyone know if this sounds familiar? I even tried the midiout example from the doc and that is not working so I think it's my ableton/max4live configuration.

tyler mazaika's icon

Hey David,

Doesnt sound like a problem I’ve come across (either with noteout or midiout approaches). How are you formatting your midi messages for note output? Are you using midiformat prior to midiout?

I’m happy to look over your patch/device is you post it.

cheers,
Tyler

Ernest's icon

Its a very old problem, in fact why MIDI had 'channels' originally before there was polyphony. Without seeing your patch it's difficult to know if it's what Max is doing, or if the sequencer. It might not be a problem with the way noteout works, because, if it's receiving the events and you are triggering the left inlet after putting the other data in for each note, it will send out the notes simultaneously, or perhaps with a millisecond delay if it gets pushed out on the scheduler by other activity.

David Siah's icon

Tyler! Thank you, I was working without midiparse and that actually simplified things to the point where I was able to get this working with midiout.

However, my patch still acts super strange in ableton. I can open the patch and use it to play chords but for whatever reason ableton does not record the midi that I'm presumably sending. Any ideas?

monome-autochord.amxd
amxd 25.09 KB

0, 0 4 7 12;
1, 0 3 7 12;
2, 0 4 7 10;
3, 0 4 7 11;
4, 0 3 7 10;
5, 0 3 7 10;
6, 0 3 7 10;
7, 0 3 7 10;

chord-mappings.txt
text/plain 0.10 KB
Since this is required data for the patch.

Source Audio's icon

That many objects are not needed to produce few notes.
there is no real difference between noteout and midiout.

Both examples above will output note with velocity 60 and 500 ms length.
On the left using only 2 objects.
Next thing - named coll's share data so only 1 needs to read text file.
If text file does not change, rather embed coll into patcher.
Another thing : how is nth $1 2 ,3 & 4 going to output anything
from the colls if highest index is 7, and + 55 is added ?

That all is not really needed, recalling 1 coll index
will output the chord just fine .
Have a look at this little example :

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

If You really hang on midiout instead of noteout :

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

tyler mazaika's icon

Hey David,

I agree with previous poster that there's fair amount of redundant code here that you could optimize away. (FWIW I almost always do noteout, but will have a midiin connected directly to a midiout if I want to allow for all MIDI to pass through the device, which you may not in this case).

With regards to recording the output it depends on what your expectations are. Ableton tracks/clips record the MIDI going in the input of the track, prior to any Devices. So if you want to record the MIDI output from monome-autochord you need to create another MIDI track and set it's input as the Post FX MIDI signal from the track hosting monome-autochord (and probably you'd want to set it's monitoring mode to 'In' rather than 'Auto'. (You'd have a similar requirement if you were to try to record the MIDI notes of the stock Arpeggiator device, for instance).

As for 'presumably sending' MIDI data... the "MIDI Monitor" device that's part of one of the Max for Live packs Ableton makes available is handy for eliminating presumptions.

HTH,
Tyler

eric larrieux's icon

EDIT: solved the issue by restarting Max

~~~~~~

Hi all,

I'm running into a similar issue... I'm using an akai mpd232 midi controller and I am able to send it midi notes (to light up the pads) using noteout but not with midiout. I'm using the examples from the help patches for both and was sure to select the appropriate midi output from each object. Furthermore, they BOTH work when using the internal synth and I also verified that I'm sending out the same 3 bytes of data that I receive from the controller using midiin when I press the corresponding pad.

In the end, maybe this isn't the biggest problem because I don't see any real advantage to using midiout over noteout, but at this point it's just driving me crazy because it isn't working and it should! Perhaps I'm just missing something really obvious?

I've attached a sample patch to illustrate. Any help would be greatly appreciated!

cheers,
-eric

Edit: here it is as compressed text as well:

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

problem_with_midiout.maxpat
Max Patch