We are about to switch to a new forum software. Until then we have removed the registration on this forum.
I'm trying to have minim play specific audio dependent on triggers from the string. EX:
String[] lines = {a, b, c, a, b, c,};
Array[] notes = {0,1,2};
notes(0) = minim.loadFile("play0");
Then I'm using if statements:
if (lines = 'a') {
player.play(notes(0));
I get an error message of mixing active and static modes when I try to assign the note(0)... portion of code. Any suggestions?
Answers
"mixing active and static modes"
See What are setup() and draw()?. Basically, at the level of function declarations, you can have only variable initializations, no other statements.
Also note that "if (lines = 'a')" is also prone to fail, because here you don't compare the value, you assign the value to the variable... Use == instead.