I'd go with putting 0 - 127 as creation arguments in your range object. As in:
[range 0 127 0 127]
Then have two fixed variable boxes with your abstraction arguments
[$1], [$2] witha loadbang being fed into them and then to the right two inlets of your range object.
I'm not entirely sure, but if there's no creation argument for your abstraction this will probably not output a float on the loadbang. (I'd have to check this and don't have time to right now). Best guess would be it will throw a couple of errors but won't change the arguments for range. Therefore defaulting to 0 - 127 if the arguments aren't set.
Do let me know if this helps.
Andrew
Date: Mon, 20 Sep 2010 14:54:58 +0200 From: rafael.raccuia@blindekinder.com To: jbturgid@hotmail.com CC: pboivin@gmail.com; pd-list@iem.at 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: pboivin@gmail.com
To: jbturgid@hotmail.com
CC: pd-list@iem.at
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
jbturgid@hotmail.com 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
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management ->
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list