Csound Csound-dev Csound-tekno Search About

[Csnd] instr in udo

Date2012-02-20 12:33
FromStefan Thomas
Subject[Csnd] instr in udo
Dear community,
is it impossible to integrate an instr endin section in an UDO?
I've tried it, but unseccessfully.

Date2012-02-20 12:40
Frompeiman khosravi
SubjectRe: [Csnd] instr in udo
Why? Surely there must be a better workaround.

P

On 20 February 2012 12:33, Stefan Thomas <kontrapunktstefan@googlemail.com> wrote:
Dear community,
is it impossible to integrate an instr endin section in an UDO?
I've tried it, but unseccessfully.


Date2012-02-20 13:22
FromStefan Thomas
SubjectRe: [Csnd] instr in udo
Dear Peiman,
I've tried it with the below quoted code, which is just a test.
The problem here is the instr- section within the opcode, I get the error message:
instr not allowed in opcode block, line 31:
Here is my code:

<CsoundSynthesizer>
<CsOptions>
-odevaudio -Ma -b-1 -B 4096 -m0d
</CsOptions>
; ==============================================
<CsInstruments>
sr    =    48000
ksmps     =     100
nchnls    =    2
0dbfs    =    1
gisine ftgen 0,0,2^10, 10, 1

opcode SimpleAdsyn, 0,iiiii
inumparts,imaxdur,iatt,imaxamp,isubinstrumentnumber xin

iamp        ampmidi    imaxamp
icps        cpsmidi
ipartnumber    =    1
isubinstr    = isubinstrumentnummer+imidinot/1000
loop:
ipartamp    =        iamp/ipartnumber
ipartfreq    =        ipartnumber * icps
idur        =        imaxdur/ipartnumber
iatt        =        iatt/ipartnumber
        event_i    "i", isubinstrumentnumber, 0, idur, ipartfreq, ipartamp, ipartnumber,iatt
        loop_le    ipartnumber, 1, inumparts, loop
krelease    release   
 if krelease == 1 then
         turnoff2    isubinstrumentnumber, 4, 1
 endif
instr isubinstrumentnumber
idur         = p3
ipartfreq    = p4
ipartamp    = p5
ipartnumber    = p6
iatt        = p7
aenv    linsegr 0, iatt, 1, idur,0, 0,1, 0
asig     poscil aenv*ipartamp, ipartfreq, gisine
outs    asig, asig
endin

endop

instr 1
inumparts         = 5
imaxdur              = 5
iatt              = 0.1
imaxamp           = 1
isubinstrumentnumber = 101
SimpleAdsyn inumparts,imaxdur,iatt,imaxamp,isubinstrumentnumber
endin
</CsInstruments>
; ==============================================
<CsScore>
f     0 10
i1     0 10

</CsScore>
</CsoundSynthesizer>


Am 20. Februar 2012 13:40 schrieb peiman khosravi <peimankhosravi@gmail.com>:
Why? Surely there must be a better workaround.

P


On 20 February 2012 12:33, Stefan Thomas <kontrapunktstefan@googlemail.com> wrote:
Dear community,
is it impossible to integrate an instr endin section in an UDO?
I've tried it, but unseccessfully.



Date2012-02-20 14:49
Frompeiman khosravi
SubjectRe: [Csnd] instr in udo
I see. But you can have the instr block defined as a separate instrument rather than enclosing it inside your UDO right?

P

On 20 February 2012 13:22, Stefan Thomas <kontrapunktstefan@googlemail.com> wrote:
Dear Peiman,
I've tried it with the below quoted code, which is just a test.
The problem here is the instr- section within the opcode, I get the error message:
instr not allowed in opcode block, line 31:
Here is my code:

<CsoundSynthesizer>
<CsOptions>
-odevaudio -Ma -b-1 -B 4096 -m0d
</CsOptions>
; ==============================================
<CsInstruments>
sr    =    48000
ksmps     =     100
nchnls    =    2
0dbfs    =    1
gisine ftgen 0,0,2^10, 10, 1

opcode SimpleAdsyn, 0,iiiii
inumparts,imaxdur,iatt,imaxamp,isubinstrumentnumber xin

iamp        ampmidi    imaxamp
icps        cpsmidi
ipartnumber    =    1
isubinstr    = isubinstrumentnummer+imidinot/1000
loop:
ipartamp    =        iamp/ipartnumber
ipartfreq    =        ipartnumber * icps
idur        =        imaxdur/ipartnumber
iatt        =        iatt/ipartnumber
        event_i    "i", isubinstrumentnumber, 0, idur, ipartfreq, ipartamp, ipartnumber,iatt
        loop_le    ipartnumber, 1, inumparts, loop
