SynthMaker

Random from a Noise Osc?

Archive · 2006 11 old posts

From the original SynthMaker forum (2004–2014), with its members’ names and dates.

jobro ·

I took a look at how the oscilator is constructed, and found that the noise waveform is just resending the phase modulated by the sound. Now my question is this: Would it be possible to use a sawtooth waveform to trig a float sample&hold to capture the current value from the noise osc thus creating a randomizer that way? I've tried to do this, but I can't see a way to convert from poly to float. Or am I missing a vital part here?

infuzion ·

In the "Control" folder, there is a Poly Readout.

Problem is, there is no such thing a "random"; best you can hope for is a sequence of numbers that rarely repeat. Getting a random seed from something like the miliseconds from a computer, or a lava lamp would help the sequence from being predictable.

doug4350 ·

Hi Jobro,

infuzion is correct about random. There is no such thing as a true random number generator.

The Poly Readout component doesn't forward the value as shown in your example. A way around this would be to use the Poly to Mono component and feed it into the Mono to Float (if you're not already). I suspect the way you're feeding the stream bool to the green triggers is part of the problem too. I had problems with that before, but didn't find an elegant solution before giving up. Maybe someone else can be more enlightening, but from what I've picked up so far, my hunch is it can't be done that way.

Hope this helps... Aloha, Doug

jobro ·

Well i think it is rather strange that SM lacks such thing as a randomizer. I've tried to use the poly to mono and mono to float to get the sound to obtain random values.

sambean ·

If you pop this in a code module it should work

streamin seed; streamout out; float sign; float rand;

stage(0) {

// //Seed has to be between 0 and 1 //Fop some reason (seed % 1) //doesn't seem to work.. //

rand = seed + 0.000001; // stops stable values eg 0.5 rand = min(rand , 0.9999); // 1 and 0 are both stable too.. rand = max(rand , 0.0001);

}

stage(1) {

// // Optimised pseudo random number // rand = ( rand * 3 ) % 1 //

rand = rand*3; rand = rand - (rand>2)&1; rand = rand - (rand>1)&1;

out = rand*2 - 1;

}

Sam

unkargherth ·

I'm also working on a pseudo-random generator in ASM, based on integer overflowing. My skills in ASM are, to be generous, a bit limited but iexpect finish it somewhere in near future

sunsynth ·

Hi jobro,

i found a randomizer in skores "audiooak_module_pack_1_3_1" where he gives credits 2 infusion and NothanUmber...

I never tried it but maybe usefull 😉

SUNsynth

infuzion ·

sunsynth wrote: i found a randomizer in skores "audiooak_module_pack_1_3_1" where he gives credits 2 infusion and NothanUmber...

I took NUmber's, & tried to make it more "random". But it stll just calculates a series of numbers, but if you have a bunch of different things triggering it, then it will seem more random. But if you ship a VST with it (or any randomizer), you'll get the exact same numbers when you turn it on.

What is really needed is a way to randomly seed the randomizer.

oddson ·

What's really needed is a green random primitive. It would just be a wrapper for the standard Windows random function.

This should be a no-brainer for the developers but everytime it comes up it's ignored. 🙁

unkargherth ·

Well, could be not so simple:

a) Why only a green float version ? b) if we want a stream ( mono/poly) version, calls to standard rand() could be two slow c) If we are working on a SSE model, could be nopn trivial to do calls to winapi ?

Anyway, if somebody don't mind ho have a random gen running at sample rate, take a look at this.

Really it's not so random. Cycle repeats every 16384 outs, but could eb enoght fro some applications, (and can be changed in Code)

Comments and suggestions welcomed

Once we opened the topic. Any ideas for alternative randomness/noise sources inside of current SM ?

infuzion ·

unkargherth wrote: Any ideas for alternative randomness/noise sources inside of current SM ?

Well, you can help add more caos if you somehow have a 2nd randomizer connected to the 1st that is triggered at different times. & they would change each other on occation, thus preventing fully repeatable patterns.

I have a few other top-secret ideas also 😈

Wrote something here? To have a post removed or your name hidden, write to [email protected].

Before your first post

A few rules keep this a friendly place. You agree to them once.

Shown next to what you post, here and in the app. It doesn’t have to be your real name: 3–24 lower-case letters, digits or _ (capitals become lower case, spaces become _).

    Then your post goes up straight away.

    Delete this reply?

    Open it in SynthMaker?

    It goes on the track you’re editing there, in place of that track’s sound, and into My sounds. Your other tracks stay as they are.

    Want to keep that track’s sound? Start a new song in SynthMaker first (Song › New song), then open this.

    Report this reply?

    Only the developer reads reports. The person isn’t told who reported them.

    What’s wrong with it?

    Block this person?

    You won’t see their posts and replies here any more. They aren’t told, and you can unblock them at any time.

    People you’ve blocked

    Their posts and replies are hidden from you. Unblock someone to see them again.

    The community rules

    A few rules keep this a friendly place. Everyone agrees to them once, before their first post.