ckfh:array[0..$3f] of byte;//header inicial 'CASIO Music Lib' position $17=$0B rhythm file const ckfstart:word=$40; //start point of ckf data, from beginning of file midistart:word=$25c; //start point of midi data from beginning of file type tsec=record mesures:word; // number of mesures per part data:array[0..4,0..7] of byte; //part parameters (volume, reverb, chord type... see Casio converter manual) pos:array[0..4] of word; //start point of each part midi data, from ckfstart end; Type trythm=record size:word; //longitud del fitxer name:array[0..7] of char; //nom del ritme tempo,bar:byte; //tempo i compas**(1) blank:array[0..5] of byte; //blank bytes sec:array[0..9] of tsec;// **(3) optpos:word; //**(4) end; ckfopt:array[0..73] of byte;//opt parameters if optpos<>FFFF Type **(2) tnote=record delta:byte; note:byte; volume:byte;//if volume=0 then noteoff, else noteon end; **(1) //bar barn:=bar div 8; // barn:numerator t:=1; for n:=1 to bar mod 8 do t:=t*2; bard:=t; //bard:denominator **(2) You find ckf notes from $25c. Each note has three bytes: delta,note,vol. If note=$FF the other two bytes make a word delta value. If note=$FC, note is a rest(silence) and the other bytes make a word delta value. Every part must end with $FF or $FC messages. If the total of messages is not multiple of two you must add a $FF message. **(3) There are 10 sections (Intro A, Intro B, Main A ...) and each section has 5 parts (drum, bass,....) **(4)OTS section (I don't know the structure of this part, but you don't need it if you don't use OTS parameters