├── README ├── bassdll ├── debug.h ├── debug.cpp ├── bassdll.h └── bassdll.cpp └── demos └── core2 └── core2.pde /README: -------------------------------------------------------------------------------- 1 | COMPONENTS 2 | bassdll - the sound engine 3 | demos/core2 - A three-channel sample song using the engine. You can hear the demo at http://www.youtube.com/watch?v=liRF4alsvaI 4 | 5 | INSTALLING/COMPILE 6 | 7 | The "bassdll" folder needs to be moved into the "libraries" folder for your Arduino install. On my Mac this is inside the Arduino.app package in /Applications. Your mileage may vary. 8 | 9 | LICENSE 10 | 11 | All code released under the MIT license. The song produced by the core2 program is licensed under CC-BY-SA-NC. 12 | -------------------------------------------------------------------------------- /bassdll/debug.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2010 Drew Crawford 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a 5 | * copy of this software and associated documentation files (the "Software"), 6 | * to deal in the Software without restriction, including without limitation 7 | * the rights to use, copy, modify, merge, publish, distribute, sublicense, 8 | * and/or sell copies of the Software, and to permit persons to whom the 9 | * Software is furnished to do so, subject to the following conditions: 10 | * The above copyright notice and this permission notice shall be included in 11 | * all copies or substantial portions of the Software. 12 | * 13 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 18 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 19 | * IN THE SOFTWARE. 20 | */ 21 | 22 | #ifndef DEBUG_LIB 23 | #define DEBUG_LIB 24 | #if defined(ARDUINO) && ARDUINO >= 100 25 | #include "Arduino.h" 26 | #else 27 | #include "WProgram.h" 28 | #endif 29 | extern void debug(uint64_t); 30 | 31 | #endif 32 | -------------------------------------------------------------------------------- /bassdll/debug.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2010 Drew Crawford 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a 5 | * copy of this software and associated documentation files (the "Software"), 6 | * to deal in the Software without restriction, including without limitation 7 | * the rights to use, copy, modify, merge, publish, distribute, sublicense, 8 | * and/or sell copies of the Software, and to permit persons to whom the 9 | * Software is furnished to do so, subject to the following conditions: 10 | * The above copyright notice and this permission notice shall be included in 11 | * all copies or substantial portions of the Software. 12 | * 13 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 18 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 19 | * IN THE SOFTWARE. 20 | */ 21 | 22 | #include "debug.h" 23 | 24 | void debug(uint64_t d) 25 | { 26 | pinMode(13,OUTPUT); 27 | uint64_t old = d; 28 | 29 | 30 | while(true) 31 | { 32 | d = old; 33 | for(int i = 0; i < 10; i++) 34 | { 35 | digitalWrite(13,HIGH); 36 | delay(100); 37 | digitalWrite(13,LOW); 38 | delay(100); 39 | int a = 0; 40 | } 41 | const uint64_t LSB_Mask(1); 42 | for ( uint64_t v(d); v != 0; v >>= 1 ) 43 | { 44 | boolean display = !(v & LSB_Mask); 45 | 46 | digitalWrite(13,display); 47 | delay(2000); 48 | if (display==HIGH) 49 | digitalWrite(13,LOW); 50 | else 51 | digitalWrite(13,HIGH); 52 | delay(50); 53 | if (d==0) 54 | break; 55 | } 56 | } 57 | 58 | } 59 | -------------------------------------------------------------------------------- /bassdll/bassdll.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2009 Drew Crawford 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a 5 | * copy of this software and associated documentation files (the "Software"), 6 | * to deal in the Software without restriction, including without limitation 7 | * the rights to use, copy, modify, merge, publish, distribute, sublicense, 8 | * and/or sell copies of the Software, and to permit persons to whom the 9 | * Software is furnished to do so, subject to the following conditions: 10 | * The above copyright notice and this permission notice shall be included in 11 | * all copies or substantial portions of the Software. 12 | * 13 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 18 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 19 | * IN THE SOFTWARE. 20 | */ 21 | 22 | #ifndef BASSDILL_LIB 23 | #define BASSDILL_LIB 24 | //BASS.DLL 25 | #if defined(ARDUINO) && ARDUINO >= 100 26 | #include "Arduino.h" 27 | #else 28 | #include "WProgram.h" 29 | #endif 30 | #include 31 | #include 32 | #include 33 | 34 | 35 | 36 | 37 | #define MAGIC 1.0594631 38 | inline int fixTone(signed char tone) 39 | { 40 | return 440*pow(MAGIC,tone); 41 | } 42 | ///NOTE 43 | #define TRANSPOSEUP -124 44 | #define TRANSPOSEDOWN -123 45 | 46 | #define REST -127 47 | 48 | #define KICK -126 49 | #define SNARE -125 50 | 51 | #define STOP -122 52 | 53 | #define SUPERSOLO -121 54 | struct note { 55 | signed char tone; 56 | unsigned char duration; 57 | }; 58 | ///CHANNEL 59 | class channel 60 | { 61 | 62 | //note array 63 | 64 | unsigned long duration_sum; 65 | signed char transpose; //channel-wide transpose (implemented in setupNote) 66 | 67 | public: 68 | int insert_at; 69 | void init(); 70 | void setupNote(unsigned long started_playing_time); 71 | void next(); 72 | void queue(note* n); 73 | void fixHigh(); 74 | void fixLow(); 75 | inline void notehacks(); 76 | void realloc_notes(); 77 | channel(int pin, int how_many_notes); 78 | ~channel(); 79 | int halflife; //time from rising edge at which we invert the pin 80 | unsigned long next_invert_time; 81 | unsigned long nextTime; //wall-clock-time at which we go to the next note 82 | int pin; //pin the channel writes on 83 | char position; //is the pin up or down? 84 | union q //used for various purposes by the notehack 85 | { 86 | int i; 87 | } notehack; 88 | unsigned char supersolo; //supersolo value 89 | unsigned char ssinterval; //supersolo interval 90 | 91 | note **notes; 92 | int current; 93 | 94 | 95 | }; 96 | //////MIXER 97 | #define MIXER_CHANNELS 4 //if you need more than that 98 | class mixer 99 | { 100 | 101 | int max_channel; 102 | public: 103 | channel *channels[MIXER_CHANNELS]; 104 | mixer(); 105 | void add_channel(channel*x); 106 | void play(); 107 | 108 | }; 109 | #endif 110 | -------------------------------------------------------------------------------- /bassdll/bassdll.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2009 Drew Crawford 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a 5 | * copy of this software and associated documentation files (the "Software"), 6 | * to deal in the Software without restriction, including without limitation 7 | * the rights to use, copy, modify, merge, publish, distribute, sublicense, 8 | * and/or sell copies of the Software, and to permit persons to whom the 9 | * Software is furnished to do so, subject to the following conditions: 10 | * The above copyright notice and this permission notice shall be included in 11 | * all copies or substantial portions of the Software. 12 | * 13 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 18 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 19 | * IN THE SOFTWARE. 20 | */ 21 | 22 | #include "bassdll.h" 23 | 24 | void channel::next() 25 | { 26 | duration_sum += notes[current]->duration * 10; 27 | current++; 28 | if (current==insert_at) current = 0; 29 | } 30 | 31 | channel::channel(int apin, int how_many_notes) 32 | { 33 | pinMode(apin,OUTPUT); 34 | halflife = 0; 35 | //next_invert_time = 0; 36 | // nextTime = 0; 37 | pin = apin; 38 | // notes = NULL; 39 | realloc_notes(); 40 | init(); 41 | 42 | // debug(sizeof(note*) * how_many_notes); 43 | } 44 | 45 | void channel::init() 46 | { 47 | nextTime = micros(); //YES, YOU NEED THIS HERE. THINK ABOUT IT. 48 | position = LOW; 49 | duration_sum = 0; 50 | transpose = 0; 51 | supersolo = 0; 52 | notehack.i = 0; 53 | current = 0; 54 | ssinterval = UCHAR_MAX; 55 | } 56 | 57 | void channel::setupNote(unsigned long started_playing_time) 58 | { 59 | 60 | note *solonote = notes[current]; 61 | switch(notes[current]->tone) 62 | { 63 | //hacks for various notes 64 | case KICK: 65 | halflife = 500000/200; 66 | break; 67 | case SNARE: 68 | halflife = 500000/345; 69 | break; 70 | //otherwise (square halflife) 71 | case TRANSPOSEUP: 72 | halflife = INT_MAX; 73 | transpose++; 74 | break; 75 | case TRANSPOSEDOWN: 76 | /// debug(444); 77 | transpose--; 78 | halflife = INT_MAX; 79 | break; 80 | case SUPERSOLO: 81 | 82 | supersolo = solonote->duration; 83 | solonote->duration = 0; 84 | next(); 85 | solonote->duration = supersolo; //restore duration for the next loop 86 | setupNote(started_playing_time); //fake out everything 87 | return; 88 | break; 89 | default: 90 | halflife = 500000/fixTone(notes[current]->tone + transpose); 91 | break; 92 | } 93 | if (halflife <0) halflife = INT_MAX; //we use negative number on occasion for things like rests... 94 | unsigned long old_nextTime = nextTime; 95 | nextTime = started_playing_time + ((unsigned long) //instruct the compiler that this is going to get BIG... otherwise things overflow here 96 | duration_sum + notes[current]->duration*10)*1000; 97 | next_invert_time = old_nextTime + halflife; 98 | 99 | // if (notes[current]->tone==REST) debug (notes[current]->duration); 100 | //debug(nextTime); 101 | // if (current->tone==4) if (current->next==NULL) debug(1); 102 | } 103 | 104 | 105 | 106 | 107 | 108 | void channel::realloc_notes() 109 | { 110 | insert_at = 0; 111 | } 112 | channel::~channel() 113 | { 114 | free(notes); 115 | } 116 | 117 | void channel::queue(note* n) 118 | { 119 | notes[insert_at++]=n; 120 | } 121 | 122 | inline void channel::notehacks () 123 | { 124 | switch(notes[current]->tone) 125 | { 126 | case KICK: 127 | 128 | notehack.i++; 129 | 130 | if (notehack.i>=10) 131 | { 132 | 133 | notehack.i = 0; 134 | halflife *= 1.05; 135 | } 136 | break; 137 | case SNARE: 138 | 139 | notehack.i++; 140 | if(notehack.i==10) 141 | { 142 | notehack.i = 0; 143 | halflife *= 1.05; 144 | } 145 | break; 146 | default: 147 | break; 148 | } 149 | //supersolo hack 150 | if (supersolo!=0 && (ssinterval--)%supersolo==0) 151 | { 152 | char super = (notes[current+1]->tone > notes[current]->tone)?-1:1; 153 | // halflife *= ((1 + (.01*super)) * supersolo/10.); 154 | halflife += super; 155 | } 156 | } 157 | //MIXER//////////////////////// 158 | mixer::mixer() 159 | { 160 | max_channel=0; 161 | } 162 | void mixer::play() 163 | { 164 | unsigned long lastClock = micros(); 165 | unsigned long wall_clock_time = micros(); 166 | int a = 0; 167 | for(int i = 0; i < max_channel; i++) 168 | { 169 | channels[i]->init(); 170 | channels[i]->setupNote(wall_clock_time); 171 | } 172 | while(true) 173 | { 174 | //loop through each channel 175 | unsigned long minDelay = ULONG_MAX; 176 | channel* active = NULL; 177 | 178 | for(int i = 0; i < max_channel; i++) 179 | { 180 | 181 | // debug(0); 182 | //note* current = channels[i]->notes[channels[i]->current]; 183 | // if (channels[i]->notes[channels[i]->current]->tone==REST) continue; //not the minDelay 184 | if (channels[i]->notes[channels[i]->current]->tone==STOP) return; 185 | if (channels[i]->next_invert_time < minDelay) 186 | { 187 | minDelay = channels[i]->next_invert_time; 188 | active = channels[i]; 189 | } 190 | } 191 | //minDelay = channels[2]->next_invert_time; 192 | //active = channels[2]; 193 | if (active==NULL) debug(997); 194 | // if (channels[0]->current->now->tone==9 && minDelay != 1353 && minDelay != 676) debug(minDelay); 195 | //BLOCK 196 | // note* current = active->notes[active->current]; 197 | if (active->notes[active->current]->tone!=REST) 198 | active->position = ! active->position; 199 | // if(active==channels[0])if(active->next_invert_time > channels[2]->next_invert_time) debug(1024); 200 | while (micros() < minDelay){} 201 | lastClock = micros(); 202 | 203 | digitalWrite(active->pin,active->position); 204 | active->notehacks(); 205 | active->next_invert_time += active->halflife; 206 | 207 | for(int i = 0; i < max_channel; i++) 208 | { 209 | 210 | if (lastClock >= channels[i]->nextTime) 211 | { 212 | // if (++a==2) debug(0); 213 | //debug(channels[i]->nextTime); 214 | // debug(0); 215 | channels[i]->next(); 216 | channels[i]->setupNote(wall_clock_time); 217 | // debug(channels[i]->nextTime); 218 | //a++; 219 | // channels[i]->setupNote(0); 220 | 221 | } 222 | // debug(sizeof(channels[0]->nextTime)); 223 | // if (channels[0]->nextTime - lastClock > 50000) debug (channels[0]->duration_sum); 224 | // if (lastClock < 1000000 && channels[0]->current->now->tone==4) debug(lastClock) ; 225 | 226 | 227 | 228 | } 229 | 230 | 231 | 232 | 233 | a++; 234 | } 235 | } 236 | void mixer::add_channel(channel* x) 237 | { 238 | channels[max_channel++]=x; 239 | 240 | } 241 | 242 | -------------------------------------------------------------------------------- /demos/core2/core2.pde: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2010 Drew Crawford 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a 5 | * copy of this software and associated documentation files (the "Software"), 6 | * to deal in the Software without restriction, including without limitation 7 | * the rights to use, copy, modify, merge, publish, distribute, sublicense, 8 | * and/or sell copies of the Software, and to permit persons to whom the 9 | * Software is furnished to do so, subject to the following conditions: 10 | * The above copyright notice and this permission notice shall be included in 11 | * all copies or substantial portions of the Software. 12 | * 13 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 18 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 19 | * IN THE SOFTWARE. 20 | */ 21 | 22 | #include 23 | #include 24 | void pt3(channel &drums, channel &bassline, channel& sky); 25 | void pt2(channel &drums, channel &bassline, channel& sky); 26 | void pt1(channel &drums, channel &bassline, channel& sky); 27 | 28 | mixer m; 29 | note** memblk; 30 | channel pin12(12,1); 31 | channel pin11 (11,1); 32 | channel pin10 (10,1); 33 | void setup(){ 34 | memblk = (note**) calloc(290,sizeof(note*)); 35 | if (memblk==NULL) debug(1111); 36 | 37 | m.add_channel(&pin10); 38 | m.add_channel(&pin11); 39 | m.add_channel(&pin12); //LOUD PIN 40 | 41 | 42 | } 43 | 44 | void loop() { 45 | 46 | {pt1(pin10,pin11,pin12);} 47 | {pt2(pin12,pin11,pin10);} 48 | 49 | 50 | {pt3(pin12,pin11,pin10);} 51 | } 52 | 53 | 54 | 55 | 56 | 57 | #define EIGHTH 10 58 | #define KICK_LEN 9 59 | #define SNARE_LEN 7 60 | 61 | //pt 3 62 | 63 | inline void pt3(channel &drums, channel &bassline, channel& sky) 64 | { 65 | ///OK HERES THE DRUM LOOP 66 | note kick; 67 | kick.tone = KICK; 68 | kick.duration = KICK_LEN; 69 | 70 | note kick_rest; 71 | kick_rest.tone = REST; 72 | kick_rest.duration = EIGHTH-KICK_LEN; 73 | 74 | note snare; 75 | snare.tone = SNARE; 76 | snare.duration = SNARE_LEN; 77 | 78 | note snare_rest; 79 | snare_rest.tone = REST; 80 | snare_rest.duration = EIGHTH-SNARE_LEN; 81 | 82 | note rest; 83 | rest.tone = REST; 84 | rest.duration = EIGHTH; 85 | 86 | //bassline notes 87 | note gsharp; 88 | gsharp.tone = -13; 89 | gsharp.duration = EIGHTH; 90 | 91 | note gsharp4; 92 | gsharp4.tone = -13; 93 | gsharp4.duration = 4 * EIGHTH; 94 | 95 | note gsharp2low; 96 | gsharp2low.tone = -25; 97 | gsharp2low.duration = 2 * EIGHTH; 98 | 99 | note gsharp2high; 100 | gsharp2high.tone = -13; 101 | gsharp2high.duration = 2*EIGHTH; 102 | 103 | note transpose; 104 | transpose.tone = TRANSPOSEUP; 105 | transpose.duration = 0; 106 | 107 | note transposed; 108 | transposed.tone = TRANSPOSEDOWN; 109 | transposed.duration = 0; 110 | 111 | note g2; 112 | g2.tone = -14; 113 | g2.duration = 2*EIGHTH; 114 | 115 | note c; 116 | c.tone = -9; 117 | c.duration = EIGHTH; 118 | 119 | note c4; 120 | c4.tone = -9; 121 | c4.duration = 4*EIGHTH; 122 | 123 | note c2; 124 | c2.tone = -9; 125 | c2.duration = 2*EIGHTH; 126 | 127 | note lowc; 128 | lowc.tone = -21; 129 | lowc.duration = EIGHTH; 130 | 131 | note lowc4; 132 | lowc4.tone = -21; 133 | lowc4.duration = 4*EIGHTH; 134 | 135 | //sky notes 136 | note sc; 137 | sc.tone = 3; 138 | sc.duration = EIGHTH; 139 | 140 | note sgsharp; 141 | sgsharp.tone = -1; 142 | sgsharp.duration = EIGHTH; 143 | 144 | note sf; 145 | sf.tone = -4; 146 | sf.duration = EIGHTH; 147 | note sasharp; 148 | sasharp.tone = 1; 149 | sasharp.duration = EIGHTH; 150 | note sg; 151 | sg.tone = -2; 152 | sg.duration = EIGHTH; 153 | 154 | note se; 155 | se.tone = -5; 156 | se.duration = EIGHTH; 157 | 158 | note sdu; 159 | sdu.tone = 5; 160 | sdu.duration = EIGHTH; 161 | 162 | note seu; 163 | seu.tone = 7; 164 | seu.duration = EIGHTH; 165 | 166 | note sfu; 167 | sfu.tone = 8; 168 | sfu.duration = EIGHTH; 169 | note scd; 170 | scd.tone = -9; 171 | scd.duration = EIGHTH; 172 | 173 | note sgu; 174 | sgu.tone = 10; 175 | sgu.duration = EIGHTH; 176 | 177 | note scu; 178 | scu.tone = 15; 179 | scu.duration = EIGHTH; 180 | 181 | note sbu; 182 | sbu.tone = 14; 183 | sbu.duration = EIGHTH; 184 | 185 | note sd; 186 | sd.tone = -7; 187 | sd.duration = EIGHTH; 188 | 189 | note stop; 190 | stop.tone = STOP; 191 | stop.duration = 0; 192 | 193 | note sgsharpu; 194 | sgsharpu.tone = 11; 195 | sgsharpu.duration = EIGHTH; 196 | 197 | note sasharpu; 198 | sasharpu.tone = 13; 199 | sasharpu.duration = EIGHTH; 200 | note sduu; 201 | sduu.tone = 17; 202 | sduu.duration = EIGHTH; 203 | note seuu; 204 | seuu.tone = 19; 205 | seuu.duration = EIGHTH; 206 | note sguu; 207 | sguu.tone = 22; 208 | sguu.duration = EIGHTH; 209 | note nulln; 210 | nulln.tone = REST; 211 | nulln.duration = EIGHTH * 16; 212 | note scuu; 213 | scuu.tone = 27; 214 | scuu.duration = EIGHTH * 16; 215 | 216 | //do the allocs 217 | 218 | drums.notes = memblk; //needs 90 219 | bassline.notes = drums.notes + 90 ; //needs 44 220 | sky.notes = bassline.notes + 44 ; // needs 129 221 | drums.realloc_notes(); 222 | bassline.realloc_notes(); 223 | sky.realloc_notes(); 224 | //drums 225 | for(int i = 0; i < 4; i++) 226 | { 227 | drums.queue(&kick); 228 | drums.queue(&kick_rest); 229 | drums.queue(&rest); 230 | drums.queue(&rest); 231 | drums.queue(&kick); 232 | drums.queue(&kick_rest); 233 | drums.queue(&rest); 234 | drums.queue(&rest); 235 | drums.queue(&kick); 236 | drums.queue(&kick_rest); 237 | drums.queue(&rest); 238 | drums.queue(&rest); 239 | drums.queue(&rest); 240 | drums.queue(&kick); 241 | drums.queue(&kick_rest); 242 | switch(i) 243 | { 244 | case 0: case 2: 245 | drums.queue(&rest); 246 | break; 247 | case 1: case 3: 248 | drums.queue(&kick); 249 | drums.queue(&kick_rest); 250 | break; 251 | } 252 | drums.queue(&snare); 253 | drums.queue(&snare_rest); 254 | drums.queue(&rest); 255 | switch(i) 256 | { 257 | case 0:case 1:case 2: 258 | drums.queue(&kick); 259 | drums.queue(&kick_rest); 260 | break; 261 | case 3: 262 | drums.queue(&snare); 263 | drums.queue(&snare_rest); 264 | 265 | break; 266 | } 267 | drums.queue(&rest); 268 | } 269 | // debug(drums.insert_at); 270 | ///HERE'S THE BASSLINE 271 | 272 | for(int i = 0; i < 2; i++) 273 | { 274 | bassline.queue(&gsharp); 275 | bassline.queue(&rest); 276 | bassline.queue(&rest); 277 | bassline.queue(&gsharp); 278 | bassline.queue(&rest); 279 | bassline.queue(&rest); 280 | bassline.queue(&gsharp4); 281 | bassline.queue(&gsharp2low); 282 | bassline.queue(&gsharp2high); 283 | bassline.queue(&gsharp2low); 284 | if (i==0) 285 | { 286 | bassline.queue(&transpose); 287 | bassline.queue(&transpose); 288 | } 289 | } 290 | bassline.queue(&transposed); 291 | bassline.queue(&transposed); 292 | bassline.queue(&c); 293 | bassline.queue(&rest); 294 | bassline.queue(&rest); 295 | bassline.queue(&c); 296 | bassline.queue(&rest); 297 | bassline.queue(&rest); 298 | bassline.queue(&c4); 299 | bassline.queue(&g2); 300 | bassline.queue(&c2); 301 | bassline.queue(&g2); 302 | /// 303 | bassline.queue(&lowc); 304 | bassline.queue(&rest); 305 | bassline.queue(&rest); 306 | bassline.queue(&lowc); 307 | bassline.queue(&rest); 308 | bassline.queue(&rest); 309 | bassline.queue(&lowc4); 310 | bassline.queue(&g2); 311 | bassline.queue(&c2); 312 | bassline.queue(&g2); 313 | 314 | 315 | 316 | 317 | //HERE'S THE SKY 318 | //HERE WE GO 319 | 320 | 321 | for(int i = 0; i < 4; i++) 322 | { 323 | sky.queue(&sc); 324 | sky.queue(&sgsharp); 325 | sky.queue(&sf); 326 | sky.queue(&sgsharp); 327 | } 328 | 329 | for(int i = 0; i < 4; i++) 330 | { 331 | sky.queue(&sc); 332 | sky.queue(&sasharp); 333 | sky.queue(&sf); 334 | sky.queue(&sgsharp); 335 | } 336 | 337 | 338 | for(int i = 0; i < 8; i++) 339 | { 340 | switch(i) 341 | { 342 | case 3: 343 | case 7: 344 | sky.queue(&sdu); 345 | break; 346 | case 4: 347 | case 6: 348 | sky.queue(&seu); 349 | break; 350 | case 5: 351 | sky.queue(&sfu); 352 | break; 353 | default: 354 | sky.queue(&sc); 355 | } 356 | sky.queue(&sg); 357 | sky.queue(&se); 358 | sky.queue(&sg); 359 | } 360 | 361 | for(int i = 0; i < 8; i++) 362 | { 363 | switch(i) 364 | { 365 | case 2: 366 | case 6: 367 | sky.queue(&sdu); 368 | break; 369 | case 3: 370 | case 7: 371 | sky.queue(&seu); 372 | break; 373 | default: 374 | sky.queue(&sc); 375 | } 376 | if (i<4) 377 | sky.queue(&sgsharp); 378 | else 379 | sky.queue(&sasharp); 380 | sky.queue(&sf); 381 | sky.queue(&sgsharp); 382 | } 383 | //SLIDE TIME 384 | 385 | sky.queue(&seu); 386 | sky.queue(&sc); 387 | sky.queue(&sg); 388 | sky.queue(&se); 389 | sky.queue(&scd); 390 | sky.queue(&se); 391 | sky.queue(&sg); 392 | sky.queue(&sc); 393 | /// 394 | sky.queue(&seu); 395 | sky.queue(&sgu); 396 | sky.queue(&seu); 397 | sky.queue(&sc); 398 | sky.queue(&sg); 399 | sky.queue(&se); 400 | sky.queue(&sg); 401 | sky.queue(&sc); 402 | // 403 | 404 | sky.queue(&seu); 405 | sky.queue(&sc); 406 | sky.queue(&sgu); 407 | sky.queue(&sc); 408 | sky.queue(&scu); 409 | sky.queue(&sbu); 410 | sky.queue(&sgu); 411 | sky.queue(&seu); 412 | sky.queue(&sc); 413 | sky.queue(&sg); 414 | sky.queue(&se); 415 | sky.queue(&sg); 416 | sky.queue(&sc); 417 | sky.queue(&sg); 418 | sky.queue(&sc); 419 | sky.queue(&sd); 420 | 421 | //out of memory here 422 | 423 | sky.queue(&stop); 424 | m.play(); 425 | 426 | sky.realloc_notes(); //here we go... 427 | //more standard-like 428 | for(int i = 0; i < 2; i++) { 429 | sky.queue(&sc); 430 | sky.queue(&sgsharp); 431 | sky.queue(&sf); 432 | sky.queue(&sgsharp); 433 | } 434 | sky.queue(&sc); 435 | sky.queue(&sdu); 436 | sky.queue(&sc); 437 | sky.queue(&sgsharp); 438 | sky.queue(&sf); 439 | sky.queue(&sgsharp); 440 | sky.queue(&sc); 441 | sky.queue(&sg); 442 | /// 443 | 444 | sky.queue(&sc); 445 | sky.queue(&sasharp); 446 | sky.queue(&sf); 447 | sky.queue(&sasharp); 448 | sky.queue(&sc); 449 | sky.queue(&sfu); 450 | sky.queue(&sc); 451 | sky.queue(&sasharp); 452 | sky.queue(&sf); 453 | sky.queue(&sasharp); 454 | sky.queue(&sc); 455 | sky.queue(&sfu); 456 | sky.queue(&sgsharpu); 457 | sky.queue(&sfu); 458 | sky.queue(&sc); 459 | sky.queue(&sfu); 460 | //now measure 35 461 | sky.queue(&sc); 462 | sky.queue(&sg); 463 | sky.queue(&se); 464 | sky.queue(&sg); 465 | sky.queue(&sc); 466 | sky.queue(&seu); 467 | sky.queue(&sgu); 468 | sky.queue(&scu); 469 | sky.queue(&sgu); 470 | sky.queue(&seu); 471 | sky.queue(&sc); 472 | sky.queue(&sg); 473 | sky.queue(&se); 474 | sky.queue(&scd); 475 | sky.queue(&se); 476 | sky.queue(&sg); 477 | //36 478 | sky.queue(&sc); 479 | sky.queue(&seu); 480 | sky.queue(&sgu); 481 | sky.queue(&scu); 482 | sky.queue(&sgu); 483 | sky.queue(&seu); 484 | sky.queue(&sc); 485 | sky.queue(&sg); 486 | sky.queue(&sc); 487 | sky.queue(&sgu); 488 | sky.queue(&sc); 489 | sky.queue(&scu); 490 | sky.queue(&sgu); 491 | sky.queue(&sc); 492 | sky.queue(&scu); 493 | sky.queue(&sc); 494 | //37 495 | for(int i = 0; i < 4; i++) 496 | { 497 | sky.queue(&scu); 498 | sky.queue(&sgsharpu); 499 | sky.queue(&sfu); 500 | sky.queue(&sgsharpu); 501 | } 502 | //38 503 | 504 | for(int i = 0; i < 4; i++) 505 | { 506 | sky.queue(&sduu); 507 | sky.queue(&sasharpu); 508 | sky.queue(&sfu); 509 | sky.queue(&sasharpu); 510 | } 511 | 512 | 513 | sky.queue(&seuu); 514 | sky.queue(&scu); 515 | sky.queue(&sgu); 516 | sky.queue(&seu); 517 | sky.queue(&sc); 518 | sky.queue(&seu); 519 | sky.queue(&sgu); 520 | sky.queue(&scu); 521 | sky.queue(&seuu); 522 | sky.queue(&sguu); 523 | sky.queue(&seuu); 524 | sky.queue(&scu); 525 | sky.queue(&sgu); 526 | sky.queue(&scu); 527 | sky.queue(&seuu); 528 | sky.queue(&scu); 529 | 530 | sky.queue(&stop); 531 | m.play(); 532 | 533 | sky.notes = memblk; //needs 3 534 | bassline.notes = sky.notes + 3 + 1; //needs 2 535 | drums.notes = bassline.notes + 2 + 1; //needs 2 536 | sky.realloc_notes(); 537 | bassline.realloc_notes(); 538 | drums.realloc_notes(); 539 | //null notes 540 | 541 | drums.queue(&nulln); 542 | bassline.queue(&nulln); 543 | 544 | sky.queue(&scuu); 545 | sky.queue(&stop); 546 | m.play(); 547 | } 548 | inline void pt1(channel& melody, channel& harmony, channel& skyline) 549 | { 550 | 551 | 552 | 553 | note transposed; 554 | transposed.tone = TRANSPOSEDOWN; 555 | transposed.duration = 0; 556 | 557 | 558 | note sc; 559 | sc.tone = 27; 560 | sc.duration = EIGHTH; 561 | 562 | note sg; 563 | sg.tone = 22; 564 | sg.duration = EIGHTH; 565 | 566 | note se; 567 | se.tone = 19; 568 | se.duration = EIGHTH; 569 | 570 | note sgsharp; 571 | sgsharp.tone = 23; 572 | sgsharp.duration = EIGHTH; 573 | note sf; 574 | sf.tone = 20; 575 | sf.duration = EIGHTH; 576 | 577 | note sd; 578 | sd.tone = 29; 579 | sd.duration = EIGHTH; 580 | 581 | 582 | note sasharp; 583 | sasharp.tone = 25; 584 | sasharp.duration = EIGHTH; 585 | 586 | ////////MELODY 587 | note mclong; 588 | mclong.tone = 3; 589 | mclong.duration = EIGHTH * 10; 590 | 591 | note melong; 592 | melong.tone = 7; 593 | melong.duration = EIGHTH * 10; 594 | 595 | note mg; 596 | mg.tone = -2; 597 | mg.duration = EIGHTH * 2; 598 | 599 | note hg; 600 | hg.tone = 10; 601 | hg.duration = EIGHTH*2; 602 | 603 | note mc; 604 | mc.tone = 3; 605 | mc.duration = EIGHTH * 2; 606 | 607 | note me; 608 | me.tone = 7; 609 | me.duration = EIGHTH * 2; 610 | 611 | note mf; 612 | mf.tone = 8; 613 | mf.duration = EIGHTH * 4; 614 | 615 | 616 | note md4; 617 | md4.tone = 5; 618 | md4.duration = EIGHTH * 4; 619 | 620 | note me4; 621 | me4.tone = 7; 622 | me4.duration = EIGHTH * 4; 623 | 624 | note mc4; 625 | mc4.tone = 3; 626 | mc4.duration = EIGHTH * 4; 627 | 628 | note mchold; 629 | mchold.tone = 3; 630 | mchold.duration = EIGHTH * 24; 631 | note mchold2; 632 | mchold2.tone = 3; 633 | mchold2.duration = EIGHTH*10; 634 | 635 | note mghold; 636 | mghold.tone = 10; 637 | mghold.duration = EIGHTH * 24; 638 | note mghold2; 639 | mghold2.tone = 10; 640 | mghold2.duration = EIGHTH*10; 641 | 642 | note ma4; 643 | ma4.tone = 12; 644 | ma4.duration = EIGHTH * 4; 645 | 646 | note mg4; 647 | mg4.tone = 10; 648 | mg4.duration = EIGHTH * 4; 649 | 650 | note mgsharphold; 651 | mgsharphold.tone = 11; 652 | mgsharphold.duration = EIGHTH * 18; 653 | 654 | note masharphold; 655 | masharphold.tone = 13; 656 | masharphold.duration = EIGHTH * 16; 657 | 658 | note mfhold; 659 | mfhold.tone = 8; 660 | mfhold.duration = EIGHTH * 16; 661 | 662 | 663 | //memblk = (note**) malloc(sizeof(note*) * 265); 664 | melody.notes = memblk ; 665 | harmony.notes = melody.notes + 50 ; //melody needs 50 notes? round numbers 666 | skyline.notes = harmony.notes + 50 ; //harmony needs 50 note? round numbers 667 | //skyline needs 128 notes exact 668 | 669 | melody.realloc_notes(); 670 | harmony.realloc_notes(); 671 | skyline.realloc_notes(); 672 | for(int i = 0; i < 12; i++) 673 | { 674 | harmony.queue(&transposed); 675 | } 676 | for(int k = 0; k < 2; k++) 677 | { 678 | for(int i = 0; i < 8; i++) 679 | { 680 | skyline.queue(&sc); 681 | skyline.queue(&sg); 682 | skyline.queue(&se); 683 | skyline.queue(&sg); 684 | } 685 | 686 | 687 | 688 | for(int i = 0; i < 4; i++) 689 | { 690 | skyline.queue(&sc); 691 | skyline.queue(&sgsharp); 692 | skyline.queue(&sf); 693 | skyline.queue(&sgsharp); 694 | } 695 | for(int i = 0; i < 4; i++) 696 | { 697 | switch(k){ 698 | case 0: 699 | skyline.queue(&sc); 700 | break; 701 | case 1: 702 | skyline.queue(&sd); 703 | break; 704 | } 705 | skyline.queue(&sasharp); 706 | skyline.queue(&sf); 707 | skyline.queue(&sasharp); 708 | } 709 | 710 | } 711 | 712 | 713 | for(int i = 0; i < 2; i++) 714 | { 715 | melody.queue(&mclong); 716 | harmony.queue(&melong); 717 | melody.queue(&mg); 718 | harmony.queue(&mc); 719 | melody.queue(&mc); 720 | harmony.queue(&me); 721 | melody.queue(&me); 722 | harmony.queue(&hg); 723 | melody.queue(&mf); 724 | harmony.queue(&ma4); 725 | melody.queue(&me); 726 | harmony.queue(&hg); 727 | melody.queue(&md4); 728 | harmony.queue(&mf); 729 | switch(i){ 730 | case 0: 731 | melody.queue(&me4); 732 | harmony.queue(&mg4); 733 | melody.queue(&mchold); 734 | harmony.queue(&mgsharphold); 735 | harmony.queue(&mfhold); 736 | melody.queue(&mchold2); 737 | skyline.queue(&sc); 738 | break; 739 | case 1: 740 | melody.queue(&mc4); 741 | harmony.queue(&me4); 742 | melody.queue(&mghold); 743 | harmony.queue(&mgsharphold); 744 | melody.queue(&mghold2); 745 | harmony.queue(&masharphold); 746 | break; 747 | } 748 | } 749 | note stop; 750 | stop.tone = STOP; 751 | stop.duration = 0; 752 | melody.queue(&stop); 753 | 754 | m.play(); 755 | 756 | } 757 | inline void pt2(channel& melody, channel& bassline, channel& drums) 758 | { 759 | ///OK HERES THE DRUM LOOP 760 | note kick; 761 | kick.tone = KICK; 762 | kick.duration = KICK_LEN; 763 | 764 | note kick_rest; 765 | kick_rest.tone = REST; 766 | kick_rest.duration = EIGHTH-KICK_LEN; 767 | 768 | note snare; 769 | snare.tone = SNARE; 770 | snare.duration = SNARE_LEN; 771 | 772 | note snare_rest; 773 | snare_rest.tone = REST; 774 | snare_rest.duration = EIGHTH-SNARE_LEN; 775 | 776 | note rest; 777 | rest.tone = REST; 778 | rest.duration = EIGHTH; 779 | 780 | drums.notes = memblk; //needs 90 781 | bassline.notes = drums.notes + 90; //needs 58 782 | melody.notes = bassline.notes + 58; 783 | 784 | drums.realloc_notes(); 785 | bassline.realloc_notes(); 786 | melody.realloc_notes(); 787 | for(int i = 0; i < 4; i++) 788 | { 789 | drums.queue(&kick); 790 | drums.queue(&kick_rest); 791 | drums.queue(&rest); 792 | drums.queue(&rest); 793 | drums.queue(&kick); 794 | drums.queue(&kick_rest); 795 | drums.queue(&rest); 796 | drums.queue(&rest); 797 | drums.queue(&kick); 798 | drums.queue(&kick_rest); 799 | drums.queue(&rest); 800 | drums.queue(&rest); 801 | drums.queue(&rest); 802 | drums.queue(&kick); 803 | drums.queue(&kick_rest); 804 | switch(i) 805 | { 806 | case 0: case 2: 807 | drums.queue(&rest); 808 | break; 809 | case 1: case 3: 810 | drums.queue(&kick); 811 | drums.queue(&kick_rest); 812 | break; 813 | } 814 | drums.queue(&snare); 815 | drums.queue(&snare_rest); 816 | drums.queue(&rest); 817 | switch(i) 818 | { 819 | case 0:case 1:case 2: 820 | drums.queue(&kick); 821 | drums.queue(&kick_rest); 822 | break; 823 | case 3: 824 | drums.queue(&snare); 825 | drums.queue(&snare_rest); 826 | 827 | break; 828 | } 829 | drums.queue(&rest); 830 | } 831 | //bassline 832 | //// 833 | /// 834 | note bc; 835 | bc.tone = -21; 836 | bc.duration = EIGHTH; 837 | 838 | note bc2; 839 | bc2.tone = -21; 840 | bc2.duration = EIGHTH * 2; 841 | 842 | note bchigh; 843 | bchigh.tone = -9; 844 | bchigh.duration = EIGHTH * 2; 845 | 846 | note bgsharp; 847 | bgsharp.tone = -13; 848 | bgsharp.duration = EIGHTH * 2; 849 | 850 | note basharp; 851 | basharp.tone = -11; 852 | basharp.duration = EIGHTH * 2; 853 | 854 | for(int i = 0; i < 4; i++) 855 | { 856 | for(int k = 0; k < 3; k++) 857 | { 858 | switch(i) 859 | { 860 | case 0: 861 | case 1: 862 | bassline.queue(&bc2); 863 | break; 864 | case 2: 865 | bassline.queue(&bgsharp); 866 | break; 867 | case 3: 868 | bassline.queue(&basharp); 869 | break; 870 | 871 | } 872 | bassline.queue(&rest); 873 | 874 | } 875 | bassline.queue(&rest); 876 | switch(i) 877 | { 878 | case 0: 879 | case 1: 880 | bassline.queue(&bc2); 881 | break; 882 | case 2: 883 | bassline.queue(&bgsharp); 884 | 885 | break; 886 | case 3: 887 | bassline.queue(&basharp); 888 | 889 | break; 890 | 891 | } 892 | 893 | bassline.queue(&bchigh); 894 | switch(i) 895 | { 896 | case 0: 897 | case 1: 898 | bassline.queue(&bc2); 899 | break; 900 | case 2: 901 | bassline.queue(&bgsharp); 902 | break; 903 | case 3: 904 | bassline.queue(&basharp); 905 | break; 906 | 907 | } 908 | } 909 | 910 | /* bassline.queue(&bc2); 911 | bassline.queue(&bchigh); 912 | bassline.queue(&bc2);*/ 913 | 914 | 915 | 916 | //melody 917 | note mch; 918 | mch.tone=-9; 919 | mch.duration = EIGHTH*10; 920 | note mg; 921 | mg.tone = -14; 922 | mg.duration = EIGHTH*2; 923 | 924 | note mg4; 925 | mg4.tone = -14; 926 | mg4.duration = EIGHTH*4; 927 | 928 | note mg1; 929 | mg1.tone = -14; 930 | mg1.duration = EIGHTH*1; 931 | 932 | note mgold; 933 | mgold.tone = -2; 934 | mgold.duration = EIGHTH * 12; 935 | 936 | note mc; 937 | mc.tone = -9; 938 | mc.duration = EIGHTH * 2; 939 | 940 | note mcsharp1; 941 | mcsharp1.tone = -8; 942 | mcsharp1.duration = EIGHTH; 943 | 944 | note mc1; 945 | mc1.tone = -9; 946 | mc1.duration = EIGHTH * 1; 947 | 948 | note mcl; 949 | mcl.tone = -21; 950 | mcl.duration = EIGHTH * 2; 951 | 952 | note mc4; 953 | mc4.tone = -9; 954 | mc4.duration = EIGHTH * 4; 955 | 956 | note me; 957 | me.tone = -5; 958 | me.duration = EIGHTH * 2; 959 | 960 | note me1; 961 | me1.tone = -5; 962 | me1.duration = EIGHTH * 1; 963 | 964 | note mel8; 965 | mel8.tone = -17; 966 | mel8.duration = EIGHTH * 8; 967 | 968 | note mf4; 969 | mf4.tone = -4; 970 | mf4.duration = EIGHTH * 4; 971 | 972 | note mfl1; 973 | mfl1.tone = -16; 974 | mfl1.duration = EIGHTH; 975 | 976 | note mf; 977 | mf.tone = -4; 978 | mf.duration = EIGHTH * 2; 979 | 980 | note mf1; 981 | mf1.tone = -4; 982 | mf1.duration = EIGHTH; 983 | 984 | 985 | note md1; 986 | md1.tone = -7; 987 | md1.duration = EIGHTH; 988 | 989 | note mdl; 990 | mdl.tone = -19; 991 | mdl.duration = EIGHTH * 2; 992 | note md4; 993 | md4.tone = -7; 994 | md4.duration = EIGHTH * 4; 995 | 996 | note me4; 997 | me4.tone = -5; 998 | me4.duration = EIGHTH * 4; 999 | 1000 | note mchh; 1001 | mchh.tone = -9; 1002 | mchh.duration = EIGHTH * 14; 1003 | 1004 | note mcsecondhh; 1005 | mcsecondhh.tone = -9; 1006 | mcsecondhh.duration = EIGHTH * 8; 1007 | 1008 | note soloON; 1009 | soloON.tone = SUPERSOLO; 1010 | soloON.duration = 1; 1011 | 1012 | note soloOFF; 1013 | soloOFF.tone = SUPERSOLO; 1014 | soloOFF.duration = 0; 1015 | 1016 | note mgsharp; 1017 | mgsharp.tone = -13; 1018 | mgsharp.duration = 2 * EIGHTH; 1019 | 1020 | note mgsharp10; 1021 | mgsharp10.tone = -13; 1022 | mgsharp10.duration = 10 * EIGHTH; 1023 | 1024 | note frest; 1025 | frest.tone = REST; 1026 | frest.duration = EIGHTH / 2; 1027 | 1028 | note moreSOLO; 1029 | moreSOLO.tone = SUPERSOLO; 1030 | moreSOLO.duration = 1; 1031 | 1032 | note stop; 1033 | stop.tone = STOP; 1034 | stop.duration = 0; 1035 | 1036 | 1037 | melody.queue(&mch); 1038 | melody.queue(&mg); 1039 | melody.queue(&mc); 1040 | melody.queue(&me); 1041 | melody.queue(&mf4); 1042 | melody.queue(&me); 1043 | melody.queue(&md4); 1044 | 1045 | melody.queue(&me); 1046 | melody.queue(&soloON); 1047 | melody.queue(&me); 1048 | melody.queue(&soloOFF); 1049 | melody.queue(&mchh); 1050 | melody.queue(&rest); 1051 | melody.queue(&rest); 1052 | melody.queue(&rest); 1053 | melody.queue(&rest); 1054 | //m12 1055 | 1056 | melody.queue(&mc4); 1057 | melody.queue(&mgsharp); 1058 | melody.queue(&mc4); 1059 | melody.queue(&md4); 1060 | melody.queue(&mc); 1061 | 1062 | melody.queue(&mch); 1063 | melody.queue(&mg); 1064 | melody.queue(&mc); 1065 | melody.queue(&me); 1066 | //m13 1067 | melody.queue(&mf4); 1068 | melody.queue(&me); 1069 | melody.queue(&md4); 1070 | melody.queue(&mc4); 1071 | melody.queue(&mc); 1072 | //m14 1073 | melody.queue(&mgold); 1074 | melody.queue(&mf); 1075 | melody.queue(&me); 1076 | //m15 1077 | melody.queue(&mf1); 1078 | melody.queue(&me1); 1079 | melody.queue(&mc1); 1080 | melody.queue(&mg1); 1081 | melody.queue(&mg4); 1082 | melody.queue(&mg4); 1083 | /// 1084 | melody.queue(&mf1); 1085 | melody.queue(&me1); 1086 | melody.queue(&moreSOLO); 1087 | melody.queue(&mc1); 1088 | melody.queue(&mg1); 1089 | melody.queue(&soloOFF); 1090 | 1091 | //again 1092 | melody.queue(&mch); 1093 | melody.queue(&mg); 1094 | melody.queue(&mc); 1095 | melody.queue(&me); 1096 | melody.queue(&mf4); 1097 | melody.queue(&me); 1098 | melody.queue(&md4); 1099 | 1100 | melody.queue(&me); 1101 | 1102 | melody.queue(&moreSOLO); 1103 | melody.queue(&me1); 1104 | melody.queue(&me1); 1105 | melody.queue(&md1); 1106 | melody.queue(&mcsharp1); 1107 | melody.queue(&soloOFF); 1108 | 1109 | melody.queue(&mcsecondhh); 1110 | 1111 | 1112 | melody.queue(&mc); 1113 | melody.queue(&mg); 1114 | melody.queue(&mc); 1115 | melody.queue(&mg); 1116 | melody.queue(&mgsharp10); 1117 | melody.queue(&mfl1); 1118 | melody.queue(&mfl1); 1119 | melody.queue(&mgsharp); 1120 | melody.queue(&mc); 1121 | 1122 | melody.queue(&mg4); 1123 | melody.queue(&mg); 1124 | melody.queue(&mc4); 1125 | 1126 | melody.queue(&mg); 1127 | melody.queue(&mc); 1128 | melody.queue(&me); 1129 | melody.queue(&mf4); 1130 | melody.queue(&me); 1131 | melody.queue(&md4); 1132 | melody.queue(&mc4); 1133 | melody.queue(&rest); 1134 | melody.queue(&mc1); 1135 | 1136 | melody.queue(&mgold); 1137 | melody.queue(&mf); 1138 | melody.queue(&me); 1139 | 1140 | melody.queue(&mf1); 1141 | melody.queue(&me1); 1142 | melody.queue(&mc1); 1143 | melody.queue(&mfl1); 1144 | melody.queue(&mel8); 1145 | melody.queue(&mdl); 1146 | melody.queue(&mcl); 1147 | 1148 | 1149 | melody.queue(&stop); 1150 | m.play(); 1151 | } 1152 | --------------------------------------------------------------------------------