/******************************************************************
 * menu_items.h | Arduino Duemilanove w/ ATmega328
 ******************************************************************
 * Author: Jonathan A. Feucht
 * Date created: 29 May 2010
 */
 
#ifndef MENU_ITEMS_H
#define MENU_ITEMS_H

// Used for processing user commands
typedef enum {
  MAIN_CMD_IDX,
  SOUND_CMD_IDX
} command_t;

unsigned char* settings[NUM_SETTINGS] = {
  &volume_setting, &reverb_setting, &chorus_setting, &instr1_setting
};

const prog_char boot_screen[] PROGMEM = "Keyboard project\nFeucht, James";
const prog_char success_msg[] PROGMEM = "Success!";
const prog_char saved_msg[] PROGMEM = "Saved";
const prog_char reset_msg[] PROGMEM = "Reset";

// Program memory constants
#define LEVEL_CNT 128
const prog_char num_0[] PROGMEM = "0";
const prog_char num_1[] PROGMEM = "1";
const prog_char num_2[] PROGMEM = "2";
const prog_char num_3[] PROGMEM = "3";
const prog_char num_4[] PROGMEM = "4";
const prog_char num_5[] PROGMEM = "5";
const prog_char num_6[] PROGMEM = "6";
const prog_char num_7[] PROGMEM = "7";
const prog_char num_8[] PROGMEM = "8";
const prog_char num_9[] PROGMEM = "9";
const prog_char num_10[] PROGMEM = "10";
const prog_char num_11[] PROGMEM = "11";
const prog_char num_12[] PROGMEM = "12";
const prog_char num_13[] PROGMEM = "13";
const prog_char num_14[] PROGMEM = "14";
const prog_char num_15[] PROGMEM = "15";
const prog_char num_16[] PROGMEM = "16";
const prog_char num_17[] PROGMEM = "17";
const prog_char num_18[] PROGMEM = "18";
const prog_char num_19[] PROGMEM = "19";
const prog_char num_20[] PROGMEM = "20";
const prog_char num_21[] PROGMEM = "21";
const prog_char num_22[] PROGMEM = "22";
const prog_char num_23[] PROGMEM = "23";
const prog_char num_24[] PROGMEM = "24";
const prog_char num_25[] PROGMEM = "25";
const prog_char num_26[] PROGMEM = "26";
const prog_char num_27[] PROGMEM = "27";
const prog_char num_28[] PROGMEM = "28";
const prog_char num_29[] PROGMEM = "29";
const prog_char num_30[] PROGMEM = "30";
const prog_char num_31[] PROGMEM = "31";
const prog_char num_32[] PROGMEM = "32";
const prog_char num_33[] PROGMEM = "33";
const prog_char num_34[] PROGMEM = "34";
const prog_char num_35[] PROGMEM = "35";
const prog_char num_36[] PROGMEM = "36";
const prog_char num_37[] PROGMEM = "37";
const prog_char num_38[] PROGMEM = "38";
const prog_char num_39[] PROGMEM = "39";
const prog_char num_40[] PROGMEM = "40";
const prog_char num_41[] PROGMEM = "41";
const prog_char num_42[] PROGMEM = "42";
const prog_char num_43[] PROGMEM = "43";
const prog_char num_44[] PROGMEM = "44";
const prog_char num_45[] PROGMEM = "45";
const prog_char num_46[] PROGMEM = "46";
const prog_char num_47[] PROGMEM = "47";
const prog_char num_48[] PROGMEM = "48";
const prog_char num_49[] PROGMEM = "49";
const prog_char num_50[] PROGMEM = "50";
const prog_char num_51[] PROGMEM = "51";
const prog_char num_52[] PROGMEM = "52";
const prog_char num_53[] PROGMEM = "53";
const prog_char num_54[] PROGMEM = "54";
const prog_char num_55[] PROGMEM = "55";
const prog_char num_56[] PROGMEM = "56";
const prog_char num_57[] PROGMEM = "57";
const prog_char num_58[] PROGMEM = "58";
const prog_char num_59[] PROGMEM = "59";
const prog_char num_60[] PROGMEM = "60";
const prog_char num_61[] PROGMEM = "61";
const prog_char num_62[] PROGMEM = "62";
const prog_char num_63[] PROGMEM = "63";
const prog_char num_64[] PROGMEM = "64";
const prog_char num_65[] PROGMEM = "65";
const prog_char num_66[] PROGMEM = "66";
const prog_char num_67[] PROGMEM = "67";
const prog_char num_68[] PROGMEM = "68";
const prog_char num_69[] PROGMEM = "69";
const prog_char num_70[] PROGMEM = "70";
const prog_char num_71[] PROGMEM = "71";
const prog_char num_72[] PROGMEM = "72";
const prog_char num_73[] PROGMEM = "73";
const prog_char num_74[] PROGMEM = "74";
const prog_char num_75[] PROGMEM = "75";
const prog_char num_76[] PROGMEM = "76";
const prog_char num_77[] PROGMEM = "77";
const prog_char num_78[] PROGMEM = "78";
const prog_char num_79[] PROGMEM = "89";
const prog_char num_80[] PROGMEM = "80";
const prog_char num_81[] PROGMEM = "81";
const prog_char num_82[] PROGMEM = "82";
const prog_char num_83[] PROGMEM = "83";
const prog_char num_84[] PROGMEM = "84";
const prog_char num_85[] PROGMEM = "85";
const prog_char num_86[] PROGMEM = "86";
const prog_char num_87[] PROGMEM = "87";
const prog_char num_88[] PROGMEM = "88";
const prog_char num_89[] PROGMEM = "89";
const prog_char num_90[] PROGMEM = "90";
const prog_char num_91[] PROGMEM = "91";
const prog_char num_92[] PROGMEM = "92";
const prog_char num_93[] PROGMEM = "93";
const prog_char num_94[] PROGMEM = "94";
const prog_char num_95[] PROGMEM = "95";
const prog_char num_96[] PROGMEM = "96";
const prog_char num_97[] PROGMEM = "97";
const prog_char num_98[] PROGMEM = "98";
const prog_char num_99[] PROGMEM = "99";
const prog_char num_100[] PROGMEM = "100";
const prog_char num_101[] PROGMEM = "101";
const prog_char num_102[] PROGMEM = "102";
const prog_char num_103[] PROGMEM = "103";
const prog_char num_104[] PROGMEM = "104";
const prog_char num_105[] PROGMEM = "105";
const prog_char num_106[] PROGMEM = "106";
const prog_char num_107[] PROGMEM = "107";
const prog_char num_108[] PROGMEM = "108";
const prog_char num_109[] PROGMEM = "109";
const prog_char num_110[] PROGMEM = "110";
const prog_char num_111[] PROGMEM = "111";
const prog_char num_112[] PROGMEM = "112";
const prog_char num_113[] PROGMEM = "113";
const prog_char num_114[] PROGMEM = "114";
const prog_char num_115[] PROGMEM = "115";
const prog_char num_116[] PROGMEM = "116";
const prog_char num_117[] PROGMEM = "117";
const prog_char num_118[] PROGMEM = "118";
const prog_char num_119[] PROGMEM = "119";
const prog_char num_120[] PROGMEM = "120";
const prog_char num_121[] PROGMEM = "121";
const prog_char num_122[] PROGMEM = "122";
const prog_char num_123[] PROGMEM = "123";
const prog_char num_124[] PROGMEM = "124";
const prog_char num_125[] PROGMEM = "125";
const prog_char num_126[] PROGMEM = "126";
const prog_char num_127[] PROGMEM = "127";
const prog_char* level_menu_items[LEVEL_CNT] PROGMEM = {
  num_0,   num_1,   num_2,   num_3,   num_4,   num_5,   num_6,   num_7,
  num_8,   num_9,   num_10,  num_11,  num_12,  num_13,  num_14,  num_15,
  num_16,  num_17,  num_18,  num_19,  num_20,  num_21,  num_22,  num_23,
  num_24,  num_25,  num_26,  num_27,  num_28,  num_29,  num_30,  num_31,
  num_32,  num_33,  num_34,  num_35,  num_36,  num_37,  num_38,  num_39,
  num_40,  num_41,  num_42,  num_43,  num_44,  num_45,  num_46,  num_47,
  num_48,  num_49,  num_50,  num_51,  num_52,  num_53,  num_54,  num_55,
  num_56,  num_57,  num_58,  num_59,  num_60,  num_61,  num_62,  num_63,
  num_64,  num_65,  num_66,  num_67,  num_68,  num_69,  num_70,  num_71,
  num_72,  num_73,  num_74,  num_75,  num_76,  num_77,  num_78,  num_79,
  num_80,  num_81,  num_82,  num_83,  num_84,  num_85,  num_86,  num_87,
  num_88,  num_89,  num_90,  num_91,  num_92,  num_93,  num_94,  num_95,
  num_96,  num_97,  num_98,  num_99,  num_100, num_101, num_102, num_103,
  num_104, num_105, num_106, num_107, num_108, num_109, num_110, num_111,
  num_112, num_113, num_114, num_115, num_116, num_117, num_118, num_119,
  num_120, num_121, num_122, num_123, num_124, num_125, num_126, num_127
};

