MIDI Synthesizer used as a ringtone engine by Mobileer. Suitable for use on 32-bit embedded systems.
APACHE-2.0 License
General MIDI Synthesizer in portable C by Mobileer.
This synthesizer was licensed for use in the Palm Treo and other mobile devices for playing ringtones.
The library is given MIDI bytes as input and produces 16-bit PCM audio as output. It can be easily connected to any audio system. Optional output modules can be used to play in real-time using PortAudio or to output a WAV file.
The library has 3 levels:
The synthesizer uses 32-bit fixed-point arithmetic for its signal processing. It does not use floating point.
It has minimal software dependencies and can even run without a memory allocator on embedded devices with no operating system.
It does not require any file I/O. The wavetable instruments are loaded at compile time from a header produced by a custom editor.
The ME1000 requires:
The ME2000 adds more ROM for the wavetables, depending on quality. A 1 MB instrument set is included.
The current build system requires CMake and a C compiler.
This will generate a library for the ME2000 and a few example programs.
cd spmidi
mkdir build
cd build
cmake ..
make
The libraries will be in the "spmidi/build/lib" folder and the executables will be in the "spmidi/build/bin" folder.
This will play a diatonic scale and output the results to a WAV file.
bin/play_scale
If you have ALSA installed then you can hear the output:
aplay spmidi_output.wav
You can convert any standard MIDI file to WAV using "play_midifile". We have included some ringtones that you can use for testing.
bin/play_midifile ../../data/ringtones/phil/songs/FurryLisa_rt.mid
aplay spmidi_output.wav
bin/play_midifile ../../data/ringtones/phil/songs/Bach_Sonata3EMajor.mid
aplay spmidi_output.wav