Fallenleader
Residential Pixelated Squirrel
- 96
- Posts
- 16
- Years
- Age 33
- Tennessee
- Seen Oct 15, 2024
ever noticed that you cannot just slap a looping statement in a .pat file and it work?
well there is a way around this, and i will show you how.
when you convert a .s file you get something like this. i will hilight the important stuff.
see the pattern statement?
this is a auto loop as i call it.
this has nothing to do with the final looping pattern statements which must exist.
so here is the fix. see how it sats
.byte PATT
.word goldenrodexample_1_001?
well go to 001, copy all of that, and replace the .patt with it like this:
note i changed goldenrodexample_1_001: to goldenrodexample_1_005:. this is important so you
dont get confused later or get a looping error. now these .patt statements must be present when looping. These you create yourself:
You do this for all tracks.
well thats all for today. hope this helps!
well there is a way around this, and i will show you how.
when you convert a .s file you get something like this. i will hilight the important stuff.
Code:
.include "MPlayDef.s"
.equ goldenrodexample_grp, voicegroup000
.equ goldenrodexample_pri, 0
.equ goldenrodexample_rev, 0
.equ goldenrodexample_mvl, 127
.equ goldenrodexample_key, 0
.equ goldenrodexample_tbs, 1
.equ goldenrodexample_exg, 0
.equ goldenrodexample_cmp, 1
.section .rodata
.global goldenrodexample
.align 2
@**************** Track 1 (Midi-Chn.1) ****************@
goldenrodexample_1:
.byte KEYSH , goldenrodexample_key+0
@ 000 ----------------------------------------
.byte TEMPO , 100*goldenrodexample_tbs/2
.byte VOICE , 14
.byte PAN , c_v-32
.byte VOL , 64*goldenrodexample_mvl/mxv
.byte N24 , Fn4 , v104
.byte W24
.byte Cs4
.byte W24
.byte Ds4
.byte W24
.byte Cn4
.byte W24
@ 001 ----------------------------------------
[S-HIGHLIGHT]goldenrodexample_1_001:[/S-HIGHLIGHT]
.byte N12 , Cs4 , v104
.byte W12
.byte Cn4
.byte W12
.byte As3
.byte W12
.byte Cn4
.byte W12
.byte N36 , Gs3
.byte W36
.byte N06
.byte W06
.byte An3
.byte W06
.byte PEND
@ 002 ----------------------------------------
.byte N24 , As3
.byte W24
.byte Cs4
.byte W24
.byte N12 , As3
.byte W12
.byte As4
.byte W12
.byte Gs4
.byte W12
.byte Fs4
.byte W10
.byte VOICE , 60
.byte W02
@ 003 ----------------------------------------
.byte N12 , Fn4
.byte W12
.byte Fs4
.byte W12
.byte Gs4
.byte W12
.byte Fn4
.byte W12
.byte N36 , Ds4
.byte W48
@ 004 ----------------------------------------
goldenrodexample_1_004:
.byte N24 , Fn4 , v104
.byte W24
.byte Cs4
.byte W24
.byte Ds4
.byte W24
.byte Cn4
.byte W24
.byte PEND
@ 005 ----------------------------------------
[S-HIGHLIGHT].byte PATT
.word goldenrodexample_1_001[/S-HIGHLIGHT]
@ 006 ----------------------------------------
this is a auto loop as i call it.
this has nothing to do with the final looping pattern statements which must exist.
so here is the fix. see how it sats
.byte PATT
.word goldenrodexample_1_001?
well go to 001, copy all of that, and replace the .patt with it like this:
Code:
.include "MPlayDef.s"
.equ goldenrodexample_grp, voicegroup000
.equ goldenrodexample_pri, 0
.equ goldenrodexample_rev, 0
.equ goldenrodexample_mvl, 127
.equ goldenrodexample_key, 0
.equ goldenrodexample_tbs, 1
.equ goldenrodexample_exg, 0
.equ goldenrodexample_cmp, 1
.section .rodata
.global goldenrodexample
.align 2
@**************** Track 1 (Midi-Chn.1) ****************@
goldenrodexample_1:
.byte KEYSH , goldenrodexample_key+0
@ 000 ----------------------------------------
.byte TEMPO , 100*goldenrodexample_tbs/2
.byte VOICE , 14
.byte PAN , c_v-32
.byte VOL , 64*goldenrodexample_mvl/mxv
.byte N24 , Fn4 , v104
.byte W24
.byte Cs4
.byte W24
.byte Ds4
.byte W24
.byte Cn4
.byte W24
@ 001 ----------------------------------------
goldenrodexample_1_001:
.byte N12 , Cs4 , v104
.byte W12
.byte Cn4
.byte W12
.byte As3
.byte W12
.byte Cn4
.byte W12
.byte N36 , Gs3
.byte W36
.byte N06
.byte W06
.byte An3
.byte W06
.byte PEND
@ 002 ----------------------------------------
.byte N24 , As3
.byte W24
.byte Cs4
.byte W24
.byte N12 , As3
.byte W12
.byte As4
.byte W12
.byte Gs4
.byte W12
.byte Fs4
.byte W10
.byte VOICE , 60
.byte W02
@ 003 ----------------------------------------
.byte N12 , Fn4
.byte W12
.byte Fs4
.byte W12
.byte Gs4
.byte W12
.byte Fn4
.byte W12
.byte N36 , Ds4
.byte W48
@ 004 ----------------------------------------
goldenrodexample_1_004:
.byte N24 , Fn4 , v104
.byte W24
.byte Cs4
.byte W24
.byte Ds4
.byte W24
.byte Cn4
.byte W24
.byte PEND
@ 005 ----------------------------------------
goldenrodexample_1_005:
.byte N12 , Cs4 , v104
.byte W12
.byte Cn4
.byte W12
.byte As3
.byte W12
.byte Cn4
.byte W12
.byte N36 , Gs3
.byte W36
.byte N06
.byte W06
.byte An3
.byte W06
.byte PEND
@ 006 ----------------------------------------
dont get confused later or get a looping error. now these .patt statements must be present when looping. These you create yourself:
Code:
.include "MPlayDef.s"
.equ goldenrod_grp, voicegroup000
.equ goldenrod_pri, 0
.equ goldenrod_rev, 0
.equ goldenrod_mvl, 127
.equ goldenrod_key, 0
.equ goldenrod_tbs, 1
.equ goldenrod_exg, 0
.equ goldenrod_cmp, 1
.section .rodata
.global goldenrod
.align 2
@**************** Track 1 (Midi-Chn.1) ****************@
goldenrod_1:
.byte KEYSH , goldenrod_key+0
@ 000 ----------------------------------------
.byte TEMPO , 100*goldenrod_tbs/2
.byte VOICE , 60
.byte PAN , c_v-32
.byte VOL , 64*goldenrod_mvl/mxv
.byte N24 , Fn4 , v104
.byte W24
.byte Cs4
.byte W24
.byte Ds4
.byte W24
.byte Cn4
.byte W24
@ 001 ----------------------------------------
.byte N12 , Cs4 , v104
.byte W12
.byte Cn4
.byte W12
.byte As3
.byte W12
.byte Cn4
.byte W12
.byte N36 , Gs3
.byte W36
.byte N06
.byte W06
.byte An3
.byte W06
@ 002 ----------------------------------------
.byte N24 , As3
.byte W24
.byte Cs4
.byte W24
.byte N12 , As3
.byte W12
.byte As4
.byte W12
.byte Gs4
.byte W12
.byte Fs4
.byte W12
@ 003 ----------------------------------------
.byte N12 , Fn4
.byte W12
.byte Fs4
.byte W12
.byte Gs4
.byte W12
.byte Fn4
.byte W12
.byte N36 , Ds4
.byte W48
@ 004 ----------------------------------------
.byte N24 , Fn4 , v104
.byte W24
.byte Cs4
.byte W24
.byte Ds4
.byte W24
.byte Cn4
.byte W24
@ 005 ----------------------------------------
goldenrod_1_loop:
goldenrod_1_005:
.byte N12 , Cs4 , v104
.byte W12
.byte Cn4
.byte W12
.byte As3
.byte W12
.byte Cn4
.byte W12
.byte N36 , Gs3
.byte W36
.byte N06
.byte W06
.byte An3
.byte W06
.byte PEND
@ 006 ----------------------------------------
goldenrod_1_006:
.byte N24 , As3 , v104
.byte W24
.byte Cs4
.byte W24
.byte N12 , As3
.byte W12
.byte As4
.byte W12
.byte Gs4
.byte W12
.byte Fs4
.byte W12
.byte PEND
@ 007 ----------------------------------------
goldenrod_1_007:
.byte Gs4
.byte W12
.byte As4
.byte W12
.byte Cn5
.byte W12
.byte Cs5
.byte W12
.byte N36 , Ds5
.byte W48
.byte PEND
@ 008 ----------------------------------------
goldenrod_1_008:
.byte N36 , Cs5 , v104
.byte W36
.byte Fn5
.byte W36
.byte N24 , Cs5
.byte W24
.byte PEND
@ 009 ----------------------------------------
goldenrod_1_009:
.byte N36 , Cn5 , v104
.byte W36
.byte Ds5
.byte W36
.byte N12 , Cn5
.byte W12
.byte N06 , Gs4
.byte W06
.byte An4
.byte W06
.byte PEND
@ 010 ----------------------------------------
goldenrod_1_010:
.byte N36 , As4 , v104
.byte W36
.byte Cs5
.byte W36
.byte N24 , As4
.byte W24
.byte PEND
@ 011 ----------------------------------------
goldenrod_1_011:
.byte Cn5
.byte W24
.byte N12 , Ds5
.byte W12
.byte Gs4
.byte W12
.byte As4
.byte W12
.byte Bn4
.byte W12
.byte N24 , Cn5
.byte W24
.byte PEND
@ 012 ----------------------------------------
goldenrod_1_012:
.byte N36 , Cs5 , v104
.byte W36
.byte Fn5
.byte W36
.byte N24 , Cs5
.byte W24
.byte PEND
@ 013 ----------------------------------------
goldenrod_1_013:
.byte N36 , Cn5 , v104
.byte W36
.byte Ds5
.byte W36
.byte N12 , Cn5
.byte W12
.byte N06 , Gs4
.byte W06
.byte An4
.byte W06
.byte PEND
@ 014 ----------------------------------------
goldenrod_1_014:
.byte N36 , As4 , v104
.byte W36
.byte Cs5
.byte W36
.byte N24 , As4
.byte W24
.byte PEND
@ 015 ----------------------------------------
goldenrod_1_015:
.byte N24 , Cn5 , v104
.byte W24
.byte N12 , Ds5
.byte W12
.byte Fn5
.byte W12
.byte Ds5
.byte W12
.byte Cs5
.byte W12
.byte Cn5
.byte W12
.byte Gs4
.byte W12
.byte PEND
@ 016 ----------------------------------------
goldenrod_1_016:
.byte N24 , Fn4 , v104
.byte W24
.byte Cs4
.byte W24
.byte Ds4
.byte W24
.byte Cn4
.byte W24
.byte PEND
@ 017 ----------------------------------------
.byte PATT
.word goldenrod_1_005
@ 018 ----------------------------------------
.byte PATT
.word goldenrod_1_006
@ 019 ----------------------------------------
.byte PATT
.word goldenrod_1_007
@ 020 ----------------------------------------
.byte PATT
.word goldenrod_1_008
@ 021 ----------------------------------------
.byte PATT
.word goldenrod_1_009
@ 022 ----------------------------------------
.byte PATT
.word goldenrod_1_010
@ 023 ----------------------------------------
.byte PATT
.word goldenrod_1_011
@ 024 ----------------------------------------
.byte PATT
.word goldenrod_1_012
@ 025 ----------------------------------------
.byte PATT
.word goldenrod_1_013
@ 026 ----------------------------------------
.byte PATT
.word goldenrod_1_024
@ 027 ----------------------------------------
.byte PATT
.word goldenrod_1_025
@ 028 ----------------------------------------
.byte PATT
.word goldenrod_1_026
@ 029 ----------------------------------------
.byte N12 , Cs4 , v104
.byte W12
.byte Cn4
.byte W12
.byte As3
.byte W12
.byte Cn4
.byte W12
.byte N36 , Gs3
.byte W36
.byte N06
.byte W06
.byte An3
.byte W06
.byte GOTO
.word goldenrod_1_loop
.byte W06
@ 030 ----------------------------------------
.byte FINE
well thats all for today. hope this helps!
Last edited by a moderator: