Csound Csound-dev Csound-tekno Search About

[Csnd] how to start instruments with widgets and schedule

Date2014-04-28 09:51
FromPablo Frank
Subject[Csnd] how to start instruments with widgets and schedule
Attachmentscast.png  
Trying to state the start of instruments with widgets, to input the start time in 'schedule', the cast to get an
i variable from a k variable does not work (in the jpeg is better shown). What's the error, or a better solution to start instruments with input from widgets to schedule?

<CsoundSynthesizer>

<CsOptions>


</CsOptions>

<CsInstruments>


0dbfs=1

gisine ftgen 1, 0, 16384, 10, 1


kbegin invalue "begin"


ivar = i(kbegin)


schedule 1,ivar,2


instr 1


asignal oscili .3, 500,1


out asignal

endin


</CsInstruments>

<CsScore>


</CsScore>

</CsoundSynthesizer>


Date2014-04-28 11:07
Fromjoachim heintz
SubjectRe: [Csnd] how to start instruments with widgets and schedule
the error is that it's not possible to have any k-variable in instr 0 
(the header of your csd file).

there are many possible solutions. as you are using csoundqt: what about 
triggering from the live event panel?

if not, perhaps you can describe what you exactly want to do.

best -

	joachim


Am 28.04.2014 10:51, schrieb Pablo Frank:
> Trying to state the start of instruments with widgets, to input the
> start time in 'schedule', the cast to get an
> i variable from a k variable does not work (in the jpeg is better
> shown). What's the error, or a better solution to start instruments with
> input from widgets to schedule?
>
> 
>
> 
>
>
> 
>
> 
>
>
> 0dbfs=1
>
> gisine ftgen 1, 0, 16384, 10, 1
>
>
> kbegin invalue "begin"
>
>
> ivar = i(kbegin)
>
>
> schedule 1,ivar,2
>
>
> instr 1
>
>
> asignal oscili .3, 500,1
>
>
> out asignal
>
> endin
>
>
> 
>
> 
>
>
> 
>
> 
>


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-28 11:32
FromPablo Frank
SubjectRE: [Csnd] how to start instruments with widgets and schedule
> if not, perhaps you can describe what you exactly want to do.

i want to state the start of several instruments from a widget.
For that, the schedule opcode should get the start moment from the widget.
I also tried to use i type variables, but that doesn't work too:

> > ibegin invalue "begin"

> > schedule 1,ibegin,2
> >
> >
> > instr 1
> >
> >
> > asignal oscili .3, 500,1
> >
> >
> > out asignal
> >
> > endin
> >
> >
> > </CsInstruments>
> >
> > <CsScore>

Error:

STARTING FILE

Creating options

Creating orchestra

Creating score

rtaudio: PortAudio module enabled ...

using blocking interface

error: Unable to find opcode entry for 'invalue' with matching argument types:

Found: i invalue S

Line: 19 Loc: 1

Parsing failed due to 1 semantic error!

WARNING: Stopping on parser failure


cannot compile orchestra







> Date: Mon, 28 Apr 2014 12:07:56 +0200
> From: jh@joachimheintz.de
> To: csound@lists.bath.ac.uk
> Subject: Re: [Csnd] how to start instruments with widgets and schedule
>
> the error is that it's not possible to have any k-variable in instr 0
> (the header of your csd file).
>
> there are many possible solutions. as you are using csoundqt: what about
> triggering from the live event panel?
>
> if not, perhaps you can describe what you exactly want to do.
>
> best -
>
> joachim
>
>
> Am 28.04.2014 10:51, schrieb Pablo Frank:
> > Trying to state the start of instruments with widgets, to input the
> > start time in 'schedule', the cast to get an
> > i variable from a k variable does not work (in the jpeg is better
> > shown). What's the error, or a better solution to start instruments with
> > input from widgets to schedule?
> >
> > <CsoundSynthesizer>
> >
> > <CsOptions>
> >
> >
> > </CsOptions>
> >
> > <CsInstruments>
> >
> >
> > 0dbfs=1
> >
> > gisine ftgen 1, 0, 16384, 10, 1
> >
> >
> > kbegin invalue "begin"
> >
> >
> > ivar = i(kbegin)
> >
> >
> > schedule 1,ivar,2
> >
> >
> > instr 1
> >
> >
> > asignal oscili .3, 500,1
> >
> >
> > out asignal
> >
> > endin
> >
> >
> > </CsInstruments>
> >
> > <CsScore>
> >
> >
> > </CsScore>
> >
> > </CsoundSynthesizer>
> >
>
>
> 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-28 12:12
Fromjoachim heintz
SubjectRe: [Csnd] how to start instruments with widgets and schedule
below is one possible solution. you need to have two widgets with 
channels "one" and "two". you could even write a list with lineedit or 
whatever -- all is possible ...

iVal invalue is not possible. if you look into the manual, on the left 
side is either k or S.

	joachim







0dbfs = 1
ksmps = 32

instr Trigger
kStartInsOne invalue "one"
kStartInsTwo invalue "two"
event_i "i", "One", i(kStartInsOne), 3
event_i "i", "Two", i(kStartInsTwo), 3
endin

instr One
aOut poscil .3, 400
out aOut
endin

instr Two
aOut poscil .3, 500
out aOut
endin



i "Trigger" 0 99999






Am 28.04.2014 12:32, schrieb Pablo Frank:
>  > if not, perhaps you can describe what you exactly want to do.
>
> i want to state the start of several instruments from a widget.
> For that, the schedule opcode should get the start moment from the widget.
> I also tried to use i type variables, but that doesn't work too:
>
>  > > ibegin invalue "begin"
>
>  > > schedule 1,ibegin,2
>  > >
>  > >
>  > > instr 1
>  > >
>  > >
>  > > asignal oscili .3, 500,1
>  > >
>  > >
>  > > out asignal
>  > >
>  > > endin
>  > >
>  > >
>  > > 
>  > >
>  > > 
>
> Error:
>
> STARTING FILE
>
> Creating options
>
> Creating orchestra
>
> Creating score
>
> rtaudio: PortAudio module enabled ...
>
> using blocking interface
>
> error: Unable to find opcode entry for 'invalue' with matching argument
> types:
>
> Found: i invalue S
>
> Line: 19 Loc: 1
>
> Parsing failed due to 1 semantic error!
>
> WARNING: Stopping on parser failure
>
>
> cannot compile orchestra
>
>
>
>
>
>
>
>  > Date: Mon, 28 Apr 2014 12:07:56 +0200
>  > From: jh@joachimheintz.de
>  > To: csound@lists.bath.ac.uk
>  > Subject: Re: [Csnd] how to start instruments with widgets and schedule
>  >
>  > the error is that it's not possible to have any k-variable in instr 0
>  > (the header of your csd file).
>  >
>  > there are many possible solutions. as you are using csoundqt: what about
>  > triggering from the live event panel?
>  >
>  > if not, perhaps you can describe what you exactly want to do.
>  >
>  > best -
>  >
>  > joachim
>  >
>  >
>  > Am 28.04.2014 10:51, schrieb Pablo Frank:
>  > > Trying to state the start of instruments with widgets, to input the
>  > > start time in 'schedule', the cast to get an
>  > > i variable from a k variable does not work (in the jpeg is better
>  > > shown). What's the error, or a better solution to start instruments
> with
>  > > input from widgets to schedule?
>  > >
>  > > 
>  > >
>  > > 
>  > >
>  > >
>  > > 
>  > >
>  > > 
>  > >
>  > >
>  > > 0dbfs=1
>  > >
>  > > gisine ftgen 1, 0, 16384, 10, 1
>  > >
>  > >
>  > > kbegin invalue "begin"
>  > >
>  > >
>  > > ivar = i(kbegin)
>  > >
>  > >
>  > > schedule 1,ivar,2
>  > >
>  > >
>  > > instr 1
>  > >
>  > >
>  > > asignal oscili .3, 500,1
>  > >
>  > >
>  > > out asignal
>  > >
>  > > endin
>  > >
>  > >
>  > > 
>  > >
>  > > 
>  > >
>  > >
>  > > 
>  > >
>  > > 
>  > >
>  >
>  >
>  > 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"
>  >
>  >
>  >


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"