melanchall / drywetmidi

.NET library to read, write, process MIDI files and to work with MIDI devices
https://melanchall.github.io/drywetmidi
MIT License
523 stars 73 forks source link

Add time offset for each notes during playback? #242

Closed akira0245 closed 1 year ago

akira0245 commented 1 year ago

Hello Melanchall,

Thank you for creating this wonderful MIDI library! I have a question about using the playback function. Is it possible to adjust the timing of note events while a playback is in progress? Specifically, if I have already created a playback and I want all notes with the metadata "track index 1" delay 50ms when playing, how should I achieve this?

akira0245 commented 1 year ago

Just found out that I could use a MidiClock in my output device and queue midi events for later playing them in the Tick event. Only works for delaying but seems good enough as a workaround!

melanchall commented 1 year ago

Hi,

I suppose your workaround is good, because unfortunately there is no a way to change timing of objects within Playback. Interesting question, thanks!