Skeetendo

’Cause all games were better on the GBC

You are not logged in.

#151 2017-02-17 06:22:03

YORAMRW
Member
From: The Netherlands
Registered: 2013-03-29
Post 1,182/1,199
Website

Re: GSC Music Covers (with code)

Does anyone know if there's any way to embed waveforms in a PokeAsm song itself, specifically loaded by the respective song, so you can have more waveforms than the game originally offers?

I've done some experiments in Famitracker with speech synthesization via N163 (making it switching the waveform by each note and therefore making it produce vocal sounds as if someone is singing), and N163 seems to work pretty similar to the Gameboy channel 3 (both have 16-byte/32-dot waveforms).

If there would be a way to load song specific waveforms directly from the songs, that would be fabulous, because then we all could make pokecrystal "sing" :)

Last edited by YORAMRW (2017-02-17 06:23:02)


Hacks Gameboy 8-bit music in Pokémon Gen I & II, composes 8-bit music in FamiTracker

Offline

#152 2017-02-17 06:37:40

Mmmmmm
Member
From: West Virginia
Registered: 2015-05-17
Post 233/260

Re: GSC Music Covers (with code)

I have no clue about that. If you figure that out maybe we could finally make a worthy cover of the Village Bridge theme from Unova with that technology.

Offline

#153 2017-02-17 06:50:34

Rangi
Member
Registered: 2016-05-09
Post 539/831

Re: GSC Music Covers (with code)

Pokémon Prism has a second engine for replaying new Pokémon's cries, which uses WAV files downsampled into so-called DED files with dedenc.py and dedgen.py. But it can't play a file larger than one ROM bank, which is 16,384 bytes.

I've heard (with no supporting evidence, though) that some of Prism's more advanced internal features (the DED engine, variable-width text, Huffman-compressed text, the rainbow title screen, etc) were adapted from proof-of-concept assembly demos. Maybe search around for some GameBoy development resources—this looks like a good starting point—and see if anyone has a solution.

(I also recall someone claiming that a copy of the movie Shrek existed for the GameBoy Color, which would imply the ability to play back complex audio and video somehow. But maybe it was for the GameBoy Advance, or they were just mistaken.)

Edit: Via GameBoy Dev'rs: "Here's code for playing raw audio samples on the GB/GBC. First use MM_X's Wave Converter or similar to put .WAV files in a format suitable for playing on the GB." Might be helpful.

Last edited by Rangi (2017-02-17 06:55:30)


ROM hack: Pokémon Polished Crystal (GitHub) — version 2.2.0 released!

Offline

#154 2017-02-17 07:19:33

YORAMRW
Member
From: The Netherlands
Registered: 2013-03-29
Post 1,183/1,199
Website

Re: GSC Music Covers (with code)

Mmmmmm wrote:

I have no clue about that. If you figure that out maybe we could finally make a worthy cover of the Village Bridge theme from Unova with that technology.

That's a coincidence! I was exactly thinking about doing that (beside all the other awesome things we could achieve with more waves)

Rangi wrote:

Pokémon Prism has a second engine for replaying new Pokémon's cries, which uses WAV files downsampled into so-called DED files with dedenc.py and dedgen.py. But it can't play a file larger than one ROM bank, which is 16,384 bytes.

...

(I also recall someone claiming that a copy of the movie Shrek existed for the GameBoy Color, which would imply the ability to play back complex audio and video somehow. But maybe it was for the GameBoy Advance, or they were just mistaken.)

Edit: Via GameBoy Dev'rs: "Here's code for playing raw audio samples on the GB/GBC. First use MM_X's Wave Converter or similar to put .WAV files in a format suitable for playing on the GB." Might be helpful.

Sorry if I wasn't clear, but I'm more thinking of something that loads waveforms for PokeAsm songs directly from somewhere else in the song (almost like how patterns are loaded), instead of using the notetype command which can only load a very limited amount of waveforms from the existing table. Not necessarily a whole new system for PCM.

PS: I couldn't find evidence of a GBC port of the Shrek movie. I guess it's indeed GBA. This video might be it.


Hacks Gameboy 8-bit music in Pokémon Gen I & II, composes 8-bit music in FamiTracker

Offline

#155 2017-02-17 07:39:05

Rangi
Member
Registered: 2016-05-09
Post 540/831

Re: GSC Music Covers (with code)

YORAMRW wrote:

Sorry if I wasn't clear, but I'm more thinking of something that loads waveforms for PokeAsm songs directly from somewhere else in the song (almost like how patterns are loaded), instead of using the notetype command which can only load a very limited amount of waveforms from the existing table. Not necessarily a whole new system for PCM.

PS: I couldn't find evidence of a GBC port of the Shrek movie. I guess it's indeed GBA. This video might be it.

You might be able to create patterns for just the vowel sounds and approximate the Village Bridge theme that way. Early speech synthesizers were basically limited to vowels, but could produce recognizable words anyway because we fill in the gaps.


ROM hack: Pokémon Polished Crystal (GitHub) — version 2.2.0 released!

Offline

#156 2017-02-17 08:06:15

YORAMRW
Member
From: The Netherlands
Registered: 2013-03-29
Post 1,184/1,199
Website

Re: GSC Music Covers (with code)

Rangi wrote:
YORAMRW wrote:

Sorry if I wasn't clear, but I'm more thinking of something that loads waveforms for PokeAsm songs directly from somewhere else in the song (almost like how patterns are loaded), instead of using the notetype command which can only load a very limited amount of waveforms from the existing table. Not necessarily a whole new system for PCM.

You might be able to create patterns for just the vowel sounds and approximate the Village Bridge theme that way. Early speech synthesizers were basically limited to vowels, but could produce recognizable words anyway because we fill in the gaps.

Vowels! That's the word I sought.

I could just replace every default waveform with a waveform representing a vowel in a GSC rom, but the problem with that is that it will mess up all existing songs by making channel 3 sound like vowels in those existing songs, so unlike for testing purposes, I think it's not really an applicable method a professional ROM hack like Polished Crystal. I'm also afraid that, even by replacing every waveform with a vowel, the ROM still hasn't enough waveforms built to be replaced by so many vowel waves. That's why I'm basically seeking a method for the music engine to load waveforms from a song itself. It would offer an infnite amount of waveforms without replacing the existing ones.

What maybe could be an alternative way of achieving this is if we could repoint the wave table itself so we could extend it with many of our own waves. In that way we could just load them with notetype, so no need to painstakingly mess with the engine then.


Anyway, hereby I'm sharing the magic tool which I'm using for my N163 covers. (forgot to share it instanty when I started talking about this)
It should just work as fine for pokecrystal. Just test a waveform in Famitracker, and if it sounds good, type it in hex over an existing waveform in GSC. Since this post is getting very long, I'm considering to write a separate tutorial for succesfully making your RBY/GSC rom "sing" :)


Hacks Gameboy 8-bit music in Pokémon Gen I & II, composes 8-bit music in FamiTracker

Offline

#157 2017-02-17 11:06:29

FIQ
Member
Registered: 2016-09-17
Post 59/79

Re: GSC Music Covers (with code)

One thing worth mentioniong about the way Prism does later-gen cries (and if you would do vocals/etc), is that some emulators support it very poorly. VBA in particular, and also some more obscure ones like the 3DS VC.

Offline

#158 2017-02-17 20:19:56

YORAMRW
Member
From: The Netherlands
Registered: 2013-03-29
Post 1,185/1,199
Website

Re: GSC Music Covers (with code)

FIQ wrote:

One thing worth mentioniong about the way Prism does later-gen cries (and if you would do vocals/etc), is that some emulators support it very poorly. VBA in particular, and also some more obscure ones like the 3DS VC.

It's true that alot of Gameboy emulators support PCM very poorly. Take Cannon Fodder.gbc for example; sounds like utter crap on VBA. Althoug, part of this has also to do with squishing something like a song into a PCM sample usually makes it almost monotone, so you hear the voices that were supposed to sing but constantly in the same note, like in the Cannon Fodder intro. This, although, could be solved by also making channel 3 switch between notes (like the GSC engine does) accordingly to the melody from the original song.


What I meant, however, wasn't making pokecrystal play PCM, but just making it switch to a new waveform whenever a new note is played, simulating the vowels from the original song you're covering. That practice should be possible without having it sound crappy in the game, since it's just waveforms like GSC already uses. Of course this could be achieved by replacing all existing waveforms, but that isn't really feasible for a high-quality ROM hack, since it would sacrifice the existing waves suiting the original songs best.

Last edited by YORAMRW (2017-02-17 20:21:54)


Hacks Gameboy 8-bit music in Pokémon Gen I & II, composes 8-bit music in FamiTracker

Offline

#159 2017-02-17 20:48:13

Rangi
Member
Registered: 2016-05-09
Post 542/831

Re: GSC Music Covers (with code)

audio/engine.asm:WaveSamples defines 10 patterns, but the code supports up to 16, so you could add six more at the end. (Prism added five.) Although I don't see how the music files are selecting them.

Last edited by Rangi (2017-02-17 20:49:48)


ROM hack: Pokémon Polished Crystal (GitHub) — version 2.2.0 released!

Offline

#160 2017-02-17 21:44:20

YORAMRW
Member
From: The Netherlands
Registered: 2013-03-29
Post 1,186/1,199
Website

Re: GSC Music Covers (with code)

Rangi wrote:

audio/engine.asm:WaveSamples defines 10 patterns, but the code supports up to 16, so you could add six more at the end. (Prism added five.) Although I don't see how the music files are selecting them.

It's a nice thing that we can still add 6 of them. I guess we'll have enough with 6 free waveforms, especially given the fact that there are at least a few crappy waveforms that can be sacrificed, so we can probably have more than 9 "vowel" waves without necessarily affecting the game's existing music, and given the fact that a lot of vowels can definitely be recycled when, in the original song, a vowel from earlier in the song reappears but only slightly different.

About the way the game selects a waveform: It uses "notetype $Z, $XY" (or "DZ XY" in hex in the ROM), nybble Z detemining the speed (mostly set to $C), nybble X determining the volume (only 4 different volumes can be selected in channel 3 if I remember correctly), nybble Y determining the waveform that needs to be selected. As X can be 0-F in hex or 0-15 in
PokeAsm
(*in PokeAsm notetype is also in hex), this, of course, gives 16 options, and therefore explains why the engine can only have 16 waveforms.

Last edited by YORAMRW (2017-02-17 23:53:15)


Hacks Gameboy 8-bit music in Pokémon Gen I & II, composes 8-bit music in FamiTracker

Offline

#161 2017-02-17 22:37:57

Rangi
Member
Registered: 2016-05-09
Post 544/831

Re: GSC Music Covers (with code)

YORAMRW wrote:

It's a nice thing that we can still add 6 of them. I guess we'll have enough with 6 free waveforms, especially given the fact that there are at least a few crappy waveforms that can be sacrificed, so we can probably have more than 9 "vowel" waves without necessarily affecting the game's existing music, and given the fact that a lot of vowels can definitely be recycled when, in the original song, a vowel from earlier in the song reappears but only slightly different.

About the way the game selects a waveform: It uses "notetype X, Y" (or "DC XY" in hex in the ROM), nybble X determining the waveform that needs to be selected, nybble Y determining the volume (only 4 different volumes can be selected in channel 3 if I remember correctly). As X can be 0-F in hex or 0-15 in
PokeAsm, this, of course, gives 16 options, and therefore explains why the engine can only have 16 waveforms.

Thanks! Here's the relevant code from pokecrystal:

;;; macros/sound.asm

notetype: macro
    db notetype_cmd
    db \1 ; note_length
    if _NARG >= 2
    db \2 ; intensity
    endc
    endm

intensity: macro
    db intensity_cmd
    db \1 ; intensity
    endm

;;; audio/engine.asm

Music_NoteType: ; e8963
; note length
;    # frames per 16th note
; intensity: see Music_Intensity
; params: 2
    ; note length
    call GetMusicByte
    ld hl, Channel1NoteLength - Channel1
    add hl, bc
    ld [hl], a
    ld a, [CurChannel]
    and $3
    cp CHAN4 ; CHAN8 & $3
    ret z
    ; intensity
    call Music_Intensity
    ret

Music_Intensity: ; e8991
; intensity
; params: 1
;    hi: pressure
;    lo: velocity
    call GetMusicByte
    ld hl, Channel1Intensity - Channel1
    add hl, bc
    ld [hl], a
    ret

UpdateChannels: ; e8125
;   [...]
    push hl
    ld a, [wCurTrackIntensity]
    and $f ; only 0-9 are valid
    ld l, a
    ld h, 0
    ; hl << 4
    ; each wavepattern is $f bytes long
    ; so seeking is done in $10s
rept 4
    add hl, hl
endr
    ld de, WaveSamples
    add hl, de
    ; load wavepattern into rWave_0-rWave_f
;   [...]
    pop hl
    ld a, [wCurTrackIntensity]
    and $f0
    sla a
    ld [rNR32], a

What it looks like to me is that in the command "notetype $c, $a7", 7 is the waveform index (aka "velocity", the low nybble of the "intensity"). Interestingly, although it says "only 0-9 are valid" and indeed the WaveSamples table only contains 10 entries, some music uses indexes A-F.

