One of my first excercises in Pure Data, to create a sort of theremin that can be controlled as a real one with a few add-ons.
Exercise Premises
- Provide 2 alternative pitch controls, one continuous, the other discrete/tempered (but both based on notes, no need to do it directly with frequency). There are many ways to do this, some more advanced than others. The simplest and, for the moment, good enough for you, would be to provide 2 separate sliders (one quantized while the other not). In both cases, set the sliders to a pitch range that seems reasonable for a Theremin, and make also the sliders’ length long enough for providing access to every single note in the scale.
- Provide a distortion slider control (that will allow you to go from a perfect sine wave to a more “squared” one)
- Provide an amplitude control slider based on decibels, and independent from the distortion (this means that you should be able to play, for example, loud sinusoidal sounds as well as soft square sounds)
- Provide a vibrato control. It should have 2 separate parameters/sliders: one for controlling the frequency of the vibrato (how fast a note changes, which you should control in Hertz), the other for controlling the vibrato amplitude (how much it changes, for example +-2 semitones).