Martin Yiu
September 21st, 2007, 11:43 AM
Okay, we can figure out how to split the single *s file to multiple ones by usin Green Charizard's music editing tutorial. But one thing, a little bit more advanced, is here staying without the coverage of either tutorial. How to make song loop, and then, how to change instruments by hex. I still didn't figure this out, so if there's someone capable of doing so and active enough to make a tutorial, I would ask you to make one to make life easier :P Thanks, anyways. And about your tutorial, you should specify more details to each step, tell something about theory, what the program exactly does and WHY IT'S ILLEGAL TO HAVE IT.
Teh Baro
September 28th, 2007, 06:44 AM
Kawa told me long ago how to loop. It was editing the *.s file by hand, adding some stuff. Anyway, when I tried to import it, somethign went wrong
-I'll look at the old chat logs for all this stuff
EDIT:
.byte GOTO
.word targetlabelorpointer
In notepad, open the .s files and write it, changing the targetlabelorpointer for a label you insert.
Example:
Iloled_3:
.byte KEYSH , Iloled_key+0
@ 000 ----------------------------------------
.byte VOICE , 0
.byte VOL , 104*Iloled_mvl/mxv
.byte PAN , c_v+0
.byte BEND , c_v+0
.byte W24
.byte N24 , An3 , v096
.byte W24
.byte N24
.byte W24
@ 001 ----------------------------------------
Iloled_3_001:
.byte N12 , An3 , v096
.byte W12
.byte N12
.byte W12
.byte N12
.byte W12
.byte N12
.byte W12
.byte N12
.byte W12
.byte N12
.byte W12
.byte N06
.byte W06
.byte N06
.byte W06
.byte N06
.byte W06
.byte N06
.byte W06
.byte PEND
@ 002 ----------------------------------------
.byte PATT
.word Iloled_3_001
@ 003 ----------------------------------------
.byte PATT
.word Iloled_3_001
@ 004 ----------------------------------------
.byte PATT
.word Iloled_3_001
@ 005 ----------------------------------------
.byte GOTO
.word Iloled_3_001
.byte FINE
When more stuff in the game is done (and I have more free time, I'll try to hack music again... I think I know what went wrong last time...
DracoMalfoy88
September 28th, 2007, 09:52 PM
.include "MPlayDef.s"
.equ sadbgm_grp, voicegroup000
.equ sadbgm_pri, 0
.equ sadbgm_rev, 0
.equ sadbgm_mvl, 127
.equ sadbgm_key, 0
.equ sadbgm_tbs, 1
.equ sadbgm_exg, 0
.equ sadbgm_cmp, 1
.section .rodata
.global sadbgm
.align 2
@**************** Track 1 (Midi-Chn.1) ****************@
sadbgm_1:
.byte VOL , 127*sadbgm_mvl/mxv
.byte KEYSH , sadbgm_key+0
@ 000 ----------------------------------------
.byte TEMPO , 88*sadbgm_tbs/2
.byte VOICE , 5
.byte PAN , c_v-1
.byte N08 , Cn3 , v092
.byte W12
.byte Fn3
.byte W12
.byte Gs3
.byte W12
@ 001 ----------------------------------------
.byte TEMPO , 88*sadbgm_tbs/2
.byte N96 , Fn2
.byte N12 , Cn3
.byte N24 , Gs3
.byte N24 , Cn4
.byte W12
.byte N48 , Cn3
.byte W12
.byte N12 , Fn3
.byte W12
.byte Gs3
.byte N12 , Cn4
.byte W12
.byte N24 , Gn3
.byte N24 , As3
.byte W12
.byte Cn3
.byte W12
.byte Fn3
.byte N24 , Gs3
.byte W12
.byte N12 , Cn3
.byte W11
.byte W01
@ 002 ----------------------------------------
.byte N24 , En2
.byte N24 , Gn2
.byte N24 , As2
.byte N24 , En3
.byte N24 , Gn3
.byte W24
.byte Gn2
.byte N24 , As2
.byte N72 , Cs3
.byte N72 , Gn3
.byte N72 , As3
.byte W72
@ 003 ----------------------------------------
.byte N24 , Cn2
.byte N24 , Cs3
.byte N24 , Gn3
.byte N24 , As3
.byte W12
.byte N12 , Cn1
.byte W12
.byte En1
.byte N12 , Cs3
.byte N12 , Gn3
.byte N12 , As3
.byte W11
.byte W01
.byte Gn1
.byte N24 , Cn3
.byte N24 , Fn3
.byte N24 , Gs3
.byte W12
.byte Cn2
.byte N24 , En2
.byte W12
.byte N12 , Cn3
.byte N12 , Fn3
.byte N12 , Gs3
.byte W12
.byte N24 , Cn2
.byte N24 , As2
.byte N24 , En3
.byte N24 , Gn3
.byte W23
.byte W01
@ 004 ----------------------------------------
.byte N12 , Fn1
.byte N24 , Gs2
.byte N24 , Cn3
.byte N24 , Fn3
.byte W12
.byte N12 , Gs1
.byte W12
.byte Cn2
.byte N72 , Cn3
.byte N72 , Fn3
.byte N72 , Gs3
.byte W12
.byte N12 , Fn2
.byte W56
.byte W03
.byte W01
@ 005 ----------------------------------------
.byte N12
.byte N24 , Gs2
.byte N24 , Cn3
.byte N24 , Fn3
.byte W12
.byte N12 , Fn1
.byte W12
.byte Gs1
.byte N12 , Gs2
.byte N12 , Cn3
.byte N12 , Fn3
.byte W12
.byte Fn2
.byte N24 , Cn3
.byte N24 , Fn3
.byte N24 , Gs3
.byte W12
.byte N12 , En2
.byte W12
.byte Fn1
.byte TIE , Cn3
.byte N12 , Fn3
.byte W12
.byte Ds2
.byte N12 , Gs3
.byte W12
.byte Fn1
.byte N12 , Cn4
.byte W11
.byte W01
@ 006 ----------------------------------------
.byte N24 , Fn1
.byte N24 , Gn1
.byte N24 , Cs2
.byte N24 , As3
.byte N24 , Ds4
.byte W23
.byte W01
.byte Fn1
.byte N24 , Cs2
.byte N24 , As3
.byte N24 , Cs4
.byte W36
.byte N12
.byte W12
.byte Cn4
.byte W12
.byte As3
.byte W12
.byte EOT , Cn3
@ 007 ----------------------------------------
.byte TEMPO , 81*sadbgm_tbs/2
.byte N24 , En2
.byte N24 , Gn2
.byte TIE , Cn3
.byte N24 , Cn4
.byte W24
.byte TEMPO , 69*sadbgm_tbs/2
.byte Fn2
.byte N24 , Gs2
.byte N24 , Cs3
.byte N24 , As3
.byte W24
.byte TEMPO , 54*sadbgm_tbs/2
.byte Fs2
.byte N24 , An2
.byte N24 , Dn3
.byte N24 , Gs3
.byte W24
.byte TEMPO , 48*sadbgm_tbs/2
.byte Gn2
.byte N24 , As2
.byte N24 , En3
.byte N24 , Gn3
.byte W23
.byte W01
@ 008 ----------------------------------------
.byte TEMPO , 77*sadbgm_tbs/2
.byte N12 , Fn2
.byte N96 , Ds3
.byte N96 , Gn3
.byte W12
.byte N12 , Fn1
.byte W12
.byte Gs1
.byte W12
.byte Cn2
.byte W12
.byte TEMPO , 70*sadbgm_tbs/2
.byte Fn2
.byte W12
.byte Gn2
.byte W12
.byte Gs2
.byte W12
.byte EOT , Cn3
.byte TIE
.byte W11
.byte W01
@ 009 ----------------------------------------
.byte TEMPO , 88*sadbgm_tbs/2
.byte N48 , Cs1
.byte N96 , Fn2
.byte N96 , Gs2
.byte N96 , Cs3
.byte W48
.byte N12 , Cs2
.byte W12
.byte N12
.byte W12
.byte Cn2
.byte W12
.byte As1
.byte W11
.byte W01
.byte EOT , Cn3
@ 010 ----------------------------------------
.byte TEMPO , 84*sadbgm_tbs/2
.byte N96 , Cn1
.byte N12 , Cn2
.byte N24 , Cn3
.byte W24
.byte TEMPO , 68*sadbgm_tbs/2
.byte N12 , Cs2
.byte N24 , As2
.byte W23
.byte W01
.byte TEMPO , 59*sadbgm_tbs/2
.byte N12 , Dn2
.byte N24 , Gs2
.byte W24
.byte TEMPO , 46*sadbgm_tbs/2
.byte N12 , En2
.byte N24 , Gn2
.byte W24
@ 011 ----------------------------------------
.byte FINE
@**************** Track 2 (Midi-Chn.2) ****************@
sadbgm_2:
.byte KEYSH , sadbgm_key+0
@ 000 ----------------------------------------
.byte VOICE , 68
.byte PAN , c_v-1
.byte W36
@ 001 ----------------------------------------
.byte VOL , 127*sadbgm_mvl/mxv
.byte W96
@ 002 ----------------------------------------
.byte W96
@ 003 ----------------------------------------
.byte W96
@ 004 ----------------------------------------
.byte W96
@ 005 ----------------------------------------
.byte N21 , Fn3 , v056
.byte W24
.byte N12
.byte W12
.byte N22 , Gs3
.byte W24
.byte N09 , Fn3
.byte W12
.byte Gs3
.byte W12
.byte Cn4
.byte W12
@ 006 ----------------------------------------
.byte N24 , Ds4
.byte W24
.byte N72 , Cs4
.byte W72
@ 007 ----------------------------------------
.byte N24 , Cn4
.byte W24
.byte As3
.byte W24
.byte Gs3
.byte W24
.byte Gn3
.byte W24
@ 008 ----------------------------------------
.byte N96
.byte W16
.byte VOL , 100*sadbgm_mvl/mxv
.byte W17
.byte 90*sadbgm_mvl/mxv
.byte W23
.byte 80*sadbgm_mvl/mxv
.byte W40
@ 009 ----------------------------------------
.byte N96 , Fn3 , v048
.byte W96
@ 010 ----------------------------------------
.byte W72
.byte FINE
@**************** Track 3 (Midi-Chn.3) ****************@
sadbgm_3:
.byte VOL , 127*sadbgm_mvl/mxv
.byte KEYSH , sadbgm_key+0
@ 000 ----------------------------------------
.byte VOICE , 49
.byte PAN , c_v+2
.byte W36
@ 001 ----------------------------------------
.byte N96 , Gs2 , v064
.byte N96 , Fn3
.byte W96
@ 002 ----------------------------------------
.byte TIE , Gn2
.byte N96 , En3
.byte W96
@ 003 ----------------------------------------
.byte Cn3
.byte W96
.byte EOT , Gn2
@ 004 ----------------------------------------
.byte N96 , Cn3
.byte TIE , Fn3
.byte W96
@ 005 ----------------------------------------
.byte W96
.byte EOT
@ 006 ----------------------------------------
.byte N96 , Gs3
.byte W96
@ 007 ----------------------------------------
.byte Cn3
.byte N96 , Gn3
.byte W96
@ 008 ----------------------------------------
.byte Cn3
.byte N96 , Gn3
.byte W48
.byte N48 , Ds4 , v092
.byte W48
@ 009 ----------------------------------------
.byte N96 , Cs3
.byte N96 , Fn3
.byte N48 , Cs4
.byte W60
.byte N12
.byte W12
.byte Cn4
.byte W12
.byte As3
.byte W12
@ 010 ----------------------------------------
.byte N96 , Cn3
.byte N22 , Cn4
.byte W24
.byte Cs4
.byte W24
.byte Dn4
.byte W24
.byte En4
.byte W24
@ 011 ----------------------------------------
.byte FINE
@**************** Track 4 (Midi-Chn.4) ****************@
sadbgm_4:
.byte KEYSH , sadbgm_key+0
@ 000 ----------------------------------------
.byte VOICE , 68
.byte PAN , c_v-19
.byte W36
@ 001 ----------------------------------------
.byte W12
.byte VOL , 127*sadbgm_mvl/mxv
.byte W84
@ 002 ----------------------------------------
.byte W96
@ 003 ----------------------------------------
.byte W96
@ 004 ----------------------------------------
.byte W96
@ 005 ----------------------------------------
.byte W12
.byte N21 , Fn3 , v028
.byte W24
.byte N12
.byte W12
.byte N22 , Gs3
.byte W24
.byte N09 , Fn3
.byte W12
.byte Gs3
.byte W12
@ 006 ----------------------------------------
.byte Cn4
.byte W12
.byte N24 , Ds4
.byte W24
.byte N72 , Cs4
.byte W60
@ 007 ----------------------------------------
.byte W12
.byte N24 , Cn4
.byte W24
.byte As3
.byte W24
.byte Gs3
.byte W24
.byte Gn3
.byte W12
@ 008 ----------------------------------------
.byte W12
.byte N96
.byte W16
.byte VOL , 100*sadbgm_mvl/mxv
.byte W17
.byte 90*sadbgm_mvl/mxv
.byte W23
.byte 80*sadbgm_mvl/mxv
.byte W28
@ 009 ----------------------------------------
.byte W12
.byte N96 , Fn3 , v024
.byte W84
@ 010 ----------------------------------------
.byte W72
.byte FINE
@**************** Track 5 (Midi-Chn.5) ****************@
sadbgm_5:
.byte KEYSH , sadbgm_key+0
@ 000 ----------------------------------------
.byte VOICE , 68
.byte PAN , c_v+63
.byte W36
@ 001 ----------------------------------------
.byte W24
.byte VOL , 127*sadbgm_mvl/mxv
.byte W72
@ 002 ----------------------------------------
.byte W96
@ 003 ----------------------------------------
.byte W96
@ 004 ----------------------------------------
.byte W96
@ 005 ----------------------------------------
.byte W24
.byte N21 , Fn3 , v012
.byte W24
.byte N12
.byte W12
.byte N22 , Gs3
.byte W24
.byte N09 , Fn3
.byte W12
@ 006 ----------------------------------------
.byte Gs3
.byte W12
.byte Cn4
.byte W12
.byte N24 , Ds4
.byte W24
.byte N72 , Cs4
.byte W48
@ 007 ----------------------------------------
.byte W24
.byte N24 , Cn4
.byte W24
.byte As3
.byte W24
.byte Gs3
.byte W24
@ 008 ----------------------------------------
.byte Gn3
.byte W24
.byte N96
.byte W16
.byte VOL , 100*sadbgm_mvl/mxv
.byte W17
.byte 90*sadbgm_mvl/mxv
.byte W23
.byte 80*sadbgm_mvl/mxv
.byte W16
@ 009 ----------------------------------------
.byte W24
.byte N96 , Fn3
.byte W72
@ 010 ----------------------------------------
.byte W72
.byte FINE
@************************************************* *****@
.align 2
sadbgm:
.byte 5 @ NumTrks
.byte 0 @ NumBlks
.byte sadbgm_pri @ Priority
.byte sadbgm_rev @ Reverb.
.word sadbgm_grp
.word sadbgm_1
.word sadbgm_2
.word sadbgm_3
.word sadbgm_4
.word sadbgm_5
.end
This is my .s file, what's wrong?