krelease    release   
 if krelease == 1 then
         turnoff2    isubinstrumentnumber, 4, 1
 endif
instr isubinstrumentnumber
idur         = p3
ipartfreq    = p4
ipartamp    = p5
ipartnumber    = p6
iatt        = p7
aenv    linsegr 0, iatt, 1, idur,0, 0,1, 0
asig     poscil aenv*ipartamp, ipartfreq, gisine
outs    asig, asig
endin

endop

instr 1
inumparts         = 5
imaxdur              = 5
iatt              = 0.1
imaxamp           = 1
isubinstrumentnumber = 101
SimpleAdsyn inumparts,imaxdur,iatt,imaxamp,isubinstrumentnumber
endin
</CsInstruments>
; ==============================================
<CsScore>
f     0 10
i1     0 10

</CsScore>
</CsoundSynthesizer>


Am 20. Februar 2012 13:40 schrieb peiman khosravi <peimankhosravi@gmail.com>:

Why? Surely there must be a better workaround.

P


On 20 February 2012 12:33, Stefan Thomas <kontrapunktstefan@googlemail.com> wrote:
Dear community,
is it impossible to integrate an instr endin section in an UDO?
I've tried it, but unseccessfully.




Date2012-02-20 15:21
FromStefan Thomas
SubjectRe: [Csnd] instr in udo
Yes, but I would like to include it in the UDO, if possible.
Maybee something can be done with macros?

Am 20. Februar 2012 15:49 schrieb peiman khosravi <peimankhosravi@gmail.com>:
I see. But you can have the instr block defined as a separate instrument rather than enclosing it inside your UDO right?

P


On 20 February 2012 13:22, Stefan Thomas <kontrapunktstefan@googlemail.com> wrote:
Dear Peiman,
I've tried it with the below quoted code, which is just a test.
The problem here is the instr- section within the opcode, I get the error message:
instr not allowed in opcode block, line 31:
Here is my code:

<CsoundSynthesizer>
<CsOptions>
-odevaudio -Ma -b-1 -B 4096 -m0d
</CsOptions>
; ==============================================
<CsInstruments>
sr    =    48000
ksmps     =     100
nchnls    =    2
0dbfs    =    1
gisine ftgen 0,0,2^10, 10, 1

opcode SimpleAdsyn, 0,iiiii
inumparts,imaxdur,iatt,imaxamp,isubinstrumentnumber xin

iamp        ampmidi    imaxamp
icps        cpsmidi
ipartnumber    =    1
isubinstr    = isubinstrumentnummer+imidinot/1000
loop:
ipartamp    =        iamp/ipartnumber
ipartfreq    =        ipartnumber * icps
idur        =        imaxdur/ipartnumber
iatt        =        iatt/ipartnumber
        event_i    "i", isubinstrumentnumber, 0, idur, ipartfreq, ipartamp, ipartnumber,iatt
        loop_le    ipartnumber, 1, inumparts, loop
krelease    release   
 if krelease == 1 then
         turnoff2    isubinstrumentnumber, 4, 1
 endif
instr isubinstrumentnumber
idur         = p3
ipartfreq    = p4
ipartamp    = p5
ipartnumber    = p6
iatt        = p7
aenv    linsegr 0, iatt, 1, idur,0, 0,1, 0
asig     poscil aenv*ipartamp, ipartfreq, gisine
outs    asig, asig
endin

endop

instr 1
inumparts         = 5
imaxdur              = 5
iatt              = 0.1
imaxamp           = 1
isubinstrumentnumber = 101
SimpleAdsyn inumparts,imaxdur,iatt,imaxamp,isubinstrumentnumber
endin
</CsInstruments>
; ==============================================
<CsScore>
f     0 10
i1     0 10

</CsScore>
</CsoundSynthesizer>


Am 20. Februar 2012 13:40 schrieb peiman khosravi <peimankhosravi@gmail.com>:

Why? Surely there must be a better workaround.

P


On 20 February 2012 12:33, Stefan Thomas <kontrapunktstefan@googlemail.com> wrote:
Dear community,
is it impossible to integrate an instr endin section in an UDO?
I've tried it, but unseccessfully.





Date2012-02-20 15:44
FromAdam Puckett
SubjectRe: [Csnd] instr in udo
Why do you want an instrument inside an opcode?

