detonate MIDI playback: REALLY loud starting notes?

Dominic's icon

I'm using a detonate object to playback midi files at adjustable speeds, and I've noticed some quirky behavior that I can't quite track down.

Here is a test patch, with basic detonate MIDI playback, kslider control for testing, and options for built in system MIDI and VST control:

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

And here are some MIDI files to load (not sure what the policy is on this? let me know if I should modify the post)

for_elise_by_beethoven.mid
audio/mid 10.81 KB

PianoPhase.mid
audio/mid 15.32 KB

Maybe this patch can be of use to people!

However, I have found that occasionally there are momentary notes that are much louder than the usual playback. This is almost always at the start, with the first note being affected, and then the rest of the playback being fine. I can sometimes reproduce it by increasing the MIDI playback speed very high, creating some glitches and loud notes before potentially freezing the program.

This effects both in-system MIDI and VSTs. It almost sounds like the MIDI note velocity is set insanely high for a brief moment, but then goes back to normal. However, in debugging I haven't found evidence of that. Furthermore, the behavior seems to vary from machine to machine. It feels like it could be a resource/performance issue but I've tried to account for that, with no luck.

So I'm trying to find some people to test it on their machines! When you run this patch, do you experience the same behavior? If so, any ideas on how to squash this bug? Any help is appreciated.

broc's icon

In my experience [detonate] is generally not reliable and I would use [seq] instead.

Dominic's icon

Thanks for the heads up, I think this may have helped my issue.

I had originally avoided seq, as I saw in the help file it said, "You can control the speed of playback (only at the time you start it)". This made me think that I wouldn't be able to dynamically change the tempo during playback, which I needed.

For the record, and any future people googling, you can in fact do this with seq. Instructions, explanations and demo patch can be found in the documentation "MIDI Tutorial 4: MIDI Basic Sequencing".

Roman Thilenius's icon

while it is true that some objects contain more or less serious bugs, i would doubt that detonate randomly plays wrong velocity values. maybe there is a message order or threading problem in your patch?