String, Array, & Minim Help

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') {;

I get an error message of mixing active and static modes when I try to assign the note(0)... portion of code. Any suggestions?


  • "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.

Sign In or Register to comment.