Comments (3)
I believe this is not in this library's scope. I personally use sf2cute for that.
from tinysoundfont.
Yeah as frabert mentioned.
I use Viena for looking into and modifying sf2 files. Creating one from scratch seems a daunting task to me :-)
from tinysoundfont.
Hah!I've figured out the file format.below I modified the minimal sf a little to make it recognizable and editable by an awesome software——polyphone.
//This is a minimal SoundFont with a single loopin saw-wave sample/instrument/preset (496 bytes)
//sf file structure reference : http://www.synthfont.com/sfspec24.pdf ,page13
const static char MinimalSoundFont[] =
{
'R','I','F','F',232,1,0,0,
's','f','b','k',
//list info start
'L','I','S','T',4,0,0,0,
'I','N','F','O',
//list sample start
'L','I','S','T',112,0,0,0,
's','d','t','a',
's','m','p','l',100,0,0,0,96,0,119,3,31,7,147,10,43,14,169,17,58,21,189,24,73,28,204,31,73,35,249,38,46,42,71,46,250,48,150,53,242,55,126,60,151,63,108,66,126,72,207,
70,86,83,100,72,74,100,163,39,241,163,59,175,59,179,9,179,134,187,6,186,2,194,5,194,15,200,6,202,96,206,159,209,35,213,213,216,45,220,221,223,76,227,221,230,91,234,242,237,105,241,8,245,118,248,32,252,
//list preset data start
'L','I','S','T',88,1,0,0,
'p','d','t','a',
'p','h','d','r',76,0,0,0,59,69,69,69,69,69,69,69,69,0,TEN0,TEN0,0,0,0,0,0,0,0,0,69,69,69,69,69,69,69,69,69,0,TEN0,1,0,1,0,1,TEN0,0,0,0,// The Preset Headers P#21 x38 name20bytes,wPreset,wBank,presetBagIdx..
'p','b','a','g',8,0,0,0, 0,0,0,0,1,0,0,0,//The Preset Index list
'p','m','o','d',10,TEN0,0,0,0,//The Preset Modulator list
'p','g','e','n',8,0,0,0,41,0,0,0,0,0,0,0,//The Preset Generator list
'i','n','s','t',44,0,0,0,59,69,69,69,69,69,69,69,69,0,TEN0,0,0,69,69,69,69,69,69,69,69,69,0,TEN0,1,0,//The Instrument Names and Indices x22
'i','b','a','g',8,0,0,0,0,0,0,0,2,0,0,0,//The Instrument Index list
'i','m','o','d',10,TEN0,0,0,0,//The Instrument Modulator list
'i','g','e','n',12,0,0,0,54,0,1,0,53,0,0,0,0,0,0,0,//The Instrument Generator list
//The Sample Headers x46 name20bytes,dwStart,End,StartLoop,EndLoop, sampleRate b c wSa
's','h','d','r',92,0,0,0,59,69,69,69,69,69,69,69,69,0,TEN0,0,0,0,0,50,0,0,0,0,0,0,0,49,0,0,0,34,86,0,0,60,0,0,0,1,0, 69,69,69,69,69,69,69,69,69,0,TEN0,TEN0,TEN0,0,0,0,0,0,0,
//86*256+34=22050
};
from tinysoundfont.
Related Issues (20)
- How many channels does this support? HOT 2
- white noise unexpected sound when playing the files HOT 2
- Stuck instrument with Windows XP onestop.mid HOT 1
- Incompatibility with ISO C++ HOT 2
- `TSF_MALLOC(...)` without non-NULL check/error handling HOT 3
- Design issue: having playback handling and soundfont in same structure incentivizes people to write memory hogs(?) HOT 3
- `tsf_set_max_voices()` should actually be enforced HOT 2
- Unicode open HOT 1
- Would be possible to sustain a note? HOT 2
- Is .sfz support something devs consider also thank you for the library HOT 6
- voices active for slightly longer than they should be
- Reading samples directly at runtime (port to STM32) HOT 1
- MIDI latency HOT 1
- Likely memory leak in use of TSF_REALLOC in new sf3 code in out of memory conditions HOT 1
- Player ending before end of music (not playing last notes)
- [Question] Loading multiple SF2 files?
- soundnames inside drumkits
- large soundfonts HOT 2
- Dynamic Voice Allocation and Immediate Cutoff Mechanism Proposal for Memory Optimization in SoundFont Library HOT 1
- Extending sfotool support with optional sample load callback. HOT 2
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 tinysoundfont.