Any existing programs to convert sound to DAC?

Talk about development tools here

Moderator: BigEvilCorporation

Post Reply
CosmoBuggi
Interested
Posts: 30
Joined: Fri May 01, 2009 1:35 am
Location: Anderson, Indiana

Any existing programs to convert sound to DAC?

Post by CosmoBuggi » Sat May 14, 2011 6:39 am

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! :)

Chilly Willy
Very interested
Posts: 2984
Joined: Fri Aug 17, 2007 9:33 pm

Post by Chilly Willy » Sat May 14, 2011 7:25 am

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.

CosmoBuggi
Interested
Posts: 30
Joined: Fri May 01, 2009 1:35 am
Location: Anderson, Indiana

Post by CosmoBuggi » Sat May 14, 2011 8:30 am

Alright, i'll try that, but if you don't mind me asking, how did you get to those kinds of things in Audacity?

KanedaFr
Administrateur
Posts: 1139
Joined: Tue Aug 29, 2006 10:56 am
Contact:

Post by KanedaFr » Sat May 14, 2011 10:36 am

I use SoX (http://sox.sourceforge.net/)
Convert anything to anything in any frequency :D

Genres (private release) uses it for easy sound support

mic_
Very interested
Posts: 265
Joined: Tue Aug 12, 2008 12:26 pm
Location: Sweden
Contact:

Post by mic_ » Sat May 14, 2011 10:40 am

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.

CosmoBuggi
Interested
Posts: 30
Joined: Fri May 01, 2009 1:35 am
Location: Anderson, Indiana

Post by CosmoBuggi » Sat May 14, 2011 10:48 am

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.

Chilly Willy
Very interested
Posts: 2984
Joined: Fri Aug 17, 2007 9:33 pm

Post by Chilly Willy » Sat May 14, 2011 6:32 pm

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.

CosmoBuggi
Interested
Posts: 30
Joined: Fri May 01, 2009 1:35 am
Location: Anderson, Indiana

Post by CosmoBuggi » Mon May 16, 2011 3:46 am

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.

Chilly Willy
Very interested
Posts: 2984
Joined: Fri Aug 17, 2007 9:33 pm

Post by Chilly Willy » Mon May 16, 2011 8:30 am

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.

CosmoBuggi
Interested
Posts: 30
Joined: Fri May 01, 2009 1:35 am
Location: Anderson, Indiana

Post by CosmoBuggi » Fri May 27, 2011 3:24 am

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?

Chilly Willy
Very interested
Posts: 2984
Joined: Fri Aug 17, 2007 9:33 pm

Post by Chilly Willy » Fri May 27, 2011 4:55 am

"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.

CosmoBuggi
Interested
Posts: 30
Joined: Fri May 01, 2009 1:35 am
Location: Anderson, Indiana

Post by CosmoBuggi » Fri May 27, 2011 7:05 am

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.

TmEE co.(TM)
Very interested
Posts: 2440
Joined: Tue Dec 05, 2006 1:37 pm
Location: Estonia, Rapla City
Contact:

Post by TmEE co.(TM) » Fri May 27, 2011 9:32 am

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
Mida sa loed ? Nagunii aru ei saa ;)
http://www.tmeeco.eu
Files of all broken links and images of mine are found here : http://www.tmeeco.eu/FileDen

Post Reply