schellingb/TinySoundFont
关于
采用单个 C/C++ 文件实现的 SoundFont2 合成器库
开发工具实测星标增长
- 24小时
- 0
- 7天
- 0
- 15天
- +2
- 1个月
- 正在收集历史
各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。
README.md
原文TinySoundFont
SoundFont2 synthesizer library in a single C/C++ file
Overview
TinySoundFont is a software synthesizer using SoundFont2 sound bank files.
The library is a single C header file so it is extremely simple to integrate in your C/C++ projects.
#define TSF_IMPLEMENTATION
#include "tsf.h"
...
tsf* TinySoundFont = tsf_load_filename("soundfont.sf2");
tsf_set_output(TinySoundFont, TSF_MONO, 44100, 0); //sample rate
tsf_note_on(TinySoundFont, 0, 60, 1.0f); //preset 0, middle C
short HalfSecond[22050]; //synthesize 0.5 seconds
tsf_render_short(TinySoundFont, HalfSecond, 22050, 0);
The library code is based on SFZero by Steve Folta.
Documentation
The API documentation can be found on top of the library source code.
There are also examples available which come with a sample SoundFont file and build and play sound on Win32, Win64, Linux and MacOSX with no further dependencies.
Dependencies
C standard libraries for fopen, math and malloc (can be removed by providing custom functions with #defines).
Strict No LLM / No AI Policy
No LLMs for issues. No LLMs for source contributions/patches/pull requests.
AI must not be used to generate code for contributions to this project.
Any pull request to this project will ask you to confirm that you are the author and that you are contributing your changes under the license of the project.
License
TinySoundFont is available under the MIT license.
探索相关项目
加载中…