Csound Csound-dev Csound-tekno Search About

[Cs-dev] Getting i-rate value from k-rate value doesn't work

Date2013-06-17 11:16
Fromlppier
Subject[Cs-dev] Getting i-rate value from k-rate value doesn't work
Hi, 

Using csound ios I'm trying to get parameters from the app. 
The below works fine, with the exception of kdeltimeL.

delayr only accepts an irate variable, and
ideltimeL = i(kdeltimeL) doesn't seem to work. I've verified the variable
naming.  
replacing i(kdeltimeL) with a hard coded value 0.5 works. 
Any ideas how I can resolve this? 

instr 101

kdelayOn chnget "delayOn"
kfdbkL chnget "feedbackL"
kdeltimeL chnget "delaytimeL" 
kamp chnget "delaydepth"

ain = gaDelayBus
gaDelayBus = 0
;iamp = p4

ideltimeL = i(kdeltimeL)

if (kdelayOn==1) then
;simple delay

aout delayr ideltimeL    
delayw ain + (aout * kfdbkL)
aout = aout * kamp
outs aout, aout

endif


endin




f1 0 16384 10 1

i2 0 360000
i101 0 360000 







--
View this message in context: http://csound.1045644.n5.nabble.com/Getting-i-rate-value-from-k-rate-value-doesn-t-work-tp5724590.html
Sent from the Csound - Dev mailing list archive at Nabble.com.

------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2013-06-17 11:27
FromVictor Lazzarini
SubjectRe: [Cs-dev] Getting i-rate value from k-rate value doesn't work
It won't work because k-rate variables are undefined at i-time. You can try this

ideltime chnget  "delaytimeL"

which will run the i-time chnget opcode to get the channel value at i-time.

Victor

On 17 Jun 2013, at 11:16, lppier wrote:

> Hi, 
> 
> Using csound ios I'm trying to get parameters from the app. 
> The below works fine, with the exception of kdeltimeL.
> 
> delayr only accepts an irate variable, and
> ideltimeL = i(kdeltimeL) doesn't seem to work. I've verified the variable
> naming.  
> replacing i(kdeltimeL) with a hard coded value 0.5 works. 
> Any ideas how I can resolve this? 
> 
> instr 101
> 
> kdelayOn chnget "delayOn"
> kfdbkL chnget "feedbackL"
> kdeltimeL chnget "delaytimeL" 
> kamp chnget "delaydepth"
> 
> ain = gaDelayBus
> gaDelayBus = 0
> ;iamp = p4
> 
> ideltimeL = i(kdeltimeL)
> 
> if (kdelayOn==1) then
> ;simple delay
> 
> aout delayr ideltimeL    
> delayw ain + (aout * kfdbkL)
> aout = aout * kamp
> outs aout, aout
> 
> endif
> 
> 
> endin
> 
> 
> 
> 
> f1 0 16384 10 1
> 
> i2 0 360000
> i101 0 360000 
> 
> 
> 
> 
> 
> 
> 
> --
> View this message in context: http://csound.1045644.n5.nabble.com/Getting-i-rate-value-from-k-rate-value-doesn-t-work-tp5724590.html
> Sent from the Csound - Dev mailing list archive at Nabble.com.
> 
> ------------------------------------------------------------------------------
> This SF.net email is sponsored by Windows:
> 
> Build for Windows Store.
> 
> http://p.sf.net/sfu/windows-dev2dev
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel

Dr Victor Lazzarini
Senior Lecturer
Dept. of Music
NUI Maynooth Ireland
tel.: +353 1 708 3545
Victor dot Lazzarini AT nuim dot ie




------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2013-06-17 11:59
Fromlppier
SubjectRe: [Cs-dev] Getting i-rate value from k-rate value doesn't work
AttachmentsNone  None  

Hi Victor, 


Thanks. I've tried that. 

The issue is that the delay instrument is being run all the time. ie. i101 0 360000 in the score. 
So putting ideltime chnget "delaytimeL" in the instrument 101 code will only allow me to get the value once on the start of 101, right? 




On 17 Jun, 2013, at 6:28 PM, "Victor Lazzarini [via Csound]" <[hidden email]> wrote:

It won't work because k-rate variables are undefined at i-time. You can try this

ideltime chnget  "delaytimeL"

which will run the i-time chnget opcode to get the channel value at i-time.

Victor

On 17 Jun 2013, at 11:16, lppier wrote:

> Hi,
>
> Using csound ios I'm trying to get parameters from the app.
> The below works fine, with the exception of kdeltimeL.
>
> delayr only accepts an irate variable, and
> ideltimeL = i(kdeltimeL) doesn't seem to work. I've verified the variable
> naming.  
> replacing i(kdeltimeL) with a hard coded value 0.5 works.
> Any ideas how I can resolve this?
>
> instr 101
>
> kdelayOn chnget "delayOn"
> kfdbkL chnget "feedbackL"
> kdeltimeL chnget "delaytimeL"
> kamp chnget "delaydepth"
>
> ain = gaDelayBus
> gaDelayBus = 0
> ;iamp = p4
>
> ideltimeL = i(kdeltimeL)
>
> if (kdelayOn==1) then
> ;simple delay
>
> aout delayr ideltimeL    
> delayw ain + (aout * kfdbkL)
> aout = aout * kamp
> outs aout, aout
>
> endif
>
>
> endin
>
> </CsInstruments>
> <CsScore>
>
> f1 0 16384 10 1
>
> i2 0 360000
> i101 0 360000
>
>
> </CsScore>
> </CsoundSynthesizer>
>
>
>
> --
> View this message in context: http://csound.1045644.n5.nabble.com/Getting-i-rate-value-from-k-rate-value-doesn-t-work-tp5724590.html
> Sent from the Csound - Dev mailing list archive at Nabble.com.
>
> ------------------------------------------------------------------------------
> This SF.net email is sponsored by Windows:
>
> Build for Windows Store.
>
> http://p.sf.net/sfu/windows-dev2dev
> _______________________________________________
> Csound-devel mailing list
> <a href="x-msg://188/user/SendEmail.jtp?type=node&amp;node=5724591&amp;i=0" target="_top" rel="nofollow" link="external">[hidden email]
> https://lists.sourceforge.net/lists/listinfo/csound-devel
Dr Victor Lazzarini
Senior Lecturer
Dept. of Music
NUI Maynooth Ireland
tel.: +353 1 708 3545
Victor dot Lazzarini AT nuim dot ie




------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev
_______________________________________________
Csound-devel mailing list
<a href="x-msg://188/user/SendEmail.jtp?type=node&amp;node=5724591&amp;i=1" target="_top" rel="nofollow" link="external">[hidden email]
https://lists.sourceforge.net/lists/listinfo/csound-devel



If you reply to this email, your message will be added to the discussion below:
http://csound.1045644.n5.nabble.com/Getting-i-rate-value-from-k-rate-value-doesn-t-work-tp5724590p5724591.html
To unsubscribe from Getting i-rate value from k-rate value doesn't work, click here.
NAML



View this message in context: Re: Getting i-rate value from k-rate value doesn't work
Sent from the Csound - Dev mailing list archive at Nabble.com.

Date2013-06-17 12:03
FromVictor Lazzarini
SubjectRe: [Cs-dev] Getting i-rate value from k-rate value doesn't work
AttachmentsNone  None  
The delay line has a fixed length, that can't be changed at perf-time.
You can use a deltapi etc opcode to tap the delayline.

Maybe you should study some texts Csound programming, which will cover these things. Take a look

Victor

On 17 Jun 2013, at 11:59, lppier wrote:

Hi Victor, 

Thanks. I've tried that. 

The issue is that the delay instrument is being run all the time. ie. i101 0 360000 in the score. 
So putting ideltime chnget "delaytimeL" in the instrument 101 code will only allow me to get the value once on the start of 101, right? 




On 17 Jun, 2013, at 6:28 PM, "Victor Lazzarini [via Csound]" <[hidden email]> wrote:

It won't work because k-rate variables are undefined at i-time. You can try this

ideltime chnget  "delaytimeL"

which will run the i-time chnget opcode to get the channel value at i-time.

Victor

On 17 Jun 2013, at 11:16, lppier wrote:

