From c9486af6f6ce75e365fa1e353d792d092cc117f8 Mon Sep 17 00:00:00 2001
From: jvoigts <jvoigts@mit.edu>
Date: Sun, 29 May 2016 09:43:24 -0400
Subject: [PATCH] added simple example processor

this should work as very simple filter for one channel. The global var is shared between channels atm so it behaves weirdly on multi-chaannel data
---
 .../JuliaProcessor/exampleProcessor.jl        | 21 +++++++++++++++++++
 1 file changed, 21 insertions(+)
 create mode 100644 Source/Plugins/JuliaProcessor/exampleProcessor.jl

diff --git a/Source/Plugins/JuliaProcessor/exampleProcessor.jl b/Source/Plugins/JuliaProcessor/exampleProcessor.jl
new file mode 100644
index 000000000..2efab302f
--- /dev/null
+++ b/Source/Plugins/JuliaProcessor/exampleProcessor.jl
@@ -0,0 +1,21 @@
+# set things up here
+#global last=100
+
+# this function is called once per buffer upddate and is passed
+# the current buffer in data
+
+#data[:]=sin(data/tscale)*200;
+
+
+function oe_process!(data)
+	
+	global last;	
+
+	f=0.05;
+	for i in eachindex(data)
+		
+		data[i]=f*data[i] + (1-f)*last;
+		last = data[i];
+	end
+
+end
\ No newline at end of file
-- 
GitLab