Csound Csound-dev Csound-tekno Search About

[Cs-dev] array output of user-defined opcode

Date2013-10-23 23:37
Fromjoachim heintz
Subject[Cs-dev] array output of user-defined opcode
hi -

is it not possible to have an array as output of a UDO? the code below 
returns:

error:  invalid output type for opcode test
error: syntax error, unexpected T_IDENT  (token "test") line 10:
 >>>Sbla test <<<
Unexpected untyped word Sbla when expecting a variable

best -

	joachim





opcode test, S[], 0
Sarr[] init 5
xout Sarr
endop

instr 1
Sbla test
endin



i 1 0 1



------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60135991&iu=/4140/ostg.clktrk
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2013-10-24 08:54
FromVictor Lazzarini
SubjectRe: [Cs-dev] array output of user-defined opcode
I think it's string arrays that are not implemented as UDO arguments. Could you open a ticket?
On 23 Oct 2013, at 23:37, joachim heintz wrote:

> hi -
> 
> is it not possible to have an array as output of a UDO? the code below 
> returns:
> 
> error:  invalid output type for opcode test
> error: syntax error, unexpected T_IDENT  (token "test") line 10:
>>>> Sbla test <<<
> Unexpected untyped word Sbla when expecting a variable
> 
> best -
> 
> 	joachim
> 
> 
> 
> 
> 
> opcode test, S[], 0
> Sarr[] init 5
> xout Sarr
> endop
> 
> instr 1
> Sbla test
> endin
> 
> 
> 
> i 1 0 1
> 
> 
> 
> ------------------------------------------------------------------------------
> October Webinars: Code for Performance
> Free Intel webinars can help you accelerate application performance.
> Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
> the latest Intel processors and coprocessors. See abstracts and register >
> http://pubads.g.doubleclick.net/gampad/clk?id=60135991&iu=/4140/ostg.clktrk
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel

Dr Victor Lazzarini
Senior Lecturer
Dept. of Music
NUI Maynooth Ireland
tel.: +353 1 708 3545
Victor dot Lazzarini AT nuim dot ie




------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60135991&iu=/4140/ostg.clktrk
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2013-10-24 14:10
Fromjoachim heintz
SubjectRe: [Cs-dev] array output of user-defined opcode
i think it's only the output which is not yet implemented. i already 
used string arrays as udo inputs, but on the other hand currently also 
k[] arguments are not working. i will open a ticket immediately (wanted 
actually use an example with this for my talk on the conference, but i 
can choose another one).
best -
	joachim


Am 24.10.2013 09:54, schrieb Victor Lazzarini:
> I think it's string arrays that are not implemented as UDO arguments. Could you open a ticket?
> On 23 Oct 2013, at 23:37, joachim heintz wrote:
>
>> hi -
>>
>> is it not possible to have an array as output of a UDO? the code below
>> returns:
>>
>> error:  invalid output type for opcode test
>> error: syntax error, unexpected T_IDENT  (token "test") line 10:
>>>>> Sbla test <<<
>> Unexpected untyped word Sbla when expecting a variable
>>
>> best -
>>
>> 	joachim
>>
>>
>> 
>> 
>>
>> opcode test, S[], 0
>> Sarr[] init 5
>> xout Sarr
>> endop
>>
>> instr 1
>> Sbla test
>> endin
>>
>> 
>> 
>> i 1 0 1
>> 
>> 
>>
>> ------------------------------------------------------------------------------
>> October Webinars: Code for Performance
>> Free Intel webinars can help you accelerate application performance.
>> Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
>> the latest Intel processors and coprocessors. See abstracts and register >
>> http://pubads.g.doubleclick.net/gampad/clk?id=60135991&iu=/4140/ostg.clktrk
>> _______________________________________________
>> Csound-devel mailing list
>> Csound-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>
> Dr Victor Lazzarini
> Senior Lecturer
> Dept. of Music
> NUI Maynooth Ireland
> tel.: +353 1 708 3545
> Victor dot Lazzarini AT nuim dot ie
>
>
>
>
> ------------------------------------------------------------------------------
> October Webinars: Code for Performance
> Free Intel webinars can help you accelerate application performance.
> Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
> the latest Intel processors and coprocessors. See abstracts and register >
> http://pubads.g.doubleclick.net/gampad/clk?id=60135991&iu=/4140/ostg.clktrk
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel
>

------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60135991&iu=/4140/ostg.clktrk
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2013-10-24 14:14
FromSteven Yi
SubjectRe: [Cs-dev] array output of user-defined opcode
AttachmentsNone  None  
I think there is a syntax error. The variable should have [], so:


 Sbla[] test

Since it is the first time using that variable. Try that and hopefully it should work.


On Thursday, October 24, 2013, joachim heintz wrote:
i think it's only the output which is not yet implemented. i already
used string arrays as udo inputs, but on the other hand currently also
k[] arguments are not working. i will open a ticket immediately (wanted
actually use an example with this for my talk on the conference, but i
can choose another one).
best -
        joachim


Am 24.10.2013 09:54, schrieb Victor Lazzarini:
> I think it's string arrays that are not implemented as UDO arguments. Could you open a ticket?
> On 23 Oct 2013, at 23:37, joachim heintz wrote:
>
>> hi -
>>
>> is it not possible to have an array as output of a UDO? the code below
>> returns:
>>
>> error:  invalid output type for opcode test
>> error: syntax error, unexpected T_IDENT  (token "test") line 10:
>>>>> Sbla test <<<
>> Unexpected untyped word Sbla when expecting a variable
>>
>> best -
>>
>>      joachim
>>
>>
>> <CsoundSynthesizer>
>> <CsInstruments>
>>
>> opcode test, S[], 0
>> Sarr[] init 5
>> xout Sarr
>> endop
>>
>> instr 1
>> Sbla test
>> endin
>>
>> </CsInstruments>
>> <CsScore>
>> i 1 0 1
>> </CsScore>
>> </CsoundSynthesizer>
>>
>> ------------------------------------------------------------------------------
>> October Webinars: Code for Performance
>> Free Intel webinars can help you accelerate application performance.
>> Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
>> the latest Intel processors and coprocessors. See abstracts and register >
>> http://pubads.g.doubleclick.net/gampad/clk?id=60135991&iu=/4140/ostg.clktrk
>> _______________________________________________
>> Csound-devel mailing list
>> Csound-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>
> Dr Victor Lazzarini
> Senior Lecturer
> Dept. of Music
> NUI Maynooth Ireland
> tel.: +353 1 708 3545
> Victor dot Lazzarini AT nuim dot ie
>
>
>
>
> ------------------------------------------------------------------------------
> October Webinars: Code for Performance
> Free Intel webinars can help you accelerate application performance.
> Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
> the latest Intel processors and coprocessors. See abstracts and register >
> http://pubads.g.doubleclick.net/gampad/clk?id=60135991&iu=/4140/ostg.clktrk
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel
>

------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60135991&iu=/4140/ostg.clktrk
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-devel

