|
Iain is right on.
I use port or portk for amplitude smoothing
routinely.
Art Hunkins
----- Original Message -----
Sent: Thursday, July 02, 2009 12:05
PM
Subject: [Csnd] RE: Smoothing continuous
midi data
Hi Charles you are experiencing 7-bit quantization (zipper)
noise. You need to apply some sort of 'lag' or portamento to the variable in
order to smooth changes between values. I use portk. Don't use too high a
value for portamento time or you will get a sluggish response. Here's an
example:
<CsoundSynthesizer>
<CsOptions> -M0
-odac -b100
-B256 </CsOptions>
<CsInstruments>
sr
= 44100 ksmps =
10 nchnls =
2 0dbfs =
1
gisine ftgen 0,0,1024,10,1
instr 1 kamp
ctrl7 1,1,0,1 ;PORTAMENTO TIME iporttime = 0.05 ;kporttime QUICKLY
RAMPS UP TO DESIRED PORTAMENTO TIME VALUE kporttime linseg
0,0.01,iporttime,1,iporttime ;APPLY PORTAMENTO kamp portk kamp,
kporttime a1 oscili kamp, 400, gisine outs
a1,a1 endin
</CsInstruments>
<CsScore> i 1 0 3600 ;i1, A LONG
NOTE </CsScore>
</CsoundSynthesizer>
>
Date: Thu, 2 Jul 2009 08:57:48 -0500 > From: chasgran@gmail.com >
To: csound@lists.bath.ac.uk > Subject: [Csnd] Smoothing continuous midi
data > > If I hold a note on this test instrument and I move the
volume slider > quickly I get pronounced crackling, this is less
noticeable when I > move the slider more slowly. > On my XP PC
with ASIO drivers this goes away when I set the sampling > rate to
88200. In the lower sampling rate, 44100, is there some kind > of
stepping that is happening? > On my IMAC the crackling doesn't seem to
improve much with the sampling rate. > > -Charles >
> <CsoundSynthesizer> > <CsOptions> > -M0 -odac
-b100 -B256 > </CsOptions> > >
<CsInstruments> > sr = 88200 > kr = 8820 > ksmps =
10 > nchnls = 1 > > initc7 1,7,.5 > > instr
1 > ifqc cpsmidi > iamp ampmidi 5000 > kenv linenr iamp,
.01, .1, .01 ;gain > kamp ctrl7 1, 7, 0, 1 > a1 oscili kenv*kamp,
ifqc, 1 > out a1 > endin > </CsInstruments> >
> <CsScore> > ; Sine wave > f1 0 16384 10 1 >
i1 0 3600 > </CsScore> > </CsoundSynthesizer> >
> > Send bugs reports to this list. > To unsubscribe, send
email sympa@lists.bath.ac.uk with body "unsubscribe csound"
Insert movie times and more without leaving Hotmail®. See how. |