]> git.donarmstrong.com Git - lilypond.git/blobdiff - Documentation/user/internals.itely
''
[lilypond.git] / Documentation / user / internals.itely
index a22b7acf3b1e733a0df936c298d821c12ff81223..9ecae65478ce5597b791675305f8a76c5f63de25 100644 (file)
@@ -76,176 +76,10 @@ The data types that are mentioned here are all discussed in this
 section.
 
 @menu
-* Input location::              
-* Moment::                      
-* Duration::                    
-* Pitch data type::             
-* Music::                       
-* Music_iterator::              
-* Translator::                  
 * Grobs::                       Graphical object  
 * Molecules::                   Molecules are stand-alone descriptions of output
-* Font metrics::                Font metrics
-* Miscellaneous Scheme functions::  
 @end menu
 
-@ignore
-  Why not use Scheme syntax for the functions below, such as
-  (ly-input-location? obj) and (ly-get-mus-property m sym) ?
-
-  /MB
-@end ignore
-
-@node Input location
-@section Input location
-
-@c The parser generates
-
-Input location objects point to a location in the input file. This
-location is used to generate error messages and to enable the point and
-click output.
-
-@defun ly-input-location? obj
-Type predicate, return true if @var{obj} is an input location.
-@end defun
-
-
-
-
-@node Moment
-@section Moment
-
-Moment is a point in musical time. It is consists of a pair of
-rationals (@var{m},@var{g}), where @var{m} is the timing for the  main
-notes, and @var{g} the timing for  grace notes. In absence of grace
-notes, @var{g} is zero.
-
-@defun moment? obj
-Type predicate, return true if @var{obj} is a moment.
-@end defun
-
-@defun make-moment num den
-create the rational number with main timing @var{num}/@var{den}. 
-@end defun
-
-@node Duration
-@section Duration
-
-A duration is a musical duration, i.e. a length of time described by a
-power of two (whole, half, quarter, etc.) and a number of augmentation
-dots. 
-
-@defun make-duration length dotcount
-
-@var{length} is the negative logarithm (base 2) of the duration:
-1 is a half note, 2 is a quarter note, 3 is an eighth
-note, etc.  The number of dots after the note is given by
-@var{dotcount}.
-@end defun
-
-
-@defun duration? obj
-Type predicate, return true if @var{obj} is a duration.
-@end defun
-
-@node Pitch data type
-@section Pitch data type
-
-
-
-@defun make-pitch octave note shift
-
-@var{octave} is specified by an integer, zero for the octave containing
-middle C.  @var{note} is a number from 0 to 6, with 0 corresponding to C
-and 6 corresponding to B.  The shift is zero for a natural, negative for
-flats, or positive for sharps.
-@end defun
-
-@defun pitch-octave p 
-extract the octave from pitch @var{p}.
-@end defun
-
-@defun pitch-notename p
-extract the note name from pitch  @var{p}.
-@end defun
-
-@defun pitch-alteration p
-extract the alteration from pitch  @var{p}.
-@end defun
-
-@defun pitch-semitones p
-calculate the number of semitones of @var{p} from central C.
-@end defun
-
-@defun Pitch@code{:}@code{:}transpose t p
-Transpose @var{p} by the amount @var{t}, where @var{t} is the pitch that
-central C is transposed to. 
-@end defun
-
-
-@node Music
-@section Music
-
-Music is the data type that music expressions are stored in. The data
-type does not yet offer many manipulations.
-
-@defun ly-get-mus-property m sym
-Get the property @var{sym} of music expression @var{m}.
-@end defun
-
-@defun ly-set-mus-property m sym val
-Set property @var{sym} in music expression @var{m} to @var{val}.
-@end defun
-
-@defun ly-make-music name
-Make a music object/expression of type @var{name}. Warning: this
-interface will likely change in the near future.
-@end defun
-
-@defun music? obj
-Type predicate,  return true if @var{obj} is a music object.
-@end defun
-
-@defun ly-music-name music
-Print the name of @var{music}.
-@end defun
-
-
-@node Music_iterator
-@section Music_iterator
-
-Music_iterator is an object type that traverses the Music structure and
-reports the events it finds to interpretation contexts. It is not yet
-user-serviceable.
-
-@defun c++-function? obj
-Type predicate, return true if @var{obj} is a  c++-function.
-Music_iterator are created from schemified C++ constructors. Such a
-constructor is a @code{c++-function}.
-@end defun
-
-@node Translator
-@section Translator
-
-Translators are the building blocks of contexts. They are not yet user
-accessible.
-
-@defun ly-get-trans-property tr sym
-retrieve the value of @var{sym} from context @var{tr}
-@end defun
-
-@defun ly-set-trans-property tr sym val
-set value of property @var{sym} in context @var{tr} to @var{val}.
-@end defun
-
-@defun Translator@code{:}@code{:}name tr
-Return the type name of the translator @var{tr}.
-@end defun 
-
-@defun Translator@code{:}@code{:}description tr
-Return an alist of properties of  translator @var{tr}.
-@end defun
-
 @node Grobs
 @section Grobs
 
@@ -519,25 +353,6 @@ no extent.
 Grob properties can be manipulated from Scheme. In practice, most
 manipulations are coded in C++ because of tradition.
 
-@defun ly-get-grob-property g sym
-  Get the value of a value in grob @var{g} of property @var{sym}. It
-will return @code{'()} (end-of-list) if @var{g} doesn't have @var{sym} set.
-@end  defun
-
-@defun ly-set-grob-property g sym val
-Set @var{sym} in grob @var{g} to value @var{val}
-@end defun
-
-@defun ly-get-spanner-bound spanner dir
-Get one of the bounds of @var{spanner}. @var{dir} may be @code{-1} for
-left, and @code{1} for right.
-@end defun
-
-@defun ly-grob? g
-Typecheck: is @var{g} a grob?
-@end defun
-
-
 
 
 @node Molecules
@@ -588,92 +403,5 @@ returning a Molecule.  Most molecule callbacks are written in C++, but
 you can also write them in Scheme. An example is provided in
 @code{input/regression/molecule-hacking.ly}.
 
-
-@defun molecule? m
-type predicate.
-@end defun
-
-@defun ly-combine-molecule-at-edge  mol1 axis dir mol2 padding
-Construct a molecule by putting @var{mol2} next to
-@var{mol1}. @var{axis} can be 0 (x-axis) or 1 (y-axis), @var{dir} can be
--1 (left or down) or 1 (right or up).  @var{padding} specifies extra
-space to add in between measured in global staff space.
-@end defun
-
-@defun ly-get-molecule-extent! mol axis
-Return a pair of numbers signifying the extent of @var{mol} in
-@var{axis} direction (0 or 1 for x and y axis respectively).
-@end defun
-
-@defun ly-set-molecule-extent! mol axis extent
-Set the extent (@var{extent} must be a pair of numbers) of @var{mol} in 
-@var{axis} direction (0 or 1 for x- and y-axis respectively).
-
-Note that an extent @code{(A . B)} is an interval and hence @code{A} is
-smaller than @code{B}, and is often negative.
-
-@end defun
-
-@node Font metrics
-@section Font metrics
-
-The font object represents the metric information of a font. Every font
-that is loaded into LilyPond can be accessed via Scheme. 
-
-LilyPond only needs to know the dimension of glyph to be able to process
-them. This information is stored in font metric files. LilyPond can read
-two types of font-metrics: @TeX{} Font Metric files (TFM files) and
-Adobe Font Metric files (AFM files).  LilyPond will always try to load
-AFM files first since they are more versatile.
-
-@defun ly-get-default-font gr
-This returns the default font for grob @var{gr}.
-@end defun
-
-@defun ly-find-glyph-by-name font name
-This function retrieves a Molecule for the glyph named @var{name} in
-@var{font}.  The font must be available as an AFM file.
-@cindex afm file
-
-@end defun
-
-@node Miscellaneous Scheme functions
-@section Miscellaneous Scheme functions
-
  
-@defun ly-warn msg
-Scheme callable function to issue the warning @code{msg}.
-@end defun
-
-@defun ly-version
-Return the current lilypond version as a list, e.g.
-@code{(1 3 127 uu1)}. 
-@end defun
-
-@defun ly-gulp-file name
-Read the file named @var{name}, and return its contents in a string. The
-file is looked up using the lilypond search path.
-
-@end defun
-
-@defun dir?
-type predicate. A direction is a -1, 0 or 1, where -1 represents left or
-down and 1 represents right or up.
-@end defun
-
-@defun ly-number->string num
- converts @var{num} to a string without generating many decimals. It
-leaves a space at the end.
-@end defun
-
-@defun set-lily-option sym val
- Set a global option for the program. Supported options  include
-@table @code
-@item midi-debug
-If set to true, generate human  readable MIDI
-@end table
-
-This function is useful to call from the command line: @code{lilypond -e
-"(set-lily-option 'midi-debug #t)"}
 
-@end defun