tong~.pd - 4kb
tong~ is a damped harmonic motion oscillator built using only 4 of the cheapest audio atoms. It treats the real part of a cpole~ filter as velocity and the imaginary part as displacement. Initial excitation is provided by a 1 sample pulse optionally scaled by velocity. The parameters of the cpole~ establish the angular velocity and decay of the system.
bang the first inlet to generate a 'tong'
send 1..127 to first inlet for different velocity hits
send list [freq, vel] to set freq per-hit
other inlets set frequency in Hz, decay halflife in ms
The left outlet is very 'clicky', with a discontinuity at the start, think of this as velocity. Useful for control.
The right outlet is softer, no discontinuities. Think of this as displacement. It still clicks at the start due to the discontinuity in the first derivative. Useful for audio.
All questions and ideas for improvements welcome!