lilypond-devel
[Top][All Lists]
Advanced

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

midi control done twice


From: karl
Subject: midi control done twice
Date: Thu, 9 Jan 2014 12:11:02 +0100 (CET)

 Using tt.ly:

\version "2.19.0"

\score {
  \new Staff {
    \set Staff.midiInstrument = #"electric bass (finger)" % 34
    \set Staff.midiPanPosition = #0
    a'1
  }
  \midi { }
}

 and midi.pl:

#!/usr/bin/perl -w

use strict;
use MIDI;

my $file;
foreach $file (@ARGV) {
    my $opus = MIDI::Opus->new({ 'from_file' => $file });
    $opus->dump({ "dump_tracks" => 1 });
}

 gives me:

$ lilypond tt.ly
$ midi.pl tt.midi
MIDI::Opus->new({
  'format' => 1,
  'ticks'  => 384,
  'tracks' => [   # 2 tracks...

    # Track #0 ...
    MIDI::Track->new({
      'type' => 'MTrk',
      'events' => [  # 5 events.
        ['track_name', 0, 'control track'],
        ['text_event', 0, 'creator: '],
        ['text_event', 0, 'GNU LilyPond 2.19.0           '],
        ['time_signature', 0, 4, 2, 18, 8],
        ['set_tempo', 0, 1000000],
      ]
    }),
    
    # Track #1 ...
    MIDI::Track->new({
      'type' => 'MTrk',
      'events' => [  # 10 events.
        ['patch_change', 0, 0, 33],
        ['control_change', 0, 0, 10, 64],
        ['control_change', 0, 0, 42, 0],
        ['patch_change', 0, 0, 33],
        ['instrument_name', 0, 'electric bass (finger)'],
        ['control_change', 0, 0, 10, 64],
        ['control_change', 0, 0, 42, 0],
        ['control_change', 0, 0, 7, 100],
        ['note_on', 0, 0, 69, 90],
        ['note_on', 1536, 0, 69, 0],
      ]
    }),
    
  ]
});
$

 As seen by the output, patch_change and control messages for panning
(10 is pan MSB, 42 is LSB pan) are done twice.

Regards,
/Karl Hammar

-----------------------------------------------------------------------
Aspö Data
Lilla Aspö 148
S-742 94 Östhammar
Sweden
+46 173 140 57





reply via email to

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