It is currently Mon Dec 18, 2017 11:43 am

All times are UTC - 7 hours



Forum rules


Related:



Post new topic Reply to topic  [ 70 posts ]  Go to page Previous  1, 2, 3, 4, 5  Next
Author Message
PostPosted: Sat Aug 27, 2016 8:04 am 
Offline

Joined: Wed Jul 09, 2008 8:46 pm
Posts: 243
TOUKO wrote:
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 ??


The pitch modulation feature existed on an actual SPC700 (and thus, on a real SNES). See Oracle from Secret of Mana, several songs from Packy and Marlon, and Dark Jungle from Jurassic Park (you'll have to wait about a minute or two on this one) for a few examples.

Amusingly, it's not a hacked emulator that I used, but a hacked sound driver. I hacked SNESMod, which never had pitch modulation support to begin with. Later versions were produced by Augustus Blackheart, and I sometimes contributed fixes.


Top
 Profile  
 
PostPosted: Sat Aug 27, 2016 8:16 am 
Offline

Joined: Mon Mar 30, 2015 10:14 am
Posts: 206
thanks for the infos, and sorry for the mistake (hacked emulator rather than audio driver :oops: )
BTW, i listened the others song you posted and i like very much, good job .


Top
 Profile  
 
PostPosted: Sat Aug 27, 2016 8:20 am 
Offline

Joined: Wed May 19, 2010 6:12 pm
Posts: 2433
How do you know how an MOD file is going to sound before you convert it?


Top
 Profile  
 
PostPosted: Sat Aug 27, 2016 8:23 am 
Offline

Joined: Wed Jul 09, 2008 8:46 pm
Posts: 243
Depends on what I'm making. Usually I can just rely on Schism Tracker, but this doesn't work as well when pitch modulation and/or noise generation is involved (thankfully I assigned these to unused IDs, to the original Impulse Tracker's standards...). Sometimes I have to convert them while they're incomplete to make sure my pitch modulation (and/or noise generation) is working correctly. Other times I convert them only when they're finished and ready to go.


Top
 Profile  
 
PostPosted: Sat Aug 27, 2016 9:03 am 
Offline

Joined: Wed May 19, 2010 6:12 pm
Posts: 2433
Do you know what settings you use for electric guitar sounds?


Top
 Profile  
 
PostPosted: Sat Aug 27, 2016 9:29 am 
Online
User avatar

Joined: Fri Nov 12, 2004 2:49 pm
Posts: 7320
Location: Chexbres, VD, Switzerland
rainwarrior wrote:
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?

Thank you very much for the detailed explaination, Rainwarrior. This is very much appreciated.

So the problem does not come from FM itself, but from the rounding necessary to store a digital sine wave. Isn't is possible to make the error perfectly symetric, for example by having a sine table which is perfectly symetric ?

About the FDS; I undetsand there is less bits for the modulator, however it is still possible to have a perfecly symetric signal for the modulator despite the lower precision, isn't it? The issue is that I do not think it is possible to amplitude of the modulator dynamically as a note sustain, so this cannot approach what FM synthesis does, I guess, even without accounting the shifting from accumulating errors.


Top
 Profile  
 
PostPosted: Sat Aug 27, 2016 9:51 am 
Offline

Joined: Wed May 19, 2010 6:12 pm
Posts: 2433
I think he means there is always going to be some aliasing on the modulator that causes a distorted sound.


Top
 Profile  
 
PostPosted: Sat Aug 27, 2016 11:59 am 
Offline
User avatar

Joined: Sun Jan 22, 2012 12:03 pm
Posts: 5899
Location: Canada
Bregalad wrote:
Isn't is possible to make the error perfectly symetric, for example by having a sine table which is perfectly symetric ?

About the FDS; I undetsand there is less bits for the modulator, however it is still possible to have a perfecly symetric signal for the modulator despite the lower precision, isn't it? The issue is that I do not think it is possible to amplitude of the modulator dynamically as a note sustain, so this cannot approach what FM synthesis does, I guess, even without accounting the shifting from accumulating errors.

Yes, being an approximation doesn't mean you can't balance. It just means it requires careful design of the algorithm.

With the FDS you're fighting against other factors besides its extremely coarse control (like how the modulator multiplies against the pitch value, trying to adjust it pseudo-logarithmically instead of linearly). If you do enough analysis work you might be able to find some combination that balances for at least a subset of pitches, but I don't know if there's a practical way to do it.

On the SNES, it seems that the modulation amount might be linear, so I think there is a much better possibility here. (Maybe even the naive approach is close enough.)


Top
 Profile  
 
PostPosted: Sat Aug 27, 2016 1:49 pm 
Offline

Joined: Wed Jul 09, 2008 8:46 pm
Posts: 243
psycopathicteen wrote:
Do you know what settings you use for electric guitar sounds?


Usually a square wave on the carrier, and a sine wave (usually one octave down, although sometimes I fool around to limited effect) on the modulator (if I'm using the terminology right). Psuedo-feedback effects can be achieved by simply dialing the modulator's gain (gradually) to zero.

I also have used two square waves, although I usually prefer them at the same frequency.


Top
 Profile  
 
PostPosted: Sat Aug 27, 2016 2:37 pm 
Offline

Joined: Wed May 19, 2010 6:12 pm
Posts: 2433
Thanks. I've been trying to figure how to make synthy electric guitar sound for a long time.


Top
 Profile  
 
PostPosted: Sat Aug 27, 2016 4:36 pm 
Offline
User avatar

Joined: Sat Aug 20, 2016 3:58 am
Posts: 42
lidnariq wrote:
KFF made a demo of using the SPC700's pitch modulation for FM-ish sound...


What is the frequencie of that example?, in the link doesn't described...


Top
 Profile  
 
PostPosted: Sat Aug 27, 2016 5:32 pm 
Offline

Joined: Wed Jul 09, 2008 8:46 pm
Posts: 243
That one's a mixed bag. Sine waves, square waves and saw waves are all used in varying fashions as carriers and modulators.


Top
 Profile  
 
PostPosted: Sun Aug 28, 2016 11:23 am 
Offline

Joined: Wed May 19, 2010 6:12 pm
Posts: 2433
What octaves are they sampled at?


Top
 Profile  
 
PostPosted: Wed Aug 31, 2016 2:40 pm 
Offline

Joined: Wed Jul 09, 2008 8:46 pm
Posts: 243
Also a mixed bag. I was experimenting with up to two octave's difference, and in at least one case I used a five-semitone pitch difference rather than an octave.


Top
 Profile  
 
PostPosted: Sun Sep 04, 2016 10:48 am 
Offline

Joined: Sat Jul 26, 2014 9:50 am
Posts: 56
psycopathicteen wrote:
This time I changed the carrier wave from a triangle, to a half-triangle half-square wave.

...and also an LFO modulating the modulator's amplitude.


Sounds cool! I often use 4-6 channels just for one sound. It would be nice to continue doing so when I have the tracks to spare but then switch to this method when I don't.

Quote:
How do you know how an MOD file is going to sound before you convert it?


For me it doesn't sound much different in the MOD file unless I'm using pitch modulation or noise. The first thing I did when I started messing about with pitch modulation was try different combinations of samples/octaves in one file. Then I made a note of the combinations I liked best. I should just add SNES emulation for sound playback in my tracker but it would be even more useful to add it to a cross platform tracker so more people could make use of it. As an added attraction I'd have it ignore/map commands based on the sound driver or native IT mode (like my hacked tracker does.)

I've attached a ROM* with some songs in case anybody needs more examples of songs using pitch modulation.

*slightly buggy, SNESMod doesn't stop playing tracks that have ADSR enabled. Whoops.


Attachments:
File comment: Cheesy fm songs, updated with additional songs.
ablackheart.sfc [512 KiB]
Downloaded 32 times


Last edited by Augustus Blackheart on Mon Feb 20, 2017 9:59 pm, edited 1 time in total.
Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 70 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 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