Well, months after I made these comments, and inspired by a recent discussion about custom music with Poorchop, I decided to research about the possibility of adding custom music to PoP for SNES.Shauing wrote: ↑April 19th, 2018, 5:34 am It would be great if there was some way (tool/hex editing/something) to implement the MIDI converted to MML file into the game.
If said tool doesn't exist or cannot be created to add music/sounds, and/or things cannot be added to a ROM, perhaps finding how the music is written in the hex format and attempt to write or replace it there?
I'm just trying to come up with possibilities.
After failing to find a way to implement it automatically, I decided to try HEX-Editing after remembering a reply from David:
After searching for similitudes between the ripped .SPC's and the ROM, I eventually found where each music is written and how (for the most part).David wrote: ↑April 15th, 2018, 12:18 pm From what I see, they have a tool to convert MIDI to MML (tinymm), some tool to edit MML, and a tool to put it into the game (Addmusic).
This MML format seems to be quite similar to the format of PoP1 SNES songs, for example @ is for instrument selection, CDEFGAB are the notes, R is for rests, etc.
MML even has syntax for repeating the same sequence a given number of times, which is also a feature of PoP's format.
Along with a music format text document shared by David, I did two attempts, one for each of the first two tracks of the game (Prologue and Menu). For the most part (again), I think I succeeded.
For the Prologue music (0:00-0:27), I only enabled audio channels 1 and 8.
Channel 8 retains the original samples and notes (drums/percussion and its 3/4 beat).
Channel 1 has the original brass sample but notes and their beat have been changed (4/4 beat); the music was slowed down for a more accurate input when writing the notes and timing.
As mentioned above, there is a syntax where sequences can repeat a number of times (I suppose for each individual channel); I imagine that there is also something that determines how many notes can be written for each sequence of each channel. These are the only things I haven't figured out where are they. I say this because, my melody seems to be longer than the original intended length of the first sequence, and as a result, it breaks down at around (0:10) when it changes to the second sequence (few notes loop and thus the beat becomes irregular, and the sound pans to the right side of the stereo image).
For comparison, on the Menu music (0:28-1:00), all audio channels are activated.
Except for channel 8 (percussion), all samples for each channel have been changed.
On Channel 4 (originally brass, now low strings sample), notes were lowered by one octave.
Channel 6 swaps trumpet and the ney(? -wind-like instrument -) of their original sections (the trumpet plays what the ney original played and vice versa).
Channel 8 it's the only channel with rewritten notes. In this case, it was written within the original length of the sequence, so it does not break down. The beat is much more simpler and pans across the stereo field.
I only need to know where are located these values/syntaxes for the length and number of repeats for each sequence of each channel, for each song; otherwise, it would be very restricting to write within the pre-written limits for each part that makes up a tune.
This can be a very tedious way to write custom music, but I feel that once you know and can play with each element, it becomes a less difficult task.