weixin_39987138 2020-11-20 21:15
浏览 0

Frame delta/offset for midi events

Hi, I'm a member of the LMMS development team. I've lately been trying to implement sample-accurate timing for as many of our instruments as possible. This has been implemented by communicating a frameoffset-parameter to instruments when they're asked to play notes.

For our SF2-player which uses Fluidsynth, I'd like to implement the same thing, but so far I haven't found a way to trigger midievents (noteons/noteoffs) with a frame offset in the Fluidsynth API. If there is already a way to do this, then please excuse my ignorance...

So, to recap: now, if I call fluid_synth_noteon, it plays the note always at the start of the period. I'd like to be able to call fluid_synth_noteon with an extra parameter, say: _offset, which would delay the playing of the note by _offset frames, where _offset <= period size. And same for noteoff.

Reported by: diiz

Original Ticket: fluidsynth/tickets/128

该提问来源于开源项目:FluidSynth/fluidsynth

  • 写回答

7条回答 默认 最新

  • weixin_39987138 2020-11-20 21:15
    关注

    Hi and thanks for your interest in FluidSynth! There was some similar discussion on the mailinglist recently, that might be helpful:

    http://lists.nongnu.org/archive/html/fluid-dev/2014-04/msg00002.html http://lists.nongnu.org/archive/html/fluid-dev/2014-05/msg00001.html

    In short, if you want to do trigger midi events with an offset your options are 1) interleave calls to fluid_synth_write with the right number of frames or 2) use the sequencer API.

    Also, FluidSynth has an internal buffer size of 64 samples/frames so all midi events will happen with this granularity.

    Original comment by: diwic

    评论

报告相同问题?