Coder Social home page Coder Social logo

Comments (5)

derselbst avatar derselbst commented on May 30, 2024

Original comment author: diwic

With the new sample timers, I expect the problem to persist but only for notes shorter than 64 samples.

Original comment by: elementgreen

from fluidsynth.

derselbst avatar derselbst commented on May 30, 2024

Original comment author: diwic

Ok, so this obviously needs to fixed. I haven't looked closely into the source yet, but I suspect that the problem is that FluidSynth seems to be doing the right thing according the soundfont specs, quoting: "Whenever a key-off occurs, the envelope
immediately enters a release phase during which the value linearly ramps from the current value to zero." Now even how fast attack we have, if the note-off comes immediately after, the attack has not yet begun and we ramp from zero to zero - and no sound is heard.
As drum pad and drum tracks often to just that (a note-off just after the note-on), this is bad.

So my suggestion is that we set a fixed minimum delay between note-on and note-off, so that the note-off is delayed if it comes too early. Drums often have a very fast attack so that would probably solve the problem without disturbing other things. I guess a good value could be between 1 and 20 ms, and we could either hard-code the value (without anyone ever noticing, probably), or make it a setting.

Comments?

Original comment by: elementgreen

from fluidsynth.

derselbst avatar derselbst commented on May 30, 2024

Original comment author: KrzysiekK

I actually wrote a temporary workaround for the problem few months ago, according to debug observation of events flow, and so far it's been working fine. It is delaying noteoff to allow at least one voice block for processing; then the event is artificially released by checking buffer memory. I can provide code to anyone interested (haven't done it yet officially as the code isn't optimized and may possibly introduce some performance loss).

Original comment by: elementgreen

from fluidsynth.

derselbst avatar derselbst commented on May 30, 2024

Support for this was just recently added into subversion trunk and will be available in 1.1.0. There is a setting synth.min-note-length which sets the minimum note duration in milliseconds and defaults to 10ms. Thanks for your interest in fixing this long outstanding bug! I think we can call it closed.

Original comment by: elementgreen

from fluidsynth.

derselbst avatar derselbst commented on May 30, 2024
  • status set to closed
  • resolution set to fixed

Original comment by: elementgreen

from fluidsynth.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.