Power Music format Created by Joakim Ogren Analysed by Asle / ReDoX (asle@mygale.org) Source: - one !PM! packed file sent by Gryzor (thx !) Offset size (byte) Comment ------ ----------- ------- 0 20 14h Title *************************************** * the following is repeated 31 times * * with 30 bytes description for 1 smp * ****************************************************** * 20 22 Sample Name * (14h) (16h) * 42 2 Sample Size / 2 * (2Ah) * 44 1 Finetune (0 -> F) * (2Ch) * 45 1 Volume (0 - 40h) * (2Dh) * 46 2 Loop Start / 2 * (2Eh) * 48 2 Loop Size / 2 * (30h) * * ****************************************************** 950 1 Number of pattern to play (3B6h) 951 1 noisetracker byte (FFh) (3B7h) 952 128 pattern table (3B8h) (80h) 1080 4 "!PM!" ID string (438h) 1084 ? Pattern datas. Same storing as ptk. (43Ch) each pattern takes 400h bytes row 00 | channel 1 | channel 2 | channel 3 | channel 4 | row 01 | channel 1 | channel 2 | channel 3 | channel 4 | ... row 63 | channel 1 | channel 2 | channel 3 | channel 4 | each note is coded that way : ----Sample number----- / / \ \ | | | | 0000 0000 0000 0000 0000 0000 0000 0000 | | \ / \ / \ / effect effect -Note value parameter Follows Sample datas ... use the following formula to retrieve the original samples : |------------------------------------------------------| | NewSample[0] = OldSample[0] | | cpt=0 | | | |Loop_Point: | | NewSample[cpt] = NewSample[cpt-1] + OldSample[cpt] | | cpt = cpt + 1; | | goto Loop_Point | |------------------------------------------------------| There, and just dont forget to use SIGNED CHARS !!!!.