05.09.2013 Views

2.3 Relaxatie-oscillator

2.3 Relaxatie-oscillator

2.3 Relaxatie-oscillator

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

switch(evtknd)<br />

{<br />

case MIDIEVNT: //(in running status vrl is initialized with cmdsize)<br />

{<br />

if (!vrl) // if 1st byte is midi cmd, init. variables cmdsize,mcmd<br />

{<br />

cmdsize=2; // most midi channel commands have 2 data bytes<br />

// in midi-file only sys excl and common are supported<br />

// ; no sys. realtime!<br />

mch=c & 0x0f; // get midi channel<br />

mcmd=c >> 4; // filter out midi channel, shift 4 places to the right<br />

switch( mcmd ) // test for commands with only 1 byte data<br />

{<br />

case AFTER_TOUCH: cmdsize=1; break;<br />

case PRG_CHNG: cmdsize=1; break;<br />

} // endswitch (c)<br />

vrl=cmdsize; // initialize vrl<br />

} // end if (!vrl)<br />

else // proces following byte(s) after midi command byte<br />

{<br />

if(cmdsize==1)data1=c; // need only this byte with command mcmd<br />

if(cmdsize==2)<br />

{<br />

if (vrl==2) data1=c;<br />

else data2=c;<br />

}<br />

vrl--;<br />

if (!vrl) dtm=TRUE; // ready with event, find delta time<br />

} // end else if(!vrl)<br />

break; // end case MIDIEVNT<br />

}<br />

case SYSEXEVNT:<br />

break;<br />

case MTAEVNT:<br />

{<br />

switch (meta)<br />

{<br />

case META_FF:<br />

{<br />

meta++; // ignore this byte ff, next byte will be type<br />

break;<br />

}<br />

case META_TP:<br />

{<br />

(char)metaevnt=c;<br />

if ( metaevnt

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!