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

Clock Accuracy - 10ms?

For general discussion related FlowStone

Re: Clock Accuracy - 10ms?

Postby Nowhk » Sun Nov 29, 2015 11:46 pm

martinvicanek wrote:Dammit, Tronic beat me on that one! :lol:
Nowhk wrote:P.s. how do you generate that "consecutive" random array? I see no heavy jump between points...
Oh, I chose some random partial amplitudes and iFFTed them, so the result is smooth and periodic. However, if the period is long enough (>10s) then the ear won't recognize the repeating pattern.

Can you show to me the module that "FFT" those values please? I'm really looking for to it! Ill link it to a random button that will choose new random shape. Is it on FS?
Nowhk
 
Posts: 275
Joined: Mon Oct 27, 2014 6:45 pm

Re: Clock Accuracy - 10ms?

Postby martinvicanek » Mon Nov 30, 2015 5:36 am

There is this cool Additive Osc which lets you draw the partials and then performs the iFFT to build a wave table. I have modified it for your purpose. Hit the "Update Phases" button for a new random wave.
Attachments
RandomWaveGenerator.fsm
(25.29 KiB) Downloaded 857 times
User avatar
martinvicanek
 
Posts: 1328
Joined: Sat Jun 22, 2013 8:28 pm

Re: Clock Accuracy - 10ms?

Postby Nowhk » Mon Nov 30, 2015 12:30 pm

Ok, I'm getting an idea on what you have done and how a random signal can be generated (sum of partials, randomizing phase of them).

