you could also use [list-find] and a list of 1's and 0's
If I understand you correctly, you basically need a table of the size
18. Then you can use [tabwrite] to set any of the IDs (0-17) on or off
(respectively: 1 or 0).
Use [tabread] to check the state of a certain ID.
Roman
On Tue, 2010-08-17 at 16:30 +0100, Joćo de Brito Rocha Reis Vidigal
wrote:
> Here I am again!!!
>
> This time with a list problem! Or at least I think it's a list problem!
>
> Here's what I wanna do:
>
> I have 18 slot for audio and video to play. There can be one playing, none or even um to the 18.
> These slots are to be triggered randomly.
> Is there a possibility of storing the ID of the slots already triggered? Like a list? The thing is that if it is a list it would have to have a variable number of floats (wouldn't it?).
> Why do I need this? Because after triggering a random slot ON I want to trigger a random slot OFF. So, I have to know what are the slots triggered on in order to trigger one of these OFF and not one 18. Otherwise I could end up triggering off a slot that was never on!
> As well I need to know witch ones are OFF to randomly select and turn one on.
>
> I don't know if was very clear!!! I hope so!
> Thanks guys!
> _______________________________________________
> Pd-list@iem.at mailing list
> UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
_______________________________________________
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list