Jump to content

psy_commando

Innovator
  • Posts

    425
  • Joined

  • Last visited

  • Days Won

    1

Posts posted by psy_commando

  1. On 6/15/2020 at 6:11 PM, waffleoRai said:

    The oscillators are partially implemented for playback, but not for SF2 export. I think the volume and pan oscillators are working (need to properly test) for playback. For pitch and LPF(?) the oscillator value calculation works for all wave shapes, but the interpolator can't handle extremely rapid pitch changes at the moment (I intend to debug this at some point because it's kind of a big problem, think it has to do with the counter resetting), so the code that loads the pitch oscillators into a playback sample is currently commented out. LPF oscillators aren't implemented beyond the general oscillator value calculation, and that's also because I did something wrong writing my LPF classes causing them to output silence.

    Now I think I might be able to encode the oscillators in SF2 as modulators, but the only reason I haven't thus far is laziness. There's also a weird bug with pan scaling and the envelopes are a rough estimate for now. Other than that, seems to work alright. I'm able to open the resulting files in Polyphone and play them back nicely. Just needs a bit of tweaking to sound as accurate as possible. I definitely intend to fix/add these things, just haven't done so yet.

    The explorer GUI tool is here. I don't really consider it polished enough to officially "release" quite yet (especially since my last few changes broke it), but I like using GitHub to bounce my code between computers cleanly so eh. It's all Java since Java is my crutch language and I keep going "eh, it'll just be a quick little applet, don't need to pull out the C...". I believe the JAR in /jar/ was built before I broke the type detection system, so if you wanted to check out a vastly inferior version of all the existing DS ROM explorers, that should do the trick 😆. It does detect and play back SMD/SWD though (if not still a bit roughly), so that's something!

    Noooow unfortunately, the SF2 export buttons on the GUI seem to be outputting air for some reason. The issue isn't obvious so  might take me a few to figure out why it's not writing anything. Some link is probably broken in the callback chain.

    However, the conversion and writing methods themselves absolutely work! At least, last I checked!
    THESE are in my game formats library -- class is waffeoRai_soundbank.procyon.SWD
    The little main test in the same package (SMDTest) has an example of how to do it since I export to SF2 as a means of debugging soundbanks, but here's basically all you would need to do to call it directly:

    String swd_waves_path = "mydir/bgm.swd"; //The file containing the wave data
    String swd_art_path = "mydir/bgm0025.swd"; //The file containing articulation data, here I just picked Apple Woods
    String sf2_path = "mydir/bgm0025.sf2";

    //Open a FileBuffer. This is my file wrapper class that handles multi-byte fields.
    //The second arg is byte order as a bool (false is LE)
    FileBuffer filedata = FileBuffer.createBuffer(swd_waves_path, false); 
    SWD swd_war = SWD.readSWD(filedata, 0); //Second arg is offset from file start to begin reading

    filedata = FileBuffer.createBuffer(swd_art_path, false); //Open the articulation data file
    SWD swd_art = SWD.readSWD(filedata, 0); //Parse as SWD

    swd_art.loadSoundDataFrom(swd_war); //Load the sound data from the sound SWD to the articulation SWD
    swd.writeSF2(sf2_path);

    Probably with a try/catch to get those I/O and parsing exceptions.
    And of course since this is all open source, feel free to look at SWD.java and be like "noooo, that's not good".
    If yall are interested in using this as a converter, I wouldn't mind prioritizing debugging and cleaning up the SWD stuff. I can also just JAR up a dedicated SWD/SWD->SF2 command line tool.

    For sure, SF2 lacks some flexibility that would be nice to have... I mostly only use it as the "default soundbank conversion target" because it's usually recognized by a lot of programs? Only thing I could get to import into my version of Kontakt.

    (Attached most recent output of bgm0025.sf2)

    bgm0025.sf2 280.45 kB · 3 downloads

    Thanks for the links!

    One thing I noticed when exporting to sf2 is that they lacked range for a lot of parameters in the official specs. DSE just seems to have unlimited pitch bending and oscilator rate XD So there's the issue that some programs might play things better than others, and its a real headache XD I also looked into the sfz format and it looked a bit better, but its still not very well supported. At that point, maybe a VST synth for DSE games might be one of the better solutions.

     

  2. On 6/10/2020 at 6:48 PM, pupco1 said:

    Hey im having problems using pmdaudiotuli in that... i dont know how to use it. how do i use it?

    Well, most of it is explained in the readme, but you need to extract the rom, and pass the path to the extracted rom in parameters to the utility. There are a couple of exemple commands in the readme that you can pretty much just copy-paste and replace the missing bit with the right paths and stuff.

  3. On 5/5/2020 at 11:54 PM, waffleoRai said:

    EDIT:

    Got it. Sort of.
    Seems to be a low level value telling the player how to tune it to the root note relative to the stored sample rate. For a high level smd player, this value can be completely ignored as the weird sample rates of the values account for the fine tuning already.
    I did try mapping it as one byte coarse tune and one byte fine tune relative to the sample rates and it doesn't quite add up, so wondering if it's a 16-bit LE value meant to be loaded into a voice control register or used directly by the driver? I soooo don't know, I'm just throwing stuff out there. Anyway, that's that. Just thought I'd note that here in case anyone else happens to have the same issue.

    Hey! Its all good. This is really what this thread is for XD

    I'll admit, I'm about as clueless as you are about the sample pitch.. I know that some samples get tuned a bit from the oscillator effects, and without emulating that thing it won't sound right. But it also seems like some samples with just the fine pitch are just kinda off a bit still.. SF2 has been a pain in the butt to work with though, so I assumed it might have been part of the issue.. But glad to hear someone else noticed that as well..

    Its possible its used for the voice yeah. What makes it tricky to trace down is that most of what goes into the driver is converted to an "analog" value almost immediatly..

    Btw, are you planning to release that tool? It sounds pretty interesting! And any plans to emulate the oscillator processing stuff?

  4. I'm really amazed how you guys are managing to do something with gfxcrunch! Its pretty awful to work with ^^; Which is why I began working on that editor, which ironically isn't doing much better right now XD

    Also, about croagunk's shop, there's some loose files that contains swap lists. I think its in SYNTH/synth.bin. Its something I didn't really invest too much time into, but, its most likely doable to change those. Otherwise, if its just a table in the binaries, its fairly easy to write a wrapper to load the table from a custom sir0 file. I did that with the level list a while ago to allow adding custom maps to the game without having to mod the binaries.

     

  5. On 11/19/2018 at 12:33 PM, mr ki said:

    Is there a way that the ability_data could also be extracted along with move_data and pokemon_data? I want to be able to edit an ability that was unused, which is Multitype.

    Abilities are just code. You'd have to edit the asm to do it.

     

    On 12/28/2018 at 2:37 PM, Dakavendish said:

    I've been following the imgur tutorial to try to extract the rom files, but it doesn't appear to be working. I've checked the log, which yields me the following text in the log:

    The files are located in a file on my desktop but I'm not sure if that's where they need to be. When I follow the directions in the tutorial, command prompt only opens for a split second before automatically closing, so I'm not sure if that has something to do with it?

    There might be some special characters or space in the path to your desktop.

  6. On 7/19/2018 at 2:11 PM, Luma said:

    Is it possible to edit tileset colors, pokemon that appear in a dungeon and their levels, starter pokemon, and the amount of floors in a dungeon?

    Not yet. But we do know how most of it works. We still need to write tools to do it. Tilesets are still tricky.

     

    7 hours ago, Ppvip said:

    hello i would like to know how its possible to convert an SWD file to WAV or any audio file in any possible way , cheers

    Well, you can rip the individual samples inside a SWD file to wavs using my tool.

    • Like 1
  7. Well, I think fl studio's midi import was meant more for importing stuff from your typical music notation software that doesn't do anything very fancy with the midis. Roland's GS is an extension on General midi, same with Yamaha's XG, that tried to add missing features to it, but they're their own standards afaik.

    But, yeah, lots of things done via sysex messages aren't GM standard. Although GS, or at least some parts of it like some of their extra instruments, kinda became more or less commonly supported outside the standard from what I know/can see. So its really a huge headache to deal with midi compatibility XD

  8. @xusu

    I had been planning to release a version of the program that exports one soundfont per track to help with this kind of things. One per track mainly because samples are tuned differently for every single tracks. I never really got around to it, since the whole thing is a broken mess really.

    Don't use -gm. It won't work well with pmd2 since the tracks have several percussive tracks, and some just don't. GM expects track 10 to be drums always, GS doesn't. The game also never uses more than 16 tracks, so don't worry about it, the default mode will always have 16 tracks max. I think your problem with the chromatic/percussive tracks not switching modes properly comes from how the FL studio sequencer doesn't seems to handle importing/converting sysex midi messages. My tool puts in each midi file some sysex messages to tell the synth to run in GS mode, and set some tracks to chromatic/percussion tracks. A bunch of older synths, like windows' default built-in synth don't support that. So you'll probably have to change those things manually when you import it in FL studio since its midi import is far from perfect.

    Also, I suggest you dump the raw pmd2 samples using this line :

    "EoSRomRoot/data/SOUND/BGM/bgm.swd" "out_pmd2samples" -hexnum

    And then export the list of sample used for each presets for each tracks:

    -swdlpath "EoSRomRoot/data/SOUND/BGM/" "out_pmd2samples.txt" -listpres -hexnum

    Then if you compare the cv_info file and the out_pmd2samples.txt files for each tracks you'll see what samples each track/instrument presets uses, and can listen to each individual samples exported from the soundfont. That's how I did to figure out what samples are what. It really helps a ton, since the game's soundtrack messes with the samples a lot with effects and etc.

    For instance, in treasure town, if you listen to the samples you said are bagpipes, they don't sounds at all like bagpipes. The composer just layered several notes to sound like a bagpipe. But in other tracks, those very same samples are used for something that sounds closer to what sounds more like an English horn or something close to it, maybe a bassoon or some "non-standard" variation that sounds like that. The actual bagpipe samples are used in bgm134 and 137 for example.

    Also, some of the instrument samples used in the game are instruments not in general midi or gs. Some percussion(like that Indian percussion in track#29), and etc.. So I put what was closest.

     

    About your earlier questions:

    1. About the cv_info file, to change the midi instrument used for a given in-game instrument/preset just set the number in-between the MIDIPreset tags to the preset number you want. Like:

    <MIDIPreset>81</MIDIPreset>

    You don't need to touch the DSE preset. The tags are explained at the top of the cv_info file too.

    2. That's because of FL studio's Fruity LSD does not support GS sysex messages, or basically any sysex message afaik. Better use something more compatible like foobar2000 or the bassmidi driver, or anything based on fluidsynth to play the midi with a GS compatible soundfont and you'll notice the drum/chromatic tracks are fine.

    • Like 1
  9. Its fine, the whole point of this thread is to be bumped every once in a while! XD

    I'm not really sure what you're trying to do? The xml file is for remapping PMD2's instruments to GM/GS when doing a midi only export. It has no effect when exporting the tracks along with their soundbank.

    And when you say the wrong instrument is set, what do you mean? In the midi-only rips or the soundfont, or in the midi files that accompany the soundfont?

    Adding the -gm option on the command line just tries to make it so old GM only software has a better shot at playing it back by swapping any existing drum channel with the right one. By default the files are all exported for a GS compatible midi driver. GS allows things like disabling the drum channel as needed and etc.. The way DSE works is similar to GS and not GM. Which means some tracks just won't work when exporting as GM since they use the drum channel as a melodic channel.

  10. I'm not sure what you mean?

    The sprites for each pokemon are stored inside "m_ground.bin", "m_attack.bin", and "monster.bin", under the data//MONSTER directory.

    Each of those 3 files contains one of the 3 parts of each pokemon's animations/sprite. All pokemons have an entry in all 3 files.

    m_ground contains the sprites on the overworld/ground mode. m_attack the attack and dungeon animations for the pokemons. And monster the enemy sprites, which are just stripped down versions of the m_attack sprites to save memory on enemy pokemons.

     

     

  11. 5 hours ago, FabOulus1 said:

    There's just a problem with me:

    Where do you get Kaomado.kao files? And other types of files? I REALLY want to know, thanks...

    Well they're in the rom. You have to extract the rom, then look under data/FONT/kaomado.kao. You can use the batch scripts for doing that automatically too. Then you have to rebuild the rom with the modifications. Think of a ".nds" file as a zip file really. Except you need something else than winzip/7zip to extract/rebuild them.

     

    5 hours ago, XModxGodX said:

    Yeah I figured as much. I mean it sounds fairly easy on paper but in execution I'd imagine it being a little more than changing a few lines of code. not to mention the already mapped commands to some of those combinations, the Linked moves would probably throw a wrench into the plan, the fact that you'd pretty much have to make custom hotkeys, the potential possibility that using a higher number move than you have might crash the game or something, and if you want it to look decent you'd have to change the UI to show the moves combinations when you hold L or something. (like the 3DS games)

    Hopefully it will happen someday though in some sort of quality of life hack or something... (maybe fix the sleeping animation for evolved player characters as well or something)

    Well, its mainly about finding the UI API functions in the code, then hooking in your modified code. Its not that hard, but it takes time and patience. Especially if you're doing it by hand instead of using something like Radare2 or IDA.

    And yeah, I plan to release a bunch of QoL asm hacks eventually. I got some done already on my github mainly to load map lists from file and etc.. In order to make modding easier. I'll probably dive back into that eventually, once I can fix my utilities and get to the big map editor I'm planning.

    You could already fix the sleeping animations though. You'd need to basically copy in the missing sleep anims it looks for from the dungeon sprites into the ground mode sprites for the specified pokemons, and it would work.

×
×
  • Create New...