[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [sc-users] Wavelet synthesis?
See second example in IDWT help file for direct wavelet synthesis, reproduced below, and DWT help file for the explanation of wavelet type if you want to try the different ones.
best
N
//direct synthesis via writing values to buffer (try changing wavelet type...)
(
b = Buffer.alloc(s,1024);
b.zero;
)
(
{
var chain;
chain = FFTTrigger(b); //works as DWT substitute too
Out.ar(0, (0.1*IDWT(chain,wintype:-1,wavelettype:0)).dup(2));
}.play;
)
//run this to change sound: WARNING, NOISY!
b.setn(0,Array.rand(1024,-1.0,1.0));
b.setn(0,Array.fill(1024,{|i| i/1024.0}));
b.setn(0,Array.fill(1024,{|i| 1.0-(i/1024.0)}));
b.setn(0,Array.fill(1024,{|i| [exprand(0.001,0.1),exprand(0.001,0.1).neg,1.0.rand].choose}));
b.setn(0,Array.fill(1024,{|i| [exprand(0.001,1.0),0.0].wchoose([0.1,0.9])}));
/*
wavelettype - The choices of wavelet are those available in the gsl wavelet library code (http://www.gnu.org/s/gsl/manual/html_node/DWT-Initialization.html). Each is given a numeric code as follows (see the web page for the explanation of k):
0-8 gsl_wavelet_daubechies, k = 4,6,8,10,12,14,16,18,20
9-17 gsl_wavelet_daubechies_centered, k = 4,6,8,10,12,14,16,18,20
18 gsl_wavelet_haar, k=2
19 gsl_wavelet_haar_centered, k=2
20-30 gsl_wavelet_bspline, k=103, 105, 202, 204, 206, 208, 301, 303, 305, 307, 309
31-41 gsl_wavelet_bspline_centered k=103, 105, 202, 204, 206, 208, 301, 303, 305, 307, 309
*/
On 21 Dec 2017, at 16:18, kewping@xxxxxxxxx wrote:
> Any idea how to use:
>
> SC plug-ins for discrete wavelet transform analysis and resynthesis
> (analogous to FFT-PV_UGen-IFFT chains, you get DWT-WT_UGen-IDWT)
> http://composerprogrammer.com/code/wavelets.zip
>
> I want to try Wavelet Synthesis.
> The files were open, but not sure how to implement it.
>
>
>
> --
> Sent from: http://new-supercollider-mailing-lists-forums-use-these.2681727.n2.nabble.com/SuperCollider-Users-New-Use-this-f2676391.html
>
> _______________________________________________
> 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/