Csound Csound-dev Csound-tekno Search About

[Cs-dev] another one for the new parser

Date2010-11-28 12:59
Frommenno
Subject[Cs-dev] another one for the new parser
Hello,

because i am trying out every example of the manual i report all the
problems i get with them using the new parser. 
Here is one with this cent.csd:



; Select audio/midi flags here according to platform
-odac     ;;;RT audio out
;-iadc    ;;;uncomment -iadc if RT audio input is needed too
; For Non-realtime ouput leave only the line below:
; -o cent.wav -W ;;; for file output any platform



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

instr 1	; original pitch
  
iroot = 440	; root note = A (440 Hz)

print iroot	;print out

asig oscili 0.6, iroot, 1 
     outs asig, asig

endin

instr 2
  
iroot   = 440	; root note = A (440 Hz)
icents  = p4	; change root note by 300 and 1200 cents

ifactor = cent(icents) ; calculate new note
inew    = iroot * ifactor

print iroot	; Print all
print ifactor
print inew

asig oscili 0.6, inew, 1 
     outs asig, asig

endin



; sine wave
f1 0 32768 10 1

i 1 0  2  0	;no change
i 2 2.5 2 300	;note = C above A
i 2 5  2 1200	;1 octave higher 

e





And the new parser produces:

rtaudio: JACK module enabled
********************
* USING NEW PARSER *
********************
csound_orcerror: syntax error, unexpected T_OPCODE
Parsing failed due to invalid input!
Csound tidy up: Segmentation fault


With the old one it works fine.
bye,
menno

-- 
View this message in context: http://csound.1045644.n5.nabble.com/another-one-for-the-new-parser-tp3283340p3283340.html
Sent from the Csound - Dev mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Increase Visibility of Your 3D Game App & Earn a Chance To Win $500!
Tap into the largest installed PC base & get more eyes on your game by
optimizing for Intel(R) Graphics Technology. Get started today with the
Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
http://p.sf.net/sfu/intelisp-dev2dev
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2010-11-28 13:44
Frommenno
SubjectRe: [Cs-dev] another one for the new parser
And another one, using an example of the connect opcode:

 
 
; Select audio/midi flags here according to platform
-odac     ;;;RT audio out
;-iadc    ;;;uncomment -iadc if RT audio input is needed too
; For Non-realtime ouput leave only the line below:
;-Wfo connect.wav 
 
 

sr = 44100 
ksmps = 32 
nchnls = 2 

; Connect up instruments and effects to create the signal flow graph. 

connect "SimpleSine",   	"leftout",     "Reverberator",     	"leftin" 
connect "SimpleSine",   	"rightout",    "Reverberator",     	"rightin" 

connect "Moogy",        	"leftout",     "Reverberator",     	"leftin" 
connect "Moogy",        	"rightout",    "Reverberator",     	"rightin" 

connect "Reverberator", 	"leftout",     "Compressor",       	"leftin" 
connect "Reverberator", 	"rightout",    "Compressor",       	"rightin" 

connect "Compressor",   	"leftout",     "Soundfile",       	"leftin" 
connect "Compressor",   	"rightout",    "Soundfile",       	"rightin" 

; Turn on the "effect" units in the signal flow graph. 

alwayson "Reverberator", 0.91, 12000 
alwayson "Compressor" 
alwayson "Soundfile" 

; Define instruments and effects in order of signal flow.

			    instr SimpleSine 
                ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
			    ; Default values:   p1  p2  p3  p4  p5  p6  p7  p8  p9  p10
			    pset			    0,  0,  10, 0,  0,  0,  0.5
iattack			=			        0.015
idecay			=			        0.07
isustain		=			        p3
irelease		=			        0.3
p3			    =			        iattack + idecay + isustain + irelease
adamping		linsegr			    0.0, iattack, 1.0, idecay + isustain, 1.0, irelease,
0.0
iHz 			= 			        cpsmidinn(p4) 
                ; Rescale MIDI velocity range to a musically usable range of
dB. 
iamplitude 		= 			        ampdb(p5 / 127 * 15.0 + 60.0) 
			    ; Use ftgenonce instead of ftgen, ftgentmp, or f statement. 
