slyhelp.txt (c)2004 David Raleigh Arnold under GNU, etc.. Possible usages: C:\> python sly.py filename or, if sly or sly.py is made executable by: $ chmod +x sly.py and is in your path, then: $ sly.py filename or, renamed: $ sly filename Filename has the .sly extension. The .sly extension may be omitted from the command line. Because of the likelihood of using the same file names in different directories, .sly and .ly notes files are in the current directory. (For all lilypond projects it is good to have a separate subdirectory for each project, not just for types of projects, whether they be solos or books. To run sly, lilypond, and your viewer, and to back up your work, write bash scripts or batfiles right in your working directory, and don't use names already in your path. I'm sure the same ends can be served by clicking on things.) Sly splits filename.sly into separate files with target names and dumps a new edited version. The first two characters in the file are your field separator. The first character may be a space, but the second may not. The first search specification, if any, follows an `=' equals sign. The others do not need the sign. e.g.: !! searchspec = brass !! or merely: !!=brass!! The header is ended by repeating the first search specification: brass!! The rest of the header is the target filenames for the parts: !!=brass!!tptI.ly!!tptII.ly!!tb.ly With spaces, you can set a minimum width for each field of the new sly file, except for the last on the line, of course. It will have no effect on your target files: !!=brass!! tptI.ly !! tpt2.ly !! tb.ly No comments or notes can be in the header. You may have as many more searchspecs as you like, but no new ones after the header: vocs!! sopr.ly !! ten.ly !! alto.ly perc!! kettle.ly !! tom.ly !! trng.ly You don't need to have more than one part for a searchspec-line, and sly doesn't know anything about measures: glob!! global.ly ... ... glob!! s1 | s1 | s1 | s1 \bar "|." \break If you want a one line header, you still have to end it, even with a null search spec. To convert from the old sly format, substitute "!!" for " |" if you like and add the header: !!=!! target.ly !! glob.ly !! kazoo.ly !! a b c !! global stuff !! kazoo notes a b c !! more global stuff !! more kazoo a b c !! more global stuff !! more kazoo a b c !! more global stuff !! more kazoo a b c !! more global stuff !! more kazoo You can use any convenient field separator. I chose !! because it's easy to see in my editor. Lilypond will never see it: :: ;; @@ @! !! #$ ;! XX #$ etc. I would not encourage whitespace as the first character. \#\# won't work. Sly checks your notes section but not your header to make sure that your file is formatted according to the header. It ensures that each searchspec-line has the same number of fields as in the header. You may have some parts double lined by repeating lines in the header: !!=parti !! gub.ly !! blg.ly partii !! part2.ly partii !! part2.ly parti !!..... If you omit a searchspec, the searchspec of the previous line is used by sly. Format example: !!=gub !! tpt.ly !! fl.ly !! vln.ly gp !! mand.ly !! flg.ly !! harp.ly !! bell.ly opt !! gtr.ly !! lyrics.ly !! bass.ly glob!! global.ly gub!! 1st meas tpt !! fl notes !! vln notes %header ends with gub(ss). 2nd meas tpt !! more fl notes !! vln notes %%line like preceding gp!! ist meas mand !! flg notes !! harp notes !! bong opt !! etc !! etc !! etc glob!! \time 3/4 \key d \major gub!! 1st meas tpt !! fl notes !! vln notes gp!! ist meas mand !! flg notes !! harp notes !! bing opt !! etc !! etc !! etc etc The example creates eleven parts files. Here is a sample sly.cfg. There are two passes by sed. This does work, but the filters are not reorganized yet and the WIP phase does not yet produce a new sly file. # sly.cfg--lists of sed edit files for sly. This # file resides in the current working directory. # The .sed extension is just so you can figure out # what kind of files they are. Any name will work. # Sly does not require this file to run, only to # do sed edits. # The padding of the fields in the new sly file is # done by sly itself after the WIP seds have run. Path: # must have /home/dra/bin/seds # Wherever you put your seds. WIP: # must have preI.sed # facilitates editing endI.sed # undoes preI, leaves some artifacts. Finish: # must have preII.sed # facilitates editing endII.sed # removes all artifacts, one hopes