// "Pulssi" v4, slightly different pad note sequence, heartbeat kick + changed bass line + removed pitch modulation effect // Yzi/Fit // 2014-01-18 void addTune() { static unsigned int sequence = 0x782AE530; static unsigned int bass = 0xC5A38570; int f = framecount++; int patch = ((f & 7) << 1) + 0x43; int chan = f % 3; int note = ((f >> 2) % 3) * 12 + 26 + (bass & 0xF); int vel = 70 - (f & 0x3F); if (f >= 0x100) if (!(f & 0x37)) midiOutShortMsg(midiout_handle, 0x007f2499); // basari if ((!(f & 0x3f)) && (f >= 0x100)) { // melodia if (!(f & 0x7F)) { __asm { rol dword ptr bass, 4 } } patch = 89; note = 62 + (sequence & 0xF); chan += 4; vel = 64; __asm { rol dword ptr sequence, 4 } } midiOutShortMsg(midiout_handle, 0x00007BB0 + chan); midiOutShortMsg(midiout_handle, 0x000000c0 + chan + (patch << 8)); //midiOutShortMsg(midiout_handle, 0x000000b0 + chan + (1 << 8) + (96 << 16)); // pitch modulation midiOutShortMsg(midiout_handle, 0x00000090 + chan + (note << 8) + (vel << 16)); midiOutShortMsg(midiout_handle, 0x000019c9); Sleep(31); }