Date2013-10-24 14:25
Fromjoachim heintz
SubjectRe: [Cs-dev] array output of user-defined opcode
i already tried this yesterday, but it does not work either, and the 
error message points to the udo output itself ("invalid output type for 
opcode test"), if i understand correctly.
best -
	joachim


Am 24.10.2013 15:14, schrieb Steven Yi:
> I think there is a syntax error. The variable should have [], so:
>
>
>   Sbla[] test
>
> Since it is the first time using that variable. Try that and hopefully
> it should work.
>
>
> On Thursday, October 24, 2013, joachim heintz wrote:
>
>     i think it's only the output which is not yet implemented. i already
>     used string arrays as udo inputs, but on the other hand currently also
>     k[] arguments are not working. i will open a ticket immediately (wanted
>     actually use an example with this for my talk on the conference, but i
>     can choose another one).
>     best -
>              joachim
>
>
>     Am 24.10.2013 09:54, schrieb Victor Lazzarini:
>      > I think it's string arrays that are not implemented as UDO
>     arguments. Could you open a ticket?
>      > On 23 Oct 2013, at 23:37, joachim heintz wrote:
>      >
>      >> hi -
>      >>
>      >> is it not possible to have an array as output of a UDO? the code
>     below
>      >> returns:
>      >>
>      >> error:  invalid output type for opcode test
>      >> error: syntax error, unexpected T_IDENT  (token "test") line 10:
>      >>>>> Sbla test <<<
>      >> Unexpected untyped word Sbla when expecting a variable
>      >>
>      >> best -
>      >>
>      >>      joachim
>      >>
>      >>
>      >> 
>      >> 
>      >>
>      >> opcode test, S[], 0
>      >> Sarr[] init 5
>      >> xout Sarr
>      >> endop
>      >>
>      >> instr 1
>      >> Sbla test
>      >> endin
>      >>
>      >> 
>      >> 
>      >> i 1 0 1
>      >> 
>      >> 
>      >>
>      >>
>     ------------------------------------------------------------------------------
>      >> October Webinars: Code for Performance
>      >> Free Intel webinars can help you accelerate application performance.
>      >> Explore tips for MPI, OpenMP, advanced profiling, and more. Get
>     the most from
>      >> the latest Intel processors and coprocessors. See abstracts and
>     register >
>      >>
>     http://pubads.g.doubleclick.net/gampad/clk?id=60135991&iu=/4140/ostg.clktrk
>      >> _______________________________________________
>      >> Csound-devel mailing list
>      >> Csound-devel@lists.sourceforge.net 
>      >> https://lists.sourceforge.net/lists/listinfo/csound-devel
>      >
>      > Dr Victor Lazzarini
>      > Senior Lecturer
>      > Dept. of Music
>      > NUI Maynooth Ireland
>      > tel.: +353 1 708 3545
>      > Victor dot Lazzarini AT nuim dot ie
>      >
>      >
>      >
>      >
>      >
>     ------------------------------------------------------------------------------
>      > October Webinars: Code for Performance
>      > Free Intel webinars can help you accelerate application performance.
>      > Explore tips for MPI, OpenMP, advanced profiling, and more. Get
>     the most from
>      > the latest Intel processors and coprocessors. See abstracts and
>     register >
>      >
>     http://pubads.g.doubleclick.net/gampad/clk?id=60135991&iu=/4140/ostg.clktrk
>      > _______________________________________________
>      > Csound-devel mailing list
>      > Csound-devel@lists.sourceforge.net 
>      > https://lists.sourceforge.net/lists/listinfo/csound-devel
>      >
>
>     ------------------------------------------------------------------------------
>     October Webinars: Code for Performance
>     Free Intel webinars can help you accelerate application performance.
>     Explore tips for MPI, OpenMP, advanced profiling, and more. Get the
>     most from
>     the latest Intel processors and coprocessors. See abstracts and
>     register >
>     http://pubads.g.doubleclick.net/gampad/clk?id=60135991&iu=/4140/ostg.clktrk
>     _______________________________________________
>     Csound-devel mailing list
>     Csound-devel@lists.sourceforge.net 
>     https://lists.sourceforge.net/lists/listinfo/csound-devel
>
>
>
> ------------------------------------------------------------------------------
> October Webinars: Code for Performance
> Free Intel webinars can help you accelerate application performance.
> Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
> the latest Intel processors and coprocessors. See abstracts and register >
> http://pubads.g.doubleclick.net/gampad/clk?id=60135991&iu=/4140/ostg.clktrk
>
>
>
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel
>

------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60135991&iu=/4140/ostg.clktrk
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2013-10-24 14:25
FromVictor Lazzarini
SubjectRe: [Cs-dev] array output of user-defined opcode
yes, that's confirmed. The code works if written like that.
On 24 Oct 2013, at 14:14, Steven Yi  wrote:

> I think there is a syntax error. The variable should have [], so:
> 
> 
>  Sbla[] test
> 
> Since it is the first time using that variable. Try that and hopefully it should work.
> 
> 
> On Thursday, October 24, 2013, joachim heintz wrote:
> i think it's only the output which is not yet implemented. i already
> used string arrays as udo inputs, but on the other hand currently also
> k[] arguments are not working. i will open a ticket immediately (wanted
> actually use an example with this for my talk on the conference, but i
> can choose another one).
> best -
>         joachim
> 
> 
> Am 24.10.2013 09:54, schrieb Victor Lazzarini:
> > I think it's string arrays that are not implemented as UDO arguments. Could you open a ticket?
> > On 23 Oct 2013, at 23:37, joachim heintz wrote:
> >
> >> hi -
> >>
> >> is it not possible to have an array as output of a UDO? the code below
> >> returns:
> >>
> >> error:  invalid output type for opcode test
> >> error: syntax error, unexpected T_IDENT  (token "test") line 10:
> >>>>> Sbla test <<<
> >> Unexpected untyped word Sbla when expecting a variable
> >>
> >> best -
> >>
> >>      joachim
> >>
> >>
> >> 
> >> 
> >>
> >> opcode test, S[], 0
> >> Sarr[] init 5
> >> xout Sarr
> >> endop
> >>
> >> instr 1
> >> Sbla test
> >> endin
> >>
> >> 
> >> 
> >> i 1 0 1
> >> 
> >> 
> >>
> >> ------------------------------------------------------------------------------
> >> October Webinars: Code for Performance
> >> Free Intel webinars can help you accelerate application performance.
> >> Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
> >> the latest Intel processors and coprocessors. See abstracts and register >
> >> http://pubads.g.doubleclick.net/gampad/clk?id=60135991&iu=/4140/ostg.clktrk
> >> _______________________________________________
> >> Csound-devel mailing list
> >> Csound-devel@lists.sourceforge.net
> >> https://lists.sourceforge.net/lists/listinfo/csound-devel
> >
> > Dr Victor Lazzarini
> > Senior Lecturer
> > Dept. of Music
> > NUI Maynooth Ireland
> > tel.: +353 1 708 3545
> > Victor dot Lazzarini AT nuim dot ie
> >
> >
> >
> >
> > ------------------------------------------------------------------------------
> > October Webinars: Code for Performance
> > Free Intel webinars can help you accelerate application performance.
> > Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
> > the latest Intel processors and coprocessors. See abstracts and register >
> > http://pubads.g.doubleclick.net/gampad/clk?id=60135991&iu=/4140/ostg.clktrk
> > _______________________________________________
> > Csound-devel mailing list
> > Csound-devel@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/csound-devel
> >
> 
> ------------------------------------------------------------------------------
> October Webinars: Code for Performance
> Free Intel webinars can help you accelerate application performance.
> Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
> the latest Intel processors and coprocessors. See abstracts and register >
> http://pubads.g.doubleclick.net/gampad/clk?id=60135991&iu=/4140/ostg.clktrk
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel
> ------------------------------------------------------------------------------
> October Webinars: Code for Performance
> Free Intel webinars can help you accelerate application performance.
> Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
> the latest Intel processors and coprocessors. See abstracts and register >
> http://pubads.g.doubleclick.net/gampad/clk?id=60135991&iu=/4140/ostg.clktrk_______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel


------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60135991&iu=/4140/ostg.clktrk
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2013-10-24 14:44
Fromjoachim heintz
SubjectRe: [Cs-dev] array output of user-defined opcode
Attachmentstest1.csd  None  None  
not for me, unfortunately:

jh@lenov:~$ ./src/cs6/bin/csound /home/jh/Arbeitsfläche/test1.csd
virtual_keyboard real time MIDI plugin for Csound
0dBFS level = 32768.0
Csound version 6.01.0 (double samples) Oct 24 2013
libsndfile-1.0.25
UnifiedCSD:  /home/jh/Arbeitsfläche/test1.csd
STARTING FILE
Creating orchestra
Creating score
rtaudio: ALSA module enabled
rtmidi: ALSA Raw MIDI module enabled
error:  invalid output type for opcode testerror:  invalid output type 
for opcode test
error: syntax error, unexpected T_IDENT, expecting T_OPCODE or 
T_FUNCTION or ','  (token "test") line 10:
 >>>Sbla[] test <<<
Parsing failed due to 2 syntax errors!
WARNING: Stopping on parser failure

WARNING: cannot compile orchestra.
WARNING: Csound will start with no instruments
Elapsed time at end of orchestra compile: real: 0.002s, CPU: 0.000s
sorting score ...
	... done
Elapsed time at end of score sort: real: 0.002s, CPU: 0.000s
Csound version 6.01.0 (double samples) Oct 24 2013
graphics suppressed, ascii substituted
0dBFS level = 32768.0
orch now loaded
audio buffered in 256 sample-frame blocks
writing 512-byte blks of shorts to test.wav (WAV)
SECTION 1:
	  B  0.000 - note deleted. instr 1(200) undefined
Score finished in csoundPerform().
inactive allocs returned to freespace
end of score.		   overall amps:      0.0
	   overall samples out of range:        0
1 errors in performance

the csd is attached. perhaps i missed something. best -
	j


Am 24.10.2013 15:25, schrieb Victor Lazzarini:
> yes, that's confirmed. The code works if written like that.
> On 24 Oct 2013, at 14:14, Steven Yi  wrote:
>
>> I think there is a syntax error. The variable should have [], so:
>>
>>
>>   Sbla[] test
>>
>> Since it is the first time using that variable. Try that and hopefully it should work.
>>
>>
>> On Thursday, October 24, 2013, joachim heintz wrote:
>> i think it's only the output which is not yet implemented. i already
>> used string arrays as udo inputs, but on the other hand currently also
>> k[] arguments are not working. i will open a ticket immediately (wanted
>> actually use an example with this for my talk on the conference, but i
>> can choose another one).
>> best -
>>          joachim
>>
>>
>> Am 24.10.2013 09:54, schrieb Victor Lazzarini:
>>> I think it's string arrays that are not implemented as UDO arguments. Could you open a ticket?
>>> On 23 Oct 2013, at 23:37, joachim heintz wrote:
>>>
>>>> hi -
>>>>
>>>> is it not possible to have an array as output of a UDO? the code below
>>>> returns:
>>>>
>>>> error:  invalid output type for opcode test
>>>> error: syntax error, unexpected T_IDENT  (token "test") line 10:
>>>>>>> Sbla test <<<
>>>> Unexpected untyped word Sbla when expecting a variable
>>>>
>>>> best -
>>>>
>>>>       joachim
>>>>
>>>>
>>>> 
>>>> 
>>>>
>>>> opcode test, S[], 0
>>>> Sarr[] init 5
>>>> xout Sarr
>>>> endop
>>>>
>>>> instr 1
>>>> Sbla test
>>>> endin
>>>>
>>>> 
>>>> 
>>>> i 1 0 1
>>>> 
>>>> 
>>>>
>>>> ------------------------------------------------------------------------------
>>>> October Webinars: Code for Performance
>>>> Free Intel webinars can help you accelerate application performance.
>>>> Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
>>>> the latest Intel processors and coprocessors. See abstracts and register >
>>>> http://pubads.g.doubleclick.net/gampad/clk?id=60135991&iu=/4140/ostg.clktrk
>>>> _______________________________________________
>>>> Csound-devel mailing list
>>>> Csound-devel@lists.sourceforge.net
>>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>
>>> Dr Victor Lazzarini
>>> Senior Lecturer
>>> Dept. of Music
>>> NUI Maynooth Ireland
>>> tel.: +353 1 708 3545
>>> Victor dot Lazzarini AT nuim dot ie
>>>
>>>
>>>
>>>
>>> ------------------------------------------------------------------------------
>>> October Webinars: Code for Performance
>>> Free Intel webinars can help you accelerate application performance.
>>> Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
>>> the latest Intel processors and coprocessors. See abstracts and register >
>>> http://pubads.g.doubleclick.net/gampad/clk?id=60135991&iu=/4140/ostg.clktrk
>>> _______________________________________________
>>> Csound-devel mailing list
>>> Csound-devel@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>
>>
>> ------------------------------------------------------------------------------
>> October Webinars: Code for Performance
>> Free Intel webinars can help you accelerate application performance.
>> Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
>> the latest Intel processors and coprocessors. See abstracts and register >
>> http://pubads.g.doubleclick.net/gampad/clk?id=60135991&iu=/4140/ostg.clktrk
>> _______________________________________________
>> Csound-devel mailing list
>> Csound-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>> ------------------------------------------------------------------------------
>> October Webinars: Code for Performance
>> Free Intel webinars can help you accelerate application performance.
>> Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
>> the latest Intel processors and coprocessors. See abstracts and register >
>> http://pubads.g.doubleclick.net/gampad/clk?id=60135991&iu=/4140/ostg.clktrk_______________________________________________
>> Csound-devel mailing list
>> Csound-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>
>
> ------------------------------------------------------------------------------
> October Webinars: Code for Performance
> Free Intel webinars can help you accelerate application performance.
> Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
> the latest Intel processors and coprocessors. See abstracts and register >
> http://pubads.g.doubleclick.net/gampad/clk?id=60135991&iu=/4140/ostg.clktrk
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel
>

Date2013-10-24 15:02
FromVictor Lazzarini
SubjectRe: [Cs-dev] array output of user-defined opcode
But string arrays are not implemented as UDO arguments, I though I said that before. Only i-rate and
k-rate arrays at the moment.

Victor
On 24 Oct 2013, at 14:44, joachim heintz  wrote:

> not for me, unfortunately:
> 
> jh@lenov:~$ ./src/cs6/bin/csound /home/jh/Arbeitsfläche/test1.csd
> virtual_keyboard real time MIDI plugin for Csound
> 0dBFS level = 32768.0
> Csound version 6.01.0 (double samples) Oct 24 2013
> libsndfile-1.0.25
> UnifiedCSD:  /home/jh/Arbeitsfläche/test1.csd
> STARTING FILE
> Creating orchestra
> Creating score
> rtaudio: ALSA module enabled
> rtmidi: ALSA Raw MIDI module enabled
> error:  invalid output type for opcode testerror:  invalid output type for opcode test
> error: syntax error, unexpected T_IDENT, expecting T_OPCODE or T_FUNCTION or ','  (token "test") line 10:
> >>>Sbla[] test <<<
> Parsing failed due to 2 syntax errors!
> WARNING: Stopping on parser failure
> 
> WARNING: cannot compile orchestra.
> WARNING: Csound will start with no instruments
> Elapsed time at end of orchestra compile: real: 0.002s, CPU: 0.000s
> sorting score ...
> 	... done
> Elapsed time at end of score sort: real: 0.002s, CPU: 0.000s
> Csound version 6.01.0 (double samples) Oct 24 2013
> graphics suppressed, ascii substituted
> 0dBFS level = 32768.0
> orch now loaded
> audio buffered in 256 sample-frame blocks
> writing 512-byte blks of shorts to test.wav (WAV)
> SECTION 1:
> 	  B  0.000 - note deleted. instr 1(200) undefined
> Score finished in csoundPerform().
> inactive allocs returned to freespace
> end of score.		   overall amps:      0.0
> 	   overall samples out of range:        0
> 1 errors in performance
> 
> the csd is attached. perhaps i missed something. best -
> 	j
> 
> 
> Am 24.10.2013 15:25, schrieb Victor Lazzarini:
>> yes, that's confirmed. The code works if written like that.
>> On 24 Oct 2013, at 14:14, Steven Yi  wrote:
>> 
>>> I think there is a syntax error. The variable should have [], so:
>>> 
>>> 
>>>  Sbla[] test
>>> 
>>> Since it is the first time using that variable. Try that and hopefully it should work.
>>> 
>>> 
>>> On Thursday, October 24, 2013, joachim heintz wrote:
>>> i think it's only the output which is not yet implemented. i already
>>> used string arrays as udo inputs, but on the other hand currently also
>>> k[] arguments are not working. i will open a ticket immediately (wanted
>>> actually use an example with this for my talk on the conference, but i
>>> can choose another one).
>>> best -
>>>         joachim
>>> 
>>> 
>>> Am 24.10.2013 09:54, schrieb Victor Lazzarini:
>>>> I think it's string arrays that are not implemented as UDO arguments. Could you open a ticket?
>>>> On 23 Oct 2013, at 23:37, joachim heintz wrote:
>>>> 
>>>>> hi -
>>>>> 
>>>>> is it not possible to have an array as output of a UDO? the code below
>>>>> returns:
>>>>> 
>>>>> error:  invalid output type for opcode test
>>>>> error: syntax error, unexpected T_IDENT  (token "test") line 10:
>>>>>>>> Sbla test <<<
>>>>> Unexpected untyped word Sbla when expecting a variable
>>>>> 
>>>>> best -
>>>>> 
>>>>>      joachim
>>>>> 
>>>>> 
>>>>> 
>>>>> 
>>>>> 
>>>>> opcode test, S[], 0
>>>>> Sarr[] init 5
>>>>> xout Sarr
>>>>> endop
>>>>> 
>>>>> instr 1
>>>>> Sbla test
>>>>> endin
>>>>> 
>>>>> 
>>>>> 
>>>>> i 1 0 1
>>>>> 
>>>>> 
>>>>> 
>>>>> ------------------------------------------------------------------------------
>>>>> October Webinars: Code for Performance
>>>>> Free Intel webinars can help you accelerate application performance.
>>>>> Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
>>>>> the latest Intel processors and coprocessors. See abstracts and register >
>>>>> http://pubads.g.doubleclick.net/gampad/clk?id=60135991&iu=/4140/ostg.clktrk
>>>>> _______________________________________________
>>>>> Csound-devel mailing list
>>>>> Csound-devel@lists.sourceforge.net
>>>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>> 
>>>> Dr Victor Lazzarini
>>>> Senior Lecturer
>>>> Dept. of Music
>>>> NUI Maynooth Ireland
>>>> tel.: +353 1 708 3545
>>>> Victor dot Lazzarini AT nuim dot ie
>>>> 
>>>> 
>>>> 
>>>> 
>>>> ------------------------------------------------------------------------------
>>>> October Webinars: Code for Performance
>>>> Free Intel webinars can help you accelerate application performance.
>>>> Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
>>>> the latest Intel processors and coprocessors. See abstracts and register >
>>>> http://pubads.g.doubleclick.net/gampad/clk?id=60135991&iu=/4140/ostg.clktrk
>>>> _______________________________________________
>>>> Csound-devel mailing list
>>>> Csound-devel@lists.sourceforge.net
>>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>> 
>>> 
>>> ------------------------------------------------------------------------------
>>> October Webinars: Code for Performance
>>> Free Intel webinars can help you accelerate application performance.
>>> Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
>>> the latest Intel processors and coprocessors. See abstracts and register >
>>> http://pubads.g.doubleclick.net/gampad/clk?id=60135991&iu=/4140/ostg.clktrk
>>> _______________________________________________
>>> Csound-devel mailing list
>>> Csound-devel@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>> ------------------------------------------------------------------------------
>>> October Webinars: Code for Performance
>>> Free Intel webinars can help you accelerate application performance.
>>> Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
>>> the latest Intel processors and coprocessors. See abstracts and register >
>>> http://pubads.g.doubleclick.net/gampad/clk?id=60135991&iu=/4140/ostg.clktrk_______________________________________________
>>> Csound-devel mailing list
>>> Csound-devel@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>> 
>> 
>> ------------------------------------------------------------------------------
>> October Webinars: Code for Performance
>> Free Intel webinars can help you accelerate application performance.
>> Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
>> the latest Intel processors and coprocessors. See abstracts and register >
>> http://pubads.g.doubleclick.net/gampad/clk?id=60135991&iu=/4140/ostg.clktrk
>> _______________________________________________
>> Csound-devel mailing list
>> Csound-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>> 
> ------------------------------------------------------------------------------
> October Webinars: Code for Performance
> Free Intel webinars can help you accelerate application performance.
> Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
> the latest Intel processors and coprocessors. See abstracts and register >
> http://pubads.g.doubleclick.net/gampad/clk?id=60135991&iu=/4140/ostg.clktrk
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel


------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60135991&iu=/4140/ostg.clktrk
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2013-10-24 15:18
Fromjoachim heintz
SubjectRe: [Cs-dev] array output of user-defined opcode
i thought you said the code works if written like steven mentioned, i.e.
    Sbla[] test

perhaps i misunderstood you.

just to note, i again tested the k[] output and see that it is indeed 
working when i use it in this way:



opcode test, k[], 0
karr[] init 5
xout karr
endop
instr 1
kbla[] test
endin


i 1 0 1




ths use of brackets and non-brackets is still a bit opaque for me (in my 
test yesterday i used it without brackets), but when i think about it, 
it makes sense that it is the first occurrence of kbla as array 
variable, so it has to be with brackets.

best -

	j





Am 24.10.2013 16:02, schrieb Victor Lazzarini:
> But string arrays are not implemented as UDO arguments, I though I said that before. Only i-rate and
> k-rate arrays at the moment.
>
> Victor
> On 24 Oct 2013, at 14:44, joachim heintz  wrote:
>
>> not for me, unfortunately:
>>
>> jh@lenov:~$ ./src/cs6/bin/csound /home/jh/Arbeitsfläche/test1.csd
>> virtual_keyboard real time MIDI plugin for Csound
>> 0dBFS level = 32768.0
>> Csound version 6.01.0 (double samples) Oct 24 2013
>> libsndfile-1.0.25
>> UnifiedCSD:  /home/jh/Arbeitsfläche/test1.csd
>> STARTING FILE
>> Creating orchestra
>> Creating score
>> rtaudio: ALSA module enabled
>> rtmidi: ALSA Raw MIDI module enabled
>> error:  invalid output type for opcode testerror:  invalid output type for opcode test
>> error: syntax error, unexpected T_IDENT, expecting T_OPCODE or T_FUNCTION or ','  (token "test") line 10:
>>>>> Sbla[] test <<<
>> Parsing failed due to 2 syntax errors!
>> WARNING: Stopping on parser failure
>>
>> WARNING: cannot compile orchestra.
>> WARNING: Csound will start with no instruments
>> Elapsed time at end of orchestra compile: real: 0.002s, CPU: 0.000s
>> sorting score ...
>> 	... done
>> Elapsed time at end of score sort: real: 0.002s, CPU: 0.000s
>> Csound version 6.01.0 (double samples) Oct 24 2013
>> graphics suppressed, ascii substituted
>> 0dBFS level = 32768.0
>> orch now loaded
>> audio buffered in 256 sample-frame blocks
>> writing 512-byte blks of shorts to test.wav (WAV)
>> SECTION 1:
>> 	  B  0.000 - note deleted. instr 1(200) undefined
>> Score finished in csoundPerform().
>> inactive allocs returned to freespace
>> end of score.		   overall amps:      0.0
>> 	   overall samples out of range:        0
>> 1 errors in performance
>>
>> the csd is attached. perhaps i missed something. best -
>> 	j
>>
>>
>> Am 24.10.2013 15:25, schrieb Victor Lazzarini:
>>> yes, that's confirmed. The code works if written like that.
>>> On 24 Oct 2013, at 14:14, Steven Yi  wrote:
>>>
>>>> I think there is a syntax error. The variable should have [], so:
>>>>
>>>>
>>>>   Sbla[] test
>>>>
>>>> Since it is the first time using that variable. Try that and hopefully it should work.
>>>>
>>>>
>>>> On Thursday, October 24, 2013, joachim heintz wrote:
>>>> i think it's only the output which is not yet implemented. i already
>>>> used string arrays as udo inputs, but on the other hand currently also
>>>> k[] arguments are not working. i will open a ticket immediately (wanted
>>>> actually use an example with this for my talk on the conference, but i
>>>> can choose another one).
>>>> best -
>>>>          joachim
>>>>
>>>>
>>>> Am 24.10.2013 09:54, schrieb Victor Lazzarini:
>>>>> I think it's string arrays that are not implemented as UDO arguments. Could you open a ticket?
>>>>> On 23 Oct 2013, at 23:37, joachim heintz wrote:
>>>>>
>>>>>> hi -
>>>>>>
>>>>>> is it not possible to have an array as output of a UDO? the code below
>>>>>> returns:
>>>>>>
>>>>>> error:  invalid output type for opcode test
>>>>>> error: syntax error, unexpected T_IDENT  (token "test") line 10:
>>>>>>>>> Sbla test <<<
>>>>>> Unexpected untyped word Sbla when expecting a variable
>>>>>>
>>>>>> best -
>>>>>>
>>>>>>       joachim
>>>>>>
>>>>>>
>>>>>> 
>>>>>> 
>>>>>>
>>>>>> opcode test, S[], 0
>>>>>> Sarr[] init 5
>>>>>> xout Sarr
>>>>>> endop
>>>>>>
>>>>>> instr 1
>>>>>> Sbla test
>>>>>> endin
>>>>>>
>>>>>> 
>>>>>> 
>>>>>> i 1 0 1
>>>>>> 
>>>>>> 
>>>>>>
>>>>>> ------------------------------------------------------------------------------
>>>>>> October Webinars: Code for Performance
>>>>>> Free Intel webinars can help you accelerate application performance.
>>>>>> Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
>>>>>> the latest Intel processors and coprocessors. See abstracts and register >
>>>>>> http://pubads.g.doubleclick.net/gampad/clk?id=60135991&iu=/4140/ostg.clktrk
>>>>>> _______________________________________________
>>>>>> Csound-devel mailing list
>>>>>> Csound-devel@lists.sourceforge.net
>>>>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>>>
>>>>> Dr Victor Lazzarini
>>>>> Senior Lecturer
>>>>> Dept. of Music
>>>>> NUI Maynooth Ireland
>>>>> tel.: +353 1 708 3545
>>>>> Victor dot Lazzarini AT nuim dot ie
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> ------------------------------------------------------------------------------
>>>>> October Webinars: Code for Performance
>>>>> Free Intel webinars can help you accelerate application performance.
>>>>> Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
>>>>> the latest Intel processors and coprocessors. See abstracts and register >
>>>>> http://pubads.g.doubleclick.net/gampad/clk?id=60135991&iu=/4140/ostg.clktrk
>>>>> _______________________________________________
>>>>> Csound-devel mailing list
>>>>> Csound-devel@lists.sourceforge.net
>>>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>>>
>>>>
>>>> ------------------------------------------------------------------------------
>>>> October Webinars: Code for Performance
>>>> Free Intel webinars can help you accelerate application performance.
>>>> Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
>>>> the latest Intel processors and coprocessors. See abstracts and register >
>>>> http://pubads.g.doubleclick.net/gampad/clk?id=60135991&iu=/4140/ostg.clktrk
>>>> _______________________________________________
>>>> Csound-devel mailing list
>>>> Csound-devel@lists.sourceforge.net
>>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>> ------------------------------------------------------------------------------
>>>> October Webinars: Code for Performance
>>>> Free Intel webinars can help you accelerate application performance.
>>>> Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
>>>> the latest Intel processors and coprocessors. See abstracts and register >
>>>> http://pubads.g.doubleclick.net/gampad/clk?id=60135991&iu=/4140/ostg.clktrk_______________________________________________
>>>> Csound-devel mailing list
>>>> Csound-devel@lists.sourceforge.net
>>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>
>>>
>>> ------------------------------------------------------------------------------
>>> October Webinars: Code for Performance
>>> Free Intel webinars can help you accelerate application performance.
>>> Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
>>> the latest Intel processors and coprocessors. See abstracts and register >
>>> http://pubads.g.doubleclick.net/gampad/clk?id=60135991&iu=/4140/ostg.clktrk
>>> _______________________________________________
>>> Csound-devel mailing list
>>> Csound-devel@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>
>> ------------------------------------------------------------------------------
>> October Webinars: Code for Performance
>> Free Intel webinars can help you accelerate application performance.
>> Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
>> the latest Intel processors and coprocessors. See abstracts and register >
>> http://pubads.g.doubleclick.net/gampad/clk?id=60135991&iu=/4140/ostg.clktrk
>> _______________________________________________
>> Csound-devel mailing list
>> Csound-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>
>
> ------------------------------------------------------------------------------
> October Webinars: Code for Performance
> Free Intel webinars can help you accelerate application performance.
> Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
> the latest Intel processors and coprocessors. See abstracts and register >
> http://pubads.g.doubleclick.net/gampad/clk?id=60135991&iu=/4140/ostg.clktrk
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel
>

------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60135991&iu=/4140/ostg.clktrk
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-

Date2013-10-24 15:21
Fromjpff@cs.bath.ac.uk
SubjectRe: [Cs-dev] array output of user-defined opcode
> But string arrays are not implemented as UDO arguments, I though I said
> that before. Only i-rate and
> k-rate arrays at the moment.
>
 There are not many things one can do with string-arrays at present.  We
need to discuss what is needed.  For exaple fillarray cannot work on
strings at present.  Not sure if map could work.

==John ff



------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60135991&iu=/4140/ostg.clktrk
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net