Sample name stored in a variable

thanks for your answer.
Well the best solution is the array solution the simpler or the hash the more easy in my case.
and there are solutions i can understand easily :slight_smile:
So the question about the dynamic variables is topic off because useless to achieve what i want to do.

But, not to die silly, i try this code

x = "foo"
instance_variable_set x, 42
p "The value of #{x} is #{instance_variable_get x}"

and it fails. Can we write any kind of ruby code in sonic Pi interface ?

I give you some feedback of my small project as soon as possible.
cheers