Csound Csound-dev Csound-tekno Search About

Re: [Csnd] Waiting for Trigger in CsScore?

Date2018-09-09 03:51
From"Yeh Z."
SubjectRe: [Csnd] Waiting for Trigger in CsScore?
Hi Joachim and Steven,

Thank you very much for your help.

I have just tried the codes; they work, although, they are not exactly what I am looking for.

the problem of "scoreline_i" is that:

it doesn't work with score statements including "s" and "{}" (loops).

For sco trigger, it is a little bit complex to me, I am still trying to understand it; it executes only a part of my score.

Actually, I am looking for something like:


; Section 1
{32 N
i "Tapes" [$N*1] 0.25 $N*0.1
i "Tapes" +         0.25 $N*0.1
i "Tapes" +         0.25 $N*0.1
i "Tapes" +         0.25 $N*0.1
}
i99 32 "Holding till trigger to finish" ; <== a mean like this: as long as it is triggered, the section be marked finished, and jump to the next section.
s

; Section 2
; ... codes
s
; Section 3
; ... and so on
; ...
; Section 9
; codes...
e


I think this function would be useful for ElectroAcoustics and live electronics. 
Is there any way have already be done?

Many thanks again :)

Regards,
Yeh Z.

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-09-09 16:09
Fromjpff
SubjectRe: [Csnd] Waiting for Trigger in CsScore?
Thinking aloud....  would it be a solution if there was an opcode like 
exitnow which ended section now?  Not sure if that is implementable or 
just hard.....

On Sun, 9 Sep 2018, Yeh Z. wrote:

> Hi Joachim and Steven,
>
> Thank you very much for your help.
>
> I have just tried the codes; they work, although, they are not exactly what I am looking for.
>
> the problem of "scoreline_i" is that:
>
> it doesn't work with score statements including "s" and "{}" (loops).
>
> For sco trigger, it is a little bit complex to me, I am still trying to understand it; it executes only a part of my score.
>
> Actually, I am looking for something like:
>
> 
> ; Section 1
> {32 N
> i "Tapes" [$N*1] 0.25 $N*0.1
> i "Tapes" +         0.25 $N*0.1
> i "Tapes" +         0.25 $N*0.1
> i "Tapes" +         0.25 $N*0.1
> }
> i99 32 "Holding till trigger to finish" ; <== a mean like this: as long as it is triggered, the section be marked finished, and jump to the next section.
> s
>
> ; Section 2
> ; ... codes
> s
> ; Section 3
> ; ... and so on
> ; ...
> ; Section 9
> ; codes...
> e
> 
>
> I think this function would be useful for ElectroAcoustics and live electronics.
> Is there any way have already be done?
>
> Many thanks again :)
>
> Regards,
> Yeh Z.
>
> 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-09-09 23:04
FromSteven Yi
SubjectRe: [Csnd] Waiting for Trigger in CsScore?
Attachmentsprocess_signalling.csd  
I'm not sure we need an opcode.  I put together a generative CSD
example that has:

* two score generating process instruments
* one conductor instrument

The two process instruments play instr 1 until klimit number of times,
then play a held note.  They each signal via increment of global
variable.  A conductor instrument checks the global var and when both
processes are done it resets the variable.  The process instruments
then see the signal and turn off their held notes and restart their
processes.  The process repeats ad infinitum.

The example illustrates the coding style but the parts could easily be
replaced. The signal from the conductor could be instead  from a user
input, the score generation could be from playing a sco fragment, etc.
Hopefully there's enough here to show an approach that might be usable
as a starting point for other coding.  I imagine instead of hard-coded
processes, one could make some reusable instruments. For example, one
that takes in a score file as a pfield and checks different global
signal states to figure out what to do.

Cheers!
steven




On Sun, Sep 9, 2018 at 11:09 AM jpff  wrote:
>
> Thinking aloud....  would it be a solution if there was an opcode like
> exitnow which ended section now?  Not sure if that is implementable or
> just hard.....
>
> On Sun, 9 Sep 2018, Yeh Z. wrote:
>
> > Hi Joachim and Steven,
> >
> > Thank you very much for your help.
> >
> > I have just tried the codes; they work, although, they are not exactly what I am looking for.
> >
> > the problem of "scoreline_i" is that:
> >
> > it doesn't work with score statements including "s" and "{}" (loops).
> >
> > For sco trigger, it is a little bit complex to me, I am still trying to understand it; it executes only a part of my score.
> >
> > Actually, I am looking for something like:
> >
> > 
> > ; Section 1
> > {32 N
> > i "Tapes" [$N*1] 0.25 $N*0.1
> > i "Tapes" +         0.25 $N*0.1
> > i "Tapes" +         0.25 $N*0.1
> > i "Tapes" +         0.25 $N*0.1
> > }
> > i99 32 "Holding till trigger to finish" ; <== a mean like this: as long as it is triggered, the section be marked finished, and jump to the next section.
> > s
> >
> > ; Section 2
> > ; ... codes
> > s
> > ; Section 3
> > ; ... and so on
> > ; ...
> > ; Section 9
> > ; codes...
> > e
> > 
> >
> > I think this function would be useful for ElectroAcoustics and live electronics.
> > Is there any way have already be done?
> >
> > Many thanks again :)
> >
> > Regards,
> > Yeh Z.
> >
> > 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

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-09-10 09:37
Fromjoachim heintz
SubjectRe: [Csnd] Waiting for Trigger in CsScore?
hi yeh -

you are right about the limitations of the scoreline opcode, but on the 
other hand: it is not hard to implement them.  i attach a small example 
below, showing how you can loop over an array (can be compared to a 
section i think), and then have a bigger loop to call this section again 
and again.

i personally are not using any more scores, even if i work out a tape 
piece in csound.  i find it more flexible, and more straightforward to 
create the events in instruments.  then i can do anything what is 
possible in the csound language; and this is a lot ...

for instance, rather than using
	 iStart += 2
in the code below, i can write
	iStart += random:i(1,3)
thus creating a pause between the sections which is not always the same. 
  this is so easy, and i think your actually interactive model ("waiting 
for a trigger") is really easy to implement in the orchestra, but more 
or less a pain in the score.

the score is neither csound language not any programming language at 
all, but an event list.  some features has been added, but these remain 
crutches, in my opinion.

i just read steven's mail and i think his (much complexer) example goes 
in a similar direction.  best -

	joachim





-m128



sr = 44100
ksmps = 32
nchnls = 2
0dbfs = 1

giNotes[] fillarray 60, 61, 63, 66, 67

instr Loop
iNumLoops = p4
iLoopCount = 0
iStart = 0
while iLoopCount < iNumLoops do
  iNumLines = 5
  iLineCount = 0
  while iLineCount < iNumLines do
   S_call sprintf "i 100 %f 1 %d", iStart, giNotes[iLineCount]
   scoreline_i S_call
   iStart += 1/4
   iLineCount += 1
  od
  iStart += 2
  iLoopCount += 1
od
endin
schedule "Loop", 0, 0, 5

instr 100
aEnv transeg .2, p3, -6, 0
aOut poscil aEnv, cpsmidinn(p4+12)
out aOut, aOut
endin







On 09/09/18 04:51, Yeh Z. wrote:
> Hi Joachim and Steven,
>
> Thank you very much for your help.
>
> I have just tried the codes; they work, although, they are not exactly what I am looking for.
>
> the problem of "scoreline_i" is that:
>
> it doesn't work with score statements including "s" and "{}" (loops).
>
> For sco trigger, it is a little bit complex to me, I am still trying to understand it; it executes only a part of my score.
>
> Actually, I am looking for something like:
>
> 
> ; Section 1
> {32 N
> i "Tapes" [$N*1] 0.25 $N*0.1
> i "Tapes" +         0.25 $N*0.1
> i "Tapes" +         0.25 $N*0.1
> i "Tapes" +         0.25 $N*0.1
> }
> i99 32 "Holding till trigger to finish" ; <== a mean like this: as long as it is triggered, the section be marked finished, and jump to the next section.
> s
>
> ; Section 2
> ; ... codes
> s
> ; Section 3
> ; ... and so on
> ; ...
> ; Section 9
> ; codes...
> e
> 
>
> I think this function would be useful for ElectroAcoustics and live electronics.
> Is there any way have already be done?
>
> Many thanks again :)
>
> Regards,
> Yeh Z.
>
> 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

Date2019-03-04 01:54
From"Dr. Richard Boulanger"
SubjectRe: [Csnd] Waiting for Trigger in CsScore?

Such wonderful, clear and inspiring examples from Joachin and Steven (as always!)  Thanks so much.
- learning every day.  

Grateful for all the work you do.

Best.

-dB
_____________________________________________
Dr. Richard Boulanger
Professor of Electronic Production and Design
Professional Writing and Music Technology Division
Berklee College of Music
______________________________________________
OFFICE: 1126 Boylston St., Suite 201 (EPD), Suite 208 (Boulanger)
______________________________________________


On Mon, Sep 10, 2018 at 4:38 AM joachim heintz <joachim.heintz@hmtm-hannover.de> wrote:
hi yeh -

you are right about the limitations of the scoreline opcode, but on the
other hand: it is not hard to implement them.  i attach a small example
below, showing how you can loop over an array (can be compared to a
section i think), and then have a bigger loop to call this section again
and again.

i personally are not using any more scores, even if i work out a tape
piece in csound.  i find it more flexible, and more straightforward to
create the events in instruments.  then i can do anything what is
possible in the csound language; and this is a lot ...

for instance, rather than using
         iStart += 2
in the code below, i can write
        iStart += random:i(1,3)
thus creating a pause between the sections which is not always the same.
  this is so easy, and i think your actually interactive model ("waiting
for a trigger") is really easy to implement in the orchestra, but more
or less a pain in the score.

the score is neither csound language not any programming language at
all, but an event list.  some features has been added, but these remain
crutches, in my opinion.

i just read steven's mail and i think his (much complexer) example goes
in a similar direction.  best -

        joachim



<CsoundSynthesizer>
<CsOptions>
-m128
</CsOptions>
<CsInstruments>

sr = 44100
ksmps = 32
nchnls = 2
0dbfs = 1

giNotes[] fillarray 60, 61, 63, 66, 67

instr Loop
iNumLoops = p4
iLoopCount = 0
iStart = 0
while iLoopCount < iNumLoops do
  iNumLines = 5
  iLineCount = 0
  while iLineCount < iNumLines do
   S_call sprintf "i 100 %f 1 %d", iStart, giNotes[iLineCount]
   scoreline_i S_call
   iStart += 1/4
   iLineCount += 1
  od
  iStart += 2
  iLoopCount += 1
od
endin
schedule "Loop", 0, 0, 5

instr 100
aEnv transeg .2, p3, -6, 0
aOut poscil aEnv, cpsmidinn(p4+12)
out aOut, aOut
endin

</CsInstruments>
<CsScore>
</CsScore>
</CsoundSynthesizer>


On 09/09/18 04:51, Yeh Z. wrote:
> Hi Joachim and Steven,
>
> Thank you very much for your help.
>
> I have just tried the codes; they work, although, they are not exactly what I am looking for.
>
> the problem of "scoreline_i" is that:
>
> it doesn't work with score statements including "s" and "{}" (loops).
>
> For sco trigger, it is a little bit complex to me, I am still trying to understand it; it executes only a part of my score.
>
> Actually, I am looking for something like:
>
> <CsScore>
> ; Section 1
> {32 N
> i "Tapes" [$N*1] 0.25 $N*0.1
> i "Tapes" +         0.25 $N*0.1
> i "Tapes" +         0.25 $N*0.1
> i "Tapes" +         0.25 $N*0.1
> }
> i99 32 "Holding till trigger to finish" ; <== a mean like this: as long as it is triggered, the section be marked finished, and jump to the next section.
> s
>
> ; Section 2
> ; ... codes
> s
> ; Section 3
> ; ... and so on
> ; ...
> ; Section 9
> ; codes...
> e
> </CsScore>
>
> I think this function would be useful for ElectroAcoustics and live electronics.
> Is there any way have already be done?
>
> Many thanks again :)
>
> Regards,
> Yeh Z.
>
> 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
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