[Top][All Lists]

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

Re: [fluid-dev] fluid_sequencer_t funkiness

From: josh
Subject: Re: [fluid-dev] fluid_sequencer_t funkiness
Date: Sat, 03 Oct 2009 16:37:46 -0700
User-agent: Internet Messaging Program (IMP) H3 (4.1.6)

Hello Corbin,

Python binding for FluidSynth?  Sounds interesting :)

I'm not real familiar with the sequencer in FluidSynth, but I'll try and help. What does your code look like for creating the sequencer object? Some things were changed since the last release, to allow for system timer or callback based timing. It looks like you are probably wanting the former, which is the default when using new_fluid_sequencer().

Does one of those functions in the example code excerpt block? I don't think any of those functions would block and therefore it should just execute all of that and return from the function. I don't think you need to allocate a separate event for each one (so long as your Python bindings are correct).

The other things to look at would be in regards to whatever fluid_synth_t object you have created. Make sure it has a SoundFont loaded, gain turned up, etc.

Not sure what else it could be off hand. Might help if you sent additional code.


Quoting Corbin Simpson <address@hidden>:
I'm working on Python bindings for Fluidsynth. The following code, in
Cython, makes no sound and locks up my ALSA until the connection times out.

    cpdef test(self):
        cdef fluid_event_t* event
        cdef int ticks

        ticks = self.ticks

        event = new_fluid_event()
        fluid_event_set_dest(event, 1)

        for i in range(10):
            fluid_event_noteon(event, 0, 45, 127)
            fluid_sequencer_send_at(self.seq, event, ticks + 72, 1)
            fluid_event_noteon(event, 0, 50, 127)
            fluid_sequencer_send_at(self.seq, event, ticks + 288, 1)
            fluid_event_noteon(event, 0, 60, 127)
            fluid_sequencer_send_at(self.seq, event, ticks + 360, 1)
            fluid_event_noteon(event, 0, 55, 127)
            fluid_sequencer_send_at(self.seq, event, ticks + 576, 1)
            fluid_event_noteon(event, 0, 60, 127)
            fluid_sequencer_send_at(self.seq, event, ticks + 720, 1)

            ticks += 720


This is a near-exact transcription of the sequencer example in the API
docs. The synth number is hard-coded since I'm only testing one synth.

Do I need to make a new fluid_event_t for each sent event? The docs say
fluid_sequencer_send_at makes a copy of the event, and making copies
doesn't appear to help...

Any tips are appreciated.
~ C.

fluid-dev mailing list

reply via email to

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