random selections

For general discussion related FlowStone
User avatar
Nubeat7
Posts: 1347
Joined: Sat Apr 14, 2012 9:59 am
Location: Vienna
Contact:

Re: random selections

Post 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
tester
Posts: 1786
Joined: Wed Jan 18, 2012 10:52 pm
Location: Poland, internet

Re: random selections

Post 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.
Need to take a break? I have something right for you.
Feel free to donate. Thank you for your contribution.
User avatar
Nubeat7
Posts: 1347
Joined: Sat Apr 14, 2012 9:59 am
Location: Vienna
Contact:

Re: random selections

Post 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
User avatar
trogluddite
Posts: 1730
Joined: Fri Oct 22, 2010 12:46 am
Location: Yorkshire, UK

Re: random selections

Post by trogluddite »

This module should do what you're looking for...
Random Frequency Chooser.fsm
(943 Bytes) Downloaded 864 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.
All schematics/modules I post are free for all to use - but a credit is always polite!
Don't stagnate, mutate to create!
tester
Posts: 1786
Joined: Wed Jan 18, 2012 10:52 pm
Location: Poland, internet

Re: random selections

Post 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.
Need to take a break? I have something right for you.
Feel free to donate. Thank you for your contribution.
Post Reply