// Volume menu //////////////////////////////////////////////////////////////////
menu                volume_menu;
menu**              volume_menu_children = null;
const prog_char     volume_menu_label[] PROGMEM = "Volume: ";
unsigned char       volume_setting = 127;
// Reverb menu //////////////////////////////////////////////////////////////////
menu                reverb_menu;
menu**              reverb_menu_children = null;
const prog_char     reverb_menu_label[] PROGMEM = "Reverb: ";
unsigned char       reverb_setting = 0;
// Chorus menu //////////////////////////////////////////////////////////////////
menu                chorus_menu;
menu**              chorus_menu_children = null;
const prog_char     chorus_menu_label[] PROGMEM = "Chorus: ";
unsigned char       chorus_setting = 0;
// Sound menu ///////////////////////////////////////////////////////////////////
#define             SOUND_CNT 3
menu                sound_menu;
menu*               sound_menu_children[SOUND_CNT] = {
  &volume_menu,
  &reverb_menu,
  &chorus_menu
};
const prog_char     sound_menu_label[] PROGMEM = "Sound options:\n";
const prog_char     sound_0[] PROGMEM = "1 Volume";
const prog_char     sound_1[] PROGMEM = "2 Reverb";
const prog_char     sound_2[] PROGMEM = "3 Chorus";
const prog_char*    sound_menu_items[SOUND_CNT] PROGMEM = {
  sound_0,
  sound_1,
  sound_2
};

