Libraries mostly correct on Linux now.
This commit is contained in:
parent
1de2f4a4e9
commit
a68e114c1e
226 changed files with 49 additions and 72891 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -1,4 +1,5 @@
|
|||
*~
|
||||
*.log
|
||||
*.user
|
||||
*.ISO
|
||||
*.iso
|
||||
|
|
|
@ -57,13 +57,13 @@ int main(int argc, char *argv[]) {
|
|||
err = SDL_Init(SDL_INIT_EVERYTHING);
|
||||
if (err != 0) utilDie("%s", SDL_GetError());
|
||||
|
||||
// Init SDL_mixer
|
||||
flags = MIX_INIT_FLAC | MIX_INIT_MOD | MIX_INIT_MP3 | MIX_INIT_OGG | MIX_INIT_MID | MIX_INIT_OPUS;
|
||||
// Init SDL_mixer ***FIX***
|
||||
flags = /* MIX_INIT_FLAC | */ MIX_INIT_MOD | MIX_INIT_MP3 | MIX_INIT_OGG | MIX_INIT_MID | MIX_INIT_OPUS;
|
||||
err = Mix_Init(flags);
|
||||
if (err != flags) utilDie("%s", Mix_GetError());
|
||||
|
||||
// Init SDL_image
|
||||
flags = IMG_INIT_JPG | IMG_INIT_PNG /* | IMG_INIT_TIF */ | IMG_INIT_WEBP; //***FIX***
|
||||
// Init SDL_image ***FIX***
|
||||
flags = IMG_INIT_JPG | IMG_INIT_PNG | /* IMG_INIT_TIF | */ IMG_INIT_WEBP;
|
||||
err = IMG_Init(flags);
|
||||
if (err != flags) utilDie("%s", IMG_GetError());
|
||||
|
||||
|
|
|
@ -31,6 +31,7 @@ else
|
|||
fi
|
||||
|
||||
G_INSTALLED="${G_DEST}/installed"
|
||||
G_L="-------------------------------------------------------------------------------"
|
||||
|
||||
|
||||
function autoBuild() {
|
||||
|
@ -39,6 +40,9 @@ function autoBuild() {
|
|||
local OPTIONS=$3 # Additional configure options
|
||||
|
||||
if [[ ! -e "${G_INSTALLED}/lib/${LOOKFOR}" ]]; then
|
||||
echo ${G_L}
|
||||
echo "Building ${LOOKFOR} from ${LOCATION}"
|
||||
echo ${G_L}
|
||||
pushd "${G_THIRDPARTY}/${LOCATION}"
|
||||
if [[ -e autogen.sh ]]; then
|
||||
./autogen.sh || true
|
||||
|
@ -49,13 +53,20 @@ function autoBuild() {
|
|||
popd
|
||||
mkdir -p "${G_DEST}/${LOCATION}"
|
||||
pushd "${G_DEST}/${LOCATION}"
|
||||
CFLAGS="-I${G_INSTALLED}/include" \
|
||||
CXXFLAGS="-I${G_INSTALLED}/include" \
|
||||
LDFLAGS="-L${G_INSTALLED}/lib -L${G_INSTALLED}/lib64" \
|
||||
"${G_THIRDPARTY}/${LOCATION}/configure" --enable-static --disable-shared --prefix="${G_INSTALLED}" ${OPTIONS}
|
||||
if [[ "${OPTIONS}x" != "--helpx" ]]; then
|
||||
PKG_CONFIG_LIBDIR="${G_INSTALLED}/lib/pkgconfig" \
|
||||
CFLAGS="-I${G_INSTALLED}/include ${MORE_CFLAGS}" \
|
||||
CXXFLAGS="-I${G_INSTALLED}/include ${MORE_CFLAGS}" \
|
||||
LDFLAGS="-L${G_INSTALLED}/lib ${MORE_LIBS}" \
|
||||
"${G_THIRDPARTY}/${LOCATION}/configure" \
|
||||
--enable-static \
|
||||
--disable-shared \
|
||||
--prefix="${G_INSTALLED}" ${OPTIONS}
|
||||
if [[ ${OPTIONS} != --help* && ${OPTIONS} != *--help ]]; then
|
||||
make
|
||||
make install
|
||||
else
|
||||
popd
|
||||
exit 1
|
||||
fi
|
||||
popd
|
||||
fi
|
||||
|
@ -64,6 +75,9 @@ function autoBuild() {
|
|||
|
||||
# === zlib ===
|
||||
if [[ ! -e "${G_INSTALLED}/lib/libz.a" ]]; then
|
||||
echo ${G_L}
|
||||
echo "Building libz.a from zlib"
|
||||
echo ${G_L}
|
||||
mkdir -p "${G_DEST}/zlib"
|
||||
pushd "${G_DEST}/zlib"
|
||||
"${G_THIRDPARTY}/zlib/configure" --static --prefix="${G_INSTALLED}"
|
||||
|
@ -74,6 +88,9 @@ fi
|
|||
|
||||
# === BZip2 ===
|
||||
if [[ ! -e "${G_INSTALLED}/lib/libbz2.a" ]]; then
|
||||
echo ${G_L}
|
||||
echo "Building libbz2.a from bzip2"
|
||||
echo ${G_L}
|
||||
mkdir -p "${G_DEST}/bzip2"
|
||||
pushd "${G_DEST}/bzip2"
|
||||
cp -fr "${G_THIRDPARTY}/bzip2/." .
|
||||
|
@ -83,6 +100,9 @@ fi
|
|||
|
||||
# === Lua ===
|
||||
if [[ ! -e "${G_INSTALLED}/lib/liblua.a" ]]; then
|
||||
echo ${G_L}
|
||||
echo "Building liblua.a from lua"
|
||||
echo ${G_L}
|
||||
mkdir -p "${G_DEST}/lua"
|
||||
pushd "${G_DEST}/lua"
|
||||
cp -fr "${G_THIRDPARTY}/lua/." .
|
||||
|
@ -91,11 +111,11 @@ if [[ ! -e "${G_INSTALLED}/lib/liblua.a" ]]; then
|
|||
popd
|
||||
fi
|
||||
|
||||
# === XZ Utils ===
|
||||
autoBuild liblzma.a xz
|
||||
|
||||
# === JBIG ===
|
||||
if [[ ! -e "${G_INSTALLED}/lib/libjbig.a" ]]; then
|
||||
echo ${G_L}
|
||||
echo "Building libjbig.a from jbig"
|
||||
echo ${G_L}
|
||||
mkdir -p "${G_DEST}/SDL2_image/jbig"
|
||||
pushd "${G_DEST}/SDL2_image/jbig"
|
||||
cp -fr "${G_THIRDPARTY}/jbigkit/." .
|
||||
|
@ -105,6 +125,9 @@ if [[ ! -e "${G_INSTALLED}/lib/libjbig.a" ]]; then
|
|||
popd
|
||||
fi
|
||||
|
||||
# === XZ Utils ===
|
||||
autoBuild liblzma.a xz
|
||||
|
||||
# === TIFF ===
|
||||
autoBuild libtiff.a SDL2_image/external/tiff-4.1.0
|
||||
|
||||
|
@ -138,17 +161,7 @@ autoBuild libopus.a SDL2_mixer/external/opus-1.3.1
|
|||
# === OpusFile ===
|
||||
DEPS_CFLAGS="-I${G_INSTALLED}/include -I${G_INSTALLED}/include/opus" \
|
||||
DEPS_LIBS="-L${G_INSTALLED}/lib -logg -lopus" \
|
||||
autoBuild libopusfile.a SDL2_mixer/external/opusfile-0.11
|
||||
|
||||
# === FluidSynth === *** Not finding the ENABLE-SDL2 option ***
|
||||
if [[ ! -e "${G_INSTALLED}/lib64/libfluidsynth.a" ]]; then
|
||||
mkdir -p "${G_DEST}/fluidsynth"
|
||||
pushd "${G_DEST}/fluidsynth"
|
||||
cmake "${G_THIRDPARTY}/fluidsynth/." -DBUILD_SHARED_LIBS=OFF -DCMAKE_INSTALL_PREFIX="${G_INSTALLED}" -DENABLE-SDL2=ON
|
||||
make
|
||||
make install
|
||||
popd
|
||||
fi
|
||||
autoBuild libopusfile.a SDL2_mixer/external/opusfile-0.11 --disable-http
|
||||
|
||||
# === FFMPEG ===
|
||||
autoBuild libavcodec.a ffmpeg "--disable-debug --disable-muxers --disable-encoders --disable-filters --disable-hwaccels --disable-network --disable-devices --disable-programs --enable-gpl"
|
||||
|
@ -157,12 +170,12 @@ autoBuild libavcodec.a ffmpeg "--disable-debug --disable-muxers --disable-encode
|
|||
FFMPEG_LIBS="-L${G_INSTALLED}/lib -l:libavformat.a -l:libavcodec.a -l:libswscale.a -l:libavutil.a -l:libswresample.a -l:libz.a -l:liblzma.a -l:libbz2.a -lpthread -lXv -lX11 -lXext -lm" \
|
||||
autoBuild libffms2.a ffms2
|
||||
|
||||
# === FreeType 2 ===
|
||||
autoBuild libfreetype.a freetype2 --without-harfbuzz
|
||||
|
||||
# === Harfbuzz ===
|
||||
autoBuild libharfbuzz.a harfbuzz "--with-glib=no --with-icu=builtin --with-cairo=no --with-fontconfig=no --with-freetype=yes"
|
||||
|
||||
# === FreeType 2 ===
|
||||
autoBuild libfreetype.a freetype2
|
||||
|
||||
# === SDL2 ===
|
||||
autoBuild libSDL2.a SDL2
|
||||
|
||||
|
@ -170,107 +183,10 @@ autoBuild libSDL2.a SDL2
|
|||
autoBuild libSDL2_image.a SDL2_image "--disable-jpg-shared --disable-png-shared --disable-tif-shared --disable-webp-shared"
|
||||
|
||||
# === SDL2_mixer ===
|
||||
autoBuild libSDL2_mixer.a SDL2_mixer "--disable-music-ogg-shared --disable-music-flac-shared --disable-music-mod-modplug-shared --disable-music-mp3-mpg123-shared --disable-music-opus-shared"
|
||||
LIBS="-lm" \
|
||||
MORE_LIBS="-lstdc++" \
|
||||
autoBuild libSDL2_mixer.a SDL2_mixer "--disable-music-midi-fluidsynth --disable-music-ogg-shared --disable-music-flac-shared --disable-music-mod-modplug-shared --disable-music-mp3-mpg123-shared --disable-music-opus-shared"
|
||||
|
||||
# === SDL2_ttf ===
|
||||
autoBuild libSDL2_ttf.a SDL2_ttf "--with-ft-prefix=\"${G_INSTALLED}\" --with-sdl-prefix=\"${G_INSTALLED}\""
|
||||
|
||||
|
||||
:<<OLD
|
||||
|
||||
# === SDL2 ===
|
||||
|
||||
mkdir -p "${DEST}/SDL2"
|
||||
pushd "${DEST}/SDL2"
|
||||
if [[ ! -e "${INSTALLED}/lib/libSDL2.a" ]]; then
|
||||
pushd "${THIRDPARTY}/SDL2"
|
||||
./autogen.sh
|
||||
popd
|
||||
"${THIRDPARTY}/SDL2/configure" --prefix="${INSTALLED}"
|
||||
make
|
||||
make install
|
||||
fi
|
||||
popd
|
||||
|
||||
# === SDL2_image ===
|
||||
|
||||
mkdir -p "${DEST}/SDL2_image"
|
||||
pushd "${DEST}/SDL2_image"
|
||||
if [[ ! -e "${INSTALLED}/lib/libSDL2_image.a" ]]; then
|
||||
# --- SDL2_image ---
|
||||
#*** TIFF LOADING IS BROKEN ***
|
||||
pushd "${THIRDPARTY}/SDL2_image"
|
||||
./autogen.sh
|
||||
popd
|
||||
"${THIRDPARTY}/SDL2_image/configure" \
|
||||
--enable-static \
|
||||
--disable-shared \
|
||||
--disable-jpg-shared \
|
||||
--disable-png-shared \
|
||||
--disable-tif-shared \
|
||||
--disable-webp-shared \
|
||||
--with-sdl-prefix="${INSTALLED}" \
|
||||
--bindir="${INSTALLED}/bin" \
|
||||
--libdir="${INSTALLED}/lib" \
|
||||
--includedir="${INSTALLED}/include" \
|
||||
--mandir="${INSTALLED}/include" \
|
||||
CFLAGS="-g -O2 -D_GNU_SOURCE=1 -I${INSTALLED}/include" \
|
||||
LDFLAGS="-L${INSTALLED}/lib"
|
||||
make
|
||||
make install
|
||||
fi
|
||||
popd
|
||||
|
||||
# === SDL2_mixer ===
|
||||
|
||||
mkdir -p "${DEST}/SDL2_mixer"
|
||||
pushd "${DEST}/SDL2_mixer"
|
||||
if [[ ! -e "${INSTALLED}/lib/libSDL2_mixer.a" ]]; then
|
||||
# --- VorbisIDec ---
|
||||
mkdir -p "${DEST}/SDL2_mixer/vorbisidec"
|
||||
pushd "${DEST}/SDL2_mixer/vorbisidec"
|
||||
pushd "${THIRDPARTY}/SDL2_mixer/external/libvorbisidec-1.2.1"
|
||||
autoreconf --force --install
|
||||
popd
|
||||
"${THIRDPARTY}/SDL2_mixer/external/libvorbisidec-1.2.1/configure" --enable-static --disable-shared --prefix="${INSTALLED}"
|
||||
make
|
||||
make install
|
||||
popd
|
||||
# --- SDL2_mixer ---
|
||||
pushd "${THIRDPARTY}/SDL2_mixer"
|
||||
./autogen.sh
|
||||
popd
|
||||
"${THIRDPARTY}/SDL2_mixer/configure" \
|
||||
--enable-static \
|
||||
--disable-shared \
|
||||
--disable-music-ogg-shared \
|
||||
--disable-music-flac-shared \
|
||||
--disable-music-mod-modplug-shared \
|
||||
--disable-music-mp3-mpg123-shared \
|
||||
--disable-music-opus-shared \
|
||||
--with-sdl-prefix="${INSTALLED}" \
|
||||
--bindir="${INSTALLED}/bin" \
|
||||
--libdir="${INSTALLED}/lib" \
|
||||
--includedir="${INSTALLED}/include" \
|
||||
--mandir="${INSTALLED}/include" \
|
||||
CFLAGS="-g -O2 -D_GNU_SOURCE=1 -I${INSTALLED}/include -I${INSTALLED}/include/opus" \
|
||||
LDFLAGS="-L${INSTALLED}/lib"
|
||||
make
|
||||
make install
|
||||
fi
|
||||
popd
|
||||
|
||||
# === SDL2_ttf ===
|
||||
|
||||
mkdir -p "${DEST}/SDL2_ttf"
|
||||
pushd "${DEST}/SDL2_ttf"
|
||||
if [[ ! -e "${INSTALLED}/lib/libSDL2_ttf.a" ]]; then
|
||||
pushd "${THIRDPARTY}/SDL2_ttf"
|
||||
./autogen.sh
|
||||
popd
|
||||
"${THIRDPARTY}/SDL2_ttf/configure" --with-ft-prefix="${INSTALLED}" --with-sdl-prefix="${INSTALLED}" --prefix="${INSTALLED}"
|
||||
make
|
||||
make install
|
||||
fi
|
||||
popd
|
||||
OLD
|
||||
MORE_CFLAGS="-I${G_INSTALLED}/include/SDL2" \
|
||||
autoBuild libSDL2_ttf.a SDL2_ttf "--with-ft-prefix=\"${G_INSTALLED}\" --with-sdl-prefix=\"${G_INSTALLED}\""
|
||||
|
|
|
@ -144,7 +144,8 @@ LIBS += \
|
|||
-lX11 \
|
||||
-lXext \
|
||||
-lm \
|
||||
-ldl
|
||||
-ldl \
|
||||
-lrt
|
||||
|
||||
OTHER_FILES += \
|
||||
preBuild.sh \
|
||||
|
|
|
@ -667,9 +667,9 @@ distclean-generic:
|
|||
maintainer-clean-generic:
|
||||
@echo "This command is intended for maintainers to use"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
@FLaC__HAS_DOXYGEN_FALSE@install-data-local:
|
||||
@FLaC__HAS_DOXYGEN_FALSE@uninstall-local:
|
||||
@FLaC__HAS_DOXYGEN_FALSE@distclean-local:
|
||||
@FLaC__HAS_DOXYGEN_FALSE@install-data-local:
|
||||
clean: clean-recursive
|
||||
|
||||
clean-am: clean-generic clean-libtool mostlyclean-am
|
||||
|
|
|
@ -1018,9 +1018,9 @@ distclean-generic:
|
|||
maintainer-clean-generic:
|
||||
@echo "This command is intended for maintainers to use"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
@HAVE_DOXYGEN_FALSE@install-data-local:
|
||||
@HAVE_DOXYGEN_FALSE@uninstall-local:
|
||||
@HAVE_DOXYGEN_FALSE@clean-local:
|
||||
@HAVE_DOXYGEN_FALSE@install-data-local:
|
||||
clean: clean-am
|
||||
|
||||
clean-am: clean-generic clean-libLTLIBRARIES clean-libtool clean-local \
|
||||
|
|
50
singe/thirdparty/fluidsynth/.appveyor-vcpkg.yml
vendored
50
singe/thirdparty/fluidsynth/.appveyor-vcpkg.yml
vendored
|
@ -1,50 +0,0 @@
|
|||
image:
|
||||
- Visual Studio 2017
|
||||
|
||||
build:
|
||||
parallel: true
|
||||
verbosity: detailed
|
||||
|
||||
configuration:
|
||||
- Release
|
||||
|
||||
environment:
|
||||
# update the vcpkg cache even if build fails
|
||||
APPVEYOR_SAVE_CACHE_ON_ERROR: true
|
||||
|
||||
matrix:
|
||||
- platform: x86
|
||||
|
||||
- platform: x64
|
||||
|
||||
cache:
|
||||
- c:\Tools\vcpkg\installed
|
||||
|
||||
init:
|
||||
- set TARGET_PLATFORM=
|
||||
- if "%platform%"=="x64" ( set TARGET_PLATFORM= Win64)
|
||||
- if "%platform%"=="ARM" ( set TARGET_PLATFORM= ARM)
|
||||
- echo %TARGET_PLATFORM%
|
||||
- echo %APPVEYOR_BUILD_WORKER_IMAGE%
|
||||
- if "%APPVEYOR_BUILD_WORKER_IMAGE%"=="Visual Studio 2017" ( set "generator=Visual Studio 15 2017%TARGET_PLATFORM%" && set "toolset=v141_xp" )
|
||||
- echo %generator%
|
||||
- echo %toolset%
|
||||
|
||||
install:
|
||||
# make sure the latest version of git is installed
|
||||
- choco upgrade git -y
|
||||
- vcpkg install glib:%platform%-windows
|
||||
|
||||
build_script:
|
||||
- mkdir build
|
||||
- cd build
|
||||
- cmake -G "%generator%" -T "%toolset%" -Denable-pkgconfig=0 -DCMAKE_TOOLCHAIN_FILE=c:/Tools/vcpkg/scripts/buildsystems/vcpkg.cmake -DNO_GUI=1 ..
|
||||
- cmake --build . --config Release # build libfluidsynth and fluidsynth exec
|
||||
- cmake --build . --config Release --target check # build and exec unittests
|
||||
|
||||
after_build:
|
||||
- 7z a fluidsynth-vcpkg-%platform%.zip %APPVEYOR_BUILD_FOLDER%\build\src\Release\*
|
||||
|
||||
artifacts:
|
||||
- path: build/fluidsynth-vcpkg-%platform%.zip
|
||||
name: FluidSynth
|
|
@ -1,24 +0,0 @@
|
|||
# C/C++ with GCC
|
||||
# Build your C/C++ project with GCC using make.
|
||||
# Add steps that publish test results, save build artifacts, deploy, and more:
|
||||
# https://docs.microsoft.com/azure/devops/pipelines/apps/c-cpp/gcc
|
||||
|
||||
jobs:
|
||||
- job: macOS
|
||||
pool:
|
||||
vmImage: 'macOS-10.14'
|
||||
steps:
|
||||
- script: |
|
||||
brew update
|
||||
brew install glib gobject-introspection libsndfile pkg-config jack dbus-glib pulseaudio portaudio sdl2
|
||||
displayName: 'Prerequisites'
|
||||
- script: |
|
||||
mkdir build && cd build
|
||||
export PKG_CONFIG_PATH="/usr/local/opt/libffi/lib/pkgconfig"
|
||||
cmake -DCMAKE_INSTALL_PREFIX=$(Build.ArtifactStagingDirectory) -DCMAKE_BUILD_TYPE=Release -DCMAKE_VERBOSE_MAKEFILE=1 -DNO_GUI=1 ..
|
||||
make
|
||||
displayName: 'Compile fluidsynth'
|
||||
- script: |
|
||||
cd build || exit -1
|
||||
make check || exit -1
|
||||
displayName: 'Execute Unittests'
|
203
singe/thirdparty/fluidsynth/.azure-pipelines.yml
vendored
203
singe/thirdparty/fluidsynth/.azure-pipelines.yml
vendored
|
@ -1,203 +0,0 @@
|
|||
# C/C++ with GCC
|
||||
# Build your C/C++ project with GCC using make.
|
||||
# Add steps that publish test results, save build artifacts, deploy, and more:
|
||||
# https://docs.microsoft.com/azure/devops/pipelines/apps/c-cpp/gcc
|
||||
|
||||
jobs:
|
||||
- job: Windows
|
||||
strategy:
|
||||
matrix:
|
||||
XP_x86:
|
||||
platform: Win32
|
||||
toolset: v141_xp
|
||||
gtk-bundle: $(gtk-bundle-x86)
|
||||
libsndfile-url: $(libsndfile-url-x86)
|
||||
artifact-prefix: "fluidsynth"
|
||||
imageName: 'vs2017-win2016'
|
||||
XP_x64:
|
||||
platform: x64
|
||||
toolset: v141_xp
|
||||
gtk-bundle: $(gtk-bundle-x64)
|
||||
libsndfile-url: $(libsndfile-url-x64)
|
||||
artifact-prefix: "fluidsynth"
|
||||
imageName: 'vs2017-win2016'
|
||||
pool:
|
||||
vmImage: $(imageName)
|
||||
steps:
|
||||
- task: DownloadBuildArtifacts@0
|
||||
inputs:
|
||||
buildType: specific
|
||||
# https://dev.azure.com/tommbrt/_apis/projects?api-version=5.0
|
||||
project: 'd3638885-de4a-4ce7-afe7-f237ae461c07'
|
||||
pipeline: 1
|
||||
artifactName: libinstpatch-$(platform)
|
||||
downloadPath: '$(Build.ArtifactStagingDirectory)'
|
||||
displayName: 'Get libinstpatch'
|
||||
- script: |
|
||||
@ECHO ON
|
||||
mkdir d:\deps || exit -1
|
||||
cd d:\deps || exit -1
|
||||
curl -LfsS -o gtk-bundle-dev.zip $(gtk-bundle) || exit -1
|
||||
curl -LfsS -o libsndfile-dev.zip $(libsndfile-url) || exit -1
|
||||
7z x -aos -- gtk-bundle-dev.zip > NUL || exit -1
|
||||
7z x -aos -- libsndfile-dev.zip > NUL || exit -1
|
||||
REM need to fix the naming of libsndfile otherwise the linker won't find it
|
||||
mv lib\libsndfile-1.lib lib\sndfile.lib || exit -1
|
||||
mv lib\libsndfile-1.def lib\sndfile.def || exit -1
|
||||
cd $(Build.ArtifactStagingDirectory)\libinstpatch-$(platform)
|
||||
cp -rf * d:\deps\
|
||||
mv -f * ..
|
||||
cd ..
|
||||
rmdir $(Build.ArtifactStagingDirectory)\libinstpatch-$(platform)\
|
||||
displayName: 'Prerequisites'
|
||||
- script: |
|
||||
@ECHO ON
|
||||
SET "PATH=d:\deps\bin;%PATH%"
|
||||
pkg-config --list-all
|
||||
mkdir build && cd build || exit -1
|
||||
cmake -A $(platform) -T $(toolset) -DCMAKE_INSTALL_PREFIX=$(Build.ArtifactStagingDirectory) -Denable-readline=0 -Denable-floats=1 -DCMAKE_BUILD_TYPE=Release -DCMAKE_VERBOSE_MAKEFILE=1 -DNO_GUI=1 .. || exit -1
|
||||
cmake --build . --config Release || exit -1
|
||||
displayName: 'Compile fluidsynth'
|
||||
- script: |
|
||||
@ECHO ON
|
||||
SET "PATH=d:\deps\bin;%PATH%"
|
||||
cd build || exit -1
|
||||
cmake --build . --config Release --target check || exit -1
|
||||
displayName: 'Execute Unittests'
|
||||
- script: |
|
||||
@ECHO ON
|
||||
cd build
|
||||
cmake --build . --config Release --target install || exit -1
|
||||
del $(Build.ArtifactStagingDirectory)\bin\concrt*.dll
|
||||
del $(Build.ArtifactStagingDirectory)\bin\vcruntime*.dll
|
||||
del $(Build.ArtifactStagingDirectory)\bin\msvcp*.dll
|
||||
del $(Build.ArtifactStagingDirectory)\lib\libinstpatch*.lib
|
||||
del $(Build.ArtifactStagingDirectory)\lib\pkgconfig\libinstpatch*.pc
|
||||
rd $(Build.ArtifactStagingDirectory)\include\libinstpatch-1 /s /q
|
||||
displayName: 'Copy Artifacts'
|
||||
- task: PublishBuildArtifacts@1
|
||||
inputs:
|
||||
pathtoPublish: $(Build.ArtifactStagingDirectory)
|
||||
artifactName: $(artifact-prefix)-$(platform)
|
||||
|
||||
- job: WindowsCI
|
||||
strategy:
|
||||
matrix:
|
||||
default:
|
||||
CMAKE_FLAGS:
|
||||
CMAKE_CONFIG: Release
|
||||
gtk-bundle: $(gtk-bundle-x64)
|
||||
libsndfile-url: $(libsndfile-url-x64)
|
||||
debug_prof:
|
||||
CMAKE_FLAGS: -Denable-profiling=1 -Denable-trap-on-fpe=1 -Denable-fpe-check=1
|
||||
CMAKE_CONFIG: Debug
|
||||
gtk-bundle: $(gtk-bundle-x64)
|
||||
libsndfile-url: $(libsndfile-url-x64)
|
||||
no_network:
|
||||
CMAKE_FLAGS: -Denable-network=0
|
||||
CMAKE_CONFIG: Release
|
||||
gtk-bundle: $(gtk-bundle-x64)
|
||||
libsndfile-url: $(libsndfile-url-x64)
|
||||
static_lib:
|
||||
CMAKE_FLAGS: -DBUILD_SHARED_LIBS=0
|
||||
CMAKE_CONFIG: Release
|
||||
gtk-bundle: $(gtk-bundle-x64)
|
||||
libsndfile-url: $(libsndfile-url-x64)
|
||||
minimal:
|
||||
CMAKE_FLAGS: -Denable-ipv6=0 -Denable-network=0 -Denable-aufile=0 -Denable-dbus=0 -Denable-threads=0 -Denable-winmidi=0 -Denable-waveout=0 -Denable-dsound=0 -Denable-libsndfile=0 -Denable-floats=1
|
||||
CMAKE_CONFIG: Release
|
||||
gtk-bundle: $(gtk-bundle-x64)
|
||||
libsndfile-url: $(libsndfile-url-x64)
|
||||
pool:
|
||||
vmImage: 'windows-2019'
|
||||
steps:
|
||||
- script: |
|
||||
@ECHO ON
|
||||
mkdir d:\deps || exit -1
|
||||
cd d:\deps || exit -1
|
||||
curl -LfsS -o gtk-bundle-dev.zip $(gtk-bundle) || exit -1
|
||||
curl -LfsS -o libsndfile-dev.zip $(libsndfile-url) || exit -1
|
||||
7z x -aos -- gtk-bundle-dev.zip > NUL || exit -1
|
||||
7z x -aos -- libsndfile-dev.zip > NUL || exit -1
|
||||
REM need to fix the naming of libsndfile otherwise the linker won't find it
|
||||
mv lib\libsndfile-1.lib lib\sndfile.lib || exit -1
|
||||
mv lib\libsndfile-1.def lib\sndfile.def || exit -1
|
||||
displayName: 'Prerequisites'
|
||||
- script: |
|
||||
@ECHO ON
|
||||
SET "PATH=d:\deps\bin;%PATH%"
|
||||
mkdir build && cd build || exit -1
|
||||
cmake -A x64 -DCMAKE_BUILD_TYPE=$(CMAKE_CONFIG) -DCMAKE_VERBOSE_MAKEFILE=1 $(CMAKE_FLAGS) -DNO_GUI=1 .. || exit -1
|
||||
cmake --build . --config $(CMAKE_CONFIG) || exit -1
|
||||
displayName: 'Compile fluidsynth'
|
||||
- script: |
|
||||
@ECHO ON
|
||||
SET "PATH=d:\deps\bin;%PATH%"
|
||||
cd build || exit -1
|
||||
cmake --build . --config $(CMAKE_CONFIG) --target check || exit -1
|
||||
displayName: 'Execute Unittests'
|
||||
|
||||
- job: WindowsMinGW
|
||||
strategy:
|
||||
matrix:
|
||||
x86:
|
||||
CMAKE_FLAGS: -DCMAKE_C_FLAGS="-m32"
|
||||
platform: Win32
|
||||
gtk-bundle: $(gtk-bundle-x86)
|
||||
libsndfile-url: $(libsndfile-url-x86)
|
||||
mingw-url: $(mingw-url-x86)
|
||||
x64:
|
||||
CMAKE_FLAGS:
|
||||
platform: x64
|
||||
gtk-bundle: $(gtk-bundle-x64)
|
||||
libsndfile-url: $(libsndfile-url-x64)
|
||||
mingw-url: $(mingw-url-x64)
|
||||
pool:
|
||||
vmImage: 'vs2017-win2016'
|
||||
steps:
|
||||
- task: DownloadBuildArtifacts@0
|
||||
inputs:
|
||||
buildType: specific
|
||||
# https://dev.azure.com/tommbrt/_apis/projects?api-version=5.0
|
||||
project: 'd3638885-de4a-4ce7-afe7-f237ae461c07'
|
||||
pipeline: 1
|
||||
artifactName: libinstpatch-$(platform)
|
||||
downloadPath: '$(Build.ArtifactStagingDirectory)'
|
||||
displayName: 'Get libinstpatch'
|
||||
- script: |
|
||||
@ECHO ON
|
||||
mkdir d:\deps || exit -1
|
||||
cd d:\deps || exit -1
|
||||
curl -LfsS -o gtk-bundle-dev.zip $(gtk-bundle) || exit -1
|
||||
curl -LfsS -o libsndfile-dev.zip $(libsndfile-url) || exit -1
|
||||
curl -LfsS -o mingw.zip $(mingw-url) || exit -1
|
||||
7z x -aos -- gtk-bundle-dev.zip > NUL || exit -1
|
||||
7z x -aos -- libsndfile-dev.zip > NUL || exit -1
|
||||
7z x -aos -- mingw.zip > NUL || exit -1
|
||||
rm *.zip
|
||||
REM need to fix the naming of libsndfile otherwise the linker won't find it
|
||||
mv lib\libsndfile-1.lib lib\sndfile.lib || exit -1
|
||||
mv lib\libsndfile-1.def lib\sndfile.def || exit -1
|
||||
cd mingw*\ && cp -rf * .. && cd .. && rm -rf mingw* || exit -1
|
||||
cd $(Build.ArtifactStagingDirectory)\libinstpatch-$(platform) && cp -rf * d:\deps\ && mv -f * .. && cd .. && rmdir $(Build.ArtifactStagingDirectory)\libinstpatch-$(platform)\ || exit -1
|
||||
displayName: 'Prerequisites'
|
||||
- script: |
|
||||
@ECHO ON
|
||||
SET "PATH=d:\deps\bin;%PATH%"
|
||||
REM remove that path from PATH to make sure sh.exe is not found (cmake will complain otherwise)
|
||||
set PATH=%PATH:C:\Program Files\Git\bin;=%
|
||||
set PATH=%PATH:C:\Program Files\Git\usr\bin;=%
|
||||
pkg-config --list-all
|
||||
mkdir build && cd build || exit -1
|
||||
cmake -G "MinGW Makefiles" -DCMAKE_INSTALL_PREFIX=$(Build.ArtifactStagingDirectory) $(CMAKE_FLAGS) -Denable-readline=0 -DCMAKE_BUILD_TYPE=Release -DCMAKE_VERBOSE_MAKEFILE=1 -DNO_GUI=1 .. || exit -1
|
||||
mingw32-make.exe all || exit -1
|
||||
displayName: 'Compile fluidsynth'
|
||||
- script: |
|
||||
@ECHO ON
|
||||
SET "PATH=d:\deps\bin;%PATH%"
|
||||
REM remove that path from PATH to make sure sh.exe is not found (cmake will complain otherwise)
|
||||
set PATH=%PATH:C:\Program Files\Git\bin;=%
|
||||
set PATH=%PATH:C:\Program Files\Git\usr\bin;=%
|
||||
cd build || exit -1
|
||||
mingw32-make.exe check || exit -1
|
||||
displayName: 'Execute Unittests'
|
55
singe/thirdparty/fluidsynth/.circleci/config.yml
vendored
55
singe/thirdparty/fluidsynth/.circleci/config.yml
vendored
|
@ -1,55 +0,0 @@
|
|||
version: 2.1
|
||||
orbs:
|
||||
android: circleci/android@0.2.0
|
||||
jobs:
|
||||
build:
|
||||
working_directory: ~/code
|
||||
docker:
|
||||
- image: circleci/android:api-29
|
||||
environment:
|
||||
JVM_OPTS: -Xmx3200m
|
||||
steps:
|
||||
- run:
|
||||
name: Setup Git email and user for Cerbero
|
||||
command: git config --global user.email "ci@beatscratch.io" && git config --global user.name "CI testing"
|
||||
- android/install-ndk:
|
||||
ndk-version: android-ndk-r18b
|
||||
ndk-sha: 500679655da3a86aecf67007e8ab230ea9b4dd7b
|
||||
- run:
|
||||
name: Link NDK for Cerbero
|
||||
command: |
|
||||
mkdir -p /home/circleci/android-sdk-linux
|
||||
ln -s /opt/android/android-ndk-r18b /home/circleci/android-sdk-linux/ndk-bundle
|
||||
- run:
|
||||
name: Install FluidSynth build dependencies
|
||||
command: sudo apt-get update && sudo apt-get install autotools-dev automake autoconf libtool g++ autopoint make cmake
|
||||
bison flex yasm pkg-config gtk-doc-tools libxv-dev libx11-dev libpulse-dev
|
||||
python3-dev texinfo gettext build-essential pkg-config doxygen curl libxext-dev
|
||||
libxi-dev x11proto-record-dev libxrender-dev libgl1-mesa-dev libxfixes-dev
|
||||
libxdamage-dev libxcomposite-dev libasound2-dev libxml-simple-perl dpkg-dev
|
||||
debhelper build-essential devscripts fakeroot transfig gperf libdbus-glib-1-dev
|
||||
wget glib-networking libxtst-dev libxrandr-dev libglu1-mesa-dev libegl1-mesa-dev
|
||||
git subversion xutils-dev intltool ccache python3-setuptools autogen maven make
|
||||
- checkout
|
||||
- run:
|
||||
name: Prepare FluidSynth Android
|
||||
working_directory: doc/android
|
||||
command: |
|
||||
make -f Makefile.android prepare
|
||||
- run:
|
||||
name: Build FluidSynth Android
|
||||
working_directory: doc/android
|
||||
command: |
|
||||
make -f Makefile.android
|
||||
- run:
|
||||
name: Show directory contents
|
||||
working_directory: doc/android
|
||||
command: |
|
||||
ls -R
|
||||
- run:
|
||||
name: Zip FluidSnyth Android Distribution
|
||||
working_directory: doc/android
|
||||
command: zip -r android-dist.zip dist
|
||||
- store_artifacts:
|
||||
path: doc/android/android-dist.zip
|
||||
destination: android-dist.zip
|
14
singe/thirdparty/fluidsynth/.cirrus.yml
vendored
14
singe/thirdparty/fluidsynth/.cirrus.yml
vendored
|
@ -1,14 +0,0 @@
|
|||
|
||||
task:
|
||||
name: FreeBSD
|
||||
freebsd_instance:
|
||||
matrix:
|
||||
# There isn't a stable 13.0 image yet (2019-09)
|
||||
image_family: freebsd-13-0-snap
|
||||
image_family: freebsd-12-0
|
||||
image_family: freebsd-10-4
|
||||
|
||||
install_script: pwd && ls -la && pkg install -y cmake glib alsa-lib ladspa portaudio pulseaudio pkgconf sdl2
|
||||
|
||||
compile_script: pwd && ls -la && mkdir $HOME/fluidsynth_install/ && mkdir build && cd build && cmake -DCMAKE_INSTALL_PREFIX=$HOME/fluidsynth_install -Denable-portaudio=1 -Denable-ladspa=1 -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_VERBOSE_MAKEFILE=0 -DNO_GUI=1 .. && make -j4 && make check && make install
|
||||
|
61
singe/thirdparty/fluidsynth/.clang-format
vendored
61
singe/thirdparty/fluidsynth/.clang-format
vendored
|
@ -1,61 +0,0 @@
|
|||
AccessModifierOffset: 0
|
||||
AlignEscapedNewlinesLeft: true
|
||||
AlignTrailingComments: true
|
||||
AllowAllParametersOfDeclarationOnNextLine: false
|
||||
AllowShortFunctionsOnASingleLine: false
|
||||
AllowShortIfStatementsOnASingleLine: false
|
||||
AllowShortLoopsOnASingleLine: false
|
||||
AlwaysBreakBeforeMultilineStrings: false
|
||||
AlwaysBreakTemplateDeclarations: false
|
||||
BinPackArguments: false
|
||||
BinPackParameters: false
|
||||
BreakBeforeBinaryOperators: false
|
||||
BreakBeforeTernaryOperators: false
|
||||
BreakConstructorInitializersBeforeComma: false
|
||||
|
||||
BreakBeforeBraces: Custom
|
||||
BraceWrapping:
|
||||
AfterClass: true
|
||||
AfterControlStatement: true
|
||||
AfterEnum: true
|
||||
AfterFunction: true
|
||||
AfterNamespace: true
|
||||
AfterStruct: true
|
||||
AfterUnion: true
|
||||
BeforeCatch: true
|
||||
BeforeElse: true
|
||||
IndentBraces: false
|
||||
|
||||
ColumnLimit: 100
|
||||
CommentPragmas: ''
|
||||
ConstructorInitializerAllOnOneLineOrOnePerLine: false
|
||||
ConstructorInitializerIndentWidth: 0
|
||||
ContinuationIndentWidth: 0
|
||||
Cpp11BracedListStyle: false
|
||||
DerivePointerAlignment: false
|
||||
IndentCaseLabels: true
|
||||
IndentWidth: 4
|
||||
Language: Cpp
|
||||
MaxEmptyLinesToKeep: 2
|
||||
NamespaceIndentation: All
|
||||
PenaltyBreakBeforeFirstCallParameter: 100
|
||||
PenaltyBreakComment: 100
|
||||
PenaltyBreakFirstLessLess: 0
|
||||
PenaltyBreakString: 100
|
||||
PenaltyExcessCharacter: 1
|
||||
PenaltyReturnTypeOnItsOwnLine: 20
|
||||
SpaceAfterCStyleCast: false
|
||||
SpaceAfterTemplateKeyword: false
|
||||
SpaceBeforeAssignmentOperators: true
|
||||
SpaceBeforeParens: ControlStatements
|
||||
SpaceInEmptyParentheses: false
|
||||
SpacesBeforeTrailingComments: 1
|
||||
SpacesInAngles: false
|
||||
SpacesInCStyleCastParentheses: false
|
||||
SpacesInContainerLiterals: false
|
||||
SpacesInParentheses: false
|
||||
SpacesInSquareBrackets: false
|
||||
SortIncludes: false
|
||||
Standard: Cpp11
|
||||
TabWidth: 4
|
||||
UseTab: Never
|
54
singe/thirdparty/fluidsynth/.clang-tidy
vendored
54
singe/thirdparty/fluidsynth/.clang-tidy
vendored
|
@ -1,54 +0,0 @@
|
|||
---
|
||||
Checks: '-*,clang-diagnostic-*,clang-analyzer-*,-clang-analyzer-security.insecureAPI.strcpy,performance-*,readability-avoid-const-params-in-decls,readability-braces-around-statements,readability-delete-null-pointer,readability-implicit-bool-conversion,readability-misleading-indentation,readability-misplaced-array-index,readability-non-const-parameter,readability-redundant-control-flow,readability-redundant-declaration,readability-redundant-function-ptr-dereference,readability-simplify-boolean-expr'
|
||||
WarningsAsErrors: ''
|
||||
HeaderFilterRegex: ''
|
||||
AnalyzeTemporaryDtors: false
|
||||
FormatStyle: file
|
||||
User: tom
|
||||
CheckOptions:
|
||||
- key: cert-dcl59-cpp.HeaderFileExtensions
|
||||
value: h,hh,hpp,hxx
|
||||
- key: cert-err09-cpp.CheckThrowTemporaries
|
||||
value: '1'
|
||||
- key: cert-err61-cpp.CheckThrowTemporaries
|
||||
value: '1'
|
||||
- key: cert-oop11-cpp.IncludeStyle
|
||||
value: llvm
|
||||
- key: google-readability-braces-around-statements.ShortStatementLines
|
||||
value: '1'
|
||||
- key: google-readability-function-size.StatementThreshold
|
||||
value: '800'
|
||||
- key: google-readability-namespace-comments.ShortNamespaceLines
|
||||
value: '10'
|
||||
- key: google-readability-namespace-comments.SpacesBeforeComments
|
||||
value: '2'
|
||||
- key: modernize-loop-convert.MaxCopySize
|
||||
value: '16'
|
||||
- key: modernize-loop-convert.MinConfidence
|
||||
value: reasonable
|
||||
- key: modernize-loop-convert.NamingStyle
|
||||
value: CamelCase
|
||||
- key: modernize-pass-by-value.IncludeStyle
|
||||
value: llvm
|
||||
- key: modernize-replace-auto-ptr.IncludeStyle
|
||||
value: llvm
|
||||
- key: modernize-use-nullptr.NullMacros
|
||||
value: 'NULL'
|
||||
- key: performance-faster-string-find.StringLikeClasses
|
||||
value: 'std::basic_string'
|
||||
- key: performance-for-range-copy.WarnOnAllAutoCopies
|
||||
value: '0'
|
||||
- key: performance-inefficient-string-concatenation.StrictMode
|
||||
value: '0'
|
||||
- key: performance-type-promotion-in-math-fn.IncludeStyle
|
||||
value: llvm
|
||||
- key: performance-unnecessary-value-param.IncludeStyle
|
||||
value: llvm
|
||||
- key: readability-braces-around-statements.ShortStatementLines
|
||||
value: '0'
|
||||
- key: readability-simplify-boolean-expr.ChainedConditionalAssignment
|
||||
value: '0'
|
||||
- key: readability-simplify-boolean-expr.ChainedConditionalReturn
|
||||
value: '0'
|
||||
...
|
||||
|
|
@ -1,43 +0,0 @@
|
|||
---
|
||||
name: Bug report
|
||||
about: Create a report to help us improve
|
||||
title: ''
|
||||
labels: bug
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
<!-- DO NOT SUBMIT SUPPORT REQUESTS OR "HOW TO" QUESTIONS HERE!
|
||||
Else it might be closed without further notice.
|
||||
|
||||
If you have a question look into our wiki
|
||||
( https://github.com/FluidSynth/fluidsynth/wiki )
|
||||
or the developer resources
|
||||
( http://www.fluidsynth.org/api/ )
|
||||
|
||||
If you still have a question, need support or want to discuss ideas, contact our mailing list:
|
||||
https://lists.nongnu.org/mailman/listinfo/fluid-dev
|
||||
|
||||
Below is a form that shall help getting relevant information for bugs together.
|
||||
We strongly recommend to use it! Feel free to edit or remove inapplicable/unneeded parts.
|
||||
-->
|
||||
|
||||
### FluidSynth version
|
||||
_Execute `fluidsynth --version` and provide the output._
|
||||
|
||||
### Describe the bug
|
||||
_Provide a clear and concise description of the current situation, e.g. how the bug manifests._
|
||||
|
||||
### Expected behavior
|
||||
_Provide a clear and concise description of what you expected to happen._
|
||||
|
||||
### Steps to reproduce
|
||||
_Please explain the steps required to duplicate the issue, esp. if you are able to provide a sample application. E.g. how to start fluidsynth, what shell commands to enter, what midi events to send, etc._
|
||||
|
||||
### Additional context
|
||||
_If you are able to illustrate the bug with an example, please provide simple
|
||||
source code below or as attached file. List any other information that is relevant to your issue, e.g. stack traces, related issues, build logs, suggestions on how to fix, links to related discussions at fluid-dev, etc._
|
||||
|
||||
```
|
||||
insert code snippets, soundfonts or anything relevant here, or attach it as extra file(s) if it's too much
|
||||
```
|
|
@ -1,38 +0,0 @@
|
|||
---
|
||||
name: Feature request
|
||||
about: Suggest a concrete feature
|
||||
title: ''
|
||||
labels: enhancement
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
<!-- DO NOT SUBMIT SUPPORT REQUESTS OR "HOW TO" QUESTIONS HERE!
|
||||
Else it might be closed without further notice.
|
||||
|
||||
If you have a question look into our wiki
|
||||
( https://github.com/FluidSynth/fluidsynth/wiki )
|
||||
or the developer resources
|
||||
( http://www.fluidsynth.org/api/ )
|
||||
|
||||
If you still have a question, need support or want to discuss ideas, contact our mailing list:
|
||||
https://lists.nongnu.org/mailman/listinfo/fluid-dev
|
||||
|
||||
Below is a form that shall help getting relevant information for features together.
|
||||
Feel free to edit or remove inapplicable/unneeded parts.
|
||||
-->
|
||||
|
||||
### Related discussion on the mailing list
|
||||
_Features should be discussed by the community. Historically, our community lives at the mailing list. Bring up your ideas there, before opening tickets. In case you already did that, provide a link to the thread._
|
||||
|
||||
### Is your feature request related to a problem?
|
||||
_A clear and concise description of what the problem is._
|
||||
|
||||
### Describe the solution you'd like
|
||||
_A clear and concise description of what you want to happen._
|
||||
|
||||
### Describe alternatives you've considered
|
||||
_A clear and concise description of any alternative solutions or features you've considered._
|
||||
|
||||
### Additional context
|
||||
_Add any other context or screenshots about the feature request here._
|
|
@ -1,40 +0,0 @@
|
|||
_This issue tracker is only for bug reports and concrete feature requests.
|
||||
DO NOT SUBMIT SUPPORT REQUESTS OR "HOW TO" QUESTIONS HERE!
|
||||
Else it might be closed without further notice._
|
||||
|
||||
_If you have a question look into our wiki
|
||||
( https://github.com/FluidSynth/fluidsynth/wiki )
|
||||
or the developer resources
|
||||
( http://www.fluidsynth.org/api/ )_
|
||||
|
||||
_If you still have a question, need support or want to discuss ideas, contact our mailing list:
|
||||
https://lists.nongnu.org/mailman/listinfo/fluid-dev_
|
||||
|
||||
_Below is a form that shall help getting relevant information for bugs and feature requests together.
|
||||
We strongly recommend to use it! Feel free to edit or remove inapplicable/unneeded parts._
|
||||
|
||||
### FluidSynth version <!-- enter FluidSynths version you're using -->
|
||||
2.0.x
|
||||
|
||||
### Current behavior
|
||||
<!-- Describe the current situation, e.g. how the bug manifests. -->
|
||||
|
||||
### Expected behavior
|
||||
<!-- Describe what the behavior would be without the bug or how the
|
||||
feature request would make your life easier. -->
|
||||
|
||||
### Steps to reproduce
|
||||
<!-- Please explain the steps required to duplicate the issue,
|
||||
esp. if you are able to provide a sample application.
|
||||
E.g. how to start fluidsynth, what shell commands to enter, what midi events to send, etc. -->
|
||||
|
||||
### Other information
|
||||
<!-- If you are able to illustrate the bug or feature request with an example, please provide simple
|
||||
source code below or as attatched file. List any other information that is relevant to your issue:
|
||||
Stack traces,
|
||||
related issues,
|
||||
build logs,
|
||||
suggestions on how to fix,
|
||||
links to related discussions at fluid-dev
|
||||
etc.
|
||||
-->
|
40
singe/thirdparty/fluidsynth/.gitignore
vendored
40
singe/thirdparty/fluidsynth/.gitignore
vendored
|
@ -1,40 +0,0 @@
|
|||
build/
|
||||
|
||||
CMakeCache.txt
|
||||
CMakeFiles
|
||||
Makefile
|
||||
cmake_install.cmake
|
||||
install_manifest.txt
|
||||
|
||||
# Object files
|
||||
*.o
|
||||
*.ko
|
||||
*.obj
|
||||
*.elf
|
||||
|
||||
# Precompiled Headers
|
||||
*.gch
|
||||
*.pch
|
||||
|
||||
# Libraries
|
||||
*.lib
|
||||
*.a
|
||||
*.la
|
||||
*.lo
|
||||
|
||||
# Shared objects (inc. Windows DLLs)
|
||||
*.dll
|
||||
*.so
|
||||
*.so.*
|
||||
*.dylib
|
||||
|
||||
# Executables
|
||||
*.exe
|
||||
*.out
|
||||
*.app
|
||||
*.i*86
|
||||
*.x86_64
|
||||
*.hex
|
||||
|
||||
# ProjectFiles
|
||||
*.pro.user*
|
70
singe/thirdparty/fluidsynth/.travis.yml
vendored
70
singe/thirdparty/fluidsynth/.travis.yml
vendored
|
@ -1,70 +0,0 @@
|
|||
language: c
|
||||
sudo: false
|
||||
os: linux
|
||||
dist: bionic
|
||||
addons:
|
||||
apt:
|
||||
update: true
|
||||
sources:
|
||||
- ubuntu-toolchain-r-test
|
||||
- llvm-toolchain-bionic-7
|
||||
- llvm-toolchain-bionic-8
|
||||
packages:
|
||||
- cmake-data
|
||||
- cmake
|
||||
- libglib2.0-0
|
||||
- libsndfile-dev
|
||||
- libasound2-dev
|
||||
- libjack-dev
|
||||
- portaudio19-dev
|
||||
- libpulse-dev
|
||||
- libdbus-glib-1-dev
|
||||
- ladspa-sdk
|
||||
- libsdl2-dev
|
||||
env:
|
||||
- CMAKE_FLAGS="-Denable-profiling=1"
|
||||
- CMAKE_FLAGS="-Denable-floats=1 -Denable-profiling=1"
|
||||
- CMAKE_FLAGS="-Denable-floats=0"
|
||||
- CMAKE_FLAGS="-Denable-trap-on-fpe=1"
|
||||
- CMAKE_FLAGS="-Denable-fpe-check=1"
|
||||
- CMAKE_FLAGS="-Denable-ipv6=0"
|
||||
- CMAKE_FLAGS="-Denable-network=0"
|
||||
- CMAKE_FLAGS="-Denable-aufile=0"
|
||||
- CMAKE_FLAGS="-DBUILD_SHARED_LIBS=0"
|
||||
|
||||
matrix:
|
||||
include:
|
||||
- arch: arm64
|
||||
env:
|
||||
- MATRIX_EVAL="CC=gcc-7 && CXX=g++-7 && sudo apt-get install gcc-7"
|
||||
|
||||
- env:
|
||||
- MATRIX_EVAL="CC=gcc-8 && CXX=g++-8 && sudo apt-get install gcc-8"
|
||||
- CMAKE_FLAGS="-Denable-debug=1 -DCMAKE_C_FLAGS_DEBUG=-fuse-ld=gold"
|
||||
|
||||
- env:
|
||||
- MATRIX_EVAL="CC=clang-7 && CXX=clang++-7 && sudo apt-get install clang-7"
|
||||
|
||||
- env:
|
||||
- MATRIX_EVAL="CC=clang-8 && CXX=clang++-8 && sudo rm -f /usr/local/clang-7.0.0/bin/clang-tidy && sudo ln -s /usr/bin/clang-tidy-8 /usr/bin/clang-tidy && sudo apt-get install clang-8 clang-tidy-8"
|
||||
- CMAKE_FLAGS="-Denable-profiling=1 -DCMAKE_C_FLAGS_DEBUG=-fuse-ld=gold"
|
||||
|
||||
- os: linux-ppc64le
|
||||
env:
|
||||
- CMAKE_FLAGS=""
|
||||
|
||||
before_install:
|
||||
- eval "${MATRIX_EVAL}"
|
||||
- which clang-tidy || true
|
||||
- ls -la `which clang-tidy` || true
|
||||
- echo $PATH
|
||||
|
||||
before_script:
|
||||
- mkdir $HOME/fluidsynth_install/
|
||||
- mkdir build && cd build
|
||||
|
||||
script:
|
||||
- cmake -DCMAKE_INSTALL_PREFIX=$HOME/fluidsynth_install ${CMAKE_FLAGS} -Denable-portaudio=1 -Denable-ladspa=1 -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_VERBOSE_MAKEFILE=1 -DNO_GUI=1 ..
|
||||
- make -j4
|
||||
- make check
|
||||
- make install # install only on linux, as CMAKE_INSTALL_PREFIX is ignored for frameworks on macosx and I cant tell whether that's correct or a bug.
|
153
singe/thirdparty/fluidsynth/AUTHORS
vendored
153
singe/thirdparty/fluidsynth/AUTHORS
vendored
|
@ -1,153 +0,0 @@
|
|||
[:Team:]
|
||||
Current development team
|
||||
|
||||
Tom Moebert
|
||||
|
||||
|
||||
Former development team
|
||||
|
||||
Josh Green
|
||||
Pedro Lopez-Cabanillas
|
||||
David Henningsson
|
||||
|
||||
|
||||
[:Idea:]
|
||||
|
||||
* Samuel Bianchini, Peter Hanappe and Johnathan Lee
|
||||
|
||||
|
||||
[:Development:]
|
||||
|
||||
Many people contributed to FluidSynth, sent suggestions or bug
|
||||
fixes. The project was started by Peter Hanappe who is the main
|
||||
author. Josh Green is the current maintainer. Below you'll find a
|
||||
summary of contributions.
|
||||
|
||||
|
||||
* Peter Hanappe. Initiated the project. files: stuck his nose in all
|
||||
files.
|
||||
|
||||
* Josh Green is the former maintainer and contributed a lot of code
|
||||
directly or indirectly through the Swami and Smurf code base.
|
||||
The SoundFont loader is completely based on his code. He also wrote
|
||||
the alsa sequencer driver. He made many changes and bug fixes,
|
||||
but above all, he's one of the driving forces behind the synthesizer.
|
||||
He also created the current FluidSynth graphic logo with Blender
|
||||
(the blue waves with FluidSynth letters partially submerged).
|
||||
|
||||
* Markus Nentwig (re-)designed the resonant filter, the chorus, the
|
||||
LADSPA subsystem, the MIDI router, optimized for SSE, made many
|
||||
changes and bug fixes and got the synthesizer to actually work. Most
|
||||
importantly, he used it on stage to make music.
|
||||
|
||||
* S. Christian Collins did much testing of FluidSynth in regards to
|
||||
EMU10K1 compatibility and provided many synthesis fixes in that regard.
|
||||
|
||||
* Stephane Letz from Grame wrote most of the MidiShare driver, all of
|
||||
the PortAudio driver, ported iiwusynth to MacOS X, and sent in many
|
||||
fixes. files: iiwu_midishare.c, iiwu_portaudio.c
|
||||
|
||||
* Antoine Schmitt added the sequencer support, support for sample
|
||||
loading (RAM Sfont), developed the
|
||||
MacroMedia Director Xtra, and send in many many bug reports. Thanks
|
||||
to Antoine, the synthesizer finds its way to multi-media
|
||||
developers. files: in bindings/director/ and iiwu_seq.{c,h},
|
||||
iiwu_event.{c,h}, iiwu_event_priv.h, iiwu_seqbind.{c,h},
|
||||
iiwu_ramsfont.{c,h}
|
||||
|
||||
* Bob Ham added the code for "bank select" MIDI messages and send code
|
||||
to define the synth's ALSA sequencer client name. files:
|
||||
iiwu_midi.c, iiwu_alsa.c, iiwusynth.c, iiwusynth.h.
|
||||
|
||||
* Tim Goetze sent many patches and implemented the all_notes_off. He
|
||||
also sent his code for the new ALSA driver. files: iiwu_synth.c,
|
||||
iiwu_chan.c, iiwu_voice.c, iiwu_alsa.c
|
||||
|
||||
* Norbert Schnell from Ircam's jMax Team wrote most of the jMax/FTS
|
||||
interface in a record time. He also pointed me to the technique of
|
||||
using a lookup table for the interpolation coefficients. file:
|
||||
iiwu_fts.c, iiwu_synth.c
|
||||
|
||||
* The initial alsa driver was based on the jMax alsa driver by
|
||||
Francois Dechelle and his Real-time Team at Ircam
|
||||
(http://www.ircam.fr/jmax). The jMax code was based upon Ardour's
|
||||
alsa_device.cc by Paul Barton-Davis. file: iiwu_alsa.c
|
||||
|
||||
* Code was borrowed from the glib library to the smurf files. The goal was
|
||||
to make iiwusynth independent from any library for maximum
|
||||
portability.
|
||||
|
||||
* David Henningsson added code for fast rendering of MIDI files,
|
||||
rewrote the thread safety for 1.1.2, and fixed many bugs.
|
||||
|
||||
* The midi device uses code from jMax's alsarawmidi.c file and from
|
||||
Smurf's midi_alsaraw.c by Josh Green. file: iiwu_alsa.c
|
||||
|
||||
* The reverb algorithm was written by Jezar
|
||||
(http://www.dreampoint.co.uk). His code is public domain. The code
|
||||
was translated to C by Peter Hanappe. file: iiwu_synth.c
|
||||
|
||||
* The original code for the chorus effect was written by Juergen
|
||||
Mueller and sundry contributors.
|
||||
|
||||
* Bob Ham added LADCCA support.
|
||||
|
||||
* Ebrahim Mayat made big efforts for compiling and running FluidSynth
|
||||
on MacOS X. He also wrote the README-OSX file.
|
||||
|
||||
* Martin Uddén's midi package was used. His files are integrated into
|
||||
the iiwu_midi file. Martin Uddén <nanook@lysator.liu.se> file:
|
||||
iiwu_midi.c
|
||||
|
||||
* Ken Ellinwood send in a patch to add bank offsets to SoundFonts. An
|
||||
adapted version was integrated in the source code. files:
|
||||
fluid_cmd.c, fluidsynth/synth.h, fluid_synth.c.
|
||||
|
||||
* Some interpolation algorihms were used that were found in
|
||||
the music-dsp archives (http://www.smartelectronix.com/musicdsp).
|
||||
They were written by Joshua Scholar and others. file: iiwu_synth.c
|
||||
|
||||
* Macros to {increment,decrement} the 64-bit fixed point phase were
|
||||
borrowed from Mozilla's macros to handle the Long-long type (64-bit
|
||||
signed integer type). Mozilla NSPR library, www.mozilla.org. file:
|
||||
iiwu_phase.h
|
||||
|
||||
* KO Myung-Hun for OS/2 support with Dart audio driver.
|
||||
|
||||
* Pedro Lopez-Cabanillas wrote the CoreMIDI driver for MacOSX, the CMake based
|
||||
build system, revised the doxygen documentation, sequencer examples, fixes.
|
||||
|
||||
* Matt Giuca improved the midi player by letting it load midi files from RAM,
|
||||
and by making it handle EOT events.
|
||||
|
||||
* Tom Moebert (fluidsynth's maintainer since Jun 2017) cleaned up and refactored
|
||||
fluidsynth's API and revised its documentation, added support for 24 bit sample
|
||||
soundfonts, added support for DLS soundfonts, fixed various bugs, implemented
|
||||
unit tests and CI builds for Windows, Linux, MacOSX and BSD.
|
||||
|
||||
* Growing list of individuals who contributed bug fixes, corrections and minor features:
|
||||
Nicolas Boulicault for ALSA sequencer midi.portname setting.
|
||||
Werner Schweer
|
||||
Dave Philips
|
||||
Anthony Green
|
||||
Jake Commander
|
||||
Fernando Pablo Lopez-Lezcano
|
||||
Raoul Bonisch
|
||||
Sergey Pavlishin
|
||||
Eric Van Buggenhaut
|
||||
Ken Ellinwood
|
||||
Takashi Iwai
|
||||
Bob Ham
|
||||
Gerald Pye
|
||||
Rui Nuno Capela
|
||||
Frieder Bürzele
|
||||
Henri Manson
|
||||
Mihail Zenkov
|
||||
Paul Millar
|
||||
Nick Daly
|
||||
David Hilvert
|
||||
Bernat Arlandis i Mañó
|
||||
Sven Meier
|
||||
Marcus Weseloh
|
||||
Jean-jacques Ceresa
|
||||
|
810
singe/thirdparty/fluidsynth/CMakeLists.txt
vendored
810
singe/thirdparty/fluidsynth/CMakeLists.txt
vendored
|
@ -1,810 +0,0 @@
|
|||
# FluidSynth - A Software Synthesizer
|
||||
#
|
||||
# Copyright (C) 2003-2011 Peter Hanappe and others.
|
||||
#
|
||||
# This library is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU Lesser General Public License
|
||||
# as published by the Free Software Foundation; either version 2.1 of
|
||||
# the License, or (at your option) any later version.
|
||||
#
|
||||
# This library is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
# Lesser General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public
|
||||
# License along with this library; if not, write to the Free
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
|
||||
# 02111-1307, USA
|
||||
|
||||
# CMake based build system. Pedro Lopez-Cabanillas <plcl@users.sf.net>
|
||||
|
||||
cmake_minimum_required ( VERSION 3.1.0 ) # because of CMAKE_C_STANDARD
|
||||
project ( FluidSynth C )
|
||||
set ( CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake_admin )
|
||||
|
||||
# FluidSynth package name
|
||||
set ( PACKAGE "fluidsynth" )
|
||||
|
||||
# FluidSynth package version
|
||||
set ( FLUIDSYNTH_VERSION_MAJOR 2 )
|
||||
set ( FLUIDSYNTH_VERSION_MINOR 1 )
|
||||
set ( FLUIDSYNTH_VERSION_MICRO 0 )
|
||||
set ( VERSION "${FLUIDSYNTH_VERSION_MAJOR}.${FLUIDSYNTH_VERSION_MINOR}.${FLUIDSYNTH_VERSION_MICRO}" )
|
||||
set ( FLUIDSYNTH_VERSION "\"${VERSION}\"" )
|
||||
|
||||
# libfluidsynth - Library version
|
||||
# *** NOTICE ***
|
||||
# Update library version upon each release (follow these steps in order)
|
||||
# if any source code changes: REVISION++
|
||||
# if any interfaces added/removed/changed: REVISION=0
|
||||
# if any interfaces removed/changed (compatibility broken): CURRENT++
|
||||
# if any interfaces have been added: AGE++
|
||||
# if any interfaces have been removed/changed (compatibility broken): AGE=0
|
||||
# This is not exactly the same algorithm as the libtool one, but the results are the same.
|
||||
set ( LIB_VERSION_CURRENT 2 )
|
||||
set ( LIB_VERSION_AGE 3 )
|
||||
set ( LIB_VERSION_REVISION 0 )
|
||||
set ( LIB_VERSION_INFO
|
||||
"${LIB_VERSION_CURRENT}.${LIB_VERSION_AGE}.${LIB_VERSION_REVISION}" )
|
||||
|
||||
# Options disabled by default
|
||||
option ( enable-debug "enable debugging (default=no)" off )
|
||||
option ( enable-floats "enable type float instead of double for DSP samples" off )
|
||||
option ( enable-fpe-check "enable Floating Point Exception checks and debug messages" off )
|
||||
option ( enable-portaudio "compile PortAudio support" off )
|
||||
option ( enable-profiling "profile the dsp code" off )
|
||||
option ( enable-trap-on-fpe "enable SIGFPE trap on Floating Point Exceptions" off )
|
||||
option ( enable-ubsan "compile and link against UBSan (for debugging fluidsynth internals)" off )
|
||||
|
||||
# Options enabled by default
|
||||
option ( enable-aufile "compile support for sound file output" on )
|
||||
option ( BUILD_SHARED_LIBS "Build a shared object or DLL" on )
|
||||
option ( enable-dbus "compile DBUS support (if it is available)" on )
|
||||
option ( enable-ipv6 "enable ipv6 support" on )
|
||||
option ( enable-jack "compile JACK support (if it is available)" on )
|
||||
option ( enable-ladspa "enable LADSPA effect units" on )
|
||||
option ( enable-libinstpatch "use libinstpatch (if available) to load DLS and GIG files" on )
|
||||
option ( enable-libsndfile "compile libsndfile support (if it is available)" on )
|
||||
option ( enable-midishare "compile MidiShare support (if it is available)" on )
|
||||
option ( enable-opensles "compile OpenSLES support (if it is available)" off )
|
||||
option ( enable-oboe "compile Oboe support (requires OpenSLES and/or AAudio)" off )
|
||||
option ( enable-network "enable network support (requires BSD sockets)" on )
|
||||
option ( enable-oss "compile OSS support (if it is available)" on )
|
||||
option ( enable-dsound "compile DirectSound support (if it is available)" on )
|
||||
option ( enable-waveout "compile Windows WaveOut support (if it is available)" on )
|
||||
option ( enable-winmidi "compile Windows MIDI support (if it is available)" on )
|
||||
option ( enable-sdl2 "compile SDL2 audio support (if it is available)" on )
|
||||
option ( enable-pkgconfig "use pkg-config to locate fluidsynth's (mostly optional) dependencies" on )
|
||||
option ( enable-pulseaudio "compile PulseAudio support (if it is available)" on )
|
||||
option ( enable-readline "compile readline lib line editing (if it is available)" on )
|
||||
option ( enable-threads "enable multi-threading support (such as parallel voice synthesis)" on )
|
||||
|
||||
# Platform specific options
|
||||
if ( CMAKE_SYSTEM MATCHES "Linux|FreeBSD|DragonFly" )
|
||||
option ( enable-lash "compile LASH support (if it is available)" on )
|
||||
option ( enable-alsa "compile ALSA support (if it is available)" on )
|
||||
endif ( CMAKE_SYSTEM MATCHES "Linux|FreeBSD|DragonFly" )
|
||||
|
||||
if ( CMAKE_SYSTEM MATCHES "Linux" )
|
||||
option ( enable-systemd "compile systemd support (if it is available)" on )
|
||||
endif ( CMAKE_SYSTEM MATCHES "Linux" )
|
||||
|
||||
if ( CMAKE_SYSTEM MATCHES "Darwin" )
|
||||
option ( enable-coreaudio "compile CoreAudio support (if it is available)" on )
|
||||
option ( enable-coremidi "compile CoreMIDI support (if it is available)" on )
|
||||
option ( enable-framework "create a Mac OSX style FluidSynth.framework" on )
|
||||
endif ( CMAKE_SYSTEM MATCHES "Darwin" )
|
||||
|
||||
if ( CMAKE_SYSTEM MATCHES "OS2" )
|
||||
option ( enable-dart "compile DART support (if it is available)" on )
|
||||
set ( enable-ipv6 off )
|
||||
endif ( CMAKE_SYSTEM MATCHES "OS2" )
|
||||
|
||||
# Initialize the library directory name suffix.
|
||||
if (NOT MINGW AND NOT MSVC AND NOT CMAKE_SYSTEM_NAME MATCHES "FreeBSD|DragonFly")
|
||||
if ( CMAKE_SIZEOF_VOID_P EQUAL 8 )
|
||||
set ( _init_lib_suffix "64" )
|
||||
else ( CMAKE_SIZEOF_VOID_P EQUAL 8 )
|
||||
set ( _init_lib_suffix "" )
|
||||
endif ( CMAKE_SIZEOF_VOID_P EQUAL 8 )
|
||||
else ()
|
||||
set ( _init_lib_suffix "" )
|
||||
endif()
|
||||
set ( LIB_SUFFIX ${_init_lib_suffix} CACHE STRING
|
||||
"library directory name suffix (32/64/nothing)" )
|
||||
mark_as_advanced ( LIB_SUFFIX )
|
||||
|
||||
# the default C standard to use for all targets
|
||||
set(CMAKE_C_STANDARD 90)
|
||||
|
||||
# Compile with position independent code if the user requested a shared lib, i.e. no PIC if static requested.
|
||||
# This is cmakes default behavior, but here it's explicitly required due to the use of libfluidsynth-OBJ as object library,
|
||||
# which would otherwise always be compiled without PIC.
|
||||
set ( CMAKE_POSITION_INDEPENDENT_CODE ${BUILD_SHARED_LIBS} )
|
||||
|
||||
# the default global visibility level for all target
|
||||
# no visibility support on OS2
|
||||
if ( NOT OS2 )
|
||||
set ( CMAKE_C_VISIBILITY_PRESET hidden )
|
||||
endif ( NOT OS2 )
|
||||
|
||||
# enforce visibility control for all types of cmake targets
|
||||
if ( POLICY CMP0063 )
|
||||
cmake_policy ( SET CMP0063 NEW )
|
||||
endif ( POLICY CMP0063 )
|
||||
|
||||
# Default install directory names
|
||||
include ( DefaultDirs )
|
||||
|
||||
# Basic C library checks
|
||||
include ( CheckSTDC )
|
||||
include ( CheckIncludeFile )
|
||||
include ( CheckFunctionExists )
|
||||
check_include_file ( string.h HAVE_STRING_H )
|
||||
check_include_file ( stdlib.h HAVE_STDLIB_H )
|
||||
check_include_file ( stdio.h HAVE_STDIO_H )
|
||||
check_include_file ( math.h HAVE_MATH_H )
|
||||
check_include_file ( errno.h HAVE_ERRNO_H )
|
||||
check_include_file ( stdarg.h HAVE_STDARG_H )
|
||||
check_include_file ( unistd.h HAVE_UNISTD_H )
|
||||
check_include_file ( sys/mman.h HAVE_SYS_MMAN_H )
|
||||
check_include_file ( sys/types.h HAVE_SYS_TYPES_H )
|
||||
check_include_file ( sys/time.h HAVE_SYS_TIME_H )
|
||||
check_include_file ( sys/stat.h HAVE_SYS_STAT_H )
|
||||
check_include_file ( fcntl.h HAVE_FCNTL_H )
|
||||
check_include_file ( sys/socket.h HAVE_SYS_SOCKET_H )
|
||||
check_include_file ( netinet/in.h HAVE_NETINET_IN_H )
|
||||
check_include_file ( netinet/tcp.h HAVE_NETINET_TCP_H )
|
||||
check_include_file ( arpa/inet.h HAVE_ARPA_INET_H )
|
||||
check_include_file ( limits.h HAVE_LIMITS_H )
|
||||
check_include_file ( pthread.h HAVE_PTHREAD_H )
|
||||
check_include_file ( signal.h HAVE_SIGNAL_H )
|
||||
check_include_file ( getopt.h HAVE_GETOPT_H )
|
||||
check_include_file ( stdint.h HAVE_STDINT_H )
|
||||
include ( TestInline )
|
||||
include ( TestVLA )
|
||||
include ( TestBigEndian )
|
||||
test_big_endian ( WORDS_BIGENDIAN )
|
||||
|
||||
unset ( LIBFLUID_CPPFLAGS CACHE )
|
||||
unset ( LIBFLUID_LIBS CACHE )
|
||||
unset ( FLUID_CPPFLAGS CACHE )
|
||||
unset ( FLUID_LIBS CACHE )
|
||||
unset ( ENABLE_UBSAN CACHE )
|
||||
|
||||
if ( CMAKE_COMPILER_IS_GNUCC OR CMAKE_C_COMPILER_ID MATCHES "Clang" OR CMAKE_C_COMPILER_ID STREQUAL "Intel" )
|
||||
if ( NOT APPLE AND NOT OS2 )
|
||||
set ( CMAKE_EXE_LINKER_FLAGS
|
||||
"${CMAKE_EXE_LINKER_FLAGS} -Wl,--as-needed" )
|
||||
set ( CMAKE_SHARED_LINKER_FLAGS
|
||||
"${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-undefined" )
|
||||
endif ( NOT APPLE AND NOT OS2 )
|
||||
|
||||
# define some warning flags
|
||||
set ( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -W -Wpointer-arith -Wcast-qual -Wstrict-prototypes -Wno-unused-parameter -Wdeclaration-after-statement -Werror=implicit-function-declaration" )
|
||||
|
||||
# prepend to build type specific flags, to allow users to override
|
||||
set ( CMAKE_C_FLAGS_DEBUG "-g ${CMAKE_C_FLAGS_DEBUG}" )
|
||||
|
||||
if ( CMAKE_C_COMPILER_ID STREQUAL "Intel" )
|
||||
# icc needs the restrict flag to recognize C99 restrict pointers
|
||||
set ( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -restrict" )
|
||||
else () # not intel
|
||||
# gcc and clang support bad function cast and alignment warnings; add them as well.
|
||||
set ( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wbad-function-cast -Wcast-align" )
|
||||
|
||||
if ( enable-ubsan )
|
||||
set ( CMAKE_C_FLAGS "-fsanitize=address,undefined ${CMAKE_C_FLAGS}" )
|
||||
set ( CMAKE_EXE_LINKER_FLAGS "-fsanitize=address,undefined ${CMAKE_EXE_LINKER_FLAGS}" )
|
||||
set ( CMAKE_SHARED_LINKER_FLAGS "-fsanitize=address,undefined ${CMAKE_SHARED_LINKER_FLAGS}" )
|
||||
set ( ENABLE_UBSAN 1 )
|
||||
endif ( enable-ubsan )
|
||||
endif (CMAKE_C_COMPILER_ID STREQUAL "Intel" )
|
||||
endif ( CMAKE_COMPILER_IS_GNUCC OR CMAKE_C_COMPILER_ID MATCHES "Clang" OR CMAKE_C_COMPILER_ID STREQUAL "Intel" )
|
||||
|
||||
# Windows
|
||||
unset ( WINDOWS_LIBS CACHE )
|
||||
unset ( DSOUND_SUPPORT CACHE )
|
||||
unset ( WAVEOUT_SUPPORT CACHE )
|
||||
unset ( WINMIDI_SUPPORT CACHE )
|
||||
unset ( MINGW32 CACHE )
|
||||
if ( WIN32 )
|
||||
include ( CheckIncludeFiles )
|
||||
|
||||
# Check presence of MS include files
|
||||
check_include_file ( windows.h HAVE_WINDOWS_H )
|
||||
check_include_file ( io.h HAVE_IO_H )
|
||||
check_include_file ( dsound.h HAVE_DSOUND_H )
|
||||
check_include_files ( "windows.h;mmsystem.h" HAVE_MMSYSTEM_H )
|
||||
|
||||
if ( enable-network )
|
||||
set ( WINDOWS_LIBS "${WINDOWS_LIBS};ws2_32" )
|
||||
endif ( enable-network )
|
||||
|
||||
if ( enable-dsound AND HAVE_DSOUND_H )
|
||||
set ( WINDOWS_LIBS "${WINDOWS_LIBS};dsound" )
|
||||
set ( DSOUND_SUPPORT 1 )
|
||||
endif ()
|
||||
|
||||
if ( enable-winmidi AND HAVE_MMSYSTEM_H )
|
||||
set ( WINDOWS_LIBS "${WINDOWS_LIBS};winmm" )
|
||||
set ( WINMIDI_SUPPORT 1 )
|
||||
endif ()
|
||||
|
||||
if ( enable-waveout AND HAVE_MMSYSTEM_H )
|
||||
set ( WINDOWS_LIBS "${WINDOWS_LIBS};winmm" )
|
||||
set ( WAVEOUT_SUPPORT 1 )
|
||||
endif ()
|
||||
|
||||
set ( LIBFLUID_CPPFLAGS "-DFLUIDSYNTH_DLL_EXPORTS" )
|
||||
set ( FLUID_CPPFLAGS "-DFLUIDSYNTH_NOT_A_DLL" )
|
||||
if ( MSVC )
|
||||
# statically link in the CRT library to avoid a bunch of runtime DLL dependencies and allow
|
||||
# the CI windows builds to be run under WinXP
|
||||
foreach ( flag_var
|
||||
CMAKE_C_FLAGS
|
||||
CMAKE_C_FLAGS_DEBUG
|
||||
CMAKE_C_FLAGS_RELEASE
|
||||
CMAKE_C_FLAGS_MINSIZEREL
|
||||
CMAKE_C_FLAGS_RELWITHDEBINFO
|
||||
CMAKE_CXX_FLAGS
|
||||
CMAKE_CXX_FLAGS_DEBUG
|
||||
CMAKE_CXX_FLAGS_RELEASE
|
||||
CMAKE_CXX_FLAGS_MINSIZEREL
|
||||
CMAKE_CXX_FLAGS_RELWITHDEBINFO
|
||||
)
|
||||
if ( ${flag_var} MATCHES "/MD" )
|
||||
string ( REGEX REPLACE "/MD" "/MT" ${flag_var} "${${flag_var}}" )
|
||||
endif ( ${flag_var} MATCHES "/MD" )
|
||||
endforeach ( flag_var )
|
||||
|
||||
else ( MSVC )
|
||||
# only set debug postfix if not MSVS building
|
||||
set ( CMAKE_DEBUG_POSTFIX "_debug" )
|
||||
endif ( MSVC )
|
||||
|
||||
# MinGW compiler (a Windows GCC port)
|
||||
if ( MINGW )
|
||||
set ( MINGW32 1 )
|
||||
add_compile_options ( -mms-bitfields )
|
||||
endif ( MINGW )
|
||||
else ( WIN32 )
|
||||
# Check PThreads, but not in Windows
|
||||
find_package ( Threads REQUIRED )
|
||||
set ( LIBFLUID_LIBS "m" ${CMAKE_THREAD_LIBS_INIT} )
|
||||
endif ( WIN32 )
|
||||
|
||||
# IBM OS/2
|
||||
unset ( DART_SUPPORT CACHE )
|
||||
unset ( DART_LIBS CACHE )
|
||||
unset ( DART_INCLUDE_DIRS CACHE )
|
||||
if ( CMAKE_SYSTEM MATCHES "OS2" )
|
||||
set ( CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Zbin-files" )
|
||||
set ( CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Zbin-files" )
|
||||
if ( enable-dart )
|
||||
check_include_files ( "os2.h;os2me.h" HAVE_DART_H )
|
||||
set ( DART_SUPPORT ${HAVE_DART_H} )
|
||||
unset ( DART_INCLUDE_DIRS CACHE )
|
||||
endif ( enable-dart )
|
||||
endif ( CMAKE_SYSTEM MATCHES "OS2" )
|
||||
|
||||
# Solaris / SunOS
|
||||
if ( CMAKE_SYSTEM MATCHES "SunOS" )
|
||||
set ( FLUID_LIBS "${FLUID_LIBS};nsl;socket" )
|
||||
set ( LIBFLUID_LIBS "${LIBFLUID_LIBS};nsl;socket" )
|
||||
endif ( CMAKE_SYSTEM MATCHES "SunOS" )
|
||||
|
||||
# Apple Mac OSX
|
||||
unset ( COREAUDIO_SUPPORT CACHE )
|
||||
unset ( COREAUDIO_LIBS CACHE )
|
||||
unset ( COREMIDI_SUPPORT CACHE )
|
||||
unset ( COREMIDI_LIBS CACHE )
|
||||
unset ( DARWIN CACHE )
|
||||
unset ( MACOSX_FRAMEWORK CACHE )
|
||||
if ( CMAKE_SYSTEM MATCHES "Darwin" )
|
||||
set ( DARWIN 1 )
|
||||
set ( CMAKE_INSTALL_NAME_DIR
|
||||
${CMAKE_INSTALL_PREFIX}/${LIB_INSTALL_DIR} )
|
||||
if ( enable-coreaudio )
|
||||
check_include_file ( CoreAudio/AudioHardware.h COREAUDIO_FOUND )
|
||||
if ( COREAUDIO_FOUND )
|
||||
set ( COREAUDIO_SUPPORT ${COREAUDIO_FOUND} )
|
||||
set ( COREAUDIO_LIBS "-Wl,-framework,CoreAudio,-framework,AudioUnit" )
|
||||
endif ( COREAUDIO_FOUND )
|
||||
endif ( enable-coreaudio )
|
||||
if ( enable-coremidi )
|
||||
check_include_file ( CoreMIDI/MIDIServices.h COREMIDI_FOUND )
|
||||
if ( COREMIDI_FOUND )
|
||||
set ( COREMIDI_SUPPORT ${COREMIDI_FOUND} )
|
||||
set ( COREMIDI_LIBS "-Wl,-framework,CoreMIDI,-framework,CoreServices" )
|
||||
endif ( COREMIDI_FOUND )
|
||||
endif ( enable-coremidi )
|
||||
if ( enable-framework )
|
||||
set ( MACOSX_FRAMEWORK 1 )
|
||||
endif ( enable-framework )
|
||||
endif ( CMAKE_SYSTEM MATCHES "Darwin" )
|
||||
|
||||
|
||||
unset ( HAVE_INETNTOP CACHE )
|
||||
unset ( IPV6_SUPPORT CACHE )
|
||||
CHECK_FUNCTION_EXISTS ( "inet_ntop" HAVE_INETNTOP )
|
||||
if ( enable-ipv6 )
|
||||
if ( HAVE_INETNTOP )
|
||||
set ( IPV6_SUPPORT 1 )
|
||||
endif ( HAVE_INETNTOP )
|
||||
endif ( enable-ipv6 )
|
||||
|
||||
unset ( NETWORK_SUPPORT )
|
||||
if ( enable-network )
|
||||
set ( NETWORK_SUPPORT 1 )
|
||||
endif ( enable-network )
|
||||
|
||||
unset ( WITH_FLOAT CACHE )
|
||||
if ( enable-floats )
|
||||
set ( WITH_FLOAT 1 )
|
||||
endif ( enable-floats )
|
||||
|
||||
unset ( WITH_PROFILING CACHE )
|
||||
if ( enable-profiling )
|
||||
set ( WITH_PROFILING 1 )
|
||||
if ( CMAKE_C_COMPILER_ID STREQUAL "Clang" )
|
||||
set ( OPT_FLAGS "-Rpass=loop-vectorize" ) # -Rpass-analysis=loop-vectorize" )
|
||||
elseif ( CMAKE_C_COMPILER_ID STREQUAL "Intel" )
|
||||
set ( OPT_FLAGS "-qopt-report=3" )
|
||||
elseif ( CMAKE_C_COMPILER_ID STREQUAL "GNU" )
|
||||
set ( OPT_FLAGS "" )
|
||||
endif ( )
|
||||
|
||||
set ( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OPT_FLAGS}" )
|
||||
|
||||
if ( CMAKE_VERSION VERSION_GREATER "3.6.0" )
|
||||
find_program( CLANG_TIDY
|
||||
NAMES "clang-tidy"
|
||||
DOC "Path to clang-tidy executable" )
|
||||
|
||||
if ( CLANG_TIDY )
|
||||
message ( STATUS "Found clang-tidy at ${CLANG_TIDY}" )
|
||||
execute_process ( COMMAND ${CLANG_TIDY} "--version" )
|
||||
set ( CMAKE_C_CLANG_TIDY ${CLANG_TIDY} )
|
||||
endif ( CLANG_TIDY )
|
||||
endif ( CMAKE_VERSION VERSION_GREATER "3.6.0" )
|
||||
|
||||
endif ( enable-profiling )
|
||||
|
||||
unset ( ENABLE_TRAPONFPE CACHE )
|
||||
unset ( TRAP_ON_FPE CACHE )
|
||||
if ( enable-trap-on-fpe AND NOT APPLE AND NOT WIN32 )
|
||||
set ( ENABLE_TRAPONFPE 1 )
|
||||
set ( TRAP_ON_FPE 1 )
|
||||
endif ( enable-trap-on-fpe AND NOT APPLE AND NOT WIN32 )
|
||||
|
||||
unset ( ENABLE_FPECHECK CACHE )
|
||||
unset ( FPE_CHECK CACHE )
|
||||
if ( enable-fpe-check AND NOT APPLE AND NOT WIN32 )
|
||||
set ( ENABLE_FPECHECK 1 )
|
||||
set ( FPE_CHECK 1 )
|
||||
endif ( enable-fpe-check AND NOT APPLE AND NOT WIN32 )
|
||||
|
||||
if ( enable-debug )
|
||||
set ( CMAKE_BUILD_TYPE "Debug" CACHE STRING
|
||||
"Choose the build type, options: Debug Release RelWithDebInfo MinSizeRel" FORCE )
|
||||
endif ( enable-debug )
|
||||
|
||||
if ( NOT CMAKE_BUILD_TYPE )
|
||||
set ( CMAKE_BUILD_TYPE "RelWithDebInfo" CACHE STRING
|
||||
"Choose the build type, options: Debug Release RelWithDebInfo MinSizeRel" FORCE )
|
||||
endif ( NOT CMAKE_BUILD_TYPE )
|
||||
|
||||
unset ( ENABLE_DEBUG CACHE )
|
||||
if ( CMAKE_BUILD_TYPE MATCHES "Debug" )
|
||||
set ( ENABLE_DEBUG 1 )
|
||||
add_definitions(-DDEBUG)
|
||||
endif ( CMAKE_BUILD_TYPE MATCHES "Debug" )
|
||||
|
||||
# Additional targets to perform clang-format/clang-tidy
|
||||
# Get all project files
|
||||
file(GLOB_RECURSE
|
||||
ALL_SOURCE_FILES
|
||||
LIST_DIRECTORIES false
|
||||
${CMAKE_SOURCE_DIR}/*.[chi]
|
||||
${CMAKE_SOURCE_DIR}/*.[chi]pp
|
||||
${CMAKE_SOURCE_DIR}/*.[chi]xx
|
||||
${CMAKE_SOURCE_DIR}/*.cc
|
||||
${CMAKE_SOURCE_DIR}/*.hh
|
||||
${CMAKE_SOURCE_DIR}/*.ii
|
||||
${CMAKE_SOURCE_DIR}/*.[CHI]
|
||||
)
|
||||
|
||||
# Adding clang-format target if executable is found
|
||||
# find_program ( CLANG_FORMAT "clang-format" )
|
||||
# if ( CLANG_FORMAT )
|
||||
# add_custom_target(
|
||||
# clang-format
|
||||
# COMMAND ${CLANG_FORMAT}
|
||||
# -i
|
||||
# -style=file
|
||||
# ${ALL_SOURCE_FILES}
|
||||
# )
|
||||
# endif(CLANG_FORMAT)
|
||||
|
||||
find_program ( ASTYLE "astyle" )
|
||||
if ( ASTYLE )
|
||||
add_custom_target(
|
||||
format
|
||||
COMMAND ${ASTYLE}
|
||||
-A1
|
||||
-xb
|
||||
-j
|
||||
-k3
|
||||
-p
|
||||
-f
|
||||
-n
|
||||
-U
|
||||
${ALL_SOURCE_FILES}
|
||||
)
|
||||
endif(ASTYLE)
|
||||
|
||||
if(NOT enable-pkgconfig)
|
||||
|
||||
FIND_LIBRARY( GLIB_LIB NAMES glib glib-2.0 PATH GLIB_LIBRARY_DIR )
|
||||
FIND_LIBRARY( GTHREAD_LIB NAMES gthread gthread-2.0 PATH GTHREAD_LIBRARY_DIR )
|
||||
FIND_PATH( GLIBH_DIR glib.h PATH GLIB_INCLUDE_DIR )
|
||||
FIND_PATH( GLIBCONF_DIR glibconfig.h PATH GLIBCONF_INCLUDE_DIR )
|
||||
|
||||
IF( GLIB_LIB MATCHES "GLIB_LIB-NOTFOUND" OR
|
||||
GTHREAD_LIB MATCHES "GTHREAD_LIB-NOTFOUND" OR
|
||||
GLIBH_DIR MATCHES "GLIBH_DIR-NOTFOUND" OR
|
||||
GLIBCONF_DIR MATCHES "GLIBCONF_DIR-NOTFOUND")
|
||||
message( WARNING "Not sure if I found GLIB, continuing anyway.")
|
||||
ENDIF()
|
||||
|
||||
SET( GLIB_INCLUDE_DIRS ${GLIBH_DIR} ${GLIBCONF_DIR} )
|
||||
SET( GLIB_LIBRARIES ${GLIB_LIB} ${GTHREAD_LIB} )
|
||||
|
||||
message( STATUS "GLIB_INCLUDE_DIRS: " ${GLIB_INCLUDE_DIRS} )
|
||||
message( STATUS "GLIB_LIBRARIES: " ${GLIB_LIBRARIES} )
|
||||
|
||||
else(NOT enable-pkgconfig)
|
||||
|
||||
find_package ( PkgConfig REQUIRED )
|
||||
|
||||
# Mandatory libraries: glib and gthread
|
||||
pkg_check_modules ( GLIB REQUIRED glib-2.0>=2.6.5 gthread-2.0>=2.6.5 )
|
||||
|
||||
if ( GLIB_glib-2.0_VERSION AND GLIB_glib-2.0_VERSION VERSION_LESS "2.26.0" )
|
||||
message ( WARNING "Your version of glib is very old. This may cause problems with fluidsynth's sample cache on Windows. Consider updating to glib 2.26 or newer!" )
|
||||
endif ( GLIB_glib-2.0_VERSION AND GLIB_glib-2.0_VERSION VERSION_LESS "2.26.0" )
|
||||
|
||||
include ( UnsetPkgConfig )
|
||||
|
||||
# Optional features
|
||||
unset ( LIBSNDFILE_SUPPORT CACHE )
|
||||
unset ( LIBSNDFILE_HASVORBIS CACHE )
|
||||
if ( enable-libsndfile )
|
||||
pkg_check_modules ( LIBSNDFILE sndfile>=1.0.0 )
|
||||
set ( LIBSNDFILE_SUPPORT ${LIBSNDFILE_FOUND} )
|
||||
if ( LIBSNDFILE_SUPPORT )
|
||||
pkg_check_modules ( LIBSNDFILE_VORBIS sndfile>=1.0.18 )
|
||||
set ( LIBSNDFILE_HASVORBIS ${LIBSNDFILE_VORBIS_FOUND} )
|
||||
endif ( LIBSNDFILE_SUPPORT )
|
||||
else ( enable-libsndfile )
|
||||
unset_pkg_config ( LIBSNDFILE )
|
||||
unset_pkg_config ( LIBSNDFILE_VORBIS )
|
||||
endif ( enable-libsndfile )
|
||||
|
||||
unset ( PULSE_SUPPORT CACHE )
|
||||
if ( enable-pulseaudio )
|
||||
pkg_check_modules ( PULSE libpulse-simple>=0.9.8 )
|
||||
set ( PULSE_SUPPORT ${PULSE_FOUND} )
|
||||
else ( enable-pulseaudio )
|
||||
unset_pkg_config ( PULSE )
|
||||
endif ( enable-pulseaudio )
|
||||
|
||||
unset ( ALSA_SUPPORT CACHE )
|
||||
if ( enable-alsa )
|
||||
pkg_check_modules ( ALSA alsa>=0.9.1 )
|
||||
set ( ALSA_SUPPORT ${ALSA_FOUND} )
|
||||
else ( enable-alsa )
|
||||
unset_pkg_config ( ALSA )
|
||||
endif ( enable-alsa )
|
||||
|
||||
unset ( PORTAUDIO_SUPPORT CACHE )
|
||||
if ( enable-portaudio )
|
||||
pkg_check_modules ( PORTAUDIO portaudio-2.0>=19 )
|
||||
set ( PORTAUDIO_SUPPORT ${PORTAUDIO_FOUND} )
|
||||
else ( enable-portaudio )
|
||||
unset_pkg_config ( PORTAUDIO )
|
||||
endif ( enable-portaudio )
|
||||
|
||||
unset ( JACK_SUPPORT CACHE )
|
||||
if ( enable-jack )
|
||||
pkg_check_modules ( JACK jack )
|
||||
set ( JACK_SUPPORT ${JACK_FOUND} )
|
||||
else ( enable-jack )
|
||||
unset_pkg_config ( JACK )
|
||||
endif ( enable-jack )
|
||||
|
||||
unset ( LASH_SUPPORT CACHE )
|
||||
if ( enable-lash )
|
||||
pkg_check_modules ( LASH lash-1.0>=0.3 )
|
||||
if ( LASH_FOUND )
|
||||
set ( LASH_SUPPORT 1 )
|
||||
add_definitions ( -DHAVE_LASH )
|
||||
endif ( LASH_FOUND )
|
||||
else ( enable-lash )
|
||||
unset_pkg_config ( LASH )
|
||||
remove_definitions( -DHAVE_LASH )
|
||||
endif ( enable-lash )
|
||||
|
||||
unset ( SYSTEMD_SUPPORT CACHE )
|
||||
if ( enable-systemd )
|
||||
pkg_check_modules ( SYSTEMD libsystemd )
|
||||
set ( SYSTEMD_SUPPORT ${SYSTEMD_FOUND} )
|
||||
else ( enable-systemd )
|
||||
unset_pkg_config ( SYSTEMD )
|
||||
endif ( enable-systemd )
|
||||
|
||||
unset ( DBUS_SUPPORT CACHE )
|
||||
if ( enable-dbus )
|
||||
pkg_check_modules ( DBUS dbus-1>=1.0.0 )
|
||||
set ( DBUS_SUPPORT ${DBUS_FOUND} )
|
||||
else ( enable-dbus )
|
||||
unset_pkg_config ( DBUS )
|
||||
endif ( enable-dbus )
|
||||
|
||||
unset ( LADSPA_SUPPORT CACHE )
|
||||
if ( enable-ladspa )
|
||||
check_include_file ( ladspa.h LADSPA_SUPPORT )
|
||||
if ( LADSPA_SUPPORT )
|
||||
pkg_check_modules ( GMODULE REQUIRED gmodule-2.0>=2.6.5 )
|
||||
set ( LADSPA 1 )
|
||||
endif ( LADSPA_SUPPORT )
|
||||
endif ( enable-ladspa )
|
||||
|
||||
unset ( LIBINSTPATCH_SUPPORT CACHE )
|
||||
if ( enable-libinstpatch )
|
||||
pkg_check_modules ( LIBINSTPATCH libinstpatch-1.0>=1.1.0 )
|
||||
set ( LIBINSTPATCH_SUPPORT ${LIBINSTPATCH_FOUND} )
|
||||
endif ( enable-libinstpatch )
|
||||
|
||||
unset ( SDL2_SUPPORT CACHE )
|
||||
if ( enable-sdl2 )
|
||||
pkg_check_modules ( SDL2 sdl2 )
|
||||
set ( SDL2_SUPPORT ${SDL2_FOUND} )
|
||||
else ( enable-sdl2 )
|
||||
unset_pkg_config ( SDL2 )
|
||||
endif ( enable-sdl2 )
|
||||
|
||||
endif(NOT enable-pkgconfig)
|
||||
|
||||
unset ( AUFILE_SUPPORT CACHE )
|
||||
if ( enable-aufile )
|
||||
set ( AUFILE_SUPPORT 1 )
|
||||
endif ( enable-aufile )
|
||||
|
||||
unset ( OSS_SUPPORT CACHE )
|
||||
if ( enable-oss )
|
||||
find_package ( OSS QUIET )
|
||||
set ( OSS_SUPPORT ${OSS_FOUND} )
|
||||
endif ( enable-oss )
|
||||
|
||||
unset ( MIDISHARE_SUPPORT CACHE )
|
||||
if ( enable-midishare )
|
||||
find_package ( MidiShare QUIET )
|
||||
set ( MIDISHARE_SUPPORT ${MidiShare_FOUND} )
|
||||
if ( MidiShare_FOUND )
|
||||
set ( MidiShare_LIBS ${MidiShare_LIBRARIES} )
|
||||
else ( MidiShare_FOUND )
|
||||
unset ( MidiShare_LIBS CACHE )
|
||||
endif ( MidiShare_FOUND )
|
||||
else ( enable-midishare )
|
||||
unset ( MidiShare_LIBS CACHE )
|
||||
endif ( enable-midishare )
|
||||
|
||||
unset ( OPENSLES_SUPPORT CACHE )
|
||||
unset ( OpenSLES_LIBS CACHE )
|
||||
if ( enable-opensles )
|
||||
check_include_file ( SLES/OpenSLES.h OPENSLES_SUPPORT )
|
||||
if ( OPENSLES_SUPPORT )
|
||||
find_library ( OpenSLES_LIBS OpenSLES )
|
||||
if ( NOT OpenSLES_LIBS )
|
||||
unset ( OPENSLES_SUPPORT )
|
||||
endif ( NOT OpenSLES_LIBS )
|
||||
endif ( OPENSLES_SUPPORT )
|
||||
endif ( enable-opensles )
|
||||
|
||||
unset ( OBOE_SUPPORT CACHE )
|
||||
unset ( OBOE_LIBS CACHE )
|
||||
if ( enable-oboe )
|
||||
# enable C++ as it's needed for oboe
|
||||
enable_language ( CXX )
|
||||
pkg_check_modules ( OBOE oboe-1.0 )
|
||||
if ( OBOE_FOUND )
|
||||
set ( OBOE_SUPPORT 1 )
|
||||
set ( OBOE_LIBS ${OBOE_LIBRARIES} )
|
||||
endif ( OBOE_FOUND )
|
||||
endif ( enable-oboe )
|
||||
|
||||
unset ( WITH_READLINE CACHE )
|
||||
unset ( READLINE_LIBS CACHE )
|
||||
if ( enable-readline )
|
||||
find_package ( Readline )
|
||||
set ( FOUND_READLINE ${HAVE_READLINE} )
|
||||
if ( HAVE_READLINE )
|
||||
set ( WITH_READLINE 1 )
|
||||
set ( READLINE_LIBS ${READLINE_LIBRARIES} )
|
||||
endif ( HAVE_READLINE )
|
||||
endif ( enable-readline )
|
||||
|
||||
unset ( ENABLE_MIXER_THREADS CACHE )
|
||||
if ( enable-threads )
|
||||
set ( ENABLE_MIXER_THREADS 1 )
|
||||
endif ( enable-threads )
|
||||
|
||||
unset ( HAVE_OPENMP CACHE )
|
||||
find_package ( OpenMP QUIET )
|
||||
if ( OpenMP_FOUND OR OpenMP_C_FOUND )
|
||||
message(STATUS "Found OpenMP ${OpenMP_C_SPEC_DATE}")
|
||||
# require at least OMP 4.0
|
||||
if ( ( NOT OpenMP_C_SPEC_DATE LESS "201307" ) OR NOT ( OpenMP_C_VERSION VERSION_LESS "4.0" ) )
|
||||
set ( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}" )
|
||||
set ( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}" )
|
||||
|
||||
# currently no need to link against openMP runtime lib(s). If need be, uncomment below.
|
||||
# set ( CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${OpenMP_EXE_LINKER_FLAGS}" )
|
||||
# set ( LIBFLUID_LIBS "${OpenMP_C_LIBRARIES};${LIBFLUID_LIBS}" )
|
||||
set ( HAVE_OPENMP 1 )
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# manipulate some variables to setup a proper test env
|
||||
set(TEST_SOUNDFONT "${CMAKE_SOURCE_DIR}/sf2/VintageDreamsWaves-v2.sf2")
|
||||
set(TEST_SOUNDFONT_SF3 "${CMAKE_SOURCE_DIR}/sf2/VintageDreamsWaves-v2.sf3")
|
||||
|
||||
# Check for C99 float math
|
||||
|
||||
unset ( HAVE_SINF CACHE )
|
||||
CHECK_FUNCTION_EXISTS ( "sinf" HAVE_SINF )
|
||||
if ( HAVE_SINF )
|
||||
set ( HAVE_SINF 1 )
|
||||
endif ( HAVE_SINF )
|
||||
|
||||
unset ( HAVE_COSF CACHE )
|
||||
CHECK_FUNCTION_EXISTS ( "cosf" HAVE_COSF )
|
||||
if ( HAVE_COSF )
|
||||
set ( HAVE_COSF 1 )
|
||||
endif ( HAVE_COSF )
|
||||
|
||||
unset ( HAVE_FABSF CACHE )
|
||||
CHECK_FUNCTION_EXISTS ( "fabsf" HAVE_FABSF )
|
||||
if ( HAVE_FABSF )
|
||||
set ( HAVE_FABSF 1 )
|
||||
endif ( HAVE_FABSF )
|
||||
|
||||
unset ( HAVE_POWF CACHE )
|
||||
CHECK_FUNCTION_EXISTS ( "powf" HAVE_POWF )
|
||||
if ( HAVE_POWF )
|
||||
set ( HAVE_POWF 1 )
|
||||
endif ( HAVE_POWF )
|
||||
|
||||
unset ( HAVE_SQRTF CACHE )
|
||||
CHECK_FUNCTION_EXISTS ( "sqrtf" HAVE_SQRTF )
|
||||
if ( HAVE_SQRTF )
|
||||
set ( HAVE_SQRTF 1 )
|
||||
endif ( HAVE_SQRTF )
|
||||
|
||||
unset ( HAVE_LOGF CACHE )
|
||||
CHECK_FUNCTION_EXISTS ( "logf" HAVE_LOGF )
|
||||
if ( HAVE_LOGF )
|
||||
set ( HAVE_LOGF 1 )
|
||||
endif ( HAVE_LOGF )
|
||||
|
||||
# General configuration file
|
||||
configure_file ( ${CMAKE_SOURCE_DIR}/src/config.cmake
|
||||
${CMAKE_BINARY_DIR}/config.h )
|
||||
|
||||
# Setup linker directories NOW, as the command will apply only to targets created after it has been called.
|
||||
link_directories (
|
||||
${GLIB_LIBRARY_DIRS}
|
||||
${LASH_LIBRARY_DIRS}
|
||||
${JACK_LIBRARY_DIRS}
|
||||
${ALSA_LIBRARY_DIRS}
|
||||
${PULSE_LIBRARY_DIRS}
|
||||
${PORTAUDIO_LIBRARY_DIRS}
|
||||
${LIBSNDFILE_LIBRARY_DIRS}
|
||||
${DBUS_LIBRARY_DIRS}
|
||||
${SDL2_LIBRARY_DIRS}
|
||||
${OBOE_LIBRARY_DIRS}
|
||||
)
|
||||
|
||||
# Process subdirectories
|
||||
add_subdirectory ( src )
|
||||
add_subdirectory ( test )
|
||||
add_subdirectory ( doc )
|
||||
|
||||
# pkg-config support
|
||||
set ( prefix "${CMAKE_INSTALL_PREFIX}" )
|
||||
set ( exec_prefix "\${prefix}" )
|
||||
if ( IS_ABSOLUTE "${LIB_INSTALL_DIR}" )
|
||||
set ( libdir "${LIB_INSTALL_DIR}" )
|
||||
else ()
|
||||
set ( libdir "\${exec_prefix}/${LIB_INSTALL_DIR}" )
|
||||
endif ()
|
||||
if ( IS_ABSOLUTE "${INCLUDE_INSTALL_DIR}" )
|
||||
set ( includedir "${INCLUDE_INSTALL_DIR}" )
|
||||
else ()
|
||||
set ( includedir "\${prefix}/${INCLUDE_INSTALL_DIR}" )
|
||||
endif ()
|
||||
configure_file ( fluidsynth.pc.in
|
||||
${CMAKE_BINARY_DIR}/fluidsynth.pc IMMEDIATE @ONLY )
|
||||
install ( FILES ${CMAKE_BINARY_DIR}/fluidsynth.pc
|
||||
DESTINATION ${LIB_INSTALL_DIR}/pkgconfig )
|
||||
|
||||
# Extra targets for Unix build environments
|
||||
if ( UNIX )
|
||||
# RPM spec
|
||||
configure_file ( fluidsynth.spec.in
|
||||
${CMAKE_BINARY_DIR}/fluidsynth.spec IMMEDIATE @ONLY )
|
||||
|
||||
if ( DEFINED FLUID_DAEMON_ENV_FILE)
|
||||
configure_file ( fluidsynth.service.in
|
||||
${CMAKE_BINARY_DIR}/fluidsynth.service @ONLY )
|
||||
|
||||
configure_file ( fluidsynth.conf.in
|
||||
${CMAKE_BINARY_DIR}/fluidsynth.conf @ONLY )
|
||||
|
||||
endif ( DEFINED FLUID_DAEMON_ENV_FILE )
|
||||
|
||||
# uninstall custom target
|
||||
configure_file ( "${CMAKE_SOURCE_DIR}/cmake_admin/cmake_uninstall.cmake.in"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake" IMMEDIATE @ONLY)
|
||||
add_custom_target ( uninstall
|
||||
"${CMAKE_COMMAND}" -P "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake")
|
||||
|
||||
# tarball custom target
|
||||
add_custom_target ( tarball
|
||||
COMMAND mkdir -p ${PACKAGE}-${VERSION}
|
||||
COMMAND cp -r bindings ${PACKAGE}-${VERSION}
|
||||
COMMAND cp -r cmake_admin ${PACKAGE}-${VERSION}
|
||||
COMMAND cp -r doc ${PACKAGE}-${VERSION}
|
||||
COMMAND cp -r include ${PACKAGE}-${VERSION}
|
||||
COMMAND cp -r src ${PACKAGE}-${VERSION}
|
||||
COMMAND cp AUTHORS ChangeLog CMakeLists.txt LICENSE ${PACKAGE}.* INSTALL NEWS README* THANKS TODO ${PACKAGE}-${VERSION}
|
||||
# COMMAND tar -cj --exclude .svn --exclude Makefile.am -f ${PACKAGE}-${VERSION}.tar.bz2 ${PACKAGE}-${VERSION}
|
||||
# COMMAND tar -cz --exclude .svn --exclude Makefile.am -f ${PACKAGE}-${VERSION}.tar.gz ${PACKAGE}-${VERSION}
|
||||
# COMMAND zip -qr ${PACKAGE}-${VERSION}.zip ${PACKAGE}-${VERSION} -x '*.svn*' -x '*Makefile.am'
|
||||
COMMAND tar -cj --exclude .svn -f ${PACKAGE}-${VERSION}.tar.bz2 ${PACKAGE}-${VERSION}
|
||||
COMMAND tar -cz --exclude .svn -f ${PACKAGE}-${VERSION}.tar.gz ${PACKAGE}-${VERSION}
|
||||
COMMAND zip -qr ${PACKAGE}-${VERSION}.zip ${PACKAGE}-${VERSION} -x '*.svn*'
|
||||
COMMAND rm -rf ${PACKAGE}-${VERSION}
|
||||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
|
||||
)
|
||||
|
||||
endif ( UNIX )
|
||||
|
||||
include ( report )
|
||||
|
||||
# CPack support
|
||||
set ( CPACK_PACKAGE_DESCRIPTION_SUMMARY "FluidSynth real-time synthesizer" )
|
||||
set ( CPACK_PACKAGE_VENDOR "fluidsynth.org" )
|
||||
set ( CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_SOURCE_DIR}/README.md" )
|
||||
set ( CPACK_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR}/LICENSE" )
|
||||
set ( CPACK_PACKAGE_VERSION_MAJOR ${FLUIDSYNTH_VERSION_MAJOR} )
|
||||
set ( CPACK_PACKAGE_VERSION_MINOR ${FLUIDSYNTH_VERSION_MINOR} )
|
||||
set ( CPACK_PACKAGE_VERSION_PATCH ${FLUIDSYNTH_VERSION_MICRO} )
|
||||
set ( CPACK_PACKAGE_EXECUTABLES "fluidsynth" "FluidSynth CLI" )
|
||||
|
||||
# source packages
|
||||
set ( CPACK_SOURCE_GENERATOR TGZ;TBZ2;ZIP )
|
||||
set ( CPACK_SOURCE_IGNORE_FILES "/.svn/;/build/;~$;.cproject;.project;/.settings/;${CPACK_SOURCE_IGNORE_FILES}" )
|
||||
set ( CPACK_SOURCE_PACKAGE_FILE_NAME "${PACKAGE}-${VERSION}" )
|
||||
set ( CPACK_SOURCE_STRIP_FILES OFF )
|
||||
|
||||
# binary packages
|
||||
include ( InstallRequiredSystemLibraries )
|
||||
set ( CPACK_GENERATOR STGZ;TGZ;TBZ2;ZIP )
|
||||
set ( CPACK_PACKAGE_NAME ${PACKAGE} )
|
||||
set ( CPACK_STRIP_FILES ON )
|
||||
|
||||
include ( CPack )
|
40
singe/thirdparty/fluidsynth/CONTRIBUTING.md
vendored
40
singe/thirdparty/fluidsynth/CONTRIBUTING.md
vendored
|
@ -1,40 +0,0 @@
|
|||
# Contributing
|
||||
|
||||
Thanks for considering to contribute to FluidSynth. Before implementing
|
||||
any huge new feature, consider bringing up your ideas on our mailing list:
|
||||
https://lists.nongnu.org/mailman/listinfo/fluid-dev
|
||||
|
||||
Contributing can be done by
|
||||
* [submitting pull requests on Github](
|
||||
https://help.github.com/articles/proposing-changes-to-your-work-with-pull-requests/) or
|
||||
* submitting patches to the mailing list.
|
||||
|
||||
Patches should be created with `git format-patch`, so in every case you should be familiar with the basics of git. Make sure you develop against the master branch, i.e. **not** against any FluidSynth release.
|
||||
|
||||
Some things that will increase the chance that your pull request or patch is accepted:
|
||||
|
||||
* Give a reasoning / motivation for any changes or proposals you make.
|
||||
* Follow our style guide.
|
||||
* Keep your commits "atomic".
|
||||
* Write meaningful commit messages.
|
||||
|
||||
## Style Guide
|
||||
|
||||
Find FluidSynth's style guide below. Syntax related issues, like missing braces, can be taken care of by calling `make format` (provided that cmake has found `astyle` on your system).
|
||||
|
||||
#### General
|
||||
* Every function should have a short comment explaining it's purpose
|
||||
* Every public API function **must** be documented with purpose, params and return value
|
||||
* Prefer signed integer types to unsigned ones
|
||||
* Use spaces rather than tabs
|
||||
* Avoid macros
|
||||
|
||||
#### Naming Conventions
|
||||
* Words separated by underscores
|
||||
* Macros always UPPER_CASE
|
||||
* Function and Variable names always lower_case, (e.g. `fluid_componentname_purpose()`)
|
||||
|
||||
#### Bracing
|
||||
* Every block after an if, else, while or for should be enclosed in braces
|
||||
* **Allman-Style** braces everywhere
|
||||
|
1693
singe/thirdparty/fluidsynth/ChangeLog
vendored
1693
singe/thirdparty/fluidsynth/ChangeLog
vendored
File diff suppressed because it is too large
Load diff
504
singe/thirdparty/fluidsynth/LICENSE
vendored
504
singe/thirdparty/fluidsynth/LICENSE
vendored
|
@ -1,504 +0,0 @@
|
|||
GNU LESSER GENERAL PUBLIC LICENSE
|
||||
Version 2.1, February 1999
|
||||
|
||||
Copyright (C) 1991, 1999 Free Software Foundation, Inc.
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
(This is the first released version of the Lesser GPL. It also counts
|
||||
as the successor of the GNU Library Public License, version 2, hence
|
||||
the version number 2.1.)
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
Licenses are intended to guarantee your freedom to share and change
|
||||
free software--to make sure the software is free for all its users.
|
||||
|
||||
This license, the Lesser General Public License, applies to some
|
||||
specially designated software packages--typically libraries--of the
|
||||
Free Software Foundation and other authors who decide to use it. You
|
||||
can use it too, but we suggest you first think carefully about whether
|
||||
this license or the ordinary General Public License is the better
|
||||
strategy to use in any particular case, based on the explanations below.
|
||||
|
||||
When we speak of free software, we are referring to freedom of use,
|
||||
not price. Our General Public Licenses are designed to make sure that
|
||||
you have the freedom to distribute copies of free software (and charge
|
||||
for this service if you wish); that you receive source code or can get
|
||||
it if you want it; that you can change the software and use pieces of
|
||||
it in new free programs; and that you are informed that you can do
|
||||
these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
distributors to deny you these rights or to ask you to surrender these
|
||||
rights. These restrictions translate to certain responsibilities for
|
||||
you if you distribute copies of the library or if you modify it.
|
||||
|
||||
For example, if you distribute copies of the library, whether gratis
|
||||
or for a fee, you must give the recipients all the rights that we gave
|
||||
you. You must make sure that they, too, receive or can get the source
|
||||
code. If you link other code with the library, you must provide
|
||||
complete object files to the recipients, so that they can relink them
|
||||
with the library after making changes to the library and recompiling
|
||||
it. And you must show them these terms so they know their rights.
|
||||
|
||||
We protect your rights with a two-step method: (1) we copyright the
|
||||
library, and (2) we offer you this license, which gives you legal
|
||||
permission to copy, distribute and/or modify the library.
|
||||
|
||||
To protect each distributor, we want to make it very clear that
|
||||
there is no warranty for the free library. Also, if the library is
|
||||
modified by someone else and passed on, the recipients should know
|
||||
that what they have is not the original version, so that the original
|
||||
author's reputation will not be affected by problems that might be
|
||||
introduced by others.
|
||||
|
||||
Finally, software patents pose a constant threat to the existence of
|
||||
any free program. We wish to make sure that a company cannot
|
||||
effectively restrict the users of a free program by obtaining a
|
||||
restrictive license from a patent holder. Therefore, we insist that
|
||||
any patent license obtained for a version of the library must be
|
||||
consistent with the full freedom of use specified in this license.
|
||||
|
||||
Most GNU software, including some libraries, is covered by the
|
||||
ordinary GNU General Public License. This license, the GNU Lesser
|
||||
General Public License, applies to certain designated libraries, and
|
||||
is quite different from the ordinary General Public License. We use
|
||||
this license for certain libraries in order to permit linking those
|
||||
libraries into non-free programs.
|
||||
|
||||
When a program is linked with a library, whether statically or using
|
||||
a shared library, the combination of the two is legally speaking a
|
||||
combined work, a derivative of the original library. The ordinary
|
||||
General Public License therefore permits such linking only if the
|
||||
entire combination fits its criteria of freedom. The Lesser General
|
||||
Public License permits more lax criteria for linking other code with
|
||||
the library.
|
||||
|
||||
We call this license the "Lesser" General Public License because it
|
||||
does Less to protect the user's freedom than the ordinary General
|
||||
Public License. It also provides other free software developers Less
|
||||
of an advantage over competing non-free programs. These disadvantages
|
||||
are the reason we use the ordinary General Public License for many
|
||||
libraries. However, the Lesser license provides advantages in certain
|
||||
special circumstances.
|
||||
|
||||
For example, on rare occasions, there may be a special need to
|
||||
encourage the widest possible use of a certain library, so that it becomes
|
||||
a de-facto standard. To achieve this, non-free programs must be
|
||||
allowed to use the library. A more frequent case is that a free
|
||||
library does the same job as widely used non-free libraries. In this
|
||||
case, there is little to gain by limiting the free library to free
|
||||
software only, so we use the Lesser General Public License.
|
||||
|
||||
In other cases, permission to use a particular library in non-free
|
||||
programs enables a greater number of people to use a large body of
|
||||
free software. For example, permission to use the GNU C Library in
|
||||
non-free programs enables many more people to use the whole GNU
|
||||
operating system, as well as its variant, the GNU/Linux operating
|
||||
system.
|
||||
|
||||
Although the Lesser General Public License is Less protective of the
|
||||
users' freedom, it does ensure that the user of a program that is
|
||||
linked with the Library has the freedom and the wherewithal to run
|
||||
that program using a modified version of the Library.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow. Pay close attention to the difference between a
|
||||
"work based on the library" and a "work that uses the library". The
|
||||
former contains code derived from the library, whereas the latter must
|
||||
be combined with the library in order to run.
|
||||
|
||||
GNU LESSER GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License Agreement applies to any software library or other
|
||||
program which contains a notice placed by the copyright holder or
|
||||
other authorized party saying it may be distributed under the terms of
|
||||
this Lesser General Public License (also called "this License").
|
||||
Each licensee is addressed as "you".
|
||||
|
||||
A "library" means a collection of software functions and/or data
|
||||
prepared so as to be conveniently linked with application programs
|
||||
(which use some of those functions and data) to form executables.
|
||||
|
||||
The "Library", below, refers to any such software library or work
|
||||
which has been distributed under these terms. A "work based on the
|
||||
Library" means either the Library or any derivative work under
|
||||
copyright law: that is to say, a work containing the Library or a
|
||||
portion of it, either verbatim or with modifications and/or translated
|
||||
straightforwardly into another language. (Hereinafter, translation is
|
||||
included without limitation in the term "modification".)
|
||||
|
||||
"Source code" for a work means the preferred form of the work for
|
||||
making modifications to it. For a library, complete source code means
|
||||
all the source code for all modules it contains, plus any associated
|
||||
interface definition files, plus the scripts used to control compilation
|
||||
and installation of the library.
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running a program using the Library is not restricted, and output from
|
||||
such a program is covered only if its contents constitute a work based
|
||||
on the Library (independent of the use of the Library in a tool for
|
||||
writing it). Whether that is true depends on what the Library does
|
||||
and what the program that uses the Library does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Library's
|
||||
complete source code as you receive it, in any medium, provided that
|
||||
you conspicuously and appropriately publish on each copy an
|
||||
appropriate copyright notice and disclaimer of warranty; keep intact
|
||||
all the notices that refer to this License and to the absence of any
|
||||
warranty; and distribute a copy of this License along with the
|
||||
Library.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy,
|
||||
and you may at your option offer warranty protection in exchange for a
|
||||
fee.
|
||||
|
||||
2. You may modify your copy or copies of the Library or any portion
|
||||
of it, thus forming a work based on the Library, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
|
||||
a) The modified work must itself be a software library.
|
||||
|
||||
b) You must cause the files modified to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
c) You must cause the whole of the work to be licensed at no
|
||||
charge to all third parties under the terms of this License.
|
||||
|
||||
d) If a facility in the modified Library refers to a function or a
|
||||
table of data to be supplied by an application program that uses
|
||||
the facility, other than as an argument passed when the facility
|
||||
is invoked, then you must make a good faith effort to ensure that,
|
||||
in the event an application does not supply such function or
|
||||
table, the facility still operates, and performs whatever part of
|
||||
its purpose remains meaningful.
|
||||
|
||||
(For example, a function in a library to compute square roots has
|
||||
a purpose that is entirely well-defined independent of the
|
||||
application. Therefore, Subsection 2d requires that any
|
||||
application-supplied function or table used by this function must
|
||||
be optional: if the application does not supply it, the square
|
||||
root function must still compute square roots.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Library,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Library, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote
|
||||
it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Library.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Library
|
||||
with the Library (or with a work based on the Library) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
3. You may opt to apply the terms of the ordinary GNU General Public
|
||||
License instead of this License to a given copy of the Library. To do
|
||||
this, you must alter all the notices that refer to this License, so
|
||||
that they refer to the ordinary GNU General Public License, version 2,
|
||||
instead of to this License. (If a newer version than version 2 of the
|
||||
ordinary GNU General Public License has appeared, then you can specify
|
||||
that version instead if you wish.) Do not make any other change in
|
||||
these notices.
|
||||
|
||||
Once this change is made in a given copy, it is irreversible for
|
||||
that copy, so the ordinary GNU General Public License applies to all
|
||||
subsequent copies and derivative works made from that copy.
|
||||
|
||||
This option is useful when you wish to copy part of the code of
|
||||
the Library into a program that is not a library.
|
||||
|
||||
4. You may copy and distribute the Library (or a portion or
|
||||
derivative of it, under Section 2) in object code or executable form
|
||||
under the terms of Sections 1 and 2 above provided that you accompany
|
||||
it with the complete corresponding machine-readable source code, which
|
||||
must be distributed under the terms of Sections 1 and 2 above on a
|
||||
medium customarily used for software interchange.
|
||||
|
||||
If distribution of object code is made by offering access to copy
|
||||
from a designated place, then offering equivalent access to copy the
|
||||
source code from the same place satisfies the requirement to
|
||||
distribute the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
5. A program that contains no derivative of any portion of the
|
||||
Library, but is designed to work with the Library by being compiled or
|
||||
linked with it, is called a "work that uses the Library". Such a
|
||||
work, in isolation, is not a derivative work of the Library, and
|
||||
therefore falls outside the scope of this License.
|
||||
|
||||
However, linking a "work that uses the Library" with the Library
|
||||
creates an executable that is a derivative of the Library (because it
|
||||
contains portions of the Library), rather than a "work that uses the
|
||||
library". The executable is therefore covered by this License.
|
||||
Section 6 states terms for distribution of such executables.
|
||||
|
||||
When a "work that uses the Library" uses material from a header file
|
||||
that is part of the Library, the object code for the work may be a
|
||||
derivative work of the Library even though the source code is not.
|
||||
Whether this is true is especially significant if the work can be
|
||||
linked without the Library, or if the work is itself a library. The
|
||||
threshold for this to be true is not precisely defined by law.
|
||||
|
||||
If such an object file uses only numerical parameters, data
|
||||
structure layouts and accessors, and small macros and small inline
|
||||
functions (ten lines or less in length), then the use of the object
|
||||
file is unrestricted, regardless of whether it is legally a derivative
|
||||
work. (Executables containing this object code plus portions of the
|
||||
Library will still fall under Section 6.)
|
||||
|
||||
Otherwise, if the work is a derivative of the Library, you may
|
||||
distribute the object code for the work under the terms of Section 6.
|
||||
Any executables containing that work also fall under Section 6,
|
||||
whether or not they are linked directly with the Library itself.
|
||||
|
||||
6. As an exception to the Sections above, you may also combine or
|
||||
link a "work that uses the Library" with the Library to produce a
|
||||
work containing portions of the Library, and distribute that work
|
||||
under terms of your choice, provided that the terms permit
|
||||
modification of the work for the customer's own use and reverse
|
||||
engineering for debugging such modifications.
|
||||
|
||||
You must give prominent notice with each copy of the work that the
|
||||
Library is used in it and that the Library and its use are covered by
|
||||
this License. You must supply a copy of this License. If the work
|
||||
during execution displays copyright notices, you must include the
|
||||
copyright notice for the Library among them, as well as a reference
|
||||
directing the user to the copy of this License. Also, you must do one
|
||||
of these things:
|
||||
|
||||
a) Accompany the work with the complete corresponding
|
||||
machine-readable source code for the Library including whatever
|
||||
changes were used in the work (which must be distributed under
|
||||
Sections 1 and 2 above); and, if the work is an executable linked
|
||||
with the Library, with the complete machine-readable "work that
|
||||
uses the Library", as object code and/or source code, so that the
|
||||
user can modify the Library and then relink to produce a modified
|
||||
executable containing the modified Library. (It is understood
|
||||
that the user who changes the contents of definitions files in the
|
||||
Library will not necessarily be able to recompile the application
|
||||
to use the modified definitions.)
|
||||
|
||||
b) Use a suitable shared library mechanism for linking with the
|
||||
Library. A suitable mechanism is one that (1) uses at run time a
|
||||
copy of the library already present on the user's computer system,
|
||||
rather than copying library functions into the executable, and (2)
|
||||
will operate properly with a modified version of the library, if
|
||||
the user installs one, as long as the modified version is
|
||||
interface-compatible with the version that the work was made with.
|
||||
|
||||
c) Accompany the work with a written offer, valid for at
|
||||
least three years, to give the same user the materials
|
||||
specified in Subsection 6a, above, for a charge no more
|
||||
than the cost of performing this distribution.
|
||||
|
||||
d) If distribution of the work is made by offering access to copy
|
||||
from a designated place, offer equivalent access to copy the above
|
||||
specified materials from the same place.
|
||||
|
||||
e) Verify that the user has already received a copy of these
|
||||
materials or that you have already sent this user a copy.
|
||||
|
||||
For an executable, the required form of the "work that uses the
|
||||
Library" must include any data and utility programs needed for
|
||||
reproducing the executable from it. However, as a special exception,
|
||||
the materials to be distributed need not include anything that is
|
||||
normally distributed (in either source or binary form) with the major
|
||||
components (compiler, kernel, and so on) of the operating system on
|
||||
which the executable runs, unless that component itself accompanies
|
||||
the executable.
|
||||
|
||||
It may happen that this requirement contradicts the license
|
||||
restrictions of other proprietary libraries that do not normally
|
||||
accompany the operating system. Such a contradiction means you cannot
|
||||
use both them and the Library together in an executable that you
|
||||
distribute.
|
||||
|
||||
7. You may place library facilities that are a work based on the
|
||||
Library side-by-side in a single library together with other library
|
||||
facilities not covered by this License, and distribute such a combined
|
||||
library, provided that the separate distribution of the work based on
|
||||
the Library and of the other library facilities is otherwise
|
||||
permitted, and provided that you do these two things:
|
||||
|
||||
a) Accompany the combined library with a copy of the same work
|
||||
based on the Library, uncombined with any other library
|
||||
facilities. This must be distributed under the terms of the
|
||||
Sections above.
|
||||
|
||||
b) Give prominent notice with the combined library of the fact
|
||||
that part of it is a work based on the Library, and explaining
|
||||
where to find the accompanying uncombined form of the same work.
|
||||
|
||||
8. You may not copy, modify, sublicense, link with, or distribute
|
||||
the Library except as expressly provided under this License. Any
|
||||
attempt otherwise to copy, modify, sublicense, link with, or
|
||||
distribute the Library is void, and will automatically terminate your
|
||||
rights under this License. However, parties who have received copies,
|
||||
or rights, from you under this License will not have their licenses
|
||||
terminated so long as such parties remain in full compliance.
|
||||
|
||||
9. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Library or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Library (or any work based on the
|
||||
Library), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Library or works based on it.
|
||||
|
||||
10. Each time you redistribute the Library (or any work based on the
|
||||
Library), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute, link with or modify the Library
|
||||
subject to these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties with
|
||||
this License.
|
||||
|
||||
11. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Library at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Library by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Library.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under any
|
||||
particular circumstance, the balance of the section is intended to apply,
|
||||
and the section as a whole is intended to apply in other circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
12. If the distribution and/or use of the Library is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Library under this License may add
|
||||
an explicit geographical distribution limitation excluding those countries,
|
||||
so that distribution is permitted only in or among countries not thus
|
||||
excluded. In such case, this License incorporates the limitation as if
|
||||
written in the body of this License.
|
||||
|
||||
13. The Free Software Foundation may publish revised and/or new
|
||||
versions of the Lesser General Public License from time to time.
|
||||
Such new versions will be similar in spirit to the present version,
|
||||
but may differ in detail to address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Library
|
||||
specifies a version number of this License which applies to it and
|
||||
"any later version", you have the option of following the terms and
|
||||
conditions either of that version or of any later version published by
|
||||
the Free Software Foundation. If the Library does not specify a
|
||||
license version number, you may choose any version ever published by
|
||||
the Free Software Foundation.
|
||||
|
||||
14. If you wish to incorporate parts of the Library into other free
|
||||
programs whose distribution conditions are incompatible with these,
|
||||
write to the author to ask for permission. For software which is
|
||||
copyrighted by the Free Software Foundation, write to the Free
|
||||
Software Foundation; we sometimes make exceptions for this. Our
|
||||
decision will be guided by the two goals of preserving the free status
|
||||
of all derivatives of our free software and of promoting the sharing
|
||||
and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
|
||||
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
|
||||
EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
|
||||
OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
|
||||
KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
|
||||
LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
|
||||
THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
|
||||
WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
|
||||
AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
|
||||
FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
|
||||
CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
|
||||
LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
|
||||
RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
|
||||
FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
|
||||
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
|
||||
DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Libraries
|
||||
|
||||
If you develop a new library, and you want it to be of the greatest
|
||||
possible use to the public, we recommend making it free software that
|
||||
everyone can redistribute and change. You can do so by permitting
|
||||
redistribution under these terms (or, alternatively, under the terms of the
|
||||
ordinary General Public License).
|
||||
|
||||
To apply these terms, attach the following notices to the library. It is
|
||||
safest to attach them to the start of each source file to most effectively
|
||||
convey the exclusion of warranty; and each file should have at least the
|
||||
"copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
{description}
|
||||
Copyright (C) {year} {fullname}
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with this library; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
|
||||
USA
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or your
|
||||
school, if any, to sign a "copyright disclaimer" for the library, if
|
||||
necessary. Here is a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the
|
||||
library `Frob' (a library for tweaking knobs) written by James Random
|
||||
Hacker.
|
||||
|
||||
{signature of Ty Coon}, 1 April 1990
|
||||
Ty Coon, President of Vice
|
||||
|
||||
That's all there is to it!
|
115
singe/thirdparty/fluidsynth/README.cmake.md
vendored
115
singe/thirdparty/fluidsynth/README.cmake.md
vendored
|
@ -1,115 +0,0 @@
|
|||
## For users - how to compile FluidSynth
|
||||
|
||||
The latest information on how to compile FluidSynth using the cmake build system can be found in our wiki:
|
||||
|
||||
https://github.com/FluidSynth/fluidsynth/wiki/BuildingWithCMake
|
||||
|
||||
|
||||
## For developers - how to add a new feature to the CMake build system
|
||||
|
||||
Let's explain this issue with an example. We are adding D-Bus support to
|
||||
FluidSynth as an optional feature, conditionally adding source files that
|
||||
require this feature. The first step is to add a macro "option()" to the main
|
||||
CMakeLists.txt file, the one that is located at the fluidsynth root directory.
|
||||
|
||||
file CMakeLists.txt, line 64:
|
||||
|
||||
```cmake
|
||||
option ( enable-dbus "compile DBUS support (if it is available)" on )
|
||||
```
|
||||
|
||||
Now, let's check if the dbus-1 library and headers are installed, using
|
||||
pkg-config:
|
||||
|
||||
file CMakeLists.txt, lines 371-377:
|
||||
|
||||
```cmake
|
||||
unset ( DBUS_SUPPORT CACHE )
|
||||
if ( enable-dbus )
|
||||
pkg_check_modules ( DBUS dbus-1>=1.0.0 )
|
||||
set ( DBUS_SUPPORT ${DBUS_FOUND} )
|
||||
else ( enable-dbus )
|
||||
unset_pkg_config ( DBUS )
|
||||
endif ( enable-dbus )
|
||||
```
|
||||
|
||||
The first line clears the value of the CMake variable DBUS_SUPPORT. If the
|
||||
value of the option "enable-dbus" is true, then the macro pkg_check_modules()
|
||||
is used to test a package named "dbus-1" with version 1.0.0 or later. This macro
|
||||
automatically defines the variables DBUS_LIBRARIES, DBUS_INCLUDEDIR, DBUS_FOUND
|
||||
and others. The value of the last one is assigned to our variable DBUS_SUPPORT
|
||||
for later use.
|
||||
|
||||
There is a report to summarize the performed checks and the enabled features
|
||||
after the configuration steps, so let's add a line in this report regarding
|
||||
the D-Bus support.
|
||||
|
||||
file cmake_admin/report.cmake, lines 14-18:
|
||||
|
||||
```cmake
|
||||
if ( DBUS_SUPPORT )
|
||||
message ( "D-Bus: yes" )
|
||||
else ( DBUS_SUPPORT )
|
||||
message ( "D-Bus: no" )
|
||||
endif ( DBUS_SUPPORT )
|
||||
```
|
||||
|
||||
The variable DBUS_SUPPORT is available for the CMake files, but we want to make
|
||||
it available to the compilers as well, to conditionally build code using
|
||||
"#ifdef DBUS_SUPPORT". This can be done adding a line to the config.cmake file:
|
||||
|
||||
file src/config.cmake, lines 22-23:
|
||||
|
||||
```c
|
||||
/* Define if D-Bus support is enabled */
|
||||
#cmakedefine DBUS_SUPPORT @DBUS_SUPPORT@
|
||||
```
|
||||
|
||||
The file config.cmake will be processed at configure time, producing a header
|
||||
file "config.h" in the build directory with this content, if the dbus support
|
||||
has been enabled and found:
|
||||
|
||||
```c
|
||||
/* Define if D-Bus support is enabled */
|
||||
#define DBUS_SUPPORT 1
|
||||
```
|
||||
|
||||
Finally, we can add the new source files to the build system for the compiler
|
||||
target with the macro add_library(), and the libraries for the linker target
|
||||
with the macros link_directories() and target_link_libraries().
|
||||
|
||||
file src/CMakeLists.txt, lines 57-60
|
||||
|
||||
```cmake
|
||||
if ( DBUS_SUPPORT )
|
||||
set ( fluid_dbus_SOURCES fluid_rtkit.c fluid_rtkit.h )
|
||||
include_directories ( ${DBUS_INCLUDEDIR} ${DBUS_INCLUDE_DIRS} )
|
||||
endif ( DBUS_SUPPORT )
|
||||
```
|
||||
|
||||
file src/CMakeLists.txt, lines 163-197
|
||||
|
||||
```cmake
|
||||
link_directories (
|
||||
...
|
||||
${DBUS_LIBDIR}
|
||||
${DBUS_LIBRARY_DIRS}
|
||||
)
|
||||
|
||||
add_library ( libfluidsynth
|
||||
...
|
||||
${fluid_dbus_SOURCES}
|
||||
...
|
||||
)
|
||||
```
|
||||
|
||||
file src/CMakeLists.txt, lines 163-197
|
||||
|
||||
```cmake
|
||||
target_link_libraries ( libfluidsynth
|
||||
...
|
||||
${DBUS_LIBRARIES}
|
||||
...
|
||||
)
|
||||
```
|
||||
|
99
singe/thirdparty/fluidsynth/README.md
vendored
99
singe/thirdparty/fluidsynth/README.md
vendored
|
@ -1,99 +0,0 @@
|
|||
# FluidSynth
|
||||
|
||||
| Build Status | glib < 2.30 | glib >= 2.30 |
|
||||
|---|---|---|
|
||||
| <img src="https://www.kernel.org/theme/images/logos/tux.png" height="30" alt=""> **Linux** | n.a. | [](https://travis-ci.org/FluidSynth/fluidsynth/branches) |
|
||||
| <img src="https://www.theinquirer.net/w-images/866eae81-b13b-47b5-8180-929943e9dc21/0/daemonhammerfreebsd-580x358.jpg" height="25" alt=""> **FreeBSD** | n.a. | [](https://cirrus-ci.com/github/FluidSynth/fluidsynth) |
|
||||
| <img src="https://www.microsoft.com/windows/favicon.ico" height="25" alt=""> **Windows** | [](https://dev.azure.com/tommbrt/tommbrt/_build/latest?definitionId=3&branchName=master) | [](https://ci.appveyor.com/project/derselbst/fluidsynth-g2ouw/branch/master) |
|
||||
| <img src="https://www.apple.com/favicon.ico" height="30" alt=""> **MacOSX** | n.a. | [](https://dev.azure.com/tommbrt/tommbrt/_build/latest?definitionId=5&branchName=master) |
|
||||
| <img src="https://www.android.com/favicon.ico" height="30" alt=""> **Android** | n.a. | [](https://circleci.com/gh/FluidSynth/fluidsynth) |
|
||||
|
||||
|
||||
|
||||
#### FluidSynth is a cross-platform, real-time software synthesizer based on the Soundfont 2 specification.
|
||||
|
||||
FluidSynth generates audio by reading and handling MIDI events from MIDI input devices by using a [SoundFont](https://github.com/FluidSynth/fluidsynth/wiki/SoundFont). It is the software analogue of a MIDI synthesizer. FluidSynth can also play MIDI files.
|
||||
|
||||
[](https://www.openhub.net/p/fluidsynth)
|
||||
|
||||
## Documentation
|
||||
|
||||
The central place for documentation and further links is our **wiki** here at GitHub:
|
||||
|
||||
**https://github.com/FluidSynth/fluidsynth/wiki**
|
||||
|
||||
If you are missing parts of the documentation, let us know by writing to our mailing list.
|
||||
Of course, you are welcome to edit and improve the wiki yourself. All you need is an account at GitHub. Alternatively, you may send an EMail to our mailing list along with your suggested changes. Further information about the mailing list is available in the wiki as well.
|
||||
|
||||
Latest information about FluidSynth is also available on the web site at http://www.fluidsynth.org/.
|
||||
|
||||
## License
|
||||
|
||||
The source code for FluidSynth is distributed under the terms of the [GNU Lesser General Public License](https://www.gnu.org/licenses/old-licenses/lgpl-2.1.html), see the [LICENSE](https://github.com/FluidSynth/fluidsynth/blob/master/LICENSE) file. To better understand the conditions how FluidSynth can be used in e.g. commercial or closed-source projects, please refer to the [LicensingFAQ in our wiki](https://github.com/FluidSynth/fluidsynth/wiki/LicensingFAQ).
|
||||
|
||||
## Building from source
|
||||
|
||||
For information on how to build FluidSynth from source, please [refer to our wiki](https://github.com/FluidSynth/fluidsynth/wiki/BuildingWithCMake).
|
||||
|
||||
## Links
|
||||
|
||||
- FluidSynth's Home Page, http://www.fluidsynth.org
|
||||
|
||||
- FluidSynth's wiki, https://github.com/FluidSynth/fluidsynth/wiki
|
||||
|
||||
- FluidSynth's API documentation, http://www.fluidsynth.org/api/
|
||||
|
||||
---
|
||||
|
||||
## Historical background
|
||||
|
||||
### Why did we do it
|
||||
|
||||
The synthesizer grew out of a project, started by Samuel Bianchini and
|
||||
Peter Hanappe, and later joined by Johnathan Lee, that aimed at
|
||||
developing a networked multi-user game.
|
||||
|
||||
Sound (and music) was considered a very important part of the game. In
|
||||
addition, users had to be able to extend the game with their own
|
||||
sounds and images. Johnathan Lee proposed to use the Soundfont
|
||||
standard combined with intelligent use of midifiles. The arguments
|
||||
were:
|
||||
|
||||
- Wavetable synthesis is low on CPU usage, it is intuitive and it can
|
||||
produce rich sounds
|
||||
|
||||
- Hardware acceleration is possible if the user owns a Soundfont
|
||||
compatible soundcard (important for games!)
|
||||
|
||||
- MIDI files are small and Soundfont2 files can be made small thru the
|
||||
intelligent use of loops and wavetables. Together, they are easier to
|
||||
downloaded than MP3 or audio files.
|
||||
|
||||
- Graphical editors are available for both file format: various
|
||||
Soundfont editors are available on PC and on Linux (Smurf!), and
|
||||
MIDI sequencers are available on all platforms.
|
||||
|
||||
It seemed like a good combination to use for an (online) game.
|
||||
|
||||
In order to make Soundfonts available on all platforms (Linux, Mac,
|
||||
and Windows) and for all sound cards, we needed a software Soundfont
|
||||
synthesizer. That is why we developed FluidSynth.
|
||||
|
||||
### Design decisions
|
||||
|
||||
The synthesizer was designed to be as self-contained as possible for
|
||||
several reasons:
|
||||
|
||||
- It had to be multi-platform (Linux, macOS, Win32). It was therefore
|
||||
important that the code didn't rely on any platform-specific
|
||||
library.
|
||||
|
||||
- It had to be easy to integrate the synthesizer modules in various
|
||||
environments, as a plugin or as a dynamically loadable object. I
|
||||
wanted to make the synthesizer available as a plugin (jMax, LADSPA,
|
||||
Xmms, WinAmp, Director, ...); develop language bindings (Python,
|
||||
Java, Perl, ...); and integrate it into (game) frameworks (Crystal
|
||||
Space, SDL, ...). For these reasons I've decided it would be easiest
|
||||
if the project stayed very focussed on its goal (a Soundfont
|
||||
synthesizer), stayed small (ideally one file) and didn't dependent
|
||||
on external code.
|
42
singe/thirdparty/fluidsynth/THANKS
vendored
42
singe/thirdparty/fluidsynth/THANKS
vendored
|
@ -1,42 +0,0 @@
|
|||
For the list of authors that contributed to the code, please read the
|
||||
file AUTHORS.
|
||||
|
||||
|
||||
We would like to thank the Fondation Daniel Langlois for their
|
||||
funding. Their help made this project to get of the ground. Without it
|
||||
would simply not exist. Many thanks!
|
||||
(http://www.fondation-langlois.org)
|
||||
|
||||
In alphabetic order:
|
||||
|
||||
Paul Barton-Davis
|
||||
Samuel Bianchini <biank at online dot fr>
|
||||
Raoul Bonisch <jkl345 at gmx dot net>
|
||||
Rui Nuno Capela <rncbc at rncbc dot org>
|
||||
Jake Commander <jakec at ukfirst dot co dot uk>
|
||||
Francois Dechelle <Francois dot Dechelle at ircam dot fr>
|
||||
Ken Ellinwood <kellinwood at yahoo dot com>
|
||||
Tim Goetze <tim at quitte dot de>
|
||||
Anthony Green <green at redhat dot com>
|
||||
Josh Green <jgreen at users dot sourceforge dot net>
|
||||
Bob Ham <bob at ham dot org>
|
||||
Peter Hanappe <peter at hanappe dot com>
|
||||
Jezar <jezar at dreampoint dot co dot uk>
|
||||
Fernando Pablo Lopez-Lezcano <nando at ccrma dot Stanford dot EDU>
|
||||
Johnathan Lee <jlee at music dot columbia dot edu>
|
||||
Stephane Letz <letz at grame dot fr>
|
||||
Ebrahim Mayat <ebmayat at mac dot com>
|
||||
Sven Meier <svenmeier at users dot sourceforge dot net>
|
||||
Juergen Mueller
|
||||
Markus Nentwig <nentwig at users dot sourceforge dot net>
|
||||
David Olofson <david at olofson dot net>
|
||||
Sergey Pavlishin <xlogo at mail dot ru>
|
||||
Dave Phillips
|
||||
Daniel Pressnitzer <pressnit at ircam dot fr>
|
||||
Gerald Pye <mail at edenyard dot co dot uk>
|
||||
Norbert Schnell <Norbert dot Schnell at ircam dot fr>
|
||||
Joshua Scholar
|
||||
Antoine Schmitt <as at gratin dot org>
|
||||
Werner Schweer <ws at seh dot de>
|
||||
Stephan Tassart <Stephan dot Tassart at st dot com>
|
||||
Martin Uddén <nanook at lysator dot liu dot se>
|
70
singe/thirdparty/fluidsynth/TODO
vendored
70
singe/thirdparty/fluidsynth/TODO
vendored
|
@ -1,70 +0,0 @@
|
|||
New features
|
||||
------------
|
||||
- Audio level metering
|
||||
- Active voice count monitoring
|
||||
|
||||
Synthesis
|
||||
---------
|
||||
- Improve voice stealing algorithm
|
||||
- Dynamic voice killing (based on CPU usage)
|
||||
- Batch voice activation (stereo synch. as per SoundFont spec)
|
||||
- Pitch control on stereo samples not managed as should
|
||||
|
||||
Drivers
|
||||
-------
|
||||
- libao audio output driver
|
||||
- Windows DirectMusic component
|
||||
- ASIO driver
|
||||
- DirectSound 3D and EAX
|
||||
|
||||
Bugs to mash
|
||||
------------
|
||||
- Investigate why MIDI rendering causes burst of notes at start
|
||||
|
||||
Validation
|
||||
----------
|
||||
- Validation tests: create soundfont with basic wave forms [sine,
|
||||
square, triangle]; make test midi file; compare with SBLive output;
|
||||
"regression" test
|
||||
- Validate chorus (often sounds rather crappy)
|
||||
- Analyse performance
|
||||
|
||||
Documentation
|
||||
-------------
|
||||
- Write documention on tuning
|
||||
- Add usage scenarios in the documentation
|
||||
- User and system configuration file
|
||||
|
||||
Misc
|
||||
----
|
||||
- Remove dependency of settings on audio driver and other (see
|
||||
fluid_settings_init())
|
||||
- When specifying -i -s (no console and TCP server) log to TCP clients
|
||||
with easier parsable messages ("warning:", "error:", etc)
|
||||
- Pause and resume the synthesizer/audio thread (run synthesizer as a daemon)
|
||||
- set loop on/off on a sample (set_gen GEN_SAMPLEMODE?)
|
||||
|
||||
|
||||
FluidSynth Next Generation
|
||||
--------------------------------------------
|
||||
|
||||
Top of the list
|
||||
- 3D audio output
|
||||
|
||||
MIDI player
|
||||
- Add API to manipulate and query MIDI file list
|
||||
- generalize use of fluid_event_t, remove fluid_midi_event_t
|
||||
|
||||
Shell & command handler
|
||||
- Add "note" command that plays a note with a duration (sequencer)
|
||||
- MIDI file player commands (load/play/stop)
|
||||
- Allow settings to be loaded before the synthesizer is created
|
||||
|
||||
MIDI Specs
|
||||
- sample dump
|
||||
- MIDI thru
|
||||
- Scalable Polyphony MIDI (SP-MIDI)
|
||||
|
||||
|
||||
Unsorted
|
||||
- rewrite midi file using new sequencer
|
|
@ -1,75 +0,0 @@
|
|||
# - Check if the DIR symbol exists like in AC_HEADER_DIRENT.
|
||||
# CHECK_DIRSYMBOL_EXISTS(FILES VARIABLE)
|
||||
#
|
||||
# FILES - include files to check
|
||||
# VARIABLE - variable to return result
|
||||
#
|
||||
# This module is a small but important variation on CheckSymbolExists.cmake.
|
||||
# The symbol always searched for is DIR, and the test programme follows
|
||||
# the AC_HEADER_DIRENT test programme rather than the CheckSymbolExists.cmake
|
||||
# test programme which always fails since DIR tends to be typedef'd
|
||||
# rather than #define'd.
|
||||
#
|
||||
# The following variables may be set before calling this macro to
|
||||
# modify the way the check is run:
|
||||
#
|
||||
# CMAKE_REQUIRED_FLAGS = string of compile command line flags
|
||||
# CMAKE_REQUIRED_DEFINITIONS = list of macros to define (-DFOO=bar)
|
||||
# CMAKE_REQUIRED_INCLUDES = list of include directories
|
||||
# CMAKE_REQUIRED_LIBRARIES = list of libraries to link
|
||||
|
||||
MACRO(CHECK_DIRSYMBOL_EXISTS FILES VARIABLE)
|
||||
IF(NOT DEFINED ${VARIABLE})
|
||||
SET(CMAKE_CONFIGURABLE_FILE_CONTENT "/* */\n")
|
||||
SET(MACRO_CHECK_DIRSYMBOL_EXISTS_FLAGS ${CMAKE_REQUIRED_FLAGS})
|
||||
IF(CMAKE_REQUIRED_LIBRARIES)
|
||||
SET(CHECK_DIRSYMBOL_EXISTS_LIBS
|
||||
"-DLINK_LIBRARIES:STRING=${CMAKE_REQUIRED_LIBRARIES}")
|
||||
ELSE(CMAKE_REQUIRED_LIBRARIES)
|
||||
SET(CHECK_DIRSYMBOL_EXISTS_LIBS)
|
||||
ENDIF(CMAKE_REQUIRED_LIBRARIES)
|
||||
IF(CMAKE_REQUIRED_INCLUDES)
|
||||
SET(CMAKE_DIRSYMBOL_EXISTS_INCLUDES
|
||||
"-DINCLUDE_DIRECTORIES:STRING=${CMAKE_REQUIRED_INCLUDES}")
|
||||
ELSE(CMAKE_REQUIRED_INCLUDES)
|
||||
SET(CMAKE_DIRSYMBOL_EXISTS_INCLUDES)
|
||||
ENDIF(CMAKE_REQUIRED_INCLUDES)
|
||||
FOREACH(FILE ${FILES})
|
||||
SET(CMAKE_CONFIGURABLE_FILE_CONTENT
|
||||
"${CMAKE_CONFIGURABLE_FILE_CONTENT}#include <${FILE}>\n")
|
||||
ENDFOREACH(FILE)
|
||||
SET(CMAKE_CONFIGURABLE_FILE_CONTENT
|
||||
"${CMAKE_CONFIGURABLE_FILE_CONTENT}\nint main()\n{if ((DIR *) 0) return 0;}\n")
|
||||
|
||||
CONFIGURE_FILE("${CMAKE_ROOT}/Modules/CMakeConfigurableFile.in"
|
||||
"${CMAKE_BINARY_DIR}/CMakeFiles/CMakeTmp/CheckDIRSymbolExists.c" @ONLY)
|
||||
|
||||
MESSAGE(STATUS "Looking for DIR in ${FILES}")
|
||||
TRY_COMPILE(${VARIABLE}
|
||||
${CMAKE_BINARY_DIR}
|
||||
${CMAKE_BINARY_DIR}/CMakeFiles/CMakeTmp/CheckDIRSymbolExists.c
|
||||
COMPILE_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS}
|
||||
CMAKE_FLAGS
|
||||
-DCOMPILE_DEFINITIONS:STRING=${MACRO_CHECK_DIRSYMBOL_EXISTS_FLAGS}
|
||||
"${CHECK_DIRSYMBOL_EXISTS_LIBS}"
|
||||
"${CMAKE_DIRSYMBOL_EXISTS_INCLUDES}"
|
||||
OUTPUT_VARIABLE OUTPUT)
|
||||
IF(${VARIABLE})
|
||||
MESSAGE(STATUS "Looking for DIR in ${FILES} - found")
|
||||
SET(${VARIABLE} 1 CACHE INTERNAL "Have symbol DIR")
|
||||
FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeOutput.log
|
||||
"Determining if the DIR symbol is defined as in AC_HEADER_DIRENT "
|
||||
"passed with the following output:\n"
|
||||
"${OUTPUT}\nFile ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeTmp/CheckDIRSymbolExists.c:\n"
|
||||
"${CMAKE_CONFIGURABLE_FILE_CONTENT}\n")
|
||||
ELSE(${VARIABLE})
|
||||
MESSAGE(STATUS "Looking for DIR in ${FILES} - not found.")
|
||||
SET(${VARIABLE} "" CACHE INTERNAL "Have symbol DIR")
|
||||
FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log
|
||||
"Determining if the DIR symbol is defined as in AC_HEADER_DIRENT "
|
||||
"failed with the following output:\n"
|
||||
"${OUTPUT}\nFile ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeTmp/CheckDIRSymbolExists.c:\n"
|
||||
"${CMAKE_CONFIGURABLE_FILE_CONTENT}\n")
|
||||
ENDIF(${VARIABLE})
|
||||
ENDIF(NOT DEFINED ${VARIABLE})
|
||||
ENDMACRO(CHECK_DIRSYMBOL_EXISTS)
|
|
@ -1,41 +0,0 @@
|
|||
# - Check if the prototype for a function exists.
|
||||
# CHECK_PROTOTYPE_EXISTS (FUNCTION HEADER VARIABLE)
|
||||
#
|
||||
# FUNCTION - the name of the function you are looking for
|
||||
# HEADER - the header(s) where the prototype should be declared
|
||||
# VARIABLE - variable to store the result
|
||||
#
|
||||
# The following variables may be set before calling this macro to
|
||||
# modify the way the check is run:
|
||||
#
|
||||
# CMAKE_REQUIRED_FLAGS = string of compile command line flags
|
||||
# CMAKE_REQUIRED_DEFINITIONS = list of macros to define (-DFOO=bar)
|
||||
# CMAKE_REQUIRED_INCLUDES = list of include directories
|
||||
|
||||
# Copyright (c) 2006, Alexander Neundorf, <neundorf@kde.org>
|
||||
#
|
||||
# Redistribution and use is allowed according to the terms of the BSD license.
|
||||
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
|
||||
|
||||
|
||||
INCLUDE(CheckCSourceCompiles)
|
||||
|
||||
MACRO (CHECK_PROTOTYPE_EXISTS _SYMBOL _HEADER _RESULT)
|
||||
SET(_INCLUDE_FILES)
|
||||
FOREACH (it ${_HEADER})
|
||||
SET(_INCLUDE_FILES "${_INCLUDE_FILES}#include <${it}>\n")
|
||||
ENDFOREACH (it)
|
||||
|
||||
SET(_CHECK_PROTO_EXISTS_SOURCE_CODE "
|
||||
${_INCLUDE_FILES}
|
||||
int main()
|
||||
{
|
||||
#ifndef ${_SYMBOL}
|
||||
int i = sizeof(&${_SYMBOL});
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
")
|
||||
|
||||
CHECK_C_SOURCE_COMPILES("${_CHECK_PROTO_EXISTS_SOURCE_CODE}" ${_RESULT})
|
||||
ENDMACRO (CHECK_PROTOTYPE_EXISTS _SYMBOL _HEADER _RESULT)
|
|
@ -1,36 +0,0 @@
|
|||
message(STATUS "Checking whether system has ANSI C header files")
|
||||
include(CheckPrototypeExists)
|
||||
include(CheckIncludeFiles)
|
||||
|
||||
check_include_files("dlfcn.h;stdint.h;stddef.h;inttypes.h;stdlib.h;strings.h;string.h;float.h" StandardHeadersExist)
|
||||
if(StandardHeadersExist)
|
||||
check_prototype_exists(memchr string.h memchrExists)
|
||||
if(memchrExists)
|
||||
check_prototype_exists(free stdlib.h freeExists)
|
||||
if(freeExists)
|
||||
message(STATUS "ANSI C header files - found")
|
||||
set(STDC_HEADERS 1 CACHE INTERNAL "System has ANSI C header files")
|
||||
set(HAVE_STRINGS_H 1)
|
||||
set(HAVE_STRING_H 1)
|
||||
set(HAVE_FLOAT_H 1)
|
||||
set(HAVE_STDLIB_H 1)
|
||||
set(HAVE_STDDEF_H 1)
|
||||
set(HAVE_STDINT_H 1)
|
||||
set(HAVE_INTTYPES_H 1)
|
||||
endif(freeExists)
|
||||
endif(memchrExists)
|
||||
endif(StandardHeadersExist)
|
||||
|
||||
if(NOT STDC_HEADERS)
|
||||
message(STATUS "ANSI C header files - not found")
|
||||
set(STDC_HEADERS 0 CACHE INTERNAL "System has ANSI C header files")
|
||||
endif(NOT STDC_HEADERS)
|
||||
|
||||
check_include_files(unistd.h HAVE_UNISTD_H)
|
||||
|
||||
include(CheckDIRSymbolExists)
|
||||
check_dirsymbol_exists("sys/stat.h;sys/types.h;dirent.h" HAVE_DIRENT_H)
|
||||
if (HAVE_DIRENT_H)
|
||||
set(HAVE_SYS_STAT_H 1)
|
||||
set(HAVE_SYS_TYPES_H 1)
|
||||
endif (HAVE_DIRENT_H)
|
|
@ -1,92 +0,0 @@
|
|||
# Several directory names used by FluidSynth to install files
|
||||
# the variable names are similar to the KDE4 build system
|
||||
|
||||
# DEFAULT_SOUNDFONT - automatically loaded in some use cases
|
||||
if ( WIN32 )
|
||||
set (DEFAULT_SOUNDFONT "C:\\\\soundfonts\\\\default.sf2" CACHE STRING
|
||||
"Default soundfont file")
|
||||
else ( WIN32 )
|
||||
set (DEFAULT_SOUNDFONT "${CMAKE_INSTALL_PREFIX}/share/soundfonts/default.sf2" CACHE STRING
|
||||
"Default soundfont file")
|
||||
endif ( WIN32 )
|
||||
mark_as_advanced (DEFAULT_SOUNDFONT)
|
||||
|
||||
# BUNDLE_INSTALL_DIR - Mac only: the directory for application bundles
|
||||
set (BUNDLE_INSTALL_DIR "/Applications" CACHE STRING
|
||||
"The install dir for application bundles")
|
||||
mark_as_advanced (BUNDLE_INSTALL_DIR)
|
||||
|
||||
# FRAMEWORK_INSTALL_DIR - Mac only: the directory for framework bundles
|
||||
set (FRAMEWORK_INSTALL_DIR "/Library/Frameworks" CACHE STRING
|
||||
"The install dir for framework bundles")
|
||||
mark_as_advanced (FRAMEWORK_INSTALL_DIR)
|
||||
|
||||
# BIN_INSTALL_DIR - the directory where executables will be installed
|
||||
set (BIN_INSTALL_DIR "bin" CACHE STRING "The install dir for executables")
|
||||
mark_as_advanced (BIN_INSTALL_DIR)
|
||||
|
||||
# SBIN_INSTALL_DIR - the directory where system executables will be installed
|
||||
set (SBIN_INSTALL_DIR "sbin" CACHE STRING
|
||||
"The install dir for system executables")
|
||||
mark_as_advanced (SBIN_INSTALL_DIR)
|
||||
|
||||
# LIB_INSTALL_DIR - the directory where libraries will be installed
|
||||
set (LIB_INSTALL_DIR "lib${LIB_SUFFIX}" CACHE STRING "The install dir for libraries")
|
||||
mark_as_advanced (LIB_INSTALL_DIR)
|
||||
|
||||
# INCLUDE_INSTALL_DIR - the install dir for header files
|
||||
set (INCLUDE_INSTALL_DIR "include" CACHE STRING "The install dir for headers")
|
||||
mark_as_advanced (INCLUDE_INSTALL_DIR)
|
||||
|
||||
# DATA_INSTALL_DIR - the base install directory for data files
|
||||
set (DATA_INSTALL_DIR "share" CACHE STRING
|
||||
"The base install dir for data files")
|
||||
mark_as_advanced (DATA_INSTALL_DIR)
|
||||
|
||||
# DOC_INSTALL_DIR - the install dir for documentation
|
||||
set (DOC_INSTALL_DIR "share/doc" CACHE STRING
|
||||
"The install dir for documentation")
|
||||
mark_as_advanced (DOC_INSTALL_DIR)
|
||||
|
||||
# INFO_INSTALL_DIR - the info install dir
|
||||
set (INFO_INSTALL_DIR "share/info" CACHE STRING "The info install dir")
|
||||
mark_as_advanced (INFO_INSTALL_DIR)
|
||||
|
||||
# MAN_INSTALL_DIR - the man pages install dir
|
||||
if ( CMAKE_SYSTEM_NAME MATCHES "FreeBSD|DragonFly")
|
||||
set (MAN_INSTALL_DIR "man/man1" CACHE STRING "The man pages install dir")
|
||||
else()
|
||||
set (MAN_INSTALL_DIR "share/man/man1" CACHE STRING "The man pages install dir")
|
||||
endif()
|
||||
mark_as_advanced (MAN_INSTALL_DIR)
|
||||
|
||||
# SYSCONF_INSTALL_DIR - the config file install dir
|
||||
set (SYSCONF_INSTALL_DIR "/etc" CACHE PATH
|
||||
"The sysconfig install dir")
|
||||
mark_as_advanced (SYSCONF_INSTALL_DIR)
|
||||
|
||||
# XDG_APPS_INSTALL_DIR - the XDG apps dir, where .desktop files are installed
|
||||
set (XDG_APPS_INSTALL_DIR "share/applications" CACHE STRING "The XDG apps dir")
|
||||
mark_as_advanced (XDG_APPS_INSTALL_DIR)
|
||||
|
||||
# XDG_MIME_INSTALL_DIR - the XDG mimetypes install dir
|
||||
set (XDG_MIME_INSTALL_DIR "share/mime/packages" CACHE STRING
|
||||
"The install dir for the xdg mimetypes")
|
||||
mark_as_advanced (XDG_MIME_INSTALL_DIR)
|
||||
|
||||
# DBUS_INTERFACES_INSTALL_DIR - the directory where dbus interfaces are
|
||||
# installed
|
||||
set (DBUS_INTERFACES_INSTALL_DIR "share/dbus-1/interfaces" CACHE STRING
|
||||
"The dbus interfaces install dir")
|
||||
mark_as_advanced (DBUS_INTERFACES_INSTALL_DIR)
|
||||
|
||||
# DBUS_SERVICES_INSTALL_DIR - the directory where dbus services are installed
|
||||
set (DBUS_SERVICES_INSTALL_DIR "share/dbus-1/services" CACHE STRING
|
||||
"The dbus services install dir")
|
||||
mark_as_advanced (DBUS_SERVICES_INSTALL_DIR)
|
||||
|
||||
# DBUS_SYSTEM_SERVICES_INSTALL_DIR - the directory where dbus system services
|
||||
# are installed
|
||||
set (DBUS_SYSTEM_SERVICES_INSTALL_DIR "share/dbus-1/system-services"
|
||||
CACHE STRING "The dbus system services install dir")
|
||||
mark_as_advanced (DBUS_SYSTEM_SERVICES_INSTALL_DIR)
|
|
@ -1,18 +0,0 @@
|
|||
# Try to find the READLINE library
|
||||
# MidiShare_FOUND - system has MidiShare
|
||||
# MidiShare_INCLUDE_DIR - MidiShare include directory
|
||||
# MidiShare_LIBRARIES - Libraries needed to use MidiShare
|
||||
|
||||
if ( MidiShare_INCLUDE_DIR AND MidiShare_LIBRARIES )
|
||||
set ( MidiShare_FIND_QUIETLY TRUE )
|
||||
endif ( MidiShare_INCLUDE_DIR AND MidiShare_LIBRARIES )
|
||||
|
||||
find_path ( MidiShare_INCLUDE_DIR NAMES MidiShare.h )
|
||||
find_library ( MidiShare_LIBRARIES NAMES MidiShare )
|
||||
|
||||
include ( FindPackageHandleStandardArgs )
|
||||
find_package_handle_standard_args( MidiShare DEFAULT_MSG
|
||||
MidiShare_INCLUDE_DIR
|
||||
MidiShare_LIBRARIES )
|
||||
|
||||
mark_as_advanced( MidiShare_INCLUDE_DIR MidiShare_LIBRARIES )
|
|
@ -1,51 +0,0 @@
|
|||
# - Find Oss
|
||||
# Find Oss headers and libraries.
|
||||
#
|
||||
# OSS_INCLUDE_DIR - where to find soundcard.h, etc.
|
||||
# OSS_FOUND - True if Oss found.
|
||||
|
||||
|
||||
FIND_PATH(LINUX_OSS_INCLUDE_DIR "linux/soundcard.h"
|
||||
"/usr/include" "/usr/local/include"
|
||||
)
|
||||
|
||||
FIND_PATH(SYS_OSS_INCLUDE_DIR "sys/soundcard.h"
|
||||
"/usr/include" "/usr/local/include"
|
||||
)
|
||||
|
||||
FIND_PATH(MACHINE_OSS_INCLUDE_DIR "machine/soundcard.h"
|
||||
"/usr/include" "/usr/local/include"
|
||||
)
|
||||
|
||||
SET(OSS_FOUND FALSE)
|
||||
|
||||
|
||||
if ( NOT WIN32 )
|
||||
|
||||
IF(LINUX_OSS_INCLUDE_DIR)
|
||||
SET(OSS_FOUND TRUE)
|
||||
SET(OSS_INCLUDE_DIR ${LINUX_OSS_INCLUDE_DIR})
|
||||
SET(HAVE_LINUX_SOUNDCARD_H 1)
|
||||
ENDIF()
|
||||
|
||||
IF(SYS_OSS_INCLUDE_DIR)
|
||||
SET(OSS_FOUND TRUE)
|
||||
SET(OSS_INCLUDE_DIR ${SYS_OSS_INCLUDE_DIR})
|
||||
SET(HAVE_SYS_SOUNDCARD_H 1)
|
||||
ENDIF()
|
||||
|
||||
IF(MACHINE_OSS_INCLUDE_DIR)
|
||||
SET(OSS_FOUND TRUE)
|
||||
SET(OSS_INCLUDE_DIR ${MACHINE_OSS_INCLUDE_DIR})
|
||||
SET(HAVE_MACHINE_SOUNDCARD_H 1)
|
||||
ENDIF()
|
||||
|
||||
ENDIF(NOT WIN32)
|
||||
|
||||
MARK_AS_ADVANCED (
|
||||
OSS_FOUND
|
||||
OSS_INCLUDE_DIR
|
||||
LINUX_OSS_INCLUDE_DIR
|
||||
SYS_OSS_INCLUDE_DIR
|
||||
MACHINE_OSS_INCLUDE_DIR
|
||||
)
|
|
@ -1,22 +0,0 @@
|
|||
# Try to find the READLINE library
|
||||
# HAVE_READLINE - system has READLINE
|
||||
# READLINE_INCLUDE_DIR - READLINE include directory
|
||||
# READLINE_LIBRARIES - Libraries needed to use READLINE
|
||||
|
||||
if ( READLINE_INCLUDE_DIR AND READLINE_LIBRARIES )
|
||||
set ( READLINE_FIND_QUIETLY TRUE )
|
||||
endif ( READLINE_INCLUDE_DIR AND READLINE_LIBRARIES )
|
||||
|
||||
find_path ( READLINE_INCLUDE_DIR NAMES history.h readline/history.h )
|
||||
find_library ( READLINE_LIBRARIES NAMES readline )
|
||||
|
||||
if ( READLINE_INCLUDE_DIR AND READLINE_LIBRARIES )
|
||||
set ( HAVE_READLINE TRUE CACHE BOOL "Found readline header and lib" FORCE )
|
||||
endif ( READLINE_INCLUDE_DIR AND READLINE_LIBRARIES )
|
||||
|
||||
include ( FindPackageHandleStandardArgs )
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS( READLINE DEFAULT_MSG
|
||||
READLINE_INCLUDE_DIR
|
||||
READLINE_LIBRARIES )
|
||||
|
||||
mark_as_advanced( READLINE_INCLUDE_DIR READLINE_LIBRARIES HAVE_READLINE )
|
|
@ -1,28 +0,0 @@
|
|||
macro ( ADD_FLUID_TEST _test )
|
||||
ADD_EXECUTABLE(${_test} ${_test}.c $<TARGET_OBJECTS:libfluidsynth-OBJ> )
|
||||
|
||||
# only build this unit test when explicitly requested by "make check"
|
||||
set_target_properties(${_test} PROPERTIES EXCLUDE_FROM_ALL TRUE)
|
||||
|
||||
# import necessary compile flags and dependency libraries
|
||||
if ( FLUID_CPPFLAGS )
|
||||
set_target_properties ( ${_test} PROPERTIES COMPILE_FLAGS ${FLUID_CPPFLAGS} )
|
||||
endif ( FLUID_CPPFLAGS )
|
||||
TARGET_LINK_LIBRARIES(${_test} $<TARGET_PROPERTY:libfluidsynth,INTERFACE_LINK_LIBRARIES>)
|
||||
|
||||
# use the local include path to look for fluidsynth.h, as we cannot be sure fluidsynth is already installed
|
||||
target_include_directories(${_test}
|
||||
PUBLIC
|
||||
$<BUILD_INTERFACE:${CMAKE_BINARY_DIR}/include> # include auto generated headers
|
||||
$<BUILD_INTERFACE:${CMAKE_SOURCE_DIR}/include> # include "normal" public (sub-)headers
|
||||
$<BUILD_INTERFACE:${CMAKE_SOURCE_DIR}/src> # include private headers
|
||||
$<TARGET_PROPERTY:libfluidsynth,INCLUDE_DIRECTORIES> # include all other header search paths needed by libfluidsynth (esp. glib)
|
||||
)
|
||||
|
||||
# add the test to ctest
|
||||
ADD_TEST(NAME ${_test} COMMAND ${_test})
|
||||
|
||||
# append the current unit test to check-target as dependency
|
||||
add_dependencies(check ${_test})
|
||||
|
||||
endmacro ( ADD_FLUID_TEST )
|
|
@ -1,15 +0,0 @@
|
|||
include ( CheckCSourceCompiles )
|
||||
foreach ( _keyword "inline" "__inline__" "__inline" )
|
||||
if ( NOT INLINE_KEYWORD )
|
||||
set ( CMAKE_REQUIRED_DEFINITIONS "-DTESTKEYWORD=${_keyword}" )
|
||||
check_c_source_compiles (
|
||||
"typedef int foo_t;
|
||||
static TESTKEYWORD foo_t static_foo(){return 0;}
|
||||
foo_t foo(){return 0;}
|
||||
int main(int argc, char *argv[]){return 0;}"
|
||||
_have_${_keyword} )
|
||||
if ( _have_${_keyword} )
|
||||
set ( INLINE_KEYWORD ${_keyword} )
|
||||
endif ( _have_${_keyword} )
|
||||
endif ( NOT INLINE_KEYWORD )
|
||||
endforeach ( _keyword )
|
|
@ -1,9 +0,0 @@
|
|||
include ( CheckCSourceCompiles )
|
||||
if ( NOT SUPPORTS_VLA )
|
||||
check_c_source_compiles (
|
||||
"int main(int argc, char *argv[]){int arr[argc]; return 0;}"
|
||||
_have_vla )
|
||||
if ( _have_vla )
|
||||
set ( SUPPORTS_VLA 1 )
|
||||
endif ( _have_vla )
|
||||
endif ( NOT SUPPORTS_VLA )
|
|
@ -1,14 +0,0 @@
|
|||
macro ( unset_pkg_config _prefix )
|
||||
unset ( ${_prefix}_VERSION CACHE )
|
||||
unset ( ${_prefix}_PREFIX CACHE )
|
||||
unset ( ${_prefix}_CFLAGS CACHE )
|
||||
unset ( ${_prefix}_CFLAGS_OTHER CACHE )
|
||||
unset ( ${_prefix}_LDFLAGS CACHE )
|
||||
unset ( ${_prefix}_LDFLAGS_OTHER CACHE )
|
||||
unset ( ${_prefix}_LIBRARIES CACHE )
|
||||
unset ( ${_prefix}_INCLUDEDIR CACHE )
|
||||
unset ( ${_prefix}_INCLUDE_DIRS CACHE )
|
||||
unset ( ${_prefix}_LIBDIR CACHE )
|
||||
unset ( ${_prefix}_LIBRARY_DIRS CACHE )
|
||||
unset ( __pkg_config_checked_${_prefix} CACHE )
|
||||
endmacro ( unset_pkg_config )
|
|
@ -1,79 +0,0 @@
|
|||
#pragma once
|
||||
|
||||
#ifndef PRODUCT_VERSION_MAJOR
|
||||
#define PRODUCT_VERSION_MAJOR @PRODUCT_VERSION_MAJOR@
|
||||
#endif
|
||||
|
||||
#ifndef PRODUCT_VERSION_MINOR
|
||||
#define PRODUCT_VERSION_MINOR @PRODUCT_VERSION_MINOR@
|
||||
#endif
|
||||
|
||||
#ifndef PRODUCT_VERSION_PATCH
|
||||
#define PRODUCT_VERSION_PATCH @PRODUCT_VERSION_PATCH@
|
||||
#endif
|
||||
|
||||
#ifndef PRODUCT_VERSION_BUILD
|
||||
#define PRODUCT_VERSION_BUILD @PRODUCT_VERSION_REVISION@
|
||||
#endif
|
||||
|
||||
#ifndef FILE_VERSION_MAJOR
|
||||
#define FILE_VERSION_MAJOR @PRODUCT_VERSION_MAJOR@
|
||||
#endif
|
||||
|
||||
#ifndef FILE_VERSION_MINOR
|
||||
#define FILE_VERSION_MINOR @PRODUCT_VERSION_MINOR@
|
||||
#endif
|
||||
|
||||
#ifndef FILE_VERSION_PATCH
|
||||
#define FILE_VERSION_PATCH @PRODUCT_VERSION_PATCH@
|
||||
#endif
|
||||
|
||||
#ifndef FILE_VERSION_BUILD
|
||||
#define FILE_VERSION_BUILD @PRODUCT_VERSION_REVISION@
|
||||
#endif
|
||||
|
||||
#ifndef __TO_STRING
|
||||
#define __TO_STRING_IMPL(x) #x
|
||||
#define __TO_STRING(x) __TO_STRING_IMPL(x)
|
||||
#endif
|
||||
|
||||
#define PRODUCT_VERSION_MAJOR_MINOR_STR __TO_STRING(PRODUCT_VERSION_MAJOR) "." __TO_STRING(PRODUCT_VERSION_MINOR)
|
||||
#define PRODUCT_VERSION_MAJOR_MINOR_PATCH_STR PRODUCT_VERSION_MAJOR_MINOR_STR "." __TO_STRING(PRODUCT_VERSION_PATCH)
|
||||
#define PRODUCT_VERSION_FULL_STR PRODUCT_VERSION_MAJOR_MINOR_PATCH_STR "." __TO_STRING(PRODUCT_VERSION_BUILD)
|
||||
#define PRODUCT_VERSION_RESOURCE PRODUCT_VERSION_MAJOR,PRODUCT_VERSION_MINOR,PRODUCT_VERSION_PATCH,PRODUCT_VERSION_BUILD
|
||||
#define PRODUCT_VERSION_RESOURCE_STR PRODUCT_VERSION_FULL_STR "\0"
|
||||
|
||||
#define FILE_VERSION_MAJOR_MINOR_STR __TO_STRING(FILE_VERSION_MAJOR) "." __TO_STRING(FILE_VERSION_MINOR)
|
||||
#define FILE_VERSION_MAJOR_MINOR_PATCH_STR FILE_VERSION_MAJOR_MINOR_STR "." __TO_STRING(FILE_VERSION_PATCH)
|
||||
#define FILE_VERSION_FULL_STR FILE_VERSION_MAJOR_MINOR_PATCH_STR "." __TO_STRING(FILE_VERSION_BUILD)
|
||||
#define FILE_VERSION_RESOURCE FILE_VERSION_MAJOR,FILE_VERSION_MINOR,FILE_VERSION_PATCH,FILE_VERSION_BUILD
|
||||
#define FILE_VERSION_RESOURCE_STR FILE_VERSION_FULL_STR "\0"
|
||||
|
||||
#ifndef PRODUCT_COMMENTS
|
||||
#define PRODUCT_COMMENTS "@PRODUCT_COMMENTS@\0"
|
||||
#endif
|
||||
|
||||
#ifndef PRODUCT_COMPANY_NAME
|
||||
#define PRODUCT_COMPANY_NAME "@PRODUCT_COMPANY_NAME@\0"
|
||||
#endif
|
||||
|
||||
#ifndef PRODUCT_COMPANY_COPYRIGHT
|
||||
#define PRODUCT_COMPANY_COPYRIGHT "@PRODUCT_COMPANY_COPYRIGHT@\0"
|
||||
#endif
|
||||
|
||||
#ifndef PRODUCT_FILE_DESCRIPTION
|
||||
#define PRODUCT_FILE_DESCRIPTION "@PRODUCT_FILE_DESCRIPTION@\0"
|
||||
#endif
|
||||
|
||||
#ifndef PRODUCT_INTERNAL_NAME
|
||||
#define PRODUCT_INTERNAL_NAME "@PRODUCT_NAME@\0"
|
||||
#endif
|
||||
|
||||
#ifndef PRODUCT_ORIGINAL_FILENAME
|
||||
#define PRODUCT_ORIGINAL_FILENAME "@PRODUCT_ORIGINAL_FILENAME@\0"
|
||||
#endif
|
||||
|
||||
#ifndef PRODUCT_BUNDLE
|
||||
#define PRODUCT_BUNDLE "@PRODUCT_BUNDLE@\0"
|
||||
#endif
|
||||
|
|
@ -1,37 +0,0 @@
|
|||
#include "VersionInfo.h"
|
||||
#include "winver.h"
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION FILE_VERSION_RESOURCE
|
||||
PRODUCTVERSION PRODUCT_VERSION_RESOURCE
|
||||
FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
|
||||
#ifdef _DEBUG
|
||||
FILEFLAGS 0x1L
|
||||
#else
|
||||
FILEFLAGS 0x0L
|
||||
#endif
|
||||
FILEOS VOS__WINDOWS32
|
||||
FILETYPE VFT_DLL
|
||||
FILESUBTYPE VFT2_UNKNOWN
|
||||
BEGIN
|
||||
BLOCK "StringFileInfo"
|
||||
BEGIN
|
||||
BLOCK "040904E4"
|
||||
BEGIN
|
||||
VALUE "Comments", PRODUCT_COMMENTS
|
||||
VALUE "CompanyName", PRODUCT_COMPANY_NAME
|
||||
VALUE "FileDescription", PRODUCT_FILE_DESCRIPTION
|
||||
VALUE "FileVersion", FILE_VERSION_RESOURCE_STR
|
||||
VALUE "InternalName", PRODUCT_INTERNAL_NAME
|
||||
VALUE "LegalCopyright", PRODUCT_COMPANY_COPYRIGHT
|
||||
VALUE "OriginalFilename", PRODUCT_ORIGINAL_FILENAME
|
||||
VALUE "ProductName", PRODUCT_BUNDLE
|
||||
VALUE "ProductVersion", PRODUCT_VERSION_RESOURCE_STR
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
BEGIN
|
||||
VALUE "Translation", 0x409, 1252
|
||||
END
|
||||
END
|
||||
|
|
@ -1,22 +0,0 @@
|
|||
IF(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt")
|
||||
MESSAGE(FATAL_ERROR "Cannot find install manifest: \"@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt\"")
|
||||
ENDIF(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt")
|
||||
|
||||
FILE(READ "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt" files)
|
||||
STRING(REGEX REPLACE "\n" ";" files "${files}")
|
||||
FOREACH(file ${files})
|
||||
MESSAGE(STATUS "Uninstalling \"${file}\"")
|
||||
IF(EXISTS "${file}")
|
||||
EXEC_PROGRAM(
|
||||
"@CMAKE_COMMAND@" ARGS "-E remove \"${file}\""
|
||||
OUTPUT_VARIABLE rm_out
|
||||
RETURN_VALUE rm_retval
|
||||
)
|
||||
IF("${rm_retval}" STREQUAL 0)
|
||||
ELSE("${rm_retval}" STREQUAL 0)
|
||||
MESSAGE(FATAL_ERROR "Problem when removing \"${file}\"")
|
||||
ENDIF("${rm_retval}" STREQUAL 0)
|
||||
ELSE(EXISTS "${file}")
|
||||
MESSAGE(STATUS "File \"${file}\" does not exist.")
|
||||
ENDIF(EXISTS "${file}")
|
||||
ENDFOREACH(file)
|
|
@ -1,107 +0,0 @@
|
|||
include (CMakeParseArguments)
|
||||
|
||||
set (GenerateProductVersionCurrentDir ${CMAKE_CURRENT_LIST_DIR})
|
||||
|
||||
# generate_product_version() function
|
||||
#
|
||||
# This function uses VersionInfo.in template file and VersionResource.rc file
|
||||
# to generate WIN32 resource with version information and general resource strings.
|
||||
#
|
||||
# Usage:
|
||||
# generate_product_version(
|
||||
# SomeOutputResourceVariable
|
||||
# NAME MyGreatProject
|
||||
# ICON ${PATH_TO_APP_ICON}
|
||||
# VERSION_MAJOR 2
|
||||
# VERSION_MINOR 3
|
||||
# VERSION_PATH ${BUILD_COUNTER}
|
||||
# VERSION_REVISION ${BUILD_REVISION}
|
||||
# )
|
||||
# where BUILD_COUNTER and BUILD_REVISION could be values from your CI server.
|
||||
#
|
||||
# You can use generated resource for your executable targets:
|
||||
# add_executable(target-name ${target-files} ${SomeOutputResourceVariable})
|
||||
#
|
||||
# You can specify resource strings in arguments:
|
||||
# NAME - name of executable (no defaults, ex: Microsoft Word)
|
||||
# BUNDLE - bundle (${NAME} is default, ex: Microsoft Office)
|
||||
# ICON - path to application icon (${CMAKE_SOURCE_DIR}/product.ico by default)
|
||||
# VERSION_MAJOR - 1 is default
|
||||
# VERSION_MINOR - 0 is default
|
||||
# VERSION_PATCH - 0 is default
|
||||
# VERSION_REVISION - 0 is default
|
||||
# COMPANY_NAME - your company name (no defaults)
|
||||
# COMPANY_COPYRIGHT - ${COMPANY_NAME} (C) Copyright ${CURRENT_YEAR} is default
|
||||
# COMMENTS - ${NAME} v${VERSION_MAJOR}.${VERSION_MINOR} is default
|
||||
# ORIGINAL_FILENAME - ${NAME} is default
|
||||
# INTERNAL_NAME - ${NAME} is default
|
||||
# FILE_DESCRIPTION - ${NAME} is default
|
||||
function(generate_product_version outfiles)
|
||||
set (options)
|
||||
set (oneValueArgs
|
||||
NAME
|
||||
BUNDLE
|
||||
VERSION_MAJOR
|
||||
VERSION_MINOR
|
||||
VERSION_PATCH
|
||||
VERSION_REVISION
|
||||
COMPANY_NAME
|
||||
COMPANY_COPYRIGHT
|
||||
COMMENTS
|
||||
ORIGINAL_FILENAME
|
||||
INTERNAL_NAME
|
||||
FILE_DESCRIPTION)
|
||||
set (multiValueArgs)
|
||||
cmake_parse_arguments(PRODUCT "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
|
||||
|
||||
if (NOT PRODUCT_BUNDLE OR "${PRODUCT_BUNDLE}" STREQUAL "")
|
||||
set(PRODUCT_BUNDLE "${PRODUCT_NAME}")
|
||||
endif()
|
||||
# if (NOT PRODUCT_ICON OR "${PRODUCT_ICON}" STREQUAL "")
|
||||
# set(PRODUCT_ICON "${CMAKE_SOURCE_DIR}/product.ico")
|
||||
# endif()
|
||||
|
||||
if (NOT PRODUCT_VERSION_MAJOR OR "${PRODUCT_VERSION_MAJOR}" STREQUAL "")
|
||||
set(PRODUCT_VERSION_MAJOR 1)
|
||||
endif()
|
||||
if (NOT PRODUCT_VERSION_MINOR OR "${PRODUCT_VERSION_MINOR}" STREQUAL "")
|
||||
set(PRODUCT_VERSION_MINOR 0)
|
||||
endif()
|
||||
if (NOT PRODUCT_VERSION_PATCH OR "${PRODUCT_VERSION_PATCH}" STREQUAL "")
|
||||
set(PRODUCT_VERSION_PATCH 0)
|
||||
endif()
|
||||
if (NOT PRODUCT_VERSION_REVISION OR "${PRODUCT_VERSION_REVISION}" STREQUAL "")
|
||||
set(PRODUCT_VERSION_REVISION 0)
|
||||
endif()
|
||||
|
||||
if (NOT PRODUCT_COMPANY_COPYRIGHT OR "${PRODUCT_COMPANY_COPYRIGHT}" STREQUAL "")
|
||||
string(TIMESTAMP PRODUCT_CURRENT_YEAR "%Y")
|
||||
set(PRODUCT_COMPANY_COPYRIGHT "${PRODUCT_COMPANY_NAME} (C) Copyright ${PRODUCT_CURRENT_YEAR}")
|
||||
endif()
|
||||
if (NOT PRODUCT_COMMENTS OR "${PRODUCT_COMMENTS}" STREQUAL "")
|
||||
set(PRODUCT_COMMENTS "${PRODUCT_NAME} v${PRODUCT_VERSION_MAJOR}.${PRODUCT_VERSION_MINOR}")
|
||||
endif()
|
||||
if (NOT PRODUCT_ORIGINAL_FILENAME OR "${PRODUCT_ORIGINAL_FILENAME}" STREQUAL "")
|
||||
set(PRODUCT_ORIGINAL_FILENAME "${PRODUCT_NAME}")
|
||||
endif()
|
||||
if (NOT PRODUCT_INTERNAL_NAME OR "${PRODUCT_INTERNAL_NAME}" STREQUAL "")
|
||||
set(PRODUCT_INTERNAL_NAME "${PRODUCT_NAME}")
|
||||
endif()
|
||||
if (NOT PRODUCT_FILE_DESCRIPTION OR "${PRODUCT_FILE_DESCRIPTION}" STREQUAL "")
|
||||
set(PRODUCT_FILE_DESCRIPTION "${PRODUCT_NAME}")
|
||||
endif()
|
||||
|
||||
set (_VersionInfoFile ${CMAKE_CURRENT_BINARY_DIR}/VersionInfo.h)
|
||||
set (_VersionResourceFile ${CMAKE_CURRENT_BINARY_DIR}/VersionResource.rc)
|
||||
configure_file(
|
||||
${GenerateProductVersionCurrentDir}/VersionInfo.in
|
||||
${_VersionInfoFile}
|
||||
@ONLY)
|
||||
configure_file(
|
||||
${GenerateProductVersionCurrentDir}/VersionResource.rc
|
||||
${_VersionResourceFile}
|
||||
COPYONLY)
|
||||
list(APPEND ${outfiles} ${_VersionInfoFile} ${_VersionResourceFile})
|
||||
set (${outfiles} ${${outfiles}} PARENT_SCOPE)
|
||||
endfunction()
|
||||
|
239
singe/thirdparty/fluidsynth/cmake_admin/report.cmake
vendored
239
singe/thirdparty/fluidsynth/cmake_admin/report.cmake
vendored
|
@ -1,239 +0,0 @@
|
|||
|
||||
set ( AUDIO_MIDI_REPORT "\n" )
|
||||
|
||||
if ( ALSA_SUPPORT )
|
||||
set ( AUDIO_MIDI_REPORT "${AUDIO_MIDI_REPORT} ALSA: yes\n" )
|
||||
else ( ALSA_SUPPORT )
|
||||
set ( AUDIO_MIDI_REPORT "${AUDIO_MIDI_REPORT} ALSA: no\n" )
|
||||
endif ( ALSA_SUPPORT )
|
||||
|
||||
if ( COREAUDIO_SUPPORT )
|
||||
set ( AUDIO_MIDI_REPORT "${AUDIO_MIDI_REPORT} CoreAudio: yes\n" )
|
||||
else ( COREAUDIO_SUPPORT )
|
||||
set ( AUDIO_MIDI_REPORT "${AUDIO_MIDI_REPORT} CoreAudio: no\n" )
|
||||
endif ( COREAUDIO_SUPPORT )
|
||||
|
||||
if ( COREMIDI_SUPPORT )
|
||||
set ( AUDIO_MIDI_REPORT "${AUDIO_MIDI_REPORT} CoreMIDI: yes\n" )
|
||||
else ( COREMIDI_SUPPORT )
|
||||
set ( AUDIO_MIDI_REPORT "${AUDIO_MIDI_REPORT} CoreMIDI: no\n" )
|
||||
endif ( COREMIDI_SUPPORT )
|
||||
|
||||
if ( DSOUND_SUPPORT )
|
||||
set ( AUDIO_MIDI_REPORT "${AUDIO_MIDI_REPORT} DSound: yes\n" )
|
||||
else ( DSOUND_SUPPORT )
|
||||
set ( AUDIO_MIDI_REPORT "${AUDIO_MIDI_REPORT} DSound: no\n" )
|
||||
endif ( DSOUND_SUPPORT )
|
||||
|
||||
if ( JACK_SUPPORT )
|
||||
set ( AUDIO_MIDI_REPORT "${AUDIO_MIDI_REPORT} JACK: yes\n" )
|
||||
else ( JACK_SUPPORT )
|
||||
set ( AUDIO_MIDI_REPORT "${AUDIO_MIDI_REPORT} JACK: no\n" )
|
||||
endif ( JACK_SUPPORT )
|
||||
|
||||
if ( MIDISHARE_SUPPORT )
|
||||
set ( AUDIO_MIDI_REPORT "${AUDIO_MIDI_REPORT} MidiShare: yes\n" )
|
||||
else ( MIDISHARE_SUPPORT )
|
||||
set ( AUDIO_MIDI_REPORT "${AUDIO_MIDI_REPORT} MidiShare: no\n" )
|
||||
endif ( MIDISHARE_SUPPORT )
|
||||
|
||||
if ( OBOE_SUPPORT )
|
||||
set ( AUDIO_MIDI_REPORT "${AUDIO_MIDI_REPORT} Oboe: yes\n" )
|
||||
else ( OBOE_SUPPORT )
|
||||
set ( AUDIO_MIDI_REPORT "${AUDIO_MIDI_REPORT} Oboe: no\n" )
|
||||
endif ( OBOE_SUPPORT )
|
||||
|
||||
if ( OPENSLES_SUPPORT )
|
||||
set ( AUDIO_MIDI_REPORT "${AUDIO_MIDI_REPORT} OpenSLES: yes\n" )
|
||||
else ( OPENSLES_SUPPORT )
|
||||
set ( AUDIO_MIDI_REPORT "${AUDIO_MIDI_REPORT} OpenSLES: no\n" )
|
||||
endif ( OPENSLES_SUPPORT )
|
||||
|
||||
if ( DART_SUPPORT )
|
||||
set ( AUDIO_MIDI_REPORT "${AUDIO_MIDI_REPORT} OS/2 DART: yes\n" )
|
||||
else ( DART_SUPPORT )
|
||||
set ( AUDIO_MIDI_REPORT "${AUDIO_MIDI_REPORT} OS/2 DART: no\n" )
|
||||
endif ( DART_SUPPORT )
|
||||
|
||||
if ( OSS_SUPPORT )
|
||||
set ( AUDIO_MIDI_REPORT "${AUDIO_MIDI_REPORT} OSS: yes\n" )
|
||||
else ( OSS_SUPPORT )
|
||||
set ( AUDIO_MIDI_REPORT "${AUDIO_MIDI_REPORT} OSS: no\n" )
|
||||
endif ( OSS_SUPPORT )
|
||||
|
||||
if ( PORTAUDIO_SUPPORT )
|
||||
set ( AUDIO_MIDI_REPORT "${AUDIO_MIDI_REPORT} PortAudio: yes\n" )
|
||||
else ( PORTAUDIO_SUPPORT )
|
||||
set ( AUDIO_MIDI_REPORT "${AUDIO_MIDI_REPORT} PortAudio: no\n" )
|
||||
endif ( PORTAUDIO_SUPPORT )
|
||||
|
||||
if ( PULSE_SUPPORT )
|
||||
set ( AUDIO_MIDI_REPORT "${AUDIO_MIDI_REPORT} PulseAudio: yes\n" )
|
||||
else ( PULSE_SUPPORT )
|
||||
set ( AUDIO_MIDI_REPORT "${AUDIO_MIDI_REPORT} PulseAudio: no\n" )
|
||||
endif ( PULSE_SUPPORT )
|
||||
|
||||
if ( SDL2_SUPPORT )
|
||||
set ( AUDIO_MIDI_REPORT "${AUDIO_MIDI_REPORT} SDL2: yes\n" )
|
||||
else ( SDL2_SUPPORT )
|
||||
set ( AUDIO_MIDI_REPORT "${AUDIO_MIDI_REPORT} SDL2: no\n" )
|
||||
endif ( SDL2_SUPPORT )
|
||||
|
||||
if ( WAVEOUT_SUPPORT )
|
||||
set ( AUDIO_MIDI_REPORT "${AUDIO_MIDI_REPORT} WaveOut: yes\n" )
|
||||
else ( WAVEOUT_SUPPORT )
|
||||
set ( AUDIO_MIDI_REPORT "${AUDIO_MIDI_REPORT} WaveOut: no\n" )
|
||||
endif ( WAVEOUT_SUPPORT )
|
||||
|
||||
if ( WINMIDI_SUPPORT )
|
||||
set ( AUDIO_MIDI_REPORT "${AUDIO_MIDI_REPORT} WinMidi: yes\n" )
|
||||
else ( WINMIDI_SUPPORT )
|
||||
set ( AUDIO_MIDI_REPORT "${AUDIO_MIDI_REPORT} WinMidi: no\n" )
|
||||
endif ( WINMIDI_SUPPORT )
|
||||
|
||||
|
||||
set ( INPUTS_REPORT "\n" )
|
||||
|
||||
set ( INPUTS_REPORT "${INPUTS_REPORT}Support for SF3 files: " )
|
||||
if ( LIBSNDFILE_HASVORBIS )
|
||||
set ( INPUTS_REPORT "${INPUTS_REPORT}yes\n" )
|
||||
elseif ( NOT LIBSNDFILE_SUPPORT )
|
||||
set ( INPUTS_REPORT "${INPUTS_REPORT}no (libsndfile not found)\n" )
|
||||
elseif ( NOT LIBSNDFILE_HASVORBIS )
|
||||
set ( INPUTS_REPORT "${INPUTS_REPORT}no (libsndfile has no ogg vorbis support)\n" )
|
||||
endif ( LIBSNDFILE_HASVORBIS )
|
||||
|
||||
|
||||
set ( INPUTS_REPORT "${INPUTS_REPORT}Support for DLS files: " )
|
||||
if ( LIBINSTPATCH_SUPPORT )
|
||||
set ( INPUTS_REPORT "${INPUTS_REPORT}yes\n" )
|
||||
else ( LIBINSTPATCH_SUPPORT )
|
||||
set ( INPUTS_REPORT "${INPUTS_REPORT}no (libinstpatch not found)\n" )
|
||||
endif ( LIBINSTPATCH_SUPPORT )
|
||||
|
||||
|
||||
set ( RENDERING_REPORT "\n" )
|
||||
|
||||
if ( AUFILE_SUPPORT )
|
||||
set ( RENDERING_REPORT "${RENDERING_REPORT}Audio to file rendering: yes\n" )
|
||||
else ( AUFILE_SUPPORT )
|
||||
set ( RENDERING_REPORT "${RENDERING_REPORT}Audio to file rendering: no\n" )
|
||||
endif ( AUFILE_SUPPORT )
|
||||
|
||||
if ( LIBSNDFILE_SUPPORT )
|
||||
set ( RENDERING_REPORT "${RENDERING_REPORT} libsndfile: yes\n" )
|
||||
else ( LIBSNDFILE_SUPPORT )
|
||||
set ( RENDERING_REPORT "${RENDERING_REPORT} libsndfile: no (RAW PCM rendering only)\n" )
|
||||
endif ( LIBSNDFILE_SUPPORT )
|
||||
|
||||
|
||||
set ( MISC_REPORT "\nMiscellaneous support:\n" )
|
||||
|
||||
if ( DBUS_SUPPORT )
|
||||
set ( MISC_REPORT "${MISC_REPORT} D-Bus: yes\n" )
|
||||
else ( DBUS_SUPPORT )
|
||||
set ( MISC_REPORT "${MISC_REPORT} D-Bus: no\n" )
|
||||
endif ( DBUS_SUPPORT )
|
||||
|
||||
if ( LADSPA_SUPPORT )
|
||||
set ( MISC_REPORT "${MISC_REPORT} LADSPA support: yes\n" )
|
||||
else ( LADSPA_SUPPORT )
|
||||
set ( MISC_REPORT "${MISC_REPORT} LADSPA support: no\n" )
|
||||
endif ( LADSPA_SUPPORT )
|
||||
|
||||
if ( LASH_SUPPORT )
|
||||
set ( MISC_REPORT "${MISC_REPORT} LASH support: yes (NOTE: GPL library)\n" )
|
||||
else ( LASH_SUPPORT )
|
||||
set ( MISC_REPORT "${MISC_REPORT} LASH support: no\n" )
|
||||
endif ( LASH_SUPPORT )
|
||||
|
||||
if ( NETWORK_SUPPORT )
|
||||
set ( MISC_REPORT "${MISC_REPORT} NETWORK Support: yes\n" )
|
||||
else ( NETWORK_SUPPORT )
|
||||
set ( MISC_REPORT "${MISC_REPORT} NETWORK Support: no\n" )
|
||||
endif ( NETWORK_SUPPORT )
|
||||
|
||||
if ( IPV6_SUPPORT )
|
||||
set ( MISC_REPORT "${MISC_REPORT} IPV6 Support: yes\n" )
|
||||
else ( IPV6_SUPPORT )
|
||||
set ( MISC_REPORT "${MISC_REPORT} IPV6 Support: no\n" )
|
||||
endif ( IPV6_SUPPORT )
|
||||
|
||||
if ( WITH_READLINE )
|
||||
set ( MISC_REPORT "${MISC_REPORT} Readline: yes (NOTE: GPL library)\n" )
|
||||
else ( WITH_READLINE )
|
||||
set ( MISC_REPORT "${MISC_REPORT} Readline: no\n" )
|
||||
endif ( WITH_READLINE )
|
||||
|
||||
if ( SYSTEMD_SUPPORT )
|
||||
set ( MISC_REPORT "${MISC_REPORT} systemd: yes\n" )
|
||||
else ( SYSTEMD_SUPPORT )
|
||||
set ( MISC_REPORT "${MISC_REPORT} systemd: no\n" )
|
||||
endif ( SYSTEMD_SUPPORT )
|
||||
|
||||
|
||||
set ( DEVEL_REPORT "\nDeveloper nerds info:\n" )
|
||||
|
||||
if ( WITH_FLOAT )
|
||||
set ( DEVEL_REPORT "${DEVEL_REPORT} Samples type: float\n" )
|
||||
else ( WITH_FLOAT )
|
||||
set ( DEVEL_REPORT "${DEVEL_REPORT} Samples type: double\n" )
|
||||
endif ( WITH_FLOAT )
|
||||
|
||||
if ( ENABLE_MIXER_THREADS )
|
||||
set ( DEVEL_REPORT "${DEVEL_REPORT} Multithread rendering: yes\n" )
|
||||
else ( ENABLE_MIXER_THREADS )
|
||||
set ( DEVEL_REPORT "${DEVEL_REPORT} Multithread rendering: no\n" )
|
||||
endif ( ENABLE_MIXER_THREADS )
|
||||
|
||||
if ( HAVE_OPENMP )
|
||||
set ( DEVEL_REPORT "${DEVEL_REPORT} OpenMP 4.0: yes\n" )
|
||||
else ( HAVE_OPENMP )
|
||||
set ( DEVEL_REPORT "${DEVEL_REPORT} OpenMP 4.0: no\n" )
|
||||
endif ( HAVE_OPENMP )
|
||||
|
||||
if ( WITH_PROFILING )
|
||||
set ( DEVEL_REPORT "${DEVEL_REPORT} Profiling: yes\n" )
|
||||
else ( WITH_PROFILING )
|
||||
set ( DEVEL_REPORT "${DEVEL_REPORT} Profiling: no\n" )
|
||||
endif ( WITH_PROFILING )
|
||||
|
||||
if ( ENABLE_DEBUG )
|
||||
set ( DEVEL_REPORT "${DEVEL_REPORT} Debug Build: yes\n" )
|
||||
else ( ENABLE_DEBUG )
|
||||
set ( DEVEL_REPORT "${DEVEL_REPORT} Debug Build: no\n" )
|
||||
endif ( ENABLE_DEBUG )
|
||||
|
||||
if ( ENABLE_TRAPONFPE )
|
||||
set ( DEVEL_REPORT "${DEVEL_REPORT} Trap on FPE (debug): yes\n" )
|
||||
else ( ENABLE_TRAPONFPE )
|
||||
set ( DEVEL_REPORT "${DEVEL_REPORT} Trap on FPE (debug): no\n" )
|
||||
endif ( ENABLE_TRAPONFPE )
|
||||
|
||||
if ( ENABLE_FPECHECK )
|
||||
set ( DEVEL_REPORT "${DEVEL_REPORT} Check FPE (debug): yes\n" )
|
||||
else ( ENABLE_FPECHECK )
|
||||
set ( DEVEL_REPORT "${DEVEL_REPORT} Check FPE (debug): no\n" )
|
||||
endif ( ENABLE_FPECHECK )
|
||||
|
||||
if ( ENABLE_UBSAN )
|
||||
set ( DEVEL_REPORT "${DEVEL_REPORT} UBSan (debug): yes\n" )
|
||||
else ( ENABLE_UBSAN )
|
||||
set ( DEVEL_REPORT "${DEVEL_REPORT} UBSan (debug): no\n" )
|
||||
endif ( ENABLE_UBSAN )
|
||||
|
||||
message( STATUS
|
||||
"\n**************************************************************\n"
|
||||
"Build Summary:\n"
|
||||
"Build type: " ${CMAKE_BUILD_TYPE} "\n"
|
||||
"Install Prefix: " ${CMAKE_INSTALL_PREFIX} "\n"
|
||||
"\n"
|
||||
"Audio / MIDI driver support:"
|
||||
${AUDIO_MIDI_REPORT}
|
||||
${INPUTS_REPORT}
|
||||
${RENDERING_REPORT}
|
||||
${MISC_REPORT}
|
||||
${DEVEL_REPORT}
|
||||
)
|
||||
|
||||
message ( "**************************************************************\n\n" )
|
35
singe/thirdparty/fluidsynth/doc/CMakeLists.txt
vendored
35
singe/thirdparty/fluidsynth/doc/CMakeLists.txt
vendored
|
@ -1,35 +0,0 @@
|
|||
# FluidSynth - A Software Synthesize
|
||||
#
|
||||
# Copyright (C) 2003-2010 Peter Hanappe and others.
|
||||
#
|
||||
# This library is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU Lesser General Public License
|
||||
# as published by the Free Software Foundation; either version 2.1 of
|
||||
# the License, or (at your option) any later version.
|
||||
#
|
||||
# This library is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
# Lesser General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public
|
||||
# License along with this library; if not, write to the Free
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
|
||||
# 02111-1307, USA
|
||||
|
||||
# CMake based build system. Pedro Lopez-Cabanillas <plcl@users.sf.net>
|
||||
|
||||
find_package ( Doxygen )
|
||||
if ( DOXYGEN_FOUND )
|
||||
configure_file ( Doxyfile.cmake
|
||||
${CMAKE_CURRENT_BINARY_DIR}/Doxyfile )
|
||||
add_custom_target ( doxygen
|
||||
${DOXYGEN} Doxyfile
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
||||
)
|
||||
endif ( DOXYGEN_FOUND )
|
||||
|
||||
if ( UNIX )
|
||||
install ( FILES fluidsynth.1
|
||||
DESTINATION ${MAN_INSTALL_DIR} )
|
||||
endif ( UNIX )
|
246
singe/thirdparty/fluidsynth/doc/Doxyfile
vendored
246
singe/thirdparty/fluidsynth/doc/Doxyfile
vendored
|
@ -1,246 +0,0 @@
|
|||
# Doxyfile 1.6
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# Project related configuration options
|
||||
#---------------------------------------------------------------------------
|
||||
DOXYFILE_ENCODING = UTF-8
|
||||
PROJECT_NAME = libfluidsynth
|
||||
PROJECT_NUMBER = 2.1.0RC
|
||||
OUTPUT_DIRECTORY = api
|
||||
CREATE_SUBDIRS = NO
|
||||
OUTPUT_LANGUAGE = English
|
||||
BRIEF_MEMBER_DESC = YES
|
||||
REPEAT_BRIEF = YES
|
||||
ABBREVIATE_BRIEF = "The $name class" "The $name widget" "The $name file" is provides specifies contains represents a an the
|
||||
ALWAYS_DETAILED_SEC = NO
|
||||
INLINE_INHERITED_MEMB = NO
|
||||
FULL_PATH_NAMES = NO
|
||||
STRIP_FROM_PATH = ../
|
||||
STRIP_FROM_INC_PATH = ../include/
|
||||
SHORT_NAMES = NO
|
||||
JAVADOC_AUTOBRIEF = YES
|
||||
QT_AUTOBRIEF = NO
|
||||
MULTILINE_CPP_IS_BRIEF = NO
|
||||
INHERIT_DOCS = YES
|
||||
SEPARATE_MEMBER_PAGES = NO
|
||||
TAB_SIZE = 8
|
||||
ALIASES =
|
||||
OPTIMIZE_OUTPUT_FOR_C = YES
|
||||
OPTIMIZE_OUTPUT_JAVA = NO
|
||||
OPTIMIZE_FOR_FORTRAN = NO
|
||||
OPTIMIZE_OUTPUT_VHDL = NO
|
||||
BUILTIN_STL_SUPPORT = NO
|
||||
CPP_CLI_SUPPORT = NO
|
||||
SIP_SUPPORT = NO
|
||||
IDL_PROPERTY_SUPPORT = YES
|
||||
DISTRIBUTE_GROUP_DOC = NO
|
||||
SUBGROUPING = NO
|
||||
TYPEDEF_HIDES_STRUCT = NO
|
||||
#---------------------------------------------------------------------------
|
||||
# Build related configuration options
|
||||
#---------------------------------------------------------------------------
|
||||
EXTRACT_ALL = NO
|
||||
EXTRACT_PRIVATE = NO
|
||||
EXTRACT_STATIC = NO
|
||||
EXTRACT_LOCAL_CLASSES = NO
|
||||
EXTRACT_LOCAL_METHODS = NO
|
||||
EXTRACT_ANON_NSPACES = NO
|
||||
HIDE_UNDOC_MEMBERS = YES
|
||||
HIDE_UNDOC_CLASSES = YES
|
||||
HIDE_FRIEND_COMPOUNDS = NO
|
||||
HIDE_IN_BODY_DOCS = NO
|
||||
INTERNAL_DOCS = NO
|
||||
CASE_SENSE_NAMES = YES
|
||||
HIDE_SCOPE_NAMES = NO
|
||||
SHOW_INCLUDE_FILES = NO
|
||||
INLINE_INFO = YES
|
||||
SORT_MEMBER_DOCS = NO
|
||||
SORT_BRIEF_DOCS = NO
|
||||
SORT_GROUP_NAMES = NO
|
||||
SORT_BY_SCOPE_NAME = NO
|
||||
GENERATE_TODOLIST = NO
|
||||
GENERATE_TESTLIST = NO
|
||||
GENERATE_BUGLIST = NO
|
||||
GENERATE_DEPRECATEDLIST = YES
|
||||
ENABLED_SECTIONS =
|
||||
MAX_INITIALIZER_LINES = 30
|
||||
SHOW_USED_FILES = YES
|
||||
SHOW_DIRECTORIES = NO
|
||||
SHOW_FILES = YES
|
||||
SHOW_NAMESPACES = YES
|
||||
FILE_VERSION_FILTER =
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to warning and progress messages
|
||||
#---------------------------------------------------------------------------
|
||||
QUIET = NO
|
||||
WARNINGS = YES
|
||||
WARN_IF_UNDOCUMENTED = YES
|
||||
WARN_IF_DOC_ERROR = YES
|
||||
WARN_NO_PARAMDOC = YES
|
||||
WARN_FORMAT = "$file:$line: $text"
|
||||
WARN_LOGFILE =
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the input files
|
||||
#---------------------------------------------------------------------------
|
||||
INPUT = ../doc/fluidsynth-v20-devdoc.txt ../include ../include/fluidsynth ../src
|
||||
INPUT_ENCODING = UTF-8
|
||||
FILE_PATTERNS = *.c *.h
|
||||
RECURSIVE = YES
|
||||
EXCLUDE =
|
||||
EXCLUDE_SYMLINKS = NO
|
||||
EXCLUDE_PATTERNS = fluid_*.h
|
||||
EXCLUDE_SYMBOLS =
|
||||
EXAMPLE_PATH = ../doc
|
||||
EXAMPLE_PATTERNS = *.c
|
||||
EXAMPLE_RECURSIVE = NO
|
||||
IMAGE_PATH =
|
||||
INPUT_FILTER =
|
||||
FILTER_PATTERNS =
|
||||
FILTER_SOURCE_FILES = NO
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to source browsing
|
||||
#---------------------------------------------------------------------------
|
||||
SOURCE_BROWSER = NO
|
||||
INLINE_SOURCES = NO
|
||||
STRIP_CODE_COMMENTS = YES
|
||||
REFERENCED_BY_RELATION = YES
|
||||
REFERENCES_RELATION = YES
|
||||
REFERENCES_LINK_SOURCE = YES
|
||||
USE_HTAGS = NO
|
||||
VERBATIM_HEADERS = NO
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the alphabetical class index
|
||||
#---------------------------------------------------------------------------
|
||||
ALPHABETICAL_INDEX = YES
|
||||
COLS_IN_ALPHA_INDEX = 5
|
||||
IGNORE_PREFIX =
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the HTML output
|
||||
#---------------------------------------------------------------------------
|
||||
GENERATE_HTML = YES
|
||||
HTML_OUTPUT = html
|
||||
HTML_FILE_EXTENSION = .html
|
||||
HTML_HEADER =
|
||||
HTML_FOOTER =
|
||||
HTML_EXTRA_STYLESHEET = ../doc/doxy_formula.css
|
||||
HTML_ALIGN_MEMBERS = YES
|
||||
HTML_EXTRA_FILES = ../doc/fluidsettings.xml ../doc/fluidsettings.xsl
|
||||
GENERATE_HTMLHELP = NO
|
||||
GENERATE_DOCSET = NO
|
||||
DOCSET_FEEDNAME = "Doxygen generated docs"
|
||||
DOCSET_BUNDLE_ID = org.doxygen.Project
|
||||
HTML_DYNAMIC_SECTIONS = YES
|
||||
CHM_FILE =
|
||||
HHC_LOCATION =
|
||||
GENERATE_CHI = NO
|
||||
CHM_INDEX_ENCODING =
|
||||
BINARY_TOC = NO
|
||||
TOC_EXPAND = NO
|
||||
DISABLE_INDEX = NO
|
||||
ENUM_VALUES_PER_LINE = 4
|
||||
GENERATE_TREEVIEW = NO
|
||||
TREEVIEW_WIDTH = 250
|
||||
FORMULA_FONTSIZE = 10
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the LaTeX output
|
||||
#---------------------------------------------------------------------------
|
||||
GENERATE_LATEX = NO
|
||||
LATEX_OUTPUT = latex
|
||||
LATEX_CMD_NAME = latex
|
||||
MAKEINDEX_CMD_NAME = makeindex
|
||||
COMPACT_LATEX = NO
|
||||
PAPER_TYPE = a4wide
|
||||
EXTRA_PACKAGES =
|
||||
LATEX_HEADER =
|
||||
PDF_HYPERLINKS = YES
|
||||
USE_PDFLATEX = YES
|
||||
LATEX_BATCHMODE = NO
|
||||
LATEX_HIDE_INDICES = NO
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the RTF output
|
||||
#---------------------------------------------------------------------------
|
||||
GENERATE_RTF = NO
|
||||
RTF_OUTPUT = rtf
|
||||
COMPACT_RTF = NO
|
||||
RTF_HYPERLINKS = NO
|
||||
RTF_STYLESHEET_FILE =
|
||||
RTF_EXTENSIONS_FILE =
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the man page output
|
||||
#---------------------------------------------------------------------------
|
||||
GENERATE_MAN = NO
|
||||
MAN_OUTPUT = man
|
||||
MAN_EXTENSION = .3
|
||||
MAN_LINKS = NO
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the XML output
|
||||
#---------------------------------------------------------------------------
|
||||
GENERATE_XML = NO
|
||||
XML_OUTPUT = xml
|
||||
XML_SCHEMA =
|
||||
XML_DTD =
|
||||
XML_PROGRAMLISTING = YES
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options for the AutoGen Definitions output
|
||||
#---------------------------------------------------------------------------
|
||||
GENERATE_AUTOGEN_DEF = NO
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the Perl module output
|
||||
#---------------------------------------------------------------------------
|
||||
GENERATE_PERLMOD = NO
|
||||
PERLMOD_LATEX = NO
|
||||
PERLMOD_PRETTY = YES
|
||||
PERLMOD_MAKEVAR_PREFIX =
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration options related to the preprocessor
|
||||
#---------------------------------------------------------------------------
|
||||
ENABLE_PREPROCESSING = YES
|
||||
MACRO_EXPANSION = NO
|
||||
EXPAND_ONLY_PREDEF = NO
|
||||
SEARCH_INCLUDES = YES
|
||||
INCLUDE_PATH =
|
||||
INCLUDE_FILE_PATTERNS =
|
||||
PREDEFINED = __DOXYGEN__
|
||||
EXPAND_AS_DEFINED =
|
||||
SKIP_FUNCTION_MACROS = YES
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration::additions related to external references
|
||||
#---------------------------------------------------------------------------
|
||||
TAGFILES =
|
||||
GENERATE_TAGFILE =
|
||||
ALLEXTERNALS = NO
|
||||
EXTERNAL_GROUPS = YES
|
||||
PERL_PATH = /usr/bin/perl
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration options related to the dot tool
|
||||
#---------------------------------------------------------------------------
|
||||
CLASS_DIAGRAMS = YES
|
||||
MSCGEN_PATH =
|
||||
HIDE_UNDOC_RELATIONS = YES
|
||||
HAVE_DOT = NO
|
||||
DOT_FONTNAME = FreeSans
|
||||
DOT_FONTPATH =
|
||||
CLASS_GRAPH = YES
|
||||
COLLABORATION_GRAPH = YES
|
||||
GROUP_GRAPHS = YES
|
||||
UML_LOOK = NO
|
||||
TEMPLATE_RELATIONS = YES
|
||||
INCLUDE_GRAPH = YES
|
||||
INCLUDED_BY_GRAPH = YES
|
||||
CALL_GRAPH = NO
|
||||
CALLER_GRAPH = NO
|
||||
GRAPHICAL_HIERARCHY = YES
|
||||
DIRECTORY_GRAPH = YES
|
||||
DOT_IMAGE_FORMAT = png
|
||||
DOT_PATH =
|
||||
DOTFILE_DIRS =
|
||||
DOT_GRAPH_MAX_NODES = 50
|
||||
MAX_DOT_GRAPH_DEPTH = 1000
|
||||
DOT_TRANSPARENT = YES
|
||||
DOT_MULTI_TARGETS = NO
|
||||
GENERATE_LEGEND = YES
|
||||
DOT_CLEANUP = YES
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration::additions related to the search engine
|
||||
#---------------------------------------------------------------------------
|
||||
SEARCHENGINE = YES
|
246
singe/thirdparty/fluidsynth/doc/Doxyfile.cmake
vendored
246
singe/thirdparty/fluidsynth/doc/Doxyfile.cmake
vendored
|
@ -1,246 +0,0 @@
|
|||
# Doxyfile 1.6
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# Project related configuration options
|
||||
#---------------------------------------------------------------------------
|
||||
DOXYFILE_ENCODING = UTF-8
|
||||
PROJECT_NAME = libfluidsynth
|
||||
PROJECT_NUMBER = @VERSION@
|
||||
OUTPUT_DIRECTORY = api
|
||||
CREATE_SUBDIRS = NO
|
||||
OUTPUT_LANGUAGE = English
|
||||
BRIEF_MEMBER_DESC = YES
|
||||
REPEAT_BRIEF = YES
|
||||
ABBREVIATE_BRIEF = "The $name class" "The $name widget" "The $name file" is provides specifies contains represents a an the
|
||||
ALWAYS_DETAILED_SEC = NO
|
||||
INLINE_INHERITED_MEMB = NO
|
||||
FULL_PATH_NAMES = NO
|
||||
STRIP_FROM_PATH = @CMAKE_SOURCE_DIR@/
|
||||
STRIP_FROM_INC_PATH = @CMAKE_SOURCE_DIR@/include/
|
||||
SHORT_NAMES = NO
|
||||
JAVADOC_AUTOBRIEF = YES
|
||||
QT_AUTOBRIEF = NO
|
||||
MULTILINE_CPP_IS_BRIEF = NO
|
||||
INHERIT_DOCS = YES
|
||||
SEPARATE_MEMBER_PAGES = NO
|
||||
TAB_SIZE = 8
|
||||
ALIASES =
|
||||
OPTIMIZE_OUTPUT_FOR_C = YES
|
||||
OPTIMIZE_OUTPUT_JAVA = NO
|
||||
OPTIMIZE_FOR_FORTRAN = NO
|
||||
OPTIMIZE_OUTPUT_VHDL = NO
|
||||
BUILTIN_STL_SUPPORT = NO
|
||||
CPP_CLI_SUPPORT = NO
|
||||
SIP_SUPPORT = NO
|
||||
IDL_PROPERTY_SUPPORT = YES
|
||||
DISTRIBUTE_GROUP_DOC = NO
|
||||
SUBGROUPING = NO
|
||||
TYPEDEF_HIDES_STRUCT = NO
|
||||
#---------------------------------------------------------------------------
|
||||
# Build related configuration options
|
||||
#---------------------------------------------------------------------------
|
||||
EXTRACT_ALL = NO
|
||||
EXTRACT_PRIVATE = NO
|
||||
EXTRACT_STATIC = NO
|
||||
EXTRACT_LOCAL_CLASSES = NO
|
||||
EXTRACT_LOCAL_METHODS = NO
|
||||
EXTRACT_ANON_NSPACES = NO
|
||||
HIDE_UNDOC_MEMBERS = YES
|
||||
HIDE_UNDOC_CLASSES = YES
|
||||
HIDE_FRIEND_COMPOUNDS = NO
|
||||
HIDE_IN_BODY_DOCS = NO
|
||||
INTERNAL_DOCS = NO
|
||||
CASE_SENSE_NAMES = YES
|
||||
HIDE_SCOPE_NAMES = NO
|
||||
SHOW_INCLUDE_FILES = NO
|
||||
INLINE_INFO = YES
|
||||
SORT_MEMBER_DOCS = NO
|
||||
SORT_BRIEF_DOCS = NO
|
||||
SORT_GROUP_NAMES = NO
|
||||
SORT_BY_SCOPE_NAME = NO
|
||||
GENERATE_TODOLIST = NO
|
||||
GENERATE_TESTLIST = NO
|
||||
GENERATE_BUGLIST = NO
|
||||
GENERATE_DEPRECATEDLIST = YES
|
||||
ENABLED_SECTIONS =
|
||||
MAX_INITIALIZER_LINES = 30
|
||||
SHOW_USED_FILES = YES
|
||||
SHOW_DIRECTORIES = NO
|
||||
SHOW_FILES = YES
|
||||
SHOW_NAMESPACES = YES
|
||||
FILE_VERSION_FILTER =
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to warning and progress messages
|
||||
#---------------------------------------------------------------------------
|
||||
QUIET = NO
|
||||
WARNINGS = YES
|
||||
WARN_IF_UNDOCUMENTED = YES
|
||||
WARN_IF_DOC_ERROR = YES
|
||||
WARN_NO_PARAMDOC = YES
|
||||
WARN_FORMAT = "$file:$line: $text"
|
||||
WARN_LOGFILE =
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the input files
|
||||
#---------------------------------------------------------------------------
|
||||
INPUT = @CMAKE_SOURCE_DIR@/doc/fluidsynth-v20-devdoc.txt @CMAKE_SOURCE_DIR@/include @CMAKE_SOURCE_DIR@/include/fluidsynth @CMAKE_SOURCE_DIR@/src @CMAKE_BINARY_DIR@/include/fluidsynth
|
||||
INPUT_ENCODING = UTF-8
|
||||
FILE_PATTERNS = *.c *.h
|
||||
RECURSIVE = YES
|
||||
EXCLUDE =
|
||||
EXCLUDE_SYMLINKS = NO
|
||||
EXCLUDE_PATTERNS = fluid_*.h
|
||||
EXCLUDE_SYMBOLS =
|
||||
EXAMPLE_PATH = @CMAKE_SOURCE_DIR@/doc
|
||||
EXAMPLE_PATTERNS = *.c
|
||||
EXAMPLE_RECURSIVE = NO
|
||||
IMAGE_PATH =
|
||||
INPUT_FILTER =
|
||||
FILTER_PATTERNS =
|
||||
FILTER_SOURCE_FILES = NO
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to source browsing
|
||||
#---------------------------------------------------------------------------
|
||||
SOURCE_BROWSER = NO
|
||||
INLINE_SOURCES = NO
|
||||
STRIP_CODE_COMMENTS = YES
|
||||
REFERENCED_BY_RELATION = YES
|
||||
REFERENCES_RELATION = YES
|
||||
REFERENCES_LINK_SOURCE = YES
|
||||
USE_HTAGS = NO
|
||||
VERBATIM_HEADERS = NO
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the alphabetical class index
|
||||
#---------------------------------------------------------------------------
|
||||
ALPHABETICAL_INDEX = YES
|
||||
COLS_IN_ALPHA_INDEX = 5
|
||||
IGNORE_PREFIX =
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the HTML output
|
||||
#---------------------------------------------------------------------------
|
||||
GENERATE_HTML = YES
|
||||
HTML_OUTPUT = html
|
||||
HTML_FILE_EXTENSION = .html
|
||||
HTML_HEADER =
|
||||
HTML_FOOTER =
|
||||
HTML_EXTRA_STYLESHEET = @CMAKE_SOURCE_DIR@/doc/doxy_formula.css
|
||||
HTML_ALIGN_MEMBERS = YES
|
||||
HTML_EXTRA_FILES = @CMAKE_SOURCE_DIR@/doc/fluidsettings.xml @CMAKE_SOURCE_DIR@/doc/fluidsettings.xsl
|
||||
GENERATE_HTMLHELP = NO
|
||||
GENERATE_DOCSET = NO
|
||||
DOCSET_FEEDNAME = "Doxygen generated docs"
|
||||
DOCSET_BUNDLE_ID = org.doxygen.Project
|
||||
HTML_DYNAMIC_SECTIONS = YES
|
||||
CHM_FILE =
|
||||
HHC_LOCATION =
|
||||
GENERATE_CHI = NO
|
||||
CHM_INDEX_ENCODING =
|
||||
BINARY_TOC = NO
|
||||
TOC_EXPAND = NO
|
||||
DISABLE_INDEX = NO
|
||||
ENUM_VALUES_PER_LINE = 4
|
||||
GENERATE_TREEVIEW = NO
|
||||
TREEVIEW_WIDTH = 250
|
||||
FORMULA_FONTSIZE = 10
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the LaTeX output
|
||||
#---------------------------------------------------------------------------
|
||||
GENERATE_LATEX = NO
|
||||
LATEX_OUTPUT = latex
|
||||
LATEX_CMD_NAME = latex
|
||||
MAKEINDEX_CMD_NAME = makeindex
|
||||
COMPACT_LATEX = NO
|
||||
PAPER_TYPE = a4wide
|
||||
EXTRA_PACKAGES =
|
||||
LATEX_HEADER =
|
||||
PDF_HYPERLINKS = YES
|
||||
USE_PDFLATEX = YES
|
||||
LATEX_BATCHMODE = NO
|
||||
LATEX_HIDE_INDICES = NO
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the RTF output
|
||||
#---------------------------------------------------------------------------
|
||||
GENERATE_RTF = NO
|
||||
RTF_OUTPUT = rtf
|
||||
COMPACT_RTF = NO
|
||||
RTF_HYPERLINKS = NO
|
||||
RTF_STYLESHEET_FILE =
|
||||
RTF_EXTENSIONS_FILE =
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the man page output
|
||||
#---------------------------------------------------------------------------
|
||||
GENERATE_MAN = NO
|
||||
MAN_OUTPUT = man
|
||||
MAN_EXTENSION = .3
|
||||
MAN_LINKS = NO
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the XML output
|
||||
#---------------------------------------------------------------------------
|
||||
GENERATE_XML = NO
|
||||
XML_OUTPUT = xml
|
||||
XML_SCHEMA =
|
||||
XML_DTD =
|
||||
XML_PROGRAMLISTING = YES
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options for the AutoGen Definitions output
|
||||
#---------------------------------------------------------------------------
|
||||
GENERATE_AUTOGEN_DEF = NO
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the Perl module output
|
||||
#---------------------------------------------------------------------------
|
||||
GENERATE_PERLMOD = NO
|
||||
PERLMOD_LATEX = NO
|
||||
PERLMOD_PRETTY = YES
|
||||
PERLMOD_MAKEVAR_PREFIX =
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration options related to the preprocessor
|
||||
#---------------------------------------------------------------------------
|
||||
ENABLE_PREPROCESSING = YES
|
||||
MACRO_EXPANSION = NO
|
||||
EXPAND_ONLY_PREDEF = NO
|
||||
SEARCH_INCLUDES = YES
|
||||
INCLUDE_PATH =
|
||||
INCLUDE_FILE_PATTERNS =
|
||||
PREDEFINED = __DOXYGEN__
|
||||
EXPAND_AS_DEFINED =
|
||||
SKIP_FUNCTION_MACROS = YES
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration::additions related to external references
|
||||
#---------------------------------------------------------------------------
|
||||
TAGFILES =
|
||||
GENERATE_TAGFILE =
|
||||
ALLEXTERNALS = NO
|
||||
EXTERNAL_GROUPS = YES
|
||||
PERL_PATH = /usr/bin/perl
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration options related to the dot tool
|
||||
#---------------------------------------------------------------------------
|
||||
CLASS_DIAGRAMS = YES
|
||||
MSCGEN_PATH =
|
||||
HIDE_UNDOC_RELATIONS = YES
|
||||
HAVE_DOT = NO
|
||||
DOT_FONTNAME = FreeSans
|
||||
DOT_FONTPATH =
|
||||
CLASS_GRAPH = YES
|
||||
COLLABORATION_GRAPH = YES
|
||||
GROUP_GRAPHS = YES
|
||||
UML_LOOK = NO
|
||||
TEMPLATE_RELATIONS = YES
|
||||
INCLUDE_GRAPH = YES
|
||||
INCLUDED_BY_GRAPH = YES
|
||||
CALL_GRAPH = NO
|
||||
CALLER_GRAPH = NO
|
||||
GRAPHICAL_HIERARCHY = YES
|
||||
DIRECTORY_GRAPH = YES
|
||||
DOT_IMAGE_FORMAT = png
|
||||
DOT_PATH =
|
||||
DOTFILE_DIRS =
|
||||
DOT_GRAPH_MAX_NODES = 50
|
||||
MAX_DOT_GRAPH_DEPTH = 1000
|
||||
DOT_TRANSPARENT = YES
|
||||
DOT_MULTI_TARGETS = NO
|
||||
GENERATE_LEGEND = YES
|
||||
DOT_CLEANUP = YES
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration::additions related to the search engine
|
||||
#---------------------------------------------------------------------------
|
||||
SEARCHENGINE = YES
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
13
singe/thirdparty/fluidsynth/doc/README
vendored
13
singe/thirdparty/fluidsynth/doc/README
vendored
|
@ -1,13 +0,0 @@
|
|||
To build FluidSynth API reference documentation, make sure you have Doxygen
|
||||
installed.
|
||||
|
||||
If you are using the cmake build system, change to the build directory and
|
||||
execute the following command in this doc/ directory:
|
||||
|
||||
$ make doxygen
|
||||
|
||||
The latest generated API HTML docs can also be found at:
|
||||
http://www.fluidsynth.org/api/
|
||||
|
||||
Even more documentation references are provided on our wiki page:
|
||||
https://github.com/FluidSynth/fluidsynth/wiki/Documentation
|
|
@ -1,2 +0,0 @@
|
|||
external
|
||||
|
|
@ -1,140 +0,0 @@
|
|||
#
|
||||
# The public targets in this Makefile are: build, clean, wipe
|
||||
#
|
||||
# What `build` target does:
|
||||
#
|
||||
# - build cerbero to build glib, libogg, libvorbis, libflac, and libsndfile.
|
||||
# - build glib-2.0.so and many other dependency shared libraries
|
||||
# - build Oboe shared library
|
||||
# - build libfluidsynth.so
|
||||
# - build libfluidsynth-assetloader.so
|
||||
#
|
||||
# Android app developers are supposed to copy all those shared
|
||||
# libraries into their apks (per ABI).
|
||||
#
|
||||
PWD=$(shell pwd)
|
||||
CERBERO=$(PWD)/external/cerbero
|
||||
OBOE=$(PWD)/external/oboe
|
||||
CMAKE=cmake
|
||||
|
||||
ANDROID_NDK = $(PWD)/external/cerbero/build/android-ndk-18
|
||||
|
||||
ABIS_SIMPLE = x86 x86-64 armv7 arm64
|
||||
|
||||
|
||||
DIST_PATH=$(CERBERO)/build/dist
|
||||
OBOE_BUILD_PATH=$(OBOE)/build
|
||||
|
||||
all: build
|
||||
|
||||
.PHONY: prepare
|
||||
prepare: checkout-oboe checkout-cerbero
|
||||
for abi in $(ABIS_SIMPLE) ; do \
|
||||
cd $(CERBERO) && ./cerbero-uninstalled -c config/cross-android-$$abi.cbc bootstrap && cd $(PWD) ; \
|
||||
done
|
||||
|
||||
.PHONY: checkout-oboe
|
||||
checkout-oboe: $(OBOE)
|
||||
cd $(OBOE) && git checkout 9bf3943
|
||||
|
||||
$(OBOE):
|
||||
git clone https://github.com/Google/oboe.git $(OBOE)
|
||||
|
||||
.PHONY: checkout-cerbero
|
||||
checkout-cerbero: $(CERBERO)
|
||||
cd $(CERBERO) && git checkout 0acd9b0
|
||||
|
||||
$(CERBERO):
|
||||
git clone https://github.com/atsushieno/cerbero.git $(CERBERO)
|
||||
|
||||
.PHONY: build
|
||||
build: build-oboe dist-oboe build-deps-cerbero dist-deps-cerbero build-fluidsynth dist-fluidsynth build-fluidsynth-assetloader dist-fluidsynth-assetloader
|
||||
|
||||
.PHONY: build-deps-cerbero
|
||||
build-deps-cerbero:
|
||||
for abi in $(ABIS_SIMPLE) ; do \
|
||||
cd $(CERBERO) && ./cerbero-uninstalled -c config/cross-android-$$abi.cbc build glib libsndfile && cd $(PWD) ; \
|
||||
done
|
||||
|
||||
define run_make_abi_target
|
||||
make -f Makefile.android BUILD_ABI=$(1) A_ABI=$(2) $(3)
|
||||
endef
|
||||
define run_make_abi_target-unsafe
|
||||
if make -f Makefile.android BUILD_ABI=$(1) A_ABI=$(2) $(3) ; then \
|
||||
echo "ignore failure for $(1)..." ; \
|
||||
fi
|
||||
endef
|
||||
|
||||
define run_make_for_all_abi
|
||||
$(call run_make_abi_target,x86,x86,$(1) )
|
||||
$(call run_make_abi_target,x86_64,x86_64,$(1) )
|
||||
$(call run_make_abi_target,armv7,armeabi-v7a,$(1) )
|
||||
$(call run_make_abi_target-unsafe,arm64,arm64-v8a,$(1) )
|
||||
endef
|
||||
|
||||
.PHONY: dist-deps-cerbero
|
||||
dist-deps-cerbero:
|
||||
$(call run_make_for_all_abi, dist-deps-cerbero-one)
|
||||
|
||||
.PHONY: dist-fluidsynth
|
||||
dist-fluidsynth:
|
||||
$(call run_make_for_all_abi, dist-fluidsynth-one)
|
||||
|
||||
.PHONY: build-oboe
|
||||
build-oboe:
|
||||
$(call run_make_for_all_abi, build-oboe-one)
|
||||
|
||||
.PHONY: dist-oboe
|
||||
dist-oboe:
|
||||
$(call run_make_for_all_abi, dist-oboe-one)
|
||||
|
||||
.PHONY: build-fluidsynth
|
||||
build-fluidsynth:
|
||||
$(call run_make_for_all_abi, build-fluidsynth-one)
|
||||
|
||||
build-fluidsynth-one:
|
||||
mkdir -p build/$(A_ABI) && cd build/$(A_ABI) && \
|
||||
LD_RUN_PATH=$(DIST_PATH)/android-$(BUILD_ABI)/lib:$(OBOE_BUILD_PATH)/$(A_ABI) \
|
||||
LD_LIBRARY_PATH=$(DIST_PATH)/android_$(BUILD_ABI)/lib \
|
||||
PKG_CONFIG_PATH=$(DIST_PATH)/android_$(BUILD_ABI)/lib/pkgconfig/:$(OBOE_BUILD_PATH)/$(A_ABI) \
|
||||
PKG_CONFIG_LIBDIR=$(DIST_PATH)/android_$(BUILD_ABI)/lib/pkgconfig/:$(OBOE_BUILD_PATH)/$(A_ABI) \
|
||||
$(CMAKE) -DCMAKE_INSTALL_PREFIX=$(PWD)/dist/$(A_ABI) \
|
||||
-Denable-floats=1 \
|
||||
-DCMAKE_VERBOSE_MAKEFILE=1 \
|
||||
-DCMAKE_TOOLCHAIN_FILE=$(ANDROID_NDK)/build/cmake/android.toolchain.cmake \
|
||||
-Denable-opensles=on -Denable-oboe=on -Denable-oss=off -Denable-libsndfile=on \
|
||||
-DANDROID_NATIVE_API_LEVEL=android-27 -DANDROID_PLATFORM=android-27 -DANDROID_ABI=$(A_ABI) ../../../.. && \
|
||||
make
|
||||
|
||||
build-oboe-one:
|
||||
mkdir -p $(OBOE)/build/$(A_ABI) && cd $(OBOE)/build/$(A_ABI) && \
|
||||
$(CMAKE) -DCMAKE_TOOLCHAIN_FILE=$(ANDROID_NDK)/build/cmake/android.toolchain.cmake -DANDROID_ABI=$(A_ABI) -DANDROID_NATIVE_API_LEVEL=android-27 -DANDROID_PLATFORM=android-27 -DBUILD_SHARED_LIBS=on ../.. && make
|
||||
cp oboe-1.0.pc $(OBOE)/build/$(A_ABI)
|
||||
|
||||
dist-oboe-one:
|
||||
mkdir -p dist/$(A_ABI) && cp $(OBOE)/build/$(A_ABI)/*.so dist/$(A_ABI)/
|
||||
|
||||
dist-deps-cerbero-one:
|
||||
mkdir -p dist/$(A_ABI) && cd dist/$(A_ABI) && cp ../../external/cerbero/build/dist/android_$(BUILD_ABI)/lib/*.so . && cd ../..
|
||||
|
||||
dist-fluidsynth-one:
|
||||
mkdir -p dist/$(A_ABI) && cd dist/$(A_ABI) && cp ../../build/$(A_ABI)/src/libfluidsynth.so . && cd ../..
|
||||
cp -r ../../include/fluidsynth build/$(A_ABI)/include/
|
||||
|
||||
build-fluidsynth-assetloader:
|
||||
cd fluidsynth-assetloader && ./ext-build.sh
|
||||
|
||||
dist-fluidsynth-assetloader:
|
||||
cp fluidsynth-assetloader/build/x86/*.so dist/x86/
|
||||
cp fluidsynth-assetloader/build/x86_64/*.so dist/x86_64/
|
||||
cp fluidsynth-assetloader/build/armeabi-v7a/*.so dist/armeabi-v7a/
|
||||
cp fluidsynth-assetloader/build/arm64-v8a/*.so dist/arm64-v8a/
|
||||
|
||||
clean:
|
||||
rm -rf dist/* build/* external/oboe/build/* obj/local/* fluidsynth-asset-loader/build/*
|
||||
|
||||
.PHONY: wipe
|
||||
wipe: $(CERBERO)
|
||||
for abi in $(ABIS_SIMPLE) ; do \
|
||||
cd $(CERBERO) && ./cerbero-uninstalled -c config/cross-android-$$abi.cbc wipe && cd ../.. ; \
|
||||
done
|
|
@ -1,38 +0,0 @@
|
|||
# Android support in Fluidsynth
|
||||
|
||||
Fluidsynth supports Android audio outputs by Oboe and OpenSLES audio drivers.
|
||||
|
||||
Android also has Android MIDI API which is exposed only in Android Java API, but it is not exposed as a native API, therefore there is no `mdriver` support for Android. There is an example MidiDeviceService implementation for Fluidsynth at: https://github.com/atsushieno/fluidsynth-midi-service-j
|
||||
|
||||
## Usage
|
||||
|
||||
`libfluidsynth.so` and `libfluidsynth-assetloader.so` are the library that should be packaged into apk. The latter is for asset-based "sfloader".
|
||||
|
||||
By default, "oboe" is the default driver for Android. You can also explicitly specify "opensles" instead, with "audio.driver" setting:
|
||||
|
||||
```
|
||||
fluid_settings_setstr (settings_handle, "audio.driver", "opensles");
|
||||
```
|
||||
|
||||
## Custom SoundFont loader
|
||||
|
||||
Since Android file access is quite limited and there is no common place
|
||||
to store soundfonts unlike Linux desktop (e.g. `/usr/share/sounds/sf2`), you
|
||||
will most likely have to provide custom soundfont loader.
|
||||
|
||||
Since version 2.0.0 Fluidsynth comes with `fluid_sfloader_set_callbacks()` which brings
|
||||
[customizible file/stream reader](https://github.com/FluidSynth/fluidsynth/issues/241) (open/read/seek/tell/close). It is useful to implement simplified
|
||||
custom SF loader e.g. with Android assets or OBB streams.
|
||||
|
||||
The Android implementation is in separate library called `libfluidsynth-assetloader.so`. It comes with native Asset sfloader. However, its usage is a bit tricky because AssetManager needs to be passed from Java code (even though we use AAssetManager API).
|
||||
Use `Java_fluidsynth_androidextensions_NativeHandler_setAssetManagerContext()` to initialize the this loader, then call `new_fluid_android_asset_sfloader()` to create a new sfloader. If you already have AAssetManager instance, then the first JNI function is ignorable and you only have to specify the manager to the second function.
|
||||
|
||||
There is [an example source code](https://github.com/atsushieno/fluidsynth-midi-service-j/blob/a2a56b/fluidsynthjna/src/main/java/fluidsynth/androidextensions/AndroidNativeAssetSoundFontLoader.kt#L17) on how to do it.
|
||||
|
||||
## Building
|
||||
|
||||
By default, you are supposed to provide `PKG_CONFIG_PATH` to glib etc. as well as oboe. There is nothing special.
|
||||
|
||||
However, in reality, Oboe does not come up with an official package specification, so you will have to create it manually... unless you use `oboe-1.0.pc` in this directory as well as the build system set up here.
|
||||
|
||||
There are "non-normative" build scripts i.e. `Makefile.android` and a couple of helper files in this directory. In case you don't have any dependencies such as glib for Android, then it would be helpful.
|
|
@ -1,18 +0,0 @@
|
|||
cmake_minimum_required(VERSION 3.6.0)
|
||||
|
||||
project ( fluidsynth-assetloader C )
|
||||
|
||||
set ( fluidsynth-assetloader_sources fluid_androidasset.c )
|
||||
|
||||
add_library ( fluidsynth-assetloader SHARED ${fluidsynth-assetloader_sources} )
|
||||
|
||||
target_compile_options ( fluidsynth-assetloader
|
||||
PRIVATE -v
|
||||
PRIVATE -Wall
|
||||
PRIVATE "$<$<CONFIG:DEBUG>:-Werror>") # Only include -Werror when building debug config
|
||||
|
||||
include_directories ( ../../../include )
|
||||
|
||||
set ( CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -L../../../dist/${ANDROID_ABI} -lfluidsynth" )
|
||||
|
||||
target_link_libraries ( fluidsynth-assetloader PRIVATE log android )
|
|
@ -1,16 +0,0 @@
|
|||
PWD=`pwd`
|
||||
|
||||
ABIS="x86 x86_64 armeabi-v7a arm64-v8a"
|
||||
|
||||
HOST_OS=`uname | tr [:upper:] [:lower:]`
|
||||
|
||||
ANDROID_NDK_PATH=~/android-sdk-$HOST_OS/ndk-bundle
|
||||
CMAKEFILE=$ANDROID_NDK_PATH/build/cmake/android.toolchain.cmake
|
||||
|
||||
for A_ABI in $ABIS ; do
|
||||
mkdir -p build/$A_ABI && \
|
||||
cd build/$A_ABI && \
|
||||
cmake -DCMAKE_TOOLCHAIN_FILE=$CMAKEFILE -DANDROID_PLATFORM=android-27 -DANDROID_ABI=$A_ABI ../.. && \
|
||||
make &&
|
||||
cd ../.. ;
|
||||
done
|
|
@ -1,110 +0,0 @@
|
|||
/* FluidSynth - A Software Synthesizer
|
||||
*
|
||||
* Copyright (C) 2003 Peter Hanappe and others.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public License
|
||||
* as published by the Free Software Foundation; either version 2.1 of
|
||||
* the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301, USA
|
||||
*/
|
||||
|
||||
#if defined(ANDROID) || defined(__DOXYGEN__)
|
||||
|
||||
#define FLUIDSYNTH_API
|
||||
#include <stdlib.h>
|
||||
#include <jni.h>
|
||||
#include "fluid_androidasset.h"
|
||||
#include <android/asset_manager.h>
|
||||
#include <android/asset_manager_jni.h>
|
||||
|
||||
|
||||
AAssetManager *fluid_android_asset_manager;
|
||||
|
||||
fluid_sfloader_t* new_fluid_android_asset_sfloader(fluid_settings_t *settings, void *assetManager)
|
||||
{
|
||||
fluid_sfloader_t *loader;
|
||||
|
||||
if (settings == NULL)
|
||||
return NULL;
|
||||
|
||||
if (!fluid_android_asset_manager)
|
||||
fluid_android_asset_manager = (AAssetManager*) assetManager;
|
||||
|
||||
if (fluid_android_asset_manager == NULL)
|
||||
return NULL;
|
||||
|
||||
loader = new_fluid_defsfloader(settings);
|
||||
if (loader == NULL)
|
||||
return NULL;
|
||||
|
||||
fluid_sfloader_set_callbacks(loader,
|
||||
asset_open,
|
||||
asset_read,
|
||||
asset_seek,
|
||||
asset_tell,
|
||||
asset_close);
|
||||
|
||||
return loader;
|
||||
}
|
||||
|
||||
/* This is a compromised solution for JNAerator for that 1) it cannot handle jobject with JNIEnv as parameters, and that 2) the returned pointer can be converted in the same manner that JNAerated methods. (Most likely my JNA usage issue but no one has answer for it.) */
|
||||
void Java_fluidsynth_androidextensions_NativeHandler_setAssetManagerContext(JNIEnv *env, jobject _this, jobject assetManager)
|
||||
{
|
||||
if (assetManager == NULL)
|
||||
return;
|
||||
|
||||
fluid_android_asset_manager = AAssetManager_fromJava (env, assetManager);
|
||||
}
|
||||
|
||||
void *asset_open(const char *path)
|
||||
{
|
||||
if (fluid_android_asset_manager == NULL)
|
||||
return NULL;
|
||||
|
||||
return AAssetManager_open (fluid_android_asset_manager, path, AASSET_MODE_RANDOM);
|
||||
}
|
||||
|
||||
int asset_close(void *handle)
|
||||
{
|
||||
AAsset *asset;
|
||||
|
||||
asset = (AAsset*) handle;
|
||||
AAsset_close (asset);
|
||||
return 0;
|
||||
}
|
||||
|
||||
long asset_tell(void *handle)
|
||||
{
|
||||
AAsset *asset;
|
||||
|
||||
asset = (AAsset*) handle;
|
||||
return AAsset_getLength(asset) - AAsset_getRemainingLength(asset);
|
||||
}
|
||||
|
||||
int asset_seek(void *handle, long offset, int origin)
|
||||
{
|
||||
AAsset *asset;
|
||||
|
||||
asset = (AAsset*) handle;
|
||||
return AAsset_seek (asset, (off_t) offset, origin);
|
||||
}
|
||||
|
||||
int asset_read(void *buf, int count, void *handle)
|
||||
{
|
||||
AAsset *asset;
|
||||
|
||||
asset = (AAsset*) handle;
|
||||
return AAsset_read (asset, buf, (size_t) count);
|
||||
}
|
||||
|
||||
#endif /* if defined(ANDROID) || defined(__DOXYGEN__) */
|
|
@ -1,45 +0,0 @@
|
|||
/* FluidSynth - A Software Synthesizer
|
||||
*
|
||||
* Copyright (C) 2003 Peter Hanappe and others.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public License
|
||||
* as published by the Free Software Foundation; either version 2.1 of
|
||||
* the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301, USA
|
||||
*/
|
||||
|
||||
|
||||
#ifndef _PRIV_FLUID_ANDROIDASSET_H
|
||||
#define _PRIV_FLUID_ANDROIDASSET_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <fluidsynth/types.h>
|
||||
#include <fluidsynth/sfont.h>
|
||||
|
||||
fluid_sfloader_t* new_fluid_android_asset_sfloader(fluid_settings_t *settings, void *assetManager);
|
||||
void Java_fluidsynth_androidextensions_NativeHandler_setAssetManagerContext(JNIEnv *env, jobject _this, jobject assetManager);
|
||||
|
||||
void *asset_open(const char *path);
|
||||
int asset_close(void *handle);
|
||||
long asset_tell(void *handle);
|
||||
int asset_seek(void *handle, long offset, int origin);
|
||||
int asset_read(void *buf, int count, void *handle);
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* extern "C" */
|
||||
#endif
|
||||
|
||||
#endif /* _PRIV_FLUID_ANDROIDASSET_H */
|
|
@ -1,44 +0,0 @@
|
|||
LOCAL_PATH := $(call my-dir)
|
||||
TARGET_PLATFORM := android-27
|
||||
|
||||
GLIB_LIB = ../dep/$(APP_ABI)/
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
LOCAL_MODULE := glib-2.0
|
||||
LOCAL_SRC_FILES := $(GLIB_LIB)/libglib-2.0.a
|
||||
include $(PREBUILT_STATIC_LIBRARY)
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
LOCAL_MODULE := iconv
|
||||
LOCAL_SRC_FILES := $(GLIB_LIB)/libiconv.a
|
||||
include $(PREBUILT_STATIC_LIBRARY)
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
LOCAL_MODULE := intl
|
||||
LOCAL_SRC_FILES := $(GLIB_LIB)/libintl.a
|
||||
include $(PREBUILT_STATIC_LIBRARY)
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
LOCAL_MODULE := oboe
|
||||
LOCAL_SRC_FILES := $(GLIB_LIB)/liboboe.a
|
||||
include $(PREBUILT_STATIC_LIBRARY)
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
LOCAL_MODULE := fluidsynth_static
|
||||
LOCAL_SRC_FILES := ../dep/$(APP_ABI)/libfluidsynth.a
|
||||
include $(PREBUILT_STATIC_LIBRARY)
|
||||
|
||||
LOCAL_MODULE := fluidsynth
|
||||
|
||||
ifeq ($(NDK_DEBUG),1)
|
||||
cmd-strip :=
|
||||
endif
|
||||
|
||||
LOCAL_STATIC_LIBRARIES := glib-2.0 iconv intl oboe
|
||||
|
||||
LOCAL_WHOLE_STATIC_LIBRARIES := fluidsynth_static
|
||||
|
||||
LOCAL_LDLIBS := -lc -lOpenSLES -ldl -llog -landroid -L$(LOCAL_PATH)/../dist/$(APP_ABI) -loboe-c
|
||||
|
||||
include $(BUILD_SHARED_LIBRARY)
|
||||
|
|
@ -1,2 +0,0 @@
|
|||
APP_PLATFORM := android-21
|
||||
APP_ABI := x86 x86_64 armeabi-v7a arm64-v8a
|
|
@ -1,10 +0,0 @@
|
|||
prefix=${pcfiledir}
|
||||
exec_prefix=${prefix}
|
||||
libdir=${prefix}
|
||||
includedir=${prefix}/../../include/
|
||||
|
||||
Name: Oboe
|
||||
Description: Oboe library
|
||||
Version: 1.0.0
|
||||
Libs: -L${libdir} -loboe -landroid -llog -lstdc++
|
||||
Cflags: -I${includedir}
|
12
singe/thirdparty/fluidsynth/doc/doxy_formula.css
vendored
12
singe/thirdparty/fluidsynth/doc/doxy_formula.css
vendored
|
@ -1,12 +0,0 @@
|
|||
|
||||
code {
|
||||
background-color: #eeeeee;
|
||||
text-shadow: none;
|
||||
color: black;
|
||||
margin-left: 4px;
|
||||
margin-right: 4px;
|
||||
padding-left: 4px;
|
||||
padding-right: 4px;
|
||||
border-radius: 3px;
|
||||
white-space: nowrap;
|
||||
}
|
75
singe/thirdparty/fluidsynth/doc/example.c
vendored
75
singe/thirdparty/fluidsynth/doc/example.c
vendored
|
@ -1,75 +0,0 @@
|
|||
/*
|
||||
|
||||
An example of how to use FluidSynth.
|
||||
|
||||
To compile it on Linux:
|
||||
$ gcc -o example example.c `pkg-config fluidsynth --libs`
|
||||
|
||||
To compile it on Windows:
|
||||
...
|
||||
|
||||
|
||||
Author: Peter Hanappe.
|
||||
This code is in the public domain. Use it as you like.
|
||||
|
||||
*/
|
||||
|
||||
#include <fluidsynth.h>
|
||||
|
||||
#if defined(WIN32)
|
||||
#include <windows.h>
|
||||
#define sleep(_t) Sleep(_t * 1000)
|
||||
#else
|
||||
#include <stdlib.h>
|
||||
#endif
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
fluid_settings_t *settings;
|
||||
fluid_synth_t *synth;
|
||||
fluid_audio_driver_t *adriver;
|
||||
int sfont_id;
|
||||
int i, key;
|
||||
|
||||
/* Create the settings. */
|
||||
settings = new_fluid_settings();
|
||||
|
||||
/* Change the settings if necessary*/
|
||||
|
||||
/* Create the synthesizer. */
|
||||
synth = new_fluid_synth(settings);
|
||||
|
||||
/* Create the audio driver. The synthesizer starts playing as soon
|
||||
as the driver is created. */
|
||||
adriver = new_fluid_audio_driver(settings, synth);
|
||||
|
||||
/* Load a SoundFont and reset presets (so that new instruments
|
||||
* get used from the SoundFont) */
|
||||
sfont_id = fluid_synth_sfload(synth, "example.sf2", 1);
|
||||
|
||||
/* Initialize the random number generator */
|
||||
srand(getpid());
|
||||
|
||||
for(i = 0; i < 12; i++)
|
||||
{
|
||||
|
||||
/* Generate a random key */
|
||||
key = 60 + (int)(12.0f * rand() / (float) RAND_MAX);
|
||||
|
||||
/* Play a note */
|
||||
fluid_synth_noteon(synth, 0, key, 80);
|
||||
|
||||
/* Sleep for 1 second */
|
||||
sleep(1);
|
||||
|
||||
/* Stop the note */
|
||||
fluid_synth_noteoff(synth, 0, key);
|
||||
}
|
||||
|
||||
/* Clean up */
|
||||
delete_fluid_audio_driver(adriver);
|
||||
delete_fluid_synth(synth);
|
||||
delete_fluid_settings(settings);
|
||||
|
||||
return 0;
|
||||
}
|
726
singe/thirdparty/fluidsynth/doc/fluidsettings.xml
vendored
726
singe/thirdparty/fluidsynth/doc/fluidsettings.xml
vendored
|
@ -1,726 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
NOTE: You're not expected to look at this raw XML file. Please open it in a webbrowser, favourably firefox,
|
||||
and it should display a nice HTML page. Make sure the fluidsettings.xsl stylesheet is provided in the
|
||||
same directory as the fluidsettings.xml
|
||||
|
||||
Some browsers may not allow local XML files to be rendered and display blank page instead. Please
|
||||
consult the web on how to make your browser display XSLT content. For instance if you're using Chrome
|
||||
and open the file locally you'll need to start Chrome with the "allow-file-access-from-files" flag.
|
||||
|
||||
https://stackoverflow.com/a/3839054
|
||||
https://stackoverflow.com/a/6251757
|
||||
|
||||
Developers: Settings can be deprecated by adding: <deprecated>SOME TEXT</deprecated>
|
||||
-->
|
||||
<?xml-stylesheet type="text/xsl" href="fluidsettings.xsl"?>
|
||||
<fluidsettings>
|
||||
<synth>
|
||||
<setting>
|
||||
<isFirst>Synthesizer settings</isFirst>
|
||||
<name>audio-channels</name>
|
||||
<type>int</type>
|
||||
<def>1</def>
|
||||
<min>1</min>
|
||||
<max>128</max>
|
||||
<desc>
|
||||
By default, the synthesizer outputs a single stereo signal. Using this option, the synthesizer can output multi-channel audio. Sets the number of stereo channel pairs. So 1 is actually 2 channels (a stereo pair).</desc>
|
||||
</setting>
|
||||
<setting>
|
||||
<name>audio-groups</name>
|
||||
<type>int</type>
|
||||
<def>1</def>
|
||||
<min>1</min>
|
||||
<max>128</max>
|
||||
<desc>
|
||||
The output audio channel associated with a MIDI channel is wrapped around using the number of synth.audio-groups as modulo divider. This is typically the number of output channels on the sound card, as long as the LADSPA Fx unit is not used. In case of LADSPA unit, think of it as subgroups on a mixer.</desc>
|
||||
</setting>
|
||||
<setting>
|
||||
<name>chorus.active</name>
|
||||
<type>bool</type>
|
||||
<def>1 (TRUE)</def>
|
||||
<desc>
|
||||
When set to 1 (TRUE) the chorus effects module is activated. Otherwise, no chorus will be added to the output signal. Note that the amount of signal sent to the chorus module depends on the "chorus send" generator defined in the SoundFont.</desc>
|
||||
</setting>
|
||||
<setting>
|
||||
<name>chorus.depth</name>
|
||||
<type>num</type>
|
||||
<def>8</def>
|
||||
<min>0</min>
|
||||
<max>256</max>
|
||||
<desc>
|
||||
Specifies the modulation depth of the chorus.</desc>
|
||||
</setting>
|
||||
<setting>
|
||||
<name>chorus.level</name>
|
||||
<type>num</type>
|
||||
<def>2</def>
|
||||
<min>0</min>
|
||||
<max>10</max>
|
||||
<desc>
|
||||
Specifies the output amplitude of the chorus signal.</desc>
|
||||
</setting>
|
||||
<setting>
|
||||
<name>chorus.nr</name>
|
||||
<type>int</type>
|
||||
<def>3</def>
|
||||
<min>0</min>
|
||||
<max>99</max>
|
||||
<desc>
|
||||
Sets the voice count of the chorus.</desc>
|
||||
</setting>
|
||||
<setting>
|
||||
<name>chorus.speed</name>
|
||||
<type>num</type>
|
||||
<def>0.3</def>
|
||||
<min>0.1</min>
|
||||
<max>5</max>
|
||||
<desc>
|
||||
Sets the modulation speed in Hz.</desc>
|
||||
</setting>
|
||||
<setting>
|
||||
<name>cpu-cores</name>
|
||||
<type>int</type>
|
||||
<def>1</def>
|
||||
<min>1</min>
|
||||
<max>256</max>
|
||||
<desc>
|
||||
Sets the number of synthesis CPU cores. If set to a value greater than 1, then additional synthesis threads will be created to take advantage of a multi CPU or CPU core system. This has the affect of utilizing more of the total CPU for voices or decreasing render times when synthesizing audio to a file.</desc>
|
||||
</setting>
|
||||
<setting>
|
||||
<name>default-soundfont</name>
|
||||
<type>str</type>
|
||||
<def>C:\soundfonts\default.sf2 (Windows),<br />
|
||||
${CMAKE_INSTALL_PREFIX}/share/soundfonts/default.sf2 (all others)</def>
|
||||
<desc>
|
||||
The default soundfont file to use by the fluidsynth executable. The default value can be overridden during compilation time by setting the DEFAULT_SOUNDFONT cmake variable.</desc>
|
||||
</setting>
|
||||
<setting>
|
||||
<name>device-id</name>
|
||||
<type>int</type>
|
||||
<def>0</def>
|
||||
<min>0</min>
|
||||
<max>126</max>
|
||||
<desc>
|
||||
Device identifier used for SYSEX commands, such as MIDI Tuning Standard commands. Only those SYSEX commands destined for this ID or to all devices will be acted upon.</desc>
|
||||
</setting>
|
||||
<setting>
|
||||
<name>dynamic-sample-loading</name>
|
||||
<type>bool</type>
|
||||
<def>0 (FALSE)</def>
|
||||
<desc>
|
||||
When set to 1 (TRUE), samples are loaded to and unloaded from memory
|
||||
on demand.
|
||||
</desc>
|
||||
</setting>
|
||||
<setting>
|
||||
<name>effects-channels</name>
|
||||
<type>int</type>
|
||||
<def>2</def>
|
||||
<min>2</min>
|
||||
<max>2</max>
|
||||
<desc>Specifies the number of effects per group. Currently there only are two effects (i.e. reverb and chorus).</desc>
|
||||
</setting>
|
||||
<setting>
|
||||
<name>effects-groups</name>
|
||||
<type>int</type>
|
||||
<def>1</def>
|
||||
<min>1</min>
|
||||
<max>128</max>
|
||||
<desc>Specifies the number of effect units. By default, the sound of all voices is rendered by one reverb unit and one chorus unit respectively (even for multi-channel rendering). This setting gives the user control which effects of a voice to render to which independent audio channels. E.g. setting synth.effects-groups == synth.midi-channels allows to render the effects of each MIDI channel to separate audio buffers. If synth.effects-groups is smaller, it will wrap around. Note that any value >1 will significantly increase CPU usage.</desc>
|
||||
</setting>
|
||||
<setting>
|
||||
<name>gain</name>
|
||||
<type>num</type>
|
||||
<def>0.2</def>
|
||||
<min>0.0</min>
|
||||
<max>10.0</max>
|
||||
<desc>The gain is applied to the final or master output of the synthesizer. It is set to a low value by default to avoid the saturation of the output when many notes are played.</desc>
|
||||
</setting>
|
||||
<setting>
|
||||
<name>ladspa.active</name>
|
||||
<type>bool</type>
|
||||
<def>0 (FALSE)</def>
|
||||
<desc>
|
||||
When set to "yes" the LADSPA subsystem will be enabled. This subsystem allows to load and interconnect LADSPA plug-ins. The output of the synthesizer is processed by the LADSPA subsystem. Note that the synthesizer has to be compiled with LADSPA support. More information about the LADSPA subsystem later.</desc>
|
||||
</setting>
|
||||
<setting>
|
||||
<name>lock-memory</name>
|
||||
<type>bool</type>
|
||||
<def>1 (TRUE)</def>
|
||||
<desc>
|
||||
Page-lock memory that contains audio sample data, if true.</desc>
|
||||
</setting>
|
||||
<setting>
|
||||
<name>midi-channels</name>
|
||||
<type>int</type>
|
||||
<def>16</def>
|
||||
<min>16</min>
|
||||
<max>256</max>
|
||||
<desc>
|
||||
This setting defines the number of MIDI channels of the synthesizer. The MIDI standard defines 16 channels, so MIDI hardware is limited to this number. Internally FluidSynth can use more channels which can be mapped to different MIDI sources.</desc>
|
||||
</setting>
|
||||
<setting>
|
||||
<name>midi-bank-select</name>
|
||||
<type>str</type>
|
||||
<def>gs</def>
|
||||
<vals>gm, gs, xg, mma</vals>
|
||||
<desc>
|
||||
This setting defines how the synthesizer interprets Bank Select messages.
|
||||
<ul>
|
||||
<li>gm: ignores CC0 and CC32 messages.</li>
|
||||
<li>gs: (default) CC0 becomes the bank number, CC32 is ignored.</li>
|
||||
<li>xg: CC32 becomes the bank number, CC0 toggles between melodic or drum channel.</li>
|
||||
<li>mma: bank is calculated as CC0*128+CC32.</li>
|
||||
</ul>
|
||||
</desc>
|
||||
</setting>
|
||||
<setting>
|
||||
<name>min-note-length</name>
|
||||
<type>int</type>
|
||||
<def>10</def>
|
||||
<min>0</min>
|
||||
<max>65535</max>
|
||||
<desc>
|
||||
Sets the minimum note duration in milliseconds. This ensures that really short duration note events, such as percussion notes, have a better chance of sounding as intended. Set to 0 to disable this feature.</desc>
|
||||
</setting>
|
||||
<setting>
|
||||
<name>overflow.age</name>
|
||||
<type>num</type>
|
||||
<def>1000</def>
|
||||
<min>-10000</min>
|
||||
<max>10000</max>
|
||||
<desc>
|
||||
This score is divided by the number of seconds this voice has been
|
||||
active and is added to the overflow priority. It is usually a positive
|
||||
value and gives voices which have just been started a higher priority,
|
||||
making them less likely to be killed in an overflow situation.
|
||||
</desc>
|
||||
</setting>
|
||||
<setting>
|
||||
<name>overflow.important</name>
|
||||
<type>num</type>
|
||||
<def>5000</def>
|
||||
<min>-50000</min>
|
||||
<max>50000</max>
|
||||
<desc>
|
||||
This score is added to voices on channels marked with the
|
||||
synth.overflow.important-channels setting.
|
||||
</desc>
|
||||
</setting>
|
||||
<setting>
|
||||
<name>overflow.important-channels</name>
|
||||
<type>str</type>
|
||||
<def>""</def>
|
||||
<desc>
|
||||
This setting is a comma-separated list of MIDI channel numbers that should
|
||||
be treated as "important" by the overflow calculation, adding the score
|
||||
set by synth.overflow.important to each voice on those channels. It can
|
||||
be used to make voices on particular MIDI channels
|
||||
less likely (synth.overflow.important > 0) or more likely
|
||||
(synth.overflow.important < 0) to be killed in an overflow situation. Channel
|
||||
numbers are 1-based, so the first MIDI channel is number 1.
|
||||
</desc>
|
||||
</setting>
|
||||
<setting>
|
||||
<name>overflow.percussion</name>
|
||||
<type>num</type>
|
||||
<def>4000</def>
|
||||
<min>-10000</min>
|
||||
<max>10000</max>
|
||||
<desc>
|
||||
Sets the overflow priority score added to voices on a percussion
|
||||
channel. This is usually a positive score, to give percussion voices
|
||||
a higher priority and less chance of being killed in an overflow
|
||||
situation.
|
||||
</desc>
|
||||
</setting>
|
||||
<setting>
|
||||
<name>overflow.released</name>
|
||||
<type>num</type>
|
||||
<def>-2000</def>
|
||||
<min>-10000</min>
|
||||
<max>10000</max>
|
||||
<desc>
|
||||
Sets the overflow priority score added to voices that have already
|
||||
received a note-off event. This is usually a negative score, to give released
|
||||
voices a lower priority so that they are killed first in an overflow
|
||||
situation.
|
||||
</desc>
|
||||
</setting>
|
||||
<setting>
|
||||
<name>overflow.sustained</name>
|
||||
<type>num</type>
|
||||
<def>-1000</def>
|
||||
<min>-10000</min>
|
||||
<max>10000</max>
|
||||
<desc>
|
||||
Sets the overflow priority score added to voices that are currently
|
||||
sustained. With the default value, sustained voices are considered less
|
||||
important and are more likely to be killed in an overflow situation.
|
||||
</desc>
|
||||
</setting>
|
||||
<setting>
|
||||
<name>overflow.volume</name>
|
||||
<type>num</type>
|
||||
<def>500</def>
|
||||
<min>-10000</min>
|
||||
<max>10000</max>
|
||||
<desc>
|
||||
Sets the overflow priority score added to voices based on their current
|
||||
volume. The voice volume is normalized to a value between 0 and 1 and
|
||||
multiplied with this setting. So voices with maximum volume get added
|
||||
the full score, voices with only half that volume get added half of this
|
||||
score.
|
||||
</desc>
|
||||
</setting>
|
||||
<setting>
|
||||
<name>polyphony</name>
|
||||
<type>int</type>
|
||||
<def>256</def>
|
||||
<min>1</min>
|
||||
<max>65535</max>
|
||||
<desc>
|
||||
The polyphony defines how many voices can be played in parallel. A note event produces one or more voices. Its good to set this to a value which the system can handle and will thus limit FluidSynth's CPU usage. When FluidSynth runs out of voices it will begin terminating lower priority voices for new note events.</desc>
|
||||
</setting>
|
||||
<setting>
|
||||
<name>reverb.active</name>
|
||||
<type>bool</type>
|
||||
<def>1 (TRUE)</def>
|
||||
<desc>
|
||||
When set to 1 (TRUE) the reverb effects module is activated. Otherwise, no reverb will be added to the output signal. Note that the amount of signal sent to the reverb module depends on the "reverb send" generator defined in the SoundFont.
|
||||
</desc>
|
||||
</setting>
|
||||
<setting>
|
||||
<name>reverb.damp</name>
|
||||
<type>num</type>
|
||||
<def>0</def>
|
||||
<min>0</min>
|
||||
<max>1</max>
|
||||
<desc>
|
||||
Sets the amount of reverb damping.</desc>
|
||||
</setting>
|
||||
<setting>
|
||||
<name>reverb.level</name>
|
||||
<type>num</type>
|
||||
<def>0.9</def>
|
||||
<min>0</min>
|
||||
<max>1</max>
|
||||
<desc>
|
||||
Sets the reverb output amplitude.</desc>
|
||||
</setting>
|
||||
<setting>
|
||||
<name>reverb.room-size</name>
|
||||
<type>num</type>
|
||||
<def>0.2</def>
|
||||
<min>0</min>
|
||||
<max>1</max>
|
||||
<desc>
|
||||
Sets the room size (i.e. amount of wet) reverb.</desc>
|
||||
</setting>
|
||||
<setting>
|
||||
<name>reverb.width</name>
|
||||
<type>num</type>
|
||||
<def>0.5</def>
|
||||
<min>0</min>
|
||||
<max>100</max>
|
||||
<desc>
|
||||
Sets the stereo spread of the reverb signal.</desc>
|
||||
</setting>
|
||||
<setting>
|
||||
<name>sample-rate</name>
|
||||
<type>num</type>
|
||||
<def>44100.0</def>
|
||||
<min>8000.0</min>
|
||||
<max>96000.0</max>
|
||||
<desc>
|
||||
The sample rate of the audio generated by the synthesizer.
|
||||
</desc>
|
||||
</setting>
|
||||
<setting>
|
||||
<name>threadsafe-api</name>
|
||||
<type>bool</type>
|
||||
<def>1 (TRUE)</def>
|
||||
<desc>
|
||||
Controls whether the synth's public API is protected by a mutex or not. Default is on, turn it off for slightly better performance if you know you're only accessing the synth from one thread only, this could be the case in many embedded use cases for example. Note that libfluidsynth can use many threads by itself (shell is one, midi driver is one, midi player is one etc) so you should usually leave it on.
|
||||
</desc>
|
||||
</setting>
|
||||
<setting>
|
||||
<name>verbose</name>
|
||||
<type>bool</type>
|
||||
<def>0 (FALSE)</def>
|
||||
<desc>
|
||||
When set to 1 (TRUE) the synthesizer will print out information about the received MIDI events to the stdout. This can be helpful for debugging. This setting cannot be changed after the synthesizer has started.
|
||||
</desc>
|
||||
</setting>
|
||||
</synth>
|
||||
|
||||
|
||||
<audio>
|
||||
<setting>
|
||||
<isFirst>Audio driver settings</isFirst>
|
||||
<name>driver</name>
|
||||
<type>str</type>
|
||||
<def>jack (Linux),<br />
|
||||
dsound (Windows),<br />
|
||||
sndman (MacOS9),<br />
|
||||
coreaudio (Mac OS X),<br />
|
||||
dart (OS/2)
|
||||
</def>
|
||||
<vals>alsa, coreaudio, dart, dsound, file, jack, oss, portaudio, pulseaudio, sdl2, sndman, waveout</vals>
|
||||
<desc>
|
||||
The audio system to be used. In order to use sdl2 as audio driver, the application is responsible for initializing SDL's audio subsystem.<br /><br /><strong>Note:</strong> sdl2 and waveout are available since fluidsynth 2.1.
|
||||
</desc>
|
||||
</setting>
|
||||
<setting>
|
||||
<name>periods</name>
|
||||
<type>int</type>
|
||||
<def>16 (Linux, Mac OS X),<br />
|
||||
8 (Windows)
|
||||
</def>
|
||||
<min>2</min>
|
||||
<max>64</max>
|
||||
<desc>
|
||||
The number of the audio buffers used by the driver. This number of buffers, multiplied by the buffer size (see setting audio.period-size), determines the maximum latency of the audio driver.
|
||||
</desc>
|
||||
</setting>
|
||||
<setting>
|
||||
<name>period-size</name>
|
||||
<type>int</type>
|
||||
<def>64 (Linux, Mac OS X),<br />
|
||||
512 (Windows)
|
||||
</def>
|
||||
<min>64</min>
|
||||
<max>8192</max>
|
||||
<desc>
|
||||
The size of the audio buffers (in frames).
|
||||
</desc>
|
||||
</setting>
|
||||
<setting>
|
||||
<name>realtime-prio</name>
|
||||
<type>int</type>
|
||||
<def>60</def>
|
||||
<min>0</min>
|
||||
<max>99</max>
|
||||
<desc>
|
||||
Sets the realtime scheduling priority of the audio synthesis thread (0 disables high priority scheduling). Linux is the only platform which currently makes use of different priority levels. Drivers which use this option: alsa, oss and pulseaudio
|
||||
</desc>
|
||||
</setting>
|
||||
<setting>
|
||||
<name>sample-format</name>
|
||||
<type>str</type>
|
||||
<def>16bits</def>
|
||||
<vals>16bits, float</vals>
|
||||
<desc>
|
||||
The format of the audio samples. This is currently only an indication; the audio driver may ignore this setting if it can't handle the specified format.
|
||||
</desc>
|
||||
</setting>
|
||||
<setting>
|
||||
<name>alsa.device</name>
|
||||
<type>str</type>
|
||||
<def>default</def>
|
||||
<vals>ALSA device string, such as: "hw:0", "plughw:1", etc.</vals>
|
||||
<desc>
|
||||
Selects the ALSA audio device to use.
|
||||
</desc>
|
||||
</setting>
|
||||
<setting>
|
||||
<name>coreaudio.device</name>
|
||||
<type>str</type>
|
||||
<def>default</def>
|
||||
<desc>
|
||||
Selects the CoreAudio device to use.
|
||||
</desc>
|
||||
</setting>
|
||||
<setting>
|
||||
<name>dart.device</name>
|
||||
<type>str</type>
|
||||
<def>default</def>
|
||||
<desc>
|
||||
Selects the Dart (OS/2 driver) device to use.
|
||||
</desc>
|
||||
</setting>
|
||||
<setting>
|
||||
<name>dsound.device</name>
|
||||
<type>str</type>
|
||||
<def>default</def>
|
||||
<desc>
|
||||
Selects the DirectSound (Windows) device to use.
|
||||
</desc>
|
||||
</setting>
|
||||
<setting>
|
||||
<name>file.endian</name>
|
||||
<type>str</type>
|
||||
<def>'auto' if libsndfile support is built in,<br />
|
||||
'cpu' otherwise.</def>
|
||||
<vals>auto, big, cpu, little ('cpu' is all that is supported if libsndfile support is not built in)</vals>
|
||||
<desc>
|
||||
Defines the byte order when using the 'file' driver or file renderer to store audio to a file. 'auto' uses the default for the given file type, 'cpu' uses the CPU byte order, 'big' uses big endian byte order and 'little' uses little endian byte order.
|
||||
</desc>
|
||||
</setting>
|
||||
<setting>
|
||||
<name>file.format</name>
|
||||
<type>str</type>
|
||||
<def>s16</def>
|
||||
<vals>double, float, s16, s24, s32, s8, u8</vals>
|
||||
<desc>
|
||||
Defines the audio format when rendering audio to a file. Limited to 's16' if no libsndfile support.
|
||||
<ul>
|
||||
<li>'double' is 64 bit floating point,</li>
|
||||
<li>'float' is 32 bit floating point,</li>
|
||||
<li>'s16' is 16 bit signed PCM,</li>
|
||||
<li>'s24' is 24 bit signed PCM,</li>
|
||||
<li>'s32' is 32 bit signed PCM,</li>
|
||||
<li>'s8' is 8 bit signed PCM and</li>
|
||||
<li>'u8' is 8 bit unsigned PCM.</li>
|
||||
</ul>
|
||||
</desc>
|
||||
</setting>
|
||||
<setting>
|
||||
<name>file.name</name>
|
||||
<type>str</type>
|
||||
<def>'fluidsynth.wav' if libsndfile support is built in,<br />
|
||||
'fluidsynth.raw' otherwise.</def>
|
||||
<desc>
|
||||
Specifies the file name to store the audio to, when rendering audio to a file.
|
||||
</desc>
|
||||
</setting>
|
||||
<setting>
|
||||
<name>file.type</name>
|
||||
<type>str</type>
|
||||
<def>'auto' if libsndfile support is built in,<br />
|
||||
'raw' otherwise.</def>
|
||||
<vals>aiff, au, auto, avr, caf, flac, htk, iff, mat, oga, paf, pvf, raw, sd2, sds, sf, voc, w64, wav, xi</vals>
|
||||
<desc>
|
||||
Sets the file type of the file which the audio will be stored to. 'auto' attempts to determine the file type from the audio.file.name file extension and falls back to 'wav' if the extension doesn't match any types. Limited to 'raw' if compiled without libsndfile support. Actual options will vary depending on libsndfile library.
|
||||
</desc>
|
||||
</setting>
|
||||
<setting>
|
||||
<name>jack.autoconnect</name>
|
||||
<type>bool</type>
|
||||
<def>0 (FALSE)</def>
|
||||
<desc>
|
||||
If 1 (TRUE), then FluidSynth output is automatically connected to jack system audio output.
|
||||
</desc>
|
||||
</setting>
|
||||
<setting>
|
||||
<name>jack.id</name>
|
||||
<type>str</type>
|
||||
<def>fluidsynth</def>
|
||||
<desc>
|
||||
Unique identifier used when creating Jack client connection.
|
||||
</desc>
|
||||
</setting>
|
||||
<setting>
|
||||
<name>jack.multi</name>
|
||||
<type>bool</type>
|
||||
<def>0 (FALSE)</def>
|
||||
<desc>
|
||||
If 1 (TRUE), then multi-channel Jack output will be enabled if synth.audio-channels is greater than 1.
|
||||
</desc>
|
||||
</setting>
|
||||
<setting>
|
||||
<name>jack.server</name>
|
||||
<type>str</type>
|
||||
<def></def>
|
||||
<desc>
|
||||
Jack server to connect to. Defaults to an empty string, which uses default Jack server.
|
||||
</desc>
|
||||
</setting>
|
||||
<setting>
|
||||
<name>oboe.id</name>
|
||||
<type>int</type>
|
||||
<def>0</def>
|
||||
<min>0</min>
|
||||
<max>2147483647</max>
|
||||
<desc>
|
||||
Request an audio device identified device using an ID as pointed out by Oboe's documentation.
|
||||
</desc>
|
||||
</setting>
|
||||
<setting>
|
||||
<name>oboe.sharing-mode</name>
|
||||
<type>str</type>
|
||||
<def>Shared</def>
|
||||
<vals>Shared, Exclusive</vals>
|
||||
<desc>
|
||||
Sets the sharing mode as pointed out by Oboe's documentation.
|
||||
</desc>
|
||||
</setting>
|
||||
<setting>
|
||||
<name>oboe.performance-mode</name>
|
||||
<type>str</type>
|
||||
<def>None</def>
|
||||
<vals>None, PowerSaving, LowLatency</vals>
|
||||
<desc>
|
||||
Sets the performance mode as pointed out by Oboe's documentation.
|
||||
</desc>
|
||||
</setting>
|
||||
<setting>
|
||||
<name>oss.device</name>
|
||||
<type>str</type>
|
||||
<def>/dev/dsp</def>
|
||||
<desc>
|
||||
Device to use for OSS audio output.
|
||||
</desc>
|
||||
</setting>
|
||||
<setting>
|
||||
<name>portaudio.device</name>
|
||||
<type>str</type>
|
||||
<def>PortAudio Default</def>
|
||||
<desc>
|
||||
Device to use for PortAudio driver output. Note that 'PortAudio Default' is a special value which outputs to the default PortAudio device. The format of the device name is: "<device_index>:<host_api_name>:<host_device_name>" e.g. "11:Windows DirectSound:SB PCI"
|
||||
</desc>
|
||||
</setting>
|
||||
<setting>
|
||||
<name>pulseaudio.adjust-latency</name>
|
||||
<type>bool</type>
|
||||
<def>1 (TRUE)</def>
|
||||
<desc>
|
||||
If TRUE initializes the maximum length of the audio buffer to the highest supported value and increases the latency dynamically if PulseAudio suggests so. Else uses a buffer with length of "audio.period-size".
|
||||
</desc>
|
||||
</setting>
|
||||
<setting>
|
||||
<name>pulseaudio.device</name>
|
||||
<type>str</type>
|
||||
<def>default</def>
|
||||
<desc>
|
||||
Device to use for PulseAudio driver output.
|
||||
</desc>
|
||||
</setting>
|
||||
<setting>
|
||||
<name>pulseaudio.media-role</name>
|
||||
<type>str</type>
|
||||
<def>music</def>
|
||||
<desc>
|
||||
PulseAudio media role information.
|
||||
</desc>
|
||||
</setting>
|
||||
<setting>
|
||||
<name>pulseaudio.server</name>
|
||||
<type>str</type>
|
||||
<def>default</def>
|
||||
<desc>
|
||||
Server to use for PulseAudio driver output.
|
||||
</desc>
|
||||
</setting>
|
||||
</audio>
|
||||
|
||||
<midi>
|
||||
<setting>
|
||||
<isFirst>MIDI driver settings</isFirst>
|
||||
<name>autoconnect</name>
|
||||
<type>bool</type>
|
||||
<def>0 (FALSE)</def>
|
||||
<desc>
|
||||
If 1 (TRUE), automatically connects FluidSynth to available MIDI input ports. alsa_seq, coremidi and jack are currently the only drivers making use of this.
|
||||
</desc>
|
||||
</setting>
|
||||
<setting>
|
||||
<name>driver</name>
|
||||
<type>str</type>
|
||||
<def>alsa_seq (Linux),<br />
|
||||
winmidi (Windows),<br />
|
||||
jack (Mac OS X)</def>
|
||||
<vals>alsa_raw, alsa_seq, coremidi, jack, midishare, oss, winmidi</vals>
|
||||
<desc>The MIDI system to be used.</desc>
|
||||
</setting>
|
||||
<setting>
|
||||
<name>realtime-prio</name>
|
||||
<type>int</type>
|
||||
<def>50</def>
|
||||
<min>0</min>
|
||||
<max>99</max>
|
||||
<desc>Sets the realtime scheduling priority of the MIDI thread (0 disables high priority scheduling). Linux is the only platform which currently makes use of different priority levels. Drivers which use this option: alsa_raw, alsa_seq, oss</desc>
|
||||
</setting>
|
||||
<setting>
|
||||
<name>portname</name>
|
||||
<type>str</type>
|
||||
<def></def>
|
||||
<desc>Used by coremidi and alsa_seq drivers for the portnames registered with the MIDI subsystem.</desc>
|
||||
</setting>
|
||||
<setting>
|
||||
<name>alsa.device</name>
|
||||
<type>str</type>
|
||||
<def>default</def>
|
||||
<desc>ALSA MIDI device to use for RAW ALSA MIDI driver.</desc>
|
||||
</setting>
|
||||
<setting>
|
||||
<name>alsa_seq.device</name>
|
||||
<type>str</type>
|
||||
<def>default</def>
|
||||
<desc>ALSA sequencer device to use for ALSA sequencer driver.</desc>
|
||||
</setting>
|
||||
<setting>
|
||||
<name>alsa_seq.id</name>
|
||||
<type>str</type>
|
||||
<def>pid</def>
|
||||
<desc>ID to use when registering ports with the ALSA sequencer driver. If set to "pid" then the ID will be "FLUID Synth (PID)", where PID is the FluidSynth process ID of the audio thread otherwise the provided string will be used in place of PID.</desc>
|
||||
</setting>
|
||||
<setting>
|
||||
<name>coremidi.id</name>
|
||||
<type>str</type>
|
||||
<def>pid</def>
|
||||
<desc>Client ID to use for CoreMIDI driver. 'pid' will use process ID as port of the client name.</desc>
|
||||
</setting>
|
||||
<setting>
|
||||
<name>jack.server</name>
|
||||
<type>str</type>
|
||||
<def></def>
|
||||
<desc>Jack server to connect to for Jack MIDI driver. If an empty string then the default server will be used.</desc>
|
||||
</setting>
|
||||
<setting>
|
||||
<name>jack.id</name>
|
||||
<type>str</type>
|
||||
<def>fluidsynth-midi</def>
|
||||
<desc>Client ID to use with the Jack MIDI driver. If jack is also used as audio driver and "midi.jack.server" and "audio.jack.server" are equal, this setting will be overridden by "audio.jack.id", because a client cannot have multiple names.</desc>
|
||||
</setting>
|
||||
<setting>
|
||||
<name>oss.device</name>
|
||||
<type>str</type>
|
||||
<def>/dev/midi</def>
|
||||
<desc>Device to use for OSS MIDI driver.</desc>
|
||||
</setting>
|
||||
<setting>
|
||||
<name>winmidi.device</name>
|
||||
<type>str</type>
|
||||
<def>default</def>
|
||||
<desc>Device for Windows MIDI driver.</desc>
|
||||
</setting>
|
||||
</midi>
|
||||
|
||||
<player>
|
||||
<setting>
|
||||
<isFirst>MIDI player settings</isFirst>
|
||||
<name>reset-synth</name>
|
||||
<type>bool</type>
|
||||
<def>1 (TRUE)</def>
|
||||
<desc>If true, reset the synth before starting a new MIDI song, so the state of a previous song can't affect the new song. Turn it off for seamless looping of a song.</desc>
|
||||
</setting>
|
||||
<setting>
|
||||
<name>timing-source</name>
|
||||
<type>str</type>
|
||||
<def>sample</def>
|
||||
<vals>sample, system</vals>
|
||||
<desc>Determines the timing source of the player sequencer. 'sample' uses the sample clock (how much audio has been output) to sequence events, in which case audio is synchronized with MIDI events. 'system' uses the system clock, audio and MIDI are not synchronized exactly.</desc>
|
||||
</setting>
|
||||
</player>
|
||||
|
||||
<shell>
|
||||
<setting>
|
||||
<isFirst>Shell (command line) settings</isFirst>
|
||||
<name>prompt</name>
|
||||
<type>str</type>
|
||||
<def>""</def>
|
||||
<desc>In dump mode we set the prompt to "". The ui cannot easily handle lines, which don't end with cr. Changing the prompt cannot be done through a command, because the current shell does not handle empty arguments.</desc>
|
||||
</setting>
|
||||
<setting>
|
||||
<name>port</name>
|
||||
<type>num</type>
|
||||
<def>9800</def>
|
||||
<min>1</min>
|
||||
<max>65535</max>
|
||||
<desc>The shell can be used in a client/server mode. This setting controls what TCP/IP port the server uses.</desc>
|
||||
</setting>
|
||||
</shell>
|
||||
</fluidsettings>
|
||||
|
216
singe/thirdparty/fluidsynth/doc/fluidsettings.xsl
vendored
216
singe/thirdparty/fluidsynth/doc/fluidsettings.xsl
vendored
|
@ -1,216 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
|
||||
<xsl:output method="html" doctype-system="about:legacy-compat"/>
|
||||
<xsl:template match="/">
|
||||
<html>
|
||||
<head>
|
||||
<style>
|
||||
table
|
||||
{
|
||||
border: 3px solid black;
|
||||
}
|
||||
|
||||
.first-row
|
||||
{
|
||||
border-top: 3px solid black;
|
||||
}
|
||||
|
||||
th
|
||||
{
|
||||
font-weight: normal;
|
||||
white-space: nowrap;
|
||||
padding: 15px 5px 15px 5px;
|
||||
border-top: 1px solid black;
|
||||
border-left: 1px solid black;
|
||||
border-right: 1px solid black;
|
||||
}
|
||||
|
||||
|
||||
td
|
||||
{
|
||||
padding: 15px 5px 15px 5px;
|
||||
}
|
||||
|
||||
.cell-def
|
||||
{
|
||||
white-space: nowrap;
|
||||
border-top: 1px solid black;
|
||||
}
|
||||
.cell-vals
|
||||
{
|
||||
border-top: 1px solid black;
|
||||
}
|
||||
.cell-desc
|
||||
{
|
||||
border-top: 1px solid black;
|
||||
}
|
||||
|
||||
.audio {background-color: hsl(170, 100%, 90%);}
|
||||
.midi {background-color: hsl(125, 100%, 90%);}
|
||||
.player {background-color: hsl(85, 100%, 85%);}
|
||||
.shell {background-color: hsl(60, 100%, 90%);}
|
||||
.synth {background-color: hsl(35, 100%, 90%);}
|
||||
.deprecated {background-color: hsl(0, 0%, 93%);}
|
||||
</style>
|
||||
<title>FluidSettings</title>
|
||||
</head>
|
||||
<body>
|
||||
<h1>FluidSettings</h1>
|
||||
|
||||
<ul>
|
||||
<!-- Select the first setting of each group and use it for building up a TOC -->
|
||||
<xsl:for-each select="fluidsettings/*/*[isFirst]">
|
||||
<xsl:sort select="name(..)" />
|
||||
<li style="margin-bottom: 15px">
|
||||
<xsl:attribute name="class">
|
||||
<xsl:value-of select="name(..)" />
|
||||
</xsl:attribute>
|
||||
<a>
|
||||
<xsl:attribute name="href"><![CDATA[#]]><xsl:value-of select="name(..)" /><![CDATA[.]]><xsl:value-of select="name" /></xsl:attribute>
|
||||
<xsl:value-of select="isFirst" />
|
||||
</a>
|
||||
</li>
|
||||
</xsl:for-each>
|
||||
</ul>
|
||||
|
||||
|
||||
<table>
|
||||
<!--print each and every setting row by row in the table-->
|
||||
<xsl:for-each select="fluidsettings/*/*">
|
||||
<xsl:sort select="name(..)" />
|
||||
<!-- <xsl:sort select="name" /> -->
|
||||
<tr>
|
||||
<!-- the class attribute of tr shall be the name of the settings group of the current setting, unless the setting is marked deprecated -->
|
||||
<xsl:attribute name="class">
|
||||
<xsl:choose>
|
||||
<xsl:when test="deprecated">
|
||||
deprecated
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="name(..)" />
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:attribute>
|
||||
|
||||
<td class="cell-name first-row">
|
||||
<xsl:attribute name="id"><xsl:value-of select="name(..)" /><![CDATA[.]]><xsl:value-of select="name" /></xsl:attribute>
|
||||
<a>
|
||||
<xsl:attribute name="href"><![CDATA[#]]><xsl:value-of select="name(..)" /><![CDATA[.]]><xsl:value-of select="name" /></xsl:attribute>
|
||||
<xsl:value-of select="name(..)" />.<xsl:value-of select="name" />
|
||||
</a>
|
||||
</td>
|
||||
|
||||
<th class="first-row">Type</th>
|
||||
|
||||
<td class="cell-type first-row">
|
||||
<xsl:choose>
|
||||
<xsl:when test="type = 'bool'">
|
||||
int (bool)
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="type" />
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<xsl:attribute name="class">
|
||||
<xsl:choose>
|
||||
<xsl:when test="deprecated">
|
||||
deprecated
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="name(..)" />
|
||||
</xsl:otherwise>
|
||||
|
||||
</xsl:choose>
|
||||
</xsl:attribute>
|
||||
|
||||
<td></td>
|
||||
<th>Default</th>
|
||||
<td class="cell-def">
|
||||
<xsl:copy-of select="def" />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<xsl:attribute name="class">
|
||||
<xsl:choose>
|
||||
<xsl:when test="deprecated">
|
||||
deprecated
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="name(..)" />
|
||||
</xsl:otherwise>
|
||||
|
||||
</xsl:choose>
|
||||
</xsl:attribute>
|
||||
|
||||
<td></td>
|
||||
<th>
|
||||
<xsl:choose>
|
||||
<xsl:when test="type = 'str'">
|
||||
Values
|
||||
</xsl:when>
|
||||
<xsl:when test="type = 'bool'">
|
||||
Values
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
Min
|
||||
-
|
||||
Max
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</th>
|
||||
|
||||
<td class="cell-vals">
|
||||
<xsl:choose>
|
||||
<xsl:when test="type = 'str'">
|
||||
<xsl:value-of select="vals" />
|
||||
</xsl:when>
|
||||
<xsl:when test="type = 'bool'">
|
||||
1, 0
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="min" />
|
||||
-
|
||||
<xsl:value-of select="max" />
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<xsl:attribute name="class">
|
||||
<xsl:choose>
|
||||
<xsl:when test="deprecated">
|
||||
deprecated
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="name(..)" />
|
||||
</xsl:otherwise>
|
||||
|
||||
</xsl:choose>
|
||||
</xsl:attribute>
|
||||
|
||||
<td></td>
|
||||
<th>Description</th>
|
||||
<td class="cell-desc">
|
||||
<xsl:copy-of select="desc" />
|
||||
<xsl:choose>
|
||||
<xsl:when test="deprecated">
|
||||
<br /><br />
|
||||
<strong style="color:red">DEPRECATED</strong><br /><br />
|
||||
<xsl:copy-of select="deprecated" />
|
||||
</xsl:when>
|
||||
</xsl:choose>
|
||||
</td>
|
||||
</tr>
|
||||
</xsl:for-each>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
||||
</xsl:template>
|
||||
</xsl:stylesheet>
|
||||
|
|
@ -1,786 +0,0 @@
|
|||
/*!
|
||||
\mainpage FluidSynth 2.0 Developer Documentation
|
||||
\author Peter Hanappe
|
||||
\author Conrad Berhörster
|
||||
\author Antoine Schmitt
|
||||
\author Pedro López-Cabanillas
|
||||
\author Josh Green
|
||||
\author David Henningsson
|
||||
\author Tom Moebert
|
||||
\author Copyright © 2003-2019 Peter Hanappe, Conrad Berhörster, Antoine Schmitt, Pedro López-Cabanillas, Josh Green, David Henningsson, Tom Moebert
|
||||
\version Revision 2.1.0RC1
|
||||
\date 2019-10-23
|
||||
|
||||
All the source code examples in this document are in the public domain; you can use them as you please. This document is licensed under the Creative Commons Attribution-Share Alike 3.0 Unported License. To view a copy of this license, visit http://creativecommons.org/licenses/by-sa/3.0/ . The FluidSynth library is distributed under the GNU Lesser General Public License. A copy of the GNU Lesser General Public License is contained in the FluidSynth package; if not, visit http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt or write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
\section Abstract
|
||||
|
||||
<a href="http://www.fluidsynth.org">FluidSynth</a> is a software synthesizer based on the <a href="http://en.wikipedia.org/wiki/SoundFont">SoundFont 2</a> specifications. The synthesizer is available as a shared object that can easily be reused in any application that wants to use wave-table synthesis. This document explains the basic usage of FluidSynth. Some of the more advanced features are not yet discussed but will be added in future versions.
|
||||
|
||||
\section Contents Table of Contents
|
||||
|
||||
- \ref Disclaimer
|
||||
- \ref Introduction
|
||||
- \ref NewIn2_1_0
|
||||
- \ref NewIn2_0_8
|
||||
- \ref NewIn2_0_7
|
||||
- \ref NewIn2_0_6
|
||||
- \ref NewIn2_0_5
|
||||
- \ref NewIn2_0_3
|
||||
- \ref NewIn2_0_2
|
||||
- \ref NewIn2_0_0
|
||||
- \ref CreatingSettings
|
||||
- \ref CreatingSynth
|
||||
- \ref CreatingAudioDriver
|
||||
- \ref UsingSynth
|
||||
- \ref LoadingSoundfonts
|
||||
- \ref SendingMIDI
|
||||
- \ref RealtimeMIDI
|
||||
- \ref MIDIPlayer
|
||||
- \ref FileRenderer
|
||||
- \ref MIDIPlayerMem
|
||||
- \ref MIDIRouter
|
||||
- \ref Sequencer
|
||||
- \ref Shell
|
||||
- \ref Multi-channel
|
||||
- \ref Advanced
|
||||
|
||||
\section Disclaimer
|
||||
|
||||
This documentation may be partly incomplete. As always, the source code is the final reference.
|
||||
|
||||
SoundFont(R) is a registered trademark of E-mu Systems, Inc.
|
||||
|
||||
\section Introduction
|
||||
|
||||
What is FluidSynth?
|
||||
|
||||
- FluidSynth is a software synthesizer based on the SoundFont 2 specifications. The synthesizer is available as a shared object (a concept also named Dynamic Linking Library, or DLL) that can be easily reused in any application for wave-table synthesis. This document explains the basic usage of FluidSynth.
|
||||
|
||||
- FluidSynth provides a Command Line Interface program ready to be used from the console terminal, offering most of the library functionalities to end users, among them the ability of render and play Standard MIDI Files, receive real-time MIDI events from external hardware ports and other applications, perform advanced routing of such events, enabling at the same time a local shell as well as a remote server commands interface.
|
||||
|
||||
- FluidSynth is an API (Application Programming Interface) relieving programmers from a lot of details of reading SoundFont and MIDI events and files, and sending the digital audio output to a Sound Card. These tasks can be accomplished using a small set of functions. This document explains most of the API functions and gives short examples about them.
|
||||
|
||||
- FluidSynth uses instrument samples contained in standard SF2 (SoundFont 2) files, having a file structure based on the RIFF format. The specification can be obtained here: http://connect.creativelabs.com/developer/SoundFont/Forms/AllItems.aspx but most users don't need to know any details of the format.
|
||||
|
||||
- FluidSynth can easily be embedded in an application. It has a main header file, fluidsynth.h, and one dynamically linkable library. FluidSynth runs on Linux, Mac OS X, and the Windows platforms, and support for OS/2 and OpenSolaris is experimental. It has audio and midi drivers for all mentioned platforms but you can use it with your own drivers if your application already handles MIDI and audio input/output. This document explains the basic usage of FluidSynth and provides examples that you can reuse.
|
||||
|
||||
- FluidSynth is open source, in active development. For more details, take a look at http://www.fluidsynth.org
|
||||
|
||||
\section NewIn2_1_0 Whats new in 2.1.0?
|
||||
|
||||
- <span style="color:red">refrain from using fluid_synth_set_sample_rate()</span>
|
||||
- new reverb engine
|
||||
- chorus is now stereophonic
|
||||
- smallest allowed chorus speed is now 0.1 Hz (previously 0.29 Hz)
|
||||
- the following audio drivers were added:
|
||||
- opensles
|
||||
- oboe
|
||||
- sdl2
|
||||
- waveout
|
||||
|
||||
\section NewIn2_0_8 Whats new in 2.0.8?
|
||||
|
||||
- fluid_sample_set_sound_data() caused broken sound when copying sample data
|
||||
|
||||
\section NewIn2_0_7 Whats new in 2.0.7?
|
||||
|
||||
- fluid_free() has been added to allow proper deallocation by programming languages other than C/C++
|
||||
|
||||
\section NewIn2_0_6 Whats new in 2.0.6?
|
||||
|
||||
- the MIDI player did not emit any audio when calling fluid_player_play() after fluid_player_stop()
|
||||
|
||||
\section NewIn2_0_5 Whats new in 2.0.5?
|
||||
|
||||
- fluid_synth_process() omitted audio samples when called with arbitrary sample counts that were not a multiple of fluid_synth_get_internal_bufsize()
|
||||
- fluid_synth_sfunload() was not releasing sample buffers of SoundFont3 files if <a href="fluidsettings.xml#synth.dynamic-sample-loading">"synth.dynamic-sample-loading"</a> was set to FALSE
|
||||
|
||||
\section NewIn2_0_3 Whats new in 2.0.3?
|
||||
|
||||
- fix incorrect behaviour of fluid_sample_set_sound_data()
|
||||
- add missing getters for midi events:
|
||||
- fluid_midi_event_get_text()
|
||||
- fluid_midi_event_get_lyrics()
|
||||
|
||||
\section NewIn2_0_2 Whats new in 2.0.2?
|
||||
|
||||
- fluid_synth_error() has been deprecated, use fluid_set_log_function() to interfere log messages
|
||||
|
||||
\section NewIn2_0_0 Whats new in 2.0.0?
|
||||
|
||||
FluidSynths major version was bumped. The API was reworked, deprecated functions were removed.
|
||||
|
||||
<strong><span style="color:red">Important changes that may not result in a compilation error but may cause your app to misbehave:</span></strong>
|
||||
|
||||
- all public \c fluid_settings_* functions that return an integer which is not meant to be interpreted as bool consistently return either FLUID_OK or FLUID_FAILED
|
||||
- fluid_settings_setstr() cannot be used to set integer (toggle) settings with "yes" or "no" values anymore. Use fluid_settings_setint() instead, for example: <br /><code>fluid_settings_setint(settings, "synth.reverb.active", 0)</code> instead of <code>fluid_settings_setstr(settings, "synth.reverb.active", "no")</code>
|
||||
- explicit client unregistering is required for fluid_sequencer_register_client() and fluid_sequencer_register_fluidsynth()
|
||||
- all public functions consistently receive signed integers for soundfont ids, bank and program numbers
|
||||
- use unique device names for the "audio.portaudio.device" setting
|
||||
- fluid_synth_process() received a new more flexible implementation, but now requires zeroed-out sample buffers
|
||||
|
||||
<strong>Other changes in FluidSynth 2.0.0 concerning developers:</strong>
|
||||
|
||||
- all public \c delete_* functions return void and are safe when called with NULL
|
||||
- the shell command handler was decoupled internally, as a consequence the param list of new_fluid_server() and new_fluid_cmd_handler() was adapted
|
||||
- \c fluid_settings_set* functions no longer silently register unknown settings but return an error instead
|
||||
- reverb: roomsize is now limited to an upper threshold of 1.0 to avoid exponential volume increase
|
||||
- rename \c fluid_mod_new() and \c fluid_mod_delete() to match naming conventions: new_fluid_mod() and delete_fluid_mod()
|
||||
- rename chorus getters to match naming conventions: fluid_synth_get_chorus_speed() and fluid_synth_get_chorus_depth()
|
||||
- fluid_synth_remove_sfont() returns FLUID_OK or FLUID_FAILED
|
||||
- introduce a separate data type for sequencer client IDs: #fluid_seq_id_t
|
||||
- fluid_get_userconf() has been implemented for Windows
|
||||
|
||||
<strong>New Features and API additions:</strong>
|
||||
|
||||
- add <a href="fluidsettings.xml#midi.autoconnect">"midi.autoconnect"</a> a setting for automatically connecting fluidsynth to available MIDI input ports
|
||||
- add <a href="fluidsettings.xml#synth.overflow.important">"synth.overflow.important"</a> and <a href="fluidsettings.xml#synth.overflow.important-channels">"synth.overflow.important-channels"</a> settings to take midi channels during overflow calculation into account that are considered to be "important"
|
||||
- add <a href="fluidsettings.xml#synth.dynamic-sample-loading">"synth.dynamic-sample-loading"</a> a setting for enabling on demand sample loading
|
||||
- add support for polyphonic key pressure events, see fluid_event_key_pressure() and fluid_synth_key_pressure()
|
||||
- add fluid_synth_add_default_mod() and fluid_synth_remove_default_mod() for manipulating default modulators
|
||||
- add individual reverb setters: fluid_synth_set_reverb_roomsize(), fluid_synth_set_reverb_damp(), fluid_synth_set_reverb_width(), fluid_synth_set_reverb_level()
|
||||
- add individual chorus setters: fluid_synth_set_chorus_nr(), fluid_synth_set_chorus_level(), fluid_synth_set_chorus_speed(), fluid_synth_set_chorus_depth(), fluid_synth_set_chorus_type()
|
||||
- add realtime settings for <a href="fluidsettings.xml#synth.reverb.damp">reverb</a> and <a href="fluidsettings.xml#synth.chorus.depth">chorus</a> parameters
|
||||
- add seek support to midi-player, see fluid_player_seek()
|
||||
- expose functions to manipulate the ladspa effects unit (see ladspa.h)
|
||||
- add support for text and lyrics midi events, see fluid_midi_event_set_lyrics() and fluid_midi_event_set_text()
|
||||
- complete rewrite of the soundfont loader API, see sfont.h
|
||||
- support for 24 bit audio samples, see fluid_sample_set_sound_data()
|
||||
- expose new_fluid_defsfloader() to support loading soundfonts from memory, see fluid_sfloader_set_callbacks() and <a href="fluidsynth_sfload_mem_8c-example.html">fluidsynth_sfload_mem.c</a>
|
||||
- remove these structs from the public API and provide proper getter and setter functions instead:
|
||||
- struct _fluid_sfloader_t
|
||||
- struct _fluid_sample_t
|
||||
- struct _fluid_sfont_t
|
||||
- struct _fluid_preset_t
|
||||
- add an additional general-purpose IIR filter, see fluid_synth_set_custom_filter()
|
||||
- add a custom sinusoidal modulator mapping function, see #FLUID_MOD_SIN
|
||||
- implement polymono support according to MIDI specs:
|
||||
- add basic channel support, see fluid_synth_reset_basic_channel(), fluid_synth_set_basic_channel(), fluid_synth_get_basic_channel()
|
||||
- implement MIDI modes Omni On, Omni Off, Poly, Mono, see #fluid_basic_channel_modes
|
||||
- implement portamento control, see fluid_synth_set_portamento_mode(), fluid_synth_get_portamento_mode()
|
||||
- implement legato control, see fluid_synth_set_legato_mode(), fluid_synth_get_legato_mode()
|
||||
- implement breath control, see fluid_synth_set_breath_mode(), fluid_synth_get_breath_mode()
|
||||
|
||||
<strong>API cleanups:</strong>
|
||||
|
||||
- the ramsfont has been removed, because it is unmaintained and believed to be unused; please get in touch with the mailing list if you still need it
|
||||
- remove deprecated fluid_synth_get_channel_info() in favour of fluid_synth_get_program() and fluid_synth_get_channel_preset()
|
||||
- remove deprecated fluid_settings_getstr()
|
||||
- remove deprecated fluid_synth_set_midi_router(), instead supply the midi-router instance when creating a command handler with new_fluid_cmd_handler()
|
||||
- remove deprecated fluid_get_hinstance() and fluid_set_hinstance() (dsound driver now uses the desktop window)
|
||||
- remove deprecated fluid_synth_create_key_tuning(), use fluid_synth_activate_key_tuning(synth, bank, prog, name, pitch, FALSE) instead
|
||||
- remove deprecated fluid_synth_create_octave_tuning(), use fluid_synth_activate_octave_tuning(synth, bank, prog, name, pitch, FALSE) instead
|
||||
- remove deprecated fluid_synth_select_tuning(), use fluid_synth_activate_tuning(synth, chan, bank, prog, FALSE) instead
|
||||
- remove deprecated fluid_synth_reset_tuning(), use fluid_synth_deactivate_tuning(synth, chan, FALSE) instead
|
||||
- remove deprecated FLUID_HINT_INTEGER
|
||||
- remove deprecated fluid_synth_set_gen2() as there doesn't seem to be a use case for absolute generator values
|
||||
- remove deprecated "synth.parallel-render" setting
|
||||
- remove obsolete "audio.[out|in]put-channels" settings
|
||||
- remove unimplemented "synth.dump" setting
|
||||
- remove fluid_cmd_handler_register() and fluid_cmd_handler_unregister() from public API, as they seem to be unused downstream
|
||||
- remove misspelled FLUID_SEQ_PITCHWHHELSENS macro
|
||||
- remove struct _fluid_mod_t from public API, use the getters and setters of mod.h instead
|
||||
- remove struct _fluid_gen_t, fluid_gen_set_default_values() and enum fluid_gen_flags from public API
|
||||
- remove macros fluid_sfont_get_id() and fluid_sample_refcount() from public API
|
||||
- remove FLUID_NUM_MOD macro from public API
|
||||
- remove the following deprecated enum values from public API:
|
||||
- GEN_LAST
|
||||
- LAST_LOG_LEVEL
|
||||
- FLUID_SEQ_LASTEVENT
|
||||
- FLUID_MIDI_ROUTER_RULE_COUNT
|
||||
|
||||
|
||||
\section CreatingSettings Creating and changing the settings
|
||||
|
||||
Before you can use the synthesizer, you have to create a settings object. The settings objects is used by many components of the FluidSynth library. It gives a unified API to set the parameters of the audio drivers, the midi drivers, the synthesizer, and so forth. A number of default settings are defined by the current implementation.
|
||||
|
||||
All settings have a name that follows the "dotted-name" notation. For example, "synth.polyphony" refers to the number of voices (polyphony) allocated by the synthesizer. The settings also have a type. There are currently three types: strings, numbers (double floats), and integers. You can change the values of a setting using the fluid_settings_setstr(), fluid_settings_setnum(), and fluid_settings_setint() functions. For example:
|
||||
|
||||
\code
|
||||
#include <fluidsynth.h>
|
||||
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
fluid_settings_t* settings = new_fluid_settings();
|
||||
fluid_settings_setint(settings, "synth.polyphony", 128);
|
||||
/* ... */
|
||||
delete_fluid_settings(settings);
|
||||
return 0;
|
||||
}
|
||||
\endcode
|
||||
|
||||
The API contains the functions to query the type, the current value, the default value, the range and the "hints" of a setting. The range is the minimum and maximum value of the setting. The hints gives additional information about a setting. For example, whether a string represents a filename. Or whether a number should be interpreted on on a logarithmic scale. Check the settings.h API documentation for a description of all functions.
|
||||
|
||||
\section CreatingSynth Creating the synthesizer
|
||||
|
||||
To create the synthesizer, you pass it the settings object, as in the following example:
|
||||
|
||||
\code
|
||||
#include <fluidsynth.h>
|
||||
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
fluid_settings_t* settings;
|
||||
fluid_synth_t* synth;
|
||||
settings = new_fluid_settings();
|
||||
synth = new_fluid_synth(settings);
|
||||
|
||||
/* Do useful things here */
|
||||
|
||||
delete_fluid_synth(synth);
|
||||
delete_fluid_settings(settings);
|
||||
return 0;
|
||||
}
|
||||
\endcode
|
||||
|
||||
For a full list of available <strong>synthesizer settings</strong>, please refer to <a href="fluidsettings.xml" target="_blank"><b>FluidSettings Documentation</b></a>.
|
||||
|
||||
|
||||
|
||||
\section CreatingAudioDriver Creating the Audio Driver
|
||||
|
||||
The synthesizer itself does not write any audio to the audio output. This allows application developers to manage the audio output themselves if they wish. The next section describes the use of the synthesizer without an audio driver in more detail.
|
||||
|
||||
Creating the audio driver is straightforward: set the <code>audio.driver</code> settings and create the driver object. Because the FluidSynth has support for several audio systems, you may want to change which one you want to use. The list below shows the audio systems that are currently supported. It displays the name, as used by the fluidsynth library, and a description.
|
||||
|
||||
- jack: JACK Audio Connection Kit (Linux, Mac OS X, Windows)
|
||||
- alsa: Advanced Linux Sound Architecture (Linux)
|
||||
- oss: Open Sound System (Linux, Unix)
|
||||
- pulseaudio: PulseAudio (Linux, Mac OS X, Windows)
|
||||
- coreaudio: Apple CoreAudio (Mac OS X)
|
||||
- dsound: Microsoft DirectSound (Windows)
|
||||
- portaudio: PortAudio Library (Mac OS 9 & X, Windows, Linux)
|
||||
- sndman: Apple SoundManager (Mac OS Classic)
|
||||
- dart: DART sound driver (OS/2)
|
||||
- opensles: OpenSL ES (Android)
|
||||
- oboe: Oboe (Android)
|
||||
- waveout: Microsoft WaveOut, alternative to DirectSound (Windows CE x86, Windows Mobile 2003 for ARMv5, Windows 98 SE, Windows NT 4.0, Windows XP and later)
|
||||
- file: Driver to output audio to a file
|
||||
- sdl2*: Simple DirectMedia Layer (Linux, Windows, Mac OS X, iOS, Android, FreeBSD, Haiku, etc.)
|
||||
|
||||
The default audio driver depends on the settings with which FluidSynth was compiled. You can get the default driver with fluid_settings_getstr_default(). To get the list of available drivers use the fluid_settings_foreach_option() function. Finally, you can set the driver with fluid_settings_setstr(). In most cases, the default driver should work out of the box.
|
||||
|
||||
Additional options that define the audio quality and latency are "audio.sample-format", "audio.period-size", and "audio.periods". The details are described later.
|
||||
|
||||
You create the audio driver with the new_fluid_audio_driver() function. This function takes the settings and synthesizer object as arguments. For example:
|
||||
|
||||
\code
|
||||
void init()
|
||||
{
|
||||
fluid_settings_t* settings;
|
||||
fluid_synth_t* synth;
|
||||
fluid_audio_driver_t* adriver;
|
||||
settings = new_fluid_settings();
|
||||
|
||||
/* Set the synthesizer settings, if necessary */
|
||||
synth = new_fluid_synth(settings);
|
||||
|
||||
fluid_settings_setstr(settings, "audio.driver", "jack");
|
||||
adriver = new_fluid_audio_driver(settings, synth);
|
||||
}
|
||||
\endcode
|
||||
|
||||
As soon as the audio driver is created, it will start playing. The audio driver creates a separate thread that uses the synthesizer object to generate the audio.
|
||||
|
||||
There are a number of general audio driver settings. The audio.driver settings define the audio subsystem that will be used. The audio.periods and audio.period-size settings define the latency and robustness against scheduling delays. There are additional settings for the audio subsystems used. For a full list of available <strong>audio driver settings</strong>, please refer to <a href="fluidsettings.xml" target="_blank"><strong>FluidSettings Documentation</strong></a>.
|
||||
|
||||
<strong>*Note:</strong> In order to use sdl2 as audio driver, the application is responsible for initializing SDL (e.g. with SDL_Init()). This must be done <strong>before</strong> the first call to <code>new_fluid_settings()</code>! Also make sure to call SDL_Quit() after all fluidsynth instances have been destroyed.
|
||||
|
||||
\section UsingSynth Using the synthesizer without an audio driver
|
||||
|
||||
It is possible to use the synthesizer object without creating an audio driver. This is desirable if the application using FluidSynth manages the audio output itself. The synthesizer has several API functions that can be used to obtain the audio output:
|
||||
|
||||
fluid_synth_write_s16() fills two buffers (left and right channel) with samples coded as signed 16 bits (the endian-ness is machine dependent). fluid_synth_write_float() fills a left and right audio buffer with 32 bits floating point samples. The function fluid_synth_process() is the generic interface for synthesizing audio, which is also capable of multi channel audio output.
|
||||
|
||||
\section LoadingSoundfonts Loading and managing SoundFonts
|
||||
|
||||
Before any sound can be produced, the synthesizer needs a SoundFont.
|
||||
|
||||
SoundFonts are loaded with the fluid_synth_sfload() function. The function takes the path to a SoundFont file and a boolean to indicate whether the presets of the MIDI channels should be updated after the SoundFont is loaded. When the boolean value is TRUE, all MIDI channel bank and program numbers will be refreshed, which may cause new instruments to be selected from the newly loaded SoundFont.
|
||||
|
||||
The synthesizer can load any number of SoundFonts. The loaded SoundFonts are treated as a stack, where each new loaded SoundFont is placed at the top of the stack. When selecting presets by bank and program numbers, SoundFonts are searched beginning at the top of the stack. In the case where there are presets in different SoundFonts with identical bank and program numbers, the preset from the most recently loaded SoundFont is used. The fluid_synth_program_select() can be used for unambiguously selecting a preset or bank offsets could be applied to each SoundFont with fluid_synth_set_bank_offset(), to try and ensure that each preset has unique bank and program numbers.
|
||||
|
||||
The fluid_synth_sfload() function returns the unique identifier of the loaded SoundFont, or -1 in case of an error. This identifier is used in subsequent management functions: fluid_synth_sfunload() removes the SoundFont, fluid_synth_sfreload() reloads the SoundFont. When a SoundFont is reloaded, it retains it's ID and position on the SoundFont stack.
|
||||
|
||||
Additional API functions are provided to get the number of loaded SoundFonts and to get a pointer to the SoundFont.
|
||||
|
||||
\section SendingMIDI Sending MIDI Events
|
||||
|
||||
Once the synthesizer is up and running and a SoundFont is loaded, most people will want to do something useful with it. Make noise, for example. MIDI messages can be sent using the fluid_synth_noteon(), fluid_synth_noteoff(), fluid_synth_cc(), fluid_synth_pitch_bend(), fluid_synth_pitch_wheel_sens(), and fluid_synth_program_change() functions. For convenience, there's also a fluid_synth_bank_select() function (the bank select message is normally sent using a control change message).
|
||||
|
||||
The following example show a generic graphical button that plays a note when clicked:
|
||||
|
||||
\code
|
||||
class SoundButton : public SomeButton
|
||||
{
|
||||
public:
|
||||
|
||||
SoundButton() : SomeButton() {
|
||||
if (!_synth) {
|
||||
initSynth();
|
||||
}
|
||||
}
|
||||
|
||||
static void initSynth() {
|
||||
_settings = new_fluid_settings();
|
||||
_synth = new_fluid_synth(_settings);
|
||||
_adriver = new_fluid_audio_driver(_settings, _synth);
|
||||
}
|
||||
|
||||
/* ... */
|
||||
|
||||
virtual int handleMouseDown(int x, int y) {
|
||||
/* Play a note on key 60 with velocity 100 on MIDI channel 0 */
|
||||
fluid_synth_noteon(_synth, 0, 60, 100);
|
||||
}
|
||||
|
||||
virtual int handleMouseUp(int x, int y) {
|
||||
/* Release the note on key 60 */
|
||||
fluid_synth_noteoff(_synth, 0, 60);
|
||||
}
|
||||
|
||||
protected:
|
||||
|
||||
static fluid_settings_t* _settings;
|
||||
static fluid_synth_t* _synth;
|
||||
static fluid_audio_driver_t* _adriver;
|
||||
};
|
||||
\endcode
|
||||
|
||||
\section RealtimeMIDI Creating a Real-time MIDI Driver
|
||||
|
||||
FluidSynth can process real-time MIDI events received from hardware MIDI ports or other applications. To do so, the client must create a MIDI input driver. It is a very similar process to the creation of the audio driver: you initialize some properties in a settings instance and call the new_fluid_midi_driver() function providing a callback function that will be invoked when a MIDI event is received. The following MIDI drivers are currently supported:
|
||||
|
||||
- jack: JACK Audio Connection Kit MIDI driver (Linux, Mac OS X)
|
||||
- oss: Open Sound System raw MIDI (Linux, Unix)
|
||||
- alsa_raw: ALSA raw MIDI interface (Linux)
|
||||
- alsa_seq: ALSA sequencer MIDI interface (Linux)
|
||||
- winmidi: Microsoft Windows MM System (Windows)
|
||||
- midishare: MIDI Share (Linux, Mac OS X)
|
||||
- coremidi: Apple CoreMIDI (Mac OS X)
|
||||
|
||||
\code
|
||||
#include <fluidsynth.h>
|
||||
|
||||
int handle_midi_event(void* data, fluid_midi_event_t* event)
|
||||
{
|
||||
printf("event type: %d\n", fluid_midi_event_get_type(event));
|
||||
}
|
||||
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
fluid_settings_t* settings;
|
||||
fluid_midi_driver_t* mdriver;
|
||||
settings = new_fluid_settings();
|
||||
mdriver = new_fluid_midi_driver(settings, handle_midi_event, NULL);
|
||||
/* ... */
|
||||
delete_fluid_midi_driver(mdriver);
|
||||
return 0;
|
||||
}
|
||||
\endcode
|
||||
|
||||
There are a number of general MIDI driver settings. The midi.driver setting
|
||||
defines the MIDI subsystem that will be used. There are additional settings for
|
||||
the MIDI subsystems used. For a full list of available <strong>midi driver settings</strong>, please refer to <a href="fluidsettings.xml" target="_blank"><strong>FluidSettings Documentation</strong></a>.
|
||||
|
||||
|
||||
|
||||
\section MIDIPlayer Loading and Playing a MIDI file
|
||||
|
||||
FluidSynth can be used to play MIDI files, using the MIDI File Player interface. It follows a high level implementation, though its implementation is currently incomplete. After initializing the synthesizer, create the player passing the synth instance to new_fluid_player(). Then, you can add some SMF file names to the player using fluid_player_add(), and finally call fluid_player_play() to start the playback. You can check if the player has finished by calling fluid_player_get_status(), or wait for the player to terminate using fluid_player_join().
|
||||
|
||||
\code
|
||||
#include <fluidsynth.h>
|
||||
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
int i;
|
||||
fluid_settings_t* settings;
|
||||
fluid_synth_t* synth;
|
||||
fluid_player_t* player;
|
||||
fluid_audio_driver_t* adriver;
|
||||
settings = new_fluid_settings();
|
||||
synth = new_fluid_synth(settings);
|
||||
player = new_fluid_player(synth);
|
||||
/* process command line arguments */
|
||||
for (i = 1; i < argc; i++) {
|
||||
if (fluid_is_soundfont(argv[i])) {
|
||||
fluid_synth_sfload(synth, argv[1], 1);
|
||||
}
|
||||
if (fluid_is_midifile(argv[i])) {
|
||||
fluid_player_add(player, argv[i]);
|
||||
}
|
||||
}
|
||||
/* start the synthesizer thread */
|
||||
adriver = new_fluid_audio_driver(settings, synth);
|
||||
/* play the midi files, if any */
|
||||
fluid_player_play(player);
|
||||
/* wait for playback termination */
|
||||
fluid_player_join(player);
|
||||
/* cleanup */
|
||||
delete_fluid_audio_driver(adriver);
|
||||
delete_fluid_player(player);
|
||||
delete_fluid_synth(synth);
|
||||
delete_fluid_settings(settings);
|
||||
return 0;
|
||||
}
|
||||
\endcode
|
||||
|
||||
|
||||
A list of available <strong>MIDI player settings</strong> can be found in <a href="fluidsettings.xml" target="_blank"><b>FluidSettings Documentation</b></a>.
|
||||
|
||||
|
||||
|
||||
\section FileRenderer Fast file renderer for non-realtime MIDI file rendering
|
||||
|
||||
Instead of creating an audio driver as described in section \ref MIDIPlayer one may chose to use the file renderer, which is the fastest way to synthesize MIDI files.
|
||||
|
||||
\code
|
||||
fluid_settings_t* settings;
|
||||
fluid_synth_t* synth;
|
||||
fluid_player_t* player;
|
||||
fluid_file_renderer_t* renderer;
|
||||
|
||||
settings = new_fluid_settings();
|
||||
|
||||
// specify the file to store the audio to
|
||||
// make sure you compiled fluidsynth with libsndfile to get a real wave file
|
||||
// otherwise this file will only contain raw s16 stereo PCM
|
||||
fluid_settings_setstr(settings, "audio.file.name", "/path/to/output.wav");
|
||||
|
||||
// use number of samples processed as timing source, rather than the system timer
|
||||
fluid_settings_setstr(settings, "player.timing-source", "sample");
|
||||
|
||||
// since this is a non-realtime szenario, there is no need to pin the sample data
|
||||
fluid_settings_setint(settings, "synth.lock-memory", 0);
|
||||
|
||||
synth = new_fluid_synth(settings);
|
||||
|
||||
// *** loading of a soundfont omitted ***
|
||||
|
||||
player = new_fluid_player(synth);
|
||||
fluid_player_add(player, "/path/to/midifile.mid");
|
||||
fluid_player_play(player);
|
||||
|
||||
renderer = new_fluid_file_renderer (synth);
|
||||
|
||||
while (fluid_player_get_status(player) == FLUID_PLAYER_PLAYING)
|
||||
{
|
||||
if (fluid_file_renderer_process_block(renderer) != FLUID_OK)
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// just for sure: stop the playback explicitly and wait until finished
|
||||
fluid_player_stop(player);
|
||||
fluid_player_join(player);
|
||||
|
||||
delete_fluid_file_renderer(renderer);
|
||||
delete_fluid_player(player);
|
||||
delete_fluid_synth(synth);
|
||||
delete_fluid_settings(settings);
|
||||
\endcode
|
||||
|
||||
Various output files types are supported, if compiled with libsndfile. Those can be specified via the \c settings object as well. Refer to the <a href="fluidsettings.xml#audio.file.endian" target="_blank"><b>FluidSettings Documentation</b></a> for more \c audio.file\.\* options.
|
||||
|
||||
|
||||
\section MIDIPlayerMem Playing a MIDI file from memory
|
||||
|
||||
FluidSynth can be also play MIDI files directly from a buffer in memory. If you need to play a file from a stream (such as stdin, a network, or a high-level file interface), you can load the entire file into a buffer first, and then use this approach. Use the same technique as above, but rather than calling fluid_player_add(), load it into memory and call fluid_player_add_mem() instead. Once you have passed a buffer to fluid_player_add_mem(), it is copied, so you may use it again or free it immediately (it is your responsibility to free it if you allocated it).
|
||||
|
||||
\code
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <fluidsynth.h>
|
||||
|
||||
/* An example midi file */
|
||||
const char MIDIFILE[] = {
|
||||
0x4d, 0x54, 0x68, 0x64, 0x00, 0x00, 0x00, 0x06,
|
||||
0x00, 0x01, 0x00, 0x01, 0x01, 0xe0, 0x4d, 0x54,
|
||||
0x72, 0x6b, 0x00, 0x00, 0x00, 0x20, 0x00, 0x90,
|
||||
0x3c, 0x64, 0x87, 0x40, 0x80, 0x3c, 0x7f, 0x00,
|
||||
0x90, 0x43, 0x64, 0x87, 0x40, 0x80, 0x43, 0x7f,
|
||||
0x00, 0x90, 0x48, 0x64, 0x87, 0x40, 0x80, 0x48,
|
||||
0x7f, 0x83, 0x60, 0xff, 0x2f, 0x00
|
||||
};
|
||||
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
int i;
|
||||
void* buffer;
|
||||
size_t buffer_len;
|
||||
fluid_settings_t* settings;
|
||||
fluid_synth_t* synth;
|
||||
fluid_player_t* player;
|
||||
fluid_audio_driver_t* adriver;
|
||||
settings = new_fluid_settings();
|
||||
synth = new_fluid_synth(settings);
|
||||
player = new_fluid_player(synth);
|
||||
adriver = new_fluid_audio_driver(settings, synth);
|
||||
/* process command line arguments */
|
||||
for (i = 1; i < argc; i++) {
|
||||
if (fluid_is_soundfont(argv[i])) {
|
||||
fluid_synth_sfload(synth, argv[1], 1);
|
||||
}
|
||||
}
|
||||
/* queue up the in-memory midi file */
|
||||
fluid_player_add_mem(player, MIDIFILE, sizeof(MIDIFILE));
|
||||
/* play the midi file */
|
||||
fluid_player_play(player);
|
||||
/* wait for playback termination */
|
||||
fluid_player_join(player);
|
||||
/* cleanup */
|
||||
delete_fluid_audio_driver(adriver);
|
||||
delete_fluid_player(player);
|
||||
delete_fluid_synth(synth);
|
||||
delete_fluid_settings(settings);
|
||||
return 0;
|
||||
}
|
||||
\endcode
|
||||
|
||||
\section MIDIRouter Real-time MIDI router
|
||||
|
||||
The MIDI router is one more processing layer directly behind the MIDI input. It processes incoming MIDI events and generates control events for the synth. It can be used to filter or modify events prior to sending them to the synthesizer. When created, the MIDI router is transparent and simply passes all MIDI events. Router "rules" must be added to actually make use of its capabilities.
|
||||
|
||||
Some examples of MIDI router usage:
|
||||
|
||||
- Filter messages (Example: Pass sustain pedal CCs only to selected channels)
|
||||
- Split the keyboard (Example: noteon with notenr < x: to ch 1, >x to ch 2)
|
||||
- Layer sounds (Example: for each noteon received on ch 1, create a noteon on ch1, ch2, ch3,...)
|
||||
- Velocity scaling (Example: for each noteon event, scale the velocity by 1.27)
|
||||
- Velocity switching (Example: v <= 100: "Angel Choir"; v > 100: "Hell's Bells")
|
||||
- Get rid of aftertouch
|
||||
|
||||
The MIDI driver API has a clean separation between the midi thread and the synthesizer. That opens the door to add a midi router module.
|
||||
|
||||
MIDI events coming from the MIDI player do not pass through the MIDI router.
|
||||
|
||||
\code
|
||||
#include <fluidsynth.h>
|
||||
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
fluid_settings_t* settings;
|
||||
fluid_synth_t* synth;
|
||||
fluid_midi_router_t* router;
|
||||
fluid_midi_router_rule_t* rule;
|
||||
|
||||
settings = new_fluid_settings();
|
||||
synth = new_fluid_synth(settings);
|
||||
|
||||
/* Create the MIDI router and pass events to the synthesizer */
|
||||
router = new_fluid_midi_router (settings, fluid_synth_handle_midi_event, synth);
|
||||
|
||||
/* Clear default rules */
|
||||
fluid_midi_router_clear_rules (router);
|
||||
|
||||
/* Add rule to map all notes < MIDI note #60 on any channel to channel 4 */
|
||||
rule = new_fluid_midi_router_rule ();
|
||||
fluid_midi_router_rule_set_chan (rule, 0, 15, 0.0, 4); /* Map all to channel 4 */
|
||||
fluid_midi_router_rule_set_param1 (rule, 0, 59, 1.0, 0); /* Match notes < 60 */
|
||||
fluid_midi_router_add_rule (router, rule, FLUID_MIDI_ROUTER_RULE_NOTE);
|
||||
|
||||
/* Add rule to map all notes >= MIDI note #60 on any channel to channel 5 */
|
||||
rule = new_fluid_midi_router_rule ();
|
||||
fluid_midi_router_rule_set_chan (rule, 0, 15, 0.0, 5); /* Map all to channel 5 */
|
||||
fluid_midi_router_rule_set_param1 (rule, 60, 127, 1.0, 0); /* Match notes >= 60 */
|
||||
fluid_midi_router_add_rule (router, rule, FLUID_MIDI_ROUTER_RULE_NOTE);
|
||||
|
||||
/* Add rule to reverse direction of pitch bender on channel 7 */
|
||||
rule = new_fluid_midi_router_rule ();
|
||||
fluid_midi_router_rule_set_chan (rule, 7, 7, 1.0, 0); /* Match channel 7 only */
|
||||
fluid_midi_router_rule_set_param1 (rule, 0, 16383, -1.0, 16383); /* Reverse pitch bender */
|
||||
fluid_midi_router_add_rule (router, rule, FLUID_MIDI_ROUTER_RULE_PITCH_BEND);
|
||||
|
||||
/* ... Create audio driver, process events, etc ... */
|
||||
|
||||
/* cleanup */
|
||||
delete_fluid_midi_router(router);
|
||||
delete_fluid_synth(synth);
|
||||
delete_fluid_settings(settings);
|
||||
return 0;
|
||||
}
|
||||
\endcode
|
||||
|
||||
|
||||
|
||||
\section Sequencer
|
||||
|
||||
FluidSynth's sequencer can be used to play MIDI events in a more flexible way than using the MIDI file player, which expects the events to be stored as Standard MIDI Files. Using the sequencer, you can provide the events one by one, with an optional timestamp for scheduling.
|
||||
|
||||
The client program should first initialize the sequencer instance using the function new_fluid_sequencer2(). There is a complementary function delete_fluid_sequencer() to delete it. After creating the sequencer instance, the destinations can be registered using fluid_sequencer_register_fluidsynth() for the synthesizer destination, and optionally using fluid_sequencer_register_client() for the client destination providing a suitable callback function. It can be unregistered using fluid_sequencer_unregister_client(). After the initialization, events can be sent with fluid_sequencer_send_now() and scheduled to the future with fluid_sequencer_send_at(). The registration functions return identifiers, that can be used as destinations of an event using fluid_event_set_dest().
|
||||
|
||||
The function fluid_sequencer_get_tick() returns the current playing position. A program may choose a new timescale in milliseconds using fluid_sequencer_set_time_scale().
|
||||
|
||||
The following example uses the fluidsynth sequencer to implement a sort of music box. FluidSynth internal clock is used to schedule repetitive sequences of notes. The next sequence is scheduled on advance before the end of the current one, using a timer event that triggers a callback function. The scheduling times are always absolute values, to avoid slippage.
|
||||
|
||||
\code
|
||||
#include "fluidsynth.h"
|
||||
|
||||
fluid_synth_t* synth;
|
||||
fluid_audio_driver_t* adriver;
|
||||
fluid_sequencer_t* sequencer;
|
||||
short synthSeqID, mySeqID;
|
||||
unsigned int now;
|
||||
unsigned int seqduration;
|
||||
|
||||
// prototype
|
||||
void seq_callback(unsigned int time, fluid_event_t* event, fluid_sequencer_t* seq, void* data);
|
||||
|
||||
void createsynth()
|
||||
{
|
||||
fluid_settings_t* settings;
|
||||
settings = new_fluid_settings();
|
||||
fluid_settings_setint(settings, "synth.reverb.active", 0);
|
||||
fluid_settings_setint(settings, "synth.chorus.active", 0);
|
||||
synth = new_fluid_synth(settings);
|
||||
adriver = new_fluid_audio_driver(settings, synth);
|
||||
sequencer = new_fluid_sequencer2(0);
|
||||
|
||||
// register synth as first destination
|
||||
synthSeqID = fluid_sequencer_register_fluidsynth(sequencer, synth);
|
||||
|
||||
// register myself as second destination
|
||||
mySeqID = fluid_sequencer_register_client(sequencer, "me", seq_callback, NULL);
|
||||
|
||||
// the sequence duration, in ms
|
||||
seqduration = 1000;
|
||||
}
|
||||
|
||||
void deletesynth()
|
||||
{
|
||||
delete_fluid_sequencer(sequencer);
|
||||
delete_fluid_audio_driver(adriver);
|
||||
delete_fluid_synth(synth);
|
||||
}
|
||||
|
||||
void loadsoundfont()
|
||||
{
|
||||
int fluid_res;
|
||||
// put your own path here
|
||||
fluid_res = fluid_synth_sfload(synth, "Inside:VintageDreamsWaves-v2.sf2", 1);
|
||||
}
|
||||
|
||||
void sendnoteon(int chan, short key, unsigned int date)
|
||||
{
|
||||
int fluid_res;
|
||||
fluid_event_t *evt = new_fluid_event();
|
||||
fluid_event_set_source(evt, -1);
|
||||
fluid_event_set_dest(evt, synthSeqID);
|
||||
fluid_event_noteon(evt, chan, key, 127);
|
||||
fluid_res = fluid_sequencer_send_at(sequencer, evt, date, 1);
|
||||
delete_fluid_event(evt);
|
||||
}
|
||||
|
||||
void schedule_next_callback()
|
||||
{
|
||||
int fluid_res;
|
||||
// I want to be called back before the end of the next sequence
|
||||
unsigned int callbackdate = now + seqduration/2;
|
||||
fluid_event_t *evt = new_fluid_event();
|
||||
fluid_event_set_source(evt, -1);
|
||||
fluid_event_set_dest(evt, mySeqID);
|
||||
fluid_event_timer(evt, NULL);
|
||||
fluid_res = fluid_sequencer_send_at(sequencer, evt, callbackdate, 1);
|
||||
delete_fluid_event(evt);
|
||||
}
|
||||
|
||||
void schedule_next_sequence() {
|
||||
// Called more or less before each sequence start
|
||||
// the next sequence start date
|
||||
now = now + seqduration;
|
||||
|
||||
// the sequence to play
|
||||
|
||||
// the beat : 2 beats per sequence
|
||||
sendnoteon(0, 60, now + seqduration/2);
|
||||
sendnoteon(0, 60, now + seqduration);
|
||||
|
||||
// melody
|
||||
sendnoteon(1, 45, now + seqduration/10);
|
||||
sendnoteon(1, 50, now + 4*seqduration/10);
|
||||
sendnoteon(1, 55, now + 8*seqduration/10);
|
||||
|
||||
// so that we are called back early enough to schedule the next sequence
|
||||
schedule_next_callback();
|
||||
}
|
||||
|
||||
/* sequencer callback */
|
||||
void seq_callback(unsigned int time, fluid_event_t* event, fluid_sequencer_t* seq, void* data) {
|
||||
schedule_next_sequence();
|
||||
}
|
||||
|
||||
int main(void) {
|
||||
createsynth();
|
||||
loadsoundfont();
|
||||
|
||||
// initialize our absolute date
|
||||
now = fluid_sequencer_get_tick(sequencer);
|
||||
schedule_next_sequence();
|
||||
|
||||
sleep(100000);
|
||||
deletesynth();
|
||||
return 0;
|
||||
}
|
||||
\endcode
|
||||
|
||||
\section Shell Shell interface
|
||||
|
||||
The shell interface allows you to send simple textual commands to the synthesizer, to parse a command file, or to read commands from the stdin or other input streams. To find the list of currently supported commands, please check the fluid_cmd.c file or type "help" in the fluidsynth command line shell. For a full list of available <strong>command line settings</strong>, please refer to <a href="fluidsettings.xml" target="_blank"><b>FluidSettings Documentation</b></a>.
|
||||
|
||||
\section Multi-channel Multi-Channel audio rendering
|
||||
|
||||
FluidSynth is capable of rendering all audio and all effects from all MIDI channels to separate stero buffers. Refer to the documentation of fluid_synth_process() and review the different use-cases in the example file for information on how to do that: \ref fluidsynth_process.c
|
||||
|
||||
\section Advanced Advanced features, not yet documented. API reference may contain more info.
|
||||
|
||||
- Accessing low-level voice parameters
|
||||
- Reverb settings
|
||||
- Chorus settings
|
||||
- Interpolation settings (set_gen, get_gen, NRPN)
|
||||
- Voice overflow settings
|
||||
- LADSPA effects unit
|
||||
- MIDI tunings
|
||||
*/
|
||||
|
||||
/*!
|
||||
\example example.c
|
||||
Example producing short random music with FluidSynth
|
||||
*/
|
||||
|
||||
/*!
|
||||
\example fluidsynth_simple.c
|
||||
A basic example of using fluidsynth to play a single note
|
||||
*/
|
||||
|
||||
/*!
|
||||
\example fluidsynth_fx.c
|
||||
Example of using effects with fluidsynth
|
||||
*/
|
||||
|
||||
/*!
|
||||
\example fluidsynth_metronome.c
|
||||
Example of a simple metronome using the MIDI sequencer API
|
||||
*/
|
||||
|
||||
/*!
|
||||
\example fluidsynth_arpeggio.c
|
||||
Example of an arpeggio generated using the MIDI sequencer API
|
||||
*/
|
||||
|
||||
/*!
|
||||
\example fluidsynth_register_adriver.c
|
||||
Example of how to register audio drivers using fluid_audio_driver_register() (advanced users only)
|
||||
*/
|
||||
|
||||
/*!
|
||||
\example fluidsynth_sfload_mem.c
|
||||
Example of how read a soundfont from memory (advanced users only)
|
||||
*/
|
||||
|
||||
/*!
|
||||
\example fluidsynth_process.c
|
||||
Usage examples of how to render audio using fluid_synth_process() (advanced users only)
|
||||
*/
|
303
singe/thirdparty/fluidsynth/doc/fluidsynth.1
vendored
303
singe/thirdparty/fluidsynth/doc/fluidsynth.1
vendored
|
@ -1,303 +0,0 @@
|
|||
.\" hey, Emacs: -*- nroff -*-
|
||||
.\" FluidSynth is free software; you can redistribute it and/or modify
|
||||
.\" it under the terms of the GNU Lesser General Public License as published by
|
||||
.\" the Free Software Foundation; either version 2.1 of the License, or
|
||||
.\" (at your option) any later version.
|
||||
.\"
|
||||
.\" This program is distributed in the hope that it will be useful,
|
||||
.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
.\" GNU General Public License for more details.
|
||||
.\"
|
||||
.\" You should have received a copy of the GNU Lesser General Public License
|
||||
.\" along with this program; see the file LICENSE. If not, write to
|
||||
.\" the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
.\"
|
||||
.TH FluidSynth 1 "Oct 27, 2019"
|
||||
.\" Please update the above date whenever this man page is modified.
|
||||
.\"
|
||||
.\" Some roff macros, for reference:
|
||||
.\" .nh disable hyphenation
|
||||
.\" .hy enable hyphenation
|
||||
.\" .ad l left justify
|
||||
.\" .ad b justify to both left and right margins (default)
|
||||
.\" .nf disable filling
|
||||
.\" .fi enable filling
|
||||
.\" .br insert line break
|
||||
.\" .sp <n> insert n+1 empty lines
|
||||
.\" for manpage-specific macros, see man(7)
|
||||
.SH NAME
|
||||
FluidSynth \- a SoundFont synthesizer
|
||||
.SH SYNOPSIS
|
||||
.B fluidsynth
|
||||
.RI [ options ]
|
||||
[ SoundFonts ]
|
||||
[ midifiles ]
|
||||
.SH DESCRIPTION
|
||||
\fBFluidSynth\fP is a real-time MIDI synthesizer based on the
|
||||
SoundFont(R) 2 specifications. It can be used to render MIDI input or
|
||||
MIDI files to audio. The MIDI events are read from a MIDI device. The
|
||||
sound is rendered in real-time to the sound output device.
|
||||
.PP
|
||||
The easiest way to start the synthesizer is to give it a SoundFont on
|
||||
the command line: 'fluidsynth soundfont.sf2'. fluidsynth will load the
|
||||
SoundFont and read MIDI events from the default MIDI device using the
|
||||
default MIDI driver. Once FluidSynth is running, it reads commands
|
||||
from the stdin. There are commands to send MIDI events manually, to
|
||||
load or unload SoundFonts, and so forth. All the available commands are
|
||||
discussed below.
|
||||
.PP
|
||||
FluidSynth can also be used to play a list of MIDI files. Simply run
|
||||
FluidSynth with the SoundFont and the list of MIDI files to play. In
|
||||
this case you might not want to open the MIDI device to read external
|
||||
events. Use the \-n option to deactivate MIDI input. If you also
|
||||
want to deactivate the use of the shell, start FluidSynth with the \-i
|
||||
option: 'fluidsynth \-ni soundfont.sf2 midifile1.mid midifile2.mid'.
|
||||
.PP
|
||||
Run fluidsynth with the \-\-help option to check for changes in the list of options.
|
||||
.SH OPTIONS
|
||||
\fBfluidsynth\fP accepts the following options:
|
||||
|
||||
.TP
|
||||
.B \-a, \-\-audio\-driver=[label]
|
||||
The audio driver to use. "\-a help" to list valid options
|
||||
.TP
|
||||
.B \-c, \-\-audio\-bufcount=[count]
|
||||
Number of audio buffers
|
||||
.TP
|
||||
.B \-C, \-\-chorus
|
||||
Turn the chorus on or off [0|1|yes|no, default = on]
|
||||
.TP
|
||||
.B \-d, \-\-dump
|
||||
Dump incoming and outgoing MIDI events to stdout
|
||||
.TP
|
||||
.B \-E, \-\-audio\-file\-endian
|
||||
Audio file endian for fast rendering or aufile driver ("\-E help" for list)
|
||||
.TP
|
||||
.B \-f, \-\-load\-config
|
||||
Load command configuration file (shell commands)
|
||||
.TP
|
||||
.B \-F, \-\-fast\-render=[file]
|
||||
Render MIDI file to raw audio data and store in [file]
|
||||
.TP
|
||||
.B \-g, \-\-gain
|
||||
Set the master gain [0 < gain < 10, default = 0.2]
|
||||
.TP
|
||||
.B \-G, \-\-audio\-groups
|
||||
Defines the number of LADSPA audio nodes
|
||||
.TP
|
||||
.B \-h, \-\-help
|
||||
Print out this help summary
|
||||
.TP
|
||||
.B \-i, \-\-no\-shell
|
||||
Don't read commands from the shell [default = yes]
|
||||
.TP
|
||||
.B \-j, \-\-connect\-jack\-outputs
|
||||
Attempt to connect the jack outputs to the physical ports
|
||||
.TP
|
||||
.B \-K, \-\-midi\-channels=[num]
|
||||
The number of midi channels [default = 16]
|
||||
.TP
|
||||
.B \-l, \-\-disable\-lash
|
||||
Don't connect to LASH server
|
||||
.TP
|
||||
.B \-L, \-\-audio\-channels=[num]
|
||||
The number of stereo audio channels [default = 1]
|
||||
.TP
|
||||
.B \-m, \-\-midi\-driver=[label]
|
||||
The name of the midi driver to use. "\-m help" to list valid options.
|
||||
.TP
|
||||
.B \-n, \-\-no\-midi\-in
|
||||
Don't create a midi driver to read MIDI input events [default = yes]
|
||||
.TP
|
||||
.B \-o
|
||||
Define a setting, \-o name=value ("\-o help" to dump current values)
|
||||
.TP
|
||||
.B \-O, \-\-audio\-file\-format
|
||||
Audio file format for fast rendering or aufile driver ("\-O help" for list)
|
||||
.TP
|
||||
.B \-p, \-\-portname=[label]
|
||||
Set MIDI port name (alsa_seq, coremidi drivers)
|
||||
.TP
|
||||
.B \-q, \-\-quiet
|
||||
Do not print welcome message or other informational output
|
||||
.TP
|
||||
.B \-r, \-\-sample\-rate
|
||||
Set the sample rate
|
||||
.TP
|
||||
.B \-R, \-\-reverb
|
||||
Turn the reverb on or off [0|1|yes|no, default = on]
|
||||
.TP
|
||||
.B \-s, \-\-server
|
||||
Start FluidSynth as a server process
|
||||
.TP
|
||||
.B \-T, \-\-audio\-file\-type
|
||||
Audio file type for fast rendering or aufile driver ("\T help" for list)
|
||||
.TP
|
||||
.B \-v, \-\-verbose
|
||||
Print out verbose messages about midi events
|
||||
.TP
|
||||
.B \-V, \-\-version
|
||||
Show version of program
|
||||
.TP
|
||||
.B \-z, \-\-audio\-bufsize=[size]
|
||||
Size of each audio buffer
|
||||
|
||||
.SH SETTINGS
|
||||
The settings to be specified with \-o are documented in the fluidsettings.xml hopefully shipped with this distribution or online at http://www.fluidsynth.org/api/fluidsettings.xml . We recommend viewing this file in a webbrowser, favourably Firefox.
|
||||
|
||||
.SH SHELL COMMANDS
|
||||
.TP
|
||||
.B GENERAL
|
||||
.TP
|
||||
.B help
|
||||
Prints out list of help topics (type "help <topic>" to view details on available commands)
|
||||
.TP
|
||||
.B quit
|
||||
Quit the synthesizer
|
||||
.TP
|
||||
.B SOUNDFONTS
|
||||
.TP
|
||||
.B load filename
|
||||
Load a SoundFont
|
||||
.TP
|
||||
.B unload number
|
||||
Unload a SoundFont. The number is the index of the SoundFont on the stack.
|
||||
.TP
|
||||
.B fonts
|
||||
Lists the current SoundFonts on the stack
|
||||
.TP
|
||||
.B inst number
|
||||
Print out the available instruments for the SoundFont.
|
||||
.TP
|
||||
.B MIDI MESSAGES
|
||||
.TP
|
||||
.B noteon channel key velocity
|
||||
Send a note-on event
|
||||
.TP
|
||||
.B noteoff channel key
|
||||
Send a note-off event
|
||||
.TP
|
||||
.B cc channel ctrl value
|
||||
Send a control change event
|
||||
.TP
|
||||
.B prog chan num
|
||||
Send program-change message
|
||||
.TP
|
||||
.B select chan sfont bank prog
|
||||
Combination of bank-select and program-change
|
||||
.TP
|
||||
.B channels
|
||||
Print out the presets of all channels.
|
||||
.TP
|
||||
.B AUDIO SYNTHESIS
|
||||
.TP
|
||||
.B gain value
|
||||
Set the master gain (0 < gain < 5)
|
||||
.TP
|
||||
.B interp num
|
||||
Choose interpolation method for all channels
|
||||
.TP
|
||||
.B interpc chan num
|
||||
Choose interpolation method for one channel
|
||||
.TP
|
||||
.B REVERB
|
||||
.TP
|
||||
.B set synth.reverb.active [0|1]
|
||||
Turn the reverb on or off
|
||||
.TP
|
||||
.B set synth.reverb.room-size num
|
||||
Change reverb room size
|
||||
.TP
|
||||
.B set synth.reverb.damp num
|
||||
Change reverb damping
|
||||
.TP
|
||||
.B set synth.reverb.width num
|
||||
Change reverb width
|
||||
.TP
|
||||
.B set synth.reverb.level num
|
||||
Change reverb level
|
||||
.TP
|
||||
.B CHORUS
|
||||
.TP
|
||||
.B set synth.chorus.active [0|1]
|
||||
Turn the chorus on or off
|
||||
.TP
|
||||
.B set synth.chorus.nr n
|
||||
Use n delay lines (default 3)
|
||||
.TP
|
||||
.B set synth.chorus.level num
|
||||
Set output level of each chorus line to num
|
||||
.TP
|
||||
.B set synth.chorus.speed num
|
||||
Set mod speed of chorus to num (Hz)
|
||||
.TP
|
||||
.B set synth.chorus.depth num
|
||||
Set chorus modulation depth to num (ms)
|
||||
.TP
|
||||
.B MIDI ROUTER
|
||||
.TP
|
||||
.B router_default
|
||||
Reloads the default MIDI routing rules (input channels are mapped 1:1
|
||||
to the synth)
|
||||
.TP
|
||||
.B router_clear
|
||||
Deletes all MIDI routing rules.
|
||||
.TP
|
||||
.B router_begin [note|cc|prog|pbend|cpress|kpress]
|
||||
Starts a new routing rule for events of the given type
|
||||
.TP
|
||||
.B router_chan min max mul add
|
||||
Limits the rule for events on min <= chan <= max.
|
||||
If the channel falls into the window, it is multiplied by 'mul', then 'add' is added.
|
||||
.TP
|
||||
.B router_par1 min max mul add
|
||||
Limits parameter 1 (for example note number in a note events). Similar
|
||||
to router_chan.
|
||||
.TP
|
||||
.B router_par2 min max mul add
|
||||
Limits parameter 2 (for example velocity in a note event). Similar to router_chan
|
||||
.TP
|
||||
.B router_end
|
||||
Finishes the current rule and adds it to the router.
|
||||
.TP
|
||||
.B Router examples
|
||||
.TP
|
||||
router_clear
|
||||
.TP
|
||||
router_begin note
|
||||
.TP
|
||||
router_chan 0 7 0 15
|
||||
.TP
|
||||
router_end
|
||||
.TP
|
||||
Will accept only note events from the lower 8 MIDI
|
||||
channels. Regardless of the channel, the synthesizer plays the note on
|
||||
ch 15 (synthchannel=midichannel*0+15)
|
||||
.TP
|
||||
router_begin cc
|
||||
.TP
|
||||
router_chan 0 7 0 15
|
||||
.TP
|
||||
router_par1 1 1 0 64
|
||||
.TP
|
||||
router_add
|
||||
Configures the modulation wheel to act as sustain pedal (transforms CC
|
||||
1 to CC 64 on the lower 8 MIDI channels, routes to ch 15)
|
||||
|
||||
.SH AUTHORS
|
||||
Peter Hanappe <hanappe@fluid-synth.org>
|
||||
.br
|
||||
Markus Nentwig <nentwig@users.sourceforge.net>
|
||||
.br
|
||||
Antoine Schmitt <as@gratin.org>
|
||||
.br
|
||||
Josh Green <jgreen@users.sourceforge.net>
|
||||
.br
|
||||
Stephane Letz <letz@grame.fr>
|
||||
.br
|
||||
Tom Moebert <tom[d0t]mbrt[ÄT]gmail[d0t]com>
|
||||
|
||||
Please check the AUTHORS and THANKS files for all credits
|
||||
.SH DISCLAIMER
|
||||
SoundFont(R) is a registered trademark of E-mu Systems, Inc.
|
|
@ -1,175 +0,0 @@
|
|||
/* FluidSynth Arpeggio - Sequencer API example
|
||||
*
|
||||
* This code is in the public domain.
|
||||
*
|
||||
* To compile:
|
||||
* gcc -o fluidsynth_arpeggio -lfluidsynth fluidsynth_arpeggio.c
|
||||
*
|
||||
* To run:
|
||||
* fluidsynth_arpeggio soundfont [steps [duration]]
|
||||
*
|
||||
* [Pedro Lopez-Cabanillas <plcl@users.sf.net>]
|
||||
*/
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <fluidsynth.h>
|
||||
|
||||
fluid_synth_t *synth;
|
||||
fluid_audio_driver_t *audiodriver;
|
||||
fluid_sequencer_t *sequencer;
|
||||
short synth_destination, client_destination;
|
||||
unsigned int time_marker;
|
||||
/* duration of the pattern in ticks. */
|
||||
unsigned int duration = 1440;
|
||||
/* notes of the arpeggio */
|
||||
unsigned int notes[] = { 60, 64, 67, 72, 76, 79, 84, 79, 76, 72, 67, 64 };
|
||||
/* number of notes in one pattern */
|
||||
unsigned int pattern_size;
|
||||
/* prototype */
|
||||
void
|
||||
sequencer_callback(unsigned int time, fluid_event_t *event,
|
||||
fluid_sequencer_t *seq, void *data);
|
||||
|
||||
/* schedule a note on message */
|
||||
void
|
||||
schedule_noteon(int chan, short key, unsigned int ticks)
|
||||
{
|
||||
fluid_event_t *ev = new_fluid_event();
|
||||
fluid_event_set_source(ev, -1);
|
||||
fluid_event_set_dest(ev, synth_destination);
|
||||
fluid_event_noteon(ev, chan, key, 127);
|
||||
fluid_sequencer_send_at(sequencer, ev, ticks, 1);
|
||||
delete_fluid_event(ev);
|
||||
}
|
||||
|
||||
/* schedule a note off message */
|
||||
void
|
||||
schedule_noteoff(int chan, short key, unsigned int ticks)
|
||||
{
|
||||
fluid_event_t *ev = new_fluid_event();
|
||||
fluid_event_set_source(ev, -1);
|
||||
fluid_event_set_dest(ev, synth_destination);
|
||||
fluid_event_noteoff(ev, chan, key);
|
||||
fluid_sequencer_send_at(sequencer, ev, ticks, 1);
|
||||
delete_fluid_event(ev);
|
||||
}
|
||||
|
||||
/* schedule a timer event (shall trigger the callback) */
|
||||
void
|
||||
schedule_timer_event()
|
||||
{
|
||||
fluid_event_t *ev = new_fluid_event();
|
||||
fluid_event_set_source(ev, -1);
|
||||
fluid_event_set_dest(ev, client_destination);
|
||||
fluid_event_timer(ev, NULL);
|
||||
fluid_sequencer_send_at(sequencer, ev, time_marker, 1);
|
||||
delete_fluid_event(ev);
|
||||
}
|
||||
|
||||
/* schedule the arpeggio's notes */
|
||||
void
|
||||
schedule_pattern()
|
||||
{
|
||||
int i, note_time, note_duration;
|
||||
note_time = time_marker;
|
||||
note_duration = duration / pattern_size;
|
||||
|
||||
for(i = 0; i < pattern_size; ++i)
|
||||
{
|
||||
schedule_noteon(0, notes[i], note_time);
|
||||
note_time += note_duration;
|
||||
schedule_noteoff(0, notes[i], note_time);
|
||||
}
|
||||
|
||||
time_marker += duration;
|
||||
}
|
||||
|
||||
void
|
||||
sequencer_callback(unsigned int time, fluid_event_t *event,
|
||||
fluid_sequencer_t *seq, void *data)
|
||||
{
|
||||
schedule_timer_event();
|
||||
schedule_pattern();
|
||||
}
|
||||
|
||||
void
|
||||
usage(char *prog_name)
|
||||
{
|
||||
printf("Usage: %s soundfont.sf2 [steps [duration]]\n", prog_name);
|
||||
printf("\t(optional) steps: number of pattern notes, from 2 to %d\n",
|
||||
pattern_size);
|
||||
printf("\t(optional) duration: of the pattern in ticks, default %d\n",
|
||||
duration);
|
||||
}
|
||||
|
||||
int
|
||||
main(int argc, char *argv[])
|
||||
{
|
||||
int n;
|
||||
fluid_settings_t *settings;
|
||||
settings = new_fluid_settings();
|
||||
pattern_size = sizeof(notes) / sizeof(int);
|
||||
|
||||
if(argc < 2)
|
||||
{
|
||||
usage(argv[0]);
|
||||
}
|
||||
else
|
||||
{
|
||||
/* create the synth, driver and sequencer instances */
|
||||
synth = new_fluid_synth(settings);
|
||||
/* load a SoundFont */
|
||||
n = fluid_synth_sfload(synth, argv[1], 1);
|
||||
|
||||
if(n != -1)
|
||||
{
|
||||
sequencer = new_fluid_sequencer();
|
||||
/* register the synth with the sequencer */
|
||||
synth_destination = fluid_sequencer_register_fluidsynth(sequencer,
|
||||
synth);
|
||||
/* register the client name and callback */
|
||||
client_destination = fluid_sequencer_register_client(sequencer,
|
||||
"arpeggio", sequencer_callback, NULL);
|
||||
if(argc > 2)
|
||||
{
|
||||
n = atoi(argv[2]);
|
||||
|
||||
if((n > 1) && (n <= pattern_size))
|
||||
{
|
||||
pattern_size = n;
|
||||
}
|
||||
}
|
||||
|
||||
if(argc > 3)
|
||||
{
|
||||
n = atoi(argv[3]);
|
||||
|
||||
if(n > 0)
|
||||
{
|
||||
duration = n;
|
||||
}
|
||||
}
|
||||
|
||||
audiodriver = new_fluid_audio_driver(settings, synth);
|
||||
|
||||
/* get the current time in ticks */
|
||||
time_marker = fluid_sequencer_get_tick(sequencer);
|
||||
/* schedule patterns */
|
||||
schedule_pattern();
|
||||
schedule_timer_event();
|
||||
schedule_pattern();
|
||||
/* wait for user input */
|
||||
printf("press <Enter> to stop\n");
|
||||
n = getchar();
|
||||
}
|
||||
|
||||
/* clean and exit */
|
||||
delete_fluid_audio_driver(audiodriver);
|
||||
delete_fluid_sequencer(sequencer);
|
||||
delete_fluid_synth(synth);
|
||||
}
|
||||
|
||||
delete_fluid_settings(settings);
|
||||
return 0;
|
||||
}
|
157
singe/thirdparty/fluidsynth/doc/fluidsynth_fx.c
vendored
157
singe/thirdparty/fluidsynth/doc/fluidsynth_fx.c
vendored
|
@ -1,157 +0,0 @@
|
|||
/* FluidSynth FX - An example of using effects with fluidsynth
|
||||
*
|
||||
* This code is in the public domain.
|
||||
*
|
||||
* To compile:
|
||||
* gcc -g -O -o fluidsynth_fx fluidsynth_fx.c -lfluidsynth
|
||||
*
|
||||
* To run
|
||||
* fluidsynth_fx soundfont gain
|
||||
*
|
||||
* [Peter Hanappe]
|
||||
*/
|
||||
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <fluidsynth.h>
|
||||
|
||||
|
||||
/* The structure with the effects data. This example simply applies a
|
||||
* linear gain the to synthesizer output. */
|
||||
struct fx_data_t
|
||||
{
|
||||
fluid_synth_t *synth;
|
||||
float gain;
|
||||
} fx_data_t;
|
||||
|
||||
/* This function implements the callback function of the audio driver
|
||||
* (see new_fluid_audio_driver2 below). The data argument is a pointer
|
||||
* to your private data structure. 'len' is the number of audio frames
|
||||
* in the buffers. 'nfx' and 'nout' are the number of input and output
|
||||
* audio buffers. 'fx' and 'out' are arrays of float buffers containing
|
||||
* the audio. The audio driver fills zero-initializes those buffers.
|
||||
* You are responsible for filling up those buffers, as the result will
|
||||
* be sent to the sound card. This is usually done by asking the synth
|
||||
* to fill those buffers appropriately using fluid_synth_process()
|
||||
*
|
||||
* NOTE: The API was designed to be generic. Audio driver may fill the
|
||||
* buffers with audio input from the soundcard, rather than zeros.
|
||||
*/
|
||||
int fx_function(void *data, int len,
|
||||
int nfx, float **fx,
|
||||
int nout, float **out)
|
||||
{
|
||||
struct fx_data_t *fx_data = (struct fx_data_t *) data;
|
||||
int i, k;
|
||||
float *out_i;
|
||||
|
||||
/* Call the synthesizer to fill the output buffers with its
|
||||
* audio output. */
|
||||
if(fluid_synth_process(fx_data->synth, len, nfx, fx, nout, out) != FLUID_OK)
|
||||
{
|
||||
/* Some error occured. Very unlikely to happen, though. */
|
||||
return FLUID_FAILED;
|
||||
}
|
||||
|
||||
/* Apply your effects here. In this example, the gain is
|
||||
* applied to all the output buffers. */
|
||||
for(i = 0; i < nout; i++)
|
||||
{
|
||||
out_i = out[i];
|
||||
|
||||
for(k = 0; k < len; k++)
|
||||
{
|
||||
out_i[k] *= fx_data->gain;
|
||||
}
|
||||
}
|
||||
|
||||
return FLUID_OK;
|
||||
}
|
||||
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
fluid_settings_t *settings;
|
||||
fluid_synth_t *synth = NULL;
|
||||
fluid_audio_driver_t *adriver = NULL;
|
||||
int err = 0;
|
||||
struct fx_data_t fx_data;
|
||||
|
||||
if(argc != 3)
|
||||
{
|
||||
fprintf(stderr, "Usage: fluidsynth_simple [soundfont] [gain]\n");
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* Create the settings object. This example uses the default
|
||||
* values for the settings. */
|
||||
settings = new_fluid_settings();
|
||||
|
||||
if(settings == NULL)
|
||||
{
|
||||
fprintf(stderr, "Failed to create the settings\n");
|
||||
err = 2;
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
/* Create the synthesizer */
|
||||
synth = new_fluid_synth(settings);
|
||||
|
||||
if(synth == NULL)
|
||||
{
|
||||
fprintf(stderr, "Failed to create the synthesizer\n");
|
||||
err = 3;
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
/* Load the soundfont */
|
||||
if(fluid_synth_sfload(synth, argv[1], 1) == -1)
|
||||
{
|
||||
fprintf(stderr, "Failed to load the SoundFont\n");
|
||||
err = 4;
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
/* Fill in the data of the effects unit */
|
||||
fx_data.synth = synth;
|
||||
fx_data.gain = atof(argv[2]);
|
||||
|
||||
/* Create the audio driver. As soon as the audio driver is
|
||||
* created, the synthesizer can be played. */
|
||||
adriver = new_fluid_audio_driver2(settings, fx_function, (void *) &fx_data);
|
||||
|
||||
if(adriver == NULL)
|
||||
{
|
||||
fprintf(stderr, "Failed to create the audio driver\n");
|
||||
err = 5;
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
/* Play a note */
|
||||
fluid_synth_noteon(synth, 0, 60, 100);
|
||||
|
||||
printf("Press \"Enter\" to stop: ");
|
||||
fgetc(stdin);
|
||||
printf("done\n");
|
||||
|
||||
|
||||
cleanup:
|
||||
|
||||
if(adriver)
|
||||
{
|
||||
delete_fluid_audio_driver(adriver);
|
||||
}
|
||||
|
||||
if(synth)
|
||||
{
|
||||
delete_fluid_synth(synth);
|
||||
}
|
||||
|
||||
if(settings)
|
||||
{
|
||||
delete_fluid_settings(settings);
|
||||
}
|
||||
|
||||
return err;
|
||||
}
|
|
@ -1,163 +0,0 @@
|
|||
/* FluidSynth Metronome - Sequencer API example
|
||||
*
|
||||
* This code is in the public domain.
|
||||
*
|
||||
* To compile:
|
||||
* gcc -o fluidsynth_metronome -lfluidsynth fluidsynth_metronome.c
|
||||
*
|
||||
* To run:
|
||||
* fluidsynth_metronome soundfont [beats [tempo]]
|
||||
*
|
||||
* [Pedro Lopez-Cabanillas <plcl@users.sf.net>]
|
||||
*/
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <fluidsynth.h>
|
||||
|
||||
fluid_synth_t *synth;
|
||||
fluid_audio_driver_t *audiodriver;
|
||||
fluid_sequencer_t *sequencer;
|
||||
short synth_destination, client_destination;
|
||||
unsigned int time_marker;
|
||||
/* default tempo, beats per minute */
|
||||
#define TEMPO 120
|
||||
unsigned int note_duration = 60000 / TEMPO;
|
||||
/* metronome click/bell */
|
||||
unsigned int weak_note = 33;
|
||||
unsigned int strong_note = 34;
|
||||
/* number of notes in one pattern */
|
||||
unsigned int pattern_size = 4;
|
||||
/* prototype */
|
||||
void
|
||||
sequencer_callback(unsigned int time, fluid_event_t *event,
|
||||
fluid_sequencer_t *seq, void *data);
|
||||
|
||||
/* schedule a note on message */
|
||||
void
|
||||
schedule_noteon(int chan, short key, unsigned int ticks)
|
||||
{
|
||||
fluid_event_t *ev = new_fluid_event();
|
||||
fluid_event_set_source(ev, -1);
|
||||
fluid_event_set_dest(ev, synth_destination);
|
||||
fluid_event_noteon(ev, chan, key, 127);
|
||||
fluid_sequencer_send_at(sequencer, ev, ticks, 1);
|
||||
delete_fluid_event(ev);
|
||||
}
|
||||
|
||||
/* schedule a timer event (shall trigger the callback) */
|
||||
void
|
||||
schedule_timer_event()
|
||||
{
|
||||
fluid_event_t *ev = new_fluid_event();
|
||||
fluid_event_set_source(ev, -1);
|
||||
fluid_event_set_dest(ev, client_destination);
|
||||
fluid_event_timer(ev, NULL);
|
||||
fluid_sequencer_send_at(sequencer, ev, time_marker, 1);
|
||||
delete_fluid_event(ev);
|
||||
}
|
||||
|
||||
/* schedule the metronome pattern */
|
||||
void
|
||||
schedule_pattern()
|
||||
{
|
||||
int i, note_time;
|
||||
note_time = time_marker;
|
||||
|
||||
for(i = 0; i < pattern_size; ++i)
|
||||
{
|
||||
schedule_noteon(9, i ? weak_note : strong_note, note_time);
|
||||
note_time += note_duration;
|
||||
}
|
||||
|
||||
time_marker = note_time;
|
||||
}
|
||||
|
||||
void
|
||||
sequencer_callback(unsigned int time, fluid_event_t *event,
|
||||
fluid_sequencer_t *seq, void *data)
|
||||
{
|
||||
schedule_timer_event();
|
||||
schedule_pattern();
|
||||
}
|
||||
|
||||
void
|
||||
usage(char *prog_name)
|
||||
{
|
||||
printf("Usage: %s soundfont.sf2 [beats [tempo]]\n", prog_name);
|
||||
printf("\t(optional) beats: number of pattern beats, default %d\n",
|
||||
pattern_size);
|
||||
printf("\t(optional) tempo: BPM (Beats Per Minute), default %d\n", TEMPO);
|
||||
}
|
||||
|
||||
int
|
||||
main(int argc, char *argv[])
|
||||
{
|
||||
int n;
|
||||
fluid_settings_t *settings;
|
||||
settings = new_fluid_settings();
|
||||
|
||||
if(argc < 2)
|
||||
{
|
||||
usage(argv[0]);
|
||||
}
|
||||
else
|
||||
{
|
||||
/* create the synth, driver and sequencer instances */
|
||||
synth = new_fluid_synth(settings);
|
||||
|
||||
/* load a SoundFont */
|
||||
n = fluid_synth_sfload(synth, argv[1], 1);
|
||||
|
||||
if(n != -1)
|
||||
{
|
||||
sequencer = new_fluid_sequencer();
|
||||
/* register the synth with the sequencer */
|
||||
synth_destination = fluid_sequencer_register_fluidsynth(sequencer,
|
||||
synth);
|
||||
/* register the client name and callback */
|
||||
client_destination = fluid_sequencer_register_client(sequencer,
|
||||
"fluidsynth_metronome", sequencer_callback, NULL);
|
||||
|
||||
audiodriver = new_fluid_audio_driver(settings, synth);
|
||||
|
||||
if(argc > 2)
|
||||
{
|
||||
n = atoi(argv[2]);
|
||||
|
||||
if(n > 0)
|
||||
{
|
||||
pattern_size = n;
|
||||
}
|
||||
}
|
||||
|
||||
if(argc > 3)
|
||||
{
|
||||
n = atoi(argv[3]);
|
||||
|
||||
if(n > 0)
|
||||
{
|
||||
note_duration = 60000 / n;
|
||||
}
|
||||
}
|
||||
|
||||
/* get the current time in ticks */
|
||||
time_marker = fluid_sequencer_get_tick(sequencer);
|
||||
/* schedule patterns */
|
||||
schedule_pattern();
|
||||
schedule_timer_event();
|
||||
schedule_pattern();
|
||||
/* wait for user input */
|
||||
printf("press <Enter> to stop\n");
|
||||
n = getchar();
|
||||
}
|
||||
|
||||
/* clean and exit */
|
||||
delete_fluid_audio_driver(audiodriver);
|
||||
delete_fluid_sequencer(sequencer);
|
||||
delete_fluid_synth(synth);
|
||||
}
|
||||
|
||||
delete_fluid_settings(settings);
|
||||
return 0;
|
||||
}
|
117
singe/thirdparty/fluidsynth/doc/fluidsynth_process.c
vendored
117
singe/thirdparty/fluidsynth/doc/fluidsynth_process.c
vendored
|
@ -1,117 +0,0 @@
|
|||
/*
|
||||
* This is a C99 program that outlines different usage examples for fluid_synth_process()
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <fluidsynth.h>
|
||||
|
||||
int main()
|
||||
{
|
||||
// any arbitrary number of audio samples to render during on call of fluid_synth_process()
|
||||
enum { SAMPLES = 512 };
|
||||
|
||||
// ...creation of synth omitted...
|
||||
|
||||
// USECASE1: render all dry audio channels + reverb and chorus to one stereo channel
|
||||
{
|
||||
// planar sample buffers that received synthesized (monophonic) audio
|
||||
float left[SAMPLES], right[SAMPLES];
|
||||
|
||||
// array of buffers used to setup channel mapping
|
||||
float *dry[1 * 2], *fx[1 * 2];
|
||||
|
||||
// first make sure to zero out the sample buffers everytime before calling fluid_synth_process()
|
||||
memset(left, 0, sizeof(left));
|
||||
memset(right, 0, sizeof(right));
|
||||
|
||||
// setup channel mapping for a single stereo channel to which to render all dry audio to
|
||||
dry[0] = left;
|
||||
dry[1] = right;
|
||||
|
||||
// Setup channel mapping for a single stereo channel to which to render effects to.
|
||||
// Just using the same sample buffers as for dry audio is fine here, as it will cause the effects to be mixed with dry output.
|
||||
// Note: reverb and chorus together make up two stereo channels. Setting up only one stereo channel is sufficient
|
||||
// as the channels wraps around (i.e. chorus will be mixed with reverb channel).
|
||||
fx[0] = left;
|
||||
fx[1] = right;
|
||||
|
||||
int err = fluid_synth_process(synth, SAMPLES, 2, fx, 2, dry);
|
||||
|
||||
if(err == FLUID_FAILED)
|
||||
{
|
||||
puts("oops");
|
||||
}
|
||||
|
||||
|
||||
// USECASE2: only render dry audio and discard effects
|
||||
// same as above, but call fluid_synth_process() like:
|
||||
int err = fluid_synth_process(synth, SAMPLES, 0, NULL, 2, dry);
|
||||
|
||||
if(err == FLUID_FAILED)
|
||||
{
|
||||
puts("oops");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// USECASE3: render audio and discard all samples
|
||||
{
|
||||
int err = fluid_synth_process(synth, SAMPLES, 0, NULL, 0, NULL);
|
||||
|
||||
if(err == FLUID_FAILED)
|
||||
{
|
||||
puts("oops");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// USECASE4: multi-channel rendering, i.e. render all audio and effects channels to dedicated audio buffers
|
||||
// ofc it‘s not a good idea to allocate all the arrays on the stack
|
||||
{
|
||||
// lookup number of audio and effect (stereo-)channels of the synth
|
||||
// see "synth.audio-channels", "synth.effects-channels" and "synth.effects-groups" settings respectively
|
||||
int n_aud_chan = fluid_synth_count_audio_channels(synth);
|
||||
|
||||
// by default there are two effects stereo channels (reverb and chorus) ...
|
||||
int n_fx_chan = fluid_synth_count_effects_channels(synth);
|
||||
|
||||
// ... for each effects unit. Each unit takes care of the effects of one MIDI channel.
|
||||
// If there are less units than channels, it wraps around and one unit may render effects of multiple
|
||||
// MIDI channels.
|
||||
n_fx_chan *= fluid_synth_count_effects_groups();
|
||||
|
||||
// for simplicity, allocate one single sample pool
|
||||
float samp_buf[SAMPLES * (n_aud_chan + n_fx_chan) * 2];
|
||||
|
||||
// array of buffers used to setup channel mapping
|
||||
float *dry[n_aud_chan * 2], *fx[n_fx_chan * 2];
|
||||
|
||||
// setup buffers to mix dry stereo audio to
|
||||
// buffers are alternating left and right for each n_aud_chan,
|
||||
// please review documentation of fluid_synth_process()
|
||||
for(int i = 0; i < n_aud_chan * 2; i++)
|
||||
{
|
||||
dry[i] = &samp_buf[i * SAMPLES];
|
||||
}
|
||||
|
||||
// setup buffers to mix effects stereo audio to
|
||||
// similar channel layout as above, revie fluid_synth_process()
|
||||
for(int i = 0; i < n_fx_chan * 2; i++)
|
||||
{
|
||||
fx[i] = &samp_buf[n_aud_chan * 2 * SAMPLES + i * SAMPLES];
|
||||
}
|
||||
|
||||
// dont forget to zero sample buffer(s) before each rendering
|
||||
memset(samp_buf, 0, sizeof(samp_buf));
|
||||
|
||||
int err = fluid_synth_process(synth, SAMPLES, n_fx_chan * 2, fx, n_aud_chan * 2, dry);
|
||||
|
||||
if(err == FLUID_FAILED)
|
||||
{
|
||||
puts("oops");
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
|
@ -1,71 +0,0 @@
|
|||
/*
|
||||
* This is a simple C99 program that demonstrates the usage of fluid_audio_driver_register()
|
||||
*
|
||||
* There are 3 calls to fluid_audio_driver_register(), i.e. 3 iterations:
|
||||
* First the alsa driver is registered and created, followed by the jack and portaudio driver.
|
||||
*
|
||||
* The usual usecase would be to call fluid_audio_driver_register() only once providing the audio drivers needed during fluidsynth usage.
|
||||
* If necessary however fluid_audio_driver_register() can be called multiple times as demonstrated here.
|
||||
* Therefore the user must make sure to delete all fluid-instances of any kind before making the call to fluid_audio_driver_register().
|
||||
* Else the behaviour is undefined and the application is likely to crash.
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <fluidsynth.h>
|
||||
|
||||
int main()
|
||||
{
|
||||
const char *DRV[] = { "alsa", "jack", "portaudio" };
|
||||
const char *adrivers[2];
|
||||
|
||||
for(int i = 0; i < sizeof(DRV) / sizeof(DRV[0]); i++)
|
||||
{
|
||||
adrivers[0] = DRV[i];
|
||||
/* register any other driver you need
|
||||
*
|
||||
* adrivers[X] = "whatever";
|
||||
*/
|
||||
adrivers[1] = NULL; /* NULL terminate the array */
|
||||
|
||||
/* register those audio drivers. Note that at this time no fluidsynth objects are alive! */
|
||||
int res = fluid_audio_driver_register(adrivers);
|
||||
|
||||
if(res != FLUID_OK)
|
||||
{
|
||||
puts("adriver reg err");
|
||||
return -1;
|
||||
}
|
||||
|
||||
fluid_settings_t *settings = new_fluid_settings();
|
||||
res = fluid_settings_setstr(settings, "audio.driver", DRV[i]);
|
||||
|
||||
/* settings API will be refactored to return FLUID_OK|FAILED next major release
|
||||
* returning TRUE or FALSE is deprecated
|
||||
*/
|
||||
#if FLUIDSYNTH_VERSION_MAJOR >= 2
|
||||
|
||||
if(res != FLUID_OK)
|
||||
#else
|
||||
if(res == 0)
|
||||
#endif
|
||||
{
|
||||
puts("audio.driver set err");
|
||||
return -1;
|
||||
}
|
||||
|
||||
fluid_synth_t *synth = new_fluid_synth(settings);
|
||||
fluid_audio_driver_t *ad = new_fluid_audio_driver(settings, synth);
|
||||
|
||||
/*
|
||||
* ~~~ Do your daily business here ~~~
|
||||
*/
|
||||
|
||||
delete_fluid_audio_driver(ad);
|
||||
delete_fluid_synth(synth);
|
||||
delete_fluid_settings(settings);
|
||||
|
||||
/* everything cleaned up, fluid_audio_driver_register() can be called again if needed */
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
|
@ -1,92 +0,0 @@
|
|||
/*
|
||||
* This is a C99 program that demonstrates how to load a soundfont from memory.
|
||||
*
|
||||
* It only gives a brief overview on how to achieve this with fluidsynth's API.
|
||||
* Although it should compile, it's highly incomplete, as the details of it's
|
||||
* implementation depend on the users needs.
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <fluidsynth.h>
|
||||
|
||||
void *my_open(const char *filename)
|
||||
{
|
||||
void *p;
|
||||
|
||||
if(filename[0] != '&')
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
sscanf(filename, "&%p", &p);
|
||||
return p;
|
||||
}
|
||||
|
||||
int my_read(void *buf, int count, void *handle)
|
||||
{
|
||||
// NYI
|
||||
return FLUID_OK;
|
||||
}
|
||||
|
||||
int my_seek(void *handle, long offset, int origin)
|
||||
{
|
||||
// NYI
|
||||
return FLUID_OK;
|
||||
}
|
||||
|
||||
int my_close(void *handle)
|
||||
{
|
||||
// NYI
|
||||
return FLUID_OK;
|
||||
}
|
||||
|
||||
long my_tell(void *handle)
|
||||
{
|
||||
// NYI
|
||||
return 0;
|
||||
}
|
||||
|
||||
int main()
|
||||
{
|
||||
int err = 0;
|
||||
|
||||
fluid_settings_t *settings = new_fluid_settings();
|
||||
fluid_synth_t *synth = new_fluid_synth(settings);
|
||||
|
||||
fluid_sfloader_t *my_sfloader = new_fluid_defsfloader(settings);
|
||||
fluid_sfloader_set_callbacks(my_sfloader,
|
||||
my_open,
|
||||
my_read,
|
||||
my_seek,
|
||||
my_tell,
|
||||
my_close);
|
||||
fluid_synth_add_sfloader(synth, my_sfloader);
|
||||
|
||||
|
||||
char abused_filename[64];
|
||||
const void *pointer_to_sf2_in_mem = 0x1234Beef; // some pointer to where the soundfont shall be loaded from
|
||||
sprintf(abused_filename, "&%p", pointer_to_sf2_in_mem);
|
||||
|
||||
int id = fluid_synth_sfload(synth, abused_filename, 0);
|
||||
/* now my_open() will be called with abused_filename and should have opened the memory region */
|
||||
|
||||
if(id == FLUID_FAILED)
|
||||
{
|
||||
puts("oops");
|
||||
err = -1;
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
/*
|
||||
* ~~~ Do your daily business here ~~~
|
||||
*/
|
||||
|
||||
cleanup:
|
||||
/* deleting the synth also deletes my_sfloader */
|
||||
delete_fluid_synth(synth);
|
||||
|
||||
delete_fluid_settings(settings);
|
||||
|
||||
return err;
|
||||
}
|
|
@ -1,97 +0,0 @@
|
|||
/* FluidSynth Simple - An example of using fluidsynth
|
||||
*
|
||||
* This code is in the public domain.
|
||||
*
|
||||
* To compile:
|
||||
* gcc -g -O -o fluidsynth_simple fluidsynth_simple.c -lfluidsynth
|
||||
*
|
||||
* To run
|
||||
* fluidsynth_simple soundfont
|
||||
*
|
||||
* [Peter Hanappe]
|
||||
*/
|
||||
|
||||
|
||||
#include <stdio.h>
|
||||
#include <fluidsynth.h>
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
fluid_settings_t *settings;
|
||||
fluid_synth_t *synth = NULL;
|
||||
fluid_audio_driver_t *adriver = NULL;
|
||||
int err = 0;
|
||||
|
||||
if(argc != 2)
|
||||
{
|
||||
fprintf(stderr, "Usage: fluidsynth_simple [soundfont]\n");
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* Create the settings object. This example uses the default
|
||||
* values for the settings. */
|
||||
settings = new_fluid_settings();
|
||||
|
||||
if(settings == NULL)
|
||||
{
|
||||
fprintf(stderr, "Failed to create the settings\n");
|
||||
err = 2;
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
/* Create the synthesizer */
|
||||
synth = new_fluid_synth(settings);
|
||||
|
||||
if(synth == NULL)
|
||||
{
|
||||
fprintf(stderr, "Failed to create the synthesizer\n");
|
||||
err = 3;
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
/* Load the soundfont */
|
||||
if(fluid_synth_sfload(synth, argv[1], 1) == -1)
|
||||
{
|
||||
fprintf(stderr, "Failed to load the SoundFont\n");
|
||||
err = 4;
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
/* Create the audio driver. As soon as the audio driver is
|
||||
* created, the synthesizer can be played. */
|
||||
adriver = new_fluid_audio_driver(settings, synth);
|
||||
|
||||
if(adriver == NULL)
|
||||
{
|
||||
fprintf(stderr, "Failed to create the audio driver\n");
|
||||
err = 5;
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
/* Play a note */
|
||||
fluid_synth_noteon(synth, 0, 60, 100);
|
||||
|
||||
printf("Press \"Enter\" to stop: ");
|
||||
fgetc(stdin);
|
||||
printf("done\n");
|
||||
|
||||
|
||||
cleanup:
|
||||
|
||||
if(adriver)
|
||||
{
|
||||
delete_fluid_audio_driver(adriver);
|
||||
}
|
||||
|
||||
if(synth)
|
||||
{
|
||||
delete_fluid_synth(synth);
|
||||
}
|
||||
|
||||
if(settings)
|
||||
{
|
||||
delete_fluid_settings(settings);
|
||||
}
|
||||
|
||||
return err;
|
||||
}
|
483
singe/thirdparty/fluidsynth/doc/ladspa.md
vendored
483
singe/thirdparty/fluidsynth/doc/ladspa.md
vendored
|
@ -1,483 +0,0 @@
|
|||
# FluidSynth LADSPA Interface
|
||||
|
||||
The [LADSPA](http://ladspa.org/) (Linux Audio Developer's Simple Plugin API)
|
||||
binding can be used to route the FluidSynth audio output through any number of
|
||||
LADSPA plugins. Please note that even though the "L" in LADSPA stands for
|
||||
"Linux", it can also be used on different platforms, for example Windows or
|
||||
MacOS. Check the "LADSPA on other Platforms" section at the end of this guide
|
||||
for more information.
|
||||
|
||||
## Configuration
|
||||
|
||||
To configure and compile FluidSynth with LADSPA support, make sure you have the
|
||||
LADSPA SDK installed (or at least the ladspa.h header file available in an
|
||||
include path). Then compile FluidSynth in the usual way. You should see
|
||||
`LADSPA support: yes` in the cmake output.
|
||||
|
||||
To enable the LADSPA engine, use the `synth.ladspa.active` setting when
|
||||
starting FluidSynth:
|
||||
|
||||
fluidsynth -o synth.ladspa.active=1 ...
|
||||
|
||||
|
||||
# Quickstart Tutorial
|
||||
|
||||
The following walks you through the process of adding a LADSPA plugin into your
|
||||
FluidSynth configuration. It assumes that you are running FluidSynth on Linux,
|
||||
that you have some experience with running Linux shell commands and that you
|
||||
know how to start FluidSynth from the command line and use it to play a MIDI
|
||||
file.
|
||||
|
||||
## Introduction to LADSPA
|
||||
|
||||
You don't need to to have detailed knowledge of LADSPA to use effects with
|
||||
FluidSynth, but knowing some of it's concepts will help if you want to make the
|
||||
best use of it.
|
||||
|
||||
If you have the LADSPA SDK installed you should be able to use the `listplugins`
|
||||
Linux command to list all plugins installed in your LADSPA path. And to show
|
||||
more details about a particular plugin library, you can use the `analyseplugin`
|
||||
Linux command. Here is an example showing the details of the `delay.so` plugin
|
||||
from the LADSPA SDK:
|
||||
|
||||
```
|
||||
user@host:$ analyseplugin /usr/lib/ladspa/delay.so
|
||||
|
||||
Plugin Name: "Simple Delay Line"
|
||||
Plugin Label: "delay_5s"
|
||||
Plugin Unique ID: 1043
|
||||
Maker: "Richard Furse (LADSPA example plugins)"
|
||||
Copyright: "None"
|
||||
Must Run Real-Time: No
|
||||
Has activate() Function: Yes
|
||||
Has deactivate() Function: No
|
||||
Has run_adding() Function: No
|
||||
Environment: Normal or Hard Real-Time
|
||||
Ports: "Delay (Seconds)" input, control, 0 to 5, default 1
|
||||
"Dry/Wet Balance" input, control, 0 to 1, default 0.5
|
||||
"Input" input, audio
|
||||
"Output" output, audio
|
||||
```
|
||||
|
||||
This output tells you that the `delay.so` library contains only a single plugin
|
||||
called "Simple Delay Line". Most importantly it lists the input and output
|
||||
ports, which can be used to set plugin parameters and connect the audio input
|
||||
and output to FluidSynth.
|
||||
|
||||
"Delay (Seconds)" and "Dry/Wet Balance" are input controls. They are the
|
||||
parameters that a user can set to affect the way the plugin works. They control
|
||||
how long the delay should be and how the dry and wet signals should be mixed
|
||||
before writing them to the output.
|
||||
|
||||
"Input" and "Output" are audio ports which carry samples into the plugin and out
|
||||
again after it has run. Mono plugins usually provide one set of input and output
|
||||
audio ports, stereo plugins usually provide two sets. But there are even plugins
|
||||
that only have a single output port and no input at all (think of noise
|
||||
generators...)
|
||||
|
||||
Also note the line `Has run_adding() Function: No`. This specifies that this
|
||||
plugin can not mix it's audio output into an output buffer, but will always
|
||||
replace anything that is already there. This will become important again later
|
||||
on.
|
||||
|
||||
## FluidSynth Host Ports
|
||||
|
||||
Just as LADSPA plugins have input and output ports, FluidSynth provides it's
|
||||
own audio ports that can be connected to plugins. On a standard stereo setup,
|
||||
the following four ports are automatically created:
|
||||
|
||||
- Main:L
|
||||
- Main:R
|
||||
- Reverb:Send
|
||||
- Chorus:Send
|
||||
|
||||
The "Main:L" and "Main:R" ports can be connected to effect input and output
|
||||
ports. They carry the main audio signals into the LADSPA effects and the
|
||||
modified signals back into FluidSynth.
|
||||
|
||||
"Reverb:Send" and "Chorus:Send" can be used as effect inputs. They carry the
|
||||
mono effect send signals (as determined by the reverb and chorus send
|
||||
generators for each voice) into the LADSPA effects.
|
||||
|
||||
Please note that if you run FluidSynth with the internal reverb and chorus
|
||||
effects active (which is the default), then those effects are already mixed
|
||||
into the Main:L and Main:R channels. Fore more details, please see the "Signal
|
||||
Flow" section below.
|
||||
|
||||
For host port setups in multi-channel configurations, please see the
|
||||
"Multi-Channel Output" section below.
|
||||
|
||||
## Creating a Configuration File
|
||||
|
||||
You can configure LADSPA effects using the FluidSynth shell, but writing the
|
||||
commands into a file and loading it at startup is much more comfortable. So
|
||||
let's create a file `effects.txt` with the following contents:
|
||||
|
||||
effects.txt
|
||||
```
|
||||
ladspa_effect e1 /usr/lib/ladspa/delay.so
|
||||
ladspa_link e1 Input Main:L
|
||||
ladspa_link e1 Output Main:L
|
||||
|
||||
ladspa_effect e2 /usr/lib/ladspa/delay.so delay_5s
|
||||
ladspa_link e2 Input Main:R
|
||||
ladspa_link e2 Output Main:R
|
||||
|
||||
ladspa_start
|
||||
```
|
||||
|
||||
As the "Simple Delay Line" plugin only works on a mono signal, the configuration
|
||||
above creates two effects: the one we named "e1" reads from and writes to the
|
||||
left FluidSynth audio channel "Main:L", the "e2" effect reads from and
|
||||
writes to the right channel "Main:R".
|
||||
|
||||
Please note that we only specified the path to the library
|
||||
`/usr/lib/ladspa/delay.so` when creating the "e1" effect, but not which plugin
|
||||
from the library to use. This is possible because the delay.so library contains
|
||||
only a single plugin. If you want to use a library that contains more than one
|
||||
plugin, you would need to give the plugin name as well, as we've done when
|
||||
creating the "e2" effect. The string to use here is what is called "Plugin
|
||||
Label" in the `analyseplugin` output.
|
||||
|
||||
## Using the Configuration File
|
||||
|
||||
Lets start FluidSynth with ALSA output and the standard SoundFont, enable LADSPA
|
||||
effects, load the effects.txt config file and give it a test MIDI file to play:
|
||||
(You will need to replace the `test.mid` with your own MIDI file and maybe
|
||||
change the paths to the effects.txt file and the SoundFont)
|
||||
|
||||
```
|
||||
user@host:$ fluidsynth -a alsa -o synth.ladspa.active=1 -f effects.txt FluidR3_GM.sf2 test.mid
|
||||
```
|
||||
|
||||
You should now hear the MIDI file played at a slightly lower volume with a one
|
||||
second delay effect added on both left and right channel. If not, please check
|
||||
the FluidSynth output for any error messages.
|
||||
|
||||
## Changing Parameters
|
||||
|
||||
You probably noticed that we did not set any values for the "Delay (Seconds)"
|
||||
and "Dry/Wet Balance" control ports. The delay plugin specifies default
|
||||
values for these parameters: 1 second delay and a dry/wet balance of 0.5 (check
|
||||
the `analyseplugin` output above). So when you don't override them, the defaults
|
||||
are automatically used for rendering.
|
||||
|
||||
Let's set different values now and set the delay time on the left channel to
|
||||
half a second and to 1.5 seconds on the right channel:
|
||||
|
||||
```
|
||||
ladspa_effect e1 /usr/lib/ladspa/delay.so
|
||||
ladspa_link e1 Input Main:L
|
||||
ladspa_link e1 Output Main:L
|
||||
ladspa_set e1 Delay 0.5
|
||||
|
||||
ladspa_effect e2 /usr/lib/ladspa/delay.so
|
||||
ladspa_link e2 Input Main:R
|
||||
ladspa_link e2 Output Main:R
|
||||
ladspa_set e2 Delay 1.5
|
||||
|
||||
ladspa_start
|
||||
```
|
||||
|
||||
Start FluidSynth again and you should hear that the delay is shorter on the
|
||||
left channel, longer on the right. You can even change control parameters while
|
||||
FluidSynth is running. Just type the `ladspa_set ...` commands into the
|
||||
FluidSynth shell.
|
||||
|
||||
And to check the difference that the LADSPA effects have on the sound output,
|
||||
you can turn them off and on again during run-time. Just type in `ladspa_stop`
|
||||
and `ladspa_start` into the FluidSynth shell.
|
||||
|
||||
### Port Name Matching
|
||||
|
||||
Plugin port names are sometimes very long, because the plugin writers want them
|
||||
to be self-documenting. But note that we didn't need to give the complete port
|
||||
name "Delay (Seconds)" in the `ladspa_set` commands, but chose to use a much
|
||||
shorter version: "Delay".
|
||||
|
||||
When specifying a port name for the `ladspa_link` and `ladspa_set` commands,
|
||||
the system will look for any port that *starts with* the name you gave it. If
|
||||
there is only one match, then that port is chosen. If there are multiple
|
||||
matches (meaning your port name is ambiguous), you will see an error asking
|
||||
you to be more specific. So the configuration for the "e1" effect could also
|
||||
have been written with much shorter port names:
|
||||
```
|
||||
ladspa_effect e1 /usr/lib/ladspa/delay.so
|
||||
ladspa_link e1 In Main:L
|
||||
ladspa_link e1 Out Main:L
|
||||
ladspa_set e1 Del 0.5
|
||||
```
|
||||
|
||||
# Signal Flow
|
||||
|
||||
The LADSPA effects unit runs immediately after the internal reverb and chorus
|
||||
effects have been processed. When no effects have been configured, the LADSPA
|
||||
engine is dormant and uses no additional system resources.
|
||||
|
||||
When at least one effect is configured and the engine is activated, the rendered
|
||||
audio is passed into the LADSPA effects engine, the effects are run in the order
|
||||
that they were created and the resulting audio is passed back into FluidSynth
|
||||
(and from there to the sound card or other output).
|
||||
|
||||
## Effect Sends
|
||||
|
||||
Please note that SoundFont designers can specify how much signal each
|
||||
instrument should add to the reverb and chorus effect sends. When FluidSynth
|
||||
renders a block of audio, all currently sounding instruments are mixed into the
|
||||
`Main` output channels. In addition, all instruments add their signal to the
|
||||
effect send ports (`Reverb:Send` and `Chorus:Send`) according to the effect
|
||||
send amount specified in the SoundFont.
|
||||
|
||||
If you want to replace the internal reverb or chorus effects with a LADSPA
|
||||
plugin and you want to honour the decisions made by the SoundFont designer, you
|
||||
should use the `Reverb:Send` or `Chorus:Send` ports as effect input and
|
||||
`Main:L` and `Main:R` ports as effect outputs. (See the "Example Setups" section
|
||||
below for an example on how to replace the internal reverb with a LADSPA plugin.)
|
||||
|
||||
Please note that FluidSynth uses a mono signal for both effects, that is why
|
||||
there is only a single send port for reverb and chorus.
|
||||
|
||||
|
||||
# LADSPA Command Reference
|
||||
|
||||
The following is a description of all LADSPA-related commands that are
|
||||
available in the FluidSynth shell if it has been compiled with LADSPA
|
||||
support.
|
||||
|
||||
- `ladspa_effect`: Create a new effect from a plugin library
|
||||
- `ladspa_buffer`: Create a new buffer
|
||||
- `ladspa_link`: Link an effect port to a host port or a buffer
|
||||
- `ladspa_set`: Set the value of an effect control
|
||||
- `ladspa_check`: Check the effect setup for any problems
|
||||
- `ladspa_start`: Start the effects unit
|
||||
- `ladspa_stop`: Stop the effects unit
|
||||
- `ladspa_reset`: Reset the effects unit
|
||||
|
||||
## ladspa_effect
|
||||
|
||||
```
|
||||
ladspa_effect <effect-name> <library-path> [plugin-name] [--mix [gain]]
|
||||
```
|
||||
|
||||
Load the LADSPA plugin library given by `<library-path>` and create a new effect
|
||||
(i.e. an instance of a plugin). `<effect-name>` can be chosen by the user and must
|
||||
unique. `<plugin-name>` is optional if the library contains only one plugin.
|
||||
|
||||
If the optional `--mix` parameter is given, then the LADSPA engine will call the
|
||||
`run_adding` interface of the plugin. This will make the effect add it's output
|
||||
to the output buffers instead of replacing them. The `--mix` parameter takes an
|
||||
optional float value `gain`, which will be multiplied with each sample before
|
||||
adding to the output buffers.
|
||||
|
||||
Please note that there is no command to delete a single effect once created. To
|
||||
remove effects, please use `ladspa_reset` to clear everything start from
|
||||
scratch.
|
||||
|
||||
Can only be called when the effect unit is not active.
|
||||
|
||||
## ladspa_buffer
|
||||
|
||||
```
|
||||
ladspa_buffer <buffer-name>
|
||||
```
|
||||
|
||||
Create a new audio buffer called `<buffer-name>`. The buffer is able to be used as
|
||||
mono output or mono input to an effect. Buffers can be used to connect plugins
|
||||
between each other without overwriting the host ports with temporary data.
|
||||
|
||||
Please note that there is no command to delete a buffer. To remove buffers,
|
||||
please use `ladspa_reset` to clear everything and start from scratch.
|
||||
|
||||
Can only be used when the effect unit is not active.
|
||||
|
||||
## ladspa_link
|
||||
|
||||
```
|
||||
ladspa_link <effect-name> <audio-port-name> <buffer-or-host-port-name>
|
||||
```
|
||||
|
||||
Connects an effect input or output port with a buffer or a host port. This
|
||||
command can be called multiple times and will overwrite the previous connection
|
||||
made on that effect port.
|
||||
|
||||
Please note that there is no command to unlink an effect port. Use
|
||||
`ladspa_reset` to clear everything and start from scratch.
|
||||
|
||||
Can only be used when the effect unit is not active.
|
||||
|
||||
## ladspa_set
|
||||
|
||||
```
|
||||
ladspa_set <effect-name> <control-port-name> <float-value>
|
||||
```
|
||||
|
||||
Sets a control port of an effect to a float value. Can be used at any time,
|
||||
even when the effect unit is active.
|
||||
|
||||
## ladspa_check
|
||||
|
||||
```
|
||||
ladspa_check
|
||||
```
|
||||
|
||||
Checks the LADSPA effect configuration for errors. This command is also
|
||||
implicitly called when executing `ladspa_start`.
|
||||
|
||||
## ladspa_start
|
||||
|
||||
```
|
||||
ladspa_start
|
||||
```
|
||||
|
||||
Activates the effects unit and inserts the configured effects into FluidSynth's
|
||||
audio rendering pipeline.
|
||||
|
||||
## ladspa_stop
|
||||
|
||||
```
|
||||
ladspa_stop
|
||||
```
|
||||
|
||||
Deactivates the effects unit and removes the configured effects from
|
||||
FluidSynth's audio rendering pipeline. The configuration is left untouched, so
|
||||
it can be started again with `ladspa_start`.
|
||||
|
||||
## ladspa_reset
|
||||
|
||||
```
|
||||
ladspa_reset
|
||||
```
|
||||
|
||||
Deactivates the effects unit if active and clears all configuration and loaded
|
||||
plugins.
|
||||
|
||||
|
||||
# Example Setups
|
||||
|
||||
All examples assume that your `LADSPA_PATH` environment variable points to the
|
||||
directory containing the plugin libraries (e.g. /usr/lib/ladspa).
|
||||
|
||||
## Single Plugin
|
||||
|
||||
The following loads the delay.so plugin library from the LADSPA SDK and
|
||||
instantiates the delay effect under the name "e1". It connects the main left
|
||||
audio channel from FluidSynth with the plugin input and output and starts the
|
||||
effects engine.
|
||||
|
||||
```
|
||||
ladspa_effect e1 delay.so
|
||||
ladspa_link e1 Input Main:L
|
||||
ladspa_link e1 Output Main:L
|
||||
ladspa_start
|
||||
```
|
||||
|
||||
The audible effect should be an untouched right channel and a slightly
|
||||
lower volume on the left with a delay effect of 1 second on top.
|
||||
|
||||
## Replacing the FluidSynth Reverb Effect
|
||||
|
||||
If you would like a different reverb implementation than the one built-in to
|
||||
FluidSynth, you can use a LADSPA reverb plugin like the "TAP Reverb" from
|
||||
[Tom's Audio Processing plugins](http://tap-plugins.sourceforge.net/ladspa.html).
|
||||
|
||||
Here is the analyseplugin output for the `tap_reverb.so` plugin:
|
||||
```
|
||||
user@host:$ analyseplugin /usr/lib/ladspa/tap_reverb.so
|
||||
|
||||
Plugin Name: "TAP Reverberator"
|
||||
Plugin Label: "tap_reverb"
|
||||
Plugin Unique ID: 2142
|
||||
Maker: "Tom Szilagyi"
|
||||
Copyright: "GPL"
|
||||
Must Run Real-Time: No
|
||||
Has activate() Function: Yes
|
||||
Has deactivate() Function: No
|
||||
Has run_adding() Function: Yes
|
||||
Environment: Normal
|
||||
Ports: "Decay [ms]" input, control, 0 to 10000, default 2500
|
||||
"Dry Level [dB]" input, control, -70 to 10, default 0
|
||||
"Wet Level [dB]" input, control, -70 to 10, default 0
|
||||
"Comb Filters" input, control, toggled, default 1
|
||||
"Allpass Filters" input, control, toggled, default 1
|
||||
"Bandpass Filter" input, control, toggled, default 1
|
||||
"Enhanced Stereo" input, control, toggled, default 1
|
||||
"Reverb Type" input, control, 0 to 42.1, default 0, integer
|
||||
"Input Left" input, audio
|
||||
"Output Left" output, audio
|
||||
"Input Right" input, audio
|
||||
"Output Right" output, audio
|
||||
```
|
||||
|
||||
Using this information we can create a LADSPA configuration:
|
||||
|
||||
effects.txt
|
||||
```
|
||||
ladspa_effect e1 /usr/lib/ladspa/tap_reverb.so
|
||||
ladspa_link e1 "Input Left" Reverb:Send
|
||||
ladspa_link e1 "Input Right" Reverb:Send
|
||||
ladspa_link e1 "Output Left" Main:L
|
||||
ladspa_link e1 "Output Right" Main:R
|
||||
ladspa_start
|
||||
```
|
||||
|
||||
Start FluidSynth with the internal reverb disabled. (You will need to replace
|
||||
the `test.mid` with your own MIDI file and maybe change the paths to the
|
||||
effects.txt file and the SoundFont)
|
||||
|
||||
```
|
||||
user@host:$ fluidsynth -a alsa -R0 -o synth.ladspa.active=1 -f effects.txt FluidR3_GM.sf2 test.mid
|
||||
```
|
||||
|
||||
You will hear the output with a reverb effect from the plugin. And you can
|
||||
change the reverb control ports with the `ladspa_set` command while the MIDI
|
||||
file is playing.
|
||||
|
||||
# Multi-Channel Output
|
||||
|
||||
FluidSynth is capable of generating multi-channel output by specifying the
|
||||
`synth.audio-groups` and `synth.audio-channels` configuration settings.
|
||||
Explaining multi-channel output in detail is out of scope for this guide. But
|
||||
using multiple output channels has an effect on the host ports that are
|
||||
available to LADSPA plugins.
|
||||
|
||||
As soon as you configure more than one audio-channel, the main audio ports will
|
||||
not be called "Main:L" and "Main:R" anymore, but will have indices added to
|
||||
their name. So if you start FluidSynth with `-o synth.audio-groups=2`, then the
|
||||
following ports will be created:
|
||||
|
||||
- Main:L1
|
||||
- Main:R1
|
||||
- Main:L2
|
||||
- Main:R2
|
||||
- Reverb:Send
|
||||
- Chorus:Send
|
||||
|
||||
If you want all main ports to act as outputs as well as inputs to the effects,
|
||||
then you also need to increase the `synth.audio-channels` setting.
|
||||
|
||||
|
||||
# LADSPA on other Platforms
|
||||
|
||||
LADSPA is a very simple plugin architecture and only requires the ladspa.h
|
||||
header file as compile-time dependency. To build FluidSynth on non-Linux
|
||||
platform with LADSPA support, download the ladspa.h file from
|
||||
http://www.ladspa.org and place it somewhere in your compiler include path. Then
|
||||
configure and build LADSPA as you normally would.
|
||||
|
||||
All information in the above documentation is valid for all other platforms as
|
||||
well. Just make sure you use the file path format specific to your platform in
|
||||
the `ladspa_effect` calls. For example, on Windows you should use
|
||||
```
|
||||
ladspa_effect c:\path\to\ladspa\plugin.dll
|
||||
```
|
||||
instead of
|
||||
```
|
||||
ladspa_effect /path/to/ladspa/plugin.so
|
||||
```
|
||||
|
||||
Audacity provides a large number of precompiled LADSPA plugins for Windows and
|
||||
MacOS: http://www.audacityteam.org/download/plug-ins/
|
||||
|
||||
To get the `analyseplugin` and `listplugins` commands on Windows, you can either
|
||||
compile them yourself using the LADSPA-SDK source code from ladspa.org or install
|
||||
ladspa-sdk via Cygwin.
|
Binary file not shown.
103
singe/thirdparty/fluidsynth/doc/polymono/leg_00.txt
vendored
103
singe/thirdparty/fluidsynth/doc/polymono/leg_00.txt
vendored
|
@ -1,103 +0,0 @@
|
|||
echo "legato mode 0 (retrigger), egal velocity on n1,n2,n3..."
|
||||
echo "---------------------------------------------------------"
|
||||
# Sounfont: GeneralUser GS 1.471 S. Christian Collins
|
||||
# Some presets
|
||||
# 0: Piano 0 ; short release
|
||||
# 16:organ 24:guitar
|
||||
# 52: Choir Aahs 53: Voice Oohs
|
||||
#
|
||||
# 56:trumpet 57:trombone 58:tuba 59:muted trumpet
|
||||
# 60:French horn 61:Brass section
|
||||
# 62:Synth brass 1 63:Synth Brass 2
|
||||
# 64:Soprano sax 65:Alto sax 66:Tenor sax 67:Baritone sax.
|
||||
# 68:Oboe 69:English horn 70:Bassoon 71:Clarinet
|
||||
# 72:piccolo 73:Flute 74:Recorder 75:Pan flute
|
||||
#
|
||||
# 99:atmosphere; attack longer than organ, release longer than piano
|
||||
# 100:brillance , 101:gobelin
|
||||
|
||||
echo "preset 73:flute"
|
||||
prog 0 73
|
||||
echo "legato mode:0"
|
||||
setlegatomode 0 0
|
||||
echo "legato On"
|
||||
cc 0 68 127
|
||||
echo "noteon C 60 vel=127, during 1000 ms"
|
||||
noteon 0 60 127
|
||||
sleep 1000
|
||||
echo "noteon D,legato up C->D (60->62, vel=127), during 1000 ms"
|
||||
echo "noteoff C"
|
||||
noteon 0 62 127
|
||||
noteoff 0 60
|
||||
sleep 1000
|
||||
echo "noteon E,legato up D->E (62->64, vel=127), during 1000 ms"
|
||||
echo "noteoff D"
|
||||
noteon 0 64 127
|
||||
noteoff 0 62
|
||||
sleep 1000
|
||||
echo "noteon F,legato up E->F (64->65, vel=127), during 1000 ms"
|
||||
echo "noteoff E"
|
||||
noteon 0 65 127
|
||||
noteoff 0 64
|
||||
sleep 1000
|
||||
echo "noteon G,legato up F->G (65->67, vel=127), during 1000 ms"
|
||||
echo "noteoff F"
|
||||
noteon 0 67 127
|
||||
noteoff 0 65
|
||||
sleep 1000
|
||||
echo "noteon A,legato up G->A (67->69, vel=127), during 1000 ms"
|
||||
echo "noteoff G"
|
||||
noteon 0 69 127
|
||||
noteoff 0 67
|
||||
sleep 1000
|
||||
echo "noteon B,legato up A->B (69->71, vel=127), during 1000 ms"
|
||||
echo "noteoff A"
|
||||
noteon 0 71 127
|
||||
noteoff 0 69
|
||||
sleep 1000
|
||||
echo "noteon C,legato up B->C (71->72, vel=127), during 1000 ms"
|
||||
echo "noteoff B"
|
||||
noteon 0 72 127
|
||||
noteoff 0 71
|
||||
sleep 1000
|
||||
echo "noteon B,legato down C->B (72->71, vel=127), during 1000 ms"
|
||||
echo "noteoff C"
|
||||
noteon 0 71 127
|
||||
noteoff 0 72
|
||||
sleep 1000
|
||||
echo "noteon A,legato down B->A (71->69, vel=127), during 1000 ms"
|
||||
echo "noteoff B"
|
||||
noteon 0 69 127
|
||||
noteoff 0 71
|
||||
sleep 1000
|
||||
echo "noteon G,legato down A->G (69->67, vel=127), during 1000 ms"
|
||||
echo "noteoff A"
|
||||
noteon 0 67 127
|
||||
noteoff 0 69
|
||||
sleep 1000
|
||||
echo "noteon F,legato down G->F (67->65, vel=127), during 1000 ms"
|
||||
echo "noteoff G"
|
||||
noteon 0 65 127
|
||||
noteoff 0 67
|
||||
sleep 1000
|
||||
echo "noteon E,legato down F->E (65->64, vel=127), during 1000 ms"
|
||||
echo "noteoff F"
|
||||
noteon 0 64 127
|
||||
noteoff 0 65
|
||||
sleep 1000
|
||||
echo "noteon D,legato down E->D (64->62, vel=127), during 1000 ms"
|
||||
echo "noteoff E"
|
||||
noteon 0 62 127
|
||||
noteoff 0 64
|
||||
sleep 1000
|
||||
echo "noteon C,legato down D->C (62->60, vel=127), during 1000 ms"
|
||||
echo "noteoff D"
|
||||
noteon 0 60 127
|
||||
noteoff 0 62
|
||||
sleep 1000
|
||||
echo "noteoff C"
|
||||
noteoff 0 60
|
||||
sleep 1000
|
||||
echo "legato Off"
|
||||
cc 0 68 0
|
||||
echo "End legato mode 1 (retrigger_1)"
|
103
singe/thirdparty/fluidsynth/doc/polymono/leg_01.txt
vendored
103
singe/thirdparty/fluidsynth/doc/polymono/leg_01.txt
vendored
|
@ -1,103 +0,0 @@
|
|||
echo "legato mode 1 (multi-retrigger), egal velocity on n1,n2,n3..."
|
||||
echo "-------------------------------------------------------------"
|
||||
# Sounfont: GeneralUser GS 1.471 S. Christian Collins
|
||||
# Some presets
|
||||
# 0: Piano 0 ; short release
|
||||
# 16:organ 24:guitar
|
||||
# 52: Choir Aahs 53: Voice Oohs
|
||||
#
|
||||
# 56:trumpet 57:trombone 58:tuba 59:muted trumpet
|
||||
# 60:French horn 61:Brass section
|
||||
# 62:Synth brass 1 63:Synth Brass 2
|
||||
# 64:Soprano sax 65:Alto sax 66:Tenor sax 67:Baritone sax.
|
||||
# 68:Oboe 69:English horn 70:Bassoon 71:Clarinet
|
||||
# 72:piccolo 73:Flute 74:Recorder 75:Pan flute
|
||||
#
|
||||
# 99:atmosphere; attack longer than organ, release longer than piano
|
||||
# 100:brillance , 101:gobelin
|
||||
|
||||
echo "preset 73:flute"
|
||||
prog 0 73
|
||||
echo "legato mode:1"
|
||||
setlegatomode 0 1
|
||||
echo "legato On"
|
||||
cc 0 68 127
|
||||
echo "noteon C 60 vel=127, during 1000 ms"
|
||||
noteon 0 60 127
|
||||
sleep 1000
|
||||
echo "noteon D,legato up C->D (60->62, vel=127), during 1000 ms"
|
||||
echo "noteoff C"
|
||||
noteon 0 62 127
|
||||
noteoff 0 60
|
||||
sleep 1000
|
||||
echo "noteon E,legato up D->E (62->64, vel=127), during 1000 ms"
|
||||
echo "noteoff D"
|
||||
noteon 0 64 127
|
||||
noteoff 0 62
|
||||
sleep 1000
|
||||
echo "noteon F,legato up E->F (64->65, vel=127), during 1000 ms"
|
||||
echo "noteoff E"
|
||||
noteon 0 65 127
|
||||
noteoff 0 64
|
||||
sleep 1000
|
||||
echo "noteon G,legato up F->G (65->67, vel=127), during 1000 ms"
|
||||
echo "noteoff F"
|
||||
noteon 0 67 127
|
||||
noteoff 0 65
|
||||
sleep 1000
|
||||
echo "noteon A,legato up G->A (67->69, vel=127), during 1000 ms"
|
||||
echo "noteoff G"
|
||||
noteon 0 69 127
|
||||
noteoff 0 67
|
||||
sleep 1000
|
||||
echo "noteon B,legato up A->B (69->71, vel=127), during 1000 ms"
|
||||
echo "noteoff A"
|
||||
noteon 0 71 127
|
||||
noteoff 0 69
|
||||
sleep 1000
|
||||
echo "noteon C,legato up B->C (71->72, vel=127), during 1000 ms"
|
||||
echo "noteoff B"
|
||||
noteon 0 72 127
|
||||
noteoff 0 71
|
||||
sleep 1000
|
||||
echo "noteon B,legato down C->B (72->71, vel=127), during 1000 ms"
|
||||
echo "noteoff C"
|
||||
noteon 0 71 127
|
||||
noteoff 0 72
|
||||
sleep 1000
|
||||
echo "noteon A,legato down B->A (71->69, vel=127), during 1000 ms"
|
||||
echo "noteoff B"
|
||||
noteon 0 69 127
|
||||
noteoff 0 71
|
||||
sleep 1000
|
||||
echo "noteon G,legato down A->G (69->67, vel=127), during 1000 ms"
|
||||
echo "noteoff A"
|
||||
noteon 0 67 127
|
||||
noteoff 0 69
|
||||
sleep 1000
|
||||
echo "noteon F,legato down G->F (67->65, vel=127), during 1000 ms"
|
||||
echo "noteoff G"
|
||||
noteon 0 65 127
|
||||
noteoff 0 67
|
||||
sleep 1000
|
||||
echo "noteon E,legato down F->E (65->64, vel=127), during 1000 ms"
|
||||
echo "noteoff F"
|
||||
noteon 0 64 127
|
||||
noteoff 0 65
|
||||
sleep 1000
|
||||
echo "noteon D,legato down E->D (64->62, vel=127), during 1000 ms"
|
||||
echo "noteoff E"
|
||||
noteon 0 62 127
|
||||
noteoff 0 64
|
||||
sleep 1000
|
||||
echo "noteon C,legato down D->C (62->60, vel=127), during 1000 ms"
|
||||
echo "noteoff D"
|
||||
noteon 0 60 127
|
||||
noteoff 0 62
|
||||
sleep 1000
|
||||
echo "noteoff C"
|
||||
noteoff 0 60
|
||||
sleep 1000
|
||||
echo "legato Off"
|
||||
cc 0 68 0
|
||||
echo "End legato mode 2 (multi-retrigger)"
|
|
@ -1,107 +0,0 @@
|
|||
echo "legato mode 0 (retrigger), egal velocity on n1,n2,n3..."
|
||||
echo "with portamento."
|
||||
echo "---------------------------------------------------------"
|
||||
# Sounfont: GeneralUser GS 1.471 S. Christian Collins
|
||||
# Some presets
|
||||
# 0: Piano 0 ; short release
|
||||
# 16:organ 24:guitar
|
||||
# 52: Choir Aahs 53: Voice Oohs
|
||||
#
|
||||
# 56:trumpet 57:trombone 58:tuba 59:muted trumpet
|
||||
# 60:French horn 61:Brass section
|
||||
# 62:Synth brass 1 63:Synth Brass 2
|
||||
# 64:Soprano sax 65:Alto sax 66:Tenor sax 67:Baritone sax.
|
||||
# 68:Oboe 69:English horn 70:Bassoon 71:Clarinet
|
||||
# 72:piccolo 73:Flute 74:Recorder 75:Pan flute
|
||||
#
|
||||
# 99:atmosphere; attack longer than organ, release longer than piano
|
||||
# 100:brillance , 101:gobelin
|
||||
|
||||
echo "preset 73:flute"
|
||||
prog 0 73
|
||||
echo "legato mode:0"
|
||||
setlegatomode 0 0
|
||||
echo "legato On, portamento On"
|
||||
cc 0 68 127
|
||||
cc 0 5 2
|
||||
cc 0 65 127
|
||||
echo "noteon C 60 vel=127, during 1000 ms"
|
||||
noteon 0 60 127
|
||||
sleep 1000
|
||||
echo "noteon D,legato up C->D (60->62, vel=127), during 1000 ms"
|
||||
echo "noteoff C"
|
||||
noteon 0 62 127
|
||||
noteoff 0 60
|
||||
sleep 1000
|
||||
echo "noteon E,legato up D->E (62->64, vel=127), during 1000 ms"
|
||||
echo "noteoff D"
|
||||
noteon 0 64 127
|
||||
noteoff 0 62
|
||||
sleep 1000
|
||||
echo "noteon F,legato up E->F (64->65, vel=127), during 1000 ms"
|
||||
echo "noteoff E"
|
||||
noteon 0 65 127
|
||||
noteoff 0 64
|
||||
sleep 1000
|
||||
echo "noteon G,legato up F->G (65->67, vel=127), during 1000 ms"
|
||||
echo "noteoff F"
|
||||
noteon 0 67 127
|
||||
noteoff 0 65
|
||||
sleep 1000
|
||||
echo "noteon A,legato up G->A (67->69, vel=127), during 1000 ms"
|
||||
echo "noteoff G"
|
||||
noteon 0 69 127
|
||||
noteoff 0 67
|
||||
sleep 1000
|
||||
echo "noteon B,legato up A->B (69->71, vel=127), during 1000 ms"
|
||||
echo "noteoff A"
|
||||
noteon 0 71 127
|
||||
noteoff 0 69
|
||||
sleep 1000
|
||||
echo "noteon C,legato up B->C (71->72, vel=127), during 1000 ms"
|
||||
echo "noteoff B"
|
||||
noteon 0 72 127
|
||||
noteoff 0 71
|
||||
sleep 1000
|
||||
echo "noteon B,legato down C->B (72->71, vel=127), during 1000 ms"
|
||||
echo "noteoff C"
|
||||
noteon 0 71 127
|
||||
noteoff 0 72
|
||||
sleep 1000
|
||||
echo "noteon A,legato down B->A (71->69, vel=127), during 1000 ms"
|
||||
echo "noteoff B"
|
||||
noteon 0 69 127
|
||||
noteoff 0 71
|
||||
sleep 1000
|
||||
echo "noteon G,legato down A->G (69->67, vel=127), during 1000 ms"
|
||||
echo "noteoff A"
|
||||
noteon 0 67 127
|
||||
noteoff 0 69
|
||||
sleep 1000
|
||||
echo "noteon F,legato down G->F (67->65, vel=127), during 1000 ms"
|
||||
echo "noteoff G"
|
||||
noteon 0 65 127
|
||||
noteoff 0 67
|
||||
sleep 1000
|
||||
echo "noteon E,legato down F->E (65->64, vel=127), during 1000 ms"
|
||||
echo "noteoff F"
|
||||
noteon 0 64 127
|
||||
noteoff 0 65
|
||||
sleep 1000
|
||||
echo "noteon D,legato down E->D (64->62, vel=127), during 1000 ms"
|
||||
echo "noteoff E"
|
||||
noteon 0 62 127
|
||||
noteoff 0 64
|
||||
sleep 1000
|
||||
echo "noteon C,legato down D->C (62->60, vel=127), during 1000 ms"
|
||||
echo "noteoff D"
|
||||
noteon 0 60 127
|
||||
noteoff 0 62
|
||||
sleep 1000
|
||||
echo "noteoff C"
|
||||
noteoff 0 60
|
||||
sleep 1000
|
||||
echo "legato Off, portamento off"
|
||||
cc 0 68 0
|
||||
cc 0 65 0
|
||||
echo "End legato mode 1 (retrigger_1) with portamento"
|
|
@ -1,107 +0,0 @@
|
|||
echo "legato mode 1 (multi-retrigger), egal velocity on n1,n2,n3..."
|
||||
echo "with portamento."
|
||||
echo "-------------------------------------------------------------"
|
||||
# Sounfont: GeneralUser GS 1.471 S. Christian Collins
|
||||
# Some presets
|
||||
# 0: Piano 0 ; short release
|
||||
# 16:organ 24:guitar
|
||||
# 52: Choir Aahs 53: Voice Oohs
|
||||
#
|
||||
# 56:trumpet 57:trombone 58:tuba 59:muted trumpet
|
||||
# 60:French horn 61:Brass section
|
||||
# 62:Synth brass 1 63:Synth Brass 2
|
||||
# 64:Soprano sax 65:Alto sax 66:Tenor sax 67:Baritone sax.
|
||||
# 68:Oboe 69:English horn 70:Bassoon 71:Clarinet
|
||||
# 72:piccolo 73:Flute 74:Recorder 75:Pan flute
|
||||
#
|
||||
# 99:atmosphere; attack longer than organ, release longer than piano
|
||||
# 100:brillance , 101:gobelin
|
||||
|
||||
echo "preset 73:flute"
|
||||
prog 0 73
|
||||
echo "legato mode:1"
|
||||
setlegatomode 0 1
|
||||
echo "legato On, portamento On"
|
||||
cc 0 68 127
|
||||
cc 0 5 2
|
||||
cc 0 65 127
|
||||
echo "noteon C 60 vel=127, during 1000 ms"
|
||||
noteon 0 60 127
|
||||
sleep 1000
|
||||
echo "noteon D,legato up C->D (60->62, vel=127), during 1000 ms"
|
||||
echo "noteoff C"
|
||||
noteon 0 62 127
|
||||
noteoff 0 60
|
||||
sleep 1000
|
||||
echo "noteon E,legato up D->E (62->64, vel=127), during 1000 ms"
|
||||
echo "noteoff D"
|
||||
noteon 0 64 127
|
||||
noteoff 0 62
|
||||
sleep 1000
|
||||
echo "noteon F,legato up E->F (64->65, vel=127), during 1000 ms"
|
||||
echo "noteoff E"
|
||||
noteon 0 65 127
|
||||
noteoff 0 64
|
||||
sleep 1000
|
||||
echo "noteon G,legato up F->G (65->67, vel=127), during 1000 ms"
|
||||
echo "noteoff F"
|
||||
noteon 0 67 127
|
||||
noteoff 0 65
|
||||
sleep 1000
|
||||
echo "noteon A,legato up G->A (67->69, vel=127), during 1000 ms"
|
||||
echo "noteoff G"
|
||||
noteon 0 69 127
|
||||
noteoff 0 67
|
||||
sleep 1000
|
||||
echo "noteon B,legato up A->B (69->71, vel=127), during 1000 ms"
|
||||
echo "noteoff A"
|
||||
noteon 0 71 127
|
||||
noteoff 0 69
|
||||
sleep 1000
|
||||
echo "noteon C,legato up B->C (71->72, vel=127), during 1000 ms"
|
||||
echo "noteoff B"
|
||||
noteon 0 72 127
|
||||
noteoff 0 71
|
||||
sleep 1000
|
||||
echo "noteon B,legato down C->B (72->71, vel=127), during 1000 ms"
|
||||
echo "noteoff C"
|
||||
noteon 0 71 127
|
||||
noteoff 0 72
|
||||
sleep 1000
|
||||
echo "noteon A,legato down B->A (71->69, vel=127), during 1000 ms"
|
||||
echo "noteoff B"
|
||||
noteon 0 69 127
|
||||
noteoff 0 71
|
||||
sleep 1000
|
||||
echo "noteon G,legato down A->G (69->67, vel=127), during 1000 ms"
|
||||
echo "noteoff A"
|
||||
noteon 0 67 127
|
||||
noteoff 0 69
|
||||
sleep 1000
|
||||
echo "noteon F,legato down G->F (67->65, vel=127), during 1000 ms"
|
||||
echo "noteoff G"
|
||||
noteon 0 65 127
|
||||
noteoff 0 67
|
||||
sleep 1000
|
||||
echo "noteon E,legato down F->E (65->64, vel=127), during 1000 ms"
|
||||
echo "noteoff F"
|
||||
noteon 0 64 127
|
||||
noteoff 0 65
|
||||
sleep 1000
|
||||
echo "noteon D,legato down E->D (64->62, vel=127), during 1000 ms"
|
||||
echo "noteoff E"
|
||||
noteon 0 62 127
|
||||
noteoff 0 64
|
||||
sleep 1000
|
||||
echo "noteon C,legato down D->C (62->60, vel=127), during 1000 ms"
|
||||
echo "noteoff D"
|
||||
noteon 0 60 127
|
||||
noteoff 0 62
|
||||
sleep 1000
|
||||
echo "noteoff C"
|
||||
noteoff 0 60
|
||||
sleep 1000
|
||||
echo "legato Off, portamento off"
|
||||
cc 0 68 0
|
||||
cc 0 65 0
|
||||
echo "End legato mode 2 (multi-retrigger) with portamento"
|
|
@ -1,8 +0,0 @@
|
|||
# What are default 'basic channels' in FluidSynth ?
|
||||
#--------------------------------------------------
|
||||
# At initialization the default basic channel is poly omnion (see pdf 2.2).
|
||||
|
||||
# type the command basicchannels to display actual basic channels.
|
||||
basicchannels
|
||||
|
||||
# end
|
|
@ -1,25 +0,0 @@
|
|||
# How to change the whole set of actual basic channels ?
|
||||
# -------------------------------------------------------------
|
||||
# Assuming you want to set 2 groups of channels:
|
||||
# Group 1: first channel 5 in poly mode, only one channel
|
||||
# Group 2: first channel 10 in mono mode , only one channel
|
||||
|
||||
# Group 1 should have following settings:
|
||||
# basic channel 5, mode poly, omni off, (mode 2).
|
||||
|
||||
# Group 2 should have the following settings:
|
||||
# basic channel 10, mode mono, omni off, (mode 3), composed of one channel.
|
||||
|
||||
# First use the command resetbasicchannels to reset all basic channels
|
||||
resetbasicchannels
|
||||
|
||||
# Then use command setbasicchannels using numbered mode 2 and 3:
|
||||
setbasicchannels 5 2 0 10 3 1
|
||||
# or using named mode:
|
||||
# setbasicchannels 5 poly_omnioff 0 10 mono_omnioff 1
|
||||
|
||||
# Use basicchannels command to verify your settings
|
||||
basicchannels
|
||||
|
||||
|
||||
# end
|
|
@ -1,22 +0,0 @@
|
|||
# How to add a new basic channel among others actual basic channels ?
|
||||
# -------------------------------------------------------------------
|
||||
# Perhaps you have already set several groups of basics channels and
|
||||
# you want add a new one without modifying actual groups.
|
||||
# Assuming following actual groups:
|
||||
|
||||
# Basic channel: 5, poly omni off(mode 2), nbr: 1
|
||||
# Basic channel: 10, mono omni off(mode 3), nbr: 1
|
||||
|
||||
# Now we want to add a new group 3:
|
||||
# Group 3 should have the following settings:
|
||||
# basic channel 13, mode mono, omni off, (mode 3) composed of 2 channels.
|
||||
|
||||
# Use command setbasicchannels using numbered mode 3:
|
||||
setbasicchannels 13 3 2
|
||||
# or using named mode:
|
||||
# setbasicchannels 13 mono_omnioff 2
|
||||
|
||||
Use basicchannels command to verify your settings
|
||||
basicchannels
|
||||
|
||||
# end
|
|
@ -1,26 +0,0 @@
|
|||
# How to change an actual basic channel ?
|
||||
# ---------------------------------------
|
||||
# Perhaps you have already set several groups of basics channels
|
||||
# and you want change the settings of one.
|
||||
|
||||
# Assuming following actual groups:
|
||||
# -Group 1:Basic channel: 5, poly omni off(mode 2), nbr: 1
|
||||
# -Group 2:Basic channel: 10, mono omni off(mode 3), nbr: 1
|
||||
# -Group 3:Basic channel: 13, mono omni off(mode 3), nbr: 2
|
||||
|
||||
# Now we want to change group 1:
|
||||
# Group 1 should have the following settings:
|
||||
# -basic channel 5, mode poly, omni on, (mode 0) composed of 4 channels in this group.
|
||||
|
||||
#First use the command resetbasicchannels to clear the group intended to be changed.
|
||||
resetbasicchannels 5
|
||||
|
||||
# Then use command setbasicchannels using numbered mode 0:
|
||||
setbasicchannels 5 0 4
|
||||
# or Using named mode:
|
||||
# setbasicchannels 5 poly_omnion 4
|
||||
|
||||
# Use basicchannels command to verify your settings
|
||||
basicchannels
|
||||
|
||||
# end
|
|
@ -1,25 +0,0 @@
|
|||
# How to change an actual basic channel and add a new one ?
|
||||
# ---------------------------------------------------------
|
||||
# Note that command setbasicchannels allows to add or change
|
||||
# groups of basics channels.
|
||||
#
|
||||
# Note also that the commands allows this for more than one
|
||||
# groups executing only one command:
|
||||
|
||||
# The following command restores Group 1 to the state:
|
||||
# -Group 1:Basic channel: 5, poly omni off(mode 2), nbr: 1
|
||||
# Then adds a new group:
|
||||
# -Group 0:Basic channel: 2, mono omni on(mode 1), composed of 3 possible channels in this group
|
||||
|
||||
#First use the command resetbasicchannels to clear the group intended to be changed.
|
||||
resetbasicchannels 5
|
||||
|
||||
# Use command setbasicchannels to change a group and add a new one, using numbered mode 2 and 1:
|
||||
setbasicchannels 5 2 0 2 1 3
|
||||
# or using named mode:
|
||||
# setbasicchannels 5 poly_omnioff 0 2 mono_omnion 3
|
||||
|
||||
# Use basicchannels command to verify your settings
|
||||
basicchannels
|
||||
|
||||
# end
|
|
@ -1,9 +0,0 @@
|
|||
# How to know the state of one or more MIDI channels ?
|
||||
# -----------------------------------------------------
|
||||
# Use the command channelsmode [chan1 chan2 ….]
|
||||
channelsmode
|
||||
|
||||
# To display the state of MIDI channels 2,5, 10, 13 only
|
||||
channelsmode 2 5 10 13
|
||||
|
||||
# end
|
|
@ -1,22 +0,0 @@
|
|||
/fluidSynth/doc/polymono directory contains:
|
||||
|
||||
1) FluidPolyMono-0004.pdf, the documentation of poly/mono functionalities.
|
||||
2) tutorials examples files:
|
||||
2.1) tutorials chapter 2.1
|
||||
poly_mono_0.txt
|
||||
poly_mono_1.txt
|
||||
poly_mono_2.txt
|
||||
poly_mono_3.txt
|
||||
poly_mono_4.txt
|
||||
poly_mono_5.txt
|
||||
|
||||
2.2) tutorials chapter 3.1
|
||||
leg_00.txt
|
||||
leg_01.txt
|
||||
leg_por_00.txt
|
||||
leg_por_01.txt
|
||||
|
||||
These tutorials files are usable directly on the FluidSynth console application.
|
||||
See the pdf file (chapters 2.1 and 3.1).
|
||||
|
||||
jean-jacques ceresa
|
|
@ -1,5 +0,0 @@
|
|||
# Mandatory parameters (uncomment and edit)
|
||||
#SOUND_FONT=@DEFAULT_SOUNDFONT@
|
||||
|
||||
# Additional optional parameters (may be useful, see 'man fluidsynth' for further info)
|
||||
#OTHER_OPTS='-a alsa -m alsa_seq -r 48000'
|
10
singe/thirdparty/fluidsynth/fluidsynth.pc.in
vendored
10
singe/thirdparty/fluidsynth/fluidsynth.pc.in
vendored
|
@ -1,10 +0,0 @@
|
|||
prefix=@prefix@
|
||||
exec_prefix=@exec_prefix@
|
||||
libdir=@libdir@
|
||||
includedir=@includedir@
|
||||
|
||||
Name: FluidSynth
|
||||
Description: Software SoundFont synth
|
||||
Version: @VERSION@
|
||||
Libs: -L${libdir} -lfluidsynth
|
||||
Cflags: -I${includedir}
|
|
@ -1,15 +0,0 @@
|
|||
[Unit]
|
||||
Description=FluidSynth Daemon
|
||||
Documentation=man:fluidsynth(1)
|
||||
After=sound.target
|
||||
|
||||
[Service]
|
||||
Type=notify
|
||||
NotifyAccess=main
|
||||
EnvironmentFile=@FLUID_DAEMON_ENV_FILE@
|
||||
EnvironmentFile=-%h/.config/fluidsynth
|
||||
ExecStart=@CMAKE_INSTALL_PREFIX@/@BIN_INSTALL_DIR@/fluidsynth -is $OTHER_OPTS $SOUND_FONT
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
76
singe/thirdparty/fluidsynth/fluidsynth.spec.in
vendored
76
singe/thirdparty/fluidsynth/fluidsynth.spec.in
vendored
|
@ -1,76 +0,0 @@
|
|||
|
||||
%define name @PACKAGE@
|
||||
%define version @VERSION@
|
||||
%define release 1
|
||||
%define prefix /usr
|
||||
|
||||
Summary: A real-time software synthesizer based on SoundFont 2 specifications.
|
||||
Name: %{name}
|
||||
Version: %{version}
|
||||
Release: %{release}
|
||||
Prefix: %{prefix}
|
||||
Copyright: LGPL
|
||||
Group: Sound
|
||||
Source: http://savannah.nongnu.org/download/fluid/stable.pkg/%{version}/fluidsynth-%{version}.tar.gz
|
||||
URL: http://www.fluidsynth.org/
|
||||
BuildRoot: /var/tmp/%{name}-%{version}
|
||||
|
||||
%description
|
||||
FluidSynth is a real-time software synthesizer based on the SoundFont
|
||||
2 specifications. FluidSynth can read MIDI events from MIDI input
|
||||
devices and render them to audio devices using SoundFont files to
|
||||
define the instrument sounds. It can also play MIDI files and supports
|
||||
real time effect control via SoundFont modulators and MIDI
|
||||
controls. FluidSynth can be interfaced to other programs in different
|
||||
ways, including linking as a shared library.
|
||||
|
||||
%package devel
|
||||
Summary: Libraries and includes to build FluidSynth into other applications
|
||||
Group: Development/Libraries
|
||||
|
||||
%description devel
|
||||
FluidSynth is a real-time software synthesizer based on the SoundFont
|
||||
2 specifications. FluidSynth can read MIDI events from MIDI input
|
||||
devices and render them to audio devices using SoundFont files to
|
||||
define the instrument sounds. It can also play MIDI files and supports
|
||||
real time effect control via SoundFont modulators and MIDI
|
||||
controls. FluidSynth can be interfaced to other programs in different
|
||||
ways, including linking as a shared library.
|
||||
|
||||
This package contains libraries and includes for building applications
|
||||
with FluidSynth support.
|
||||
|
||||
%prep
|
||||
%setup
|
||||
|
||||
%build
|
||||
./configure --prefix=%{prefix}
|
||||
make
|
||||
|
||||
%install
|
||||
if [ -d $RPM_BUILD_ROOT ]; then rm -rf $RPM_BUILD_ROOT; fi
|
||||
mkdir -p $RPM_BUILD_ROOT
|
||||
make prefix=$RPM_BUILD_ROOT%{prefix} install
|
||||
|
||||
%clean
|
||||
if [ -d $RPM_BUILD_ROOT ]; then rm -rf $RPM_BUILD_ROOT; fi
|
||||
|
||||
%files
|
||||
%defattr(-,root,root)
|
||||
%doc AUTHORS COPYING ChangeLog NEWS README TODO
|
||||
%{prefix}/bin/fluidsynth
|
||||
%{prefix}/lib/libfluidsynth.so*
|
||||
%{prefix}/man/man1/*
|
||||
|
||||
%files devel
|
||||
%defattr(-,root,root)
|
||||
%doc doc/example.c doc/example.sf2 doc/api doc/html/*
|
||||
%{prefix}/lib/libfluidsynth.a
|
||||
%{prefix}/lib/libfluidsynth.la
|
||||
%{prefix}/lib/pkgconfig/fluidsynth.pc
|
||||
%{prefix}/include/fluidsynth.h
|
||||
%{prefix}/include/fluidsynth
|
||||
|
||||
%changelog
|
||||
* Mon Aug 25 2003 Josh Green <jgreen@users.sourceforge.net>
|
||||
- Created initial fluidsynth.spec.in
|
118
singe/thirdparty/fluidsynth/include/fluidsynth.cmake
vendored
118
singe/thirdparty/fluidsynth/include/fluidsynth.cmake
vendored
|
@ -1,118 +0,0 @@
|
|||
/* FluidSynth - A Software Synthesizer
|
||||
*
|
||||
* Copyright (C) 2003 Peter Hanappe and others.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public License
|
||||
* as published by the Free Software Foundation; either version 2.1 of
|
||||
* the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301, USA
|
||||
*/
|
||||
|
||||
#ifndef _FLUIDSYNTH_H
|
||||
#define _FLUIDSYNTH_H
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#cmakedefine01 BUILD_SHARED_LIBS
|
||||
|
||||
#if (BUILD_SHARED_LIBS == 0)
|
||||
#define FLUIDSYNTH_API // building static lib? no visibility control then
|
||||
#elif defined(WIN32)
|
||||
#if defined(FLUIDSYNTH_NOT_A_DLL)
|
||||
#define FLUIDSYNTH_API
|
||||
#elif defined(FLUIDSYNTH_DLL_EXPORTS)
|
||||
#define FLUIDSYNTH_API __declspec(dllexport)
|
||||
#else
|
||||
#define FLUIDSYNTH_API __declspec(dllimport)
|
||||
#endif
|
||||
|
||||
#elif defined(MACOS9)
|
||||
#define FLUIDSYNTH_API __declspec(export)
|
||||
|
||||
#elif defined(__GNUC__)
|
||||
#define FLUIDSYNTH_API __attribute__ ((visibility ("default")))
|
||||
|
||||
#else
|
||||
#define FLUIDSYNTH_API
|
||||
|
||||
#endif
|
||||
|
||||
#if defined(__GNUC__) || defined(__clang__)
|
||||
# define FLUID_DEPRECATED __attribute__((deprecated))
|
||||
#elif defined(_MSC_VER) && _MSC_VER > 1200
|
||||
# define FLUID_DEPRECATED __declspec(deprecated)
|
||||
#else
|
||||
# define FLUID_DEPRECATED
|
||||
#endif
|
||||
|
||||
|
||||
/**
|
||||
* @file fluidsynth.h
|
||||
* @brief FluidSynth is a real-time synthesizer designed for SoundFont(R) files.
|
||||
*
|
||||
* This is the header of the fluidsynth library and contains the
|
||||
* synthesizer's public API.
|
||||
*
|
||||
* Depending on how you want to use or extend the synthesizer you
|
||||
* will need different API functions. You probably do not need all
|
||||
* of them. Here is what you might want to do:
|
||||
*
|
||||
* - Embedded synthesizer: create a new synthesizer and send MIDI
|
||||
* events to it. The sound goes directly to the audio output of
|
||||
* your system.
|
||||
*
|
||||
* - Plugin synthesizer: create a synthesizer and send MIDI events
|
||||
* but pull the audio back into your application.
|
||||
*
|
||||
* - SoundFont plugin: create a new type of "SoundFont" and allow
|
||||
* the synthesizer to load your type of SoundFonts.
|
||||
*
|
||||
* - MIDI input: Create a MIDI handler to read the MIDI input on your
|
||||
* machine and send the MIDI events directly to the synthesizer.
|
||||
*
|
||||
* - MIDI files: Open MIDI files and send the MIDI events to the
|
||||
* synthesizer.
|
||||
*
|
||||
* - Command lines: You can send textual commands to the synthesizer.
|
||||
*
|
||||
* SoundFont(R) is a registered trademark of E-mu Systems, Inc.
|
||||
*/
|
||||
|
||||
#include "fluidsynth/types.h"
|
||||
#include "fluidsynth/settings.h"
|
||||
#include "fluidsynth/synth.h"
|
||||
#include "fluidsynth/shell.h"
|
||||
#include "fluidsynth/sfont.h"
|
||||
#include "fluidsynth/audio.h"
|
||||
#include "fluidsynth/event.h"
|
||||
#include "fluidsynth/midi.h"
|
||||
#include "fluidsynth/seq.h"
|
||||
#include "fluidsynth/seqbind.h"
|
||||
#include "fluidsynth/log.h"
|
||||
#include "fluidsynth/misc.h"
|
||||
#include "fluidsynth/mod.h"
|
||||
#include "fluidsynth/gen.h"
|
||||
#include "fluidsynth/voice.h"
|
||||
#include "fluidsynth/version.h"
|
||||
#include "fluidsynth/ladspa.h"
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _FLUIDSYNTH_H */
|
|
@ -1,79 +0,0 @@
|
|||
/* FluidSynth - A Software Synthesizer
|
||||
*
|
||||
* Copyright (C) 2003 Peter Hanappe and others.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public License
|
||||
* as published by the Free Software Foundation; either version 2.1 of
|
||||
* the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301, USA
|
||||
*/
|
||||
|
||||
#ifndef _FLUIDSYNTH_AUDIO_H
|
||||
#define _FLUIDSYNTH_AUDIO_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @file audio.h
|
||||
* @brief Functions for audio driver output.
|
||||
* @defgroup AudioFunctions Functions for audio output
|
||||
*
|
||||
* Defines functions for creating audio driver output. Use
|
||||
* new_fluid_audio_driver() to create a new audio driver for a given synth
|
||||
* and configuration settings. The function new_fluid_audio_driver2() can be
|
||||
* used if custom audio processing is desired before the audio is sent to the
|
||||
* audio driver (although it is not as efficient).
|
||||
*
|
||||
* @sa @ref CreatingAudioDriver
|
||||
*/
|
||||
|
||||
/**
|
||||
* Callback function type used with new_fluid_audio_driver2() to allow for
|
||||
* custom user audio processing before the audio is sent to the driver. This
|
||||
* function is responsible for rendering the audio to the buffers. For details
|
||||
* please refer to fluid_synth_process().
|
||||
* @param data The user data parameter as passed to new_fluid_audio_driver2().
|
||||
* @param len Count of audio frames to synthesize.
|
||||
* @param nfx Count of arrays in \c fx.
|
||||
* @param fx Array of buffers to store effects audio to. Buffers may alias with buffers of \c out.
|
||||
* @param nout Count of arrays in \c out.
|
||||
* @param out Array of buffers to store (dry) audio to. Buffers may alias with buffers of \c fx.
|
||||
* @return Should return #FLUID_OK on success, #FLUID_FAILED if an error occured.
|
||||
*/
|
||||
typedef int (*fluid_audio_func_t)(void *data, int len,
|
||||
int nfx, float *fx[],
|
||||
int nout, float *out[]);
|
||||
|
||||
FLUIDSYNTH_API fluid_audio_driver_t *new_fluid_audio_driver(fluid_settings_t *settings,
|
||||
fluid_synth_t *synth);
|
||||
|
||||
FLUIDSYNTH_API fluid_audio_driver_t *new_fluid_audio_driver2(fluid_settings_t *settings,
|
||||
fluid_audio_func_t func,
|
||||
void *data);
|
||||
|
||||
FLUIDSYNTH_API void delete_fluid_audio_driver(fluid_audio_driver_t *driver);
|
||||
|
||||
FLUIDSYNTH_API fluid_file_renderer_t *new_fluid_file_renderer(fluid_synth_t *synth);
|
||||
FLUIDSYNTH_API int fluid_file_renderer_process_block(fluid_file_renderer_t *dev);
|
||||
FLUIDSYNTH_API void delete_fluid_file_renderer(fluid_file_renderer_t *dev);
|
||||
FLUIDSYNTH_API int fluid_file_set_encoding_quality(fluid_file_renderer_t *dev, double q);
|
||||
|
||||
FLUIDSYNTH_API int fluid_audio_driver_register(const char **adrivers);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _FLUIDSYNTH_AUDIO_H */
|
|
@ -1,138 +0,0 @@
|
|||
/* FluidSynth - A Software Synthesizer
|
||||
*
|
||||
* Copyright (C) 2003 Peter Hanappe and others.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public License
|
||||
* as published by the Free Software Foundation; either version 2.1 of
|
||||
* the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301, USA
|
||||
*/
|
||||
|
||||
#ifndef _FLUIDSYNTH_EVENT_H
|
||||
#define _FLUIDSYNTH_EVENT_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @file event.h
|
||||
* @brief Sequencer event functions and defines.
|
||||
*
|
||||
* Functions and constants for creating/processing sequencer events.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Sequencer event type enumeration.
|
||||
*/
|
||||
enum fluid_seq_event_type
|
||||
{
|
||||
FLUID_SEQ_NOTE = 0, /**< Note event with duration */
|
||||
FLUID_SEQ_NOTEON, /**< Note on event */
|
||||
FLUID_SEQ_NOTEOFF, /**< Note off event */
|
||||
FLUID_SEQ_ALLSOUNDSOFF, /**< All sounds off event */
|
||||
FLUID_SEQ_ALLNOTESOFF, /**< All notes off event */
|
||||
FLUID_SEQ_BANKSELECT, /**< Bank select message */
|
||||
FLUID_SEQ_PROGRAMCHANGE, /**< Program change message */
|
||||
FLUID_SEQ_PROGRAMSELECT, /**< Program select message */
|
||||
FLUID_SEQ_PITCHBEND, /**< Pitch bend message */
|
||||
FLUID_SEQ_PITCHWHEELSENS, /**< Pitch wheel sensitivity set message @since 1.1.0 was mispelled previously */
|
||||
FLUID_SEQ_MODULATION, /**< Modulation controller event */
|
||||
FLUID_SEQ_SUSTAIN, /**< Sustain controller event */
|
||||
FLUID_SEQ_CONTROLCHANGE, /**< MIDI control change event */
|
||||
FLUID_SEQ_PAN, /**< Stereo pan set event */
|
||||
FLUID_SEQ_VOLUME, /**< Volume set event */
|
||||
FLUID_SEQ_REVERBSEND, /**< Reverb send set event */
|
||||
FLUID_SEQ_CHORUSSEND, /**< Chorus send set event */
|
||||
FLUID_SEQ_TIMER, /**< Timer event (useful for giving a callback at a certain time) */
|
||||
FLUID_SEQ_ANYCONTROLCHANGE, /**< Any control change message (only internally used for remove_events) */
|
||||
FLUID_SEQ_CHANNELPRESSURE, /**< Channel aftertouch event @since 1.1.0 */
|
||||
FLUID_SEQ_KEYPRESSURE, /**< Polyphonic aftertouch event @since 2.0.0 */
|
||||
FLUID_SEQ_SYSTEMRESET, /**< System reset event @since 1.1.0 */
|
||||
FLUID_SEQ_UNREGISTERING, /**< Called when a sequencer client is being unregistered. @since 1.1.0 */
|
||||
#ifndef __DOXYGEN__
|
||||
FLUID_SEQ_LASTEVENT /**< @internal Defines the count of events enums @warning This symbol is not part of the public API and ABI stability guarantee and may change at any time! */
|
||||
#endif
|
||||
};
|
||||
|
||||
/* Event alloc/free */
|
||||
FLUIDSYNTH_API fluid_event_t *new_fluid_event(void);
|
||||
FLUIDSYNTH_API void delete_fluid_event(fluid_event_t *evt);
|
||||
|
||||
/* Initializing events */
|
||||
FLUIDSYNTH_API void fluid_event_set_source(fluid_event_t *evt, fluid_seq_id_t src);
|
||||
FLUIDSYNTH_API void fluid_event_set_dest(fluid_event_t *evt, fluid_seq_id_t dest);
|
||||
|
||||
/* Timer events */
|
||||
FLUIDSYNTH_API void fluid_event_timer(fluid_event_t *evt, void *data);
|
||||
|
||||
/* Note events */
|
||||
FLUIDSYNTH_API void fluid_event_note(fluid_event_t *evt, int channel,
|
||||
short key, short vel,
|
||||
unsigned int duration);
|
||||
|
||||
FLUIDSYNTH_API void fluid_event_noteon(fluid_event_t *evt, int channel, short key, short vel);
|
||||
FLUIDSYNTH_API void fluid_event_noteoff(fluid_event_t *evt, int channel, short key);
|
||||
FLUIDSYNTH_API void fluid_event_all_sounds_off(fluid_event_t *evt, int channel);
|
||||
FLUIDSYNTH_API void fluid_event_all_notes_off(fluid_event_t *evt, int channel);
|
||||
|
||||
/* Instrument selection */
|
||||
FLUIDSYNTH_API void fluid_event_bank_select(fluid_event_t *evt, int channel, short bank_num);
|
||||
FLUIDSYNTH_API void fluid_event_program_change(fluid_event_t *evt, int channel, short preset_num);
|
||||
FLUIDSYNTH_API void fluid_event_program_select(fluid_event_t *evt, int channel, unsigned int sfont_id, short bank_num, short preset_num);
|
||||
|
||||
/* Real-time generic instrument controllers */
|
||||
FLUIDSYNTH_API
|
||||
void fluid_event_control_change(fluid_event_t *evt, int channel, short control, short val);
|
||||
|
||||
/* Real-time instrument controllers shortcuts */
|
||||
FLUIDSYNTH_API void fluid_event_pitch_bend(fluid_event_t *evt, int channel, int val);
|
||||
FLUIDSYNTH_API void fluid_event_pitch_wheelsens(fluid_event_t *evt, int channel, short val);
|
||||
FLUIDSYNTH_API void fluid_event_modulation(fluid_event_t *evt, int channel, short val);
|
||||
FLUIDSYNTH_API void fluid_event_sustain(fluid_event_t *evt, int channel, short val);
|
||||
FLUIDSYNTH_API void fluid_event_pan(fluid_event_t *evt, int channel, short val);
|
||||
FLUIDSYNTH_API void fluid_event_volume(fluid_event_t *evt, int channel, short val);
|
||||
FLUIDSYNTH_API void fluid_event_reverb_send(fluid_event_t *evt, int channel, short val);
|
||||
FLUIDSYNTH_API void fluid_event_chorus_send(fluid_event_t *evt, int channel, short val);
|
||||
|
||||
FLUIDSYNTH_API void fluid_event_key_pressure(fluid_event_t *evt, int channel, short key, short val);
|
||||
FLUIDSYNTH_API void fluid_event_channel_pressure(fluid_event_t *evt, int channel, short val);
|
||||
FLUIDSYNTH_API void fluid_event_system_reset(fluid_event_t *evt);
|
||||
|
||||
|
||||
/* Only for removing events */
|
||||
FLUIDSYNTH_API void fluid_event_any_control_change(fluid_event_t *evt, int channel);
|
||||
|
||||
/* Only when unregistering clients */
|
||||
FLUIDSYNTH_API void fluid_event_unregistering(fluid_event_t *evt);
|
||||
|
||||
/* Accessing event data */
|
||||
FLUIDSYNTH_API int fluid_event_get_type(fluid_event_t *evt);
|
||||
FLUIDSYNTH_API fluid_seq_id_t fluid_event_get_source(fluid_event_t *evt);
|
||||
FLUIDSYNTH_API fluid_seq_id_t fluid_event_get_dest(fluid_event_t *evt);
|
||||
FLUIDSYNTH_API int fluid_event_get_channel(fluid_event_t *evt);
|
||||
FLUIDSYNTH_API short fluid_event_get_key(fluid_event_t *evt);
|
||||
FLUIDSYNTH_API short fluid_event_get_velocity(fluid_event_t *evt);
|
||||
FLUIDSYNTH_API short fluid_event_get_control(fluid_event_t *evt);
|
||||
FLUIDSYNTH_API short fluid_event_get_value(fluid_event_t *evt);
|
||||
FLUIDSYNTH_API short fluid_event_get_program(fluid_event_t *evt);
|
||||
FLUIDSYNTH_API void *fluid_event_get_data(fluid_event_t *evt);
|
||||
FLUIDSYNTH_API unsigned int fluid_event_get_duration(fluid_event_t *evt);
|
||||
FLUIDSYNTH_API short fluid_event_get_bank(fluid_event_t *evt);
|
||||
FLUIDSYNTH_API int fluid_event_get_pitch(fluid_event_t *evt);
|
||||
FLUIDSYNTH_API unsigned int fluid_event_get_sfont_id(fluid_event_t *evt);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif /* _FLUIDSYNTH_EVENT_H */
|
130
singe/thirdparty/fluidsynth/include/fluidsynth/gen.h
vendored
130
singe/thirdparty/fluidsynth/include/fluidsynth/gen.h
vendored
|
@ -1,130 +0,0 @@
|
|||
/* FluidSynth - A Software Synthesizer
|
||||
*
|
||||
* Copyright (C) 2003 Peter Hanappe and others.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public License
|
||||
* as published by the Free Software Foundation; either version 2.1 of
|
||||
* the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301, USA
|
||||
*/
|
||||
|
||||
#ifndef _FLUIDSYNTH_GEN_H
|
||||
#define _FLUIDSYNTH_GEN_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @file gen.h
|
||||
* @brief Functions and defines for SoundFont generator effects.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Generator (effect) numbers (Soundfont 2.01 specifications section 8.1.3)
|
||||
*/
|
||||
enum fluid_gen_type
|
||||
{
|
||||
GEN_STARTADDROFS, /**< Sample start address offset (0-32767) */
|
||||
GEN_ENDADDROFS, /**< Sample end address offset (-32767-0) */
|
||||
GEN_STARTLOOPADDROFS, /**< Sample loop start address offset (-32767-32767) */
|
||||
GEN_ENDLOOPADDROFS, /**< Sample loop end address offset (-32767-32767) */
|
||||
GEN_STARTADDRCOARSEOFS, /**< Sample start address coarse offset (X 32768) */
|
||||
GEN_MODLFOTOPITCH, /**< Modulation LFO to pitch */
|
||||
GEN_VIBLFOTOPITCH, /**< Vibrato LFO to pitch */
|
||||
GEN_MODENVTOPITCH, /**< Modulation envelope to pitch */
|
||||
GEN_FILTERFC, /**< Filter cutoff */
|
||||
GEN_FILTERQ, /**< Filter Q */
|
||||
GEN_MODLFOTOFILTERFC, /**< Modulation LFO to filter cutoff */
|
||||
GEN_MODENVTOFILTERFC, /**< Modulation envelope to filter cutoff */
|
||||
GEN_ENDADDRCOARSEOFS, /**< Sample end address coarse offset (X 32768) */
|
||||
GEN_MODLFOTOVOL, /**< Modulation LFO to volume */
|
||||
GEN_UNUSED1, /**< Unused */
|
||||
GEN_CHORUSSEND, /**< Chorus send amount */
|
||||
GEN_REVERBSEND, /**< Reverb send amount */
|
||||
GEN_PAN, /**< Stereo panning */
|
||||
GEN_UNUSED2, /**< Unused */
|
||||
GEN_UNUSED3, /**< Unused */
|
||||
GEN_UNUSED4, /**< Unused */
|
||||
GEN_MODLFODELAY, /**< Modulation LFO delay */
|
||||
GEN_MODLFOFREQ, /**< Modulation LFO frequency */
|
||||
GEN_VIBLFODELAY, /**< Vibrato LFO delay */
|
||||
GEN_VIBLFOFREQ, /**< Vibrato LFO frequency */
|
||||
GEN_MODENVDELAY, /**< Modulation envelope delay */
|
||||
GEN_MODENVATTACK, /**< Modulation envelope attack */
|
||||
GEN_MODENVHOLD, /**< Modulation envelope hold */
|
||||
GEN_MODENVDECAY, /**< Modulation envelope decay */
|
||||
GEN_MODENVSUSTAIN, /**< Modulation envelope sustain */
|
||||
GEN_MODENVRELEASE, /**< Modulation envelope release */
|
||||
GEN_KEYTOMODENVHOLD, /**< Key to modulation envelope hold */
|
||||
GEN_KEYTOMODENVDECAY, /**< Key to modulation envelope decay */
|
||||
GEN_VOLENVDELAY, /**< Volume envelope delay */
|
||||
GEN_VOLENVATTACK, /**< Volume envelope attack */
|
||||
GEN_VOLENVHOLD, /**< Volume envelope hold */
|
||||
GEN_VOLENVDECAY, /**< Volume envelope decay */
|
||||
GEN_VOLENVSUSTAIN, /**< Volume envelope sustain */
|
||||
GEN_VOLENVRELEASE, /**< Volume envelope release */
|
||||
GEN_KEYTOVOLENVHOLD, /**< Key to volume envelope hold */
|
||||
GEN_KEYTOVOLENVDECAY, /**< Key to volume envelope decay */
|
||||
GEN_INSTRUMENT, /**< Instrument ID (shouldn't be set by user) */
|
||||
GEN_RESERVED1, /**< Reserved */
|
||||
GEN_KEYRANGE, /**< MIDI note range */
|
||||
GEN_VELRANGE, /**< MIDI velocity range */
|
||||
GEN_STARTLOOPADDRCOARSEOFS, /**< Sample start loop address coarse offset (X 32768) */
|
||||
GEN_KEYNUM, /**< Fixed MIDI note number */
|
||||
GEN_VELOCITY, /**< Fixed MIDI velocity value */
|
||||
GEN_ATTENUATION, /**< Initial volume attenuation */
|
||||
GEN_RESERVED2, /**< Reserved */
|
||||
GEN_ENDLOOPADDRCOARSEOFS, /**< Sample end loop address coarse offset (X 32768) */
|
||||
GEN_COARSETUNE, /**< Coarse tuning */
|
||||
GEN_FINETUNE, /**< Fine tuning */
|
||||
GEN_SAMPLEID, /**< Sample ID (shouldn't be set by user) */
|
||||
GEN_SAMPLEMODE, /**< Sample mode flags */
|
||||
GEN_RESERVED3, /**< Reserved */
|
||||
GEN_SCALETUNE, /**< Scale tuning */
|
||||
GEN_EXCLUSIVECLASS, /**< Exclusive class number */
|
||||
GEN_OVERRIDEROOTKEY, /**< Sample root note override */
|
||||
|
||||
/**
|
||||
* @brief Initial Pitch
|
||||
*
|
||||
* @note This is not "standard" SoundFont generator, because it is not
|
||||
* mentioned in the list of generators in the SF2 specifications.
|
||||
* It is used by FluidSynth internally to compute the nominal pitch of
|
||||
* a note on note-on event. By nature it shouldn't be allowed to be modulated,
|
||||
* however the specification defines a default modulator having "Initial Pitch"
|
||||
* as destination (cf. SF2.01 page 57 section 8.4.10 MIDI Pitch Wheel to Initial Pitch).
|
||||
* Thus it is impossible to cancel this default modulator, which would be required
|
||||
* to let the MIDI Pitch Wheel controller modulate a different generator.
|
||||
* In order to provide this flexibility, FluidSynth >= 2.1.0 uses a default modulator
|
||||
* "Pitch Wheel to Fine Tune", rather than Initial Pitch. The same "compromise" can
|
||||
* be found on the Audigy 2 ZS for instance.
|
||||
*/
|
||||
GEN_PITCH,
|
||||
|
||||
GEN_CUSTOM_BALANCE, /**< Balance @note Not a real SoundFont generator */
|
||||
/* non-standard generator for an additional custom high- or low-pass filter */
|
||||
GEN_CUSTOM_FILTERFC, /**< Custom filter cutoff frequency */
|
||||
GEN_CUSTOM_FILTERQ, /**< Custom filter Q */
|
||||
|
||||
#ifndef __DOXYGEN__
|
||||
GEN_LAST /**< @internal Value defines the count of generators (#fluid_gen_type) @warning This symbol is not part of the public API and ABI stability guarantee and may change at any time! */
|
||||
#endif
|
||||
};
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif /* _FLUIDSYNTH_GEN_H */
|
||||
|
|
@ -1,65 +0,0 @@
|
|||
/* FluidSynth - A Software Synthesizer
|
||||
*
|
||||
* Copyright (C) 2003 Peter Hanappe and others.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public License
|
||||
* as published by the Free Software Foundation; either version 2.1 of
|
||||
* the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301, USA
|
||||
*/
|
||||
|
||||
#ifndef _FLUIDSYNTH_LADSPA_H
|
||||
#define _FLUIDSYNTH_LADSPA_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @file ladspa.h
|
||||
* @brief Functions for manipulating the ladspa effects unit
|
||||
*
|
||||
* This header defines useful functions for programatically manipulating the ladspa
|
||||
* effects unit of the synth that can be retrieved via fluid_synth_get_ladspa_fx().
|
||||
*
|
||||
* Using any of those functions requires fluidsynth to be compiled with ladspa support.
|
||||
* Else all of those functions are useless dummies.
|
||||
*/
|
||||
|
||||
FLUIDSYNTH_API int fluid_ladspa_is_active(fluid_ladspa_fx_t *fx);
|
||||
FLUIDSYNTH_API int fluid_ladspa_activate(fluid_ladspa_fx_t *fx);
|
||||
FLUIDSYNTH_API int fluid_ladspa_deactivate(fluid_ladspa_fx_t *fx);
|
||||
FLUIDSYNTH_API int fluid_ladspa_reset(fluid_ladspa_fx_t *fx);
|
||||
FLUIDSYNTH_API int fluid_ladspa_check(fluid_ladspa_fx_t *fx, char *err, int err_size);
|
||||
|
||||
FLUIDSYNTH_API int fluid_ladspa_host_port_exists(fluid_ladspa_fx_t *fx, const char *name);
|
||||
|
||||
FLUIDSYNTH_API int fluid_ladspa_add_buffer(fluid_ladspa_fx_t *fx, const char *name);
|
||||
FLUIDSYNTH_API int fluid_ladspa_buffer_exists(fluid_ladspa_fx_t *fx, const char *name);
|
||||
|
||||
FLUIDSYNTH_API int fluid_ladspa_add_effect(fluid_ladspa_fx_t *fx, const char *effect_name,
|
||||
const char *lib_name, const char *plugin_name);
|
||||
FLUIDSYNTH_API int fluid_ladspa_effect_can_mix(fluid_ladspa_fx_t *fx, const char *name);
|
||||
FLUIDSYNTH_API int fluid_ladspa_effect_set_mix(fluid_ladspa_fx_t *fx, const char *name, int mix, float gain);
|
||||
FLUIDSYNTH_API int fluid_ladspa_effect_port_exists(fluid_ladspa_fx_t *fx, const char *effect_name, const char *port_name);
|
||||
FLUIDSYNTH_API int fluid_ladspa_effect_set_control(fluid_ladspa_fx_t *fx, const char *effect_name,
|
||||
const char *port_name, float val);
|
||||
FLUIDSYNTH_API int fluid_ladspa_effect_link(fluid_ladspa_fx_t *fx, const char *effect_name,
|
||||
const char *port_name, const char *name);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _FLUIDSYNTH_LADSPA_H */
|
||||
|
|
@ -1,91 +0,0 @@
|
|||
/* FluidSynth - A Software Synthesizer
|
||||
*
|
||||
* Copyright (C) 2003 Peter Hanappe and others.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public License
|
||||
* as published by the Free Software Foundation; either version 2.1 of
|
||||
* the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301, USA
|
||||
*/
|
||||
|
||||
#ifndef _FLUIDSYNTH_LOG_H
|
||||
#define _FLUIDSYNTH_LOG_H
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
/**
|
||||
* @file log.h
|
||||
* @brief Logging interface
|
||||
*
|
||||
* The default logging function of the fluidsynth prints its messages
|
||||
* to the stderr. The synthesizer uses five level of messages: #FLUID_PANIC,
|
||||
* #FLUID_ERR, #FLUID_WARN, #FLUID_INFO, and #FLUID_DBG.
|
||||
*
|
||||
* A client application can install a new log function to handle the
|
||||
* messages differently. In the following example, the application
|
||||
* sets a callback function to display #FLUID_PANIC messages in a dialog,
|
||||
* and ignores all other messages by setting the log function to
|
||||
* NULL:
|
||||
*
|
||||
* @code
|
||||
* fluid_set_log_function(FLUID_PANIC, show_dialog, (void*) root_window);
|
||||
* fluid_set_log_function(FLUID_ERR, NULL, NULL);
|
||||
* fluid_set_log_function(FLUID_WARN, NULL, NULL);
|
||||
* fluid_set_log_function(FLUID_DBG, NULL, NULL);
|
||||
* @endcode
|
||||
*/
|
||||
|
||||
/**
|
||||
* FluidSynth log levels.
|
||||
*/
|
||||
enum fluid_log_level
|
||||
{
|
||||
FLUID_PANIC, /**< The synth can't function correctly any more */
|
||||
FLUID_ERR, /**< Serious error occurred */
|
||||
FLUID_WARN, /**< Warning */
|
||||
FLUID_INFO, /**< Verbose informational messages */
|
||||
FLUID_DBG, /**< Debugging messages */
|
||||
#ifndef __DOXYGEN__
|
||||
LAST_LOG_LEVEL /**< @warning This symbol is not part of the public API and ABI stability guarantee and may change at any time! */
|
||||
#endif
|
||||
};
|
||||
|
||||
/**
|
||||
* Log function handler callback type used by fluid_set_log_function().
|
||||
* @param level Log level (#fluid_log_level)
|
||||
* @param message Log message text
|
||||
* @param data User data pointer supplied to fluid_set_log_function().
|
||||
*/
|
||||
typedef void (*fluid_log_function_t)(int level, const char *message, void *data);
|
||||
|
||||
FLUIDSYNTH_API
|
||||
fluid_log_function_t fluid_set_log_function(int level, fluid_log_function_t fun, void *data);
|
||||
|
||||
FLUIDSYNTH_API void fluid_default_log_function(int level, const char *message, void *data);
|
||||
|
||||
FLUIDSYNTH_API int fluid_log(int level, const char *fmt, ...)
|
||||
#if defined(__clang__) || defined(__GNUC__) || defined(__GNUG__)
|
||||
__attribute__ ((format (printf, 2, 3)))
|
||||
#endif
|
||||
;
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _FLUIDSYNTH_LOG_H */
|
|
@ -1,159 +0,0 @@
|
|||
/* FluidSynth - A Software Synthesizer
|
||||
*
|
||||
* Copyright (C) 2003 Peter Hanappe and others.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public License
|
||||
* as published by the Free Software Foundation; either version 2.1 of
|
||||
* the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301, USA
|
||||
*/
|
||||
|
||||
#ifndef _FLUIDSYNTH_MIDI_H
|
||||
#define _FLUIDSYNTH_MIDI_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @file midi.h
|
||||
* @brief Functions for MIDI events, drivers and MIDI file playback.
|
||||
*/
|
||||
|
||||
FLUIDSYNTH_API fluid_midi_event_t *new_fluid_midi_event(void);
|
||||
FLUIDSYNTH_API void delete_fluid_midi_event(fluid_midi_event_t *event);
|
||||
|
||||
FLUIDSYNTH_API int fluid_midi_event_set_type(fluid_midi_event_t *evt, int type);
|
||||
FLUIDSYNTH_API int fluid_midi_event_get_type(fluid_midi_event_t *evt);
|
||||
FLUIDSYNTH_API int fluid_midi_event_set_channel(fluid_midi_event_t *evt, int chan);
|
||||
FLUIDSYNTH_API int fluid_midi_event_get_channel(fluid_midi_event_t *evt);
|
||||
FLUIDSYNTH_API int fluid_midi_event_get_key(fluid_midi_event_t *evt);
|
||||
FLUIDSYNTH_API int fluid_midi_event_set_key(fluid_midi_event_t *evt, int key);
|
||||
FLUIDSYNTH_API int fluid_midi_event_get_velocity(fluid_midi_event_t *evt);
|
||||
FLUIDSYNTH_API int fluid_midi_event_set_velocity(fluid_midi_event_t *evt, int vel);
|
||||
FLUIDSYNTH_API int fluid_midi_event_get_control(fluid_midi_event_t *evt);
|
||||
FLUIDSYNTH_API int fluid_midi_event_set_control(fluid_midi_event_t *evt, int ctrl);
|
||||
FLUIDSYNTH_API int fluid_midi_event_get_value(fluid_midi_event_t *evt);
|
||||
FLUIDSYNTH_API int fluid_midi_event_set_value(fluid_midi_event_t *evt, int val);
|
||||
FLUIDSYNTH_API int fluid_midi_event_get_program(fluid_midi_event_t *evt);
|
||||
FLUIDSYNTH_API int fluid_midi_event_set_program(fluid_midi_event_t *evt, int val);
|
||||
FLUIDSYNTH_API int fluid_midi_event_get_pitch(fluid_midi_event_t *evt);
|
||||
FLUIDSYNTH_API int fluid_midi_event_set_pitch(fluid_midi_event_t *evt, int val);
|
||||
FLUIDSYNTH_API int fluid_midi_event_set_sysex(fluid_midi_event_t *evt, void *data,
|
||||
int size, int dynamic);
|
||||
FLUIDSYNTH_API int fluid_midi_event_set_text(fluid_midi_event_t *evt,
|
||||
void *data, int size, int dynamic);
|
||||
FLUIDSYNTH_API int fluid_midi_event_get_text(fluid_midi_event_t *evt,
|
||||
void **data, int *size);
|
||||
FLUIDSYNTH_API int fluid_midi_event_set_lyrics(fluid_midi_event_t *evt,
|
||||
void *data, int size, int dynamic);
|
||||
FLUIDSYNTH_API int fluid_midi_event_get_lyrics(fluid_midi_event_t *evt,
|
||||
void **data, int *size);
|
||||
|
||||
/**
|
||||
* MIDI router rule type.
|
||||
* @since 1.1.0
|
||||
*/
|
||||
typedef enum
|
||||
{
|
||||
FLUID_MIDI_ROUTER_RULE_NOTE, /**< MIDI note rule */
|
||||
FLUID_MIDI_ROUTER_RULE_CC, /**< MIDI controller rule */
|
||||
FLUID_MIDI_ROUTER_RULE_PROG_CHANGE, /**< MIDI program change rule */
|
||||
FLUID_MIDI_ROUTER_RULE_PITCH_BEND, /**< MIDI pitch bend rule */
|
||||
FLUID_MIDI_ROUTER_RULE_CHANNEL_PRESSURE, /**< MIDI channel pressure rule */
|
||||
FLUID_MIDI_ROUTER_RULE_KEY_PRESSURE, /**< MIDI key pressure rule */
|
||||
#ifndef __DOXYGEN__
|
||||
FLUID_MIDI_ROUTER_RULE_COUNT /**< @internal Total count of rule types @warning This symbol is not part of the public API and ABI stability guarantee and may change at any time!*/
|
||||
#endif
|
||||
} fluid_midi_router_rule_type;
|
||||
|
||||
/**
|
||||
* Generic callback function for MIDI events.
|
||||
* @param data User defined data pointer
|
||||
* @param event The MIDI event
|
||||
* @return Should return #FLUID_OK on success, #FLUID_FAILED otherwise
|
||||
*
|
||||
* Will be used between
|
||||
* - MIDI driver and MIDI router
|
||||
* - MIDI router and synth
|
||||
* to communicate events.
|
||||
* In the not-so-far future...
|
||||
*/
|
||||
typedef int (*handle_midi_event_func_t)(void *data, fluid_midi_event_t *event);
|
||||
|
||||
FLUIDSYNTH_API fluid_midi_router_t *new_fluid_midi_router(fluid_settings_t *settings,
|
||||
handle_midi_event_func_t handler,
|
||||
void *event_handler_data);
|
||||
FLUIDSYNTH_API void delete_fluid_midi_router(fluid_midi_router_t *handler);
|
||||
FLUIDSYNTH_API int fluid_midi_router_set_default_rules(fluid_midi_router_t *router);
|
||||
FLUIDSYNTH_API int fluid_midi_router_clear_rules(fluid_midi_router_t *router);
|
||||
FLUIDSYNTH_API int fluid_midi_router_add_rule(fluid_midi_router_t *router,
|
||||
fluid_midi_router_rule_t *rule, int type);
|
||||
FLUIDSYNTH_API fluid_midi_router_rule_t *new_fluid_midi_router_rule(void);
|
||||
FLUIDSYNTH_API void delete_fluid_midi_router_rule(fluid_midi_router_rule_t *rule);
|
||||
FLUIDSYNTH_API void fluid_midi_router_rule_set_chan(fluid_midi_router_rule_t *rule,
|
||||
int min, int max, float mul, int add);
|
||||
FLUIDSYNTH_API void fluid_midi_router_rule_set_param1(fluid_midi_router_rule_t *rule,
|
||||
int min, int max, float mul, int add);
|
||||
FLUIDSYNTH_API void fluid_midi_router_rule_set_param2(fluid_midi_router_rule_t *rule,
|
||||
int min, int max, float mul, int add);
|
||||
FLUIDSYNTH_API int fluid_midi_router_handle_midi_event(void *data, fluid_midi_event_t *event);
|
||||
FLUIDSYNTH_API int fluid_midi_dump_prerouter(void *data, fluid_midi_event_t *event);
|
||||
FLUIDSYNTH_API int fluid_midi_dump_postrouter(void *data, fluid_midi_event_t *event);
|
||||
|
||||
|
||||
FLUIDSYNTH_API
|
||||
fluid_midi_driver_t *new_fluid_midi_driver(fluid_settings_t *settings,
|
||||
handle_midi_event_func_t handler,
|
||||
void *event_handler_data);
|
||||
|
||||
FLUIDSYNTH_API void delete_fluid_midi_driver(fluid_midi_driver_t *driver);
|
||||
|
||||
|
||||
/**
|
||||
* MIDI player status enum.
|
||||
* @since 1.1.0
|
||||
*/
|
||||
enum fluid_player_status
|
||||
{
|
||||
FLUID_PLAYER_READY, /**< Player is ready */
|
||||
FLUID_PLAYER_PLAYING, /**< Player is currently playing */
|
||||
FLUID_PLAYER_DONE /**< Player is finished playing */
|
||||
};
|
||||
|
||||
FLUIDSYNTH_API fluid_player_t *new_fluid_player(fluid_synth_t *synth);
|
||||
FLUIDSYNTH_API void delete_fluid_player(fluid_player_t *player);
|
||||
FLUIDSYNTH_API int fluid_player_add(fluid_player_t *player, const char *midifile);
|
||||
FLUIDSYNTH_API int fluid_player_add_mem(fluid_player_t *player, const void *buffer, size_t len);
|
||||
FLUIDSYNTH_API int fluid_player_play(fluid_player_t *player);
|
||||
FLUIDSYNTH_API int fluid_player_stop(fluid_player_t *player);
|
||||
FLUIDSYNTH_API int fluid_player_join(fluid_player_t *player);
|
||||
FLUIDSYNTH_API int fluid_player_set_loop(fluid_player_t *player, int loop);
|
||||
FLUIDSYNTH_API int fluid_player_set_midi_tempo(fluid_player_t *player, int tempo);
|
||||
FLUIDSYNTH_API int fluid_player_set_bpm(fluid_player_t *player, int bpm);
|
||||
FLUIDSYNTH_API int fluid_player_set_playback_callback(fluid_player_t *player, handle_midi_event_func_t handler, void *handler_data);
|
||||
|
||||
FLUIDSYNTH_API int fluid_player_get_status(fluid_player_t *player);
|
||||
FLUIDSYNTH_API int fluid_player_get_current_tick(fluid_player_t *player);
|
||||
FLUIDSYNTH_API int fluid_player_get_total_ticks(fluid_player_t *player);
|
||||
FLUIDSYNTH_API int fluid_player_get_bpm(fluid_player_t *player);
|
||||
FLUIDSYNTH_API int fluid_player_get_midi_tempo(fluid_player_t *player);
|
||||
FLUIDSYNTH_API int fluid_player_seek(fluid_player_t *player, int ticks);
|
||||
|
||||
///
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _FLUIDSYNTH_MIDI_H */
|
|
@ -1,72 +0,0 @@
|
|||
/* FluidSynth - A Software Synthesizer
|
||||
*
|
||||
* Copyright (C) 2003 Peter Hanappe and others.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public License
|
||||
* as published by the Free Software Foundation; either version 2.1 of
|
||||
* the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301, USA
|
||||
*/
|
||||
|
||||
#ifndef _FLUIDSYNTH_MISC_H
|
||||
#define _FLUIDSYNTH_MISC_H
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
/**
|
||||
* @file misc.h
|
||||
* @brief Miscellaneous utility functions and defines
|
||||
*/
|
||||
|
||||
/**
|
||||
* Value that indicates success, used by most libfluidsynth functions.
|
||||
* @since 1.1.0
|
||||
*
|
||||
* @note This was not publicly defined prior to libfluidsynth 1.1.0. When
|
||||
* writing code which should also be compatible with older versions, something
|
||||
* like the following can be used:
|
||||
*
|
||||
* @code
|
||||
* #include <fluidsynth.h>
|
||||
*
|
||||
* #ifndef FLUID_OK
|
||||
* #define FLUID_OK (0)
|
||||
* #define FLUID_FAILED (-1)
|
||||
* #endif
|
||||
* @endcode
|
||||
*/
|
||||
#define FLUID_OK (0)
|
||||
|
||||
/**
|
||||
* Value that indicates failure, used by most libfluidsynth functions.
|
||||
* @since 1.1.0
|
||||
*
|
||||
* @note See #FLUID_OK for more details.
|
||||
*/
|
||||
#define FLUID_FAILED (-1)
|
||||
|
||||
|
||||
FLUIDSYNTH_API int fluid_is_soundfont(const char *filename);
|
||||
FLUIDSYNTH_API int fluid_is_midifile(const char *filename);
|
||||
FLUIDSYNTH_API void fluid_free(void* ptr);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _FLUIDSYNTH_MISC_H */
|
|
@ -1,98 +0,0 @@
|
|||
/* FluidSynth - A Software Synthesizer
|
||||
*
|
||||
* Copyright (C) 2003 Peter Hanappe and others.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public License
|
||||
* as published by the Free Software Foundation; either version 2.1 of
|
||||
* the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301, USA
|
||||
*/
|
||||
|
||||
#ifndef _FLUIDSYNTH_MOD_H
|
||||
#define _FLUIDSYNTH_MOD_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @file mod.h
|
||||
* @brief SoundFont modulator functions and constants.
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* Flags defining the polarity, mapping function and type of a modulator source.
|
||||
* Compare with SoundFont 2.04 PDF section 8.2.
|
||||
*
|
||||
* Note: Bit values do not correspond to the SoundFont spec! Also note that
|
||||
* #FLUID_MOD_GC and #FLUID_MOD_CC are in the flags field instead of the source field.
|
||||
*/
|
||||
enum fluid_mod_flags
|
||||
{
|
||||
FLUID_MOD_POSITIVE = 0, /**< Mapping function is positive */
|
||||
FLUID_MOD_NEGATIVE = 1, /**< Mapping function is negative */
|
||||
FLUID_MOD_UNIPOLAR = 0, /**< Mapping function is unipolar */
|
||||
FLUID_MOD_BIPOLAR = 2, /**< Mapping function is bipolar */
|
||||
FLUID_MOD_LINEAR = 0, /**< Linear mapping function */
|
||||
FLUID_MOD_CONCAVE = 4, /**< Concave mapping function */
|
||||
FLUID_MOD_CONVEX = 8, /**< Convex mapping function */
|
||||
FLUID_MOD_SWITCH = 12, /**< Switch (on/off) mapping function */
|
||||
FLUID_MOD_GC = 0, /**< General controller source type (#fluid_mod_src) */
|
||||
FLUID_MOD_CC = 16, /**< MIDI CC controller (source will be a MIDI CC number) */
|
||||
|
||||
FLUID_MOD_SIN = 0x80, /**< Custom non-standard sinus mapping function */
|
||||
};
|
||||
|
||||
/**
|
||||
* General controller (if #FLUID_MOD_GC in flags). This
|
||||
* corresponds to SoundFont 2.04 PDF section 8.2.1
|
||||
*/
|
||||
enum fluid_mod_src
|
||||
{
|
||||
FLUID_MOD_NONE = 0, /**< No source controller */
|
||||
FLUID_MOD_VELOCITY = 2, /**< MIDI note-on velocity */
|
||||
FLUID_MOD_KEY = 3, /**< MIDI note-on note number */
|
||||
FLUID_MOD_KEYPRESSURE = 10, /**< MIDI key pressure */
|
||||
FLUID_MOD_CHANNELPRESSURE = 13, /**< MIDI channel pressure */
|
||||
FLUID_MOD_PITCHWHEEL = 14, /**< Pitch wheel */
|
||||
FLUID_MOD_PITCHWHEELSENS = 16 /**< Pitch wheel sensitivity */
|
||||
};
|
||||
|
||||
FLUIDSYNTH_API fluid_mod_t *new_fluid_mod(void);
|
||||
FLUIDSYNTH_API void delete_fluid_mod(fluid_mod_t *mod);
|
||||
FLUIDSYNTH_API size_t fluid_mod_sizeof(void);
|
||||
|
||||
FLUIDSYNTH_API void fluid_mod_set_source1(fluid_mod_t *mod, int src, int flags);
|
||||
FLUIDSYNTH_API void fluid_mod_set_source2(fluid_mod_t *mod, int src, int flags);
|
||||
FLUIDSYNTH_API void fluid_mod_set_dest(fluid_mod_t *mod, int dst);
|
||||
FLUIDSYNTH_API void fluid_mod_set_amount(fluid_mod_t *mod, double amount);
|
||||
|
||||
FLUIDSYNTH_API int fluid_mod_get_source1(const fluid_mod_t *mod);
|
||||
FLUIDSYNTH_API int fluid_mod_get_flags1(const fluid_mod_t *mod);
|
||||
FLUIDSYNTH_API int fluid_mod_get_source2(const fluid_mod_t *mod);
|
||||
FLUIDSYNTH_API int fluid_mod_get_flags2(const fluid_mod_t *mod);
|
||||
FLUIDSYNTH_API int fluid_mod_get_dest(const fluid_mod_t *mod);
|
||||
FLUIDSYNTH_API double fluid_mod_get_amount(const fluid_mod_t *mod);
|
||||
|
||||
FLUIDSYNTH_API int fluid_mod_test_identity(const fluid_mod_t *mod1, const fluid_mod_t *mod2);
|
||||
FLUIDSYNTH_API int fluid_mod_has_source(const fluid_mod_t *mod, int cc, int ctrl);
|
||||
FLUIDSYNTH_API int fluid_mod_has_dest(const fluid_mod_t *mod, int gen);
|
||||
|
||||
FLUIDSYNTH_API void fluid_mod_clone(fluid_mod_t *mod, const fluid_mod_t *src);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif /* _FLUIDSYNTH_MOD_H */
|
||||
|
|
@ -1,79 +0,0 @@
|
|||
/* FluidSynth - A Software Synthesizer
|
||||
*
|
||||
* Copyright (C) 2003 Peter Hanappe and others.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public License
|
||||
* as published by the Free Software Foundation; either version 2.1 of
|
||||
* the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301, USA
|
||||
*/
|
||||
|
||||
#ifndef _FLUIDSYNTH_SEQ_H
|
||||
#define _FLUIDSYNTH_SEQ_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @file seq.h
|
||||
* @brief MIDI event sequencer.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Event callback prototype for destination clients.
|
||||
* @param time Current sequencer tick value (see fluid_sequencer_get_tick()).
|
||||
* @param event The event being received
|
||||
* @param seq The sequencer instance
|
||||
* @param data User defined data registered with the client
|
||||
*/
|
||||
typedef void (*fluid_event_callback_t)(unsigned int time, fluid_event_t *event,
|
||||
fluid_sequencer_t *seq, void *data);
|
||||
|
||||
|
||||
FLUIDSYNTH_API fluid_sequencer_t *new_fluid_sequencer(void);
|
||||
FLUIDSYNTH_API fluid_sequencer_t *new_fluid_sequencer2(int use_system_timer);
|
||||
FLUIDSYNTH_API void delete_fluid_sequencer(fluid_sequencer_t *seq);
|
||||
FLUIDSYNTH_API int fluid_sequencer_get_use_system_timer(fluid_sequencer_t *seq);
|
||||
FLUIDSYNTH_API
|
||||
fluid_seq_id_t fluid_sequencer_register_client(fluid_sequencer_t *seq, const char *name,
|
||||
fluid_event_callback_t callback, void *data);
|
||||
FLUIDSYNTH_API void fluid_sequencer_unregister_client(fluid_sequencer_t *seq, fluid_seq_id_t id);
|
||||
FLUIDSYNTH_API int fluid_sequencer_count_clients(fluid_sequencer_t *seq);
|
||||
FLUIDSYNTH_API fluid_seq_id_t fluid_sequencer_get_client_id(fluid_sequencer_t *seq, int index);
|
||||
FLUIDSYNTH_API char *fluid_sequencer_get_client_name(fluid_sequencer_t *seq, fluid_seq_id_t id);
|
||||
FLUIDSYNTH_API int fluid_sequencer_client_is_dest(fluid_sequencer_t *seq, fluid_seq_id_t id);
|
||||
FLUIDSYNTH_API void fluid_sequencer_process(fluid_sequencer_t *seq, unsigned int msec);
|
||||
FLUIDSYNTH_API void fluid_sequencer_send_now(fluid_sequencer_t *seq, fluid_event_t *evt);
|
||||
FLUIDSYNTH_API
|
||||
int fluid_sequencer_send_at(fluid_sequencer_t *seq, fluid_event_t *evt,
|
||||
unsigned int time, int absolute);
|
||||
FLUIDSYNTH_API
|
||||
void fluid_sequencer_remove_events(fluid_sequencer_t *seq, fluid_seq_id_t source, fluid_seq_id_t dest, int type);
|
||||
FLUIDSYNTH_API unsigned int fluid_sequencer_get_tick(fluid_sequencer_t *seq);
|
||||
FLUIDSYNTH_API void fluid_sequencer_set_time_scale(fluid_sequencer_t *seq, double scale);
|
||||
FLUIDSYNTH_API double fluid_sequencer_get_time_scale(fluid_sequencer_t *seq);
|
||||
|
||||
// Compile in internal traceing functions
|
||||
#define FLUID_SEQ_WITH_TRACE 0
|
||||
|
||||
#if FLUID_SEQ_WITH_TRACE
|
||||
FLUIDSYNTH_API char *fluid_seq_gettrace(fluid_sequencer_t *seq);
|
||||
FLUIDSYNTH_API void fluid_seq_cleartrace(fluid_sequencer_t *seq);
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _FLUIDSYNTH_SEQ_H */
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue