Thank's for that, I thing I'll stay without defaults the moment, but I'll remember this approach. I added a 'bang' option, so object outputs a bang instead of a value for non-zero midi value, for use with a button. The list now has a third item, 0 or 1, to indicate if it's enabled or not... cheers, r
Le lundi 20 septembre 2010 à 20:37 +0100, Andrew Faraday a écrit : > hey > > > I've put together a little abstraction (attached) to demonstrate the > defaulting I mentioned earlier. Either give it no arguments for the > range object to output 0 to 127 or set your top and bottom range with > this. Unfortunately without arguments the fixed variable boxes stuck > on zero, I've added some conditional logic so this will work unless > you set the second argument as 0. Then it will default to 127. Either > way, hope this helps. > > > Andrew > > > ______________________________________________________________________ > Date: Mon, 20 Sep 2010 14:54:58 +0200 > From: [email protected] > To: [email protected] > CC: [email protected]; [email protected] > Subject: Re: [PD] midi learn > > hi, > I also patched a midi learn abstraction... then I found this > discussion and replaced all [select] by [==]... Thank's :-) > Hope you'll enjoy this one: both cc and channel values are saved in an > external message box with a [set( message in the abstraction itself... > so no need to re-learn on each session. Two arguments to scale your > 0-127: can be negative numbers or reversed scale. > Maybe somebody can help me with that: I didn't found a way to set > 0-127 as default. So the two arguments are obligatory... > cheers > raf > > Andrew Faraday a écrit : > I actually prefer your solution to mine, the [==] boxes are > exactly what I was looking for and would have saved quite a > lot of logic. Also I didn't think of [t a a a] which would > have saved quite a lot of time. Will have to keep an eye on > these for future work. > > > I've got you in one place, tho. you can use [*] for > conditional logic (with a [bang]) to activate when the right > inlet changes. instead of multiple spigots. The logic goes, if > all of them are 1, the result is 1. If any are 0, the result > is zero. Useful stuff. Although more useful when you're > working in audio, usually with [expr~] and the inlets of [*~] > are summing. > > > I've gone on a bit of a tangent here. Always interested in > approaches to logic in pd, tho. > > > Andrew > > > > > Date: Wed, 4 Aug 2010 13:20:51 -0400 > > Subject: Re: [PD] midi learn > > From: [email protected] > > To: [email protected] > > CC: [email protected] > > > > Hi Andrew, > > > > I made something similar a couple of weeks ago, as I needed > a quick > > way to map midi controllers. It's only for CC though... > > > > > > Patrick > > > > > > On Tue, Aug 3, 2010 at 1:09 PM, Andrew Faraday > <[email protected]> wrote: > > > Hey All, > > > > > > I don't know if anyone's done this but I've attached a > midi learn > > > abstraction I've been working on. The logic's a bit messy > but I got it > > > working in the end. > > > > > > Basically from banging the learn patch it listens to the > next signal, either > > > a note or a control signal, and then filters out only the > velocity or > > > control value from that. (I've started taking an interest > in controlling > > > patches with the velocity, as opposed to the note number). > > > > > > Let me know what you think, and if you know of anything > similar being done. > > > > > > Cheers > > > > > > Andrew > > > > > > _______________________________________________ > > > [email protected] mailing list > > > UNSUBSCRIBE and account-management -> > > > http://lists.puredata.info/listinfo/pd-list > > > > > > > > > ______________________________________________________________ > > _______________________________________________ > [email protected] mailing list > UNSUBSCRIBE and account-management -> > http://lists.puredata.info/listinfo/pd-list >
#N canvas 155 226 565 559 10; #X obj 57 245 loadbang; #X obj 57 317 -; #X obj 57 341 / 127; #X obj 42 378 *; #X obj 57 269 t b b; #X obj 57 292 f \$2; #X obj 90 292 f \$1; #X obj 42 401 + \$1; #X obj 42 426 outlet; #X obj 222 380 outlet; #X obj 240 345 loadbang; #X obj 117 5 inlet; #X obj 195 212 spigot; #X obj 75 65 ctlin; #X obj 75 183 spigot; #X obj 75 120 spigot; #X obj 201 103 tgl 11 0 empty \$0-learn empty 17 7 0 10 -24198 -24198 -24198 1 1; #X obj 240 212 spigot; #X obj 195 345 t b a; #X obj 195 433 \$0; #X msg 195 457 \; \$1-learn color 16 16 16; #X obj 313 328 \$0; #X msg 313 352 \; \$1-learn color 13 13 13; #X obj 341 292 \$0; #X msg 341 316 \; \$1-learn color 0 0 0; #X obj 313 239 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 1 1; #X obj 313 263 select 1 0; #X obj 313 217 metro 300; #X msg 313 191 stop; #X obj 195 406 t b b; #X obj 108 93 ==; #X obj 88 154 ==; #X obj 42 213 gate 2; #X obj 117 29 unpack f f f; #X obj 6 187 + 1; #X obj 115 245 select 0; #X obj 160 388 t b; #X obj 213 103 tgl 11 0 \$0-bang-s \$0-bang-r B! 1 6 0 7 -262144 -262144 -262144 1 1; #X obj 386 419 select 1 0; #X obj 414 443 \$0; #X obj 386 479 \$0; #X msg 414 467 \; \$1-bang-r color 0 0 0; #X msg 386 503 \; \$1-bang-r color 22 22 0; #X obj 6 141 r \$0-bang; #X obj 195 266 pack f f f; #X obj 186 58 s \$0-bang; #X obj 252 240 r \$0-bang; #X msg 195 296 set \$1 \$2 \$3; #X obj 288 56 r \$0-bang-s; #X obj 287 28 list split 2; #X obj 288 82 list prepend; #X obj 386 397 r \$0-bang; #X connect 0 0 4 0; #X connect 1 0 2 0; #X connect 2 0 3 1; #X connect 3 0 7 0; #X connect 4 0 5 0; #X connect 4 1 6 0; #X connect 5 0 1 0; #X connect 6 0 1 1; #X connect 7 0 8 0; #X connect 10 0 9 0; #X connect 11 0 33 0; #X connect 11 0 49 0; #X connect 12 0 44 0; #X connect 13 0 15 0; #X connect 13 1 12 0; #X connect 13 1 31 0; #X connect 13 2 17 0; #X connect 13 2 30 0; #X connect 14 0 32 1; #X connect 15 0 14 0; #X connect 16 0 12 1; #X connect 16 0 17 1; #X connect 16 0 27 0; #X connect 17 0 44 1; #X connect 18 0 9 0; #X connect 18 0 16 0; #X connect 18 0 29 0; #X connect 18 1 9 0; #X connect 19 0 20 0; #X connect 21 0 22 0; #X connect 23 0 24 0; #X connect 25 0 26 0; #X connect 26 0 21 0; #X connect 26 1 23 0; #X connect 27 0 25 0; #X connect 28 0 27 0; #X connect 29 0 19 0; #X connect 29 1 28 0; #X connect 30 0 15 1; #X connect 31 0 14 1; #X connect 32 0 3 0; #X connect 32 1 35 0; #X connect 33 0 31 1; #X connect 33 1 30 1; #X connect 33 2 45 0; #X connect 34 0 32 0; #X connect 35 1 36 0; #X connect 36 0 8 0; #X connect 38 0 40 0; #X connect 38 1 39 0; #X connect 39 0 41 0; #X connect 40 0 42 0; #X connect 43 0 34 0; #X connect 44 0 47 0; #X connect 46 0 44 2; #X connect 47 0 18 0; #X connect 48 0 50 0; #X connect 49 0 50 1; #X connect 50 0 47 0; #X connect 51 0 38 0; #X coords 0 -1 1 1 30 15 1 200 100;
_______________________________________________ [email protected] mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