So, I want to make the think less complex (since I don't need at all an Addittive Osc graph for example, just a random button that create partials and random the phase of them):

RandomWaveGenerator_4.fsm
(13.08 KiB) Downloaded 911 times

Some questions:

1 - Why here on my schema If I set 10 partials on Ruby script (@n_partials = 10), the signal start/end always at 1? :shock: It also seems that if I set just a single partial (@partials_values[0] = 1) it draw nothing. If I set 2 partials, it works. But can't random phases.
2 - Is Flowstone Using less resources if I use built-in module component instead of Ruby scripting? Or the resources are the same?
3 - Using this mechanism, the "clock" problem (as explained by tulamide) is the same? And I will have some ticks that will be unligned? Or they are "sync" with clock/ticks? I guess all rely on "streamout i" here, which is triggered on FS clock I believe, so there aren't any problem. Also: if I define a shape of 1024 samples (as in the example) how can I assure to read and output each of them in sync? I can use Tick25 (or 100) and M2F post Read, but it could miss some of them.

Many thanks people, I'm learning a lot!
Nowhk
 
Posts: 275
Joined: Mon Oct 27, 2014 6:45 pm

Re: Clock Accuracy - 10ms?

Postby martinvicanek » Mon Nov 30, 2015 8:54 pm

You had an orphan wireless receiver for the number of samples there. It said 0, so the phase randomizing loop wasn't excecuting. Now it seems to work. ;)
Attachments
RandomWaveGenerator_5.fsm
(18.74 KiB) Downloaded 855 times
User avatar
martinvicanek
 
Posts: 1328
Joined: Sat Jun 22, 2013 8:28 pm

Re: Clock Accuracy - 10ms?

Postby Nowhk » Tue Dec 01, 2015 9:01 pm

martinvicanek wrote:You had an orphan wireless receiver for the number of samples there. It said 0, so the phase randomizing loop wasn't excecuting. Now it seems to work. ;)

Awesome! I miss that point! Really thanks man, seems to works very well! The only problem is that questions to what I see are growing :lol:

Now for example, I'm thinking to what is happening inside FS using this code:

Code: Select all
streamout i;
i = i + .01;
i = i&(i<1024);

for what I see, this is what happens: this DSP code is trigger at a fixed clock (which is faster than the ruby scripts), and increment the "i" at every clock.

So, for example, if clock is every 1ms and I write i = i+1, in 10ms it output values between 0 and 9.
Instead, if I use i= i + 0.1, in the same time (10ms) it output values between 0 and 0.9. Right?

Now my question is: since in the example above I deal with 1024 samples, and i = i+.01 represent the speed at which those values will be read from Read module, how can I synch this process to output only the values that I need? As I said abouve, M2F and Tick25 (or 100) will miss some of them, since DSP code is faster than it. I need to output as "float" all 1024 values sampled before (so my DAW can automate parameters with those values).

And how can I change the reading speed? Or better: how can I manage the .01 using a external knob? I tried with this:

Code: Select all
streamin speed;
streamout i;
i = i + speed;
i = i&(i<1024);

but I don't know how to convert float to mono :shock:
Nowhk
 
Posts: 275
Joined: Mon Oct 27, 2014 6:45 pm

Re: Clock Accuracy - 10ms?

Postby Nowhk » Thu Dec 03, 2015 12:41 pm

@martin: don't forget me :* :oops:
Nowhk
 
Posts: 275
Joined: Mon Oct 27, 2014 6:45 pm

Re: Clock Accuracy - 10ms?

Postby martinvicanek » Fri Dec 04, 2015 9:06 am

I am not sure I understand what your problem is. Below you will find a little wind machine application with all elements of this thread put together. Does that help?
Attachments
RandomWaveGeneratorApplication.fsm
(58.87 KiB) Downloaded 878 times
User avatar
martinvicanek
 
Posts: 1328
Joined: Sat Jun 22, 2013 8:28 pm

Re: Clock Accuracy - 10ms?

Postby Spogg » Fri Dec 04, 2015 9:31 am

martinvicanek wrote:I am not sure I understand what your problem is. Below you will find a little wind machine application with all elements of this thread put together. Does that help?


I just love this Martin!

A while ago I had the idea of making a storm generator and this little demo would be ideal for part of it...

Cheers

Spogg
User avatar
Spogg
 
Posts: 3358
Joined: Thu Nov 20, 2014 4:24 pm
Location: Birmingham, England

Re: Clock Accuracy - 10ms?

Postby Nowhk » Fri Dec 04, 2015 10:42 am

martinvicanek wrote:I am not sure I understand what your problem is. Below you will find a little wind machine application with all elements of this thread put together. Does that help?

Not really! Or better: you help me on second question (about speed): I got that I just need to link a knob (F) to a stream (Blu pin) and it will automatically get the value. So I can manage the speed using the DSP code I wrote.

But I'm not sure how to output those 1024 value to my DAW (as Float). I use the "Internal Controller" module in FL Studio, but it get Float as input:

Immagine.png
Immagine.png (6.41 KiB) Viewed 16782 times

The Read module (if I correctly understand) already will output only those 1024 values, since it is triggered by DSP module at every x/1024 index.

But it output stream, not float. M2F works only sending a trigger when I need a value, but that timing (Tick25 or 100) is higher than the speed of the generated 1024 values. With fast speed, I miss some samples.

I just need a Stream to Float converter I guess, outputting my 1024 values in time/sync (i.e. progression bar on graph, that is the speed of DSP code on iterating the i variable).

Is it more clear now?
Nowhk
 
Posts: 275
Joined: Mon Oct 27, 2014 6:45 pm

Re: Clock Accuracy - 10ms?

Postby Nowhk » Fri Dec 04, 2015 11:47 am

Here maybe you can get better what I'm doing:

Reading values.fsm
(15.58 KiB) Downloaded 858 times

I've resample down to 10, and put some red lines where the samples are in the Graph (sorry, I don't know how to draw a point, so that line :lol: )

With low speed, you can get the 10 output value on the OUTPUT float module. But...

First: those values are not sync with DSP iteration (maybe Tick 100 is already in delay?). They are showed when the progression line is in the middle of two points, more or less.

Second: I need this mechanism to catch all the 1024 samples I'll put out from the plugin. Tick100 will miss some of them, since its trigger time is lower than DSP (or the speed I'll use).

This should explain my whole idea and my problem ;)
Nowhk
 
Posts: 275
Joined: Mon Oct 27, 2014 6:45 pm

PreviousNext

Return to General

Who is online

Users browsing this forum: No registered users and 74 guests