this is a multi modulation, what do you thing is it true or pseudo?
here is the osm http://www.mediafire.com/?1nrknjqzzqr
can u see a mistakes there?
source:
AM:
s - modulator, k - ratio.
FM:
PM:
PS:i think that its wrong to assign integral's "t" to period, i think its time, but how can i get a time value? and phase, mb it must be multiplied with 2*pi(is it radians or degrees)?
check check check)
unkargherth ·
well, some things to note even without trying you code:
a) sin1 and cos1 functions already internally multiply by 2*pi, so entry range is always 0..1
b) FM is usually implemented as Phase Modulation cause, the result is auditively very similar but much more stable
c) AM is usually implemente as simple multiplication of two waves, rather than a code segment that generates the two waves, for eficiency reasons
d) Why you multply phase by 360 ? As per a) phase goea always in range 0..1
e) At this line
the term (k*0*((s*s)/2))) seems to be always 0. If this is true you can simply delete it
f) Althought is probably matemathically correct, this is far from beign optimal in efficiency terms.
For last. There are simpler ways to do it all: in short
AM: take two sine primitives, rectify(convert to slways positive) one of them and multipliy by the other. Provided Freq of the positive one is very low ( in LFO range) you get AM
FM: Same two sines: the opuput of the modulator info the Fase Input of carrier. If you previously adjust the frequencies ( the famous M/C ratio) you get FM, ( but if its to deep you get heavy aliasing)
PM: Although I don't fully understand the conecpt I suspect that using a very small M/C factor (M much lesser than C) on the FM structure you get what can be called Phase Modulation
minione ·
thx for checkin, just iv created this not bcause didnt mind how to connect 2 osc between and get true modulation, just i wanna to create flexible controling of it, and i going to do some experiments with this code: try to make that one wave controlse the amplitude of second, second controls frequency of third, third phase of first etc etc, and i still want to make its code correct(of course ill simplify it, thanx for advices)... therefore i was requested for find some mistakes, anyway, when i create what i want ill post it here.
PS: there is ringmodulation that included in schematic (not code), is that correct rm algorithm?
PPS: Though on the other side, probably it is better to work with PWM oscs...
unkargherth ·
Get a sample of my point of view above on the wiki
minione ·
thank you for basics, but, unfortunely, i cant get not modulated signal without trning off the modulator, that cant i say about single modulation module 😕
bad... to make more enhanceblity, make more complicated...
(all about FM now, for AM thanx, and if u no want to check the file my rm is so: acos carier + acos modulaatr ) * (acos car. - acosmodulatr) just your RM seems to be AM in real )
unkargherth ·
You're true in your RM definition, in pure analogical terms ( you get sum and diference sidebands). But Once you enter in digital terms you find that simply multiplying gives you same "harmonic content" at the end
The only problem is that made so simple it aliases a lot
On the FM issue simply turn all to right the depth knob to get a clean carrier. Remember. Phase input ADDS to phase, not MULTIPLY so inputing a 0 leaves phase free running, ie, without modulation
unkargherth ·
ok. here it comes a bit more complex fm sample
This itime i included Self modulation (AKA Oscillator feedback)
be carefull with the modulation ammounts ( amount knob on envelopes). It's very easy to get rubbish noise on high values
Also the whole thing have a strong tendency to alias at higher pitchs
As usual get it at Wiki
infuzion ·
unkargherth wrote: Get a sample of my point of view above on the wiki
By your definition unk, I don't see where the AM example gets to be all positive; I tested with a Poly Readout & see negitives. After I use this code from sambean/jeorge after the multiplied knob, it does seem do more what you say it should:
streamin i;
streamout o;
float absmask;
stage(0)
{
absmask = 3.4e38|0.999999|0.1;
}
stage(1)
{
o = i&absmask;
}
Am I seeing things wrong?
cheers
unkargherth ·
As always infuzion, you're true. I forgot to ABSolutize the modulator in AM. Corrected and reuploaded the file to wiki, same url as before
infuzion ·
unkargherth wrote: As always infuzion, you're true. I forgot to ABSolutize the modulator in AM. Corrected and reuploaded the file to wiki, same url as before
I'm not always true, just a bit more anal than most 🙂
Actually, I never could grasp the difference between AM & Ring untill now, thanks to your post here.
Wrote something here? To have a post removed or your name hidden, write to [email protected].