Echo #02
30 ноября 1996 |
|
Music - Formats compiled modules known musical editors. Pro Tracker v2.101 by GDC, A standard player.
(C) VfNG / NEW Many in the process of writing the effects of missing somewhere a couple of thousand cycles. Usually in such cases, the first thing in trying to optimized music player. I think that no harm will be published format compiling modules most famous music editors. It's a little easier for you life and make easier picking in the old PLAYER'e. Let's start with the PRO TRACKER 2.101 by GDC. The next time may be, we will publish the format of music STP PRO. Terminologiya: QUARK: those elements that comprise SAMPLES, ORNAMENTS. QUANT: QUARKS number in each cell PATTERN. In fact, the playback speed; PATTERN: Verse; POSITION LIST: order of play PATTERNS; POSITION: position POSITION LIST; Format compile the module: +0 DELAY-number QUARKS, for which played a QUANT; +1 MUS_LEN-number positions in the melody; +2 LOOP TO POSITION-position number, which will be loop by playing the whole tune (0 - # FF); +3,64 SAMP_A-shift from 0 to each of the 32-SAMPLE. SAMPLE number 0 is not described. His number is used to mute the channel. +67,32 ORN_A-similar SAMP_A for 16 ornaments. Ornament Room 0-absence of ornament. +99,2 PAT_OFFSET-offset from 0 up to the first descriptor PATTERN'ov PAT. +101,30 NAME-the name of the music in ASCII. +131 POSITION LIST-list position numbers PATTERN for each position. End Table-# FF. +? PAT-descriptors PATTERN'ov. Kazhdy PATTERN consists of 3 channels. In this table, the bias from 0 to descriptors for each channel PATTERN. Thus, by 6 bytes / PATTERN. End Table-# 0000. +? CHAN-channel descriptors. Channel is represented as a list of bytes, which are analyzed as follows: LOOP LD A, (DE) INC DE ADD A, # 20 JR C, L1 ADD A, # 60 JR C, L2 ADD A, # 10 JR C, L3 ADD A, # 10 JR C, L4 ADD A, # 40 JR C, L5 ADD A, # 10 JR C, L6 INC A JR Z, L7 INC A JR Z, L8 INC A JR Z, L9 INC A JR NZ, L10 L11 Disable command and go to LOOP. L10 Extract the next byte, it value addition to the frequency NOISE. Then, on the LOOP. L9 Extract three bytes. In the 1-m value PORT, ie the number that will be added to the current frequency of the notes. It should be noted, that the frequency of the highest notes of the smallest and most low-at most, it means: put. 128-255, denying. 0-127. In 2 nd and 3 rd byte difference in the frequency values of the new (the one which caused PORT) and the previous one note. There is a compiler error, which incorrectly identifies this value if a new note stands at the beginning PATTERN. Command to turn off when the amount the additions of a exceeds the value of +2, +3. Go to LOOP. L8 Extract 1 byte. It value GLISSADE. Signs of similar- PORT. Then go to LOOP. L7 Extract 1 byte. It value for DELAY (playback speed). Then go to LOOP. L6 In the A volume (0-F). This value is multiplied by 16 and added to the top of the table TABL1. To the resulting value should be treated like the top of a 16-byte table, which contain values for the amplitude of the coprocessor registers for each value extracted from the SAMPLE. Then go to LOOP. L5 In the A-number QUANTS not need to analyze the channel, ie, QUANTS distance between successive changes in the parameters of the channel. Then, on the LOOP. L4 In the A room ornament. If equals 0, then the absence of ornament. Go to LOOP. L3 If A = 0 then exit. If 0 LD L, A LD (LF95E +1), HL JR LF99B LF991 LD (LF970 +1), HL POP HL LF995 LD D, # 00 ADD HL, DE LD (LF95E +1), HL LF99B DB # DD LD A, H LD HL, LF752 RLCA OR (HL) LD (HL), A EX AF, AF ' LD C, A LF9A5 LD HL, # 0000 ADD HL, BC LD A, (HL) LF9AA OR # 00 LF9AC LD (LF754), A LF9AF LD A, # 00 INC A JR Z, LFA2F LF9B4 LD BC, # 0000 LF9B7 LD DE, # 0000 LF9BA LD HL, # 0000 LD A, C INC A CP (HL) INC HL JR NZ, LF9C4 LD A, (HL) LF9C4 LD (LF9B4 +1), A INC HL LD (LF894 +1), HL EX DE, HL LD A, B LD E, A INC A CP (HL) INC HL JR NZ, LF9D4 LD A, (HL) LF9D4 LD (LF9B4 +2), A INC HL DB # DD LF9D9 LD L, # 00 LF9DB LD B, # 00 CALL LF863 LF9E0 LD DE, # 0000 ADD HL, DE LD (LF74F), HL EX DE, HL LF9E8 LD DE, # 0000 DEC D JP M, LFA1D JR Z, LFA17 PUSH HL LF9F2 LD HL, # 0000 LD A, E AND A JP P, LF9FC NEG LF9FC LD C, A AND A SBC HL, BC JR NC, LFA13 LFA02 LD A, # 00 LD (LF9D9 +1), A XOR A LD (LF9E8 +2), A LD H, A LD L, A LD (LF9E0 +1), HL POP HL JR LFA1D LFA13 LD (LF9F2 +1), HL POP HL LFA17 LD D, # 00 ADD HL, DE LD (LF9E0 +1), HL LFA1D DB # DD LD A, H LD HL, LF752 RLCA RLCA OR (HL) LD (HL), A EX AF, AF ' LD C, A LFA28 LD HL, # 0000 ADD HL, BC LD A, (HL) LFA2D OR # 00 LFA2F LD (LF755), A LFA32 LD HL, LF758 LD DE, # FFBF LD C, # FD XOR A OR (HL) LD A, # 0D JR NZ, LFA47 SUB # 03 LD HL, LF755 JR LFA5C LFA47 LD B, D OUT (C), A LD B, E OUTD DEC A LD B, D OUT (C), A LD B, E OUTD DEC A LD B, D OUT (C), A LD B, E OUTD DEC A LFA5C LD B, D OUT (C), A LD B, E OUTD DEC A LD B, D OUT (C), A LD B, E OUTD DEC A LD B, D OUT (C), A LD B, E OUTD DEC A LD B, D OUT (C), A LD B, E OUTD DEC A LD B, D OUT (C), A LD B, E OUTD DEC A LD B, D OUT (C), A LD B, E OUTD DEC A LD B, D OUT (C), A LD B, E OUTD DEC A LD B, D OUT (C), A LD B, E OUTD DEC A LD B, D OUT (C), A LD B, E OUTD DEC A LD B, D OUT (C), A LD B, E OUTD DEC A LD B, D OUT (C), A LD B, E OUTD LD (LF752), A LD (LF758), A RET LFBEC LD (LFB5A +1), A LD A, (LFB6A +2) DEC A JR Z, LFBFA LD A, C LD (LFB21 +1), A XOR A LFBFA LD (LFB1D), A LD A, # 37 LD (LFB54), A RET LFC03 EX AF, AF ' LD (LFB2D), A LD A, (LF8D8 +1) LD C, A EX AF, AF ' LD (LFB21 +1), A INC B JR Z, LFBEC XOR A LD (LFB6A +2), A LD (LFB1D), A LD A, # 37 RET LFC1C ADD A, A ADD A, A ADD A, A ADD A, A LD HL, VOLTAB LD C, A ADD HL, BC LD (LFB3D +1), HL LD A, # 37 EX AF, AF ' JP LFC74 LFC2E LD A, # 37 LD (LFB54), A LD A, (DE) INC DE LD H, # 2001 LD L, A LD (LFB6A +1), HL AND A LD A, B JP P, LFC41 CPL LFC41 LD (LFB65 +1), A DEC B JR LFC74 LFC47 LD A, (DE) INC DE LD H, # 2002 LD L, A LD (LFB6A +1), HL AND A LD A, B JP P, LFC55 CPL LFC55 LD (LFB65 +1), A LD A, (DE) LD L, A INC DE LD A, (DE) INC DE LD H, A LD (LFB5F +1), HL DEC B JR LFC74 LFC64 LD A, (DE) INC DE LD (LFB38 +1), A LD A, # 37 EX AF, AF ' JR LFC74 LFC6E LD (LF748), A LD (LFAC8 +1), A LFC74 LD A, (DE) INC DE ADD A, # 20 JR C, LFCA5 ADD A, # 60 JR C, LFC03 ADD A, # 10 JR C, LFCE9 ADD A, # 10 JR C, LFCB7 ADD A, # 40 JR C, LFC6E ADD A, # 10 JR C, LFC1C INC A JR Z, LFD07 INC A JR Z, LFC2E INC A JR Z, LFC47 INC A JR NZ, LFC64 XOR A LD (LFB6A +2), A LD A, # 37 LD (LFB54), A JR LFC74 LFCA5 JR Z, LFCCC ADD A, A LD HL, SMP_A LD C, A ADD HL, BC LD A, (HL) INC HL LD H, (HL) LD L, A LD (LFB26 +1), HL JP LFC74 LFCB7 LD HL, ORN_A ADD A, A LD C, A ADD HL, BC LD A, (HL) INC HL LD H, (HL) LD L, A LD (LFB4D +1), HL LD A, # 37 LD (LFB44), A JP LFC74 LFCCC EX AF, AF ' LD (LFB2D), A LD A, # 2F LD (LFB1D), A LD A, # 37 RET LFCD8 EX AF, AF ' LD (LFB2D), A LD A, # A7 RET LFCDF XOR A LD (LFB33 +1), A LD A, # 37 EX AF, AF ' JP LFC74 LFCE9 JR Z, LFCD8 CP # 0F JR Z, LFCDF LD (LFBD5 +1), A LD A, # 10 LD (LFB33 +1), A LD A, (DE) LD (LFBDA +1), A INC DE LD A, (DE) LD (LFBDA +2), A INC DE LD A, # 37 EX AF, AF ' JP LFC74 LFD07 LD A, (DE) INC DE LD (LFBE0 +1), A JP LFC74 LFD0F LD (LFBC5 +1), A LD A, (LFBCF +2) DEC A JP Z, LFD1E LD A, C LD (LFB86 +1), A XOR A LFD1E LD (LFB82), A LD A, # 37 LD (LFBB9), A RET LFD27 EX AF, AF ' LD (LFB92), A LD A, (LF957 +1) LD C, A EX AF, AF ' LD (LFB86 +1), A INC B JR Z, LFD0F XOR A LD (LFBCF +2), A LD (LFB82), A LD A, # 37 RET LFD40 ADD A, A ADD A, A ADD A, A ADD A, A LD HL, VOLTAB LD C, A ADD HL, BC LD (LFBA2 +1), HL LD A, # 37 EX AF, AF ' JP LFD98 LFD52 LD A, # 37 LD (LFBB9), A LD A, (DE) INC DE LD H, # 2001 LD L, A LD (LFBCF +1), HL AND A LD A, B JP P, LFD65 CPL LFD65 LD (LFBCA +1), A DEC B JR LFD98 LFD6B LD A, (DE) INC DE LD H, # 2002 LD L, A LD (LFBCF +1), HL AND A LD A, B JP P, LFD79 CPL LFD79 LD (LFBCA +1), A LD A, (DE) LD L, A INC DE LD A, (DE) INC DE LD H, A LD (LFBBF +1), HL DEC B JR LFD98 LFD88 LD A, (DE) INC DE LD (LFB9D +1), A LD A, # 37 EX AF, AF ' JR LFD98 LFD92 LD (LF749), A LD (LFAE6 +1), A LFD98 LD A, (DE) INC DE ADD A, # 20 JR C, LFDC9 ADD A, # 60 JR C, LFD27 ADD A, # 10 JR C, LFE0D ADD A, # 10 JR C, LFDDB ADD A, # 40 JR C, LFD92 ADD A, # 10 JR C, LFD40 INC A JR Z, LFE2B INC A JR Z, LFD52 INC A JR Z, LFD6B INC A JR NZ, LFD88 XOR A LD (LFBCF +2), A LD A, # 37 LD (LFBB9), A JR LFD98 LFDC9 JR Z, LFDF0 ADD A, A LD HL, SMP_A LD C, A ADD HL, BC LD A, (HL) INC HL LD H, (HL) LD L, A LD (LFB8B +1), HL JP LFD98 LFDDB LD HL, ORN_A ADD A, A LD C, A ADD HL, BC LD A, (HL) INC HL LD H, (HL) LD L, A LD (LFBB2 +1), HL LD A, # 37 LD (LFBA9), A JP LFD98 LFDF0 EX AF, AF ' LD (LFB92), A LD A, # 2F LD (LFB82), A LD A, # 37 RET LFDFC EX AF, AF ' LD (LFB92), A LD A, # A7 RET LFE03 XOR A LD (LFB98 +1), A LD A, # 37 EX AF, AF ' JP LFD98 LFE0D JR Z, LFDFC CP # 0F JR Z, LFE03 LD (LFBD5 +1), A LD A, # 10 LD (LFB98 +1), A LD A, (DE) LD (LFBDA +1), A INC DE LD A, (DE) LD (LFBDA +2), A INC DE LD A, # 37 EX AF, AF ' JP LFD98 LFE2B LD A, (DE) INC DE LD (LFBE0 +1), A JP LFD98 LFE33 EX AF, AF ' LD A, (LF9D9 +1) LD C, A EX AF, AF ' LD (LF9D9 +1), A INC B JR Z, LFE46 XOR A LD (LF9E8 +2), A JP LFE55 LFE46 LD (LFA02 +1), A LD A, (LF9E8 +2) DEC A JP Z, LFE55 LD A, C LD (LF9D9 +1), A XOR A LFE55 LD H, A LD L, A LD (LF9E0 +1), HL LD (LF9AF +1), A LD (LF9B4 +1), HL RET LFE61 LD A, (DE) INC DE LD H, # 2001 LD L, A LD (LF9E8 +1), HL AND A LD A, B JP P, LFE6F CPL LFE6F LD (LFA17 +1), A DEC B JR LFE9F LFE75 LD A, (DE) INC DE LD L, A LD H, # 2002 LD (LF9E8 +1), HL AND A LD A, B JP P, LFE83 CPL LFE83 LD (LFA17 +1), A LD A, (DE) LD L, A INC DE LD A, (DE) INC DE LD H, A LD (LF9F2 +1), HL DEC B JR LFE9F LFE92 LD A, (DE) INC DE LD (LF9DB +1), A JR LFE9F LFE99 LD (LF74A), A LD (LFAFF +1), A LFE9F LD A, (DE) INC DE ADD A, # 20 JR C, LFECB ADD A, # 60 JR C, LFE33 ADD A, # 10 JR C, LFEF7 ADD A, # 10 JR C, LFEDD ADD A, # 40 JR C, LFE99 ADD A, # 10 JR C, LFF20 INC A JR Z, LFF18 INC A JR Z, LFE61 INC A JR Z, LFE75 INC A JR NZ, LFE92 XOR A LD (LF9E8 +2), A JR LFE9F LFECB JR Z, LFEF1 ADD A, A LD HL, SMP_A LD C, A ADD HL, BC LD A, (HL) INC HL LD H, (HL) LD L, A LD (LF9B7 +1), HL JP LFE9F LFEDD LD HL, ORN_A ADD A, A LD C, A ADD HL, BC LD A, (HL) INC HL LD H, (HL) LD L, A LD (LF9BA +1), HL XOR A LD (LF9B4 +1), A JP LFE9F LFEF1 LD A, # FF LD (LF9AF +1), A RET LFEF7 RET Z CP # 0F JR Z, LFF11 LD (LFBD5 +1), A LD A, # 10 LD (LFA2D +1), A LD A, (DE) LD (LFBDA +1), A INC DE LD A, (DE) LD (LFBDA +2), A INC DE JP LFE9F LFF11 XOR A LD (LFA2D +1), A JP LFE9F LFF18 LD A, (DE) INC DE LD (LFBE0 +1), A JP LFE9F LFF20 ADD A, A ADD A, A ADD A, A ADD A, A LD HL, VOLTAB LD C, A ADD HL, BC LD (LFA28 +1), HL JP LFE9F LF82F LD HL, # 0000 LD A, (HL) ADD A, A JR LF841 LF836 LD (LF85D +1), SP LF83A LD HL, # 0000 LD A, (HL) ADD A, A JR C, LF82F LF841 ADD A, (HL) ADD A, A INC HL LD (LF83A +1), HL LD C, A LF848 LD HL, # 0000 ADD HL, BC LD SP, HL LF84D LD BC, # 0000 POP HL ADD HL, BC EX DE, HL POP HL ADD HL, BC LD (LFAE8 +1), HL POP HL ADD HL, BC LD (LFB01 +1), HL LF85D LD SP, # 0000 LD B, # 00 RET ;------------------------------------------------- ------------- INITVOL LD IX, VOLTAB LD DE, # 0000 LD B, # 10 INITV2 LD HL, 0 LD C, # 1910 INITV1 LD A, L RLA LD A, H ADC A, 0 INITV3 LD (IX +0), A ADD HL, DE INC IX DEC C JR NZ, INITV1 LD A, E CP 119 JR NZ, INITV4 INC E INITV4 EX DE, HL LD DE, 17 ADD HL, DE EX DE, HL DJNZ INITV2 RET ;------------------------------------------------- ------------- TABL2 TONE_TB DB # F8, # 0E, # 10 DB # 0E ,"`",# 0D DB # 80, # 0C, # D8 DB # 0B ,"(",# 0B DB # 88, # 0A, # F0 DB # 09 ,"`",# 09 DB # E0, # 08, "X" DB # 08, # E0, # 07 DB "|",# 07, # 08 DB # 07, # B0, # 06 DB "@",# 06, # EC DB # 05, # 94, # 05 DB "D", # 05, # F8 DB # 04, # B0, # 04 DB "p", # 04, "" DB # 04, # FD, # 03 DB # BE, # 03, # 84 DB # 03, "X", # 03 DB "", # 03, # F6 DB # 02, # CA, # 02 DB # A2, # 02, "|" DB # 02, "X", # 02 DB "8", # 02, # 16 DB # 02, # F8, # 01 DB # DF, # 01, # C2 DB # 01, # AC, # 01 DB # 90, # 01, "{" DB # 01, "e", # 01 DB "Q", # 01, ">" DB # 01 ,",",# 01 DB # 1C, # 01, # 0A DB # 01, # FC, # 00 DB # EF, # 00, # E1 DB # 00, # D6, # 00 DB # C8, # 00, # BD DB # 00, # B2, # 00 DB # A8, # 00, # 9F DB # 00, # 96, # 00 DB # 8E, # 00, # 85 DB # 00 ,"~",# 00 DB "w", # 00, "p" DB # 00, "k", # 00 DB "d", # 00, "^" DB # 00, "Y", # 00 DB "T", # 00, "O" DB # 00, "K", # 00 DB "G", # 00, "B" DB # 00 ,"?",# 00 DB ";",# 00, "8" DB # 00, "5" # 00 DB "2", # 00, "/" DB # 00 ,",",# 00 DB "*",# 00, "'" DB # 00 ,"%",# 00 DB "#",# 00, "!" DB # 00, # 1F, # 00 DB # 1D, # 00, # 1C DB # 00, # 1A, # 00 DB # 19, # 00, # 17 DB # 00, # 16, # 00 DB # 15, # 00, # 13 DB # 00, # 12, # 00 DB # 11, # 00, # 10 DB # 00, # 0F, # 00 ;------------------------------------------------- ------------- TABL1; Initializes PROCEDURE ; INITVOL VOLTAB DS # F0 TABL1_F DS # 10 ;------------------------------------------------- ------------- LF748 DB # 00; COUNTER A LF749 DB # 00; COUNTER B LF74A DB # 00; COUNTER C ;------------------------------------------------- ------------- LF74B DB # 00; TONE A LF74C DB # 00 LF74D DB # 00, # 00; TONE B LF74F DB # 00, # 00; TONE C LF751 DB # 00; NOISE LF752 DB # 00; MASKS LF753 DB # 00; AMPLITUDE A LF754 DB # 00; AMPLITUDE B LF755 DB # 00; AMPLITUDE C LF756 DB # 00; ENVELOPE TYPE LF757 DB # 00; ENVELOPE PERIOD LF758 DB # 00; ;------------------------------------------------- ------------- SMP_A DS # 40 ORN_A DS # 20 ;------------------------------------------------- -------------
Other articles:
Similar articles:
В этот день... 21 November