IF / ELSE Interpretation
Taking the idea of “headbanging” or “moshing” to symbolise a loop, I tried to see how Processing would interpret the conditions. It was clear that If and Else would work a lot better than While.
In pseudo code, I came up with the following:
If (musicIsPlaying and musicIsMetal) {
Then play video of moshing;
}
Else if (musicIsPlaying and musicIsNotMetal) {
Then play video of booing;
}
Else {
Then show photos, in a stop-motion like manner, of waiting;
}
Basically I wanted to show that when the code was run, Processing would check if there was music playing and if there was, then it would check to see if it was good music (anything heavy/metal). If it met both of those conditions, then it would play a video of a MetalHead moshing or headbanging. Keeping with my original idea of a loop, I went with the less traditional “windmilling”, or “circle” headbanging. However, if the music playing was crap, (pop music or anything similar,) then it would show a video of the same Metaller booing (or showing general displeasure). By default, or when no music was playing, it would show a series of photos with the same Bogan waiting (arms crossed, tapping his foot).
I added 2 buttons, giving the user a little control. The first is a Play button which, once clicked, would become the stop button. Once playing, the second button (Skip), would randomly select a new track and play it, causing the program to check again if the music is metal or not and play the appropriate clip.
Once play was clicked, the code would keep running until the user clicked Stop or exit the program. The program would select a new sample when the previous one ends or when the user clicks Skip.