13
0

Merge branch 'ardour'

This commit is contained in:
Robin Gareus 2024-09-16 14:46:05 +02:00
commit f1b9f48c87
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04
33 changed files with 12950 additions and 7512 deletions

View File

@ -251,7 +251,9 @@ static const char* translators[] = {
\n\tRobin Gloster <robin@loc-com.de>\n"),
N_("Italian:\n\tVincenzo Reale <smart2128@baslug.org>\
\n\tFilippo Pappalardo <filippo@email.it>\
\n\tRaffaele Morelli <raffaele.morelli@gmail.com>\n"),
\n\tRaffaele Morelli <raffaele.morelli@gmail.com>\
\n\tGuido Pietrella\
\n\tDaniele Tombolini\n"),
N_("Portuguese:\n\tRui Nuno Capela <rncbc@rncbc.org>\n"),
N_("Brazilian Portuguese:\n\tAlexander da Franca Fernandes <alexander@nautae.eti.br>\
\n\tChris Ross <chris@tebibyte.org>\n"),

View File

@ -1134,6 +1134,12 @@ ARDOUR_UI::process_snapshot_session_prompter (Prompter& prompter, bool switch_to
bool do_save = (snapname.length() != 0);
if (do_save && snapname == _session->snap_name ()) {
ArdourMessageDialog msg (_("The currently loaded session name cannot be used as new snapshot.\nJust save the session for this operation."));
msg.run ();
return false;
}
if (do_save) {
std::string const& illegal = Session::session_name_is_legal (snapname);
if (!illegal.empty()) {

View File

@ -60,7 +60,7 @@ AudioRegionEditor::AudioRegionEditor (Session* s, AudioRegionView* arv)
, _audio_region (arv->audio_region ())
, gain_adjustment(accurate_coefficient_to_dB(fabsf (_audio_region->scale_amplitude())), -40.0, +40.0, 0.1, 1.0, 0)
, _polarity_toggle (_("Invert"))
, _pre_fade_fx_toggle (_("Pre-Fade Fx"))
, _fade_before_fx_toggle (_("Fade before Fx"))
, _show_on_touch (_("Show on Touch"))
, _peak_channel (false)
{
@ -95,7 +95,7 @@ AudioRegionEditor::AudioRegionEditor (Session* s, AudioRegionView* arv)
_polarity_label.set_alignment (1, 0.5);
_table.attach (_polarity_label, 0, 1, _table_row, _table_row + 1, Gtk::FILL, Gtk::FILL);
_table.attach (_polarity_toggle, 1, 2, _table_row, _table_row + 1, Gtk::FILL, Gtk::FILL);
_table.attach (_pre_fade_fx_toggle, 2, 3, _table_row, _table_row + 1, Gtk::FILL, Gtk::FILL);
_table.attach (_fade_before_fx_toggle, 2, 3, _table_row, _table_row + 1, Gtk::FILL, Gtk::FILL);
++_table_row;
#ifndef LIVETRAX // no region Fx for Trax
@ -109,16 +109,16 @@ AudioRegionEditor::AudioRegionEditor (Session* s, AudioRegionView* arv)
#endif
UI::instance()->set_tip (_polarity_toggle, _("Invert the signal polarity (180deg phase shift)"));
UI::instance()->set_tip (_pre_fade_fx_toggle, _("Apply region effects before the region fades.\nThis is useful if the effect(s) have tail, that would otherwise be faded out by the region fade (e.g. reverb, delay)"));
UI::instance()->set_tip (_fade_before_fx_toggle, _("Apply region effects after the region fade.\nThis is useful if the effect(s) have tail, which would otherwise be faded out by the region fade (e.g. reverb, delay)"));
UI::instance()->set_tip (_show_on_touch, _("When touching a control in a region effect plugin UI, the corresponding region-automation line is shown the editor, and edit mode is set to 'draw'."));
gain_changed ();
pre_fade_fx_changed ();
fade_before_fx_changed ();
refill_region_line ();
gain_adjustment.signal_value_changed().connect (sigc::mem_fun (*this, &AudioRegionEditor::gain_adjustment_changed));
_polarity_toggle.signal_toggled().connect (sigc::mem_fun (*this, &AudioRegionEditor::gain_adjustment_changed));
_pre_fade_fx_toggle.signal_toggled().connect (sigc::mem_fun (*this, &AudioRegionEditor::pre_fade_fx_toggle_changed));
_fade_before_fx_toggle.signal_toggled().connect (sigc::mem_fun (*this, &AudioRegionEditor::fade_before_fx_toggle_changed));
_show_on_touch.signal_toggled().connect (sigc::mem_fun (*this, &AudioRegionEditor::show_on_touch_changed));
arv->region_line_changed.connect ((sigc::mem_fun (*this, &AudioRegionEditor::refill_region_line)));
@ -153,7 +153,7 @@ AudioRegionEditor::region_changed (const PBD::PropertyChange& what_changed)
}
if (what_changed.contains (ARDOUR::Properties::fade_before_fx)) {
pre_fade_fx_changed ();
fade_before_fx_changed ();
}
if (what_changed.contains (ARDOUR::Properties::start) || what_changed.contains (ARDOUR::Properties::length)) {
@ -194,15 +194,15 @@ AudioRegionEditor::gain_adjustment_changed ()
}
void
AudioRegionEditor::pre_fade_fx_changed ()
AudioRegionEditor::fade_before_fx_changed ()
{
_pre_fade_fx_toggle.set_active (_audio_region->fade_before_fx ());
_fade_before_fx_toggle.set_active (_audio_region->fade_before_fx ());
}
void
AudioRegionEditor::pre_fade_fx_toggle_changed ()
AudioRegionEditor::fade_before_fx_toggle_changed ()
{
_audio_region->set_fade_before_fx (_pre_fade_fx_toggle.get_active ());
_audio_region->set_fade_before_fx (_fade_before_fx_toggle.get_active ());
}
void

View File

@ -74,8 +74,8 @@ private:
void show_on_touch_changed ();
void show_touched_automation (std::weak_ptr<PBD::Controllable>);
void pre_fade_fx_changed ();
void pre_fade_fx_toggle_changed ();
void fade_before_fx_changed ();
void fade_before_fx_toggle_changed ();
AudioRegionView* _arv;
std::shared_ptr<ARDOUR::AudioRegion> _audio_region;
@ -87,7 +87,7 @@ private:
Gtk::Label _polarity_label;
Gtk::CheckButton _polarity_toggle;
Gtk::CheckButton _pre_fade_fx_toggle;
Gtk::CheckButton _fade_before_fx_toggle;
Gtk::Label _peak_amplitude_label;
Gtk::Entry _peak_amplitude;

View File

@ -475,6 +475,7 @@ LV2PluginUI::lv2ui_instantiate(const std::string& title)
if (_lv2->parameter_is_output(i) && is_update_wanted(i)) {
_output_ports.push_back (i);
_values_last_sent_to_ui[i] -= 1; // force update
}
}

View File

@ -927,7 +927,6 @@ MidiRegionView::clear_events ()
}
}
_note_group->clear (true);
_events.clear();
_patch_changes.clear();
@ -1357,9 +1356,14 @@ MidiRegionView::display_patch_changes ()
{
MidiTimeAxisView* const mtv = dynamic_cast<MidiTimeAxisView*>(&trackview);
uint16_t chn_mask = mtv->midi_track()->get_playback_channel_mask();
PatchChanges to_remove = _patch_changes;
for (uint8_t i = 0; i < 16; ++i) {
display_patch_changes_on_channel (i, chn_mask & (1 << i));
display_patch_changes_on_channel (i, chn_mask & (1 << i), to_remove);
}
for (auto const& i : to_remove) {
_patch_changes.erase (i.first);
}
}
@ -1367,8 +1371,9 @@ MidiRegionView::display_patch_changes ()
* them `greyed-out' (as on an inactive channel)
*/
void
MidiRegionView::display_patch_changes_on_channel (uint8_t channel, bool active_channel)
MidiRegionView::display_patch_changes_on_channel (uint8_t channel, bool active_channel, PatchChanges& to_remove)
{
for (MidiModel::PatchChanges::const_iterator i = _model->patch_changes().begin(); i != _model->patch_changes().end(); ++i) {
std::shared_ptr<PatchChange> p;
@ -1393,6 +1398,8 @@ MidiRegionView::display_patch_changes_on_channel (uint8_t channel, bool active_c
p->show();
}
to_remove.erase (p->patch ());
} else {
add_canvas_patch_change (*i);
}
@ -1460,6 +1467,8 @@ MidiRegionView::display_sysexes()
const std::shared_ptr<MidiRegion> mregion (midi_region());
SysExes to_remove = _sys_exes;
for (MidiModel::SysExes::const_iterator i = _model->sysexes().begin(); i != _model->sysexes().end(); ++i) {
MidiModel::SysExPtr sysex_ptr = *i;
timepos_t time = timepos_t (sysex_ptr->time());
@ -1490,11 +1499,12 @@ MidiRegionView::display_sysexes()
if (!sysex) {
sysex = std::shared_ptr<SysEx>(
new SysEx (*this, _note_group, text, height, x, 1.0, sysex_ptr));
new SysEx (*this, group, text, height, x, 1.0, sysex_ptr));
_sys_exes.insert (make_pair (sysex_ptr, sysex));
} else {
sysex->set_height (height);
sysex->item().set_position (ArdourCanvas::Duple (x, 1.0));
to_remove.erase (sysex_ptr);
}
// Show unless message is beyond the region bounds
@ -1504,6 +1514,10 @@ MidiRegionView::display_sysexes()
sysex->show();
}
}
for (auto const& i : to_remove ) {
_sys_exes.erase (i.first);
}
}
void
@ -2031,18 +2045,6 @@ MidiRegionView::add_canvas_patch_change (MidiModel::PatchChangePtr patch)
_patch_changes.insert (make_pair (patch, patch_change));
}
void
MidiRegionView::remove_canvas_patch_change (PatchChange* pc)
{
/* remove the canvas item */
for (PatchChanges::iterator x = _patch_changes.begin(); x != _patch_changes.end(); ++x) {
if (x->second->patch() == pc->patch()) {
_patch_changes.erase (x);
break;
}
}
}
MIDI::Name::PatchPrimaryKey
MidiRegionView::patch_change_to_patch_key (MidiModel::PatchChangePtr p)
{
@ -2096,7 +2098,6 @@ MidiRegionView::change_patch_change (PatchChange& pc, const MIDI::Name::PatchPri
_model->apply_diff_command_as_commit (*trackview.session(), c);
remove_canvas_patch_change (&pc);
display_patch_changes ();
}
@ -2174,7 +2175,6 @@ MidiRegionView::delete_patch_change (PatchChange* pc)
c->remove (pc->patch ());
_model->apply_diff_command_as_commit (*trackview.session(), c);
remove_canvas_patch_change (pc);
display_patch_changes ();
}
@ -4537,16 +4537,13 @@ MidiRegionView::edit_patch_change (PatchChange* pc)
}
void
MidiRegionView::delete_sysex (SysEx* /*sysex*/)
MidiRegionView::delete_sysex (SysEx* sysex)
{
// CAIROCANVAS
// sysyex object doesn't have a pointer to a sysex event
// MidiModel::SysExDiffCommand* c = _model->new_sysex_diff_command (_("delete sysex"));
// c->remove (sysex->sysex());
// _model->apply_command (*trackview.session(), c);
MidiModel::SysExDiffCommand* c = _model->new_sysex_diff_command (_("delete sysex"));
c->remove (sysex->sysex ());
_model->apply_diff_command_as_commit (*trackview.session(), c);
//_sys_exes.clear ();
// display_sysexes();
display_sysexes();
}
std::string

View File

@ -132,7 +132,6 @@ public:
void paste_internal (Temporal::timepos_t const & pos, unsigned paste_count, float times, const MidiCutBuffer&);
void add_canvas_patch_change (ARDOUR::MidiModel::PatchChangePtr patch);
void remove_canvas_patch_change (PatchChange* pc);
/** Look up the given time and channel in the 'automation' and set keys accordingly.
* @param time the time of the patch change event
@ -541,7 +540,7 @@ public:
void maybe_select_by_position (GdkEventButton* ev, double x, double y);
void get_events (Events& e, Evoral::Sequence<Temporal::Beats>::NoteOperator op, uint8_t val, int chan_mask = 0);
void display_patch_changes_on_channel (uint8_t, bool);
void display_patch_changes_on_channel (uint8_t, bool, PatchChanges&);
void connect_to_diskstream ();
void data_recorded (std::weak_ptr<ARDOUR::MidiSource>);

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -17,7 +17,13 @@
*/
#include <iostream>
#include "canvas/flag.h"
#include "gtkmm2ext/keyboard.h"
#include "editor.h"
#include "midi_region_view.h"
#include "sys_ex.h"
#include "ui_config.h"
@ -32,6 +38,7 @@ SysEx::SysEx (
double y,
ARDOUR::MidiModel::SysExPtr sysex)
: _sysex (sysex)
, _region (region)
{
_flag = new ArdourCanvas::Flag (
parent,
@ -41,37 +48,34 @@ SysEx::SysEx (
ArdourCanvas::Duple (x, y)
);
_flag->Event.connect (sigc::mem_fun (*this, &SysEx::event_handler));
_flag->set_font_description (UIConfiguration::instance ().get_SmallFont ());
_flag->set_text (text);
}
SysEx::~SysEx()
{
/* do not delete flag because it was added to a parent/container which
will delete it.
*/
_flag = 0;
delete _flag;
}
bool
SysEx::event_handler (GdkEvent* ev)
{
/* XXX: icky dcast */
Editor* e = dynamic_cast<Editor*> (&_region.get_time_axis_view ().editor ());
if (!e->internal_editing ()) {
return false;
}
switch (ev->type) {
case GDK_BUTTON_PRESS:
if (ev->button.button == 3) {
return true;
}
break;
case GDK_SCROLL:
if (ev->scroll.direction == GDK_SCROLL_UP) {
return true;
} else if (ev->scroll.direction == GDK_SCROLL_DOWN) {
return true;
}
break;
default:
break;
case GDK_BUTTON_PRESS:
if (Gtkmm2ext::Keyboard::is_delete_event (&ev->button)) {
_region.delete_sysex (this);
return true;
}
default:
break;
}
return false;

View File

@ -35,6 +35,8 @@ public:
double y,
ARDOUR::MidiModel::SysExPtr sysex);
SysEx (SysEx const&) = delete;
~SysEx ();
void hide ();
@ -43,12 +45,13 @@ public:
void set_height (ArdourCanvas::Distance h) { _flag->set_height (h); }
ArdourCanvas::Item& item() const { return *_flag; }
ARDOUR::MidiModel::SysExPtr sysex () const { return _sysex; }
private:
bool event_handler (GdkEvent* ev);
SysEx(const SysEx& rhs){}
ArdourCanvas::Flag* _flag;
ARDOUR::MidiModel::SysExPtr _sysex;
MidiRegionView& _region;
};
#endif /* __SYSEX_H__ */

View File

@ -256,7 +256,7 @@ TransportMastersWidget::rebuild ()
r->sclock_synced_button.signal_toggled().connect (sigc::mem_fun (*r, &TransportMastersWidget::Row::sync_button_toggled));
}
r->tm->PropertyChanged.connect (r->property_change_connection, invalidator (*this), boost::bind (&TransportMastersWidget::Row::prop_change, r, _1), gui_context());
r->tm->PropertyChanged.connect (r->property_change_connection, invalidator (*r), boost::bind (&TransportMastersWidget::Row::prop_change, r, _1), gui_context());
PropertyChange all_change;
all_change.add (Properties::locked);

View File

@ -441,15 +441,16 @@ def enoify (major, minor):
return "\\n\\\"I Dormienti\\\"" # 1999
if minor == 6:
return "\\n\\\"Kite Stories\\\"" # 1999
if minor == 7:
if minor >= 7:
return "\\n\\\"Sonora Portraits\\\"" # 1999 Compilation
if minor == 8:
elif major == 9:
if minor == 0:
return "\\n\\\"Music for Civic Recovery Centre\\\"" # 2000
if minor == 9:
if minor == 1:
return "\\n\\\"Music for Onmyo-Ji\\\"" # 2000 Collaborative
if minor == 10:
if minor == 2:
return "\\n\\\"Compact Forest Proposal\\\"" # 2001
if minor == 11:
if minor == 3:
return "\\n\\\"Drawn from Life\\\"" # 2001 Collaborative
return "\\\"\\\""

View File

@ -272,6 +272,8 @@ namespace ARDOUR { namespace DSP {
/** reset filter state */
void reset () { _z1 = _z2 = 0.0; }
void coefficients (double& a1, double& a2, double& b0, double& b1, double& b2) const;
private:
void set_vicanek_poles (const double W0, const double Q, const double A = 1.0);
void calc_vicanek (const double W0, double& A0, double& A1, double& A2, double& phi0, double& phi1, double& phi2);

View File

@ -429,6 +429,13 @@ namespace ARDOUR { namespace LuaAPI {
std::list<std::shared_ptr< Evoral::Note<Temporal::Beats> > >
note_list (std::shared_ptr<ARDOUR::MidiModel>);
std::list<std::shared_ptr< Evoral::Event<Temporal::Beats> > >
sysex_list (std::shared_ptr<ARDOUR::MidiModel>);
std::list<std::shared_ptr< Evoral::PatchChange<Temporal::Beats> > >
patch_change_list (std::shared_ptr<ARDOUR::MidiModel>);
} } /* namespace */
namespace ARDOUR { namespace LuaOSC {

View File

@ -255,7 +255,8 @@ class LIBARDOUR_API LV2Plugin : public ARDOUR::Plugin, public ARDOUR::Workee
PORT_AUTOCTRL = 1 << 9, ///< Event port supports auto:AutomationControl
PORT_CTRLED = 1 << 10, ///< Port prop auto:AutomationControlled (can be self controlled)
PORT_CTRLER = 1 << 11, ///< Port prop auto:AutomationController (can be self set)
PORT_NOAUTO = 1 << 12 ///< Port don't allow to automate
PORT_NOAUTO = 1 << 12, ///< Port don't allow to automate
PORT_OTHOPT = 1 << 13 ///< Port of unknown data type with prop connectionOptional
} PortFlag;
typedef unsigned PortFlags;

View File

@ -159,6 +159,7 @@ public:
/* Currently this class only supports changes of sys-ex time, but could be expanded */
class LIBARDOUR_API SysExDiffCommand : public DiffCommand {
public:
SysExDiffCommand (std::shared_ptr<MidiModel> m, const std::string& name) : DiffCommand (m, name) {}
SysExDiffCommand (std::shared_ptr<MidiModel> m, const XMLNode& node);
enum Property {

View File

@ -343,7 +343,7 @@ private:
void lv2_refresh ();
int windows_vst_discover_from_path (std::string path, bool cache_only = false);
int mac_vst_discover_from_path (std::string path, bool cache_only = false);
int mac_vst_discover_from_path (std::string path, std::set<std::string>&, bool cache_only = false);
int lxvst_discover_from_path (std::string path, bool cache_only = false);
#if (defined WINDOWS_VST_SUPPORT || defined MACVST_SUPPORT || defined LXVST_SUPPORT)
bool vst2_plugin (std::string const& module_path, ARDOUR::PluginType, VST2Info const&);

View File

@ -613,7 +613,7 @@ public:
void create_port ();
private:
void parse_ltc (const pframes_t, const Sample* const, const samplecnt_t);
void parse_ltc (const pframes_t, Sample const*, samplecnt_t);
void process_ltc (samplepos_t const);
void init_dll (samplepos_t, int32_t);
bool detect_discontinuity (LTCFrameExt*, int, bool);
@ -643,6 +643,17 @@ private:
PBD::ScopedConnection port_connection;
PBD::ScopedConnectionList session_connections;
LatencyRange ltc_slave_latency;
struct Biquad {
void reset () { z1 = z2 = 0;}
float z1, z2;
double a1, a2, b0, b1, b2;
};
bool _filter_enable;
Biquad _lpf;
Biquad _hpf;
};
class LIBARDOUR_API MIDIClock_TransportMaster : public TransportMaster, public TransportMasterViaMIDI

View File

@ -212,6 +212,16 @@ Biquad::configure (double a1, double a2, double b0, double b1, double b2)
_b2 = b2;
}
void
Biquad::coefficients (double& a1, double& a2, double& b0, double& b1, double& b2) const
{
a1 = _a1;
a2 = _a2;
b0 = _b0;
b1 = _b1;
b2 = _b2;
}
void
Biquad::configure (Biquad const& other)
{

View File

@ -27,6 +27,7 @@
#include "pbd/pthread_utils.h"
#include "ardour/debug.h"
#include "ardour/dsp_filter.h"
#include "ardour/profile.h"
#include "ardour/transport_master.h"
#include "ardour/session.h"
@ -58,6 +59,7 @@ LTC_TransportMaster::LTC_TransportMaster (std::string const & name)
, ltc_detect_fps_max (0)
, sync_lock_broken (false)
, samples_per_timecode_frame (0)
, _filter_enable (false)
{
memset (&prev_frame, 0, sizeof(LTCFrameExt));
@ -97,6 +99,17 @@ LTC_TransportMaster::set_session (Session *s)
decoder = ltc_decoder_create((int) samples_per_ltc_frame, 128 /*queue size*/);
DSP::Biquad bq (AudioEngine::instance()->sample_rate());
bq.compute (DSP::Biquad::LowPass, 3500, 0.9, 0);
bq.coefficients (_lpf.a1, _lpf.a2, _lpf.b0, _lpf.b1, _lpf.b2);
bq.compute (DSP::Biquad::HighPass, 100, 0.707, 0);
bq.coefficients (_hpf.a1, _hpf.a2, _hpf.b0, _hpf.b1, _hpf.b2);
_lpf.reset ();
_hpf.reset ();
// TODO add a per master preference to enable filter (and set gain)
//_filter_enable = true;
parse_timecode_offset();
reset (true);
@ -104,6 +117,8 @@ LTC_TransportMaster::set_session (Session *s)
_session->config.ParameterChanged.connect_same_thread (session_connections, boost::bind (&LTC_TransportMaster::parameter_changed, this, _1));
_session->LatencyUpdated.connect_same_thread (session_connections, boost::bind (&LTC_TransportMaster::resync_latency, this, _1));
} else {
_filter_enable = false;
}
}
@ -209,6 +224,8 @@ LTC_TransportMaster::resync_latency (bool playback)
if (old != ltc_slave_latency.max) {
sync_lock_broken = false;
}
_lpf.reset ();
_hpf.reset ();
}
void
@ -231,26 +248,40 @@ LTC_TransportMaster::reset (bool with_position)
}
void
LTC_TransportMaster::parse_ltc (const ARDOUR::pframes_t nframes, const Sample* const in, const ARDOUR::samplecnt_t posinfo)
LTC_TransportMaster::parse_ltc (pframes_t const n_samples, Sample const* in, samplecnt_t posinfo)
{
pframes_t i;
unsigned char sound[8192];
pframes_t remain = n_samples;
if (nframes > 8192) {
/* TODO warn once or wrap, loop conversion below
* does jack/A3 support > 8192 spp anyway?
*/
return;
}
bool const fe = _filter_enable;
float const gain = 127.0; // relative to signed 8bit, 127.0 == 0dB
for (i = 0; i < nframes; i++) {
const int snd=(int) rint ((127.0*in[i])+128.0);
sound[i] = (unsigned char) (snd&0xff);
}
ltc_decoder_write (decoder, sound, nframes, posinfo);
return;
while (remain > 0) {
ltcsnd_sample_t sound[8192];
pframes_t c = std::min<pframes_t> (remain, 8192);
if (fe) {
for (pframes_t i = 0; i < c; ++i) {
/* LPF */
float xn = *in++;
float z = _lpf.b0 * xn + _lpf.z1;
_lpf.z1 = _lpf.b1 * xn - _lpf.a1 * z + _lpf.z2;
_lpf.z2 = _lpf.b2 * xn - _lpf.a2 * z;
/* HPF */
xn = z;
z = _hpf.b0 * xn + _hpf.z1;
_hpf.z1 = _hpf.b1 * xn - _hpf.a1 * z + _hpf.z2;
_hpf.z2 = _hpf.b2 * xn - _hpf.a2 * z;
/* convert */
sound[i] = 128 + min (127, max<int> (-127, gain * z));
}
} else {
for (pframes_t i = 0; i < c; ++i) {
sound[i] = 128 + min (127, max<int> (-127, gain * (*in++)));
}
}
ltc_decoder_write (decoder, sound, c, posinfo);
posinfo += c;
remain -= c;
}
}
bool

View File

@ -1158,6 +1158,32 @@ LuaAPI::note_list (std::shared_ptr<MidiModel> mm)
return note_ptr_list;
}
std::list<std::shared_ptr<Evoral::Event<Temporal::Beats> > >
LuaAPI::sysex_list (std::shared_ptr<MidiModel> mm)
{
typedef std::shared_ptr<Evoral::Event<Temporal::Beats> > SysExPtr;
std::list<SysExPtr> event_ptr_list;
for (auto const& i : mm->sysexes ()) {
event_ptr_list.push_back (i);
}
return event_ptr_list;
}
std::list<std::shared_ptr<Evoral::PatchChange<Temporal::Beats> > >
LuaAPI::patch_change_list (std::shared_ptr<MidiModel> mm)
{
typedef std::shared_ptr<Evoral::PatchChange<Temporal::Beats> > PatchChangePtr;
std::list<PatchChangePtr> patch_change_ptr_list;
for (auto const& i : mm->patch_changes ()) {
patch_change_ptr_list.push_back (i);
}
return patch_change_ptr_list;
}
/* ****************************************************************************/
const samplecnt_t LuaAPI::Rubberband::_bufsize = 256;

View File

@ -31,6 +31,7 @@
#include "evoral/Control.h"
#include "evoral/ControlList.h"
#include "evoral/PatchChange.h"
#include "ardour/amp.h"
#include "ardour/async_midi_port.h"
@ -268,6 +269,7 @@ CLASSKEYS(ARDOUR::LuaOSC::Address);
CLASSKEYS(ARDOUR::LuaProc);
CLASSKEYS(ARDOUR::LuaTableRef);
CLASSKEYS(ARDOUR::MidiModel::NoteDiffCommand);
CLASSKEYS(ARDOUR::MidiModel::SysExDiffCommand);
CLASSKEYS(ARDOUR::MonitorProcessor);
CLASSKEYS(ARDOUR::RouteGroup);
CLASSKEYS(ARDOUR::ParameterDescriptor);
@ -349,7 +351,9 @@ CLASSKEYS(std::shared_ptr<ARDOUR::Region>);
CLASSKEYS(std::shared_ptr<ARDOUR::SessionPlaylists>);
CLASSKEYS(std::shared_ptr<ARDOUR::Track>);
CLASSKEYS(std::shared_ptr<Evoral::ControlList>);
CLASSKEYS(std::shared_ptr<Evoral::Event<Temporal::Beats> >);
CLASSKEYS(std::shared_ptr<Evoral::Note<Temporal::Beats> >);
CLASSKEYS(std::shared_ptr<Evoral::PatchChange<Temporal::Beats> >);
CLASSKEYS(std::shared_ptr<Evoral::Sequence<Temporal::Beats> >);
CLASSKEYS(std::shared_ptr<ARDOUR::Playlist>);
@ -972,6 +976,18 @@ LuaBindings::common (lua_State* L)
.addFunction ("channel", &Evoral::Note<Temporal::Beats>::channel)
.endClass ()
.beginWSPtrClass <Evoral::Event<Temporal::Beats> > ("EventPtr")
.addFunction ("time", &Evoral::Event<Temporal::Beats>::time)
.addFunction ("size", &Evoral::Event<Temporal::Beats>::size)
//.addFunction ("buffer", (uint8_t*) &Evoral::Event<Temporal::Beats>::buffer)
.endClass ()
.beginWSPtrClass <Evoral::PatchChange<Temporal::Beats> > ("PatchChangePtr")
.addFunction ("time", &Evoral::PatchChange<Temporal::Beats>::time)
.addFunction ("bank", &Evoral::PatchChange<Temporal::Beats>::bank)
.addFunction ("program", &Evoral::PatchChange<Temporal::Beats>::program)
.endClass ()
/* libevoral enums */
.beginNamespace ("InterpolationStyle")
.addConst ("Discrete", Evoral::ControlList::InterpolationStyle(Evoral::ControlList::Discrete))
@ -1793,6 +1809,8 @@ LuaBindings::common (lua_State* L)
.addFunction ("apply_command", (void (MidiModel::*)(Session*, PBD::Command*))&MidiModel::apply_diff_command_as_commit) /* deprecated: left here in case any extant scripts use apply_command */
.addFunction ("apply_diff_command_as_commit", (void (MidiModel::*)(Session*, PBD::Command*))&MidiModel::apply_diff_command_as_commit)
.addFunction ("new_note_diff_command", &MidiModel::new_note_diff_command)
.addFunction ("new_sysex_diff_command", &MidiModel::new_sysex_diff_command)
.addFunction ("new_patch_change_diff_command", &MidiModel::new_patch_change_diff_command)
.endClass ()
.beginNamespace ("MidiModel")
@ -1804,6 +1822,16 @@ LuaBindings::common (lua_State* L)
.addFunction ("remove", &ARDOUR::MidiModel::NoteDiffCommand::remove)
.endClass ()
.deriveClass<ARDOUR::MidiModel::SysExDiffCommand, ARDOUR::MidiModel::DiffCommand> ("NoteDiffCommand")
.addFunction ("change", &ARDOUR::MidiModel::SysExDiffCommand::change)
.addFunction ("remove", &ARDOUR::MidiModel::SysExDiffCommand::remove)
.endClass ()
.deriveClass<ARDOUR::MidiModel::PatchChangeDiffCommand, ARDOUR::MidiModel::DiffCommand> ("NoteDiffCommand")
.addFunction ("add", &ARDOUR::MidiModel::PatchChangeDiffCommand::add)
.addFunction ("remove", &ARDOUR::MidiModel::PatchChangeDiffCommand::remove)
.endClass ()
.endNamespace () /* ARDOUR::MidiModel */
.beginClass <Plugin::PresetRecord> ("PresetRecord")
@ -2344,6 +2372,12 @@ LuaBindings::common (lua_State* L)
.beginStdList <std::shared_ptr<Evoral::Note<Temporal::Beats> > > ("NotePtrList")
.endClass ()
.beginStdList <std::shared_ptr<Evoral::Event<Temporal::Beats> > > ("EventPtrList")
.endClass ()
.beginStdList <std::shared_ptr<Evoral::PatchChange<Temporal::Beats> > > ("PatchChangePtrList")
.endClass ()
.beginConstStdCPtrList <Evoral::ControlEvent> ("EventList")
.endClass ()
@ -3177,6 +3211,8 @@ LuaBindings::common (lua_State* L)
.addCFunction ("build_filename", ARDOUR::LuaAPI::build_filename)
.addFunction ("new_noteptr", ARDOUR::LuaAPI::new_noteptr)
.addFunction ("note_list", ARDOUR::LuaAPI::note_list)
.addFunction ("sysex_list", ARDOUR::LuaAPI::sysex_list)
.addFunction ("patch_change_list", ARDOUR::LuaAPI::patch_change_list)
.addCFunction ("sample_to_timecode", ARDOUR::LuaAPI::sample_to_timecode)
.addCFunction ("timecode_to_sample", ARDOUR::LuaAPI::timecode_to_sample)
.addFunction ("wait_for_process_callback", ARDOUR::LuaAPI::wait_for_process_callback)

View File

@ -186,6 +186,7 @@ public:
LilvNode* lv2_ControlPort;
LilvNode* lv2_InputPort;
LilvNode* lv2_OutputPort;
LilvNode* lv2_connectionOptional;
LilvNode* lv2_designation;
LilvNode* lv2_enumeration;
LilvNode* lv2_freewheeling;
@ -837,10 +838,10 @@ LV2Plugin::init(const void* c_plugin, samplecnt_t rate)
lilv_nodes_free(min_size_v);
lilv_nodes_free(buffer_types);
lilv_nodes_free(atom_supports);
} else if (lilv_port_has_property(_impl->plugin, port, _world.lv2_connectionOptional)) {
flags |= PORT_OTHOPT; // unknown data type but connection optional
} else {
error << string_compose(
"LV2: \"%1\" port %2 has no known data type",
lilv_node_as_string(_impl->name), i) << endmsg;
error << string_compose("LV2: \"%1\" port %2 has unsupported or unknown data type", lilv_node_as_string(_impl->name), i) << endmsg;
throw failed_constructor();
}
@ -2993,6 +2994,8 @@ LV2Plugin::connect_and_run(BufferSet& bufs,
}
buf = lv2_evbuf_get_buffer(_ev_buffers[port_index]);
} else if(flags & PORT_OTHOPT) {
// Explicitely connect optional ports that we can not handle to NULL
} else {
continue; // Control port, leave buffer alone
}
@ -3452,6 +3455,8 @@ LV2Plugin::latency_compute_run()
ev_buffers.push_back (lv2_evbuf_new (buf_size, _uri_map.urids.atom_Chunk, _uri_map.urids.atom_Sequence));
void* buf = lv2_evbuf_get_buffer (ev_buffers.back ());
lilv_instance_connect_port(_impl->instance, port_index, buf);
} else if (flags & PORT_OTHOPT) {
lilv_instance_connect_port(_impl->instance, port_index, NULL);
}
}
@ -3494,58 +3499,59 @@ LV2World::LV2World()
: world(lilv_world_new())
, _bundle_checked(false)
{
atom_AtomPort = lilv_new_uri(world, LV2_ATOM__AtomPort);
atom_Chunk = lilv_new_uri(world, LV2_ATOM__Chunk);
atom_Sequence = lilv_new_uri(world, LV2_ATOM__Sequence);
atom_bufferType = lilv_new_uri(world, LV2_ATOM__bufferType);
atom_supports = lilv_new_uri(world, LV2_ATOM__supports);
atom_eventTransfer = lilv_new_uri(world, LV2_ATOM__eventTransfer);
ev_EventPort = lilv_new_uri(world, LILV_URI_EVENT_PORT);
ext_logarithmic = lilv_new_uri(world, LV2_PORT_PROPS__logarithmic);
ext_notOnGUI = lilv_new_uri(world, LV2_PORT_PROPS__notOnGUI);
ext_expensive = lilv_new_uri(world, LV2_PORT_PROPS__expensive);
ext_causesArtifacts= lilv_new_uri(world, LV2_PORT_PROPS__causesArtifacts);
ext_notAutomatic = lilv_new_uri(world, LV2_PORT_PROPS__notAutomatic);
ext_rangeSteps = lilv_new_uri(world, LV2_PORT_PROPS__rangeSteps);
ext_displayPriority= lilv_new_uri(world, LV2_PORT_PROPS__displayPriority);
groups_group = lilv_new_uri(world, LV2_PORT_GROUPS__group);
groups_element = lilv_new_uri(world, LV2_PORT_GROUPS__element);
lv2_AudioPort = lilv_new_uri(world, LILV_URI_AUDIO_PORT);
lv2_ControlPort = lilv_new_uri(world, LILV_URI_CONTROL_PORT);
lv2_InputPort = lilv_new_uri(world, LILV_URI_INPUT_PORT);
lv2_OutputPort = lilv_new_uri(world, LILV_URI_OUTPUT_PORT);
lv2_inPlaceBroken = lilv_new_uri(world, LV2_CORE__inPlaceBroken);
lv2_isSideChain = lilv_new_uri(world, LV2_CORE_PREFIX "isSideChain");
lv2_index = lilv_new_uri(world, LV2_CORE__index);
lv2_integer = lilv_new_uri(world, LV2_CORE__integer);
lv2_default = lilv_new_uri(world, LV2_CORE__default);
lv2_minimum = lilv_new_uri(world, LV2_CORE__minimum);
lv2_maximum = lilv_new_uri(world, LV2_CORE__maximum);
lv2_reportsLatency = lilv_new_uri(world, LV2_CORE__reportsLatency);
lv2_sampleRate = lilv_new_uri(world, LV2_CORE__sampleRate);
lv2_toggled = lilv_new_uri(world, LV2_CORE__toggled);
lv2_designation = lilv_new_uri(world, LV2_CORE__designation);
lv2_enumeration = lilv_new_uri(world, LV2_CORE__enumeration);
lv2_freewheeling = lilv_new_uri(world, LV2_CORE__freeWheeling);
midi_MidiEvent = lilv_new_uri(world, LILV_URI_MIDI_EVENT);
rdfs_comment = lilv_new_uri(world, LILV_NS_RDFS "comment");
rdfs_label = lilv_new_uri(world, LILV_NS_RDFS "label");
rdfs_range = lilv_new_uri(world, LILV_NS_RDFS "range");
rsz_minimumSize = lilv_new_uri(world, LV2_RESIZE_PORT__minimumSize);
time_Position = lilv_new_uri(world, LV2_TIME__Position);
time_beatsPerMin = lilv_new_uri(world, LV2_TIME__beatsPerMinute);
ui_GtkUI = lilv_new_uri(world, LV2_UI__GtkUI);
ui_X11UI = lilv_new_uri(world, LV2_UI__X11UI);
ui_external = lilv_new_uri(world, "http://lv2plug.in/ns/extensions/ui#external");
ui_externalkx = lilv_new_uri(world, "http://kxstudio.sf.net/ns/lv2ext/external-ui#Widget");
units_unit = lilv_new_uri(world, LV2_UNITS__unit);
units_render = lilv_new_uri(world, LV2_UNITS__render);
units_hz = lilv_new_uri(world, LV2_UNITS__hz);
units_midiNote = lilv_new_uri(world, LV2_UNITS__midiNote);
units_db = lilv_new_uri(world, LV2_UNITS__db);
patch_writable = lilv_new_uri(world, LV2_PATCH__writable);
patch_Message = lilv_new_uri(world, LV2_PATCH__Message);
opts_requiredOptions = lilv_new_uri(world, LV2_OPTIONS__requiredOption);
atom_AtomPort = lilv_new_uri(world, LV2_ATOM__AtomPort);
atom_Chunk = lilv_new_uri(world, LV2_ATOM__Chunk);
atom_Sequence = lilv_new_uri(world, LV2_ATOM__Sequence);
atom_bufferType = lilv_new_uri(world, LV2_ATOM__bufferType);
atom_supports = lilv_new_uri(world, LV2_ATOM__supports);
atom_eventTransfer = lilv_new_uri(world, LV2_ATOM__eventTransfer);
ev_EventPort = lilv_new_uri(world, LILV_URI_EVENT_PORT);
ext_logarithmic = lilv_new_uri(world, LV2_PORT_PROPS__logarithmic);
ext_notOnGUI = lilv_new_uri(world, LV2_PORT_PROPS__notOnGUI);
ext_expensive = lilv_new_uri(world, LV2_PORT_PROPS__expensive);
ext_causesArtifacts = lilv_new_uri(world, LV2_PORT_PROPS__causesArtifacts);
ext_notAutomatic = lilv_new_uri(world, LV2_PORT_PROPS__notAutomatic);
ext_rangeSteps = lilv_new_uri(world, LV2_PORT_PROPS__rangeSteps);
ext_displayPriority = lilv_new_uri(world, LV2_PORT_PROPS__displayPriority);
groups_group = lilv_new_uri(world, LV2_PORT_GROUPS__group);
groups_element = lilv_new_uri(world, LV2_PORT_GROUPS__element);
lv2_AudioPort = lilv_new_uri(world, LILV_URI_AUDIO_PORT);
lv2_ControlPort = lilv_new_uri(world, LILV_URI_CONTROL_PORT);
lv2_InputPort = lilv_new_uri(world, LILV_URI_INPUT_PORT);
lv2_OutputPort = lilv_new_uri(world, LILV_URI_OUTPUT_PORT);
lv2_connectionOptional = lilv_new_uri(world, LV2_CORE__connectionOptional);
lv2_inPlaceBroken = lilv_new_uri(world, LV2_CORE__inPlaceBroken);
lv2_isSideChain = lilv_new_uri(world, LV2_CORE_PREFIX "isSideChain");
lv2_index = lilv_new_uri(world, LV2_CORE__index);
lv2_integer = lilv_new_uri(world, LV2_CORE__integer);
lv2_default = lilv_new_uri(world, LV2_CORE__default);
lv2_minimum = lilv_new_uri(world, LV2_CORE__minimum);
lv2_maximum = lilv_new_uri(world, LV2_CORE__maximum);
lv2_reportsLatency = lilv_new_uri(world, LV2_CORE__reportsLatency);
lv2_sampleRate = lilv_new_uri(world, LV2_CORE__sampleRate);
lv2_toggled = lilv_new_uri(world, LV2_CORE__toggled);
lv2_designation = lilv_new_uri(world, LV2_CORE__designation);
lv2_enumeration = lilv_new_uri(world, LV2_CORE__enumeration);
lv2_freewheeling = lilv_new_uri(world, LV2_CORE__freeWheeling);
midi_MidiEvent = lilv_new_uri(world, LILV_URI_MIDI_EVENT);
rdfs_comment = lilv_new_uri(world, LILV_NS_RDFS "comment");
rdfs_label = lilv_new_uri(world, LILV_NS_RDFS "label");
rdfs_range = lilv_new_uri(world, LILV_NS_RDFS "range");
rsz_minimumSize = lilv_new_uri(world, LV2_RESIZE_PORT__minimumSize);
time_Position = lilv_new_uri(world, LV2_TIME__Position);
time_beatsPerMin = lilv_new_uri(world, LV2_TIME__beatsPerMinute);
ui_GtkUI = lilv_new_uri(world, LV2_UI__GtkUI);
ui_X11UI = lilv_new_uri(world, LV2_UI__X11UI);
ui_external = lilv_new_uri(world, "http://lv2plug.in/ns/extensions/ui#external");
ui_externalkx = lilv_new_uri(world, "http://kxstudio.sf.net/ns/lv2ext/external-ui#Widget");
units_unit = lilv_new_uri(world, LV2_UNITS__unit);
units_render = lilv_new_uri(world, LV2_UNITS__render);
units_hz = lilv_new_uri(world, LV2_UNITS__hz);
units_midiNote = lilv_new_uri(world, LV2_UNITS__midiNote);
units_db = lilv_new_uri(world, LV2_UNITS__db);
patch_writable = lilv_new_uri(world, LV2_PATCH__writable);
patch_Message = lilv_new_uri(world, LV2_PATCH__Message);
opts_requiredOptions = lilv_new_uri(world, LV2_OPTIONS__requiredOption);
#ifdef LV2_EXTENDED
lv2_noSampleAccurateCtrl = lilv_new_uri(world, "http://ardour.org/lv2/ext#noSampleAccurateControls"); // deprecated 2016-09-18
routing_connectAllOutputs = lilv_new_uri(world, LV2_ROUTING__connectAllOutputs);
@ -3616,6 +3622,7 @@ LV2World::~LV2World()
lilv_node_free(lv2_integer);
lilv_node_free(lv2_isSideChain);
lilv_node_free(lv2_inPlaceBroken);
lilv_node_free(lv2_connectionOptional);
lilv_node_free(lv2_OutputPort);
lilv_node_free(lv2_InputPort);
lilv_node_free(lv2_ControlPort);
@ -3947,7 +3954,7 @@ LV2PluginInfo::discover (boost::function <void (std::string const&, PluginScanLo
}
if (!lilv_nodes_contains(buffer_types, world.atom_Sequence)) {
cb (uri, PluginScanLogEntry::Error, _("Found Atom port without sequence support, ignored"), false);
cb (uri, PluginScanLogEntry::Error, _("Found Atom port without sequence support."), false);
/* ignore non-sequence Atom ports */
err = 1;
}
@ -3971,10 +3978,15 @@ LV2PluginInfo::discover (boost::function <void (std::string const&, PluginScanLo
count_ctrl_out++;
}
}
else if (!lilv_port_is_a (p, port, world.lv2_AudioPort)) {
else if (lilv_port_has_property(p, port, world.lv2_connectionOptional)) {
LilvNode* name = lilv_port_get_name(p, port);
cb (uri, PluginScanLogEntry::OK, string_compose (_("Ignored optional port %1 ('%2') which has unsupported data type."), i, lilv_node_as_string (name)), false);
lilv_node_free(name);
}
else if (!lilv_port_is_a(p, port, world.lv2_AudioPort)) {
err = 1;
LilvNode* name = lilv_port_get_name(p, port);
cb (uri, PluginScanLogEntry::Error, string_compose (_("Port %1 ('%2') has no known data type"), i, lilv_node_as_string (name)), false);
cb (uri, PluginScanLogEntry::Error, string_compose (_("Port %1 ('%2') has unsupported data type."), i, lilv_node_as_string (name)), false);
lilv_node_free(name);
}
}

View File

@ -1810,13 +1810,14 @@ PluginManager::windows_vst_discover_from_path (string path, bool cache_only)
void
PluginManager::mac_vst_refresh (bool cache_only)
{
std::set<std::string> scanned_paths;
if (_mac_vst_plugin_info) {
_mac_vst_plugin_info->clear ();
} else {
_mac_vst_plugin_info = new ARDOUR::PluginInfoList();
}
mac_vst_discover_from_path ("~/Library/Audio/Plug-Ins/VST:/Library/Audio/Plug-Ins/VST", cache_only);
mac_vst_discover_from_path ("~/Library/Audio/Plug-Ins/VST:/Library/Audio/Plug-Ins/VST", scanned_paths, cache_only);
if (!cache_only) {
/* ensure that VST path is flushed to disk */
Config->save_state();
@ -1833,7 +1834,7 @@ static bool mac_vst_filter (const string& str)
}
int
PluginManager::mac_vst_discover_from_path (string path, bool cache_only)
PluginManager::mac_vst_discover_from_path (string path, std::set<std::string>& scanned_paths, bool cache_only)
{
vector<string> plugin_objects;
vector<string>::iterator x;
@ -1843,6 +1844,11 @@ PluginManager::mac_vst_discover_from_path (string path, bool cache_only)
return -1;
}
if (scanned_paths.find (path) != scanned_paths.end ()) {
return 0;
}
scanned_paths.insert (path);
Searchpath paths (path);
/* customized version of run_functor_for_paths() */
for (vector<string>::const_iterator i = paths.begin(); i != paths.end(); ++i) {
@ -1869,7 +1875,7 @@ PluginManager::mac_vst_discover_from_path (string path, bool cache_only)
}
/* recurse */
mac_vst_discover_from_path (fullpath, cache_only);
mac_vst_discover_from_path (fullpath, scanned_paths, cache_only);
}
} catch (Glib::FileError& err) { }
}

View File

@ -39,6 +39,7 @@ def build(bld):
obj.target = 'hidapi'
obj.vnum = HIDAPI_VERSION
obj.install_path = bld.env['LIBDIR']
obj.defines = '_POSIX_C_SOURCE=200809L'
if bld.env['build_target'] == 'mingw':
obj.source = 'windows/hid.c'

View File

@ -22,6 +22,7 @@
#include <algorithm>
#include <climits>
#include <set>
#include <vector>
#include <glib.h>
@ -80,7 +81,8 @@ run_functor_for_paths (vector<string>& result,
void *arg,
bool pass_files_only,
bool pass_fullpath, bool return_fullpath,
bool recurse)
bool recurse,
set<string>& scanned_paths)
{
for (vector<string>::const_iterator i = paths.begin(); i != paths.end(); ++i) {
try
@ -102,11 +104,12 @@ run_functor_for_paths (vector<string>& result,
bool is_dir = Glib::file_test (fullpath, Glib::FILE_TEST_IS_DIR);
if (is_dir && recurse) {
DEBUG_TRACE (DEBUG::FileUtils,
string_compose("Descending into directory: %1\n",
fullpath));
run_functor_for_paths (result, fullpath, functor, arg, pass_files_only,
pass_fullpath, return_fullpath, recurse);
if (scanned_paths.find (fullpath) == scanned_paths.end ()) {
scanned_paths.insert (fullpath);
DEBUG_TRACE (DEBUG::FileUtils, string_compose("Descending into directory: %1\n", fullpath));
run_functor_for_paths (result, fullpath, functor, arg, pass_files_only,
pass_fullpath, return_fullpath, recurse, scanned_paths);
}
}
if (is_dir && pass_files_only) {
@ -163,8 +166,9 @@ get_paths (vector<string>& result,
bool files_only,
bool recurse)
{
set<string> scanned_path;
run_functor_for_paths (result, paths, accept_all_files, 0,
files_only, true, true, recurse);
files_only, true, true, recurse, scanned_path);
}
void
@ -186,9 +190,10 @@ find_files_matching_pattern (vector<string>& result,
const Searchpath& paths,
const Glib::PatternSpec& pattern)
{
set<string> unused;
run_functor_for_paths (result, paths, pattern_filter,
const_cast<Glib::PatternSpec*>(&pattern),
true, false, true, false);
true, false, true, false, unused);
}
void
@ -281,7 +286,8 @@ find_paths_matching_filter (vector<string>& result,
bool pass_fullpath, bool return_fullpath,
bool recurse)
{
run_functor_for_paths (result, paths, filter, arg, false, pass_fullpath, return_fullpath, recurse);
set<string> scanned_path;
run_functor_for_paths (result, paths, filter, arg, false, pass_fullpath, return_fullpath, recurse, scanned_path);
}
void
@ -292,7 +298,8 @@ find_files_matching_filter (vector<string>& result,
bool pass_fullpath, bool return_fullpath,
bool recurse)
{
run_functor_for_paths (result, paths, filter, arg, true, pass_fullpath, return_fullpath, recurse);
set<string> scanned_path;
run_functor_for_paths (result, paths, filter, arg, true, pass_fullpath, return_fullpath, recurse, scanned_path);
}
bool

View File

@ -58,14 +58,16 @@ NodeStateMessage::NodeStateMessage (void* buf, size_t len)
_state = NodeState (root.get<std::string> ("node"));
pt::ptree addr = root.get_child ("addr", pt::ptree ());
pt::ptree addr = pt::ptree ();
addr = root.get_child ("addr", addr);
for (pt::ptree::iterator it = addr.begin (); it != addr.end (); ++it) {
// throws if datatype not uint32_t
_state.add_addr (boost::lexical_cast<uint32_t> (it->second.data ()));
}
pt::ptree val = root.get_child ("val", pt::ptree ());
pt::ptree val = pt::ptree ();
val = root.get_child ("val", val);
for (pt::ptree::iterator it = val.begin (); it != val.end (); ++it) {
std::string val = it->second.data ();

View File

@ -6882,6 +6882,9 @@ gdk_window_show_internal (GdkWindow *window, gboolean raise)
_gdk_make_event (GDK_WINDOW (private), GDK_MAP, NULL, FALSE);
}
if (!was_mapped && _gdk_modal_notify && private->modal_hint)
_gdk_modal_notify (window, TRUE);
if (!was_mapped || raise)
{
recompute_visible_regions (private, TRUE, FALSE);
@ -7313,6 +7316,9 @@ gdk_window_hide (GdkWindow *window)
_gdk_synthesize_crossing_events_for_geometry_change (GDK_WINDOW (private->parent));
}
if (was_mapped && _gdk_modal_notify && private->modal_hint)
_gdk_modal_notify (window, FALSE);
/* Invalidate the rect */
if (was_mapped)
gdk_window_invalidate_in_parent (private);

View File

@ -202,11 +202,6 @@ gdk_window_impl_quartz_finalize (GObject *object)
check_grab_destroy (window);
if (private->modal_hint && _gdk_modal_notify)
{
_gdk_modal_notify (GDK_DRAWABLE_IMPL_QUARTZ (object)->wrapper, false);
}
if (impl->paint_clip_region)
gdk_region_destroy (impl->paint_clip_region);
@ -2395,7 +2390,8 @@ gdk_window_set_modal_hint (GdkWindow *window,
gboolean modal)
{
GdkWindowObject *private;
gboolean is_mapped;
if (GDK_WINDOW_DESTROYED (window) ||
!WINDOW_IS_TOPLEVEL (window))
return;
@ -2403,7 +2399,10 @@ gdk_window_set_modal_hint (GdkWindow *window,
private = (GdkWindowObject*) window;
if (_gdk_modal_notify && private->modal_hint != modal) {
_gdk_modal_notify (window, modal);
gboolean is_mapped = GDK_WINDOW_IS_MAPPED (window);
if (is_mapped) {
_gdk_modal_notify (window, modal);
}
}
private->modal_hint = modal;

View File

@ -1,6 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<ArdourMIDIBindings version="1.0.0" name="Arturia MiniLab 3">
<!-- 2024-01-19 Alexandre Prokoudine: Map file creation -->
<!-- 2024-09-10 Alexandre Prokoudine: Update the map file -->
<!-- Transport controls. The rest is reserved for synths -->
@ -8,5 +9,13 @@
<Binding channel="1" ctl="106" function="transport-stop"/>
<Binding channel="1" ctl="107" function="transport-roll"/>
<Binding channel="1" ctl="108" function="toggle-rec-enable"/>
<Binding channel="1" ctl="109" action="Transport/ToggleClick"/>
<!-- Faders in DAW mode -->
<Binding channel="1" ctl="14" uri="/route/gain 1"/>
<Binding channel="1" ctl="15" uri="/route/gain 2"/>
<Binding channel="1" ctl="30" uri="/route/gain 3"/>
<Binding channel="1" ctl="31" uri="/route/gain 4"/>
</ArdourMIDIBindings>

View File

@ -0,0 +1,21 @@
ardour { ["type"] = "EditorAction", name = "Remove SysEx",
license = "MIT",
author = "Ardour Team",
description = [[Remove SysEx MIDI events from selected MIDI region(s).]]
}
function factory () return function ()
local sel = Editor:get_selection ()
for r in sel.regions:regionlist ():iter () do
local mr = r:to_midiregion ()
if mr:isnil () then goto continue end
local mm = mr:midi_source(0):model ()
local midi_command = mm:new_sysex_diff_command ("Remove SysEx Events")
for event in ARDOUR.LuaAPI.sysex_list (mm):iter () do
midi_command:remove (event)
end
mm:apply_command (Session, midi_command)
::continue::
end
end end

20
wscript
View File

@ -554,9 +554,20 @@ int main() { return 0; }''',
cxx_flags.append('--stdlib=libc++')
linker_flags.append('--stdlib=libc++')
if conf.options.cxx11 or conf.env['build_host'] in [ 'mavericks', 'yosemite', 'el_capitan', 'sierra', 'high_sierra', 'mojave', 'catalina' , 'bigsur', 'monterey', 'ventura', 'sonoma' ]:
if conf.options.cxx17:
conf.check_cxx(cxxflags=["-std=c++17"])
cxx_flags.append('-std=c++17')
elif conf.options.cxx11:
conf.check_cxx(cxxflags=["-std=c++11"])
cxx_flags.append('-std=c++11')
elif conf.env['build_host'] in [ 'bigsur', 'monterey', 'ventura', 'sonoma' ]:
conf.check_cxx(cxxflags=["-std=c++17"])
cxx_flags.append('-std=c++17')
elif conf.env['build_host'] in [ 'mavericks', 'yosemite', 'el_capitan', 'sierra', 'high_sierra', 'mojave', 'catalina' ]:
conf.check_cxx(cxxflags=["-std=c++11"])
cxx_flags.append('-std=c++11')
if conf.options.cxx11 or conf.options.cxx17 or conf.env['build_host'] in [ 'mavericks', 'yosemite', 'el_capitan', 'sierra', 'high_sierra', 'mojave', 'catalina' , 'bigsur', 'monterey', 'ventura', 'sonoma' ]:
if platform == "darwin":
# Mavericks and later changed the syntax to be used when including Carbon headers,
# from requiring a full path to requiring just the header name.
@ -567,6 +578,9 @@ int main() { return 0; }''',
linker_flags.append('--stdlib=libstdc++')
# Prevents visibility issues in standard headers
conf.define("_DARWIN_C_SOURCE", 1)
# C++17 removes 'unary_function' and 'binary_function' this breaks older boost versions
# prior to boost 1.81.0
cxx_flags.append('-D_LIBCPP_ENABLE_CXX17_REMOVED_UNARY_BINARY_FUNCTION')
else:
cxx_flags.append('-DBOOST_NO_AUTO_PTR')
cxx_flags.append('-DBOOST_BIND_GLOBAL_PLACEHOLDERS')
@ -952,6 +966,8 @@ def options(opt):
help='Do not ask questions that require confirmation during the build')
opt.add_option('--cxx11', action='store_true', default=False, dest='cxx11',
help='Turn on c++11 compiler flags (-std=c++11)')
opt.add_option('--cxx17', action='store_true', default=False, dest='cxx17',
help='Turn on c++17 compiler flags (-std=c++17)')
opt.add_option('--use-libc++', action='store_true', default=False, dest='use_libcpp',
help='Use libc++ instead of default or auto-detected stdlib')
opt.add_option('--address-sanitizer', action='store_true', default=False, dest='asan',
@ -1259,7 +1275,7 @@ int main () { int x = SFC_RF64_AUTO_DOWNGRADE; return 0; }
conf.env.append_value('CFLAGS', '-DCOMPILER_MINGW')
conf.env.append_value('CXXFLAGS', '-DPLATFORM_WINDOWS')
conf.env.append_value('CXXFLAGS', '-DCOMPILER_MINGW')
if conf.options.cxx11:
if conf.options.cxx11 or conf.options.cxx17:
conf.env.append_value('CFLAGS', '-D_USE_MATH_DEFINES')
conf.env.append_value('CXXFLAGS', '-D_USE_MATH_DEFINES')
conf.env.append_value('CFLAGS', '-DWIN32')