Plays sound with the keys 1-7 and the mouse
Background image from Garageband for iOS
All comments are welcome, especially suggestions on how to make the code look more correct.
the lower 3 are wrong though.. d snare is at at the left but u have its sound on the right, the base is in the middle but u have its sound on the snare, and d sound u have on the bass is from the one on the right.
Can u plz explain this part of your code for me? I understand that it's the delay for the loop but what does >0 then delay -- ???
private void delay()
{
if (delay > 0)
{
delay--;
}
if (delay == 0)
{
play();
delay = 15;
}
}
if delay is bigger than 0 it decreases by one. it keeps on doing it until delay equals 0. then the sound method plays and the value of delay is set to 15 again.
2012/10/31
2012/11/1
2012/11/1
2012/11/1
2012/12/12
2012/12/15