44 void MonoMute::process(
int count,
float *input,
float *output,
PluginDef*) {
45 (void)memset(output, 0, count*
sizeof(
float));
56 void StereoMute::process(
int count,
float *input0,
float *input1,
57 float *output0,
float *output1,
PluginDef*) {
58 (void)memset(output0, 0, count*
sizeof(
float));
59 (void)memset(output1, 0, count*
sizeof(
float));
74 void MaxLevel::process(
int count,
float *input1,
float *input2,
float*,
float*,
PluginDef*) {
79 for (
int i = 0; i < count; i++) {
80 float t = abs(data[c][i]);
85 maxlevel[c] =
max(maxlevel[c], level);
120 plugin.set_pdef(
this);
123 void TunerAdapter::init(
unsigned int samplingFreq,
PluginDef *plugin) {
125 int priority, policy;
128 self.pitch_tracker.init(policy, priority, samplingFreq);
131 void TunerAdapter::set_and_check(
int use,
bool on) {
137 if (plugin.get_on_off() != bool(state)) {
138 plugin.set_on_off(
bool(state));
141 if (use == switcher_use) {
146 int TunerAdapter::activate(
bool start,
PluginDef *plugin) {
153 void TunerAdapter::feed_tuner(
int count,
float* input,
float*,
PluginDef* plugin) {
157 int TunerAdapter::regparam(
const ParamReg& reg) {
185 name =
N_(
"Oscilloscope");
189 plugin.set_pdef(
this);
191 sigc::mem_fun(*
this, &OscilloscopeAdapter::change_buffersize));
194 int OscilloscopeAdapter::osc_register(
const ParamReg& reg) {
199 void OscilloscopeAdapter::change_buffersize(
unsigned int size_) {
203 unsigned int d = mul_buffer;
204 if (size_ > 1023) d = 1;
205 buffer =
new float[size_ * d];
212 float* OscilloscopeAdapter::buffer = 0;
213 unsigned int OscilloscopeAdapter::size = 0;
216 void OscilloscopeAdapter::fill_buffer(
int count,
float *input0,
float *output0,
PluginDef *p) {
218 if (count*
self.mul_buffer != static_cast<int>(size)) {
221 if (
self.mul_buffer > 1) {
222 (void)memmove(buffer, &buffer[count],
sizeof(
float)*count*(
self.mul_buffer-1));
224 (void)memcpy(&buffer[count*(
self.mul_buffer-1)], output0,
sizeof(float)*count);
227 int OscilloscopeAdapter::activate(
bool start,
PluginDef *plugin) {
232 memset(buffer, 0, size*
sizeof(
float));
void used_by_midi(bool on)
CmdConnection::msg_type start
OscilloscopeAdapter(ModuleSequencer &engine)
void get_sched_priority(int &policy, int &priority, int prio_dim=0)
static const unsigned int channelcount
void set_fast_note_detection(bool v)
void set_on_off(bool v) const
TunerAdapter(ModuleSequencer &engine)
sigc::signal< int, bool > activation
#define PLUGINDEF_VERSION
registerfunc register_params
virtual void set_rack_changed()
sigc::signal< void, unsigned int > size_change
activatefunc activate_plugin
process_stereo_audio stereo_audio
void add(int count, float *input)
process_mono_audio mono_audio
sigc::signal< void, unsigned int > & signal_buffersize_change()