Csound Csound-dev Csound-tekno Search About

[Cs-dev] new parser error

Date2011-01-28 14:56
Frommenno
Subject[Cs-dev] new parser error
Hello,

i came across "fout_ftable.csd" from the manual. It works without problems
with the old parser but with the new one i stays in a loop and never
finishes:

time resolution is 1000.000 ns
PortAudio real-time audio module for Csound
virtual_keyboard real time MIDI plugin for Csound
PortMIDI real time MIDI plugin for Csound
0dBFS level = 32768.0
Csound version 5.13 beta (double samples) Jan 23 2011
libsndfile-1.0.21
UnifiedCSD:  /home/menno/CVS/manual/manual/examples/fout_ftable.csd
STARTING FILE
Creating options
Creating orchestra
Creating score
orchname:  /tmp/csound-SfUhaH.orc
scorename: /tmp/csound-IXQtUd.sco
Loading command-line libraries:
  /usr/local/lib/libloris.so
rtmidi: PortMIDI module enabled
RAWWAVE_PATH: /usr/local/share/csound/rawwaves/
rtaudio: JACK module enabled
********************
* USING NEW PARSER *
********************
END OF INPUT
END OF INPUT
END OF INPUT
END OF INPUT
END OF INPUT
END OF INPUT
END OF INPUT
END OF INPUT
END OF INPUT
END OF INPUT
END OF INPUT
..............
................

here is the csd:



; Select audio/midi flags here according to platform
; Audio out   Audio in    No messages
-odac           -iadc     -d     ;;;RT audio I/O
; For Non-realtime ouput leave only the line below:
; -o fout_ftable.wav -W ;;; for file output any platform


; By: Jonathan Murphy 2007

  gilen		=		131072
  gicps		=		sr/gilen
  gitab		ftgen		1, 0, gilen, 10, 1

                instr 1

  /******** write file to table ********/

  ain		diskin2		"beats.wav", 1, 0, 1
  aphs		phasor		gicps
  andx		=		aphs * gilen
		tablew		ain, andx, gitab

  /******** write table to file ********/

  aosc		table		aphs, gitab, 1
		out		aosc
		fout		"beats_copy.wav", 6, aosc

                endin



i1 0 2
e



greetings
menno

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

------------------------------------------------------------------------------
Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
Finally, a world-class log management solution at an even better price-free!
Download using promo code Free_Logger_4_Dev2Dev. Offer expires 
February 28th, so secure your free ArcSight Logger TODAY! 
http://p.sf.net/sfu/arcsight-sfd2d
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2011-10-26 16:32
Fromjohn ffitch
SubjectRe: [Cs-dev] new parser error
This bug is now fixed -- my fault entirely
==John ffitch
>>>>> "menno" == menno   writes:

 menno> Hello,

 menno> i came across "fout_ftable.csd" from the manual. It works without problems
 menno> with the old parser but with the new one i stays in a loop and never
 menno> finishes:

 menno> time resolution is 1000.000 ns
 menno> PortAudio real-time audio module for Csound
 menno> virtual_keyboard real time MIDI plugin for Csound
 menno> PortMIDI real time MIDI plugin for Csound
 menno> 0dBFS level = 32768.0
 menno> Csound version 5.13 beta (double samples) Jan 23 2011
 menno> libsndfile-1.0.21
 menno> UnifiedCSD:  /home/menno/CVS/manual/manual/examples/fout_ftable.csd
 menno> STARTING FILE
 menno> Creating options
 menno> Creating orchestra
 menno> Creating score
 menno> orchname:  /tmp/csound-SfUhaH.orc
 menno> scorename: /tmp/csound-IXQtUd.sco
 menno> Loading command-line libraries:
 menno>   /usr/local/lib/libloris.so
 menno> rtmidi: PortMIDI module enabled
 menno> RAWWAVE_PATH: /usr/local/share/csound/rawwaves/
 menno> rtaudio: JACK module enabled
 menno> ********************
 menno> * USING NEW PARSER *
 menno> ********************
 menno> END OF INPUT
 menno> END OF INPUT
 menno> END OF INPUT
 menno> END OF INPUT
 menno> END OF INPUT
 menno> END OF INPUT
 menno> END OF INPUT
 menno> END OF INPUT
 menno> END OF INPUT
 menno> END OF INPUT
 menno> END OF INPUT
 menno> ..............
 menno> ................

 menno> here is the csd:

 menno> 
 menno> 
 menno> ; Select audio/midi flags here according to platform
 menno> ; Audio out   Audio in    No messages
 menno> -odac           -iadc     -d     ;;;RT audio I/O
 menno> ; For Non-realtime ouput leave only the line below:
 menno> ; -o fout_ftable.wav -W ;;; for file output any platform
 menno> 
 menno> 
 menno> ; By: Jonathan Murphy 2007

 menno>   gilen		=		131072
 menno>   gicps		=		sr/gilen
 menno>   gitab		ftgen		1, 0, gilen, 10, 1

 menno>                 instr 1

 menno>   /******** write file to table ********/

 menno>   ain		diskin2		"beats.wav", 1, 0, 1
 menno>   aphs		phasor		gicps
 menno>   andx		=		aphs * gilen
 menno> 		tablew		ain, andx, gitab

 menno>   /******** write table to file ********/

 menno>   aosc		table		aphs, gitab, 1
 menno> 		out		aosc
 menno> 		fout		"beats_copy.wav", 6, aosc

 menno>                 endin

 menno> 
 menno> 
 menno> i1 0 2
 menno> e
 menno> 
 menno> 

 menno> greetings
 menno> menno

------------------------------------------------------------------------------
The demand for IT networking professionals continues to grow, and the
demand for specialized networking skills is growing even more rapidly.
Take a complimentary Learning@Cisco Self-Assessment and learn 
about Cisco certifications, training, and career opportunities. 
http://p.sf.net/sfu/cisco-dev2dev
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2011-10-26 17:16
FromVictor Lazzarini
SubjectRe: [Cs-dev] new parser error
Is it possible with the new parser to distinguiish between variable  
and opcode names?
e.g.

fin pvsanal ...

vs.

fin


On 26 Oct 2011, at 16:32, john ffitch wrote:

> This bug is now fixed -- my fault entirely
> ==John ffitch
>>>>>> "menno" == menno   writes:
>
> menno> Hello,
>
> menno> i came across "fout_ftable.csd" from the manual. It works  
> without problems
> menno> with the old parser but with the new one i stays in a loop  
> and never
> menno> finishes:
>
> menno> time resolution is 1000.000 ns
> menno> PortAudio real-time audio module for Csound
> menno> virtual_keyboard real time MIDI plugin for Csound
> menno> PortMIDI real time MIDI plugin for Csound
> menno> 0dBFS level = 32768.0
> menno> Csound version 5.13 beta (double samples) Jan 23 2011
> menno> libsndfile-1.0.21
> menno> UnifiedCSD:  /home/menno/CVS/manual/manual/examples/ 
> fout_ftable.csd
> menno> STARTING FILE
> menno> Creating options
> menno> Creating orchestra
> menno> Creating score
> menno> orchname:  /tmp/csound-SfUhaH.orc
> menno> scorename: /tmp/csound-IXQtUd.sco
> menno> Loading command-line libraries:
> menno>   /usr/local/lib/libloris.so
> menno> rtmidi: PortMIDI module enabled
> menno> RAWWAVE_PATH: /usr/local/share/csound/rawwaves/
> menno> rtaudio: JACK module enabled
> menno> ********************
> menno> * USING NEW PARSER *
> menno> ********************
> menno> END OF INPUT
> menno> END OF INPUT
> menno> END OF INPUT
> menno> END OF INPUT
> menno> END OF INPUT
> menno> END OF INPUT
> menno> END OF INPUT
> menno> END OF INPUT
> menno> END OF INPUT
> menno> END OF INPUT
> menno> END OF INPUT
> menno> ..............
> menno> ................
>
> menno> here is the csd:
>
> menno> 
> menno> 
> menno> ; Select audio/midi flags here according to platform
> menno> ; Audio out   Audio in    No messages
> menno> -odac           -iadc     -d     ;;;RT audio I/O
> menno> ; For Non-realtime ouput leave only the line below:
> menno> ; -o fout_ftable.wav -W ;;; for file output any platform
> menno> 
> menno> 
> menno> ; By: Jonathan Murphy 2007
>
> menno>   gilen		=		131072
> menno>   gicps		=		sr/gilen
> menno>   gitab		ftgen		1, 0, gilen, 10, 1
>
> menno>                 instr 1
>
> menno>   /******** write file to table ********/
>
> menno>   ain		diskin2		"beats.wav", 1, 0, 1
> menno>   aphs		phasor		gicps
> menno>   andx		=		aphs * gilen
> menno> 		tablew		ain, andx, gitab
>
> menno>   /******** write table to file ********/
>
> menno>   aosc		table		aphs, gitab, 1
> menno> 		out		aosc
> menno> 		fout		"beats_copy.wav", 6, aosc
>
> menno>                 endin
>
> menno> 
> menno> 
> menno> i1 0 2
> menno> e
> menno> 
> menno> 
>
> menno> greetings
> menno> menno
>
> ------------------------------------------------------------------------------
> The demand for IT networking professionals continues to grow, and the
> demand for specialized networking skills is growing even more rapidly.
> Take a complimentary Learning@Cisco Self-Assessment and learn
> about Cisco certifications, training, and career opportunities.
> http://p.sf.net/sfu/cisco-dev2dev
> _______________________________________________
> 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




