Chat

Author Topic: DefleWave: Deflemask Wavetable conversion tool  (Read 608 times)

Offline Pegmode

  • Member
  • Posts: 128
  • Allergic to FM
DefleWave: Deflemask Wavetable conversion tool
« on: August 21, 2017, 11:34:46 PM »
So I've been thinking about making this for a while because the wave-table editor for Deflemask makes me want to rip my eyeballs out of their sockets. 
This is a tool for converting raw wave-table samples into the .dmw format for import into Deflemask. It should be useful for those who wish to rip wave-tables and import them into Deflemask.
Just paste the raw values into input.txt and run the correct batch file. DefleWave requires only 1 Wavetable of length 32 per line, so every new wavetable you want to rip needs its own line.


TL;DR
  • Exports Raw Wave-table values into .dmw
  • Supports batch wave-table conversion
  • Hexadecimal and Decimal import supported
  • only wavetable size of 32 samples is currently supported

Advance apology for my crappy C++ skills for anyone who looks at the source
« Last Edit: August 22, 2017, 09:15:23 PM by Pegmode »

Offline Michirin9801

  • Full Member
  • Posts: 257
DefleWave: Deflemask Wavetable conversion tool
« Reply #1 on: August 22, 2017, 02:08:59 AM »
I tried ripping some Hex wavetables from Xanadu 2 with it and the Hex batch file wields the exact same results as the Dec one, which means I've gotten inaccurate waves even when using the correct batch file...

Offline Pegmode

  • Member
  • Posts: 128
  • Allergic to FM
DefleWave: Deflemask Wavetable conversion tool
« Reply #2 on: August 22, 2017, 02:27:08 AM »
I tried ripping some Hex wavetables from Xanadu 2 with it and the Hex batch file wields the exact same results as the Dec one, which means I've gotten inaccurate waves even when using the correct batch file...
It's currently working for me. Mind sharing the sample data you're trying to use?

Offline Bruce A. Dyson

  • Newbie
  • Posts: 35
  • A fan of sound hardware
    • Email
DefleWave: Deflemask Wavetable conversion tool
« Reply #3 on: August 22, 2017, 01:14:07 PM »
F*** YOU

Quote from: DefleWave.exe, and the Batch Files
The program can't start because MSVCP140.dll is missing from your computer. Try reinstalling the program to fix this problem.

I use Windows 7 Professional x86 lol

Also, always attach ZIP files for Windows downloads next time.
« Last Edit: August 22, 2017, 03:35:05 PM by Delek »

Offline Delek

  • Salí para ver
  • Administrator
  • Hero Member
  • Posts: 1770
    • Delek's Website
    • Email
DefleWave: Deflemask Wavetable conversion tool
« Reply #4 on: August 22, 2017, 03:36:47 PM »
Awesome program, thanks! Btw, the source is in pure C++ and have a few lines of code, re compiling it on OS X and Linux is trivial.

F*** YOU
Bruce, watch your keys and mouth. I have edited your message. Take this as a first warning.
« Last Edit: August 22, 2017, 03:39:36 PM by Delek »

Offline Therektafire

  • Newbie
  • Posts: 11
  • Delek FTW
    • Email
DefleWave: Deflemask Wavetable conversion tool
« Reply #5 on: August 22, 2017, 09:35:36 PM »
Quote
F*** YOU

Quote from: DefleWave.exe, and the Batch Files
The program can't start because MSVCP140.dll is missing from your computer. Try reinstalling the program to fix this problem.

I use Windows 7 Professional x86 lol

Also, always attach ZIP files for Windows downloads next time.

You do realize there is this thing called going to the internet and downloading dlls right? It literally only takes about a minute or two. Also there are sites that let you convert rars to zips as well. To be fair though, I wish people would not use visual studio for compiling small programs like this and rather use something like gcc/g++ which doesn't require external Microsoft stuff afaik, either that or it statically links all the required files in the exe

Offline Michirin9801

  • Full Member
  • Posts: 257
DefleWave: Deflemask Wavetable conversion tool
« Reply #6 on: August 24, 2017, 01:21:06 AM »
I tried ripping some Hex wavetables from Xanadu 2 with it and the Hex batch file wields the exact same results as the Dec one, which means I've gotten inaccurate waves even when using the correct batch file...
It's currently working for me. Mind sharing the sample data you're trying to use?
Sorry that I took a while, this was just copied straight from NEZplug and pasted on the input.txt, output2 is the result from the Hex batch file, and output3 is the result from the Dec batch file, and as you can see, they're identical... I think that the Hex batch file is just the same thing as the Dec one, but with a different name, but hey, what do I know?

Offline Pegmode

  • Member
  • Posts: 128
  • Allergic to FM
DefleWave: Deflemask Wavetable conversion tool
« Reply #7 on: August 24, 2017, 05:11:15 AM »
Sorry that I took a while, this was just copied straight from NEZplug and pasted on the input.txt, output2 is the result from the Hex batch file, and output3 is the result from the Dec batch file, and as you can see, they're identical... I think that the Hex batch file is just the same thing as the Dec one, but with a different name, but hey, what do I know?
Hmm yes the 2 .dmw files you attached both contain the data resulting form using decimal input. I re-downloaded the tool and I'm getting the correct output from the program. I'm a bit stumped to be honest. If you're suspicious about the batch file being the same, open it in a text editor and make sure it contains
Code: [Select]
DefleWave.exe -h for hex mode.

On a side note the bit depth in what you're trying to import is higher than deflemask supports, though it's completely unrelated to your problems with this.

