Page 2 of 2

Re: random selections

Posted: Tue Nov 05, 2013 6:34 pm
by Nubeat7
@ trojak

your first solution is wrong because it sets the not randomized values to the first value of the values array

Code: Select all

..else @values[element]..


in the else path 'element' is always 0!
so all not randomized values are changing to the firts value of the values array

Re: random selections

Posted: Tue Nov 05, 2013 6:56 pm
by tester
Nubeat7 wrote:use array ins and out, if you want a trigger, write it inside the event methode and add a trigger input..

Code: Select all

if'triggerIn'
..methode
end


Tried various ways, but ended up with nothing. Connecting trigger to ins changed nothing. Adding input and line of code on the beginning (and "end" at the end) changed nothing. Still don't get it.

Re: random selections

Posted: Tue Nov 05, 2013 7:25 pm
by Nubeat7
tester wrote:
Nubeat7 wrote:use array ins and out, if you want a trigger, write it inside the event methode and add a trigger input..

Code: Select all

if'triggerIn'
..methode
end


Tried various ways, but ended up with nothing. Connecting trigger to ins changed nothing. Adding input and line of code on the beginning (and "end" at the end) changed nothing. Still don't get it.



hmm, try:

Code: Select all

if i==2
  put the methode from above inside here!
end

#when trigger is @ the 3rd in

i saw that it only works like this when using "if"
you also can do

Code: Select all

case i
when 'do_it_trigger' #name of input
put the methode from above inside here!

end

like this you can use the name of the input instead of i==2

Re: random selections

Posted: Tue Nov 05, 2013 9:12 pm
by trogluddite
This module should do what you're looking for...
Random Frequency Chooser.fsm
(943 Bytes) Downloaded 865 times

Output array is always the same size as the input frequency array - if the "chooser" array is too short, the 'tail' values don't ever get randomised; if too long the, extra entries are ignored.
The frequency calculation weights the values logarithmically so that there is an equal probability per octave - so you might need to look at the maths if you don't desire a "musical" bias to the spread.

Re: random selections

Posted: Tue Nov 05, 2013 9:32 pm
by tester
Wow, thank you Trog, what a nice surprise!

It looks that I will bee a lot of work todo within next months. :-)

Array based multieditboxes and multisliders, cross references..., I wonder if MyCo's solution for multisine (via poly) will work with multiwavetable, but as far I remember (if it was using stock sine module) it should... - the old projects may both - get optimized a little bit on speed, and a lot on loading and management performance.