fluid-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [fluid-dev] Intercepting midi events


From: Christopher Leger
Subject: Re: [fluid-dev] Intercepting midi events
Date: Sun, 3 Jun 2018 22:20:42 -0400

Hi,

So I got the midi file playback working how I want but now I am having a bit of a problem with the midi driver.

I got the settings of the midi driver correct so that midi events are being received by Fluidsynth. However, they aren't getting passed to the synth properly. I am able to print out midi event data from my midi keyboard just fine but when my handle_midi_event_func_t returns I get the error message:

** (process:1822): CRITICAL **: fluid_synth_noteon: assertion 'synth != NULL' failed.

I am not sure why I am getting this message, the synth works fine when using the player. I must be missing a step... Here is what I am doing:

1. create settings
2. set my midi driver settings
3. create midi driver
4. create synth
5.  load soundfond
6.  set audio driver settings
7.  create audio driver

When I return from my function I call fluid_synth_handle_midi_event((fluid_synth_t*) data, event). 

Do you know why my events aren't passing onto the synth properly?

Thanks!
-Chris


On Sat, May 19, 2018 at 4:48 PM, Christopher Leger <address@hidden> wrote:
Perfect! This seems like what I have been looking for. I'll work at this and be sure to ask if I have an questions.

-Chris

On Sat, May 19, 2018 at 3:28 PM, Tom M. <address@hidden> wrote:
For intercepting events from the midi player, use fluid_player_set_playback_callback() to register your custom processing function of type handle_midi_event_func_t.

For intercepting events from the midi driver (your keyboard), create the midi driver with new_fluid_midi_driver() and pass a processing function of type handle_midi_event_func_t as well.

http://www.fluidsynth.org/api/index.html#RealtimeMIDI

Once you're done processing events in your custom function, you should call fluid_synth_handle_midi_event() to pass the event on to the synth.

Tom




reply via email to

[Prev in Thread] Current Thread [Next in Thread]