Thee shall not pass
Hi everyone, i tried searching the forum for an answer to my query but couldnt really find anything, its quite specific:
I need an object/series-of-objects that allow only certain values to be passed through it. The values will come from a counter and so will be ints. For example, for a [counter 1 10], something that only lets the numbers 3, 6 and 7 thru. But i need to be able to change the number which are allowed thru (eg. now let 3, 5, 8 and 9 thru) while the patch is locked.
Does anyone know of an object/series-of-objects that could help?
funbuff would work. Check the help file. Set whatever you want to pass with a 1 and use a gate.
On 7 mars 07, at 14:32, Bill Murray wrote:
> I need an object/series-of-objects that allow only certain values to
> be passed through it. The values will come from a counter and so will
> be ints. For example, for a [counter 1 10], something that only lets
> the numbers 3, 6 and 7 thru. But i need to be able to change the
> number which are allowed thru (eg. now let 3, 5, 8 and 9 thru) while
> the patch is locked.
There are many ways...
A couple of [split n n] for instance.
Now if the number of ints you want to track is variable and can be
high, it may be a little inelegant to do so.
_____________________________
Patrick Delges
Centre de Recherches et de Formation Musicales de Wallonie asbl
http://users.skynet.be/crfmw/max
Wouldn't it work with just a single 'zl sect'?
This is one of those cases where there is no single object to do what you want because doing so involves the manipulation of some number of very simple Max objects. There are any number of ways to do this, using the split, route, or basic test objects. For one thing, you could go have a look at the tutorial chapter on testing values....
Made an example:
thanks guys for your input, but i can't see how any of those things may work. granted this is probably down to my inexperience but if i describe my problem more specifically, maybe someone can explain.
i have numbers going into a funbuff (right inlet). when each number is sent to funbuff, it triggers a counter (counting from 1 to 5) which sends its value to the left inlet of funbuff and is therfore the address of the number i initially sent. (i use a buddy to make sure things arrive at the right time)
the numbers are retrieved from funbuff using a [random 5] (1 is added to the value coming from random to make it in range) when stored numbers come out of funbuff, they are played as a midi note (there is a similar velocity system)
so if i decide i dont want notes 2 and 3 not to be played when [random] sends their address to funbuff, i need something which allows me to either stop the numbers 2 and 3 going into funbuff or something which catches them on the way out and re-routes them (but because "2" and "3" are addresses, i need something which will know the address of the stored value exiting funbuff)
now i know i could use a route after the random object to route numbers 2 and 3 elsewhere - easy. but i need to be able to change the argument of the route while the patcher is locked - and i need to change the number of arguments. e.g. i may want to turn of notes 2 and 3 for a while, but then i want to turn 2 on again, and have 3, 4, and 5 off.
Sorry if i havent explained myself well, i may be going about this all wrong.
thanks for reading :)
if I understand what you want to do, I would use the table object.
Set table size to 5 (if you have 5 notes) and table range to 2 (0 -
no play, 1 - play).
Best,
Juergen
Am 07.03.2007 um 19:38 schrieb Bill Murray:
>
> thanks guys for your input, but i can't see how any of those things
> may work. granted this is probably down to my inexperience but if i
> describe my problem more specifically, maybe someone can explain.
>
> i have numbers going into a funbuff (right inlet). when each number
> is sent to funbuff, it triggers a counter (counting from 1 to 5)
> which sends its value to the left inlet of funbuff and is therfore
> the address of the number i initially sent. (i use a buddy to make
> sure things arrive at the right time)
>
> the numbers are retrieved from funbuff using a [random 5] (1 is
> added to the value coming from random to make it in range) when
> stored numbers come out of funbuff, they are played as a midi note
> (there is a similar velocity system)
>
> so if i decide i dont want notes 2 and 3 not to be played when
> [random] sends their address to funbuff, i need something which
> allows me to either stop the numbers 2 and 3 going into funbuff or
> something which catches them on the way out and re-routes them (but
> because "2" and "3" are addresses, i need something which will know
> the address of the stored value exiting funbuff)
>
> now i know i could use a route after the random object to route
> numbers 2 and 3 elsewhere - easy. but i need to be able to change
> the argument of the route while the patcher is locked - and i need
> to change the number of arguments. e.g. i may want to turn of notes
> 2 and 3 for a while, but then i want to turn 2 on again, and have
> 3, 4, and 5 off.
>
> Sorry if i havent explained myself well, i may be going about this
> all wrong.
>
> thanks for reading :)
[zl sect] is your friend:
On Mar 7, 2007, at 1:32 PM, Bill Murray wrote:
>
> Hi everyone, i tried searching the forum for an answer to my query
> but couldnt really find anything, its quite specific:
>
> I need an object/series-of-objects that allow only certain values
> to be passed through it. The values will come from a counter and so
> will be ints. For example, for a [counter 1 10], something that
> only lets the numbers 3, 6 and 7 thru. But i need to be able to
> change the number which are allowed thru (eg. now let 3, 5, 8 and 9
> thru) while the patch is locked.
>
> Does anyone know of an object/series-of-objects that could help?
ooops... my mail client isn't properly threading, sorry for the late
(and redundant) reply
On Mar 8, 2007, at 4:16 PM, evan.raskob [lists] wrote:
> [zl sect] is your friend:
>
>
>
>
> #P window setfont "Sans Serif" 9.;
> #P number 179 167 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P window linecount 1;
> #P message 339 136 50 196617 5 6 7;
> #P message 339 167 50 196617 1 2 3 4;
> #P message 295 162 14 196617 5;
> #P message 231 282 50 196617 4;
> #P newex 231 252 79 196617 prepend set;
> #P message 237 118 14 196617 1;
> #P newex 231 204 79 196617 zl sect 1 2 3 4;
> #P window linecount 2;
> #P comment 179 81 234 196617 zl sect will pass an int (or list)
> only if it is part of a stored list (changed via the right inlet);
> #P connect 8 0 1 0;
> #P connect 7 0 1 1;
> #P connect 6 0 1 1;
> #P connect 5 0 1 0;
> #P connect 3 0 4 0;
> #P connect 1 0 3 0;
> #P connect 2 0 1 0;
> #P window clipboard copycount 9;
>
>
> On Mar 7, 2007, at 1:32 PM, Bill Murray wrote:
>
>>
>> Hi everyone, i tried searching the forum for an answer to my query
>> but couldnt really find anything, its quite specific:
>>
>> I need an object/series-of-objects that allow only certain values
>> to be passed through it. The values will come from a counter and
>> so will be ints. For example, for a [counter 1 10], something that
>> only lets the numbers 3, 6 and 7 thru. But i need to be able to
>> change the number which are allowed thru (eg. now let 3, 5, 8 and
>> 9 thru) while the patch is locked.
>>
>> Does anyone know of an object/series-of-objects that could help?
>
Bill Murray schrieb:
> I need an object/series-of-objects that allow only certain values to
> be passed through it. The values will come from a counter and so will
> be ints. For example, for a [counter 1 10], something that only lets
> the numbers 3, 6 and 7 thru. But i need to be able to change the
> number which are allowed thru (eg. now let 3, 5, 8 and 9 thru) while
> the patch is locked.
My humble attempt:
--
Stefan Tiedje------------x-------
--_____-----------|--------------
--(_|_ ----|-----|-----()-------
-- _|_)----|-----()--------------
----------()--------www.ccmix.com
Hehe, seems to me Stefan your 'p ass' is an exact remake of 'zl sect' for int inputs??
Both these examples allow only certain values though. To block certain numbers from going into funbuff, I'd make a list that includes all numbers in your range except the numbers to be blocked.
This isn't beautiful, but as long as your list isn't very long it's ok: