Csound Csound-dev Csound-tekno Search About

[Csnd] ktime0 in loopseg

Date2011-07-10 03:42
FromJim Aikin
Subject[Csnd] ktime0 in loopseg
No matter how I set ktime0 when running loopseg, that argument seems to do
nothing. Is this user error, or is it simply inactive?

--Jim Aikin


--
View this message in context: http://csound.1045644.n5.nabble.com/ktime0-in-loopseg-tp4569506p4569506.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-07-10 03:54
FromBrian Wong
SubjectRE: [Csnd] ktime0 in loopseg
"ktime0...ktimeN -- Times of points; expressed in fraction of a cycle." - From the manual
The way I read this is that your first time point is always going to be effectively zero, no matter what value you assign it. So what I do is simply always make ktime0 = 0. Works fine as far as I can tell.

BW


> Date: Sat, 9 Jul 2011 19:42:35 -0700
> From: midiguru23@sbcglobal.net
> To: csound@lists.bath.ac.uk
> Subject: [Csnd] ktime0 in loopseg
>
> No matter how I set ktime0 when running loopseg, that argument seems to do
> nothing. Is this user error, or is it simply inactive?
>
> --Jim Aikin
>
>
> --
> View this message in context: http://csound.1045644.n5.nabble.com/ktime0-in-loopseg-tp4569506p4569506.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-07-10 06:26
FromJim Aikin
Subject[Csnd] RE: ktime0 in loopseg
Yes, making it 0 produces no problems. Nor does making it 100 produce any
problems. The argument seems simply to be ignored by the opcode.

