half-wave rectifier octave vst?
-
- KVRAF
- 5350 posts since 8 Aug, 2003 from Berlin Germany
Couldn't find it but I made one. Although because you have to have a length to the buffer in oder to play it a 2x speed there has to be a window if the window is not the pitch of the incoming signal then you get cliping (vertical) so there has to be an enevople on the window. For this reason I don't think that seperate + and - streams make a diff. But I did it that way for you any how. the window is a sine envelope so ther might always be a harmonic at c-5.
http://home.comcast.net/~soma720/ocatver.dll
[edit: sorry for the run on sentence. I am off to bed]
http://home.comcast.net/~soma720/ocatver.dll
[edit: sorry for the run on sentence. I am off to bed]
-
- KVRian
- Topic Starter
- 886 posts since 2 Jun, 2005 from Hawaii
cool. thanks a lot everyone. i'll mess around with all this stuff tonight. and to think... just 5 years ago i'd have actually had to leave my house and talk to real people in a music store and play with the pedals there to get these kinds of sounds. very grateful...
-
- Banned
- 380 posts since 11 Aug, 2005
I simply don't understand, what that effect does. Can you please explain?soma wrote:Couldn't find it but I made one. Although because you have to have a length to the buffer in oder to play it a 2x speed there has to be a window if the window is not the pitch of the incoming signal then you get cliping (vertical) so there has to be an enevople on the window. For this reason I don't think that seperate + and - streams make a diff. But I did it that way for you any how. the window is a sine envelope so ther might always be a harmonic at c-5.
http://home.comcast.net/~soma720/ocatver.dll
[edit: sorry for the run on sentence. I am off to bed]
I did a screenshot of what it does on a sine wave here.
It (by the way) completely makes garbage out of the wave:

Please take notice from those edges of the resulting wave.
.
-
- Banned
- 380 posts since 11 Aug, 2005
Then the latency would finally be twice as long as the largest supported frequency cycle, right. Quite much for bass frequencies - the range where it may be usually used then.greendoor wrote:Nice link - that's mainly discussing distortion for guitars though. Probably not a real smooth octaving effect. Half wave rectification is literally chopping off the negative part of the cycle. I think that would be a bad thing in the digital realm - i'm guess analog stuff would probably not behave as precisely as DSP and might be more forgiving.
Full wave rectification flips the negative into the positive. So a sine wave now has half peaky triangle waves - a lot of harmonics you don't want. You could filter them out.
I don't have any DSP skills, but I have ideas. What do you think about this one: it's going to have a lot latency, but I think it would be really sweet ...
From zero crossing to zero crossing, stream the audio input data into a two buffers (negative & positive sides of the cycle). At the end of each negative cycle, stream that stored data (positive then negative) into the output stream at twice sample frequency, but do it twice. That way you should get a perfect, glitch free octave. A sinewave at 100Hz should come out at 200Hz with no harmonics or glitches whatever. Can normal pitchshifting do that?
.
-
- Banned
- 380 posts since 11 Aug, 2005
Rectification simply inverts the negative half of a continuous waveform to the positive range.Roland Babbage wrote:I've no idea what this is about... anyone got an audio example of what this means?
It can be very simple achieved, by processing a stram if you take a code like this:
Code: Select all
// input and output are pointers to the sound stream
while (samples-- > 0)
{
*output++ = fabsf(*input++); // absolute value
}
Another problem is for sure the DC offset it generates. But pulse width modulation does that also...
How it sounds in the digital domain? Well, here are some examples:
(all those sounds are continuously faded into the effect and back to make it clear - stepless dry/wet control).
http://test.dizainer.net/rectify1.mp3
http://test.dizainer.net/rectify2.mp3
http://test.dizainer.net/rectify3.mp3
And here the ALIASING PROOVE (on a sine sweep test signal):
http://test.dizainer.net/rectify4.mp3
Whatsoever,
the smooth buzzing sounds sometimes (dependant from the input signal) quite pleasant. I like it as special effect very much. But it is really usefull merely when you have a dry/wet adjustor to get it merely partial applied.
.
Last edited by ;-) on Wed Sep 14, 2005 6:11 pm, edited 1 time in total.
-
- KVRAF
- 5350 posts since 8 Aug, 2003 from Berlin Germany
That model was based on a suggestion coming at a highlevel. Here is the one I made with my own adjustments. (It can do other pitches besides octaves)I simply don't understand, what that effect does. Can you please explain?
I did a screenshot of what it does on a sine wave here.
It (by the way) completely makes garbage out of the wave:
...
Please take notice from those edges of the resulting wave.
![]()
.
Simple ocatver using Wavelet windowing. The "A" button opens advanced settings. Including midi learn.
(this has nothing to do with rectification)
I can do GUI if anyone really wants one.
http://home.comcast.net/~soma720/ocatver.dll
{oops just tried it out and it sounds out of tune on some pitches}
Last edited by soma on Wed Sep 14, 2005 6:13 pm, edited 1 time in total.
-
- Banned
- 380 posts since 11 Aug, 2005
That does not explain, why it makes total garbage out of the original.soma wrote:That model was based on a suggestion coming at a highlevel. Here is the one I made with my own adjustments. (It can do other pitches besides octaves)I simply don't understand, what that effect does. Can you please explain?
I did a screenshot of what it does on a sine wave here.
It (by the way) completely makes garbage out of the wave:
...
Please take notice from those edges of the resulting wave.
![]()
.
Simple ocatver using Wavelet windowing. The "A" button opens advanced settings. Including midi learn.
(this has nothing to do with rectification)
I can do GUI if anyone really wants one.
http://home.comcast.net/~soma720/ocatver.dll
Did you see the edges inside thge resulting signal (inside the windowing) ???
That is (sorry) quite a crap "model".
And by the way: a constant window size applies also a constant (fixed) buzzing frequency to the audio material. That is even a thing we NEVER need in our music - in contradiction, we want to prevent that usually under all circumstances
.
-
- KVRAF
- 5350 posts since 8 Aug, 2003 from Berlin Germany
Yeah well what do you expect from 10 min effort?
-
You don't have to use it. It was more of a study. And I did mention the constant pitch in the description.
The new .dll is a little better but I'm not interested in this enough to continue.
Here is the very very simple .se1 I use to make it.
http://home.comcast.net/~soma720/pitchshifter.se1
Oh and by the way, "Never say never." If the window is pitched to the key of your music it might be "pleasant". If it makes your music sound like crap and you want that (there are alot of plugs for this) then ...
You don't have to use it. It was more of a study. And I did mention the constant pitch in the description.
The new .dll is a little better but I'm not interested in this enough to continue.
Here is the very very simple .se1 I use to make it.
http://home.comcast.net/~soma720/pitchshifter.se1
Oh and by the way, "Never say never." If the window is pitched to the key of your music it might be "pleasant". If it makes your music sound like crap and you want that (there are alot of plugs for this) then ...
Last edited by soma on Wed Sep 14, 2005 6:27 pm, edited 1 time in total.
-
- Banned
- 380 posts since 11 Aug, 2005
I quote myselfes here.;-) wrote:
And here the ALIASING PROOVE (on a sine sweep test signal):
http://test.dizainer.net/rectify4.mp3
.
But isn't that a nice material for a "What is aliasing and how does it sound?" example?
Should be made a sticky.
.
-
- KVRian
- 769 posts since 2 Apr, 2005
Yeah - but if this would be the holy grail of pure octaving, the large latency would be worth it. I would go for quality first, and use offline processing to free up CPU or solve latency problems. My idea would result in a pure sinewave at double the frequency (assuming a sinewave input).Then the latency would finally be twice as long as the largest supported frequency cycle, right. Quite much for bass frequencies - the range where it may be usually used then.
-
- Banned
- 380 posts since 11 Aug, 2005
Holly grail? Sine wave?greendoor wrote:Yeah - but if this would be the holy grail of pure octaving, the large latency would be worth it. I would go for quality first, and use offline processing to free up CPU or solve latency problems. My idea would result in a pure sinewave at double the frequency (assuming a sinewave input).Then the latency would finally be twice as long as the largest supported frequency cycle, right. Quite much for bass frequencies - the range where it may be usually used then.
Simply take a pitch detection algorithm and drive a variable frequency sub oscillator regarding a certain detection range. You are not limited to a sine wave then. Should be possible in realtime too (due to the fact, that realtime pitch correction already exist for years now).
But it (your idea) would merely work with solistic sources and not with polyphonic material for some reasons.
And you obviously forgot one very important thing to consider: Zero crossing does not always happen in regular intervals! It also happens quite often at unexpected locations inside a wave cycle. (Imagine a high resonant waveform for instance.)
Thus resulting in totally wrong detection intervalls regarding of the complexity of the audio material.
Well, this could be solved with a very good pitch detection algorithm (time or frequency domain) but it neeeds allot of latency in most cases. And also always expects monophonic sources with well defined fundamental frequency.
.
Last edited by ;-) on Thu Sep 15, 2005 12:36 am, edited 1 time in total.
-
- KVRian
- 769 posts since 2 Apr, 2005
No - I don't care for sinewaves as such. I was using the sinewave as an example of pure octave pitchshifting that introduces no unwanted harmonics. If you inputed a square wave, you would get a square wave - just up an octave. I would expect this to be used on any source material that could benefit from a perfect glitch-free octave. Vocals even. I don't understand why you think this is limited to monophonic sources? Its simply playing ANY wave twice as fast - and obviously twice as much data is needed, so simply repeat each wavelet. As I understand it - conventional pitch-shifters don't work on this zero-to-zero principle, and therefore can be glitchy.
-
- Banned
- 380 posts since 11 Aug, 2005
What you describe here is basicly (and well known) as PSOLA. Pitch Synchronuous Overlapp and Add.
That works merely with monophonic (in sense of solistic) input satisfactory. For some certain reasons. Because you need clean waves to do that and a almost perfect pitch/zero crossing detection. A mixture of only two different sources at even slightly different pitch would already mix up and destroy the phases and invalidate your entire principle of detection. It simply would not work any longer.
Polyphonic (mixed) material makes that processing completely difficult. Because who (to hell) should decide, which of the (many) sources has to be octaved then and which not. Polyphonic material has usually many different pitches inside AND ALSO ALLOT OF VOICELESS (but important) SUBSTANCE, which never must pitch shifted to remain natural sound ...
Shifting all then equally?
Then you can use a common pitch shifter, which works more or less with polyphonic (any kind) material like usually (scales all in equal relation - but introducing formant shifting and shifting of voiceless partials in that well known wrong way).
.
That works merely with monophonic (in sense of solistic) input satisfactory. For some certain reasons. Because you need clean waves to do that and a almost perfect pitch/zero crossing detection. A mixture of only two different sources at even slightly different pitch would already mix up and destroy the phases and invalidate your entire principle of detection. It simply would not work any longer.
Polyphonic (mixed) material makes that processing completely difficult. Because who (to hell) should decide, which of the (many) sources has to be octaved then and which not. Polyphonic material has usually many different pitches inside AND ALSO ALLOT OF VOICELESS (but important) SUBSTANCE, which never must pitch shifted to remain natural sound ...
Shifting all then equally?
Then you can use a common pitch shifter, which works more or less with polyphonic (any kind) material like usually (scales all in equal relation - but introducing formant shifting and shifting of voiceless partials in that well known wrong way).
.
