• ### Explanation for lop~ object in this patch requested

Hi all,

could someone be so kind as to explain the workings of the lop~ object in this patch to me?
This is a "simple" scrubbing bar that let's the user "scrub" through the loaded audio file by moving the horizontal slider. The lop~ was inserted to make this specific kind of "tape-start" / "tape-stop" effect that is familiar from some DAWs and DJing software.

It's hard for me to even formulate a question properly but it revolves about the fact that a filter object that usually is used for frequency-domain tasks (for example filtering high frequencies out from an audio stream) in this case is used as a time-domain-effect, i.e. creating a certain start-up / slow-down effect. I can't get my head around this. What's also confusing / interesting is that when you monitor the number outputs from the line~ and the lop~ with a snapshot~ object every 1ms the lop~ will output different numbers for some time while the line~ has already stopped outputting anything. How come? What does that mean for when you actually use lop~ as a "classic" audio filter to low-pass, say, a mic input or instrument recording.

I hope my question / confusion is somehow comprehensible. I am highly grateful for any explainations, preferably in layman's terms

oyster

p.s.: the patch is from Andy Farell's super interesting lecture on Microsound - Granular Synthesis - Physical Modelling - Procedural Audio which I'm trying to follow along. youtube.com /watch?v=Qxqtc2bgDpw

• Posts 16 | Views 741
• @s.elliot.perez well, yes and no
You are right that the lower frequencies generally stick around and the higher ones get filtered out,
One thing to keep in mind is that a 1-pole filter has a very shallow frequency roll-off, so even if you set it at 1hz many other frequencies will "get through".
The exponential ramp is the linear combination of all of the sine waves (at their specific volumes) that the one-pole filter will let through at a specific "cutoff frequency", which is correlated to the steepness of the ramp. (A steep band-pass filter or even a steep low pass filter, on the other hand, might do what you say because it only lets through one narrow band of frequency)

• @s.elliot.perez I would recommend using lag~ if you are interested in using lop~ like this. it is exactly the same, but uses 60db time calculated from dbpole. There is a version of lag~ made in vanilla (lagtime~) in the other thread also.

Otherwise you would have to use the inverse of the function lop~ uses internally to pass in the right hz in order to get the specific coefficient that will give you the right 60db time, rather than passing in the coefficient directly.

• @s.elliot.perez lol actually I tried it it wasn't that bad, this should convert a 60db decay time in ms into a frequency for lop~ mstolop.pd
edit: basically you get the nth root of .001 (n = no. of samples) using ln & e^x and that's the pole value.

• @seb-harmonik.ar OK, I kind of get it. But what about [hip~] in this patch?

hipThing.pd

Whereas [lop~] goes from 0 to 1 when it gets a 1 and from 1 to 0 when receiving a 0, [hip~] goes from from 1 to 0 when it gets a 1 and -1 to 0 when it gets a 0. Why is this? I found this used to make a certain kind of impulse curve as can be seen to the right where the bang is. Slowing down the instant click to a 2ms change seems to create a mixture of both curves that goes from 1, past 0 and then back up to 0.

• @s.elliot.perez I don't think it has anything to do with [hip~]
I think with [vline~] things get complicated. It interpolates when it's time goes beyond 1 sample....... http://msp.ucsd.edu/techniques/v0.11/book-html/node52.html ..... but see the mention of fold-over as well in that page. That probably explains the -1 weirdness.
Using a time of 0.0227 ms at 44.1K pretty much gives the expected graph...... hipThing2.pd

[sig~]
An abrupt 1 or zero from [sig~]...... ?
I am not sure, but I can imagine that in this case the [hip~] sees a frequency of 0 Htz. It has no idea of the frequency because it receives a constant stream of incoming values of 0 or 1.

There used to be in "extended" in "extra/sigpack" an object called [impulse~] that generated single sample impulses at a defined frequency, and should be a better testing object. It depends on what you are looking for. The [vline~] timings above do work.
David.

• @s.elliot.perez if you think about it in the frequency domain, hip~ is supposed to "block" dc (constant values) so feeding it a stream on constant 1s will make it go to 0. (feeding constant anything will make it go to 0)

If we get into the design of this filter, as documented here http://msp.ucsd.edu/techniques/v0.11/book-html/node141.html#sect08.highpass we see that the highness filter is pretty much just a lowpass filter with a "zero" at 1. A "zero" at 1 has the effect of differentiating a signal, (whereas a "pole" at 1 would integrate it). so, when your signal goes from 1 to zero suddenly the derivative will be -1 for a split second, and then the "pole" will take over if the input stays constant (derivative of 0)
(& obviously the same thing happens when the signal jumps to 1, you get derivative of 1 that then ramps to 0)

• @seb-harmonik.ar When you say 'A "zero" at 1', what do you mean by 'at 1'? The constant stream of 1s from the [sig~] or [vline~]? Or are you saying that the 1 & 0 from [sig~] correspond to "pole" & "zero"?

• @s.elliot.perez a "zero" is a mathematical point in the complex plane where a function of a complex number is 0. the equation (1-az^-1) is 0 when z=a, we call "a" a zero of the function. so a zero at 1=a corresponds to the function 1-z^-1. this is the z-transform of a time domain equation y[n] = x[n] - x[n -1] where x is the input sequence, n is the current sample, and y is the output sequence. it is a "discrete" differentiator.
https://ccrma.stanford.edu/~jos/filters/

• @seb-harmonik.ar

@seb-harmonik.ar said:

the equation (1-az^-1) is 0 when z=a

Yes, I understand.

, we call "a" a zero of the function. so a zero at 1=a corresponds to the function 1-z^-1. this is the z-transform of a time domain equation y[n] = x[n] - x[n -1] where x is the input sequence, n is the current sample, and y is the output sequence. it is a "discrete" differentiator.

OK, so what sequence of input values is leading to the -1?

Posts 16 | Views 741
Internal error.

Oops! Looks like something went wrong!