Page 1 of 1

Any existing programs to convert sound to DAC?

Posted: Sat May 14, 2011 6:39 am
by CosmoBuggi
Hey, i have been wondering if there exist any programs out there to convert a WAV sound to DAC. At least that until the final TFM/TFM-like tracker with DAC and PSG support is released. I have been wanting to convert drums from other games not on Mega Drive or anything in general for not only the fun of doing so, but so i can be more exact with what i use when making music from other games in YM2612 style. If you know of anything or anything similar, please tell me. Thanks! :)

Posted: Sat May 14, 2011 7:25 am
by Chilly Willy
Just save as raw mono unsigned 8-bit samples at whatever frequency the PCM player uses (typical rates in the MD for PCM is 4kHz to 28kHz with lower frequencies more common than higher ones). I use Audacity in linux to make sounds for the MD.

Posted: Sat May 14, 2011 8:30 am
by CosmoBuggi
Alright, i'll try that, but if you don't mind me asking, how did you get to those kinds of things in Audacity?

Posted: Sat May 14, 2011 10:36 am
by KanedaFr
I use SoX (http://sox.sourceforge.net/)
Convert anything to anything in any frequency :D

Genres (private release) uses it for easy sound support

Posted: Sat May 14, 2011 10:40 am
by mic_
I don't know about Audacity, but in Goldwave (a free program for Windows) you can resample with Effects->Resample. And to save as 8-bit unsigned mono you just set the Attributes field to that in the "Save as" dialog.

Posted: Sat May 14, 2011 10:48 am
by CosmoBuggi
You're gonna have to enlighten me on how to use this. lol All i get when i click on it is just a quick DOS skim through and it disappears.

Posted: Sat May 14, 2011 6:32 pm
by Chilly Willy
In Audacity, you import any kind of audio except raw by selecting the menu File > Import > Audio...; it can handle wav, mp3, ogg, aiff, etc. To import raw, select File > Import > Raw Data... and set the parameters for the raw data (signed, or unsigned, bit width, channels, etc).

Once you've imported a sound, set the Project Rate in the lower left to the frequency you want to output, then select the menu item Tracks > Resample... to resample the sound to the Project Rate. Once you've done that, you select File > Export... and set the popup control under the list box to the type "Other uncompressed files". You can then click the Options... button to set the file format. Set the Header control to "RAW (header-less)", and the Encoding control to "Unsigned 8 bit PCM". Then click okay, don't bother with the tag dialog as you're saving raw and click okay again and the file should be saved as raw 8 bit unsigned samples.

Posted: Mon May 16, 2011 3:46 am
by CosmoBuggi
Do you have a different Audacity than me or something? Cause my import RAW is in the projects bar, and this project rate i don't think exists. At least not that i can tell. Importing a sound as 8-bit unsigned did do something, although it didn't sound anything like Genesis style DAC drums. That's what i was going for if anyone was curious.

Posted: Mon May 16, 2011 8:30 am
by Chilly Willy
CosmoBuggi wrote:Do you have a different Audacity than me or something? Cause my import RAW is in the projects bar, and this project rate i don't think exists. At least not that i can tell. Importing a sound as 8-bit unsigned did do something, although it didn't sound anything like Genesis style DAC drums. That's what i was going for if anyone was curious.
I'm using what's in the Ubuntu repository - 1.3.12. You IMPORT the sound based on whatever it's encoded as... import audio for mp3 or ogg. You EXPORT the sound to raw uncompressed data. For example, import an mp3 of a snare drum, then export as uncompressed unsigned 8 bit PCM to get the data to play on the MD DAC.

Posted: Fri May 27, 2011 3:24 am
by CosmoBuggi
Hm. Hate to bring up the topic again, i feel like i am being a burden, but i managed to port it in as 8-bit unsigned on Audacity and 1 channel mono, but when i do so(it seems to work better when porting from mp3 than wav, it comes out horribly on wav) it just comes out fuzzy sounding, doesn't really sound genesis-y, it doesn't have the grainy sound, just sound like a fuzzy version of the original file. What else should i do to get it to have that genesis sound?

Posted: Fri May 27, 2011 4:55 am
by Chilly Willy
"Fuzzy" often means you forgot the samples are unsigned. Signed samples stored to the DAC will sound fuzzy because they're inverted. If you ARE using unsigned samples, much sure your audio routine on the Genesis is not inverting the audio itself. If the playback routine thinks the samples are signed, it will convert them to unsigned before storing to the DAC; however, if the samples are already unsigned, the conversion makes them signed, which then doesn't sound right. Match the samples to what the playback routine expects to find.

Posted: Fri May 27, 2011 7:05 am
by CosmoBuggi
Oh, you're talking about actually putting them through some DAC player, doing all that before sending them through. I don't have any kind of program that actually converts sound files to DAC. Well if you can on Gens or something like that you'd have to tell me how to do that. :P Not so sure on that, i think you can place vgm files in to GENS, though, i'm not sure. :P

I only found of one way i can do something similar, and that's to change the mod file in Toy Story, although it ended up messed up when done that, which is odd as someone managed to do it properly, must have been something i missed.

Posted: Fri May 27, 2011 9:32 am
by TmEE co.(TM)
Convert the file to 8bit mono in Sound Recorder in Windows, strip off first 56 bytes and you got suitable stuff to send into the PCM channel of YM2612/3438

I'd keep the header and use it to know how much of the file needs to be played :P