Csound Csound-dev Csound-tekno Search About

problem with truncated notes

Date2016-03-08 09:51
FromStefan Thomas
Subjectproblem with truncated notes
Dear community,
I have a problem with truncated notes, caused by a very high tempo in the score.
What I would like to do is to add a absolute release time of e.g. 0.1 seconds to all notes.
I've tried that in the following example, but without succes.
Here is my short patch:
<CsoundSynthesizer>
<CsOptions>
-+rtaudio=jack -odac
</CsOptions>
; ==============================================
<CsInstruments>

sr    =    48000
ksmps     =     10
nchnls    =    2
0dbfs    =    1
gisine ftgen 0,0,2^13,10,1
instr 1   
    idur    = p3
    iamp     = 0.2
     icps     = cpspch(p4)
    irel    =     p5 ; doesn't have an influence
    iatt     =     0.01
    iholdtime    = idur-iatt-irel
    kenv    linseg 0,iatt,1,iholdtime,1,irel,0
    asine    poscil iamp,icps
   
    outs asine*kenv,asine*kenv
endin

</CsInstruments>
; ==============================================
<CsScore>
t 0 240

i1 0 0.25 8.00 10
i1 + . 8.02
i1 + . 8.00


</CsScore>
</CsoundSynthesizer>



Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here

Date2016-03-08 10:08
FromPeter Burgess
SubjectRe: problem with truncated notes
have a look at the linsegr opcode. All the ***seg opcodes have an "r"
version that adds an extra release segment to the end of your note,
beyond the time specified in the score.

so replace:

kenv    linseg 0,iatt,1,iholdtime,1,irel,0

with

kenv    linsegr 0,iatt,1,iholdtime,1,irel,0

I haven't ever properly experimented though, so I can't guarantee that
it won't cause a delay in your score, but I wouldn't of thought it
would. If it doesn't work, just report back and we'll find another
solution

Pete

On Tue, Mar 8, 2016 at 9:51 AM, Stefan Thomas
 wrote:
> Dear community,
> I have a problem with truncated notes, caused by a very high tempo in the
> score.
> What I would like to do is to add a absolute release time of e.g. 0.1
> seconds to all notes.
> I've tried that in the following example, but without succes.
> Here is my short patch:
> 
> 
> -+rtaudio=jack -odac
> 
> ; ==============================================
> 
>
> sr    =    48000
> ksmps     =     10
> nchnls    =    2
> 0dbfs    =    1
> gisine ftgen 0,0,2^13,10,1
> instr 1
>     idur    = p3
>     iamp     = 0.2
>      icps     = cpspch(p4)
>     irel    =     p5 ; doesn't have an influence
>     iatt     =     0.01
>     iholdtime    = idur-iatt-irel
>     kenv    linseg 0,iatt,1,iholdtime,1,irel,0
>     asine    poscil iamp,icps
>
>     outs asine*kenv,asine*kenv
> endin
>
> 
> ; ==============================================
> 
> t 0 240
>
> i1 0 0.25 8.00 10
> i1 + . 8.02
> i1 + . 8.00
>
>
> 
> 
>
>
>
> Csound mailing list Csound@listserv.heanet.ie
> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to
> https://github.com/csound/csound/issues Discussions of bugs and features can
> be posted here


Date2016-03-08 10:13
FromStefan Thomas
SubjectRe: problem with truncated notes
Dear Peter,
Yes, thanks!
I didn't expect the linsegr opcode to work without midi, bot it does!

2016-03-08 11:08 GMT+01:00 Peter Burgess <pete.soundtechnician@gmail.com>:
have a look at the linsegr opcode. All the ***seg opcodes have an "r"
version that adds an extra release segment to the end of your note,
beyond the time specified in the score.

so replace:

kenv    linseg 0,iatt,1,iholdtime,1,irel,0

with

kenv    linsegr 0,iatt,1,iholdtime,1,irel,0

I haven't ever properly experimented though, so I can't guarantee that
it won't cause a delay in your score, but I wouldn't of thought it
would. If it doesn't work, just report back and we'll find another
solution

Pete

