I’m trying to use the tracktion engine in a plugin, following the EngineInPluginDemo example.
I set up a MIDI clip on the first track and add notes to it in my prepareToPlay
method, but notes at the beginning of the clip are left out:
auto midiClip = track->insertMIDIClip("Clip", {te::TimePosition::fromSeconds(0), te::TimeDuration::fromSeconds(36000000)} , nullptr); // 0 to 10,000 hours
midiClip->getSequence().addNote(63, te::BeatPosition::fromBeats(0), te::BeatDuration::fromBeats(0.5), 100, 0, nullptr); // Does not play
midiClip->getSequence().addNote(64, te::BeatPosition::fromBeats(0.001), te::BeatDuration::fromBeats(0.5), 100, 0, nullptr); // Does not play
midiClip->getSequence().addNote(65, te::BeatPosition::fromBeats(0.01), te::BeatDuration::fromBeats(0.5), 100, 0, nullptr); // Does not play
midiClip->getSequence().addNote(66, te::BeatPosition::fromBeats(0.1), te::BeatDuration::fromBeats(0.5), 100, 0, nullptr); // Plays
midiClip->getSequence().addNote(67, te::BeatPosition::fromBeats(1), te::BeatDuration::fromBeats(0.5), 100, 0, nullptr); // Plays
Am I missing something?