per
Veteran Member
I've recently done some research on Frequency Modulation with sinewaves, in order to get the most out of my latest acquirement.
First of all, even though Yahaha called their chips for FM, it's in fact PM (phase modulation). The only difference is that with FM, the amplitude change of the modulator equals the frequency change of the carrier. With PM, the change in the momentary amplitude change of the modulator equals the frequency change of the carrier.
If you like maths, there are some equations that better explains this:
F(t)=i*sin(G(t)+a*sin(H(t)+...))
(Note: visual images of the waveforms on the bottom of this post)
I entered the general formula into Graph, and started poking around. I knew that due to the nature of sinewaves, there were no posibility for me to get it perfect, but it should be possible to get somewhat close. I basically have 7 different variables; the amplitude for the 3 modulators, and the frequencies.
One thing I noticed was that it was quite easy (using only operator 1 and 2) to make something that looked quite similar to what I tried to achive, but with the only problem that any pseudo-linear parts of the waveform were full of minor noise. It seems like the closer it comes my goal, the more severial the noise becomes. The only way to eliminate the noise is to neutralize it out using the remaining operators. This is the tricky part since figuring this out is a very amplitude-sensetive task. You basically ajust the amplitude for operator 3 and 4 slightly untill the noise is enough reduced, but be carefull as even minimal ajustements may have quite unpredictable effects on the overall waveform.
In the end I got some nice waveforms (square/triangle). Of course, there are no sharp edges, so I guess it will sound like the target wavetypes after you run them through a low-pas filter. Here is the different settings for the waveforms:
only one operator:
sin(x) = Plain sinewave
sin(x+((127-37)/127)sin(2x)) = sine-ish squarewave, might have noticeable noise
sin(x+((127-1)/127)sin(2x+((127-52)/127)sin(2x))) = Not that sine-ish squarewave, minimal noise
sin(x+((127-0)/127)sin(2x+((127-39)/127)sin(2x+((127-91)/127)sin(2x)))) = The best squarewave I could get, it still got a bit of sine, but practically no noise at all
First of all, even though Yahaha called their chips for FM, it's in fact PM (phase modulation). The only difference is that with FM, the amplitude change of the modulator equals the frequency change of the carrier. With PM, the change in the momentary amplitude change of the modulator equals the frequency change of the carrier.
If you like maths, there are some equations that better explains this:
- FM: da = df
- PM: d(da/dt) = df
F(t)=i*sin(G(t)+a*sin(H(t)+...))
- d = Delta
- i = carrier amplitude
- a = modulator amplitude
- f = frequency
- t = time
- F(t) = final waveform
- G(t) = carrier source
- H(t) = modulator source
- ... = repeat the pattern for every other modulator connected in series to the main modulator.
(Note: visual images of the waveforms on the bottom of this post)
I entered the general formula into Graph, and started poking around. I knew that due to the nature of sinewaves, there were no posibility for me to get it perfect, but it should be possible to get somewhat close. I basically have 7 different variables; the amplitude for the 3 modulators, and the frequencies.
One thing I noticed was that it was quite easy (using only operator 1 and 2) to make something that looked quite similar to what I tried to achive, but with the only problem that any pseudo-linear parts of the waveform were full of minor noise. It seems like the closer it comes my goal, the more severial the noise becomes. The only way to eliminate the noise is to neutralize it out using the remaining operators. This is the tricky part since figuring this out is a very amplitude-sensetive task. You basically ajust the amplitude for operator 3 and 4 slightly untill the noise is enough reduced, but be carefull as even minimal ajustements may have quite unpredictable effects on the overall waveform.
In the end I got some nice waveforms (square/triangle). Of course, there are no sharp edges, so I guess it will sound like the target wavetypes after you run them through a low-pas filter. Here is the different settings for the waveforms:
Code:
+------+
v |
-+->Op1-+->Op2->Op3->Op4->
sin(x) = Plain sinewave
- op4 frequency multiplier = 1
- op3 volume = 127
sin(x+((127-37)/127)sin(2x)) = sine-ish squarewave, might have noticeable noise
- op4 frequency multiplier = 1
- op3 volume = 37
- op3 frequency multiplier = 2
- op2 total level = 127
- op4 frequency multiplier = 1
- op3 volume = 81
- op3 frequency multiplier = 1
- op2 volume = 127
sin(x+((127-1)/127)sin(2x+((127-52)/127)sin(2x))) = Not that sine-ish squarewave, minimal noise
- op4 frequency multiplier = 1
- op3 volume = 1
- op3 frequency multiplier = 2
- op2 volume = 52
- op2 frequency multiplier = 2
- op1 volume = 127
- op4 frequency multiplier = 1
- op3 volume = 39
- op3 frequency multiplier = 1
- op2 volume = 91
- op2 frequency multiplier = 1
- op1 volume = 127
sin(x+((127-0)/127)sin(2x+((127-39)/127)sin(2x+((127-91)/127)sin(2x)))) = The best squarewave I could get, it still got a bit of sine, but practically no noise at all
- op4 frequency multiplier = 1
- op3 volume = 0
- op3 frequency multiplier = 2
- op2 volume = 39
- op2 frequency multiplier = 2
- op1 volume = 91
- op1 frequency multiplier = 2
- op1 feedback = 127
- op4 frequency multiplier = 1
- op3 volume = 8
- op3 frequency multiplier = 1
- op2 volume = 59
- op2 frequency multiplier = 1
- op1 volume = 95
- op1 frequency multiplier = 1
- op1 feedback = 0
Attachments
Last edited: