else that a JDK supporting Swing are available).
I used javacc as the compiler-compiler, and found it pretty decent
for the
task at hand. I implemented most of abc 1.6, then spent some
time
building a UI in Swing.
Take a look - you can find it at
http://www.geocities.com/w_macaulay/abc4mac.html
Ronan KERYELL wrote:
I am thinking to few applications, generalizing the abc2abc concept, that
could benefit of a plugin mecanism in an abc engine.This abc engine would ease the realization of such new tools by
factorizing the parser, pretty-printer, abstract representation API,
iterators,... That is what is used in the source to source compilers for
exemple (for example http://cri.ensmp.fr/~pips/ I used to work on).Some examples of tools with a plugin concept :
- you want a new transposer. Just write an iterator on the notes and
transpose ;
- you want a new harmonizer : iterate on each notes, generate a new voice
V: or add chords according to contextual notes and chords ;
- you want to change the measure : just iterate on each note, change the
length. Adjust also the bar placement ;
- automatic bar placement or correction :
- "P:" unrolling : iterate on all the "P:" parts and unroll according to
"P:" instructions. |: :| unrolling could be a variant ;
- you want to concatenate many "X:" tunes in only one to have a big tune :
just iterate on each "X:" and concatenate the voices "V:" ;
- you want to select a voice, a tune, remove chords : trivial ;
- you want a pretty-printer : well, just do nothing :-)
...Some of the applications above could be less than 10 lines of programmation.
The language I think first to implement this is Java. A new plugins would
be a new class that would be found in an ABC_CLASSPATH or on a plugin
Internet repository (hum... Use the class loader security model to reduce
a new class of ABC viruses... :-) ) and loaded in the abc engine.The abtract representation could be easily be exported or imported to DOM
to have an XML portal to other tools.Has anybody already a Java abc parser ?
I guess that a C parser with tools such as JFlex and JCup or B/YACC could
help...But this kind of tools could also be added to the current abc2abc in a
static way...Any candidate ? :-)
--
Ronan KERYELL |\/
Labo Informatique Télécom |/) Tel: (+33|0) 2.29.00.14.15
ENST Bretagne, BP832 K Fax: (+33|0) 2.29.00.12.82
29285 BREST CEDEX |\ E-mail: [EMAIL PROTECTED]
FRANCE | \ http://www-info.enst-bretagne.fr/~keryell
To subscribe/unsubscribe, point your browser to: http://www.tullochgorm.com/lists.html
-- Wil Macaulay email: [EMAIL PROTECTED] voice: +1-(905)-886-7818 xt2253 FAX: +1-(905)-886-7824 Syndesis Ltd. 28 Fulton Way Richmond Hill, Ont Canada L4B 1J5 "... pay no attention to the man behind the curtain ..."
