manipulate problem with symboltrack

• To: mathgroup at smc.vnet.net
• Subject: [mg100584] manipulate problem with symboltrack
• From: Sunt <SunTing.05 at gmail.com>
• Date: Mon, 8 Jun 2009 03:06:10 -0400 (EDT)

```hi all,

first code here:

Manipulate[
(*chord elements generation*)
result = select[opt];
sn1 = result[[1]];
sn2 = result[[2]];
key = result[[3]];
chord = playChord[sn1, sn2, key, opt, instr];

(*locators generation*)
locators = locatorsDB[[opt]];

Grid[{{
(*EmitSound@chord,*)chord
},
{Which[
(*time < 0.01,
counter=0,*)
counter == 0,
counter++,
counter == Length[sn2c],
Null (* do nothing *),
time > sn2c[[counter]],
counter++;
EmitSound[Sound[SoundNote[sn1[[counter]], sn2[[counter]]]]]
];
i = counter;
l = Length@locators;
If[Mod[i, l] == 0, k = Quotient[i, l] - 1, k = Quotient[i, l]];
i = counter - 15*k;
dancer[1, i, locators]}
}]
,

{{opt, 1, "Style"}, {1 -> "Happy", 2 -> "Calm", 3 -> "Sad",
4 -> "Heart-broken"}, ControlType -> PopupMenu},
{{instr, "Piano", "Instrument"}, instrDB, ControlType -> PopupMenu},

{{time, 0, "Trigger"}, 0, Last[sn2c], 1,
ControlType -> Trigger},(**)
{{counter, 0}, ControlType -> None},

]

I'm quite puzzled with the problem:
how to keep variable "opt" without being updated while changing other
variables?

```

• Prev by Date: Re: Mathematica bug??
• Next by Date: Help with FindMinimum
• Previous by thread: Re: bandmatrix
• Next by thread: Help with FindMinimum