On 2/20/12, Stefan Thomas  wrote:
> Yes, but I would like to include it in the UDO, if possible.
> Maybee something can be done with macros?
>
> Am 20. Februar 2012 15:49 schrieb peiman khosravi 
> :
>
>> I see. But you can have the instr block defined as a separate instrument
>> rather than enclosing it inside your UDO right?
>>
>> P
>>
>>
>> On 20 February 2012 13:22, Stefan Thomas > > wrote:
>>
>>> Dear Peiman,
>>> I've tried it with the below quoted code, which is just a test.
>>> The problem here is the instr- section within the opcode, I get the error
>>> message:
>>>
>>>> instr not allowed in opcode block, line 31:
>>>>
>>> Here is my code:
>>>
>>> 
>>> 
>>> -odevaudio -Ma -b-1 -B 4096 -m0d
>>> 
>>> ; ==============================================
>>> 
>>> sr    =    48000
>>> ksmps     =     100
>>> nchnls    =    2
>>> 0dbfs    =    1
>>> gisine ftgen 0,0,2^10, 10, 1
>>>
>>> opcode SimpleAdsyn, 0,iiiii
>>> inumparts,imaxdur,iatt,imaxamp,isubinstrumentnumber xin
>>>
>>> iamp        ampmidi    imaxamp
>>> icps        cpsmidi
>>> ipartnumber    =    1
>>> isubinstr    = isubinstrumentnummer+imidinot/1000
>>> loop:
>>> ipartamp    =        iamp/ipartnumber
>>> ipartfreq    =        ipartnumber * icps
>>> idur        =        imaxdur/ipartnumber
>>> iatt        =        iatt/ipartnumber
>>>         event_i    "i", isubinstrumentnumber, 0, idur, ipartfreq,
>>> ipartamp, ipartnumber,iatt
>>>         loop_le    ipartnumber, 1, inumparts, loop
>>> krelease    release
>>>  if krelease == 1 then
>>>          turnoff2    isubinstrumentnumber, 4, 1
>>>  endif
>>> instr isubinstrumentnumber
>>> idur         = p3
>>> ipartfreq    = p4
>>> ipartamp    = p5
>>> ipartnumber    = p6
>>> iatt        = p7
>>> aenv    linsegr 0, iatt, 1, idur,0, 0,1, 0
>>> asig     poscil aenv*ipartamp, ipartfreq, gisine
>>> outs    asig, asig
>>> endin
>>>
>>> endop
>>>
>>> instr 1
>>> inumparts         = 5
>>> imaxdur              = 5
>>> iatt              = 0.1
>>> imaxamp           = 1
>>> isubinstrumentnumber = 101
>>> SimpleAdsyn inumparts,imaxdur,iatt,imaxamp,isubinstrumentnumber
>>> endin
>>> 
>>> ; ==============================================
>>> 
>>> f     0 10
>>> i1     0 10
>>>
>>> 
>>> 
>>>
>>>
>>> Am 20. Februar 2012 13:40 schrieb peiman khosravi <
>>> peimankhosravi@gmail.com>:
>>>
>>> Why? Surely there must be a better workaround.
>>>>
>>>> P
>>>>
>>>>
>>>> On 20 February 2012 12:33, Stefan Thomas <
>>>> kontrapunktstefan@googlemail.com> wrote:
>>>>
>>>>> Dear community,
>>>>> is it impossible to integrate an instr endin section in an UDO?
>>>>> I've tried it, but unseccessfully.
>>>>>
>>>>
>>>>
>>>
>>
>
> 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"
>
>

Date2012-02-20 16:26
FromStefan Thomas
SubjectRe: [Csnd] instr in udo
Why do you want an instrument inside an opcode?

Well,
I'm too lazy to type once more than I think it should be necessary to type the below quoted lines.
But I think, I will try to make it easier with an macro.

instr isubinstrumentnumber
idur         = p3
ipartfreq    = p4
ipartamp    = p5
ipartnumber    = p6
iatt        = p7
aenv    linsegr 0, iatt, 1, idur,0, 0,1, 0
asig     poscil aenv*ipartamp, ipartfreq, gisine
outs    asig, asig
endin

 
Am 20. Februar 2012 16:44 schrieb Adam Puckett <adotsdothmusic@gmail.com>:
Why do you want an instrument inside an opcode?

