TOPIC: sample tuning is wrong in wave file import/export
sample tuning is wrong in wave file import/export 1 month 3 weeks ago #1
In the WAV file "smpl" sub-chunk, there are two fields that store sample tuning information:
Polyphone reads and writes these fields when importing and exporting WAV files. However, Polyphone appears to be doing this in a somewhat inverted manner, assuming I am not misunderstanding how this is supposed to work.
Steps to reproduce:
Result: the sampler metadata in the WAV file shows MIDI note 69 and fine tune 76, but it should be MIDI note 70 and fine tune 24. The value of 76 appears to be the result of adding 100 to -24, which should not happen in this case.
Note: in the hex editor, the MIDI note is stored at offset 003A (hex value: 45, converted to decimal: 69), and the fine tuning is a little endian int at 003E (hex value: C28F5C29, converted to decimal: 3264175145). So to convert to cents: 3264175145 / 2147483648 * 50 = 76.
If I repeat the same steps above, but change the tuning to -24 cents, the exported WAV file shows MIDI note 70 and fine tune 24, but it should be MIDI note 71 and fine tune 76 (adding 100 to -24 is correct here).
Last Edit: 1 month 3 weeks ago by S. Christian Collins.
The administrator has disabled public write access.
Time to create page: 0.303 seconds