XY Theremin
About
This is the first of what I intend to be a series of musical programs, starting with the most basic and progressing to an unknown end. So, being the most basic, this is a bare-bones musical instrument that plays a single note, continuously, which is adjusted by your mouse position/where you touch on a touchscreen. The result is similar to the first electronic instrument ever invented, called a "theremin".
It is surprisingly fun to "play" which is what inspired me to make it available to you in the first place. Update: added a circle representing where the cursor is (with a trail of fun behind it)! It generates what's called a square wave, which is what the original NES generated (along with triangle and noise, but that's beside the point), and this differs from the theremin in that it produced what's called a sine wave (which is smoother and thus sounds smoother)..
The "controls" are as follows: the X axis of the screen (from left to right) defines the pitch (the speed of the vibration, low to high, think James Earl Jones on the left, Peewee Herman on the right). The Y axis (bottom to top) defines the volume (quiet on the bottom, loud on the top). You can move anywhere at any speed and hear what it sounds like. Experiment with different shapes of movement of the mouse (like circles and straight lines). Also, if you have a touchscreen, you can use multiple fingers to tap one area then the other (only one at a time of course). There's lots to explore.
UPDATE: added waveforms that can be chosen! 1 (or s) is square (default), 2 (or t) is triangle, 3 (or n) is sine. Each has it's own shape for the cursor. Try switching between them quickly, or while moving the cursor. It's lots of fun! :)
UPDATE 2: You can now edit waveforms in the "waveform editor"! Press W to enter the waveform editor, then point and click in the bars to edit their position. Press enter when finished to use your newly-made waveform!
UPDATE 3: the notes are now "quantized" (meaning they are moved until they line up with "semitones", like the notes on a piano), and by default are in A minor (all the white keys on a piano). Press C to switch to "chromatic" mode (all the keys on a piano, white and black).
I'd love to hear from you about this. Anything from feedback, to ideas on things to add are all welcome. I'm opening a discussion board here for you to say whatever you'd like. Look forward to seeing what you think!