Welcome, Guest
Username: Password: Remember me

TOPIC: Bug? Attenuation encoded with factor 25

Bug? Attenuation encoded with factor 25 1 year 9 months ago #1

  • Sven
  • Sven's Avatar
  • Offline
  • New Member
  • Posts: 1
Hello,

I am using the Mac version 2.2, and it seems the attenuation generator value is written to file with a dB factor of 25.
I wrote a test program that parses the igen chunk of a test soundfont, and a Polyphone value of 1 dB is encoded as 0x19 0x00 which is the little endian 16-bit value of 25.
According to the SF specification it should be a factor of 10.
Are there any plans to address this?

If this bug should be fixed, I imagine that all soundfonts saved with the „factor 25" version will be loaded incorrectly, causing a headache for soundfont designers. Unless there is or will be a conversion tool that fixes the attenuation values.

Elsewhere on the internet (Link) this discrepancy is mentioned (factor 2.5), and there is a hint that this bug was already fixed, however it’s not mentioned in which version.

Any thoughts or pointers about this?
Last Edit: 1 year 9 months ago by Sven.
The administrator has disabled public write access.

Bug? Attenuation encoded with factor 25 3 weeks 3 days ago #2

  • Davy
  • Davy's Avatar
  • Offline
  • Administrator
  • Organ enthusiast and creator of Polyphone
  • Posts: 397
  • Thank you received: 89
You are right and you put your finger in a bug occurring at the beginning of the soundfont format.
The rule that would have been correct according to the sf2 specification is that if we want an attenuation of 1 dB, then it is stored as 10 in the binary file. But probably due to a bug, an attenuation of 1 dB in their graphical interface (resulting thus in a value of 10 in the binary file) was a weaker attenuation for our ears because of the factor 2.5

Now the interface of Polyphone takes this factor into account so that we are dealing with real dB while still being compatible with the old soundfonts: internally the factor 2.5 is still here.
The administrator has disabled public write access.
Time to create page: 0.056 seconds