WavePainter consists of two subsystems: the Graphical User Interface and the synthesizer.
The user interface will be written in Java. It will accept input from the touchscreen and pass the new wavetable data to the synthesizer.
The synthesizer will accept input from the GUI application and the MIDI interpreter and produce the corresponding sound. Sound is produced using wavetable synthesis.
Using Jack Audio
The Jack Audio Connection Kit is a C/C++ library for writing and connecting audio applications on Linux or Windows. It is designed to be low-latency, and as such is used by some electronic musicians in their live setups. Although the Raspberry Pi does not have very fast hardware, it should be possible for a Jack application to perform well enough to produce a decent sound. Jack also provides an API for interacting with MIDI.
The synthesizer application will be written in C or C++ using Jack, and will communicate with the GUI application using a Linux pipe.
Using an Arduino/Teensy
If the Raspberry Pi did not perform well enough to run the synth application, then the synth would have been implemented on an Arduino or Teensy. Wavetable data would delivered over the USB serial connection between the RPi and the microcontroller. MIDI would either be delivered through a MIDI in port hardwired to the microcontroller, or would be handled by the RPi and passed over USB serial as well. Both devices have advantages and disadvantages: the Arduino is easier to program and is a more stable platform but does not have a real analog out (requiring the use of filtered PWM), while the Teensy has an analog out for audio but is more difficult to use. Programming a performance-focused application for either of these platforms will require bypassing the Arduino libraries and using the AVR builtin methods for interrupts and setting values of GPIO pins.
This project will be implemented on a Raspberry Pi, using the Adafruit PiTFT 2.8″ TFT Capacitive Touchscreen.
This work is licensed under a Creative Commons Attribution 4.0 International License.