/*
- Copyright (C) 2001-2007 Paul Davis
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-*/
+ * Copyright (C) 2006-2014 David Robillard <d@drobilla.net>
+ * Copyright (C) 2007 Doug McLain <doug@nostar.net>
+ * Copyright (C) 2008-2017 Paul Davis <paul@linuxaudiosystems.com>
+ * Copyright (C) 2009-2012 Carl Hetherington <carl@carlh.net>
+ * Copyright (C) 2014-2019 Robin Gareus <robin@gareus.org>
+ * Copyright (C) 2015 Tim Mayberry <mojofunk@gmail.com>
+ * Copyright (C) 2016 Nick Mainsbridge <mainsbridge@gmail.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
#include <cmath>
#include <utility>
draw_note_lines();
- NoteRangeChanged();
+ NoteRangeChanged(); /* EMIT SIGNAL*/
}
void
apply_note_range_to_regions ();
}
- NoteRangeChanged();
+ NoteRangeChanged(); /* EMIT SIGNAL*/
}
void
{
// cerr << _trackview.name() << " streamview SRB\n";
- if (_trackview.session()->transport_rolling()) {
+ if (!_trackview.session()->transport_stopped()) {
if (!rec_active &&
_trackview.session()->record_status() == Session::Recording &&
// handle multi
- framepos_t start = 0;
+ samplepos_t start = 0;
if (rec_regions.size() > 0) {
start = rec_regions.back().first->start()
- + _trackview.track()->get_captured_frames(rec_regions.size()-1);
+ + _trackview.track()->get_captured_samples (rec_regions.size() - 1);
}
if (!rec_regions.empty()) {
is so that the RegionView gets created with a non-zero width, as apparently
creating a RegionView with a zero width causes it never to be displayed
(there is a warning in TimeAxisViewItem::init about this). However, we
- must also set length_beats to something non-zero, otherwise the frame length
+ must also set length_beats to something non-zero, otherwise the sample length
of 1 causes length_beats to be set to some small quantity << 1. Then
when the position is set up below, this length_beats is used to recompute
- length using BeatsFramesConverter::to, which is slightly innacurate for small
+ length using BeatsSamplesConverter::to, which is slightly innacurate for small
beats values because it converts floating point beats to bars, beats and
integer ticks. The upshot of which being that length gets set back to 0,
meaning no region view is ever seen, meaning no MIDI notes during record (#3820).
(RegionFactory::create (sources, plist, false)));
if (region) {
region->set_start (_trackview.track()->current_capture_start()
- - _trackview.track()->get_capture_start_frame (0));
- region->set_position (_trackview.session()->transport_frame());
+ - _trackview.track()->get_capture_start_sample (0));
+ region->set_position (_trackview.session()->transport_sample());
RegionView* rv = add_region_view_internal (region, false, true);
MidiRegionView* mrv = dynamic_cast<MidiRegionView*> (rv);
/* start a new rec box */
- create_rec_box(_trackview.midi_track()->current_capture_start(), 0);
+ create_rec_box (_trackview.midi_track()->current_capture_start(), 0);
} else if (rec_active &&
(_trackview.session()->record_status() != Session::Recording ||
};
bool
-MidiStreamView::paste (ARDOUR::framepos_t pos, const Selection& selection, PasteContext& ctx, const int32_t sub_num)
+MidiStreamView::paste (ARDOUR::samplepos_t pos, const Selection& selection, PasteContext& ctx, const int32_t sub_num)
{
/* Paste into the first region which starts on or before pos. Only called when
using an internal editing tool. */