add the concept of a length that is data-independent to MIDI files (GUI)
This commit is contained in:
parent
ebcc6b8250
commit
c7192b4cc0
@ -2451,6 +2451,9 @@ EditingContext::reset_zoom (samplecnt_t spp)
|
|||||||
|
|
||||||
pending_visual_change.add (VisualChange::ZoomLevel);
|
pending_visual_change.add (VisualChange::ZoomLevel);
|
||||||
pending_visual_change.samples_per_pixel = spp;
|
pending_visual_change.samples_per_pixel = spp;
|
||||||
|
if (spp == 0.0) {
|
||||||
|
PBD::stacktrace (std::cerr, 12);
|
||||||
|
}
|
||||||
ensure_visual_change_idle_handler ();
|
ensure_visual_change_idle_handler ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -466,7 +466,7 @@ MidiCueEditor::toolbox ()
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
MidiCueEditor::data_captured (timecnt_t total_duration)
|
MidiCueEditor::data_captured (samplecnt_t total_duration)
|
||||||
{
|
{
|
||||||
data_capture_duration = total_duration;
|
data_capture_duration = total_duration;
|
||||||
|
|
||||||
@ -474,14 +474,13 @@ MidiCueEditor::data_captured (timecnt_t total_duration)
|
|||||||
Glib::signal_idle().connect (sigc::mem_fun (*this, &MidiCueEditor::idle_data_captured));
|
Glib::signal_idle().connect (sigc::mem_fun (*this, &MidiCueEditor::idle_data_captured));
|
||||||
}
|
}
|
||||||
|
|
||||||
samplepos_t pos = data_capture_duration.end().samples();
|
_playhead_cursor->set_position (data_capture_duration);
|
||||||
_playhead_cursor->set_position (pos);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
MidiCueEditor::idle_data_captured ()
|
MidiCueEditor::idle_data_captured ()
|
||||||
{
|
{
|
||||||
double where = duration_to_pixels (data_capture_duration);
|
double where = sample_to_pixel_unrounded (data_capture_duration);
|
||||||
|
|
||||||
if (where > _visible_canvas_width * 0.80) {
|
if (where > _visible_canvas_width * 0.80) {
|
||||||
set_samples_per_pixel (samples_per_pixel * 1.5);
|
set_samples_per_pixel (samples_per_pixel * 1.5);
|
||||||
|
@ -217,10 +217,11 @@ class MidiCueEditor : public CueEditor
|
|||||||
void visual_changer (const VisualChange&);
|
void visual_changer (const VisualChange&);
|
||||||
void bindings_changed ();
|
void bindings_changed ();
|
||||||
|
|
||||||
void data_captured (Temporal::timecnt_t);
|
void data_captured (samplecnt_t);
|
||||||
bool idle_data_captured ();
|
bool idle_data_captured ();
|
||||||
std::atomic<int> idle_update_queued;
|
std::atomic<int> idle_update_queued;
|
||||||
Temporal::timecnt_t data_capture_duration;
|
PBD::ScopedConnectionList capture_connections;
|
||||||
|
samplecnt_t data_capture_duration;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -4498,7 +4498,7 @@ MidiView::set_step_edit_cursor_width (Temporal::Beats beats)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
MidiView::clip_data_recorded (timecnt_t const & total_duration)
|
MidiView::clip_data_recorded (samplecnt_t total_duration)
|
||||||
{
|
{
|
||||||
if (!_midi_track) {
|
if (!_midi_track) {
|
||||||
return;
|
return;
|
||||||
@ -4573,7 +4573,7 @@ MidiView::clip_data_recorded (timecnt_t const & total_duration)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
active_note_end = total_duration;
|
active_note_end = timecnt_t (total_duration);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Called when a diskstream on our track has received some data. Update the view, if applicable.
|
/** Called when a diskstream on our track has received some data. Update the view, if applicable.
|
||||||
|
@ -341,7 +341,7 @@ class MidiView : public virtual sigc::trackable, public LineMerger
|
|||||||
EditingContext& editing_context() const { return _editing_context; }
|
EditingContext& editing_context() const { return _editing_context; }
|
||||||
MidiViewBackground& midi_context() const { return _midi_context; }
|
MidiViewBackground& midi_context() const { return _midi_context; }
|
||||||
|
|
||||||
void clip_data_recorded (Temporal::timecnt_t const &);
|
void clip_data_recorded (samplecnt_t);
|
||||||
|
|
||||||
virtual void select_self (bool add) {}
|
virtual void select_self (bool add) {}
|
||||||
virtual void unselect_self () {}
|
virtual void unselect_self () {}
|
||||||
|
@ -797,7 +797,6 @@ TriggerUI::trigger_changed (PropertyChange const& what)
|
|||||||
on_trigger_changed(what);
|
on_trigger_changed(what);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
TriggerUI::set_trigger (ARDOUR::TriggerReference tr)
|
TriggerUI::set_trigger (ARDOUR::TriggerReference tr)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user