icosine			ftgenonce 		    0, 0, 65537, 11, 1 
aoscili			oscili 			    iamplitude, iHz, icosine 
aadsr 			madsr 			    iattack, idecay, 0.6, irelease 
asignal 		= 			        aoscili * aadsr 
aleft, aright	pan2			    asignal, p7
			    ; Stereo audio output to be routed in the orchestra header. 
			    outleta 		    "leftout", aleft
			    outleta 		    "rightout", aright
			    endin 

			    instr Moogy 
                ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
			    ; Default values:   p1  p2  p3  p4  p5  p6  p7  p8  p9  p10
			    pset			    0,  0,  10, 0,  0,  0,  0.5
iattack			=			        0.003
isustain		=			        p3
irelease		=			        0.05
p3			    =			        iattack + isustain + irelease
adamping		linsegr			    0.0, iattack, 1.0, isustain, 1.0, irelease, 0.0
iHz 			= 			        cpsmidinn(p4)
                ; Rescale MIDI velocity range to a musically usable range of
dB. 
iamplitude 		= 			        ampdb(p5 / 127 * 20.0 + 60.0) 
			    print 			    iHz, iamplitude 
			    ; Use ftgenonce instead of ftgen, ftgentmp, or f statement. 
isine 			ftgenonce 		    0, 0, 65537, 10, 1 
asignal 		vco 			    iamplitude, iHz, 1, 0.5, isine 
kfco 			line 			    2000, p3, 200
krez 			= 			        0.8 
asignal 		moogvcf 		    asignal, kfco, krez, 100000 
asignal			=			        asignal * adamping
aleft, aright	pan2			    asignal, p7
			    ; Stereo audio output to be routed in the orchestra header. 
			    outleta 		    "leftout", aleft
			    outleta 		    "rightout", aright 
			    endin 
			    instr Reverberator 
                ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
			    ; Stereo input. 
aleftin 		inleta 			    "leftin" 
arightin 		inleta 			    "rightin" 
idelay 			= 			        p4 
icutoff 		= 			        p5 
aleft, aright 	reverbsc 	        aleftin, arightin, idelay, icutoff 
			    ; Stereo output. 
			    outleta 	        "leftout", aleft 
			    outleta 	        "rightout", aright 
			    endin 

			    instr Compressor 
                ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
			    ; Stereo input. 
aleftin 		inleta 		        "leftin" 
arightin 		inleta 		        "rightin" 
kthreshold 		= 		            25000 
icomp1 			= 		            0.5 
icomp2 			= 		            0.763 
irtime 			= 		            0.1 
iftime 			= 		            0.1 
aleftout 		dam 		        aleftin, kthreshold, icomp1, icomp2, irtime, iftime 
arightout 		dam 		        arightin, kthreshold, icomp1, icomp2, irtime,
iftime 
			    ; Stereo output. 
			    outleta 	        "leftout", aleftout 
			    outleta 	        "rightout", arightout 
			    endin 

			    instr Soundfile 
                ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
			    ; Stereo input. 
aleftin 		inleta 		        "leftin" 
arightin 		inleta 		        "rightin" 
			    outs 		        aleftin, arightin 
			    endin 

 
 

; It is not necessary to activate "effects" or create f-tables in the score! 
; Overlapping notes create new instances of instruments with proper
connections. 

i "SimpleSine" 1 5 60 85 
i "SimpleSine" 2 5 64 80 
i "Moogy" 3 5 67 75 
i "Moogy" 4 5 71 70 
;1 extra second after the performance
e 1 

 
 

Same result:

rtaudio: JACK module enabled
********************
* USING NEW PARSER *
********************
csound_orcerror: syntax error, unexpected T_OPCODE
Parsing failed due to invalid input!
Csound tidy up: Segmentation fault 

menno

-- 
View this message in context: http://csound.1045644.n5.nabble.com/another-one-for-the-new-parser-tp3283340p3283365.html
Sent from the Csound - Dev mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Increase Visibility of Your 3D Game App & Earn a Chance To Win $500!
Tap into the largest installed PC base & get more eyes on your game by
optimizing for Intel(R) Graphics Technology. Get started today with the
Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
http://p.sf.net/sfu/intelisp-dev2dev
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2010-11-28 15:58
FromVictor Lazzarini
SubjectRe: [Cs-dev] another one for the new parser
Somehow the cent() function is not recognised.

Victor
On 28 Nov 2010, at 12:59, menno wrote:

>
> Hello,
>
> because i am trying out every example of the manual i report all the
> problems i get with them using the new parser.
> Here is one with this cent.csd:
>
> 
> 
> ; Select audio/midi flags here according to platform
> -odac     ;;;RT audio out
> ;-iadc    ;;;uncomment -iadc if RT audio input is needed too
> ; For Non-realtime ouput leave only the line below:
> ; -o cent.wav -W ;;; for file output any platform
> 
> 
>
> sr = 44100
> ksmps = 32
> nchnls = 2
> 0dbfs = 1
>
> instr 1	; original pitch
>
> iroot = 440	; root note = A (440 Hz)
>
> print iroot	;print out
>
> asig oscili 0.6, iroot, 1
>     outs asig, asig
>
> endin
>
> instr 2
>
> iroot   = 440	; root note = A (440 Hz)
> icents  = p4	; change root note by 300 and 1200 cents
>
> ifactor = cent(icents) ; calculate new note
> inew    = iroot * ifactor
>
> print iroot	; Print all
> print ifactor
> print inew
>
> asig oscili 0.6, inew, 1
>     outs asig, asig
>
> endin
>
> 
> 
> ; sine wave
> f1 0 32768 10 1
>
> i 1 0  2  0	;no change
> i 2 2.5 2 300	;note = C above A
> i 2 5  2 1200	;1 octave higher
>
> e
>
> 
> 
>
>
> And the new parser produces:
>
> rtaudio: JACK module enabled
> ********************
> * USING NEW PARSER *
> ********************
> csound_orcerror: syntax error, unexpected T_OPCODE
> Parsing failed due to invalid input!
> Csound tidy up: Segmentation fault
>
>
> With the old one it works fine.
> bye,
> menno
>
> --  
> View this message in context: http://csound.1045644.n5.nabble.com/another-one-for-the-new-parser-tp3283340p3283340.html
> Sent from the Csound - Dev mailing list archive at Nabble.com.
>
> ------------------------------------------------------------------------------
> Increase Visibility of Your 3D Game App & Earn a Chance To Win $500!
> Tap into the largest installed PC base & get more eyes on your game by
> optimizing for Intel(R) Graphics Technology. Get started today with  
> the
> Intel(R) Software Partner Program. Five $500 cash prizes are up for  
> grabs.
> http://p.sf.net/sfu/intelisp-dev2dev
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel


------------------------------------------------------------------------------
Increase Visibility of Your 3D Game App & Earn a Chance To Win $500!
Tap into the largest installed PC base & get more eyes on your game by
optimizing for Intel(R) Graphics Technology. Get started today with the
Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
http://p.sf.net/sfu/intelisp-dev2dev
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2010-11-28 16:17
Fromjpff@cs.bath.ac.uk
SubjectRe: [Cs-dev] another one for the new parser
Fixed in CVS

> Somehow the cent() function is not recognised.
>
> Victor
> On 28 Nov 2010, at 12:59, menno wrote:
>
>>
>> Hello,
>>
>> because i am trying out every example of the manual i report all the
>> problems i get with them using the new parser.
>> Here is one with this cent.csd:
>>
>> 
>> 
>> ; Select audio/midi flags here according to platform
>> -odac     ;;;RT audio out
>> ;-iadc    ;;;uncomment -iadc if RT audio input is needed too
>> ; For Non-realtime ouput leave only the line below:
>> ; -o cent.wav -W ;;; for file output any platform
>> 
>> 
>>
>> sr = 44100
>> ksmps = 32
>> nchnls = 2
>> 0dbfs = 1
>>
>> instr 1	; original pitch
>>
>> iroot = 440	; root note = A (440 Hz)
>>
>> print iroot	;print out
>>
>> asig oscili 0.6, iroot, 1
>>     outs asig, asig
>>
>> endin
>>
>> instr 2
>>
>> iroot   = 440	; root note = A (440 Hz)
>> icents  = p4	; change root note by 300 and 1200 cents
>>
>> ifactor = cent(icents) ; calculate new note
>> inew    = iroot * ifactor
>>
>> print iroot	; Print all
>> print ifactor
>> print inew
>>
>> asig oscili 0.6, inew, 1
>>     outs asig, asig
>>
>> endin
>>
>> 
>> 
>> ; sine wave
>> f1 0 32768 10 1
>>
>> i 1 0  2  0	;no change
>> i 2 2.5 2 300	;note = C above A
>> i 2 5  2 1200	;1 octave higher
>>
>> e
>>
>> 
>> 
>>
>>
>> And the new parser produces:
>>
>> rtaudio: JACK module enabled
>> ********************
>> * USING NEW PARSER *
>> ********************
>> csound_orcerror: syntax error, unexpected T_OPCODE
>> Parsing failed due to invalid input!
>> Csound tidy up: Segmentation fault
>>
>>
>> With the old one it works fine.
>> bye,
>> menno
>>
>> --
>> View this message in context:
>> http://csound.1045644.n5.nabble.com/another-one-for-the-new-parser-tp3283340p3283340.html
>> Sent from the Csound - Dev mailing list archive at Nabble.com.
>>
>> ------------------------------------------------------------------------------
>> Increase Visibility of Your 3D Game App & Earn a Chance To Win $500!
>> Tap into the largest installed PC base & get more eyes on your game by
>> optimizing for Intel(R) Graphics Technology. Get started today with
>> the
>> Intel(R) Software Partner Program. Five $500 cash prizes are up for
>> grabs.
>> http://p.sf.net/sfu/intelisp-dev2dev
>> _______________________________________________
>> Csound-devel mailing list
>> Csound-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>
>
> ------------------------------------------------------------------------------
> Increase Visibility of Your 3D Game App & Earn a Chance To Win $500!
> Tap into the largest installed PC base & get more eyes on your game by
> optimizing for Intel(R) Graphics Technology. Get started today with the
> Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
> http://p.sf.net/sfu/intelisp-dev2dev
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel
>
>
>



------------------------------------------------------------------------------
Increase Visibility of Your 3D Game App & Earn a Chance To Win $500!
Tap into the largest installed PC base & get more eyes on your game by
optimizing for Intel(R) Graphics Technology. Get started today with the
Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
http://p.sf.net/sfu/intelisp-dev2dev
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2010-11-28 17:07
Fromjpff@cs.bath.ac.uk
SubjectRe: [Cs-dev] another one for the new parser
Fixed in CVS

>
> And another one, using an example of the connect opcode:
>
> 
> 
> ; Select audio/midi flags here according to platform
> -odac     ;;;RT audio out
> ;-iadc    ;;;uncomment -iadc if RT audio input is needed too
> ; For Non-realtime ouput leave only the line below:
> ;-Wfo connect.wav
> 
> 
>
> sr = 44100
> ksmps = 32
> nchnls = 2
>
> ; Connect up instruments and effects to create the signal flow graph.
>
> connect "SimpleSine",   	"leftout",     "Reverberator",     	"leftin"
> connect "SimpleSine",   	"rightout",    "Reverberator",     	"rightin"
>
> connect "Moogy",        	"leftout",     "Reverberator",     	"leftin"
> connect "Moogy",        	"rightout",    "Reverberator",     	"rightin"
>
> connect "Reverberator", 	"leftout",     "Compressor",       	"leftin"
> connect "Reverberator", 	"rightout",    "Compressor",       	"rightin"
>
> connect "Compressor",   	"leftout",     "Soundfile",       	"leftin"
> connect "Compressor",   	"rightout",    "Soundfile",       	"rightin"
>
> ; Turn on the "effect" units in the signal flow graph.
>
> alwayson "Reverberator", 0.91, 12000
> alwayson "Compressor"
> alwayson "Soundfile"
>
> ; Define instruments and effects in order of signal flow.
>
> 			    instr SimpleSine
>                 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
> 			    ; Default values:   p1  p2  p3  p4  p5  p6  p7  p8  p9  p10
> 			    pset			    0,  0,  10, 0,  0,  0,  0.5
> iattack			=			        0.015
> idecay			=			        0.07
> isustain		=			        p3
> irelease		=			        0.3
> p3			    =			        iattack + idecay + isustain + irelease
> adamping		linsegr			    0.0, iattack, 1.0, idecay + isustain, 1.0,
> irelease,
> 0.0
> iHz 			= 			        cpsmidinn(p4)
>                 ; Rescale MIDI velocity range to a musically usable range
> of
> dB.
> iamplitude 		= 			        ampdb(p5 / 127 * 15.0 + 60.0)
> 			    ; Use ftgenonce instead of ftgen, ftgentmp, or f statement.
> icosine			ftgenonce 		    0, 0, 65537, 11, 1
> aoscili			oscili 			    iamplitude, iHz, icosine
> aadsr 			madsr 			    iattack, idecay, 0.6, irelease
> asignal 		= 			        aoscili * aadsr
> aleft, aright	pan2			    asignal, p7
> 			    ; Stereo audio output to be routed in the orchestra header.
> 			    outleta 		    "leftout", aleft
> 			    outleta 		    "rightout", aright
> 			    endin
>
> 			    instr Moogy
>                 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
> 			    ; Default values:   p1  p2  p3  p4  p5  p6  p7  p8  p9  p10
> 			    pset			    0,  0,  10, 0,  0,  0,  0.5
> iattack			=			        0.003
> isustain		=			        p3
> irelease		=			        0.05
> p3			    =			        iattack + isustain + irelease
> adamping		linsegr			    0.0, iattack, 1.0, isustain, 1.0, irelease, 0.0
> iHz 			= 			        cpsmidinn(p4)
>                 ; Rescale MIDI velocity range to a musically usable range
> of
> dB.
> iamplitude 		= 			        ampdb(p5 / 127 * 20.0 + 60.0)
> 			    print 			    iHz, iamplitude
> 			    ; Use ftgenonce instead of ftgen, ftgentmp, or f statement.
> isine 			ftgenonce 		    0, 0, 65537, 10, 1
> asignal 		vco 			    iamplitude, iHz, 1, 0.5, isine
> kfco 			line 			    2000, p3, 200
> krez 			= 			        0.8
> asignal 		moogvcf 		    asignal, kfco, krez, 100000
> asignal			=			        asignal * adamping
> aleft, aright	pan2			    asignal, p7
> 			    ; Stereo audio output to be routed in the orchestra header.
> 			    outleta 		    "leftout", aleft
> 			    outleta 		    "rightout", aright
> 			    endin
> 			    instr Reverberator
>                 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
> 			    ; Stereo input.
> aleftin 		inleta 			    "leftin"
> arightin 		inleta 			    "rightin"
> idelay 			= 			        p4
> icutoff 		= 			        p5
> aleft, aright 	reverbsc 	        aleftin, arightin, idelay, icutoff
> 			    ; Stereo output.
> 			    outleta 	        "leftout", aleft
> 			    outleta 	        "rightout", aright
> 			    endin
>
> 			    instr Compressor
>                 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
> 			    ; Stereo input.
> aleftin 		inleta 		        "leftin"
> arightin 		inleta 		        "rightin"
> kthreshold 		= 		            25000
> icomp1 			= 		            0.5
> icomp2 			= 		            0.763
> irtime 			= 		            0.1
> iftime 			= 		            0.1
> aleftout 		dam 		        aleftin, kthreshold, icomp1, icomp2, irtime,
> iftime
> arightout 		dam 		        arightin, kthreshold, icomp1, icomp2, irtime,
> iftime
> 			    ; Stereo output.
> 			    outleta 	        "leftout", aleftout
> 			    outleta 	        "rightout", arightout
> 			    endin
>
> 			    instr Soundfile
>                 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
> 			    ; Stereo input.
> aleftin 		inleta 		        "leftin"
> arightin 		inleta 		        "rightin"
> 			    outs 		        aleftin, arightin
> 			    endin
>
> 
> 
>
> ; It is not necessary to activate "effects" or create f-tables in the
> score!
> ; Overlapping notes create new instances of instruments with proper
> connections.
>
> i "SimpleSine" 1 5 60 85
> i "SimpleSine" 2 5 64 80
> i "Moogy" 3 5 67 75
> i "Moogy" 4 5 71 70
> ;1 extra second after the performance
> e 1
>
> 
> 
>
> Same result:
>
> rtaudio: JACK module enabled
> ********************
> * USING NEW PARSER *
> ********************
> csound_orcerror: syntax error, unexpected T_OPCODE
> Parsing failed due to invalid input!
> Csound tidy up: Segmentation fault
>
> menno
>
> --
> View this message in context:
> http://csound.1045644.n5.nabble.com/another-one-for-the-new-parser-tp3283340p3283365.html
> Sent from the Csound - Dev mailing list archive at Nabble.com.
>
> ------------------------------------------------------------------------------
> Increase Visibility of Your 3D Game App & Earn a Chance To Win $500!
> Tap into the largest installed PC base & get more eyes on your game by
> optimizing for Intel(R) Graphics Technology. Get started today with the
> Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
> http://p.sf.net/sfu/intelisp-dev2dev
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel
>
>
>



