![]() The hook must return undef if the value is to be accepted, or something not defined to use that instead, or could throw an exception, which will be re-thrown via croak. The hook is passed the pitch, min_pitch, max_pitch, and the object itself as arguments. Min_pitch_hook code reference to handle minimum pitch cases instead of the default exception. Too much existing code allows for zero as a minimum pitch to set 21 by default, or if ignore_register is set, pitches from notes2pitches are constrained to zero through eleven, and relative lilypond notes can easily be generated from those.so 0 is the minimum. To constrain pitches to what an 88-key piano is capable of, set: Music::LilyPondUtil->new( min_pitch => 21 ) Min_pitch integer, by default 0, below which pitches passed to p2ly will cause the module to by default throw an exception. State is not maintained across separate calls to p2ly (see also the sticky_state param).ĭisabling this option will remove all register notation from both relative and absolute modes. Keep_state a boolean, enabled by default, that will maintain state on the previous pitch in the p2ly call. Set this option if feeding data to atonal routines, for example those in Music::AtonalUtil. The default is to include the register information in the resulting pitch. Ignore_register a boolean that if set causes the diatonic_pitch and notes2pitches methods to only return values from 0.11. (Under no circumstances are double sharps or double flats emitted, though the module does know how to read those.) Mixing flats and sharps is not supported. Optional parameters include:Ĭhrome to set the accidental style ( sharps or flats). The module will throw errors via croak if an abnormal condition is encountered. Pitch numbers are integers, and might be the MIDI note numbers, or based around 0, or whatever, depending on the need and the parameters set. Lilypond output is restricted to all sharps or all flats (set via a parameter), and never emits double sharps nor double flats. The note conversions parse the lilypond defaults, including enharmonic equivalents such as bes or ceses (for C double flat or more simply B flat) and bis (B sharp or C natural) but not any microtonal cih, beh nor any other conventions. ![]() Utility methods for interacting with lilypond (as of version 2.16), most notably for the conversion of integers to lilypond note names (or the other way around, for a subset of the lilypond notation). $lyu->p2ly(qw/2 9 5 2 1 2/) # d a f d des d DESCRIPTION Music::LilyPondUtil - utility methods for lilypond data SYNOPSIS use Music::LilyPondUtil () ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |