Support

If you have a problem or need to report a bug please email : support@dsprobotics.com

There are 3 sections to this support area:

DOWNLOADS: access to product manuals, support files and drivers

HELP & INFORMATION: tutorials and example files for learning or finding pre-made modules for your projects

USER FORUMS: meet with other users and exchange ideas, you can also get help and assistance here

NEW REGISTRATIONS - please contact us if you wish to register on the forum

Users are reminded of the forum rules they sign up to which prohibits any activity that violates any laws including posting material covered by copyright

Random Phase

For general discussion related FlowStone

Random Phase

Postby TheOm » Fri Jul 18, 2014 8:17 pm

How can I get one (or several) random values per triggered voice?
I'm trying to achieve random initial phase for every oscillator in a synth.
TheOm
 
Posts: 103
Joined: Tue Jan 28, 2014 7:35 pm
Location: Germany

Re: Random Phase

Postby KG_is_back » Fri Jul 18, 2014 9:55 pm

In code component you can initialize Array with random values on startup. If you use it in poly stream, new values will be initialized on every new voice.

Code: Select all
streamout out;
float x[10]=rand(0,1); //initializes array x with 10 random values from range (0,1)
out = x[0]; //outputs first value form the array. You may add additional outputs...

KG_is_back
 
Posts: 1196
Joined: Tue Oct 22, 2013 5:43 pm
Location: Slovakia

Re: Random Phase

Postby TheOm » Fri Jul 18, 2014 10:18 pm

Oh, nice. I forgot there was a rand function. Thank you!
TheOm
 
Posts: 103
Joined: Tue Jan 28, 2014 7:35 pm
Location: Germany


Return to General

Who is online

Users browsing this forum: No registered users and 86 guests