root.add_child_nocopy (*freeze_node);
}
- root.add_property (X_("note-mode"), enum_2_string (_note_mode));
-
- root.add_property ("step-editing", (_step_editing ? "yes" : "no"));
root.add_property ("note-mode", enum_2_string (_note_mode));
+ root.add_property ("step-editing", (_step_editing ? "yes" : "no"));
root.add_property ("input-active", (_input_active ? "yes" : "no"));
return root;
int
MidiTrack::roll (pframes_t nframes, framepos_t start_frame, framepos_t end_frame, int declick, bool& need_butler)
{
- Glib::RWLock::ReaderLock lm (_processor_lock, Glib::TRY_LOCK);
+ Glib::Threads::RWLock::ReaderLock lm (_processor_lock, Glib::Threads::TRY_LOCK);
if (!lm.locked()) {
return 0;
}
BufferSet& bufs = _session.get_scratch_buffers (n_process_buffers());
MidiBuffer& mbuf (bufs.get_midi (0));
- /* we are a MIDI track, so we always start the chain with a single-channel diskstream */
+ /* we are a MIDI track, so we always start the chain with a
+ * single-MIDI-channel diskstream
+ */
ChanCount c;
c.set_audio (0);
c.set_midi (1);
bufs.set_count (c);
+ assert (nframes > 0);
+
diskstream->get_playback (mbuf, nframes);
/* append immediate messages to the first MIDI buffer (thus sending it to the first output port) */
void
MidiTrack::realtime_locate ()
{
- Glib::RWLock::ReaderLock lm (_processor_lock, Glib::TRY_LOCK);
+ Glib::Threads::RWLock::ReaderLock lm (_processor_lock, Glib::Threads::TRY_LOCK);
if (!lm.locked ()) {
return;
void
MidiTrack::realtime_handle_transport_stopped ()
{
- Glib::RWLock::ReaderLock lm (_processor_lock, Glib::TRY_LOCK);
+ Glib::Threads::RWLock::ReaderLock lm (_processor_lock, Glib::Threads::TRY_LOCK);
if (!lm.locked ()) {
return;
midi_diskstream()->set_note_mode(m);
}
+std::string
+MidiTrack::describe_parameter (Evoral::Parameter param)
+{
+ const std::string str(instrument_info().get_controller_name(param));
+ return str.empty() ? Automatable::describe_parameter(param) : str;
+}
+
void
MidiTrack::midi_panic()
{
MonitorState
MidiTrack::monitoring_state () const
{
- /* Explicit requests */
-
- if (_monitoring & MonitorInput) {
+ MonitorState ms = Track::monitoring_state();
+ if (ms == MonitoringSilence) {
return MonitoringInput;
- }
-
- if (_monitoring & MonitorDisk) {
- return MonitoringDisk;
- }
-
- if (_session.transport_rolling()) {
- return MonitoringDisk;
}
-
- /* the return value here doesn't mean that we're actually monitoring
- * input, let alone input *audio*. but it means that we are NOT
- * monitoring silence. this allows us to still hear any audio generated
- * by using internal generation techniques
- */
-
- return MonitoringInput;
+ return ms;
}