A SpectoGraph !)

DSP related issues, mathematics, processing and techniques
Post Reply
Tepeix
Posts: 361
Joined: Sat Oct 16, 2021 3:11 pm

A SpectoGraph !)

Post 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..
Attachments
Spectogra.png
Spectogra.png (105.26 KiB) Viewed 930861 times
SpectroGraph.fsm
(92 KiB) Downloaded 1644 times
User avatar
Spogg
Posts: 3368
Joined: Thu Nov 20, 2014 4:24 pm
Location: Birmingham, England
Contact:

Re: A SpectoGraph !)

Post by Spogg »

Wow, that’s quite an achievement! :o

I wonder if using Ruby to do the graphics would be faster/better…
Tepeix
Posts: 361
Joined: Sat Oct 16, 2021 3:11 pm

Re: A SpectoGraph !)

Post 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" ?
User avatar
Spogg
Posts: 3368
Joined: Thu Nov 20, 2014 4:24 pm
Location: Birmingham, England
Contact:

Re: A SpectoGraph !)

Post by Spogg »

I can’t speak for what could be done in Ruby but there those who can… ;)
tulamide
Posts: 2714
Joined: Sat Jun 21, 2014 2:48 pm
Location: Germany

Re: A SpectoGraph !)

Post 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.
Attachments
ruby_mono_graph.fsm
(2.35 KiB) Downloaded 1580 times
"There lies the dog buried" (German saying translated literally)
k brown
Posts: 1198
Joined: Tue Aug 16, 2016 7:10 pm
Location: San Francisco, CA USA
Contact:

Re: A SpectoGraph !)

Post 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
Website for the plugins : http://kbrownsynthplugins.weebly.com/
Tepeix
Posts: 361
Joined: Sat Oct 16, 2021 3:11 pm

Re: A SpectroGraph !)

Post 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 !)
Tepeix
Posts: 361
Joined: Sat Oct 16, 2021 3:11 pm

Re: A SpectoGraph !)

Post 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 !)
Attachments
SpectroGram.png
SpectroGram.png (54.97 KiB) Viewed 929959 times
SpectroGram.fsm
(27.14 KiB) Downloaded 1624 times
tulamide
Posts: 2714
Joined: Sat Jun 21, 2014 2:48 pm
Location: Germany

Re: A SpectoGraph !)

Post 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!
"There lies the dog buried" (German saying translated literally)
Tepeix
Posts: 361
Joined: Sat Oct 16, 2021 3:11 pm

Re: A SpectoGraph !)

Post 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 ;)
Post Reply