Hacking Hardware Homebrew Misc PS1/2 Documenting the PS2 CSL sequenced formats (SQ/BD/HD), and comparisons to PS1 generic sequenced formats (SEQ/VH/VB)

baku-chan

Member
OP
Newcomer
Joined
Nov 7, 2023
Messages
8
Trophies
0
Age
30
XP
28
Country
United States
Hello there! I’d like to inquire about certain elements of the PS2’s Component Sound Library, or CSL. Or specifically, about the three file formats that make up a single piece of music in CSL: SQ, BD, and HD. I actually posted this question earlier on the vgmtrans GitHub discussion page — as I figured that they’d have a lot of experience dealing with various sequenced music formats — but I wanted to expand my search for knowledge on this subject, so here I am! If you’re familiar with what I wrote on said page, expect a lot of the same stuff here, as most of it is copy-and-pasted from there!

Now, my biggest dream would be for someone to completely reverse-engineer these formats so that they can be freely used, and just for the sake of having them fully documented in the first place as they don’t really seem to be anywhere else. But I’m sure that would take a significant amount of work and research to pull off! As such, I would be content for at least some of the questions I have about these formats to be answered if such an endeavor isn’t feasible. But if you are willing to go that far, I certainly won’t stop you and I would greatly appreciate that, as well!

One thing that I’d like to share that I hope will contextualize what kind of answers would be helpful for me is that I’m working to make homebrew sequenced music a reality on the PS2, and by extension on the PS1 whose sound chip the former is directly backwards-compatible with on a hardware level. In order for this to be possible, I need as much information on each of the relevant file formats as possible so that arbitrary data can be written to them in such a way that something resembling music can be made.

Some questions that I would love to have answered in addition to anything else that you can give me include:

How close is PS2 SQ to PS1 SEQ, and in turn to SMF format 0 MIDI?
Based on what I’ve read from loveemu’s research on the matter in particular, the PS1 SEQ format is apparently very close to SMF format 0 MIDI, except with a few modifications. Given this, would it be accurate to say that the score data — that is, the actual key ons and key offs and such — is identical between PS1 SQ and SMF format 0 MIDI? This question is especially important to me because if it is identical, then this would greatly expedite our ability to reverse-engineer that part of the format and use that knowledge to write arbitrary score data and, in turn, create custom songs that can play on a PS2. Another thing that’s important in that context is how close PS1 SEQ is, in turn, to PS2 SQ, especially in regards to score data. Would it be accurate to say that they are very close to one another, if not possibly identical? And if they are indeed close or even identical, then how close would PS2 SQ be to SMF format 0 MIDI?

How close is PS2 HD to PS1 VH?
They seem to be somewhat different from each other based on a cursory comparison, but that could be about things being shuffled around from PS1 VH just as much as any actual meaningful changes being made from there. Given that SPU2 is essentially two PS1 SPUs attached together with little to no modification besides extra sound RAM, would it be accurate to say that settings for things like ADSR, portamento, pitch bend, and such work basically the same way with PS2 HD as they do with PS1 VH? And if they do, then how is the representation of such settings different on a hexadecimal level between the two?

How close is PS2 BD to PS1 VB?
From my understanding, PS1 VB is simply a collection of VAG files, and that the PS2 uses the exact same form of SPU-ADPCM that’s used on the PS1. Given that, would it be accurate to say that PS2 BD is also simply a collection of VAG files? And if so, is how they’re represented and organized exactly the same as it’s done with PS1 VB, or is it done differently? And is there any reliable way to tell exactly when a sample begins and ends?

How do tracks work, exactly?
On both PS1 SEQ and PS2 SQ, it appears that all of the tracks — in the MIDI sense of the word — are interleaved with one another, rather than being represented separately one after another like I’ve seen with other sequenced formats like Square’s AKAO and Konami’s KDT1. Given this, is there some sort of marker on, say, each key on and key off that determines which track is actually supposed to be keyed on or keyed off? Furthermore, is there some marker that determines which core (CORE0 or CORE1) a certain track is playing on? Also, is there a marker that determines the timing of a key on or key off of a track relative to the key on or key off of another track, given that tracks aren’t separated like they are in other sequenced formats?

How do you set reverb?
On the PS1, I understand that there’s a flag for each instrument in the VH file that determines whether reverb is applied to said instrument, while whether or not reverb is enabled on SPU itself is set by sending certain NRPN values as defined in the SEQ file. However, on PS2, there are two reverb units split between the two individual cores that make up SPU2, which complicates things somewhat compared to PS1. So with that said, how does one set the reverb on either one or both of the cores on PS2? Do you send certain NRPN values like with PS1, or is it done another way? Furthermore, in a scenario where, say, CORE0’s reverb is set to STUDIO_C and CORE1’s reverb is set to HALL, how do I determine which of the two reverb settings a certain instrument uses, or alternatively which core an instrument should play on?

How do attribute changes, loops, and markers work?
I understand that on PS1 SEQ, it’s possible to change attributes of an instrument on runtime by sending certain NRPN values, just like with reverb. I also understand that other NRPN values can be sent to determine loop points, as well as to set markers within the song. Do things work similarly with PS2 SQ, or is everything done another way instead?

What do program changes do, exactly?
Perhaps my relative ignorance of how MIDI works is showing here, haha, but this has confused me especially looking at how they appear to exist in PS2 SQ. There are dozens of numbers attached to these, but I have no idea what these numbers mean or what they actually do, if anything. My initial guess was that perhaps they had something to do with reverb, but I highly suspect not, in retrospect. Simply put, how do program changes work, and what do they do? Furthermore, do program changes work differently between PS1 SEQ and PS2 SQ, or for that matter between both of those and SMF format 0 MIDI?

What’s the numerical representation of silence in SPU-ADPCM?
My guess is that it would just be zero; is this correct? Otherwise, what is it? Could you reliably replace every value in an individual sample file with said silence value and have the result be, well, a completely silent sample file?

Whoever responds to these questions, thank you in advance! I truly appreciate it.
 
Last edited by baku-chan,

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
    K3Nv2 @ K3Nv2: Lol rappers still promoting crypto