summaryrefslogtreecommitdiff
path: root/lily/audio-staff.cc
blob: 5d402febf585c279248d46676b2232b7ab95a17f (about) (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
/*
  audio-staff.cc -- implement Audio_staff

  source file of the GNU LilyPond music typesetter

  (c) 1997--2006 Jan Nieuwenhuizen <janneke@gnu.org>
*/

#include "audio-staff.hh"

#include "midi-item.hh"
#include "midi-stream.hh"
#include "midi-walker.hh"

void
Audio_staff::add_audio_item (Audio_item *l)
{
  audio_items_.push_back (l);
}

void
Audio_staff::output (Midi_stream &midi_stream, int channel)
{
  Midi_track midi_track;
  midi_track.number_ = channel;
  
  for (Midi_walker i (this, &midi_track, channel); i.ok (); i++)
    i.process ();
  
  midi_stream << midi_track;
}