Csound Csound-dev Csound-tekno Search About

Re: oversampling

Date1999-09-24 17:18
FromVarga István
SubjectRe: oversampling
Now, here are some scripts (incl. downsampling, float -> short w/ dither etc.)
Warning: this is for Linux, will not run on Windows

note: this is originally written for my own usage, so do not expect it to be
portable, well documented, etc. It also assumes that the directories
"/Csound/Analysis", "/Csound/Samples" and "/Csound/Include" exist (SADIR,
SSDIR, include files).

---------------------------------------------------------------------------------------------------------------

begin-base64 644 Csound_scripts-1.1.2.tar.gz
H4sICLik4zcCA0Nzb3VuZF9zY3JpcHRzLTEuMS4yLnRhcgDsXWlz2zjSzlfq
V2AU147l0cFT9BFny5tj42ySSdmZTfYdTTm0SMUsS6RGpOIc9n9/uwGQBEVS
km3ZsmxqJolEAo3G0Y3uB2jgWeCPPfso6I7cYRg0lKbSVFuPFvshumwaBnlE
8CNP/Mt/kLZpyqaqqiZ8V1RDkR8R49EtfMZBaI0IeTTy/XBaulnvV/TzLK//
3VHXGqgj62wxZSiybEzpf82UDex/TTf1ti5j/+u62n5E5LL/b/zz+JfWseu1
jq3gpFJ5TLq+99UZhYSOANLzRwMrJIE1GPadgIQ+gTFBen0fHtpWaFUqbo/8
SdYek192iUr+IjskPHE8SXpMhiPXC8k4sL44lYrkdE98Uv0Df22TeHSRJ67X
c/vOU/LEH4f0WxXSfnNDIks7lZ5L6a+TX+BP4NmQGIis/VQuqkR9Slq287Xl
jft9ck6+jJwhafxNGg6pBiMrdKqkBv8l7FCiQMz1hmP4EhDPD4lF6OAnWHLM
ZMzdNsGitnnKr1bftYX0VcI5CELbGY042w2F8/3h7fvfD56923v7YrfaCgfD
VjOm24SfzbW1pj/qVjHd4bPfp6YLun61UhkNSKOHtVeh9ms/E/oX7BenckEg
+chpBqMQqz1yBv5Xh/h9xnSAXfzFCVk98AnBRq1UDg/2PrzY/XyIj1/C40Pa
4wfQkLzBP1f+cwiF7Fb1agW+vDnMJA7ilO+evXonvn92Ynme008SvHn37w+v
dj/T9sYeA56tvrPbhv5ah9pQ+h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