------------------------------------------------------------------------------
The demand for IT networking professionals continues to grow, and the
demand for specialized networking skills is growing even more rapidly.
Take a complimentary Learning@Cisco Self-Assessment and learn 
about Cisco certifications, training, and career opportunities. 
http://p.sf.net/sfu/cisco-dev2dev
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2011-10-26 17:22
Fromjpff@cs.bath.ac.uk
SubjectRe: [Cs-dev] new parser error
More detail needed here.  Can you provide examples?

> Is it possible with the new parser to distinguiish between variable
> and opcode names?
> e.g.
>
> fin pvsanal ...
>
> vs.
>
> fin
>
>



------------------------------------------------------------------------------
The demand for IT networking professionals continues to grow, and the
demand for specialized networking skills is growing even more rapidly.
Take a complimentary Learning@Cisco Self-Assessment and learn 
about Cisco certifications, training, and career opportunities. 
http://p.sf.net/sfu/cisco-dev2dev
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2011-10-26 17:30
FromVictor Lazzarini
SubjectRe: [Cs-dev] new parser error
AttachmentsNone  None  

With the old parser, we could not use variable names that were the same as existing opcodes, eg. fin, fout, adsr, ihold. These would give parsing errors.

instr 1

ihold = 1

endin

===

 instr 1
error: illegal character =, line 8:
ihold = 1
^
error: too many input args, line 8:
ihold = 1

Victor


On 26 Oct 2011, at 17:22, jpff@cs.bath.ac.uk wrote:

More detail needed here.  Can you provide examples?

Is it possible with the new parser to distinguiish between variable
and opcode names?
e.g.

fin pvsanal ...

vs.

fin





------------------------------------------------------------------------------
The demand for IT networking professionals continues to grow, and the
demand for specialized networking skills is growing even more rapidly.
Take a complimentary Learning@Cisco Self-Assessment and learn
about Cisco certifications, training, and career opportunities.
http://p.sf.net/sfu/cisco-dev2dev
_______________________________________________
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




Date2011-10-28 14:39
Fromjohn ffitch
SubjectRe: [Cs-dev] new parser error
suppose we have two words, both possible opcodes.  Word A takes one
arg, word B has no args but 1 answer.
   What does
                A  B
mean?

==John ffitch

------------------------------------------------------------------------------
The demand for IT networking professionals continues to grow, and the
demand for specialized networking skills is growing even more rapidly.
Take a complimentary Learning@Cisco Self-Assessment and learn 
about Cisco certifications, training, and career opportunities. 
http://p.sf.net/sfu/cisco-dev2dev
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2011-10-28 16:23
FromSteven Yi
SubjectRe: [Cs-dev] new parser error
Well I think what will happen is that the parsing will fail as it will
have entered into a context where it is searching for the arg to A but
finds B. If B is an opcode name, that always takes precedence over
variable names, so that line will fail.

With the parser, the table of opcode names is always consulted first
when a text string is found, then if not found, it goes to look for a
variable with that name. So it would not be possible to have a
variable with the same name as an opcode.

On Fri, Oct 28, 2011 at 2:39 PM, john ffitch  wrote:
> suppose we have two words, both possible opcodes.  Word A takes one
> arg, word B has no args but 1 answer.
>   What does
>                A  B
> mean?
>
> ==John ffitch
>
> ------------------------------------------------------------------------------
> The demand for IT networking professionals continues to grow, and the
> demand for specialized networking skills is growing even more rapidly.
> Take a complimentary Learning@Cisco Self-Assessment and learn
> about Cisco certifications, training, and career opportunities.
> http://p.sf.net/sfu/cisco-dev2dev
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel
>

------------------------------------------------------------------------------
The demand for IT networking professionals continues to grow, and the
demand for specialized networking skills is growing even more rapidly.
Take a complimentary Learning@Cisco Self-Assessment and learn 
about Cisco certifications, training, and career opportunities. 
http://p.sf.net/sfu/cisco-dev2dev
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net