Csound Csound-dev Csound-tekno Search About

[Csnd] r and r (looping ostinati)

Date2011-01-16 06:06
FromJim Aikin
Subject[Csnd] r and r (looping ostinati)
When I use a release-segment envelope such as linsegr in conjunction with an
r statement in the score, the repetition created by the r statement doesn't
transpire until the end of the final note. That is, the loop falls out of
rhythm because of the release segment in the final note. There's a hiccup.
(.csd example below.)

I'm using linsegr to get overlap between one note and the next in a score
using the + notation, but I also want a rhythmically sensible loop, not one
in which each new iteration starts late.

Two questions: First, is there a workaround? Is there a way (using linsegr
or any other method) to get the sound from the end of one iteration of an r
loop to sustain under the beginning of the next iteration?

Second question: Does anybody but me feel this would be a nice feature to
add to Csound? What I'm thinking of is an r-type score statement that would
look only at the durations stated in the score in deciding when to start the
new iteration of the repeat, rather than waiting for the last note to
finish.

On a related note, when a t statement is placed in an r loop, its time-zero
is referred to on every repeat of the loop. As a result, it doesn't seem to
be possible (unless I'm missing something) to use an r statement in a
passage where the music is changing tempo. Other than by changing tempo at
the loop points using the r statement's incrementing macro, I suppose, and
that isn't necessarily a very musical form of tempo change.

--JA

***************************

sr = 44100
ksmps = 4
nchnls = 2
0dbfs = 1
giSine		ftgen	0, 0, 4096, 10, 1

instr 1
idur = p3
ifrq		cpsxpch	p4, 12, 2, 32
iamp = 0.3
index = 2

kamp		linsegr	0, 0.002, 1, (idur - 0.002), 0.1, 0.2, 0
kindex	linsegr	0, 0.002, index, (idur - 0.002), (0.2 * index), 0.08, 0
asig		foscili	kamp, ifrq, 1, 1, kindex, giSine

outs		asig, asig
endin




r 5
i1	0	0.5	3.00
i1	+	.	3.07
i1	+	.	4.04
i1	+	.	4.00
; there will be a .2 second gap here before the repeat
s

Date2011-01-16 06:55
FromRene Jopi
Subject[Csnd] Re: r and r (looping ostinati)
Hi,
A bug have been solved by Victor recently in cvs for linsegr and madsr.
Release time problem when using more than one linsegr or madsr in the same orc.

(With csound cvs, I have the 0.2 sec gap before the repeat)

René



2011/1/16 Jim Aikin <midiguru23@sbcglobal.net>

When I use a release-segment envelope such as linsegr in conjunction with an
r statement in the score, the repetition created by the r statement doesn't
transpire until the end of the final note. That is, the loop falls out of
rhythm because of the release segment in the final note. There's a hiccup.
(.csd example below.)

I'm using linsegr to get overlap between one note and the next in a score
using the + notation, but I also want a rhythmically sensible loop, not one
in which each new iteration starts late.

Two questions: First, is there a workaround? Is there a way (using linsegr
or any other method) to get the sound from the end of one iteration of an r
loop to sustain under the beginning of the next iteration?

Second question: Does anybody but me feel this would be a nice feature to
add to Csound? What I'm thinking of is an r-type score statement that would
look only at the durations stated in the score in deciding when to start the
new iteration of the repeat, rather than waiting for the last note to
finish.

On a related note, when a t statement is placed in an r loop, its time-zero
is referred to on every repeat of the loop. As a result, it doesn't seem to
be possible (unless I'm missing something) to use an r statement in a
passage where the music is changing tempo. Other than by changing tempo at
the loop points using the r statement's incrementing macro, I suppose, and
that isn't necessarily a very musical form of tempo change.

--JA

***************************

sr = 44100
ksmps = 4
nchnls = 2
0dbfs = 1
giSine          ftgen   0, 0, 4096, 10, 1

instr 1
idur = p3
ifrq            cpsxpch p4, 12, 2, 32
iamp = 0.3
index = 2

kamp            linsegr 0, 0.002, 1, (idur - 0.002), 0.1, 0.2, 0
kindex  linsegr 0, 0.002, index, (idur - 0.002), (0.2 * index), 0.08, 0
asig            foscili kamp, ifrq, 1, 1, kindex, giSine

outs            asig, asig
endin

</CsInstruments>
<CsScore>

r 5
i1      0       0.5     3.00
i1      +       .       3.07
i1      +       .       4.04
i1      +       .       4.00
; there will be a .2 second gap here before the repeat
s

--
View this message in context: http://csound.1045644.n5.nabble.com/r-and-r-looping-ostinati-tp3343151p3343151.html
Sent from the Csound - General mailing list archive at Nabble.com.


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"



Date2011-01-16 09:29
Fromjoachim heintz
Subject[Csnd] Re: r and r (looping ostinati)
to your question with a possible workaround:
a) i tried your example with xtratim instead of linsegr, and the
behaviour is the same.
b) it should be fairly easy to to this, if you transfer the loop from
the score section into an instrument, and trigger your playing
instrument via the scoreline opcode. if this would be a possible
solution for you, a can try to build a model.

	joachim

