summaryrefslogtreecommitdiff
path: root/libs/ardour/region_factory.cc
AgeCommit message (Collapse)Author
2017-09-18globally change all use of "frame" to refer to audio into "sample".Paul Davis
Generated by tools/f2s. Some hand-editing will be required in a few places to fix up comments related to timecode and video in order to keep the legible
2017-05-25Always create a deep copy of MIDI regions when copying playlists.Robin Gareus
2017-02-04rework snapnick_m
snap now fills in a struct (MusicFrame) which contins a snapped frame along with a music divisor. this gives useful information wrt magnetic snap which may or may not have rounded to an exact musical position. region position may now be set musically (using quarter notes for now). this patch fixes several problems in the current code: - dragging a list of music-locked regions now maintains correct musical offsets within the list. - splitting regions using magnetic snap works correctly (#7192) - cut drag should now work correctly with magnetic snap. - musical length of split midi regions is no longer frame based.
2016-07-14enough with umpteen "i18n.h" files. Consolidate on pbd/i18n.hPaul Davis
2016-07-10remove reference "const int32_t&" -> const int32_t"Robin Gareus
this simplifies lua-bindings and also let's the compiler worry about constant primitive types.
2016-07-10Fix missing note divisor when creating regions, ensure an existing musical ↵nick_m
time is not altered.
2016-07-10Exact beat - provide audio->music mapping for region split.nick_m
- for those not in the know, this series provides a way to remove the temporal distortion introduced when using an audio frame-based gui for music-locked objects. In short, the gui uses an audio frame representation to move objects. It displays the object using frame_at_beat(), quantizing the time value to audio frames. This is fine until the user selects that frame but expects it to be interpreted as a beat. Thus beat_at_frame() would not produce the user-expected beat (temporal quantization error of up to 0.5 audio samples). This is one method of mapping audio time to music time accurately.
2016-06-28changes in logic used by source cleanup to avoid endless recursion in ↵Paul Davis
sessions with deeply nested/recursive compound regions. This also fixes some potentially dangerous cleanup logic related to two sources with the same name (but different paths)
2016-06-07Ensure correct lock style before setting position.nick_m
2015-10-05NOOP, remove trailing tabs/whitespace.Robin Gareus
2014-11-14Fix crash when copying MIDI regions with midi-copy-is-fork is on (#6002).David Robillard
2014-11-14add abort() to non-reached codeRobin Gareus
This cleans up a lot of false-positives in static analysis and also helps compilers to optimize code paths in general. (tagging the fatal stingstream operator as ‘noreturn’ is far less trivial)
2013-08-04'libs/ardour' - Use 'std::vector' instead of dynamically sized arrays ↵John Emmas
(required to be buildable with MSVC)
2012-07-25convert from Glib:: to Glib::Threads for all thread-related APIPaul Davis
git-svn-id: svn://localhost/ardour2/branches/3.0@13084 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-06-18Use a map of region names to speed upCarl Hetherington
RegionFactory::new_region_name; should help with #2982. git-svn-id: svn://localhost/ardour2/branches/3.0@12753 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-05-30rethink how to load legacy crossfades as new-style xfadesPaul Davis
git-svn-id: svn://localhost/ardour2/branches/3.0@12496 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-05-30debugging legacy xfade loading, part 2Paul Davis
git-svn-id: svn://localhost/ardour2/branches/3.0@12494 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-05-27don't add regions created with announce=false to the global region map. i ↵Paul Davis
hope this doesn't have too many side effects ... git-svn-id: svn://localhost/ardour2/branches/3.0@12457 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-05-24Remove over 500 unnecessary includes (including 54 of session.h).David Robillard
It's slightly possible that this causes trivial build failures on different configurations, but otherwise shouldn't cause any problems (i.e. no actual changes other than include/naming/namespace stuff). I deliberately avoided removing libardour-config.h since this can mysteriously break things, though a few of those do seem to be unnecessary. This commit only targets includes of ardour/*.h. There is also a very large number of unnecessary includes of stuff in gtk2_ardour; tackling that should also give a big improvement in build time when things are modified. git-svn-id: svn://localhost/ardour2/branches/3.0@12420 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-05-15remove two instances of static/global ScopedConnectionList. one remains ↵Paul Davis
worth thinking about for semantics (libs/pbd/controllable.cc:registry_connections) git-svn-id: svn://localhost/ardour2/branches/3.0@12295 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-05-15Remove unused method.Carl Hetherington
git-svn-id: svn://localhost/ardour2/branches/3.0@12284 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-05-15Remove bind to shared_ptr.Carl Hetherington
git-svn-id: svn://localhost/ardour2/branches/3.0@12281 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-04-11Fix use of invalidated iterator (#4822).Carl Hetherington
git-svn-id: svn://localhost/ardour2/branches/3.0@11893 d708f5d6-7413-0410-9779-e7cbd77b26cf
2011-12-05when doing a pure copy of a region, which resets the position, reset the ↵Paul Davis
position to the original after returning from the copy constructor. this keeps the semantics similar to the copy done usign a property list, where position etc. is expected to be set after construction. fixes #4519 git-svn-id: svn://localhost/ardour2/branches/3.0@10906 d708f5d6-7413-0410-9779-e7cbd77b26cf
2011-11-24Add option to glue new regions to bars and beats (#4202).Carl Hetherington
git-svn-id: svn://localhost/ardour2/branches/3.0@10821 d708f5d6-7413-0410-9779-e7cbd77b26cf
2011-10-29tweaks to boost debug related code, from a boost debugging sessionPaul Davis
git-svn-id: svn://localhost/ardour2/branches/3.0@10336 d708f5d6-7413-0410-9779-e7cbd77b26cf
2011-10-19Trim include tree.David Robillard
git-svn-id: svn://localhost/ardour2/branches/3.0@10244 d708f5d6-7413-0410-9779-e7cbd77b26cf
2011-10-13add new per-session MIDI-region-copy-is-fork: if set, all MIDI region copies ↵Paul Davis
will be independent from each other (via MIDIRegion::clone()); visible in Session properties editor under the Misc tab git-svn-id: svn://localhost/ardour2/branches/3.0@10207 d708f5d6-7413-0410-9779-e7cbd77b26cf
2011-06-01Fix broken whitespace. I'd apologize for the compile times if it was my ↵David Robillard
fault :D git-svn-id: svn://localhost/ardour2/branches/3.0@9654 d708f5d6-7413-0410-9779-e7cbd77b26cf
2011-05-25correct the logic used when building a compound region to include a ↵Paul Davis
whole-file (whole-source) region as a parent for the region list git-svn-id: svn://localhost/ardour2/branches/3.0@9584 d708f5d6-7413-0410-9779-e7cbd77b26cf
2011-05-22rationalize and improve region naming conventions to cover compound regionsPaul Davis
git-svn-id: svn://localhost/ardour2/branches/3.0@9569 d708f5d6-7413-0410-9779-e7cbd77b26cf
2011-05-22basic uncombining (no post-facto region trimming)Paul Davis
git-svn-id: svn://localhost/ardour2/branches/3.0@9566 d708f5d6-7413-0410-9779-e7cbd77b26cf
2011-03-01improve, cleanup, rationalize Session::cleanup_sources() and supporting ↵Paul Davis
infrastructure git-svn-id: svn://localhost/ardour2/branches/3.0@9015 d708f5d6-7413-0410-9779-e7cbd77b26cf
2011-02-10#ifdef-ize all/most uses of the boost debug hooks APIPaul Davis
git-svn-id: svn://localhost/ardour2/branches/3.0@8823 d708f5d6-7413-0410-9779-e7cbd77b26cf
2010-12-22Remove lying comment.David Robillard
git-svn-id: svn://localhost/ardour2/branches/3.0@8323 d708f5d6-7413-0410-9779-e7cbd77b26cf
2010-12-22Less code.David Robillard
git-svn-id: svn://localhost/ardour2/branches/3.0@8322 d708f5d6-7413-0410-9779-e7cbd77b26cf
2010-12-21Consistently mark all regions "interesting".David Robillard
(I havn't used the shared_ptr debugging stuff, but presumably marking an arbitrary subset of allocated regions "interesting" is not the idea...). git-svn-id: svn://localhost/ardour2/branches/3.0@8321 d708f5d6-7413-0410-9779-e7cbd77b26cf
2010-12-21Remove confuzzling offset_relative stuff from region construction ↵David Robillard
(pre-properties "hangover"). This commit (in theory) only reorganizes code, not change actual functionality. RegionFactory now uses a distinct Region constructor for each case, which is a bit easier to wrap around. Note comment at region.cc:276, this case seems pretty weird to me (more hangover?). git-svn-id: svn://localhost/ardour2/branches/3.0@8320 d708f5d6-7413-0410-9779-e7cbd77b26cf
2010-12-20Fix more broken whitespace.David Robillard
git-svn-id: svn://localhost/ardour2/branches/3.0@8313 d708f5d6-7413-0410-9779-e7cbd77b26cf
2010-11-05try to sensibly handle repeated imports of the same file. the same thing ↵Paul Davis
might be required for embeds git-svn-id: svn://localhost/ardour2/branches/3.0@7975 d708f5d6-7413-0410-9779-e7cbd77b26cf
2010-09-21missing part of lincoln's patchPaul Davis
git-svn-id: svn://localhost/ardour2/branches/3.0@7819 d708f5d6-7413-0410-9779-e7cbd77b26cf
2010-09-17megaopus commit: (1) add __STD_(LIMIT|FORMAT)_MACROS to command line flags ↵Paul Davis
for cc and c++ builds, remove them from source (2) add new Property::midi_data used by MidiRegion to signal that its (MIDI) contents have changed (3) massive switch from nframes_t to framepos_t/framecnt_t including removal of ARDOUR::max_frames (replaced by ARDOUR::max_frame{pos,cnt} (lots more to do but this set was driven by changes to the Diskstream API to use framepos_t git-svn-id: svn://localhost/ardour2/branches/3.0@7791 d708f5d6-7413-0410-9779-e7cbd77b26cf
2010-08-25Rename various things in the property system.Carl Hetherington
git-svn-id: svn://localhost/ardour2/branches/3.0@7681 d708f5d6-7413-0410-9779-e7cbd77b26cf
2010-07-20add note IDs and use them for looking up notes during a history rebuild. ↵Paul Davis
NOTE: INVALIDATES OLDER HISTORY FILES git-svn-id: svn://localhost/ardour2/branches/3.0@7449 d708f5d6-7413-0410-9779-e7cbd77b26cf
2010-07-01debug outputPaul Davis
git-svn-id: svn://localhost/ardour2/branches/3.0@7345 d708f5d6-7413-0410-9779-e7cbd77b26cf
2010-06-26lots of details relating to MIDI file management; try to ignore ALSA ↵Paul Davis
sequencer MIDI ports named "Midi-Through" git-svn-id: svn://localhost/ardour2/branches/3.0@7305 d708f5d6-7413-0410-9779-e7cbd77b26cf
2010-06-23midway snapshot of work done on managing Region & Source lifetimes ↵Paul Davis
correctly. may fix missing MIDI file bug ; save empty playlists because they may be referred to by the history file ; undo commands auto-delete when objects they refer to die (currently not commands built from XML deserialization); Sources now know how many regions are using them for something, meaning that we know if we can delete the files holding any data for the source git-svn-id: svn://localhost/ardour2/branches/3.0@7291 d708f5d6-7413-0410-9779-e7cbd77b26cf
2010-03-30Move region naming stuff from Session into RegionFactory, cleaning up some ↵Carl Hetherington
vestiges of when Session had a list of regions. git-svn-id: svn://localhost/ardour2/branches/3.0@6812 d708f5d6-7413-0410-9779-e7cbd77b26cf
2010-03-06remove the session region list; GUI now represents (a relatively unfiltered ↵Paul Davis
view of) the raw region list that always contains every single region ever created git-svn-id: svn://localhost/ardour2/branches/3.0@6739 d708f5d6-7413-0410-9779-e7cbd77b26cf
2010-03-02(1) remove most uses of MementoCommand for Playlist and Region (2) move ↵Paul Davis
frozen state from Region into Stateful, renamed "suspend property changes" (3) successive changes to a Property (scalar) after clear_history() do not keep resetting the old value (fixes region trim) git-svn-id: svn://localhost/ardour2/branches/3.0@6720 d708f5d6-7413-0410-9779-e7cbd77b26cf