Actually, the function that does the actual typesetting differed between ottava brackets and text spanners, but you can easily override that too by setting the stencil property. As far as I can see, the following should give exactly the same layout as an octava bracket:
\override TextSpanner #'stencil = #ly:ottava-bracket::print \override TextSpanner #'shorten-pair = #'(0.0 . -0.6) \override TextSpanner #'staff-padding = #1.0 \override TextSpanner #'padding = #0.5 \override TextSpanner #'minimum-length = #1.0 \override TextSpanner #'dash-fraction = #0.3 \override TextSpanner #'text = #"8va" \override TextSpanner #'edge-height = #'(0 . 1.2) \override TextSpanner #'dash-period = #1.0 Do you specify the note pitches using absolute octaves or using the \relative feature? In the former case, isn't it easier to solve your problem by just adding an \transpose c c'{ ... } around the octaviated section? /Mats Kirill wrote:
Forgot to mention why I need this at all. I'm writing a plug-in for Sibelius to export scores in LilyPond format. It runs a two-pass procedure (I'm giving a simplified picture): Pass 1: Read through all notes/rests in the score or a selected pasage and generate the corresponding .ly text for the notes/rests/chords (articulations, dynamic marks etc. are also processed at this pass -- everything you can put on a note). Also, all "lines" (in Sibelius terminology; this includes hairpins, slurs etc.) are scanned and remembered for pass 2. The appropriate text for "start of the line" is appended to a .ly note/rest/chord at this point. Pass 2: Is needed to correctly terminate a "line". In Sibelius, lines are not attached to notes. They are merely objects in a bar which have a start position and a duration. If the start position of a line equals a start position of a note/rest/chord -- it means the line starts on that note/rest/chord (and I handle this in Pass 1). The end of the line in Sibelius is not necessarily attached to a note, that is why in Pass 2 I scan through all the lines and find a note on which this line should terminate (because in LilyPond it should start and end on a note, right?). So I handle many spanning objects this way (quite uniformly and extensibly). Now suddenly I realised that the ottava line should be handled differently. If I merely use (#set-octavation ...) for the start and end of the line, I will also need to transpose the notes (as Sibelius reports the pitches of the notes as they are written, i.e. not taking ottava into account) -- but in Pass 1 I have already converted the notes into text!!! I don't want another pass just for the octavation. So I would have to redesign my plug-in slightly to handle octavation properly! At present, I thought, an emulation of ottava-line might work. Hence my question. _______________________________________________ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
-- ============================================= Mats Bengtsson Signal Processing Signals, Sensors and Systems Royal Institute of Technology SE-100 44 STOCKHOLM Sweden Phone: (+46) 8 790 8463 Fax: (+46) 8 790 7260 Email: [EMAIL PROTECTED] WWW: http://www.s3.kth.se/~mabe ============================================= _______________________________________________ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user