azaleatown.asm:     notetype $c, $2f
credits.asm:        notetype $c, $2f
crystalopening.asm: notetype $c, $7c
lookyoungster.asm:  notetype $c, $2e
mainmenu.asm:       notetype $c, $f
mainmenu.asm:       notetype $c, $f
route3.asm:         notetype $c, $5e
suicunebattle.asm:  notetype $c, $4c
suicunebattle.asm:  notetype $c, $4c
titlescreen.asm:    notetype $c, $4b
sfx.asm:            notetype $8, $af

azaleatown.asm:         intensity $1f
burnedtower.asm:        intensity $3d
championbattle.asm:     intensity $3c
johtogymbattle.asm:     intensity $3c
johtogymbattle.asm:     intensity $3e
johtogymbattle.asm:     intensity $4b
johtogymbattle.asm:     intensity $4c
johtotrainerbattle.asm: intensity $1f
johtotrainerbattle.asm: intensity $3e
johtotrainerbattle.asm: intensity $3f
johtotrainerbattle.asm: intensity $4c
johtowildbattle.asm:    intensity $6f
kantogymbattle.asm:     intensity $4c
lookofficer.asm:        intensity $2f
lookyoungster.asm:      intensity $3e
newbarktown.asm:        intensity $5e
pallettown.asm:         intensity $1f
pallettown.asm:         intensity $2f
pallettown.asm:         intensity $3f
pallettown.asm:         intensity $5f
rivalbattle.asm:        intensity $2f
rivalbattle.asm:        intensity $4d
rivalbattle.asm:        intensity $4e
rivalbattle.asm:        intensity $6a
rivalbattle.asm:        intensity $9a
rocketbattle.asm:       intensity $3c
rocketbattle.asm:       intensity $3d
rocketbattle.asm:       intensity $3f
rocketbattle.asm:       intensity $4a
rocketbattle.asm:       intensity $4e
rocketbattle.asm:       intensity $4f
route1.asm:             intensity $1d
route12.asm:            intensity $6f
route12.asm:            intensity $7f
route3.asm:             intensity $6f
route3.asm:             intensity $7d
route3.asm:             intensity $8f
route30.asm:            intensity $3f
route30.asm:            intensity $4e
route36.asm:            intensity $5d
titlescreen.asm:        intensity $5d
sfx.asm:                intensity $2f
sfx.asm:                intensity $5f
sfx.asm:                intensity $bf

Plenty of music by Mmmmmm, Pum, and FroggestSpirit also uses indexes A-F. So, I guess the code after the WaveSamples table is just getting interpreted as waveform data? And it ends up sounding okay?

Last edited by Rangi (2017-02-17 22:39:40)


ROM hack: Pokémon Polished Crystal (GitHub) — version 2.2.0 released!

Offline

#162 2017-02-17 23:52:01

YORAMRW
Member
From: The Netherlands
Registered: 2013-03-29
Post 1,187/1,199
Website

Re: GSC Music Covers (with code)

I've updated some info on my previous post. It turned out to be slightly different than how I remembered it.

Last edited by YORAMRW (2017-02-18 06:04:48)


Hacks Gameboy 8-bit music in Pokémon Gen I & II, composes 8-bit music in FamiTracker

Offline

#163 2017-02-18 06:23:21

Rangi
Member
Registered: 2016-05-09
Post 548/831

Re: GSC Music Covers (with code)