> Hi,
>
> Using csound ios I'm trying to get parameters from the app.
> The below works fine, with the exception of kdeltimeL.
>
> delayr only accepts an irate variable, and
> ideltimeL = i(kdeltimeL) doesn't seem to work. I've verified the variable
> naming.  
> replacing i(kdeltimeL) with a hard coded value 0.5 works.
> Any ideas how I can resolve this?
>
> instr 101
>
> kdelayOn chnget "delayOn"
> kfdbkL chnget "feedbackL"
> kdeltimeL chnget "delaytimeL"
> kamp chnget "delaydepth"
>
> ain = gaDelayBus
> gaDelayBus = 0
> ;iamp = p4
>
> ideltimeL = i(kdeltimeL)
>
> if (kdelayOn==1) then
> ;simple delay
>
> aout delayr ideltimeL    
> delayw ain + (aout * kfdbkL)
> aout = aout * kamp
> outs aout, aout
>
> endif
>
>
> endin
>
> </CsInstruments>
> <CsScore>
>
> f1 0 16384 10 1
>
> i2 0 360000
> i101 0 360000
>
>
> </CsScore>
> </CsoundSynthesizer>
>
>
>
> --
> View this message in context: http://csound.1045644.n5.nabble.com/Getting-i-rate-value-from-k-rate-value-doesn-t-work-tp5724590.html
> Sent from the Csound - Dev mailing list archive at Nabble.com.
>
> ------------------------------------------------------------------------------
> This SF.net email is sponsored by Windows:
>
> Build for Windows Store.
>
> http://p.sf.net/sfu/windows-dev2dev
> _______________________________________________
> Csound-devel mailing list
> <a href="x-msg://188/user/SendEmail.jtp?type=node&amp;node=5724591&amp;i=0" target="_top" rel="nofollow" link="external">[hidden email]
> https://lists.sourceforge.net/lists/listinfo/csound-devel
Dr Victor Lazzarini
Senior Lecturer
Dept. of Music
NUI Maynooth Ireland
tel.: +353 1 708 3545
Victor dot Lazzarini AT nuim dot ie




------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev
_______________________________________________
Csound-devel mailing list
<a href="x-msg://188/user/SendEmail.jtp?type=node&amp;node=5724591&amp;i=1" target="_top" rel="nofollow" link="external">[hidden email]
https://lists.sourceforge.net/lists/listinfo/csound-devel



If you reply to this email, your message will be added to the discussion below:
http://csound.1045644.n5.nabble.com/Getting-i-rate-value-from-k-rate-value-doesn-t-work-tp5724590p5724591.html
To unsubscribe from Getting i-rate value from k-rate value doesn't work, click here.
NAML



View this message in context: Re: Getting i-rate value from k-rate value doesn't work
Sent from the Csound - Dev mailing list archive at Nabble.com.
------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-devel

Dr Victor Lazzarini
Senior Lecturer
Dept. of Music
NUI Maynooth Ireland
tel.: +353 1 708 3545
Victor dot Lazzarini AT nuim dot ie




Date2013-06-17 12:28
FromRory Walsh
SubjectRe: [Cs-dev] Getting i-rate value from k-rate value doesn't work
You can also use a reinit. Here's an example:
http://www.thecabbagefoundation.org/viewtopic.php?f=17&t=323


On 17 June 2013 12:03, Victor Lazzarini  wrote:
> The delay line has a fixed length, that can't be changed at perf-time.
> You can use a deltapi etc opcode to tap the delayline.
>
> Maybe you should study some texts Csound programming, which will cover these
> things. Take a look
> at the http://flossmanuals.net/csound/
>
> Victor
>
> On 17 Jun 2013, at 11:59, lppier wrote:
>
> Hi Victor,
>
> Thanks. I've tried that.
>
> The issue is that the delay instrument is being run all the time. ie. i101 0
> 360000 in the score.
> So putting ideltime chnget "delaytimeL" in the instrument 101 code will only
> allow me to get the value once on the start of 101, right?
>
>
>
>
> On 17 Jun, 2013, at 6:28 PM, "Victor Lazzarini [via Csound]" <[hidden
> email]> wrote:
>
> It won't work because k-rate variables are undefined at i-time. You can try
> this
>
> ideltime chnget  "delaytimeL"
>
> which will run the i-time chnget opcode to get the channel value at i-time.
>
> Victor
>
> On 17 Jun 2013, at 11:16, lppier wrote:
>
>> Hi,
>>
>> Using csound ios I'm trying to get parameters from the app.
>> The below works fine, with the exception of kdeltimeL.
>>
>> delayr only accepts an irate variable, and
>> ideltimeL = i(kdeltimeL) doesn't seem to work. I've verified the variable
>> naming.
>> replacing i(kdeltimeL) with a hard coded value 0.5 works.
>> Any ideas how I can resolve this?
>>
>> instr 101
>>
>> kdelayOn chnget "delayOn"
>> kfdbkL chnget "feedbackL"
>> kdeltimeL chnget "delaytimeL"
>> kamp chnget "delaydepth"
>>
>> ain = gaDelayBus
>> gaDelayBus = 0
>> ;iamp = p4
>>
>> ideltimeL = i(kdeltimeL)
>>
>> if (kdelayOn==1) then
>> ;simple delay
>>
>> aout delayr ideltimeL
>> delayw ain + (aout * kfdbkL)
>> aout = aout * kamp
>> outs aout, aout
>>
>> endif
>>
>>
>> endin
>>
>> 
>> 
>>
>> f1 0 16384 10 1
>>
>> i2 0 360000
>> i101 0 360000
>>
>>
>> 
>> 
>>
>>
>>
>> --
>> View this message in context:
>> http://csound.1045644.n5.nabble.com/Getting-i-rate-value-from-k-rate-value-doesn-t-work-tp5724590.html
>> Sent from the Csound - Dev mailing list archive at Nabble.com.
>>
>>
>> ------------------------------------------------------------------------------
>> This SF.net email is sponsored by Windows:
>>
>> Build for Windows Store.
>>
>> http://p.sf.net/sfu/windows-dev2dev
>> _______________________________________________
>> Csound-devel mailing list
>> > href="x-msg://188/user/SendEmail.jtp?type=node&node=5724591&i=0"
>> target="_top" rel="nofollow" link="external">[hidden email]
>> https://lists.sourceforge.net/lists/listinfo/csound-devel
> Dr Victor Lazzarini
> Senior Lecturer
> Dept. of Music
> NUI Maynooth Ireland
> tel.: +353 1 708 3545
> Victor dot Lazzarini AT nuim dot ie
>
>
>
>
> ------------------------------------------------------------------------------
> This SF.net email is sponsored by Windows:
>
> Build for Windows Store.
>
> http://p.sf.net/sfu/windows-dev2dev
> _______________________________________________
> Csound-devel mailing list
>  target="_top" rel="nofollow" link="external">[hidden email]
> https://lists.sourceforge.net/lists/listinfo/csound-devel
>
>
> ________________________________
> If you reply to this email, your message will be added to the discussion
> below:
> http://csound.1045644.n5.nabble.com/Getting-i-rate-value-from-k-rate-value-doesn-t-work-tp5724590p5724591.html
> To unsubscribe from Getting i-rate value from k-rate value doesn't work,
> click here.
> NAML
>
>
>
> ________________________________
> View this message in context: Re: Getting i-rate value from k-rate value
> doesn't work
> Sent from the Csound - Dev mailing list archive at Nabble.com.
> ------------------------------------------------------------------------------
> This SF.net email is sponsored by Windows:
>
> Build for Windows Store.
>
> http://p.sf.net/sfu/windows-dev2dev_______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel
>
>
> Dr Victor Lazzarini
> Senior Lecturer
> Dept. of Music
> NUI Maynooth Ireland
> tel.: +353 1 708 3545
> Victor dot Lazzarini AT nuim dot ie
>
>
>
>
> ------------------------------------------------------------------------------
> This SF.net email is sponsored by Windows:
>
> Build for Windows Store.
>
> http://p.sf.net/sfu/windows-dev2dev
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel
>

------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2013-06-18 03:36
Fromlppier
SubjectRe: [Cs-dev] Getting i-rate value from k-rate value doesn't work
AttachmentsNone  None  

Hi Rory, 


Thanks for the link, I tried that, but no luck there. Here's my code where I tried it. 
Maybe it's due to the fact that my instrument is triggered from the score like this? i101 0 360000

instr 101

kdelayOn chnget "delayOn"
kfdbkL chnget "feedbackL"
kdeltimeL chnget "delaytimeL"
kamp chnget "delaydepth"

kLoopUpdated changed kdeltimeL
if(kLoopUpdated==1) then
;update iLoop each time we change the
;loop time
reinit beginReInit;
endif

