- Procyon Studio's Digital Studio Elements' SMD format by Neubre at 8:56 AM EST on January 28, 2011
- I am absolutely sick to death of this. I have exhausted Google trying to search for information on this format. A Japanese guy has apparently written a program called smd2mid, but I can't find it. Everyone seems to be complaining that more and more NDS games are using Procyon Studio's driver, but no one is doing anything about it.
So I have. I have begun work on the SMD format, specifically the version that was used in the second generation of the Pokemon Mystery Dungeon games. I've worked out all of the headers, but none of the actual music data yet. Sadly, that's the part that actually counts. D:
I think I'm going to need some help on this one. If anyone's interested, I'll post my findings.
- by Lunar at 5:32 PM EST on January 28, 2011
- *generic vote of confidence*
- by Neubre at 7:20 PM EST on January 30, 2011
- A4 (byte) - sets tempo in BPM
- by soneek at 12:48 PM EST on December 15, 2014
- Someone figured it out. I've tested it so far with Pokemon Mystery Dungeon: Explorers of Sky.
Next thing to figure out is the SWD format.
- by a574045075 at 4:26 PM EST on December 15, 2014
- by a574045075 at 10:52 PM EST on December 15, 2014
- I find a program. But I don't know how to use.
Somebody know how to use it?
- by AceK at 7:09 PM EDT on October 17, 2015
Progress for the Procyon Studio SMD/SWD format into sequence has improved thanks to psy_commando.
I tried to use ppmd_audioutil for both 999 (which didn't work out well) and then PMD2-Sky, and after a couple tries, it led me the midi sequence, and a somewhat working SF2 (or at least for PMD2 atm).
When using this...
ppmd_audioutil.exe -pmd2 "pmd2_extractedrom/data" "out_bgm"
...I get this log in CMD:
"(!)- Exception - DSESequenceToMidi::operator(): Couldn't open file Instrument\0_B_ENV_BEACH_01.mid for writing !"
To get around this, try removing the line "out_bgm"... you'll get midi's + a SF2 file just named ".sf2" so you could rename it if you like.
The issue with this is getting other games such as 999 to work. The midi sequences will come out fine for 999, but SF2 conversion is not right... possibly because I only used testing midis (one .smd and one .swd of the same song when it probably needs everything).
EDIT: Got it to work for 999. Had to make a duplicate of the .swd file and rename it as bgm.swd. BGMs such as M05_BGM_E_01 won't convert due to no support for PSG instruments.
It's mentioned in the thread above that the pitch for some samples are off (example for 999: M04_BGM_D_04 has a D4 pitch on Sample #24 that should be D5)... although it's probably a pitch modulation problem. Same goes for M14_BGM_E_08 for channel 7 and 8.
M17_BGM_E_11 Channel #1 along with M18_BGM_E_12 Channel #3/#4 (volume problems occurs also in M02_BGM_D_02 M20_BGM_D_06 M21_BGM_D_07 [Channel #9] M24_BGM_D_09 [Channel #8] and maybe more) possibly has a volume modulator issue, that's also mentioned as a problem from the forum above.
So far, I'm happy to see and hear about this, and am loving everything from it. Fantastic work!
edited 12:58 AM EDT October 18, 2015
- by psy_commando at 6:12 PM EST on December 7, 2015
- Hey !
@AceK: I wish you'd have mentioned that in my thread on project pokemon! XD The first issue was probably just me being dumb and not creating the output directory I was writing into.. You tend to get a bit lazy when you have your little quick and easy debugging setup ^^;
Also, you probably want to add -log "path/to/log.txt" at the commandline so its going to output a ton of verbose and info into that file.
What game is 999 by the way? I might want to take a look at it. I've been looking for more games using DSE to gather more data, and run more tests.
"BGMs such as M05_BGM_E_01 won't convert due to no support for PSG instruments."
Honestly, I'm not even sure that the sample format the program mention as PSG, is actually PSG sound.. The format codes used for each samples just matched the ones used in nitro composer's formats, and I assumed since most matched, that they're probably the same format codes. I had never encountered a game that used that format before with the DSE driver.
"possibly because I only used testing midis (one .smd and one .swd of the same song when it probably needs everything)."
The soundfont is built using the preset data stored the swd files that accompany each smd. So if you build a soundfont using a single swd, there's no preset data for all the preset that are used by the other smds and not by this one.
I just published an updated version that's way more flexible in its input parameters now, so it should work alright with most other games, as long as you got the smd and swd into their individual respective files, like in Shiren2 and PMD2.
Also, for those interested, I wrote a lot of documentation on the SWDL and SMDL format, and how the sound driver works.
PP wiki DSE hub page
I had to do a lot of debugging and disassembling to figure most of this stuff, and I still haven't figured out what all the event codes do. So maybe some of you guys may want to take a shot at some of those events code ? I left a bunch of offsets and details on how music is processed on the wiki, and I also have a crap ton of notes around here that I didn't get to write on the wiki yet. I got a text file filled with the disassembly for every event handler functions laying around too if someone wants it.
And I guess I might as well talk about the issues with converting DSE stuff into midis+sounfont:
So far, the biggest issue has been about volume and volume envelopes. DSE uses a AHDSR envelope with 2 extra parameters, one to set the initial attack volume, and another to fade-out the note while the key is still being held down. Also, the volume values for each phases of the envelopes are applied using a linear function. Both the SF2 format and DLS have only support for typical AHDSR envelopes, and they both use a logarithmic function to apply the volume envelope. That's been causing me a lot of headaches.. Things just don't sound correctly with logarithmic envelopes. Being stuck with using the SF2 release parameter makes a big difference on some tracks!
Then, another massive issue is that, a lot of preset uses the built-in "LFOs" to modulate things like pitch, pan, volume, and possibly cutoff. SF2 and DLS have 2 LFOs, but DSE has up to 4..
Not only that, but DSE has support for most common waveform shapes, "LFO" with rates much higher that 100Hz(thus why the term LFO is probably not all that accurate on Procyon's part), a depth parameter that's obviously not in cents, a delay and a fade-out on the effect. Those LFO effects have a pretty radical impact on how the samples sound like, but they can't be converted to either SF2 or DLS. And baking the LFO effect into the samples would most likely sound really weird unless I render a sample for each key, which would make the soundfont enormous..
Also, the DSE format uses keygroups to mitigate issues with note stealing, and giving the devs more control. But, the SF2 format has no such features. And DLS seems pretty limited in that department..
Finally, I had a couple of question for people knowing more about audio than me. I've noticed that some samples, mainly very short ones, such as the synthwave samples in PMD2, sound out of tune when played in a track, but seem to match the root key when testing the SF2 itself.. So I was wondering if simply looping audio data couple modify the pitch of a simple waveform sample? I'm keeping the sample rate the same and everything, but it still sounds off for some reasons.. And its not a pitch modulation LFO effect changing the pitch either, I verified..
I can't figure out how the volume is calculated for the whole thing.. It seems to be ok at the preset + split level, but beyond that, everything sounds too loud. The game code is no help, since it seems to do a lot of redundant bit-shifting, and uses a ton of temporary variables in memory which makes it all really hard to follow.. If I had a basic idea of how it works it might help a bit.
Also, how do you resample a sound while preserving the loop points ? I've been trying to use a resampling library, but I need to figure out how to shift the loop points.. The few things I tried resulted in audio artifacts.. I was thinking of making a DSE music player kind of thing, that would support all the DSE features properly, but without the audio know-how its proving to be a bit too much.. -_-
- by psy_commando at 5:35 PM EST on December 14, 2015
- So, I added support for smdl and swdl file wrapped together in a sir0 file. Aka the format used in zombie daisuki and 999. That's probably only going to work for a few chunsoft games though.
It'll be in the next release hopefully, once I fix some other issues. I'd like to know if there are other games using DSE that would need to be supported.
And I realized I didn't need to keep the loop points if I'd just resample the sample points as I'm looping the source sample.. So yeah, derp.
I talked with ipatrix from pokecommunity and apparently that the pitch issue could be tied to the samples not being looped correctly, or at least the loop points position being off and mangling the waveform. We'll see if I can come up with a way to fix this..
- by AceK at 10:36 PM EST on December 14, 2015
- Sadly I think I will be very little/no help for sequence tech since I never really looked into what flags specific frequencies and LFO's of sequences :(.
Testing 999: Nine Hours, Nine Persons, Nine Doors... m01_bgm_d_01_00000000: The smd/swd conversion has something weird with compatibility for tempo. Awave can identify tempo rate fine (unless it's default to 120 bpm) while other programs will not be able to identify and will leave it at the program's default BPM rate. This problem only seems to happen with this particular smd/swd, but the other bgms have working tempo for all applications just fine.
As for other things, m05_bgm_e_01_00000000 smd/swd (the one mentioned above with PSG not supported) now crashes the cmd line... or gives a vector error. Logging doesn't seem to work out for me for some reason, went ahead and typed the process (ignore ~~ naming headers/footers):
<*>- Found a matching SWDL file containing samples! Exporting a Soundfont along the MIDI!
<*>- Loading pair..
<*>- Exporting to MIDI + sounfont..
<*>- Currently exporting main bank to C:\VGM\2SF\Procyon\ppmd_audioutil_0.2_a\NDS_UNPACK\.sf2
<!>- Exception - vector<T> too long
#Total time elapsed: Time elapsed : 141ms
About to look into others bgms and see how it converted. Thanks for keeping us up to date, and thank you for the work and patience!
edited 10:38 PM EST December 14, 2015
HCS Forum Index
Go to Page 0 1 2 3 4 5 6
Search this thread
Show all threads
Reply to this thread:
Halley's Comet Software
Generated in 0.0039s;