Am 16.01.2011 07:06, schrieb Jim Aikin:
> 
> When I use a release-segment envelope such as linsegr in conjunction with an
> r statement in the score, the repetition created by the r statement doesn't
> transpire until the end of the final note. That is, the loop falls out of
> rhythm because of the release segment in the final note. There's a hiccup.
> (.csd example below.)
> 
> I'm using linsegr to get overlap between one note and the next in a score
> using the + notation, but I also want a rhythmically sensible loop, not one
> in which each new iteration starts late.
> 
> Two questions: First, is there a workaround? Is there a way (using linsegr
> or any other method) to get the sound from the end of one iteration of an r
> loop to sustain under the beginning of the next iteration?
> 
> Second question: Does anybody but me feel this would be a nice feature to
> add to Csound? What I'm thinking of is an r-type score statement that would
> look only at the durations stated in the score in deciding when to start the
> new iteration of the repeat, rather than waiting for the last note to
> finish.
> 
> On a related note, when a t statement is placed in an r loop, its time-zero
> is referred to on every repeat of the loop. As a result, it doesn't seem to
> be possible (unless I'm missing something) to use an r statement in a
> passage where the music is changing tempo. Other than by changing tempo at
> the loop points using the r statement's incrementing macro, I suppose, and
> that isn't necessarily a very musical form of tempo change.
> 
> --JA
> 
> ***************************
> 
> sr = 44100
> ksmps = 4
> nchnls = 2
> 0dbfs = 1
> giSine		ftgen	0, 0, 4096, 10, 1
> 
> instr 1
> idur = p3
> ifrq		cpsxpch	p4, 12, 2, 32
> iamp = 0.3
> index = 2
> 
> kamp		linsegr	0, 0.002, 1, (idur - 0.002), 0.1, 0.2, 0
> kindex	linsegr	0, 0.002, index, (idur - 0.002), (0.2 * index), 0.08, 0
> asig		foscili	kamp, ifrq, 1, 1, kindex, giSine
> 
> outs		asig, asig
> endin
> 
> 
> 
> 
> r 5
> i1	0	0.5	3.00
> i1	+	.	3.07
> i1	+	.	4.04
> i1	+	.	4.00
> ; there will be a .2 second gap here before the repeat
> s
> 


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"

Date2011-01-16 16:54
FromJim Aikin
Subject[Csnd] Re: r and r (looping ostinati)
On 1/16/2011 1:29 AM, joachim-3 [via Csound] wrote:
>
> b) it should be fairly easy to to this, if you transfer the loop from
> the score section into an instrument, and trigger your playing
> instrument via the scoreline opcode. if this would be a possible
> solution for you, a can try to build a model.

Thanks for the tip. I usually use the event opcode for this type of
thing, but I can see that scoreline will work better in this case. With
scoreline, you can type out the p2 values for the whole loop explicitly,
and then repeat the loop by repeatedly calling the triggering instrument
from the score. I'll play around with it and see if I can make it work.

--JA


View this message in context: Re: r and r (looping ostinati)
Sent from the Csound - General mailing list archive at Nabble.com.