• Stars
    star
    168
  • Rank 225,507 (Top 5 %)
  • Language
    C++
  • License
    GNU General Publi...
  • Created almost 7 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Audio plugin (e.g. VST, AU) to play soundfonts on macOS, Windows, Linux

image

Latest stable release:

Demo track: mp3, FLAC, FLAC +Soundgoodizer

What

juicysfplugin is a cross-platform audio plugin for playing MIDI music through a soundfont synthesizer.

It's well-suited for making videogame music. If you have a soundfont of your favourite game, you can write your own melodies with its instruments.

JUCE is the framework for making audio plugins.
fluidsynth is the soundfont synthesizer.

Supports SF2 and SF3 soundfont formats.

Supports the following MIDI events:

  • noteon, noteoff
  • 192 program change (this changes soundfont preset)
  • pitch wheel
  • aftertouch (key pressure)
  • channel pressure
  • default modulators as described in SoundFont specification 2.4
    • includes (among others): CC 1 modulation wheel is mapped to vibrato LFO pitch depth
  • CC 71 Timbre/Harmonic Intensity (filter resonance)
  • CC 72 Release time
  • CC 73 Attack time
  • CC 74 Brightness (cutoff frequency, FILTERFC)
  • CC 75 Decay Time
  • CC 79 undefined (being used as Sustain time)
  • may support SysEx (untested)

Mode 1: standalone application

juicysfplugin.app (or .exe on Windows) is a standalone application, for playing around.

You can plugin your hardware MIDI keyboard, or play with the software MIDI keyboard. Or route MIDI messages into it from a virtual MIDI controller (e.g. the macOS IAC Bus).

Mode 2: audio plugin

juicysfplugin audio plugins are provided: VST, VST3, AU, AUv3.
This means you can host it inside your DAW (e.g. GarageBand, FL Studio Mac, Sibelius…) to record the sounds you make.

Why

I couldn't find a free, easy-to-use macOS audio plugin for making music with soundfonts.

Install (macOS)

Latest release: https://github.com/Birch-san/juicysfplugin/releases

Download Release.tar.xz, open it to unzip.

Release contains:

juicysfplugin.app  # standalone application, for playing around
juicysfplugin.component  # AU plugin
juicysfplugin.vst  # VST plugin
juicysfplugin.vst3  # VST3 plugin

To install plugins, move them to the following folder:

juicysfplugin.component -> ~/Library/Audio/Plug-Ins/Components/juicysfplugin.component
juicysfplugin.vst -> ~/Library/Audio/Plug-Ins/VST/juicysfplugin.vst
juicysfplugin.vst3 -> ~/Library/Audio/Plug-Ins/VST3/juicysfplugin.vst3

Launch (macOS)

Now, you may do one of the following:

  • Open the standalone juicysfplugin.app
  • Load the AU/VST/VST3 into your favourite DAW (e.g. GarageBand, FL Studio)

Usage

You must drag-and-drop a soundfont into the file picker.

image

Here's some soundfonts to get you started:

I'll refrain from recommending certain General MIDI or videogame soundfonts, since the licensing and provenance are often unclear.

Keybindings

Gain keyboard focus by clicking the plugin's keyboard.

  • Up-down arrow keys to switch preset.
  • Left-right to switch bank.

ASCII -> MIDI keybinding is the same as FL Studio's:

image

Using the standalone .app (macOS) / .exe (Windows)

Generally the .app will Just Work™, but if your audio setup is more bespoke, then you'll need to configure.

Options > Audio/MIDI settings

image

Set Output to Built-In Output

Or any output device that you can hear audio through.

image

Building from source (macOS)

Install XCode and XCode command line tools. Accept terms.

Install JUCE 5.3 in /Applications.
We expect to find JUCE headers in /Applications/JUCE/modules.

(Optional) To target VST3, install Steinberg VST3 Audio Plug-Ins SDK.
We expect to find a folder ~/SDKs/VST_SDK/VST3_SDK.

(Optional) Install IntelliJ AppCode if you prefer it to XCode.

Open juicysfplugin/Builds/MacOSX/juicysfplugin.xcodeproj in XCode (or IntelliJ AppCode).

Build & run the "juicysfplugin - Standalone Plugin" target.

All the libs we link against are project-local (see juicysfplugin/Builds/MacOSX/lib_relinked).
I have used install_name_tool to give these libs relative install names. This ensures that any product you build will be portable.

See my blog post for a deeper explanation as to how juicysfplugin is linked for portable distribution on macOS.

Testing VST/AU plugins inside an audio plugin host

You'll notice that the schemes for [VST, VST3, AU, AUv3] targets are configured such that "Run" launches the executable AudioPluginHost.app. This lets you run the audio plugin as though it were hosted inside a DAW.

I recommend building (e.g. with XCode) the simple Audio Plugin Host that comes with JUCE Framework:

/Applications/JUCE/extras/AudioPluginHost/Builds/MacOSX/AudioPluginHost.xcodeproj

