dick dirty ·
There's probably an embarrasingly simple answer to this ,but which module or primitive would i need to edit to build a half or full wave rectifier and how would i accomplish this?I hope the answer is not too humiliating.thanks.
From the original SynthMaker forum (2004–2014), with its members’ names and dates.
dick dirty ·
There's probably an embarrasingly simple answer to this ,but which module or primitive would i need to edit to build a half or full wave rectifier and how would i accomplish this?I hope the answer is not too humiliating.thanks.
Xtinct ·
Hi try this
its ok for sine and tri waves
dick dirty ·
thanks for an amazingly fast reply ,ill check it out, cheers
dick dirty ·
I think i messed up,it was supposed to be a half wave rectifier and i dont seem to be able to get it to do this without including the distortion of a full wave rectifier,so forgive me for the imposition but please please please could i get the same thing as a half wave version.
oddson ·
That has both half and full.
But without band-limiting it's going to alias like a sonofabitch.
Xtinct ·
Not sure I understand 😕 an OSM or screen shot would be a help to show what your trying to achieve
dick dirty ·
How can i remove the full wave aspect,leaving only the half wave.or vice versa? (total noob)
dick dirty ·
Xtinct wrote: Not sure I understand 😕 an OSM or screen shot would be a help to show what your trying to achieve
in your osm you have a half wave rectification on the top oscilloscope and full wave on the bottom one. the osm appears to delivers both simulateously.how can i separate the two?once again total noob and my coding skills are non existent as of thepresent.
Xtinct ·
Heres the half
But as oddson says its only good to about 2 octaves above middle c then bring on the aliasing 🙁
dick dirty ·
Xtinct wrote: Heres the half
But as oddson says its only good to about 2 octaves above middle c then bring on the aliasing 🙁
Thanks ,am testing now
dick dirty ·
dick dirty wrote: Xtinct wrote: Heres the half
But as oddson says its only good to about 2 octaves above middle c then bring on the aliasing 🙁
Thanks ,am testing now
Hmm still the same.pretty much what i did with my guesswork methods.Is there a mathematical reason why it is impossible to simply remove the negative portion of a wave,leaving the positive unchanged?
Xtinct ·
Are you just looking to change the offset so all of the wave is above 0 ?
dick dirty ·
Xtinct wrote: Are you just looking to change the offset so all of the wave is above 0 ?
If that means thateverything blow zero is gone and everything above zero is unchanged,then yes.
dick dirty ·
If that means that everything below zero is gone and everything above zero is completely unchanged ,then yes.
Xtinct ·
No the half rectifier I posted does that 😕
dick dirty ·
Oh i think i see what you mean by offset,then no see my post above
dick dirty ·
Xtinct wrote: No the half rectifier I posted does that 😕
I put it through an oscilloscope and there was some weird additive aspect to it.What you said about the half was exactly what i was after. let me bounce it and view it.it was a freebie scope after all
dick dirty ·
Strange ,when bounce it comes out exactly like you said.my screwup.you sir are a prince among men.cheers. (still dont understand the distortion aspect though,ill have to read up)
oddson ·
A half-wave rectified sine wave has strong harmonics on the first harmonic (fundamental) and even order harmonics are much stronger than the odd order ones.
In the full wave the fundamental is gone and the second harmonic (the octave up) is by far the dominant part of the signal. That's why it's used as a octave up effect in stomp boxes. The remaining harmonics are a bit messy but even-heavy on the first few.
See: http://www.allaboutcircuits.com/vol_2/chpt_7/3.html
The half-wave rectifier is the extreme version of asymmetrical clipping (where one side of the wave is clipped more heavily than the other) which produces higher even order harmonic content than symmetrical clipping. It clips all of one side and none of the other. More subtle asymmetrical clipping is thought to sound 'tube-like'.
Now the bad news... clipping with hard transitions like this (where adjacent samples don't form a slow transition but a sharp angle) produces strong high-order harmonics whose frequency is too high to be represented by digital signals of any reasonable sample rate. So they 'alias' or fold back into the audible range at values that don't coincide with any harmonic relationship of the original signal and so sound very nasty.
One way around aliasing is oversampling -- but SynthMaker does not lend itself to oversampling very well.
Another approach is to use 'soft clipping' or 'soft-saturation' where there is a transition region between where the signal is unchanged and where it's flattened.
This does not completely eliminate aliasing but does make it less severe. But there is a lot more processing and usually some tricky math needed to shape the signal in this way.
I hope you're able to follow some of this... I'm only starting to come to terms with DSP after six years of playing around.
(Hopefully I haven't said anything that's so far from true that the DSP engineers will have to correct me.)
dick dirty ·
ok i think i know why harmonics creep in.how difficult would it be to introduce a volume control on the negative part of the signal rather than a straight cut thereby minimizing the harmonic distortion?
oddson ·
streamin x; streamout y; streamin c; float ci; ci = c * -1; y = x - (x<ci & (x+c));
The second input is a [0,1] range variable - lower is more clipping.
But really... read up on aliasing. 😇
dick dirty ·
oddson wrote: streamin x; streamout y; streamin c; float ci; ci = c * -1; y = x - (x<ci & (x+c));
The second input is a [0,1] range variable - lower is more clipping.
But really... read up on aliasing. 😇
im on it ,ta
Xtinct ·
Heres another version that controls the level of the negative portion rather than hard clipping it
dick dirty ·
Xtinct wrote: Heres another version that controls the level of the negative portion rather than hard clipping it
thanks xtinct,now testing
dick dirty ·
thanks xtinct ,works cool.(had to first figure out how to export as vst - like i said "noob alert")owe ya one dude.
Wrote something here? To have a post removed or your name hidden, write to [email protected].