On Tue, Mar 8, 2016 at 9:51 AM, Stefan Thomas
<kontrapunktstefan@gmail.com> wrote:
> Dear community,
> I have a problem with truncated notes, caused by a very high tempo in the
> score.
> What I would like to do is to add a absolute release time of e.g. 0.1
> seconds to all notes.
> I've tried that in the following example, but without succes.
> Here is my short patch:
> <CsoundSynthesizer>
> <CsOptions>
> -+rtaudio=jack -odac
> </CsOptions>
> ; ==============================================
> <CsInstruments>
>
> sr    =    48000
> ksmps     =     10
> nchnls    =    2
> 0dbfs    =    1
> gisine ftgen 0,0,2^13,10,1
> instr 1
>     idur    = p3
>     iamp     = 0.2
>      icps     = cpspch(p4)
>     irel    =     p5 ; doesn't have an influence
>     iatt     =     0.01
>     iholdtime    = idur-iatt-irel
>     kenv    linseg 0,iatt,1,iholdtime,1,irel,0
>     asine    poscil iamp,icps
>
>     outs asine*kenv,asine*kenv
> endin
>
> </CsInstruments>
> ; ==============================================
> <CsScore>
> t 0 240
>
> i1 0 0.25 8.00 10
> i1 + . 8.02
> i1 + . 8.00
>
>
> </CsScore>
> </CsoundSynthesizer>
>
>
>
> Csound mailing list Csound@listserv.heanet.ie
> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to
> https://github.com/csound/csound/issues Discussions of bugs and features can
> be posted here



--
http://algorythmradio.com
https://soundcloud.com/algorythmradio

Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here

Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here

Date2016-03-08 10:20
FromPeter Burgess
SubjectRe: problem with truncated notes
excellent, glad to be of assistance!

On Tue, Mar 8, 2016 at 10:13 AM, Stefan Thomas
 wrote:
> Dear Peter,
> Yes, thanks!
> I didn't expect the linsegr opcode to work without midi, bot it does!
>
> 2016-03-08 11:08 GMT+01:00 Peter Burgess :
>>
>> have a look at the linsegr opcode. All the ***seg opcodes have an "r"
>> version that adds an extra release segment to the end of your note,
>> beyond the time specified in the score.
>>
>> so replace:
>>
>> kenv    linseg 0,iatt,1,iholdtime,1,irel,0
>>
>> with
>>
>> kenv    linsegr 0,iatt,1,iholdtime,1,irel,0
>>
>> I haven't ever properly experimented though, so I can't guarantee that
>> it won't cause a delay in your score, but I wouldn't of thought it
>> would. If it doesn't work, just report back and we'll find another
>> solution
>>
>> Pete
>>
>> On Tue, Mar 8, 2016 at 9:51 AM, Stefan Thomas
>>  wrote:
>> > Dear community,
>> > I have a problem with truncated notes, caused by a very high tempo in
>> > the
>> > score.
>> > What I would like to do is to add a absolute release time of e.g. 0.1
>> > seconds to all notes.
>> > I've tried that in the following example, but without succes.
>> > Here is my short patch:
>> > 
>> > 
>> > -+rtaudio=jack -odac
>> > 
>> > ; ==============================================
>> > 
>> >
>> > sr    =    48000
>> > ksmps     =     10
>> > nchnls    =    2
>> > 0dbfs    =    1
>> > gisine ftgen 0,0,2^13,10,1
>> > instr 1
>> >     idur    = p3
>> >     iamp     = 0.2
>> >      icps     = cpspch(p4)
>> >     irel    =     p5 ; doesn't have an influence
>> >     iatt     =     0.01
>> >     iholdtime    = idur-iatt-irel
>> >     kenv    linseg 0,iatt,1,iholdtime,1,irel,0
>> >     asine    poscil iamp,icps
>> >
>> >     outs asine*kenv,asine*kenv
>> > endin
>> >
>> > 
>> > ; ==============================================
>> > 
>> > t 0 240
>> >
>> > i1 0 0.25 8.00 10
>> > i1 + . 8.02
>> > i1 + . 8.00
>> >
>> >
>> > 
>> > 
>> >
>> >
>> >
>> > Csound mailing list Csound@listserv.heanet.ie
>> > https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to
>> > https://github.com/csound/csound/issues Discussions of bugs and features
>> > can
>> > be posted here
>>
>>
>>
>> --
>> http://algorythmradio.com
>> https://soundcloud.com/algorythmradio
>>
>> Csound mailing list
>> Csound@listserv.heanet.ie
>> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
>> Send bugs reports to
>>         https://github.com/csound/csound/issues
>> Discussions of bugs and features can be posted here
>
>
> Csound mailing list Csound@listserv.heanet.ie
> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to
> https://github.com/csound/csound/issues Discussions of bugs and features can
> be posted here


Date2016-03-09 13:50
FromWolf Peuker
SubjectRe: problem with truncated notes
Hi there,

Just out of curiosity, isn't it possible to alter p3 within the instrument code? In the manual (http://www.csounds.com/manual/html/i.html) I found this:

An instrument can modify its own duration either by changing its p3 value during note initialization, or by prolonging itself through the action of a linenr or xtratim unit.

I was planning to try this myself, would you consider it good practice?

Best,
Wolf

Am 08.03.2016 um 11:20 schrieb Peter Burgess:
excellent, glad to be of assistance!

On Tue, Mar 8, 2016 at 10:13 AM, Stefan Thomas
<kontrapunktstefan@gmail.com> wrote:
Dear Peter,
Yes, thanks!
I didn't expect the linsegr opcode to work without midi, bot it does!

2016-03-08 11:08 GMT+01:00 Peter Burgess <pete.soundtechnician@gmail.com>:
have a look at the linsegr opcode. All the ***seg opcodes have an "r"
version that adds an extra release segment to the end of your note,
beyond the time specified in the score.

so replace:

kenv    linseg 0,iatt,1,iholdtime,1,irel,0

with

kenv    linsegr 0,iatt,1,iholdtime,1,irel,0

I haven't ever properly experimented though, so I can't guarantee that
it won't cause a delay in your score, but I wouldn't of thought it
would. If it doesn't work, just report back and we'll find another
solution

Pete

On Tue, Mar 8, 2016 at 9:51 AM, Stefan Thomas
<kontrapunktstefan@gmail.com> wrote:
Dear community,
I have a problem with truncated notes, caused by a very high tempo in
the
score.
What I would like to do is to add a absolute release time of e.g. 0.1
seconds to all notes.
I've tried that in the following example, but without succes.
Here is my short patch:
<CsoundSynthesizer>
<CsOptions>
-+rtaudio=jack -odac
</CsOptions>
; ==============================================
<CsInstruments>

sr    =    48000
ksmps     =     10
nchnls    =    2
0dbfs    =    1
gisine ftgen 0,0,2^13,10,1
instr 1
    idur    = p3
    iamp     = 0.2
     icps     = cpspch(p4)
    irel    =     p5 ; doesn't have an influence
    iatt     =     0.01
    iholdtime    = idur-iatt-irel
    kenv    linseg 0,iatt,1,iholdtime,1,irel,0
    asine    poscil iamp,icps

    outs asine*kenv,asine*kenv
endin

</CsInstruments>
; ==============================================
<CsScore>
t 0 240

i1 0 0.25 8.00 10
i1 + . 8.02
i1 + . 8.00


</CsScore>
</CsoundSynthesizer>



Csound mailing list Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to
https://github.com/csound/csound/issues Discussions of bugs and features
can
be posted here


--
http://algorythmradio.com
https://soundcloud.com/algorythmradio

Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here

Csound mailing list Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to
https://github.com/csound/csound/issues Discussions of bugs and features can
be posted here




Date2016-03-09 14:59
Fromjpff
SubjectRe: problem with truncated notes
Changing p3 in an instrument is sometimes the best way to do stuff. 
Nothing wrong with it IMO

On Wed, 9 Mar 2016, Wolf Peuker wrote:

