Dear fellow typesetters. Occasionally I give "competitors" to the excellent MusiXTeX typesetting tools a try. This time I've been playing with "Abc" the notational syntax of which was, as far as I understand, among the ideas behind Dirk Laurie's M-Tx. The "Abc" homepage, http://staffweb.cms.gre.ac.uk/~c.walshaw/abc/ lists quite a few "Abc" implementations and related utilities. Among them is the "ABC Plus Project", http://abcplus.sourceforge.net/, which comprises ao. a preprocessor, "abcpp" primarily dedicated to Abc typesetting sources. This afternoon I've typeset one of Michael Praetorius's setting of the X-mas Hymn "Puer natus in Bethlehem / Ein Kinf geborn zu Bethelehem" and uploaded score and source file to the Icking Archive. The Abc typesetting source is based on being preprocessed with abcpp before generating postscript- and MIDI output with abcm2ps and abc2midi. The curious among you might have a look:-) All needed software can be downloaded as binary- and source distributions from the "ABC Plus" site where you'll also find comprehensive documentation. The preprocessor "abcpp" is of special interest to MusiXTeX typesetters, because its macro- and conditional output directives of preprocessor can be used with any text file, including for example PMX- and M-Tx source files. An obvious use would be differing code for sheet music and MIDI. Take as an example the below excerpts from my M-Tx typesetting of a madrigal, "Movi il tuo plettro Apollo" by Marcello Tosone (http://icking-music-archive.org/ByComposer/Tosone.html). For this description of abcpp facilities please imagine in abcpp input file "movi.mtp" ... %% h260m %% Abr B #ifndef MIDI % -1 \Sn\MyNq\ d8+ zd- || \Sn\MyNq\ a8 zg- || \Sn\MyNq\ f8 zd- || \Sn\MyNq\ X-1 b8 zg- // \Sn\MyPNq{1.85}{1}\ X2.5S fs8-- || #endif % 1 #ifdef MIDI %% Ig10t200i54:54:54:54:T-0-12-0-0 #endif m4/4/0/0 rp | m4/4/0/0 rp | m4/4/0/0 @+1 d2+ c4 a | L: Mo-v'il tuo m4/4/0/0 @-6 d2+ e4 fs | L: Mo-v'il tuo ... The musixtex macros \Sn, \MyNq and \MyPNq are defined in an \input file referenced at the top of the M-Tx source file. The directive "#ifndef MIDI" causes abcpp to skip the lines between "#ifndef MIDI" and "#endif" if abcpp is launched with the command line abcpp -MIDI movi.mtp movi.mtx This line causes a macro "MIDI" to become the status "defined" at abcpp runtime (you could use any macro name, say DONALD_DUCK). The meaning of "#ifndef MIDI" is "if the macro MIDI has not been defined". Hence the lines enclosed within "#ifndef MIDI" and "#endif" will be skipped when abcpp outputs the file movi.mtx. Contrarily the lines enclosed within "#ifdef MIDI" and "#endif" will only be output to movi.mtx if ancpp is launched with the above command line. "#ifdef MIDI" means "if the macro MIDI has been defined" Somewhere in the middle of the madrigal I've typeset some auxiliary notes which I definitely don't want to have reflected in the MIDI output. This could be accomplished by saying ... % 14 %%\\\def\MyNote{\loffset{1}{\zcharnote{-17}{\eightrm *) Small notes: recorders}}}\ % d2 b8 a (t g4 | L: de, che gi{\`a} fu a2 g | L: ver-de, U: @-2 ~~*) #ifndef MIDI au2+ du4- d8+ c // \Sn\ X.75S fu2s+0-1 \Nn\ r2b | #else au2+ du4- d8+ c | #endif L: lau-ro che gi{\`a} U: @-2 ~~*) #ifndef MIDI \MyNote\ fs2u [u g8 a b c ] // \Sn\ X-.25S d2u+ \Nn\ r2b | #else fs2 g8 a b c | #endif L: ver-de ... Besides conditional output abcpp also support macro definition directives, for example #ifdef MIDI #define METER "m4/4/0/6" #define START_OCTAVES "4 3 4 2" #else #define METER "m1/8/0/6" #define START_OCTAVES "4 4 5 3" #endif that sets up initial meter and octaves depending on output type. For the MIDI output I want to skip the leading "pseudo bar", the function of which is only to display voice ranges. I have added a complete abcpp source file, movi.mtp to the source typesetting distribution (http://icking-music-archive.org/scores/tosone/movi.zip) accompanying my madrigal score. Best regards -- Christian Mondrup, Sheet Note Editor Werner Icking Music Archive http://icking-music-archive.org/ _______________________________________________ TeX-music mailing list TeX-music@icking-music-archive.org http://icking-music-archive.org/mailman/listinfo/tex-music