21 #include "libardour-config.h"
56 #ifdef AUDIOUNIT_SUPPORT
75 #ifdef NO_PLUGIN_STATE
76 static bool seen_get_state_message =
false;
77 static bool seen_set_state_message =
false;
81 PluginInfo::is_instrument ()
const
83 return (n_inputs.n_midi() != 0) && (n_outputs.n_audio() > 0);
90 , _have_presets (false)
91 , _have_pending_stop_events (false)
92 , _parameter_changed_since_last_preset (false)
100 , _engine (other._engine)
101 , _session (other._session)
102 , _info (other._info)
104 , _have_presets (false)
105 , _have_pending_stop_events (false)
106 , _parameter_changed_since_last_preset (false)
148 plugs = mgr.ladspa_plugin_info();
153 plugs = mgr.lv2_plugin_info();
157 #ifdef WINDOWS_VST_SUPPORT
159 plugs = mgr.windows_vst_plugin_info();
165 plugs = mgr.lxvst_plugin_info();
169 #ifdef AUDIOUNIT_SUPPORT
171 plugs = mgr.au_plugin_info();
179 PluginInfoList::iterator i;
181 for (i = plugs.begin(); i != plugs.end(); ++i) {
182 if (identifier == (*i)->unique_id){
183 return (*i)->load (session);
187 #ifdef WINDOWS_VST_SUPPORT
193 for (i = plugs.begin(); i != plugs.end(); ++i) {
194 if (identifier == (*i)->name){
195 return (*i)->load (session);
206 for (i = plugs.begin(); i != plugs.end(); ++i) {
207 if (identifier == (*i)->name){
208 return (*i)->load (session);
238 for (map<string, PresetRecord>::const_iterator i =
_presets.begin(); i !=
_presets.end(); ++i) {
239 if (i->second.label == label) {
250 map<string, PresetRecord>::const_iterator pr =
_presets.find (uri);
312 vector<Plugin::PresetRecord>
315 vector<PresetRecord> p;
317 #ifndef NO_PLUGIN_STATE
323 for (map<string, PresetRecord>::const_iterator i =
_presets.begin(); i !=
_presets.end(); ++i) {
324 p.push_back (i->second);
327 if (!seen_set_state_message) {
328 info <<
string_compose (
_(
"Plugin presets are not supported in this build of %1. Consider paying for a full version"),
331 seen_set_state_message =
true;
381 p = node.
property (
X_(
"parameter-changed-since-last-preset"));
399 #ifndef NO_PLUGIN_STATE
402 if (!seen_get_state_message) {
403 info <<
string_compose (
_(
"Saving plugin settings is not supported in this build of %1. Consider paying for the full version"),
406 seen_get_state_message =
true;
virtual ChanCount output_streams() const
void ensure_buffers(DataType type, size_t num_buffers, size_t buffer_capacity)
Plugin(ARDOUR::AudioEngine &, ARDOUR::Session &)
virtual int set_state(const XMLNode &, int version)
const PresetRecord * preset_by_uri(const std::string &)
MidiBuffer & get_midi(size_t i)
const std::string & value() const
virtual ChanCount input_streams() const
PresetRecord _last_preset
virtual void set_parameter(uint32_t which, float val)
PresetRecord save_preset(std::string)
virtual float get_parameter(uint32_t which) const =0
BufferSet _pending_stop_events
void track(const MidiBuffer::const_iterator &from, const MidiBuffer::const_iterator &to)
std::ostream & endmsg(std::ostream &ostr)
PBD::Signal2< void, uint32_t, float > ParameterChanged
virtual int connect_and_run(BufferSet &bufs, ChanMapping in, ChanMapping out, pframes_t nframes, framecnt_t offset)
virtual std::string do_save_preset(std::string)=0
const PresetRecord * preset_by_label(const std::string &)
void resolve_notes(MidiBuffer &buffer, framepos_t time)
boost::shared_ptr< Plugin > PluginPtr
XMLProperty * property(const char *)
PBD::Signal0< void > PresetLoaded
bool string_is_affirmative(const std::string &str)
std::map< std::string, PresetRecord > _presets
virtual void add_state(XMLNode *) const =0
MidiStateTracker _tracker
PBD::Signal0< void > PresetAdded
bool _have_pending_stop_events
bool _parameter_changed_since_last_preset
LIBPBD_API Transmitter info
void monitoring_changed()
XMLProperty * add_property(const char *name, const std::string &value)
virtual void find_presets()=0
static PluginManager & instance()
void merge_from(const BufferSet &in, framecnt_t nframes)
const ChanCount & count() const
PluginPtr find_plugin(ARDOUR::Session &, std::string unique_id, ARDOUR::PluginType)
ARDOUR::Session & _session
std::list< PluginInfoPtr > PluginInfoList
void realtime_handle_transport_stopped()
virtual std::string state_node_name() const =0
static const ChanCount ZERO
PBD::Signal0< void > PresetRemoved
std::vector< PresetRecord > get_presets()
virtual bool load_preset(PresetRecord)
virtual void set_info(const PluginInfoPtr inf)
void remove_preset(std::string)
std::string string_compose(const std::string &fmt, const T1 &o1)
virtual void do_remove_preset(std::string)=0