Work in progress
This is an VST3/AU3 wrapper around the Game Boy sound unit. This exposes the Game Boy APU as a MIDI-controllable sythesizer instrument, usable as a standalone app or as a plugin for a DAW. It is powered by Gb_Snd_Emu, the audio implementation used by many emulators including Visual Boy Advance - M.
As an instrument, the Game Boy APU is a pretty constrained synthesizer. It contains 2 square wave oscillators, a 32-sample 4-bit arbitary wavetable oscillator, and a noise oscillator with a variable frequency. All oscillators except the wave have a linear volume envelope. One of the square waves has a linear frequency envelope. The resolution in both time and amplitude is relatively low, so the pitches are slightly out of tune. There's no controllable filter, only a static passive high-pass filter. The limited CPU of the platform limits the resolution at which these parameters are controllable. All of this adds up to a limited but iconic sound.
- integrate sound core
- handle midi events
- Build basic UI
- Use finer time resolution than 1/60s
- Custom BlipBuffer to avoid extra buffer copy for int16->float conversion
- wave osc
- noise osc
- vol envelopes (native at low periods, then manual)
- LFOs - vol and freq (quantize option? native for osc 1 at low periods?)
- Arbitrary wavetable drawing
- Multiple MIDI channels
- UI for stereo control and tone
- Better AU compatibility
- Pretty UI
- package for multiple platforms
- throw on app store
- Download JUCE from https://juce.com/download/.
- In Projucer, go to
File > Open...
, and select this folder'sGameBoySynth.jucer
. - Set
Selected exporter
to the right build system:- On Mac, choose
Xcode (macOS)
. - On Windows, choose
Visual Studio 2022
. - On Linux, choose
Linux Makefile
. You'll need to have build tools, ALSA, Curl, FreeType, Webkit2GTK, and a few X Window System packages' development headers installed: runsudo apt-get install build-essential libx11-dev libxrandr-dev libxinerama-dev libxcursor-dev libasound2-dev libcurl4-openssl-dev libfreetype-dev libfreetype6-dev libwebkit2gtk-4.0-dev libgtk-3-dev
to install these.
- On Mac, choose
- Click the icon next to
Selected exporter
to create the project files and open it in your IDE or terminal. Then building it from there should work!- On Linux, you'll need to go to
File > Save Project
instead to create the project files. Then navigate in a terminal to<this folder>/Builds/LinuxMakefile
and runCONFIG=Debug make -j
orCONFIG=Release make -j
.
- On Linux, you'll need to go to
- https://gbdev.io/pandocs/#sound-controller
- https://gbdev.gg8.se/wiki/articles/Gameboy_sound_hardware
- https://developer.apple.com/documentation/audiotoolbox/audio_unit_v3_plug-ins/creating_custom_audio_effects
- http://web.archive.org/web/20210301011110/http://blargg.8bitalley.com/libs/audio.html#Gb_Snd_Emu
- https://www.rockhoppertech.com/blog/writing-an-audio-unit-v3-instrument/
- http://www.rossbencina.com/code/real-time-audio-programming-101-time-waits-for-nothing
- http://devnotes.kymatica.com/auv3_parameters.html
- https://juce.com/
This project contains code from Gb_Snd_Emu which is copyright Shay Green. This code is licenced under LGPL. It also contains code from my separate polyphonic MIDI state machine which is MIT licensed. The project is created using the JUCE framework under their GPLv3 license. Thus the remaining code of this project is GPLv3.