I also attached the output I got here.

Offline Michirin9801

  • Full Member
  • Posts: 257
DefleWave: Deflemask Wavetable conversion tool
« Reply #8 on: August 24, 2017, 04:39:40 PM »
Hmm yes the 2 .dmw files you attached both contain the data resulting form using decimal input. I re-downloaded the tool and I'm getting the correct output from the program. I'm a bit stumped to be honest. If you're suspicious about the batch file being the same, open it in a text editor and make sure it contains
Code: [Select]
DefleWave.exe -h for hex mode.
It does

On a side note the bit depth in what you're trying to import is higher than deflemask supports, though it's completely unrelated to your problems with this.
No it isn't, there isn't a single value in it that's higher than 1F, it couldn't possibly have as it was ripped from a PCE game and pasted on the input.txt file as it was...

Offline Pegmode

  • Member
  • Posts: 128
  • Allergic to FM
DefleWave: Deflemask Wavetable conversion tool
« Reply #9 on: August 26, 2017, 03:21:06 AM »
It does
Wow I feel like an idiot, you're correct.

I'll see about testing this more on computers and seeing if I can try to get it working for you, but for the mean time I'm not sure I can give you any fixes at the moment. Sorry.

Offline Michirin9801

  • Full Member
  • Posts: 257
DefleWave: Deflemask Wavetable conversion tool
« Reply #10 on: August 26, 2017, 04:27:40 PM »
It does
Wow I feel like an idiot, you're correct.

I'll see about testing this more on computers and seeing if I can try to get it working for you, but for the mean time I'm not sure I can give you any fixes at the moment. Sorry.
Don't worry, I can wait ^^

Offline OPNA2608

  • Newbie
  • Posts: 6
  • nil
    • Email
DefleWave: Deflemask Wavetable conversion tool
« Reply #11 on: November 01, 2017, 08:16:10 PM »
Don't worry, I can wait ^^

Hey there. I sent you a PM about your problem on Youtube a few days ago, not sure if you've noticed. Pegmode mentioned your problem to me a few days ago and I'd like to help.

I have no idea what might be the cause of your problem either though. What OS are you using and how are you using the program?
(native Windows 10 and shipped .exe,
OS X and Wine,
Ubuntu Linux and Wine,
Fedora Linux and self-compiled,
...)


I made another version of this application in Lua. To run it, you need a Lua 5.* interpreter. Check the official website for C source / compiled Windows executable downloads. Alternatively, you can grab an interpreter with apt if you're on Linux (e.g. Ubuntu).

Usage:
<lua interpreter is implied before every line from now on>
  • DefleWave.lua
    -> original behaviour. converts input.txt in same folder as DefleWave.lua. assumes hexadecimal notation.

  • DefleWave.lua coolwave.txt
    -> converts coolwave.txt. assumes hexadecimal notation.

  • DefleWave.lua -d decimalWave.txt
    -> converts decimalWave.txt. assumes decimal notation.

  • DefleWave.lua wave1.txt anotherwave.txt dopestofallwaves.txt
    -> converts all files listed there. hexadecimal notation.

  • DefleWave.lua -d "C:\Program Files (x86)\DefleMask\wavetables\own\asdf.txt"
    -> (hopefully) converts asdf.txt in the specified path. decimal notation.
    should work with Unix-like path on *nix systems.
    absolutely not sure about other relative path specifications.
--

Discord: OPNA2608#6983
Youtube: https://www.youtube.com/user/Gamefreak2205/

Offline Michirin9801

  • Full Member
  • Posts: 257
DefleWave: Deflemask Wavetable conversion tool
« Reply #12 on: November 02, 2017, 01:47:42 AM »
Oh hello! Sorry, YouTube doesn't notify whenever I get a personal message...
And well, it's nice that you went out of your way to solve this issue, but I've never successfully used any lua-based applications before, neither do I have a lua interpreter, so this only makes the whole thing more cumbersome for me to use than just copying the waveforms manually >w>';

Just to answer your question though, back when I tried this I was using a Windows 7 Professional 32 bit, now I'm on 64 bit, but it's the same OS...

Offline OPNA2608

  • Newbie
  • Posts: 6
  • nil
    • Email
DefleWave: Deflemask Wavetable conversion tool
« Reply #13 on: November 02, 2017, 05:22:44 AM »
[...] I've never successfully used any lua-based applications before, neither do I have a lua interpreter, [...]

[...] using a Windows 7 Professional 32 bit, now I'm on 64 bit, but it's the same OS...

  • Get a precompiled Lua executable.
    http://lua-users.org/wiki/LuaBinaries
    Any of the 5.* versions should do, not using any 5.3-specific syntax afaik
  • Save it (+ dlls if supplied) anywhere on your system.
    e.g. C:\Program Files (x86)\Lua\5.3\lua53.exe
  • Open DefleWave.bat from the zip with any text editor.
  • Edit the "set LUA" line to point to your Lua interpreter (in quotes).
    e.g. set LUA="C:\Program Files (x86)\Lua\5.3\lua53.exe"
  • Save and close the bat file.
  • Doubleclick the bat file to convert input.txt.
    Or drag n drop files in hexadecimal notation onto the bat file to convert them.
    Or open a new CLI by holding SHIFT & rightclicking into the folder,
    -then selecting "Open Command Line Here" or something like that,
    -then use the notations i showed under Usage but replace the "<Lua interpreter> DefluaWave.lua" part with DefleWave.bat
--

Discord: OPNA2608#6983
Youtube: https://www.youtube.com/user/Gamefreak2205/