summaryrefslogtreecommitdiff
path: root/libs/ardour/quantize.cc
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2007-10-14 05:45:31 +0000
committerDavid Robillard <d@drobilla.net>2007-10-14 05:45:31 +0000
commit14dcc3f0170f8c723bcef0a59562adce0e8e7596 (patch)
treeca173319a68bd575a0721236df90d14a57cbda86 /libs/ardour/quantize.cc
parent15af67c179ce336867c8f783388384f3ce214a99 (diff)
Fix displaying of notes in auto-created MIDI region when it's the first region in the track.
Fix crash after recording long phrases of MIDI. Fix MIDI looping (kinda). Add note-off exposure to MidiModel::iterator. Fix first-note-is-stuck-note problem. Fix resolving long notes while recording. Fix several other things I forget now. MIDI works pretty well..... git-svn-id: svn://localhost/ardour2/trunk@2555 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/quantize.cc')
-rw-r--r--libs/ardour/quantize.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/libs/ardour/quantize.cc b/libs/ardour/quantize.cc
index 5da30e8466..c29144996c 100644
--- a/libs/ardour/quantize.cc
+++ b/libs/ardour/quantize.cc
@@ -70,13 +70,13 @@ Quantize::run (boost::shared_ptr<Region> r)
double q_frames = _q * (m.frames_per_bar(t, session.frame_rate()) / (double)m.beats_per_bar());
for (MidiModel::Notes::iterator i = model->notes().begin(); i != model->notes().end(); ++i) {
- const double new_time = lrint(i->time() / q_frames) * q_frames;
- const double new_dur = ((i->time() != 0 && new_dur < (q_frames * 1.5))
+ const double new_time = lrint((*i)->time() / q_frames) * q_frames;
+ const double new_dur = (((*i)->time() != 0 && new_dur < (q_frames * 1.5))
? q_frames
- : lrint(i->duration() / q_frames) * q_frames);
+ : lrint((*i)->duration() / q_frames) * q_frames);
- i->set_time(new_time);
- i->set_duration(new_dur);
+ (*i)->set_time(new_time);
+ (*i)->set_duration(new_dur);
}
model->set_edited(true);