Programming a playable virtual Slide Guitar
Actually constructing the playable part of the instrument was the most fun. I looked at my laptop all semester wondering how in the hell I could translate 10-20 strings, maybe 10 pedals, and a slide bar to such a flat box. Turns out, we 'pick' and 'slide' around our computers all day long. The keyboard could work as strings (we only need one for each string, pitch is mainly done with the slide), and the slide itself could probably be translated to the trackpad found on most laptops. Lo and behold, I found my fingers sat very comfortably on 5-6 keys on the right hand side of the space bar (kind of turned at an angle, keys like . ; [ ] \ ) so the string plucking was no problem. My left hand could then slide left to right on the trackpad, just like it does on a real pedal steel.
The language I wrote the control patch in was Chuck, using the Smelt toolkit. This made picking up the human input data trivial, and it was up to me to just apply this raw data and write sound generation around it. It actually worked out much better than I expected, with the trackpad actually being sensitive enough to cover quite a wide range of pitch sliding. Still, I kept it relative so multiple slides could further extend the range of the instrument. The most confusing part was having each string start at a particular pitch (a tuning, if you will), and then scaling them all the same amount as the slide is moved. Thanks to Ethan for helping me figure out the actually very simple math behind that.
Play your own virtual slide guitar!
You can download the Chuck CK files to run your very own, very playable slide guitar right here!
Virtual Lap(Top) Slide Guitar by Jeff Cooper
Right now it's a Lap Steel cause there are only 6 strings (tuned low to high, C# A F# E C# A), and it's actually FM synthesis creating the tone because implementing my filter was not happening just yet in Chuck. Still, it sounds so much better than I ever thought it would, and trust me, running it through an amp sim or hell, even a real guitar amp, this thing comes pretty close to emulating a real slide guitar. Try a little weeeeoooooaaaaaaooww, kind of tremolo Hawaiian gliss and you'll understand. Sound samples coming soon. Not sure how important it is, but I wrote it on a Mac so the key mapping might be messed up on windows, BUG ME to finish it and I will gladly try to get it working for everyone.
Oh and PS, the keys are just to right of the space bar, ENTER . ; [ ] \ (enter being Low C#).