[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [sc-users] Silly Question Probably....



How about...

commands = (set of commands);
banned = IdentitySet.new; // or Set.new if you're using strings

When the computer picks a command, it does:

banned.add(command);

When a player hits the pedal, check

banned.includes(command)

If that's false, the command can go through.
hjh

On May 2, 2009, at 2:06 PM, Clifford Dunn wrote:

Ok, so I've been sort of racking my brain for an easy way to do this
(not as good of a programmer as I'd like to pretend to be):

I want to have a series of commands for performers. The commands will
be displayed in a GUI (not a problem so far) in two halves. The first
half will have a command picked by the computer, and the second will
have commands picked by the performers by way of foot pedal
interaction. There are three sets of commands:

speed (fast or slow)
volume (loud or soft)
page number (1 or 2)

So basically, I want the computer to randomly pick one command for the
performers to follow. When this command is selected, I don't want any
foot pedal activity to be able to pick from the same command class
(i.e. if the computer decides to choose "slow" as a command, no one
should be able to hit a pedal to generate "fast" as a command). I'm
sort of lost on how I can go about programming this.


: H. James Harkins
.::!:.:.......:.::........:..!.::.::...:..:...:.:.:.:..:

"Come said the Muse,
Sing me a song no poet has yet chanted,
Sing me the universal."  -- Whitman