Ok... I was correct... I didn't make myself clear.
Imagine I have the table (0-17). I want to turn the ID of a random index to 1. Lets say I randomly turn 3 indexes to 1: index 3, 7 and 14. All good until here!!! Now I need to turn one of these off. The issue is how do I know that these are the ones that have an ID 1? The same to the other way around: How do I know that the other ones have an ID 0? Because I want to randomly turn to 1 one of the 0's and/or turn to 0 one of the 1's.
João Vidigal
On 17 Aug 2010, at 16:57, tim vets wrote:
you could also use [list-find] and a list of 1's and 0's gr, Tim
2010/8/17 Roman Haefeli reduzent@gmail.com 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