DefleMask Forum

A friend and I, zeromus, got together and made a little program + bat file that will rip PC-Engine DMW wavetable files from any standard WAV file. It's not a plugin, but a standalone program that uses SoX (free, tiny, command line based). Just install right into your Deflemask/wavetables folder, and then all you do is drag and drop a WAV file onto the BAT file. It will ask you what sample rate you want to resample to (you'll need to calculate this beforehand), and then spit out 5-bit PC-Engine wavetables in DMW format. It also creates a TXT file with each wavetable's decimal values logged to a separate line. Here is the link on GitHub:

https://github.com/zeromus/chipifier/tree/master/bin/Release

Here is a link to SoX, if you don't already have it (required by Chipifier app):

This looks super interesting! Though, I could use a bit of assistance with some of the directions.When I enter a WAV file into the program, where does it show up, and how do I know if it worked properly?

This looks super interesting! Though, I could use a bit of assistance with some of the directions.When I enter a WAV file into the program, where does it show up, and how do I know if it worked properly?

Oh! I suppose I should probably expand the Readme.txt a bit... after you drag and drop the WAV file onto the BAT, enter the new sample rate you want, and press enter, you should see the BAT file scroll some stuff and self-close. After it's finished there should be one or more files named Filename.wav.CHIPIFIED.XX.DMW in the same folder. There will also be a text file named Filename.wav.CHIPIFIED.txt that contains the decimal string values for all the DMW files the program just made. It also puts a new WAV file in the folder named Filename.wav.CHIPIFIED.wav, that is the processed, non-normalized WAV file.

Basically, if it spits out one or more DMW files, the TXT file and a WAV file, it should have worked properly lol... i usually just browse through the DMWs it made in Deflemask to see how they look afterwards.

As for how to get the new sample rate you need, you need to first find out how many samples are in the duty cycle of the WAV you're feeding Chipifier. I just go into my WAV editor of choice, zoom waaaay in, and select the exact duty cycle (one single waveform loop) and see how many samples are in it. Once I have that, it's rippin' time! :)

Let's say the duty cycle uses, mmm, 279 samples. And let's also say the WAV file we're trying to rip it from is 44100Hz. We need to crunch that 279 sample loop down to 32 samples (what the PC-Engine uses). So we would use some math...

((32 / 279) x 44100) = 5058 Hz <-- This is the NEW sample rate you need to input to Chipifier in order to get perfect wavetable rips from source material.

I've also found you can even create ultra-shitty sounding "PSG samples" up to half a second long or so, by resampling to 1920hz and loading the DMW files it makes, one after the other, every 1/60th. Deflemask only allows 32 wavetables, max, though. Plus, 1920hz sounds pretty bad. Especially on the first revision PCE sound hardware.

This is just an idea, but would it also be a good idea to be able to save/edit wavetables within an instrument, this would make importing other made instrument that uses multiple wavetables a bit easier I guess?

I think it would be hard to implement, like if there already are wavetables loaded in and making them unique and updating that in the instrument.

Oh! I suppose I should probably expand the Readme.txt a bit... after you drag and drop the WAV file onto the BAT, enter the new sample rate you want, and press enter, you should see the BAT file scroll some stuff and self-close. After it's finished there should be one or more files named Filename.wav.CHIPIFIED.XX.DMW in the same folder. There will also be a text file named Filename.wav.CHIPIFIED.txt that contains the decimal string values for all the DMW files the program just made. It also puts a new WAV file in the folder named Filename.wav.CHIPIFIED.wav, that is the processed, non-normalized WAV file.

I tired to use it, but I wouldn't get anything out of the program. I have SoX installed in bin/Release along with the main components of the program, and everything else that came with the download is in my DefleMask wavetables folder. I don't know what I'm missing for it to not be working.

Oh! I suppose I should probably expand the Readme.txt a bit... after you drag and drop the WAV file onto the BAT, enter the new sample rate you want, and press enter, you should see the BAT file scroll some stuff and self-close. After it's finished there should be one or more files named Filename.wav.CHIPIFIED.XX.DMW in the same folder. There will also be a text file named Filename.wav.CHIPIFIED.txt that contains the decimal string values for all the DMW files the program just made. It also puts a new WAV file in the folder named Filename.wav.CHIPIFIED.wav, that is the processed, non-normalized WAV file.

I tired to use it, but I wouldn't get anything out of the program. I have SoX installed in bin/Release along with the main components of the program, and everything else that came with the download is in my DefleMask wavetables folder. I don't know what I'm missing for it to not be working.

Hmm does it give you any kind of error message? Maybe try doing shift-right click on the folder, then do Open Command Prompt Here, then manually typing chipifiy.bat "filename.wav". it'll leave the command prompt window open after it finishes, so you can see any errors/problems it had.

I forgot to mention, this is for Windows... at least that's what I'm running. Win10. Ugh.

I think I will expand the MAX_WAVES from 32 to 128. The issue will be the wave macro (the lines in it will be super tiny)

That will be aweome! You can always just enter the decimal values manually in the instrument macro, instead of trying to draw it. Maybe the wavetable values under the instrument wave macro should be in hex format to match how they're listed in the wavetable popup? 00-1F, etc.

I think I will expand the MAX_WAVES from 32 to 128. The issue will be the wave macro (the lines in it will be super tiny)

Excellent, thanks! ;D

Now, if you're looking at code for the Wave Macro, could you please think about adding the Wave-to-Noise switch in there at the same time ... perhaps as value 127 or 128?

So that a Wave Macro value of 127 (or 128) would act as a Noise On (effect $1101) and a Wave Macro value of less than that would act as a Noise Off (effect $1100), and also change the current wavetable.

