Comments (3)
It looks like Signal can't handle a soundfont with 24-bit samples.
As a workaround, you might be able to use a soundfont editor to make a 16-bit version of the soundfont.
For example, in the Polyphone soundfont editor, you can open the soundfont, change the "Samples" dropdown box from "24 bits" to "16 bits", then save as a new soundfont. That seems to make it into a 16-bit soundfont which works in Signal.
from signal.
I did a quick look at the sf2 format by reading this document:
SoundFont2 Structure - sdta Chunk
It looks like an sf2 file can store either 16-bit sounds or 24-bit sounds. When 24-bit sounds are used, it looks like they are actually stored as 16-bit sounds plus data for the additional 8 bits.
The "TODO" error message comes the following place in this file:
node_modules\@ryohey\sf2parser\src\Parser.ts
function parseSdtaList(chunk: Chunk, data: Uint8Array): Chunk {
const chunkList = getChunkList(chunk, data, "LIST", "sdta")
if (chunkList.length !== 1) {
throw new Error("TODO")
}
return chunkList[0]
}
(see source code at npm @ryohey/sf2parser Code src/Parser.ts or GitHub ryohey/sf2synth.js Parser.ts)
According to my tests, it looks like you can remove if (chunkList.length !== 1) {
throw new Error("TODO")
}
so this function will always return chunkList[0]
and it seems to just use the highest 16 bits of 24-bit sounds.
If you want to try out this change, I wrote some code you can use to patch Signal using the browser console or a JavaScript bookmark: Signal Customizations
from signal.
thanks @robertnhart I will fix it.
we can ignore 8bit lsb as you say i can find some real codes which handles correctly. I might do same thing that treats samples as 32bit
https://github.com/FluidSynth/fluidsynth/blob/master/src/sfloader/fluid_sffile.c#L2206
from signal.
Related Issues (20)
- How could I install it? HOT 1
- Firebase Error when running the web app. HOT 2
- Note Velocity does not have a limit to it's value HOT 1
- Unknown Error when using new Open MIDI on External Site
- Mobile unusable
- Invalid channels over 16
- Locks up attempting to edit .mid channels exported from MuseScore HOT 3
- Local/"installable" version. HOT 4
- Looping music won't work
- Value too high...?
- All-black theme for OLED screens
- Why not PWA? HOT 1
- Cannot load some midi files HOT 1
- Add Undo functionality HOT 1
- Record controller values problem
- ,
- Midi files with a low PPQ cause timing issues when imported into signal HOT 5
- Add audio tracks HOT 1
- Feature Request: Add rotated view
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from signal.