> Hi there,
> 
> Just out of curiosity, isn't it possible to alter p3 within the instrument
> code? In the manual (http://www.csounds.com/manual/html/i.html) I found this:
>
>       An instrument can modify its own duration either by changing its
>       p3 value during note initialization, or by prolonging itself
>       through the action of a linenr or xtratim unit.
> 
> 
> I was planning to try this myself, would you consider it good practice?
> 
> Best,
> Wolf
> 
> Am 08.03.2016 um 11:20 schrieb Peter Burgess:
> 
> excellent, glad to be of assistance!
> 
> On Tue, Mar 8, 2016 at 10:13 AM, Stefan Thomas
>  wrote:
> 
> Dear Peter,
> Yes, thanks!
> I didn't expect the linsegr opcode to work without midi, bot it does!
> 
> 2016-03-08 11:08 GMT+01:00 Peter Burgess :
> 
> have a look at the linsegr opcode. All the ***seg opcodes have an "r"
> version that adds an extra release segment to the end of your note,
> beyond the time specified in the score.
> 
> so replace:
> 
> kenv    linseg 0,iatt,1,iholdtime,1,irel,0
> 
> with
> 
> kenv    linsegr 0,iatt,1,iholdtime,1,irel,0
> 
> I haven't ever properly experimented though, so I can't guarantee that
> it won't cause a delay in your score, but I wouldn't of thought it
> would. If it doesn't work, just report back and we'll find another
> solution
> 
> Pete
> 
> On Tue, Mar 8, 2016 at 9:51 AM, Stefan Thomas
>  wrote:
> 
> Dear community,
> I have a problem with truncated notes, caused by a very high tempo in
> the
> score.
> What I would like to do is to add a absolute release time of e.g. 0.1
> seconds to all notes.
> I've tried that in the following example, but without succes.
> Here is my short patch:
> 
> 
> -+rtaudio=jack -odac
> 
> ; ==============================================
> 
> 
> sr    =    48000
> ksmps     =     10
> nchnls    =    2
> 0dbfs    =    1
> gisine ftgen 0,0,2^13,10,1
> instr 1
>     idur    = p3
>     iamp     = 0.2
>      icps     = cpspch(p4)
>     irel    =     p5 ; doesn't have an influence
>     iatt     =     0.01
>     iholdtime    = idur-iatt-irel
>     kenv    linseg 0,iatt,1,iholdtime,1,irel,0
>     asine    poscil iamp,icps
>
>     outs asine*kenv,asine*kenv
> endin
> 
> 
> ; ==============================================
> 
> t 0 240
> 
> i1 0 0.25 8.00 10
> i1 + . 8.02
> i1 + . 8.00
> 
> 
> 
> 
> 
> 
> 
> Csound mailing list Csound@listserv.heanet.ie
> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to
> https://github.com/csound/csound/issues Discussions of bugs and features
> can
> be posted here
> 
> 
> 
> --
> http://algorythmradio.com
> https://soundcloud.com/algorythmradio
> 
> Csound mailing list
> Csound@listserv.heanet.ie
> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
> Send bugs reports to
>         https://github.com/csound/csound/issues
> Discussions of bugs and features can be posted here
> 
> 
> Csound mailing list Csound@listserv.heanet.ie
> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to
> https://github.com/csound/csound/issues Discussions of bugs and features can
> be posted here
> 
> 
> 
> 
> Csound mailing list Csound@listserv.heanet.ie
> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to
> https://github.com/csound/csound/issues Discussions of bugs and features can
> be posted here
>

Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here

Date2016-03-09 15:14
FromMichael Gogins
SubjectRe: problem with truncated notes
Yes, and yes. Example from my own code:

iattack                         =                       0.02
isustain                        =                       p3
irelease                        =                       0.15
p3                              =                       isustain +
iattack + irelease

Regards,
Mike

-----------------------------------------------------
Michael Gogins
Irreducible Productions
http://michaelgogins.tumblr.com
Michael dot Gogins at gmail dot com


On Wed, Mar 9, 2016 at 8:50 AM, Wolf Peuker  wrote:
> Hi there,
>
> Just out of curiosity, isn't it possible to alter p3 within the instrument
> code? In the manual (http://www.csounds.com/manual/html/i.html) I found
> this:
>
> An instrument can modify its own duration either by changing its p3 value
> during note initialization, or by prolonging itself through the action of a
> linenr or xtratim unit.
>
>
> I was planning to try this myself, would you consider it good practice?
>
> Best,
> Wolf
>
>
> Am 08.03.2016 um 11:20 schrieb Peter Burgess:
>
> excellent, glad to be of assistance!
>
> On Tue, Mar 8, 2016 at 10:13 AM, Stefan Thomas
>  wrote:
>
> Dear Peter,
> Yes, thanks!
> I didn't expect the linsegr opcode to work without midi, bot it does!
>
> 2016-03-08 11:08 GMT+01:00 Peter Burgess :
>
> have a look at the linsegr opcode. All the ***seg opcodes have an "r"
> version that adds an extra release segment to the end of your note,
> beyond the time specified in the score.
>
> so replace:
>
> kenv    linseg 0,iatt,1,iholdtime,1,irel,0
>
> with
>
> kenv    linsegr 0,iatt,1,iholdtime,1,irel,0
>
> I haven't ever properly experimented though, so I can't guarantee that
> it won't cause a delay in your score, but I wouldn't of thought it
> would. If it doesn't work, just report back and we'll find another
> solution
>
> Pete
>
> On Tue, Mar 8, 2016 at 9:51 AM, Stefan Thomas
>  wrote:
>
> Dear community,
> I have a problem with truncated notes, caused by a very high tempo in
> the
> score.
> What I would like to do is to add a absolute release time of e.g. 0.1
> seconds to all notes.
> I've tried that in the following example, but without succes.
> Here is my short patch:
> 
> 
> -+rtaudio=jack -odac
> 
> ; ==============================================
> 
>
> sr    =    48000
> ksmps     =     10
> nchnls    =    2
> 0dbfs    =    1
> gisine ftgen 0,0,2^13,10,1
> instr 1
>     idur    = p3
>     iamp     = 0.2
>      icps     = cpspch(p4)
>     irel    =     p5 ; doesn't have an influence
>     iatt     =     0.01
>     iholdtime    = idur-iatt-irel
>     kenv    linseg 0,iatt,1,iholdtime,1,irel,0
>     asine    poscil iamp,icps
>
>     outs asine*kenv,asine*kenv
> endin
>
> 
> ; ==============================================
> 
> t 0 240
>
> i1 0 0.25 8.00 10
> i1 + . 8.02
> i1 + . 8.00
>
>
> 
> 
>
>
>
> Csound mailing list Csound@listserv.heanet.ie
> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to
> https://github.com/csound/csound/issues Discussions of bugs and features
> can
> be posted here
>
>
> --
> http://algorythmradio.com
> https://soundcloud.com/algorythmradio
>
> Csound mailing list
> Csound@listserv.heanet.ie
> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
> Send bugs reports to
>         https://github.com/csound/csound/issues
> Discussions of bugs and features can be posted here
>
> Csound mailing list Csound@listserv.heanet.ie
> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to
> https://github.com/csound/csound/issues Discussions of bugs and features can
> be posted here
>
>
>
> Csound mailing list Csound@listserv.heanet.ie
> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to
> https://github.com/csound/csound/issues Discussions of bugs and features can
> be posted here

Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here

Date2016-03-09 21:44
Fromjoachim heintz
SubjectRe: problem with truncated notes
just to add another frequently used example (playing a sound file once):
p3 = filelen("my/sound/file.wav")

	joachim


On 09/03/16 16:14, Michael Gogins wrote:
> Yes, and yes. Example from my own code:
>
> iattack                         =                       0.02
> isustain                        =                       p3
> irelease                        =                       0.15
> p3                              =                       isustain +
> iattack + irelease
>
> Regards,
> Mike
>
> -----------------------------------------------------
> Michael Gogins
> Irreducible Productions
> http://michaelgogins.tumblr.com
> Michael dot Gogins at gmail dot com
>
>
> On Wed, Mar 9, 2016 at 8:50 AM, Wolf Peuker  wrote:
>> Hi there,
>>
>> Just out of curiosity, isn't it possible to alter p3 within the instrument
>> code? In the manual (http://www.csounds.com/manual/html/i.html) I found
>> this:
>>
>> An instrument can modify its own duration either by changing its p3 value
>> during note initialization, or by prolonging itself through the action of a
>> linenr or xtratim unit.
>>
>>
>> I was planning to try this myself, would you consider it good practice?
>>
>> Best,
>> Wolf
>>
>>
>> Am 08.03.2016 um 11:20 schrieb Peter Burgess:
>>
>> excellent, glad to be of assistance!
>>
>> On Tue, Mar 8, 2016 at 10:13 AM, Stefan Thomas
>>  wrote:
>>
>> Dear Peter,
>> Yes, thanks!
>> I didn't expect the linsegr opcode to work without midi, bot it does!
>>
>> 2016-03-08 11:08 GMT+01:00 Peter Burgess :
>>
>> have a look at the linsegr opcode. All the ***seg opcodes have an "r"
>> version that adds an extra release segment to the end of your note,
>> beyond the time specified in the score.
>>
>> so replace:
>>
>> kenv    linseg 0,iatt,1,iholdtime,1,irel,0
>>
>> with
>>
>> kenv    linsegr 0,iatt,1,iholdtime,1,irel,0
>>
>> I haven't ever properly experimented though, so I can't guarantee that
>> it won't cause a delay in your score, but I wouldn't of thought it
>> would. If it doesn't work, just report back and we'll find another
>> solution
>>
>> Pete
>>
>> On Tue, Mar 8, 2016 at 9:51 AM, Stefan Thomas
>>  wrote:
>>
>> Dear community,
>> I have a problem with truncated notes, caused by a very high tempo in
>> the
>> score.
>> What I would like to do is to add a absolute release time of e.g. 0.1
>> seconds to all notes.
>> I've tried that in the following example, but without succes.
>> Here is my short patch:
>> 
>> 
>> -+rtaudio=jack -odac
>> 
>> ; ==============================================
>> 
>>
>> sr    =    48000
>> ksmps     =     10
>> nchnls    =    2
>> 0dbfs    =    1
>> gisine ftgen 0,0,2^13,10,1
>> instr 1
>>      idur    = p3
>>      iamp     = 0.2
>>       icps     = cpspch(p4)
>>      irel    =     p5 ; doesn't have an influence
>>      iatt     =     0.01
>>      iholdtime    = idur-iatt-irel
>>      kenv    linseg 0,iatt,1,iholdtime,1,irel,0
>>      asine    poscil iamp,icps
>>
>>      outs asine*kenv,asine*kenv
>> endin
>>
>> 
>> ; ==============================================
>> 
>> t 0 240
>>
>> i1 0 0.25 8.00 10
>> i1 + . 8.02
>> i1 + . 8.00
>>
>>
>> 
>> 
>>
>>
>>
>> Csound mailing list Csound@listserv.heanet.ie
>> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to
>> https://github.com/csound/csound/issues Discussions of bugs and features
>> can
>> be posted here
>>
>>
>> --
>> http://algorythmradio.com
>> https://soundcloud.com/algorythmradio
>>
>> Csound mailing list
>> Csound@listserv.heanet.ie
>> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
>> Send bugs reports to
>>          https://github.com/csound/csound/issues
>> Discussions of bugs and features can be posted here
>>
>> Csound mailing list Csound@listserv.heanet.ie
>> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to
>> https://github.com/csound/csound/issues Discussions of bugs and features can
>> be posted here
>>
>>
>>
>> Csound mailing list Csound@listserv.heanet.ie
>> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to
>> https://github.com/csound/csound/issues Discussions of bugs and features can
>> be posted here
>
> Csound mailing list
> Csound@listserv.heanet.ie
> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
> Send bugs reports to
>          https://github.com/csound/csound/issues
> Discussions of bugs and features can be posted here
>

Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here

Date2016-03-10 10:08
FromPeter Burgess
SubjectRe: problem with truncated notes
I've only recently found out about altering p3 within instruments, and
it's saved me alot of hassle! I'd recommend it.

It presents no problems in real time usage that I've come across. It
can present timing issues at the end of a score driven loop when using
"r" and "s" loops, but this can be easily overcome. I've now almost
fully converted to "{ }" score loops.

Pete

On Wed, Mar 9, 2016 at 9:44 PM, joachim heintz  wrote:
> just to add another frequently used example (playing a sound file once):
> p3 = filelen("my/sound/file.wav")
>
>         joachim
>
>
>
> On 09/03/16 16:14, Michael Gogins wrote:
>>
>> Yes, and yes. Example from my own code:
>>
>> iattack                         =                       0.02
>> isustain                        =                       p3
>> irelease                        =                       0.15
>> p3                              =                       isustain +
>> iattack + irelease
>>
>> Regards,
>> Mike
>>
>> -----------------------------------------------------
>> Michael Gogins
>> Irreducible Productions
>> http://michaelgogins.tumblr.com
>> Michael dot Gogins at gmail dot com
>>
>>
>> On Wed, Mar 9, 2016 at 8:50 AM, Wolf Peuker  wrote:
>>>
>>> Hi there,
>>>
>>> Just out of curiosity, isn't it possible to alter p3 within the
>>> instrument
>>> code? In the manual (http://www.csounds.com/manual/html/i.html) I found
>>> this:
>>>
>>> An instrument can modify its own duration either by changing its p3 value
>>> during note initialization, or by prolonging itself through the action of
>>> a
>>> linenr or xtratim unit.
>>>
>>>
>>> I was planning to try this myself, would you consider it good practice?
>>>
>>> Best,
>>> Wolf
>>>
>>>
>>> Am 08.03.2016 um 11:20 schrieb Peter Burgess:
>>>
>>> excellent, glad to be of assistance!
>>>
>>> On Tue, Mar 8, 2016 at 10:13 AM, Stefan Thomas
>>>  wrote:
>>>
>>> Dear Peter,
>>> Yes, thanks!
>>> I didn't expect the linsegr opcode to work without midi, bot it does!
>>>
>>> 2016-03-08 11:08 GMT+01:00 Peter Burgess
>>> :
>>>
>>> have a look at the linsegr opcode. All the ***seg opcodes have an "r"
>>> version that adds an extra release segment to the end of your note,
>>> beyond the time specified in the score.
>>>
>>> so replace:
>>>
>>> kenv    linseg 0,iatt,1,iholdtime,1,irel,0
>>>
>>> with
>>>
>>> kenv    linsegr 0,iatt,1,iholdtime,1,irel,0
>>>
>>> I haven't ever properly experimented though, so I can't guarantee that
>>> it won't cause a delay in your score, but I wouldn't of thought it
>>> would. If it doesn't work, just report back and we'll find another
>>> solution
>>>
>>> Pete
>>>
>>> On Tue, Mar 8, 2016 at 9:51 AM, Stefan Thomas
>>>  wrote:
>>>
>>> Dear community,
>>> I have a problem with truncated notes, caused by a very high tempo in
>>> the
>>> score.
>>> What I would like to do is to add a absolute release time of e.g. 0.1
>>> seconds to all notes.
>>> I've tried that in the following example, but without succes.
>>> Here is my short patch:
>>> 
>>> 
>>> -+rtaudio=jack -odac
>>> 
>>> ; ==============================================
>>> 
>>>
>>> sr    =    48000
>>> ksmps     =     10
>>> nchnls    =    2
>>> 0dbfs    =    1
>>> gisine ftgen 0,0,2^13,10,1
>>> instr 1
>>>      idur    = p3
>>>      iamp     = 0.2
>>>       icps     = cpspch(p4)
>>>      irel    =     p5 ; doesn't have an influence
>>>      iatt     =     0.01
>>>      iholdtime    = idur-iatt-irel
>>>      kenv    linseg 0,iatt,1,iholdtime,1,irel,0
>>>      asine    poscil iamp,icps
>>>
>>>      outs asine*kenv,asine*kenv
>>> endin
>>>
>>> 
>>> ; ==============================================
>>> 
>>> t 0 240
>>>
>>> i1 0 0.25 8.00 10
>>> i1 + . 8.02
>>> i1 + . 8.00
>>>
>>>
>>> 
>>> 
>>>
>>>
>>>
>>> Csound mailing list Csound@listserv.heanet.ie
>>> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to
>>> https://github.com/csound/csound/issues Discussions of bugs and features
>>> can
>>> be posted here
>>>
>>>
>>> --
>>> http://algorythmradio.com
>>> https://soundcloud.com/algorythmradio
>>>
>>> Csound mailing list
>>> Csound@listserv.heanet.ie
>>> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
>>> Send bugs reports to
>>>          https://github.com/csound/csound/issues
>>> Discussions of bugs and features can be posted here
>>>
>>> Csound mailing list Csound@listserv.heanet.ie
>>> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to
>>> https://github.com/csound/csound/issues Discussions of bugs and features
>>> can
>>> be posted here
>>>
>>>
>>>
>>> Csound mailing list Csound@listserv.heanet.ie
>>> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to
>>> https://github.com/csound/csound/issues Discussions of bugs and features
>>> can
>>> be posted here
>>
>>
>> Csound mailing list
>> Csound@listserv.heanet.ie
>> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
>> Send bugs reports to
>>          https://github.com/csound/csound/issues
>> Discussions of bugs and features can be posted here
>>
>
> Csound mailing list
> Csound@listserv.heanet.ie
> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
> Send bugs reports to
>        https://github.com/csound/csound/issues
> Discussions of bugs and features can be posted here