| I think you are right, Marco. At least at my IntelMac it clicks, too.
Maybe no one had this problem earlier, because oscilikt is normally
used with audio frequencies (the example in the manual seems to be
ok). But as far as I see, your example should work, but it produces
one click at the end of each note. For comparing I tested a similar
instrument (see below instr2) using tablei for the envelope: no
problems here. Best -
joachim
sr = 44100
kr = 44100
ksmps = 1
nchnls = 1
0dbfs = 32767
instr 1; envelope with oscilikt: clicks at the end of the note
idur = p3
idurosc = 1/idur
iamp = p4 * 0.001 ; amplitude range 0-1000
ifq = p5
iaenv = p6
iaudiofun = 1
k1 oscilikt iamp, idurosc, iaenv
a1 oscili k1, ifq, iaudiofun
out a1 * 0dbfs
endin
instr 2; envelops with tablei: no clicks
idur = p3
idurosc = 1/idur
iamp = p4 * 0.001 ; amplitude range 0-1000
ifq = p5
iaenv = p6
iaudiofun = 1
iendndx tableng iaenv
kindx linseg 0, p3, iendndx
k1 tablei kindx, iaenv
a1 oscili k1, ifq, iaudiofun
out a1 * 0dbfs * iamp
endin
f1 0 4096 10 1
f51 0 512 5 0.0001 1 1 511 0.0001
;with i1 (envelope read by oscilkt): clicks at the end of a note
i1 0 10 800.0 100.0 51
i1 11 10 800.0 100.0 51
i1 22 10 800.0 100.0 51
;with i2 (envelope read by tablei): no problems
i2 33 10 800.0 100.0 51
i2 44 10 800.0 100.0 51
i2 55 10 800.0 100.0 51
Am 06.11.2007 um 14:05 schrieb Marco Stroppa:
> Thank you, Victor, for the changes. I must however be missing
> something important, since on my
> computer (MacIntel running csound 5.07) your file does click, just
> the click coincides with the
> beginning of the new note (except at the end, where it shows up
> alone). Bizzarre, bizzarre.
> perhaps a bug with oscilikt. Perhaps I should try other ways to get
> a note without a click...
>
> Thanks anyway.
>
>
> Marco
>
> --- Victor Lazzarini schrieb:
>
>> With these modifications, it does not click:
>>
>>
>>
>>
>> sr = 44100
>> kr = 44100
>> ksmps = 1
>> nchnls = 1
>> 0dbfs = 32767
>>
>>
>> instr 1
>> idur = p3
>> idurosc = 1/idur
>> iamp = p4 * 0.001 ; amplitude range 0-1000
>> ifq = p5
>> iaenv = p6
>> iaudiofun = 1
>>
>> a2 oscilikt iamp, idurosc, iaenv
>> a1 oscili a2, ifq, iaudiofun
>> out a1 * 0dbfs
>>
>>
>> endin
>>
>>
>>
>>
>>
>>
>>
>> ; score
>> ******************************************************************
>> ; audio wave
>> f1 0 4096 9 1 1 0
>>
>>
>> ; envelope: 513 points with oscilikt
>> f51 0 512 5 128 513 1
>>
>>
>> ; start idur iamp ifq iaenv
>> i1 0 2 800.0 100.0 51
>> ;s 11.0
>>
>>
>> ; score
>> ******************************************************************
>> ; envelope: large table, even number of points
>> ;f51 0 131072 5 128 131072 1
>>
>>
>> ; start idur iamp ifq iaenv
>> i1 + 1 800.0 100.0 51
>> ;s 11.0
>>
>>
>> ; score
>> ******************************************************************
>> ; try with larger audio table size
>> f1 0 131072 9 1 1 0
>>
>>
>> ; envelope: even table size, 511 points
>> ;f51 0 512 5 128 511 1
>>
>>
>> ; start idur iamp ifq iaenv
>> i1 + 10 800.0 100.0 51
>> ;s 11.0
>>
>>
>> e
>>
>>
>>
>>
>>
>> At 08:45 06/11/2007, you wrote:
>>> Thanks for the advice, Victor. I tried using different table
>>> numbers (csd
>>> file below), but the
>>> problem is the same: a large click at the end of each note,
>>> exactly when
>>> it ends.
>>>
>>> Best,
>>>
>>>
>>> Marco
>>>
>>> --- Victor Lazzarini schrieb:
>>>
>>>> I think it's the fact that you are rewriting the tables that is
>>>> causing the
>>>> clicks. You don't need to do that; use another table number.
>>>>
>>>> Victor
>>>>
>>>> At 15:35 05/11/2007, you wrote:
>>>>> Hello, Csounders,
>>>>>
>>>>> I'm a bit puzzled by oscilikt and would like to ask for some
>>>>> help. The
>>>>> "csd" file below (sorry for
>>>>> pasting in directly in the message's body) plays four notes
>>>>> with an
>>>>> exponential amplitude envelope
>>>>> realised by oscilikt and a GEN n. 5 with different table sizes
>>>>> (odd,
>>> even,
>>>>> one number less than
>>>>> the table size). At the end of each note, there is a
>>>>> substantial click,
>>>>> which I suspect might be
>>>>> the beginning of a new cycle of the oscillator generating the
>>> envelope. If
>>>>> I replace oscilikt with
>>>>> oscili in the orchestra, only the fourth note clicks, the
>>>>> others not.
>>>>>
>>>>> I wonder whether there is a bug in my understanding how oscilikt
>>> works, or
>>>>> somewhere else.
>>>>>
>>>>> Thank you very much in advance for any advice.
>>>>>
>>>>>
>>>>> Marco
>>>
>>> NEW FILE WITH DIFFERENT TABLE SIZES
>>>
>>>
>>>
>>>
>>> sr = 44100
>>> kr = 44100
>>> ksmps = 1
>>> nchnls = 1
>>> 0dbfs = 32767
>>>
>>> instr 1
>>> idur = p3
>>> idurosc = 1/idur
>>> iamp = p4 * 0.001 ; amplitude range 0-1000
>>> ifq = p5
>>> iaenv = p6
>>> iaudiofun = 1
>>>
>>> a2 oscilikt iamp, idurosc, iaenv
>>> a1 oscili a2, ifq, iaudiofun
>>> out a1 * 0dbfs
>>>
>>> endin
>>>
>>>
>>>
>>>
>>>
>>> ; score
>>> ******************************************************************
>>> ; audio wave
>>> f1 0 4096 9 1 1 0
>>>
>>> ; envelope: 513 points with oscilikt
>>> f51 0 513 5 128 513 1
>>>
>>> ; start idur iamp ifq iaenv
>>> i1 0 10 800.0 100.0 51
>>> s 11.0
>>>
>>>
>>> ; score
>>> ******************************************************************
>>> ; envelope: 512 points, although size = 513
>>> f52 0 513 5 128 512 1
>>>
>>> ; start idur iamp ifq iaenv
>>> i1 0 10 800.0 100.0 52
>>> s 11.0
>>>
>>>
>>> ; score
>>> ******************************************************************
>>> ; envelope: even number of points
>>> f53 0 512 5 128 512 1
>>>
>>> ; start idur iamp ifq iaenv
>>> i1 0 10 800.0 100.0 53
>>>
>>>
>>> ; score
>>> ******************************************************************
>>> ; envelope: large table, even number of points
>>> f54 0 131072 5 128 131072 1
>>>
>>> ; start idur iamp ifq iaenv
>>> i1 0 10 800.0 100.0 54
>>> s 11.0
>>>
>>> ; score
>>> ******************************************************************
>>>
>>> ; envelope: even table size, 511 points
>>> f55 0 512 5 128 511 1
>>>
>>> ; start idur iamp ifq iaenv
>>> i1 0 10 800.0 100.0 55
>>> s 11.0
>>>
>>> e
>>>
>>>
>>>
>>>
>>
> === message truncated ===
>
>
>
>
> Heute schon einen Blick in die Zukunft von E-Mails wagen?
> Versuchen Sie´s mit dem neuen Yahoo! Mail. www.yahoo.de/mail
>
>
|