From: fred Date: Sat, 2 Nov 1996 14:48:48 +0000 (+0000) Subject: lilypond-0.0.6 X-Git-Tag: release/1.5.59~6947 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=e8d0ba9544d29fb538591fddfe3c9d556aab89e1;p=lilypond.git lilypond-0.0.6 --- diff --git a/lilyponddefs.tex b/lilyponddefs.tex index 9b18faf880..24dd617150 100644 --- a/lilyponddefs.tex +++ b/lilyponddefs.tex @@ -1,41 +1,53 @@ +%% +%% include file for LilyPond +\def\mdef#1#2{\def#1{{\musicfnt\char#2}}} + +%% musix defs + \parindent=0pt + \newdimen\interlinedist + \newcount\n + \newdimen\balkhoog + \newdimen\staffrulethickness + \newdimen\interstaffrule + \def\musixtwentydefs{ \font\musicfnt=musix20 - -% \hulplijnbreedte5pt - %\hlijnhoogte1pt - %\balkskip4pt + \interlinedist=5pt + \balkhoog=20pt + \staffrulethickness=0.4pt + \interstaffrule=\balkhoog + \advance\interstaffrule by-\staffrulethickness + \divide\interstaffrule by 4 + \advance\interstaffrule by -\staffrulethickness } + \def\interstaffline{ \vskip 20pt% } \musixtwentydefs -\def\mdef#1#2{\def#1{{\musicfnt\char#2}}} + \mdef\quartball{'007} \mdef\halfball{'010} \mdef\wholeball{'011} -\mdef\wholerest{'075} \mdef\halfrest{'074} -\mdef\quartrest{'076} -\mdef\eighthrest{'077} -\mdef\sixteenthrest{'078} -\mdef\thirtysecondrest{'079} +\mdef\wholerest{'075} +\mdef\quartrest{62} +\mdef\eighthrest{63} +\mdef\sixteenthrest{64} +\mdef\thirtysecondrest{65} \mdef\sharp{'065} \mdef\flat{'063} \mdef\natural{'067} \mdef\singledot{'00} \mdef\doubledot{'01} \mdef\tripledot{'02} +\mdef\mussepline{155} +\def\maatstreep{\vrule height\balkhoog} +\def\finishbar{\vrule height\balkhoog width 1pt} +\def\generalmeter#1#2{\vbox to 0pt{\vss\rm\hbox{#1}\hbox{#2}}} - -\def\maatstreep{\vrule height8pt depth8pt } -\def\finishbar{\vrule height8pt width 1pt depth8pt} -\parindent0pt - -\def\generalmeter#1#2{\vbox to 0pt{\vss\rm\hbox{#1}\hbox{#2}\vss}} - -\mdef\mussepline{155} \def\lineseparator{\vbox{\mussepline\vskip -5pt\mussepline}} \def\interscoreline{ \par\vskip 10pt\par @@ -43,10 +55,18 @@ \vskip 10pt } -\newcount\n -\def\linestafsym#1#2{\hbox to 0pt{\vbox to 0pt{\n=0% +% +% a staffsymbol with #1 lines, width #2 +% bottom at baseline +\def\linestafsym#1#2{\hbox to 0pt% + {\vbox to 0pt{\vss% + \vskip-\interlinedist + \n=0% \loop\ifnum\n<#1\advance\n by1% - \ifnum\n>1\vskip2pt\fi \hrule width#2\repeat\vss}\hss}} + \vskip\interstaffrule \hrule height \staffrulethickness width#2 + \repeat + }% +\hss}} \def\vcenter#1{\vbox to 0pt{\vss #1\vss}} @@ -57,4 +77,6 @@ \def\lsingledot{\kern-6pt\singledot} \def\ldoubledot{\kern-6pt\doubledot} -\def\ltripledot{\kern-6pt\tripledot} \ No newline at end of file +\def\ltripledot{\kern-6pt\tripledot} + + diff --git a/simplestaff.cc b/simplestaff.cc new file mode 100644 index 0000000000..763a9ed393 --- /dev/null +++ b/simplestaff.cc @@ -0,0 +1,86 @@ +#include "request.hh" +#include "debug.hh" +#include "staff.hh" +#include "command.hh" +#include "simplestaff.hh" +#include "sccol.hh" + + + + +Simple_column::Simple_column(Score_column*s, Simple_staff *rs) + : Staff_column(s) +{ + the_note = 0; + staff_ = rs; +} + +Simple_staff::Simple_staff() +{ + theline = 0; +} + +// should integrate handling of BREAK commands into Staff_column +void +Simple_column::process_commands( ) +{ + int breakstat = BREAK_END - BREAK_PRE; + for (int i = 0 ; i < s_commands.sz(); i++) { + Command *com = s_commands[i]; + switch (com->code){ + case INTERPRET: + break; + case BREAK_PRE: + case BREAK_MIDDLE: + case BREAK_POST: + case BREAK_END: + score_column->set_breakable(); + breakstat = com->code- BREAK_PRE; + break; + + case TYPESET: + typeset_command ( com , breakstat); + break; + default : + break; + } + } +} +/** + accept: + + BREAK: all + TYPESET: bar, meter + + */ + + + +void +Simple_column::process_requests() +{ + for (int i = 0 ; i < v_elts.sz(); i ++) + for (PCursor rqc(v_elts[i]->reqs); rqc.ok(); rqc++) { + Request *rq= rqc; + if (rq->rhythmic()){ + if (the_note){ + WARN << "too many notes.\n"; + return; + } + the_note = rq; + } + break; + } +} + +void +Simple_staff::grant_requests() +{ + for (PCursor cc(cols); cc.ok(); cc++) { + Simple_column *rp = (Simple_column*)*cc; + if (rp->the_note) + rp->typeset_req( rp->the_note); + } +} + +