Homework 5 (new this year) should be a quick study to work with some possibilities which may be of interest for your final project. Familiarize youself with the technique and make a short recording of a clip played by you that doesn't sound like the example code.
Gametraks are 3D input devices designed for golf game simulators. They consist of two strings attached to rectractable spools in devices usually sitting on the floor. Held in the hands or attached to arms, the ends of the strings can be waved around in a large volume or space. The devices are connected via USB and provide continuous readings of hand positions in 3D values relative to their attachment points on the base. Computer musicians have made use of them because of the large workspace, ease of connection, reliability and low cost. They are (sadly) long out of production. We have a set of them for use in the Ballroom during the rest of the class. Please use them there and return them to the shelf when done.
gametrak.ck is an example for one Gametrak string. Its sound patch is a resonated SawOsc with 3 parameters: filter resonance frequency, square wave frequency and amplitude. These are mapped to the first string's X, Y and Z axes, respectively. Plug a Gametrak into your computer and run the script either in miniAudicle or directly from command line.
Gametrak is considered a human interface device (HID) like a keyboard, mouse or joystick. The chuck script first opens the device to enable reading information from it. The above code assumes one Gametrak is connected (which comes up as joystick device number "0"). This works directly on mac and CCRMA linux desktops. On linux laptops, the device is protected by default and requires a command be issued after connecting to make the device readable by the user. So, if it's a linux laptop, you need administrator privileges and should use the command "sudo chmod a+r /dev/input/event*". We have not yet tested the script on windows.
fakeGametrak.ck is identical to the above but is for testing the sound patch without having to have a Gametrak connected. The same 3 parameters (filter resonance frequency, square wave frequency and amplitude) are modulated (as if by the device). Three low-frequency SinOsc's are used to create the "fake" Gametrak data.
shaker.ck is the initial example these are based off of. Kitty Shi made it for her 2017 220a introduction to Gametraks. It illustrates Gametrak control of a Shaker object and is absolutely basic. It was to be extended by students in a study she initiated to compare their choices of mapping possibilities.
Finally, probeHID.ck can be used to list connected devices (for debugging).
Record a demo using a Gametrak and some original. Turn in a recorded (stereo) .wav file and your final chuck code. (Record with audacity or write it real time with WvOut2 -- in which case don't forget to close the output file appropriately.) As before, an explanatory web page (hw5.html) should land in the expected place (Library/Web/220a/) which includes links to the .wav and .ck files (living in a parallel hw5/ subdirectory).