1 #ifndef EVENT_H 2 #define EVENT_H 3 4 /* 5 Copyright (c) 2009-2010 Tero Lindeman (kometbomb) 6 7 Permission is hereby granted, free of charge, to any person 8 obtaining a copy of this software and associated documentation 9 files (the "Software"), to deal in the Software without 10 restriction, including without limitation the rights to use, 11 copy, modify, merge, publish, distribute, sublicense, and/or sell 12 copies of the Software, and to permit persons to whom the 13 Software is furnished to do so, subject to the following 14 conditions: 15 16 The above copyright notice and this permission notice shall be 17 included in all copies or substantial portions of the Software. 18 19 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 20 EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 21 OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 22 NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 23 HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 24 WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 25 FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 26 OTHER DEALINGS IN THE SOFTWARE. 27 */ 28 29 #include "SDL.h" 30 #include "gui/slider.h" 31 32 void edit_instrument_event(SDL_Event *e); 33 void sequence_event(SDL_Event *e); 34 void pattern_event(SDL_Event *e); 35 void edit_program_event(SDL_Event *e); 36 void edit_text(SDL_Event *e); 37 int generic_edit_text(SDL_Event *e, char *edit_buffer, size_t edit_buffer_size, int *editpos); 38 void fx_event(SDL_Event *e); 39 void fx_add_param(int d); 40 void wave_event(SDL_Event *e); 41 void wave_add_param(int d); 42 void songinfo_event(SDL_Event *e); 43 void songinfo_add_param(int d); 44 void instrument_add_param(int a); 45 void del_sequence(int first,int last,int track); 46 void add_sequence(int channel, int position, int pattern, int offset); 47 void set_room_size(int fx, int size, int vol, int dec); 48 void update_position_sliders(); 49 void update_horiz_sliders(); 50 void note_event(SDL_Event *e); 51 52 enum 53 { 54 PED_NOTE, 55 PED_INSTRUMENT1, 56 PED_INSTRUMENT2, 57 PED_VOLUME1, 58 PED_VOLUME2, 59 PED_LEGATO, 60 PED_SLIDE, 61 PED_VIB, 62 PED_COMMAND1, 63 PED_COMMAND2, 64 PED_COMMAND3, 65 PED_COMMAND4, 66 PED_PARAMS 67 }; 68 69 #define PED_CTRL PED_LEGATO 70 71 enum 72 { 73 P_INSTRUMENT, 74 P_NAME, 75 P_BASENOTE, 76 P_FINETUNE, 77 P_LOCKNOTE, 78 P_DRUM, 79 P_KEYSYNC, 80 P_INVVIB, 81 P_SETPW, 82 P_SETCUTOFF, 83 P_SLIDESPEED, 84 P_PULSE, 85 P_PW, 86 P_SAW, 87 P_TRIANGLE, 88 P_NOISE, 89 P_METAL, 90 P_LFSR, 91 P_LFSRTYPE, 92 P_1_4TH, 93 P_WAVE, 94 P_WAVE_ENTRY, 95 P_WAVE_OVERRIDE_ENV, 96 P_WAVE_LOCK_NOTE, 97 P_VOLUME, 98 P_RELVOL, 99 P_ATTACK, 100 P_DECAY, 101 P_SUSTAIN, 102 P_RELEASE, 103 P_BUZZ, 104 P_BUZZ_SEMI, 105 P_BUZZ_FINE, 106 P_BUZZ_SHAPE, 107 P_SYNC, 108 P_SYNCSRC, 109 P_RINGMOD, 110 P_RINGMODSRC, 111 P_FILTER, 112 P_FLTTYPE, 113 P_CUTOFF, 114 P_RESONANCE, 115 P_FX, 116 P_FXBUS, 117 P_VIBSPEED, 118 P_VIBDEPTH, 119 P_VIBSHAPE, 120 P_VIBDELAY, 121 P_PWMSPEED, 122 P_PWMDEPTH, 123 P_PWMSHAPE, 124 P_PROGPERIOD, 125 P_NORESTART, 126 P_MULTIOSC, 127 P_FM_ENABLE, 128 P_FM_MODULATION, 129 P_FM_FEEDBACK, 130 P_FM_HARMONIC_CARRIER, 131 P_FM_HARMONIC_MODULATOR, 132 P_FM_ATTACK, 133 P_FM_DECAY, 134 P_FM_SUSTAIN, 135 P_FM_RELEASE, 136 P_FM_ENV_START, 137 P_FM_WAVE, 138 P_FM_WAVE_ENTRY, 139 /*----------*/ 140 P_PARAMS 141 }; 142 143 enum 144 { 145 W_WAVE, 146 W_NAME, 147 W_RATE, 148 W_BASE, 149 W_BASEFINE, 150 W_INTERPOLATE, 151 W_LOOP, 152 W_LOOPBEGIN, 153 W_LOOPPINGPONG, 154 W_LOOPEND, 155 W_NUMOSCS, 156 W_OSCTYPE, 157 W_OSCMUL, 158 W_OSCSHIFT, 159 W_OSCEXP, 160 W_OSCABS, 161 W_OSCNEG, 162 W_WAVELENGTH, 163 W_RNDGEN, 164 W_GENERATE, 165 W_RND, 166 W_TOOLBOX, 167 /* ----- */ 168 W_N_PARAMS 169 }; 170 171 enum 172 { 173 R_MULTIPLEX, 174 R_MULTIPLEX_PERIOD, 175 R_PITCH_INACCURACY, 176 R_FX_BUS, 177 R_FX_BUS_NAME, 178 R_CRUSH, 179 R_CRUSHBITS, 180 R_CRUSHDOWNSAMPLE, 181 R_CRUSHDITHER, 182 R_CRUSHGAIN, 183 R_CHORUS, 184 R_MINDELAY, 185 R_MAXDELAY, 186 R_SEPARATION, 187 R_RATE, 188 R_ENABLE, 189 R_ROOMSIZE, 190 R_ROOMVOL, 191 R_ROOMDECAY, 192 R_SNAPTICKS, 193 R_TAPENABLE, 194 R_TAP, 195 R_DELAY, 196 R_GAIN, 197 R_PANNING, 198 /* ---- */ 199 R_N_PARAMS 200 }; 201 202 enum 203 { 204 SI_LENGTH, 205 SI_LOOP, 206 SI_STEP, 207 SI_SPEED1, 208 SI_SPEED2, 209 SI_RATE, 210 SI_TIME, 211 SI_OCTAVE, 212 SI_CHANNELS, 213 SI_MASTERVOL, 214 /*--------*/ 215 SI_N_PARAMS 216 }; 217 218 #endif 219