RJDMC 1.53

Discuss NSF files, FamiTracker, MML tools, or anything else related to NES music.

Moderator: Moderators

User avatar
RushJet1
Posts: 155
Joined: Wed Nov 10, 2004 10:17 pm
Contact:

RJDMC 1.53

Post by RushJet1 »

UPDATE: Latest release: RJDMC v1.53

I hadn't updated this thread in a long time so there are a lot of new features.

Code: Select all

v1.53
-opening .dmc and .wav files directly will properly show the program on top of other windows and in focus
-caps in the file extension while opening files "with" RJDMC will no longer say they are not supported
-changed UI label on "save split dmc" button
-Split DMC saving now shows how many frames the split DMC will run for and will calculate the size automatically based on frames and hz rate	

v1.52
-you can open .wav files directly by associating them to RJDMC in windows now
-fixed "open with" threading issue crash (only on opening files by associating them to RJDMC)	

v1.51
-fixed ssrc "<smaller of two rates>/gcd(rate,33144) %2 %3 = 0" bug
-removed hacky old fix for the above
-edited the way files are saved
-removed admin UAC requirement
-drag and drop works more consistently	

1.4 public

- You can now associate DMC files with RJDMC for double-clicking
- Fixed issues with window order when double clicking files
- Added new program icon
- Added .dmc file icon
- Got rid of adding proper 16+1 byte lengths at end of files
- RJDMC no longer crashes if you open a file that's already open somewhere else.
- RJDMC tells you when you have a text output that's too large for Famitracker to import.
- Writing a .txt file for FT to import will now overwrite existing files with the same name.

1.3 public

- Added the ability to save larger DPCMs as famitracker-importable text files.

1.2 public

- "Tilt" values can be negative now.
- All non-text areas become active when moused over.
- Saving .dmc and .wav files correctly shows the current filename.
- SSRC is now included in the RJDMC executable, so no need to have it in its own folder.

1.1 public

- .wav opening fixes

1.041 private

- Fixed cut/copy/paste/trim/delete so that they no longer crash if the file is too small (one sample)


1.04 public

- Added tilt feature
- Fixed a bug where hitting revert crashes program before a .wav is loaded
- Fixed several bugs with tilt

v1.03 public

- Minimizing the window when a .wav file is open no longer crashes RJDMC
--------------------------------------

I'm doing this for my senior project in school, so I will be releasing new updates to this program weekly. The premise of this program is that it is a DMC converter that has a UI and several options. It has no name yet :(

Description-

Converts a PCM .wav (16 or 8-bit, stereo or mono) to DMC format. Only waves above 33144hz will work properly--others will play too fast. If you have a 22khz wave you want to play, convert it to 44khz (or if possible, 33144hz) in some other program first. My program converts the sample rate for larger-than-33144 rates but it does a dirty job of it, so the cleanest sound will probably result from you putting it at 33144.

You can also convert a PCM .wav to another PCM .wav approximation of the DPCM. This is useful for people who make .it/xm/s3m files and want to have dpcm samples that sound like a NES's would. You can also just load full songs into this to play around (warning, large filesizes take awhile).

Compressed .wav formats are not supported, and they will not be in the future most likely. This includes ADPCM, uLaw, etc.

you can get it here.

Future features:
-<33144hz conversion
-multiple quality/pitch settings
-Graphical DMC wave display (directly editable, copy/cut/paste)
-Preview for the current DMC wav at given frequency
-The ability to chop up large wav files so they can be played back as DMCs on the NES
-Drag 'n Drop functionality
-additional filters
-bit crushing

and a bunch of other stuff that I don't really want to list yet :)


----------------

