Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /storage/content/49/145849/famitracker.com/public_html/forum/classes/dbHandler.php on line 29 FamiTracker
Login:
Menu:
Post: Author:
FamiTracker > General > FamiTracker Talk > DPCM- Melodic waveform importing help Owner: TheSyntaxSinTax New post
Page 1 of 1 Sort:  
DPCM- Melodic waveform importing help Posted: 2013-08-16 08:44  (Last Edited: 2013-08-16 08:45) Reply | Quote
TheSyntaxSinTax

Avatar

Member for: 3825 days
Location: California
Status: Offline

#50547
Sup guys. So I managed to come up against a problem that I can't seem to find a work-around for. I was hoping that someone might be able to help me.

I'm looking to use the DPCM channel for simple looped melodic waveforms, sort of similar to how it was used in "The Immortal".

[url=]https://www.youtube.com/watch?feature=player_embedded&v=a2_FcMWu170

Ideally I'd like to do this with multiple types of wave forms (sawtooth, sine, half sine, etc.) and create at least a 12 tone scale for each.

However I started creating wav files to import(44.1kh, 16bit, mono) of the individual note waveforms for sawtooth when I noticed a problem: the sawtooth waveform I created for A4 (440hz) and A#4 (466.16hz) both imported as the same note, B4, when imported with the exact same settings.

I could understand the notes being off, what with the DPCM conversion process, but I'd hope that two different notes would be off by the same amount so that I could accommodate for the difference and still have a usable scale.

Anybody have any idea what's going on or how to fix it?

Posted: 2013-08-17 16:16 Reply | Quote
rainwarrior

Avatar

Member for: 4150 days
Location: Canada
Status: Offline

#50583
The NES DPCM can only move up or down by 1 step in each sample. There is no way it can encode the large jumps of a saw or square wave well.

I'm not sure why you would get the same note from two different pitched sawtooth waves (this seems unlikely to me), but you might try decreasing the input volume?

I believe all the encoder does is encode a 1 (increase) if the sample is greater than the current counter value, and a 0 if it's less. With a saw wave, it will follow the ramp up and then when it jumps down, there will be a string of 0s ramping down the DPCM waveform until they cross again.

The Immortal specifically just uses a very short DPCM sample that is like a little triangle shaped pulse followed by a flat region. This would be very hard to create with the WAV import, but simple with a hex editor. i.e. a couple of FFs to ramp up, then a bunch of 00s to ramp down and clamp at the baseline.

Page 1 of 1 Sort: