#include "evoral/midi_util.h"
#include "evoral/Note.hpp"
-#include "ardour/beats_frames_converter.h"
+#include "ardour/beats_samples_converter.h"
#include "ardour/midi_model.h"
#include "ardour/midi_region.h"
#include "ardour/midi_source.h"
if (note->time() + fdelta >= 0) {
cmd->change (note, prop, note->time() + fdelta);
} else {
- cmd->change (note, prop, Evoral::Beats());
+ cmd->change (note, prop, Temporal::Beats());
}
break;
case MidiModel::NoteDiffCommand::Velocity:
break;
case MidiModel::NoteDiffCommand::Length:
if (note->length().to_double() + fdelta >=
- Evoral::Beats::tick().to_double()) {
+ Temporal::Beats::tick().to_double()) {
cmd->change (note, prop, note->length() + fdelta);
} else {
- cmd->change (note, prop, Evoral::Beats::tick());
+ cmd->change (note, prop, Temporal::Beats::tick());
}
break;
case MidiModel::NoteDiffCommand::Channel:
if (note->time() + fdelta >= 0) {
cmd->change (note, prop, note->time() + fdelta);
} else {
- cmd->change (note, prop, Evoral::Beats());
+ cmd->change (note, prop, Temporal::Beats());
}
break;
case MidiModel::NoteDiffCommand::Velocity:
break;
case MidiModel::NoteDiffCommand::Length:
if (note->length() + fdelta >=
- Evoral::Beats::tick().to_double()) {
+ Temporal::Beats::tick().to_double()) {
cmd->change (note, prop, note->length() + fdelta);
} else {
- cmd->change (note, prop, Evoral::Beats::tick());
+ cmd->change (note, prop, Temporal::Beats::tick());
}
break;
case MidiModel::NoteDiffCommand::Channel:
if (_session) {
- BeatsFramesConverter conv (_session->tempo_map(), region->position());
+ BeatsSamplesConverter conv (_session->tempo_map(), region->position());
MidiModel::Notes notes = region->midi_source(0)->model()->notes();
TreeModel::Row row;
stringstream ss;
row[columns.note] = (*i)->note();
row[columns.velocity] = (*i)->velocity();
- Timecode::BBT_Time bbt (_session->tempo_map().bbt_at_frame (region->position() + conv.to ((*i)->time())));
+ Timecode::BBT_Time bbt (_session->tempo_map().bbt_at_sample (region->position() + conv.to ((*i)->time())));
ss.str ("");
ss << bbt;
row[columns.start] = ss.str();
bbt.bars = 0;
- const Evoral::Beats dur = (*i)->end_time() - (*i)->time();
+ const Temporal::Beats dur = (*i)->end_time() - (*i)->time();
bbt.beats = dur.get_beats ();
bbt.ticks = dur.get_ticks ();