I'm doing some documentation. If there are circumstances of any kind in
which that parameter does something, it would help me (and anyone who reads
the doc I'm working on) to know what they are.

--
View this message in context: http://csound.1045644.n5.nabble.com/ktime0-in-loopseg-tp4569506p4569723.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-07-10 10:41
Fromjoachim heintz
SubjectRe: [Csnd] RE: ktime0 in loopseg
some days ago, i experienced a case NOT setting ktime0 to zero, and got
some odd behaviour. so i understood the sentence on the manual page: "
ktime0 should always be set to 0, except if the user wants some special
effect."

	joachim


Am 10.07.2011 07:26, schrieb Jim Aikin:
> Yes, making it 0 produces no problems. Nor does making it 100 produce any
> problems. The argument seems simply to be ignored by the opcode.
> 
> I'm doing some documentation. If there are circumstances of any kind in
> which that parameter does something, it would help me (and anyone who reads
> the doc I'm working on) to know what they are.
> 
> --
> View this message in context: http://csound.1045644.n5.nabble.com/ktime0-in-loopseg-tp4569506p4569723.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"
> 
> 


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-07-10 15:31
FromJim Aikin
Subject[Csnd] RE: ktime0 in loopseg
Yes, but _what_ special effect? Maybe it's time for me to have my first
experience reading the source code. I'll bet if I downloaded it and stared
at the C for that opcode, I could figure it out. If nobody knows offhand,
that's what I'll do....

--
View this message in context: http://csound.1045644.n5.nabble.com/ktime0-in-loopseg-tp4569506p4571110.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-07-10 19:56
FromBrian Wong
SubjectRE: [Csnd] RE: ktime0 in loopseg
My guess is that the nature and presence of a "special effect" will probably be dependent on the values of the other variables. I am using looptseg now, but I remember when playing with loopseg some time ago that I did notice such an effect under some circumstances. I hope you will let us know if you get it figured out!

Brian

> Date: Sun, 10 Jul 2011 07:31:20 -0700
> From: midiguru23@sbcglobal.net
> To: csound@lists.bath.ac.uk
> Subject: [Csnd] RE: ktime0 in loopseg
>
> Yes, but _what_ special effect? Maybe it's time for me to have my first
> experience reading the source code. I'll bet if I downloaded it and stared
> at the C for that opcode, I could figure it out. If nobody knows offhand,
> that's what I'll do....
>
> --
> View this message in context: http://csound.1045644.n5.nabble.com/ktime0-in-loopseg-tp4569506p4571110.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-07-11 07:03
FromAndres Cabrera
Subject[Csnd] ktime0 in loopseg
Hi Jim,

To find it, first find loopseg in the Opcodes folder
On Linux you can do:
$ grep loopseg Opcodes/*
Opcodes/uggab.c:static int loopseg_set(CSOUND *csound, LOOPSEG *p)
Opcodes/uggab.c:static int loopseg(CSOUND *csound, LOOPSEG *p)
Opcodes/uggab.c:static int loopsegp_set(CSOUND *csound, LOOPSEGP *p)
Opcodes/uggab.c:static int loopsegp(CSOUND *csound, LOOPSEGP *p)
Opcodes/uggab.c:{ "loopseg",  S(LOOPSEG), 3, "k", "kkiz",
(SUBR)loopseg_set, (SUBR)loopseg, NULL },
Opcodes/uggab.c:{ "loopxseg", S(LOOPSEG), 3, "k", "kkiz",
(SUBR)loopseg_set, (SUBR)loopxseg, NULL },
Opcodes/uggab.c:{ "lpshold",  S(LOOPSEG), 3, "k", "kkiz",
(SUBR)loopseg_set, (SUBR)lpshold, NULL },
Opcodes/uggab.c:{ "loopsegp", S(LOOPSEGP), 3,"k", "kz",
(SUBR)loopsegp_set,(SUBR)loopsegp, NULL},
Opcodes/uggab.c:{ "lpsholdp", S(LOOPSEGP), 3,"k", "kz",
(SUBR)loopsegp_set,(SUBR)lpsholdp, NULL},

so that will show you it is on Opcodes/uggab.c
Then go to the git repo:
http://csound.git.sourceforge.net/git/gitweb.cgi?p=csound/csound5.git;a=summary
Where you can find the file (browse the tree and then ask for the raw
file-you'll know what I mean when you see the page):
http://csound.git.sourceforge.net/git/gitweb.cgi?p=csound/csound5.git;a=blob_plain;f=Opcodes/uggab.c;hb=HEAD

or you could download all the csound sources to your drive.Cheers,
Andres

On Sun, Jul 10, 2011 at 3:31 PM, Jim Aikin  wrote:
> Yes, but _what_ special effect? Maybe it's time for me to have my first
> experience reading the source code. I'll bet if I downloaded it and stared
> at the C for that opcode, I could figure it out. If nobody knows offhand,
> that's what I'll do....
>
> --
> View this message in context: http://csound.1045644.n5.nabble.com/ktime0-in-loopseg-tp4569506p4571110.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"
>
>


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-07-11 17:15
FromJim Aikin
Subject[Csnd] Re: ktime0 in loopseg
Thanks, Andres. I had a look at the source, and I'm vaguely familiar with C
syntax, but even so, I couldn't make heads nor tails of it. I'll play around
some more with looptseg and see if I can find circumstances where time0
makes a difference.

--
View this message in context: http://csound.1045644.n5.nabble.com/ktime0-in-loopseg-tp4569506p4575648.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-07-12 06:13
FromJim Aikin
Subject[Csnd] RE: ktime0 in loopseg
I figured it out, by golly. In loopseg, ktime0 is not a time parameter at all
-- it's a start phase parameter. Meaningful values are between 0 and 1, but
larger values and even negative values will work. 0.4 is the same as 1.4,
2.4, and -0.6. Integer values are meaningless, as 1 or 2 is the same phase
as 0.

Here's a quick example:

kpitch	loopseg	1, ktrig, 0.6, 0, 0.01, 1, 0.99, 0, 0.01, 1, 0.49, 0, 0.01,
1, 0.49, 0, 0.01, 1, 0.49, 0

This is a loop with a 5/8 rhythm -- the time values for ktime1, ktime2,
etc., total 2.5. And the first peak/decay is twice as long as the others,
producing a QEEE, QEEE rhythm (Q=quarter, E=eighth). With a ktime0 of 0.6,
however, the first iteration is EE, followed by QEEE and so forth. This is a
clever implementation, and highly useful.

It's not explained in the manual, however. I really ought to refresh my
memory of how to edit the manual. I edited a page six months ago, and then
promptly forgot all of the rather arcane steps....

--Jim Aikin


--
View this message in context: http://csound.1045644.n5.nabble.com/ktime0-in-loopseg-tp4569506p4577739.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-07-12 06:21
FromJim Aikin
Subject[Csnd] RE: ktime0 in loopseg
One more detail should be pointed out: The prototype in the manual misnames
this parameter "ktime0". In fact, it's an i-time parameter, and won't accept
a k-rate input.

--
View this message in context: http://csound.1045644.n5.nabble.com/ktime0-in-loopseg-tp4569506p4577750.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-07-12 08:07
FromAndres Cabrera
SubjectRe: [Csnd] RE: ktime0 in loopseg
Hi Jim,

Here's the thread.
http://csound.1045644.n5.nabble.com/Error-in-Manual-td3317386.html#a3318767

Cheers,
Andres

On Tue, Jul 12, 2011 at 6:21 AM, Jim Aikin  wrote:
> One more detail should be pointed out: The prototype in the manual misnames
> this parameter "ktime0". In fact, it's an i-time parameter, and won't accept
> a k-rate input.
>
> --
> View this message in context: http://csound.1045644.n5.nabble.com/ktime0-in-loopseg-tp4569506p4577750.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"
>
>


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-07-12 09:59
Fromjoachim heintz
SubjectRe: [Csnd] RE: ktime0 in loopseg
thanks for figuring this out, and reporting. this is actually a very
interesting possibility in using loopseg.
	joachim


Am 12.07.2011 07:13, schrieb Jim Aikin:
> I figured it out, by golly. In loopseg, ktime0 is not a time parameter at all
> -- it's a start phase parameter. Meaningful values are between 0 and 1, but
> larger values and even negative values will work. 0.4 is the same as 1.4,
> 2.4, and -0.6. Integer values are meaningless, as 1 or 2 is the same phase
> as 0.
> 
> Here's a quick example:
> 
> kpitch	loopseg	1, ktrig, 0.6, 0, 0.01, 1, 0.99, 0, 0.01, 1, 0.49, 0, 0.01,
> 1, 0.49, 0, 0.01, 1, 0.49, 0
> 
> This is a loop with a 5/8 rhythm -- the time values for ktime1, ktime2,
> etc., total 2.5. And the first peak/decay is twice as long as the others,
> producing a QEEE, QEEE rhythm (Q=quarter, E=eighth). With a ktime0 of 0.6,
> however, the first iteration is EE, followed by QEEE and so forth. This is a
> clever implementation, and highly useful.
> 
> It's not explained in the manual, however. I really ought to refresh my
> memory of how to edit the manual. I edited a page six months ago, and then
> promptly forgot all of the rather arcane steps....
> 
> --Jim Aikin
> 
> 
> --
> View this message in context: http://csound.1045644.n5.nabble.com/ktime0-in-loopseg-tp4569506p4577739.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"
> 
> 


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-07-12 14:12
FromBrian Wong
SubjectRE: [Csnd] RE: ktime0 in loopseg
Thanks Jim! Does the same apply to looptseg?

Brian

> Date: Tue, 12 Jul 2011 10:59:04 +0200
> From: jh@joachimheintz.de
> To: csound@lists.bath.ac.uk
> Subject: Re: [Csnd] RE: ktime0 in loopseg
>
> thanks for figuring this out, and reporting. this is actually a very
> interesting possibility in using loopseg.
> joachim
>
>
> Am 12.07.2011 07:13, schrieb Jim Aikin:
> > I figured it out, by golly. In loopseg, ktime0 is not a time parameter at all
> > -- it's a start phase parameter. Meaningful values are between 0 and 1, but
> > larger values and even negative values will work. 0.4 is the same as 1.4,
> > 2.4, and -0.6. Integer values are meaningless, as 1 or 2 is the same phase
> > as 0.
> >
> > Here's a quick example:
> >
> > kpitch loopseg 1, ktrig, 0.6, 0, 0.01, 1, 0.99, 0, 0.01, 1, 0.49, 0, 0.01,
> > 1, 0.49, 0, 0.01, 1, 0.49, 0
> >
> > This is a loop with a 5/8 rhythm -- the time values for ktime1, ktime2,
> > etc., total 2.5. And the first peak/decay is twice as long as the others,
> > producing a QEEE, QEEE rhythm (Q=quarter, E=eighth). With a ktime0 of 0.6,
> > however, the first iteration is EE, followed by QEEE and so forth. This is a
> > clever implementation, and highly useful.
> >
> > It's not explained in the manual, however. I really ought to refresh my
> > memory of how to edit the manual. I edited a page six months ago, and then
> > promptly forgot all of the rather arcane steps....
> >
> > --Jim Aikin
> >
> >
> > --
> > View this message in context: http://csound.1045644.n5.nabble.com/ktime0-in-loopseg-tp4569506p4577739.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"
> >
> >
>
>
> 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-07-12 16:19
FromJim Aikin
Subject[Csnd] RE: ktime0 in loopseg
Thanks, Andres ... but after that thread, I got a lot of hand-holding from
Andy Fillebrown, without which I would have gotten nowhere. Looks like I
saved his detailed instructions, though. I'll see if I can puzzle it out.

--JA

--
View this message in context: http://csound.1045644.n5.nabble.com/ktime0-in-loopseg-tp4569506p4579237.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-07-13 01:18
Fromandy fillebrown
SubjectRe: [Csnd] RE: ktime0 in loopseg
Hi Jim,

Most of the instructions I detailed for you won't work anymore,
specifically the ones regarding CVS.  The code repository was switched
over to GIT a few months ago.  Unfortunately, I don't have time to
step you through the new process.  I just wanted to let you know the
old process won't work.  Hopefully you'll get this message before you
bang your head on the wall too many times.

Cheers,
~ andy.f



On Tue, Jul 12, 2011 at 11:19 AM, Jim Aikin  wrote:
> Thanks, Andres ... but after that thread, I got a lot of hand-holding from
> Andy Fillebrown, without which I would have gotten nowhere. Looks like I
> saved his detailed instructions, though. I'll see if I can puzzle it out.
>
> --JA
>
> --
> View this message in context: http://csound.1045644.n5.nabble.com/ktime0-in-loopseg-tp4569506p4579237.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"
>
>


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-07-13 05:48
FromJim Aikin
Subject[Csnd] RE: ktime0 in loopseg
Ook. Thanks for letting me know, Andy. It's just one page. Hopefully someone
else can tidy it up. Or rather, two pages ... I haven't tested looptseg,
which has the same parameter, but that would be an easy test to set up. Here
are the edits.

1) The parameter ktime0 should be renamed iphs -- or, at a minimum, itime0,
as it's not a k-rate input.

2) Change this line:

ktime0...ktimeN -- Times of points; expressed in fraction of a cycle.

... to refer to ktime1 rather than ktime0.

3) An explanation of iphs (itime0), something like this:

iphs -- Fraction of the total envelope cycle at which the first iteration of
the loop cycle will start. Meaningful values are 0-1.

4) Edit the final paragraph above "Examples" along these lines:

All parameters except iphs can be varied at k-rate. Negative frequency
values are allowed, reading the envelope backward. iphs should be set to 0
unless it is desired that a portion of the envelope loop should be skipped
at the beginning of the first iteration.

--
View this message in context: http://csound.1045644.n5.nabble.com/ktime0-in-loopseg-tp4569506p4581543.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-07-13 06:03
FromJim Aikin
Subject[Csnd] RE: ktime0 in loopseg
I take it back. The edit will need to be more complicated than that. Here's
why:

itime0 has a more complex effect if, as allowed by the opcode, the frequency
parameter is negative. I tried the following, and got rather different
shapes depending on the value of itime0:

kphas	phasor 0.5
kphas = kphas * 2 - 1
kpitch	loopseg	kphas, ktrig, 0.5, 0, 0.01, 1, 0.99, 0

In this circumstance (the frequency sliding repeatedly from -1 to 1) the
value in itime0 (0.5 in the code above) has an effect of some sort on each
iteration of the loop, not just on the first iteration. What effect,
precisely, someone who can read and understand the C code will have to say.
It's not intuitively obvious to me. Maybe if I drew myself a diagram....

--JA

--
View this message in context: http://csound.1045644.n5.nabble.com/ktime0-in-loopseg-tp4569506p4581556.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"