Page 1 of 1

A SpectoGraph !)

PostPosted: Wed Nov 29, 2023 6:31 pm
by Tepeix
A spectograph !

I think it didn't exist in flowstone, and i think i understand why !
It's very not easy to do for some reason.. Data conversion ...
Break my head about it from some time.. Trying then re-trying and re-trying..

So it's not perfect but seams to works. Don't hesitate to upgrade or suggest it if you have any idea !

Limitation are : Size is not configurable; Slow to refresh; Fixed size 1.5second;

Also it only measure every note and half note from 27.5 to 22050. It's not fft nor bandpass. Those would maybe slow more or add additional latency in the measure. Here the module send every frequency then catch the result from the analyzer. Paint a line measuring volume with 512 hop. Then go for the next line and frequency..
Maybe some faster tick would be great..
(edit: for an fft the problem is also the precision in bass, would need very big fft for decent precision, and reverb generally add more problem with bass than anywhere attenuating to much some frequency...)

Anyway i'm happy to have some result. So many time i wanted this to see what happen for frequency along time..
But would be cool if it could be perfected..

Re: A SpectoGraph !)

PostPosted: Thu Nov 30, 2023 9:32 am
by Spogg
Wow, that’s quite an achievement! :o

I wonder if using Ruby to do the graphics would be faster/better…

Re: A SpectoGraph !)

PostPosted: Thu Nov 30, 2023 11:55 am
by Tepeix
Thanks! In the end it's not so complex, but i try a lot of different method before !), with lot of complexity and break-head !) Sometime going to a very complex task without knowing if the system would slow or break !

I wonder also for Ruby, i 'm very not experimented with it.
Maybe one difficulty is that the analyzer might possibly also be replaced with Ruby.
I don't know how much it's possible ?
I try to use a faster ruby tick, but the green doesn't follow the speed, and we end up with many line that are not updating with a new frequency if pushing to much the speed.
Maybe doing the graphic could help but it's possible that the analizer with is green tick would not follow at higher speed..
I don't know if the frame system could like the analizer process go "beyond real time" ?

Re: A SpectoGraph !)

PostPosted: Fri Dec 01, 2023 9:40 am
by Spogg
I can’t speak for what could be done in Ruby but there those who can… ;)

Re: A SpectoGraph !)

PostPosted: Sat Dec 02, 2023 8:46 am
by tulamide
Tepeix wrote:I try to use a faster ruby tick, but the green doesn't follow the speed, and we end up with many line that are not updating with a new frequency if pushing to much the speed.
Maybe doing the graphic could help but it's possible that the analizer with is green tick would not follow at higher speed..
I don't know if the frame system could like the analizer process go "beyond real time" ?


Ruby precision is much higher than green precision. But, when using the buffer requests of the DAW, there is some time to trigger green. I made an example.

"Beyond real time" is not possible, because Flowstone works only in real time. But you can still buffer (a frame request in Ruby will actually work on the current frame, while the previous is sent to the DAW).

If your goal is a steady and stable regular update of mono values, then there is a Ruby-only solution. I made an example (same fsm)

If your goal is to catch each and every sample, and draw each and every sample, that is impossible. Not just for Flowstone, but for every tool out there. At 512 buffer size, you have approx. 10 ms (0.01 s) to do all the work needed for one buffer. Getting the samples and do some calculations is the least of it. The drawing is extremely demanding and can (and most likely will) exceed the time limit. At which point you either lose the next buffer or draw slower than the stream moves.

Re: A SpectoGraph !)

PostPosted: Sat Dec 02, 2023 9:12 pm
by k brown
Not to be "that guy", but there's another 'r' in there - it's 'spectrograph'.

https://spie.org/publications/fg08_p02_ ... raph?SSO=1

Re: A SpectroGraph !)

PostPosted: Sun Dec 03, 2023 11:54 am
by Tepeix
Yep Forget the r ;) I think that i also did not use the right name, it's more spectrogram.

Thanks for the explanation Tulamide !
So not easy to speed up this thing..

Now i experiment with set pixel. I'm surprise, because i always thought it was slow but seams very fast.
Don't know if it will speed up the spectro but it's more simple to add option using a loop comparing to my 128 Rect in parallel !)

Re: A SpectoGraph !)

PostPosted: Sun Dec 03, 2023 9:26 pm
by Tepeix
This one is a little better. I think maybe faster, but not sure.

Now it's possible to test for 4 duration. The windows is re-sizable.

With setpixel everything is more simple.
The bitmap do 232pixels/duration, we only draw 1 pixel for one case and the bitmap draw do the rest !
Better than 128 rectangles !

Yet some detail are up-gradable.. It's not so good to only have note and half, missing high harmonic in between..

Also i dream about one that test every possible note combination to check non linearity.. A 4d spectrogram !..
But it might be too much slow !)

Re: A SpectoGraph !)

PostPosted: Mon Dec 04, 2023 12:50 am
by tulamide
Keep it up! I think you're doing a fantastic job, considering that you work with standard Fowstone, no FFT and no ASM trickery!

I wouldn't even know how to begin, and you are presenting something that works (even if not over the whole frequency range). That's really great!

Re: A SpectoGraph !)

PostPosted: Mon Dec 04, 2023 3:07 pm
by Tepeix
Thanks ! I was even surprise that it works and not slow thing to much.)
The fft is almost a trap here, it's maybe possible to use them but specially in green there's a risk of slow down if precision is wanted. I try a lot of thing but slowed before being advance..
I discover the fantastic power of the analyzer, it's incredible that he could do 3s of process in only aproximatly 0.01s ! (yet it depend of the size of the code..)
It's fun to see what happen to frequency. I discover that generally none have a very smooth envelope but goes in some tremolo when we try to make all resonate..
I was always obsessed to find something that could make every frequency resonate, but with not so much process..
It's difficult.. yet some secret are preserved in old reverb device that could make great job with very low power ;)