ain = gaDelayBus
gaDelayBus = 0
;iamp = p4



;specify where re-init will start from
beginReInit:
ideltimeL = i(kdeltimeL)

if (kdelayOn==1) then
;simple delay

aout delayr 0.2
delayw ain + (aout * kfdbkL)
aout = aout * kamp
outs aout, aout

endif

endin



On 17 Jun, 2013, at 7:28 PM, rory walsh [via Csound] <[hidden email]> wrote:

You can also use a reinit. Here's an example:
http://www.thecabbagefoundation.org/viewtopic.php?f=17&t=323


On 17 June 2013 12:03, Victor Lazzarini <<a href="x-msg://86/user/SendEmail.jtp?type=node&amp;node=5724598&amp;i=0" target="_top" rel="nofollow" link="external">[hidden email]> wrote:

> The delay line has a fixed length, that can't be changed at perf-time.
> You can use a deltapi etc opcode to tap the delayline.
>
> Maybe you should study some texts Csound programming, which will cover these
> things. Take a look
> at the http://flossmanuals.net/csound/
>
> Victor
>
> On 17 Jun 2013, at 11:59, lppier wrote:
>
> Hi Victor,
>
> Thanks. I've tried that.
>
> The issue is that the delay instrument is being run all the time. ie. i101 0
> 360000 in the score.
> So putting ideltime chnget "delaytimeL" in the instrument 101 code will only
> allow me to get the value once on the start of 101, right?
>
>
>
>
> On 17 Jun, 2013, at 6:28 PM, "Victor Lazzarini [via Csound]" <[hidden
> email]> wrote:
>
> It won't work because k-rate variables are undefined at i-time. You can try
> this
>
> ideltime chnget  "delaytimeL"
>
> which will run the i-time chnget opcode to get the channel value at i-time.
>
> Victor
>
> On 17 Jun 2013, at 11:16, lppier wrote:
>
>> Hi,
>>
>> Using csound ios I'm trying to get parameters from the app.
>> The below works fine, with the exception of kdeltimeL.
>>
>> delayr only accepts an irate variable, and
>> ideltimeL = i(kdeltimeL) doesn't seem to work. I've verified the variable
>> naming.
>> replacing i(kdeltimeL) with a hard coded value 0.5 works.
>> Any ideas how I can resolve this?
>>
>> instr 101
>>
>> kdelayOn chnget "delayOn"
>> kfdbkL chnget "feedbackL"
>> kdeltimeL chnget "delaytimeL"
>> kamp chnget "delaydepth"
>>
>> ain = gaDelayBus
>> gaDelayBus = 0
>> ;iamp = p4
>>
>> ideltimeL = i(kdeltimeL)
>>
>> if (kdelayOn==1) then
>> ;simple delay
>>
>> aout delayr ideltimeL
>> delayw ain + (aout * kfdbkL)
>> aout = aout * kamp
>> outs aout, aout
>>
>> endif
>>
>>
>> endin
>>
>> </CsInstruments>
>> <CsScore>
>>
>> f1 0 16384 10 1
>>
>> i2 0 360000
>> i101 0 360000
>>
>>
>> </CsScore>
>> </CsoundSynthesizer>
>>
>>
>>
>> --
>> View this message in context:
>> http://csound.1045644.n5.nabble.com/Getting-i-rate-value-from-k-rate-value-doesn-t-work-tp5724590.html
>> Sent from the Csound - Dev mailing list archive at Nabble.com.
>>
>>
>> ------------------------------------------------------------------------------
>> This SF.net email is sponsored by Windows:
>>
>> Build for Windows Store.
>>
>> http://p.sf.net/sfu/windows-dev2dev
>> _______________________________________________
>> Csound-devel mailing list
>> <a
>> href="<a href="x-msg://188/user/SendEmail.jtp?type=node&amp;amp;node=5724591&amp;amp;i=0">x-msg://188/user/SendEmail.jtp?type=node&amp;node=5724591&amp;i=0"
>> target="_top" rel="nofollow" link="external">[hidden email]
>> https://lists.sourceforge.net/lists/listinfo/csound-devel
> Dr Victor Lazzarini
> Senior Lecturer
> Dept. of Music
> NUI Maynooth Ireland
> tel.: +353 1 708 3545
> Victor dot Lazzarini AT nuim dot ie
>
>
>
>
> ------------------------------------------------------------------------------
> This SF.net email is sponsored by Windows:
>
> Build for Windows Store.
>
> http://p.sf.net/sfu/windows-dev2dev
> _______________________________________________
> Csound-devel mailing list
> <a href="<a href="x-msg://188/user/SendEmail.jtp?type=node&amp;amp;node=5724591&amp;amp;i=1">x-msg://188/user/SendEmail.jtp?type=node&amp;node=5724591&amp;i=1"
> target="_top" rel="nofollow" link="external">[hidden email]
> https://lists.sourceforge.net/lists/listinfo/csound-devel
>
>
> ________________________________
> If you reply to this email, your message will be added to the discussion
> below:
> http://csound.1045644.n5.nabble.com/Getting-i-rate-value-from-k-rate-value-doesn-t-work-tp5724590p5724591.html
> To unsubscribe from Getting i-rate value from k-rate value doesn't work,
> click here.
> NAML
>
>
>
> ________________________________
> View this message in context: Re: Getting i-rate value from k-rate value
> doesn't work
> Sent from the Csound - Dev mailing list archive at Nabble.com.
> ------------------------------------------------------------------------------
> This SF.net email is sponsored by Windows:
>
> Build for Windows Store.
>
> http://p.sf.net/sfu/windows-dev2dev_______________________________________________
> Csound-devel mailing list
> <a href="x-msg://86/user/SendEmail.jtp?type=node&amp;node=5724598&amp;i=1" target="_top" rel="nofollow" link="external">[hidden email]
> https://lists.sourceforge.net/lists/listinfo/csound-devel
>
>
> Dr Victor Lazzarini
> Senior Lecturer
> Dept. of Music
> NUI Maynooth Ireland
> tel.: +353 1 708 3545
> Victor dot Lazzarini AT nuim dot ie
>
>
>
>
> ------------------------------------------------------------------------------
> This SF.net email is sponsored by Windows:
>
> Build for Windows Store.
>
> http://p.sf.net/sfu/windows-dev2dev
> _______________________________________________
> Csound-devel mailing list
> <a href="x-msg://86/user/SendEmail.jtp?type=node&amp;node=5724598&amp;i=2" target="_top" rel="nofollow" link="external">[hidden email]
> https://lists.sourceforge.net/lists/listinfo/csound-devel
>
------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev
_______________________________________________
Csound-devel mailing list
<a href="x-msg://86/user/SendEmail.jtp?type=node&amp;node=5724598&amp;i=3" target="_top" rel="nofollow" link="external">[hidden email]
https://lists.sourceforge.net/lists/listinfo/csound-devel



If you reply to this email, your message will be added to the discussion below:
http://csound.1045644.n5.nabble.com/Getting-i-rate-value-from-k-rate-value-doesn-t-work-tp5724590p5724598.html
To unsubscribe from Getting i-rate value from k-rate value doesn't work, click here.
NAML



View this message in context: Re: Getting i-rate value from k-rate value doesn't work
Sent from the Csound - Dev mailing list archive at Nabble.com.

Date2013-06-18 03:37
Fromlppier
SubjectRe: [Cs-dev] Getting i-rate value from k-rate value doesn't work
AttachmentsNone  None  

Hi Victor, 


deltapi definitely does work, I've tried it prior to sending the mail. I think I can get it to emulate what I was trying to do with delayw/delayr
Thanks for the link! 

Pier.



On 17 Jun, 2013, at 7:03 PM, Victor Lazzarini [via Csound] <[hidden email]> wrote:

The delay line has a fixed length, that can't be changed at perf-time.
You can use a deltapi etc opcode to tap the delayline.

Maybe you should study some texts Csound programming, which will cover these things. Take a look

Victor

On 17 Jun 2013, at 11:59, lppier wrote:

Hi Victor, 

Thanks. I've tried that. 

The issue is that the delay instrument is being run all the time. ie. i101 0 360000 in the score. 
So putting ideltime chnget "delaytimeL" in the instrument 101 code will only allow me to get the value once on the start of 101, right? 




On 17 Jun, 2013, at 6:28 PM, "Victor Lazzarini [via Csound]" <<a href="<a href="x-msg://287/user/SendEmail.jtp?type=node&amp;amp;node=5724592&amp;amp;i=0">x-msg://287/user/SendEmail.jtp?type=node&amp;node=5724592&amp;i=0" target="_top" rel="nofollow" link="external">[hidden email]> wrote:

It won't work because k-rate variables are undefined at i-time. You can try this

ideltime chnget  "delaytimeL"

which will run the i-time chnget opcode to get the channel value at i-time.

Victor

On 17 Jun 2013, at 11:16, lppier wrote:

> Hi,
>
> Using csound ios I'm trying to get parameters from the app.
> The below works fine, with the exception of kdeltimeL.
>
> delayr only accepts an irate variable, and
> ideltimeL = i(kdeltimeL) doesn't seem to work. I've verified the variable
> naming.  
> replacing i(kdeltimeL) with a hard coded value 0.5 works.
> Any ideas how I can resolve this?
>
> instr 101
>
> kdelayOn chnget "delayOn"
> kfdbkL chnget "feedbackL"
> kdeltimeL chnget "delaytimeL"
> kamp chnget "delaydepth"
>
> ain = gaDelayBus
> gaDelayBus = 0
> ;iamp = p4
>
> ideltimeL = i(kdeltimeL)
>
> if (kdelayOn==1) then
> ;simple delay
>
> aout delayr ideltimeL    
> delayw ain + (aout * kfdbkL)
> aout = aout * kamp
> outs aout, aout
>
> endif
>
>
> endin
>
> </CsInstruments>
> <CsScore>
>
> f1 0 16384 10 1
>
> i2 0 360000
> i101 0 360000
>
>
> </CsScore>
> </CsoundSynthesizer>
>
>
>
> --
> View this message in context: http://csound.1045644.n5.nabble.com/Getting-i-rate-value-from-k-rate-value-doesn-t-work-tp5724590.html
> Sent from the Csound - Dev mailing list archive at Nabble.com.
>
> ------------------------------------------------------------------------------
> This SF.net email is sponsored by Windows:
>
> Build for Windows Store.
>
> http://p.sf.net/sfu/windows-dev2dev
> _______________________________________________
> Csound-devel mailing list
> <a href="<a href="<a href="x-msg://188/user/SendEmail.jtp?type=node&amp;amp;amp;node=5724591&amp;amp;amp;i=0">x-msg://188/user/SendEmail.jtp?type=node&amp;amp;node=5724591&amp;amp;i=0"><a href="x-msg://188/user/SendEmail.jtp?type=node&amp;amp;node=5724591&amp;amp;i=0">x-msg://188/user/SendEmail.jtp?type=node&amp;node=5724591&amp;i=0" target="_top" rel="nofollow" link="external">[hidden email]
> https://lists.sourceforge.net/lists/listinfo/csound-devel
Dr Victor Lazzarini
Senior Lecturer
Dept. of Music
NUI Maynooth Ireland
tel.: +353 1 708 3545
Victor dot Lazzarini AT nuim dot ie




------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev
_______________________________________________
Csound-devel mailing list
<a href="<a href="<a href="x-msg://188/user/SendEmail.jtp?type=node&amp;amp;amp;node=5724591&amp;amp;amp;i=1">x-msg://188/user/SendEmail.jtp?type=node&amp;amp;node=5724591&amp;amp;i=1"><a href="x-msg://188/user/SendEmail.jtp?type=node&amp;amp;node=5724591&amp;amp;i=1">x-msg://188/user/SendEmail.jtp?type=node&amp;node=5724591&amp;i=1" target="_top" rel="nofollow" link="external">[hidden email]
https://lists.sourceforge.net/lists/listinfo/csound-devel



If you reply to this email, your message will be added to the discussion below:
http://csound.1045644.n5.nabble.com/Getting-i-rate-value-from-k-rate-value-doesn-t-work-tp5724590p5724591.html
To unsubscribe from Getting i-rate value from k-rate value doesn't work, <a href="<a href="x-msg://287/">x-msg://287/" target="_top" rel="nofollow" link="external">click here.
NAML



View this message in context: Re: Getting i-rate value from k-rate value doesn't work
Sent from the Csound - Dev mailing list archive at Nabble.com.
------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev_______________________________________________
Csound-devel mailing list
<a href="x-msg://90/user/SendEmail.jtp?type=node&amp;node=5724593&amp;i=0" target="_top" rel="nofollow" link="external">[hidden email]
https://lists.sourceforge.net/lists/listinfo/csound-devel

