Coder Social home page Coder Social logo

Comments (4)

derselbst avatar derselbst commented on May 30, 2024

Original comment author: Mr_Bumpy

I couldn't attach the file because it was too large, but you can find it here.

Original comment by: elementgreen

from fluidsynth.

derselbst avatar derselbst commented on May 30, 2024

Original comment author: diwic

Hello Christian,

sorry that nobody has taken the time to investigate this bug further, now that you have put so much effort in creating good test cases. I'm new to that part of FluidSynth, but I thought I would give it a go and see if I could fix the bugs you are experiencing. I started by going through the math behind the first one:

-2400 cents = two octaves down

Sustain of 13% means 13% off the top level, 100% - 13% = 87% remaining.

87% of -2400 = -2088

Then the desired behaivour is an additional 7 semitones (i e a perfect fifth up), so total adjustment should be 27 semitones and 88 cents, which is what you have in the "Soundtrack FS Fix" instrument.

I have a hard time seeing what FluidSynth does wrong, or if my calculation above are wrong in some way, or if there is something else affecting the pitch...? Can you help me out?

Original comment by: elementgreen

from fluidsynth.

derselbst avatar derselbst commented on May 30, 2024

Original comment author: Mr_Bumpy

My apologies... it appears as though it is the Audigy that is doing the miscalculation; all of my measured tests show FluidSynth to be 100% what the values should be.

In the Soundtrack example, I have the modenv->pitch set to -2400 cents. The Audigy, however, seems to not go any lower than -1200 cents, so it uses it's actual limited value for performing the calculations. So you end up with:

FluidSynth:

set value: -2400
calculation: 13% of -2400 cents

Audigy:

set value: -2400
calculation: 13% of -1200 cents

Setting the modenv->pitch to -1200 in the SoundFont provides identical playback for both Audigy and FluidSynth.

For the sweep pad, I discovered two factors that create the large difference in playback between the Audigy and FluidSynth:

  1. The Audigy's mod envelope does not take into account the difference between actual and audible linear scaling. For example, 100 to 200 hz is an octave, but 200 to 300 hz is only half an octave. The Audigy scales numerically linear, and the audible result is that the pitch/filter moves very quickly at low frequencies and very slowly at high frequencies. FluidSynth scales based on the perceived sound, so it covers 100 to 200 hz in the same amount of time it takes to cover 200 to 400 hz. FluidSynth's method is preferred, IMO, but it does change the percieved filter/pitch of the sound compared to the Audigy.

  2. The Audigy just plain seems to miscalculate some things, and I haven't completely figured out why. For example:

FluidSynth:

instrument-level attack: 0.1 sec
preset-level attack: x60
resulting attack: 6 sec

Audigy:

instrument-level attack: 0.1 sec
preset-level attack: x60
resulting attack: 10.5 sec (estimated)

I don't know why the Audigy gets its results, but I can't see any reason why it would be correct in doing so.

Original comment by: elementgreen

from fluidsynth.

derselbst avatar derselbst commented on May 30, 2024
  • status changed from new to closed
  • resolution set to invalid

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.