[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Mapping pitches to other pitches when generating MIDI files for perc
Re: Mapping pitches to other pitches when generating MIDI files for percussion?
Mon, 12 Nov 2018 23:31:20 -0800
On 2018-11-12 7:22 pm, Vinicius Mascarenhas wrote:
TLDR: I need to map different pitches displayed in the layout block /
PDF file to a single sound in the midi block / file (like say map both
c and a to b,) but I can’t to that to the whole staff — I need to be
able to map other sets of pitches to another single sound. Can
Lilypond do this?
Sounds like what could work is to define your own drum pitch names.
These would have different visual appearance in the notation but can map
to the same MIDI note. See the following:
Here is a adaptation of that snippet for a simple left-hand and
right-hand taiko where the left-hand marking lies below and the
drumPitchNames.taikolefthand = #'taikolefthand
drumPitchNames.tlh = #'taikolefthand
drumPitchNames.taikorighthand = #'taikorighthand
drumPitchNames.trh = #'taikorighthand
'((taikolefthand default #f -1)
(taikorighthand default #f 1)))
midiDrumPitches.taikolefthand = e
midiDrumPitches.taikorighthand = e
\override StaffSymbol.line-count = #1
instrumentName = #"Taiko"
drumStyleTable = #(alist->hash-table taikoStyle)
drumPitchTable = #(alist->hash-table midiDrumPitches)
\set Staff.midiInstrument = #"taiko drum"
\tempo 2 = 60
tlh4. trh16 tlh trh2 | tlh8. tlh16~ 8 tlh trh2
-- Aaron Hill
Description: PNG image
Description: MIDI audio