On 2/20/12, Stefan Thomas <kontrapunktstefan@googlemail.com> wrote:
> Yes, but I would like to include it in the UDO, if possible.
> Maybee something can be done with macros?
>
> Am 20. Februar 2012 15:49 schrieb peiman khosravi <peimankhosravi@gmail.com>
> :
>
>> I see. But you can have the instr block defined as a separate instrument
>> rather than enclosing it inside your UDO right?
>>
>> P
>>
>>
>> On 20 February 2012 13:22, Stefan Thomas <kontrapunktstefan@googlemail.com
>> > wrote:
>>
>>> Dear Peiman,
>>> I've tried it with the below quoted code, which is just a test.
>>> The problem here is the instr- section within the opcode, I get the error
>>> message:
>>>
>>>> instr not allowed in opcode block, line 31:
>>>>
>>> Here is my code:
>>>
>>> <CsoundSynthesizer>
>>> <CsOptions>
>>> -odevaudio -Ma -b-1 -B 4096 -m0d
>>> </CsOptions>
>>> ; ==============================================
>>> <CsInstruments>
>>> sr    =    48000
>>> ksmps     =     100
>>> nchnls    =    2
>>> 0dbfs    =    1
>>> gisine ftgen 0,0,2^10, 10, 1
>>>
>>> opcode SimpleAdsyn, 0,iiiii
>>> inumparts,imaxdur,iatt,imaxamp,isubinstrumentnumber xin
>>>
>>> iamp        ampmidi    imaxamp
>>> icps        cpsmidi
>>> ipartnumber    =    1
>>> isubinstr    = isubinstrumentnummer+imidinot/1000
>>> loop:
>>> ipartamp    =        iamp/ipartnumber
>>> ipartfreq    =        ipartnumber * icps
>>> idur        =        imaxdur/ipartnumber
>>> iatt        =        iatt/ipartnumber
>>>         event_i    "i", isubinstrumentnumber, 0, idur, ipartfreq,
>>> ipartamp, ipartnumber,iatt
>>>         loop_le    ipartnumber, 1, inumparts, loop
>>> krelease    release
>>>  if krelease == 1 then
>>>          turnoff2    isubinstrumentnumber, 4, 1
>>>  endif
>>> instr isubinstrumentnumber
>>> idur         = p3
>>> ipartfreq    = p4
>>> ipartamp    = p5
>>> ipartnumber    = p6
>>> iatt        = p7
>>> aenv    linsegr 0, iatt, 1, idur,0, 0,1, 0
>>> asig     poscil aenv*ipartamp, ipartfreq, gisine
>>> outs    asig, asig
>>> endin
>>>
>>> endop
>>>
>>> instr 1
>>> inumparts         = 5
>>> imaxdur              = 5
>>> iatt              = 0.1
>>> imaxamp           = 1
>>> isubinstrumentnumber = 101
>>> SimpleAdsyn inumparts,imaxdur,iatt,imaxamp,isubinstrumentnumber
>>> endin
>>> </CsInstruments>
>>> ; ==============================================
>>> <CsScore>
>>> f     0 10
>>> i1     0 10
>>>
>>> </CsScore>
>>> </CsoundSynthesizer>
>>>
>>>
>>> Am 20. Februar 2012 13:40 schrieb peiman khosravi <
>>> peimankhosravi@gmail.com>:
>>>
>>> Why? Surely there must be a better workaround.
>>>>
>>>> P
>>>>
>>>>
>>>> On 20 February 2012 12:33, Stefan Thomas <
>>>> kontrapunktstefan@googlemail.com> wrote:
>>>>
>>>>> Dear community,
>>>>> is it impossible to integrate an instr endin section in an UDO?
>>>>> I've tried it, but unseccessfully.
>>>>>
>>>>
>>>>
>>>
>>
>
> 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"
>
>


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"



Date2012-02-20 16:28
Frompeiman khosravi
SubjectRe: [Csnd] instr in udo
But you only need to type it once!!

P

On 20 February 2012 16:26, Stefan Thomas <kontrapunktstefan@googlemail.com> wrote:
Why do you want an instrument inside an opcode?

Well,
I'm too lazy to type once more than I think it should be necessary to type the below quoted lines.
But I think, I will try to make it easier with an macro.


instr isubinstrumentnumber
idur         = p3
ipartfreq    = p4
ipartamp    = p5
ipartnumber    = p6
iatt        = p7
aenv    linsegr 0, iatt, 1, idur,0, 0,1, 0
asig     poscil aenv*ipartamp, ipartfreq, gisine
outs    asig, asig
endin

 
Am 20. Februar 2012 16:44 schrieb Adam Puckett <adotsdothmusic@gmail.com>:

Why do you want an instrument inside an opcode?

On 2/20/12, Stefan Thomas <kontrapunktstefan@googlemail.com> wrote:
> Yes, but I would like to include it in the UDO, if possible.
> Maybee something can be done with macros?
>
> Am 20. Februar 2012 15:49 schrieb peiman khosravi <peimankhosravi@gmail.com>
> :
>
>> I see. But you can have the instr block defined as a separate instrument
>> rather than enclosing it inside your UDO right?
>>
>> P
>>
>>
>> On 20 February 2012 13:22, Stefan Thomas <kontrapunktstefan@googlemail.com
>> > wrote:
>>
>>> Dear Peiman,
>>> I've tried it with the below quoted code, which is just a test.
>>> The problem here is the instr- section within the opcode, I get the error
>>> message:
>>>
>>>> instr not allowed in opcode block, line 31:
>>>>
>>> Here is my code:
>>>
>>> <CsoundSynthesizer>
>>> <CsOptions>
>>> -odevaudio -Ma -b-1 -B 4096 -m0d
>>> </CsOptions>
>>> ; ==============================================
>>> <CsInstruments>
>>> sr    =    48000
>>> ksmps     =     100
>>> nchnls    =    2
>>> 0dbfs    =    1
>>> gisine ftgen 0,0,2^10, 10, 1
>>>
>>> opcode SimpleAdsyn, 0,iiiii
>>> inumparts,imaxdur,iatt,imaxamp,isubinstrumentnumber xin
>>>
>>> iamp        ampmidi    imaxamp
>>> icps        cpsmidi
>>> ipartnumber    =    1
>>> isubinstr    = isubinstrumentnummer+imidinot/1000
>>> loop:
>>> ipartamp    =        iamp/ipartnumber
>>> ipartfreq    =        ipartnumber * icps
>>> idur        =        imaxdur/ipartnumber
>>> iatt        =        iatt/ipartnumber
>>>         event_i    "i", isubinstrumentnumber, 0, idur, ipartfreq,
>>> ipartamp, ipartnumber,iatt
>>>         loop_le    ipartnumber, 1, inumparts, loop
>>> krelease    release
>>>  if krelease == 1 then
>>>          turnoff2    isubinstrumentnumber, 4, 1
>>>  endif
>>> instr isubinstrumentnumber
>>> idur         = p3
>>> ipartfreq    = p4
>>> ipartamp    = p5
>>> ipartnumber    = p6
>>> iatt        = p7
>>> aenv    linsegr 0, iatt, 1, idur,0, 0,1, 0
>>> asig     poscil aenv*ipartamp, ipartfreq, gisine
>>> outs    asig, asig
>>> endin
>>>
>>> endop
>>>
>>> instr 1
>>> inumparts         = 5
>>> imaxdur              = 5
>>> iatt              = 0.1
>>> imaxamp           = 1
>>> isubinstrumentnumber = 101
>>> SimpleAdsyn inumparts,imaxdur,iatt,imaxamp,isubinstrumentnumber
>>> endin
>>> </CsInstruments>
>>> ; ==============================================
>>> <CsScore>
>>> f     0 10
>>> i1     0 10
>>>
>>> </CsScore>
>>> </CsoundSynthesizer>
>>>
>>>
>>> Am 20. Februar 2012 13:40 schrieb peiman khosravi <
>>> peimankhosravi@gmail.com>:
>>>
>>> Why? Surely there must be a better workaround.
>>>>
>>>> P
>>>>
>>>>
>>>> On 20 February 2012 12:33, Stefan Thomas <
>>>> kontrapunktstefan@googlemail.com> wrote:
>>>>
>>>>> Dear community,
>>>>> is it impossible to integrate an instr endin section in an UDO?
>>>>> I've tried it, but unseccessfully.
>>>>>
>>>>
>>>>
>>>
>>
>
> 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"
>
>


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"




Date2012-02-20 16:30
FromStefan Thomas
SubjectRe: [Csnd] instr in udo
But you only need to type it once!!
Yes, true, maybee I'm too puristic.
I think I will first write the udo, without macro, and then I will see.
Am 20. Februar 2012 17:28 schrieb peiman khosravi <peimankhosravi@gmail.com>:
But you only need to type it once!!

P


On 20 February 2012 16:26, Stefan Thomas <kontrapunktstefan@googlemail.com> wrote:
Why do you want an instrument inside an opcode?

Well,
I'm too lazy to type once more than I think it should be necessary to type the below quoted lines.
But I think, I will try to make it easier with an macro.


instr isubinstrumentnumber
idur         = p3
ipartfreq    = p4
ipartamp    = p5
ipartnumber    = p6
iatt        = p7
aenv    linsegr 0, iatt, 1, idur,0, 0,1, 0
asig     poscil aenv*ipartamp, ipartfreq, gisine
outs    asig, asig
endin

 
Am 20. Februar 2012 16:44 schrieb Adam Puckett <adotsdothmusic@gmail.com>:

Why do you want an instrument inside an opcode?

On 2/20/12, Stefan Thomas <kontrapunktstefan@googlemail.com> wrote:
> Yes, but I would like to include it in the UDO, if possible.
> Maybee something can be done with macros?
>
> Am 20. Februar 2012 15:49 schrieb peiman khosravi <peimankhosravi@gmail.com>
> :
>
>> I see. But you can have the instr block defined as a separate instrument
>> rather than enclosing it inside your UDO right?
>>
>> P
>>
>>
>> On 20 February 2012 13:22, Stefan Thomas <kontrapunktstefan@googlemail.com
>> > wrote:
>>
>>> Dear Peiman,
>>> I've tried it with the below quoted code, which is just a test.
>>> The problem here is the instr- section within the opcode, I get the error
>>> message:
>>>
>>>> instr not allowed in opcode block, line 31:
>>>>
>>> Here is my code:
>>>
>>> <CsoundSynthesizer>
>>> <CsOptions>
>>> -odevaudio -Ma -b-1 -B 4096 -m0d
>>> </CsOptions>
>>> ; ==============================================
>>> <CsInstruments>
>>> sr    =    48000
>>> ksmps     =     100
>>> nchnls    =    2
>>> 0dbfs    =    1
>>> gisine ftgen 0,0,2^10, 10, 1
>>>
>>> opcode SimpleAdsyn, 0,iiiii
>>> inumparts,imaxdur,iatt,imaxamp,isubinstrumentnumber xin
>>>
>>> iamp        ampmidi    imaxamp
>>> icps        cpsmidi
>>> ipartnumber    =    1
>>> isubinstr    = isubinstrumentnummer+imidinot/1000
>>> loop:
>>> ipartamp    =        iamp/ipartnumber
>>> ipartfreq    =        ipartnumber * icps
>>> idur        =        imaxdur/ipartnumber
>>> iatt        =        iatt/ipartnumber
>>>         event_i    "i", isubinstrumentnumber, 0, idur, ipartfreq,
>>> ipartamp, ipartnumber,iatt
>>>         loop_le    ipartnumber, 1, inumparts, loop
>>> krelease    release
>>>  if krelease == 1 then
>>>          turnoff2    isubinstrumentnumber, 4, 1
>>>  endif
>>> instr isubinstrumentnumber
>>> idur         = p3
>>> ipartfreq    = p4
>>> ipartamp    = p5
>>> ipartnumber    = p6
>>> iatt        = p7
>>> aenv    linsegr 0, iatt, 1, idur,0, 0,1, 0
>>> asig     poscil aenv*ipartamp, ipartfreq, gisine
>>> outs    asig, asig
>>> endin
>>>
>>> endop
>>>
>>> instr 1
>>> inumparts         = 5
>>> imaxdur              = 5
>>> iatt              = 0.1
>>> imaxamp           = 1
>>> isubinstrumentnumber = 101
>>> SimpleAdsyn inumparts,imaxdur,iatt,imaxamp,isubinstrumentnumber
>>> endin
>>> </CsInstruments>
>>> ; ==============================================
>>> <CsScore>
>>> f     0 10
>>> i1     0 10
>>>
>>> </CsScore>
>>> </CsoundSynthesizer>
>>>
>>>
>>> Am 20. Februar 2012 13:40 schrieb peiman khosravi <
>>> peimankhosravi@gmail.com>:
>>>
>>> Why? Surely there must be a better workaround.
>>>>
>>>> P
>>>>
>>>>
>>>> On 20 February 2012 12:33, Stefan Thomas <
>>>> kontrapunktstefan@googlemail.com> wrote:
>>>>
>>>>> Dear community,
>>>>> is it impossible to integrate an instr endin section in an UDO?
>>>>> I've tried it, but unseccessfully.
>>>>>
>>>>
>>>>
>>>
>>
>
> 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"
>
>


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"