Mmmmmm, YORAMRW, can either of you comment on how you choose the notetype/intensity values? And whether or not the values A-F are reading past the end of the WaveSamples table? (I mean, that's definitely what the code appears to be doing, but it's pretty weird. I wouldn't expect it to sound good.)


ROM hack: Pokémon Polished Crystal (GitHub) — version 2.2.0 released!

Offline

#164 2017-02-18 06:36:21

YORAMRW
Member
From: The Netherlands
Registered: 2013-03-29
Post 1,188/1,199
Website

Re: GSC Music Covers (with code)

Rangi wrote:

Mmmmmm, YORAMRW, can either of you comment on how you choose the notetype/intensity values? And whether or not the values A-F are reading past the end of the WaveSamples table? (I mean, that's definitely what the code appears to be doing, but it's pretty weird. I wouldn't expect it to sound good.)

Don't exactly get what you're talking about, but all the waveforms should be somewhere at the bottom of "engine.asm". When hacking wih a hex editor instead of the disasm, you could just simply use the search function and type the waveforms over from engine.asm in order find to edit them.

About the notetype part, as I already said earlier: From "notetype C, $XY", X determines the volume (1= full, 2=quieter, 3=pretty quiet), and Y determines the waveform. At least this is how it works for channel 3. You could check out the music documentations by Melash59, FroggestSpirit, among other people, for further information about this.

Last edited by YORAMRW (2017-02-18 07:43:39)


Hacks Gameboy 8-bit music in Pokémon Gen I & II, composes 8-bit music in FamiTracker

Offline

#165 2017-02-18 07:04:27

Rangi
Member
Registered: 2016-05-09
Post 549/831

Re: GSC Music Covers (with code)

YORAMRW wrote:

Don't exactly get what you're talking about, but all the waveforms should be somewhere at the bottom of "engine.asm". When hacking wih a hex editor instead of the disasm, you could just simply use the search function and type the waveforms over from engine.asm in order find to edit them.

About the notetype part, as I already said earlier: From "notetype C, $XY", X determines the volume (1= full, 2=quieter, 3=pretty quiet), and X determines the waveform. At least this is how it works for channel 3. You could check out the music documentations by Melash59, FroggestSpirit, among other people, for further information about this.

Think you meant "Y determines the waveform". Which agrees with my understanding of the audio engine code.

I'm talking about how the WaveSamples table in audio/engine.asm, the one that the notetype and intensity commands use, has only enough data for ten samples.

WaveSamples: ; e8db2
    ; these are streams of 32 4-bit values used as wavepatterns
    ; nothing interesting here!
    dn 0, 2, 4, 6, 8, 10, 12, 14, 15, 15, 15, 14, 14, 13, 13, 12, 12, 11, 10, 9, 8, 7, 6, 5, 4, 4, 3, 3, 2, 2, 1, 1
    dn 0, 2, 4, 6, 8, 10, 12, 14, 14, 15, 15, 15, 15, 14, 14, 14, 13, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 2, 1, 1
    dn 1, 3, 6, 9, 11, 13, 14, 14, 14, 14, 15, 15, 15, 15, 14, 13, 13, 14, 15, 15, 15, 15, 14, 14, 14, 14, 13, 11, 9, 6, 3, 1
    dn 0, 2, 4, 6, 8, 10, 12, 13, 14, 15, 15, 14, 13, 14, 15, 15, 14, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0
    dn 0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 12, 13, 14, 14, 15, 7, 7, 15, 14, 14, 13, 12, 10, 8, 7, 6, 5, 4, 3, 2, 1, 0
    dn 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 3, 3, 2, 2, 1, 1, 15, 15, 14, 14, 12, 12, 10, 10, 8, 8, 10, 10, 12, 12, 14, 14
    dn 0, 2, 4, 6, 8, 10, 12, 14, 12, 11, 10, 9, 8, 7, 6, 5, 15, 15, 15, 14, 14, 13, 13, 12, 4, 4, 3, 3, 2, 2, 1, 1
    dn 12, 0, 10, 9, 8, 7, 15, 5, 15, 15, 15, 14, 14, 13, 13, 12, 4, 4, 3, 3, 2, 2, 15, 1, 0, 2, 4, 6, 8, 10, 12, 14
    dn 4, 4, 3, 3, 2, 2, 1, 15, 0, 0, 4, 6, 8, 10, 12, 14, 15, 8, 15, 14, 14, 13, 13, 12, 12, 11, 10, 9, 8, 7, 6, 5
    dn 1, 1, 0, 0, 0, 0, 0, 8, 0, 0, 1, 3, 5, 7, 9, 10, 11, 4, 11, 10, 10, 9, 9, 8, 8, 7, 6, 5, 4, 3, 2, 1
; e8e52

How do you choose the waveform IDs when writing a song? Have you used IDs greater than 9? If so, as far as I can tell, you would be indexing beyond the table and interpreting whatever's past it (assembly code) as audio data. And yet, even Game Freak did so with some of their music.

Edit: Plots of the waveform envelopes

Last edited by Rangi (2017-02-18 08:28:12)


ROM hack: Pokémon Polished Crystal (GitHub) — version 2.2.0 released!

Offline

#166 2017-02-18 07:25:54

Mmmmmm
Member
From: West Virginia
Registered: 2015-05-17
Post 234/260

Re: GSC Music Covers (with code)

Rangi wrote:

Plenty of music by Mmmmmm, Pum, and FroggestSpirit also uses indexes A-F.

I think you're reading things incorrectly. Intensity works differently for the first two channels and the third channel, the first two channels use it only for volume.

Though, the base I use to build music has a wave table ripped from CrystalComplete, which adds extra waveforms from A-F. I think it's all waveforms from the TCG games and the Lavender Town/Tower waveform, but I never actually checked. In all the music I cover, though, I never use anything but waveforms 0-9 since I want my songs to work in vanilla Crystal (though I'd break this rule if I ever made a Gen 2-style Lavender Tower cover, since the waveform is part of what makes that song what it is). You could definitely port extra waveforms over like CrystalComplete has, though I'd imagine you'd have to rewrite a ton of shit if you wanted more than 0-F in waveforms, unless there's some special method of doing so like YORAMRW wants to find.

Offline

#167 2017-02-18 07:46:15

Rangi
Member
Registered: 2016-05-09
Post 550/831

Re: GSC Music Covers (with code)

Mmmmmm wrote:
Rangi wrote:

Plenty of music by Mmmmmm, Pum, and FroggestSpirit also uses indexes A-F.

I think you're reading things incorrectly. Intensity works differently for the first two channels and the third channel, the first two channels use it only for volume.

Though, the base I use to build music has a wave table ripped from CrystalComplete, which adds extra waveforms from A-F. I think it's all waveforms from the TCG games and the Lavender Town/Tower waveform, but I never actually checked. In all the music I cover, though, I never use anything but waveforms 0-9 since I want my songs to work in vanilla Crystal (though I'd break this rule if I ever made a Gen 2-style Lavender Tower cover, since the waveform is part of what makes that song what it is). You could definitely port extra waveforms over like CrystalComplete has, though I'd imagine you'd have to rewrite a ton of shit if you wanted more than 0-F in waveforms, unless there's some special method of doing so like YORAMRW wants to find.

