NESDev and Strangulation Records messageboards
Forum Index | FAQ | New User | Login | Search

Previous ThreadView All ThreadsNext Thread*Show in Threaded Mode


SubjectPCM samples in MML? new  
Posted byAnonymous
Posted on5/22/03 05:49 AM
From IP12.82.139.96  



I have been looking all over for information about how to use MML to create NSF files using PCM samples, but I haven't found anything that works. I checked out the info available at http://taka-p.allnet.ne.jp/dtm/psc/mckmml.html, but when I tried it, it resulted in an error message. Could anyone offer some assistance?

If it makes any difference, I am using the tutorial and software located at http://nesmusic.zophar.net/makedata_e.html to create NSFs.




SubjectRe: PCM samples in MML? new  
Posted byTsu Ryu
Posted on5/24/03 8:57 PM
From IP66.65.162.50  




To create PCM samples is definitely not an easy process btw. You have to create a small wave file of the sound you wish to use in your NSF. I recommend you have a Wave file editing software like Cool Edit, Magix, Creative Wavestation ( My personal favorite ), etc. To save the wave file at 22hz or less. This way a small size is acceptable to such Wave-PCM conversion programs like DMCConv. Download DMCConv ( I recommend the DOS version ), follow the Readme.txt that is provided to create samples. It worked for me and so can it work for you.




SubjectRe: PCM samples in MML? new  
Posted byAnonymous
Posted on5/25/03 01:37 AM
From IP12.82.136.115  



My problem's not making the samples, it's getting them into the NSF file when I convert the MML file with MCK.




SubjectRe: PCM samples in MML? new  
Posted byMemblers
Posted on5/25/03 02:34 AM
From IP68.58.99.218  



What's the error message say? Are you using the english version of MCK Converter? (mckc_e.exe)

I haven't tried using DPCM samples in MML, yet.




SubjectRe: PCM samples in MML? new  
Posted byLousySpy
Posted on5/25/03 02:58 AM
From IP12.82.136.115  



I'm using the MCKwatch application, which does it all for me automatically, I guess... I get the feeling I should probably be doing this all manually instead, but I haven't quite figured out all that stuff yet. Anyway, here's the error message:



(You probably figured it out, but I'm the 'anonymous' guy.)





SubjectRe: PCM samples in MML? new  
Posted byMemblers
Posted on5/25/03 03:06 AM
From IP68.58.99.218  



Ah, then it's running in japanese.

The command-line option -m1 will make it output error messages in english. (or you can use the other .exe)

I haven't used MCKWatch, so I don't know if it can change that. Try running it from a command-line, like "mckc -m1 song.mml".




SubjectRe: PCM samples in MML? new  
Posted byLousySpy
Posted on5/25/03 03:42 AM
From IP12.82.136.115  



I figured out how to change it from MCKWatch... here's the error now:

no create .nsf file

MML to MCK Data Converter Ver 0.25 by Manbow-J
..\pcmtest.mml -> pcmtest.h
Error :..\pcmtest.mml 6: DPCM file not found
Error :..\pcmtest.mml 7: DPCM file not found
etc...
Error :..\pcmtest.mml 12: DPCM file not found
Warning: ..\pcmtest.mml 16: Unuse command in this track
Warning: ..\pcmtest.mml 16: Unuse command in this track

Compleated!

NES Assembler (v.251)

pass 1

#[1] make_nsf.txt
51 00:8F45 .include "effect.h"
Can not open file!
# 1 error(s)





SubjectRe: PCM samples in MML? new  
Posted byMemblers
Posted on5/25/03 06:12 AM
From IP68.58.99.218  



That definitely helps. Hmm, I see the ..\ part on the filename, that means the MML file is in the folder above the current one. The DPCM files might be in the wrong folder, they probably need to be in the same folder as pcmtest.mml (or maybe the MCKWatch directory, I dunno)

BTW, if you don't already know, the numbers after the error refer to the line number of the text file where the error is.




SubjectRe: PCM samples in MML? new  
Posted byLousySpy
Posted on5/25/03 06:49 AM
From IP12.82.136.115  



Well, the samples are in the same folder as pcmtest.mml, which also happens to be the MCKWatch directory, so I have no idea what's going on there...

*Moves samples to a different directory* Ahh, figured that one out. I need to put the samples in the MCK directory, not the MCKWatch directory. Now it's saying the samples are too big, so I guess I'll have to shrink them down.

*shrinks them down, runs MCKWatch again* YES!!! It's working! Ohh, now I'm really excited! ...actually, I also feel rather stupid because of how simple it was. Anyway, thanks for the hints, they really helped out.




SubjectHow to do it.  
Posted byLousySpy
Posted on5/26/03 00:38 AM
From IP12.82.139.93  



Now that I've got it figured out, I thought I might as well explain how I did it, since it's really not that hard. My method uses purely Windows, so it may have some restrictions that using the command prompt doesn't, but it works, and it's not too complicated.

To begin with, we need the software to make the conversions. I won't go into too much detail on that because it's explained quite well at http://nesmusic.zophar.net/. Just download all the tools and follow the Make NSF tutorial on the right sidebar. (It's a horrible translation, but it's understandable enough.)

Once you've done that, you need your samples. I've found 16-bit, 44100 khz, mono samples work well for converting, but you may wish to experiment with the frequency. Make sure they're 16-bit and mono, though.

Once you have your samples, you need to convert them. The DMCConv GUI has worked well for me. Put the GUI in the same directory as the DMCConv files and run it. On my screen, it hides the buttons and settings, so I have to stretch the window out a bit. Once you can see everything, open up the directory with the samples you want to convert, and drag them onto the window. On the bottom are four buttons: The far left one will play the sample, the next one to the right will remove the selected sample from the list, the third button will reset any settings you have changed (after clicking it, choosing "yes" will clear the sample list, and "no" will leave it intact), and the fourth button will convert the samples (after a confirmation message, it will give you the same "yes/no" choice as before). At the top left is an option to choose a playback rate. F is the sample's original pitch, while E through 0 are higher pitches. Assuming the original sample is playing at a pitch of C, the different values would give the following pitches:

F - c
E - f
D - g#
C - c (an octave higher)
B - d#
A - f
9 - g
8 - a#
7 - c (another octave higher)
6 - c#
5 - d#
4 - f
3 - g
2 - g#
1 - a#
0 - c (yet another octave higher)

The slider at the top adjusts the amplitude of the resulting sample. 200% seems about right for the samples I've used. Again, you'll need to experiment with the samples you're using.

The checkbox on the right... I haven't noticed any difference in the output when it's checked or unchecked. I'll need to experiment more.

Now that you've got your samples in .DMC format, copy or move them to the MCK directory in the MCKWatch folder. You're done with it for now.

In your MML file, you'll need to define some macros to access the samples. The macros follow this format:

@DPCM[num] = { "[filename]",[pitch] }

[num] is a number from 0 to 63, with 0 corresponding to C on the 4th octave, 1 corresponding to C# on the 4th octave, etc. Things got rather strange once I went up to the 5th octave, though, so I'd suggest limiting yourself to 0-11.

[filename] is the name of your sample. For example, kick.dmc, snare.dmc, etc.

[pitch] is a number from 0 to 15 and adjusts the playback rate of the sample. 15 is the original pitch, while 14 through 0 lower the pitch. Assuming the original sample is played at C, here are the values and their corresponding pitches:

15 - c
14 - g
13 - e
12 - c (an octave lower)
11 - a
10 - g
9 - f
8 - d
7 - c (an octave lower)
6 - b
5 - a
4 - g
3 - f
2 - e
1 - d
0 - c

If you're using a melodic sample such as an orchestra hit, you may need to use multiple samples at varying pitches to get a full octave. (Note that the note each sample corresponds with does not affect the pitch. Setting an orchestra hit on C with a pitch of 15 will sound the same as putting the same orchestra hit on C# wiht a pitch of 15.)

Once you've set your macro and put your sample(s) in place, all you need to do is put a track on channel E and put in the notes that correspond with the samples you chose. It should look something like this:

@DPCM0 = { "kick.dmc",15 }
@DPCM1 = { "snare.dmc",15 }
@DPCM2 = { "orchhit.dmc",13 }
@DPCM3 = { "orchhit.dmc",12 }
@DPCM4 = { "orchhit.dmc",14 }

E t100

E l8 c c c+ c16 c+16 c c c+ r d16 d16 r16 d16 r16 d+16 d16 r16 e16


That example, the samples used, and the resulting NSF file can be found at http://www.jabcreations.com/lousyspy/DPCM.zip.




SubjectRe: How to do it. new  
Posted byMemblers
Posted on5/26/03 03:26 AM
From IP68.58.99.218  



Good tutorial.

I noticed the samples in the NSF sound kinda 'poppy'. I can see why -- the .DMC file sizes aren't multiples of 16. Maybe this is something that should be fixed in DMCConv (it might already have an option to do that, I don't know).

Otherwise, I'd advise using a hex editor to trim (or expand) the DMC file to a multiple of 16 bytes. If you add bytes that you want to be silent, make them $AA or $55 (that alternates 0's and 1's, since Delta PCM by it's nature is always changing the waveform)

Hmm, I'm having trouble getting it to compile (can't remember how I did it before, heh). Try using these samples and let me know if it sounds any better.
http://www.parodius.com/~memblers/pcm.zip




SubjectRe: How to do it. new  
Posted byLousySpy
Posted on5/26/03 03:32 AM
From IP12.82.139.93  



Nope. I swapped the samples, and it still sounds the same.




SubjectRe: How to do it. new  
Posted byIzumi.
Posted on6/1/03 5:57 PM
From IP218.218.198.44  



> The checkbox on the right... I haven't noticed any difference in the output when it's checked or unchecked. I'll need to experiment more.

That check box is Volume adjust.
checked -> Volume adjust
unchecked -> Volume not adjust





Previous ThreadView All ThreadsNext Thread*Show in Threaded Mode
Jump to

Memblers' homepage             Contact Me

Forums powered by WWWThreads Demo