>> What language is Music Publisher 5 written in? What OS? << Delphi. Windows 32.
>>I ask because I'd like to make the output format convenient for everyone who wants >>to read ABC. Besides, I think we are talking about slightly different things. Here's my vision for the parser: Depending on the OS and language, there will probably be a different structure for how this fits together. 1) If the language is C or C++, you can just compile and link the parser into your program. You would use it by calling the parsing function with an ASCII string containing ABC, and it would return "something" that would be easy to iterate through. 2) If your linker can link in a C module with your program, you would link and use it as above. Some kind soul might write some "access functions" to make it more convenient to use in your language. 3) If you can't link the module in, but are running on Windows, there would be a stand alone parser program that you can access with COM. you would use it the same as above, once you connect to it. 4) If none of the above applies, then perhaps some kind soul can write the "glue" to make it work. << Option 2 is fine for Delphi. C DLLs can be accessed easily. (However it rather breaks the DLL-less style which I use!) >>Now, the parser function itself would not load or save files. It is purely a memory >>based function. It would be up to the client to do something with the output. Here are some possible clients: 1) Conversion Program: read an ABC file from disk, run it though the parser, iterate through the parser's output to write a different format to a new file. 2) Notational Program: read an ABC file from disk, run it though the parser, iterate though the parser's output to create sheet music. 3) Player Program: read an ABC file from disk, run it though the parser, iterate though the parser's output to create a MIDI file. 4) Analyzer Program: read an ABC file from disk, run it though the parser, iterate though the parser's output to collect whatever statistics are of interest. A simple example is just getting the title for a table of contents. A more complex example is to look for simularities between tunes. A transposing program is another example. It is also possible to create more than one type of output if a single structure is not adaquate. For instance, MusicXML files are either score-wise or part-wise. That is probably a good thing to emulate. We can also create different output for different languages if that turns out to be easier. For C++, the output most naturally would be some kind of STL container, for Pascal and C a structure might be best, perhaps an INI-file-like format would be easier for you. << All that is possible but, I repeat, not as flexible as ascii for both debugging and expansion. FWIW I already use a module along the lines of the abc parser except it is an engine for OCR. It takes a bitmap file and a standard Windows (short) .ini file containing the options and provides a structured ascii file. It is called as a background program and sends messages back to a windows handle provided in the .ini file. Debugging and expansion are handled very easily, as is of course the parsing since this is very easy to write. (for information it's www.visiv.co.uk and the author provides documentation for the ascii file structure on the web site). Bernard Hill Braeburn Softwar To subscribe/unsubscribe, point your browser to: http://www.tullochgorm.com/lists.html