------------------------------------------------------------------------------
Increase Visibility of Your 3D Game App & Earn a Chance To Win $500!
Tap into the largest installed PC base & get more eyes on your game by
optimizing for Intel(R) Graphics Technology. Get started today with the
Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
http://p.sf.net/sfu/intelisp-dev2dev
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2010-11-28 17:21
Fromjpff@cs.bath.ac.uk
SubjectRe: [Cs-dev] another one for the new parser
> Fixed in CVS
>
>>
>> And another one, using an example of the connect opcode:

There is  problem that I do not know how to fix easily.  The new parser
required that (for example) cent not be declared as an opcode as opcodes
and functuons are different.  The old parser does not ghave functions as a
type ans any opcode of one arg giving a result can be used as a function.

So, the lines in entry.c differ and we have a problem.

I could remove the checking i suppose so type redefinition is allowed.

As it is in new parser  xxx is either an opcode or a function but not
both.  This is a major incompatability.

One could possibly redefine the whole function/opcode parsing, but not
sure how at present.

ANyone any thoughts?

At presne the CVS is for new parser only -- changes on Engine/entry.c


------------------------------------------------------------------------------
Increase Visibility of Your 3D Game App & Earn a Chance To Win $500!
Tap into the largest installed PC base & get more eyes on your game by
optimizing for Intel(R) Graphics Technology. Get started today with the
Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
http://p.sf.net/sfu/intelisp-dev2dev
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2010-11-28 17:35
FromVictor Lazzarini
SubjectRe: [Cs-dev] another one for the new parser
I would like if opcodes (any) could be functions and vice-versa. For  
functions returning more than one answer we
could have a tuple

a, b = op(c,d)

In general opcodes with one answer could be used as functions, eg.

instr 1
out(oscili(p4, p5+ oscili(p6*p5, p5,1),1)
endin

That would be very nice!

Victor



On 28 Nov 2010, at 17:21, jpff@cs.bath.ac.uk wrote:

>> Fixed in CVS
>>
>>>
>>> And another one, using an example of the connect opcode:
>
> There is  problem that I do not know how to fix easily.  The new  
> parser
> required that (for example) cent not be declared as an opcode as  
> opcodes
> and functuons are different.  The old parser does not ghave  
> functions as a
> type ans any opcode of one arg giving a result can be used as a  
> function.
>
> So, the lines in entry.c differ and we have a problem.
>
> I could remove the checking i suppose so type redefinition is allowed.
>
> As it is in new parser  xxx is either an opcode or a function but not
> both.  This is a major incompatability.
>
> One could possibly redefine the whole function/opcode parsing, but not
> sure how at present.
>
> ANyone any thoughts?
>
> At presne the CVS is for new parser only -- changes on Engine/entry.c
>
>
> ------------------------------------------------------------------------------
> Increase Visibility of Your 3D Game App & Earn a Chance To Win $500!
> Tap into the largest installed PC base & get more eyes on your game by
> optimizing for Intel(R) Graphics Technology. Get started today with  
> the
> Intel(R) Software Partner Program. Five $500 cash prizes are up for  
> grabs.
> http://p.sf.net/sfu/intelisp-dev2dev
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel


------------------------------------------------------------------------------
Increase Visibility of Your 3D Game App & Earn a Chance To Win $500!
Tap into the largest installed PC base & get more eyes on your game by
optimizing for Intel(R) Graphics Technology. Get started today with the
Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
http://p.sf.net/sfu/intelisp-dev2dev
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2010-11-28 18:51
Frommenno
SubjectRe: [Cs-dev] another one for the new parser
another one bites the dust!
This is cpsmidinn.csd:



; Select audio/midi flags here according to platform
;;;RT audio out, midi in, note=p4 and velocity=p5
-odac -+rtmidi=virtual -M0d --midi-key=4 --midi-velocity-amp=5
;-iadc    ;;;uncomment -iadc if RT audio input is needed too
; For Non-realtime ouput leave only the line below:
; -o cpsmidinn.wav -W ;;; for file output any platform



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

massign 0, 1	;assign all midi to instr. 1

instr 1	;play virtual keyboard

inote = p4
icps  = cpsmidinn(inote)
asig	oscil 0.6, icps, 1
	print icps
	outs  asig, asig

endin



f0 20
;sine wave.
f 1 0 16384 10 1
;play note from score too
i1 0 1 60
e



This is the answer of the new parser:

********************
* USING NEW PARSER *
********************
csound_orcerror: syntax error, unexpected T_IDENT
Parsing failed due to invalid input!

Is this the way to go on? Maybe i continue my list in the bug tracker?

bye,
menno

-- 
View this message in context: http://csound.1045644.n5.nabble.com/another-one-for-the-new-parser-tp3283340p3283573.html
Sent from the Csound - Dev mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Increase Visibility of Your 3D Game App & Earn a Chance To Win $500!
Tap into the largest installed PC base & get more eyes on your game by
optimizing for Intel(R) Graphics Technology. Get started today with the
Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
http://p.sf.net/sfu/intelisp-dev2dev
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2010-11-29 05:12
FromSteven Yi
SubjectRe: [Cs-dev] another one for the new parser
I think it'd be great to just be able to use opcodes as functions.
For some reason I thought there were functions in csound that could
only be called as functions but not as opcodes, and that the old
parser did limit what could be called as a function.  It's been a
while though since I looked at it and so I'd be happy to be wrong.

As for parsing, it seems like it'll be a little tricky. We have the
T_OPCODE0 to classify opcodes with zero output args.  Maybe we could
classify T_OPCODE1 for single arg output opcodes and use that instead
of "function" within expr parsing.  That may get us close to previous
parser behavior, but may also allow multiple-args to functions.  We'd
have to modify csound_orc_expression.c a bit.

To handle what Victor was mentioning with multiple args outputting, it
could be tricky.  We would have to basically compile expressions to do
all the rewriting into a flat opcode list, inserting the synthetic
outputs of the opcodes-as-functions into the arg list of the outer
expression that holds the opcode-as-function.  So something like:

aout = sum(someCustomOpcodeWithTwoOutputs(), asig)

would become:

#a1, #a2 someCustomOpcodeWithTwoOutputs
#a3 sum #a1, #a2, asig
aout assign #a3

(something like that, with the #a vars as synthetic vars generated by
the parser/compiler)

The trick is I'm not sure at what point in the parsing we would do
validation.  Do you think it'd be possible to validate as we went
along during the initial parse?  Otherwise, reporting errors would be
very tricky.  I guess also then we could get into trouble with opcodes
that have multiple output types.



On Sun, Nov 28, 2010 at 12:21 PM,   wrote:
>> Fixed in CVS
>>
>>>
>>> And another one, using an example of the connect opcode:
>
> There is  problem that I do not know how to fix easily.  The new parser
> required that (for example) cent not be declared as an opcode as opcodes
> and functuons are different.  The old parser does not ghave functions as a
> type ans any opcode of one arg giving a result can be used as a function.
>
> So, the lines in entry.c differ and we have a problem.
>
> I could remove the checking i suppose so type redefinition is allowed.
>
> As it is in new parser  xxx is either an opcode or a function but not
> both.  This is a major incompatability.
>
> One could possibly redefine the whole function/opcode parsing, but not
> sure how at present.
>
> ANyone any thoughts?
>
> At presne the CVS is for new parser only -- changes on Engine/entry.c
>
>
> ------------------------------------------------------------------------------
> Increase Visibility of Your 3D Game App & Earn a Chance To Win $500!
> Tap into the largest installed PC base & get more eyes on your game by
> optimizing for Intel(R) Graphics Technology. Get started today with the
> Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
> http://p.sf.net/sfu/intelisp-dev2dev
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel
>

------------------------------------------------------------------------------
Increase Visibility of Your 3D Game App & Earn a Chance To Win $500!
Tap into the largest installed PC base & get more eyes on your game by
optimizing for Intel(R) Graphics Technology. Get started today with the
Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
http://p.sf.net/sfu/intelisp-dev2dev
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net