Page 1 of 1
STFT in Flowstone?
Posted: Thu Apr 30, 2015 12:03 am
by Maryirita
Hello! I'm writting again for your help! I'm trying to do something called cross-synthesis and I need to know how to make a short Fourier transform flowstone please, excuse my ignorance. I will add a simple page on cross- synthesis and i really appreciate any help with an example if is possible. Thanks !!!
https://ccrma.stanford.edu/~jos/SpecEnv ... hesis.html
Re: STFT in Flowstone?
Posted: Thu Apr 30, 2015 1:03 am
by nix
Heya,
Is it Mary? Could be a first among our male dominated internet corner.
I am interested in this too.
The most common term among producers is vocoder.
I'm not sure how to implement the short transform,
but do any of these prims help you?

- fft prims.png (64.5 KiB) Viewed 35059 times
A 'frame/block' of audio can be manipulated into a float array
I'm really over my head here, but I understand frequency content,
maybe I can learn. Maybe ring modulation is interesting?
Re: STFT in Flowstone?
Posted: Thu Apr 30, 2015 1:11 am
by nix
Re: STFT in Flowstone?
Posted: Thu Apr 30, 2015 1:26 am
by Maryirita
Hello!!! Yes, I'm a woman , My name is Margarita
I will try to do something with FFT but I confess I do not know how to convert a .wav in array ... I used to program in Matlab, but for me flowstone is more difficult .
Re: STFT in Flowstone?
Posted: Thu Apr 30, 2015 1:43 am
by nix
Welcome Margarita!
You'll get the hang of it IMO,
if you persist.
Here is a pitch shifting effect where I split a stream into float arrays,
resample it and concatenate it back into a stream->
so something like that will give access to float arrays.
Like I say I don't really know how to realize the transform,
will do some reading on vocoders.
'mem to float array' is the module which will convert a .wav into an array
Here's a call to KG,Myco or MartinVicanek among--
interesting topic though for sure
Re: STFT in Flowstone?
Posted: Thu Apr 30, 2015 2:25 am
by KG_is_back
Here are my few cents. These modules should be able to convert stream into green float array efficiently. The first one will simply output a ASIO buffer. Second two will provide buffer of specified size, but will not send a trigger to recalculate.
I warn you though... Streams, green and ruby all work on separate threads and have different priorities. During high CPU loads green calculations may simply be delayed or ignored completely (though it shouldn't do any problems during "printing"/offline mode).
Current streams have a limitation, that arrays can't be passed as variables between modules. You either had to serialize them and put one value at a time(like trog did), which causes additional latency, or you write them into a static "mem", which is shared by the modules. That however is very tricky and can only be done in assembler + causes a high risk of crashes, when pointer is not updated sufficiently fast. We'd been working on a viable solution / fix, but so far have not found one. That's also the reason why I did not include "mem" management and "read from pointer" feature into DSPcode2 project just yet.
Re: STFT in Flowstone?
Posted: Thu Apr 30, 2015 4:15 am
by Maryirita
Thank you very much guys ! I will study yours contributions
pdt: Nix please review your PM !
Re: STFT in Flowstone?
Posted: Thu Apr 30, 2015 4:52 am
by nix
I sent some generators Rita,
with the mono stream multiply 8D
Here is this ancient vocoder I found->
I dunno if it works or how it does if it does hehe
There are controls for frequency and ganged bp filters
I can send a monophonic pitch detector, and my current bp filter if you'd like
Oh- and KG, those are straight to the toolbox- TY!
Re: STFT in Flowstone?
Posted: Thu Apr 30, 2015 5:35 am
by MyCo
Welcome Margarita!
It really depends on how you want to process the data. When you want do just process 2 waves and then store/playback the wave you can use the FFT / iFFT primitives from the toolbox for this.
When you want to process live (output process results directly), you can use the Stream-FFT project (latest version is 11a):
viewtopic.php?f=4&t=1510&start=60#p6660In both cases you have to FFT both (carrier / modulator) waves, multiply the spectrums and finally iFFT the spectrum to get back to time domain. The stream-FFT project file has basically all modules you need for that. You would just have to connect it in the right order. But makes only sense when you really want to do it in realtime.