Being able to control the switching between Wave and Noise with a 1/60th tick precision is really going to improve the quality of people's PSG drums.

The MML player that's built into the PCE's CD System Card already supports doing that, and so do all of the other old sound drivers that I seen.

I think I will expand the MAX_WAVES from 32 to 128. The issue will be the wave macro (the lines in it will be super tiny)

Excellent, thanks! ;D

Now, if you're looking at code for the Wave Macro, could you please think about adding the Wave-to-Noise switch in there at the same time ... perhaps as value 127 or 128?

So that a Wave Macro value of 127 (or 128) would act as a Noise On (effect $1101) and a Wave Macro value of less than that would act as a Noise Off (effect $1100), and also change the current wavetable.

Being able to control the switching between Wave and Noise with a 1/60th tick precision is really going to improve the quality of people's PSG drums.

The MML player that's built into the PCE's CD System Card already supports doing that, and so do all of the other old sound drivers that I seen.

Something's wrong. I am converting waveforms I made in MilkyTracker. They are 32 samples. When I enter 48000 Hz or 41000 Hz, the program closes, and no wavetable is produced. Where do the wavetables go?

Something's wrong. I am converting waveforms I made in MilkyTracker. They are 32 samples. When I enter 48000 Hz or 41000 Hz, the program closes, and no wavetable is produced. Where do the wavetables go?

Is the waveform you are trying to drag onto the .BAT file in the same folder as the .BAT file? Also, what is the format of the wave file you are dragging/dropping?

Something's wrong. I am converting waveforms I made in MilkyTracker. They are 32 samples. When I enter 48000 Hz or 41000 Hz, the program closes, and no wavetable is produced. Where do the wavetables go?

Is the waveform you are trying to drag onto the .BAT file in the same folder as the .BAT file? Also, what is the format of the wave file you are dragging/dropping?

Yes, I pasted the waveform into the folder where the BAT file is, and I am using WAV format. Maybe I should try something other than Milkytracker for single cycle waveforms. Please give me the exact procedure so I can make sure I installed chipifier and SoX correctly.

Something's wrong. I am converting waveforms I made in MilkyTracker. They are 32 samples. When I enter 48000 Hz or 41000 Hz, the program closes, and no wavetable is produced. Where do the wavetables go?

Is the waveform you are trying to drag onto the .BAT file in the same folder as the .BAT file? Also, what is the format of the wave file you are dragging/dropping?

Yes, I pasted the waveform into the folder where the BAT file is, and I am using WAV format. Maybe I should try something other than Milkytracker for single cycle waveforms. Please give me the exact procedure so I can make sure I installed chipifier and SoX correctly.

This should leave the window up as the stuff scrolls by, so you can see what's going on. It will also output all the command window text to error.txt. Do that, and paste the contents of error.txt here

I can also tell you that if a wave file is smaller than 32 samples, the app might not like that. If each of them are really tiny waves, maybe try opening them up in a wave editor and pasting them back to back a few times so it's a slightly bigger file... maybe that might help?

Hey, sorry to bump this old topic, but does anyone think they could make DMW files from Air Zonk? I'd do it, but I unfortunately have no clue how to use this right.

Look for Air Zonk's .hes file on Zophar's Domain, open it with NEZplug++, then click on the CH button to turn on and off channels (you'll want to mess with the HuC6230) and then click the DMP button, select DEV_HuC6230, and click on whatever channel you wanna rip instruments from, but note that whenever you click the channel it will rip whatever wavetable is currently playing on that channel!You'll get 32 Hex values which form your wavetable, convert those values into Decimal, copy them in order into Deflemask and voila!! You've ripped a Wavetable!It would be easier if Deflemask supported Hex waves and a "copy/paste wave" function, but as it stands you'll have to copy each value one by one...

It would be easier if Deflemask supported Hex waves and a "copy/paste wave" function, but as it stands you'll have to copy each value one by one...

You have no idea how much pain the process of manually inputting wavetables has caused me. Normally I use keyboard macros to copy values over but Deflemask doesn't use standard MML wavetable strings and gets picky if you don't put a 0 in front of the single digit values. Also deleting the old default values is a pain because you have to use the arrow key to move the cursor to the last sample then hold backspace to delete the old values, which takes a VERY long time. Having that box where you input the values act more like a normal text box where you can select all the values, delete them then copy a string in would be a life saver.

I've worked with the .dmw format before in my LSDJ Synth mod for deflemask so I might try and write a small tool to convert a text file to .dmw

It would be easier if Deflemask supported Hex waves and a "copy/paste wave" function, but as it stands you'll have to copy each value one by one...

I'm aware of this and I'm planning to add a standard OS textbox input instead of the current one. Actually the entire text input system of Defle will be replaced for a more standard form.

Yaaay~!!But will it support hex waves too? I mean, couldn't there be a toggle to switch between hex and decimal wavetables?

Yea, having some stuff in hex and other stuff in decimal is confusing. Another example is when the wavetables are listed in hex format in the wavetable popup, but if you want to call a particular wavetable in the wave macro, you must specifiy it in... decimal? O_o

Yea, having some stuff in hex and other stuff in decimal is confusing. Another example is when the wavetables are listed in hex format in the wavetable popup, but if you want to call a particular wavetable in the wave macro, you must specifiy it in... decimal? O_o

I mostly just want to input waves in Hex because then it would be easier to rip waves from PCE games using NEZplug...

Just a show of hands... does anybody else here besides myself actually USE this Chipifier app to any significant degree? If so, I'll continue tweaking the .BAT file and uploading new versions. Maybe it needs some better documentation or something...

You know, I wanted to try it out, but I just never got around to it >w>';The thing is that I don't really rip my wavetables from samples, I just kind of make my own whenever I'm not using waves ripped from proper PCE games...