// Instr1 menu //////////////////////////////////////////////////////////////////
#define             INSTR1_CNT 128
menu                instr1_menu;
menu**              instr1_menu_children = null;
unsigned char       instr1_setting = 0;
const prog_char*    instr1_menu_label PROGMEM = null;
const prog_char instr1_0[] PROGMEM = "1 Grand Piano 1"; 
const prog_char instr1_1[] PROGMEM = "2 Bright Piano 2";
const prog_char instr1_2[] PROGMEM = "3 Electric Grand\nPiano 3";
const prog_char instr1_3[] PROGMEM = "4 Honky-tonk\nPiano";
const prog_char instr1_4[] PROGMEM = "5 Electric\nPiano 1";
const prog_char instr1_5[] PROGMEM = "6 Electric\nPiano 2";
const prog_char instr1_6[] PROGMEM = "7 Harpsichord";
const prog_char instr1_7[] PROGMEM = "8 Clavichord";
const prog_char instr1_8[] PROGMEM = "9 Celesta";
const prog_char instr1_9[] PROGMEM = "10 Glockenspiel";
const prog_char instr1_10[] PROGMEM = "11 Music Box";
const prog_char instr1_11[] PROGMEM = "12 Vibraphone";
const prog_char instr1_12[] PROGMEM = "13 Marimba";
const prog_char instr1_13[] PROGMEM = "14 Xylophone"; 
const prog_char instr1_14[] PROGMEM = "15 Tubular Bells";
const prog_char instr1_15[] PROGMEM = "16 Santur"; 
const prog_char instr1_16[] PROGMEM = "17 Drawbar Organ"; 
const prog_char instr1_17[] PROGMEM = "18 Percussive\nOrgan"; 
const prog_char instr1_18[] PROGMEM = "19 Rock Organ"; 
const prog_char instr1_19[] PROGMEM = "20 Church Organ"; 
const prog_char instr1_20[] PROGMEM = "21 Reed Organ"; 
const prog_char instr1_21[] PROGMEM = "22 French\nAccordion";
const prog_char instr1_22[] PROGMEM = "23 Harmonica"; 
const prog_char instr1_23[] PROGMEM = "24 Tango\nAccordion"; 
const prog_char instr1_24[] PROGMEM = "25 Acoustic\nGuitar (nylon)";
const prog_char instr1_25[] PROGMEM = "26 Acoustic\nGuitar (steel)";
const prog_char instr1_26[] PROGMEM = "27 Electric\nGuitar (jazz)"; 
const prog_char instr1_27[] PROGMEM = "28 Electric\nGuitar (clean)"; 
const prog_char instr1_28[] PROGMEM = "29 Electric\nGuitar (muted)"; 
const prog_char instr1_29[] PROGMEM = "30 Overdriven\nGuitar"; 
const prog_char instr1_30[] PROGMEM = "31 Distortion\nGuitar"; 
const prog_char instr1_31[] PROGMEM = "32 Guitar\nHarmonics";
const prog_char instr1_32[] PROGMEM = "33 Acoustic Bass";
const prog_char instr1_33[] PROGMEM = "34 Finger Bass"; 
const prog_char instr1_34[] PROGMEM = "35 Picked Bass"; 
const prog_char instr1_35[] PROGMEM = "36 Fretless Bass";
const prog_char instr1_36[] PROGMEM = "37 Slap Bass 1"; 
const prog_char instr1_37[] PROGMEM = "38 Slap Bass 2"; 
const prog_char instr1_38[] PROGMEM = "39 Synth Bass 1"; 
const prog_char instr1_39[] PROGMEM = "40 Synth Bass 2";
const prog_char instr1_40[] PROGMEM = "41 Violin"; 
const prog_char instr1_41[] PROGMEM = "42 Viola"; 
const prog_char instr1_42[] PROGMEM = "43 Cello"; 
const prog_char instr1_43[] PROGMEM = "44 Contrabass"; 
const prog_char instr1_44[] PROGMEM = "45 Tremolo\nStrings"; 
const prog_char instr1_45[] PROGMEM = "46 Pizzicato\nStrings"; 
const prog_char instr1_46[] PROGMEM = "47 Orchestral\nHarp"; 
const prog_char instr1_47[] PROGMEM = "48 Timpani"; 
const prog_char instr1_48[] PROGMEM = "49 String\nEnsemble 1"; 
const prog_char instr1_49[] PROGMEM = "50 String\nEnsemble 2"; 
const prog_char instr1_50[] PROGMEM = "51 Synth\nStrings 1"; 
const prog_char instr1_51[] PROGMEM = "52 Synth\nStrings 2"; 
const prog_char instr1_52[] PROGMEM = "53 Choir Aahs"; 
const prog_char instr1_53[] PROGMEM = "54 Voice Oohs"; 
const prog_char instr1_54[] PROGMEM = "55 Synth Voice"; 
const prog_char instr1_55[] PROGMEM = "56 Orchestra Hit";
const prog_char instr1_56[] PROGMEM = "57 Trumpet"; 
const prog_char instr1_57[] PROGMEM = "58 Trombone";
const prog_char instr1_58[] PROGMEM = "59 Tuba"; 
const prog_char instr1_59[] PROGMEM = "60 Muted Trumpet"; 
const prog_char instr1_60[] PROGMEM = "61 French Horn"; 
const prog_char instr1_61[] PROGMEM = "62 Brass Section"; 
const prog_char instr1_62[] PROGMEM = "63 Synth Brass 1"; 
const prog_char instr1_63[] PROGMEM = "64 Synth Brass 2";
const prog_char instr1_64[] PROGMEM = "65 Soprano Sax"; 
const prog_char instr1_65[] PROGMEM = "66 Alto Sax"; 
const prog_char instr1_66[] PROGMEM = "67 Tenor Sax"; 
const prog_char instr1_67[] PROGMEM = "68 Baritone Sax"; 
const prog_char instr1_68[] PROGMEM = "69 Oboe"; 
const prog_char instr1_69[] PROGMEM = "70 English Horn"; 
const prog_char instr1_70[] PROGMEM = "71 Bassoon"; 
const prog_char instr1_71[] PROGMEM = "72 Clarinet"; 
const prog_char instr1_72[] PROGMEM = "73 Piccolo"; 
const prog_char instr1_73[] PROGMEM = "74 Flute"; 
const prog_char instr1_74[] PROGMEM = "75 Recorder"; 
const prog_char instr1_75[] PROGMEM = "76 Pan Flute"; 
const prog_char instr1_76[] PROGMEM = "77 Blown Bottle"; 
const prog_char instr1_77[] PROGMEM = "78 Shakuhachi"; 
const prog_char instr1_78[] PROGMEM = "79 Whistle"; 
const prog_char instr1_79[] PROGMEM = "80 Ocarina"; 
const prog_char instr1_80[] PROGMEM = "81 Lead 1\n(square)"; 
const prog_char instr1_81[] PROGMEM = "82 Lead 2\n(sawtooth)";
const prog_char instr1_82[] PROGMEM = "83 Lead 3\n(calliope)";
const prog_char instr1_83[] PROGMEM = "84 Lead 4\n(chiff)";
const prog_char instr1_84[] PROGMEM = "85 Lead 5\n( const prog_charang)";
const prog_char instr1_85[] PROGMEM = "86 Lead 6\n(voice)";
const prog_char instr1_86[] PROGMEM = "87 Lead 7\n(fifths)";
const prog_char instr1_87[] PROGMEM = "88 Lead 8\n(bass+lead)";
const prog_char instr1_88[] PROGMEM = "89 Pad 1\n(fantasia)";
const prog_char instr1_89[] PROGMEM = "90 Pad 2\n(warm)";
const prog_char instr1_90[] PROGMEM = "91 Pad 3\n(polysynth)";
const prog_char instr1_91[] PROGMEM = "92 Pad 4\n(choir)";
const prog_char instr1_92[] PROGMEM = "93 Pad 5\n(bowed)";
const prog_char instr1_93[] PROGMEM = "94 Pad 6\n(metallic)";
const prog_char instr1_94[] PROGMEM = "95 Pad 7\n(halo)";
const prog_char instr1_95[] PROGMEM = "96 Pad 8\n(sweep)";
const prog_char instr1_96[] PROGMEM = "97 FX 1\n(rain)";
const prog_char instr1_97[] PROGMEM = "98 FX 2\n(soundtrack)";
const prog_char instr1_98[] PROGMEM = "99 FX 3\n(crystal)";
const prog_char instr1_99[] PROGMEM = "100 FX 4\n(atmosphere)";
const prog_char instr1_100[] PROGMEM = "101 FX 5\n(brightness)";
const prog_char instr1_101[] PROGMEM = "102 FX 6\n(goblins)";
const prog_char instr1_102[] PROGMEM = "103 FX 7\n(echoes)";
const prog_char instr1_103[] PROGMEM = "104 FX 8\n(sci-fi)";
const prog_char instr1_104[] PROGMEM = "105 Sitar";
const prog_char instr1_105[] PROGMEM = "106 Banjo";
const prog_char instr1_106[] PROGMEM = "107 Shamisen";
const prog_char instr1_107[] PROGMEM = "108 Koto";
const prog_char instr1_108[] PROGMEM = "109 Kalimba";
const prog_char instr1_109[] PROGMEM = "110 Bagpipe";
const prog_char instr1_110[] PROGMEM = "111 Fiddle";
const prog_char instr1_111[] PROGMEM = "112 Shanai";
const prog_char instr1_112[] PROGMEM = "113 Tinkle Bell";
const prog_char instr1_113[] PROGMEM = "114 Agogo";
const prog_char instr1_114[] PROGMEM = "115 Steel Drums";
const prog_char instr1_115[] PROGMEM = "116 Woodblock";
const prog_char instr1_116[] PROGMEM = "117 Taiko Drum";
const prog_char instr1_117[] PROGMEM = "118 Melodic Tom";
const prog_char instr1_118[] PROGMEM = "119 Synth Drum";
const prog_char instr1_119[] PROGMEM = "120 Reverse\nCymbal";
const prog_char instr1_120[] PROGMEM = "121 Guitar Fret\nNoise";
const prog_char instr1_121[] PROGMEM = "122 Breath Noise";
const prog_char instr1_122[] PROGMEM = "123 Seashore";
const prog_char instr1_123[] PROGMEM = "124 Bird Tweet";
const prog_char instr1_124[] PROGMEM = "125 Teleph. Ring";
const prog_char instr1_125[] PROGMEM = "126 Helicopter";
const prog_char instr1_126[] PROGMEM = "127 Applause";
const prog_char instr1_127[] PROGMEM = "128 Gunshot";
const prog_char* instr1_menu_items[INSTR1_CNT] PROGMEM = {
  instr1_0,   instr1_1,   instr1_2,   instr1_3,   instr1_4,   instr1_5,   instr1_6,   instr1_7,
  instr1_8,   instr1_9,   instr1_10,  instr1_11,  instr1_12,  instr1_13,  instr1_14,  instr1_15,
  instr1_16,  instr1_17,  instr1_18,  instr1_19,  instr1_20,  instr1_21,  instr1_22,  instr1_23,
  instr1_24,  instr1_25,  instr1_26,  instr1_27,  instr1_28,  instr1_29,  instr1_30,  instr1_31,
  instr1_32,  instr1_33,  instr1_34,  instr1_35,  instr1_36,  instr1_37,  instr1_38,  instr1_39,
  instr1_40,  instr1_41,  instr1_42,  instr1_43,  instr1_44,  instr1_45,  instr1_46,  instr1_47,
  instr1_48,  instr1_49,  instr1_50,  instr1_51,  instr1_52,  instr1_53,  instr1_54,  instr1_55,
  instr1_56,  instr1_57,  instr1_58,  instr1_59,  instr1_60,  instr1_61,  instr1_62,  instr1_63,
  instr1_64,  instr1_65,  instr1_66,  instr1_67,  instr1_68,  instr1_69,  instr1_70,  instr1_71,
  instr1_72,  instr1_73,  instr1_74,  instr1_75,  instr1_76,  instr1_77,  instr1_78,  instr1_79,
  instr1_80,  instr1_81,  instr1_82,  instr1_83,  instr1_84,  instr1_85,  instr1_86,  instr1_87,
  instr1_88,  instr1_89,  instr1_90,  instr1_91,  instr1_92,  instr1_93,  instr1_94,  instr1_95,
  instr1_96,  instr1_97,  instr1_98,  instr1_99,  instr1_100, instr1_101, instr1_102, instr1_103,
  instr1_104, instr1_105, instr1_106, instr1_107, instr1_108, instr1_109, instr1_110, instr1_111,
  instr1_112, instr1_113, instr1_114, instr1_115, instr1_116, instr1_117, instr1_118, instr1_119,
  instr1_120, instr1_121, instr1_122, instr1_123, instr1_124, instr1_125, instr1_126, instr1_127
};

// Main menu ////////////////////////////////////////////////////////////////////
#define             MAIN_CNT 4
menu                main_menu;
menu*               main_menu_children [MAIN_CNT] = {
  &sound_menu,
  &instr1_menu,
  null,
  null
};
const prog_char     main_menu_label[] PROGMEM = "Main menu\n";
const prog_char     main_0[] PROGMEM = "1 Sound settings";
const prog_char     main_1[] PROGMEM = "2 Instrument";
const prog_char     main_2[] PROGMEM = "3 Set as default";
const prog_char     main_3[] PROGMEM = "4 Reset defults";
const prog_char*    main_menu_items[MAIN_CNT] PROGMEM = {
  main_0,  main_1, main_2, main_3
};
#define MAIN_CMD_SAVE     2
#define MAIN_CMD_RESET    3
  
#endif /* MENU_ITEMS_H */

