aboutsummaryrefslogtreecommitdiff
path: root/src/zexy.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/zexy.c')
-rw-r--r--src/zexy.c58
1 files changed, 36 insertions, 22 deletions
diff --git a/src/zexy.c b/src/zexy.c
index b8ef63a..46fdcbe 100644
--- a/src/zexy.c
+++ b/src/zexy.c
@@ -1,4 +1,4 @@
-/*
+/*
* zexy: the swiss army knife for Pure Data
*
* (c) 1999-2011 IOhannes m zmölnig, forum::für::umläute, institute of electronic music and acoustics (iem)
@@ -7,12 +7,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
- *
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
@@ -34,8 +34,7 @@
/* do a little help thing */
-typedef struct zexy
-{
+typedef struct zexy {
t_object t_ob;
} t_zexy;
@@ -43,7 +42,8 @@ t_class *zexy_class;
static void zexy_help(void)
{
- endpost(); endpost();
+ endpost();
+ endpost();
post("...this is the zexy external "VERSION"...");
endpost();
post(""HEARTSYMBOL" handling signals");
@@ -54,29 +54,34 @@ static void zexy_help(void)
post("sfplay\t\t:: play back a (multichannel) soundfile : (c) ritsch 1999");
post("sfrecord\t:: record a (multichannel) soundfile : based on ritsch");
- endpost(); post(""HEARTSYMBOL" generating signals");
+ endpost();
+ post(""HEARTSYMBOL" generating signals");
post("noish~\t\t:: generate bandlimited noise");
post("noisi~\t\t:: generate bandlimited noise");
post("dirac~\t\t:: generate a dirac-pulse");
post("step~\t\t:: generate a unity-step");
post("dfreq~\t\t:: detect frequency by counting zero-crossings : (c) ritsch 1998");
- endpost(); post(""HEARTSYMBOL" manipulating signals");
+ endpost();
+ post(""HEARTSYMBOL" manipulating signals");
post("limiter~\t:: limit/compress one or more signals");
post("nop~\t\t:: pass through a signal (delay 1 block)");
post("z~\t\t:: samplewise delay");
post("swap~\t\t:: byte-swap a signal");
post("quantize~\t:: quantize a signal");
- endpost(); post(""HEARTSYMBOL" binary operations on signals");
+ endpost();
+ post(""HEARTSYMBOL" binary operations on signals");
post("abs~, sgn~, >~, <~, ==~, &&~, ||~");
- endpost(); post(""HEARTSYMBOL" multary operations on signals");
+ endpost();
+ post(""HEARTSYMBOL" multary operations on signals");
post("multiline~\t:: multiple line~ multiplication");
post("multiplex~\t:: multiplex 1 inlet~ to 1-of-various outlet~s");
post("demultiplex~\t:: demultiplex 1-of-various inlet~s to 1 outlet~");
- endpost(); post(""HEARTSYMBOL" investigating signals in message-domain");
+ endpost();
+ post(""HEARTSYMBOL" investigating signals in message-domain");
post("pack~\t\t:: convert a signal into a list of floats");
post("unpack~\t\t:: convert packages of floats into a signal");
@@ -85,8 +90,9 @@ static void zexy_help(void)
post("tavg~\t\t:: outputs average of a signal between two bangs");
post("envrms~\t\t:: an env~-object that ouputs rms instead of db");
post("pdf~\t\t:: power density function");
-
- endpost(); post(""HEARTSYMBOL" basic message objects");
+
+ endpost();
+ post(""HEARTSYMBOL" basic message objects");
post("nop\t\t:: a no-operation");
post("lister\t\t:: stores lists");
post("any2list\t\t:: converts \"anything\" to lists");
@@ -104,7 +110,8 @@ static void zexy_help(void)
post("segregate\t:: sort inputs by type");
post(".\t\t:: scalar multiplication of vectors (lists of floats)");
- endpost(); post(""HEARTSYMBOL" advanced message objects");
+ endpost();
+ post(""HEARTSYMBOL" advanced message objects");
post("tabread4\t:: 4-point interpolating table-read object");
post("tabdump\t\t:: dump the table as a list");
post("tabset\t\t:: set a table with a list");
@@ -124,7 +131,8 @@ static void zexy_help(void)
post("urn\t\t:: unique random numbers");
post("operating_system\t:: information on the OS");
- endpost(); post("\n(l) forum::für::umläute except where indicated");
+ endpost();
+ post("\n(l) forum::für::umläute except where indicated");
post("this software is released under the GnuGPL that is provided with these files");
endpost();
}
@@ -135,12 +143,14 @@ static void *zexy_new(void)
return (x);
}
-void zexy_setup(void)
+void zexy_setup(void)
{
int i;
startpost("\n\t");
- for (i=0; i<3; i++) startpost(""HEARTSYMBOL"");
+ for (i=0; i<3; i++) {
+ startpost(""HEARTSYMBOL"");
+ }
endpost();
post("\t"HEARTSYMBOL" the zexy external "VERSION);
post("\t"HEARTSYMBOL" (c) 1999-2012 IOhannes m zmölnig");
@@ -149,9 +159,12 @@ void zexy_setup(void)
post("\t"HEARTSYMBOL" compiled: "__DATE__);
post("\t"HEARTSYMBOL" send me a 'help' message");
startpost("\t");
- for (i=0; i<3; i++) startpost(""HEARTSYMBOL"");
- endpost(); endpost();
-
+ for (i=0; i<3; i++) {
+ startpost(""HEARTSYMBOL"");
+ }
+ endpost();
+ endpost();
+
zexy_class = class_new(gensym("zexy"), zexy_new, 0, sizeof(t_zexy), 0, 0);
class_addmethod(zexy_class, zexy_help, gensym("help"), 0);
@@ -162,10 +175,11 @@ void zexy_setup(void)
}
#ifndef __WIN32__
-void verbose(int level, const char *fmt, ...){
+void verbose(int level, const char *fmt, ...)
+{
char buf[MAXPDSTRING];
va_list ap;
-
+
va_start(ap, fmt);
vsnprintf(buf, MAXPDSTRING-1, fmt, ap);
va_end(ap);