[line] outputs a linear ramp, so you just need to apply a transfer function to get the behavior you want. For example, if you want a gradual start and gradual, you could use the second half of a cosine wave.

I have an abstraction called [cline] that supports various shapes (see attachment).

Christof

On 26.09.2023 20:06, Peter P. wrote:
Hi list,

often when I use [line¨] to make frequency glissandi, the point when the
ramp starts, and the point where it ends, appear as very sudden events
to my ears. I am wondering if there is an easy way to gradually speed up
the ramp when it starts, and slow it down before it reaches its target
value?
The only way I can think of so far is to model such a behavior with two
masses connected by an elastic link using the pmpd library. But a
vanilla way would be very interesting too!

Thanks in advance for all ideas and pointers!
cheersz, Peter



_______________________________________________
Pd-list@lists.iem.at mailing list
UNSUBSCRIBE and account-management -> 
https://lists.puredata.info/listinfo/pd-list
#N canvas 601 170 834 486 10;
#X obj 138 25 inlet;
#X obj 159 155 -;
#X obj 136 120 t l f b;
#N canvas 307 136 893 547 transfer 0;
#X obj 117 61 r \$0-transfer;
#X msg 117 122 0;
#X msg 147 122 1;
#X msg 215 165 2;
#X msg 228 122 3;
#N canvas 309 228 1087 458 exp 0;
#X obj 419 191 exp;
#X obj 420 227 - 1;
#X text 122 50 normalized natural exponential function;
#X obj 405 72 r \$0-arg;
#X obj 412 128 * -1;
#X obj 355 72 inlet;
#X obj 354 303 outlet;
#X obj 358 162 * 1;
#X obj 359 196 exp;
#X obj 357 232 - 1;
#X obj 355 270 / 1;
#X connect 0 0 1 0;
#X connect 1 0 10 1;
#X connect 3 0 4 0;
#X connect 4 0 0 0;
#X connect 4 0 7 1;
#X connect 5 0 7 0;
#X connect 7 0 8 0;
#X connect 8 0 9 0;
#X connect 9 0 10 0;
#X connect 10 0 6 0;
#X restore 145 260 pd exp;
#N canvas 0 50 450 300 pow 0;
#X msg 148 131 1;
#X obj 148 76 max 0;
#X obj 148 104 select 0;
#X obj 148 45 r \$0-arg;
#X obj 87 130 inlet;
#X obj 107 176 pow 1;
#X obj 106 212 outlet;
#X connect 0 0 5 1;
#X connect 1 0 2 0;
#X connect 2 0 0 0;
#X connect 2 1 5 1;
#X connect 3 0 1 0;
#X connect 4 0 5 0;
#X connect 5 0 6 0;
#X restore 114 228 pd pow;
#X msg 266 122 0;
#X text 300 122 missing or invalid argument is set to 'lin' (0);
#N canvas 769 284 787 443 cos 0;
#X obj 164 165 unpack f f f f;
#X msg 184 108 0.25 -0.25 0 1;
#X msg 204 139 0.25 0.5 1 1;
#X msg 173 81 0.5 0.5 1 0.5;
#X msg 236 232 0;
#X obj 167 21 r \$0-arg;
#X obj 168 56 sel 0 1 2;
#X obj 94 24 inlet;
#X obj 92 278 cos;
#X obj 93 307 + 0;
#X obj 93 337 * 1;
#X obj 93 219 + 0;
#X obj 93 186 * 1;
#X obj 96 374 outlet;
#X obj 93 248 * 6.28319;
#X connect 0 0 12 1;
#X connect 0 1 11 1;
#X connect 0 2 9 1;
#X connect 0 3 10 1;
#X connect 1 0 0 0;
#X connect 2 0 0 0;
#X connect 3 0 0 0;
#X connect 4 0 10 1;
#X connect 5 0 6 0;
#X connect 6 0 3 0;
#X connect 6 1 1 0;
#X connect 6 2 2 0;
#X connect 6 3 4 0;
#X connect 7 0 12 0;
#X connect 8 0 9 0;
#X connect 9 0 10 0;
#X connect 10 0 13 0;
#X connect 11 0 14 0;
#X connect 12 0 11 0;
#X connect 14 0 8 0;
#X restore 176 300 pd cos;
#X obj 117 91 select lin pow exp cos;
#X obj 311 59 r \$0-arg;
#X obj 182 122 demux;
#X obj 311 88 != 0;
#X text 355 89 exp with argument 0 is routet to 'lin';
#X obj 87 394 outlet;
#X obj 63 61 inlet;
#X obj 83 178 demux 0 1 2 3;
#X connect 0 0 10 0;
#X connect 1 0 17 1;
#X connect 2 0 17 1;
#X connect 3 0 17 1;
#X connect 4 0 17 1;
#X connect 5 0 15 0;
#X connect 6 0 15 0;
#X connect 7 0 17 1;
#X connect 9 0 15 0;
#X connect 10 0 1 0;
#X connect 10 1 2 0;
#X connect 10 2 12 0;
#X connect 10 3 4 0;
#X connect 10 4 7 0;
#X connect 11 0 13 0;
#X connect 12 0 1 0;
#X connect 12 1 3 0;
#X connect 13 0 12 1;
#X connect 16 0 17 0;
#X connect 17 0 15 0;
#X connect 17 1 6 0;
#X connect 17 2 5 0;
#X connect 17 3 9 0;
#X restore 116 244 pd transfer;
#N canvas 542 443 817 556 arg 0;
#X obj 112 42 inlet;
#X obj 111 72 route set;
#X obj 195 6 loadbang;
#X obj 163 274 s \$0-arg;
#X obj 49 273 s \$0-transfer;
#X obj 184 73 symbol \$1;
#X obj 259 73 \$2;
#X obj 163 241 f;
#X obj 196 39 t b b;
#X obj 177 175 route bang float;
#X msg 177 200 0;
#X obj 183 108 pack s f;
#X obj 100 205 t s b;
#X obj 110 136 list split 1;
#X connect 0 0 1 0;
#X connect 1 0 13 0;
#X connect 2 0 8 0;
#X connect 5 0 11 0;
#X connect 6 0 11 1;
#X connect 7 0 3 0;
#X connect 8 0 5 0;
#X connect 8 1 6 0;
#X connect 9 0 10 0;
#X connect 9 1 7 1;
#X connect 10 0 7 1;
#X connect 11 0 13 0;
#X connect 12 0 4 0;
#X connect 12 1 7 0;
#X connect 13 0 12 0;
#X connect 13 1 9 0;
#X restore 282 84 pd arg;
#X text 296 52 anything ("set ...");
#X text 22 39 list \; (target \, time);
#X text 340 269 note: it's best to change the shape of the transfer
function when starting a new ramp and not in the middle of an ongoing
ramp. with this technique you can easily design envelope generators
with individual shapes for each section.;
#X text 342 127 use "set" messages to change arguments dynamically:
;
#X text 341 79 creation arguments: \; 1) lin (= default) \, pow \,
exp \, cos \; 2) exponent (pow) \, shape (exp) \, segment (cos);
#X obj 184 25 inlet;
#X text 375 151 lin: linear ramp \; pow: x^a \; exp: exponential function
\, shape determined by 2nd arg. \; 0 = linear \, > 0 = fast rise \,
< 0 = slow rise \; cos: segment of a cosine wave determined by 2nd
arg. 0 = second half (s-shape) \; 1 = last quarter (fast rise) \; 2
= third quarter (slow rise) \;;
#X obj 251 26 inlet;
#X obj 115 156 line;
#X obj 116 184 - 0;
#X obj 114 212 / 1;
#X obj 115 274 * 1;
#X obj 142 305 + 0;
#X obj 195 207 f;
#X obj 142 338 outlet;
#X text 355 22 inlets: 1) target 2) time 3) resolution;
#X obj 138 54 route list float stop;
#X msg 234 114 stop;
#X obj 135 85 pack;
#X msg 178 90 0;
#X connect 0 0 21 0;
#X connect 1 0 15 1;
#X connect 1 0 16 1;
#X connect 2 0 13 0;
#X connect 2 1 1 0;
#X connect 2 2 18 0;
#X connect 3 0 16 0;
#X connect 10 0 23 1;
#X connect 12 0 13 2;
#X connect 13 0 14 0;
#X connect 14 0 15 0;
#X connect 15 0 3 0;
#X connect 16 0 17 0;
#X connect 17 0 18 1;
#X connect 17 0 19 0;
#X connect 18 0 1 1;
#X connect 18 0 14 1;
#X connect 18 0 17 1;
#X connect 21 0 23 0;
#X connect 21 1 23 0;
#X connect 21 2 22 0;
#X connect 21 3 4 0;
#X connect 22 0 13 0;
#X connect 23 0 2 0;
#X connect 23 0 24 0;
#X connect 24 0 23 1;
_______________________________________________
Pd-list@lists.iem.at mailing list
UNSUBSCRIBE and account-management -> 
https://lists.puredata.info/listinfo/pd-list

Reply via email to