Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - Exagone313

#1
Programming / Re: [Project] (B)RSTM web player
June 23, 2016, 09:13:15 PM
Ok I think I'm gonna give up with vgmstream and get back to brawllib/brawlbox. I need the decoding algorithms. If you can help me by sending me the file names (and the arguments the functions need), or I will check that in a few days. Thanks.
#2
Programming / Re: [Project] (B)RSTM web player
June 21, 2016, 08:11:27 PM
It's hard to read the vgmstream code, but I feel it contains everything. I am just not sure yet I will be able to play songs.
#3
Programming / Re: [Project] (B)RSTM web player
June 19, 2016, 11:14:34 PM
I decoded most of the HEAD part (by using the numbers displayed in BrawlBox), but I don't find if a song is looped or not (LoopStartSample can be zero for a looped song). Might have an idea but I'm not sure.
I don't understand the code of BrawlBox/BrawlLib so I can't use that, I would need your help for that.
I don't use any server, all is made in Javascript client-side. Normally it's possible, just have to get the algorithms. Web browsers can read 16-bit PCM and normally I can convert these 4-bit ADPCM into 16-bit PCM. I just don't know what to convert yet, and how channels are handled.

EDIT : Yeah, vgmstream really helps. I can read this code.
#4
Programming / Re: [Project] (B)RSTM web player
June 19, 2016, 05:05:48 PM
For now I'm just able to read the header, here is an example:

File Identifier: RSTM
Byte order: Big Endian
Version: 1.0
File size: 1286496
Header size: 64
Channels: 2
HEAD offset: 0x00 0x00 0x00 0x40 (64)
HEAD size: 256
ADPC offset: 0x00 0x00 0x01 0x40 (320)
ADPC size: 640
DATA offset: 0x00 0x00 0x03 0xc0 (960)
DATA size: 1285536
Other: 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00

I need to understand the three next blocks (HEAD, ADPC and DATA). The last two blocks are documented in one the link I provided above so I could get the sound. I have the algorithm that should (untested) permit to convert a sound into a playable format. I miss the HEAD part where I'll get the samples to cut the sound (?).
#5
Programming / [Project] (B)RSTM web player
June 19, 2016, 12:19:26 PM
Hi,

I'm creating a RSTM player in Javascript (web), I found two pages to decode the header (1 2), and I miss a specification for the HEAD, ADPC and DATA parts, I'm not sure of what they contain. I know HEAD contains the data I can see in BrawlBox. Apparently ADPCM, is a type of wav, so it should be playable in a browser using the Javascript Audio API, I tried to read the DATA part in my browser and it couldn't be recognized (EDIT: fail it was late, I didn't cut enough). I'm not familiarized with c-sharp so I can't read the BrawlLib source code (here).

My main project is to create a player for the Pokémon GSC musics (looped songs), and I'd prefer to load the .brstm files instead of having 2 audio files that have to be converted, because most of Pokémon songs are available in .brstm on Smash Custom Music. If I succeed, that website could also use this player (I will think to the proper open source license for that.)

I'm also wondering about the right of having such songs downloadable, I think it's a copyright violation, if you could tell me something about it I'd appreciate.

Thanks for your help.

EDIT: Apparently 4-bit IMA ADPCM is not supported in any browsers, have to look into on-the-fly conversion :(

EDIT 2: Found this (page 34) and this. Just need to know what do I have to convert.