You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
How can I do a playback without a midi-device? This sounds stupid - yes, but:
The idea is to use the „fluidsynth“-dll and and the c#-wrapper of it (Nfluidsynth) as an „internal“ player for mididata by using a soundfount.
The „Nfluidsynth“ project has a simple interface for note_on/note_off/Set_controllers etc. I would do these calls in the Midi-Event Callback. But for that I need a Midi-device, correct?
Best regards
Thomas
The text was updated successfully, but these errors were encountered:
Use Playback without output device.
You can play MIDI data with Playback class without output device. There are Playback constructors that don't have outputDevice parameter. Also all GetPlayback extension methods (for example GetPlayback(midiFile, clockSettings = null)) have overloads without this parameter. More than that you can set Playback.OutputDevice property to null at any time. So you can play MIDI data without MIDI device and get all callbacks called.
Create custom output device
In fact, playback API works with IOutputDevice interface rather than with OutputDevice class. Last one is built-in inplementation of IOutputDevice. So you can create your own implementation and use it as output device for playback. In your case I suppose you can implement just SendEvent method and leave other ones empty.
In my opinion, the last option is preferred. I believe all I/O operations should be incapsulated in devices and not in general events or callbacks. Also it will be easier to reuse I/O code.
Hi Max,
How can I do a playback without a midi-device? This sounds stupid - yes, but:
The idea is to use the „fluidsynth“-dll and and the c#-wrapper of it (Nfluidsynth) as an „internal“ player for mididata by using a soundfount.
The „Nfluidsynth“ project has a simple interface for note_on/note_off/Set_controllers etc. I would do these calls in the Midi-Event Callback. But for that I need a Midi-device, correct?
Best regards
Thomas
The text was updated successfully, but these errors were encountered: