Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(376)

Side by Side Diff: Documentation/notation/fretted-strings.itely

Issue 3842041: Change stringTunings entries from semitones to pitches (Closed)
Patch Set: Adjusted for 2.13.46, fixed alterations in convertrules Created 13 years, 2 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View unified diff | Download patch
OLDNEW
1 @c -*- coding: utf-8; mode: texinfo; -*- 1 @c -*- coding: utf-8; mode: texinfo; -*-
2 @ignore 2 @ignore
3 Translation of GIT committish: FILL-IN-HEAD-COMMITTISH 3 Translation of GIT committish: FILL-IN-HEAD-COMMITTISH
4 4
5 When revising a translation, copy the HEAD committish of the 5 When revising a translation, copy the HEAD committish of the
6 version that you are working on. For details, see the Contributors' 6 version that you are working on. For details, see the Contributors'
7 Guide, node Updating translation committishes.. 7 Guide, node Updating translation committishes..
8 @end ignore 8 @end ignore
9 9
10 @c \version "2.13.36" 10 @c \version "2.13.46"
11 11
12 @node Fretted string instruments 12 @node Fretted string instruments
13 @section Fretted string instruments 13 @section Fretted string instruments
14 14
15 @lilypondfile[quote]{fretted-headword.ly} 15 @lilypondfile[quote]{fretted-headword.ly}
16 16
17 This section discusses several aspects of music notation that are unique 17 This section discusses several aspects of music notation that are unique
18 to fretted string instruments. 18 to fretted string instruments.
19 19
20 @cindex tablature 20 @cindex tablature
(...skipping 402 matching lines...) Expand 10 before | Expand all | Expand 10 after
423 423
424 @cindex tablatures, custom 424 @cindex tablatures, custom
425 @cindex tablature, banjo 425 @cindex tablature, banjo
426 @cindex tablature, mandolin 426 @cindex tablature, mandolin
427 @cindex tablature, guitar 427 @cindex tablature, guitar
428 @cindex tablature, bass guitar 428 @cindex tablature, bass guitar
429 @cindex tablature, ukulele 429 @cindex tablature, ukulele
430 @cindex tablature, predefined string tunings 430 @cindex tablature, predefined string tunings
431 @cindex fretted instruments, predefined string tunings 431 @cindex fretted instruments, predefined string tunings
432 @cindex predefined string tunings for fretted instruments 432 @cindex predefined string tunings for fretted instruments
433 @cindex tablature, violin
434 @cindex tablature, viola
435 @cindex tablature, cello
436 @cindex tablature, bass
437 @cindex tablature, double bass
433 438
434 @funindex StringTunings 439 @funindex StringTunings
435 440
436 LilyPond tabulature automatically calculates the fret for 441 LilyPond tabulature automatically calculates the fret for
437 a note based on the string to which the note is assigned. 442 a note based on the string to which the note is assigned.
438 In order to do this, the tuning of the strings must be 443 In order to do this, the tuning of the strings must be
439 specified. The tuning of the strings is given in the 444 specified. The tuning of the strings is given in the
440 @code{stringTunings} property. 445 @code{stringTunings} property.
441 446
442 LilyPond comes with predefined string tunings for banjo, mandolin, 447 LilyPond comes with predefined string tunings for banjo, mandolin,
443 guitar, bass guitar and ukulele. LilyPond automatically sets 448 guitar, bass guitar, ukulele, violin, viola, cello, and double bass.
449 LilyPond automatically sets
444 the correct transposition for predefined tunings. The following 450 the correct transposition for predefined tunings. The following
445 example is for bass guitar, which sounds an octave lower than 451 example is for bass guitar, which sounds an octave lower than
446 written. 452 written.
447 453
448 @lilypond[quote,ragged-right,verbatim] 454 @lilypond[quote,ragged-right,verbatim]
449 << 455 <<
450 \new Staff { 456 \new Staff {
451 \clef "bass_8" 457 \clef "bass_8"
452 \relative c, { 458 \relative c, {
453 c4 d e f 459 c4 d e f
454 } 460 }
455 } 461 }
456 \new TabStaff { 462 \new TabStaff {
457 \set TabStaff.stringTunings = #bass-tuning 463 \set TabStaff.stringTunings = #bass-tuning
458 \relative c, { 464 \relative c, {
459 c4 d e f 465 c4 d e f
460 } 466 }
461 } 467 }
462 >> 468 >>
463 @end lilypond 469 @end lilypond
464 470
465 The default string tuning is @code{guitar-tuning}, which 471 The default string tuning is @code{guitar-tuning}, which
466 is the standard EADGBE tuning. Some other predefined tunings are 472 is the standard EADGBE tuning. Some other predefined tunings are
467 @code{guitar-open-g-tuning}, @code{mandolin-tuning} and 473 @code{guitar-open-g-tuning}, @code{mandolin-tuning} and
468 @code{banjo-open-g-tuning}. The predefined string tunings 474 @code{banjo-open-g-tuning}. The predefined string tunings
469 are found in @file{scm/tablature.scm}. 475 are found in @file{ly/string-tuning-init.ly}.
470 476
471 A string tuning is a Scheme list of string pitches, 477 @funindex contextStringTunings
478 @funindex \contextStringTunings
479 @cindex tablature, custom string tunings
480 @cindex custom string tunings
481
482 Any desired string tuning can be created. The
483 @code{\contextStringTuning} function can be
484 used to define a string tuning and set it as the
485 @code{stringTunings} for the current context.
486 @code{\contextStringTuning} takes two arguments: the
487 symbol in which the string tuning, and a chord construct
488 that defines the pitches of each string in the tuning.
489 The chord construct must be in absolute octave mode,
490 see @ref{Absolute octave entry}. The string
491 with the highest number (generally the lowest string) must
492 come first in the chord. For example, we can
493 define a string tuning for a four-string instrument with pitches
494 of @code{a''}, @code{d''}, @code{g'}, and @code{c'}:
495
496 @lilypond[quote,verbatim]
497
498 mynotes = {
499 c'4 e' g' c'' |
500 e''4 g'' b'' c'''
501 }
502
503 <<
504 \new Staff {
505 \clef treble
506 \mynotes
507 }
508 \new TabStaff {
509 \contextStringTuning #'custom-tuning <c' g' d'' a''>
510 \mynotes
511 }
512 >>
513 @end lilypond
514
515 The @code{stringTunings} property is also used by
516 @code{FretBoards} to calculate automatic fret diagrams.
517
518 @funindex makeStringTuning
519 @funindex \makeStringTuning
520
521 String tunings are used as part of the hash key
522 for predefined fret diagrams
523 (see @ref{Predefined fret diagrams}). The @code{\makeStringTuning}
524 function is used to create a string tuning without setting the
525 @code{stringTunings} property in the current context. The
526 arguments to @code{\makeStringTuning} are the symbol to be
527 used for the new string tuning and a chord construct used
528 to define the tuning.
529 The previous example could also be written as follows:
530
531 @lilypond[quote,verbatim]
532 \makeStringTuning #'custom-tuning <c' g' d'' a''>
533
534 mynotes = {
535 c'4 e' g' c'' |
536 e''4 g'' b'' c'''
537 }
538
539 <<
540 \new Staff {
541 \clef treble
542 \mynotes
543 }
544 \new TabStaff {
545 \set TabStaff.stringTunings = #custom-tuning
546 \mynotes
547 }
548 >>
549 @end lilypond
550
551 Internally, a string tuning is a Scheme list of string pitches,
472 one for each string, ordered by string number from 1 to N, 552 one for each string, ordered by string number from 1 to N,
473 where string 1 is at the top of the tablature staff and 553 where string 1 is at the top of the tablature staff and
474 string N is at the bottom. This ordinarily results in ordering 554 string N is at the bottom. This ordinarily results in ordering
475 from highest pitch to lowest pitch, but some instruments 555 from highest pitch to lowest pitch, but some instruments
476 (e.g. ukulele) do not have strings ordered by pitch. 556 (e.g. ukulele) do not have strings ordered by pitch.
477 557
478 A string pitch in a string tuning list is the pitch difference 558 A string pitch in a string tuning list is a LilyPond pitch
479 of the open string from middle C measured in semitones. The 559 object. Pitch objects are created with the Scheme function
480 string pitch must be an integer. LilyPond calculates the actual 560 @code{ly:make-pitch} (see @ref{Scheme functions}).
481 pitch of the string by adding the string tuning pitch to the
482 actual pitch for middle C.
483 561
484 LilyPond automatically calculates the number of strings in the 562 If desired, a string tuning can be created as a Scheme
485 @code{TabStaff} as the number of elements in @code{stringTunings}. 563 literal. The example below recreates the examples above,
486 564 but the string tuning is not saved as a separate object:
487 Any desired string tuning can be created. For example, we can
488 define a string tuning for a four-string instrument with pitches
489 of @code{a''}, @code{d''}, @code{g'}, and @code{c'}:
490
491 565
492 @lilypond[quote,verbatim] 566 @lilypond[quote,verbatim]
493 mynotes = { 567 mynotes = {
494 c'4 e' g' c'' | 568 c'4 e' g' c'' |
495 e''4 g'' b'' c''' 569 e''4 g'' b'' c'''
496 } 570 }
497 571
498 << 572 <<
499 \new Staff { 573 \new Staff {
500 \clef treble 574 \clef treble
501 \mynotes 575 \mynotes
502 } 576 }
503 \new TabStaff { 577 \new TabStaff {
504 \set TabStaff.stringTunings = #'(21 14 7 0) 578 \set TabStaff.stringTunings = #`(,(ly:make-pitch 1 5 0)
579 » » » » ,(ly:make-pitch 1 1 0)
580 » » » » ,(ly:make-pitch 0 4 0)
581 » » » » ,(ly:make-pitch 0 0 0))
505 \mynotes 582 \mynotes
506 } 583 }
507 >> 584 >>
508 @end lilypond 585 @end lilypond
509 586
587 LilyPond automatically calculates the number of strings in the
588 @code{TabStaff} and the number of strings in an automatically
589 calculated @code{FretBoard} as the number of elements
590 in @code{stringTunings}.
591
510 @cindex moderntab clef 592 @cindex moderntab clef
511 @cindex clef, moderntab 593 @cindex clef, moderntab
512 @cindex clef, tab 594 @cindex clef, tab
513 @cindex tab clef 595 @cindex tab clef
514 596
515 A modern tab clef can also be used. 597 A modern tab clef can also be used.
516 598
517 @lilypond[quote,ragged-right,verbatim] 599 @lilypond[quote,ragged-right,verbatim]
518 \new TabStaff { 600 \new TabStaff {
519 \clef moderntab 601 \clef moderntab
520 <a, e a>1 602 <a, e a>1
521 \break 603 \break
522 \clef tab 604 \clef tab
523 <a, e a>1 605 <a, e a>1
524 } 606 }
525 @end lilypond 607 @end lilypond
526 608
527 The modern tab clef supports tablatures from 4 to 7 strings. 609 The modern tab clef supports tablatures from 4 to 7 strings.
528 610
529 @seealso 611 @seealso
612 Notation Reference:
613 @ref{Absolute octave entry},
614 @ref{Predefined fret diagrams},
615 @ref{Scheme functions}.
616
530 Installed Files: 617 Installed Files:
618 @file{ly/string-tuning-init.ly}
531 @file{scm/tablature.scm}. 619 @file{scm/tablature.scm}.
532 620
533 Snippets: 621 Snippets:
534 @rlsr{Fretted strings}. 622 @rlsr{Fretted strings}.
535 623
536 Internals Reference: 624 Internals Reference:
537 @rinternals{Tab_note_heads_engraver}. 625 @rinternals{Tab_note_heads_engraver}.
538 626
539 @knownissues 627 @knownissues
540 Automatic tablature calculations do not work properly in most 628 Automatic tablature calculations do not work properly in most
(...skipping 1176 matching lines...) Expand 10 before | Expand all | Expand 10 after
1717 \set TabStaff.stringTunings = #(four-string-banjo banjo-c-tuning) 1805 \set TabStaff.stringTunings = #(four-string-banjo banjo-c-tuning)
1718 @end example 1806 @end example
1719 1807
1720 1808
1721 @seealso 1809 @seealso
1722 Snippets: 1810 Snippets:
1723 @rlsr{Fretted strings}. 1811 @rlsr{Fretted strings}.
1724 1812
1725 Installed Files: 1813 Installed Files:
1726 @file{scm/output-lib.scm} contains predefined banjo tunings. 1814 @file{scm/output-lib.scm} contains predefined banjo tunings.
OLDNEW
« no previous file with comments | « Documentation/included/display-predefined-string-tunings.ly ('k') | Documentation/notation/notation-appendices.itely » ('j') | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b