It is currently Thu Nov 23, 2017 8:57 pm

All times are UTC - 7 hours





Post new topic Reply to topic  [ 18 posts ]  Go to page Previous  1, 2
Author Message
PostPosted: Wed Oct 21, 2015 4:48 pm 
Offline
User avatar

Joined: Fri May 08, 2015 7:17 pm
Posts: 1834
Location: DIGDUG
Here's a sample of DPCM code...

Code:
   lda #$0f   ;sample rate
   sta $4010   ;0f is highest rate, 33144

   lda #$00   ;starting address, must be c000-ffc0
         ;00 = c000
         ;fc = ff00

   sta $4012   ;11aa aaaa aa00 0000

   lda #$0e   ;length of sample
   sta $4013   ;LLLL LLLL 0001, 0e => e1 bytes

   lda #$1f   ;write of 0001000 triggers sample
   sta $4015


and...

Code:
ldx #$0f   ;turn off last sample
   stx $4015

_________________
nesdoug.com -- blog/tutorial on programming for the NES


Top
 Profile  
 
PostPosted: Wed Oct 21, 2015 6:50 pm 
Offline
User avatar

Joined: Sat Jul 25, 2015 1:22 pm
Posts: 501
rainwarrior wrote:
The most I've ever seen is 4 8k sample banks, used in Gimmick. (32k)

Just curious, did they use DPCM to make the detuned bass synth in Sophia, or is it actually two oscillators slightly detuned like a Moog baseline?

According to what I was reading, Sunsoft used DPCM a lot to make cool bass sounds. I was also reading though that it works poorly for high pitched sounds, so you might not be satisfied with the results with a female voice.


Top
 Profile  
 
PostPosted: Wed Oct 21, 2015 7:27 pm 
Offline

Joined: Sun Apr 13, 2008 11:12 am
Posts: 6450
Location: UK (temporarily)
Sunsoft had so frequently used the DPCM channel for a string or electric bass that we have come to colloquially refer to it here as "sunsoft bass".

The DPCM channel reconstruction is effectively an infinite lowpass filter. ("infinite" in the sense that the corner frequency is 0; for every pair of frequencies f and 2f, f can be represented twice as loud as 2f).
(Obviously at some point the channel saturates. At highest, that's frequencies below 258 Hz. Anyway, I'm ignoring that for now)

This encoding does an adequate job as long as its input is sufficiently bandlimited (say maybe 1kHz from lowest frequency you want to store to highest). The more bandwidth, the worse DPCM is at encoding it.

As an example, here's the first 7 seconds from David Byrne's My Fair Lady on The Wired CD (CC:Sampling+ license). First 7 seconds are post-filtering, second 7 seconds are additionally after encoding and decoding. I've applied a very strong bandpass to retain just the frequency band from 500Hz to 1500Hz.


Attachments:
original-and-dpcm-of-narrowband-signal.mp3 [85.16 KiB]
Downloaded 34 times
Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 18 posts ]  Go to page Previous  1, 2

All times are UTC - 7 hours


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group