[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Mapping pitches to other pitches when generating MIDI files for perc

From: Aaron Hill
Subject: Re: Mapping pitches to other pitches when generating MIDI files for percussion?
Date: Mon, 12 Nov 2018 23:31:20 -0800
User-agent: Roundcube Webmail/1.3.6

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 right-hand above.

\version "2.19.82"

drumPitchNames.taikolefthand  = #'taikolefthand
drumPitchNames.tlh            = #'taikolefthand
drumPitchNames.taikorighthand = #'taikorighthand
drumPitchNames.trh            = #'taikorighthand

#(define taikoStyle
  '((taikolefthand  default #f -1)
    (taikorighthand default #f  1)))

midiDrumPitches.taikolefthand = e
midiDrumPitches.taikorighthand = e

\score {
  \new DrumStaff
  \with {
    \override StaffSymbol.line-count = #1
    instrumentName = #"Taiko"
    drumStyleTable = #(alist->hash-table taikoStyle)
    drumPitchTable = #(alist->hash-table midiDrumPitches)
  \drummode {
    \set Staff.midiInstrument = #"taiko drum"
    \tempo 2 = 60
    tlh4. trh16 tlh trh2 | tlh8. tlh16~ 8 tlh trh2
  \layout {}
  \midi {}

-- Aaron Hill

Attachment: taiko.cropped.png
Description: PNG image

Attachment: taiko.midi
Description: MIDI audio

reply via email to

[Prev in Thread] Current Thread [Next in Thread]