Syntax help with 2D array

This is the exact code I am using can you spot where this is wrong please:-

byte[][] chord_Bank2;
static final byte[][] CHORD_BANK2 = {
  { 40, 45, 50, 55, 59, 64 }, // open strings 0
  { 40, 47, 52, 56, 59, 64 }, // E major      1
  { 41, 48, 53, 57, 60, 65 }, // F major      2                   
  { 43, 47, 50, 55, 59, 67 }, // G major      3
  { 33, 45, 52, 57, 61, 64 }, // A major      4
  { 35, 47, 54, 59, 63, 66 }, // B major      5
  { 36, 48, 52, 55, 60, 64 }, // C major      6
  { 38, 38, 50, 57, 62, 66 }  // D major      7
};

void setup(){
  size(100, 100);
  chord_Bank2 = new byte[5][7]; 
  noLoop();  // Run once and stop
}

void draw(){
  background(125);
  printoutChord(2);
}

void printoutChord(int chord){ // print a chord    
for(int i=0; i<6; i++){    
print(" ",chord_Bank2[chord][i]); 
}
 println();

}
1 Like