Page 1 of 1

Random array hack

PostPosted: Sat Mar 12, 2022 2:47 pm
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 ?)

Re: Random array hack

PostPosted: Sat Mar 12, 2022 6:49 pm
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?

Re: Random array hack

PostPosted: Sun Mar 13, 2022 12:35 pm
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..

Re: Random array hack

PostPosted: Mon Mar 14, 2022 6:48 am
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. ;)

Re: Random array hack

PostPosted: Mon Mar 14, 2022 7:05 pm
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 411 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:

Re: Random array hack

PostPosted: Mon Mar 14, 2022 8:50 pm
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)

Re: Random array hack

PostPosted: Thu Mar 17, 2022 4:52 pm
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 ;)