Csound Csound-dev Csound-tekno Search About

[Csnd-dev] loopseg warning not correct

Date2019-05-18 13:42
FromMenno Knevel
Subject[Csnd-dev] loopseg warning not correct
i think i found a warning in the Csound Output that is no longer valid.

A decade ago i printed out the Csound manual and there i see:

ksig loopseg kfreq, ktrig, kvalue0, ktime0 [, kvalue1] [, ktime1] \
[, kvalue2] [, ktime2][...]

but this changed at some point to:

ksig loopseg kfreq, ktrig, iphase, kvalue0, ktime0 [, kvalue1] [, ktime1] \
[, kvalue2] [, ktime2][...]

to look like the newer loopxseg?

When i use the new loopseg i get:

WARNING: loop opcode: wrong argument count

But it sounds like it should.
I think the warning can be deleted?



--

Date2019-05-18 19:54
Fromjohn
SubjectRe: [Csnd-dev] loopseg warning not correct
I tried te example in the mnual and it works with no warning.  Xan you 
proide acsd file with the problem please?


On Sat, 18 May 2019, Menno Knevel wrote:

> i think i found a warning in the Csound Output that is no longer valid.
>
> A decade ago i printed out the Csound manual and there i see:
>
> ksig loopseg kfreq, ktrig, kvalue0, ktime0 [, kvalue1] [, ktime1] \
> [, kvalue2] [, ktime2][...]
>
> but this changed at some point to:
>
> ksig loopseg kfreq, ktrig, iphase, kvalue0, ktime0 [, kvalue1] [, ktime1] \
> [, kvalue2] [, ktime2][...]
>
> to look like the newer loopxseg?
>
> When i use the new loopseg i get:
>
> WARNING: loop opcode: wrong argument count
>
> But it sounds like it should.
> I think the warning can be deleted?
>
>
>
> --
> Sent from: http://csound.1045644.n5.nabble.com/Csound-Dev-f1123218.html

Date2019-05-19 13:19
FromMenno Knevel
SubjectRe: [Csnd-dev] loopseg warning not correct
yes, here it is:

	instr 1	;untitled

ksig 	loopseg	 1/p3, 0, 0, 0.0, 1, 1
asig    interp  ksig
asig    vco2    .5, 100
asig    *=  ksig 
outs asig , asig
	endin

produces the sonic result i want but the warning:

WARNING: loop opcode: wrong argument count

When i write it the old way:

ksig 	loopseg	 1/p3, 0, 0.0, 1, 1      ; one zero less

i get no complaint but the sounding result is not what i was looking for.

I just tried with loopxseg but got the same warning:

ksig 	loopxseg	 1/p3, 0, 0, 0.03125, 1, 1

and: WARNING: loop opcode: wrong argument count

but sounding result is OK.

Is it user error?






--

Date2019-05-19 15:41
FromMenno Knevel
SubjectRe: [Csnd-dev] loopseg warning not correct
forgot to mention:
I'm on Linux Mint, Csound version 6.13 beta (double samples) Apr  9 2019





--

Date2019-05-19 19:52
Fromjohn
SubjectRe: [Csnd-dev] loopseg warning not correct
User error I am afraid.  loopseg takws three parameters for frequency, 
triggert ad initial phase, and then pairs of value, time values.  So there 
must be a odd number of arguments.  Your exaple has one value/time pair 
and an extraneous 1

So the warning is correct.  I think it ignores e extra argument but 
not very well -- it computes wit it but does not change the result as 
far as a quick read of the code suggests.  Might be btter to ignore te 
extra value totally; will consider tht.

==John ff

On Sun, 19 May 2019, Menno Knevel wrote:

> yes, here it is:
>
> 	instr 1	;untitled
>
> ksig 	loopseg	 1/p3, 0, 0, 0.0, 1, 1
> asig    interp  ksig
> asig    vco2    .5, 100
> asig    *=  ksig
> outs asig , asig
> 	endin
>
> produces the sonic result i want but the warning:
>
> WARNING: loop opcode: wrong argument count
>
> When i write it the old way:
>
> ksig 	loopseg	 1/p3, 0, 0.0, 1, 1      ; one zero less
>
> i get no complaint but the sounding result is not what i was looking for.
>
> I just tried with loopxseg but got the same warning:
>
> ksig 	loopxseg	 1/p3, 0, 0, 0.03125, 1, 1
>
> and: WARNING: loop opcode: wrong argument count
>
> but sounding result is OK.
>
> Is it user error?
>
>
>
>
>
>
> --
> Sent from: http://csound.1045644.n5.nabble.com/Csound-Dev-f1123218.html

Date2019-05-19 20:44
FromMenno Knevel
SubjectRe: [Csnd-dev] loopseg warning not correct
Yes, it is user error, but a good one - at least for me.

I'm using Blue and was looking for a way to draw an envelope instead of the
usual adsr, and loop(x)seg gave me that when i make the user error:

file:///media/menno/datae/onderzoek/bluetests/Screenshot%20from%202019-05-19%2021-36-39.png

Now i found that if i trow in an extra 0 at the end of loop(x)seg it follows
the waves i draw AND i get no more warning.

ksig 	loopxseg	 1/p3, 0, 0, 0.0, 0.35, 1, 0.65, 0, 0

I hope you don't change anything :)



--

Date2019-05-19 20:47
FromMenno Knevel
SubjectRe: [Csnd-dev] loopseg warning not correct
sorry, i'll try the inserting the image again:

 




--

Date2019-05-19 20:49
Fromjohn
SubjectRe: [Csnd-dev] loopseg warning not correct
Reading the code again I think it is is rather the same as adding a zero 
so I changed noting.  Still it is odd -- might make it more explicit but 
should not change your use.


On Sun, 19 May 2019, Menno Knevel wrote:

> Yes, it is user error, but a good one - at least for me.
>
> I'm using Blue and was looking for a way to draw an envelope instead of the
> usual adsr, and loop(x)seg gave me that when i make the user error:
>
> file:///media/menno/datae/onderzoek/bluetests/Screenshot%20from%202019-05-19%2021-36-39.png
>
> Now i found that if i trow in an extra 0 at the end of loop(x)seg it follows
> the waves i draw AND i get no more warning.
>
> ksig 	loopxseg	 1/p3, 0, 0, 0.0, 0.35, 1, 0.65, 0, 0
>
> I hope you don't change anything :)
>
>
>
> --
> Sent from: http://csound.1045644.n5.nabble.com/Csound-Dev-f1123218.html