05.09.2013 Views

2.3 Relaxatie-oscillator

2.3 Relaxatie-oscillator

2.3 Relaxatie-oscillator

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

}<br />

{<br />

if (mvrl) mvrl--;<br />

switch (metaevnt)<br />

{<br />

case SQTRNM:<br />

{<br />

putc((char)c,o); // write text meta evnt<br />

break;<br />

}<br />

}<br />

if (!mvrl) // start again with finding delta-time before event<br />

{<br />

dtm=TRUE;<br />

vrl=0;<br />

evtdsp=FALSE;<br />

switch (metaevnt) // finish of with CR/LF etc.<br />

{<br />

case SQTRNM:<br />

putc(10,o); // finish off with CR/LF<br />

ascnum.Format(“%d”,mres);<br />

fputs(ascnum,o);<br />

putc(10,o); // finish off with CR/LF<br />

break;<br />

}<br />

} // end switch (metaevnt)<br />

break; // end case META_DATA<br />

}<br />

} // end switch(meta)<br />

break; // end case MTAEVNT<br />

}<br />

} // end switch evntknd<br />

if(dtm && (evtknd==MIDIEVNT)) // show package of data; only be checked if !dtm<br />

{<br />

switch (cmdsize) // cmdsize 0 is not specified in midi files<br />

{<br />

case 1: // command with 1 byte data: mcmd, data1<br />

{<br />

sdtm+=cumdtm;<br />

cumdtm=sdtm;<br />

sdtm=250*sdtm/mres; // value range: [0,10000><br />

ascnum.Format(“%d”,sdtm);<br />

fputs(ascnum,o);<br />

putc(‘,’,o); // put division marker<br />

ascnum.Format(“%d”,data1);<br />

fputs(ascnum,o);<br />

putc(10,o); // finish off with CR/LF<br />

break;<br />

}<br />

case 2: // command with 2 bytes data<br />

{<br />

mch=mch;<br />

data2=data2;<br />

break;<br />

}<br />

} // end switch (cmdsize)<br />

} // end if (dtm && ....)<br />

} // end else (dtm)<br />

if (!chunkl)<br />

{<br />

stri.Format(“finish with track %d”,track);<br />

SaveMsg(stri);<br />

i=0;<br />

vrl=0;<br />

cumdtm=0;<br />

track++;<br />

dtm=TRUE;<br />

fclose(o); // ready with file<br />

what2do=THDR;<br />

}<br />

break; // end case TTAIL<br />

73

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

Saved successfully!

Ooh no, something went wrong!