Then symlink /Applications/JUCE/AudioPluginHost.app to the built AudioPluginHost.app (because that's where I told the Run configuration to look for AudioPluginHost.app):

ln -sf /Applications/JUCE/extras/AudioPluginHost/Builds/MacOSX/build/Debug/AudioPluginHost.app /Applications/JUCE/AudioPluginHost.app

Visual Studio Code settings

Concerning the use of Visual Studio Code extension, C/C++ for Visual Studio Code, as an IDE (i.e. instead of XCode)…

Following advice is for macOS, using brew-installed LLVM 8 Clang.

All includePath entries are shallow (no recursive globbing) for now, since I don't have any deeply-nested headers.
We don't need to dip into /usr/local, since all library/framework headers are already in this repository.

Ensure that there exists at the root of the repository, a folder named .vscode.

.vscode/c_cpp_properties.json

{
    "configurations": [
        {
            "name": "Mac",
            "includePath": [
                "${workspaceFolder}/include",
                "${workspaceFolder}/Source",
                "${workspaceFolder}/JuceLibraryCode",
                "${workspaceFolder}/modules"
            ],
            "defines": [],
            "cStandard": "c11",
            "cppStandard": "c++14",
            "intelliSenseMode": "clang-x64",
            "compilerPath": "/usr/local/Cellar/llvm/8.0.0_1/bin/clang++"
        }
    ],
    "version": 4
}

I've kept this minimal, but documented some other include paths worthy of consideration (e.g. if more parts of the toolchain were to be used, brew were to be used, or the standard XCode clang were to be used).

~/Library/Application Support/Code/User/settings.json

{
    "C_Cpp.updateChannel": "Insiders",
    "C_Cpp.default.intelliSenseMode": "clang-x64",
    "C_Cpp.default.macFrameworkPath": [
        // "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreServices.framework/Frameworks",
        "/System/Library/Frameworks",
        // "/Library/Frameworks"
    ],
    "C_Cpp.default.includePath": [
        // "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1",
        // "/usr/local/include",
        // "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/10.0.1/include",
        // "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include",
        // "${workspaceFolder}/include"
        // "/usr/include",
        "/usr/local/Cellar/llvm/8.0.0_1/Toolchains/LLVM8.0.0.xctoolchain/usr/include/c++/v1",
        // "/usr/local/Cellar/llvm/8.0.0_1/Toolchains/LLVM8.0.0.xctoolchain/usr/lib/clang/8.0.0/include",
        // "/usr/local/Cellar/llvm/8.0.0_1/Toolchains/LLVM8.0.0.xctoolchain/usr/include",
    ],
    "C_Cpp.default.cStandard": "c11",
    "C_Cpp.default.cppStandard": "c++14",
    "C_Cpp.default.compilerPath": "/usr/local/Cellar/llvm/8.0.0_1/bin/clang++",
    "C_Cpp.clang_format_fallbackStyle": "LLVM",
    "C_Cpp.clang_format_style": "LLVM",
    "C_Cpp.default.browse.limitSymbolsToIncludedHeaders": true,
    "C_Cpp.default.enableConfigurationSquiggles": true,
    "C_Cpp.errorSquiggles": "Enabled",
    "C_Cpp.enhancedColorization": "Enabled"
}

Test matrix

Known working with:

  • macOS Mojave 10.14.5
  • Windows 10 x64 1903

Making releases

Follow the steps in Building from source to output a product to the build folder.

Builds are automatically portable.

cd juicysfplugin/Builds/MacOSX
# first check that you have a Release or Debug product in the `build` directory

# follows symlinks, archives Release and Debug folders as tar.xz
./archive-for-distribution.sh

Note: Release and Debug flavors both output targets [VST, VST3, AU] to the same location: ~/Library/Audio/Plug-Ins/$TARGET/juicysfplugin.$EXT.
Whichever flavor you built most recently, wins.

Licenses

Overall, juicysfplugin is GPLv3.

See licenses for all libraries and frameworks.

More Repositories

1

box2d-wasm

Box2D physics engine compiled to WebAssembly. Supports TypeScript and ES modules.
TypeScript
218
star
2

mpt-play

Command-line script for inferencing from models such as MPT-7B-Chat
Python
95
star
3

falcon-play

Command-line script for inferencing from models such as falcon-7b-instruct
Python
74
star
4

diffusers-play

Repository with which to explore k-diffusion and diffusers, and within which changes to said packages may be tested.
Python
36
star
5

llama-play

Command-line script for inferencing from models such as LLaMA, in a chat scenario, with LoRA adaptations
Python
32
star
6

liquidfun-play-2

TypeScript
27
star
7

liquidfun-play

TypeScript
21
star
8

imagebind-guided-diffusion

Guide diffusion on ImageBind embedding similarity
Python
21
star
9

touhou-walk

Android overlay to make sprites from 東方Project walk around your screen
Java
14
star
10

embedding-compare

Compare embedding similarity
Python
12
star
11

arm-editor-launcher

M1 macOS Launcher for Live2D Cubism Editor
Java
10
star
12

gmusicapi-node

Node bindings for Simon Weber's `gmusicapi` (Unofficial Google Music API)
JavaScript
5
star
13

t5-booru

Python
5
star
14

clip-embed-sim

Python
3
star
15

deprecated-mecab-wasm

[deprecated; prefer Birch-san/mecab] Run Mecab in WebAssembly
JavaScript
1
star
16

wolf-game

PHP
1
star
17

wolf-game-frontend

wolf-game-frontend
TypeScript
1
star
18

cfg-play

try using classifier-free guidance on LLMs
Python
1
star
19

diss

Alex Birch's dissertation on keyboard pointing in web browsers
TeX
1
star
20

weekend

Distributed relaxation using OpenMPI
C
1
star
21

aspect-ratio-bucketer

Jupyter Notebook
1
star
22

audiosynth2

Streaming wave generator based on https://github.com/keithwhor/audiosynth
TypeScript
1
star