diff dsp/synth/dd.m @ 34:c75bb62b90a9

Imported audio synthesis tools.
author samer
date Sun, 20 Jan 2013 19:05:05 +0000
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/dsp/synth/dd.m	Sun Jan 20 19:05:05 2013 +0000
@@ -0,0 +1,14 @@
+function x=dd(x)
+% dd - convert input sequence or array to sequence
+%
+% dd :: [[N,M]] -> seq([[N]]).
+% dd :: [[N]] -> seq(real).
+% dd :: seq([[N,M]]) -> seq([[N]]).
+
+if isseq(x)
+	if size(x,2)>1, x=concat(map(@slices,x)); end
+else
+	if isscalar(x),     x=repeat(x); 
+	else                x=slices(x);
+	end
+end