Csound Csound-dev Csound-tekno Search About

[Csnd] Order of operation

Date2014-04-09 08:22
FromAskwazzup
Subject[Csnd] Order of operation
I'm reading the order of operations section from the third chapter of floss
manual. The first print out is from the manual, the second is from my
terminal. The manual says:

"*Instrument 10* can use the values which instrument 1 has produced in the
same control cycle, but it can *only refer to values of instrument 100*
which are produced in the previous control cycle. By this reason, the
printout *shows values which are one less* in the latter case."

new alloc for instr 100:
 i  10 time     1.10000:     0.00000
 i  10 time     1.20000:     1.00000
 i  10 time     1.30000:     2.00000 <- missing value 3
 i  10 time     1.50000:     4.00000 <-
 i  10 time     1.60000:     5.00000
 i  10 time     1.70000:     6.00000
 i  10 time     1.80000:     7.00000
 i  10 time     1.90000:     8.00000
 i  10 time     2.00000:     9.00000
B  1.000 ..  2.000 T  2.000 TT  2.000 M:      0.0

new alloc for instr 100:
 i  10 time     1.10000:     0.00000
 i  10 time     1.20000:     1.00000
 i  10 time     1.30000:     2.00000 <- value 3 is not missing
 i  10 time     1.40000:     3.00000
 i  10 time     1.50000:     4.00000 <-
 i  10 time     1.60000:     5.00000
 i  10 time     1.70000:     6.00000
 i  10 time     1.80000:     7.00000
 i  10 time     1.90000:     8.00000
 i  10 time     2.00000:     9.00000
B  1.000 ..  2.000 T  2.000 TT  2.000 M:      0.0

Firstly, i'm not sure why i am getting a different reading, when i have
copied the same example and print it without changing anything.

Secondly, how does instrument 10 refer to values of 100 "which were produced
IN THE PREVIOUS cycle", if by the order of operation instrument 10 goes
first, so it prints out a zero, as instrument 100 hasn't had its turn yet?



--
View this message in context: http://csound.1045644.n5.nabble.com/Order-of-operation-tp5734039.html
Sent from the Csound - General mailing list archive at Nabble.com.

Date2014-04-09 13:44
FromRory Walsh
SubjectRe: [Csnd] Order of operation
This looks like a typo to me. Your assumption about why the numbers
appear the way they do is correct. Instruments are called in a
sequence determined by their number. So even though in the score
'i100...' is written first, Csound will still start lower numbered
instrument 10 first.

On 9 April 2014 08:22, Askwazzup  wrote:
> I'm reading the order of operations section from the third chapter of floss
> manual. The first print out is from the manual, the second is from my
> terminal. The manual says:
>
> "*Instrument 10* can use the values which instrument 1 has produced in the
> same control cycle, but it can *only refer to values of instrument 100*
> which are produced in the previous control cycle. By this reason, the
> printout *shows values which are one less* in the latter case."
>
> new alloc for instr 100:
>  i  10 time     1.10000:     0.00000
>  i  10 time     1.20000:     1.00000
>  i  10 time     1.30000:     2.00000 <- missing value 3
>  i  10 time     1.50000:     4.00000 <-
>  i  10 time     1.60000:     5.00000
>  i  10 time     1.70000:     6.00000
>  i  10 time     1.80000:     7.00000
>  i  10 time     1.90000:     8.00000
>  i  10 time     2.00000:     9.00000
> B  1.000 ..  2.000 T  2.000 TT  2.000 M:      0.0
>
> new alloc for instr 100:
>  i  10 time     1.10000:     0.00000
>  i  10 time     1.20000:     1.00000
>  i  10 time     1.30000:     2.00000 <- value 3 is not missing
>  i  10 time     1.40000:     3.00000
>  i  10 time     1.50000:     4.00000 <-
>  i  10 time     1.60000:     5.00000
>  i  10 time     1.70000:     6.00000
>  i  10 time     1.80000:     7.00000
>  i  10 time     1.90000:     8.00000
>  i  10 time     2.00000:     9.00000
> B  1.000 ..  2.000 T  2.000 TT  2.000 M:      0.0
>
> Firstly, i'm not sure why i am getting a different reading, when i have
> copied the same example and print it without changing anything.
>
> Secondly, how does instrument 10 refer to values of 100 "which were produced
> IN THE PREVIOUS cycle", if by the order of operation instrument 10 goes
> first, so it prints out a zero, as instrument 100 hasn't had its turn yet?
>
>
>
> --
> View this message in context: http://csound.1045644.n5.nabble.com/Order-of-operation-tp5734039.html
> Sent from the Csound - General mailing list archive at Nabble.com.
>
>
> Send bugs reports to
>         https://github.com/csound/csound/issues
> Discussions of bugs and features can be posted here
> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"
>
>
>

