How to know which program changes are used in a midi file ?
After loading a midi file (type 1) in max, I want to know the program change number used for each track. I tried detonate, but he gives no info for the program change…
For example, in a midi file with 3 instruments, how can I know that one instrument use program change 0 for a piano sound, another one use program change 32 for a bass, etc. ?
If your question is about knowing what program change messages are contained in the file, you can use [pgmin] to track the messages. On the other hand, if your question is about which instrument produces a piano sound for a given patch number, that’s often not standardized–unless they are using General MIDI–but a function of the synth itself.
Thanks for your answer.
Indeed, my question is about knowing what program change messages are contained in a midi file.
I’ve looked to the pgmin but I don’t understand at all how it works. In patch help and reference page it’s always used with the input connected to nothing (!?), so how did it receives MIDI information ? And from where ?
In my case, I have a midi files which is played by a detonate object. So I have to connect one of the output of detonate object to the input of pgmin ?
Thanks again for your help, I’m totally lost with this…
[detonate] should be able to output controller 0, but you could also use
[filein], read at word, and search for the hex string for controller 0.
What if you used [seq] instead of [detonate]? If all you need to do is play MIDI sequences, would that work? You could then connect the [pgmin] object to the left outlet of [seq]. Check out the helpfile for [seq] for instructions on loading and playing MIDI files.
Thanks both for the tips.
In fact, I use detonate because I have to deal with midi file type 1.
To explain a little more, I have to load a midi file (type 1) and played each track with different vst sounds. For example, if my midi file have 3 tracks : Acoustic Grand Piano / Acoustic Guitar (nylon) / Slap Bass 1, I have to send the piano track to a vst~ object and use program change 0 to play it, then the program change 24 for the guitar on another vst and the program change 36 for the bass on a third vst.
So that’s why I’m trying to automatically get the program change of each track to assign the track to the right vst preset.
How about [mtr] then?
Unfortunately there is no Max object for playing (or analyzing) universal midi files.
But you could try the external ‘ajm.midi2coll’ from Adam Murray.
I tried with seq and pgmin doesn’t work. But I think I’m doing mistakes.
It’s the first time I use MIDI in max so I discover a new (complex) world :-)
I’m looking at [mtr] but I don’t understand yet how it works.
----------begin_max5_patcher---------- 481.3ocyVFzSCBCFF9LKw+CM87bg1QkMuYzK6fFuaLlNnxpg1hPWbpw+61V. koatElaiKzk2uO36km8Rg2OomGbpZAq.BNGbGvy6cihmSyp3UK3AEzEQozBW iPAqnflvf8qJpYKztBEZU1WpOpj5B9aLaEDdfesdFUGMiKSdHmEoKGLZ3HSc PPf83P2QjQAbe84HmK3xTl1MebCU0bcsLp4fkTgavvKx4zzu7TY65WyXkCFB +dF7X2Inl9zoDenS7iS5YWMK8+OfCMW2J5362onSv38.cxYz31.myvMXC43y lv1yFI6EykXEAG1yqlLnAjwDznv+BOld5CBOygGr82X+0hGzpwCtM3gKMYc. bJUlrFRQ1ARMWLkk2ZnLxAED1soCw8vUWgJnf++7SVh4to8IH2CXU6AUtO8g EV1kUxpviV.phIjfNX.ZGnRjRHXR8uSP2lqRxoBvM6F1PnfFbabK4l+Vvsl. Yzd.HWO4pIfKmQkRVZ6wwvxXT49PgnCBNv3ehixwAS4xe8cfNSaK7CHUnlmG UGIqdsWePCiGyJzbIUyUxlcQVtqY73XlboaBAONSYB4UNAb+5+ua6M23Nr4L epYGlbjswbgGEuYmJZSVy75zik21H1P6N2rBlkOA87VBBC -----------end_max5_patcher-----------
Oh I didn’t saw your answer broc.
Thank you, I’ll take a look at this object.
Have you checked the MIDI tutorials in Max?
Yep I’ve checked the MIDI tutorials, but I have to spend more time to understand all objects.