Re: [PD] Fwd: basic logic (AND OR) and control in PD
robbert van hulzen wrote: in the case of [tgl] the choice is sometimes one gui object or a number of non-gui ones-- even simply the clarity of a patch can be helped by choosing [tgl]. but thanks for your advice, and i may find ways to use the non-guis instead. sounds like a good principle. everything that can be built with a number of objects, can also be build with 1 single object: just use abstractions. mfa.sdr IOhannes ___ PD-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list
Re: [PD] Fwd: basic logic (AND OR) and control in PD
in the case of [tgl] the choice is sometimes one gui object or a number of non-gui ones-- even simply the clarity of a patch can be helped by choosing [tgl]. but thanks for your advice, and i may find ways to use the non-guis instead. sounds like a good principle. cheers, robbert On 1/23/07 4:03 PM, Roman Haefeli [EMAIL PROTECTED] wrote: hello robbert On Tue, 2007-01-23 at 09:50 +0100, robbert van hulzen wrote: we need teachers like you! ;) i've been wondering about this: is the f+1 counter solution less expensive than a tgl? or does the toggle only slow down screen redraws? cheers, robbert theoretically, banging a [tgl] is more expensive than the [==]/[f ] construct, because - as you mentioned - the redrawing. though you won't notice it, when triggering at a very low rate (e.g. by footpedal). i usually use gui-objects only, when i really make use of the gui-part of the object, which is not the case here. but this might be a matter of taste. roman ___ Der frühe Vogel fängt den Wurm. Hier gelangen Sie zum neuen Yahoo! Mail: http://mail.yahoo.de ___ PD-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list
Re: [PD] Fwd: basic logic (AND OR) and control in PD
we need teachers like you! ;) i've been wondering about this: is the f+1 counter solution less expensive than a tgl? or does the toggle only slow down screen redraws? cheers, robbert Roman Haefeli wrote: hi matthew again i attached a small patch, that shows how i would implement the most simple 'state alternator'. if you want to make state switching dependent on other states, it might be helpfull to have a look at the helppatch of [ ], [|| ], [== ] and such. with these objects, it should be possible to implement the logic you want to achieve. some random tips, that are important, when doing logic-stuff: * many objects with two inlets only send a 'result' to the outlet, when they're triggered by the left ('hot') inlet, whereas, if they get a message at their right ('cold') inlet, only their internal state is changed, but nothing is sent to the outlet. (Section 2.3.3 of the pd-html-manual is more detailed and might be interesting for you) * you should care about execution order. for example, when one outlet is connected to two inlets, the order of execution is *not* defined, or in other words: you don't know, which inlet gets the message first. therefore usually a [trigger]-object is inserted in between in order to avoid 'undefinedness' (have a look at the help of [trigger]). * read the section about the 'depth-first'-principle in pd (section 2.3.2). i hope, that was not too 'teacherish' ;-) roman ___ PD-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list
Re: [PD] Fwd: basic logic (AND OR) and control in PD
Hi, matthew venn wrote: 1/- where can I find documentation on expr? http://crca.ucsd.edu/~syadegar/expr.html lg, P ___ PD-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list
Re: [PD] Fwd: basic logic (AND OR) and control in PD
On Mon, 2007-01-22 at 12:01 +, matthew venn wrote: So I want a bunch of buttons that do *multiple actions, depending on the current state of the sampler*. So for example I gave: * in stop mode, if I press the button we go to record/play mode * in record/play mode, the button closes the loop and stops playback. I will need a few different states, such as * playing * overdubbing * stopped * recording that will be tied to 1 of a few different parallel samplers (probably around 4). hi matthew again i attached a small patch, that shows how i would implement the most simple 'state alternator'. if you want to make state switching dependent on other states, it might be helpfull to have a look at the helppatch of [ ], [|| ], [== ] and such. with these objects, it should be possible to implement the logic you want to achieve. some random tips, that are important, when doing logic-stuff: * many objects with two inlets only send a 'result' to the outlet, when they're triggered by the left ('hot') inlet, whereas, if they get a message at their right ('cold') inlet, only their internal state is changed, but nothing is sent to the outlet. (Section 2.3.3 of the pd-html-manual is more detailed and might be interesting for you) * you should care about execution order. for example, when one outlet is connected to two inlets, the order of execution is *not* defined, or in other words: you don't know, which inlet gets the message first. therefore usually a [trigger]-object is inserted in between in order to avoid 'undefinedness' (have a look at the help of [trigger]). * read the section about the 'depth-first'-principle in pd (section 2.3.2). i hope, that was not too 'teacherish' ;-) roman #N canvas 746 329 458 378 10; #X obj 51 21 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 -1; #X text 73 20 -- switch states; #X obj 51 85 ==; #X obj 93 85 f; #X obj 51 179 select 0 1; #X text 64 58 ; #X text 64 145 ; #X text 82 41 (when hit \, it sends a a 'bang'; #X text 94 109 sends alternating '0' and '1'; #X text 144 174 if input matches \, send 'bang to; #X text 143 191 the appropriate output.; #X text 99 216 ---; #X msg 51 261 stop; #X msg 93 261 play/record; #X obj 51 307 print; #X connect 0 0 2 0; #X connect 2 0 3 0; #X connect 2 0 4 0; #X connect 3 0 2 1; #X connect 4 0 12 0; #X connect 4 1 13 0; #X connect 12 0 14 0; #X connect 13 0 14 0; ___ PD-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list