#include "midi++/midnam_patch.h"
-#include "ardour/midi_patch_manager.h"
#include "ardour/beats_frames_converter.h"
#include "ardour/instrument_info.h"
/** @param tc If non-0, a time converter for this patch change. If 0, time control will be desensitized */
PatchChangeDialog::PatchChangeDialog (
- const ARDOUR::BeatsFramesConverter* tc,
- ARDOUR::Session* session,
- Evoral::PatchChange<Evoral::MusicalTime> const & patch,
- ARDOUR::InstrumentInfo& info,
- const Gtk::BuiltinStockID& ok,
- bool allow_delete)
+ const ARDOUR::BeatsFramesConverter* tc,
+ ARDOUR::Session* session,
+ Evoral::PatchChange<Evoral::Beats> const & patch,
+ ARDOUR::InstrumentInfo& info,
+ const Gtk::BuiltinStockID& ok,
+ bool allow_delete)
: ArdourDialog (_("Patch Change"), true)
, _time_converter (tc)
, _info (info)
fill_patch_combo ();
}
-Evoral::PatchChange<Evoral::MusicalTime>
+Evoral::PatchChange<Evoral::Beats>
PatchChangeDialog::patch () const
{
- Evoral::MusicalTime t = 0;
+ Evoral::Beats t = Evoral::Beats();
if (_time_converter) {
t = _time_converter->from (_time.current_time ());
}
- return Evoral::PatchChange<Evoral::MusicalTime> (
+ return Evoral::PatchChange<Evoral::Beats> (
t,
_channel.get_value_as_int() - 1,
_program.get_value_as_int() - 1,
boost::replace_all (n, "_", " ");
MIDI::Name::PatchPrimaryKey const & key = (*j)->patch_primary_key ();
- if (key.program_number == _program.get_value() - 1) {
+ if (key.program() == _program.get_value() - 1) {
_ignore_signals = true;
_patch_combo.set_active_text (n);
_ignore_signals = false;