Computer Music Interfaces

Interface

why should we be concerned with interface?

interface is the method by which we interact with a machine and change the state of the machine

lets look at some machines -

ipod there are two layers to this interface the hardware and software layer the hardware layer takes the input from the user the software layer interprets the input by comparing it to the current state of the machine in other words a single button has different functions at different times

Flute the flute is an amazingly simple yet elegant interface the fingers press the buttons and the mouth blows into the blow-hole the fingers control the pitch the mouth can control pitch, volume, and tone color

Processing has a number of commands for creating an interface i believe that these are only interpretted at the end of the draw cycle!!

mouseX and mouseY - tells the program the x,y coordinates of the mouse, which can be interpretted however you like check out hayeon's program mouseMoved - tells us if the mouse has moved mousePressed - triggers when the mouse is pressed this won't happen unless you press the mouse

keyPressed - is triggered when a key is pressed on the keyboard you need to add code to the keypressed function so that the program knows what to do when a key is pressed

programming states keyPressed can be used to change the state of a program

here are some examples of interface:

in this example, we use the keyboard to change the display on the screen:

keyPressChangeStates

in this example, we use the same controls as above to control our stravinsky patch (press 'l' to hear the loud stab, otherwise hear the soft stab) stravinskyInteractive

this last example is a rather elaborate interface with many controls and a complex control scheme (copy and run the code in processing):

randomPartialsInteractive