lilypond-devel
[Top][All Lists]
Advanced

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

Re: Map voices to channels in MIDI output


From: Keith OHara
Subject: Re: Map voices to channels in MIDI output
Date: Mon, 14 Mar 2011 21:49:33 -0700
User-agent: Opera Mail/11.01 (Win32)

On Mon, 14 Mar 2011 14:19:46 -0700, Jan Nieuwenhuizen <address@hidden> wrote:

Keith OHara schreef op ma 14-03-2011 om 13:50 [-0700]:

Dynamics are newly implemented as note-on-velocity,
but the old implementation as channel-volume is still there,

What would the correct fix be?

Well, MIDI note-on-velocity is intended for dynamics.  MIDI channel volume is 
intended for balance, like Lilypond's midiMinimumVolume.
In a development branch, implementing note dynamics purely as note-on-velocity 
would allow MIDI-interested-hackers to use volume for :
1) re-balancing the instruments (because the new implementation messed up the 
equalizer)
2) implementing (de)crescendi on held notes (which sometimes works accidentally 
in 2.12, due I think to notes in other voices creating volume changes on the 
held note)

We could revert the velocity changes, and have 'voice mode not
reuse channels...
Very sensible for the stable version.

Do you want the new MIDI output in 2.14
Yes.
Why?
It's better and newer!

Oh!  That's where we've misunderstood each other.
Lilypond uses an even/odd version numbering system.  2.14 has an even minor 
version number, meaning it is a stable release.  I'm not a programmer, but I've 
worked with them enough to know that better and newer things usually require 
some time before becoming stable.


So it would be prudent for each new track to always set the
instrument?  That should be doable.

Prudent.

In fact, this should do it

diff --git a/lily/staff-performer.cc b/lily/staff-performer.cc
@@ @@ Staff_performer::new_audio_staff (string voice)
+  if (!instrument_string_.empty ())
+    set_instrument (channel_, voice);

Segfaults during midi generation.

Thinking the segfault might be have same cause as what Neil uncovered
      http://lists.gnu.org/archive/html/lilypond-devel/2011-03/msg00375.html
I applied the 'obvious' fix for that problem, which is two lines above your 
suggestion.
This fix allowed make check to succeed, so I pushed 8b9e7a706f .  Please adjust 
if the 'obvious' is not what you intended.

Adding set_instrument() as above still segfaults.  It seems channel_ == 0 at 
this point.




reply via email to

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