[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[fluid-dev] fluid_sequencer_t funkiness
From: |
Corbin Simpson |
Subject: |
[fluid-dev] fluid_sequencer_t funkiness |
Date: |
Fri, 02 Oct 2009 21:04:27 -0700 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.1) Gecko/20090814 Fedora/3.0-2.6.b3.fc11 Thunderbird/3.0b3 |
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
delete_fluid_event(event)
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.