ncassetta / NiCMidi

A MIDI C++ library with objects for reading, writing, playing, editing and recording midi files
GNU Lesser General Public License v3.0
2 stars 1 forks source link

Question: collecting "garbage" while playing sequencer example in a loop #8

Closed goofy2k closed 2 years ago

goofy2k commented 2 years ago

I am repeatedly running the somewhat adapted sequencer example (see attached code) and notice that quite a number of AllNotesOff commands are sent after completing a number of cycles.

This probably because of my lack of understanding of what exactly happens. DO I forget to clean up something after completion of a cycle?

I see: (see attached runtime log)

An increasing number of these calls: E (320564) SEQUENCER: track_states.size() 17

I (327764) NICMIDI OutputMessage: MIDIOutDriver::OutputMessage (note off messages for a sequence of channels)

Finished by:

E (327824) NICMIDI DRIVER: MIDIOutDriver::ClosePort() OUT Port fckx_seq closed CatchEventsBefore finished: events sent: 126

TEST_SEQUENCER_cpp.txt

TEST_SEQUENCER_runtime.txt

goofy2k commented 2 years ago

Hm, I think that I am adding the garbage myself, in every new cycle the program adds new events. I should clean tracks before or after every cycle or make the cycle narrower , such that only playing is repeated....

And improve on making bluetooth connection with the synth (it came late). Improved in V27. But still not flawless. First absorb Nic's 29/12 commits (v28) then go on with getting a good sequencer performance (v29)

goofy2k commented 2 years ago

This is not an issue any more. It was caused by wrong usage of the lib by me.