Date2014-04-10 15:10
Fromjoachim heintz
SubjectRe: [Csnd] Order of operation
hi -

thanks for looking so carefully into it.

first to the print output. you are right, by some mysterious reason 
there is one line missing in the floss manual text. the line
  i  10 time     1.40000:     3.00000
should definitely be there. i have corrected this for the next release.

what i don't understand in your output: it shows that you are calling 
instr 100 both times. but actually the score calls instr 1 at start time 
0, and then instr 100 at start time 1. the score should be:
;first i1 and i10
i 1 0 1
i 10 0 1
;then i100 and i10
i 100 1 1
i 10 1 1

if you have the same score, but the output you have reported here, 
please attach the complete csd file, and let us know about your platform 
and version.

secondly, yes, for the first control cycle, the "previous k-cycle" is 
the initialization. in instr 100, gkcount is initialized to zero. when 
in the first k-cycle instr 10 reads this value, it prints 0. after this, 
but still in the first cycle, instr 100 increases gkcount by one, so 
that at the end of the first k-cycle gkcount is 1. this is the value 
instr 10 prints in the second k-cycle, and so on.

hope this explains -- all best -
	joachim



Am 09.04.2014 09:22, schrieb Askwazzup:
> I'm reading the order of operations section from the third chapter of floss
> manual. The first print out is from the manual, the second is from my
> terminal. The manual says:
>
> "*Instrument 10* can use the values which instrument 1 has produced in the
> same control cycle, but it can *only refer to values of instrument 100*
> which are produced in the previous control cycle. By this reason, the
> printout *shows values which are one less* in the latter case."
>
> new alloc for instr 100:
>   i  10 time     1.10000:     0.00000
>   i  10 time     1.20000:     1.00000
>   i  10 time     1.30000:     2.00000 <- missing value 3
>   i  10 time     1.50000:     4.00000 <-
>   i  10 time     1.60000:     5.00000
>   i  10 time     1.70000:     6.00000
>   i  10 time     1.80000:     7.00000
>   i  10 time     1.90000:     8.00000
>   i  10 time     2.00000:     9.00000
> B  1.000 ..  2.000 T  2.000 TT  2.000 M:      0.0
>
> new alloc for instr 100:
>   i  10 time     1.10000:     0.00000
>   i  10 time     1.20000:     1.00000
>   i  10 time     1.30000:     2.00000 <- value 3 is not missing
>   i  10 time     1.40000:     3.00000
>   i  10 time     1.50000:     4.00000 <-
>   i  10 time     1.60000:     5.00000
>   i  10 time     1.70000:     6.00000
>   i  10 time     1.80000:     7.00000
>   i  10 time     1.90000:     8.00000
>   i  10 time     2.00000:     9.00000
> B  1.000 ..  2.000 T  2.000 TT  2.000 M:      0.0
>
> Firstly, i'm not sure why i am getting a different reading, when i have
> copied the same example and print it without changing anything.
>
> Secondly, how does instrument 10 refer to values of 100 "which were produced
> IN THE PREVIOUS cycle", if by the order of operation instrument 10 goes
> first, so it prints out a zero, as instrument 100 hasn't had its turn yet?
>
>
>
> --
> View this message in context: http://csound.1045644.n5.nabble.com/Order-of-operation-tp5734039.html
> Sent from the Csound - General mailing list archive at Nabble.com.
>
>
> Send bugs reports to
>          https://github.com/csound/csound/issues
> Discussions of bugs and features can be posted here
> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"
>
>
>
>

Date2014-04-11 10:51
FromAskwazzup
Subject[Csnd] Re: Order of operation
Thank you for the explanation, and those are two different print outs! The
first one i copied from the manual, the second one was mine, because i
wanted to show the missing line.



--
View this message in context: http://csound.1045644.n5.nabble.com/Order-of-operation-tp5734039p5734117.html
Sent from the Csound - General mailing list archive at Nabble.com.

Date2014-04-11 14:03
Fromjoachim heintz
SubjectRe: [Csnd] Re: Order of operation
i see, all good. regards -
	j


Am 11.04.2014 11:51, schrieb Askwazzup:
> Thank you for the explanation, and those are two different print outs! The
> first one i copied from the manual, the second one was mine, because i
> wanted to show the missing line.
>
>
>
> --
> View this message in context: http://csound.1045644.n5.nabble.com/Order-of-operation-tp5734039p5734117.html
> Sent from the Csound - General mailing list archive at Nabble.com.
>
>
> Send bugs reports to
>          https://github.com/csound/csound/issues
> Discussions of bugs and features can be posted here
> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"
>
>
>
>