mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-10 16:46:35 +01:00
add new per-session MIDI-region-copy-is-fork: if set, all MIDI region copies 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
This commit is contained in:
parent
13dc17bb4e
commit
7cded3707f
5 changed files with 17 additions and 3 deletions
|
|
@ -260,6 +260,15 @@ SessionOptionEditor::SessionOptionEditor (Session* s)
|
||||||
|
|
||||||
add_option (_("Misc"), lm);
|
add_option (_("Misc"), lm);
|
||||||
|
|
||||||
|
add_option (_("Misc"), new OptionEditorHeading (_("MIDI Options")));
|
||||||
|
|
||||||
|
add_option (_("Misc"), new BoolOption (
|
||||||
|
"midi-copy-is-fork",
|
||||||
|
_("MIDI region copies are independent"),
|
||||||
|
sigc::mem_fun (*_session_config, &SessionConfiguration::get_midi_copy_is_fork),
|
||||||
|
sigc::mem_fun (*_session_config, &SessionConfiguration::set_midi_copy_is_fork)
|
||||||
|
));
|
||||||
|
|
||||||
add_option (_("Misc"), new OptionEditorHeading (_("MIDI Note Overlaps")));
|
add_option (_("Misc"), new OptionEditorHeading (_("MIDI Note Overlaps")));
|
||||||
|
|
||||||
ComboOption<InsertMergePolicy>* li = new ComboOption<InsertMergePolicy> (
|
ComboOption<InsertMergePolicy>* li = new ComboOption<InsertMergePolicy> (
|
||||||
|
|
|
||||||
|
|
@ -63,7 +63,7 @@ class MidiRegion : public Region
|
||||||
|
|
||||||
~MidiRegion();
|
~MidiRegion();
|
||||||
|
|
||||||
boost::shared_ptr<MidiRegion> clone ();
|
boost::shared_ptr<MidiRegion> clone () const;
|
||||||
|
|
||||||
boost::shared_ptr<MidiSource> midi_source (uint32_t n=0) const;
|
boost::shared_ptr<MidiSource> midi_source (uint32_t n=0) const;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -62,3 +62,4 @@ CONFIG_VARIABLE (InsertMergePolicy, insert_merge_policy, "insert-merge-policy",
|
||||||
CONFIG_VARIABLE (framecnt_t, timecode_offset, "timecode-offset", 0)
|
CONFIG_VARIABLE (framecnt_t, timecode_offset, "timecode-offset", 0)
|
||||||
CONFIG_VARIABLE (bool, timecode_offset_negative, "timecode-offset-negative", true)
|
CONFIG_VARIABLE (bool, timecode_offset_negative, "timecode-offset-negative", true)
|
||||||
CONFIG_VARIABLE (bool, glue_new_markers_to_bars_and_beats, "glue-new-markers-to-bars-and-beats", false)
|
CONFIG_VARIABLE (bool, glue_new_markers_to_bars_and_beats, "glue-new-markers-to-bars-and-beats", false)
|
||||||
|
CONFIG_VARIABLE (bool, midi_copy_is_fork, "midi-copy-is-fork", false)
|
||||||
|
|
|
||||||
|
|
@ -118,7 +118,7 @@ MidiRegion::~MidiRegion ()
|
||||||
/** Create a new MidiRegion that has its own version of some/all of the Source used by another.
|
/** Create a new MidiRegion that has its own version of some/all of the Source used by another.
|
||||||
*/
|
*/
|
||||||
boost::shared_ptr<MidiRegion>
|
boost::shared_ptr<MidiRegion>
|
||||||
MidiRegion::clone ()
|
MidiRegion::clone () const
|
||||||
{
|
{
|
||||||
BeatsFramesConverter bfc (_session.tempo_map(), _position);
|
BeatsFramesConverter bfc (_session.tempo_map(), _position);
|
||||||
Evoral::MusicalTime const bbegin = bfc.from (_start);
|
Evoral::MusicalTime const bbegin = bfc.from (_start);
|
||||||
|
|
|
||||||
|
|
@ -58,7 +58,11 @@ RegionFactory::create (boost::shared_ptr<const Region> region, bool announce)
|
||||||
|
|
||||||
} else if ((mr = boost::dynamic_pointer_cast<const MidiRegion>(region)) != 0) {
|
} else if ((mr = boost::dynamic_pointer_cast<const MidiRegion>(region)) != 0) {
|
||||||
|
|
||||||
ret = boost::shared_ptr<Region> (new MidiRegion (mr, 0));
|
if (mr->session().config.get_midi_copy_is_fork()) {
|
||||||
|
ret = mr->clone ();
|
||||||
|
} else {
|
||||||
|
ret = boost::shared_ptr<Region> (new MidiRegion (mr, 0));
|
||||||
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
fatal << _("programming error: RegionFactory::create() called with unknown Region type")
|
fatal << _("programming error: RegionFactory::create() called with unknown Region type")
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue