TimeNode::TimeNode(InternalPlugin* plugin, BufferFactory& bufs, const Raul::Symbol& symbol, bool polyphonic, GraphImpl* parent, SampleRate srate) : InternalBlock(plugin, symbol, false, parent, srate) { const Ingen::URIs& uris = bufs.uris(); _ports = new Raul::Array<PortImpl*>(1); _notify_port = new OutputPort( bufs, this, Raul::Symbol("notify"), 0, 1, PortType::ATOM, uris.atom_Sequence, Atom(), 1024); _notify_port->set_property(uris.lv2_name, bufs.forge().alloc("Notify")); _notify_port->set_property(uris.atom_supports, bufs.forge().make_urid(uris.time_Position)); _ports->at(0) = _notify_port; }
DelayNode::DelayNode(InternalPlugin* plugin, BufferFactory& bufs, const Raul::Symbol& symbol, bool polyphonic, GraphImpl* parent, SampleRate srate) : InternalBlock(plugin, symbol, polyphonic, parent, srate) , _buffer(0) , _buffer_length(0) , _buffer_mask(0) , _write_phase(0) { const Ingen::URIs& uris = bufs.uris(); _ports = new Raul::Array<PortImpl*>(3); const float default_delay = 1.0f; _last_delay_time = default_delay; _delay_samples = default_delay; _delay_port = new InputPort(bufs, this, Raul::Symbol("delay"), 1, _polyphony, PortType::CONTROL, 0, bufs.forge().make(default_delay)); _delay_port->set_property(uris.lv2_name, bufs.forge().alloc("Delay")); _delay_port->set_property(uris.lv2_default, bufs.forge().make(default_delay)); _delay_port->set_property(uris.lv2_minimum, bufs.forge().make((float)(1.0/(double)srate))); _delay_port->set_property(uris.lv2_maximum, bufs.forge().make(MAX_DELAY_SECONDS)); _ports->at(0) = _delay_port; _in_port = new InputPort(bufs, this, Raul::Symbol("in"), 0, 1, PortType::AUDIO, 0, bufs.forge().make(0.0f)); _in_port->set_property(uris.lv2_name, bufs.forge().alloc("Input")); _ports->at(1) = _in_port; _out_port = new OutputPort(bufs, this, Raul::Symbol("out"), 0, 1, PortType::AUDIO, 0, bufs.forge().make(0.0f)); _out_port->set_property(uris.lv2_name, bufs.forge().alloc("Output")); _ports->at(2) = _out_port; //_buffer = bufs.get(PortType::AUDIO, bufs.audio_buffer_size(buffer_length_frames), true); }