Switching DMC samples mid-song
Moderator: Moderators
Switching DMC samples mid-song
I'm currently trying to track something in famitracker, but it seems what I'm trying to do isn't possible with traditional .nsf by itself.
I need to be able to switch DPCM samples (of 4081 bytes) after they've been played because I've hit the (according to famitracker) 16KB limit for samples.
Would it be possible to replace samples on they fly (One second/ 50 or 60 frames depending) while still playing the song?
If this matters, I've estimated the entirety of the song when it's finished to be about 681KB. I know the max official PRG-ROM was 512KB, so would this be able to be made without some weird custom mapper?
I need to be able to switch DPCM samples (of 4081 bytes) after they've been played because I've hit the (according to famitracker) 16KB limit for samples.
Would it be possible to replace samples on they fly (One second/ 50 or 60 frames depending) while still playing the song?
If this matters, I've estimated the entirety of the song when it's finished to be about 681KB. I know the max official PRG-ROM was 512KB, so would this be able to be made without some weird custom mapper?
Last edited by GARY 'M 9 on Fri Sep 30, 2011 9:12 pm, edited 1 time in total.
That's a limitation of Famitracker's design and programming. If you wanted a LOT of samples, you could go as high as 512k with MMC3. But there's no ready-made sound engine and player for this.
Maybe reduce the quality of the samples to get them to fit.
Maybe reduce the quality of the samples to get them to fit.
Here come the fortune cookies! Here come the fortune cookies! They're wearing paper hats!
http://famitracker.shoodot.net/forum/posts.php?id=2164
Didn't read the whole thread, but I think the basic gist is that you can have unlimited samples by saving each 16k of samples as an instrument, then loading the instruments in a new song. Don't know if the ftm can be compiled as an nsf, however. Also, I think this trick was eliminated in latest version 3.7.
Another option is PPMCK, which has unlimited (?) bank-switching.
Didn't read the whole thread, but I think the basic gist is that you can have unlimited samples by saving each 16k of samples as an instrument, then loading the instruments in a new song. Don't know if the ftm can be compiled as an nsf, however. Also, I think this trick was eliminated in latest version 3.7.
Another option is PPMCK, which has unlimited (?) bank-switching.
Pornotracker also doesn't have a 16KB limit for DPCM samples.
Download STREEMERZ for NES from fauxgame.com! — Some other stuff I've done: fo.aspekt.fi
Why use MMC3? MMC5 allows for 1MB, which is in the range that I need.Dwedit wrote:That's a limitation of Famitracker's design and programming. If you wanted a LOT of samples, you could go as high as 512k with MMC3. But there's no ready-made sound engine and player for this.
Maybe reduce the quality of the samples to get them to fit.
Reducing the quality of the samples isn't an option for me with this. I'll explain at the end of this post.
That "trick" was in-tracker only, when compiled it cut sample length from the .NSF. It was more of a bug.cak wrote:http://famitracker.shoodot.net/forum/posts.php?id=2164
Didn't read the whole thread, but I think the basic gist is that you can have unlimited samples by saving each 16k of samples as an instrument, then loading the instruments in a new song. Don't know if the ftm can be compiled as an nsf, however. Also, I think this trick was eliminated in latest version 3.7.
Another option is PPMCK, which has unlimited (?) bank-switching.
Also, PPMCK's download link is gone...
Correct me if I'm wrong, but the limit of DPCM samples is only $0F? I'm going to need ~$AC samples. I also can't seem to find the note that would make the samples sound normal.thefox wrote:Pornotracker also doesn't have a 16KB limit for DPCM samples.
------------------------
Ok, what I'm trying to do is either do a raw port of a normal song that is 2m:51s and play it in the DPCM and add some sound channel accompanies, or remix the song in an editing program a bit, port it to DPCM samples and then add 8-bit parts to it. The quality I've been able to achieve with famitracker's import option is that of vinyl records.
I need to be able to make this all play on an NES normally, not just through a tracker program so I'm probably going to have to bankswitch the 4-second song clips together through some programming, unless there's a better option.
Here's the test .nsf I made just to show kinda what I'm doing:
http://api.ge.tt/0/8tnziD8/0/blob/download
(Play that in an accurate emulator like fceux, things like faulty WinAMP plugins and emulators like Jnes just don't cut it. The samples are quiet for a reason, so turn your speakers up to hear it clearer.)
http://nesdev.com/bbs/viewtopic.php?t=4296GARY 'M 9 wrote:Also, PPMCK's download link is gone...
http://www.mmlshare.com/forums/topic/4d ... 7228000000
Thanks!cak wrote:http://nesdev.com/bbs/viewtopic.php?t=4296GARY 'M 9 wrote:Also, PPMCK's download link is gone...
http://www.mmlshare.com/forums/topic/4d ... 7228000000
Nope, you can have up to 255 instruments. I assume you're using the highest frequency, so to make them sound normal enter a note "-F-" (with key 7 in the default octave).GARY 'M 9 wrote:Correct me if I'm wrong, but the limit of DPCM samples is only $0F? I'm going to need ~$AC samples. I also can't seem to find the note that would make the samples sound normal.thefox wrote:Pornotracker also doesn't have a 16KB limit for DPCM samples.
Download STREEMERZ for NES from fauxgame.com! — Some other stuff I've done: fo.aspekt.fi
Few emulators support MMC5 thoroughly. Even a PowerPak doesn't. And unlike with MMC3, there aren't MMC5 clone ICs available from various sources.GARY 'M 9 wrote:MMC5
By "limit" what do you mean? I'm not familiar with particular trackers, so I'll talk about the NES itself:Correct me if I'm wrong, but the limit of DPCM samples is only $0F? I'm going to need ~$AC samples.
Length: The DMC sample length register is $00 through $FF, where the actual length of the waveform is 16*L+1 bytes or 128*L+1 samples.
Number of samples: Samples can start on any in $C000-$FFFF. With MMC3, FME-7, MMC5, or the NSF mapper, you'll usually be switching waveforms into $C000-$DFFF.
What notes do you need? If you have a waveform of a sampled instrument, and you resample it to C = 16744 Hz, the NES can play it back at these pitches:I also can't seem to find the note that would make the samples sound normal.
Octave 1: C, D, E, F, G, A, B
Octave 2: C, D, F, G, A
Octave 3: C, E, G
Octave 4: C
That's pretty much how you have to do it. Resample the whole thing to 33144 Hz, and play 32648-sample chunks of the waveform at $C000 and $D000. In this case, IRQ might be helpful to get perfectly gapless playback.I need to be able to make this all play on an NES normally, not just through a tracker program so I'm probably going to have to bankswitch the 4-second song clips together through some programming
Here's an example that Strobe did a long time ago making use of the DPCM channel to simulate multiple channels using a few custom samples and the sample offset command.
http://lmao.rotfl.at/upload/Str0be/Stuffness.zip
http://lmao.rotfl.at/upload/Str0be/Stuffness.zip
- Jarhmander
- Formerly ~J-@D!~
- Posts: 521
- Joined: Sun Mar 12, 2006 12:36 am
- Location: Rive nord de Montréal
Beware however that these pitches obtained aren't perfect pitched as despicted by my good ol' table of DPCM frequency/note : http://www.2a03.org/forum/viewtopic.php?id=924. With high-pitched notes it can get quite dissonant with the rest of the music.tepples wrote:What notes do you need? If you have a waveform of a sampled instrument, and you resample it to C = 16744 Hz, the NES can play it back at these pitches:I also can't seem to find the note that would make the samples sound normal.
Octave 1: C, D, E, F, G, A, B
Octave 2: C, D, F, G, A
Octave 3: C, E, G
Octave 4: C