[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [sc-users] How to send magnitude data from FFT to buffer to client?
here's an example using UnpackFFT1 and Demand to extract magnitudes from a spectra and put that on a multichannel (1024) control rate buss. maybe that's something you can adapt for your needs.
http://sccode.org/1-4Ty
see UnpackFFT1 helpfile on how to get the phases too.
_f
> 4 juni 2021 kl. 19:21 skrev lambda@xxxxxxxxxxxxxx:
>
> Data comes from FFT.
>
> So only way is make a routine that will turn buffer into array and write data to bus?
>
> This way I will need to update busses 48000 times a second to be accurate.
>
> On 04.06.2021 17:39, spluta@xxxxxxxxx wrote:
>> Since fft uses a buffer, you can use loadToFloatArray:
>> b.loadToFloatArray(action:{|array| a = array})
>> Is this from FFT or PV_RecordBuf?
>> Sam
>>> On Jun 4, 2021, at 4:22 PM, lambda@xxxxxxxxxxxxxx wrote:
>>>
>>> Hello!
>>>
>>> I want to use magnitudes and phases data I got after using FFT on microphone input to modulate synth instances.
>>>
>>> At first, I want to sort FFT bins by magnitude power, take first N
>>> bins, normalize data, and then send it to N * 2 Busses (N for magnitudes and N for phases) these Busses I want to use for modulating synths with .asMap() method.
>>>
>>> I tried to write this data to control rate Bus inside .pvcollect,
>>> but it is not possible because Out.kr() needs a control rate signal.
>>>
>>> Is there any possibility to this or some workaround how can I use FFT
>>> data for synths modulation?
>>>
>>> _______________________________________________
>>> sc-users mailing list
>>>
>>> info (subscription, etc.): http://www.birmingham.ac.uk/facilities/ea-studios/research/supercollider/mailinglist.aspx
>>> archive: https://listarc.bham.ac.uk/marchives/sc-users/
>>> search: https://listarc.bham.ac.uk/lists/sc-users/search/
>> _______________________________________________
>> sc-users mailing list
>> info (subscription, etc.): http://www.birmingham.ac.uk/facilities/ea-studios/research/supercollider/mailinglist.aspx
>> archive: https://listarc.bham.ac.uk/marchives/sc-users/
>> search: https://listarc.bham.ac.uk/lists/sc-users/search/
>
> _______________________________________________
> sc-users mailing list
>
> info (subscription, etc.): http://www.birmingham.ac.uk/facilities/ea-studios/research/supercollider/mailinglist.aspx
> archive: https://listarc.bham.ac.uk/marchives/sc-users/
> search: https://listarc.bham.ac.uk/lists/sc-users/search/
#|
fredrikolofsson.com musicalfieldsforever.com
|#
_______________________________________________
sc-users mailing list
info (subscription, etc.): http://www.birmingham.ac.uk/facilities/ea-studios/research/supercollider/mailinglist.aspx
archive: https://listarc.bham.ac.uk/marchives/sc-users/
search: https://listarc.bham.ac.uk/lists/sc-users/search/