-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[FEATURE REQUEST] Support for more bitdepths #4
Comments
I think this is going to be relatively easy one, I think. Spessasynth currently stores the Linking the relevant code for reference: |
If I wanted to implement 32-bit PCM samples, would I also need to mess around with float64? I don't think that float64 would be required for 24-bit PCM, and for 8-bit PCM we would probably not even need float32. The smaller the float numbers required, the better, as it improves the efficiency of the program, allowing more samples to be used for the same amount of memory usage. |
Spessasynth is a 32-bit float synth, and that cannot be changed. Though I think that 24-bit and 32-bit will both be easy since it's just a matter of adjusting the code I've linked above |
So, there won't be any quality loss when converting 32-bit PCM to 32-bit float? This is good, because SFe 4.0 defines an sm32 sub-chunk. Of course we don't expect many people to be using it with 32-bit chunk headers, because it does use 33% more space for not much sound quality improvement, but when we add a large amount of 64-bit support, it will become more important. To complete this, we will need to add code that:
|
I've made a few changes to the code that allows the loading of 24-bit data. However, it does not yet combine the data. However, it's unclear to me whether the sampleDataArray that we slice into 16-bit samples is actually an array of 16-bit values, because everything says it's a Float32Array, but that doesn't make sense. Which one is it? |
Samples are 16-bit. By dividing them by 32768 (maximum value of 16-bit sample), we convert them to -1 to 1 range which float uses. The precision is still 16-bit, just the data type is float32. It's like converting 8 bit to 16:
So you essentially need to combine the samples to create a int32 (or 24bit) number and divide it by int32 max |
Is your feature request related to a problem? Please describe.
Currently, SpessaSynth is fixed to 16-bit samples. This means that it cannot use SF2.04 and some SFe banks with full sound quality.
Is your feature related to the sound library or the app/website?
App/website
Describe the solution you'd like
Support for the
sm24
andsm32
(SFe) sub-chunks. Additionally, 8-bit sample playback with theSFe-static (8-bit)
bank type for SFe.Describe alternatives you've considered
n/a
Additional context
n/a
The text was updated successfully, but these errors were encountered: