Remove all the now unused functions in the MidiModel class.
authorAndré Nusser <andre.nusser@googlemail.com>
Thu, 15 Oct 2015 13:49:41 +0000 (15:49 +0200)
committerPaul Davis <paul@linuxaudiosystems.com>
Sun, 18 Oct 2015 02:12:55 +0000 (22:12 -0400)
libs/ardour/ardour/midi_model.h
libs/ardour/ardour/midi_region.h
libs/ardour/midi_model.cc
libs/ardour/midi_region.cc

index 80ae71f2060e9b1a2bab8d7356ee92d2d55b497c..21c67c2b32426e09565d041b923a526c3bc88a4c 100644 (file)
@@ -288,7 +288,6 @@ public:
 
        void insert_silence_at_start (TimeType);
        void transpose (NoteDiffCommand *, const NotePtr, int);
-       void transpose (TimeType, TimeType, int);
 
        std::set<WeakNotePtr>& active_notes() { return _active_notes; }
 
index 87e89c695b5709c82925a67076a7aa59b9941f60..250a58aa7046f8cd53466953b85650a67f4b67f8 100644 (file)
@@ -101,7 +101,6 @@ class LIBARDOUR_API MidiRegion : public Region
        boost::shared_ptr<const MidiModel> model() const;
 
        void fix_negative_start ();
-       void transpose (int);
 
   protected:
 
index 5997c5b548b3d2525e70df116954f8b878adb5f2..d9f6e802cfa4609a5c9b55636c21c75b1ad3953c 100644 (file)
@@ -1997,37 +1997,6 @@ MidiModel::transpose (NoteDiffCommand* c, const NotePtr note_ptr, int semitones)
        c->change (note_ptr, NoteDiffCommand::NoteNumber, (uint8_t) new_note);
 }
 
-/** Transpose notes in a time range by a given number of semitones.  Notes
- *  will be clamped at 0 and 127 if the transposition would make them exceed
- *  that range.
- *
- *  @param from Start time.
- *  @param end End time.
- *  @param semitones Number of semitones to transpose by (+ve is higher, -ve is lower).
- */
-void
-MidiModel::transpose (TimeType from, TimeType to, int semitones)
-{
-       boost::shared_ptr<const MidiSource> s = midi_source ();
-
-       NoteDiffCommand* c = new_note_diff_command (_("transpose"));
-
-       for (Notes::iterator i = notes().begin(); i != notes().end(); ++i) {
-
-               if ((*i)->time() >= to) {
-
-                       /* finished */
-                       break;
-
-               } else if ((*i)->time() >= from) {
-
-                       transpose (c, *i, semitones);
-               }
-       }
-
-       apply_command (s->session (), c);
-}
-
 void
 MidiModel::control_list_marked_dirty ()
 {
index 3e4a656ebe2006454672452470fe052a44b7c690..56472e4ba8dca83a364687698c907125cfc4cb8e 100644 (file)
@@ -458,14 +458,6 @@ MidiRegion::fix_negative_start ()
        _start_beats = Evoral::Beats();
 }
 
-/** Transpose the notes in this region by a given number of semitones */
-void
-MidiRegion::transpose (int semitones)
-{
-       BeatsFramesConverter c (_session.tempo_map(), _start);
-       model()->transpose (c.from (_start), c.from (_start + _length), semitones);
-}
-
 void
 MidiRegion::set_start_internal (framecnt_t s)
 {