If you find any bugs with a .wav file (for example, if a .wav causes it to crash or if it's PCM and it whines that this is not a wave file), send me the .wav with a description of what went wrong at rushjet1 (at) 4x86 (dot) com.
Last edited by RushJet1 on Mon Mar 20, 2023 9:54 pm, edited 5 times in total.
User avatar
Bregalad
Posts: 8055
Joined: Fri Nov 12, 2004 2:49 pm
Location: Divonne-les-bains, France

Post by Bregalad »

If you want source code for resampling, you could get inspiration from my BRR encoder that is here :

Code: Select all

http://www.romhacking.net/utils/681/
But of course if it's for scool then I guess you can't plagiarize other people's code, even if it's free.
Useless, lumbering half-wits don't scare us.
tepples
Posts: 22705
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Post by tepples »

Bregalad wrote:But of course if it's for scool then I guess you can't plagiarize other people's code, even if it's free.
You shouldn't be plagiarizing anyway. The word "plagiarism" itself tends to conflate three different aspects:
  • Attribution failure. This is the "classic" definition of plagiarism, in which an author fails to cite the source of an idea or expression appropriated from another author.
  • Copyright infringement. This involves reproducing the work of another author without the author's permission and beyond what courts have recognized as fair. Ideas are not subject to copyright, though there is no bright line between idea and expression.
  • NIH. An instructor may require that a specific portion of an assignment be an original work created exclusively by the student in order for the student to receive credit, even if the student cites sources and has permission. This restriction is independent of both attribution and copyright.
Use of a library distributed under an appropriate free software license should not run afoul of attribution failure or copyright infringement, though you should check with your instructor to see what kinds of libraries are OK to use.
User avatar
RushJet1
Posts: 155
Joined: Wed Nov 10, 2004 10:17 pm
Contact:

Post by RushJet1 »

tepples wrote:
Bregalad wrote:But of course if it's for scool then I guess you can't plagiarize other people's code, even if it's free.
You shouldn't be plagiarizing anyway. The word "plagiarism" itself tends to conflate three different aspects:
  • Attribution failure. This is the "classic" definition of plagiarism, in which an author fails to cite the source of an idea or expression appropriated from another author.
  • Copyright infringement. This involves reproducing the work of another author without the author's permission and beyond what courts have recognized as fair. Ideas are not subject to copyright, though there is no bright line between idea and expression.
  • NIH. An instructor may require that a specific portion of an assignment be an original work created exclusively by the student in order for the student to receive credit, even if the student cites sources and has permission. This restriction is independent of both attribution and copyright.
Use of a library distributed under an appropriate free software license should not run afoul of attribution failure or copyright infringement, though you should check with your instructor to see what kinds of libraries are OK to use.
I can use programs that already do functions I need as long as I use it appropriately and attribute them :) It's the same as using "sources" for writing papers basically. I was gonna use "Secret Rabbit Code" but it's a C DLL that requires you do fill in a c struct and uses pointers to data, and I have no idea how to do that stuff in VB.net
User avatar
katzenklavier
Posts: 3
Joined: Thu Sep 30, 2010 1:51 am

Post by katzenklavier »

RushJet1 wrote:I can use programs that already do functions I need as long as I use it appropriately and attribute them :) It's the same as using "sources" for writing papers basically. I was gonna use "Secret Rabbit Code" but it's a C DLL that requires you do fill in a c struct and uses pointers to data, and I have no idea how to do that stuff in VB.net
VB handles this by passing things "by reference" - it's a fancy way of saying "pointer." Try looking up "by reference" in the DLL calling routines and see if that gives you a nudge in the right direction.

Your program looks awesome - keep up the good work!
User avatar
RushJet1
Posts: 155
Joined: Wed Nov 10, 2004 10:17 pm
Contact:

Post by RushJet1 »

katzenklavier wrote:
RushJet1 wrote:I can use programs that already do functions I need as long as I use it appropriately and attribute them :) It's the same as using "sources" for writing papers basically. I was gonna use "Secret Rabbit Code" but it's a C DLL that requires you do fill in a c struct and uses pointers to data, and I have no idea how to do that stuff in VB.net
VB handles this by passing things "by reference" - it's a fancy way of saying "pointer." Try looking up "by reference" in the DLL calling routines and see if that gives you a nudge in the right direction.

Your program looks awesome - keep up the good work!
I actually spent a couple days on that with another programmer friend helping, and we couldn't get it to work. Found a precompiled dll and used that. Made a struct, passed byRef. That didn't seem to work so I made it an IntPtr and marshalled the memory to send over but that produced identical results. The program complained that my ratio was not between 1/12 and 12, which it was. Then I tried compiling the newest version of it but found tons of problems with his Win32 code so I had to fix those. Finally got it compiled and the program said it checked out (tests passed) but it was 1.4MB and unusable in my code without another windows library in the same directory, then VB.net whined about how this was managed code... so I switched programs to one that is much easier to use and works well :P I'll be posting the new version today.
User avatar
RushJet1
Posts: 155
Joined: Wed Nov 10, 2004 10:17 pm
Contact:

Post by RushJet1 »

New version of RJDMC (yep, calling it that)! Version 0.05

You can get the new version here.

Changes from 0.01

-Changed name to "RJDMC"
-Any .wav input rate is supported and properly conveted to 33144hz
-Drag 'n' Drop is supported
-Added an Edit->Preferences menu for batch processing
-Allowed opening multiple files for batch processing
-Multiple .wav output rates

Batch Processing: If you want to process more than one file at once, first go to edit-> preferences and choose your output method (this will not work in "manual" mode as that expects one at a time). After selecting an option (and a .wav output rate for .WAV output if you want), either drag/drop multiple files onto the application or use the File->Open dialog and select multiple .wav files. They will automatically be created in the same folder as the input files with either "<inputname>.dmc" for DMC output or "<inputname>D.wav" for .WAV output.
User avatar
RushJet1
Posts: 155
Joined: Wed Nov 10, 2004 10:17 pm
Contact:

Post by RushJet1 »

New update!

RJDMC v0.30

It's been awhile since I've officially updated this, so there are a lot of changes (especially behind-the-scenes).

-Memory use is cut way down (for large files)
-Bit Crushing is implemented (0 is off, 1-19 is varying degrees of bits flipped, and 20 is an inverted waveform).
-Volume control is implemented (volume for the input wave is changed by x%).
-Zoom is implemented on the waveform view--unfortunately it only zooms to the middle now.
-You can highlight parts of the wave in the waveform view but it doesn't do anything. :P
-Pitch control is done, and playback is at least pretty close to how the NES would handle it, though not exact.
-Opening DMC files is possible now, and you can edit them just like .wav files.
-Several bugs were fixed, most of which most people wouldn't notice :D

Again, if there are problems, post here or e-mail me with them. Thanks!

PS- if you get .net errors, chances are that you need to install the latest version of .net :)
User avatar
RushJet1
Posts: 155
Joined: Wed Nov 10, 2004 10:17 pm
Contact:

Post by RushJet1 »

New update: RJDMC v0.31

Changes:
-Very small .wav files should work properly with SSRC now.
User avatar
RushJet1
Posts: 155
Joined: Wed Nov 10, 2004 10:17 pm
Contact:

Post by RushJet1 »

Another minor update. Now all sample rates as input are supported (within reason... think of 48Khz as a high cap).

RJDMC v0.32
User avatar
Hamtaro126
Posts: 818
Joined: Thu Jan 19, 2006 5:08 pm

Post by Hamtaro126 »

This may sound crazy, but can you add very minimal support for PCM for Famicom Disk System via (PP)MCK/MML syntax? Such voices/SFX used as in the Famitracker FDS HELLO voice demo, Doki Doki Panic, And possibly others,

Of course, That is if you're up to it. There was another converter buried in the Famitracker Forums called WAV2FDS for FamiTracker, but it's not working, because it is of course, a Game Maker app!
AKA SmilyMZX/AtariHacker.
tepples
Posts: 22705
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Post by tepples »

Can you show an example of what valid syntax might look like?
User avatar
RushJet1
Posts: 155
Joined: Wed Nov 10, 2004 10:17 pm
Contact:

Post by RushJet1 »

I'm pretty sure that's totally different from what I'm doing right now, and it's kind of outside the scope of what I'm trying to do with this program anyway (it's for my senior project, so I have a deadline and don't want to be adding too many time-consuming features).
User avatar
RushJet1
Posts: 155
Joined: Wed Nov 10, 2004 10:17 pm
Contact:

Post by RushJet1 »

RJDMC v0.4

-Pitch is implemented
-Deleting selection is implemented
-Fixed several bugs related to the highlighting of the window
-Fixed bugs involving space bar triggering controls
-Fixed bugs with lower HZ samples crashing SSRC (small files)
-Implemented Cut, Copy, Paste, Trim, Select All, Delete

NOTES:
-Zoom function doesn't work with editing the wave file yet (it acts as if you're zoomed all the way out).
-You can either right click on the wave display or use shortcuts to use the editor functionality.
-CTRL+V = paste, CTRL+C = copy, CTRL+X = cut, CTRL+T = trim, CTRL+Z = revert, CTRL+A = select all
-"quality" Pitch change right now is a bit mediocre quality-wise. I might just have lots of copies of each .wav file in memory for small files.
-To use copy, cut, delete, or trim you must have something selected (by dragging the mouse and making a rectangle). To paste something, you need to click once (without dragging) and a single white line will show up- this is where the info will be pasted.
User avatar
cartlemmy
Posts: 193
Joined: Fri Sep 24, 2010 4:41 pm
Location: California, USA
Contact:

Post by cartlemmy »

Thanks so much for this tool... Now I just need to figure out how to implement the DMC sounds into my sound engine :)
Post Reply