On 31-03-16 20:33, Thomas Morley wrote:
2016-03-31 16:34 GMT+02:00 Bernard <lilyp...@bernardhulsman.nl>:
How can I create from my custom drum note to a pitch?
Or, strongly related, how can I transpose from a custom drum note to a
standard piano note (pitch)?
I've no idea what you're talking about.
Hi Thomas,
Thanks for your answer. I can understand. These are work arrounds on
work arrounds so the idea can be lost.
The new thread
http://lilypond.1069038.n5.nabble.com/naturalize-pitches-td188666.html
does give me additional info.
Maybe changing automatic the source code is a better idea.
Simply I want as simple as possible notation in Lilypond for the
instrument Djembe. Which is standard not supported in Lilypond.
With help with this newsgroup I could do so and it displays (layout {}
function) fine.
All custom notes are :
one = \drummode { dba4 do ds dbm dom dsm }
But when generating midi I can not hear them. I bought a Djembe
soundfount from
https://robntweber.wordpress.com/2007/04/01/finally-moving-on/ with
Piano layout.
So I had to match these layout. To generated a correct midi Djembe sound
I need :
onemidi = { g4 a b fis gis ais }
Drum notes don't have pitches. Ergo, they can't be transposed. The
pitches in midiDrumPitches are somehow creating a midi, but I've no
clue about how it is done either.
Transpose is not possible I understand from you.
So I have to change following table :
Custom drum note -> Piano note
dba -> g
do -> a
ds -> b
etc.
You can access those pitches as mapped in midiDrumPitches and put them
into a normal Staff.
The result is crazy to say the least:
drms = \drummode { hh bd }
\new DrumStaff \drms
\new Staff {
\clef bass
$(music-clone
drms
'elements
(begin
(for-each
(lambda (n)
(ly:music-set-property! n 'pitch
(assoc-get (ly:music-property n 'drum-type) midiDrumPitches '()))
(ly:music-set-property! n 'drum-type '()))
(extract-named-music drms 'NoteEvent))
(extract-named-music drms 'NoteEvent)))
}
That could do it, but I could not see how I could enter my table into
that function.
Could you give an example of two note's?
What do you really want?
Different results for layout and midi.
Remark : this code can not be executed, because it requires the Djembe
libary.
I am more then willing to share this with you (all) if desired, but I
think this makes it more confusing at the moment.
one = \drummode { dba do ds r dbm dom dsm }
% layout
\score {
\new DrumStaff <<
\override DrumStaff.StaffSymbol.line-count = #3
\set DrumStaff.drumStyleTable = #(alist->hash-table djembe)
\new DrumVoice = voice { #one }
\set Staff.instrumentName = #"Djembe"
>>
\layout {}
}
%midi
\score {
<<
\new Staff {
% Statement should be enabled
% \new Voice = voice { djembe_to_midi_conversion {#one} }
% Statement is now required but should be disable
\new Voice = voice { g4 a b r fis gis ais r }
}
>>
\midi{}
}
How to implement the "djembe_to_midi_conversion" function?
This what I had in mind. But maybe changing the source code is a much
better idea.
WIth regards,
Bernard
-Harm
_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user