From f9c804078f7b0a0c60e8b2c4ba34879394fb2332 Mon Sep 17 00:00:00 2001 From: Neil Puttock Date: Fri, 16 Oct 2009 18:10:31 +0100 Subject: [PATCH] Enable MIDI output for tablature. * amend context definitions for TabStaff/TabVoice * tidy code --- ly/performer-init.ly | 255 +++++++++++++++++++++---------------------- 1 file changed, 127 insertions(+), 128 deletions(-) diff --git a/ly/performer-init.ly b/ly/performer-init.ly index 70550a78c0..80898c0f12 100644 --- a/ly/performer-init.ly +++ b/ly/performer-init.ly @@ -1,41 +1,41 @@ \version "2.12.0" %% -%% setup for Request->Element conversion. +%% setup for Request->Element conversion. %% \context { - \type "Performer_group" - \name Staff - \accepts Voice - \accepts CueVoice - \defaultchild Voice - - \consists "Staff_performer" - \consists "Key_performer" + \type "Performer_group" + \name Staff + \accepts Voice + \accepts CueVoice + \defaultchild Voice + + \consists "Staff_performer" + \consists "Key_performer" } \context { - \name Global - \accepts Score -\description "Hard coded entry point for LilyPond. Cannot be tuned." - } + \name Global + \accepts Score + \description "Hard coded entry point for LilyPond. Cannot be tuned." +} \context { - \Staff - \name DrumStaff - midiInstrument = #"drums" - \accepts DrumVoice - \defaultchild DrumVoice + \Staff + \name DrumStaff + midiInstrument = #"drums" + \accepts DrumVoice + \defaultchild DrumVoice } \context { - \type "Performer_group" - \name Voice - \consists "Dynamic_performer" - \consists "Tie_performer" - \consists "Piano_pedal_performer" - \consists "Note_performer" - \consists "Beam_performer" - \consists "Slur_performer" + \type "Performer_group" + \name Voice + \consists "Dynamic_performer" + \consists "Tie_performer" + \consists "Piano_pedal_performer" + \consists "Note_performer" + \consists "Beam_performer" + \consists "Slur_performer" } \context { @@ -51,152 +51,151 @@ } \context { - \Voice - \remove "Note_performer" - \consists "Drum_note_performer" - \name DrumVoice + \Voice + \remove "Note_performer" + \consists "Drum_note_performer" + \name DrumVoice } \context { - \type "Performer_group" - \name FiguredBass - \consists "Swallow_performer" + \type "Performer_group" + \name FiguredBass + \consists "Swallow_performer" } \context { - \type "Performer_group" - \name GrandStaff - \accepts RhythmicStaff - \accepts Staff - \accepts Dynamics - \defaultchild Staff + \type "Performer_group" + \name GrandStaff + \accepts RhythmicStaff + \accepts Staff + \accepts Dynamics + \defaultchild Staff } \context { - \type "Performer_group" - \name "PianoStaff" - \accepts Staff - \accepts DrumStaff - \defaultchild Staff + \type "Performer_group" + \name "PianoStaff" + \accepts Staff + \accepts DrumStaff + \defaultchild Staff } \context { - \type "Performer_group" - \name "TabVoice" - \consists "Swallow_performer" + \Voice + \name TabVoice } \context { - \type "Performer_group" - \name "Devnull" - \consists "Swallow_performer" + \type "Performer_group" + \name "Devnull" + \consists "Swallow_performer" } \context { - \type "Performer_group" - \name "TabStaff" - \accepts "TabVoice" - \defaultchild "TabVoice" + \Staff + \name TabStaff + midiInstrument = #"acoustic guitar (nylon)" + \alias Staff + \accepts TabVoice + \defaultchild TabVoice } \context { - \type "Performer_group" - \name "VaticanaStaff" - \alias "Staff" - \denies "Voice" - \accepts "VaticanaVoice" - \defaultchild "VaticanaVoice" + \type "Performer_group" + \name "VaticanaStaff" + \alias "Staff" + \denies "Voice" + \accepts "VaticanaVoice" + \defaultchild "VaticanaVoice" } \context { - \type "Score_performer" + \type "Score_performer" + + \name Score + + melismaBusyProperties = #default-melisma-properties + instrumentName = #"bright acoustic" - \name Score - - melismaBusyProperties = #default-melisma-properties - instrumentName = #"bright acoustic" + %% quarter = 60 + tempoWholesPerMinute = #(ly:make-moment 15 1) - %% quarter = 60 - tempoWholesPerMinute = #(ly:make-moment 15 1) - - \accepts Staff - \accepts DrumStaff - \accepts GrandStaff - \accepts PianoStaff - \accepts TabStaff - \accepts Staff - \accepts StaffGroup - \accepts Devnull - \accepts ChoirStaff - \accepts RhythmicStaff - \accepts ChordNames - \accepts FiguredBass - \accepts Lyrics - \accepts VaticanaStaff + \accepts Staff + \accepts DrumStaff + \accepts GrandStaff + \accepts PianoStaff + \accepts TabStaff + \accepts Staff + \accepts StaffGroup + \accepts Devnull + \accepts ChoirStaff + \accepts RhythmicStaff + \accepts ChordNames + \accepts FiguredBass + \accepts Lyrics + \accepts VaticanaStaff - \consists "Time_signature_performer" - \consists "Control_track_performer" - \consists "Tempo_performer" - \consists "Timing_translator" - \consists "Swallow_performer" - - \defaultchild "Staff" - - dynamicAbsoluteVolumeFunction = #default-dynamic-absolute-volume - instrumentEqualizer = #default-instrument-equalizer - drumPitchTable = #(alist->hash-table midiDrumPitches) - timing = ##t + \consists "Time_signature_performer" + \consists "Control_track_performer" + \consists "Tempo_performer" + \consists "Timing_translator" + \consists "Swallow_performer" + + \defaultchild "Staff" + + dynamicAbsoluteVolumeFunction = #default-dynamic-absolute-volume + instrumentEqualizer = #default-instrument-equalizer + drumPitchTable = #(alist->hash-table midiDrumPitches) + timing = ##t } \context { - \type "Performer_group" - \consists "Staff_performer" % Performer_group ? - \consists "Lyric_performer" - \name Lyrics + \type "Performer_group" + \consists "Staff_performer" % Performer_group ? + \consists "Lyric_performer" + \name Lyrics } \context{ - \type "Performer_group" - \name ChoirStaff - \accepts Staff - \accepts DrumStaff - \defaultchild Staff - + \type "Performer_group" + \name ChoirStaff + \accepts Staff + \accepts DrumStaff + \defaultchild Staff } - - \context { - \type "Performer_group" - \consists "Staff_performer" - \accepts ChordNameVoice - \name ChordNames + \type "Performer_group" + \consists "Staff_performer" + \accepts ChordNameVoice + \name ChordNames } \context { - \type "Performer_group" - \consists "Note_performer" - \name ChordNameVoice + \type "Performer_group" + \consists "Note_performer" + \name ChordNameVoice } \context { - \type "Performer_group" - - \name StaffGroup - \accepts Staff - \accepts DrumStaff - \accepts TabStaff - \accepts RhythmicStaff - \accepts GrandStaff - \accepts PianoStaff - \accepts Lyrics - \accepts ChordNames - \accepts FiguredBass - - \defaultchild Staff + \type "Performer_group" + \name StaffGroup + \accepts Staff + \accepts DrumStaff + \accepts TabStaff + \accepts RhythmicStaff + \accepts GrandStaff + \accepts PianoStaff + \accepts Lyrics + \accepts ChordNames + \accepts FiguredBass + \defaultchild Staff } -\context { \Staff \name RhythmicStaff } +\context { + \Staff + \name RhythmicStaff +} \context { \type "Performer_group" -- 2.39.2