Csound Csound-dev Csound-tekno Search About

[Csnd] Possible conditional problem

Date2018-10-15 21:16
From"Jeanette C."
Subject[Csnd] Possible conditional problem
Attachmentstrigger.csd  
Hey hey,
I'm trying to set up a chain ot triggered segments. Each new segment starts, 
when the previous one has finished. I'm having problems though, possibly with 
my conditional expression and overlooking a Csound performance time issue. The 
full code - without the UDO - is attached. Here's the bit that I suspect:
kfin init 1
ktrig init 1
...
if kfin == 1 then
   do something in preparation for segment and set ktrig to 1
endif
koutput, kfin segment_udo ..., ktrig
...
out aout
ktrig = 0

It doesn't trigger the first time. There is silence for two seconds, which is 
the hardcoded length of a segment. This is just for testing and debugging, 
obviously very necessary.

Can you point out my folly, please?

BHest wishes,

Jeanette

-- 
  * Website: http://juliencoder.de - for summer is a state of sound
  * SoundCloud: https://soundcloud.com/jeanette_c
  * Youtube: https://www.youtube.com/channel/UCMS4rfGrTwz8W7jhC1Jnv7g
  * GitHub: https://github.com/jeanette-c
  * Twitter: https://twitter.com/jeanette_c_s

With you I get so high
Lost in the crystal sky
You are this melody
That's where you take me <3
(Britney Spears)

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

Date2018-10-16 18:00
Fromjpff
SubjectRe: [Csnd] Possible conditional problem
Not sure I understand and without the UDO and te tables I am rather in the 
dark.  Commenting out the UDO and setting te frequency to 440 I see

new alloc for instr 1:

now: 0.000021, fin is 1[m
read line: 0 from 110.000000 to 440.000000[m
now: 0.000042, fin is 1[m
read line: 1 from 440.000000 to 440.000000[m
now: 0.000063, fin is 1[m
read line: 2 from 440.000000 to 880.000000[m
now: 0.000083, fin is 1[m
At end of points...[m
now: 0.000104, fin is 1[m
At end of points...[m
now: 0.000125, fin is 1[m
At end of points...[m
and then lots of similar lines.  Is this what you expect?

On Mon, 15 Oct 2018, Jeanette C. wrote:

> Hey hey,
> I'm trying to set up a chain ot triggered segments. Each new segment starts, 
> when the previous one has finished. I'm having problems though, possibly with 
> my conditional expression and overlooking a Csound performance time issue. 
> The full code - without the UDO - is attached. Here's the bit that I suspect:
> kfin init 1
> ktrig init 1
> ...
> if kfin == 1 then
>  do something in preparation for segment and set ktrig to 1
> endif
> koutput, kfin segment_udo ..., ktrig
> ...
> out aout
> ktrig = 0
>
> It doesn't trigger the first time. There is silence for two seconds, which is 
> the hardcoded length of a segment. This is just for testing and debugging, 
> obviously very necessary.
>
> Can you point out my folly, please?
>
> BHest wishes,
>
> Jeanette
>
> -- 
> * Website: http://juliencoder.de - for summer is a state of sound
> * SoundCloud: https://soundcloud.com/jeanette_c
> * Youtube: https://www.youtube.com/channel/UCMS4rfGrTwz8W7jhC1Jnv7g
> * GitHub: https://github.com/jeanette-c
> * Twitter: https://twitter.com/jeanette_c_s
>
> With you I get so high
> Lost in the crystal sky
> You are this melody
> That's where you take me <3
> (Britney Spears)
>
> 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

Date2018-10-16 18:21
From"Jeanette C."
SubjectRe: [Csnd] Possible conditional problem
Oct 16 2018, jpff has written:

> Not sure I understand and without the UDO and te tables I am rather in the 
> dark.
OK, good point really, so here's the whole thing:
https://www.dropbox.com/s/f64td9ue0297wcn/csline.zip
I haven't used the m_segk opcode in a while, but it used to work. Can
you see the trouble in this perhaps?
...

Best wishes and thanks,

Jeanette

-- 
  * Website: http://juliencoder.de - for summer is a state of sound
  * SoundCloud: https://soundcloud.com/jeanette_c
  * Youtube: https://www.youtube.com/channel/UCMS4rfGrTwz8W7jhC1Jnv7g
  * GitHub: https://github.com/jeanette-c
  * Twitter: https://twitter.com/jeanette_c_s

Do you even know what I like
Just what I'm living for,
What I adore <3
(Britney Spears)

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