Csound Csound-dev Csound-tekno Search About

[Csnd] chnset / get problem

Date2012-02-28 02:04
FromRoger Kelly
Subject[Csnd] chnset / get problem

Why will the below snippet of code produce a high pitch ringing when read out of this channel to the 'outs' opcode? Is there someway to detect this noise is on the channel and ignore it?  Basically I have a situation where p3 is less then the length of the table in 'ifn' and it puts the remainder of p3 out as a ringing.

 

 al, ar loscil kamp, kcps+(kcps*idetune), ifn, ibas

p3 = p3 -2

chnset al, "srcL"

chnset ar, "srcR"


Date2012-02-28 02:09
FromSteven Yi
SubjectRe: [Csnd] chnset / get problem
Hi Roger,

It's hard to know what is going on without more context to the code.
My guess is that you are writing the channel, then when that one
instrument stops, the last value you have written remains in the
buffer.  I assume then that you are writing that value to outs.
Perhaps the problem is that you should probably clear the channel
after writing to outs, using:

 chnset 0, "srcL"
 chnset 0, "srcR"

(I think that should work)

clearing it means on the next pass, you'll get whatever new values are
written, and if no values are written, you'll get 0.

Again, just speculating from the information given.  If that doesn't
do it, could you post more of the code here?

steven

On Tue, Feb 28, 2012 at 2:04 AM, Roger Kelly  wrote:
> Why will the below snippet of code produce a high pitch ringing when read
> out of this channel to the 'outs' opcode? Is there someway to detect this
> noise is on the channel and ignore it?  Basically I have a situation where
> p3 is less then the length of the table in 'ifn' and it puts the remainder
> of p3 out as a ringing.
>
>
>
>  al, ar loscil kamp, kcps+(kcps*idetune), ifn, ibas
>
> p3 = p3 -2
>
> chnset al, "srcL"
>
> chnset ar, "srcR"


Date2012-02-28 02:38
FromRoger Kelly
SubjectRe: [Csnd] chnset / get problem
That was it!  Worked great. Thanks.

On Mon, Feb 27, 2012 at 8:09 PM, Steven Yi <stevenyi@gmail.com> wrote:
Hi Roger,

It's hard to know what is going on without more context to the code.
My guess is that you are writing the channel, then when that one
instrument stops, the last value you have written remains in the
buffer.  I assume then that you are writing that value to outs.
Perhaps the problem is that you should probably clear the channel
after writing to outs, using:

 chnset 0, "srcL"
 chnset 0, "srcR"

(I think that should work)

clearing it means on the next pass, you'll get whatever new values are
written, and if no values are written, you'll get 0.

Again, just speculating from the information given.  If that doesn't
do it, could you post more of the code here?

steven

On Tue, Feb 28, 2012 at 2:04 AM, Roger Kelly <loraxman@gmail.com> wrote:
> Why will the below snippet of code produce a high pitch ringing when read
> out of this channel to the 'outs' opcode? Is there someway to detect this
> noise is on the channel and ignore it?  Basically I have a situation where
> p3 is less then the length of the table in 'ifn' and it puts the remainder
> of p3 out as a ringing.
>
>
>
>  al, ar loscil kamp, kcps+(kcps*idetune), ifn, ibas
>
> p3 = p3 -2
>
> chnset al, "srcL"
>
> chnset ar, "srcR"


Send bugs reports to the Sourceforge bug tracker
           https://sourceforge.net/tracker/?group_id=81968&atid=564599
Discussions of bugs and features can be posted here
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"