Remove dead code
[ardour.git] / libs / ardour / midi_track.cc
index b79a1cf52cd6b56f85e7d20650ae45b596dff29a..c17bc916d9cbab61842f74632dad974dadd2a0d1 100644 (file)
@@ -339,7 +339,7 @@ MidiTrack::update_controls(const BufferSet& bufs)
 {
        const MidiBuffer& buf = bufs.get_midi(0);
        for (MidiBuffer::const_iterator e = buf.begin(); e != buf.end(); ++e) {
-               const Evoral::MIDIEvent<framepos_t>&     ev      = *e;
+               const Evoral::Event<framepos_t>&         ev      = *e;
                const Evoral::Parameter                  param   = midi_parameter(ev.buffer(), ev.size());
                const boost::shared_ptr<Evoral::Control> control = this->control(param);
                if (control) {
@@ -549,7 +549,7 @@ MidiTrack::push_midi_input_to_step_edit_ringbuffer (framecnt_t nframes)
 
                for (MidiBuffer::const_iterator e = mb->begin(); e != mb->end(); ++e) {
 
-                       const Evoral::MIDIEvent<framepos_t> ev(*e, false);
+                       const Evoral::Event<framepos_t> ev(*e, false);
 
                        /* note on, since for step edit, note length is determined
                           elsewhere
@@ -557,7 +557,7 @@ MidiTrack::push_midi_input_to_step_edit_ringbuffer (framecnt_t nframes)
 
                        if (ev.is_note_on()) {
                                /* we don't care about the time for this purpose */
-                               _step_edit_ring_buffer.write (0, ev.type(), ev.size(), ev.buffer());
+                               _step_edit_ring_buffer.write (0, ev.event_type(), ev.size(), ev.buffer());
                        }
                }
        }
@@ -689,8 +689,7 @@ MidiTrack::write_immediate_event(size_t size, const uint8_t* buf)
                cerr << "WARNING: Ignoring illegal immediate MIDI event" << endl;
                return false;
        }
-       const uint32_t type = midi_parameter_type(buf[0]);
-       return (_immediate_events.write (0, type, size, buf) == size);
+       return (_immediate_events.write (0, Evoral::MIDI_EVENT, size, buf) == size);
 }
 
 void
@@ -701,6 +700,7 @@ MidiTrack::set_parameter_automation_state (Evoral::Parameter param, AutoState st
        case MidiPgmChangeAutomation:
        case MidiPitchBenderAutomation:
        case MidiChannelPressureAutomation:
+       case MidiNotePressureAutomation:
        case MidiSystemExclusiveAutomation:
                /* The track control for MIDI parameters is for immediate events to act
                   as a control surface, write/touch for them is not currently
@@ -757,6 +757,12 @@ MidiTrack::MidiControl::actually_set_value (double val, PBD::Controllable::Group
                        ev[1] = int(val);
                        break;
 
+               case MidiNotePressureAutomation:
+                       ev[0] += MIDI_CMD_NOTE_PRESSURE;
+                       ev[1] = parameter.id();
+                       ev[2] = int(val);
+                       break;
+
                case MidiPitchBenderAutomation:
                        ev[0] += MIDI_CMD_BENDER;
                        ev[1] = 0x7F & int(val);