[SCM] calf/master: + Small modules: add a plugin that calculates a logical OR of its audio input, and writes the value to a control output (useful for audio rate triggers)
js at users.alioth.debian.org
js at users.alioth.debian.org
Tue May 7 15:37:44 UTC 2013
The following commit has been merged in the master branch:
commit a2051bf8224f06a8debf946134a3b75c0d07df5a
Author: kfoltman <kfoltman at 78b06b96-2940-0410-b7fc-879d825d01d8>
Date: Sun Oct 12 21:30:35 2008 +0000
+ Small modules: add a plugin that calculates a logical OR of its audio input, and writes the value to a control output (useful for audio rate triggers)
git-svn-id: https://calf.svn.sourceforge.net/svnroot/calf/trunk@331 78b06b96-2940-0410-b7fc-879d825d01d8
diff --git a/src/calf/modulelist.h b/src/calf/modulelist.h
index e7f2b69..4c53787 100644
--- a/src/calf/modulelist.h
+++ b/src/calf/modulelist.h
@@ -73,6 +73,7 @@
PER_SMALL_MODULE_ITEM(between_c, "between_c")
PER_SMALL_MODULE_ITEM(less_c, "less_c")
PER_SMALL_MODULE_ITEM(clip_c, "clip_c")
+ PER_SMALL_MODULE_ITEM(trigger_a2c, "trigger_a2c")
PER_SMALL_MODULE_ITEM(timer_c, "timer_c")
PER_SMALL_MODULE_ITEM(prio_mux_c, "prio_mux_c")
PER_SMALL_MODULE_ITEM(prio_enc8_c, "prio_enc8_c")
diff --git a/src/modules_small.cpp b/src/modules_small.cpp
index b369744..6667d05 100644
--- a/src/modules_small.cpp
+++ b/src/modules_small.cpp
@@ -574,6 +574,32 @@ public:
}
};
+/// converter of trigger signals from audio to control rate
+class trigger_a2c_audio_module: public null_small_audio_module
+{
+public:
+ enum { in_count = 1, out_count = 1 };
+ float *ins[in_count];
+ float *outs[out_count];
+ void process(uint32_t count) {
+ for (uint32_t i = 0; i < count; i++)
+ {
+ if (ins[0][i] > 0)
+ {
+ *outs[0] = 1.f;
+ return;
+ }
+ }
+ *outs[0] = 0.f;
+ }
+ static void plugin_info(plugin_info_iface *pii)
+ {
+ pii->names("trigger_a2c", "Audio-to-control OR", "kf:BooleanPlugin", "ta2c");
+ pii->audio_port("in", "In").input();
+ pii->control_port("out", "Out", 0.f).output().toggle();
+ }
+};
+
/// Monostable multivibrator like 74121 or 74123, with reset input, progress output (0 to 1), "finished" signal, configurable to allow or forbid retriggering.
class timer_c_audio_module: public null_small_audio_module
{
--
calf audio plugins packaging
More information about the pkg-multimedia-commits
mailing list