It is currently Thu Jun 22, 2017 5:06 pm

All times are UTC - 7 hours



Forum rules


Related:



Post new topic Reply to topic  [ 69 posts ]  Go to page Previous  1, 2, 3, 4, 5  Next
Author Message
PostPosted: Thu Aug 25, 2016 12:07 pm 
Offline
User avatar

Joined: Fri Nov 12, 2004 2:49 pm
Posts: 7073
Location: Jongny, VD, Switzerland
rainwarrior wrote:
Unless you can modulate frequency in a perfectly symmetrical way, [...] You'll have a constantly shifting timbre, lots of strange sidebands.

So that's what we get with SPC700's hardware pitch modulation, and Famocom Disk System's adapter's frequency modulation, right?


Top
 Profile  
 
PostPosted: Thu Aug 25, 2016 12:51 pm 
Offline

Joined: Sun Apr 13, 2008 11:12 am
Posts: 5822
Location: Seattle
KFF made a demo of using the SPC700's pitch modulation for FM-ish sound...


Top
 Profile  
 
PostPosted: Thu Aug 25, 2016 1:03 pm 
Offline
User avatar

Joined: Sun Jan 22, 2012 12:03 pm
Posts: 5304
Location: Canada
Bregalad wrote:
rainwarrior wrote:
Unless you can modulate frequency in a perfectly symmetrical way, [...] You'll have a constantly shifting timbre, lots of strange sidebands.

So that's what we get with SPC700's hardware pitch modulation, and Famocom Disk System's adapter's frequency modulation, right?

Yeah, though maybe the resulting sound is acceptable anyway. If your goal is just to make music, maybe you'll find the constantly sliding phase okay.


Top
 Profile  
 
PostPosted: Thu Aug 25, 2016 1:23 pm 
Offline
User avatar

Joined: Fri Nov 12, 2004 2:49 pm
Posts: 7073
Location: Jongny, VD, Switzerland
rainwarrior wrote:
Yeah, though maybe the resulting sound is acceptable anyway. If your goal is just to make music, maybe you'll find the constantly sliding phase okay.

Well, obviously, the goal is to make music (or sound effects).

I don't even have an idea of what you're refering to by saying "constantly sliding phase".


Top
 Profile  
 
PostPosted: Thu Aug 25, 2016 1:39 pm 
Offline
User avatar

Joined: Wed Feb 13, 2008 9:10 am
Posts: 530
Location: Estonia, Rapla city
Sound will be constantly changing in timbre, which can be really good.

_________________
http://www.tmeeco.eu


Top
 Profile  
 
PostPosted: Thu Aug 25, 2016 1:41 pm 
Offline
User avatar

Joined: Sun Jan 22, 2012 12:03 pm
Posts: 5304
Location: Canada
I mean that if you have a steady tone, the modulator and carrier should have exactly the same wavelength, and stay locked together with the same phase. The waveform should be repeating and identical each time.

With frequency modulation, basically there is always going to be some error. It might spend a little more time at a higher frequency and little less time at a lower frequency, and by the end of a waveform it slips a little bit past its starting position. The carrier slowly shifts out of phase with the modulator, giving a slowly changing timbre as the waveform changes. You can't have a repeating identical waveform this way, it is always changing.

The sound is similar to slowly changing the duty on C64, or playing two slightly detuned waves, ZX beeper phaser, that kind of thing.

The main problem is the speed of phasing is going to be different for every note. You can't really control it, it's limited by the accuracy of your hardware. (On FDS it's really bad, but on these SNES examples it seems much slower, less of a consistency problem.)

With a "phase modulation" implementation instead, you never actually change the frequency of the modulator, the carrier's output is just added to its phase when you do the lookup. They'll always stay locked together perfectly.


Top
 Profile  
 
PostPosted: Thu Aug 25, 2016 3:27 pm 
Offline

Joined: Wed May 19, 2010 6:12 pm
Posts: 2169
For the pitch modulation, does anyone know what amplitudes correspond with what frequencies?


Top
 Profile  
 
PostPosted: Thu Aug 25, 2016 4:43 pm 
Offline

Joined: Sun Apr 13, 2008 11:12 am
Posts: 5822
Location: Seattle
Nocash's fullsnes has the following comment:
FullSNES wrote:
The pitch counter is adjusted at 32000Hz rate as follows:
Step = VxPitch ;range 0..3FFFh (0..128 kHz)
IF PMON.Bit(x)=1 AND (x>0) ;pitch modulation enable
 Factor = VxOUTX(x-1) ;range -4000h..+3FFFh (prev voice amplitude)
 Factor = (Factor SAR 4)+400h ;range +000h..+7FFh (factor = 0.00 .. 1.99)
 Step = (Step * Factor) SAR 10 ;range 0..7FEEh (0..256 kHz)
XXX somewhere here, STEP (or the COUNTER-RESULT) is cropped to 128kHz max) XX?
Counter = Counter + Step ;range 0..FFFFh, carry=next BRR block


So the raw signed 15-bit voice magnitude (post BRR decompression and Gain) of the previous channel becomes a linear (not exponential/note name) frequency multiplier from 0x to almost 2x relative to the frequency programmed for the current channel


Top
 Profile  
 
PostPosted: Thu Aug 25, 2016 7:12 pm 
Offline

Joined: Wed May 19, 2010 6:12 pm
Posts: 2169
Okay, I guess I found the reason why when I tried pitch modulation before I didn't hear much of a difference. The sample I used for the modulator wasn't loud enough.

That begs the question, if I use a modulator that is always raised, can I bypass the frequency limit?


Top
 Profile  
 
PostPosted: Thu Aug 25, 2016 7:31 pm 
Offline

Joined: Sun Apr 13, 2008 11:12 am
Posts: 5822
Location: Seattle
You mean, to produce more aliasing? Certainly fullsnes says you can, to get sample rates up to 256kHz (that are then decimated down to 32kHz as normal)


<pedant>"begs the question" means "assumes the answer", not "requires asking"</pedant>


Top
 Profile  
 
PostPosted: Fri Aug 26, 2016 2:08 pm 
Offline
User avatar

Joined: Fri Nov 12, 2004 2:49 pm
Posts: 7073
Location: Jongny, VD, Switzerland
rainwarrior wrote:
With frequency modulation, basically there is always going to be some error.

Excuse me, but I do not see why there would always be going to be some error. I am not saying you're wrong - perhaps you are right, however I do not see why it'd be so obvious.

I understand the phase of the modulator can be random relative to the phase of the modulatee (is that how we say it ?), because of random things happening after a "key on" event on both channels. Even that might not happen if the "key on" event is simultaneous, but let's happen the phases align randomly.

Once the note is sustained I see no reason there should be a phase shift or anything. If the frequency of a channel is a direct multiple of the frequency of the other (no matter which is which), then I see no reason the synchronization wouldn't last forever. If you just use the same note one octave down for instance, there might be a problem due to the low frequency bit being lost. On the countrary, if you use the lowest value and discard the unnecessary bits for the highest value, the sync should be perfect.

Quote:
It might spend a little more time at a higher frequency and little less time at a lower frequency, and by the end of a waveform it slips a little bit past its starting position. The carrier slowly shifts out of phase with the modulator, giving a slowly changing timbre as the waveform changes. You can't have a repeating identical waveform this way, it is always changing.

Again, I do not understand your logic. You just claim "you can't", as if this was absolutely obvious, but to me it's not.

Quote:
(On FDS it's really bad, but on these SNES examples it seems much slower, less of a consistency problem.)

On what basis do you make this claim ? Please show demos attempting to do that and explain what the problem is. The previously mentioned demo by KungFuKirby is actually very impressive and generate sounds close to what the Genesis can do on the SNES.


Top
 Profile  
 
PostPosted: Fri Aug 26, 2016 2:29 pm 
Offline
User avatar

Joined: Sun Jan 22, 2012 12:03 pm
Posts: 5304
Location: Canada
Okay, since you do seem interested, I will try to explain with more detail:


When the frequency of an oscillator stays constant, its wavelength stays constant.

With phase modulation synthesis, both carrier and modulator stay at the same frequency always. Their wavelengths always match, they always stay synchronized.

With frequency modulation, the frequency of the modulator is constant, but the frequency of the carrier is always changing. The wavelength of the carrier is much more complicated in this case, it is an integral related to the changing frequency over time.

So, with a perfect sine wave modulator, the "ideal" mathematical version, the wavelength of the carrier adds back up to where it started; there's equal time spent in lower frequency and higher frequency and it balances out.

With an integer approximation of a sine wave modulator, they only approximately balance. It's similar to how Euler integration step by step of a physical trajectory will have an error compared to the ideal continuous integral.

What happens when the wavelength of the modulator does not match the wavelength of the carrier? Its phase shifts a little bit each wavelength. How much it shifts depends on how much error. The amount of error is a bit chaotic with these kinds of systems, which is what I mean when I say every different note is going to have a different speed of phase shifting.

Anyhow, if the phase shifts, the timbre of the sound changes. If the phase is shifting slowly, you get a slowly changing sound. If it shifts quickly, you get a quickly changing sound.

There do exist ways to make integer approximations where the errors will balance (and even systems that don't tend to have a few "lucky" notes that are stable), but it requires careful design with this in mind. You're not likely going to get something that does that in the SNES or FDS.

Does this explain what the problem is and how it occurs?


Bregalad wrote:
rainwarrior wrote:
(On FDS it's really bad, but on these SNES examples it seems much slower, less of a consistency problem.)

On what basis do you make this claim ? Please show demos attempting to do that and explain what the problem is. The previously mentioned demo by KungFuKirby is actually very impressive and generate sounds close to what the Genesis can do on the SNES.

It was quite a long time ago that I did test of this with the FDS and I did not document them. Sorry. You can easily operate the FDS modulator with Famitracker, but you'd need to use a real FDS to get an accurate test.

RushJet1 tried making music this way. His goal wasn't to make perfect FM synthesis, it was just to use high frequency modulators to make interesting sounds, and he did make some music with it. He was dissatisfied with how different it sounded on FDS and Famitracker though, so I think he kind of gave up.

In the demo by KungFuFurby you can hear the phasing problem constantly. You can also here it in psycopathicteen's demos in this thread. I alerady commented on this (i.e. the phasing is slower, i think cause SNES has a lot more precision for the modulator).

Whether the phasing is objectionable, musically, is a matter of taste. I was just trying to point out that it's an inherent an uncontrollable part of the sound when you do this on such a system.


Top
 Profile  
 
PostPosted: Fri Aug 26, 2016 4:01 pm 
Offline

Joined: Wed May 19, 2010 6:12 pm
Posts: 2169
Quote:
You can also here it in psycopathicteen's demos in this thread.


I didn't use the hardware pitch modulation. The timbre changing was done intentionally to show off it can change timbres while playing a sound, even though it doesn't exactly fit with the beat of the song.


Top
 Profile  
 
PostPosted: Sat Aug 27, 2016 6:40 am 
Offline

Joined: Wed Jul 09, 2008 8:46 pm
Posts: 232
Here are some more SNES pitch modulation examples from me:

http://battleofthebits.org/arena/Entry/ ... +It/20777/
http://battleofthebits.org/arena/Entry/ ... st_/16436/
http://battleofthebits.org/arena/Entry/ ... tel/14902/
http://battleofthebits.org/arena/Entry/ ... ons/14495/
http://battleofthebits.org/arena/Entry/ ... ure/12045/
http://battleofthebits.org/arena/Entry/ ... pon/10287/
https://ucollective.org/audio/KungFuFur ... enge+snes/


Top
 Profile  
 
PostPosted: Sat Aug 27, 2016 7:37 am 
Offline

Joined: Mon Mar 30, 2015 10:14 am
Posts: 171
lidnariq wrote:
KFF made a demo of using the SPC700's pitch modulation for FM-ish sound...


Wahoo, terrific sound,but does it run on a real snes, or needs an hacked emulator ??


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 69 posts ]  Go to page Previous  1, 2, 3, 4, 5  Next

All times are UTC - 7 hours


Who is online

Users browsing this forum: No registered users and 5 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