Demanding a data change on oversteping Amplitude threshold

I am trying to add a frequency to a base freq of 200 hz, every time a hit happens in the input live signal. I thought a demand is the correct way to do this, but the following try is not responding. Can any one help understand why is this way of using demands doesn’t work? Poll is printing 0s all the time.

(
{
	var hit = A2K.kr(Amplitude.ar(SoundIn.ar)) > 0.1;
	SinOsc.ar(220 + Demand.kr(hit, 0, Dseq([50, 100, 150], inf)).poll, mul: 0.2)
}.play
)

Is the amplitude actually going above 0.1? It might not be. If it’s not, then you’d have no triggers = no change in output.

hjh

1 Like

When I run your code, it doesn’t produce the error you’re describing, which makes me think something is going wrong with SoundIn.
I’d check your input device and its level.

1 Like

The problem was indeed just the gain of my soundcard!