Dr Victor Lazzarini
Senior Lecturer
Dept. of Music
NUI Maynooth Ireland
tel.: +353 1 708 3545
Victor dot Lazzarini AT nuim dot ie




------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev
_______________________________________________
Csound-devel mailing list
<a href="x-msg://90/user/SendEmail.jtp?type=node&amp;node=5724593&amp;i=1" target="_top" rel="nofollow" link="external">[hidden email]
https://lists.sourceforge.net/lists/listinfo/csound-devel



If you reply to this email, your message will be added to the discussion below:
http://csound.1045644.n5.nabble.com/Getting-i-rate-value-from-k-rate-value-doesn-t-work-tp5724590p5724593.html
To unsubscribe from Getting i-rate value from k-rate value doesn't work, click here.
NAML



View this message in context: Re: Getting i-rate value from k-rate value doesn't work
Sent from the Csound - Dev mailing list archive at Nabble.com.

Date2013-06-18 11:27
FromRory Walsh
SubjectRe: [Cs-dev] Getting i-rate value from k-rate value doesn't work
Attachmentstest.csd  None  None  
It seems you're not passing the ideltimeL to your delay line?
Therefore you won't get any change in delay times. Sounds like Victors
idea works fine for you. I've attached a working version of the code
below in case you want to check it out.


> instr 101
>
> kdelayOn chnget "delayOn"
> kfdbkL chnget "feedbackL"
> kdeltimeL chnget "delaytimeL"
> kamp chnget "delaydepth"
>
> kLoopUpdated changed kdeltimeL
> if(kLoopUpdated==1) then
> ;update iLoop each time we change the
> ;loop time
> reinit beginReInit;
> endif
>
> ain = gaDelayBus
> gaDelayBus = 0
> ;iamp = p4
>
>
>
> ;specify where re-init will start from
> beginReInit:
> ideltimeL = i(kdeltimeL)
>
> if (kdelayOn==1) then
> ;simple delay
>
> aout delayr 0.2
> delayw ain + (aout * kfdbkL)
> aout = aout * kamp
> outs aout, aout
>
> endif
>
> endin
>
>

Date2013-06-18 13:26
FromPier
SubjectRe: [Cs-dev] Getting i-rate value from k-rate value doesn't work
Hi Rory, 

Sorry I cut and pasted the wrong code for which I put a test value for ideltimeL - I can still hear the click sounds when I use the port opcode. 
However, your code works for me - the offending line was this : 
aout delayr ideltimeL +0.01

In my version, I did not put +0.01 , I think this is not accepted by delayr as there is a possibility that the input is 0. 

Thank you very much Rory and Victor for your help, much appreciated. 


On 18 Jun, 2013, at 6:27 PM, Rory Walsh  wrote:

> It seems you're not passing the ideltimeL to your delay line?
> Therefore you won't get any change in delay times. Sounds like Victors
> idea works fine for you. I've attached a working version of the code
> below in case you want to check it out.
> 
> 
>> instr 101
>> 
>> kdelayOn chnget "delayOn"
>> kfdbkL chnget "feedbackL"
>> kdeltimeL chnget "delaytimeL"
>> kamp chnget "delaydepth"
>> 
>> kLoopUpdated changed kdeltimeL
>> if(kLoopUpdated==1) then
>> ;update iLoop each time we change the
>> ;loop time
>> reinit beginReInit;
>> endif
>> 
>> ain = gaDelayBus
>> gaDelayBus = 0
>> ;iamp = p4
>> 
>> 
>> 
>> ;specify where re-init will start from
>> beginReInit:
>> ideltimeL = i(kdeltimeL)
>> 
>> if (kdelayOn==1) then
>> ;simple delay
>> 
>> aout delayr 0.2
>> delayw ain + (aout * kfdbkL)
>> aout = aout * kamp
>> outs aout, aout
>> 
>> endif
>> 
>> endin
>> 
>> 
> ------------------------------------------------------------------------------
> This SF.net email is sponsored by Windows:
> 
> Build for Windows Store.
> 
> http://p.sf.net/sfu/windows-dev2dev_______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel


------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net