Commit Graph

20 Commits

Author SHA1 Message Date
Paul Davis b35518e212 switch from boost::{shared,weak}_ptr to std::{shared,weak}_ptr
This is mostly a simple lexical search+replace but the absence of operator< for
std::weak_ptr<T> leads to some complications, particularly with Evoral::Sequence
and ExportPortChannel.
2023-03-24 14:19:15 -06:00
Paul Davis 54597bd803 change the type of reference held by a MidiModel to its MidiSource
This also requires a change in the type of reference held by
a MidiAutomationListBinder.

Both the MidiSource and MidiModel have a reference to each other, and it is
important that we avoid circular references to avoid problems with object
destruction. We had been accomplishing this by having the Model hold a
weak_ptr<MidiSource>. However, the lifetime of a MidiSource and its MidiModel
are coincident and there's really no need to use a smart ptr at all. A normal
reference is just fine. However, due to constructors that accept a serialized
state, we cannot use an actual reference (we cannot set the constructor in the
initializer list), so we use a bare ptr instead.

This forces a similar change in MidiAutomationListBinder, which also maintains
a reference to the Source. However, the only purpose of this object is to
ensure that if the Source is destroyed, relevant commands will be removed from
the undo/redo history, and so all that matters here is that the binder connects
to the Destroyed signal of the source, and arranges for its own destruction
when received.

Note that the previous construction of the binder, actually holding a
shared_ptr<MidiSource> would appear have prevented the Destroyed signal from
ever being emitted (from ~Destructible), and so this may also be a bug fix that
allows MidiSources to actually be deleted (the memory object, not the file).
2022-04-05 20:52:09 -06:00
Ben Loftis 252ae56a08 MIDI Draw: change behavior regarding MIDI Channel of new notes
When adding a note, use these criteria to choose the channel number:
* if the user has explicitly specified a note in the pulldown, use that
* if the user has AUTO selected and we are in a region, choose the nearest note's channel (consistent with velocity behavior)
* as a fallback, query the track for its channel-filter (old behavior)
2021-11-18 08:23:08 -06:00
Paul Davis 0162d3f9d6 GUI changes to *try* to adapt to a world without explicit beats<->samples converter objects (i.e. use AutomationLine::get_origin() instead 2021-08-13 12:51:34 -06:00
Paul Davis 2a08e4bdaa continued work on timeline types conversion. in theory, just editor_ops.cc remains 2021-08-13 12:51:29 -06:00
Robin Gareus 8d28115ec7
Update MIDNAM handling in GUI
* Always use InstrumentInfo for lookups.
  Remove name lookups that directly used gui_property()
* Use set/get_gui_property() only to save/restore state,
  push custom selection to InstrumentInfo.
* Only store custom selection, use unset for "default"
  default = plugin-provided (if available) otherwise general-midi
2020-04-01 16:33:40 +02:00
Robin Gareus 4050ca5633
Update GPL boilerplate and (C)
Copyright-holder and year information is extracted from git log.

git history begins in 2005. So (C) from 1998..2005 is lost. Also some
(C) assignment of commits where the committer didn't use --author.
2019-08-03 15:53:15 +02:00
Robin Gareus 37aaa2d11b
NO-OP: whitespace, alignment 2019-04-08 22:39:22 +02:00
Paul Davis 30b087ab3d globally change all use of "frame" to refer to audio into "sample".
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-09-18 12:39:17 -04:00
Paul Davis cf52d6e4b4 enough with umpteen "i18n.h" files. Consolidate on pbd/i18n.h 2016-07-14 14:45:23 -04:00
David Robillard 2588b1cac9 Trim the include tree. 2014-11-30 23:56:19 -05:00
David Robillard 47c4929bc2 Display gain and midiNote plugin parameters/properties nicely.
Show fancy values on generic GUI controls, automation lane controls, and automation lane verbose cursor.
Fix text display of midiNote values.
Make bigstep of midiNote parameters 12 (one octave).
Add ARDOUR::value_as_string() as a stateless one-stop-shop for value printing.
2014-11-02 02:10:24 -05:00
Paul Davis 0796ccfb65 use newly factored canvas in gtk2_ardour 2014-06-21 11:44:22 -04:00
David Robillard 72d8ca89e2 Support midnam controller value labels. 2014-01-10 20:51:54 -05:00
David Robillard 0fe968a140 Fix whitespace (no functional changes). 2014-01-10 20:51:54 -05:00
Robin Gareus cc960c4f07 remove executable mode-bit from files 2013-06-16 21:54:08 +02:00
Carl Hetherington 3120bae8b4 Don't leave internal edit mode when clicking on an automation region view (#4747).
git-svn-id: svn://localhost/ardour2/branches/3.0@11749 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-03-22 16:41:23 +00:00
Paul Davis ede4ecbb00 megaopus patch #2 for today: remove nframes64_t and sframes_t from source
git-svn-id: svn://localhost/ardour2/branches/3.0@7792 d708f5d6-7413-0410-9779-e7cbd77b26cf
2010-09-17 18:20:37 +00:00
David Robillard 1018368aef Fix spacey tabs...
http://ardour.org/development/styleguide


git-svn-id: svn://localhost/ardour2/branches/3.0@7542 d708f5d6-7413-0410-9779-e7cbd77b26cf
2010-08-04 21:50:57 +00:00
Carl Hetherington 451c5c4d06 Add missing files.
git-svn-id: svn://localhost/ardour2/branches/3.0@7412 d708f5d6-7413-0410-9779-e7cbd77b26cf
2010-07-14 12:29:01 +00:00