Skip to content

Instantly share code, notes, and snippets.

@adubspea
Created August 19, 2015 17:06
Show Gist options
  • Save adubspea/3c6b95d795be154703bc to your computer and use it in GitHub Desktop.
Save adubspea/3c6b95d795be154703bc to your computer and use it in GitHub Desktop.
Northern Wind Sound 3
import arb.soundcipher.*;
SoundCipher sc = new SoundCipher(this);
for (int n = 7 ; n < 50; n += 7) { // N = average North wind direction
if (n < 5) {
sc.playNote(80, 60, 50);
} else if (n < 2) {
float[] pitches = {100, 64, 67, 71};
sc.playChord(pitches, 80, 4);
} else if (n > 2) {
sc.repeat(3);
sc.playNote (70, 40, 10);
float[] pitches = {50, 50, 50, 50};
sc.playChord(pitches, 80, 4);
}
}
@adubspea
Copy link
Author

for (int n = 7 ; n < 50; n += 7)

} if (s < 20) { //trying to get the program to play multiple notes by using if instead of if & else
float[] pitches = {60, 20, 30, 25};
float [] dynamics = {60, 60, 60, 60};
float[] durations = {5, 5, 5, 5};
sc.playPhrase(pitches, dynamics, durations);

if (n > 2){
float[] pitches = {50, 40, 30, 25};
float [] dynamics = {80, 80, 80, 80};
float[] durations = {5, 5, 5, 5};
sc.playPhrase(pitches, dynamics, durations);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment