Martin Schied found a interesting distortion. Nothing new I guess but worth some analysation.
haut-parleur-doppler.pd is the original file from Martin, the other one my variation to get a better glimpse at it. If you like sunn o))) or similar you might like it. But I suggest you first look at how it behaves without feedback.
Sounds really cool with a guitar and with high gain (around 50). What's nice is the change in the spectrum depending on the volume of the input.
But all waveshapers also do change the spectrum according to the volume (except those that are linear, which basically means those waveshapers that are configured to do nothing.)
This is wrong for this distortion. And that again is what is interesting about it. The distortion depends only on the travel speed of the vd~. But if you multiply the signal with a gain you also change the velocity by that amount. A negative velocity (down to a delay of 0) means a pitchshift upwards. While a positive velocity means a downshift. At a velocity of 1ms/ms is the turning point, for faster modulation the signal is played in reverse. A reflection at 0Hz, which is basically the same as a Nyquist reflection. The parallel up/downshifting leads to a chaotic spectrum change. With a speed of .7 ms/ms we have at the same time the signal with 30% and 170% playback speed. Which clearly has no relation to the original pitch and no harmonic relation left. This is only intensified through the reversed playback and the constant velocity change. While typical (soft-)clipping only generates harmonics related to the fundamental. The more I think about it the more fascinated I am that this results in something interesting to the ear.
So what we have here is some kind of natural asymmetrical distortion. As the velocity is the important factor it has the interesting property of being frequency (and amplitude) dependant! A modulation frequency (amplitude) of *2 results in a velocity of *2. This means: the higher the input frequency (or amplitude) the harsher the distortion. If wanted this can be compensated for with a simple lop~, who has a rolloff of -6 Db/dec or in rms: a frequency increase of *2 means a amplitude reduction to 0.5. So every frequency above the cut-off-frequency has now (almost) the same impact on the distortion.
Please correct me if I'm wrong somewhere. And have fun.
On Wed, 10 Nov 2010, - wrote:
haut-parleur-doppler.pd is the original file from Martin,
[...]
Please correct me if I'm wrong somewhere.
Yes, that file is from me and not from Martin. (but that's just a few kilometres off)
The parallel up/downshifting leads to a chaotic spectrum change. With a speed of .7 ms/ms we have at the same time the signal with 30% and 170% playback speed. Which clearly has no relation to the original pitch and no harmonic relation left.
Why is that clear to you ?
The apparent slowdown and acceleration of the sound goes on at the same rate as the contents of the signal itself. Therefore, you don't even have the time to hear a change of pitch... it's not even possible to detect one... there isn't one.
Suppose you have an input signal f(t). Then the output signal is f(t-b-a*f(t)). Then suppose the input signal has period k. This means f(t)=f(t+k). Then the output signal at time t+k is f(t+k-b-a*f(t+k)). But f(t+k) = f(t), so the output signal at time t+k is also f(t-b-a*f(t)) because the argument of f is modulo k. Thus the output signal has period k. Thus all the component tones of the output are harmonics of period k. This fact does not depend on a and b, it depends on the lack of nonperiodic components and differently-periodic components in the formula.
Even if I use f(t-b-tanh(a*f(t))) instead, it remains periodic because tanh of a k-period signal is a function with a k-period signal... it only depends on f(t).
The more I think about it the more fascinated I am that this results in something interesting to the ear.
It remains consonant to the ear so easily simply because it only produces harmonics.
| Mathieu Bouchard ---- tél: +1.514.383.3801 ---- Villeray, Montréal, QC
On Sat, 13 Nov 2010, Mathieu Bouchard wrote:
On Wed, 10 Nov 2010, - wrote:
haut-parleur-doppler.pd is the original file from Martin,
[...]
Please correct me if I'm wrong somewhere.
Yes, that file is from me and not from Martin. (but that's just a few kilometres off)
(Doh, I was thinking about a different Martin. In any case, the file comes from me.)
| Mathieu Bouchard ---- tél: +1.514.383.3801 ---- Villeray, Montréal, QC
On 14.11.2010 03:40, Mathieu Bouchard wrote:
On Sat, 13 Nov 2010, Mathieu Bouchard wrote:
On Wed, 10 Nov 2010, - wrote:
haut-parleur-doppler.pd is the original file from Martin,
[...]
Please correct me if I'm wrong somewhere.
Yes, that file is from me and not from Martin. (but that's just a few kilometres off)
(Doh, I was thinking about a different Martin. In any case, the file comes from me.)
thought you were joking...
in your previous mail you wrote
It remains consonant to the ear so easily simply because it only produces harmonics.
did you speak about the "doppler" distortion? true doppler distortion is harmonic for a single sine wave, but not for 2 or more sines of different frequencies. It's the same effect known as frequency modulation, in this case a signal being its own carrier. The difficulty in prediction of a spectrum is that the carrier is an always changing mix of frequencies and not a single sine wave like for a radio station transmitter or in the most simplest case of frequency modulation synthesizers, but it is pretty easy to find out it is non harmonic by listening...
I want to add that the vd~ approach is not the "perfect implementation" for the above described frequency modulatuon. the carrier is delayed against the modulating signal a bit. Like this it simulates a moving listener instead a moving sound source. Also for a single sine wave the change of the spectrum differs by variation of the delay.
A more close to reality simulation which does only fm without delay requires a variable (interpolating?) write into the delayline. Unfortunately I don't know of such externals already existing. However I don't expect the effects being very different from the vd~ method. A slow 20Hz sinewave modulating some high frequencies will not sound very different if the 20Hz is delayed or not. A 20 hz sound will have a duration which is much longer that the delay.
Martin
On Wed, 17 Nov 2010, Martin Schied wrote:
did you speak about the "doppler" distortion? true doppler distortion is harmonic for a single sine wave, but not for 2 or more sines of different frequencies.
Then can you explain what's wrong in my reasoning ? (the formulas I wrote)
It assumes the signal is periodic (even if the period is long ; harmonics are relative to that period, and not the period of either sine wave)
Suppose you have two sine waves of frequencies a,b related by a common base frequency gcd(a,b)... what are the frequencies of the non-harmonics ? I'm talking about something detectable.
It's the same effect known as frequency modulation, in this case a signal being its own carrier.
When a signal is its own carrier, you are below a certain threshold of detectability of frequency change. It's one of the uncertainty principles (closely related to Heisenberg's). When you do FM with a true carrier, the carrier has to be a lot higher in frequency, and that decides how much data you can carry with the carrier. That's the difference between actual FM transmission, and something that's only using the same formula as FM.
The difficulty in prediction of a spectrum is that the carrier is an always changing mix of frequencies and not a single sine wave like for a radio station transmitter or in the most simplest case of frequency modulation synthesizers, but it is pretty easy to find out it is non harmonic by listening...
non-harmonic related to what ?
Well, if you tried it with an [osc~ 200] and an [osc~ 1000], for example, you'd see that by increasing the intensity of the effect gradually from 0, harmonics come up and down, and at first they are multiple of 200 Hz, but for some reason, for very high values, there are other multiples of 100 Hz that appear. I'm missing something because gcd(200,1000)=200, not 100, but at least the harmonics aren't completely weird.
I want to add that the vd~ approach is not the "perfect implementation" for the above described frequency modulatuon. the carrier is delayed against the modulating signal a bit.
You can add another [vd~] or [delread~] to fix that. I think I did that in some other version of haut-parleur-doppler.pd, and if not, I did similar things with other effects.
Like this it simulates a moving listener instead a moving sound source.
But there is no difference between a moving listener and a moving source, apart from the wind.
What you mean is, regardless of whether it happens in the listener or the source, the motion is out of phase with the actual signal.
Also for a single sine wave the change of the spectrum differs by variation of the delay.
Yes, and for several sine waves too. But I think that it doesn't change the nature of the beast very much.
A more close to reality simulation which does only fm without delay requires a variable (interpolating?) write into the delayline.
Why would you need to do it on write, instead of on read ?
Unfortunately I don't know of such externals already existing. However I don't expect the effects being very different from the vd~ method.
What if they aren't _any_ different ?
A slow 20Hz sinewave modulating some high frequencies will not sound very different if the 20Hz is delayed or not. A 20 hz sound will have a duration which is much longer that the delay.
But it depends on the gain you choose. Suppose you have a weapons-grade giant speaker, with a membrane of a few hectares...
I mean, play with the [*~] and you can get the delay variation to be bigger than the period of a sinewave.
| Mathieu Bouchard ---- tél: +1.514.383.3801 ---- Villeray, Montréal, QC
Hi!
On 19.11.2010 05:33, Mathieu Bouchard wrote:
On Wed, 17 Nov 2010, Martin Schied wrote:
did you speak about the "doppler" distortion? true doppler distortion is harmonic for a single sine wave, but not for 2 or more sines of different frequencies.
Then can you explain what's wrong in my reasoning ? (the formulas I wrote)
no, sorry, I can't on the quick. but I know for sure that frequency modulation only produces harmonics if the carrier and modulator are in "simple" relations like 1:5 or your example 200 to 1000.
The frequencies added by fm are multiples of the modulator added and subtracted from the carrier. (carrier; 1000Hz, modulator 11Hz --> pairs in order of strength: 989 + 1011, 978 + 1022 Hz ...) If you have frequencies going below 0Hz they wrap around the y=0Hz axis. Result is a negative freuqency, or likewise the phase is reversed. (for example 1000Hz modulated by 600Hz will have 200Hz in the spectrum)
If you use not-harmonic related frequencies like 320 and 1000 Hz and you will have new frequencies which aren't multiples of 320 and 1000, but inbetween. (580 and 1320, ...), Also you will get frequencies below the 320 Hz. However if you drive the modulation very strong, a patten similar to a harmonic signal will appear, possibly with a new base frequency, but also likely without.
I'm absolutely not familiar with the case of a signal modulating itself, but I'm pretty sure from experiments with your patch (or the new I mad and attached) that there occur very similar (if not identical) effects if you modulate a mix of 1000 + 320 Hz with itself or you use separate carriers for 1000 and 320 Hz and modulate them separately by the mix of 1000 + 320. I'm not sure if this superposition is valid, but I'm pretty sure... at least it sounds relatively similar if I do it in pd. The vd~ sounds always "richer" possibly artifacts. (the spectrum looks very dirty too)
I want to add that the vd~ approach is not the "perfect implementation" for the above described frequency modulatuon. the carrier is delayed against the modulating signal a bit.
You can add another [vd~] or [delread~] to fix that. I think I did that in some other version of haut-parleur-doppler.pd, and if not, I did similar things with other effects.
Like this it simulates a moving listener instead a moving sound source.
But there is no difference between a moving listener and a moving source, apart from the wind.
there is. but for the low speeds of the cone we are simulating the audible effects are not very different. (a moving sound source at the speed of sound produces infinite frequency, a moving listener at speed of sound hears only doubled frequency).
What you mean is, regardless of whether it happens in the listener or the source, the motion is out of phase with the actual signal.
exactly and this is why I'd like to move the write head. How did your correction using vd~ work?
Unfortunately I don't know of such externals already existing. However I don't expect the effects being very different from the vd~ method.
What if they aren't _any_ different ?
it's only because of the slight delay I'd be interested to eliminate. But as you also said I don't expect any big difference between the delay free case and the vd~ case as the modulations occuring with a slight off phase will not sound any different. (however 2ms can be quite different for short percussive signals)
A slow 20Hz sinewave modulating some high frequencies will not sound very different if the 20Hz is delayed or not. A 20 hz sound will have a duration which is much longer that the delay.
But it depends on the gain you choose. Suppose you have a weapons-grade giant speaker, with a membrane of a few hectares...
I mean, play with the [*~] and you can get the delay variation to be bigger than the period of a sinewave.
yep, that's also one of the effects I wanted to eliminate by the moving write head.
Martin
On Sat, 20 Nov 2010, Martin Schied wrote:
no, sorry, I can't on the quick. but I know for sure that frequency modulation only produces harmonics if the carrier and modulator are in "simple" relations like 1:5 or your example 200 to 1000.
I think that my reasoning is mostly correct and that our difference is that while I'm insisting that periodic signals remain periodic, you are insisting that nonperiodic signals remain nonperiodic, or something like that.
If you use not-harmonic related frequencies like 320 and 1000 Hz
gcd(320,1000)=40.
320 is the 8th harmonic of 40 Hz, while 1000 is the 25th harmonic of 40 Hz.
will have new frequencies which aren't multiples of 320 and 1000, but inbetween. (580 and 1320, ...),
You mean 680 and 1320. Note that those are both multiples of 40.
and attached) that there occur very similar (if not identical) effects if you modulate a mix of 1000 + 320 Hz with itself
You will get harmonics of 40 Hz, or if you do it real strong, you will get harmonics of 20 Hz if your sampling rate is 44100 Hz, due to reflection at Nyquist rate.
The vd~ sounds always "richer" possibly artifacts. (the spectrum looks very dirty too)
Probably due to the use of Lagrange interpolation instead of something suitable for splines, such as Natural Spline interpolation. I still want to make my own version of vd~ using the latter... not now.
But there is no difference between a moving listener and a moving source
I was wrong. IIRC, that statement is only true for light, not sound. (?)
(a moving sound source at the speed of sound produces infinite frequency, a moving listener at speed of sound hears only doubled frequency).
Why are you not taking the direction of the motion into account ?
If you go at speed v towards a static sound source, you hear everything at speed 1+v/c, whereas if you move away from it, you hear everything at speed 1-v/c.
exactly and this is why I'd like to move the write head. How did your correction using vd~ work?
The correction I made just uses a [delread~].
For example if you have [+~ 1]-[*~ 5]-[+~ 2], you need a [delread~ a 7], because 1*5+2 = 7.
it's only because of the slight delay I'd be interested to eliminate. But as you also said I don't expect any big difference between the delay free case and the vd~ case as the modulations occuring with a slight off phase will not sound any different. (however 2ms can be quite different for short percussive signals)
Well, it does sound different in some way, but the changes I get by changing that delay, are less special than what I get by making that effect happen in the first place, instead of not. It makes me think of other delay tricks such as comb filters.
yep, that's also one of the effects I wanted to eliminate by the moving write head.
If you make a "moving write head" thing, though, it needs to be additive, and the energy has to get stretched like the derivative of the motion (the speed of the head). The data may have to be spread into a not-very-bounded amount of array elements.
| Mathieu Bouchard ---- tél: +1.514.383.3801 ---- Villeray, Montréal, QC
Hi!
On 20.11.2010 05:25, Mathieu Bouchard wrote:
On Sat, 20 Nov 2010, Martin Schied wrote:
no, sorry, I can't on the quick. but I know for sure that frequency modulation only produces harmonics if the carrier and modulator are in "simple" relations like 1:5 or your example 200 to 1000.
I think that my reasoning is mostly correct and that our difference is that while I'm insisting that periodic signals remain periodic, you are insisting that nonperiodic signals remain nonperiodic, or something like that.
yes. My thinking of 'non harmonic" distortion is if you have a signal whose preceived pitch frequency is harmonically unrelated to the new perceived pitch after distortion. So if you had a signal of 100Hz (200, 300, 400 ... Harmonics) base pitch and add a 70Hz and 130Hz they would not fit the old spectrum very well. You will again find a common 'base' frequency, for example 10Hz in this case, but 10Hz bands are too small in frequencies of 200, 300, 400Hz to be perceived as harmonics. But it's difficult to argue about such effects as we had to do many listening experiments before...
The correction I made just uses a [delread~].
For example if you have [+~ 1]-[*~ 5]-[+~ 2], you need a [delread~ a 7], because 1*5+2 = 7.
oh, great indeed :)
it's only because of the slight delay I'd be interested to eliminate. But as you also said I don't expect any big difference between the delay free case and the vd~ case as the modulations occuring with a slight off phase will not sound any different. (however 2ms can be quite different for short percussive signals)
Well, it does sound different in some way, but the changes I get by changing that delay, are less special than what I get by making that effect happen in the first place, instead of not. It makes me think of other delay tricks such as comb filters.
I'm curious what you planned...
yep, that's also one of the effects I wanted to eliminate by the moving write head.
If you make a "moving write head" thing, though, it needs to be additive,
that's easy doable
and the energy has to get stretched like the derivative of the motion (the speed of the head).
or accumulated. there also might happen a supersonic bang (but before, there are problem with the sampling theoreme not been met anymore).
The data may have to be spread into a not-very-bounded amount of array elements.
its bounds could be set to a fixed maximum, like for [delwrite 1000].
too much to start off for me, I should learn proper c before and know more about interpolation (and the internals of pd too).
Martin
On Sat, 20 Nov 2010, Martin Schied wrote:
On 20.11.2010 05:25, Mathieu Bouchard wrote:
For example if you have [+~ 1]-[*~ 5]-[+~ 2], you need a [delread~ a 7], because 1*5+2 = 7.
oh, great indeed :)
That was dumb. If the incoming signal is in the -1<=y<=1 range, you need (1+1)*5+2 = 12 ms instead.
| Mathieu Bouchard ---- tél: +1.514.383.3801 ---- Villeray, Montréal, QC