lilypond-user
[Top][All Lists]
Advanced

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

midiInstrument


From: Martin Tarenskeen
Subject: midiInstrument
Date: Sun, 25 Jul 2010 11:51:14 +0200 (CEST)
User-agent: Alpine 2.00 (LFD 1167 2008-08-23)

Hi,

I never quite liked the way a MIDI instrument is assigned to a staff or voice in Lilypond. You are forced to use the exact names for the midiInstrument property that are hardcoded in midi.scm

Why is this a problem: 1. I can't remember the names without the manual. My brains are getting old I guess ;-) ( "piano 2" ? "bright piano" ? "upright piano" ? Wrong! The correct name is "bright acoustic" )

2. The names are only correct when the MIDI file is played on a General Midi (GM) compatible soundcard, soundfont, synthesizer, or soundmodule. MIDI is more than just GM.

One solution that would already make me happy: It would be nice if instruments could also be selected by number (1-128, or 0-127). Would it be difficult to add some code to (I guess) midi.scm that would change the behaviour from current behaviour:

if instrumentname is wrong ... then instrumentname = "acoustic grand"

to:

if instrumentname is wrong then
        if instrumentname is a number between "0" and "127"
                pick the correct name from the list
        else
                instrumentname = "acoustic grand"

This is not real code, but I hope you get the idea.
Maybe someone can translate this into scheme ? Or maybe someone has a much better idea ?

Martin

P.S. This still would not be THE complete midi solution. Someone in an earlier thread already mentioned the lack of support for the MIDI bank change command.



reply via email to

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