I want to fill an audio array of 1024 samples with two exponential curves, a simple attack and decay envelope. While I can easily create the curves I want I'm have a hard time putting them into an array. What is teh best practice for loading different curves into an audio array using tilde objects? I've attached a patch that creates the two curves, if anyone can show me how to get them into the array one after another I'd be most appreciative. I've tried to use a delay object with a 4 millsecond delay but that was no good for me. Again, any suggestions of ideas are most welcome.
Rory.
p.s. as a Csound user I've got really used to using GEN routines. I'm happy not to have them in Pd as it forces me tothink about how the routines work, if I could only figure out how to get them into a table I'd be happy!
You may be interested in using [vline~], which allows you to easily schedule ramps all with one message. You may also be experiencing a problem with synchronizing your event rate delays to the writing of your audio array. Look into [bang~] for stuff like this.
Look at this patch to see if it suits your needs more.
I tend to do this kind of stuff with regular tabwrite and use [until] to do it all at the event rate.
-Stephen
On Wed, Nov 11, 2009 at 4:14 PM, Rory Walsh rorywalsh@ear.ie wrote:
I want to fill an audio array of 1024 samples with two exponential curves, a simple attack and decay envelope. While I can easily create the curves I want I'm have a hard time putting them into an array. What is teh best practice for loading different curves into an audio array using tilde objects? I've attached a patch that creates the two curves, if anyone can show me how to get them into the array one after another I'd be most appreciative. I've tried to use a delay object with a 4 millsecond delay but that was no good for me. Again, any suggestions of ideas are most welcome.
Rory.
p.s. as a Csound user I've got really used to using GEN routines. I'm happy not to have them in Pd as it forces me tothink about how the routines work, if I could only figure out how to get them into a table I'd be happy!
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
maybe my abstraction [jmmmp/array-edit] (in pd-ext) can help you. play
around with it, or tell me about something you might want improved.
I want to fill an audio array of 1024 samples with two exponential curves, a simple attack and decay envelope. While I can easily create the curves I want I'm have a hard time putting them into an array. What is teh best practice for loading different curves into an audio array using tilde objects? I've attached a patch that creates the two curves, if anyone can show me how to get them into the array one after another I'd be most appreciative. I've tried to use a delay object with a 4 millsecond delay but that was no good for me. Again, any suggestions of ideas are most welcome.
Rory.
p.s. as a Csound user I've got really used to using GEN routines. I'm happy not to have them in Pd as it forces me tothink about how the routines work, if I could only figure out how to get them into a table I'd be happy!
Hi,
Rory Walsh:
I want to fill an audio array of 1024 samples with two exponential
in pd there are no "audio array"s its just how you use it
curves, a simple attack and decay envelope. While I can easily create the curves I want I'm have a hard time putting them into an array. What is teh best practice for loading different curves into an audio array using tilde objects? I've attached a patch that creates the two curves, if anyone can show me how to get them into the array one after another I'd be most appreciative. I've tried to use a delay object with a 4 millsecond delay but that was no good for me. Again, any
i attached a version with delay. if you want to do other modifications of the array than just putting thing behind each other the problem is that [tabwrite~] has no possibility to write something at a specific point but from start. for that you could in your case use [tabwrite] - see above - you can play every array at audio speed. i also did an example with [tabwrite] as an example. i hope this helps. g.
(see help->browser->5.reference->all_about_arrays.pd)
suggestions of ideas are most welcome.
Rory.
p.s. as a Csound user I've got really used to using GEN routines. I'm happy not to have them in Pd as it forces me tothink about how the routines work, if I could only figure out how to get them into a table I'd be happy!
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
Hi,
sorry i forgot the attachment ... g.
#N canvas 143 316 1280 944 10; #N canvas 0 22 450 300 (subpatch) 0; #X array array2 1024 float 2; #X coords 0 1 1024 0 200 140 1; #X restore 126 382 graph; #X obj 158 297 tabwrite~ array2; #X obj 132 118 unpack; #X msg 262 80 bang; #X obj 132 196 line~; #X obj 132 228 *~; #X obj 132 257 *~; #X obj 437 348 osc~; #X floatatom 434 308 5 0 0 0 - - -; #X obj 494 422 *~; #X obj 551 318 phasor~; #X obj 551 339 *~ 1024; #X floatatom 546 287 5 0 0 0 - - -; #X obj 551 360 tabread~ array2; #X msg 132 39 0 , 1 4; #X obj 494 448 dac~; #X obj 132 -2 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 -1; #X obj 132 17 t b b b; #X obj 151 65 delay 10; #X msg 151 85 0 20; #X obj 746 152 f; #X obj 784 152 + 1; #X obj 746 122 until; #X msg 746 100 1024; #X obj 746 74 trigger bang bang; #X msg 845 100 0; #X obj 746 48 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 -1; #X obj 842 572 tabwrite array2; #X obj 746 264 sel 1; #X obj 807 264 sel 1; #X obj 746 178 trigger float float float float; #X obj 746 348 -; #X msg 746 390 1 $1; #X obj 746 412 -; #X obj 842 505 *; #X obj 842 549 *; #X obj 842 526 t f f; #X obj 842 482 t f f; #X obj 807 300 f; #X obj 746 300 f; #X obj 807 368 -; #X msg 907 422 1; #X obj 868 264 t f f b; #X text 746 465 start; #X text 807 465 end; #X text 878 100 reset; #X text 820 151 counter 0-1023; #X text 888 465 between; #X obj 746 238 < 120; #X msg 746 327 120 $1; #X obj 746 369 / 120; #X msg 807 347 800 $1; #X obj 807 389 / 800; #X obj 807 238 > 380; #X obj 807 326 - 380; #X connect 2 0 4 0; #X connect 2 1 4 1; #X connect 3 0 1 0; #X connect 4 0 5 0; #X connect 4 0 5 1; #X connect 5 0 6 0; #X connect 5 0 6 1; #X connect 6 0 1 0; #X connect 7 0 9 0; #X connect 8 0 7 0; #X connect 9 0 15 0; #X connect 9 0 15 1; #X connect 10 0 11 0; #X connect 11 0 13 0; #X connect 12 0 10 0; #X connect 13 0 9 1; #X connect 14 0 2 0; #X connect 16 0 17 0; #X connect 17 0 14 0; #X connect 17 1 18 0; #X connect 17 2 3 0; #X connect 18 0 19 0; #X connect 19 0 2 0; #X connect 20 0 21 0; #X connect 20 0 30 0; #X connect 21 0 20 1; #X connect 22 0 20 0; #X connect 23 0 22 0; #X connect 24 0 23 0; #X connect 24 1 25 0; #X connect 25 0 20 1; #X connect 26 0 24 0; #X connect 28 0 39 0; #X connect 29 0 38 0; #X connect 30 0 48 0; #X connect 30 1 53 0; #X connect 30 2 42 0; #X connect 30 3 27 1; #X connect 31 0 50 0; #X connect 32 0 33 0; #X connect 33 0 37 0; #X connect 34 0 36 0; #X connect 35 0 27 0; #X connect 36 0 35 0; #X connect 36 1 35 1; #X connect 37 0 34 0; #X connect 37 1 34 1; #X connect 38 0 54 0; #X connect 39 0 49 0; #X connect 40 0 52 0; #X connect 41 0 37 0; #X connect 42 0 39 1; #X connect 42 1 38 1; #X connect 42 2 41 0; #X connect 48 0 28 0; #X connect 49 0 31 0; #X connect 50 0 32 0; #X connect 51 0 40 0; #X connect 52 0 37 0; #X connect 53 0 29 0; #X connect 54 0 51 0;