hi again,
finally found some time to look closer at the math (I am math-blind without a sheet of paper). The min~ solution is apparently cheaper than Varga's, and the output scaling is not tricky at all -- it is: ((a + 1) / a) * min~(x, a *~ (1 -~ x)). The input (`a' coeff) scaling is best done with an exp, in order to have symmetric control around zero.
Krzysztof
Frank Barknecht wrote:
Krzysztof Czaja hat gesagt: // Krzysztof Czaja wrote:
...
have you tried sending _one_ phasor's output, x, through min~(x, a *~ (1 -~ x)), where a > 0? With one phasor you do not have to make phase adjustments... but scaling may be tricky (atan?)...
...
Last night I found another, similar but simpler solution shown in the
#N canvas 186 64 602 532 12; #X obj 224 439 tabwrite~ osc; #X obj 224 395 metro 1000; #X obj 224 359 tgl 15 0 empty empty empty 0 -6 0 8 -260818 -1 -1 1 1; #X obj 39 305 min~; #N canvas 0 0 450 300 graph1 0; #X array osc 880 float 0; #X coords 0 1 879 -1 200 140 1; #X restore 324 225 graph; #X obj 70 218 -~; #X obj 70 172 sig~ 1; #X floatatom 39 22 5 0 0; #X obj 39 481 dac~; #X obj 39 433 *~ 0.25; #X obj 39 395 -~ 0.5; #X msg 39 60 $1 5; #X floatatom 222 22 5 0 0; #X obj 328 97 osc~ 5; #X obj 222 97 line~; #X msg 222 60 $1 5; #X obj 222 261 +~ 1; #X obj 222 305 /~; #X obj 222 172 expr~ exp($v1); #X obj 39 349 *~; #X obj 70 261 *~; #X obj 222 135 clip~ -88 88; #X obj 39 97 line~; #X obj 39 135 phasor~; #X obj 121 22 loadbang; #X msg 121 60 110; #X floatatom 328 60 5 0 0; #X connect 1 0 0 0; #X connect 2 0 1 0; #X connect 3 0 19 0; #X connect 5 0 20 0; #X connect 6 0 5 0; #X connect 7 0 11 0; #X connect 9 0 8 0; #X connect 9 0 8 1; #X connect 10 0 9 0; #X connect 11 0 22 0; #X connect 12 0 15 0; #X connect 14 0 21 0; #X connect 15 0 14 0; #X connect 16 0 17 0; #X connect 17 0 19 1; #X connect 18 0 16 0; #X connect 18 0 20 1; #X connect 18 0 17 1; #X connect 19 0 0 0; #X connect 19 0 10 0; #X connect 20 0 3 1; #X connect 21 0 18 0; #X connect 22 0 23 0; #X connect 23 0 3 0; #X connect 23 0 5 1; #X connect 24 0 25 0; #X connect 25 0 7 0; #X connect 26 0 13 0;