seq: problem to manage pause/resume with ticks

piedagile's icon

Hello. I made a patch very similar to the exemple 3 of the MIDI Sequencing Tute 1 in Max documentation, replacing only the tempo by a metro at the correct timing. It works fine to read a MIDI sequence from beginning to end. To make pause, then resume, I stop the metro. OK for stopping immediately, but when I start the metro again, the first following  3 or 4 MIDI notes are played together, then a silence, then it continues normally. Listening attentively, the piano in the exemple patch seems to do the same.

My patch is directly copied from a pd-extended patch that works perfectly with th pd-0.43.4 engine.  Is it a real-time or priority scheduling issue? Any idea?

Max 6.1.6, MacOS 10.7.5

piedagile's icon

Attached seqtick.zip. The midi sequence is a simple arpege, simpler than in the Max tutorial. When playing/pausing with the toggle 1/0, the problem is obvious.

seqtick.zip
zip
piedagile's icon

After confirmation from support that there were a bug in Max midi playback, but presently not in the engineering priorities, I finally used a trick to work around : a mixture of seq, text and an intermediate temporary text file. To process a binary midi file:
1. read it into a seq object
2. export from seq to a new text file
3. import text file into a text object
4. process (read, pause, change speed...) controlled from messages to the text object

larryseyer's icon

Would it be possible for you to upload an example of what you did?

I'm running into a similar issue with SEQ... it's doesn't play the first note of a MIDI sequence in time - it's always late.

piedagile's icon

Unfortunately I presently do not have time to provide a summarized example. This is a part from a complex software that records midi flow to midi file in real time and with several midi playback features: nominal speed, variable speed, step by step individual notes or chords. Sorry, it is complex, but if you first localize the seq and the text objects, the included comments should help you. The cep_lnscale abstraction isn't important.
(edited with Max 6, not Max 7)

seq-text-example.maxpat
Max Patch