It is currently Thu Dec 13, 2018 8:38 pm

All times are UTC - 7 hours



Forum rules





Post new topic Reply to topic  [ 19 posts ]  Go to page Previous  1, 2
Author Message
PostPosted: Thu Mar 08, 2018 1:39 pm 
Offline

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 20870
Location: NE Indiana, USA (NTSC)
In other words, D flat major seventh.

To loop a chord, you first have to rewrite it as frequency ratios in just intonation in order to see how much of it to loop. A perfect fifth above a note whose frequency is x has a frequency 3x/2; a major third up is 5x/4. Thus you have unison, a major third up, a perfect fifth up, and a major third above a perfect fifth: fractions 1, 5/4, 3/2, and 15/8. The lowest common denominator of these fractions is 8, making the chord [8, 10, 12, 15]/8. Because the denominator is 8, you have to loop at a frequency 1/8 of the chord's root. In A440 tuning, D flat or C sharp is 277.183 Hz, making the loop frequency 277.183/8 = 34.6479 Hz.

The sample is at 32000 Hz, making one period 32000 / 34.6479 = 923.577 samples long. After opening it in Audacity, I found a decent loop of length 912 samples starting at sample 7986. This being less than 924 implies the sample is tuned slightly sharp of A440. So for now, let's try downsampling it such that the loop is 768 samples long. This means a sample rate of 32000 * 768 / 912 = 26947 Hz. After resampling the audio, I end up with a loop of length 768 samples starting at sample 6724. This could be a starting point for more experimentation.


Attachments:
roland-26947.wav.zip [14.52 KiB]
Downloaded 45 times
Top
 Profile  
 
PostPosted: Wed Mar 14, 2018 7:19 am 
Offline

Joined: Tue Oct 24, 2017 11:07 pm
Posts: 18
I've got good news and bad news.

The good news is that I've apparently found a bug in every emulator's SPC emulation, but the bad news is that my sound engine won't work on real hardware. I can tell that it's running because the SNES emits crackles that are at the same pitch as my samples, but not the samples themselves. Is there any SPC initialization you have to do besides:

1. Setting up stack pointer
2. Zeroing echo volumes for left/right
3. Zeroing key on/off
4. Zeroing the flag register
5. Zeroing echo feedback volume
6. Setting max master volume for left/right
7. Setting static gain for channel 0
8. Setting max channel 0 volume
9. Starting to write song data to DSP channel 0

Here's the full file if anyone cares

If it's a confounding factor, I'm doing my "on hardware" testing on a Bung Game Doctor SF6.


Top
 Profile  
 
PostPosted: Wed Mar 14, 2018 11:34 am 
Offline
User avatar

Joined: Fri Nov 12, 2004 2:49 pm
Posts: 7604
Location: Chexbres, VD, Switzerland
Did you zero noise and pitch modulation registers?
Also after disabling echo you need to wait some time before the echo programm warps arround and stops writing to RAM.


Top
 Profile  
 
PostPosted: Wed Mar 14, 2018 6:14 pm 
Offline

Joined: Tue Oct 24, 2017 11:07 pm
Posts: 18
Bregalad wrote:
Did you zero noise and pitch modulation registers?
Also after disabling echo you need to wait some time before the echo programm warps arround and stops writing to RAM.

Thanks, disabling noise and echo writes fixed the issue.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 19 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