Random array hack

Post any examples or modules that you want to share here
Post Reply
Tepeix
Posts: 361
Joined: Sat Oct 16, 2021 3:11 pm

Random array hack

Post by Tepeix »

Hi,

Here's a little random array hack ;)

Seams to works right but i have to warning !!, not so much tested, get strange cpu spike when doing it then it disappear solved by nothing..
Seeing that the midi thing only do 1 note, i suppose it could be ok..

Also i'm not sure if there's some hiden cpu cost but i don't see them on my task manager..

And it use green timing... but normally must not affect anything ??? ??? ???

The idea is to have a green counter that will send sometime a midi note off-on.
The off is send then directly a note on.
So normally when it come to poly i suppose that in one sample, we get one voice off then on.
So the code reinitialize (maybe some recompilation ? but i don't see any latency ??)
it make an array of 4096 random value and read it at hop 128.
Also it need a little time to initialize.. Waiting the green counter..

What do you think of this hack ?)
Attachments
Rand Array Hack.fsm
(74.37 KiB) Downloaded 807 times
User avatar
martinvicanek
Posts: 1334
Joined: Sat Jun 22, 2013 8:28 pm

Re: Random array hack

Post by martinvicanek »

It sounds horrible! :lol: (no offense)
Seriously, I admit I do not quite understand your goal. What is the purpose of the whole MIDI note on/off apparatus? Here it outputs a constant noise regardless of what happens before the ASM code box. :o
There may be a better implementation for what you are looking for For instance you could generate Note On/Off in Ruby with better timing, one could optimize the ASM code, etc. But it is difficult for me to give you specific comments without really knowing your objective. Could you try to explain?
Tepeix
Posts: 361
Joined: Sat Oct 16, 2021 3:11 pm

Re: Random array hack

Post by Tepeix »

;)
It's a random noise or parameters lfo.)
Well there's other's ways. And i don't know if this is less or more cpu.

The noise is not constant (in some way) meaning each time there's a note off-on the random array
is reinitialized. (Even if the in is not used)
(i verify commenting the line 2,3,4 after the hop.. It make crash flowstone when doing that, but works
when reopening it.. Seams like code in this situation don't like to be modified)

Yep i was thinking of a better implementation with ruby. Don't even know if most of the array is unused.

Well my idea was to have just one random generator that could feed multiple module taking one after another's
a random value..
User avatar
martinvicanek
Posts: 1334
Joined: Sat Jun 22, 2013 8:28 pm

Re: Random array hack

Post by martinvicanek »

Oh, I see, you want to have an infinite, non-repeating random series. The green timer and MIDI Note On/Off machinery are only there to refresh the random array every now and then. Well, that is a "creative" way of doing it. :mrgreen:

Here is a somewhat more compact implementation. ;)
Attachments
FastWhiteNoise(hopped).fsm
(946 Bytes) Downloaded 782 times
User avatar
HughBanton
Posts: 265
Joined: Sat Apr 12, 2008 3:10 pm
Location: Evesham, Worcestershire
Contact:

Re: Random array hack

Post by HughBanton »

Carrying on with my fixation with linear interpolation, from last week, I just couldn't resist doing this ...
MV_rand_with_interp.fsm
(18.93 KiB) Downloaded 796 times

I just like watching it :o

Could this become a new FS art form? What we need is a multi-channel, multi colour X-Y scope. Hours of fun could be had ...

H :lol:
Tepeix
Posts: 361
Joined: Sat Oct 16, 2021 3:11 pm

Re: Random array hack

Post by Tepeix »

That's beautiful ! I could watch it a long time !)

Thanks for the random module !

I do some experiment with my method but once again i fall in the green deception !)
Still have to try ruby, but it will take cpu unless using a 1 second timer maybe.

As i wanted a random timer, a slow one could be ok even if the regeneration is slowed.
(it make more time to get a repeat pattern)
But i'm never sure that in some situation the green ticks will be slowed so much that the repeats become audible. And it sound like a bad machine !
Maybe the only practical use of my method is to have a repeating random pattern that could be change with a tick button control..

After lot of breaking-head to adapt my bad design, i figured that it's really better to use yours with some modification to make a random ramp timer.
(I also added the stock reverb to make it more audible)
Attachments
Random Ramp Timer.fsm
(218.71 KiB) Downloaded 797 times
Tepeix
Posts: 361
Joined: Sat Oct 16, 2021 3:11 pm

Re: Random array hack

Post by Tepeix »

I made some little modification to the random ramp based on the MV white noise.

Now we could set a random depht and a frequency center which is really better to control the ramp !)

Also it produce 4 random value at every SSE ramp cycle, So i made them available as 4 more output.
The first SSE value is biased as time dependent and the 3 other's unbiased.

(I wanted a random value that occur at random time..)

Now it could produce strange horror shout at high frequency but the reverb is still needed to make it audible ;)
Attachments
Random Ramp Timer 2.fsm
(381.49 KiB) Downloaded 802 times
Post Reply