Csound Csound-dev Csound-tekno Search About

[Csnd] converting an k-value to optional argument

Date2005-09-07 10:14
Fromsokratesla
Subject[Csnd] converting an k-value to optional argument
AttachmentsNone  

Date2005-09-07 11:37
FromJohn ffitch
SubjectRe: [Csnd] converting an k-value to optional argument
In simple terms typo 0 is an optional i rate parameter.  We did experiment 
with making them optional krate but there are real problems generated.

The phase of an oscilator says where it starts.  Chenging every k-cycle is 
not a good thing IMO.  Will click all over the time.  Try a modulation of 
teh frequency which might be what you want-need?

==John

On Wed, 7 Sep 2005, sokratesla wrote:

> # I'm trying to create a stereo phase shift effect. I simply wrote the
> code at the bottom in which the two oscillators sending their output
> to left and right channells are identical expect their phase values.
> # But I get an error:
> error:  input arg 'kphase' of type k not allowed when expecting o
> # So is there any way to convert an k-value to this o type. Or how can
> an o value be animated?
> -ugur guney-
> 
> 
> 
> 
> sr=44100
> ksmps=10
> nchnls=2
> 
> 	instr 1	;simple oscillator with stereo phase shfit
> kphase	line	0,2,1
> 
> asigL	oscil  	10000, 440, 1
> asigR	oscil  	10000, 440, 1, kphase
> 
> 	outs 	asigL, asigR
> 	endin
> 
> 
> 
> f1 0 1024 10 1
> i1	0.0	2.0	
> e
> 
> 
> --
> Send bugs reports to this list.
> To unsubscribe, send email to csound-unsubscribe@lists.bath.ac.uk
> 
> 
> 
-- 
Send bugs reports to this list.
To unsubscribe, send email to csound-unsubscribe@lists.bath.ac.uk

Date2005-09-07 12:18
FromIstvan Varga
SubjectRe: [Csnd] converting an k-value to optional argument
sokratesla wrote:

> # I'm trying to create a stereo phase shift effect. I simply wrote the
> code at the bottom in which the two oscillators sending their output
> to left and right channells are identical expect their phase values.
> # But I get an error:
> error:  input arg 'kphase' of type k not allowed when expecting o
> # So is there any way to convert an k-value to this o type. Or how can
> an o value be animated?

I think the osciliktp opcode does what you want (k-rate phase modulation):

ar osciliktp kcps, kfn, kphs [, istor]

Note that osciliktp will also interpolate phase values (in fact it converts
phase modulation to frequency modulation), so it will not have clicks.
-- 
Send bugs reports to this list.
To unsubscribe, send email to csound-unsubscribe@lists.bath.ac.uk