]> git.donarmstrong.com Git - lilypond.git/blobdiff - Documentation/es/user/programming-interface.itely
Merge branch 'master' into nested-bookparts
[lilypond.git] / Documentation / es / user / programming-interface.itely
index 605457f5a836e19c8bdfe43643853b8a6e57351a..20f33c492f34d832c6b1528f7a89de69624831c9 100644 (file)
@@ -1,20 +1,18 @@
 @c -*- coding: utf-8; mode: texinfo; documentlanguage: es -*-
 @c This file is part of lilypond.tely
 @ignore
-    Translation of GIT committish: 4a527608c5ff2ce31e596495d00dce181dc1b9ea
+    Translation of GIT committish: 6bcad9cdc487270910758b1ee39cf3c8aee1015e
 
     When revising a translation, copy the HEAD committish of the
     version that you are working on.  See TRANSLATION for details.
 @end ignore
 
-@c \version "2.11.61"
 
 @node Interfaces for programmers
 @chapter Interfaces for programmers
 
-Se pueden realizar trucos avanzados mediante el uso de Scheme.  Si no
-está familizarizado con Scheme, le conviene leer nuestro tutorial de
-Scheme, @rlearning{Scheme tutorial}.
+@untranslated
+
 
 @menu
 * Music functions::
@@ -23,16 +21,14 @@ Scheme, @rlearning{Scheme tutorial}.
 * Markup programmer interface::
 * Contexts for programmers::
 * Scheme procedures as properties::
-* Using Scheme code instead of \tweak::
-* Difficult tweaks::
+* TODO moved into scheme::
 @end menu
 
-
 @node Music functions
 @section Music functions
 
-Esta sección trata sobre cómo crear funciones musicales dentro de
-LilyPond.
+@untranslated
+
 
 @menu
 * Overview of music functions::
@@ -47,255 +43,51 @@ LilyPond.
 @node Overview of music functions
 @subsection Overview of music functions
 
-Es fácil hacer una función que sustituya a una variable en código de
-LilyPond.  La forma general de estas funciones es:
-
-@example
-funcion =
-#(define-music-function (parser location @var{var1} @var{var2}... )
-                        (@var{var1-type?} @var{var2-type?}...)
-  #@{
-    @emph{...música...}
-  #@})
-@end example
-
-@noindent
-donde
-
-@multitable @columnfractions .33 .66
-@item @var{argi}         @tab @var{i}-ésima variable
-@item @var{argi-type?}   @tab tipo de variable
-@item @var{...música...}  @tab entrada normal de LilyPond, usando las variables como @code{#$var1}.
-@end multitable
-
-Los siguientes tipos de entrada se pueden usar como variables en una
-función musical.  Esta lista no es exhaustiva; consulte otros lugares
-de la documentación específica de Scheme para ver otros tipos de
-variables.
-
-@multitable @columnfractions .33 .66
-@headitem Tipo de entrada       @tab notación de @var{argi-type?}
-@item Entero                    @tab @code{integer?}
-@item Flotante (número decimal) @tab @code{number?}
-@item Cadena de texto           @tab @code{string?}
-@item Marcado                   @tab @code{markup?}
-@item Expresión musical         @tab @code{ly:music?}
-@item Pareja de variables          @tab @code{pair?}
-@end multitable
-
-Los argumentos @code{parser} y @code{location} son obligatorios, y
-se usan en ciertas situaciones avanzadas.  El argumento
-@code{parser} se usa para acceder al valor de otra variable de
-LilyPond.  El argumento @code{location} se usa para establecer el
-@q{origen} de la expresión musical que construye la función musical,
-de forma que en caso de producirse un error de sintaxis LilyPond pueda
-informar al usuario de un lugar adecuado donde buscar en el archivo de
-entrada.
+@untranslated
 
 
 @node Simple substitution functions
 @subsection Simple substitution functions
 
-He aquí un ejemplo sencillo:
-
-@lilypond[quote,verbatim,ragged-right]
-padText = #(define-music-function (parser location padding) (number?)
-  #{
-    \once \override TextScript #'padding = #$padding
-  #})
-
-\relative c''' {
-  c4^"piu mosso" b a b
-  \padText #1.8
-  c4^"piu mosso" d e f
-  \padText #2.6
-  c4^"piu mosso" fis a g
-}
-@end lilypond
-
-También se pueden sustituir las expresiones musicales:
-
-@lilypond[quote,verbatim,ragged-right]
-custosNote = #(define-music-function (parser location note)
-                                     (ly:music?)
-  #{
-    \once \override Voice.NoteHead #'stencil =
-      #ly:text-interface::print
-    \once \override Voice.NoteHead #'text =
-      \markup \musicglyph #"custodes.mensural.u0"
-    \once \override Voice.Stem #'stencil = ##f
-    $note
-  #})
-
-{ c' d' e' f' \custosNote g' }
-@end lilypond
-
-Se pueden usar más de una variable:
-
-@lilypond[quote,verbatim,ragged-right]
-tempoMark = #(define-music-function (parser location padding marktext)
-                                    (number? string?)
-#{
-  \once \override Score . RehearsalMark #'padding = $padding
-  \once \override Score . RehearsalMark #'extra-spacing-width = #'(+inf.0 . -inf.0)
-  \mark \markup { \bold $marktext }
-#})
-
-\relative c'' {
-c2 e
-\tempoMark #3.0 #"Allegro"
-g c
-}
-@end lilypond
+@untranslated
 
 
 @node Paired substitution functions
 @subsection Paired substitution functions
 
-Algunas instrucciones @code{\override} requieren un par de números
-(llamados en Scheme una @code{célula cons}).  Para pasar estos números
-a una función, usamos una variable @code{pair?} o bien insertamos el
-@code{cons} en la función musical.
-
-@quotation
-@example
-manualBeam =
-#(define-music-function (parser location beg-end)
-                        (pair?)
-#@{
-  \once \override Beam #'positions = #$beg-end
-#@})
-
-\relative @{
-  \manualBeam #'(3 . 6) c8 d e f
-@}
-@end example
-@end quotation
-
-@noindent
-o bien
-
-@lilypond[quote,verbatim,ragged-right]
-manualBeam =
-#(define-music-function (parser location beg end)
-                        (number? number?)
-#{
-  \once \override Beam #'positions = #(cons $beg $end)
-#})
-
-\relative {
-  \manualBeam #3 #6 c8 d e f
-}
-@end lilypond
+@untranslated
 
 
 @node Mathematics in functions
 @subsection Mathematics in functions
 
-Las funciones musicales pueden contar con programación de Scheme
-además de la simple sustitución:
-
-@lilypond[quote,verbatim,ragged-right]
-AltOn = #(define-music-function (parser location mag) (number?)
-  #{ \override Stem #'length = #$(* 7.0 mag)
-     \override NoteHead #'font-size =
-       #$(inexact->exact (* (/ 6.0 (log 2.0)) (log mag))) #})
-
-AltOff = {
-  \revert Stem #'length
-  \revert NoteHead #'font-size
-}
-
-{ c'2 \AltOn #0.5 c'4 c'
-  \AltOn #1.5 c' c' \AltOff c'2 }
-@end lilypond
-
-@noindent
-Este ejemplo se puede reescribir de forma que pase expresiones
-musicales:
-
-@lilypond[quote,verbatim,ragged-right]
-withAlt = #(define-music-function (parser location mag music) (number? ly:music?)
-  #{ \override Stem #'length = #$(* 7.0 mag)
-     \override NoteHead #'font-size =
-       #$(inexact->exact (* (/ 6.0 (log 2.0)) (log mag)))
-     $music
-     \revert Stem #'length
-     \revert NoteHead #'font-size #})
-
-{ c'2 \withAlt #0.5 {c'4 c'}
-  \withAlt #1.5 {c' c'} c'2 }
-@end lilypond
+@untranslated
 
 
 @node Void functions
 @subsection Void functions
 
-Una función musical debe devolver una expresión musical, per a veces
-podemos necesitar una función en la que no hay música en juego (como
-la desactivación de la funcionalidad Apuntar y Pulsar).  Para hacerlo,
-devolvemos una expresión musical @code{void} (vacía).
-
-Este es el motivo por el que la forma que se devuelve es
-@code{(make-music ...)}.  Con el valor de la propiedad @code{'void}
-establecido a @code{#t}, le decimos al analizador que descarte la
-expresión musical devuelta.  así, la parte importante de la función
-musical vacía es el proceso realizado por la función, no la expresión
-musical que se devuelve.
-
-@example
-noPointAndClick =
-#(define-music-function (parser location) ()
-   (ly:set-option 'point-and-click #f)
-   (make-music 'SequentialMusic 'void #t))
-...
-\noPointAndClick   % desactivar la funcionalidad Apuntar y Pulsar.
-@end example
+@untranslated
 
 
 @node Functions without arguments
 @subsection Functions without arguments
 
-En casi todos los casos, una función sin argumentos se debe escribir
-con una variable:
-
-@example
-dolce = \markup@{ \italic \bold dolce @}
-@end example
-
-Sin embargo, en raras ocasiones puede ser de utilidad crear una
-función musical sin argumentos:
-
-@example
-displayBarNum =
-#(define-music-function (parser location) ()
-   (if (eq? #t (ly:get-option 'display-bar-numbers))
-       #@{ \once \override Score.BarNumber #'break-visibility = ##f #@}
-       #@{#@}))
-@end example
-
-Para la imresión real de los números de compás donde se llama a esta
-función, invoque a @command{lilypond} con
-
-@example
-lilypond -d display-bar-numbers ARCHIVO.ly
-@end example
+@untranslated
 
 
 @node Overview of available music functions
 @subsection Overview of available music functions
 
-@c fixme ; this should be move somewhere else?
-Las siguientes instrucciones son funciones musicales:
-
-@include identifiers.tely
+@untranslated
 
 
+@include identifiers.tely
 @node Programmer interfaces
 @section Programmer interfaces
 
-Esta sección contiene información sobre cómo mezclar LilyPond y
-Scheme.
+@untranslated
+
 
 @menu
 * Input variables and Scheme::
@@ -417,14 +209,28 @@ Scheme.
 @untranslated
 
 
+@node TODO moved into scheme
+@section TODO moved into scheme
+
+@untranslated
+
+
+@menu
+* Using Scheme code instead of \tweak::
+* Difficult tweaks::
+@end menu
 
 @node Using Scheme code instead of \tweak
-@section Using Scheme code instead of @code{\tweak}
+@subsection Using Scheme code instead of @code{\tweak}
 
 @untranslated
 
 
 @node Difficult tweaks
-@section Difficult tweaks
+@subsection Difficult tweaks
 
 @untranslated
+
+
+
+@c -- SKELETON FILE --