You are not logged in.
Pages: 1
I need help with making a PokeAsm. I basically want the PokeAsm to start with a pattern, then playing a 2nd pattern, then playing the 1st pattern again, then playing a 3rd pattern, then again playing the 1st pattern, then playing a 4th pattern, then playing the 1st pattern once again, and then playing a 5th pattern.
Like this:
Pattern1
[NOTES/CMDs]
Pattern2
[NOTES/CMDs]
Pattern1
[NOTES/CMDs]
Pattern3
[NOTES/CMDs]
Pattern1
[NOTES/CMDs]
Pattern4
[NOTES/CMDs]
Pattern1
[NOTES/CMDs]
Pattern5
[NOTES/CMDs]
loopchannel 0, Pattern1
Making the PokeAsm in general goes very well, but whenever I try to make the PokeAsm reuse the 1st pattern further in the song, the PokeAsmPlayer.exe freezes when I drag the ASM into it.
I hope someone can help me out with this.
Hacks Gameboy 8-bit music in Pokémon Gen I & II, composes 8-bit music in LSDJ and FamiTracker.
“God created the Earth, but the Dutch created the Netherlands.”
Offline
.loop
callchannel .pattern1
callchannel .pattern2
callchannel .pattern1
callchannel .pattern3
callchannel .pattern1
callchannel .pattern4
callchannel .pattern1
callchannel .pattern5
loopchannel 0, .loop
.pattern1:
...
endchannel
.pattern2:
...
endchannel
; etc
As for the freeze, you can't define a label twice. If you take out the repeat labels it will work.
Last edited by comet (2016-06-01 16:49:31)
Offline
As for the freeze, you can't define a label twice. If you take out the repeat labels it will work.
So that means there is no way to re-use a pattern throughout the song? There should be.. The Game Corner music for instance did something exactly the same like you did in the example code, and it works just fine. But when I try the method of the Game Corner music/what you did in that code, it just only plays the first pattern and then stops playing that channel.
Hacks Gameboy 8-bit music in Pokémon Gen I & II, composes 8-bit music in LSDJ and FamiTracker.
“God created the Earth, but the Dutch created the Netherlands.”
Offline
So how can I make the song fully work while re-using pattern 1? I did the code for my song exactly like Comet did in the example, but the PokeAsm player only plays pattern 1 once and stops playing. :/
Hacks Gameboy 8-bit music in Pokémon Gen I & II, composes 8-bit music in LSDJ and FamiTracker.
“God created the Earth, but the Dutch created the Netherlands.”
Offline
sorry, typo in previous post
"loopchannel .loop" -> "loopchannel 0, .loop"
post exact code if you need debugging help
Offline
Well, here it is:
Music_SongExample:
dbw $80, Music_SongExample_Ch1
dbw $01, Music_SongExample_Ch2
dbw $02, Music_SongExample_Ch3
Music_SongExample_Ch1:
ftempo $50
volume $77
notetype $3, $A2
dutycycle 2
Music_SongExample_Ch1_loop:
loopchannel 0, Music_SongExample_Ch1_loop
Music_SongExample_Ch2:
ftempo $50
volume $77
Music_SongExample_Ch2_loop:
callchannel Music_SongExample_Ch2_Ptn1
callchannel Music_SongExample_Ch2_Ptn2
callchannel Music_SongExample_Ch2_Ptn1
callchannel Music_SongExample_Ch2_Ptn3
callchannel Music_SongExample_Ch2_Ptn1
callchannel Music_SongExample_Ch2_Ptn4
callchannel Music_SongExample_Ch2_Ptn1
callchannel Music_SongExample_Ch2_Ptn5
loopchannel 0, Music_SongExample_Ch2_loop
Music_SongExample_Ch2_Ptn1:
...
endchannel
Music_SongExample_Ch2_Ptn2:
...
endchannel
Music_SongExample_Ch2_Ptn3:
...
endchannel
Music_SongExample_Ch2_Ptn4:
...
endchannel
Music_SongExample_Ch2_Ptn5:
...
endchannel
Music_SongExample_Ch3:
notetype $3, $22
ftempo $50
Music_SongExample_Ch3_loop:
...
loopchannel 3, Music_SongExample_Ch3_loop
Music_SongExample_Ch3_variation:
...
...
...
...
...
loopchannel 0, Music_SongExample_Ch3_loop
Channel 1 is not (yet) in use, as you can see. Channel 3 works completely fine and just goes on after channel 2 stops playing, for your information.
(. . . equals one bar/measure)
Last edited by YORAMRW (2016-06-01 17:13:51)
Hacks Gameboy 8-bit music in Pokémon Gen I & II, composes 8-bit music in LSDJ and FamiTracker.
“God created the Earth, but the Dutch created the Netherlands.”
Offline
Anyone still gonna help me?
Hacks Gameboy 8-bit music in Pokémon Gen I & II, composes 8-bit music in LSDJ and FamiTracker.
“God created the Earth, but the Dutch created the Netherlands.”
Offline
What does pattern 1 actually contain? The code you posted looks correct. However, something in pattern 1 might be causing the problem.
My hacks: Pokémon Maize, Pokémon Red: Battle Factory
Offline
What does pattern 1 actually contain? The code you posted looks correct. However, something in pattern 1 might be causing the problem.
As far as I know there is nothing in pattern 1 or even in any other pattern causing the problem. Only notes and commands like vibrato and notetype are in them.
PS: As you might have noticed, I'm very hard with leaking out actual musical content of the song. That's because I don't want my work getting stolen. (By a certain person, whom we probably all know who I'm talking about) ;)
But believe me, it really doesn't matter for the debugging if I include the actual musical content or not.
Hacks Gameboy 8-bit music in Pokémon Gen I & II, composes 8-bit music in LSDJ and FamiTracker.
“God created the Earth, but the Dutch created the Netherlands.”
Offline
As far as I know there is nothing in pattern 1 or even in any other pattern causing the problem. Only notes and commands like vibrato and notetype are in them.
PS: As you might have noticed, I'm very hard with leaking out actual musical content of the song. That's because I don't want my work getting stolen. (By a certain person, whom we probably all know who I'm talking about) ;)
But believe me, it really doesn't matter for the debugging if I include the actual musical content or not.
Not sure I can help much more without seeing the rest of the code. The stuff you have above looks correct and is essentially the same organization as existing songs that work properly. Here's an example of me doing pretty much the exact same thing (except with channel 4): https://github.com/huderlem/pokestyle-m … e.asm#L507
My hacks: Pokémon Maize, Pokémon Red: Battle Factory
Offline
I've resolved the looping issue by myself. Sorry for ignoring your posts, it was already on Saturday when I resolved the issue, but I was very busy all the time and I wanted to playback the song in the real Pokémon Crystal ROM on an emulator instead of in the PokeAsm player, so I waited with revealing anything until I managed to compile the pokecrystal disassembly with my custom song.
Here is the actual result ;)
It's the drop of Dropgun's electro/bigroom track "Amsterdam", as based on my FamiTracker devamp of the entire song
The way to resolve the looping issue was basically to put the loopchannel command below the pattern last played by a channel instead of below the callchannel commands in the .loop pattern
So basically this:
.loop
callchannel .pattern1
callchannel .pattern2
callchannel .pattern1
callchannel .pattern3
callchannel .pattern1
callchannel .pattern4
callchannel .pattern1
callchannel .pattern5
.pattern1:
...
endchannel
.pattern2:
...
endchannel
.pattern3:
...
endchannel
.pattern4:
...
endchannel
.pattern5:
...
loopchannel 0, .loop
Instead of this:
.loop
callchannel .pattern1
callchannel .pattern2
callchannel .pattern1
callchannel .pattern3
callchannel .pattern1
callchannel .pattern4
callchannel .pattern1
callchannel .pattern5
loopchannel 0, .loop
.pattern1:
...
endchannel
.pattern2:
...
endchannel
.pattern3:
...
endchannel
.pattern4:
...
endchannel
.pattern5:
...
endchannel
Actually a very simple mistake, as you can see.
Now I suggest sticky'ing this thread, because I'm sure the solution to this issue will help a lot of people who want to write their own PokeAsm songs.
Last edited by YORAMRW (2016-06-08 17:51:26)
Hacks Gameboy 8-bit music in Pokémon Gen I & II, composes 8-bit music in LSDJ and FamiTracker.
“God created the Earth, but the Dutch created the Netherlands.”
Offline
Hmmm, that shouldn't be necessary (and isn't, in my experience). Perhaps loopchannel can't be directly preceded by a callchannel? The way that you settled on isn't ideal because now pattern5 isn't reusable. For example, what if you wanted to call pattern 5 more than once?
Anyway, glad you found a way to hack around it.
My hacks: Pokémon Maize, Pokémon Red: Battle Factory
Offline
Pattern 5 is indeed not reusable anymore because of the loopchannel command in it. I guess that can be simply fixed by replacing the loopchannel command in the pattern used before looping (pattern 5 in this case) with an endchannel command like in all other patterns, and then making a separate pattern with only the loopchannel command in it to be called at last below the other callchannel commands.
So like this:
.loop
callchannel .pattern1
callchannel .pattern2
callchannel .pattern1
callchannel .pattern3
callchannel .pattern1
callchannel .pattern4
callchannel .pattern1
callchannel .pattern5
callchannel .pattern6
.pattern1:
...
endchannel
.pattern2:
...
endchannel
.pattern3:
...
endchannel
.pattern4:
...
endchannel
.pattern5:
...
endchannel
.pattern6
loopchannel 0, .loop
Last edited by YORAMRW (2016-06-09 20:01:39)
Hacks Gameboy 8-bit music in Pokémon Gen I & II, composes 8-bit music in LSDJ and FamiTracker.
“God created the Earth, but the Dutch created the Netherlands.”
Offline
Pages: 1