You're right, the notetype and intensity commands that I thought were using invalid waveform IDs are not actually in channel 3. Thank you both for your help.

And that's good to know about CrystalComplete's extended table. I'll be using the Pokémon Tower music, so I'll need that.

Edit: CrystalComplete has an interesting method of extending the waveforms that might help you, YORAMRW. Lavender's music embeds waveform data in the song itself, and uses index F as a special marker to load the pattern from there instead of from the table. (They had to do that since TCG and TCG2 took up all the other unused slots.)

Edit 2: Ironically, it looks like RBY's audio engine really does interpret code as data for Lavender Town's instruments. (I'm not surprised by that, since this is the same game that just made three different copies of the audio engine in different banks.)

From audio/wave_instruments.asm:

dw .wave0
    dw .wave1
    dw .wave2
    dw .wave3
    dw .wave4
    dw .wave5 ; used in the Lavender Town and Pokemon Tower themes
    dw .wave5 ; unused
    dw .wave5 ; unused
    dw .wave5 ; unused

; these are the definitions for the channel 3 instruments
; each instrument definition is made up of 32 points (nibbles) that form
; the graph of the wave
; the current instrument is copied to $FF30
.wave0
    db $02,$46,$8A,$CE,$FF,$FE,$ED,$DC,$CB,$A9,$87,$65,$44,$33,$22,$11

.wave1
    db $02,$46,$8A,$CE,$EF,$FF,$FE,$EE,$DD,$CB,$A9,$87,$65,$43,$22,$11

.wave2
    db $13,$69,$BD,$EE,$EE,$FF,$FF,$ED,$DE,$FF,$FF,$EE,$EE,$DB,$96,$31

.wave3
    db $02,$46,$8A,$CD,$EF,$FE,$DE,$FF,$EE,$DC,$BA,$98,$76,$54,$32,$10

.wave4
    db $01,$23,$45,$67,$8A,$CD,$EE,$F7,$7F,$EE,$DC,$A8,$76,$54,$32,$10

; duty 5 reads from sfx data
.wave5

And audio.asm:

Audio1_WavePointers: INCLUDE "audio/wave_instruments.asm"

INCLUDE "audio/sfx/start_menu_1.asm"

[...]

Audio2_WavePointers: INCLUDE "audio/wave_instruments.asm"

INCLUDE "audio/sfx/press_ab_2.asm"

[...]

Audio3_WavePointers: INCLUDE "audio/wave_instruments.asm"

INCLUDE "audio/sfx/start_menu_3.asm"

So the beginnings of those three sfx files are getting used by wave5 as waveform data, even though they contain not lists of data values, but assembly code like this:

SFX_Start_Menu_1_Ch7:
    unknownnoise0x20 1, 226, 51
    unknownnoise0x20 8, 225, 34
    endchannel

Last edited by Rangi (2017-02-18 08:14:10)


ROM hack: Pokémon Polished Crystal (GitHub) — version 2.2.0 released!

Offline

#168 2017-02-18 08:12:04

YORAMRW
Member
From: The Netherlands
Registered: 2013-03-29
Post 1,189/1,199
Website

Re: GSC Music Covers (with code)

@Rangi: Yep, it was a typo. I indeed meant "Y determines the waveform, not X.

If you use higher values than 9 in an original GSC rom, my guess is that it will interpret the following sets of 16 bytes as waveforms, despite it being probably random ASM that has nothing to do with the music.

PS: Wow, where did you find that plotting program? It looks amazing!


@Mmmmmm & @Rangi: This night, I made my first GSC song that makes channel 3 sing and played it back on a GBC emulator. I used FroggestSpirit's CrystalComplete disasm (mostly because it has the visualised music player), and just overwrote the waveforms in that WaveSamples table with the "vowel" ones I made earlier for my Famitracker N106 version of the song. It's a "cover" (not really a cover yet, just a loop) of Wake Up by Jay Hardway, which is, I think, with its sliced vocals, a pretty useful example to show off this speech thing in practice in GSC. (Upload coming very soon)

Last edited by YORAMRW (2017-02-18 08:19:04)


Hacks Gameboy 8-bit music in Pokémon Gen I & II, composes 8-bit music in FamiTracker

Offline

#169 2017-02-18 08:19:54

Rangi
Member
Registered: 2016-05-09
Post 551/831

Re: GSC Music Covers (with code)

YORAMRW wrote:

@Rangi: Yep, it was a typo. I indeed meant "Y determines the waveform, not X.

If you use higher values than 9 in an original GSC rom, my guess is that it will interpret the following sets of 16 bytes as waveforms, despite it being probably random ASM that has nothing to do with the music.

PS: Wow, where did you find that plotting program?. It looks amazing!


@Mmmmmm & @Rangi: This night, I made my first GSC song that makes channel 3 sing and played it back on a GBC emulator. I used FroggestSpirit's CrystalComplete disasm (mostly because it has the visualised music player), and just overwrote the waveforms in that WaveSamples table with the "vowel" ones I made earlier for my Famitracker N106 version of the song. It's a cover of Wake Up by Jay Hardway, which is, I think, with its sliced vocals, a pretty useful example to show off this speech thing in practice in GSC. (Upload coming very soon)

That's just Excel 2013. :P

And yeah, I had figured out that it would interpret the subsequent asm as audio data. I was just confused because I thought Game Freak was actually doing that by using indexes A-F. (They really were doing that in RBY; see my edit above.)

Looking forward to hearing this! If you do a Village Bridge demix, I could definitely find a use for it. (Oh, people have sounded out the lyrics!)

Last edited by Rangi (2017-02-18 08:34:34)


ROM hack: Pokémon Polished Crystal (GitHub) — version 2.2.0 released!

Offline

#170 2017-02-18 08:36:36

YORAMRW
Member
From: The Netherlands
Registered: 2013-03-29
Post 1,190/1,199
Website

Re: GSC Music Covers (with code)

Rangi wrote:

And yeah, I had figured out that it would interpret the subsequent asm as audio data. I was just confused because I thought Game Freak really was doing that by using indexes A-F. (They really were doing that in RBY; see my edit above.)

Looking forward to hearing this! Will you be doing a Village Bridge demix? I could definitely find a use for it if so. (Oh, people have sounded out the lyrics!)

I'm pretty glad hearing that we can just simply embed our waveforms in the songs themselves rather than having to sacrifice the existing waveforms for that. ^^ I think gonna port the waveforms for the "Jay Hardway - Wake Up" devamp to the PokeAsm itself, then restoring back the WaveSamples table.

And I'm definitely thinking a lot about doing a Village Bridge cover, but Mmmmmm and FroggestSpirit are making a lot of devamps in a very short period of time and their devamps also sound pretty flawless, so I don't know if I might occupy songs they wanted to cover.

Last edited by YORAMRW (2017-02-18 08:37:57)


Hacks Gameboy 8-bit music in Pokémon Gen I & II, composes 8-bit music in FamiTracker

Offline

#171 2017-02-28 07:10:29

Rangi
Member
Registered: 2016-05-09
Post 556/831

Re: GSC Music Covers (with code)

Mmmmmm wrote:

I have stopped procrastinating.

Alola Wild Pokémon Battle:
http://pastebin.com/WSdP1J0x
https://soundcloud.com/mmmmmmmmmmmmmmmm … -gbc-8-bit

@Rangi (you didn't post here but I saw your Polished Crystal post): all four of those requested tracks look good to do, and Black City was actually something I've had on my separate backlog of "songs requested by people that aren't explicitly using it for a hack" for a while so it's a good excuse to get on it. I'm going to hold off on doing any of those until after I get your earlier covers and Kuroko Aizawa's three requests, though, so if there are any YORAMRW wants to do, feel free to snatch them off my hands, except Black City since as I said I've been planning on doing that for a while.

@SubstituteCreature: Prayer seems a bit too minimalistic to work in 8-bit, though Meeting and Parting and Tears After a Cloudy Weather seem like they could work. I've never thought about porting music from the anime but it doesn't seem that far out of my comfort zone. When I'm finished with my huge backlog of songs from the games' OSTs that's currently stacking up higher than I can put out, I may try those two, they could both work for a special, important cutscene in a hack.

Noticed that I haven't commented on this yet. I quite like it; you got the bass to work within Gen 2's limits. It's clearly the Alolan theme while also working as a GBC track. Thanks!

So, to review, these are the tracks I still could use in Polished Crystal, ordered roughly by priority:

• S/M Battle! Trainer (for Shamouti trainers)
• S/M Battle! Elite 4 (for the Elite 4)
• X/Y Santalune Forest (for Seafoam Islands)
• B/W Dragonspiral Tower (for haunted Lavender Radio Tower and/or Soul House basement)
• B/W Black City (for Silph Co. and/or Lavender Radio Tower post-haunting)
• X/Y Battle! Xerneas/Yveltal (for Celebi)
• B/W Battle! Elite Four (for Caitlin)
• S/M Malie City (Day) (for Shamouti Shrine) [ShantyTown is already working on this]

...That's pretty many. I don't mean to be demanding, and actually I'll be happy if 3.0 is finished before these requests, since it'll mean I got the remaining features done. Anyway, Mmmmmm and YORAMRW, if you'd like to divide up music for Polished Crystal, that's what's left.

(I mean, if either of you demix other Pokémon music, I'll probably try to incorporate it, if only as a Variety Channel radio track. Thanks a lot for your work up to now.)

Last edited by Rangi (2017-02-28 23:43:47)


ROM hack: Pokémon Polished Crystal (GitHub) — version 2.2.0 released!

Offline

#172 2017-02-28 12:08:46

Mmmmmm
Member
From: West Virginia
Registered: 2015-05-17
Post 235/260

Re: GSC Music Covers (with code)

Don't worry about having so many. After I do three of the remaining tracks, I'm going to do Pia Carrot's three requests since that's how many tracks from before their requests were made are left. I started the Alolan trainer theme but haven't worked on it due to being absolutely swamped with real life issues.

Also, it was Shantytown who claimed Malie City, not Frogg.

Offline

#173 2017-03-11 03:59:56

Mmmmmm
Member
From: West Virginia
Registered: 2015-05-17
Post 236/260

Re: GSC Music Covers (with code)

I really hope some time soon I'll be able to post multiple songs to this thread at once again instead of so much time passing between each that I can only do one at a time.

Battle! Alola Trainer:
http://pastebin.com/jFntMups
https://soundcloud.com/mmmmmmmmmmmmmmmm … -gbc-8-bit

Offline

#174 2017-03-11 08:07:15

Kuroko Aizawa
Member
Registered: 2011-12-01
Post 493/497

Re: GSC Music Covers (with code)

Mmmmmm wrote:

I really hope some time soon I'll be able to post multiple songs to this thread at once again instead of so much time passing between each that I can only do one at a time.

Battle! Alola Trainer:
http://pastebin.com/jFntMups
https://soundcloud.com/mmmmmmmmmmmmmmmm … -gbc-8-bit

Sounds really good! Can't wait to hear what you have planned for Sootopolis as well.

Offline

#175 2017-03-11 16:20:30

Rangi
Member
Registered: 2016-05-09
Post 565/831

Re: GSC Music Covers (with code)

Mmmmmm wrote:

I really hope some time soon I'll be able to post multiple songs to this thread at once again instead of so much time passing between each that I can only do one at a time.

Battle! Alola Trainer:
http://pastebin.com/jFntMups
https://soundcloud.com/mmmmmmmmmmmmmmmm … -gbc-8-bit

Great job! :) Thanks a lot.

So, the Alolan Elite 4 theme is the last Sun/Moon track I requested. Your queue lists the XY Legendary theme and then Slateport/Sootopolis/Meteor Falls; if possible, can you please prioritize Santalune Forest instead? I don't need the XY Legendary theme after all, I decided the three beasts' theme works better for Celebi. But then Kuroko's three tracks, I've taken up enough of your time with these Sun/Moon ones.


ROM hack: Pokémon Polished Crystal (GitHub) — version 2.2.0 released!

Offline

Board footer

Powered by FluxBB