iem_utils-v0.0.20181004/DEVELOPER.md0000644000175000017500000000147712661077632016553 0ustar zmoelnigzmoelnigDeveloper information for iem_utils =================================== "iem_utils" is META-library that aggragates a number of small (dependency-free) libraries and GUI-plugins for Pd. All libraries are developped separately, and are included here by means of git-submodules. ## Checkout ~~~sh git clone https://git.iem.at/pd/iem_utils cd iem_utils git submodule update --init ~~~ ## Building There is a master Makefile that recursively builds all the libraries (that need building) ~~~sh make ~~~ ## Updating git-submodules are set to a specific commit (each) - rather than tracking a remote ("live") branch. The following brings all submodules up-to-date with their current 'master' branches. ~~~sh git submodule foreach git checkout master git submodule foreach git pull ~~~ ## Pushing changes in submodules TODO iem_utils-v0.0.20181004/Makefile0000644000175000017500000000173513355472247016343 0ustar zmoelnigzmoelnigsubprojects = iem_adaptfilt iem_dp iem_roomsim iem_spec2 iem_tab punish all: $(subprojects) .PHONY: all clean archive release submodule update dummy .PHONY: $(subprojects) library=iem_utils version=0.0.$(shell date +%Y%m%d) archivefile=$(library)-v$(version).tgz IEM_CFLAGS=-DPD $(CPPFLAGS) -fPIC $(CFLAGS) IEM_LDFLAGS=-export-dynamic -fPIC -shared $(LDFLAGS) clean: -find . -name "*.o" -delete -find . -name "*.pd_*" -delete -find . -name "*.dll" -delete -find . -name "*.tgz" -delete dummy: @echo -n archive: $(archivefile) release: $(archivefile) git tag -m "released iem_utils $(version)" "v$(version)" submodule: .gitmodules git submodule init git submodule update update: git submodule foreach git checkout master git submodule foreach git pull %.tgz: dummy -rm -f $@ tar --transform "s|^|$(@:.tgz=)/|" --exclude-vcs --exclude='.*' --exclude='*.tgz' --exclude $@ -czf $@ * iem_adaptfilt iem_dp iem_roomsim iem_spec2 iem_tab punish: $(MAKE) -C $@ \ $(empty) iem_utils-v0.0.20181004/README.md0000644000175000017500000000257613004410431016140 0ustar zmoelnigzmoelnigiem - collection of utility libraries for Pure Data (Pd) ======================================================== This is a collection of (unrelated) external libraries for Pd, developed at the Institute of Electronic Music and Acoustics (iem) at the University of Music and Performing Arts Graz, Austria. # LICENSE Each library comes with their own license, but all are released under an open source license (GPL2+, BSD-3). # CONTENTS ## Pd libraries ### iem_adaptfilt adaptive filtering https://git.iem.at/pd/iem_adaptfilt ### iem_dp double precision https://git.iem.at/pd/iem_dp ### iem_roomsim room simulation https://git.iem.at/pd/iem_roomsim ### iem_spec2 optimized objects for spectral processing https://git.iem.at/pd/iem_spec2 ### iem_tab table maths https://git.iem.at/pd/iem_tab ## Pd GUI plugins ### kiosk-plugin run Pure Data in kiosk mode https://git.iem.at/pd-gui/kiosk-plugin ### patch2svg-plugin save patches as SVG https://git.iem.at/pd-gui/patch2svg-plugin ### tclprompt-plugin pd-gui plugin that (re)adds a wee tcl-prompt to the Pd-console https://git.iem.at/pd-gui/tclprompt-plugin ### punish/triggerize-plugin pd-gui plugin that helps avoiding fan-outs by inserting [trigger] as appropriate. https://git.iem.at/pd-gui/punish ### punish/patcherize-plugin pd-gui plugin that helps refactoring code into abstraction/subpatches. https://git.iem.at/pd-gui/punish iem_utils-v0.0.20181004/iem16/0000755000175000017500000000000013303616631015604 5ustar zmoelnigzmoelnigiem_utils-v0.0.20181004/iem16/tab16play~-help.pd0000644000175000017500000000333013236306553021063 0ustar zmoelnigzmoelnig#N canvas 159 54 804 495 10; #X msg 639 93 \; pd dsp 0; #X floatatom 11 342 0 0 0 0 - - -; #X msg 11 109 set array99; #X text 93 109 "set" message permits you to switch between arrays; #X text 138 228 creation argument initializes array name; #X obj 11 316 env~ 16384; #X obj 87 360 dac~ 1; #X obj 87 323 *~; #X obj 100 304 line~; #X msg 100 263 0.1 100; #X msg 116 284 0 100; #X text 162 264 on; #X text 157 283 off; #X text 148 301 envelope; #X text 148 312 generator; #X text 101 248 amplitude controls:; #X text 131 362 audio output; #X obj 87 342 hip~ 5; #X msg 26 179 0 44100; #X msg 27 158 44100; #X msg 26 138 bang; #X text 80 136 "bang" or 0 plays whole sample; #X text 82 157 play starting at 44100th sample; #X text 93 177 play starting at beginning for 44100 samples; #X msg 25 199 44100 1000; #X text 103 198 play from 44100 through 45099 (1000 samples); #X obj 589 205 table16 array99; #X text 389 444 updated for iem16 version1.0; #X obj 5 439 tab16write~; #X obj 5 458 tab16read4~; #X obj 89 458 tab16read; #X obj 89 439 tab16write; #X obj 166 439 tab16send~; #X obj 166 458 tab16receive~; #X obj 32 13 tab16play~; #X text 29 43 The [tab16play~] object is the same as the [tabplay~] object \, but it refers to 16bit-arrays stored in [table16] instead of floating-point arrays (stored in normal pd-tables/arrays); #X obj 328 444 table16; #X text 11 417 see also:; #X text 108 14 play a 16bit-table as a sample (non-transposing); #X obj 11 228 tab16play~ array99; #X connect 2 0 39 0; #X connect 5 0 1 0; #X connect 7 0 17 0; #X connect 8 0 7 1; #X connect 9 0 8 0; #X connect 10 0 8 0; #X connect 17 0 6 0; #X connect 18 0 39 0; #X connect 19 0 39 0; #X connect 20 0 39 0; #X connect 24 0 39 0; #X connect 39 0 5 0; #X connect 39 0 7 0; iem_utils-v0.0.20181004/iem16/iem16_delay.h0000644000175000017500000000230613303612220020043 0ustar zmoelnigzmoelnig/* copyleft (c) 2003 forum::für::umläute -- IOhannes m zmölnig @ IEM * based on d_array.c from pd: * Copyright (c) 1997-1999 Miller Puckette and others. * For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. */ #ifndef INCLUDE_IEM16_DELAY_H__ #define INCLUDE_IEM16_DELAY_H__ /* sampling */ #include "iem16.h" #include #if defined __WIN32 || defined __WIN32__ static int ugen_getsortno(void){return 0;} #else extern int ugen_getsortno(void); #endif t_class *sigdel16write_class; typedef struct del16writectl{ int c_n; t_iem16_16bit *c_vec; int c_phase; } t_del16writectl; typedef struct _sigdel16write{ t_object x_obj; t_symbol *x_sym; t_del16writectl x_cspace; int x_sortno; /* DSP sort number at which this was last put on chain */ int x_rsortno; /* DSP sort # for first del16read or write in chain */ int x_vecsize; /* vector size for del16read~ to use */ float x_f; } t_sigdel16write; void sigdel16write_checkvecsize(t_sigdel16write *x, int vecsize); # define XTRASAMPS 4 # define SAMPBLK 4 #define DEFDELVS 64 /* LATER get this from canvas at DSP time */ #endif iem_utils-v0.0.20181004/iem16/iem16.c0000644000175000017500000000357513303611300016667 0ustar zmoelnigzmoelnig/* ...this is a very IEM16 external ... it allows for 16bit-constructs where float would eat too much memory forum::für::umläute@IEM:2003 */ #include "iem16.h" /* do a little help thing */ typedef struct iem16 { t_object x_obj; } t_iem16; static t_class *iem16_class; static void *iem16_new(void){ t_iem16 *x = (t_iem16 *)pd_new(iem16_class); post("iem16: 16bit objects for low memory usage"); return(x); } /* include some externals */ void del16read_tilde_setup(); void del16write_tilde_setup(); void tab16play_tilde_setup(); void tab16read4_setup(); void tab16read4_tilde_setup(); void tab16read_setup(); void tab16read_tilde_setup(); void tab16receive_tilde_setup(); void tab16send_tilde_setup(); void tab16write_setup(); void tab16write_tilde_setup(); void table16_setup(); void vd16_tilde_setup(); void iem16_setup(void) { static unsigned int setupcount=0; if(setupcount>0) { post("iem16:\tsetup called several times, skipping..."); return; } setupcount++; del16read_tilde_setup(); del16write_tilde_setup(); tab16play_tilde_setup(); tab16read4_setup(); tab16read4_tilde_setup(); tab16read_setup(); tab16read_tilde_setup(); tab16receive_tilde_setup(); tab16send_tilde_setup(); tab16write_setup(); tab16write_tilde_setup(); table16_setup(); vd16_tilde_setup(); /* ************************************** */ post("iem16:\t16bit-objects for low memory usage"); post("iem16:\t(l) forum::für::umläute\t\tIOhannes m zmölnig"); post("iem16:\tInstitute of Electronic Music and Acoustics, Graz - iem"); post("iem16:\tcompiled: "__DATE__); iem16_class = class_new(gensym("iem16"), iem16_new, 0, sizeof(t_iem16), CLASS_NOINLET, 0); class_addcreator((t_newmethod)iem16_new, gensym("IEM16"), 0); } void IEM16_setup(void){ iem16_setup(); } iem_utils-v0.0.20181004/iem16/table16.c0000644000175000017500000001366513303611372017216 0ustar zmoelnigzmoelnig/* copyleft (c) 2003 forum::für::umläute -- IOhannes m zmölnig @ IEM * based on d_array.c from pd: * Copyright (c) 1997-1999 Miller Puckette and others. * For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. */ /* sampling */ #include "iem16_table.h" #include #include #include /* for read/write to files */ #if (defined(_MSC_VER) && (_MSC_VER > 600)) # define fdopen(fd,type) _fdopen(fd,type) #endif static int am_bigendian(void){ /* actually this should be in m_pd.h */ unsigned short s = 1; unsigned char c = *(char *)(&s); return (c==0); } static void table16_const(t_table16*x, t_float f); static void *table16_new(t_symbol *s, t_float f){ t_table16 *x = (t_table16*)pd_new(table16_class); int i=f; if(i<1)i=100; x->x_tablename=s; x->x_size=i; x->x_table=getbytes(x->x_size*sizeof(t_iem16_16bit)); x->x_usedindsp=0; pd_bind(&x->x_obj.ob_pd, x->x_tablename); x->x_canvas = canvas_getcurrent(); table16_const(x, 0); return(x); } static void table16_free(t_table16 *x){ if(x->x_table)freebytes(x->x_table, x->x_size*sizeof(t_iem16_16bit)); pd_unbind(&x->x_obj.ob_pd, x->x_tablename); } int table16_getarray16(t_table16*x, int*size,t_iem16_16bit**vec){ *size=x->x_size; *vec =x->x_table; return 1; } void table16_usedindsp(t_table16*x){ x->x_usedindsp=1; } static void table16_resize(t_table16*x, t_float f){ int i=f; int was=x->x_size; if (i<1){ error("can only resize to sizes >0"); return; } x->x_table=resizebytes(x->x_table, was*sizeof(t_iem16_16bit), i*sizeof(t_iem16_16bit)); if(i>was)memset(x->x_table+was, 0, (i-was)*sizeof(t_iem16_16bit)); x->x_size =i; if (x->x_usedindsp) canvas_update_dsp(); } static void table16_const(t_table16*x, t_float f){ t_iem16_16bit s = (t_iem16_16bit)f; int i = x->x_size; t_iem16_16bit*buf=x->x_table; while(i--)*buf++=s; } static void table16_from(t_table16*x, t_symbol*s, int argc, t_atom*argv){ float scale=IEM16_SCALE_UP; int resize=0; int startfrom=0, startto=0, endfrom=0, endto=x->x_size; t_garray *a=0; int npoints; t_word *vec=(0), *src=(0); t_iem16_16bit *dest; int i,length=0; if(argc<1 || argv->a_type!=A_SYMBOL){ error("you have to specify the from-table !"); return; } s=atom_getsymbol(argv); argc--;argv++; if (!(a = (t_garray *)pd_findbyclass(s, garray_class))){ error("%s: no such array", s->s_name); return; } else if (!garray_getfloatwords(a, &npoints, &vec)){ error("%s: bad template for tabread4", s->s_name); return; } if(argc>0 && atom_getsymbol(argv+argc-1)==gensym("resize")){ resize=1; argc--; } endfrom=npoints; switch(argc){ case 0:break; case 4: endto =atom_getfloat(argv+3); case 3: startto =atom_getfloat(argv+2); case 2: endfrom =atom_getfloat(argv+1); case 1: startfrom=atom_getfloat(argv); break; default: error("table16: from [ [ [ []]]] [resize]"); return; } if(startfrom<0)startfrom=0; if (startto<0)startto=0; if(endfrom<=startfrom)return; if(endto <=startto) return; length=endfrom-startfrom; if(resize){ if(x->x_size < (startto+length))table16_resize(x, startto+length); } else{ if(x->x_size < (startto+length))length=x->x_size-startto; } endfrom=startfrom+length; endto =startto+length; dest=x->x_table+startto; src =vec+startfrom; i=length; while(i--)*dest++=(*src++).w_float * scale; //post("from %s (%d, %d) --> (%d, %d)\tresize=%s", s->s_name, startfrom, endfrom, startto, endto, (resize)?"yes":"no"); } #define BINREADMODE "rb" #define BINWRITEMODE "wb" static void table16_read16(t_table16 *x, t_symbol *filename, t_symbol *endian, t_floatarg fskip) { int skip = fskip, filedesc; int i, nelem; t_iem16_16bit *vec; FILE *fd; char buf[MAXPDSTRING], *bufptr; short s; int cpubig = am_bigendian(), swap = 0; char c = endian->s_name[0]; if (c == 'b') { if (!cpubig) swap = 1; } else if (c == 'l') { if (cpubig) swap = 1; } else if (c) { error("array_read16: endianness is 'l' (low byte first ala INTEL)"); post("... or 'b' (high byte first ala MIPS,DEC,PPC)"); } if (!table16_getarray16(x, &nelem, &vec)) { error("%s: not a 16bit array", x->x_tablename->s_name); return; } if ((filedesc = open_via_path( canvas_getdir(x->x_canvas)->s_name, filename->s_name, "", buf, &bufptr, MAXPDSTRING, 1)) < 0 || !(fd = fdopen(filedesc, BINREADMODE)) ) { error("%s: can't open", filename->s_name); return; } if (skip) { long pos = fseek(fd, (long)skip, SEEK_SET); if (pos < 0) { error("%s: can't seek to byte %d", buf, skip); fclose(fd); return; } } for (i = 0; i < nelem; i++) { if (fread(&s, sizeof(s), 1, fd) < 1) { post("%s: read %d elements into table of size %d", filename->s_name, i, nelem); break; } if (swap) s = ((s & 0xff) << 8) | ((s & 0xff00) >> 8); vec[i] = s; } while (i < nelem) vec[i++] = 0; fclose(fd); } void table16_setup(void){ table16_class = class_new(gensym("table16"), (t_newmethod)table16_new, (t_method)table16_free, sizeof(t_table16), 0, A_DEFSYM, A_DEFFLOAT, 0); class_addmethod(table16_class, (t_method)table16_resize, gensym("resize"), A_DEFFLOAT, 0); class_addmethod(table16_class, (t_method)table16_const, gensym("const"), A_DEFFLOAT, 0); class_addmethod(table16_class, (t_method)table16_from, gensym("from"), A_GIMME, 0); class_addmethod(table16_class, (t_method)table16_read16, gensym("read16"), A_SYMBOL, A_DEFFLOAT, A_DEFSYM, 0); } void iem16_table_setup(void) { table16_setup(); } iem_utils-v0.0.20181004/iem16/build/0000755000175000017500000000000013236306553016707 5ustar zmoelnigzmoelnigiem_utils-v0.0.20181004/iem16/build/win-vs2003/0000755000175000017500000000000013236306553020437 5ustar zmoelnigzmoelnigiem_utils-v0.0.20181004/iem16/build/win-vs2003/iem16.vcproj0000644000175000017500000000737313236306553022617 0ustar zmoelnigzmoelnig iem_utils-v0.0.20181004/iem16/build/win-vs2003/iem16.sln0000644000175000017500000000134413236306553022100 0ustar zmoelnigzmoelnigMicrosoft Visual Studio Solution File, Format Version 8.00 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "iem16", "iem16.vcproj", "{C8DAED0C-AB39-4D01-976B-7E4E9E0E10DD}" ProjectSection(ProjectDependencies) = postProject EndProjectSection EndProject Global GlobalSection(SolutionConfiguration) = preSolution Release = Release EndGlobalSection GlobalSection(ProjectConfiguration) = postSolution {C8DAED0C-AB39-4D01-976B-7E4E9E0E10DD}.Release.ActiveCfg = Release|Win32 {C8DAED0C-AB39-4D01-976B-7E4E9E0E10DD}.Release.Build.0 = Release|Win32 EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution EndGlobalSection GlobalSection(ExtensibilityAddIns) = postSolution EndGlobalSection EndGlobal iem_utils-v0.0.20181004/iem16/build/win-vs6/0000755000175000017500000000000013236306553020220 5ustar zmoelnigzmoelnigiem_utils-v0.0.20181004/iem16/build/win-vs6/iem16.dsw0000644000175000017500000000106113236306553021656 0ustar zmoelnigzmoelnigMicrosoft Developer Studio Workspace File, Format Version 6.00 # WARNUNG: DIESE ARBEITSBEREICHSDATEI DARF NICHT BEARBEITET ODER GELSCHT WERDEN! ############################################################################### Project: "iem16"=.\iem16.dsp - Package Owner=<4> Package=<5> {{{ }}} Package=<4> {{{ }}} ############################################################################### Global: Package=<5> {{{ }}} Package=<3> {{{ }}} ############################################################################### iem_utils-v0.0.20181004/iem16/build/win-vs6/iem16.dsp0000644000175000017500000000571213236306553021656 0ustar zmoelnigzmoelnig# Microsoft Developer Studio Project File - Name="iem16" - Package Owner=<4> # Microsoft Developer Studio Generated Build File, Format Version 6.00 # ** NICHT BEARBEITEN ** # TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 CFG=IEM16 - WIN32 RELEASE !MESSAGE Dies ist kein gltiges Makefile. Zum Erstellen dieses Projekts mit NMAKE !MESSAGE verwenden Sie den Befehl "Makefile exportieren" und fhren Sie den Befehl !MESSAGE !MESSAGE NMAKE /f "iem16.mak". !MESSAGE !MESSAGE Sie knnen beim Ausfhren von NMAKE eine Konfiguration angeben !MESSAGE durch Definieren des Makros CFG in der Befehlszeile. Zum Beispiel: !MESSAGE !MESSAGE NMAKE /f "iem16.mak" CFG="IEM16 - WIN32 RELEASE" !MESSAGE !MESSAGE Fr die Konfiguration stehen zur Auswahl: !MESSAGE !MESSAGE "iem16 - Win32 Release" (basierend auf "Win32 (x86) Dynamic-Link Library") !MESSAGE # Begin Project # PROP AllowPerConfigDependencies 1 # PROP Scc_ProjName "" # PROP Scc_LocalPath "" CPP=cl.exe MTL=midl.exe RSC=rc.exe # PROP BASE Use_MFC 0 # PROP BASE Use_Debug_Libraries 0 # PROP BASE Output_Dir "Release" # PROP BASE Intermediate_Dir "Release" # PROP BASE Target_Dir "" # PROP Use_MFC 0 # PROP Use_Debug_Libraries 0 # PROP Output_Dir "" # PROP Intermediate_Dir "obj\" # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" # ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "IEM16_EXPORTS" /YX /FD /c # ADD CPP /nologo /MT /W3 /GX /I "..\..\pd\src" /D "WIN32" /D "NT" /D "_WINDOWS" /D "IEM16" /FR /YX /FD /c # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 # ADD MTL /nologo /win32 # SUBTRACT MTL /mktyplib203 # ADD BASE RSC /l 0xc07 /d "NDEBUG" # ADD RSC /l 0xc07 BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 # ADD LINK32 kernel32.lib wsock32.lib uuid.lib libc.lib oldnames.lib pd.lib /nologo /dll /machine:I386 /nodefaultlib /out:"..\iem16.dll" /libpath:"../../pd/bin" /export:iem16_setup # SUBTRACT LINK32 /pdb:none # Begin Target # Name "iem16 - Win32 Release" # Begin Group "Quellcodedateien" # PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" # Begin Source File SOURCE=.\iem16.c # End Source File # Begin Source File SOURCE=.\iem16_array.c # End Source File # Begin Source File SOURCE=.\iem16_array_tilde.c # End Source File # Begin Source File SOURCE=.\iem16_delay.c # End Source File # Begin Source File SOURCE=.\iem16_table.c # End Source File # End Group # Begin Group "Header-Dateien" # PROP Default_Filter "h;hpp;hxx;hm;inl" # Begin Source File SOURCE=.\iem16.h # End Source File # Begin Source File SOURCE=.\iem16_table.h # End Source File # Begin Source File SOURCE=..\..\pd\src\m_pd.h # End Source File # End Group # End Target # End Project iem_utils-v0.0.20181004/iem16/examples/0000755000175000017500000000000013236306553017426 5ustar zmoelnigzmoelnigiem_utils-v0.0.20181004/iem16/examples/tab16send~.pd0000644000175000017500000000126213236306553021741 0ustar zmoelnigzmoelnig#N canvas 151 91 705 277 12; #X text 113 26 writes one block of a signal continuously to an array ; #X text 41 60 creation argument: name of array; #X text 29 96 By default a block is 64 samples \; this can be reset using the block~ object.; #X text 376 239 updated for iem16 version1.0; #X obj 5 216 tab16write~; #X obj 5 235 tab16read4~; #X obj 109 235 tab16read; #X obj 109 216 tab16write; #X obj 204 216 tab16send~; #X obj 204 235 tab16receive~; #X obj 328 221 table16; #X text 17 195 see also:; #X text 14 137 16bit-signals are limited to 65536 values between -1.0..+1.0 ; #X text 16 157 if your signal has absolute values >1.0 \, these are wrapped around...; #X obj 11 27 tab16send~; iem_utils-v0.0.20181004/iem16/examples/del16write~.pd0000644000175000017500000000174213236306553022143 0ustar zmoelnigzmoelnig#N canvas 83 192 678 431 12; #X text 88 202 signal input; #X text 136 16 writes a signal in a delay line; #X text 281 235 1st argument: name of delay line; #X obj 24 203 sig~ 0; #X text 304 265 (= max. delay time); #X text 281 251 2nd argument: length of delay line in msec; #X text 24 292 see also:; #X obj 24 16 del16write~; #X obj 112 294 delread16~; #X obj 209 294 vd16~; #X text 16 353 similar pd-objects:; #X obj 201 352 delread~; #X obj 285 352 delwrite~; #X obj 378 352 vd~; #X obj 24 237 del16write~ del_line_xxx 500; #X text 21 51 This is very similar to the pd-object; #X text 49 81 It uses only 16bit to store the samples \, which will need only half of the memory of pd's floatingpoint-based object.; #X text 50 119 However \, there are 2 drawbacks: there will be some additional noise (because floats are more precise than 16bit) \, and you cannot have values>1 stored in the delay-line; #X obj 368 51 delwrite~; #X text 411 306 updated for iem16 version1.0; #X connect 3 0 14 0; iem_utils-v0.0.20181004/iem16/examples/table16.pd0000644000175000017500000000465513236306553021223 0ustar zmoelnigzmoelnig#N canvas 37 0 856 640 10; #X obj 30 21 table16; #X text 97 22 16bit-table; #X text 32 51 [table16] stores 16bit values. The normal pd-tables ([table] \, array) store the values as floating-points. While floating points are (often) more precise (this is of course not really true... \, esp. when comparing integer(4byte) to floating-point.) they use a lot of memory (4byte).; #X text 32 121 [table16] uses only 16bit (2bytes) to store the values \, which is half of the memory.; #X text 32 155 However there are 2 major drawbacks; #X text 53 172 a) less precision means less SNR - you can only store 65536 different values \, but this is what CD-quality is (should be good enough for most musical applications); #X text 55 221 b) the 65536 values (-32678..+32767) are mapped to -1.0..+1.0! This means you cannot store signals that exceed this magical limit. Please make sure \, that the signal has correct values (use [clip~]) or the unclipped values will get wrapped!; #X text 20 323 There are several objects to access the data of [table16]: ; #X obj 55 344 tab16write~; #X obj 55 363 tab16read4~; #X obj 279 363 tab16read; #X obj 279 344 tab16write; #X obj 164 344 tab16send~; #X obj 164 363 tab16receive~; #X obj 55 382 tab16read~; #X text 19 410 The message-objects [tab16read]/[tab16write] store the values directly (-32767..+32768) \, while the signal-objects convert the floats -1.0..+1.0 to the correct values or vice-versa.; #X text 270 21 updated for iem16 version1.0; #X msg 496 53 resize 100; #X obj 496 308 table16 array16 99; #N canvas 0 0 450 300 graph6 0; #X array array100 10 float 1; #A 0 1 2 3 4 5 6 7 8 9 0; #X coords 0 10 9 0 200 140 1; #X restore 477 452 graph; #X msg 478 409 \; array100 0 1 2 3 4 5 6 7 8 9; #X text 481 389 click to init float-array; #X msg 502 114 from array100; #X text 21 497 There is no beautiful graphical representation as with pd's arrays.; #X msg 508 139 from array100 resize; #X msg 516 190 from array100 20 30; #X msg 517 213 from array100 20 30 resize; #X msg 527 259 from array100 20 30 95; #X msg 527 279 from array100 20 30 95 resize; #X text 502 95 copy the data from a float-array; #X text 603 117 and resize the 16bit-array; #X text 513 173 copy floats (index20..30); #X text 653 192 and resize to 30-20; #X text 526 241 copy indexed values and insert at index95; #X connect 17 0 18 0; #X connect 22 0 18 0; #X connect 24 0 18 0; #X connect 25 0 18 0; #X connect 26 0 18 0; #X connect 27 0 18 0; #X connect 28 0 18 0; iem_utils-v0.0.20181004/iem16/examples/tab16read.pd0000644000175000017500000000154213236306553021526 0ustar zmoelnigzmoelnig#N canvas 245 143 703 316 12; #X text 62 102 index; #X floatatom 25 103 0 0 0 0 - - -; #X floatatom 25 199 0 0 0 0 - - -; #X text 70 197 output = array99[index]; #X text 189 157 creation argument; #X text 185 175 gives array name; #X msg 35 125 set array99; #X text 147 125 change array name; #X obj 25 165 tab16read array99; #X obj 422 131 table16 array99; #X obj 17 13 tab16read; #X text 412 257 updated for iem16 version1.0; #X obj 16 252 tab16write~; #X obj 16 271 tab16read4~; #X obj 120 271 tab16read; #X obj 120 252 tab16write; #X obj 217 252 tab16send~; #X obj 217 271 tab16receive~; #X obj 339 257 table16; #X text 108 15 - read numbers from a 16bit-table; #X text 21 42 since [table16] can only hold 16bit values \, the output of [tab16read] is limited to integer-values between -32768..+32767 ; #X connect 1 0 8 0; #X connect 6 0 8 0; #X connect 8 0 2 0; iem_utils-v0.0.20181004/iem16/examples/tab16play~.pd0000644000175000017500000000333013236306553021753 0ustar zmoelnigzmoelnig#N canvas 159 54 804 495 10; #X msg 639 93 \; pd dsp 0; #X floatatom 11 342 0 0 0 0 - - -; #X msg 11 109 set array99; #X text 93 109 "set" message permits you to switch between arrays; #X text 138 228 creation argument initializes array name; #X obj 11 316 env~ 16384; #X obj 87 360 dac~ 1; #X obj 87 323 *~; #X obj 100 304 line~; #X msg 100 263 0.1 100; #X msg 116 284 0 100; #X text 162 264 on; #X text 157 283 off; #X text 148 301 envelope; #X text 148 312 generator; #X text 101 248 amplitude controls:; #X text 131 362 audio output; #X obj 87 342 hip~ 5; #X msg 26 179 0 44100; #X msg 27 158 44100; #X msg 26 138 bang; #X text 80 136 "bang" or 0 plays whole sample; #X text 82 157 play starting at 44100th sample; #X text 93 177 play starting at beginning for 44100 samples; #X msg 25 199 44100 1000; #X text 103 198 play from 44100 through 45099 (1000 samples); #X obj 11 228 tab16play~ array99; #X obj 589 205 table16 array99; #X text 389 444 updated for iem16 version1.0; #X obj 5 439 tab16write~; #X obj 5 458 tab16read4~; #X obj 89 458 tab16read; #X obj 89 439 tab16write; #X obj 166 439 tab16send~; #X obj 166 458 tab16receive~; #X obj 32 13 tab16play~; #X text 29 43 The [tab16play~] object is the same as the [tabplay~] object \, but it refers to 16bit-arrays stored in [table16] instead of floating-point arrays (stored in normal pd-tables/arrays); #X obj 328 444 table16; #X text 11 417 see also:; #X text 108 14 play a 16bit-table as a sample (non-transposing); #X connect 2 0 26 0; #X connect 5 0 1 0; #X connect 7 0 17 0; #X connect 8 0 7 1; #X connect 9 0 8 0; #X connect 10 0 8 0; #X connect 17 0 6 0; #X connect 18 0 26 0; #X connect 19 0 26 0; #X connect 20 0 26 0; #X connect 24 0 26 0; #X connect 26 0 5 0; #X connect 26 0 7 0; iem_utils-v0.0.20181004/iem16/examples/tab16write~.pd0000644000175000017500000000200113236306553022132 0ustar zmoelnigzmoelnig#N canvas 119 134 697 433 10; #X msg 43 131 bang; #X obj 23 82 sig~ 3000; #X obj 23 110 phasor~; #X text 158 213 creation argument initializes array name; #X msg 40 181 set array99; #X msg 445 35 \; pd dsp 1; #X msg 524 37 \; pd dsp 0; #X text 85 133 bang to start recording; #X text 126 180 set the destination array; #X msg 43 153 stop; #X text 85 154 stop recording; #X text 385 366 updated for iem16 version1.0; #X obj 14 343 tab16write~; #X obj 14 362 tab16read4~; #X obj 118 362 tab16read; #X obj 118 343 tab16write; #X obj 213 343 tab16send~; #X obj 213 362 tab16receive~; #X obj 337 348 table16; #X text 26 322 see also:; #X obj 22 211 tab16write~ array99; #X obj 492 160 table16 array99; #X obj 31 27 tab16write~; #X text 120 27 object to write a 16bit-signal in an array; #X text 261 261 since [table16] can only hold 16bit-values \, the incoming signal (-1.0..+1.0) is stored as integer values -32768..+32767; #X connect 0 0 20 0; #X connect 1 0 2 0; #X connect 2 0 20 0; #X connect 4 0 20 0; #X connect 9 0 20 0; iem_utils-v0.0.20181004/iem16/examples/del16read~.pd0000644000175000017500000000267513236306553021732 0ustar zmoelnigzmoelnig#N canvas 24 20 800 531 12; #X text 372 274 1st argument: name of delay line; #X floatatom 116 253 0 0 0 0 - - -; #X text 151 255 float input (delay time in ms); #X text 127 310 signal output (delayed signal); #X floatatom 383 177 0 0 0 0 - - -; #X obj 116 375 snapshot~; #X floatatom 116 399 0 0 0 0 - - -; #X obj 24 246 loadbang; #X obj 24 313 metro 200; #X msg 32 273 \; pd dsp 1; #X text 424 176 input to delay line; #X obj 383 201 sig~; #X text 372 290 2nd argument: (initial) delay time in ms; #X text 36 443 see also:; #X obj 116 286 del16read~ del_example 1000; #X obj 383 226 del16write~ del_example 1000; #X obj 24 16 del16read~; #X obj 126 444 del16write~; #X obj 239 444 vd16~; #X text 133 14 - read a 16bit signal from a 16bit-delay line; #X obj 368 52 delread~; #X text 21 52 This is very similar to the pd-object; #X text 49 82 It uses only 16bit to store the samples \, which will need only half of the memory of pd's floatingpoint-based object.; #X text 50 120 However \, there are 2 drawbacks: there will be some additional noise (because floats are more precise than 16bit) \, and you cannot have values>1 stored in the delay-line; #X text 38 490 similar pd-objects:; #X obj 223 489 delread~; #X obj 307 489 delwrite~; #X obj 400 489 vd~; #X text 433 443 updated for iem16 version1.0; #X connect 1 0 14 0; #X connect 4 0 11 0; #X connect 5 0 6 0; #X connect 7 0 8 0; #X connect 7 0 9 0; #X connect 8 0 5 0; #X connect 11 0 15 0; #X connect 14 0 5 0; iem_utils-v0.0.20181004/iem16/examples/tab16read4~.pd0000644000175000017500000000253613236306553022014 0ustar zmoelnigzmoelnig#N canvas 59 33 741 466 10; #X text 21 207 signal input x(n); #X text 127 21 4-point-interpolating table lookup; #X obj 11 316 snapshot~; #X obj 30 290 metro 200; #X obj 11 124 sig~; #X floatatom 11 98 0 0 0 0 - - -; #X obj 30 264 r readout; #X floatatom 11 342 0 0 0 0 - - -; #X text 49 94 incoming signal is index. Indices should range from 1 to (size-2) so that the 4-point interpolation is meaningful. You can shift-drag the number box to see the effect of interpolation.; #X msg 34 158 set array99; #X text 116 158 "set" message permits you to switch between arrays ; #X text 149 228 creation argument initializes array name; #X obj 10 228 tab16read4~ array99; #X obj 460 301 table16 array99; #X text 395 400 updated for iem16 version1.0; #X obj 11 395 tab16write~; #X obj 11 414 tab16read4~; #X obj 95 414 tab16read; #X obj 95 395 tab16write; #X obj 172 395 tab16send~; #X obj 172 414 tab16receive~; #X obj 334 400 table16; #X obj 47 21 tab16read4~; #X text 7 51 tab16read4~ is used to build samplers and other table lookup algorithms. The interpolation scheme is 4-point polynomial. ; #X text 185 266 since [table16] can only hold 16bit-values \, the stored integer values -32768..+32767 are converted to floats -1.0..+1.0; #X connect 2 0 7 0; #X connect 3 0 2 0; #X connect 4 0 12 0; #X connect 5 0 4 0; #X connect 6 0 3 0; #X connect 9 0 12 0; #X connect 12 0 2 0; iem_utils-v0.0.20181004/iem16/examples/tab16write.pd0000644000175000017500000000162413236306553021746 0ustar zmoelnigzmoelnig#N canvas 44 17 653 456 12; #X floatatom 39 96 0 0 0 0 - - -; #X floatatom 176 170 0 0 0 0 - - -; #X text 208 192 creation argument; #X text 210 210 is array name; #X text 76 87 set y value; #X text 74 152 right inlet selects x value; #X msg 55 117 set array99; #X text 163 116 change array name; #X obj 39 195 tab16write array99; #X obj 31 27 tab16write; #X text 388 378 updated for iem16 version1.0; #X obj 17 355 tab16write~; #X obj 17 374 tab16read4~; #X obj 121 374 tab16read; #X obj 121 355 tab16write; #X obj 216 355 tab16send~; #X obj 216 374 tab16receive~; #X obj 340 360 table16; #X text 29 334 see also:; #X obj 438 156 table16 array99; #X text 133 28 write numbers to a 16bit-table; #X text 20 256 since [table16] can only hold 16bit-values \, the stored numbers have to be integer (ok \, we take care of this!) values between -32768..+32767.; #X connect 0 0 8 0; #X connect 1 0 8 1; #X connect 6 0 8 0; iem_utils-v0.0.20181004/iem16/examples/vd16~.pd0000644000175000017500000000240513236306553020732 0ustar zmoelnigzmoelnig#N canvas 88 40 717 480 12; #X floatatom 50 254 0 0 0 0 - - -; #X obj 50 347 outlet~; #X text 130 346 signal output (delayed signal); #X obj 50 282 sig~; #X text 99 279 signal input (delay time in ms); #X text 218 310 creation argument: name of delay line; #X text 35 400 see also:; #X obj 24 16 vd16~; #X text 77 10 reads a signal from a 16bit delay line at a variable delay time (4-point-interpolation); #X text 31 51 vd16~ implements a 4-point interpolating delay tap from a corresponding delwrite~ object. The delay in milliseconds of the tap is specified by the incoming signal.; #X obj 50 314 vd16~ del_example; #X text 16 433 similar pd-objects:; #X obj 201 432 delread~; #X obj 285 432 delwrite~; #X obj 378 432 vd~; #X obj 123 403 del16write~; #X obj 242 403 del16read~; #X text 411 386 updated for iem16 version1.0; #X text 28 116 This is very similar to the pd-object; #X text 56 137 It uses only 16bit to store the samples \, which will need only half of the memory of pd's floatingpoint-based object.; #X text 57 175 However \, there are 2 drawbacks: there will be some additional noise (because floats are more precise than 16bit) \, and you cannot have values>1 stored in the delay-line; #X obj 375 112 vd~; #X connect 0 0 3 0; #X connect 3 0 10 0; #X connect 10 0 1 0; iem_utils-v0.0.20181004/iem16/examples/tab16receive~.pd0000644000175000017500000000114413236306553022431 0ustar zmoelnigzmoelnig#N canvas 109 83 646 239 12; #X text 17 53 creation argument: name of array; #X text 16 83 By default a block is 64 samples \; this can be reset using the block~ object.; #X obj 21 18 tab16receive~; #X text 376 199 updated for iem16 version1.0; #X obj 5 176 tab16write~; #X obj 5 195 tab16read4~; #X obj 109 195 tab16read; #X obj 109 176 tab16write; #X obj 204 176 tab16send~; #X obj 204 195 tab16receive~; #X obj 328 181 table16; #X text 17 155 see also:; #X text 129 18 - read a block of a 16bit-signal from an array continuously ; #X text 10 129 16bit-signals are limited to 65536 values between -1.0..+1.0 ; iem_utils-v0.0.20181004/iem16/tab16play~.c0000644000175000017500000000674613303611300017752 0ustar zmoelnigzmoelnig/* copyleft (c) 2003 forum::für::umläute -- IOhannes m zmölnig @ IEM * based on d_array.c from pd: * Copyright (c) 1997-1999 Miller Puckette and others. * For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. */ /* tab16write~, tab16play~, tab16read~, tab16read4~, tab16send~, tab16receive~ */ #include "iem16_table.h" /* ------------ tab16play~ - non-transposing sample playback --------------- */ static t_class *tab16play_tilde_class; typedef struct _tab16play_tilde{ t_object x_obj; t_outlet *x_bangout; int x_phase; int x_nsampsintab; int x_limit; t_iem16_16bit *x_vec; t_symbol *x_arrayname; } t_tab16play_tilde; static void *tab16play_tilde_new(t_symbol *s){ t_tab16play_tilde *x = (t_tab16play_tilde *)pd_new(tab16play_tilde_class); x->x_phase = 0x7fffffff; x->x_limit = 0; x->x_arrayname = s; outlet_new(&x->x_obj, gensym("signal")); x->x_bangout = outlet_new(&x->x_obj, gensym("bang")); return (x); } static t_int *tab16play_tilde_perform(t_int *w){ t_tab16play_tilde *x = (t_tab16play_tilde *)(w[1]); t_float *out = (t_float *)(w[2]); t_iem16_16bit *fp; int n = (int)(w[3]), phase = x->x_phase, endphase = (x->x_nsampsintab < x->x_limit ? x->x_nsampsintab : x->x_limit), nxfer, n3; if (!x->x_vec || phase >= endphase) goto zero; nxfer = endphase - phase; fp = x->x_vec + phase; if (nxfer > n) nxfer = n; n3 = n - nxfer; phase += nxfer; while (nxfer--) *out++ = *fp++*IEM16_SCALE_DOWN; if (phase >= endphase) { x->x_phase = 0x7fffffff; while (n3--) *out++ = 0; } else x->x_phase = phase; return (w+4); zero: while (n--) *out++ = 0; return (w+4); } void tab16play_tilde_set(t_tab16play_tilde *x, t_symbol *s){ t_table16 *a; x->x_arrayname = s; if (!(a = (t_table16 *)pd_findbyclass(x->x_arrayname, table16_class))) { if (*s->s_name) pd_error(x, "tab16play~: %s: no such table16", x->x_arrayname->s_name); x->x_vec = 0; } else if (!table16_getarray16(a, &x->x_nsampsintab, &x->x_vec)) { error("%s: bad template for tab16play~", x->x_arrayname->s_name); x->x_vec = 0; } else table16_usedindsp(a); } static void tab16play_tilde_dsp(t_tab16play_tilde *x, t_signal **sp){ tab16play_tilde_set(x, x->x_arrayname); dsp_add(tab16play_tilde_perform, 3, x, sp[0]->s_vec, sp[0]->s_n); } static void tab16play_tilde_list(t_tab16play_tilde *x, t_symbol *s, int argc, t_atom *argv){ long start = atom_getfloatarg(0, argc, argv); long length = atom_getfloatarg(1, argc, argv); if (start < 0) start = 0; if (length <= 0)x->x_limit = 0x7fffffff; else x->x_limit = start + length; x->x_phase = start; } static void tab16play_tilde_stop(t_tab16play_tilde *x){ x->x_phase = 0x7fffffff; } void tab16play_tilde_setup(void){ tab16play_tilde_class = class_new(gensym("tab16play~"), (t_newmethod)tab16play_tilde_new, 0, sizeof(t_tab16play_tilde), 0, A_DEFSYM, 0); class_addmethod(tab16play_tilde_class, (t_method)tab16play_tilde_dsp, gensym("dsp"), A_CANT, 0); class_addmethod(tab16play_tilde_class, (t_method)tab16play_tilde_stop, gensym("stop"), 0); class_addmethod(tab16play_tilde_class, (t_method)tab16play_tilde_set, gensym("set"), A_DEFSYM, 0); class_addlist(tab16play_tilde_class, tab16play_tilde_list); } iem_utils-v0.0.20181004/iem16/iem16.h0000644000175000017500000000556013303612220016672 0ustar zmoelnigzmoelnig/* ********************************************** */ /* the IEM16 external */ /* ********************************************** */ /* forum::für::umläute */ /* ********************************************** */ /* the IEM16 external is a runtime-library for miller s. puckette's realtime-computermusic-software "pure data" * therefore you NEED "pure data" to make any use of the IEM16 external * (except if you want to use the code for other things) * download "pure data" at https://puredata.info * if you are looking for the latest release of the IEM16-external you should have another look at https://git.iem.at/pd/iem16 * * IEM16 is published under the GNU GeneralPublicLicense, that must be shipped with IEM16. * if you are using Debian GNU/linux, the GNU-GPL can be found under /usr/share/common-licenses/GPL * if you still haven't found a copy of the GNU-GPL, have a look at http://www.gnu.org * * "pure data" has it's own license, that comes shipped with "pure data". * * there are ABSOLUTELY NO WARRANTIES for anything */ #ifndef INCLUDE_IEM16_H__ #define INCLUDE_IEM16_H__ #include "m_pd.h" typedef short t_iem16_16bit; #define IEM16_SCALE_UP (32767) #define IEM16_SCALE_DOWN (1./32767) #define VERSION "1.1" #define UNITBIT32 1572864. /* 3*2^19; bit 32 has place value 1 */ /* machine-dependent definitions. These ifdefs really should have been by CPU type and not by operating system! */ #ifdef __irix__ /* big-endian. Most significant byte is at low address in memory */ # define HIOFFSET 0 /* word offset to find MSB */ # define LOWOFFSET 1 /* word offset to find LSB */ # define int32 long /* a data type that has 32 bits */ #elif defined __WIN32__ /* little-endian; most significant byte is at highest address */ # define HIOFFSET 1 # define LOWOFFSET 0 # define int32 long #elif defined __FreeBSD__ # include # if BYTE_ORDER == LITTLE_ENDIAN # define HIOFFSET 1 # define LOWOFFSET 0 # else # define HIOFFSET 0 /* word offset to find MSB */ # define LOWOFFSET 1 /* word offset to find LSB */ # endif /* BYTE_ORDER */ # include # define int32 int32_t #elif defined __linux__ # include # if !defined(__BYTE_ORDER) || !defined(__LITTLE_ENDIAN) # error No byte order defined # endif # if __BYTE_ORDER == __LITTLE_ENDIAN # define HIOFFSET 1 # define LOWOFFSET 0 # else # define HIOFFSET 0 /* word offset to find MSB */ # define LOWOFFSET 1 /* word offset to find LSB */ # endif /* __BYTE_ORDER */ # include # define int32 int32_t #elif defined __APPLE__ # ifdef __BIG_ENDIAN__ # define HIOFFSET 0 /* word offset to find MSB */ # define LOWOFFSET 1 /* word offset to find LSB */ # else # define HIOFFSET 1 # define LOWOFFSET 0 # endif # define int32 int /* a data type that has 32 bits */ #endif /* system */ #endif iem_utils-v0.0.20181004/iem16/tab16read.c0000644000175000017500000000325313303611300017510 0ustar zmoelnigzmoelnig/* copyleft (c) 2003 forum::für::umläute -- IOhannes m zmölnig @ IEM * based on d_array.c from pd: * Copyright (c) 1997-1999 Miller Puckette and others. * For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. */ /* tab16read, tab16read4, tab16write */ #include "iem16_table.h" /* ---------- tab16read: control, non-interpolating ------------------------ */ static t_class *tab16read_class; typedef struct _tab16read{ t_object x_obj; t_symbol *x_arrayname; } t_tab16read; static void tab16read_float(t_tab16read *x, t_float f){ t_table16 *a; int npoints; t_iem16_16bit *vec; if (!(a = (t_table16 *)pd_findbyclass(x->x_arrayname, table16_class))) error("%s: no such table16", x->x_arrayname->s_name); else if (!table16_getarray16(a, &npoints, &vec)) error("%s: bad template for tab16read", x->x_arrayname->s_name); else { int n = f; if (n < 0) n = 0; else if (n >= npoints) n = npoints - 1; outlet_float(x->x_obj.ob_outlet, (npoints ? vec[n] : 0)); } } static void tab16read_set(t_tab16read *x, t_symbol *s){ x->x_arrayname = s; } static void *tab16read_new(t_symbol *s){ t_tab16read *x = (t_tab16read *)pd_new(tab16read_class); x->x_arrayname = s; outlet_new(&x->x_obj, gensym("float")); return (x); } void tab16read_setup(void){ tab16read_class = class_new(gensym("tab16read"), (t_newmethod)tab16read_new, 0, sizeof(t_tab16read), 0, A_DEFSYM, 0); class_addfloat(tab16read_class, (t_method)tab16read_float); class_addmethod(tab16read_class, (t_method)tab16read_set, gensym("set"), A_SYMBOL, 0); } iem_utils-v0.0.20181004/iem16/tab16read4~.c0000644000175000017500000000607613303611300020000 0ustar zmoelnigzmoelnig/* copyleft (c) 2003 forum::für::umläute -- IOhannes m zmölnig @ IEM * based on d_array.c from pd: * Copyright (c) 1997-1999 Miller Puckette and others. * For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. */ /* tab16write~, tab16play~, tab16read~, tab16read4~, tab16send~, tab16receive~ */ #include "iem16_table.h" /******************** tab16read4~ ***********************/ static t_class *tab16read4_tilde_class; typedef struct _tab16read4_tilde{ t_object x_obj; int x_npoints; t_iem16_16bit *x_vec; t_symbol *x_arrayname; float x_f; } t_tab16read4_tilde; static void *tab16read4_tilde_new(t_symbol *s){ t_tab16read4_tilde *x = (t_tab16read4_tilde *)pd_new(tab16read4_tilde_class); x->x_arrayname = s; x->x_vec = 0; outlet_new(&x->x_obj, gensym("signal")); x->x_f = 0; return (x); } static t_int *tab16read4_tilde_perform(t_int *w){ t_tab16read4_tilde *x = (t_tab16read4_tilde *)(w[1]); t_float *in = (t_float *)(w[2]); t_float *out = (t_float *)(w[3]); int n = (int)(w[4]); int maxindex; t_iem16_16bit *buf = x->x_vec; t_iem16_16bit *fp; int i; maxindex = x->x_npoints - 3; if (!buf) goto zero; for (i = 0; i < n; i++) { float findex = *in++; int index = findex; float frac, a, b, c, d, cminusb; if (index < 1) index = 1, frac = 0; else if (index > maxindex) index = maxindex, frac = 1; else frac = findex - index; fp = buf + index; a = fp[-1]*IEM16_SCALE_DOWN; b = fp[0]*IEM16_SCALE_DOWN; c = fp[1]*IEM16_SCALE_DOWN; d = fp[2]*IEM16_SCALE_DOWN; cminusb = c-b; *out++ = b + frac * (cminusb - 0.5f * (frac-1.) * ((a - d + 3.0f * cminusb) * frac + (b - a - cminusb))); } return (w+5); zero: while (n--) *out++ = 0; return (w+5); } void tab16read4_tilde_set(t_tab16read4_tilde *x, t_symbol *s){ t_table16 *a; x->x_arrayname = s; if (!(a = (t_table16 *)pd_findbyclass(x->x_arrayname, table16_class))) { if (*s->s_name) error("tab16read4~: %s: no such table16", x->x_arrayname->s_name); x->x_vec = 0; } else if (!table16_getarray16(a, &x->x_npoints, &x->x_vec)) { error("%s: bad template for tab16read4~", x->x_arrayname->s_name); x->x_vec = 0; } else table16_usedindsp(a); } static void tab16read4_tilde_dsp(t_tab16read4_tilde *x, t_signal **sp){ tab16read4_tilde_set(x, x->x_arrayname); dsp_add(tab16read4_tilde_perform, 4, x, sp[0]->s_vec, sp[1]->s_vec, sp[0]->s_n); } void tab16read4_tilde_setup(void){ tab16read4_tilde_class = class_new(gensym("tab16read4~"), (t_newmethod)tab16read4_tilde_new, 0, sizeof(t_tab16read4_tilde), 0, A_DEFSYM, 0); CLASS_MAINSIGNALIN(tab16read4_tilde_class, t_tab16read4_tilde, x_f); class_addmethod(tab16read4_tilde_class, (t_method)tab16read4_tilde_dsp, gensym("dsp"), A_CANT, 0); class_addmethod(tab16read4_tilde_class, (t_method)tab16read4_tilde_set, gensym("set"), A_SYMBOL, 0); } iem_utils-v0.0.20181004/iem16/vd16~.c0000644000175000017500000000564213303611300016721 0ustar zmoelnigzmoelnig/* copyleft (c) 2003 forum::für::umläute -- IOhannes m zmölnig @ IEM * based on d_delay.c from pd: * Copyright (c) 1997-1999 Miller Puckette. * For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. */ /* del16read~, del16write~, vd16~ */ #include "iem16_delay.h" /* ----------------------------- vd~ ----------------------------- */ static t_class *sig16vd_class; typedef struct _sig16vd{ t_object x_obj; t_symbol *x_sym; t_float x_sr; /* samples per msec */ int x_zerodel; /* 0 or vecsize depending on read/write order */ float x_f; } t_sig16vd; static void *sig16vd_new(t_symbol *s){ t_sig16vd *x = (t_sig16vd *)pd_new(sig16vd_class); if (!*s->s_name) s = gensym("vd~"); x->x_sym = s; x->x_sr = 1; x->x_zerodel = 0; outlet_new(&x->x_obj, gensym("signal")); x->x_f = 0; return (x); } static t_int *sig16vd_perform(t_int *w){ t_float *in = (t_float *)(w[1]); t_float *out = (t_float *)(w[2]); t_del16writectl *ctl = (t_del16writectl *)(w[3]); t_sig16vd *x = (t_sig16vd *)(w[4]); int n = (int)(w[5]); int nsamps = ctl->c_n; float limit = nsamps - n - 1; float fn = n-4; t_iem16_16bit *vp = ctl->c_vec, *bp, *wp = vp + ctl->c_phase; float zerodel = x->x_zerodel; while (n--) { float delsamps = x->x_sr * *in++ - zerodel, frac; int idelsamps; float a, b, c, d, cminusb; if (delsamps < 1.00001f) delsamps = 1.00001f; if (delsamps > limit) delsamps = limit; delsamps += fn; fn = fn - 1.0f; idelsamps = delsamps; frac = delsamps - (float)idelsamps; bp = wp - (idelsamps + 3); if (bp < vp + 4) bp += nsamps; d = bp[-3]*IEM16_SCALE_DOWN; c = bp[-2]*IEM16_SCALE_DOWN; b = bp[-1]*IEM16_SCALE_DOWN; a = bp[00]*IEM16_SCALE_DOWN; cminusb = c-b; *out++ = b + frac * (cminusb - 0.5f * (frac-1.) * ((a - d + 3.0f * cminusb) * frac + (b - a - cminusb))); } return (w+6); } static void sig16vd_dsp(t_sig16vd *x, t_signal **sp){ t_sigdel16write *delwriter = (t_sigdel16write *)pd_findbyclass(x->x_sym, sigdel16write_class); x->x_sr = sp[0]->s_sr * 0.001; if (delwriter) { sigdel16write_checkvecsize(delwriter, sp[0]->s_n); x->x_zerodel = (delwriter->x_sortno == ugen_getsortno() ? 0 : delwriter->x_vecsize); dsp_add(sig16vd_perform, 5, sp[0]->s_vec, sp[1]->s_vec, &delwriter->x_cspace, x, sp[0]->s_n); } else error("vd~: %s: no such del16write~",x->x_sym->s_name); } static void sig16vd_setup(void){ sig16vd_class = class_new(gensym("vd16~"), (t_newmethod)sig16vd_new, 0, sizeof(t_sig16vd), 0, A_DEFSYM, 0); class_addmethod(sig16vd_class, (t_method)sig16vd_dsp, gensym("dsp"), A_CANT, 0); CLASS_MAINSIGNALIN(sig16vd_class, t_sig16vd, x_f); } // G.Holzmann: for PD-extended build system void vd16_tilde_setup(void) { sig16vd_setup(); } iem_utils-v0.0.20181004/iem16/tab16receive~.c0000644000175000017500000000415613303611300020420 0ustar zmoelnigzmoelnig/* copyleft (c) 2003 forum::für::umläute -- IOhannes m zmölnig @ IEM * based on d_array.c from pd: * Copyright (c) 1997-1999 Miller Puckette and others. * For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. */ /* tab16write~, tab16play~, tab16read~, tab16read4~, tab16send~, tab16receive~ */ #include "iem16_table.h" /* ------------------------ tab16receive~ ------------------------- */ static t_class *tab16receive_class; typedef struct _tab16receive{ t_object x_obj; t_iem16_16bit *x_vec; t_symbol *x_arrayname; } t_tab16receive; static t_int *tab16receive_perform(t_int *w){ t_tab16receive *x = (t_tab16receive *)(w[1]); t_float *out = (t_float *)(w[2]); int n = w[3]; t_iem16_16bit *from = x->x_vec; if (from) while (n--) *out++ = *from++*IEM16_SCALE_DOWN; else while (n--) *out++ = 0; return (w+4); } static void tab16receive_dsp(t_tab16receive *x, t_signal **sp){ t_table16 *a; int vecsize; if (!(a = (t_table16 *)pd_findbyclass(x->x_arrayname, table16_class))) { if (*x->x_arrayname->s_name) error("tab16send~: %s: no such table16", x->x_arrayname->s_name); } else if (!table16_getarray16(a, &vecsize, &x->x_vec)) error("%s: bad template for tab16receive~", x->x_arrayname->s_name); else { int n = sp[0]->s_n; if (n < vecsize) vecsize = n; table16_usedindsp(a); dsp_add(tab16receive_perform, 3, x, sp[0]->s_vec, vecsize); } } static void *tab16receive_new(t_symbol *s){ t_tab16receive *x = (t_tab16receive *)pd_new(tab16receive_class); x->x_arrayname = s; outlet_new(&x->x_obj, gensym("signal")); return (x); } static void tab16receive_setup(void){ tab16receive_class = class_new(gensym("tab16receive~"), (t_newmethod)tab16receive_new, 0, sizeof(t_tab16receive), 0, A_DEFSYM, 0); class_addmethod(tab16receive_class, (t_method)tab16receive_dsp, gensym("dsp"), A_CANT, 0); } // G.Holzmann: for PD-extended build system void tab16receive_tilde_setup(void) { tab16receive_setup(); } iem_utils-v0.0.20181004/iem16/tab16read4~-help.pd0000644000175000017500000000253613236306553021124 0ustar zmoelnigzmoelnig#N canvas 59 33 741 466 10; #X text 21 207 signal input x(n); #X text 127 21 4-point-interpolating table lookup; #X obj 11 316 snapshot~; #X obj 30 290 metro 200; #X obj 11 124 sig~; #X floatatom 11 98 0 0 0 0 - - -; #X obj 30 264 r readout; #X floatatom 11 342 0 0 0 0 - - -; #X text 49 94 incoming signal is index. Indices should range from 1 to (size-2) so that the 4-point interpolation is meaningful. You can shift-drag the number box to see the effect of interpolation.; #X msg 34 158 set array99; #X text 116 158 "set" message permits you to switch between arrays ; #X text 149 228 creation argument initializes array name; #X obj 460 301 table16 array99; #X text 395 400 updated for iem16 version1.0; #X obj 11 395 tab16write~; #X obj 11 414 tab16read4~; #X obj 95 414 tab16read; #X obj 95 395 tab16write; #X obj 172 395 tab16send~; #X obj 172 414 tab16receive~; #X obj 334 400 table16; #X obj 47 21 tab16read4~; #X text 7 51 tab16read4~ is used to build samplers and other table lookup algorithms. The interpolation scheme is 4-point polynomial. ; #X text 185 266 since [table16] can only hold 16bit-values \, the stored integer values -32768..+32767 are converted to floats -1.0..+1.0; #X obj 10 228 tab16read4~ array99; #X connect 2 0 7 0; #X connect 3 0 2 0; #X connect 4 0 24 0; #X connect 5 0 4 0; #X connect 6 0 3 0; #X connect 9 0 24 0; #X connect 24 0 2 0; iem_utils-v0.0.20181004/iem16/del16read~.c0000644000175000017500000000635313303611300017710 0ustar zmoelnigzmoelnig/* copyleft (c) 2003 forum::fÃŒr::umlÀute -- IOhannes m zmölnig @ IEM * based on d_delay.c from pd: * Copyright (c) 1997-1999 Miller Puckette. * For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. */ /* del16read~, del16write~, vd16~ */ #include "iem16_delay.h" /* ----------------------------- del16read~ ----------------------------- */ static t_class *sigdel16read_class; typedef struct _sigdel16read{ t_object x_obj; t_symbol *x_sym; t_float x_deltime; /* delay in msec */ int x_delsamps; /* delay in samples */ t_float x_sr; /* samples per msec */ t_float x_n; /* vector size */ int x_zerodel; /* 0 or vecsize depending on read/write order */ } t_sigdel16read; static void sigdel16read_16bit(t_sigdel16read *x, t_float f); static void *sigdel16read_new(t_symbol *s, t_floatarg f){ t_sigdel16read *x = (t_sigdel16read *)pd_new(sigdel16read_class); x->x_sym = s; x->x_sr = 1; x->x_n = 1; x->x_zerodel = 0; sigdel16read_16bit(x, f); outlet_new(&x->x_obj, gensym("signal")); return (x); } static void sigdel16read_16bit(t_sigdel16read *x, t_float f){ t_sigdel16write *delwriter = (t_sigdel16write *)pd_findbyclass(x->x_sym, sigdel16write_class); x->x_deltime = f; if (delwriter) { x->x_delsamps = (int)(0.5 + x->x_sr * x->x_deltime) + x->x_n - x->x_zerodel; if (x->x_delsamps < x->x_n) x->x_delsamps = x->x_n; else if (x->x_delsamps > delwriter->x_cspace.c_n - DEFDELVS) x->x_delsamps = delwriter->x_cspace.c_n - DEFDELVS; } } static t_int *sigdel16read_perform(t_int *w){ t_float *out = (t_float *)(w[1]); t_del16writectl *c = (t_del16writectl *)(w[2]); int delsamps = *(int *)(w[3]); int n = (int)(w[4]); int phase = c->c_phase - delsamps, nsamps = c->c_n; t_iem16_16bit *vp = c->c_vec, *bp, *ep = vp + (c->c_n + XTRASAMPS); if (phase < 0) phase += nsamps; bp = vp + phase; while (n--) { *out++ = *bp++*IEM16_SCALE_DOWN; if (bp == ep) bp -= nsamps; } return (w+5); } static void sigdel16read_dsp(t_sigdel16read *x, t_signal **sp){ t_sigdel16write *delwriter = (t_sigdel16write *)pd_findbyclass(x->x_sym, sigdel16write_class); x->x_sr = sp[0]->s_sr * 0.001; x->x_n = sp[0]->s_n; if (delwriter) { sigdel16write_checkvecsize(delwriter, sp[0]->s_n); x->x_zerodel = (delwriter->x_sortno == ugen_getsortno() ? 0 : delwriter->x_vecsize); sigdel16read_16bit(x, x->x_deltime); dsp_add(sigdel16read_perform, 4, sp[0]->s_vec, &delwriter->x_cspace, &x->x_delsamps, sp[0]->s_n); } else if (*x->x_sym->s_name) error("delread~: %s: no such del16write~",x->x_sym->s_name); } static void sigdel16read_setup(void){ sigdel16read_class = class_new(gensym("del16read~"), (t_newmethod)sigdel16read_new, 0, sizeof(t_sigdel16read), 0, A_DEFSYM, A_DEFFLOAT, 0); class_addmethod(sigdel16read_class, (t_method)sigdel16read_dsp, gensym("dsp"), A_CANT, 0); class_addfloat(sigdel16read_class, (t_method)sigdel16read_16bit); } // G.Holzmann: for PD-extended build system void del16read_tilde_setup(void) { sigdel16read_setup(); } iem_utils-v0.0.20181004/iem16/del16write~-help.pd0000644000175000017500000000174213236306553021253 0ustar zmoelnigzmoelnig#N canvas 83 192 678 431 12; #X text 88 202 signal input; #X text 136 16 writes a signal in a delay line; #X text 281 235 1st argument: name of delay line; #X obj 24 203 sig~ 0; #X text 304 265 (= max. delay time); #X text 281 251 2nd argument: length of delay line in msec; #X text 24 292 see also:; #X obj 24 16 del16write~; #X obj 112 294 del16read~; #X obj 209 294 vd16~; #X text 16 353 similar pd-objects:; #X obj 201 352 delread~; #X obj 285 352 delwrite~; #X obj 378 352 vd~; #X obj 24 237 del16write~ del_line_xxx 500; #X text 21 51 This is very similar to the pd-object; #X text 49 81 It uses only 16bit to store the samples \, which will need only half of the memory of pd's floatingpoint-based object.; #X text 50 119 However \, there are 2 drawbacks: there will be some additional noise (because floats are more precise than 16bit) \, and you cannot have values>1 stored in the delay-line; #X obj 368 51 delwrite~; #X text 411 306 updated for iem16 version1.0; #X connect 3 0 14 0; iem_utils-v0.0.20181004/iem16/tab16read4.c0000644000175000017500000000431613303611300017575 0ustar zmoelnigzmoelnig/* copyleft (c) 2003 forum::für::umläute -- IOhannes m zmölnig @ IEM * based on d_array.c from pd: * Copyright (c) 1997-1999 Miller Puckette and others. * For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. */ /* tab16read, tab16read4, tab16write */ #include "iem16_table.h" /* ---------- tab16read4: control, non-interpolating ------------------------ */ static t_class *tab16read4_class; typedef struct _tab16read4{ t_object x_obj; t_symbol *x_arrayname; } t_tab16read4; static void tab16read4_float(t_tab16read4 *x, t_float f){ t_table16 *array; int npoints; t_iem16_16bit *vec; if (!(array = (t_table16 *)pd_findbyclass(x->x_arrayname, table16_class))) error("%s: no such table16", x->x_arrayname->s_name); else if (!table16_getarray16(array, &npoints, &vec)) error("%s: bad template for tab16read4", x->x_arrayname->s_name); else if (npoints < 4) outlet_float(x->x_obj.ob_outlet, 0); else if (f <= 1) outlet_float(x->x_obj.ob_outlet, vec[1]); else if (f >= npoints - 2) outlet_float(x->x_obj.ob_outlet, vec[npoints - 2]); else { int n = f; float a, b, c, d, cminusb, frac; t_iem16_16bit *fp; if (n >= npoints - 2) n = npoints - 3; fp = vec + n; frac = f - n; a = fp[-1]; b = fp[0]; c = fp[1]; d = fp[2]; cminusb = c-b; outlet_float(x->x_obj.ob_outlet, b + frac * (cminusb - 0.5f * (frac-1.) * ((a - d + 3.0f * cminusb) * frac + (b - a - cminusb)))); } } static void tab16read4_set(t_tab16read4 *x, t_symbol *s){ x->x_arrayname = s; } static void *tab16read4_new(t_symbol *s){ t_tab16read4 *x = (t_tab16read4 *)pd_new(tab16read4_class); x->x_arrayname = s; outlet_new(&x->x_obj, gensym("float")); return (x); } void tab16read4_setup(void){ tab16read4_class = class_new(gensym("tab16read4"), (t_newmethod)tab16read4_new, 0, sizeof(t_tab16read4), 0, A_DEFSYM, 0); class_addfloat(tab16read4_class, (t_method)tab16read4_float); class_addmethod(tab16read4_class, (t_method)tab16read4_set, gensym("set"), A_SYMBOL, 0); } iem_utils-v0.0.20181004/iem16/del16read~-help.pd0000644000175000017500000000267513236306553021042 0ustar zmoelnigzmoelnig#N canvas 24 20 800 531 12; #X text 372 274 1st argument: name of delay line; #X floatatom 116 253 0 0 0 0 - - -; #X text 151 255 float input (delay time in ms); #X text 127 310 signal output (delayed signal); #X floatatom 383 177 0 0 0 0 - - -; #X obj 116 375 snapshot~; #X floatatom 116 399 0 0 0 0 - - -; #X obj 24 246 loadbang; #X obj 24 313 metro 200; #X msg 32 273 \; pd dsp 1; #X text 424 176 input to delay line; #X obj 383 201 sig~; #X text 372 290 2nd argument: (initial) delay time in ms; #X text 36 443 see also:; #X obj 383 226 del16write~ del_example 1000; #X obj 24 16 del16read~; #X obj 126 444 del16write~; #X obj 239 444 vd16~; #X text 133 14 - read a 16bit signal from a 16bit-delay line; #X obj 368 52 delread~; #X text 21 52 This is very similar to the pd-object; #X text 49 82 It uses only 16bit to store the samples \, which will need only half of the memory of pd's floatingpoint-based object.; #X text 50 120 However \, there are 2 drawbacks: there will be some additional noise (because floats are more precise than 16bit) \, and you cannot have values>1 stored in the delay-line; #X text 38 490 similar pd-objects:; #X obj 223 489 delread~; #X obj 307 489 delwrite~; #X obj 400 489 vd~; #X text 433 443 updated for iem16 version1.0; #X obj 116 286 del16read~ del_example 1000; #X connect 1 0 28 0; #X connect 4 0 11 0; #X connect 5 0 6 0; #X connect 7 0 8 0; #X connect 7 0 9 0; #X connect 8 0 5 0; #X connect 11 0 14 0; #X connect 28 0 5 0; iem_utils-v0.0.20181004/iem16/tab16write~-help.pd0000644000175000017500000000200113236306553021242 0ustar zmoelnigzmoelnig#N canvas 119 134 697 433 10; #X msg 43 131 bang; #X obj 23 82 sig~ 3000; #X obj 23 110 phasor~; #X text 158 213 creation argument initializes array name; #X msg 40 181 set array99; #X msg 445 35 \; pd dsp 1; #X msg 524 37 \; pd dsp 0; #X text 85 133 bang to start recording; #X text 126 180 set the destination array; #X msg 43 153 stop; #X text 85 154 stop recording; #X text 385 366 updated for iem16 version1.0; #X obj 337 348 table16; #X text 26 322 see also:; #X obj 22 211 tab16write~ array99; #X obj 492 160 table16 array99; #X obj 31 27 tab16write~; #X text 120 27 object to write a 16bit-signal in an array; #X text 261 261 since [table16] can only hold 16bit-values \, the incoming signal (-1.0..+1.0) is stored as integer values -32768..+32767; #X obj 14 343 tab16write~; #X obj 14 362 tab16read4~; #X obj 118 362 tab16read; #X obj 118 343 tab16write; #X obj 213 343 tab16send~; #X obj 213 362 tab16receive~; #X connect 0 0 14 0; #X connect 1 0 2 0; #X connect 2 0 14 0; #X connect 4 0 14 0; #X connect 9 0 14 0; iem_utils-v0.0.20181004/iem16/GnuGPL.LICENSE0000644000175000017500000003574513236306553017726 0ustar zmoelnigzmoelnigGNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS iem_utils-v0.0.20181004/iem16/tab16read-help.pd0000644000175000017500000000154513236306553020641 0ustar zmoelnigzmoelnig#N canvas 245 143 703 316 12; #X text 62 102 index; #X floatatom 25 103 0 0 0 0 - - -; #X floatatom 25 199 0 0 0 0 - - -; #X text 70 197 output = array99[index]; #X text 189 157 creation argument; #X text 185 175 gives array name; #X msg 35 125 set array99; #X text 147 125 change array name; #X obj 422 131 table16 array99; #X obj 17 13 tab16read; #X text 412 257 updated for iem16 version1.0; #X obj 16 252 tab16write~; #X obj 16 271 tab16read4~; #X obj 120 271 tab16read; #X obj 120 252 tab16write; #X obj 217 252 tab16send~; #X obj 217 271 tab16receive~; #X obj 339 257 table16; #X text 108 15 - read numbers from a 16bit-table; #X text 21 42 since [table16] can only hold 16bit values \, the output of [tab16read] is limited to integer-values between -32768..+32767 ; #X obj 25 165 tab16read array99; #X connect 1 0 20 0; #X connect 6 0 20 0; #X connect 20 0 2 0; iem_utils-v0.0.20181004/iem16/tab16read~.c0000644000175000017500000000521313303611300017704 0ustar zmoelnigzmoelnig/* copyleft (c) 2003 forum::für::umläute -- IOhannes m zmölnig @ IEM * based on d_array.c from pd: * Copyright (c) 1997-1999 Miller Puckette and others. * For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. */ /* tab16write~, tab16play~, tab16read~, tab16read4~, tab16send~, tab16receive~ */ #include "iem16_table.h" /******************** tab16read~ ***********************/ static t_class *tab16read_tilde_class; typedef struct _tab16read_tilde{ t_object x_obj; int x_npoints; t_iem16_16bit *x_vec; t_symbol *x_arrayname; float x_f; } t_tab16read_tilde; static void *tab16read_tilde_new(t_symbol *s){ t_tab16read_tilde *x = (t_tab16read_tilde *)pd_new(tab16read_tilde_class); x->x_arrayname = s; x->x_vec = 0; outlet_new(&x->x_obj, gensym("signal")); x->x_f = 0; return (x); } static t_int *tab16read_tilde_perform(t_int *w){ t_tab16read_tilde *x = (t_tab16read_tilde *)(w[1]); t_float *in = (t_float *)(w[2]); t_float *out = (t_float *)(w[3]); int n = (int)(w[4]); int maxindex; t_iem16_16bit *buf = x->x_vec; int i; maxindex = x->x_npoints - 1; if (!buf) goto zero; for (i = 0; i < n; i++) { int index = *in++; if (index < 0) index = 0; else if (index > maxindex) index = maxindex; *out++ = buf[index]*IEM16_SCALE_DOWN; } return (w+5); zero: while (n--) *out++ = 0; return (w+5); } void tab16read_tilde_set(t_tab16read_tilde *x, t_symbol *s){ t_table16 *a; x->x_arrayname = s; if (!(a = (t_table16 *)pd_findbyclass(x->x_arrayname, table16_class))) { if (*s->s_name) error("tab16read~: %s: no such table16", x->x_arrayname->s_name); x->x_vec = 0; } else if (!table16_getarray16(a, &x->x_npoints, &x->x_vec)) { error("%s: bad template for tab16read~", x->x_arrayname->s_name); x->x_vec = 0; } else table16_usedindsp(a); } static void tab16read_tilde_dsp(t_tab16read_tilde *x, t_signal **sp){ tab16read_tilde_set(x, x->x_arrayname); dsp_add(tab16read_tilde_perform, 4, x, sp[0]->s_vec, sp[1]->s_vec, sp[0]->s_n); } void tab16read_tilde_setup(void){ tab16read_tilde_class = class_new(gensym("tab16read~"), (t_newmethod)tab16read_tilde_new, 0, sizeof(t_tab16read_tilde), 0, A_DEFSYM, 0); CLASS_MAINSIGNALIN(tab16read_tilde_class, t_tab16read_tilde, x_f); class_addmethod(tab16read_tilde_class, (t_method)tab16read_tilde_dsp, gensym("dsp"), A_CANT, 0); class_addmethod(tab16read_tilde_class, (t_method)tab16read_tilde_set, gensym("set"), A_SYMBOL, 0); } iem_utils-v0.0.20181004/iem16/tab16write.c0000644000175000017500000000330713303611300017727 0ustar zmoelnigzmoelnig/* copyleft (c) 2003 forum::für::umläute -- IOhannes m zmölnig @ IEM * based on d_array.c from pd: * Copyright (c) 1997-1999 Miller Puckette and others. * For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. */ /* tab16read, tab16read4, tab16write */ #include "iem16_table.h" /* ------------------ tab16write: control ------------------------ */ static t_class *tab16write_class; typedef struct _tab16write { t_object x_obj; t_symbol *x_arrayname; float x_ft1; int x_set; } t_tab16write; static void tab16write_float(t_tab16write *x, t_float f) { int vecsize; t_table16 *a; t_iem16_16bit *vec; if (!(a = (t_table16 *)pd_findbyclass(x->x_arrayname, table16_class))) error("%s: no such table16", x->x_arrayname->s_name); else if (!table16_getarray16(a, &vecsize, &vec)) error("%s: bad template for tab16write", x->x_arrayname->s_name); else { int n = x->x_ft1; if (n < 0) n = 0; else if (n >= vecsize) n = vecsize-1; vec[n] = f; } } static void tab16write_set(t_tab16write *x, t_symbol *s){ x->x_arrayname = s; } static void *tab16write_new(t_symbol *s){ t_tab16write *x = (t_tab16write *)pd_new(tab16write_class); x->x_ft1 = 0; x->x_arrayname = s; floatinlet_new(&x->x_obj, &x->x_ft1); return (x); } void tab16write_setup(void){ tab16write_class = class_new(gensym("tab16write"), (t_newmethod)tab16write_new, 0, sizeof(t_tab16write), 0, A_DEFSYM, 0); class_addfloat(tab16write_class, (t_method)tab16write_float); class_addmethod(tab16write_class, (t_method)tab16write_set, gensym("set"), A_SYMBOL, 0); } iem_utils-v0.0.20181004/iem16/tab16send~.c0000644000175000017500000000440013303611371017727 0ustar zmoelnigzmoelnig/* copyleft (c) 2003 forum::für::umläute -- IOhannes m zmölnig @ IEM * based on d_array.c from pd: * Copyright (c) 1997-1999 Miller Puckette and others. * For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. */ /* tab16write~, tab16play~, tab16read~, tab16read4~, tab16send~, tab16receive~ */ #include "iem16_table.h" /* ------------------------ tab16send~ ------------------------- */ static t_class *tab16send_class; typedef struct _tab16send{ t_object x_obj; t_iem16_16bit *x_vec; int x_graphperiod; int x_graphcount; t_symbol *x_arrayname; float x_f; } t_tab16send; static void *tab16send_new(t_symbol *s){ t_tab16send *x = (t_tab16send *)pd_new(tab16send_class); x->x_graphcount = 0; x->x_arrayname = s; x->x_f = 0; return (x); } static t_int *tab16send_perform(t_int *w){ t_tab16send *x = (t_tab16send *)(w[1]); t_float *in = (t_float *)(w[2]); int n = w[3]; t_iem16_16bit *dest = x->x_vec; int i = x->x_graphcount; if (!x->x_vec) goto bad; while (n--) *dest = *in++*IEM16_SCALE_UP; if (!i--)i = x->x_graphperiod; x->x_graphcount = i; bad: return (w+4); } static void tab16send_dsp(t_tab16send *x, t_signal **sp){ int vecsize; t_table16 *a; if (!(a = (t_table16 *)pd_findbyclass(x->x_arrayname, table16_class))) { if (*x->x_arrayname->s_name) error("tab16send~: %s: no such table16", x->x_arrayname->s_name); } else if (!table16_getarray16(a, &vecsize, &x->x_vec)) error("%s: bad template for tab16send~", x->x_arrayname->s_name); else { int n = sp[0]->s_n; int ticksper = sp[0]->s_sr/n; if (ticksper < 1) ticksper = 1; x->x_graphperiod = ticksper; if (x->x_graphcount > ticksper) x->x_graphcount = ticksper; if (n < vecsize) vecsize = n; table16_usedindsp(a); dsp_add(tab16send_perform, 3, x, sp[0]->s_vec, vecsize); } } void tab16send_tilde_setup(void){ tab16send_class = class_new(gensym("tab16send~"), (t_newmethod)tab16send_new, 0, sizeof(t_tab16send), 0, A_DEFSYM, 0); CLASS_MAINSIGNALIN(tab16send_class, t_tab16send, x_f); class_addmethod(tab16send_class, (t_method)tab16send_dsp, gensym("dsp"), A_CANT, 0); } iem_utils-v0.0.20181004/iem16/Makefile.pdlibbuilder0000644000175000017500000012415213303614411021703 0ustar zmoelnigzmoelnig# Makefile.pdlibbuilder dated 2018-03-15 version = 0.5.1 # Helper makefile for Pure Data external libraries. # Written by Katja Vetter March-June 2015 for the public domain. No warranties. # Inspired by Hans Christoph Steiner's Makefile Template and Stephan Beal's # ShakeNMake. # # Grab the newest version of Makefile.pdlibbuilder from # https://github.com/pure-data/pd-lib-builder/ # # GNU make version >= 3.81 required. # # #=== characteristics =========================================================== # # # - defines build settings based on autodetected OS and architecture # - defines rules to build Pd class- or lib executables from C or C++ sources # - defines rules for libdir installation # - defines convenience targets for developer and user # - evaluates implicit dependencies for non-clean builds # # #=== basic usage =============================================================== # # # In your Makefile, define your Pd lib name and class files, and include # Makefile.pdlibbuilder at the end of the Makefile. Like so: # # ________________________________________________________________________ # # # Makefile for mylib # # lib.name = mylib # # class.sources = myclass1.c myclass2.c # # datafiles = myclass1-help.pd myclass2-help.pd README.txt LICENSE.txt # # include Makefile.pdlibbuilder # ________________________________________________________________________ # # # For files in class.sources it is assumed that class basename == source file # basename. The default target builds all classes as individual executables # with Pd's default extension for the platform. For anything more than the # most basic usage, continue reading. # # #=== list of Makefile.pdlibbuilder API variables =============================== # # # Variables available for definition in your library Makefile: # # - lib.name # - lib.setup.sources # - class.sources # - common.sources # - shared.sources # - .class.sources # - .class.ldflags # - .class.ldlibs # - cflags # - ldflags # - ldlibs # - datafiles # - datadirs # - makefiles # - makefiledirs # - externalsdir # # Optional multiline defines evaluated per operating system: # # - forLinux # - forDarwin # - forWindows # # Variables available for your makefile or make command line: # # - make-lib-executable # - suppress-wunused # # Path variables for make command line or environment: # # - PDDIR # - PDINCLUDEDIR # - PDBINDIR # - PDLIBDIR # # Standard make variables for make command line or environment: # # - CPPFLAGS # - CFLAGS # - LDFLAGS # - CC # - CXX # - INSTALL # - STRIP # - DESTDIR # # Deprecated path variables: # # - pdincludepath # - pdbinpath # - objectsdir # # #=== descriptions of Makefile.pdlibbuilder API variables ======================= # # # lib.name: # Name of the library directory as it will be installed / distributed. Also the # name of the lib executable in the case where all classes are linked into # a single binary. # # lib.setup.sources: # Source file(s) (C or C++) which must be compiled only when linking all classes # into a single lib binary. # # class.sources: # All sources files (C or C++) for which the condition holds that # class name == source file basename. # # .class.sources: # Source file(s) (C or C++) specific to class . Use this for # multiple-source classes or when class name != source file basename. # # common.sources: # Source file(s) which must be statically linked to each class in the library. # # shared.sources: # Source file(s) (C or C++) to build a shared dynamic link lib, to be linked # with all class executables. # # cflags, ldflags, ldlibs: # Define cflags (preprocessor&compiler), ldflags (linker) and ldlibs (dynamic # link libs) for the whole library. These flags are added to platform-specific # flags defined by Makefile.pdlibbuilder. # # .class.ldflags and .class.ldlibs: # Define ldflags resp. ldlibs specific to class . These flags are # added to platform-specific flags defined by Makefile.pdlibbuilder, and flags # defined in your Makefile for the whole library. Note: cflags can not be # defined per class in the current implementation. # # datafiles and datadirs: # All extra files you want to include in binary distributions of the # library: abstractions and help patches, example patches, meta patch, readme # and license texts, manuals, sound files, etcetera. Use 'datafiles' for all # files that should go into your lib rootdir and 'datadirs' for complete # directories you want to copy from source to distribution. # # forLinux, forDarwin, forWindows: # Shorthand for 'variable definitions for Linux only' etc. Use like: # define forLinux # cflags += -DLINUX # class.sources += linuxthing.c # endef # # makefiles and makefiledirs: # Extra makefiles or directories with makefiles that should be made in sub-make # processes. # # make-lib-executable: # When this variable is defined 'yes' in your makefile or as command argument, # Makefile.pdlibbuilder will try to build all classes into a single library # executable (but it will force exit if lib.setup.sources is undefined). # If your makefile defines 'make-lib-executable=yes' as the library default, # this can still be overridden with 'make-lib-executable=no' as command argument # to build individual class executables (the Makefile.pdlibbuilder default.) # # suppress-wunused: # When this variable is defined ('yes' or any other value), -Wunused-variable, # -Wunused-parameter, -Wunused-value and -Wunused-function are suppressed, # but the other warnings from -Wall are retained. # # PDDIR: # Root directory of 'portable' pd package. When defined, PDINCLUDEDIR and # PDBINDIR will be evaluated as $(PDDIR)/src and $(PDDIR)/bin. # # PDINCLUDEDIR: # Directory where Pd API m_pd.h should be found, and other Pd header files. # Overrides the default search path. # # PDBINDIR: # Directory where pd.dll should be found for linking (Windows only). Overrides # the default search path. # # PDLIBDIR: # Root directory for installation of Pd library directories. Overrides the # default install location. # # DESTDIR: # Prepended path component for staged install. # # CPPFLAGS: # Preprocessor flags which are not strictly required for building. # # CFLAGS: # Compiler flags which are not strictly required for building. Compiler flags # defined by Makefile.pdlibbuilder for warning, optimization and architecture # specification are overriden by CFLAGS. # # LDFLAGS: # Linker flags which are not strictly required for building. Linker flags # defined by Makefile.pdlibbuilder for architecture specification are overriden # by LDFLAGS. # # CC and CXX: # C and C++ compiler programs as defined in your build environment. # # INSTALL # Definition of install program. # # STRIP # Name of strip program. Default 'strip' can be overridden in cross compilation # environments. # # objectsdir: # Root directory for installation of Pd library directories, like PDLIBDIR but # not overridable by environment. Supported for compatibility with pd-extended # central makefile, but deprecated otherwise. # # pdincludepath, pdbinpath: # As PDINCLUDEDIR and PDBINDIR but not overridable by environment. Deprecated # as user variables. # # #=== paths ===================================================================== # # # Source files in directories other than current working directory must be # prefixed with their relative path. Do not rely on VPATH or vpath. # Object (.o) files are built in the directory of their source files. # Executables are built in current working directory. # # Default search path for m_pd.h and other API header files is platform # dependent, and overridable by PDINCLUDEDIR: # # Linux: /usr/include/pd # # OSX: /Applications/Pd*.app/Contents/Resources/src # # Windows: %PROGRAMFILES%/Pd/src # %PROGRAMFILES(X86)%/Pd/src (32 bit builds on 64 bit Windows) # # Default search path for binary pd.dll (Windows), overridable by PDBINDIR # # %PROGRAMFILES%/Pd/bin # %PROGRAMFILES(X86)%/Pd/bin (32 bit builds on 64 bit Windows) # # Default location to install pd libraries is platform dependent, and # overridable by PDLIBDIR: # # Linux: /usr/local/lib/pd-externals # OSX: ~/Library/Pd # Windows: %APPDATA%/Pd # # https://puredata.info/docs/faq/how-do-i-install-externals-and-help-files # The rationale for not installing to ~/pd-externals by default on Linux # is that some people share the home dir between 32 and 64 bit installations. # # #=== targets =================================================================== # # # all: build $(executables) plus optional post target # post: target to build after $(executables) # alldebug: build all with -g option turned on for debug symbols # : force clean build of an individual class # .pre: make preprocessor output file in current working directory # .lst: make asm/source output file in current working directory # # install: install executables and data files # clean: remove build products from source tree # # help: print help text # vars: print makefile variables # allvars: print all variables # depend: print generated prerequisites # coffee: dummy target # # Variable $(executables) expands to class executables plus optional shared lib, # or alternatively to single lib executable when make-lib-executable=true. # Targets pre and post can be defined by library makefile. Make sure to include # Makefile.pdlibbuilder first so default target all will not be redefined. # # #=== Pd-extended libdir concept ================================================ # # # For libdir layout as conceived by Hans-Christoph Steiner, see: # # https://puredata.info/docs/developer/Libdir # # Files README.txt, LICENSE.txt and -meta.pd are part of the libdir # convention. Help patches for each class and abstraction are supposed to be # available. Makefile.pdlibbuilder does not force the presence of these files # however. It does not automatically include such files in libdir installations. # Data files you want to include in distributions must be defined explicitly in # your Makefile. # # #=== Makefile.pdlibbuilder syntax conventions ================================== # # # Makefile.pdlibbuilder variable names are lower case. Default make variables, # environment variables, and standard user variables (CC, CXX, CFLAGS, DESTDIR) # are upper case. Use target 'allvars' to print all variables and their values. # # 'Fields' in data variables are separated by dots, like in 'foo.class.sources'. # Words in variables expressing a function or command are separated by dashes, # like in 'make-lib-executable'. # # #=== useful make options ======================================================= # # # Use 'make -d ' to print debug details of the make process. # Use 'make -p ' to print make's database. # # #=== TODO ====================================================================== # # # - decide whether to use -static-libgcc or shared dll in MinGW # - cygwin support # - android support # - figure out how to handle '$' in filenames # - add makefile template targets dpkg-source dist libdir distclean tags? # # #=== end of documentation sections ============================================= # # ################################################################################ ################################################################################ ################################################################################ # GNU make version 3.81 (2006) or higher is required because of the following: # - function 'info' # - variable '.DEFAULT_GOAL' # force exit when make version is < 3.81 ifneq ($(firstword $(sort 3.81 $(MAKE_VERSION))), 3.81) $(error GNU make version 3.81 or higher is required) endif # Relative path to externals root dir in multi-lib source tree like # pd-extended SVN. Default is parent of current working directory. May be # defined differently in including makefile. externalsdir ?= .. # variable you can use to check if Makefile.pdlibbuilder is already included Makefile.pdlibbuilder = true ################################################################################ ### variables: library name and version ######################################## ################################################################################ # strip possibles spaces from lib.name, they mess up calculated file names lib.name := $(strip $(lib.name)) # if meta file exists, check library version metafile := $(wildcard $(lib.name)-meta.pd) ifdef metafile lib.version := $(shell sed -n \ 's|^\#X text [0-9][0-9]* [0-9][0-9]* VERSION \(.*\);|\1|p' \ $(metafile)) endif ################################################################################ ### variables: files ########################################################### ################################################################################ #=== sources =================================================================== # (re)define .class.sources using file names in class.sources define add-class-source $(notdir $(basename $v)).class.sources += $v endef $(foreach v, $(class.sources), $(eval $(add-class-source))) # derive class names from .class.sources variables sourcevariables := $(filter %.class.sources, $(.VARIABLES)) classes := $(basename $(basename $(sourcevariables))) # accumulate all source files specified in makefile classes.sources := $(sort $(foreach v, $(sourcevariables), $($v))) all.sources := $(classes.sources) $(lib.setup.sources) \ $(shared.sources) $(common.sources) #=== object files ============================================================== # construct object filenames from all C and C++ source file names classes.objects := $(addsuffix .o, $(basename $(classes.sources))) common.objects := $(addsuffix .o, $(basename $(common.sources))) shared.objects := $(addsuffix .o, $(basename $(shared.sources))) lib.setup.objects := $(addsuffix .o, $(basename $(lib.setup.sources))) all.objects = $(classes.objects) $(common.objects) $(shared.objects) \ $(lib.setup.objects) #=== executables =============================================================== # use recursive variables here because executable extension is not yet known # construct class executable names from class names classes.executables = $(addsuffix .$(extension), $(classes)) # construct shared lib executable name if shared sources are defined ifdef shared.sources shared.lib = lib$(lib.name).$(shared.extension) else shared.lib = endif ################################################################################ ### platform detection ######################################################### ################################################################################ #=== operating system ========================================================== # The following systems are defined: Linux, Darwin, Windows. GNU and # GNU/kFreeBSD are treated as Linux to get the same options. uname := $(shell uname) ifeq ($(findstring $(uname), Linux GNU GNU/kFreeBSD), $(uname)) system = Linux endif ifeq ($(uname), Darwin) system = Darwin endif ifeq ($(filter MINGW% MSYS%, $(uname)), $(uname)) system = Windows endif # Unfortunately not all Mingw versions provide a link cc > gcc, therefore # gcc is hardcoded here (but not if CC is redefined). ifeq ($(system), Windows) ifeq ($(origin CC), default) CC = gcc endif endif # evaluate possible system-specific multiline defines from library makefile $(eval $(for$(system))) # TODO: Cygwin, Android #=== architecture ============================================================== # native architecture of the build machine build.arch := $(shell uname -m) # Target architecture as reported by compiler. Give precedence to eventual # user-defined compiler. The first field of -- is extracted. ifneq ($(origin CXX), default) dumpmachine.cpu = $(firstword $(subst -, ,$(shell $(CXX) -dumpmachine))) else dumpmachine.cpu = $(firstword $(subst -, ,$(shell $(CC) -dumpmachine))) endif # Target architecture as reported by compiler is only used for Windows at the # moment. For other systems this still has to be tested. ifeq ($(system), Windows) target.arch = $(dumpmachine.cpu) else target.arch = $(build.arch) endif ################################################################################ ### variables per platform ##################################################### ################################################################################ #=== flags per architecture ==================================================== # Set architecture-dependent cflags, mainly for Linux. For Mac and Windows, # arch.c.flags are overriden below. # Raspberry Pi 1st generation ifeq ($(target.arch), armv6l) arch.c.flags = -march=armv6 -mfpu=vfp -mfloat-abi=hard # Beagle, Udoo, RPi2 etc. else ifeq ($(target.arch), armv7l) arch.c.flags = -march=armv7-a -mfpu=vfpv3 -mfloat-abi=hard # Intel 32 bit, build with SSE and SSE2 instructions else ifeq ($(findstring $(target.arch), i386 i686), $(target.arch)) arch.c.flags = -march=pentium4 -mfpmath=sse -msse -msse2 # Intel/AMD 64 bit, build with SSE, SSE2 and SSE3 instructions else ifeq ($(findstring $(target.arch), x86_64), $(target.arch)) arch.c.flags = -march=core2 -mfpmath=sse -msse -msse2 -msse3 # if none of the above architectures detected else arch.c.flags = endif #=== flags and paths for Linux ================================================= ifeq ($(system), Linux) prefix = /usr/local libdir := $(prefix)/lib pkglibdir = $(libdir)/pd-externals pdincludepath := $(wildcard /usr/include/pd) extension = pd_linux cpp.flags := -DUNIX c.flags := -fPIC c.ldflags := -rdynamic -shared -fPIC -Wl,-rpath,"\$$ORIGIN",--enable-new-dtags c.ldlibs := -lc -lm cxx.flags := -fPIC -fcheck-new cxx.ldflags := -rdynamic -shared -fPIC -Wl,-rpath,"\$$ORIGIN",--enable-new-dtags cxx.ldlibs := -lc -lm -lstdc++ shared.extension = so shared.ldflags := -rdynamic -fPIC -shared -Wl,-soname,$(shared.lib) endif #=== flags and paths for Darwin ================================================ # On OSX we try to build fat binaries by default. It is assumed that OSX i386 # can build for ppc and OSX x86_64 can't. TODO: try to refine this condition. # LLVM-clang doesn't support -fcheck-new, therefore this flag is omitted for # OSX x86_64. ifeq ($(system), Darwin) pkglibdir = $(HOME)/Library/Pd pdincludepath := $(firstword $(wildcard \ /Applications/Pd*.app/Contents/Resources/src)) extension = pd_darwin cpp.flags := -DUNIX -DMACOSX -I /sw/include c.flags := c.ldflags := -undefined suppress -flat_namespace -bundle c.ldlibs := -lc cxx.ldflags := -undefined suppress -flat_namespace -bundle cxx.ldlibs := -lc shared.extension = dylib shared.ldflags = -dynamiclib -undefined dynamic_lookup \ -install_name @loader_path/$(shared.lib) \ -compatibility_version 1 -current_version 1.0 version.flag := $(filter $(cflags), -mmacosx-version-min=%) ifeq ($(target.arch), i386) cxx.flags := -fcheck-new arch := ppc i386 x86_64 version.flag ?= -mmacosx-version-min=10.4 endif ifeq ($(target.arch), x86_64) arch := i386 x86_64 version.flag ?= -mmacosx-version-min=10.5 endif arch.c.flags := $(addprefix -arch , $(arch)) $(version.flag) arch.ld.flags := $(arch.c.flags) endif #=== flags and paths for Windows =============================================== # Standard paths on Windows contain spaces, and GNU make functions treat such # paths as lists, with unintended effects. Therefore we must use shell function # ls instead of make's wildcard when probing for a path, and use double quotes # when specifying a path in a command argument. # Default paths in Mingw / Mingw-w64 environments. 'PROGRAMFILES' is standard # location for builds with native architecture, 'ProgramFiles(x86)' for i686 # builds on x86_64 Windows (detection method by Lucas Cordiviola). Curly braces # required because of parentheses in variable name. ifeq ($(system), Windows) pkglibdir := $(APPDATA)/Pd ifeq ($(MINGW_CHOST), i686-w64-mingw32) programfiles := ${ProgramFiles(x86)} else programfiles := $(PROGRAMFILES) endif pdbinpath := $(programfiles)/Pd/bin pdincludepath := $(programfiles)/Pd/src endif # Store default path to pd.dll in PDBINDIR if the latter is not user-defined. # For include path this is done in the platform-independent paths section below, # but for PDBINDIR it is done here so ld flags can be evaluated as immediate # variables. ifeq ($(system), Windows) ifdef PDDIR PDBINDIR := $(PDDIR)/bin endif PDBINDIR ?= $(pdbinpath) endif # TODO: decide whether -mms-bitfields should be specified. ifeq ($(system), Windows) cpp.flags := -DMSW -DNT ifeq ($(filter i%86 mingw32, $(target.arch)), $(target.arch)) arch.c.flags := -march=pentium4 -msse -msse2 -mfpmath=sse else ifeq (x86_64, $(target.arch)) cpp.flags := -DMSW -DNT -DPD_LONGINTTYPE=__int64 arch.c.flags := -march=core2 -msse -msse2 -msse3 -mfpmath=sse else arch.c.flags = endif extension = dll c.flags := c.ldflags := -static-libgcc -shared \ -Wl,--enable-auto-import "$(PDBINDIR)/pd.dll" c.ldlibs := cxx.flags := -fcheck-new cxx.ldflags := -static-libgcc -static-libstdc++ -shared \ -Wl,--enable-auto-import "$(PDBINDIR)/pd.dll" cxx.ldlibs := shared.extension = dll shared.ldflags := -static-libgcc -shared "$(PDBINDIR)/pd.dll" stripflags = --strip-all endif #=== paths ===================================================================== # Platform-dependent default paths are specified above, but overridable. # Path variables in upper case can be defined as make command argument or in the # environment. Variable 'objectsdir' is supported for compatibility with # the build system that pd-l2ork has inherited from pd-extended. PDINCLUDEDIR ?= $(pdincludepath) PDLIBDIR ?= $(firstword $(objectsdir) $(pkglibdir)) ifdef PDDIR PDINCLUDEDIR := $(wildcard $(PDDIR)/src) endif # base path where all components of the lib will be installed by default installpath := $(DESTDIR)$(PDLIBDIR)/$(lib.name) # check if include path contains spaces (as is often the case on Windows) # if so, store the path so we can later do checks with it pdincludepathwithspaces := $(if $(word 2, $(PDINCLUDEDIR)), $(PDINCLUDEDIR)) #=== accumulated build flags =================================================== # From GNU make docs: 'Users expect to be able to specify CFLAGS freely # themselves.' So we use CFLAGS to define options which are not strictly # required for compilation: optimizations, architecture specifications, and # warnings. CFLAGS can be safely overriden using a make command argument. # Variables cflags, ldflags and ldlibs may be defined in including makefile. optimization.flags = -O3 -ffast-math -funroll-loops -fomit-frame-pointer warn.flags = -Wall -Wextra -Wshadow -Winline -Wstrict-aliasing # suppress -Wunused-variable & Co if you don't want to clutter a build log ifdef suppress-wunused warn.flags += $(addprefix -Wno-unused-, function parameter value variable) endif CFLAGS = $(warn.flags) $(optimization.flags) $(arch.c.flags) # preprocessor flags cpp.flags := -DPD -I "$(PDINCLUDEDIR)" $(cpp.flags) $(CPPFLAGS) # flags for dependency checking (cflags from makefile may define -I options) depcheck.flags := $(cpp.flags) $(cflags) # architecture specifications for linker are overridable by LDFLAGS LDFLAGS := $(arch.ld.flags) # now add the same ld flags to shared dynamic lib shared.ldflags := $(shared.ldflags) $(LDFLAGS) # accumulated flags for C compiler / linker c.flags := $(cpp.flags) $(c.flags) $(cflags) $(CFLAGS) c.ldflags := $(c.ldflags) $(ldflags) $(LDFLAGS) c.ldlibs := $(c.ldlibs) $(ldlibs) # accumulated flags for C++ compiler / linker cxx.flags := $(cpp.flags) $(cxx.flags) $(cflags) $(CFLAGS) cxx.ldflags := $(cxx.ldflags) $(ldflags) $(LDFLAGS) cxx.ldlibs := $(cxx.ldlibs) $(ldlibs) ################################################################################ ### variables: tools ########################################################### ################################################################################ # aliases so we can later define 'compile-$1' and set 'c' or 'cxx' as argument compile-c := $(CC) compile-cxx := $(CXX) ################################################################################ ### checks ##################################################################### ################################################################################ # At this point most variables are defined. Now do some checks and info's # before rules begin. # 'forward declaration' of default target, needed to do checks all: # To avoid unpredictable results, make sure the default target is not redefined # by including makefile. ifneq ($(.DEFAULT_GOAL), all) $(error Default target must be 'all'.) endif # find out which target(s) will be made ifdef MAKECMDGOALS goals := $(MAKECMDGOALS) else goals := all endif # store path to Pd API m_pd.h if it is found ifdef PDINCLUDEDIR mpdh := $(shell ls "$(PDINCLUDEDIR)/m_pd.h") endif # store path to pd.dll; if not found, ls will give a useful error ifeq ($(system), Windows) pddll := $(shell ls "$(PDBINDIR)/pd.dll") endif # print Makefile.pdlibbuilder version $(info ++++ info: using Makefile.pdlibbuilder version $(version)) # when making target all, check if m_pd.h is found and print info about it ifeq ($(goals), all) $(if $(mpdh), \ $(info ++++ info: using Pd API $(mpdh)), \ $(warning Where is Pd API m_pd.h? Do 'make help' for info.)) endif # print target info $(info ++++ info: making target $(goals) $(if $(lib.name),in lib $(lib.name))) # when installing, print installpath info $(if $(filter install install-lib, $(goals)), $(info ++++ info: \ installpath is '$(installpath)')) #=== define executables ======================================================== # By default we build class executables, and optionally a shared dynamic link # lib. When make-lib-executable=yes we build all classes into a single lib # executable, on the condition that variable lib.setup.sources is defined. ifeq ($(make-lib-executable),yes) $(if $(lib.setup.sources), ,\ $(error Can not build library blob because lib.setup.sources is undefined)) executables := $(lib.name).$(extension) else executables := $(classes.executables) $(shared.lib) endif ################################################################################ ### rules: special targets ##################################################### ################################################################################ # Disable built-in rules. If some target can't be built with the specified # rules, it should not be built at all. MAKEFLAGS += --no-builtin-rules .PRECIOUS: .SUFFIXES: .PHONY: all post build-lib \ $(classes) $(makefiledirs) $(makefiles) \ install install-executables install-datafiles install-datadirs \ force clean vars allvars depend help ################################################################################ ### rules: build targets ####################################################### ################################################################################ # Target all forces the build of targets [$(executables) post] in # deterministic order. Target $(executables) builds class executables plus # optional shared lib or alternatively a single lib executable when # make-lib-executable=true. Target post is optionally defined by # library makefile. all: post post: $(executables) all: $(info ++++info: target all in lib $(lib.name) completed) # build all with -g option turned on for debug symbols alldebug: c.flags += -g alldebug: cxx.flags += -g alldebug: all #=== class executable ========================================================== # recipe for linking objects in class executable # argument $1 = compiler type (c or cxx) # argument $2 = class basename define link-class $(compile-$1) \ $($1.ldflags) $($2.class.ldflags) \ -o $2.$(extension) \ $(addsuffix .o, $(basename $($2.class.sources))) \ $(addsuffix .o, $(basename $(common.sources))) \ $($1.ldlibs) $($2.class.ldlibs) $(shared.lib) endef # general rule for linking object files in class executable %.$(extension): $(shared.lib) $(info ++++ info: linking objects in $@ for lib $(lib.name)) $(if $(filter %.cc %.cpp, $($*.class.sources)), \ $(call link-class,cxx,$*), \ $(call link-class,c,$*)) #=== library blob ============================================================== # build all classes into single executable build-lib: $(lib.name).$(extension) $(info ++++ info: library blob $(lib.name).$(extension) completed) # recipe for linking objects in lib executable # argument $1 = compiler type (c or cxx) define link-lib $(compile-$1) \ $($1.ldflags) $(lib.ldflags) \ -o $(lib.name).$(extension) $(all.objects) \ $($1.ldlibs) $(lib.ldlibs) endef # rule for linking objects in lib executable # declared conditionally to avoid name clashes ifeq ($(make-lib-executable),yes) $(lib.name).$(extension): $(all.objects) $(if $(filter %.cc %.cpp, $(all.sources)), \ $(call link-lib,cxx), \ $(call link-lib,c)) endif #=== shared dynamic lib ======================================================== # recipe for linking objects in shared executable # argument $1 = compiler type (c or cxx) define link-shared $(compile-$1) \ $(shared.ldflags) \ -o lib$(lib.name).$(shared.extension) $(shared.objects) \ $($1.ldlibs) $(shared.ldlibs) endef # rule for linking objects in shared executable # build recipe is in macro 'link-shared' lib$(lib.name).$(shared.extension): $(shared.objects) $(info ++++ info: linking objects in shared lib $@) $(if $(filter %.cc %.cpp, $(shared.sources)), \ $(call link-shared,cxx), \ $(call link-shared,c)) #=== object files ============================================================== # recipe to make .o file from source # argument $1 is compiler type (c or cxx) define make-object-file $(info ++++ info: making $@ in lib $(lib.name)) $(compile-$1) \ $($1.flags) \ -o $@ -c $< endef # Three rules to create .o files. These are double colon 'terminal' rules, # meaning they are the last in a rules chain. %.o:: %.c $(call make-object-file,c) %.o:: %.cc $(call make-object-file,cxx) %.o:: %.cpp $(call make-object-file,cxx) #=== explicit prerequisites for class executables ============================== # For class executables, prerequisite rules are declared in run time. Target # 'depend' prints these rules for debugging purposes. # declare explicit prerequisites rule like 'class: class.extension' # argument $v is class basename define declare-class-target $v: $v.$(extension) endef # declare explicit prerequisites rule like 'class.extension: object1.o object2.o' # argument $v is class basename define declare-class-executable-target $v.$(extension): $(addsuffix .o, $(basename $($v.class.sources))) \ $(addsuffix .o, $(basename $(common.sources))) endef # evaluate explicit prerequisite rules for all classes $(foreach v, $(classes), $(eval $(declare-class-target))) $(foreach v, $(classes), $(eval $(declare-class-executable-target))) #=== implicit prerequisites for class executables ============================== # Evaluating implicit prerequisites (header files) with help from the # preprocessor is 'expensive' so this is done conditionally and selectively. # Note that it is also possible to trigger a build via install targets, in # which case implicit prerequisites are not checked. # When the Pd include path contains spaces it will mess up the implicit # prerequisites rules. disable-dependency-tracking := $(strip $(pdincludepathwithspaces)) ifndef disable-dependency-tracking must-build-everything := $(filter all, $(goals)) must-build-class := $(filter $(classes), $(goals)) must-build-sources := $(foreach v, $(must-build-class), $($v.class.sources)) endif # declare implicit prerequisites rule like 'object.o: header1.h header2.h ...' # argument $1 is input source file(s) # dir is explicitly added because option -MM strips it by default define declare-object-target $(dir $1)$(filter %.o: %.h, $(shell $(CPP) $(depcheck.flags) -MM $1)) $(MAKEFILE_LIST) endef # evaluate implicit prerequisite rules when rebuilding everything ifdef must-build-everything $(if $(wildcard $(all.objects)), \ $(info ++++ info: evaluating implicit prerequisites in lib $(lib.name).....) \ $(foreach v, $(all.sources), $(eval $(call declare-object-target, $v)))) endif # evaluate implicit prerequisite rules when selectively building classes ifdef must-build-class $(foreach v, $(must-build-sources), \ $(eval $(call declare-object-target, $v))) $(foreach v, $(shared.sources), \ $(eval $(call declare-object-target, $v))) endif ################################################################################ ### rules: preprocessor and assembly files ##################################### ################################################################################ # Preprocessor and assembly output files for bug tracing etc. They are not part # of the build processes for executables. By default these files are created in # the current working directory. Dependency tracking is not performed, the build # is forced instead to make sure it's up to date. force: #=== preprocessor file ========================================================= # make preprocessor output file with extension .pre # argument $1 = compiler type (c or cxx) define make-preprocessor-file $(info ++++ info: making preprocessor output file $(notdir $*.pre) \ in current working directory) $(compile-$1) -E $< $(c.flags) $($1.flags) -o $(notdir $*.pre) endef %.pre:: %.c force $(call make-preprocessor-file,c) %.pre:: %.cc force $(call make-preprocessor-file,cxx) %.pre:: %.cpp force $(call make-preprocessor-file,cxx) #=== assembly file ============================================================= # make C / assembly interleaved output file with extension .lst # argument $1 = compiler type (c or cxx) define make-assembly-file $(info ++++ info: making assembly output file $(notdir $*.lst) \ in current working directory) $(compile-$1) \ -c -Wa,-a,-ad -fverbose-asm \ $($1.flags) \ $< > $(notdir $*.lst) endef %.lst:: %.c force $(call make-assembly-file,c) %.lst:: %.cc force $(call make-assembly-file,cxx) %.lst:: %.cpp force $(call make-assembly-file,cxx) ################################################################################ ### rules: installation targets ################################################ ################################################################################ #=== strip ===================================================================== # Stripping of installed binaries will only be done when variable 'stripflags' # is defined non-empty. No default definition is provided except for Windows # where the unstripped binaries are large, especially in the case of Mingw-w64. # Note: while stripping all symbols ('-s' or '--strip-all') is possible for # Linux and Windows, in the case of OSX only non-global symbols can be stripped # (option '-x' or '--discard-all'). # Make definition of strip command overridable so it can be defined in an # environment for cross-compilation. STRIP ?= strip # Commands in 'strip-executables' will be executed conditionally in the rule for # target 'install-executables'. strip-executables = cd "$(installpath)" && \ $(foreach v, $(executables), $(STRIP) $(stripflags) '$v';) #=== install =================================================================== # Install targets depend on successful exit status of target all because nothing # must be installed in case of a build error. # -p = preserve time stamps # -m = set permission mode (as in chmod) # -d = create all components of specified directories INSTALL = install INSTALL_PROGRAM := $(INSTALL) -p -m 644 INSTALL_DATA := $(INSTALL) -p -m 644 INSTALL_DIR := $(INSTALL) -m 755 -d # strip spaces from file names executables := $(strip $(executables)) datafiles := $(strip $(datafiles)) datadirs := $(strip $(datadirs)) # Do not make any install sub-target with empty variable definition because the # install program would exit with an error. install: $(if $(executables), install-executables) install: $(if $(datafiles), install-datafiles) install: $(if $(datadirs), install-datadirs) install-executables: all $(INSTALL_DIR) -v "$(installpath)" $(foreach v, $(executables), \ $(INSTALL_PROGRAM) '$v' "$(installpath)";) $(info ++++ info: executables of lib $(lib.name) installed \ from $(CURDIR) to $(installpath)) $(if $(stripflags), $(strip-executables),) install-datafiles: all $(INSTALL_DIR) -v "$(installpath)" $(foreach v, $(datafiles), \ $(INSTALL_DATA) '$(v)' "$(installpath)";) $(info ++++ info: data files of lib $(lib.name) installed \ from $(CURDIR) to $(installpath)) install-datadirs: all $(foreach v, $(datadirs), $(INSTALL_DIR) "$(installpath)/$v";) $(foreach v, $(datadirs), \ $(INSTALL_DATA) $(wildcard $v/*) "$(installpath)/$v";) $(info ++++ info: data directories of lib $(lib.name) installed \ from $(CURDIR) to $(installpath)) ################################################################################ ### rules: distribution targets ################################################ ################################################################################ # TODO # These targets are implemented in Makefile Template, but I have to figure out # how to do it under the not-so-strict conditions of Makefile.pdlibbuilder. # make source package dist: @echo "target dist not yet implemented" # make Debian source package dpkg-source: @echo "target dpkg-source not yet implemented" $(ORIGDIR): $(DISTDIR): ################################################################################ ### rules: clean targets ####################################################### ################################################################################ # delete build products from build tree clean: rm -f $(all.objects) rm -f $(classes.executables) $(lib.name).$(extension) $(shared.lib) rm -f *.pre *.lst # remove distribution directories and tarballs from build tree distclean: clean @echo "target distclean not yet implemented" ################################################################################ ### rules: submake targets ##################################################### ################################################################################ # Iterate over sub-makefiles or makefiles in other directories. # When 'continue-make=yes' is set, sub-makes will report 'true' to the parent # process regardless of their real exit status. This prevents the parent make # from being aborted by a sub-make error. Useful when you want to quickly find # out which sub-makes from a large set will succeed. ifeq ($(continue-make),yes) continue = || true endif # These targets will trigger sub-make processes for entries in 'makefiledirs' # and 'makefiles'. all alldebug install clean distclean dist dkpg-source: \ $(makefiledirs) $(makefiles) # this expands to identical rules for each entry in 'makefiledirs' $(makefiledirs): $(MAKE) --directory=$@ $(MAKECMDGOALS) $(continue) # this expands to identical rules for each entry in 'makefiles' $(makefiles): $(MAKE) --directory=$(dir $@) --makefile=$(notdir $@) $(MAKECMDGOALS) $(continue) ################################################################################ ### rules: convenience targets ################################################# ################################################################################ #=== show variables ============================================================ # Several 'function' macro's cause errors when expanded within a rule or without # proper arguments. Variables which are set with the define directive are only # shown by name for that reason. functions = \ add-class-source \ declare-class-target \ declare-class-executable-target \ declare-object-target \ link-class \ link-lib \ link-shared \ make-object-file \ make-preprocessor-file \ make-assembly-file # show variables from makefiles vars: $(info ++++ info: showing makefile variables:) $(foreach v,\ $(sort $(filter-out $(functions) functions, $(.VARIABLES))),\ $(if $(filter file, $(origin $v)),\ $(info variable $v = $($v)))) $(foreach v, $(functions), $(info 'function' name: $v)) @echo # show all variables allvars: $(info ++++ info: showing default, automatic and makefile variables:) $(foreach v, \ $(sort $(filter-out $(functions) functions, $(.VARIABLES))), \ $(info variable ($(origin $v)) $v = $($v))) $(foreach v, $(functions), $(info 'function' name: $v)) @echo #=== show dependencies ========================================================= # show generated prerequisites rules depend: $(info ++++ info: generated prerequisite rules) $(foreach v, $(classes), $(info $(declare-class-target))) $(foreach v, $(classes), $(info $(declare-class-executable-target))) $(foreach v, $(all.sources), $(info $(call declare-object-target, $v))) @echo #=== show help text ============================================================ # brief info about targets and paths ifdef mpdh mpdhinfo := $(mpdh) else mpdhinfo := m_pd.h was not found. Is Pd installed? endif help: @echo @echo " Main targets:" @echo " all: build executables (default target)" @echo " install: install all components of the library" @echo " vars: print makefile variables for troubleshooting" @echo " allvars: print all variables for troubleshooting" @echo " help: print this help text" @echo @echo " Pd API m_pd.h:" @echo " $(mpdhinfo)" @echo " You may specify your preferred Pd include directory as argument" @echo " to the make command, like 'PDINCLUDEDIR=path/to/pd/src'." @echo @echo " Path for installation of your libdir(s):" @echo " $(PDLIBDIR)" @echo " Alternatively you may specify your path for installation as argument" @echo " to the make command, like 'PDLIBDIR=path/to/pd-externals'." @echo @echo " Default paths are listed in the doc sections in Makefile.pdlibbuilder." @echo #=== dummy target ============================================================== coffee: @echo "Makefile.pdlibbuilder: Can not make coffee. Sorry." ################################################################################ ### end of rules sections ###################################################### ################################################################################ # for syntax highlighting in vim and github # vim: set filetype=make: iem_utils-v0.0.20181004/iem16/tab16write~.c0000644000175000017500000000571613303611371020143 0ustar zmoelnigzmoelnig/* copyleft (c) 2003 forum::für::umläute -- IOhannes m zmölnig @ IEM * based on d_array.c from pd: * Copyright (c) 1997-1999 Miller Puckette and others. * For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. */ /* tab16write~, tab16play~, tab16read~, tab16read4~, tab16send~, tab16receive~ */ #include "iem16_table.h" /* ------------------------- tab16write~ -------------------------- */ static t_class *tab16write_tilde_class; typedef struct _tab16write_tilde { t_object x_obj; int x_phase; int x_nsampsintab; short *x_vec; t_symbol *x_arrayname; float x_f; } t_tab16write_tilde; static void *tab16write_tilde_new(t_symbol *s) { t_tab16write_tilde *x = (t_tab16write_tilde *)pd_new(tab16write_tilde_class); x->x_phase = 0x7fffffff; x->x_arrayname = s; x->x_f = 0; return (x); } static t_int *tab16write_tilde_perform(t_int *w) { t_tab16write_tilde *x = (t_tab16write_tilde *)(w[1]); t_float *in = (t_float *)(w[2]); int n = (int)(w[3]), phase = x->x_phase, endphase = x->x_nsampsintab; if (!x->x_vec) goto bad; if (endphase > phase) { int nxfer = endphase - phase; t_iem16_16bit *fp = x->x_vec + phase; if (nxfer > n) nxfer = n; phase += nxfer; while (nxfer--)*fp++ = *in++*IEM16_SCALE_UP; x->x_phase = phase; } bad: return (w+4); } void tab16write_tilde_set(t_tab16write_tilde *x, t_symbol *s){ t_table16 *a; x->x_arrayname = s; if (!(a = (t_table16 *)pd_findbyclass(x->x_arrayname, table16_class))) { if (*s->s_name) pd_error(x, "tab16write~: %s: no such table16", x->x_arrayname->s_name); x->x_vec = 0; } else if (!table16_getarray16(a, &x->x_nsampsintab, &x->x_vec)) { error("%s: bad template for tab16write~", x->x_arrayname->s_name); x->x_vec = 0; } else table16_usedindsp(a); } static void tab16write_tilde_dsp(t_tab16write_tilde *x, t_signal **sp){ tab16write_tilde_set(x, x->x_arrayname); dsp_add(tab16write_tilde_perform, 3, x, sp[0]->s_vec, sp[0]->s_n); } static void tab16write_tilde_bang(t_tab16write_tilde *x){ x->x_phase = 0; } static void tab16write_tilde_stop(t_tab16write_tilde *x){ x->x_phase = x->x_nsampsintab; } void tab16write_tilde_setup(void){ tab16write_tilde_class = class_new(gensym("tab16write~"), (t_newmethod)tab16write_tilde_new, 0, sizeof(t_tab16write_tilde), 0, A_DEFSYM, 0); CLASS_MAINSIGNALIN(tab16write_tilde_class, t_tab16write_tilde, x_f); class_addmethod(tab16write_tilde_class, (t_method)tab16write_tilde_dsp, gensym("dsp"), A_CANT, 0); class_addmethod(tab16write_tilde_class, (t_method)tab16write_tilde_set, gensym("set"), A_SYMBOL, 0); class_addmethod(tab16write_tilde_class, (t_method)tab16write_tilde_stop, gensym("stop"), 0); class_addbang(tab16write_tilde_class, tab16write_tilde_bang); } iem_utils-v0.0.20181004/iem16/Makefile0000644000175000017500000000177413236306553017261 0ustar zmoelnigzmoelnig#!/usr/bin/make -f # Makefile for pure data externals in lib creb. # Needs Makefile.pdlibbuilder to work (https://github.com/pure-data/pd-lib-builder) lib.name = iem16 # special file that does not provide a class lib.setup.sources = iem16.c # all other C and C++ files in subdirs are source files per class # (alternatively, enumerate them by hand) class.sources = $(filter-out $(lib.setup.sources),$(wildcard *.c)) datafiles = \ $(wildcard *-help.pd) \ GnuGPL.LICENSE datadirs = examples ################################################################################ ### pdlibbuilder ############################################################### ################################################################################ # Include Makefile.pdlibbuilder from this directory, or else from externals # root directory in pd-extended configuration. PDLIBBUILDER_DIR=pd-lib-builder include $(firstword $(wildcard $(PDLIBBUILDER_DIR)/Makefile.pdlibbuilder Makefile.pdlibbuilder ../Makefile.pdlibbuilder)) iem_utils-v0.0.20181004/iem16/tab16receive~-help.pd0000644000175000017500000000114413236306553021541 0ustar zmoelnigzmoelnig#N canvas 109 83 646 239 12; #X obj 328 181 table16; #X text 17 53 creation argument: name of array; #X text 16 83 By default a block is 64 samples \; this can be reset using the block~ object.; #X obj 21 18 tab16receive~; #X text 376 199 updated for iem16 version1.0; #X obj 5 176 tab16write~; #X obj 5 195 tab16read4~; #X obj 109 195 tab16read; #X obj 109 176 tab16write; #X obj 204 176 tab16send~; #X obj 204 195 tab16receive~; #X text 17 155 see also:; #X text 129 18 - read a block of a 16bit-signal from an array continuously ; #X text 10 129 16bit-signals are limited to 65536 values between -1.0..+1.0 ; iem_utils-v0.0.20181004/iem16/vd16~-help.pd0000644000175000017500000000240513236306553020042 0ustar zmoelnigzmoelnig#N canvas 88 40 717 480 12; #X floatatom 50 254 0 0 0 0 - - -; #X obj 50 347 outlet~; #X text 130 346 signal output (delayed signal); #X obj 50 282 sig~; #X text 99 279 signal input (delay time in ms); #X text 218 310 creation argument: name of delay line; #X text 35 400 see also:; #X text 77 10 reads a signal from a 16bit delay line at a variable delay time (4-point-interpolation); #X text 31 51 vd16~ implements a 4-point interpolating delay tap from a corresponding delwrite~ object. The delay in milliseconds of the tap is specified by the incoming signal.; #X text 16 433 similar pd-objects:; #X obj 201 432 delread~; #X obj 285 432 delwrite~; #X obj 378 432 vd~; #X obj 123 403 del16write~; #X obj 242 403 del16read~; #X text 411 386 updated for iem16 version1.0; #X text 28 116 This is very similar to the pd-object; #X text 56 137 It uses only 16bit to store the samples \, which will need only half of the memory of pd's floatingpoint-based object.; #X text 57 175 However \, there are 2 drawbacks: there will be some additional noise (because floats are more precise than 16bit) \, and you cannot have values>1 stored in the delay-line; #X obj 375 112 vd~; #X obj 50 314 vd16~ del_example; #X obj 24 16 vd16~; #X connect 0 0 3 0; #X connect 3 0 20 0; #X connect 20 0 1 0; iem_utils-v0.0.20181004/iem16/del16write~.c0000644000175000017500000000562413303611367020144 0ustar zmoelnigzmoelnig/* copyleft (c) 2003 forum::für::umläute -- IOhannes m zmölnig @ IEM * based on d_delay.c from pd: * Copyright (c) 1997-1999 Miller Puckette. * For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. */ /* del16read~, del16write~, vd16~ */ #include "iem16_delay.h" /* ----------------------------- del16write~ ----------------------------- */ /* routine to check that all del16writes/del16reads/vds have same vecsize */ void sigdel16write_checkvecsize(t_sigdel16write *x, int vecsize){ if (x->x_rsortno != ugen_getsortno()) { x->x_vecsize = vecsize; x->x_rsortno = ugen_getsortno(); } else if (vecsize != x->x_vecsize) pd_error(x, "del16read/del16write/vd vector size mismatch"); } static void *sigdel16write_new(t_symbol *s, t_floatarg msec){ int nsamps; t_sigdel16write *x = (t_sigdel16write *)pd_new(sigdel16write_class); if (!*s->s_name) s = gensym("del16write~"); pd_bind(&x->x_obj.ob_pd, s); x->x_sym = s; nsamps = msec * sys_getsr() * (float)(0.001f); if (nsamps < 1) nsamps = 1; nsamps += ((- nsamps) & (SAMPBLK - 1)); nsamps += DEFDELVS; x->x_cspace.c_n = nsamps; x->x_cspace.c_vec = (t_iem16_16bit *)getbytes((nsamps + XTRASAMPS) * sizeof(t_iem16_16bit)); x->x_cspace.c_phase = XTRASAMPS; x->x_sortno = 0; x->x_vecsize = 0; x->x_f = 0; return (x); } static t_int *sigdel16write_perform(t_int *w){ t_float *in = (t_float *)(w[1]); t_del16writectl *c = (t_del16writectl *)(w[2]); int n = (int)(w[3]); int phase = c->c_phase, nsamps = c->c_n; t_iem16_16bit *vp = c->c_vec, *bp = vp + phase, *ep = vp + (c->c_n + XTRASAMPS); phase += n; while (n--) { *bp++ = (*in++*IEM16_SCALE_UP); if (bp == ep) { vp[0] = ep[-4]; vp[1] = ep[-3]; vp[2] = ep[-2]; vp[3] = ep[-1]; bp = vp + XTRASAMPS; phase -= nsamps; } } c->c_phase = phase; return (w+4); } static void sigdel16write_dsp(t_sigdel16write *x, t_signal **sp){ dsp_add(sigdel16write_perform, 3, sp[0]->s_vec, &x->x_cspace, sp[0]->s_n); x->x_sortno = ugen_getsortno(); sigdel16write_checkvecsize(x, sp[0]->s_n); } static void sigdel16write_free(t_sigdel16write *x){ pd_unbind(&x->x_obj.ob_pd, x->x_sym); freebytes(x->x_cspace.c_vec, (x->x_cspace.c_n + XTRASAMPS) * sizeof(t_iem16_16bit)); } static void sigdel16write_setup(void){ sigdel16write_class = class_new(gensym("del16write~"), (t_newmethod)sigdel16write_new, (t_method)sigdel16write_free, sizeof(t_sigdel16write), 0, A_DEFSYM, A_DEFFLOAT, 0); CLASS_MAINSIGNALIN(sigdel16write_class, t_sigdel16write, x_f); class_addmethod(sigdel16write_class, (t_method)sigdel16write_dsp, gensym("dsp"), A_CANT, 0); } // G.Holzmann: for PD-extended build system void del16write_tilde_setup(void) { sigdel16write_setup(); } iem_utils-v0.0.20181004/iem16/tab16write-help.pd0000644000175000017500000000162713236306553021061 0ustar zmoelnigzmoelnig#N canvas 44 17 653 456 12; #X floatatom 39 96 0 0 0 0 - - -; #X floatatom 176 170 0 0 0 0 - - -; #X text 208 192 creation argument; #X text 210 210 is array name; #X text 76 87 set y value; #X text 74 152 right inlet selects x value; #X msg 55 117 set array99; #X text 163 116 change array name; #X text 388 378 updated for iem16 version1.0; #X obj 340 360 table16; #X obj 438 156 table16 array99; #X text 133 28 write numbers to a 16bit-table; #X text 20 256 since [table16] can only hold 16bit-values \, the stored numbers have to be integer (ok \, we take care of this!) values between -32768..+32767.; #X obj 39 195 tab16write array99; #X obj 31 27 tab16write; #X obj 17 355 tab16write~; #X obj 17 374 tab16read4~; #X obj 121 374 tab16read; #X obj 121 355 tab16write; #X obj 216 355 tab16send~; #X obj 216 374 tab16receive~; #X text 29 334 see also:; #X connect 0 0 13 0; #X connect 1 0 13 1; #X connect 6 0 13 0; iem_utils-v0.0.20181004/iem16/tab16send~-help.pd0000644000175000017500000000126213236306553021051 0ustar zmoelnigzmoelnig#N canvas 151 91 705 277 12; #X obj 328 221 table16; #X text 113 26 writes one block of a signal continuously to an array ; #X text 41 60 creation argument: name of array; #X text 29 96 By default a block is 64 samples \; this can be reset using the block~ object.; #X text 376 239 updated for iem16 version1.0; #X obj 5 216 tab16write~; #X obj 5 235 tab16read4~; #X obj 109 235 tab16read; #X obj 109 216 tab16write; #X obj 204 216 tab16send~; #X obj 204 235 tab16receive~; #X text 17 195 see also:; #X text 14 137 16bit-signals are limited to 65536 values between -1.0..+1.0 ; #X text 16 157 if your signal has absolute values >1.0 \, these are wrapped around...; #X obj 11 27 tab16send~; iem_utils-v0.0.20181004/iem16/table16-help.pd0000644000175000017500000000465513236306553020333 0ustar zmoelnigzmoelnig#N canvas 37 0 856 640 10; #X obj 30 21 table16; #X text 97 22 16bit-table; #X text 32 51 [table16] stores 16bit values. The normal pd-tables ([table] \, array) store the values as floating-points. While floating points are (often) more precise (this is of course not really true... \, esp. when comparing integer(4byte) to floating-point.) they use a lot of memory (4byte).; #X text 32 121 [table16] uses only 16bit (2bytes) to store the values \, which is half of the memory.; #X text 32 155 However there are 2 major drawbacks; #X text 53 172 a) less precision means less SNR - you can only store 65536 different values \, but this is what CD-quality is (should be good enough for most musical applications); #X text 55 221 b) the 65536 values (-32678..+32767) are mapped to -1.0..+1.0! This means you cannot store signals that exceed this magical limit. Please make sure \, that the signal has correct values (use [clip~]) or the unclipped values will get wrapped!; #X text 20 323 There are several objects to access the data of [table16]: ; #X obj 55 344 tab16write~; #X obj 55 363 tab16read4~; #X obj 279 363 tab16read; #X obj 279 344 tab16write; #X obj 164 344 tab16send~; #X obj 164 363 tab16receive~; #X obj 55 382 tab16read~; #X text 19 410 The message-objects [tab16read]/[tab16write] store the values directly (-32767..+32768) \, while the signal-objects convert the floats -1.0..+1.0 to the correct values or vice-versa.; #X text 270 21 updated for iem16 version1.0; #X msg 496 53 resize 100; #X obj 496 308 table16 array16 99; #N canvas 0 0 450 300 graph6 0; #X array array100 10 float 1; #A 0 1 2 3 4 5 6 7 8 9 0; #X coords 0 10 9 0 200 140 1; #X restore 477 452 graph; #X msg 478 409 \; array100 0 1 2 3 4 5 6 7 8 9; #X text 481 389 click to init float-array; #X msg 502 114 from array100; #X text 21 497 There is no beautiful graphical representation as with pd's arrays.; #X msg 508 139 from array100 resize; #X msg 516 190 from array100 20 30; #X msg 517 213 from array100 20 30 resize; #X msg 527 259 from array100 20 30 95; #X msg 527 279 from array100 20 30 95 resize; #X text 502 95 copy the data from a float-array; #X text 603 117 and resize the 16bit-array; #X text 513 173 copy floats (index20..30); #X text 653 192 and resize to 30-20; #X text 526 241 copy indexed values and insert at index95; #X connect 17 0 18 0; #X connect 22 0 18 0; #X connect 24 0 18 0; #X connect 25 0 18 0; #X connect 26 0 18 0; #X connect 27 0 18 0; #X connect 28 0 18 0; iem_utils-v0.0.20181004/iem16/iem16_table.h0000644000175000017500000000163213303612220020035 0ustar zmoelnigzmoelnig/* copyleft (c) 2003 forum::für::umläute -- IOhannes m zmölnig @ IEM * based on d_array.c from pd: * Copyright (c) 1997-1999 Miller Puckette and others. * For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. */ #ifndef INCLUDE_IEM16_TABLE_H__ #define INCLUDE_IEM16_TABLE_H__ /* sampling */ #include "iem16.h" #include /* ------------------------- table16 -------------------------- */ /* a 16bit table */ t_class *table16_class; typedef struct _table16 { t_object x_obj; t_symbol *x_tablename; long x_size; t_iem16_16bit *x_table; /* hold the data */ int x_usedindsp; t_canvas *x_canvas; /* for file i/o */ } t_table16; int table16_getarray16(t_table16*x, int*size,t_iem16_16bit**vec); void table16_usedindsp(t_table16*x); union tabfudge { double tf_d; int32 tf_i[2]; }; #endif iem_utils-v0.0.20181004/iem_adaptfilt/0000755000175000017500000000000013355472356017500 5ustar zmoelnigzmoelnigiem_utils-v0.0.20181004/iem_adaptfilt/LICENSE.txt0000644000175000017500000000167212630366344021323 0ustar zmoelnigzmoelnigiem_adaptfilt - pd-objects for adaptive filtering Copyright (C) 2004-2006 markus noisternig (noisternig AT iem DOT at) Copyright (C) 2004-2006 thomas musil (musil AT iem DOT at) This program is free software; you can redistribute it and/or 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, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. In the official flext distribution, the GNU General Public License is in the file GnuGPL.txt iem_utils-v0.0.20181004/iem_adaptfilt/src/0000755000175000017500000000000013355472356020267 5ustar zmoelnigzmoelnigiem_utils-v0.0.20181004/iem_adaptfilt/src/iem_adaptfilt.c0000644000175000017500000000263613355471356023243 0ustar zmoelnigzmoelnig/* For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. iem_adaptfilt written by Markus Noisternig & Thomas Musil noisternig_AT_iem.at; musil_AT_iem.at (c) Institute of Electronic Music and Acoustics, Graz Austria 2018 */ #ifdef NT #pragma warning( disable : 4244 ) #pragma warning( disable : 4305 ) #endif #include "m_pd.h" #include "iemlib.h" static t_class *iem_adaptfilt_class; static void *iem_adaptfilt_new(void) { t_object *x = (t_object *)pd_new(iem_adaptfilt_class); return (x); } void NLMS_tilde_setup(void); void NLMSerr_in_tilde_setup(void); void NLMSCC_tilde_setup(void); void n_CNLMS_tilde_setup(void); void n_CLNLMS_tilde_setup(void); void FXNLMSplus2in_tilde_setup(void); void FXNLMSplus3in_tilde_setup(void); /* ------------------------ setup routine ------------------------- */ void iem_adaptfilt_setup(void) { NLMS_tilde_setup(); NLMSerr_in_tilde_setup(); NLMSCC_tilde_setup(); n_CNLMS_tilde_setup(); n_CLNLMS_tilde_setup(); FXNLMSplus2in_tilde_setup(); FXNLMSplus3in_tilde_setup(); post("----------------------------------------------"); post("iem_adaptfilt (1.03) library loaded!"); post(" (c) Markus Noisternig, Thomas Musil"); post(" {noisternig, musil}_AT_iem.at"); post(" iem KUG Graz Austria, "BUILD_DATE); post("----------------------------------------------"); } iem_utils-v0.0.20181004/iem_adaptfilt/src/FXNLMSplus2in~.c0000644000175000017500000002500213303611535023137 0ustar zmoelnigzmoelnig/* For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. NLMS normalized least mean square (LMS) algorithm lib iem_adaptfilt written by Markus Noisternig & Thomas Musil noisternig_AT_iem.at; musil_AT_iem.at (c) Institute of Electronic Music and Acoustics, Graz Austria 2005 */ #include "m_pd.h" #include "iemlib.h" #include #include #include /* ----------------------- FXNLMSplus2in~ ------------------------------ */ /* -- Normalized Least Mean Square (linear adaptive FIR-filter) -- */ /* -- first input: reference signal -- */ /* -- second input: desired signal -- */ /* -- the difference to NLMS~ is: we have only one ERROR input instead of desired in minus filter out -- */ /* -- that means there is no feedback -- */ /* for further information on adaptive filter design we refer to */ /* [1] Haykin, "Adaptive Filter Theory", 4th ed, Prentice Hall */ /* [2] Benesty, "Adaptive Signal Processing", Springer */ typedef struct FXNLMSplus2in_tilde { t_object x_obj;// common pd object structure t_symbol *x_w_array_sym_name; t_float *x_w_array_mem_beg; t_float *x_ref_filt_in_hist;// history buffer for input signal reference for internal convolution = filter t_float *x_ref_adapt_in_hist;// history buffer for input signal reference for internal adapting filter t_int x_rw_index;// current read-write-index in circular buffer t_int x_n_order;// order of filter or convolution t_int x_update;// binary update parameter ON / OFF t_float x_alpha;// leakage Parameter = decrease factor of w_array t_float x_beta;// learn rate [0 .. 2] t_float x_gamma;// regularization Parameter = minimum t_float x_flt_sig_in1; } t_FXNLMSplus2in_tilde; t_class *FXNLMSplus2in_tilde_class; static t_float *FXNLMSplus2in_tilde_check_array(t_symbol *array_sym_name, t_int length) { int n_points; t_garray *a; t_float *vec; if(!(a = (t_garray *)pd_findbyclass(array_sym_name, garray_class))) { error("%s: no such array for FXNLMSplus2in~", array_sym_name->s_name); return((t_float *)0); } else if(!garray_getfloatarray(a, &n_points, &vec)) { error("%s: bad template for FXNLMSplus2in~", array_sym_name->s_name); return((t_float *)0); } else if(n_points < length) { error("%s: bad array-size for FXNLMSplus2in~: %d", array_sym_name->s_name, n_points); return((t_float *)0); } else { return(vec); } } static void FXNLMSplus2in_tilde_alpha(t_FXNLMSplus2in_tilde *x, t_floatarg f) // leakage { if(f < 0.0f) f = 0.0f; if(f > 1.0f) f = 1.0f; x->x_alpha = f; } static void FXNLMSplus2in_tilde_beta(t_FXNLMSplus2in_tilde *x, t_floatarg f) // learn rate { if(f < 0.0f) f = 0.0f; if(f > 2000.0f) f = 2000.0f; x->x_beta = f; } static void FXNLMSplus2in_tilde_gamma(t_FXNLMSplus2in_tilde *x, t_floatarg f) // regularization factor (dither) { if(f < 0.0f) f = 0.0f; if(f > 1.0f) f = 1.0f; x->x_gamma = f; } static void FXNLMSplus2in_tilde_update(t_FXNLMSplus2in_tilde *x, t_floatarg f) // downsample learn-rate { t_int u = (t_int)f; if((u > 2) || (u < 0)) // u==0...no update, u==1...normal update, u==2...wrong update u = 0; x->x_update = u; } /* ============== DSP ======================= */ static t_int *FXNLMSplus2in_tilde_perform_zero(t_int *w) { t_FXNLMSplus2in_tilde *x = (t_FXNLMSplus2in_tilde *)(w[5]); t_int n = (t_int)(w[6]); t_float *filt_out = (t_float *)(w[4]); t_int i; for(i=0; ix_n_order; /* number of filter-order */ t_int rw_index = x->x_rw_index; /* current read write index in circular buffer */ t_int update = x->x_update; t_float alpha = x->x_alpha; /* leakage */ t_float beta = x->x_beta; /* learn rate */ t_float gammax = x->x_gamma; /* minimum energy */ t_float my, my_err, sum, errin; t_int i, j, k; if(!x->x_w_array_mem_beg) goto FXNLMSplus2in_tildeperfzero;// this is quick&dirty Musil/Miller style for(i=0; ix_ref_filt_in_hist[rw_index] = ref_filt_in[i]; // inputs of ref_filt save to history x->x_ref_adapt_in_hist[rw_index] = ref_adapt_in[i]; // inputs of ref_adapt save to history errin = err_in[i]; // begin convolution, filter : j++, k--, rw_index = aktueller index fuer lesen schreiben von history und convolution-beginn sum = 0.0f; k = rw_index; for(j=0; jx_w_array_mem_beg[j] * x->x_ref_filt_in_hist[k]; k--; if(k < 0) k = n_order - 1; } filt_out[i] = sum; if(update) // downsampling for learn rate { sum = 0.0f;// calculate energy for last n-order samples in filter k = rw_index; if(update == 1) // correct energy from ref_adapt { for(j=0; jx_ref_adapt_in_hist[k] * x->x_ref_adapt_in_hist[k]; // correct energy calculation k--; if(k < 0) k = n_order - 1; } } else // incorrect energy from ref_filt (multiplied by 4) { for(j=0; jx_ref_filt_in_hist[k] * x->x_ref_filt_in_hist[k]; // wrong energy calculation k--; if(k < 0) k = n_order - 1; } } sum += gammax * gammax * (float)n_order; // convert gammax corresponding to filter order my = beta / sum;// calculate mue my_err = my * errin; k = rw_index; for(j=0; jx_w_array_mem_beg[j] *= alpha; // leakage x->x_w_array_mem_beg[j] += x->x_ref_adapt_in_hist[k] * my_err; k--; if(k < 0) k = n_order - 1; } } rw_index++; if(rw_index >= n_order) rw_index = 0; } x->x_rw_index = rw_index; // back to start return(w+7); FXNLMSplus2in_tildeperfzero: while(n--) { *filt_out++ = 0.0f; } return(w+7); } static void FXNLMSplus2in_tilde_dsp(t_FXNLMSplus2in_tilde *x, t_signal **sp) { x->x_w_array_mem_beg = FXNLMSplus2in_tilde_check_array(x->x_w_array_sym_name, x->x_n_order); if(!x->x_w_array_mem_beg) dsp_add(FXNLMSplus2in_tilde_perform_zero, 6, sp[0]->s_vec, sp[1]->s_vec, sp[2]->s_vec, sp[3]->s_vec, x, sp[0]->s_n); else dsp_add(FXNLMSplus2in_tilde_perform, 6, sp[0]->s_vec, sp[1]->s_vec, sp[2]->s_vec, sp[3]->s_vec, x, sp[0]->s_n); } /* setup/setdown things */ static void FXNLMSplus2in_tilde_free(t_FXNLMSplus2in_tilde *x) { freebytes(x->x_ref_filt_in_hist, x->x_n_order*sizeof(t_float)); freebytes(x->x_ref_adapt_in_hist, x->x_n_order*sizeof(t_float)); } static void *FXNLMSplus2in_tilde_new(t_symbol *s, t_int argc, t_atom *argv) { t_FXNLMSplus2in_tilde *x = (t_FXNLMSplus2in_tilde *)pd_new(FXNLMSplus2in_tilde_class); t_int i, n_order=39; t_symbol *w_name; t_float alpha=0.999f; t_float beta=0.01f; t_float gammax=0.00001f; if((argc >= 5) && IS_A_FLOAT(argv,0) && //IS_A_FLOAT/SYMBOL from iemlib.h IS_A_FLOAT(argv,1) && IS_A_FLOAT(argv,2) && IS_A_FLOAT(argv,3) && IS_A_SYMBOL(argv,4)) { n_order = (t_int)atom_getintarg(0, argc, argv); alpha = (t_float)atom_getfloatarg(1, argc, argv); beta = (t_float)atom_getfloatarg(2, argc, argv); gammax = (t_float)atom_getfloatarg(3, argc, argv); w_name = (t_symbol *)atom_getsymbolarg(4, argc, argv); if(alpha < 0.0f) alpha = 0.0f; if(alpha > 1.0f) alpha = 1.0f; if(beta < 0.0f) beta = 0.0f; if(beta > 2000.0f) beta = 2000.0f; if(gammax < 0.0f) gammax = 0.0f; if(gammax > 1.0f) gammax = 1.0f; if(n_order < 2) n_order = 2; if(n_order > 1111111) n_order = 1111111; inlet_new(&x->x_obj, &x->x_obj.ob_pd, &s_signal, &s_signal); inlet_new(&x->x_obj, &x->x_obj.ob_pd, &s_signal, &s_signal); outlet_new(&x->x_obj, &s_signal); x->x_flt_sig_in1 = 0; x->x_n_order = n_order; x->x_update = 0; x->x_alpha = alpha; x->x_beta = beta; x->x_gamma = gammax; // 2 times in and one time err_in memory allocation (history) x->x_ref_filt_in_hist = (t_float *)getbytes(x->x_n_order*sizeof(t_float)); x->x_ref_adapt_in_hist = (t_float *)getbytes(x->x_n_order*sizeof(t_float)); // table-symbols will be linked to their memory in future (dsp_routine) x->x_w_array_sym_name = gensym(w_name->s_name); x->x_w_array_mem_beg = (t_float *)0; x->x_rw_index = 0; return(x); } else { post("FXNLMSplus2in~-ERROR: need 4 float- + 1 symbol-arguments:"); post(" order_of_filter + leakage + learnrate + security_value + array_name_taps"); return(0); } } void FXNLMSplus2in_tilde_setup(void) { FXNLMSplus2in_tilde_class = class_new(gensym("FXNLMSplus2in~"), (t_newmethod)FXNLMSplus2in_tilde_new, (t_method)FXNLMSplus2in_tilde_free, sizeof(t_FXNLMSplus2in_tilde), 0, A_GIMME, 0); CLASS_MAINSIGNALIN(FXNLMSplus2in_tilde_class, t_FXNLMSplus2in_tilde, x_flt_sig_in1); class_addmethod(FXNLMSplus2in_tilde_class, (t_method)FXNLMSplus2in_tilde_dsp, gensym("dsp"), A_CANT, 0); class_addmethod(FXNLMSplus2in_tilde_class, (t_method)FXNLMSplus2in_tilde_update, gensym("update"), A_FLOAT, 0); // method: downsampling factor of learning (multiple of 2^N) class_addmethod(FXNLMSplus2in_tilde_class, (t_method)FXNLMSplus2in_tilde_alpha, gensym("alpha"), A_FLOAT, 0); //method: decrease of w_array class_addmethod(FXNLMSplus2in_tilde_class, (t_method)FXNLMSplus2in_tilde_beta, gensym("beta"), A_FLOAT, 0); //method: normalized learning rate class_addmethod(FXNLMSplus2in_tilde_class, (t_method)FXNLMSplus2in_tilde_gamma, gensym("gamma"), A_FLOAT, 0); // method: dithering noise related to signal } iem_utils-v0.0.20181004/iem_adaptfilt/src/makefile_vc9proj0000644000175000017500000000173412630366344023442 0ustar zmoelnigzmoelnigTARGET = iem_adaptfilt all: ..\$(TARGET).dll VIS_CPP_PATH = "C:\Program Files\Microsoft Visual Studio 9.0\VC" VIS_SDK_PATH = "C:\Program Files\Microsoft SDKs\Windows\v6.0A" PD_INST_PATH = "C:\Program Files\pd-0.43.0" PD_WIN_INCLUDE_PATH = /I. /I$(PD_INST_PATH)\src /I$(VIS_CPP_PATH)\include PD_WIN_C_FLAGS = /nologo /W3 /WX /DMSW /DNT /DPD /DWIN32 /DWINDOWS /Ox -D_CRT_SECURE_NO_WARNINGS PD_WIN_L_FLAGS = /nologo PD_WIN_LIB = /NODEFAULTLIB:libcmt /NODEFAULTLIB:oldnames /NODEFAULTLIB:kernel32 \ $(VIS_CPP_PATH)\lib\libcmt.lib \ $(VIS_CPP_PATH)\lib\oldnames.lib \ $(VIS_SDK_PATH)\lib\kernel32.lib \ $(PD_INST_PATH)\bin\pd.lib SRC = NLMS~.c \ NLMSerr_in~.c \ NLMSCC~.c \ n_CNLMS~.c \ n_CLNLMS~.c \ iem_adaptfilt.c OBJ = $(SRC:.c=.obj) .c.obj: cl $(PD_WIN_C_FLAGS) $(PD_WIN_INCLUDE_PATH) /c $*.c ..\$(TARGET).dll: $(OBJ) link $(PD_WIN_L_FLAGS) /dll /export:$(TARGET)_setup \ /out:..\$(TARGET).dll $(OBJ) $(PD_WIN_LIB) clean: del *.obj iem_utils-v0.0.20181004/iem_adaptfilt/src/n_CLNLMS~.c0000644000175000017500000003673513303611535022137 0ustar zmoelnigzmoelnig/* For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. n_CLNLMS multichannel-constrained leaky normalized LMS algorithm lib iem_adaptfilt written by Markus Noisternig & Thomas Musil noisternig_AT_iem.at; musil_AT_iem.at (c) Institute of Electronic Music and Acoustics, Graz Austria 2005 */ #ifdef NT #pragma warning( disable : 4244 ) #pragma warning( disable : 4305 ) #endif #include "m_pd.h" #include "iemlib.h" #include #include #include /* ----------------------- n_CLNLMS~ ------------------------------ */ /* -- multiple Constraint LEAKY Normalized Least Mean Square (linear adaptive FIR-filter) -- */ //* -- first input: reference signal -- */ /* -- second input: desired signal -- */ /* -- -- */ /* for further information on adaptive filter design we refer to */ /* [1] Haykin, "Adaptive Filter Theory", 4th ed, Prentice Hall */ /* [2] Benesty, "Adaptive Signal Processing", Springer */ typedef struct n_CLNLMS_tilde_kern { t_symbol *x_w_array_sym_name; t_float *x_w_array_mem_beg; t_float *x_in_ptr_beg;// memory: sig-in vector t_float *x_out_ptr_beg;// memory: sig-out vector t_float *x_in_hist;// start point double buffer for sig-in history } t_n_CLNLMS_tilde_kern; typedef struct n_CLNLMS_tilde { t_object x_obj; t_n_CLNLMS_tilde_kern *x_my_kern; t_float *x_des_in_ptr_beg;// memory: desired-in vector t_float *x_err_out_ptr_beg;// memory: error-out vector t_int x_n_io;// number of in-channels and filtered out-channels t_int x_rw_index;// read-write-index t_int x_n_order;// filter order t_int x_update;// rounded by 2^n, yields downsampling of learn-rate t_float x_beta;// learn rate [0 .. 2] t_float x_gamma;// normalization t_float x_kappa;// constreint: treshold of energy (clipping) t_float x_leakage;// leakage-Faktor for NLMS t_outlet *x_out_compressing_bang; t_clock *x_clock; t_float x_msi; } t_n_CLNLMS_tilde; t_class *n_CLNLMS_tilde_class; static void n_CLNLMS_tilde_tick(t_n_CLNLMS_tilde *x) { outlet_bang(x->x_out_compressing_bang); } static t_float *n_CLNLMS_tilde_check_array(t_symbol *array_sym_name, t_int length) { int n_points; t_garray *a; t_float *vec; if(!(a = (t_garray *)pd_findbyclass(array_sym_name, garray_class))) { error("%s: no such array for n_CLNLMS~", array_sym_name->s_name); return((t_float *)0); } else if(!garray_getfloatarray(a, &n_points, &vec)) { error("%s: bad template for n_CLNLMS~", array_sym_name->s_name); return((t_float *)0); } else if(n_points < length) { error("%s: bad array-size for n_CLNLMS~: %d", array_sym_name->s_name, n_points); return((t_float *)0); } else { return(vec); } } static void n_CLNLMS_tilde_beta(t_n_CLNLMS_tilde *x, t_floatarg f) // learn rate { if(f < 0.0f) f = 0.0f; if(f > 2.0f) f = 2.0f; x->x_beta = f; } static void n_CLNLMS_tilde_gamma(t_n_CLNLMS_tilde *x, t_floatarg f) // regularization (dither) { if(f < 0.0f) f = 0.0f; if(f > 1.0f) f = 1.0f; x->x_gamma = f; } static void n_CLNLMS_tilde_kappa(t_n_CLNLMS_tilde *x, t_floatarg f) // threshold for w_coeff { if(f < 0.0001f) f = 0.0001f; if(f > 10000.0f) f = 10000.0f; x->x_kappa = f; } static void n_CLNLMS_tilde_leakage(t_n_CLNLMS_tilde *x, t_floatarg f) // leakage of NLMS { if(f < 0.0001f) f = 0.0001f; if(f > 1.0f) f = 1.0f; x->x_leakage = f; } static void n_CLNLMS_tilde_update(t_n_CLNLMS_tilde *x, t_floatarg f) // downsample learn rate { t_int i=1, u = (t_int)f; if(u < 0) u = 0; else { while(i <= u) // convert u for 2^N i *= 2; // round down i /= 2; u = i; } x->x_update = u; } /* ============== DSP ======================= */ static t_int *n_CLNLMS_tilde_perform_zero(t_int *w) { t_n_CLNLMS_tilde *x = (t_n_CLNLMS_tilde *)(w[1]); t_int n = (t_int)(w[2]); t_int n_io = x->x_n_io; t_float *out; t_int i, j; out = x->x_err_out_ptr_beg; for(i=0; ix_my_kern[j].x_out_ptr_beg; for(i=0; ix_n_order; /* number of filter-order */ t_int rw_index2, rw_index = x->x_rw_index; t_int n_io = x->x_n_io; t_float *in;// first sig in t_float din;// second sig in t_float *filt_out;// first sig out t_float *err_out, err_sum;// second sig out t_float *read_in_hist; t_float *w_filt_coeff; t_float my, my_err, sum; t_float beta = x->x_beta; t_float hgamma, gammax = x->x_gamma; t_float hkappa, kappa = x->x_kappa; t_float hleakage, leakage = x->x_leakage; t_int i, j, k, update_counter; t_int update = x->x_update; t_int ord8=n_order&0xfffffff8; t_int ord_residual=n_order&0x7; t_int compressed = 0; for(k=0; kx_my_kern[k].x_w_array_mem_beg) goto n_CLNLMS_tildeperfzero;// this is Musil/Miller style } hgamma = gammax * gammax * (float)n_order; //hkappa = kappa * kappa * (float)n_order; hkappa = kappa; // kappa regards to energy value, else use line above for(i=0, update_counter=0; ix_my_kern[k].x_in_hist[rw_index] = x->x_my_kern[k].x_in_ptr_beg[i]; // save inputs into variabel & history x->x_my_kern[k].x_in_hist[rw_index+n_order] = x->x_my_kern[k].x_in_ptr_beg[i]; } din = x->x_des_in_ptr_beg[i]; // begin convolution err_sum = din; for(k=0; kx_my_kern[k].x_w_array_mem_beg; // Musil's special convolution buffer struct read_in_hist = &x->x_my_kern[k].x_in_hist[rw_index2]; for(j=0; jx_my_kern[k].x_out_ptr_beg[i] = sum; err_sum -= sum; } x->x_err_out_ptr_beg[i] = err_sum; // end convolution if(update) // downsampling of learn rate { update_counter++; if(update_counter >= update) { update_counter = 0; for(k=0; kx_my_kern[k].x_in_hist[rw_index2]; for(j=0; jx_my_kern[k].x_w_array_mem_beg; read_in_hist = &x->x_my_kern[k].x_in_hist[rw_index2]; sum = 0.0f; for(j=0; j hkappa) { compressed = 1; my = sqrt(hkappa/sum); w_filt_coeff = x->x_my_kern[k].x_w_array_mem_beg; for(j=0; j= n_order) rw_index -= n_order; } x->x_rw_index = rw_index; // wieder in die garage stellen if(compressed) clock_delay(x->x_clock, 0); return(w+3); n_CLNLMS_tildeperfzero: err_out = x->x_err_out_ptr_beg; for(i=0; ix_my_kern[j].x_out_ptr_beg; for(i=0; is_n; t_int ok_w = 1; t_int m = x->x_n_io; for(i=0; ix_my_kern[i].x_in_ptr_beg = sp[i]->s_vec; x->x_des_in_ptr_beg = sp[m]->s_vec; for(i=0; ix_my_kern[i].x_out_ptr_beg = sp[i+m+1]->s_vec; x->x_err_out_ptr_beg = sp[2*m+1]->s_vec; for(i=0; ix_my_kern[i].x_w_array_mem_beg = n_CLNLMS_tilde_check_array(x->x_my_kern[i].x_w_array_sym_name, x->x_n_order); if(!x->x_my_kern[i].x_w_array_mem_beg) ok_w = 0; } if(!ok_w) dsp_add(n_CLNLMS_tilde_perform_zero, 2, x, n); else dsp_add(n_CLNLMS_tilde_perform, 2, x, n); } /* setup/setdown things */ static void n_CLNLMS_tilde_free(t_n_CLNLMS_tilde *x) { t_int i, n_io=x->x_n_io, n_order=x->x_n_order; for(i=0; ix_my_kern[i].x_in_hist, 2*x->x_n_order*sizeof(t_float)); freebytes(x->x_my_kern, n_io*sizeof(t_n_CLNLMS_tilde_kern)); clock_free(x->x_clock); } static void *n_CLNLMS_tilde_new(t_symbol *s, t_int argc, t_atom *argv) { t_n_CLNLMS_tilde *x = (t_n_CLNLMS_tilde *)pd_new(n_CLNLMS_tilde_class); char buffer[400]; int i; t_int n_order=39, n_io=1; t_symbol *w_name; t_float beta=0.1f; t_float gammax=0.00001f; t_float kappa = 1.0f; t_float leakage = 0.99f; if((argc >= 7) && IS_A_FLOAT(argv,0) && //IS_A_FLOAT/SYMBOL from iemlib.h IS_A_FLOAT(argv,1) && IS_A_FLOAT(argv,2) && IS_A_FLOAT(argv,3) && IS_A_FLOAT(argv,4) && IS_A_FLOAT(argv,5) && IS_A_SYMBOL(argv,6)) { n_io = (t_int)atom_getintarg(0, argc, argv); n_order = (t_int)atom_getintarg(1, argc, argv); beta = (t_float)atom_getfloatarg(2, argc, argv); gammax = (t_float)atom_getfloatarg(3, argc, argv); kappa = (t_float)atom_getfloatarg(4, argc, argv); leakage = (t_float)atom_getfloatarg(5, argc, argv); w_name = (t_symbol *)atom_getsymbolarg(6, argc, argv); if(beta < 0.0f) beta = 0.0f; if(beta > 2.0f) beta = 2.0f; if(gammax < 0.0f) gammax = 0.0f; if(gammax > 1.0f) gammax = 1.0f; if(kappa < 0.0001f) kappa = 0.0001f; if(kappa > 10000.0f) kappa = 10000.0f; if(leakage < 0.0001f) leakage = 0.0001f; if(leakage > 1.0f) leakage = 1.0f; if(n_order < 2) n_order = 2; if(n_order > 11111) n_order = 11111; if(n_io < 1) n_io = 1; if(n_io > 60) n_io = 60; for(i=0; ix_obj, &x->x_obj.ob_pd, &s_signal, &s_signal); for(i=0; i<=n_io; i++) outlet_new(&x->x_obj, &s_signal); x->x_out_compressing_bang = outlet_new(&x->x_obj, &s_bang); x->x_msi = 0; x->x_n_io = n_io; x->x_n_order = n_order; x->x_update = 0; x->x_beta = beta; x->x_gamma = gammax; x->x_kappa = kappa; x->x_leakage = leakage; x->x_my_kern = (t_n_CLNLMS_tilde_kern *)getbytes(x->x_n_io*sizeof(t_n_CLNLMS_tilde_kern)); for(i=0; is_name); x->x_my_kern[i].x_w_array_sym_name = gensym(buffer); x->x_my_kern[i].x_w_array_mem_beg = (t_float *)0; x->x_my_kern[i].x_in_hist = (t_float *)getbytes(2*x->x_n_order*sizeof(t_float)); } x->x_clock = clock_new(x, (t_method)n_CLNLMS_tilde_tick); return(x); } else { post("n_CLNLMSC~-ERROR: need 6 float- + 1 symbol-arguments:"); post(" number_of_filters + order_of_filters + learnrate_beta + security_value_gamma + threshold_kappa + leakage_factor_lambda + array_name_taps"); return(0); } } void n_CLNLMS_tilde_setup(void) { n_CLNLMS_tilde_class = class_new(gensym("n_CLNLMS~"), (t_newmethod)n_CLNLMS_tilde_new, (t_method)n_CLNLMS_tilde_free, sizeof(t_n_CLNLMS_tilde), 0, A_GIMME, 0); CLASS_MAINSIGNALIN(n_CLNLMS_tilde_class, t_n_CLNLMS_tilde, x_msi); class_addmethod(n_CLNLMS_tilde_class, (t_method)n_CLNLMS_tilde_dsp, gensym("dsp"), A_CANT, 0); class_addmethod(n_CLNLMS_tilde_class, (t_method)n_CLNLMS_tilde_update, gensym("update"), A_FLOAT, 0); // method: downsampling factor of learning (multiple of 2^N) class_addmethod(n_CLNLMS_tilde_class, (t_method)n_CLNLMS_tilde_beta, gensym("beta"), A_FLOAT, 0); //method: normalized learning rate class_addmethod(n_CLNLMS_tilde_class, (t_method)n_CLNLMS_tilde_gamma, gensym("gamma"), A_FLOAT, 0); // method: dithering noise related to signal class_addmethod(n_CLNLMS_tilde_class, (t_method)n_CLNLMS_tilde_kappa, gensym("kappa"), A_FLOAT, 0); // method: threshold for compressing w_coeff class_addmethod(n_CLNLMS_tilde_class, (t_method)n_CLNLMS_tilde_leakage, gensym("leakage"), A_FLOAT, 0); // method: leakage factor [0 1] for w update //class_sethelpsymbol(n_CLNLMS_tilde_class, gensym("iemhelp2/n_CLNLMS~")); } iem_utils-v0.0.20181004/iem_adaptfilt/src/NLMSCC~.c0000644000175000017500000003152413303611535021600 0ustar zmoelnigzmoelnig/* For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. NLMSCC normalized LMS algorithm with coefficient constraints lib iem_adaptfilt written by Markus Noisternig & Thomas Musil noisternig_AT_iem.at; musil_AT_iem.at (c) Institute of Electronic Music and Acoustics, Graz Austria 2005 */ #ifdef NT #pragma warning( disable : 4244 ) #pragma warning( disable : 4305 ) #endif #include "m_pd.h" #include "iemlib.h" #include #include #include /* ----------------------- NLMSCC~ ------------------------------ */ /* -- Normalized Least Mean Square (linear adaptive FIR-filter) -- */ /* -- with Coefficient Constraint -- */ /* -- first input: reference signal -- */ /* -- second input: desired signal -- */ /* -- -- */ /* for further information on adaptive filter design we refer to */ /* [1] Haykin, "Adaptive Filter Theory", 4th ed, Prentice Hall */ /* [2] Benesty, "Adaptive Signal Processing", Springer */ /* */ typedef struct NLMSCC_tilde { t_object x_obj; t_symbol *x_w_array_sym_name; t_float *x_w_array_mem_beg; t_symbol *x_wmin_array_sym_name; t_float *x_wmin_array_mem_beg; t_symbol *x_wmax_array_sym_name; t_float *x_wmax_array_mem_beg; t_float *x_io_ptr_beg[4];// memory: 2 sig-in and 2 sig-out vectors t_float *x_in_hist;// start point double buffer for sig-in history t_int x_rw_index;// read-write-index t_int x_n_order;// order of filter t_int x_update;// 2^n rounded value, downsampling of update speed t_float x_beta;// learn rate [0 .. 2] t_float x_gamma;// regularization t_outlet *x_out_clipping_bang; t_clock *x_clock; t_float x_msi; } t_NLMSCC_tilde; t_class *NLMSCC_tilde_class; static void NLMSCC_tilde_tick(t_NLMSCC_tilde *x) { outlet_bang(x->x_out_clipping_bang); } static t_float *NLMSCC_tilde_check_array(t_symbol *array_sym_name, t_int length) { int n_points; t_garray *a; t_float *vec; if(!(a = (t_garray *)pd_findbyclass(array_sym_name, garray_class))) { error("%s: no such array for NLMSCC~", array_sym_name->s_name); return((t_float *)0); } else if(!garray_getfloatarray(a, &n_points, &vec)) { error("%s: bad template for NLMSCC~", array_sym_name->s_name); return((t_float *)0); } else if(n_points < length) { error("%s: bad array-size for NLMSCC~: %d", array_sym_name->s_name, n_points); return((t_float *)0); } else { return(vec); } } static void NLMSCC_tilde_beta(t_NLMSCC_tilde *x, t_floatarg f) // learn rate { if(f < 0.0f) f = 0.0f; if(f > 2.0f) f = 2.0f; x->x_beta = f; } static void NLMSCC_tilde_gamma(t_NLMSCC_tilde *x, t_floatarg f) // regularization factor (dither) { if(f < 0.0f) f = 0.0f; if(f > 1.0f) f = 1.0f; x->x_gamma = f; } static void NLMSCC_tilde_update(t_NLMSCC_tilde *x, t_floatarg f) // downsample of learn-rate { t_int i=1, u = (t_int)f; if(u < 0) u = 0; else { while(i <= u) // convert u for 2^N i *= 2; // round downwards i /= 2; u = i; } x->x_update = u; } /* ============== DSP ======================= */ static t_int *NLMSCC_tilde_perform_zero(t_int *w) { t_NLMSCC_tilde *x = (t_NLMSCC_tilde *)(w[1]); t_int n = (t_int)(w[2]); t_float **io = x->x_io_ptr_beg; t_float *out; t_int i, j; for(j=0; j<2; j++)/* output-vector-row */ { out = io[j+2]; for(i=0; ix_n_order; /* filter-order */ t_int rw_index = x->x_rw_index; t_float *in = x->x_io_ptr_beg[0];// first sig in t_float *desired_in = x->x_io_ptr_beg[1], din;// second sig in t_float *filt_out = x->x_io_ptr_beg[2];// first sig out t_float *err_out = x->x_io_ptr_beg[3], eout;// second sig out t_float *write_in_hist1 = x->x_in_hist; t_float *write_in_hist2 = write_in_hist1+n_order; t_float *read_in_hist = write_in_hist2; t_float *w_filt_coeff = x->x_w_array_mem_beg; t_float *wmin_filt_coeff = x->x_wmin_array_mem_beg; t_float *wmax_filt_coeff = x->x_wmax_array_mem_beg; t_float my, my_err, sum; t_float beta = x->x_beta; t_float gammax = x->x_gamma; t_int i, j, update_counter; t_int update = x->x_update; t_int ord8=n_order&0xfffffff8; t_int ord_residual=n_order&0x7; t_int clipped = 0; if(!w_filt_coeff) goto NLMSCC_tildeperfzero;// this is Musil/Miller style if(!wmin_filt_coeff) goto NLMSCC_tildeperfzero; if(!wmax_filt_coeff) goto NLMSCC_tildeperfzero;// if not constrained, perform zero for(i=0, update_counter=0; ix_w_array_mem_beg; // Musil's special convolution buffer struct read_in_hist = &write_in_hist2[rw_index]; for(j=0; j= update) { update_counter = 0; sum = 0.0f;// calculate energy for last n-order samples in filter read_in_hist = &write_in_hist2[rw_index]; for(j=0; jx_w_array_mem_beg; // coefficient constraints wmin_filt_coeff = x->x_wmin_array_mem_beg; wmax_filt_coeff = x->x_wmax_array_mem_beg; read_in_hist = &write_in_hist2[rw_index]; for(j=0; j wmax_filt_coeff[j]) { w_filt_coeff[j] = wmax_filt_coeff[j]; clipped = 1; } else if(w_filt_coeff[j] < wmin_filt_coeff[j]) { w_filt_coeff[j] = wmin_filt_coeff[j]; clipped = 1; } } } } rw_index++; if(rw_index >= n_order) rw_index -= n_order; } x->x_rw_index = rw_index; // back to start if(clipped) clock_delay(x->x_clock, 0); return(w+3); NLMSCC_tildeperfzero: while(n--) { *filt_out++ = 0.0f; *err_out++ = 0.0f; } return(w+3); } static void NLMSCC_tilde_dsp(t_NLMSCC_tilde *x, t_signal **sp) { t_int i, n = sp[0]->s_n; for(i=0; i<4; i++) // store io_vec x->x_io_ptr_beg[i] = sp[i]->s_vec; x->x_w_array_mem_beg = NLMSCC_tilde_check_array(x->x_w_array_sym_name, x->x_n_order); x->x_wmin_array_mem_beg = NLMSCC_tilde_check_array(x->x_wmin_array_sym_name, x->x_n_order); x->x_wmax_array_mem_beg = NLMSCC_tilde_check_array(x->x_wmax_array_sym_name, x->x_n_order); if(!(x->x_w_array_mem_beg && x->x_wmin_array_mem_beg && x->x_wmax_array_mem_beg)) dsp_add(NLMSCC_tilde_perform_zero, 2, x, n); else dsp_add(NLMSCC_tilde_perform, 2, x, n); } /* setup/setdown things */ static void NLMSCC_tilde_free(t_NLMSCC_tilde *x) { freebytes(x->x_in_hist, 2*x->x_n_order*sizeof(t_float)); clock_free(x->x_clock); } static void *NLMSCC_tilde_new(t_symbol *s, t_int argc, t_atom *argv) { t_NLMSCC_tilde *x = (t_NLMSCC_tilde *)pd_new(NLMSCC_tilde_class); t_int i, n_order=39; t_symbol *w_name; t_symbol *wmin_name; t_symbol *wmax_name; t_float beta=0.1f; t_float gammax=0.00001f; if((argc >= 6) && IS_A_FLOAT(argv,0) && //IS_A_FLOAT/SYMBOL from iemlib.h IS_A_FLOAT(argv,1) && IS_A_FLOAT(argv,2) && IS_A_SYMBOL(argv,3) && IS_A_SYMBOL(argv,4) && IS_A_SYMBOL(argv,5)) { n_order = (t_int)atom_getintarg(0, argc, argv); beta = (t_float)atom_getfloatarg(1, argc, argv); gammax = (t_float)atom_getfloatarg(2, argc, argv); w_name = (t_symbol *)atom_getsymbolarg(3, argc, argv); wmin_name = (t_symbol *)atom_getsymbolarg(4, argc, argv); wmax_name = (t_symbol *)atom_getsymbolarg(5, argc, argv); if(beta < 0.0f) beta = 0.0f; if(beta > 2.0f) beta = 2.0f; if(gammax < 0.0f) gammax = 0.0f; if(gammax > 1.0f) gammax = 1.0f; if(n_order < 2) n_order = 2; if(n_order > 11111) n_order = 11111; inlet_new(&x->x_obj, &x->x_obj.ob_pd, &s_signal, &s_signal); outlet_new(&x->x_obj, &s_signal); outlet_new(&x->x_obj, &s_signal); x->x_out_clipping_bang = outlet_new(&x->x_obj, &s_bang); x->x_msi = 0; x->x_n_order = n_order; x->x_update = 0; x->x_beta = beta; x->x_gamma = gammax; // 2 times in and one time desired_in memory allocation (history) x->x_in_hist = (t_float *)getbytes(2*x->x_n_order*sizeof(t_float)); // table-symbols will be linked to their memory in future (dsp_routine) x->x_w_array_sym_name = gensym(w_name->s_name); x->x_w_array_mem_beg = (t_float *)0; x->x_wmin_array_sym_name = gensym(wmin_name->s_name); x->x_wmin_array_mem_beg = (t_float *)0; x->x_wmax_array_sym_name = gensym(wmax_name->s_name); x->x_wmax_array_mem_beg = (t_float *)0; x->x_clock = clock_new(x, (t_method)NLMSCC_tilde_tick); return(x); } else { post("NLMSCC~-ERROR: need 3 float- + 3 symbol-arguments:"); post(" order_of_filter + learnrate_beta + security_value + array_name_taps + array_name_tap_min + array_name_tap_max"); return(0); } } void NLMSCC_tilde_setup(void) { NLMSCC_tilde_class = class_new(gensym("NLMSCC~"), (t_newmethod)NLMSCC_tilde_new, (t_method)NLMSCC_tilde_free, sizeof(t_NLMSCC_tilde), 0, A_GIMME, 0); CLASS_MAINSIGNALIN(NLMSCC_tilde_class, t_NLMSCC_tilde, x_msi); class_addmethod(NLMSCC_tilde_class, (t_method)NLMSCC_tilde_dsp, gensym("dsp"), A_CANT, 0); class_addmethod(NLMSCC_tilde_class, (t_method)NLMSCC_tilde_update, gensym("update"), A_FLOAT, 0); // method: downsampling factor of learning (multiple of 2^N) class_addmethod(NLMSCC_tilde_class, (t_method)NLMSCC_tilde_beta, gensym("beta"), A_FLOAT, 0); //method: normalized learning rate class_addmethod(NLMSCC_tilde_class, (t_method)NLMSCC_tilde_gamma, gensym("gamma"), A_FLOAT, 0); // method: dithering noise related to signal //class_sethelpsymbol(NLMSCC_tilde_class, gensym("iemhelp2/NLMSCC~")); } iem_utils-v0.0.20181004/iem_adaptfilt/src/VC7/0000755000175000017500000000000012630366344020660 5ustar zmoelnigzmoelnigiem_utils-v0.0.20181004/iem_adaptfilt/src/VC7/iem_adaptfilt.vcproj0000644000175000017500000000245112630366344024711 0ustar zmoelnigzmoelnig iem_utils-v0.0.20181004/iem_adaptfilt/src/VC7/makefile_vc7proj0000644000175000017500000000177612630366344024045 0ustar zmoelnigzmoelnigTARGET = iem_adaptfilt all: ..\$(TARGET).dll VIS_CPP_PATH = "C:\Programme\Microsoft Visual Studio .NET 2003\Vc7" VIS_SDK_PATH = "C:\Programme\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK" PD_INST_PATH = "C:\Programme\pd" PD_WIN_INCLUDE_PATH = /I. /I$(PD_INST_PATH)\src /I$(VIS_CPP_PATH)\include PD_WIN_C_FLAGS = /nologo /W3 /WX /DMSW /DNT /DPD /DWIN32 /DWINDOWS /DHAVE_G_CANVAS_H /Ox -D_CRT_SECURE_NO_WARNINGS PD_WIN_L_FLAGS = /nologo PD_WIN_LIB = /NODEFAULTLIB:libcmt /NODEFAULTLIB:oldnames /NODEFAULTLIB:kernel32 \ $(VIS_CPP_PATH)\lib\libcmt.lib \ $(VIS_CPP_PATH)\lib\oldnames.lib \ $(VIS_SDK_PATH)\lib\kernel32.lib \ $(PD_INST_PATH)\bin\pd.lib SRC = NLMS~.c \ NLMSerr_in~.c \ NLMSCC~.c \ n_CNLMS~.c \ n_CLNLMS~.c \ iem_adaptfilt.c OBJ = $(SRC:.c=.obj) .c.obj: cl $(PD_WIN_C_FLAGS) $(PD_WIN_INCLUDE_PATH) /c $*.c ..\$(TARGET).dll: $(OBJ) link $(PD_WIN_L_FLAGS) /dll /export:$(TARGET)_setup \ /out:..\$(TARGET).dll $(OBJ) $(PD_WIN_LIB) clean: del *.obj iem_utils-v0.0.20181004/iem_adaptfilt/src/VC6/0000755000175000017500000000000012630366344020657 5ustar zmoelnigzmoelnigiem_utils-v0.0.20181004/iem_adaptfilt/src/VC6/iem_adaptfilt.dsw0000644000175000017500000000110112630366344024171 0ustar zmoelnigzmoelnigMicrosoft Developer Studio Workspace File, Format Version 6.00 # WARNUNG: DIESE ARBEITSBEREICHSDATEI DARF NICHT BEARBEITET ODER GELSCHT WERDEN! ############################################################################### Project: "iem_adaptfilt"=.\iem_adaptfilt.dsp - Package Owner=<4> Package=<5> {{{ }}} Package=<4> {{{ }}} ############################################################################### Global: Package=<5> {{{ }}} Package=<3> {{{ }}} ############################################################################### iem_utils-v0.0.20181004/iem_adaptfilt/src/VC6/makefile_win0000644000175000017500000000205412630366344023235 0ustar zmoelnigzmoelnig all: ..\iem_adaptfilt.dll VIS_CPP_PATH = "C:\Programme\Microsoft Visual Studio\Vc98" PD_INST_PATH = "C:\Programme\pd" PD_WIN_INCLUDE_PATH = /I. /I$(PD_INST_PATH)\src /I$(VIS_CPP_PATH)\include PD_WIN_C_FLAGS = /nologo /W3 /WX /DMSW /DNT /DPD /DWIN32 /DWINDOWS /Ox -DPA_LITTLE_ENDIAN PD_WIN_L_FLAGS = /nologo PD_WIN_LIB = /NODEFAULTLIB:libc /NODEFAULTLIB:oldnames /NODEFAULTLIB:kernel /NODEFAULTLIB:uuid \ $(VIS_CPP_PATH)\lib\libc.lib \ $(VIS_CPP_PATH)\lib\oldnames.lib \ $(VIS_CPP_PATH)\lib\kernel32.lib \ $(VIS_CPP_PATH)\lib\wsock32.lib \ $(VIS_CPP_PATH)\lib\winmm.lib \ $(PD_INST_PATH)\bin\pthreadVC.lib \ $(PD_INST_PATH)\bin\pd.lib SRC = NLMS~.c \ NLMSerr_in~.c \ NLMSCC~.c \ n_CNLMS~.c \ n_CLNLMS~.c \ iem_adaptfilt.c OBJ = $(SRC:.c=.obj) .c.obj: cl $(PD_WIN_C_FLAGS) $(PD_WIN_INCLUDE_PATH) /c $*.c ..\iem_adaptfilt.dll: $(OBJ) link $(PD_WIN_L_FLAGS) /dll /export:iem_adaptfilt_setup \ /out:..\iem_adaptfilt.dll $(OBJ) $(PD_WIN_LIB) clean: del *.obj iem_utils-v0.0.20181004/iem_adaptfilt/src/VC6/iem_adaptfilt.dsp0000644000175000017500000000511312630366344024171 0ustar zmoelnigzmoelnig# Microsoft Developer Studio Project File - Name="iem_adaptfilt" - Package Owner=<4> # Microsoft Developer Studio Generated Build File, Format Version 6.00 # ** NICHT BEARBEITEN ** # TARGTYPE "Win32 (x86) External Target" 0x0106 CFG=iem_adaptfilt - Win32 Debug !MESSAGE Dies ist kein gltiges Makefile. Zum Erstellen dieses Projekts mit NMAKE !MESSAGE verwenden Sie den Befehl "Makefile exportieren" und fhren Sie den Befehl !MESSAGE !MESSAGE NMAKE /f "iem_adaptfilt.mak". !MESSAGE !MESSAGE Sie knnen beim Ausfhren von NMAKE eine Konfiguration angeben !MESSAGE durch Definieren des Makros CFG in der Befehlszeile. Zum Beispiel: !MESSAGE !MESSAGE NMAKE /f "iem_adaptfilt.mak" CFG="iem_adaptfilt - Win32 Debug" !MESSAGE !MESSAGE Fr die Konfiguration stehen zur Auswahl: !MESSAGE !MESSAGE "iem_adaptfilt - Win32 Release" (basierend auf "Win32 (x86) External Target") !MESSAGE "iem_adaptfilt - Win32 Debug" (basierend auf "Win32 (x86) External Target") !MESSAGE # Begin Project # PROP AllowPerConfigDependencies 0 # PROP Scc_ProjName "" # PROP Scc_LocalPath "" !IF "$(CFG)" == "iem_adaptfilt - Win32 Release" # PROP BASE Use_Debug_Libraries 0 # PROP BASE Output_Dir "Release" # PROP BASE Intermediate_Dir "Release" # PROP BASE Cmd_Line "NMAKE /f makefile_win" # PROP BASE Rebuild_Opt "/a" # PROP BASE Target_File "makefile_win.exe" # PROP BASE Bsc_Name "makefile_win.bsc" # PROP BASE Target_Dir "" # PROP Use_Debug_Libraries 0 # PROP Output_Dir "Release" # PROP Intermediate_Dir "Release" # PROP Cmd_Line "NMAKE /f makefile_win" # PROP Rebuild_Opt "/a" # PROP Target_File "iem_adaptfilt.exe" # PROP Bsc_Name "iem_adaptfilt.bsc" # PROP Target_Dir "" !ELSEIF "$(CFG)" == "iem_adaptfilt - Win32 Debug" # PROP BASE Use_Debug_Libraries 1 # PROP BASE Output_Dir "Debug" # PROP BASE Intermediate_Dir "Debug" # PROP BASE Cmd_Line "NMAKE /f makefile_win" # PROP BASE Rebuild_Opt "/a" # PROP BASE Target_File "makefile_win.exe" # PROP BASE Bsc_Name "makefile_win.bsc" # PROP BASE Target_Dir "" # PROP Use_Debug_Libraries 1 # PROP Output_Dir "Debug" # PROP Intermediate_Dir "Debug" # PROP Cmd_Line "NMAKE /f makefile_win" # PROP Rebuild_Opt "/a" # PROP Target_File "iem_adaptfilt.exe" # PROP Bsc_Name "iem_adaptfilt.bsc" # PROP Target_Dir "" !ENDIF # Begin Target # Name "iem_adaptfilt - Win32 Release" # Name "iem_adaptfilt - Win32 Debug" !IF "$(CFG)" == "iem_adaptfilt - Win32 Release" !ELSEIF "$(CFG)" == "iem_adaptfilt - Win32 Debug" !ENDIF # Begin Source File SOURCE=.\makefile_win # End Source File # End Target # End Project iem_utils-v0.0.20181004/iem_adaptfilt/src/iem_adaptfilt.sln0000644000175000017500000000157413303322327023577 0ustar zmoelnigzmoelnig Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 2012 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "iem_adaptfilt", "iem_adaptfilt.vcxproj", "{4E46116D-6873-4B74-AF38-4D6863F9F2D8}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Win32 = Debug|Win32 Release|Win32 = Release|Win32 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {4E46116D-6873-4B74-AF38-4D6863F9F2D8}.Debug|Win32.ActiveCfg = Debug|Win32 {4E46116D-6873-4B74-AF38-4D6863F9F2D8}.Debug|Win32.Build.0 = Debug|Win32 {4E46116D-6873-4B74-AF38-4D6863F9F2D8}.Release|Win32.ActiveCfg = Release|Win32 {4E46116D-6873-4B74-AF38-4D6863F9F2D8}.Release|Win32.Build.0 = Release|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection EndGlobal iem_utils-v0.0.20181004/iem_adaptfilt/src/makefile_vc12proj0000644000175000017500000000205113355471356023512 0ustar zmoelnigzmoelnigTARGET = iem_adaptfilt all: ..\$(TARGET).dll VIS_CPP_COMP = cl VIS_CPP_LINK = link VIS_CPP_PATH = "$(PROGRAMFILES)\Microsoft Visual Studio 11.0\VC" VIS_SDK_PATH = "$(PROGRAMFILES)\Windows Kits\8.1" PD_INST_PATH = "$(PROGRAMFILES)\pd-0.48-1" PD_WIN_INCLUDE_PATH = /I. /I$(PD_INST_PATH)\src /I$(VIS_CPP_PATH)\include /I..\include PD_WIN_C_FLAGS = /nologo /W3 /WX /DMSW /DNT /DPD /DWIN32 /DWINDOWS /Ox -D_CRT_SECURE_NO_WARNINGS PD_WIN_L_FLAGS = /nologo PD_WIN_LIB = /NODEFAULTLIB:libcmt /NODEFAULTLIB:oldnames /NODEFAULTLIB:kernel32 \ $(VIS_CPP_PATH)\lib\libcmt.lib \ $(VIS_CPP_PATH)\lib\oldnames.lib \ $(VIS_SDK_PATH)\Lib\winv6.3\um\x86\kernel32.lib \ $(PD_INST_PATH)\bin\pd.lib SRC = NLMS~.c \ NLMSerr_in~.c \ NLMSCC~.c \ n_CNLMS~.c \ n_CLNLMS~.c \ FXNLMSplus2in~.c \ FXNLMSplus3in~.c \ $(TARGET).c OBJ = $(SRC:.c=.obj) .c.obj: $(VIS_CPP_COMP) $(PD_WIN_C_FLAGS) $(PD_WIN_INCLUDE_PATH) /c $*.c ..\$(TARGET).dll: $(OBJ) $(VIS_CPP_LINK) $(PD_WIN_L_FLAGS) /dll /export:$(TARGET)_setup \ /out:..\$(TARGET).dll $(OBJ) $(PD_WIN_LIB) clean: del *.obj iem_utils-v0.0.20181004/iem_adaptfilt/src/iem_adaptfilt.dsw0000644000175000017500000000110112630366344023573 0ustar zmoelnigzmoelnigMicrosoft Developer Studio Workspace File, Format Version 6.00 # WARNUNG: DIESE ARBEITSBEREICHSDATEI DARF NICHT BEARBEITET ODER GELSCHT WERDEN! ############################################################################### Project: "iem_adaptfilt"=.\iem_adaptfilt.dsp - Package Owner=<4> Package=<5> {{{ }}} Package=<4> {{{ }}} ############################################################################### Global: Package=<5> {{{ }}} Package=<3> {{{ }}} ############################################################################### iem_utils-v0.0.20181004/iem_adaptfilt/src/VC9/0000755000175000017500000000000012630366344020662 5ustar zmoelnigzmoelnigiem_utils-v0.0.20181004/iem_adaptfilt/src/VC9/makefile_vc9proj0000644000175000017500000000173412630366344024043 0ustar zmoelnigzmoelnigTARGET = iem_adaptfilt all: ..\$(TARGET).dll VIS_CPP_PATH = "C:\Program Files\Microsoft Visual Studio 9.0\VC" VIS_SDK_PATH = "C:\Program Files\Microsoft SDKs\Windows\v6.0A" PD_INST_PATH = "C:\Program Files\pd-0.43.0" PD_WIN_INCLUDE_PATH = /I. /I$(PD_INST_PATH)\src /I$(VIS_CPP_PATH)\include PD_WIN_C_FLAGS = /nologo /W3 /WX /DMSW /DNT /DPD /DWIN32 /DWINDOWS /Ox -D_CRT_SECURE_NO_WARNINGS PD_WIN_L_FLAGS = /nologo PD_WIN_LIB = /NODEFAULTLIB:libcmt /NODEFAULTLIB:oldnames /NODEFAULTLIB:kernel32 \ $(VIS_CPP_PATH)\lib\libcmt.lib \ $(VIS_CPP_PATH)\lib\oldnames.lib \ $(VIS_SDK_PATH)\lib\kernel32.lib \ $(PD_INST_PATH)\bin\pd.lib SRC = NLMS~.c \ NLMSerr_in~.c \ NLMSCC~.c \ n_CNLMS~.c \ n_CLNLMS~.c \ iem_adaptfilt.c OBJ = $(SRC:.c=.obj) .c.obj: cl $(PD_WIN_C_FLAGS) $(PD_WIN_INCLUDE_PATH) /c $*.c ..\$(TARGET).dll: $(OBJ) link $(PD_WIN_L_FLAGS) /dll /export:$(TARGET)_setup \ /out:..\$(TARGET).dll $(OBJ) $(PD_WIN_LIB) clean: del *.obj iem_utils-v0.0.20181004/iem_adaptfilt/src/VC9/iem_adaptfilt.vcproj0000644000175000017500000000361512630366344024716 0ustar zmoelnigzmoelnig iem_utils-v0.0.20181004/iem_adaptfilt/src/VC9/iem_adaptfilt.sln0000644000175000017500000000157312630366344024210 0ustar zmoelnigzmoelnig Microsoft Visual Studio Solution File, Format Version 10.00 # Visual Studio 2008 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "iem_adaptfilt", "iem_adaptfilt.vcproj", "{6A44952F-0D55-44EE-9032-928368583BEC}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Win32 = Debug|Win32 Release|Win32 = Release|Win32 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {6A44952F-0D55-44EE-9032-928368583BEC}.Debug|Win32.ActiveCfg = Debug|Win32 {6A44952F-0D55-44EE-9032-928368583BEC}.Debug|Win32.Build.0 = Debug|Win32 {6A44952F-0D55-44EE-9032-928368583BEC}.Release|Win32.ActiveCfg = Release|Win32 {6A44952F-0D55-44EE-9032-928368583BEC}.Release|Win32.Build.0 = Release|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection EndGlobal iem_utils-v0.0.20181004/iem_adaptfilt/src/NLMSerr_in~.c0000644000175000017500000002216413303611535022571 0ustar zmoelnigzmoelnig/* For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. NLMS normalized least mean square (LMS) algorithm lib iem_adaptfilt written by Markus Noisternig & Thomas Musil noisternig_AT_iem.at; musil_AT_iem.at (c) Institute of Electronic Music and Acoustics, Graz Austria 2005 */ #include "m_pd.h" #include "iemlib.h" #include #include #include /* ----------------------- NLMSerr_in~ ------------------------------ */ /* -- Normalized Least Mean Square (linear adaptive FIR-filter) -- */ /* -- first input: reference signal -- */ /* -- second input: desired signal -- */ /* -- the difference to NLMS~ is: we have only one ERROR input instead of desired in minus filter out -- */ /* -- that means there is no feedback -- */ /* for further information on adaptive filter design we refer to */ /* [1] Haykin, "Adaptive Filter Theory", 4th ed, Prentice Hall */ /* [2] Benesty, "Adaptive Signal Processing", Springer */ typedef struct NLMSerr_in_tilde { t_object x_obj;// common pd object structure t_symbol *x_w_array_sym_name; t_float *x_w_array_mem_beg; t_float *x_ref_filt_in_hist;// history buffer for input signal reference for internal convolution = filter t_float *x_ref_adapt_in_hist;// history buffer for input signal reference for internal adapting filter t_int x_rw_index;// current read-write-index in circular buffer t_int x_n_order;// order of filter or convolution t_int x_update;// binary update parameter ON / OFF t_float x_beta;// learn rate [0 .. 2] t_float x_gamma;// regularization Parameter = minimum t_float x_flt_sig_in1; } t_NLMSerr_in_tilde; t_class *NLMSerr_in_tilde_class; static t_float *NLMSerr_in_tilde_check_array(t_symbol *array_sym_name, t_int length) { int n_points; t_garray *a; t_float *vec; if(!(a = (t_garray *)pd_findbyclass(array_sym_name, garray_class))) { error("%s: no such array for NLMSerr_in~", array_sym_name->s_name); return((t_float *)0); } else if(!garray_getfloatarray(a, &n_points, &vec)) { error("%s: bad template for NLMSerr_in~", array_sym_name->s_name); return((t_float *)0); } else if(n_points < length) { error("%s: bad array-size for NLMSerr_in~: %d", array_sym_name->s_name, n_points); return((t_float *)0); } else { return(vec); } } static void NLMSerr_in_tilde_beta(t_NLMSerr_in_tilde *x, t_floatarg f) // learn rate { if(f < 0.0f) f = 0.0f; if(f > 2.0f) f = 2.0f; x->x_beta = f; } static void NLMSerr_in_tilde_gamma(t_NLMSerr_in_tilde *x, t_floatarg f) // regularization factor (dither) { if(f < 0.0f) f = 0.0f; if(f > 1.0f) f = 1.0f; x->x_gamma = f; } static void NLMSerr_in_tilde_update(t_NLMSerr_in_tilde *x, t_floatarg f) // downsample learn-rate { t_int i=1, u = (t_int)f; if(u != 0) u = 1; x->x_update = u; } /* ============== DSP ======================= */ static t_int *NLMSerr_in_tilde_perform_zero(t_int *w) { t_NLMSerr_in_tilde *x = (t_NLMSerr_in_tilde *)(w[5]); t_int n = (t_int)(w[6]); t_float *filt_out = (t_float *)(w[4]); t_int i; for(i=0; ix_n_order; /* number of filter-order */ t_int rw_index = x->x_rw_index; /* current read write index in circular buffer */ t_int update = x->x_update; t_float beta = x->x_beta; /* learn rate */ t_float gammax = x->x_gamma; /* minimum energy */ t_float my, my_err, sum, errin; t_int i, j, k; if(!x->x_w_array_mem_beg) goto NLMSerr_in_tildeperfzero;// this is quick&dirty Musil/Miller style for(i=0; ix_ref_filt_in_hist[rw_index] = ref_filt_in[i]; // inputs of ref_filt save to history x->x_ref_adapt_in_hist[rw_index] = ref_adapt_in[i]; // inputs of ref_adapt save to history errin = err_in[i]; // begin convolution, filter : j++, k--, rw_index = aktueller index fuer lesen schreiben von history und convolution-beginn sum = 0.0f; k = rw_index; for(j=0; jx_w_array_mem_beg[j] * x->x_ref_filt_in_hist[k]; k--; if(k < 0) k = n_order - 1; } filt_out[i] = sum; if(update) // downsampling for learn rate { sum = 0.0f;// calculate energy for last n-order samples in filter k = rw_index; for(j=0; jx_ref_adapt_in_hist[k] * x->x_ref_adapt_in_hist[k]; // energie k--; if(k < 0) k = n_order - 1; } sum += gammax * gammax * (float)n_order; // convert gammax corresponding to filter order my = beta / sum;// calculate mue my_err = my * errin; k = rw_index; for(j=0; jx_w_array_mem_beg[j] += x->x_ref_adapt_in_hist[k] * my_err; k--; if(k < 0) k = n_order - 1; } } rw_index++; if(rw_index >= n_order) rw_index = 0; } x->x_rw_index = rw_index; // back to start return(w+7); NLMSerr_in_tildeperfzero: while(n--) { *filt_out++ = 0.0f; } return(w+7); } static void NLMSerr_in_tilde_dsp(t_NLMSerr_in_tilde *x, t_signal **sp) { x->x_w_array_mem_beg = NLMSerr_in_tilde_check_array(x->x_w_array_sym_name, x->x_n_order); if(!x->x_w_array_mem_beg) dsp_add(NLMSerr_in_tilde_perform_zero, 6, sp[0]->s_vec, sp[1]->s_vec, sp[2]->s_vec, sp[3]->s_vec, x, sp[0]->s_n); else dsp_add(NLMSerr_in_tilde_perform, 6, sp[0]->s_vec, sp[1]->s_vec, sp[2]->s_vec, sp[3]->s_vec, x, sp[0]->s_n); } /* setup/setdown things */ static void NLMSerr_in_tilde_free(t_NLMSerr_in_tilde *x) { freebytes(x->x_ref_filt_in_hist, x->x_n_order*sizeof(t_float)); freebytes(x->x_ref_adapt_in_hist, x->x_n_order*sizeof(t_float)); } static void *NLMSerr_in_tilde_new(t_symbol *s, t_int argc, t_atom *argv) { t_NLMSerr_in_tilde *x = (t_NLMSerr_in_tilde *)pd_new(NLMSerr_in_tilde_class); t_int i, n_order=39; t_symbol *w_name; t_float beta=0.01f; t_float gammax=0.00001f; if((argc >= 4) && IS_A_FLOAT(argv,0) && //IS_A_FLOAT/SYMBOL from iemlib.h IS_A_FLOAT(argv,1) && IS_A_FLOAT(argv,2) && IS_A_SYMBOL(argv,3)) { n_order = (t_int)atom_getintarg(0, argc, argv); beta = (t_float)atom_getfloatarg(1, argc, argv); gammax = (t_float)atom_getfloatarg(2, argc, argv); w_name = (t_symbol *)atom_getsymbolarg(3, argc, argv); if(beta < 0.0f) beta = 0.0f; if(beta > 2.0f) beta = 2.0f; if(gammax < 0.0f) gammax = 0.0f; if(gammax > 1.0f) gammax = 1.0f; if(n_order < 2) n_order = 2; if(n_order > 1111111) n_order = 1111111; inlet_new(&x->x_obj, &x->x_obj.ob_pd, &s_signal, &s_signal); inlet_new(&x->x_obj, &x->x_obj.ob_pd, &s_signal, &s_signal); outlet_new(&x->x_obj, &s_signal); x->x_flt_sig_in1 = 0; x->x_n_order = n_order; x->x_update = 0; x->x_beta = beta; x->x_gamma = gammax; // 2 times in and one time err_in memory allocation (history) x->x_ref_filt_in_hist = (t_float *)getbytes(x->x_n_order*sizeof(t_float)); x->x_ref_adapt_in_hist = (t_float *)getbytes(x->x_n_order*sizeof(t_float)); // table-symbols will be linked to their memory in future (dsp_routine) x->x_w_array_sym_name = gensym(w_name->s_name); x->x_w_array_mem_beg = (t_float *)0; x->x_rw_index = 0; return(x); } else { post("NLMSerr_in~-ERROR: need 3 float- + 1 symbol-arguments:"); post(" order_of_filter + learnrate_beta + security_value + array_name_taps"); return(0); } } void NLMSerr_in_tilde_setup(void) { NLMSerr_in_tilde_class = class_new(gensym("NLMSerr_in~"), (t_newmethod)NLMSerr_in_tilde_new, (t_method)NLMSerr_in_tilde_free, sizeof(t_NLMSerr_in_tilde), 0, A_GIMME, 0); CLASS_MAINSIGNALIN(NLMSerr_in_tilde_class, t_NLMSerr_in_tilde, x_flt_sig_in1); class_addmethod(NLMSerr_in_tilde_class, (t_method)NLMSerr_in_tilde_dsp, gensym("dsp"), A_CANT, 0); class_addmethod(NLMSerr_in_tilde_class, (t_method)NLMSerr_in_tilde_update, gensym("update"), A_FLOAT, 0); // method: downsampling factor of learning (multiple of 2^N) class_addmethod(NLMSerr_in_tilde_class, (t_method)NLMSerr_in_tilde_beta, gensym("beta"), A_FLOAT, 0); //method: normalized learning rate class_addmethod(NLMSerr_in_tilde_class, (t_method)NLMSerr_in_tilde_gamma, gensym("gamma"), A_FLOAT, 0); // method: dithering noise related to signal } iem_utils-v0.0.20181004/iem_adaptfilt/src/iem_adaptfilt.vcxproj0000644000175000017500000000613113303322327024470 0ustar zmoelnigzmoelnig Debug Win32 Release Win32 MakeFileProj {4E46116D-6873-4B74-AF38-4D6863F9F2D8} Makefile v110 Makefile v110 .\Debug\ .\Debug\ NMAKE /f makefile_vc12proj NMAKE /f makefile_vc12proj /a iem_adaptfilt.exe .\Release\ .\Release\ NMAKE /f makefile_vc12proj NMAKE /f makefile_vc12proj /a iem_adaptfilt.exe iem_utils-v0.0.20181004/iem_adaptfilt/src/NLMS~.c0000644000175000017500000002472413303611535021376 0ustar zmoelnigzmoelnig/* For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. NLMS normalized least mean square (LMS) algorithm lib iem_adaptfilt written by Markus Noisternig & Thomas Musil noisternig_AT_iem.at; musil_AT_iem.at (c) Institute of Electronic Music and Acoustics, Graz Austria 2005 */ #include "m_pd.h" #include "iemlib.h" #include #include #include /* ----------------------- NLMS~ ------------------------------ */ /* -- Normalized Least Mean Square (linear adaptive FIR-filter) -- */ /* -- first input: reference signal -- */ /* -- second input: desired signal -- */ /* -- -- */ /* for further information on adaptive filter design we refer to */ /* [1] Haykin, "Adaptive Filter Theory", 4th ed, Prentice Hall */ /* [2] Benesty, "Adaptive Signal Processing", Springer */ typedef struct NLMS_tilde { t_object x_obj; t_symbol *x_w_array_sym_name; t_float *x_w_array_mem_beg; t_float *x_io_ptr_beg[4];// memory: 2 sig-in and 2 sig-out vectors t_float *x_in_hist;// start point double buffer for sig-in history t_int x_rw_index;// read-write-index t_int x_n_order;// order of filter t_int x_update;// 2^n rounded value, downsampling of update speed t_float x_beta;// learn rate [0 .. 2] t_float x_gamma;// regularization t_float x_msi; } t_NLMS_tilde; t_class *NLMS_tilde_class; static t_float *NLMS_tilde_check_array(t_symbol *array_sym_name, t_int length) { int n_points; t_garray *a; t_float *vec; if(!(a = (t_garray *)pd_findbyclass(array_sym_name, garray_class))) { error("%s: no such array for NLMS~", array_sym_name->s_name); return((t_float *)0); } else if(!garray_getfloatarray(a, &n_points, &vec)) { error("%s: bad template for NLMS~", array_sym_name->s_name); return((t_float *)0); } else if(n_points < length) { error("%s: bad array-size for NLMS~: %d", array_sym_name->s_name, n_points); return((t_float *)0); } else { return(vec); } } static void NLMS_tilde_beta(t_NLMS_tilde *x, t_floatarg f) // learn rate { if(f < 0.0f) f = 0.0f; if(f > 2.0f) f = 2.0f; x->x_beta = f; } static void NLMS_tilde_gamma(t_NLMS_tilde *x, t_floatarg f) // regularization factor (dither) { if(f < 0.0f) f = 0.0f; if(f > 1.0f) f = 1.0f; x->x_gamma = f; } static void NLMS_tilde_update(t_NLMS_tilde *x, t_floatarg f) // downsample learn-rate { t_int i=1, u = (t_int)f; if(u < 0) u = 0; else { while(i <= u) // convert u for 2^N i *= 2; // round downwards i /= 2; u = i; } x->x_update = u; } /* ============== DSP ======================= */ static t_int *NLMS_tilde_perform_zero(t_int *w) { t_NLMS_tilde *x = (t_NLMS_tilde *)(w[1]); t_int n = (t_int)(w[2]); t_float **io = x->x_io_ptr_beg; t_float *out; t_int i, j; for(j=0; j<2; j++)/* output-vector-row */ { out = io[j+2]; for(i=0; ix_n_order; /* number of filter-order */ t_int rw_index = x->x_rw_index; t_float *in = x->x_io_ptr_beg[0];// first sig in t_float *desired_in = x->x_io_ptr_beg[1], din;// second sig in t_float *filt_out = x->x_io_ptr_beg[2];// first sig out t_float *err_out = x->x_io_ptr_beg[3], eout;// second sig out t_float *write_in_hist1 = x->x_in_hist; t_float *write_in_hist2 = write_in_hist1+n_order; t_float *read_in_hist = write_in_hist2; t_float *w_filt_coeff = x->x_w_array_mem_beg; t_float my, my_err, sum; t_float beta = x->x_beta; t_float gammax = x->x_gamma; t_int i, j, update_counter; t_int update = x->x_update; t_int ord8=n_order&0xfffffff8; t_int ord_residual=n_order&0x7; if(!w_filt_coeff) goto NLMS_tildeperfzero;// this is quick&dirty Musil/Miller style for(i=0, update_counter=0; ix_w_array_mem_beg; // Musil's special convolution buffer struct read_in_hist = &write_in_hist2[rw_index]; for(j=0; j= update) { update_counter = 0; sum = 0.0f;// calculate energy for last n-order samples in filter read_in_hist = &write_in_hist2[rw_index]; for(j=0; jx_w_array_mem_beg; // coefficient constraints read_in_hist = &write_in_hist2[rw_index]; for(j=0; j= n_order) rw_index -= n_order; } x->x_rw_index = rw_index; // back to start return(w+3); NLMS_tildeperfzero: while(n--) { *filt_out++ = 0.0f; *err_out++ = 0.0f; } return(w+3); } static void NLMS_tilde_dsp(t_NLMS_tilde *x, t_signal **sp) { t_int i, n = sp[0]->s_n; for(i=0; i<4; i++) // store io_vec x->x_io_ptr_beg[i] = sp[i]->s_vec; x->x_w_array_mem_beg = NLMS_tilde_check_array(x->x_w_array_sym_name, x->x_n_order); if(!x->x_w_array_mem_beg) dsp_add(NLMS_tilde_perform_zero, 2, x, n); else dsp_add(NLMS_tilde_perform, 2, x, n); } /* setup/setdown things */ static void NLMS_tilde_free(t_NLMS_tilde *x) { freebytes(x->x_in_hist, 2*x->x_n_order*sizeof(t_float)); } static void *NLMS_tilde_new(t_symbol *s, t_int argc, t_atom *argv) { t_NLMS_tilde *x = (t_NLMS_tilde *)pd_new(NLMS_tilde_class); t_int i, n_order=39; t_symbol *w_name; t_float beta=0.1f; t_float gammax=0.00001f; if((argc >= 4) && IS_A_FLOAT(argv,0) && //IS_A_FLOAT/SYMBOL from iemlib.h IS_A_FLOAT(argv,1) && IS_A_FLOAT(argv,2) && IS_A_SYMBOL(argv,3)) { n_order = (t_int)atom_getintarg(0, argc, argv); beta = (t_float)atom_getfloatarg(1, argc, argv); gammax = (t_float)atom_getfloatarg(2, argc, argv); w_name = (t_symbol *)atom_getsymbolarg(3, argc, argv); if(beta < 0.0f) beta = 0.0f; if(beta > 2.0f) beta = 2.0f; if(gammax < 0.0f) gammax = 0.0f; if(gammax > 1.0f) gammax = 1.0f; if(n_order < 2) n_order = 2; if(n_order > 11111) n_order = 11111; inlet_new(&x->x_obj, &x->x_obj.ob_pd, &s_signal, &s_signal); outlet_new(&x->x_obj, &s_signal); outlet_new(&x->x_obj, &s_signal); x->x_msi = 0; x->x_n_order = n_order; x->x_update = 0; x->x_beta = beta; x->x_gamma = gammax; // 2 times in and one time desired_in memory allocation (history) x->x_in_hist = (t_float *)getbytes(2*x->x_n_order*sizeof(t_float)); // table-symbols will be linked to their memory in future (dsp_routine) x->x_w_array_sym_name = gensym(w_name->s_name); x->x_w_array_mem_beg = (t_float *)0; return(x); } else { post("NLMS~-ERROR: need 3 float- + 1 symbol-arguments:"); post(" order_of_filter + learnrate_beta + security_value + array_name_taps"); return(0); } } void NLMS_tilde_setup(void) { NLMS_tilde_class = class_new(gensym("NLMS~"), (t_newmethod)NLMS_tilde_new, (t_method)NLMS_tilde_free, sizeof(t_NLMS_tilde), 0, A_GIMME, 0); CLASS_MAINSIGNALIN(NLMS_tilde_class, t_NLMS_tilde, x_msi); class_addmethod(NLMS_tilde_class, (t_method)NLMS_tilde_dsp, gensym("dsp"), A_CANT, 0); class_addmethod(NLMS_tilde_class, (t_method)NLMS_tilde_update, gensym("update"), A_FLOAT, 0); // method: downsampling factor of learning (multiple of 2^N) class_addmethod(NLMS_tilde_class, (t_method)NLMS_tilde_beta, gensym("beta"), A_FLOAT, 0); //method: normalized learning rate class_addmethod(NLMS_tilde_class, (t_method)NLMS_tilde_gamma, gensym("gamma"), A_FLOAT, 0); // method: dithering noise related to signal //class_sethelpsymbol(NLMS_tilde_class, gensym("iemhelp2/NLMS~")); } iem_utils-v0.0.20181004/iem_adaptfilt/src/FXNLMSplus3in~.c0000644000175000017500000002370613303611535023151 0ustar zmoelnigzmoelnig/* For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. NLMS normalized least mean square (LMS) algorithm lib iem_adaptfilt written by Markus Noisternig & Thomas Musil noisternig_AT_iem.at; musil_AT_iem.at (c) Institute of Electronic Music and Acoustics, Graz Austria 2005 */ #include "m_pd.h" #include "iemlib.h" #include #include #include /* ----------------------- FXNLMSplus3in~ ------------------------------ */ /* -- Normalized Least Mean Square (linear adaptive FIR-filter) -- */ /* -- first input: reference signal -- */ /* -- second input: desired signal -- */ /* -- the difference to NLMS~ is: we have only one ERROR input instead of desired in minus filter out -- */ /* -- that means there is no feedback -- */ /* for further information on adaptive filter design we refer to */ /* [1] Haykin, "Adaptive Filter Theory", 4th ed, Prentice Hall */ /* [2] Benesty, "Adaptive Signal Processing", Springer */ typedef struct FXNLMSplus3in_tilde { t_object x_obj;// common pd object structure t_symbol *x_w_array_sym_name; t_float *x_w_array_mem_beg; t_float *x_ref_filt_in_hist;// history buffer for input signal reference for internal convolution = filter t_float *x_ref_adapt_in_hist;// history buffer for input signal reference for internal adapting filter t_int x_rw_index;// current read-write-index in circular buffer t_int x_n_order;// order of filter or convolution t_int x_update;// binary update parameter ON / OFF t_float x_alpha;// leakage Parameter = decrease factor of w_array t_float x_beta;// learn rate [0 .. 2] t_float x_gamma;// regularization Parameter = minimum t_float x_flt_sig_in1; } t_FXNLMSplus3in_tilde; t_class *FXNLMSplus3in_tilde_class; static t_float *FXNLMSplus3in_tilde_check_array(t_symbol *array_sym_name, t_int length) { int n_points; t_garray *a; t_float *vec; if(!(a = (t_garray *)pd_findbyclass(array_sym_name, garray_class))) { error("%s: no such array for FXNLMSplus3in~", array_sym_name->s_name); return((t_float *)0); } else if(!garray_getfloatarray(a, &n_points, &vec)) { error("%s: bad template for FXNLMSplus3in~", array_sym_name->s_name); return((t_float *)0); } else if(n_points < length) { error("%s: bad array-size for FXNLMSplus3in~: %d", array_sym_name->s_name, n_points); return((t_float *)0); } else { return(vec); } } static void FXNLMSplus3in_tilde_alpha(t_FXNLMSplus3in_tilde *x, t_floatarg f) // leakage { if(f < 0.0f) f = 0.0f; if(f > 1.0f) f = 1.0f; x->x_alpha = f; } static void FXNLMSplus3in_tilde_beta(t_FXNLMSplus3in_tilde *x, t_floatarg f) // learn rate { if(f < 0.0f) f = 0.0f; if(f > 2000.0f) f = 2000.0f; x->x_beta = f; } static void FXNLMSplus3in_tilde_gamma(t_FXNLMSplus3in_tilde *x, t_floatarg f) // regularization factor (dither) { if(f < 0.0f) f = 0.0f; if(f > 1.0f) f = 1.0f; x->x_gamma = f; } static void FXNLMSplus3in_tilde_update(t_FXNLMSplus3in_tilde *x, t_floatarg f) // downsample learn-rate { t_int u = (t_int)f; if((u > 2) || (u < 0)) // u==0...no update, u==1...normal update, u==2...wrong update u = 0; x->x_update = u; } /* ============== DSP ======================= */ static t_int *FXNLMSplus3in_tilde_perform_zero(t_int *w) { t_FXNLMSplus3in_tilde *x = (t_FXNLMSplus3in_tilde *)(w[5]); t_int n = (t_int)(w[6]); t_float *filt_out = (t_float *)(w[4]); t_int i; for(i=0; ix_n_order; /* number of filter-order */ t_int rw_index = x->x_rw_index; /* current read write index in circular buffer */ t_int update = x->x_update; t_float alpha = x->x_alpha; /* leakage */ t_float beta = x->x_beta; /* learn rate */ t_float gammax = x->x_gamma; /* minimum energy */ t_float my, my_err, sum, errin; t_int i, j, k; if(!x->x_w_array_mem_beg) goto FXNLMSplus3in_tildeperfzero;// this is quick&dirty Musil/Miller style for(i=0; ix_ref_filt_in_hist[rw_index] = ref_filt_in[i]; // inputs of ref_filt save to history x->x_ref_adapt_in_hist[rw_index] = ref_adapt_in[i]; // inputs of ref_adapt save to history errin = err_in[i]; // begin convolution, filter : j++, k--, rw_index = aktueller index fuer lesen schreiben von history und convolution-beginn sum = 0.0f; k = rw_index; for(j=0; jx_w_array_mem_beg[j] * x->x_ref_filt_in_hist[k]; k--; if(k < 0) k = n_order - 1; } filt_out[i] = sum; if(update) // downsampling for learn rate { sum = ref_pow_in[i]; sum += gammax * gammax * (float)n_order; // convert gammax corresponding to filter order my = beta / sum;// calculate mue my_err = my * errin; k = rw_index; for(j=0; jx_w_array_mem_beg[j] *= alpha; // leakage x->x_w_array_mem_beg[j] += x->x_ref_adapt_in_hist[k] * my_err; k--; if(k < 0) k = n_order - 1; } } rw_index++; if(rw_index >= n_order) rw_index = 0; } x->x_rw_index = rw_index; // back to start return(w+8); FXNLMSplus3in_tildeperfzero: while(n--) { *filt_out++ = 0.0f; } return(w+8); } static void FXNLMSplus3in_tilde_dsp(t_FXNLMSplus3in_tilde *x, t_signal **sp) { x->x_w_array_mem_beg = FXNLMSplus3in_tilde_check_array(x->x_w_array_sym_name, x->x_n_order); if(!x->x_w_array_mem_beg) dsp_add(FXNLMSplus3in_tilde_perform_zero, 7, sp[0]->s_vec, sp[1]->s_vec, sp[2]->s_vec, sp[3]->s_vec, sp[4]->s_vec, x, sp[0]->s_n); else dsp_add(FXNLMSplus3in_tilde_perform, 7, sp[0]->s_vec, sp[1]->s_vec, sp[2]->s_vec, sp[3]->s_vec, sp[4]->s_vec, x, sp[0]->s_n); } /* setup/setdown things */ static void FXNLMSplus3in_tilde_free(t_FXNLMSplus3in_tilde *x) { freebytes(x->x_ref_filt_in_hist, x->x_n_order*sizeof(t_float)); freebytes(x->x_ref_adapt_in_hist, x->x_n_order*sizeof(t_float)); } static void *FXNLMSplus3in_tilde_new(t_symbol *s, t_int argc, t_atom *argv) { t_FXNLMSplus3in_tilde *x = (t_FXNLMSplus3in_tilde *)pd_new(FXNLMSplus3in_tilde_class); t_int i, n_order=39; t_symbol *w_name; t_float alpha=0.999f; t_float beta=0.01f; t_float gammax=0.00001f; if((argc >= 5) && IS_A_FLOAT(argv,0) && //IS_A_FLOAT/SYMBOL from iemlib.h IS_A_FLOAT(argv,1) && IS_A_FLOAT(argv,2) && IS_A_FLOAT(argv,3) && IS_A_SYMBOL(argv,4)) { n_order = (t_int)atom_getintarg(0, argc, argv); alpha = (t_float)atom_getfloatarg(1, argc, argv); beta = (t_float)atom_getfloatarg(2, argc, argv); gammax = (t_float)atom_getfloatarg(3, argc, argv); w_name = (t_symbol *)atom_getsymbolarg(4, argc, argv); if(alpha < 0.0f) alpha = 0.0f; if(alpha > 1.0f) alpha = 1.0f; if(beta < 0.0f) beta = 0.0f; if(beta > 2000.0f) beta = 2000.0f; if(gammax < 0.0f) gammax = 0.0f; if(gammax > 1.0f) gammax = 1.0f; if(n_order < 2) n_order = 2; if(n_order > 1111111) n_order = 1111111; inlet_new(&x->x_obj, &x->x_obj.ob_pd, &s_signal, &s_signal); inlet_new(&x->x_obj, &x->x_obj.ob_pd, &s_signal, &s_signal); inlet_new(&x->x_obj, &x->x_obj.ob_pd, &s_signal, &s_signal); outlet_new(&x->x_obj, &s_signal); x->x_flt_sig_in1 = 0; x->x_n_order = n_order; x->x_update = 0; x->x_alpha = alpha; x->x_beta = beta; x->x_gamma = gammax; // 2 times in and one time err_in memory allocation (history) x->x_ref_filt_in_hist = (t_float *)getbytes(x->x_n_order*sizeof(t_float)); x->x_ref_adapt_in_hist = (t_float *)getbytes(x->x_n_order*sizeof(t_float)); // table-symbols will be linked to their memory in future (dsp_routine) x->x_w_array_sym_name = gensym(w_name->s_name); x->x_w_array_mem_beg = (t_float *)0; x->x_rw_index = 0; return(x); } else { post("FXNLMSplus3in~-ERROR: need 4 float- + 1 symbol-arguments:"); post(" order_of_filter + leakage + learnrate + security_value + array_name_taps"); return(0); } } void FXNLMSplus3in_tilde_setup(void) { FXNLMSplus3in_tilde_class = class_new(gensym("FXNLMSplus3in~"), (t_newmethod)FXNLMSplus3in_tilde_new, (t_method)FXNLMSplus3in_tilde_free, sizeof(t_FXNLMSplus3in_tilde), 0, A_GIMME, 0); CLASS_MAINSIGNALIN(FXNLMSplus3in_tilde_class, t_FXNLMSplus3in_tilde, x_flt_sig_in1); class_addmethod(FXNLMSplus3in_tilde_class, (t_method)FXNLMSplus3in_tilde_dsp, gensym("dsp"), A_CANT, 0); class_addmethod(FXNLMSplus3in_tilde_class, (t_method)FXNLMSplus3in_tilde_update, gensym("update"), A_FLOAT, 0); // method: downsampling factor of learning (multiple of 2^N) class_addmethod(FXNLMSplus3in_tilde_class, (t_method)FXNLMSplus3in_tilde_alpha, gensym("alpha"), A_FLOAT, 0); //method: decrease of w_array class_addmethod(FXNLMSplus3in_tilde_class, (t_method)FXNLMSplus3in_tilde_beta, gensym("beta"), A_FLOAT, 0); //method: normalized learning rate class_addmethod(FXNLMSplus3in_tilde_class, (t_method)FXNLMSplus3in_tilde_gamma, gensym("gamma"), A_FLOAT, 0); // method: dithering noise related to signal } iem_utils-v0.0.20181004/iem_adaptfilt/src/makefile_win0000644000175000017500000000205412630366344022637 0ustar zmoelnigzmoelnig all: ..\iem_adaptfilt.dll VIS_CPP_PATH = "C:\Programme\Microsoft Visual Studio\Vc98" PD_INST_PATH = "C:\Programme\pd" PD_WIN_INCLUDE_PATH = /I. /I$(PD_INST_PATH)\src /I$(VIS_CPP_PATH)\include PD_WIN_C_FLAGS = /nologo /W3 /WX /DMSW /DNT /DPD /DWIN32 /DWINDOWS /Ox -DPA_LITTLE_ENDIAN PD_WIN_L_FLAGS = /nologo PD_WIN_LIB = /NODEFAULTLIB:libc /NODEFAULTLIB:oldnames /NODEFAULTLIB:kernel /NODEFAULTLIB:uuid \ $(VIS_CPP_PATH)\lib\libc.lib \ $(VIS_CPP_PATH)\lib\oldnames.lib \ $(VIS_CPP_PATH)\lib\kernel32.lib \ $(VIS_CPP_PATH)\lib\wsock32.lib \ $(VIS_CPP_PATH)\lib\winmm.lib \ $(PD_INST_PATH)\bin\pthreadVC.lib \ $(PD_INST_PATH)\bin\pd.lib SRC = NLMS~.c \ NLMSerr_in~.c \ NLMSCC~.c \ n_CNLMS~.c \ n_CLNLMS~.c \ iem_adaptfilt.c OBJ = $(SRC:.c=.obj) .c.obj: cl $(PD_WIN_C_FLAGS) $(PD_WIN_INCLUDE_PATH) /c $*.c ..\iem_adaptfilt.dll: $(OBJ) link $(PD_WIN_L_FLAGS) /dll /export:iem_adaptfilt_setup \ /out:..\iem_adaptfilt.dll $(OBJ) $(PD_WIN_LIB) clean: del *.obj iem_utils-v0.0.20181004/iem_adaptfilt/src/iem_adaptfilt.dsp0000644000175000017500000000517013303322327023565 0ustar zmoelnigzmoelnig# Microsoft Developer Studio Project File - Name="iem_adaptfilt" - Package Owner=<4> # Microsoft Developer Studio Generated Build File, Format Version 6.00 # ** NICHT BEARBEITEN ** # TARGTYPE "Win32 (x86) External Target" 0x0106 CFG=iem_adaptfilt - Win32 Debug !MESSAGE Dies ist kein gltiges Makefile. Zum Erstellen dieses Projekts mit NMAKE !MESSAGE verwenden Sie den Befehl "Makefile exportieren" und fhren Sie den Befehl !MESSAGE !MESSAGE NMAKE /f "iem_adaptfilt.mak". !MESSAGE !MESSAGE Sie knnen beim Ausfhren von NMAKE eine Konfiguration angeben !MESSAGE durch Definieren des Makros CFG in der Befehlszeile. Zum Beispiel: !MESSAGE !MESSAGE NMAKE /f "iem_adaptfilt.mak" CFG="iem_adaptfilt - Win32 Debug" !MESSAGE !MESSAGE Fr die Konfiguration stehen zur Auswahl: !MESSAGE !MESSAGE "iem_adaptfilt - Win32 Release" (basierend auf "Win32 (x86) External Target") !MESSAGE "iem_adaptfilt - Win32 Debug" (basierend auf "Win32 (x86) External Target") !MESSAGE # Begin Project # PROP AllowPerConfigDependencies 0 # PROP Scc_ProjName "" # PROP Scc_LocalPath "" !IF "$(CFG)" == "iem_adaptfilt - Win32 Release" # PROP BASE Use_Debug_Libraries 0 # PROP BASE Output_Dir "Release" # PROP BASE Intermediate_Dir "Release" # PROP BASE Cmd_Line "NMAKE /f makefile_vc12proj" # PROP BASE Rebuild_Opt "/a" # PROP BASE Target_File "makefile_vc12proj.exe" # PROP BASE Bsc_Name "makefile_vc12proj.bsc" # PROP BASE Target_Dir "" # PROP Use_Debug_Libraries 0 # PROP Output_Dir "Release" # PROP Intermediate_Dir "Release" # PROP Cmd_Line "NMAKE /f makefile_vc12proj" # PROP Rebuild_Opt "/a" # PROP Target_File "iem_adaptfilt.exe" # PROP Bsc_Name "iem_adaptfilt.bsc" # PROP Target_Dir "" !ELSEIF "$(CFG)" == "iem_adaptfilt - Win32 Debug" # PROP BASE Use_Debug_Libraries 1 # PROP BASE Output_Dir "Debug" # PROP BASE Intermediate_Dir "Debug" # PROP BASE Cmd_Line "NMAKE /f makefile_vc12proj" # PROP BASE Rebuild_Opt "/a" # PROP BASE Target_File "makefile_vc12proj.exe" # PROP BASE Bsc_Name "makefile_vc12proj.bsc" # PROP BASE Target_Dir "" # PROP Use_Debug_Libraries 1 # PROP Output_Dir "Debug" # PROP Intermediate_Dir "Debug" # PROP Cmd_Line "NMAKE /f makefile_vc12proj" # PROP Rebuild_Opt "/a" # PROP Target_File "iem_adaptfilt.exe" # PROP Bsc_Name "iem_adaptfilt.bsc" # PROP Target_Dir "" !ENDIF # Begin Target # Name "iem_adaptfilt - Win32 Release" # Name "iem_adaptfilt - Win32 Debug" !IF "$(CFG)" == "iem_adaptfilt - Win32 Release" !ELSEIF "$(CFG)" == "iem_adaptfilt - Win32 Debug" !ENDIF # Begin Source File SOURCE=.\makefile_vc12proj # End Source File # End Target # End Project iem_utils-v0.0.20181004/iem_adaptfilt/src/n_CNLMS~.c0000644000175000017500000003474713303611535022024 0ustar zmoelnigzmoelnig/* For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. n_CNLMS multichannel-constrained (non leaky) normalized LMS algorithm lib iem_adaptfilt written by Markus Noisternig & Thomas Musil noisternig_AT_iem.at; musil_AT_iem.at (c) Institute of Electronic Music and Acoustics, Graz Austria 2005 */ #ifdef NT #pragma warning( disable : 4244 ) #pragma warning( disable : 4305 ) #endif #include "m_pd.h" #include "iemlib.h" #include #include #include /* ----------------------- n_CNLMS~ ------------------------------ */ /* -- multi-channel Constraint Normalized Least Mean Square (linear adaptive FIR-filter) -- */ /* -- first input: reference signal -- */ /* -- second input: desired signal -- */ /* -- -- */ /* for further information on adaptive filter design we refer to */ /* [1] Haykin, "Adaptive Filter Theory", 4th ed, Prentice Hall */ /* [2] Benesty, "Adaptive Signal Processing", Springer */ typedef struct n_CNLMS_tilde_kern { t_symbol *x_w_array_sym_name; t_float *x_w_array_mem_beg; t_float *x_in_ptr_beg;// memory: sig-in vector t_float *x_out_ptr_beg;// memory: sig-out vector t_float *x_in_hist;// start point double buffer for sig-in history } t_n_CNLMS_tilde_kern; typedef struct n_CNLMS_tilde { t_object x_obj; t_n_CNLMS_tilde_kern *x_my_kern; t_float *x_des_in_ptr_beg;// memory: desired-in vector t_float *x_err_out_ptr_beg;// memory: error-out vector t_int x_n_io;// number of in-channels and filtered out-channels t_int x_rw_index;// read-write-index t_int x_n_order;// filter order t_int x_update;// rounded by 2^n, yields downsampling of update rate t_float x_beta;// learn rate [0 .. 2] t_float x_gamma;// normalization t_float x_kappa;// constraint: threshold of energy (clipping) t_outlet *x_out_compressing_bang; t_clock *x_clock; t_float x_msi; } t_n_CNLMS_tilde; t_class *n_CNLMS_tilde_class; static void n_CNLMS_tilde_tick(t_n_CNLMS_tilde *x) { outlet_bang(x->x_out_compressing_bang); } static t_float *n_CNLMS_tilde_check_array(t_symbol *array_sym_name, t_int length) { int n_points; t_garray *a; t_float *vec; if(!(a = (t_garray *)pd_findbyclass(array_sym_name, garray_class))) { error("%s: no such array for n_CNLMS~", array_sym_name->s_name); return((t_float *)0); } else if(!garray_getfloatarray(a, &n_points, &vec)) { error("%s: bad template for n_CNLMS~", array_sym_name->s_name); return((t_float *)0); } else if(n_points < length) { error("%s: bad array-size for n_CNLMS~: %d", array_sym_name->s_name, n_points); return((t_float *)0); } else { return(vec); } } static void n_CNLMS_tilde_beta(t_n_CNLMS_tilde *x, t_floatarg f) // learn rate { if(f < 0.0f) f = 0.0f; if(f > 2.0f) f = 2.0f; x->x_beta = f; } static void n_CNLMS_tilde_gamma(t_n_CNLMS_tilde *x, t_floatarg f) // regularization (dither) { if(f < 0.0f) f = 0.0f; if(f > 1.0f) f = 1.0f; x->x_gamma = f; } static void n_CNLMS_tilde_kappa(t_n_CNLMS_tilde *x, t_floatarg f) // threshold for w_coeff { if(f < 0.0001f) f = 0.0001f; if(f > 10000.0f) f = 10000.0f; x->x_kappa = f; } static void n_CNLMS_tilde_update(t_n_CNLMS_tilde *x, t_floatarg f) // downsampling of learn rate { t_int i=1, u = (t_int)f; if(u < 0) u = 0; else { while(i <= u) // convert u for 2^N i *= 2; // round downward i /= 2; u = i; } x->x_update = u; } /* ============== DSP ======================= */ static t_int *n_CNLMS_tilde_perform_zero(t_int *w) { t_n_CNLMS_tilde *x = (t_n_CNLMS_tilde *)(w[1]); t_int n = (t_int)(w[2]); t_int n_io = x->x_n_io; t_float *out; t_int i, j; out = x->x_err_out_ptr_beg; for(i=0; ix_my_kern[j].x_out_ptr_beg; for(i=0; ix_n_order; /* filter-order */ t_int rw_index2, rw_index = x->x_rw_index; t_int n_io = x->x_n_io; t_float *in;// first sig in t_float din;// second sig in t_float *filt_out;// first sig out t_float *err_out, err_sum;// second sig out t_float *read_in_hist; t_float *w_filt_coeff; t_float my, my_err, sum; t_float beta = x->x_beta; t_float hgamma, gammax = x->x_gamma; t_float hkappa, kappa = x->x_kappa; t_int i, j, k, update_counter; t_int update = x->x_update; t_int ord8=n_order&0xfffffff8; t_int ord_residual=n_order&0x7; t_int compressed = 0; for(k=0; kx_my_kern[k].x_w_array_mem_beg) goto n_CNLMS_tildeperfzero;// this is Musil/Miller style } hgamma = gammax * gammax * (float)n_order; //hkappa = kappa * kappa * (float)n_order; hkappa = kappa;// kappa regards to energy value, else use line above for(i=0, update_counter=0; ix_my_kern[k].x_in_hist[rw_index] = x->x_my_kern[k].x_in_ptr_beg[i]; // save inputs into variabel & history x->x_my_kern[k].x_in_hist[rw_index+n_order] = x->x_my_kern[k].x_in_ptr_beg[i]; } din = x->x_des_in_ptr_beg[i]; // begin convolution err_sum = din; for(k=0; kx_my_kern[k].x_w_array_mem_beg; // Musil's special convolution buffer struct read_in_hist = &x->x_my_kern[k].x_in_hist[rw_index2]; for(j=0; jx_my_kern[k].x_out_ptr_beg[i] = sum; err_sum -= sum; } x->x_err_out_ptr_beg[i] = err_sum; // end convolution if(update) // downsampling of learn rate { update_counter++; if(update_counter >= update) { update_counter = 0; for(k=0; kx_my_kern[k].x_in_hist[rw_index2]; for(j=0; jx_my_kern[k].x_w_array_mem_beg; read_in_hist = &x->x_my_kern[k].x_in_hist[rw_index2]; sum = 0.0f; for(j=0; j hkappa) { compressed = 1; my = sqrt(hkappa/sum); w_filt_coeff = x->x_my_kern[k].x_w_array_mem_beg; for(j=0; j= n_order) rw_index -= n_order; } x->x_rw_index = rw_index; // back to start if(compressed) clock_delay(x->x_clock, 0); return(w+3); n_CNLMS_tildeperfzero: err_out = x->x_err_out_ptr_beg; for(i=0; ix_my_kern[j].x_out_ptr_beg; for(i=0; is_n; t_int ok_w = 1; t_int m = x->x_n_io; for(i=0; ix_my_kern[i].x_in_ptr_beg = sp[i]->s_vec; x->x_des_in_ptr_beg = sp[m]->s_vec; for(i=0; ix_my_kern[i].x_out_ptr_beg = sp[i+m+1]->s_vec; x->x_err_out_ptr_beg = sp[2*m+1]->s_vec; for(i=0; ix_my_kern[i].x_w_array_mem_beg = n_CNLMS_tilde_check_array(x->x_my_kern[i].x_w_array_sym_name, x->x_n_order); if(!x->x_my_kern[i].x_w_array_mem_beg) ok_w = 0; } if(!ok_w) dsp_add(n_CNLMS_tilde_perform_zero, 2, x, n); else dsp_add(n_CNLMS_tilde_perform, 2, x, n); } /* setup/setdown things */ static void n_CNLMS_tilde_free(t_n_CNLMS_tilde *x) { t_int i, n_io=x->x_n_io, n_order=x->x_n_order; for(i=0; ix_my_kern[i].x_in_hist, 2*x->x_n_order*sizeof(t_float)); freebytes(x->x_my_kern, n_io*sizeof(t_n_CNLMS_tilde_kern)); clock_free(x->x_clock); } static void *n_CNLMS_tilde_new(t_symbol *s, t_int argc, t_atom *argv) { t_n_CNLMS_tilde *x = (t_n_CNLMS_tilde *)pd_new(n_CNLMS_tilde_class); char buffer[400]; int i; t_int n_order=39, n_io=1; t_symbol *w_name; t_float beta=0.1f; t_float gammax=0.00001f; t_float kappa = 1.0f; if((argc >= 6) && IS_A_FLOAT(argv,0) && //IS_A_FLOAT/SYMBOL from iemlib.h IS_A_FLOAT(argv,1) && IS_A_FLOAT(argv,2) && IS_A_FLOAT(argv,3) && IS_A_FLOAT(argv,4) && IS_A_SYMBOL(argv,5)) { n_io = (t_int)atom_getintarg(0, argc, argv); n_order = (t_int)atom_getintarg(1, argc, argv); beta = (t_float)atom_getfloatarg(2, argc, argv); gammax = (t_float)atom_getfloatarg(3, argc, argv); kappa = (t_float)atom_getfloatarg(4, argc, argv); w_name = (t_symbol *)atom_getsymbolarg(5, argc, argv); if(beta < 0.0f) beta = 0.0f; if(beta > 2.0f) beta = 2.0f; if(gammax < 0.0f) gammax = 0.0f; if(gammax > 1.0f) gammax = 1.0f; if(kappa < 0.0001f) kappa = 0.0001f; if(kappa > 10000.0f) kappa = 10000.0f; if(n_order < 2) n_order = 2; if(n_order > 11111) n_order = 11111; if(n_io < 1) n_io = 1; if(n_io > 60) n_io = 60; for(i=0; ix_obj, &x->x_obj.ob_pd, &s_signal, &s_signal); for(i=0; i<=n_io; i++) outlet_new(&x->x_obj, &s_signal); x->x_out_compressing_bang = outlet_new(&x->x_obj, &s_bang); x->x_msi = 0; x->x_n_io = n_io; x->x_n_order = n_order; x->x_update = 0; x->x_beta = beta; x->x_gamma = gammax; x->x_kappa = kappa; x->x_my_kern = (t_n_CNLMS_tilde_kern *)getbytes(x->x_n_io*sizeof(t_n_CNLMS_tilde_kern)); for(i=0; is_name); x->x_my_kern[i].x_w_array_sym_name = gensym(buffer); x->x_my_kern[i].x_w_array_mem_beg = (t_float *)0; x->x_my_kern[i].x_in_hist = (t_float *)getbytes(2*x->x_n_order*sizeof(t_float)); } x->x_clock = clock_new(x, (t_method)n_CNLMS_tilde_tick); return(x); } else { post("n_CNLMSC~-ERROR: need 5 float- + 1 symbol-arguments:"); post(" number_of_filters + order_of_filters + learnrate_beta + security_value_gamma + threshold_kappa + array_name_taps"); return(0); } } void n_CNLMS_tilde_setup(void) { n_CNLMS_tilde_class = class_new(gensym("n_CNLMS~"), (t_newmethod)n_CNLMS_tilde_new, (t_method)n_CNLMS_tilde_free, sizeof(t_n_CNLMS_tilde), 0, A_GIMME, 0); CLASS_MAINSIGNALIN(n_CNLMS_tilde_class, t_n_CNLMS_tilde, x_msi); class_addmethod(n_CNLMS_tilde_class, (t_method)n_CNLMS_tilde_dsp, gensym("dsp"), A_CANT, 0); class_addmethod(n_CNLMS_tilde_class, (t_method)n_CNLMS_tilde_update, gensym("update"), A_FLOAT, 0); // method: downsampling factor of learning (multiple of 2^N) class_addmethod(n_CNLMS_tilde_class, (t_method)n_CNLMS_tilde_beta, gensym("beta"), A_FLOAT, 0); //method: normalized learning rate class_addmethod(n_CNLMS_tilde_class, (t_method)n_CNLMS_tilde_gamma, gensym("gamma"), A_FLOAT, 0); // method: dithering noise related to signal class_addmethod(n_CNLMS_tilde_class, (t_method)n_CNLMS_tilde_kappa, gensym("kappa"), A_FLOAT, 0); // method: threshold for compressing w_coeff //class_sethelpsymbol(n_CNLMS_tilde_class, gensym("iemhelp2/n_CNLMS~")); } iem_utils-v0.0.20181004/iem_adaptfilt/VERSION.txt0000644000175000017500000000000512630366344021353 0ustar zmoelnigzmoelnig1.02 iem_utils-v0.0.20181004/iem_adaptfilt/help/0000755000175000017500000000000012630366344020422 5ustar zmoelnigzmoelnigiem_utils-v0.0.20181004/iem_adaptfilt/help/n_CNLMS~-help.pd0000644000175000017500000001707212630366344023273 0ustar zmoelnigzmoelnig#N canvas 170 22 1021 882 10; #N canvas 0 0 450 300 graph1 0; #X array 1_W 40 float 0; #X coords 0 1 39 -1 200 140 1; #X restore 64 519 graph; #X msg 40 247 update \$1; #X msg 117 257 beta \$1; #X obj 456 26 tgl 15 0 empty empty empty 0 -6 0 8 -225280 -1 -1 0 1 ; #X obj 456 47 dsp; #X floatatom 456 93 5 0 0 0 - - -; #X floatatom 469 72 5 0 0 0 - - -; #X obj 452 463 bng 15 150 20 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X obj 68 277 noise~; #X obj 40 60 vradio 15 1 0 8 empty empty empty 0 -6 0 8 -225280 -1 -1 0; #N canvas 165 115 464 314 /SUBPATCH/ 0; #X obj 76 61 inlet; #X msg 32 163 0; #X msg 63 159 1; #X msg 97 158 2; #X msg 132 156 4; #X msg 159 157 8; #X msg 191 162 16; #X msg 219 164 32; #X msg 248 165 64; #X obj 76 84 sel 0 1 2 3 4 5 6 7; #X obj 32 217 outlet; #X connect 0 0 9 0; #X connect 1 0 10 0; #X connect 2 0 10 0; #X connect 3 0 10 0; #X connect 4 0 10 0; #X connect 5 0 10 0; #X connect 6 0 10 0; #X connect 7 0 10 0; #X connect 8 0 10 0; #X connect 9 0 1 0; #X connect 9 1 2 0; #X connect 9 2 3 0; #X connect 9 3 4 0; #X connect 9 4 5 0; #X connect 9 5 6 0; #X connect 9 6 7 0; #X connect 9 7 8 0; #X restore 40 207 pd; #X text 22 41 internal downsampling of update; #X msg 75 339 gamma \$1; #X text 90 365 input signal; #X text 335 364 desired signal; #N canvas 0 0 450 300 graph1 0; #X array IR 40 float 0; #X coords 0 1 39 -1 200 140 1; #X restore 240 25 graph; #X obj 69 462 unsig~; #X floatatom 69 488 9 0 0 0 - - -; #X obj 155 462 unsig~; #X floatatom 155 488 9 0 0 0 - - -; #X text 426 364 d(n); #X obj 516 270 loadbang; #X text 704 47 (array-sizes have to be >= then FIR_size); #X text 654 37 1.arg: number of order of FIR-filter; #X text 57 73 update every sample; #X text 57 58 stop \, no update; #X text 57 88 update every 2nd sample; #X text 57 103 update every 4th sample; #X text 57 118 update every 8th sample; #X text 57 133 update every 16th sample; #X text 57 148 update every 32nd sample; #X text 57 163 update every 64th sample; #N canvas 0 0 486 336 /SUBPATCH/ 0; #X obj 48 46 inlet; #X obj 205 47 inlet; #X msg 205 71 \; IR const 0; #X obj 92 84 loadbang; #X msg 48 120 \; IR 0 0 0 0 0 0 0.314287 0.8 0.75 0 0 0 0 -0.7 -0.65 0 0 0 0.157143 0.128572 0 0 -0.128572 -0.1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0; #X connect 0 0 4 0; #X connect 1 0 2 0; #X connect 3 0 4 0; #X restore 517 245 pd; #X obj 530 227 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X text 547 224 clear; #X obj 517 208 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X text 534 205 load; #X text 579 214 IR; #X text 19 397 filtered output signal; #X text 339 396 error signal; #X text 469 457 constrain; #X text 469 467 coefficients; #X msg 452 422 0; #X obj 452 442 speedlim 100; #X obj 110 414 cnv 8 1 1 empty empty * 0 7 0 14 -262144 -1 0; #N canvas 0 0 482 332 /SUBPATCH/ 0; #X obj 137 73 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 1 1 ; #X msg 137 115 39; #X msg 92 190 \$1 39; #X msg 136 53 1; #X obj 137 92 metro 200; #X obj 136 24 inlet; #X obj 92 169 tabread 1_W; #X obj 92 214 tabwrite 1_W; #X msg 177 192 \$1 39; #X msg 260 191 \$1 39; #X obj 260 170 tabread 3_W; #X obj 260 215 tabwrite 3_W; #X obj 177 171 tabread 2_W; #X obj 177 216 tabwrite 2_W; #X connect 0 0 4 0; #X connect 1 0 6 0; #X connect 1 0 12 0; #X connect 1 0 10 0; #X connect 2 0 7 0; #X connect 3 0 0 0; #X connect 4 0 1 0; #X connect 5 0 3 0; #X connect 6 0 2 0; #X connect 8 0 13 0; #X connect 9 0 11 0; #X connect 10 0 9 0; #X connect 12 0 8 0; #X restore 516 291 pd; #X text 541 297 update of W; #X text 540 286 graphical; #X text 111 319 minimum input value; #X msg 117 220 0.1; #X msg 75 301 1e-05; #X text 170 258 beta [0 .. 2]; #X text 131 338 gamma [0 .. 1]; #X obj 574 38 cnv 15 68 17 empty empty empty 20 12 0 14 -225280 -66577 0; #N canvas 0 0 568 372 FORMULAS 0; #X obj 167 52 cnv 15 150 40 empty empty empty 20 12 0 14 -225280 -66577 0; #X obj 167 123 cnv 15 270 50 empty empty empty 20 12 0 14 -225280 -66577 0; #X obj 167 205 cnv 15 260 30 empty empty empty 20 12 0 14 -225280 -66577 0; #X text 280 129 beta; #X text 231 146 >; #X text 232 144 _; #X text 232 138 _; #X text 277 141 2; #X text 340 141 2; #X text 311 146 gamma * blocksize); #X text 294 146 +; #X text 243 146 x[n-i]; #X text 174 135 my(n) =; #X text 223 130 _________________________________; #X text 6 135 normalized learn rate:; #X text 173 54 y(n) = W * x(n); #X obj 225 56 cnv 11 1 1 empty empty * 0 9 0 14 -225280 -1 0; #X text 173 72 e(n) = d(n) - W * x(n); #X obj 267 74 cnv 11 1 1 empty empty * 0 9 0 14 -225280 -1 0; #X text 119 73 error:; #X text 116 55 output:; #X text 7 212 coefficient iteration:; #X text 176 213 W(k+1 \, i) = W(k \, i) + my(n)* e(n)* x(n); #X restore 573 39 pd FORMULAS; #X obj 117 240 cnv 14 31 14 empty empty empty 20 12 0 14 -225280 -66577 0; #X floatatom 117 240 5 0 2 0 - - -; #X text 153 239 learn-rate; #X obj 75 321 cnv 14 31 14 empty empty empty 20 12 0 14 -225280 -66577 0; #X floatatom 75 321 5 0 1 0 - - -; #X floatatom 40 228 5 0 0 0 - - -; #X text 572 14 Normalized Least Mean Square (linear adaptive FIR-filter) ; #N canvas 0 0 450 300 graph1 0; #X array 2_W 40 float 0; #X coords 0 1 39 -1 200 140 1; #X restore 314 519 graph; #N canvas 0 0 450 300 graph1 0; #X array 3_W 40 float 0; #X coords 0 1 39 -1 200 140 1; #X restore 564 519 graph; #X obj 68 382 n_CNLMS~ 3 32 0.1 1e-05 1 W _______________________________ ; #X obj 244 463 unsig~; #X floatatom 244 489 9 0 0 0 - - -; #X obj 334 461 unsig~; #X floatatom 334 487 9 0 0 0 - - -; #X text 304 233 minimum input value; #X obj 268 235 cnv 14 31 14 empty empty empty 20 12 0 14 -225280 -66577 0; #X floatatom 268 235 5 0 10000 0 - - -; #X msg 268 253 kappa \$1; #X text 324 252 kappa [0 .. 1]; #X msg 268 215 1; #X obj 423 293 FIR~ IR 32; #X obj 186 293 z~ 2; #X obj 304 293 z~ 4; #X text 41 365 x1(n); #X text 272 365 x3(n); #X text 191 364 x2(n); #X text 39 410 y1(n) = 1_W * x1(n); #X obj 196 429 cnv 8 1 1 empty empty * 0 7 0 14 -262144 -1 0; #X obj 286 403 cnv 8 1 1 empty empty * 0 7 0 14 -262144 -1 0; #X text 125 425 y2(n) = 2_W * x2(n); #X text 215 399 y3(n) = 3_W * x3(n); #X obj 375 425 cnv 8 1 1 empty empty * 0 7 0 14 -262144 -1 0; #X text 341 421 - 1_W * x1(n); #X text 312 410 e(n) = d(n); #X obj 375 435 cnv 8 1 1 empty empty * 0 7 0 14 -262144 -1 0; #X text 341 431 - 2_W * x2(n); #X obj 375 445 cnv 8 1 1 empty empty * 0 7 0 14 -262144 -1 0; #X text 341 441 - 3_W * x3(n); #X text 572 3 Multi Channel Constraint; #X msg 463 139 \; 1_W const 0 \; 2_W const 0 \; 3_W const 0; #X text 462 117 RESET TABLES; #X text 654 150 (C) 2005 \, m.noisternig & t.musil \, IEM \, Graz \, Austria; #X text 682 163 [noisternig \, musil]_AT_iem.at; #X text 655 64 2.arg: number of order of FIR-filter; #X text 655 78 3.arg: learn-rate = beta; #X text 656 103 5.arg: constraint = kappa; #X text 655 90 4.arg: regularization parameter = gamma; #X text 656 118 6.arg: table-name of W; #X connect 1 0 64 0; #X connect 2 0 64 0; #X connect 3 0 4 0; #X connect 4 0 5 0; #X connect 4 1 6 0; #X connect 8 0 75 0; #X connect 8 0 64 0; #X connect 8 0 76 0; #X connect 8 0 77 0; #X connect 9 0 10 0; #X connect 10 0 60 0; #X connect 12 0 64 0; #X connect 16 0 17 0; #X connect 18 0 19 0; #X connect 21 0 45 0; #X connect 33 0 32 1; #X connect 35 0 32 0; #X connect 42 0 43 0; #X connect 43 0 7 0; #X connect 49 0 56 0; #X connect 50 0 59 0; #X connect 56 0 2 0; #X connect 59 0 12 0; #X connect 60 0 1 0; #X connect 64 0 16 0; #X connect 64 1 18 0; #X connect 64 2 65 0; #X connect 64 3 67 0; #X connect 64 4 42 0; #X connect 65 0 66 0; #X connect 67 0 68 0; #X connect 71 0 72 0; #X connect 72 0 64 0; #X connect 74 0 71 0; #X connect 75 0 64 3; #X connect 76 0 64 1; #X connect 77 0 64 2; iem_utils-v0.0.20181004/iem_adaptfilt/help/NLMS~-help.pd0000644000175000017500000001331412630366344022646 0ustar zmoelnigzmoelnig#N canvas 23 22 909 523 10; #N canvas 0 22 450 300 (subpatch) 0; #X array W 40 float 0; #X coords 0 1 39 -1 200 140 1; #X restore 454 335 graph; #X msg 25 245 update \$1; #X msg 102 255 beta \$1; #X obj 272 24 tgl 15 0 empty empty empty 0 -6 0 8 -225280 -1 -1 1 1 ; #X obj 272 45 dsp; #X floatatom 272 91 5 0 0 0 - - -; #X floatatom 285 70 5 0 0 0 - - -; #X obj 276 463 bng 15 150 20 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X text 453 230 2.arg: learn-rate = beta; #X obj 53 275 noise~; #X obj 25 58 vradio 15 1 0 8 empty empty empty 0 -6 0 8 -225280 -1 -1 7; #N canvas 165 115 464 314 (subpatch) 0; #X obj 76 61 inlet; #X msg 32 163 0; #X msg 63 159 1; #X msg 97 158 2; #X msg 132 156 4; #X msg 159 157 8; #X msg 191 162 16; #X msg 219 164 32; #X msg 248 165 64; #X obj 76 84 sel 0 1 2 3 4 5 6 7; #X obj 32 217 outlet; #X connect 0 0 9 0; #X connect 1 0 10 0; #X connect 2 0 10 0; #X connect 3 0 10 0; #X connect 4 0 10 0; #X connect 5 0 10 0; #X connect 6 0 10 0; #X connect 7 0 10 0; #X connect 8 0 10 0; #X connect 9 0 1 0; #X connect 9 1 2 0; #X connect 9 2 3 0; #X connect 9 3 4 0; #X connect 9 4 5 0; #X connect 9 5 6 0; #X connect 9 6 7 0; #X connect 9 7 8 0; #X restore 25 205 pd; #X text 34 37 internal downsampling of update; #X msg 96 337 gamma \$1; #X text 75 363 input signal; #X text 190 362 desired signal; #N canvas 0 22 450 300 (subpatch) 0; #X array IR 40 float 0; #X coords 0 1 39 -1 200 140 1; #X restore 367 11 graph; #X obj 54 440 unsig~; #X floatatom 54 466 9 0 0 0 - - -; #X obj 174 439 unsig~; #X floatatom 174 465 9 0 0 0 - - -; #X text 26 363 x(n); #X text 281 362 d(n); #X text 29 408 y(n) = W * x(n); #X obj 276 291 FIR~ IR 32; #X obj 618 73 loadbang; #X text 503 220 (array-sizes have to be >= then FIR_size); #X text 453 210 1.arg: number of order of FIR-filter; #X text 42 71 update every sample; #X text 42 56 stop \, no update; #X text 42 86 update every 2nd sample; #X text 42 101 update every 4th sample; #X text 42 116 update every 8th sample; #X text 42 131 update every 16th sample; #X text 42 146 update every 32nd sample; #X text 42 161 update every 64th sample; #N canvas 0 22 474 324 (subpatch) 0; #X obj 48 46 inlet; #X obj 205 47 inlet; #X msg 205 71 \; IR const 0; #X msg 48 120 \; IR 0 0 0 0 0.314287 0.8 0.75 0 0 0 0 -0.7 -0.65 0 0 0 0.157143 0.128572 0 0 -0.128572 -0.1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0; #X obj 92 84 loadbang; #X connect 0 0 3 0; #X connect 1 0 2 0; #X connect 4 0 3 0; #X restore 619 48 pd; #X obj 632 30 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X text 649 27 clear; #X obj 619 11 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X text 636 8 load; #X text 644 50 IR; #X text 4 395 filtered output signal; #X text 178 395 error signal; #X text 152 407 e(n) = d(n) - W * x(n); #X text 293 457 constrain; #X text 293 467 coefficients; #X msg 276 422 0; #X obj 276 442 speedlim 100; #X obj 83 412 cnv 8 1 1 empty empty * 0 7 0 14 -262144 -1 0; #X obj 247 411 cnv 8 1 1 empty empty * 0 7 0 14 -262144 -1 0; #N canvas 0 22 470 320 (subpatch) 0; #X obj 137 73 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 1 1 ; #X msg 137 115 39; #X msg 137 156 \$1 39; #X msg 136 53 1; #X obj 137 92 metro 200; #X obj 136 24 inlet; #X obj 137 135 tabread W; #X obj 137 180 tabwrite W; #X connect 0 0 4 0; #X connect 1 0 6 0; #X connect 2 0 7 0; #X connect 3 0 0 0; #X connect 4 0 1 0; #X connect 5 0 3 0; #X connect 6 0 2 0; #X restore 618 94 pd; #X text 643 100 update of W; #X text 642 89 graphical; #X text 453 250 4.arg: table-name of W; #X text 453 240 3.arg: minimum input value gamma; #X text 132 317 minimum input value; #X msg 102 218 0.1; #X msg 96 299 1e-05; #X text 155 256 beta [0 .. 2]; #X text 152 336 gamma [0 .. 1]; #X obj 455 187 cnv 15 68 17 empty empty empty 20 12 0 14 -225280 -66577 0; #N canvas 0 22 499 295 FORMULAS 1; #X obj 167 52 cnv 15 150 40 empty empty empty 20 12 0 14 -225280 -66577 0; #X obj 167 123 cnv 15 270 50 empty empty empty 20 12 0 14 -225280 -66577 0; #X obj 167 205 cnv 15 260 30 empty empty empty 20 12 0 14 -225280 -66577 0; #X text 280 129 beta; #X text 231 146 >; #X text 232 144 _; #X text 232 138 _; #X text 283 141 2; #X text 346 141 2; #X text 311 146 gamma * blocksize); #X text 300 146 +; #X text 243 146 x[n-i]; #X text 174 135 my(n) =; #X text 223 130 _________________________________; #X text 16 135 normalized learn rate:; #X text 173 56 y(n) = W * x(n); #X obj 237 54 cnv 11 1 1 empty empty * 0 9 0 14 -225280 -1 0; #X text 173 72 e(n) = d(n) - W * x(n); #X obj 286 71 cnv 11 1 1 empty empty * 0 9 0 14 -225280 -1 0; #X text 119 73 error:; #X text 116 55 output:; #X text 26 210 coefficient iteration:; #X text 188 211 W(k+1 \, i) = W(k \, i) + my(n)* e(n)* x(n); #X restore 455 187 pd FORMULAS; #X obj 102 238 cnv 14 31 14 empty empty empty 20 12 0 14 -225280 -66577 0; #X floatatom 102 238 5 0 2 0 - - -; #X text 138 237 learn-rate; #X obj 96 319 cnv 14 31 14 empty empty empty 20 12 0 14 -225280 -66577 0; #X floatatom 96 319 5 0 2 0 - - -; #X floatatom 25 226 5 0 0 0 - - -; #X text 455 169 Normalized Least Mean Square (linear adaptive FIR-filter) ; #X obj 53 379 NLMS~ 32 0.1 1e-05 W; #X text 451 268 (C) 2005 \, m.noisternig & t.musil \, IEM \, Graz \, Austria; #X text 479 281 [noisternig \, musil]_AT_iem.at; #X connect 1 0 70 0; #X connect 2 0 70 0; #X connect 3 0 4 0; #X connect 4 0 5 0; #X connect 4 1 6 0; #X connect 9 0 24 0; #X connect 9 0 70 0; #X connect 10 0 11 0; #X connect 11 0 68 0; #X connect 13 0 70 0; #X connect 17 0 18 0; #X connect 19 0 20 0; #X connect 24 0 70 1; #X connect 25 0 51 0; #X connect 37 0 36 1; #X connect 39 0 36 0; #X connect 47 0 48 0; #X connect 48 0 7 0; #X connect 57 0 64 0; #X connect 58 0 67 0; #X connect 64 0 2 0; #X connect 67 0 13 0; #X connect 68 0 1 0; #X connect 70 0 17 0; #X connect 70 1 19 0; iem_utils-v0.0.20181004/iem_adaptfilt/help/NLMSerr_in~-help.pd0000644000175000017500000001403712630366344024050 0ustar zmoelnigzmoelnig#N canvas 26 22 1132 728 10; #N canvas 0 22 450 300 (subpatch) 0; #X array W 100 float 0; #X coords 0 1 99 -1 400 140 1; #X restore 633 441 graph; #X msg 46 156 update \$1; #X msg 85 239 beta \$1; #X obj 299 62 tgl 15 0 empty empty empty 0 -6 0 8 -225280 -1 -1 1 1 ; #X obj 299 83 dsp; #X floatatom 299 129 5 0 0 0 - - -; #X floatatom 312 108 5 0 0 0 - - -; #X text 662 278 2.arg: learn-rate = beta; #X obj 336 193 noise~; #X msg 65 319 gamma \$1; #X text 70 348 input signal; #X text 344 295 desired signal; #N canvas 0 22 450 300 (subpatch) 0; #X array IR 40 float 0; #X coords 0 1 39 -1 200 140 1; #X restore 394 49 graph; #X obj 54 540 unsig~; #X floatatom 54 566 9 0 0 0 - - -; #X obj 392 544 unsig~; #X floatatom 392 564 9 0 0 0 - - -; #X text 21 346 x(n); #X text 449 295 d(n); #X text 19 510 y(n) = W * x(n); #X obj 336 278 FIR~ IR 32; #X obj 612 103 loadbang; #X text 712 267 (array-sizes have to be >= then FIR_size); #X text 662 256 1.arg: number of order of FIR-filter; #N canvas 0 22 474 324 (subpatch) 0; #X obj 48 46 inlet; #X obj 205 47 inlet; #X msg 205 71 \; IR const 0; #X msg 48 120 \; IR 0 0 0 0 0.314287 0.8 0.75 0 0 0 0 -0.7 -0.65 0 0 0 0.157143 0.128572 0 0 -0.128572 -0.1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0; #X obj 92 84 loadbang; #X connect 0 0 3 0; #X connect 1 0 2 0; #X connect 4 0 3 0; #X restore 613 78 pd; #X obj 626 60 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X text 643 57 clear; #X obj 613 41 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X text 630 38 load; #X text 638 80 IR; #X text 4 495 filtered output signal; #X text 395 422 error signal; #X text 369 434 e(n) = d(n) - W * x(n); #X obj 83 512 cnv 8 1 1 empty empty * 0 7 0 14 -262144 -1 0; #X obj 482 436 cnv 8 1 1 empty empty * 0 7 0 14 -262144 -1 0; #N canvas 0 22 470 320 (subpatch) 0; #X obj 137 73 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 1 1 ; #X msg 137 115 39; #X msg 137 156 \$1 39; #X msg 136 53 1; #X obj 137 92 metro 200; #X obj 136 24 inlet; #X obj 137 135 tabread W; #X obj 137 180 tabwrite W; #X connect 0 0 4 0; #X connect 1 0 6 0; #X connect 2 0 7 0; #X connect 3 0 0 0; #X connect 4 0 1 0; #X connect 5 0 3 0; #X connect 6 0 2 0; #X restore 612 124 pd; #X text 637 130 update of W; #X text 636 119 graphical; #X text 662 313 4.arg: table-name of W; #X text 126 301 minimum input value; #X msg 226 195 0.1; #X msg 65 281 1e-05; #X text 138 240 beta [0 .. 2]; #X text 132 318 gamma [0 .. 1]; #X obj 663 213 cnv 15 68 17 empty empty empty 20 12 0 14 -225280 -66577 0; #N canvas 0 22 499 295 FORMULAS 0; #X obj 167 52 cnv 15 150 40 empty empty empty 20 12 0 14 -225280 -66577 0; #X obj 167 123 cnv 15 270 50 empty empty empty 20 12 0 14 -225280 -66577 0; #X obj 167 205 cnv 15 260 30 empty empty empty 20 12 0 14 -225280 -66577 0; #X text 280 129 beta; #X text 231 146 >; #X text 232 144 _; #X text 232 138 _; #X text 283 141 2; #X text 346 141 2; #X text 311 146 gamma * blocksize); #X text 300 146 +; #X text 243 146 x[n-i]; #X text 174 135 my(n) =; #X text 223 130 _________________________________; #X text 16 135 normalized learn rate:; #X text 173 56 y(n) = W * x(n); #X obj 237 54 cnv 11 1 1 empty empty * 0 9 0 14 -225280 -1 0; #X text 173 72 e(n) = d(n) - W * x(n); #X obj 286 71 cnv 11 1 1 empty empty * 0 9 0 14 -225280 -1 0; #X text 119 73 error:; #X text 116 55 output:; #X text 26 210 coefficient iteration:; #X text 188 211 W(k+1 \, i) = W(k \, i) + my(n)* e(n)* x(n); #X restore 664 213 pd FORMULAS; #X obj 91 223 cnv 14 31 14 empty empty empty 20 12 0 14 -225280 -66577 0; #X floatatom 85 222 6 0 2 0 - - -; #X text 134 221 learn-rate; #X obj 65 301 cnv 14 31 14 empty empty empty 20 12 0 14 -225280 -66577 0; #X floatatom 65 301 8 0 2 0 - - -; #X obj 347 389 -~; #X text 232 431 err; #X text 409 343 filt out; #X msg 635 600 \; W const 0; #X obj 28 365 delread~ causal_del 1.45126; #X obj 392 325 delread~ feedback_del 1.45126; #X msg 185 195 0.01; #X msg 53 196 0; #X msg 138 195 0.001; #X obj 336 214 delwrite~ causal_del 20; #X obj 67 472 delwrite~ feedback_del 20; #X floatatom 111 690 9 0 0 0 - - -; #X text 38 382 ref_filt; #X text 155 404 ref_adapt; #X obj 134 389 delread~ causal_del 2.90249; #X obj 336 255 delread~ causal_del 2.90249; #X obj 46 137 tgl 15 0 empty empty empty 0 -6 0 8 -225280 -1 -1 1 1 ; #X text 41 118 Update ON / OFF; #X msg 147 629 128; #X msg 109 629 64; #X obj 110 667 / 44.1; #X obj 299 665 samplerate~; #X obj 299 647 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 -1; #X floatatom 300 706 5 0 0 0 - - -; #X obj 300 686 * 0.001; #X floatatom 189 687 9 0 0 0 - - -; #X msg 190 627 128; #X obj 188 664 / 44.1; #X msg 225 627 192; #X obj 299 627 loadbang; #X text 660 364 (C) 2010 \, t.musil & m.guldenschuh \, IEM \, Graz \, Austria; #X text 688 377 [musil | guldenschuh]_AT_iem.at; #X text 662 173 Normalized Least Mean Square with separated error and adaption reference input (linear adaptive FIR-filter); #X obj 53 450 NLMSerr_in~ 100 0.003 1e-05 W; #X msg 114 282 1e-07; #X msg 85 195 0.0001; #X text 662 290 3.arg: minimum input value gamma for; #X text 716 301 energy calculation; #X text 46 44 NLMSerr_in~; #X connect 1 0 84 0; #X connect 2 0 84 0; #X connect 3 0 4 0; #X connect 4 0 5 0; #X connect 4 1 6 0; #X connect 8 0 60 0; #X connect 9 0 84 0; #X connect 13 0 14 0; #X connect 15 0 16 0; #X connect 20 0 51 0; #X connect 21 0 35 0; #X connect 25 0 24 1; #X connect 27 0 24 0; #X connect 40 0 47 0; #X connect 41 0 50 0; #X connect 47 0 2 0; #X connect 50 0 9 0; #X connect 51 0 15 0; #X connect 51 0 84 2; #X connect 55 0 84 0; #X connect 56 0 51 1; #X connect 57 0 47 0; #X connect 58 0 47 0; #X connect 59 0 47 0; #X connect 62 0 56 0; #X connect 62 0 55 0; #X connect 65 0 84 1; #X connect 66 0 20 0; #X connect 67 0 1 0; #X connect 69 0 71 0; #X connect 70 0 71 0; #X connect 71 0 62 0; #X connect 72 0 75 0; #X connect 73 0 72 0; #X connect 75 0 74 0; #X connect 75 0 71 1; #X connect 75 0 78 1; #X connect 77 0 78 0; #X connect 78 0 76 0; #X connect 78 0 66 0; #X connect 78 0 65 0; #X connect 79 0 78 0; #X connect 80 0 73 0; #X connect 84 0 13 0; #X connect 84 0 61 0; #X connect 85 0 50 0; #X connect 86 0 47 0; iem_utils-v0.0.20181004/iem_adaptfilt/help/n_CLNLMS~-help.pd0000644000175000017500000001743012630366344023405 0ustar zmoelnigzmoelnig#N canvas 18 0 998 718 10; #N canvas 0 0 450 300 graph1 0; #X array 1_W 40 float 0; #X coords 0 1 39 -1 200 140 1; #X restore 49 517 graph; #X msg 25 245 update \$1; #X msg 102 255 beta \$1; #X obj 438 26 tgl 15 0 empty empty empty 0 -6 0 8 -225280 -1 -1 0 1 ; #X obj 438 47 dsp; #X floatatom 438 93 5 0 0 0 - - -; #X floatatom 451 72 5 0 0 0 - - -; #X obj 437 461 bng 15 150 20 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X obj 53 275 noise~; #X obj 25 58 vradio 15 1 0 8 empty empty empty 0 -6 0 8 -225280 -1 -1 0; #N canvas 165 115 464 314 /SUBPATCH/ 0; #X obj 76 61 inlet; #X msg 32 163 0; #X msg 63 159 1; #X msg 97 158 2; #X msg 132 156 4; #X msg 159 157 8; #X msg 191 162 16; #X msg 219 164 32; #X msg 248 165 64; #X obj 76 84 sel 0 1 2 3 4 5 6 7; #X obj 32 217 outlet; #X connect 0 0 9 0; #X connect 1 0 10 0; #X connect 2 0 10 0; #X connect 3 0 10 0; #X connect 4 0 10 0; #X connect 5 0 10 0; #X connect 6 0 10 0; #X connect 7 0 10 0; #X connect 8 0 10 0; #X connect 9 0 1 0; #X connect 9 1 2 0; #X connect 9 2 3 0; #X connect 9 3 4 0; #X connect 9 4 5 0; #X connect 9 5 6 0; #X connect 9 6 7 0; #X connect 9 7 8 0; #X restore 25 205 pd; #X text 7 39 internal downsampling of update; #X msg 60 337 gamma \$1; #X text 75 363 input signal; #X text 320 362 desired signal; #N canvas 0 0 450 300 graph1 0; #X array IR 40 float 0; #X coords 0 1 39 -1 200 140 1; #X restore 225 23 graph; #X obj 54 460 unsig~; #X floatatom 54 486 9 0 0 0 - - -; #X obj 140 460 unsig~; #X floatatom 140 486 9 0 0 0 - - -; #X text 411 362 d(n); #X obj 777 283 loadbang; #X text 687 432 (array-sizes have to be >= then FIR_size); #X text 42 71 update every sample; #X text 42 56 stop \, no update; #X text 42 86 update every 2nd sample; #X text 42 101 update every 4th sample; #X text 42 116 update every 8th sample; #X text 42 131 update every 16th sample; #X text 42 146 update every 32nd sample; #X text 42 161 update every 64th sample; #N canvas 0 0 486 336 /SUBPATCH/ 0; #X obj 48 46 inlet; #X obj 205 47 inlet; #X msg 205 71 \; IR const 0; #X obj 92 84 loadbang; #X msg 48 120 \; IR 0 0 0 0 0 0 0.314287 0.8 0.75 0 0 0 0 -0.7 -0.65 0 0 0 0.157143 0.128572 0 0 -0.128572 -0.1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0; #X connect 0 0 4 0; #X connect 1 0 2 0; #X connect 3 0 4 0; #X restore 778 258 pd; #X obj 791 240 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X text 808 237 clear; #X obj 778 221 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X text 795 218 load; #X text 840 227 IR; #X text 4 395 filtered output signal; #X text 324 394 error signal; #X text 454 455 constrain; #X text 454 465 coefficients; #X msg 437 420 0; #X obj 437 440 speedlim 100; #X obj 95 412 cnv 8 1 1 empty empty * 0 7 0 14 -262144 -1 0; #N canvas 0 0 478 328 /SUBPATCH/ 0; #X obj 137 73 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 1 1 ; #X msg 137 115 39; #X msg 92 190 \$1 39; #X msg 136 53 1; #X obj 137 92 metro 200; #X obj 136 24 inlet; #X obj 92 169 tabread 1_W; #X obj 92 214 tabwrite 1_W; #X msg 177 192 \$1 39; #X msg 260 191 \$1 39; #X obj 260 170 tabread 3_W; #X obj 260 215 tabwrite 3_W; #X obj 177 171 tabread 2_W; #X obj 177 216 tabwrite 2_W; #X connect 0 0 4 0; #X connect 1 0 6 0; #X connect 1 0 12 0; #X connect 1 0 10 0; #X connect 2 0 7 0; #X connect 3 0 0 0; #X connect 4 0 1 0; #X connect 5 0 3 0; #X connect 6 0 2 0; #X connect 8 0 13 0; #X connect 9 0 11 0; #X connect 10 0 9 0; #X connect 12 0 8 0; #X restore 777 304 pd; #X text 802 310 update of W; #X text 801 299 graphical; #X text 96 317 minimum input value; #X msg 102 218 0.1; #X msg 60 299 1e-05; #X text 155 256 beta [0 .. 2]; #X text 116 336 gamma [0 .. 1]; #X obj 527 47 cnv 15 68 17 empty empty empty 20 12 0 14 -225280 -66577 0; #N canvas 0 0 499 295 FORMULAS 0; #X obj 167 52 cnv 15 150 40 empty empty empty 20 12 0 14 -225280 -66577 0; #X obj 167 123 cnv 15 270 50 empty empty empty 20 12 0 14 -225280 -66577 0; #X obj 167 205 cnv 15 260 30 empty empty empty 20 12 0 14 -225280 -66577 0; #X text 280 129 beta; #X text 231 146 >; #X text 232 144 _; #X text 232 138 _; #X text 277 141 2; #X text 340 141 2; #X text 311 146 gamma * blocksize); #X text 294 146 +; #X text 243 146 x[n-i]; #X text 174 135 my(n) =; #X text 223 130 _________________________________; #X text 8 135 normalized learn rate:; #X text 173 54 y(n) = W * x(n); #X obj 225 56 cnv 11 1 1 empty empty * 0 9 0 14 -225280 -1 0; #X text 173 72 e(n) = d(n) - W * x(n); #X obj 267 74 cnv 11 1 1 empty empty * 0 9 0 14 -225280 -1 0; #X text 119 73 error:; #X text 116 55 output:; #X text 7 210 coefficient iteration:; #X text 176 213 W(k+1 \, i) = leakage*W(k \, i) + my(n)* e(n)* x(n) ; #X restore 527 47 pd FORMULAS; #X obj 102 238 cnv 14 31 14 empty empty empty 20 12 0 14 -225280 -66577 0; #X floatatom 102 238 5 0 2 0 - - -; #X text 138 237 learn-rate; #X obj 60 319 cnv 14 31 14 empty empty empty 20 12 0 14 -225280 -66577 0; #X floatatom 60 319 5 0 1 0 - - -; #X floatatom 25 226 5 0 0 0 - - -; #X text 526 29 Normalized Least Mean Square (linear adaptive FIR-filter) ; #N canvas 0 0 450 300 graph1 0; #X array 2_W 40 float 0; #X coords 0 1 39 -1 200 140 1; #X restore 299 517 graph; #N canvas 0 0 450 300 graph1 0; #X array 3_W 40 float 0; #X coords 0 1 39 -1 200 140 1; #X restore 549 517 graph; #X obj 229 461 unsig~; #X floatatom 229 487 9 0 0 0 - - -; #X obj 319 459 unsig~; #X floatatom 319 485 9 0 0 0 - - -; #X obj 253 233 cnv 14 31 14 empty empty empty 20 12 0 14 -225280 -66577 0; #X floatatom 253 233 5 0 10000 0 - - -; #X msg 253 251 kappa \$1; #X msg 253 213 1; #X obj 408 291 FIR~ IR 32; #X obj 171 291 z~ 2; #X obj 289 291 z~ 4; #X text 26 363 x1(n); #X text 257 363 x3(n); #X text 176 362 x2(n); #X text 24 408 y1(n) = 1_W * x1(n); #X obj 181 427 cnv 8 1 1 empty empty * 0 7 0 14 -262144 -1 0; #X obj 271 401 cnv 8 1 1 empty empty * 0 7 0 14 -262144 -1 0; #X text 110 423 y2(n) = 2_W * x2(n); #X text 200 397 y3(n) = 3_W * x3(n); #X obj 360 423 cnv 8 1 1 empty empty * 0 7 0 14 -262144 -1 0; #X text 326 419 - 1_W * x1(n); #X text 297 408 e(n) = d(n); #X obj 360 433 cnv 8 1 1 empty empty * 0 7 0 14 -262144 -1 0; #X text 326 429 - 2_W * x2(n); #X obj 360 443 cnv 8 1 1 empty empty * 0 7 0 14 -262144 -1 0; #X text 326 439 - 3_W * x3(n); #X text 526 18 Multi Channel Constraint; #X obj 53 380 n_CLNLMS~ 3 32 0.1 1e-05 1 0.95 W ______________________ ; #X text 472 230 minimum input value; #X obj 436 232 cnv 14 31 14 empty empty empty 20 12 0 14 -225280 -66577 0; #X floatatom 436 232 5 0 10000 0 - - -; #X msg 436 212 1; #X msg 436 250 leakage \$1; #X text 516 254 leakage [0 .. 1]; #X text 520 163 (C) 2005 \, m.noisternig & t.musil \, IEM \, Graz \, Austria; #X text 548 176 [noisternig \, musil]_AT_iem.at; #X text 525 69 1.arg: number of channels n; #X text 525 82 2.arg: number of order of FIR-filter; #X text 525 96 3.arg: learn-rate = beta; #X text 318 250 kappa; #X text 289 231 constraint; #X text 526 121 5.arg: constraint = kappa; #X text 525 108 4.arg: regularization parameter = gamma; #X text 526 133 6.arg: leakage; #X text 526 146 7.arg: table-name of W; #X connect 1 0 90 0; #X connect 2 0 90 0; #X connect 3 0 4 0; #X connect 4 0 5 0; #X connect 4 1 6 0; #X connect 8 0 71 0; #X connect 8 0 72 0; #X connect 8 0 73 0; #X connect 8 0 90 0; #X connect 9 0 10 0; #X connect 10 0 59 0; #X connect 12 0 90 0; #X connect 16 0 17 0; #X connect 18 0 19 0; #X connect 21 0 44 0; #X connect 32 0 31 1; #X connect 34 0 31 0; #X connect 41 0 42 0; #X connect 42 0 7 0; #X connect 48 0 55 0; #X connect 49 0 58 0; #X connect 55 0 2 0; #X connect 58 0 12 0; #X connect 59 0 1 0; #X connect 63 0 64 0; #X connect 65 0 66 0; #X connect 68 0 69 0; #X connect 69 0 90 0; #X connect 70 0 68 0; #X connect 71 0 90 3; #X connect 72 0 90 1; #X connect 73 0 90 2; #X connect 90 0 16 0; #X connect 90 1 18 0; #X connect 90 2 63 0; #X connect 90 3 65 0; #X connect 90 4 41 0; #X connect 93 0 95 0; #X connect 94 0 93 0; #X connect 95 0 90 0; iem_utils-v0.0.20181004/iem_adaptfilt/help/NLMSCC~-help.pd0000644000175000017500000002124112630366344023052 0ustar zmoelnigzmoelnig#N canvas 284 42 905 668 10; #N canvas 0 0 450 300 graph1 0; #X array W 40 float 0; #X coords 0 1 39 -1 200 140 1; #X restore 34 496 graph; #X msg 26 246 update \$1; #X msg 103 256 beta \$1; #X obj 273 25 tgl 15 0 empty empty empty 0 -6 0 8 -225280 -1 -1 0 1 ; #X obj 273 46 dsp; #X floatatom 273 92 5 0 0 0 - - -; #X floatatom 286 71 5 0 0 0 - - -; #X obj 277 464 bng 15 150 20 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X text 423 290 2.arg: learn-rate = beta; #X obj 54 276 noise~; #X obj 26 59 vradio 15 1 0 8 empty empty empty 0 -6 0 8 -225280 -1 -1 0; #N canvas 165 115 464 314 /SUBPATCH/ 0; #X obj 76 61 inlet; #X msg 32 163 0; #X msg 63 159 1; #X msg 97 158 2; #X msg 132 156 4; #X msg 159 157 8; #X msg 191 162 16; #X msg 219 164 32; #X msg 248 165 64; #X obj 76 84 sel 0 1 2 3 4 5 6 7; #X obj 32 217 outlet; #X connect 0 0 9 0; #X connect 1 0 10 0; #X connect 2 0 10 0; #X connect 3 0 10 0; #X connect 4 0 10 0; #X connect 5 0 10 0; #X connect 6 0 10 0; #X connect 7 0 10 0; #X connect 8 0 10 0; #X connect 9 0 1 0; #X connect 9 1 2 0; #X connect 9 2 3 0; #X connect 9 3 4 0; #X connect 9 4 5 0; #X connect 9 5 6 0; #X connect 9 6 7 0; #X connect 9 7 8 0; #X restore 26 206 pd; #X text 35 38 internal downsampling of update; #X msg 97 338 gamma \$1; #N canvas 0 0 450 300 graph1 0; #X array W_top 40 float 0; #X coords 0 1 39 -1 200 140 1; #X restore 626 495 graph; #N canvas 0 0 450 300 graph1 0; #X array W_bottom 40 float 0; #X coords 0 1 39 -1 200 140 1; #X restore 294 495 graph; #X text 76 364 input signal; #X text 191 363 desired signal; #N canvas 0 0 450 300 graph1 0; #X array IR 40 float 0; #X coords 0 1 39 -1 200 140 1; #X restore 372 32 graph; #X obj 55 441 unsig~; #X floatatom 55 467 9 0 0 0 - - -; #X obj 165 440 unsig~; #X floatatom 165 466 9 0 0 0 - - -; #X text 27 364 x(n); #X text 282 363 d(n); #X text 30 409 y(n) = W * x(n); #X obj 277 292 FIR~ IR 32; #X obj 589 135 loadbang; #X text 473 280 (array-sizes have to be >= then FIR_size); #X text 423 270 1.arg: number of order of FIR-filter; #X text 43 72 update every sample; #X text 43 57 stop \, no update; #X text 43 87 update every 2nd sample; #X text 43 102 update every 4th sample; #X text 43 117 update every 8th sample; #X text 43 132 update every 16th sample; #X text 43 147 update every 32nd sample; #X text 43 162 update every 64th sample; #N canvas 0 0 474 324 /SUBPATCH/ 0; #X obj 48 46 inlet; #X obj 205 47 inlet; #X msg 205 71 \; IR const 0; #X msg 48 120 \; IR 0 0 0 0 0.314287 0.8 0.75 0 0 0 0 -0.7 -0.65 0 0 0 0.157143 0.128572 0 0 -0.128572 -0.1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0; #X obj 92 84 loadbang; #X connect 0 0 3 0; #X connect 1 0 2 0; #X connect 4 0 3 0; #X restore 590 110 pd; #X obj 603 92 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X text 620 89 clear; #X obj 590 73 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X text 607 70 load; #X text 652 79 IR; #X text 5 396 filtered output signal; #X text 169 396 error signal; #X text 143 408 e(n) = d(n) - W * x(n); #X text 294 458 constrain; #X text 294 468 coefficients; #N canvas 0 0 825 416 /SUBPATCH/ 0; #X obj 43 39 inlet; #X obj 446 39 inlet; #X obj 92 84 loadbang; #X msg 54 114 \; W_top 0 1 0.928572 0.885714 0.857142 0.828571 0.799999 0.785713 0.757141 0.742855 0.72857 0.714284 0.699998 0.685712 0.671426 0.642854 0.628569 0.599997 0.571425 0.557139 0.528568 0.514282 0.499996 0.499996 0.48571 0.471424 0.457138 0.428567 0.414281 0.399995 0.385709 0.371423 0.357137 0.342851 0.328565 0.31428 0.31428 0.31428 0.31428 0.299994 0.299994; #X msg 43 226 \; W_bottom 0 -1 -0.971428 -0.942857 -0.914286 -0.885714 -0.857143 -0.828572 -0.814286 -0.785715 -0.757143 -0.728572 -0.7 -0.671429 -0.657143 -0.642858 -0.614286 -0.585715 -0.571429 -0.557144 -0.528572 -0.514287 -0.500001 -0.485715 -0.471429 -0.457144 -0.442858 -0.428572 -0.428572 -0.400001 -0.400001 -0.385715 -0.371429 -0.371429 -0.357144 -0.357144 -0.342858 -0.328572 -0.314287 -0.285715 -0.285715; #X msg 446 226 \; W_bottom 0 -1 -0.857143 -0.728572 -0.671429 -0.614286 -0.585715 -0.557143 -0.514286 -0.485715 -0.471429 -0.471429 -0.442858 -0.428572 -0.400001 -0.371429 -0.342858 -0.328572 -0.314286 -0.285715 -0.285715 -0.271429 -0.271429 -0.271429 -0.271429 -0.271429 -0.271429 -0.257144 -0.242858 -0.228572 -0.214286 -0.214286 -0.214286 -0.200001 -0.214287 -0.200001 -0.200001 -0.185715 -0.171429 -0.171429 -0.171429 ; #X msg 459 113 \; W_top 0 1 0.842856 0.785713 0.699998 0.642854 0.571425 0.514282 0.457138 0.442852 0.414281 0.385709 0.342851 0.285708 0.257136 0.214279 0.199993 0.171421 0.157135 0.142849 0.128564 0.142849 0.142849 0.142849 0.142849 0.142849 0.128564 0.128564 0.128564 0.128564 0.128564 0.128564 0.142849 0.142849 0.142849 0.142849 0.157135 0.157135 0.157135 0.142849 0.142849; #X connect 0 0 4 0; #X connect 0 0 3 0; #X connect 1 0 6 0; #X connect 1 0 5 0; #X connect 2 0 3 0; #X connect 2 0 4 0; #X restore 506 576 pd; #X obj 519 558 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X obj 506 539 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X msg 277 423 0; #X obj 277 443 speedlim 100; #X text 499 522 top & bottom; #X text 523 536 nonconstrained; #X text 536 555 constrained; #X obj 84 413 cnv 8 1 1 empty empty * 0 7 0 14 -262144 -1 0; #X obj 237 412 cnv 8 1 1 empty empty * 0 7 0 14 -262144 -1 0; #N canvas 0 0 470 320 /SUBPATCH/ 0; #X obj 137 73 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 1 1 ; #X msg 137 115 39; #X msg 137 156 \$1 39; #X msg 136 53 1; #X obj 137 92 metro 200; #X obj 136 24 inlet; #X obj 137 135 tabread W; #X obj 137 180 tabwrite W; #X connect 0 0 4 0; #X connect 1 0 6 0; #X connect 2 0 7 0; #X connect 3 0 0 0; #X connect 4 0 1 0; #X connect 5 0 3 0; #X connect 6 0 2 0; #X restore 589 156 pd; #X text 614 162 update of W; #X text 613 151 graphical; #X text 423 310 4.arg: table-name of W; #X text 423 320 5.arg: table-name of lower boundary of W; #X text 423 330 6.arg: table-name of upper boundary of W; #X text 423 300 3.arg: minimum input value gamma; #X text 133 318 minimum input value; #X msg 103 219 0.1; #X msg 97 300 1e-05; #X text 156 257 beta [0 .. 2]; #X text 153 337 gamma [0 .. 1]; #X obj 458 250 cnv 15 68 17 empty empty empty 20 12 0 14 -225280 -66577 0; #N canvas 0 0 758 363 FORMULAS 0; #X obj 168 54 cnv 15 150 40 empty empty empty 20 12 0 14 -225280 -66577 0; #X obj 168 125 cnv 15 270 50 empty empty empty 20 12 0 14 -225280 -66577 0; #X obj 168 207 cnv 15 510 90 empty empty empty 20 12 0 14 -225280 -66577 0; #X text 281 131 beta; #X text 232 148 >; #X text 233 146 _; #X text 233 140 _; #X text 278 143 2; #X text 341 143 2; #X text 312 148 gamma * blocksize); #X text 295 148 +; #X text 244 148 x[n-i]; #X text 175 137 my(n) =; #X text 224 132 _________________________________; #X text 29 138 normalized learn rate:; #X text 246 243 <; #X text 250 237 |; #X text 250 249 |; #X text 250 230 |; #X text 250 256 |; #X text 250 270 |; #X text 250 223 |; #X text 254 206 _; #X text 253 270 _; #X text 271 211 W > W_top; #X text 265 275 W < W_bottom; #X text 260 246 &&(W <= W_top); #X text 256 235 (W >= W_bottom); #X text 175 243 W(k+1 \, i) =; #X text 250 216 |; #X text 250 263 |; #X text 346 275 ...... W(k+1 \, i) = W_botton(i); #X text 334 212 ........ W(k+1 \, i) = W_top(i); #X text 174 56 y(n) = W * x(n); #X obj 226 58 cnv 11 1 1 empty empty * 0 9 0 14 -225280 -1 0; #X text 174 74 e(n) = d(n) - W * x(n); #X obj 268 76 cnv 11 1 1 empty empty * 0 9 0 14 -225280 -1 0; #X text 120 75 error:; #X text 117 57 output:; #X text 27 242 coefficient iteration:; #X text 358 243 .... W(k+1 \, i) = W(k \, i) + my(n)* e(n)* x(n); #X restore 457 249 pd FORMULAS; #X obj 54 380 NLMSCC~ 32 0.1 1e-05 W W_bottom W_top; #X obj 103 239 cnv 14 31 14 empty empty empty 20 12 0 14 -225280 -66577 0; #X floatatom 103 239 5 0 2 0 - - -; #X text 139 238 learn-rate; #X obj 97 320 cnv 14 31 14 empty empty empty 20 12 0 14 -225280 -66577 0; #X floatatom 97 320 5 0 2 0 - - -; #X floatatom 26 227 5 0 0 0 - - -; #X text 426 221 Normalized Least Mean Square (linear adaptive FIR-filter) ; #X text 455 232 with Coefficient Constraint; #X text 422 350 (C) 2005 \, m.noisternig & t.musil \, IEM \, Graz \, Austria; #X text 450 363 [noisternig \, musil]_AT_iem.at; #X connect 1 0 73 0; #X connect 2 0 73 0; #X connect 3 0 4 0; #X connect 4 0 5 0; #X connect 4 1 6 0; #X connect 9 0 26 0; #X connect 9 0 73 0; #X connect 10 0 11 0; #X connect 11 0 79 0; #X connect 13 0 73 0; #X connect 19 0 20 0; #X connect 21 0 22 0; #X connect 26 0 73 1; #X connect 27 0 59 0; #X connect 39 0 38 1; #X connect 41 0 38 0; #X connect 50 0 49 1; #X connect 51 0 49 0; #X connect 52 0 53 0; #X connect 53 0 7 0; #X connect 67 0 75 0; #X connect 68 0 78 0; #X connect 73 0 19 0; #X connect 73 1 21 0; #X connect 73 2 52 0; #X connect 75 0 2 0; #X connect 78 0 13 0; #X connect 79 0 1 0; iem_utils-v0.0.20181004/iem_adaptfilt/doc/0000755000175000017500000000000012630366344020237 5ustar zmoelnigzmoelnigiem_utils-v0.0.20181004/iem_adaptfilt/doc/adapt_filt_lib.pdf0000644000175000017500000301231012630366344023667 0ustar zmoelnigzmoelnig%PDF-1.3 % 2 0 obj << /Length 1 0 R /Filter /FlateDecode >> stream x]nG}ϯG `2o 6ž `PdHn[]]Y]+XՕq9qħSt+)\仨vo;՝urί^M_o;w7_P+٩U_gya*|*ƥ_?Y?Tbw')-Xʙѻ*q_+OxnGex'w%/g\Qiu})ջVh+g# #WL~=WV?U>^xEu)S=W\gWߓ=NMO]ϯ :Կ4i?W O &WR'@R0b6v}DccV@>YI'yE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`BO0x5mjOUĜ0~O4cԀ}GþuDTl\b.|xq5V3`&Q9 u FrF2\'UvئC)!I @0S&'r }v6qZ3ųSK8@ ř\KF39>?)/{C57hbE68~5J89S:J- sJai76kPTڬ(I n~? B C]ɞEך J^P-zGa\COtϺ-Yz Vlع|Ѯwp ?xHŹj QxC-C:J5E,T1H^;-7>^1:.~=z @ɻTu 1Rr6([2J>!*rFf,.+wr1N> endobj 6 0 obj << /ProcSet [ /PDF /Text /ImageB /ImageC /ImageI ] /ColorSpace << /Cs1 3 0 R >> /Font << /F2.0 7 0 R /F3.0 8 0 R /F1.0 9 0 R >> /XObject << /Im1 10 0 R /Fm1 11 0 R /Fm2 12 0 R >> >> endobj 11 0 obj << /Length 13 0 R /Type /XObject /Subtype /Form /FormType 1 /BBox [ 0 0 1416 152 ] /Resources 14 0 R /Filter /FlateDecode >> stream xڭձn0Oqb| ]ZC7HJv lȩ!|LG$ _k=m-,xv [hXug=chW0{7T7huA)pH=g!ApoGpO|Jv=$F$h&dHkyH$3(SGWOBeE^^!cd d #950iJ Fij*Z )-`T`P=3: 4> /Font << /F7.0 16 0 R /F5.0 17 0 R /F6.0 18 0 R /F8.0 19 0 R /F4.1 20 0 R >> >> endobj 12 0 obj << /Length 21 0 R /Type /XObject /Subtype /Form /FormType 1 /BBox [ 0 0 2400 128 ] /Resources 22 0 R /Filter /FlateDecode >> stream xڭ=O0w ,"hF$#Mu$<9ٗ5` ڥPzx[(`zQ*晀2as:c e`aLF'cȞ2kug#[XC m}}abB #` Ci(ҥR'S RQ Ej0_cÝQAF0qڜR&øj@ ̉8gbcA+cu!5jQ?djH;R Ah0JE\ф&˒x. *0)u) rhN:DvFq3,ɝBMߪzz€"ˤ]4\c-lr endstream endobj 21 0 obj 399 endobj 22 0 obj << /ProcSet [ /PDF /Text ] /ColorSpace << /Cs3 23 0 R >> /Font << /F9.1 24 0 R /F12.0 25 0 R /F11.0 26 0 R /F13.0 27 0 R /F10.0 28 0 R >> >> endobj 10 0 obj << /Length 29 0 R /Type /XObject /Subtype /Image /Width 284 /Height 238 /ColorSpace 30 0 R /Interpolate true /BitsPerComponent 8 /Filter /FlateDecode >> stream x=WRCB;BCiPy' p×p8(z -f?dUȒ,1-?Ȫ?߹2Rna6̆,ofvl a6ٰ̆vl a6̆0on l a6߰0fl flؿaa6̆0flvl a6ٰ̆vÅ0fl a0.̆0f a6̆pa6̆fl a6̆ 7l7̆0flxga6\ a6ٰ̆vl l aلn M3TEhL}-Ul@.l7VQMlR6lͦ`6V)-k&b6vf6Qգѿ_Lo#kroZsfl a6, 4l! EӼXG>t&#E3LqNtI!l4rԟ&ɥTbxb!.X<|t&X< *23*`A6aן_uׄ|k]Z-Dԛ*ޚ/UumN`^ad)llMN9VhX`tX¿NQ=0ؠʮa ?Ym&kiMQj/>NuylbvHwfE|]SnwaҗHd6-\q| 6Vl*%{7ԒyFXہk;TxUa6MĄ5pRx^X`6_fCp\38gJ-ac[TawT\Bsk;gͱr{VP+{$ %USy|V۩WSuF)UҐRv~6iZ>US d=q&7a_c*{=&G&FsqJhG!\ o2jf5#o:7m<>?wSnɚ5F5ŤWj쥂֍ÃV?a3Qñ_p4V/дK9Sy^?j̵Mdvvbpp(zNg]Xz̜ҔOK9Z8 񺞷;9;{B햲hJ[ߤQ9Yi!_}sCω5wEǖOzH=k7zFqeʜ`7hԳx{Z$$R?&k,]9*qVyTe0:11 ".o5?$uq-Vei%4]JtC͟+r X~pWst7rFϽ+v-G| =qX3YD$<ف.YPbКHvw-%-εWr}mi$hQ(cs=^PClVg7 dsb9nrb¡#ʳY4)jn%/7qxKȓsuv1i FpMNȓ980e,>qX-ifXY7 Y}8#b9} aSC~vwczx4ftְ8{s# @͜b  7#Niw$L̎ãF);/&̣Xdexhc+i*>~,̆0fl>n a6̆0on0fl l[{Я?&q?ߞZ?( endstream endobj 29 0 obj 3088 endobj 30 0 obj [ /Indexed 3 0 R 255 <1f316d1f3476233a7f223a7f22397f243b7e263d7d273d7d273e7c253c7e243c7e253c7d293f7b283f7c3e516f3f526e3d516f2b417a2a407b29407b2d43792c42792e43792c427a2c417a2f4478314677324776304577374b73334875344975354a74364a74374c733b4e71394d723a4d723c4f703045783d50705a695f5b6a5e59685f5d6b5d5c6a5e5e6d5c5d6c5d747f4f606e5b626f5a6b77556875566a76566f7a536c79546d79536b785562705a637159657258667358647159677457737e50717d51747f50707b524b5c674f5f654c5d674d5e664e5f6645576b40536e41536d41546d42556d43566c44566c46586a46586b495a694a5b684859694b5c68424d73424e784f60655363635766605464625565615061645262645463625867605868605f657d75804f76814e7d864a7e874a79834d77824e7a844c7b854b7f88497e884a90973f979d3b92993e92993e949a3d969b3c969c3c999e3a999e3a9ea3379fa4369ba0399ca1389da238acaf2faeb12ebbbb27bdbd25bebe25bcbc26bebd25bbbc26b3b42bb4b52ab5b62ab6b729b1b22cb2b32cb2b42cb7b829b8b928b9ba27a3a735a0a536a1a535a4a734a5a933a7aa32a6a933a4a834a8ab31a9ac31aaad30abae30c0bf24c9c71fcfcc1bcbc91dcac81ecdca1ccdca1ccecb1bd2cf19d0cd1ad1ce1ad1ce19d6d217d5d117dcd713d9d515dbd614d8d416dad515dbd614ddd813ded912dfda11d3d018d4d118e3dd0fe4de0fe6df0ee0db11e2dc10e1dc10e7e00de6e00eeae30bebe40bede609eee709ece50aede60ae9e20ce9e20cefe808f1e907f3ea06f2e907f4eb06f5ec05f6ed04f7ee04f4ec06f6ee04f8ef03f9ef03f8ef04f0e808fbf201f9f003faf102fbf202fdf300fcf201fcf301fef400fff500fdf400c1c023c2c123c3c222c4c321c4c222c5c421c7c520c7c61f828b47838c47868f45848d46858e46808949818a48828b48888f448b92428991438c93428d94418e95408f96408c94428890449096401f37811f3782203781213980203881203880223980717483717584717482878991a3a2a6> ] endobj 32 0 obj << /Length 31 0 R /N 3 /Alternate /DeviceRGB /Filter /FlateDecode >> stream x}OHQǿ%Be&RNW`oʶkξn%B.A1XI:b]"(73ڃ73{@](mzy(;>7PA+Xf$vlqd}䜛] UƬxiO:bM1Wg>q[ 2M'"()Y'ld4䗉2'&Sg^}8&w֚, \V:kݤ;iR;;\u?V\\C9u(JI]BSs_ QP5Fz׋G%t{3qWD0vz \}\$um+٬C;X9:Y^gB,\ACioci]g(L;z9AnI ꭰ4Iݠx#{zwAj}΅Q=8m (o{1cd5Ugҷtlaȱi"\.5汔^8tph0k!~D Thd6챖:>f&mxA4L&%kiĔ?Cqոm&/By#Ց%i'W:XlErr'=_ܗ)i7Ҭ,F|Nٮͯ6rm^ UHW5;?Ͱh endstream endobj 31 0 obj 706 endobj 15 0 obj [ /ICCBased 32 0 R ] endobj 34 0 obj << /Length 33 0 R /N 3 /Alternate /DeviceRGB /Filter /FlateDecode >> stream x}OHQǿ%Be&RNW`oʶkξn%B.A1XI:b]"(73ڃ73{@](mzy(;>7PA+Xf$vlqd}䜛] UƬxiO:bM1Wg>q[ 2M'"()Y'ld4䗉2'&Sg^}8&w֚, \V:kݤ;iR;;\u?V\\C9u(JI]BSs_ QP5Fz׋G%t{3qWD0vz \}\$um+٬C;X9:Y^gB,\ACioci]g(L;z9AnI ꭰ4Iݠx#{zwAj}΅Q=8m (o{1cd5Ugҷtlaȱi"\.5汔^8tph0k!~D Thd6챖:>f&mxA4L&%kiĔ?Cqոm&/By#Ց%i'W:XlErr'=_ܗ)i7Ҭ,F|Nٮͯ6rm^ UHW5;?Ͱh endstream endobj 33 0 obj 706 endobj 3 0 obj [ /ICCBased 34 0 R ] endobj 36 0 obj << /Length 35 0 R /N 3 /Alternate /DeviceRGB /Filter /FlateDecode >> stream x}OHQǿ%Be&RNW`oʶkξn%B.A1XI:b]"(73ڃ73{@](mzy(;>7PA+Xf$vlqd}䜛] UƬxiO:bM1Wg>q[ 2M'"()Y'ld4䗉2'&Sg^}8&w֚, \V:kݤ;iR;;\u?V\\C9u(JI]BSs_ QP5Fz׋G%t{3qWD0vz \}\$um+٬C;X9:Y^gB,\ACioci]g(L;z9AnI ꭰ4Iݠx#{zwAj}΅Q=8m (o{1cd5Ug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\BpqI y\P-cg,H%b5+LT}52% a\;^N-C)l9=%;ՒY*cHPPw]tAiW ! ~ e'3gbĘP-;y6-RSf-U94[x>wY/kVT=pM4A[p-2q*0OlIS^: *rddb*,"ė&#$U P<2 #:("¹\vjXCy 6._x}5 b1F]z58ʣ͟ꃴ+8VǗϱA`=@=5߼vzѬkDKjD ]`V^9{.4|kDVL`)w┍\PzK>61qO(֞3'\m~K%B۽T2^U@q7Ɔ'ܣ領AUi!ou, /a:wr:'Ft"R~&s\yg<0'n/e0A3N;_xnJL^Bi%|6fZ|ZI:u@\rb:b* iA[ɧ=$7֍68``dm`)v2YB:SG@M@MA:<ԹDJSA,ي+o%I3TnHZZ:fA udjxDk@эλcU좛YϮ2L ٵNsc)֜Mٕ\T={$lUS!]ÚvgסNQ'C*\>_H6/rukdd!k/Fb!+3AdmwصxVj0!%"h7֮FVX!lfJIUoKj0"tNR}$TIG SdwlҐ03 f3&u?'qS Ӎ26LfStoA1QÜ!IMg30V9ETW< U`ua=ǀUj@v2?S^0lE5n\ Jnyl&:oj8ƇJr},='^Z3Pv\ endstream endobj 37 0 obj 3345 endobj 39 0 obj << /Type /Page /Parent 5 0 R /Resources 40 0 R /Contents 38 0 R /MediaBox [ 0 0 595 842 ] >> endobj 40 0 obj << /ProcSet [ /PDF /Text /ImageB /ImageC /ImageI ] /ColorSpace << /Cs1 3 0 R >> /Font << /F2.0 7 0 R /F1.0 9 0 R >> /XObject << /Im3 41 0 R /Im2 42 0 R /Fm5 43 0 R /Fm6 44 0 R /Fm7 45 0 R /Fm9 46 0 R /Fm12 47 0 R /Fm3 48 0 R /Fm13 49 0 R /Fm8 50 0 R /Fm4 51 0 R /Fm10 52 0 R /Fm11 53 0 R >> >> endobj 43 0 obj << /Length 54 0 R /Type /XObject /Subtype /Form /FormType 1 /BBox [ 0 0 1456 160 ] /Resources 55 0 R /Filter /FlateDecode >> stream xڭֱN0Oq0u}, *Eb P+>Ihb&Jz`y%dp[X^3usv/=q<]ϰ0 ,oJl._`v6nRh jI#:HDA``|t0cU>n0ފ֡Mj@gE H Kٖ Uz)"ut.KT~SM(B*L"dO?T {Jl{B`MOYč%[ghzYKH'SS?mPҟHT~B"4#O|$0S/:VڛJLڽ+S0Yϋ)Sc4#Εos]D1Z,r3ƂWRf^M|yiG_r@=FFC endstream endobj 54 0 obj 429 endobj 55 0 obj << /ProcSet [ /PDF /Text ] /ColorSpace << /Cs6 56 0 R >> /Font << /F15.0 57 0 R /F16.0 58 0 R /F18.0 59 0 R /F14.1 60 0 R /F17.0 61 0 R >> >> endobj 44 0 obj << /Length 62 0 R /Type /XObject /Subtype /Form /FormType 1 /BBox [ 0 0 448 128 ] /Resources 63 0 R /Filter /FlateDecode >> stream xڥн08[J$M|d- Q i m빷F=BhxqQ())۸]ڃej$L a+G2 {z`]cJx+9H%_yzջweDo| 3B4p+W.܂g? i{ "M x:" endstream endobj 62 0 obj 206 endobj 63 0 obj << /ProcSet [ /PDF /Text ] /ColorSpace << /Cs7 64 0 R >> /Font << /F22.0 65 0 R /F21.0 66 0 R /F19.1 67 0 R /F20.0 68 0 R >> >> endobj 45 0 obj << /Length 69 0 R /Type /XObject /Subtype /Form /FormType 1 /BBox [ 0 0 1384 160 ] /Resources 70 0 R /Filter /FlateDecode >> stream xڭN0 {p8?́ &U&mKڤ i괵<۵5ARxnlg/͡9qa!RPoau'~p[_R:((&' %y4toMd|f0Q(#O"\PvEP.J̆\ Ee}"DI!!)E$"JrlQSљNɤ3gt߄9 3YImI$ʉUfnُi gU%FvTD32?0.p;wݒGP&.ld 2ƗPin""X-2;}7Fʹob>K0BNp$Ǝc琄<}S>O#H: /A endstream endobj 69 0 obj 434 endobj 70 0 obj << /ProcSet [ /PDF /Text ] /ColorSpace << /Cs8 71 0 R >> /Font << /F27.0 72 0 R /F26.0 73 0 R /F25.0 74 0 R /F24.0 75 0 R /F23.1 76 0 R >> >> endobj 46 0 obj << /Length 77 0 R /Type /XObject /Subtype /Form /FormType 1 /BBox [ 0 0 1480 416 ] /Resources 78 0 R /Filter /FlateDecode >> stream xڝn0EӦMD@Ev@7Jċ~II!k$ql/dh^oExKiGc>Mv!q_v-tzWtB)^qQggTo@ifJehNƓni9'ȍS[GΈ&3r3ڍy~>b96qd)ܴ-mHj=܌;(k󚳆t{{> /Font << /F28.1 80 0 R /F30.0 81 0 R /F31.0 82 0 R /F29.0 83 0 R /F32.0 84 0 R >> >> endobj 47 0 obj << /Length 85 0 R /Type /XObject /Subtype /Form /FormType 1 /BBox [ 0 0 1744 256 ] /Resources 86 0 R /Filter /FlateDecode >> stream xڭAO0+X"xlB{ _NqڸZ)U~y~< "5J6p \n? ,}x_];+|,0zF+|TN/+^dXrKQHlM@ҹhH'A'$U n) F˃ nJz-V{ ńJ:G~@b[:(\D)ݰEuaj5jH?G;DiWu,M;w9S0H~AKPbhlR(J'eJxDq"A80|IFX͐@=IE'ŶHKDNTFd)'FQCm#C稒|*)V)bQ†G~z3cilNEs\̢O(rpĒp1mQ,dZhq5!alTۉNV{1l >#S(VX-fwE endstream endobj 85 0 obj 535 endobj 86 0 obj << /ProcSet [ /PDF /Text ] /ColorSpace << /Cs10 87 0 R >> /Font << /F36.0 88 0 R /F33.1 89 0 R /F35.0 90 0 R /F34.0 91 0 R /F37.0 92 0 R >> >> endobj 48 0 obj << /Length 93 0 R /Type /XObject /Subtype /Form /FormType 1 /BBox [ 0 0 1848 248 ] /Resources 94 0 R /Filter /FlateDecode >> stream xڭMo0 5uv/bl5@CʉfK[A+/7|7dCVZ'>["\ow2ܮ}[޶+>4WVW!lM^_Tm <4PjH'A'&Grϐc.ah3}dWk :RHdu@lDlJ (&}nn eC%!U5@Z ~ pX1D*9'?0tPB1f2*a Q"_^C8%Sjr&zUG2̍.(=)HŶ)dX#.X1bj%XJbYd)JkB=Y>61 rMB<1;IFRxwQ&lhS,+*N7R> /Font << /F41.0 96 0 R /F42.0 97 0 R /F40.0 98 0 R /F39.0 99 0 R /F38.1 100 0 R >> >> endobj 49 0 obj << /Length 101 0 R /Type /XObject /Subtype /Form /FormType 1 /BBox [ 0 0 1400 384 ] /Resources 102 0 R /Filter /FlateDecode >> stream xڕMo0 \bk*R>l۽]v Öthsߟؖ)q ሏ_/%_RBt _7 ay SaQއ!\>\aLJJ.ȧ[}wvw(B$$= $$2wd6=Ï!+3[e"Ď߷% $՝PtPM _ C5)E(wPM!ye@ 7bw #D[WUWe>F;\yf gQ(i"aoېAw1I7D!c(66D#5V<.H`ݯϤRlle%zȇYH;X ؓpq{8{8*#k đ*B0|^H@ %6*䦨妆b9UJlcT9E$nuQ\+0VdV5 -h8̞fb>@1tJԐK25ߠF꼣 $AN$;9.<A'jS+y= endstream endobj 101 0 obj 587 endobj 102 0 obj << /ProcSet [ /PDF /Text ] /ColorSpace << /Cs12 103 0 R >> /Font << /F45.0 104 0 R /F43.1 105 0 R /F46.0 106 0 R /F47.0 107 0 R /F44.0 108 0 R >> >> endobj 50 0 obj << /Length 109 0 R /Type /XObject /Subtype /Form /FormType 1 /BBox [ 0 0 944 160 ] /Resources 110 0 R /Filter /FlateDecode >> stream xڥO0{'^0׾/=x#4񠞈4}hX!eYt맯 fL[0# `2(ŦYTs:w.p!hZØɃR.W7?>6u)"nu\HAbvNThIh4r) *ŊlѧvdQyjnj3TAT@2t[h dep)r! )R3BD&rsF5Aq?X|`-r'j2D:)eås9m/Jk;Xdr]p"GN!M⹚>5f)<Šf. endstream endobj 109 0 obj 359 endobj 110 0 obj << /ProcSet [ /PDF /Text ] /ColorSpace << /Cs13 111 0 R >> /Font << /F50.0 112 0 R /F51.0 113 0 R /F49.0 114 0 R /F48.1 115 0 R >> >> endobj 51 0 obj << /Length 116 0 R /Type /XObject /Subtype /Form /FormType 1 /BBox [ 0 0 1984 272 ] /Resources 117 0 R /Filter /FlateDecode >> stream xڭKO@\C/ ^8j@׳6!;xWjr_;,jxv!:}0|s=D~&> /Font << /F56.0 119 0 R /F54.0 120 0 R /F52.1 121 0 R /F55.0 122 0 R /F53.0 123 0 R >> >> endobj 52 0 obj << /Length 124 0 R /Type /XObject /Subtype /Form /FormType 1 /BBox [ 0 0 976 160 ] /Resources 125 0 R /Filter /FlateDecode >> stream xڥ?O1Lm"LoC $G_>f_@#` O  2^qsh\.7+Yëp JN1MI,N)|$WBHqa|< ˆ<ţs$svY? ƈ=򬌁"Hw)𰜤 "^EHQbT/"J:QF%X$-/E"[_,9E8Eq~,͌j MX1xO+hN;S> ^*vC,9~m8/MeT:!o7 endstream endobj 124 0 obj 358 endobj 125 0 obj << /ProcSet [ /PDF /Text ] /ColorSpace << /Cs15 126 0 R >> /Font << /F60.0 127 0 R /F57.1 128 0 R /F59.0 129 0 R /F58.0 130 0 R >> >> endobj 53 0 obj << /Length 131 0 R /Type /XObject /Subtype /Form /FormType 1 /BBox [ 0 0 1544 152 ] /Resources 132 0 R /Filter /FlateDecode >> stream xڭ?O0S+K l,1SJ7>=n%k'P&j_{>gk#J/;\Qsr-XsVA!F9ws(r8`2I0ޒ0MNOH!;$C 4+1>JtXy@A1R^ɮR>!қsA K$ ݑz&TlC%JД?Q`?G PD0OUz ##!2HCtY)*huc)aqeą΍"-C`V1%LPxOmG-^āVI!7 endstream endobj 131 0 obj 425 endobj 132 0 obj << /ProcSet [ /PDF /Text ] /ColorSpace << /Cs16 133 0 R >> /Font << /F64.0 134 0 R /F61.1 135 0 R /F63.0 136 0 R /F62.0 137 0 R /F65.0 138 0 R >> >> endobj 41 0 obj << /Length 139 0 R /Type /XObject /Subtype /Image /Width 964 /Height 590 /ColorSpace 3 0 R /Interpolate true /BitsPerComponent 8 /Filter /FlateDecode >> stream xwxUE zo*U@ 6){PBI 4C I^. 5@%"uu>}9D&y9Ι3g}}岰HE/_r^cn߾mcx k?~e3"y?ܸqQQQᡡ^tDfۼ<~۷oacN%Wmaaaa, KC?}6,,,,<ڵkW\?Ἆ? uuXXXX$#Q+X]Іao6iXXXXXx/_L3ǿ/i昅灄NV3ZX#blQms3駟z-3HN?昅c pŋϞ=ұXʕ+6,,,,<[Κ5gϞ|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|ՍkW{#adG[BvM`!5yVAAqXzG:^ܺ䇧;3#>qx q<*U5}z#z)RQ>ʤ PU1X'4-_&_{   7<.BmKسsۦƓ#>]M'2鸘#+jk?hiNuERAAĜHh/d#G D>odPiyTËψOO)mOzyfWG  7FC-D}7y+NDj[Ɠ'@K8נmhԞߗX9jʶSAA1{Iރ-o>mzoh\)m H3:t`$ s7mOJeB#/ϝYWGR)  =K?۝=|`W7oh= x#]* .7oߺA^5<. o|m}}-L_߾q'%Oytu7H BX endstream endobj 140 0 obj 185942 endobj 142 0 obj << /Length 141 0 R /N 3 /Alternate /DeviceRGB /Filter /FlateDecode >> stream x}OHQǿ%Be&RNW`oʶkξn%B.A1XI:b]"(73ڃ73{@](mzy(;>7PA+Xf$vlqd}䜛] UƬxiO:bM1Wg>q[ 2M'"()Y'ld4䗉2'&Sg^}8&w֚, \V:kݤ;iR;;\u?V\\C9u(JI]BSs_ QP5Fz׋G%t{3qWD0vz \}\$um+٬C;X9:Y^gB,\ACioci]g(L;z9AnI ꭰ4Iݠx#{zwAj}΅Q=8m (o{1cd5Ugҷtlaȱi"\.5汔^8tph0k!~D Thd6챖:>f&mxA4L&%kiĔ?Cqոm&/By#Ց%i'W:XlErr'=_ܗ)i7Ҭ,F|Nٮͯ6rm^ UHW5;?Ͱh endstream endobj 141 0 obj 706 endobj 56 0 obj [ /ICCBased 142 0 R ] endobj 144 0 obj << /Length 143 0 R /N 3 /Alternate /DeviceRGB /Filter /FlateDecode >> stream x}OHQǿ%Be&RNW`oʶkξn%B.A1XI:b]"(73ڃ73{@](mzy(;>7PA+Xf$vlqd}䜛] UƬxiO:bM1Wg>q[ 2M'"()Y'ld4䗉2'&Sg^}8&w֚, \V:kݤ;iR;;\u?V\\C9u(JI]BSs_ QP5Fz׋G%t{3qWD0vz \}\$um+٬C;X9:Y^gB,\ACioci]g(L;z9AnI ꭰ4Iݠx#{zwAj}΅Q=8m (o{1cd5Ugҷtlaȱi"\.5汔^8tph0k!~D Thd6챖:>f&mxA4L&%kiĔ?Cqոm&/By#Ց%i'W:XlErr'=_ܗ)i7Ҭ,F|Nٮͯ6rm^ UHW5;?Ͱh endstream endobj 143 0 obj 706 endobj 64 0 obj [ /ICCBased 144 0 R ] endobj 146 0 obj << /Length 145 0 R /N 3 /Alternate /DeviceRGB /Filter /FlateDecode >> stream x}OHQǿ%Be&RNW`oʶkξn%B.A1XI:b]"(73ڃ73{@](mzy(;>7PA+Xf$vlqd}䜛] UƬxiO:bM1Wg>q[ 2M'"()Y'ld4䗉2'&Sg^}8&w֚, \V:kݤ;iR;;\u?V\\C9u(JI]BSs_ QP5Fz׋G%t{3qWD0vz \}\$um+٬C;X9:Y^gB,\ACioci]g(L;z9AnI ꭰ4Iݠx#{zwAj}΅Q=8m (o{1cd5Ugҷtlaȱi"\.5汔^8tph0k!~D Thd6챖:>f&mxA4L&%kiĔ?Cqոm&/By#Ց%i'W:XlErr'=_ܗ)i7Ҭ,F|Nٮͯ6rm^ UHW5;?Ͱh endstream endobj 145 0 obj 706 endobj 126 0 obj [ /ICCBased 146 0 R ] endobj 148 0 obj << /Length 147 0 R /N 3 /Alternate /DeviceRGB /Filter /FlateDecode >> stream x}OHQǿ%Be&RNW`oʶkξn%B.A1XI:b]"(73ڃ73{@](mzy(;>7PA+Xf$vlqd}䜛] UƬxiO:bM1Wg>q[ 2M'"()Y'ld4䗉2'&Sg^}8&w֚, \V:kݤ;iR;;\u?V\\C9u(JI]BSs_ QP5Fz׋G%t{3qWD0vz \}\$um+٬C;X9:Y^gB,\ACioci]g(L;z9AnI ꭰ4Iݠx#{zwAj}΅Q=8m (o{1cd5Ugҷtlaȱi"\.5汔^8tph0k!~D Thd6챖:>f&mxA4L&%kiĔ?Cqոm&/By#Ց%i'W:XlErr'=_ܗ)i7Ҭ,F|Nٮͯ6rm^ UHW5;?Ͱh endstream endobj 147 0 obj 706 endobj 133 0 obj [ /ICCBased 148 0 R ] endobj 150 0 obj << /Length 149 0 R /N 3 /Alternate /DeviceRGB /Filter /FlateDecode >> stream x}OHQǿ%Be&RNW`oʶkξn%B.A1XI:b]"(73ڃ73{@](mzy(;>7PA+Xf$vlqd}䜛] UƬxiO:bM1Wg>q[ 2M'"()Y'ld4䗉2'&Sg^}8&w֚, \V:kݤ;iR;;\u?V\\C9u(JI]BSs_ QP5Fz׋G%t{3qWD0vz \}\$um+٬C;X9:Y^gB,\ACioci]g(L;z9AnI ꭰ4Iݠx#{zwAj}΅Q=8m (o{1cd5Ugҷtlaȱi"\.5汔^8tph0k!~D Thd6챖:>f&mxA4L&%kiĔ?Cqոm&/By#Ց%i'W:XlErr'=_ܗ)i7Ҭ,F|Nٮͯ6rm^ UHW5;?Ͱh endstream endobj 149 0 obj 706 endobj 87 0 obj [ /ICCBased 150 0 R ] endobj 152 0 obj << /Length 151 0 R /N 3 /Alternate /DeviceRGB /Filter /FlateDecode >> stream x}OHQǿ%Be&RNW`oʶkξn%B.A1XI:b]"(73ڃ73{@](mzy(;>7PA+Xf$vlqd}䜛] UƬxiO:bM1Wg>q[ 2M'"()Y'ld4䗉2'&Sg^}8&w֚, \V:kݤ;iR;;\u?V\\C9u(JI]BSs_ QP5Fz׋G%t{3qWD0vz \}\$um+٬C;X9:Y^gB,\ACioci]g(L;z9AnI ꭰ4Iݠx#{zwAj}΅Q=8m (o{1cd5Ugҷtlaȱi"\.5汔^8tph0k!~D Thd6챖:>f&mxA4L&%kiĔ?Cqոm&/By#Ց%i'W:XlErr'=_ܗ)i7Ҭ,F|Nٮͯ6rm^ UHW5;?Ͱh endstream endobj 151 0 obj 706 endobj 71 0 obj [ /ICCBased 152 0 R ] endobj 154 0 obj << /Length 153 0 R /N 3 /Alternate /DeviceRGB /Filter /FlateDecode >> stream x}OHQǿ%Be&RNW`oʶkξn%B.A1XI:b]"(73ڃ73{@](mzy(;>7PA+Xf$vlqd}䜛] UƬxiO:bM1Wg>q[ 2M'"()Y'ld4䗉2'&Sg^}8&w֚, \V:kݤ;iR;;\u?V\\C9u(JI]BSs_ QP5Fz׋G%t{3qWD0vz \}\$um+٬C;X9:Y^gB,\ACioci]g(L;z9AnI ꭰ4Iݠx#{zwAj}΅Q=8m (o{1cd5Ugҷtlaȱi"\.5汔^8tph0k!~D Thd6챖:>f&mxA4L&%kiĔ?Cqոm&/By#Ց%i'W:XlErr'=_ܗ)i7Ҭ,F|Nٮͯ6rm^ UHW5;?Ͱh endstream endobj 153 0 obj 706 endobj 118 0 obj [ /ICCBased 154 0 R ] endobj 156 0 obj << /Length 155 0 R /N 3 /Alternate /DeviceRGB /Filter /FlateDecode >> stream x}OHQǿ%Be&RNW`oʶkξn%B.A1XI:b]"(73ڃ73{@](mzy(;>7PA+Xf$vlqd}䜛] UƬxiO:bM1Wg>q[ 2M'"()Y'ld4䗉2'&Sg^}8&w֚, \V:kݤ;iR;;\u?V\\C9u(JI]BSs_ QP5Fz׋G%t{3qWD0vz \}\$um+٬C;X9:Y^gB,\ACioci]g(L;z9AnI ꭰ4Iݠx#{zwAj}΅Q=8m (o{1cd5Ugҷtlaȱi"\.5汔^8tph0k!~D Thd6챖:>f&mxA4L&%kiĔ?Cqոm&/By#Ց%i'W:XlErr'=_ܗ)i7Ҭ,F|Nٮͯ6rm^ UHW5;?Ͱh endstream endobj 155 0 obj 706 endobj 79 0 obj [ /ICCBased 156 0 R ] endobj 158 0 obj << /Length 157 0 R /N 3 /Alternate /DeviceRGB /Filter /FlateDecode >> stream x}OHQǿ%Be&RNW`oʶkξn%B.A1XI:b]"(73ڃ73{@](mzy(;>7PA+Xf$vlqd}䜛] UƬxiO:bM1Wg>q[ 2M'"()Y'ld4䗉2'&Sg^}8&w֚, \V:kݤ;iR;;\u?V\\C9u(JI]BSs_ QP5Fz׋G%t{3qWD0vz \}\$um+٬C;X9:Y^gB,\ACioci]g(L;z9AnI ꭰ4Iݠx#{zwAj}΅Q=8m (o{1cd5Ugҷtlaȱi"\.5汔^8tph0k!~D Thd6챖:>f&mxA4L&%kiĔ?Cqոm&/By#Ց%i'W:XlErr'=_ܗ)i7Ҭ,F|Nٮͯ6rm^ UHW5;?Ͱh endstream endobj 157 0 obj 706 endobj 111 0 obj [ /ICCBased 158 0 R ] endobj 160 0 obj << /Length 159 0 R /N 3 /Alternate /DeviceRGB /Filter /FlateDecode >> stream x}OHQǿ%Be&RNW`oʶkξn%B.A1XI:b]"(73ڃ73{@](mzy(;>7PA+Xf$vlqd}䜛] UƬxiO:bM1Wg>q[ 2M'"()Y'ld4䗉2'&Sg^}8&w֚, \V:kݤ;iR;;\u?V\\C9u(JI]BSs_ QP5Fz׋G%t{3qWD0vz \}\$um+٬C;X9:Y^gB,\ACioci]g(L;z9AnI ꭰ4Iݠx#{zwAj}΅Q=8m (o{1cd5Ugҷtlaȱi"\.5汔^8tph0k!~D Thd6챖:>f&mxA4L&%kiĔ?Cqոm&/By#Ց%i'W:XlErr'=_ܗ)i7Ҭ,F|Nٮͯ6rm^ UHW5;?Ͱh endstream endobj 159 0 obj 706 endobj 95 0 obj [ /ICCBased 160 0 R ] endobj 162 0 obj << /Length 161 0 R /N 3 /Alternate /DeviceRGB /Filter /FlateDecode >> stream x}OHQǿ%Be&RNW`oʶkξn%B.A1XI:b]"(73ڃ73{@](mzy(;>7PA+Xf$vlqd}䜛] UƬxiO:bM1Wg>q[ 2M'"()Y'ld4䗉2'&Sg^}8&w֚, \V:kݤ;iR;;\u?V\\C9u(JI]BSs_ QP5Fz׋G%t{3qWD0vz \}\$um+٬C;X9:Y^gB,\ACioci]g(L;z9AnI ꭰ4Iݠx#{zwAj}΅Q=8m (o{1cd5Ugҷtlaȱi"\.5汔^8tph0k!~D Thd6챖:>f&mxA4L&%kiĔ?Cqոm&/By#Ց%i'W:XlErr'=_ܗ)i7Ҭ,F|Nٮͯ6rm^ UHW5;?Ͱh endstream endobj 161 0 obj 706 endobj 103 0 obj [ /ICCBased 162 0 R ] endobj 163 0 obj << /Length 164 0 R /Length1 5760 /Filter /FlateDecode >> stream xW{xSU_k4m$-4 4MI@jӒPKy`R(JjaFt^$=t 8w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=EL |uS5k*-k}UjwtQC7,E۩)Q-WiQEe Q %ʶl+AJm!HLQv?ARGe Q{ Qve Qv7eB \u([OqFT:<(Ýaܙ;*7SmfKx-3~Kx5R.nMrƗ)+[Ԕf7wL\-62'PJ [ !7#ṛSkۚ?Vk 3~\?Ǐ;V~Z89%N$M}X+!M}/mlR'!8_]I(JB!Gp L!`5 Ɇ$`0 :3!-\4YNuLY/J{V*P&*P*tPR.Ug.v9޼míCkE U ʖ>l16z|JUpon$&<2}nM_G#EjCWl<+ Y A\&&RZH˂^U z,Ml* j"^DzH_|%)$HLo&U16DI&ͪ6gh$r"^7 p>6nƽƪ댣T?\F*uܴ~a{-nIC @d+>xp+jJ[־z|Ʈ~]׌ob3T]v`x:> endobj 166 0 obj [ 722 778 778 444 ] endobj 119 0 obj << /Type /Font /Subtype /TrueType /BaseFont /RBNCJB+Times-Bold /FontDescriptor 165 0 R /Widths 166 0 R /FirstChar 119 /LastChar 122 /Encoding /MacRomanEncoding >> endobj 167 0 obj << /Length 168 0 R /Length1 5684 /Filter /FlateDecode >> stream xڭW tTE}tI}ovm:!!!NM !bB 6 L3qgAҲL ;ct݉xo7{f윳꫿@ 0 Wf`mbC!iw`z^LJ>e}`9R`æ[vmԛt|D icc>tw>Ez7yoݠ>V ˍ<˱6mFHED l<%C.s[ƸR(=H熧>x 66QAC= - $q.7pg^E<aC p-lp F݅KW߀F~2j5CNأ"FMp'ɭԏv~!I %HHg, =ӡGZ=#mTWB`>t[n؋wJWQZ,>ZQMp5 A|KRQW'ԗ/tsTC3]ka߁w1M'$%uMb]L8Qr3^MZ]szƑq<|MCJIr!'i]Ay:}G_dSl#Y빭0wPvXylYlel(vVUZG(FO'`;?Fu!,Ԋ+mX;ow*x k\K^Ǩ%ep=8FQ;YB:ud%!}l9aC~| qr|Er4ڨD 12t n\t+EF{c Ti4$3&)b2nfK  3\d.1RǾľO+pK܍(w?7E e6~7 ?oai?B_ó, G)z`{gyZpOWyWV3g<?`|>V bGշj_ c Gq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EtH.HW9E\g:{/nz gBm-ވH e[V endstream endobj 168 0 obj 4048 endobj 169 0 obj << /Type /FontDescriptor /Ascent 750 /CapHeight 0 /Descent -250 /Flags 96 /FontBBox [ -10 -12 768 682 ] /FontName /RBNCJB+Times-Italic /ItalicAngle -15 /StemV 0 /MaxWidth 1000 /FontFile2 167 0 R >> endobj 170 0 obj [ 444 611 611 500 ] endobj 106 0 obj << /Type /Font /Subtype /TrueType /BaseFont /RBNCJB+Times-Italic /FontDescriptor 169 0 R /Widths 170 0 R /FirstChar 107 /LastChar 110 /Encoding /MacRomanEncoding >> endobj 171 0 obj << /Length 172 0 R /Length1 3600 /Filter /FlateDecode >> stream xՖxU{/5ed,XD "@hL ƅ2@k nSE7$(*PF-H5&w}{W?z99 @6 $/V)/^*eJP =0^ZVfk._ q-unZ;H[&W) Dl@ Va\fQV6S[D=eEIْ< ͢Wv==#rIqtI8)_ach|HЁz&aZPڱO@63؇cR" ^Ӎ64M/ B7{6 V:ѢvEIij@;åf' ~!G7zV*P'}4+N2}W<%їw81z,V/L6u@Vo9xUU;?O$m{q@$L2N?%[Bj{Bϗ@6vawIM2dK!tS'Rxs6z9!Թur/T=+V\r#z>PH82 nTz9vk1PF&U dFL^ظ/:ΛR]u.o]d*U7U{xiQ)xx}ՆlFV繎 )Nbi$xWaQS#}ץ4:I;(b'mȹ<130YN]'ƹ"ZMbٻCѝN}JV>F aZzkjì|#,{ޗܶҲ*]`35*9o=dΈg=pD<Azu1B;uLkն|\/gWc?:Z֒kիs{uVbZaQs̭+0Llrf-_ceRr ,&B. 2vMyΧ\H~G~, rP'$gwș?H_`iqGO<%Io''m8imdYy,Y2Mf (3d&‘?M#0\pm\(CO8Dn #Na*)2FFВLyۻ>E̾obDF2:_ztmm)%p7ZH(i/G~ه>zr(CFndFV|BnIyBJD)>(5VU<$ : endstream endobj 172 0 obj 1919 endobj 173 0 obj << /Type /FontDescriptor /Ascent 701 /CapHeight 0 /Descent -299 /Flags 32 /FontBBox [ 41 -202 550 729 ] /FontName /LCQCJB+Symbol /ItalicAngle 0 /StemV 0 /MaxWidth 1042 /FontFile2 171 0 R >> endobj 174 0 obj [ 250 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 549 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 333 600 333 ] endobj 75 0 obj << /Type /Font /Subtype /TrueType /BaseFont /LCQCJB+Symbol /FontDescriptor 173 0 R /Widths 174 0 R /FirstChar 32 /LastChar 93 /Encoding /MacRomanEncoding >> endobj 175 0 obj << /Length 176 0 R /Length1 5096 /Filter /FlateDecode >> stream x7kte~UUyT ytbBuIGwhĤtGHx  ,(0Ttgq*MtQp2У3#"koU" Ѱ8P[(Hr[V_(+%sQn^p NXp&QF66GX;ZlS_'X)~I|x@{c }'⃧εwms,GI`ǁ?ƅH= # e I}e%4XQIy(dȂXJ|` <'Ӡ>"KXd[?:M"!Ay?O^/_6YMrK*d%ЉylR$aAR ބnCq`lYw"K`6eݜ񔞦:v0Ex~aN\s8'7NMP?v |FQga'<*(L7R>rt>n qi'] a0b[,XAj8zǫ.-e{}&I UU>!P " 6R ApؕiؒFYccI<rΪ&jxsҤ0>g]0&äeZ`|v ~#w*,2/.U"pAe`MaR>:.Xhq8r5lq6kbsdZ@r[C*47TG hX#.GKv.۾g~XfUJudpm̴[AMCI7$MKZֳju T5 5m)&o[;AE++7DmC?2N^ \Sw.hDrN45{IN0 2h4"rQcViBitP΁) K,k`q޾_gwCeɂ%4D dcq2B񕣪Ζ3ji%S%PV2XbJSMC VP˭L]( ^/V]1cEfd%F%&'%gI9%!cl3ئ[}Wl@׋q`}-R,rqEޱIx}gc([PWV118~\֔ }uz}(^*uGl .)3e]rrd!@"+D1(!B4Ec)D.4<6QqF3ggILHN,92F㋼lRG}e Uwu}\Ϥ|?ØObwXwOiC$dGAt)] +(E6K2g9K#BV9K$Fۨ Ptl;+0| EIkZNNhcIq IɉBqt2,ba5c]Uնԙ#Zh"nN:Oi)z{36ݚF?L?cjD(Wmf(PkxdA|ށ9iVfJnKJJ[YЋbrzoܸ?\],\0?d'oßBl4l6;}7ģw4S`5<sΑOpnĐZt%aV$If7gFeuENyu큥F czFZ.Xc=cٙlSj7)ǜl5gj!! |:I3hFq&QD f<[ ,D?Iz&(t$$a>qaq:qF&!8ɹ)8)L 8*o/QQC4A[A'ycsvI.[31ǵre\V+[+ʼnԷȩ YYr(KU:Kʒhu/Wj߫7UˏU eGܜ&JIwp؝;b!Ⱦ$vC^%'H `}.+剸ylf3*x%zLٴly%B˂A\^"`<<>ǂO2p^)R ~hLv4Ɩ`̅>JT!pwa妻NIr-?$kv* _+VNw/)+Gr;fxש}^R^u?ޢTv՛lVTϫJ~xe22}(d&Zӕrwr_D$˃ʸcNQrh{aeL}A!QSf-狳b]b8RLx*HR$IJ !c ,1&mĕ; %FW+& 'uK㊫|w眻tmWm_z6 hs5uklhSjBxſ8D+$~ j٦& D~Xd~f[|2.4sKYowכmmt |(s-ݦU3oOf:J7ydR5Lzzɠ;TWuz!!^R֊/lmtMN+=M.j7^n]M-mj/8[};w]Ի \vzw\uPܼ}X[nZ.ζΖ6F,oڬn6c{/Y.cţ[|u' endstream endobj 176 0 obj 3501 endobj 177 0 obj << /Type /FontDescriptor /Ascent 750 /CapHeight 0 /Descent -250 /Flags 32 /FontBBox [ -17 -143 699 674 ] /FontName /DWQCJB+Times-Roman /ItalicAngle 0 /StemV 0 /MaxWidth 1000 /FontFile2 175 0 R >> endobj 178 0 obj [ 250 722 722 722 722 722 722 722 722 722 722 722 250 722 250 722 500 500 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 333 ] endobj 113 0 obj << /Type /Font /Subtype /TrueType /BaseFont /DWQCJB+Times-Roman /FontDescriptor 177 0 R /Widths 178 0 R /FirstChar 32 /LastChar 246 /Encoding /MacRomanEncoding >> endobj 179 0 obj << /Length 180 0 R /Length1 26916 /Filter /FlateDecode >> stream xڌ |T|ιssܙd2$!!$%HE (jVqA_uז %ڒj[-E2=΀~_&g{ysfFV yKJ:ԼC>C߇F+K؇C}W}VՊ$B3W._\EMpJN3@]+(?tKL5wBfByѕK\jmP^m׌巠[{5 ; @[}=(BCÈ}#>%ŚokOX%ik=>2"ļR+ 3@jUJ6ȉ\ȍ<ȋ|ȏP'B($AQCqTT'o#s7܇?ͮARnuOǑB(EvA=规AG*L@p=uL @0GS܁nQ4=oEAЍ= =w?eLܙ? ѽluX=\v(}K7]-B %yB7Kh ߊGTlU:V\l?cGag$d We >WGA[L, ABc' 0ތ36h)ڂN ؓM@8wډE/Wџ<2ג\:Ó[a^k!< z~\| =?W71 4 O[x7?7(n"y%)e03BT_LsGr_d*;`Bp| jZzl;ڍA@?C;|IטnrÈXq\ow17Qç "O)!"|FN3:FbZ{w6y}=ɍwN(rr{r{pd.&M*/CY֣ 0G`ُы-кG!2^P@9L,0 P />6|>{NH+ oM.!=YL|~N~M>$'b̈Lig.gnev2̯T1USF4v1}'= suuz6SտU5q.}]|*Mv<1)?sewdy}x7O\iTݬzFq&şE؍?9 gd:p1(yݏF =1A|n EߌVLZ8Y597I"gч̿Y8G gʩh/pOT/!&No禰07H+өhTtգ&8"F?ah:Qyl%y-U݅N03׃~,t%Z{zXP /DSJ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5xq,t6Ҡ7!SӴ_La=폧AV/dĔX :2KF]鉶QE0i NO|w6 QMxuF@[{]8ԗ Ye%[E[Ukct H%DGME!ڐSuC:zW}::tzV5WkUJhr{ʕI U8%lVcL1u+ $EFY9 d) <> endobj 182 0 obj [ 250 778 778 778 778 778 778 778 333 333 778 778 778 333 250 778 778 500 500 500 778 778 778 778 778 778 333 778 778 778 778 778 778 722 778 722 722 778 611 778 778 389 778 778 667 944 722 778 611 778 778 556 778 778 778 778 778 778 778 778 778 778 778 500 778 500 556 444 556 444 333 500 556 278 778 556 278 833 556 500 556 556 444 389 333 556 500 778 778 500 444 ] endobj 7 0 obj << /Type /Font /Subtype /TrueType /BaseFont /VXHDSM+TimesNewRomanPS-BoldMT /FontDescriptor 181 0 R /Widths 182 0 R /FirstChar 32 /LastChar 122 /Encoding /MacRomanEncoding >> endobj 183 0 obj << /Length 184 0 R /Length1 5056 /Filter /FlateDecode >> stream xڭ7}\WޙɄ'!@>(D bEZZElEOW[ۭnZWno}ֵ_v_]jwkɼ3~xsr{;7@ ͷ 6w.*D_l‚e 6|g>z;[[|9C=kEAx+ۏֶF>#H{`g!߅ͷj~9ۑ,ltyY}Je7B;=ڲ}Gu>t0qj2:V*! y},A=o*dT/jC": r!#\&9Cp* 2z`:CyƐAxex Gv-GSFY!@=zy~}T+_ 6yz)s1,#Yt4b|FbBPnXK)Խ #')ٰv 8p:' ?_ scB:NO H!YJd*$3HlRO|d1YG:SdKd?Σa's#+/RLmN%Z0Gi+]DVaO 0LCSy#sl}5{^a {3uWt}WEcq .t)oh9:G^Jv<'BB(XCR)clV8:)qTB9.6e4DFa!z^DZ %鱕y-+v[yy|(H-(*Fx53˽Z._Ұtג,Pi,n%@Gz`5JkՊ,s"#uxnt7ΡY1acJ}Z͈T `s{x[1)|e6deʤ$Dim=\[o HU)2kWa̐ln9nȔ2M)ai^=\L ea8 -Y<Ļ"Jl=Xs'H  Cu?^טsd+e 8Xœa|aNiv/![FM4eKĆNT<i 8ErH0 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/FontBBox [ 8 -179 699 676 ] /FontName /DWQCJB+Times-Roman /ItalicAngle 0 /StemV 0 /MaxWidth 1000 /FontFile2 183 0 R >> endobj 186 0 obj [ 333 333 722 722 250 722 250 722 500 500 ] endobj 72 0 obj << /Type /Font /Subtype /TrueType /BaseFont /DWQCJB+Times-Roman /FontDescriptor 185 0 R /Widths 186 0 R /FirstChar 40 /LastChar 49 /Encoding /MacRomanEncoding >> endobj 187 0 obj << /Length 188 0 R /Length1 4368 /Filter /FlateDecode >> stream x՗{\UU>s/px\@y+!! z1-2H|\T&僔c19C))#8YPTcSN9C5@½ g^3=kZ{ޗ&\QQZEwZN<@*JC,"iZWQr|Uag"gAbmMBm9bQT }Қ*%AzҊURklЛGVUVuOAϪsUUɋ/yGlxԈL 3jJ DtfP ͢EtJDhH;^:C)L6u>Ԗ h.J&ṀnBFM"h;/ӓZHOPrTA TߦmŰgiJ/vCc\5xIVhl%4G rPC˩A[ODh ň8i ~jᴆZ,SII_%x8! 1~JQұ)y$ LaFIKD#3\!Oʔ:quDfZYBthnZOuJA Z#h9Fm7(3RH1@E‖Bl{c^M+>/T3NQ8dfS13EkF힭=Ҝ6Х&(9j]^qԱ)FYf*lX),Ífgob3) 9]6ƅ3s礨ީ6 q"Ma74R;NwՑiZusDF!)%M|.&X1kERGd\bx׎ދ.锚;מaC57-.ʜL1Sdgi1#(8j1CdSvEG#l[hS/8~a35e#߸Db{}זw5w ߢ;DdސHvw rOesQ:uxu ަ?AlkL(if d tSAaH}}}ʀ_BL1?(8gOᤴƚӖ;ERyvɷƤ$9FV޽p|dXo4rZ^.x{0}cuox.ǧ`Gi'S"b@"'Zݺl0ɋb#1K*3]h J_ vl =2p1o[L Tgo.n :]A@H^ZwyN2-"&Xϒxiѿ,Zh7ߧCZ'Gy eK,p _6BC2p?N#&>6&> 化 -{37#hkGw4/ah3ЉpIj.P ̓_of{žz.#^-H"CD[<>cDP8$oِ҅Ig cBa(JN)և_}7g:OGGDtND 4c0E!6 Wm̌=4K~q_l"=m`p^lNvvO{|,Klh<>؋wbӣ oTCS/~Nα8s\:m>^Irq;)[\^r=E+P =J H&ѦepK^t7>sfډ5 ۗ8ŸG=oMWM]X[euO7xM 7I{Ae$EĦ9a^b^d3e1̿2a~ͼ gb<}I+?YSs,22{_0<i0?f~f~H#n &l*GNؔEү(|g,븩e_HPk^c_Uhl"lJS=2ނʑj%yyfMg9{-ό JS)ޓT>5ȵƽf]*'4 ɖǙ?GpsDq}\Aސx.zlcn4%n[[xʃMHP͈ݪjn`ރw*uϘͥjR\ϼG`l_Wӝ454,*^5SEUU[%x*y+7et;)g1W1W0oe0oa.eތ js101ϼWB33y>pWeX,`:y4Xg1g03sQ["攜bf23IJc9y3L,_Lb&R0TZGh4w+;ҕ endstream endobj 188 0 obj 2671 endobj 189 0 obj << /Type /FontDescriptor /Ascent 701 /CapHeight 0 /Descent -299 /Flags 4 /FontBBox [ -39 -250 718 778 ] /FontName /BHYTPC+Symbol /ItalicAngle 0 /StemV 0 /MaxWidth 1042 /FontFile2 187 0 R >> endobj 190 0 obj [ 744 603 768 247 494 494 494 494 ] endobj 105 0 obj << /Type /Font /Subtype /TrueType /BaseFont /BHYTPC+Symbol /FontDescriptor 189 0 R /Widths 190 0 R /FirstChar 33 /LastChar 40 >> endobj 191 0 obj << /Length 192 0 R /Length1 4532 /Filter /FlateDecode >> stream x՗{XUs\ f`F.L  :xI*)+.dB*cUuٲ6ݲ[,3WVH ZbZlB({^pgo7y/s a3HYUQZ QPnL]g\X'<CeG[c]҃;Q הEr4>FL(X!QMF}XwU*U~+0P(P6'n,Xs)eETWլQ_{T~uL@13R!s;pvdP@v~8S?`1C V3<) L~,3 g 8×Aj^H0/EXs록5A;4of`/C%`:T@:J;x=N?5P§w ~_ҕL6p2x&FGzam,8f|yqЯCІI?_8~lŞ! h߃Z W%2şSڍtE(fͰ^}c>B[c'HfvAlhJ g>a xf^V "خ4B(FƎ2\eaM\.՛aِƱVeԱv5rٰΎj֨8X[!գSY mZ sɥvW6Mgk–jmoKdE"[8םZOwOwjn^k$_.h{ThC•(bvLٴTMEc)if\&K 1ۍ`d&veEi5ZI9F#AJrw@rRI8hIvĒXs[j;ivׯs];e3f.<ή;ypfR6Guys|9<7coYYgzYxrpL:ςĘh۬d"Â,ٚ:y[YqF?슋HMKXXu1˚ml<>r^^wOGB90-wk~)\X)2 %YLSY.8)nqĪQ,TV,a:{$ o|C7l䕵i}":c\])Gvn,;/.<#񍏱 ~lTf󝶷~y3Cڹ)ͪ2|vGm'w`v҂ `쐎 Lެj=}89m'Bò:qʘq GʔܬD[gm>YjTY66 +#FY2kĖށ>S cCQqIRᦆOW0ۼ'\5B c5u2ڇ#2a'+##i̞i0FpN,ΔmOkv9UW~׾,Et;<J_[/kר=Q;vJw3(&co^[}xq}<Ҍžs1ȧ8nupvkx4gmYbY1ʎ!%܏koŘH{p @5؈cGtQጤ+vz|/x nLH1%xIfDĽ)#׈WCĿ% /~btDeVL%DEb/+/ #~F cYG[sjve~OcI'.${'voGo"7Q/, B<93m#!=h ~ nx?poX ށ$(J=FcmWGsa{⽨ DO <RCy~GdYkYG M',I}>Aq'Kc*HLjiM2| ,ۈc{&d o[i>uTm+g zg Cf؄*䑐"›G6ᑐ"""Nq#;Ds?%}{iFu fͨF5Ei&O5TWWتVE_Ec :2*r2m8뷑VL\J? .".*"x 88#t63Yf҉AtbCFTb.188%sB$N$4IJr & $o$:}( -vh> endobj 194 0 obj [ 744 645 247 795 494 494 494 494 ] endobj 80 0 obj << /Type /Font /Subtype /TrueType /BaseFont /BHYTPC+Symbol /FontDescriptor 193 0 R /Widths 194 0 R /FirstChar 33 /LastChar 40 >> endobj 195 0 obj << /Length 196 0 R /Length1 3532 /Filter /FlateDecode >> stream xՖTg|!^AC" sΦ9e茉"rJNt2 ُlFF"疻cΖQS'nn[UJ</N9}y^ׅ*+/'K;-[_4"'}"wv5F@._\r>.'p$_(C;E\Vdy%g[]X1ǔ/TO^(QqkEt +*׉>4x~蕑EobS# N0 H]Fڄ h!IH 18=8ghԷK> IT:KѢ6E5lj5a:y fʑ^*KX|DШs#۝x!4r}[z]FԸ+3|@ ^iP;n͍{D_бI(q/vu3“V-Q:=Yjg'NJT<[nuk NbI(˅3MCVD"N;32)1!'e<>|J~Nv<1N/jbļtk5JÛRe9^$pQ1v05SZ3JtVs޸W{P::MHȉQ@9S| pb;]jkěHSP%ipUmJO1 '!FbD GW$K y)YE1'Ձ]tw+S:0DNJP'$_"Sɑ?JOgh㉾2hSG%ǐ=gld9Atr8& Q,FEJnT!S-$d0@_6?dwI}py;ϨD6_7}2;}GZt%y}> endobj 198 0 obj [ 744 549 ] endobj 20 0 obj << /Type /Font /Subtype /TrueType /BaseFont /RBNCJB+Symbol /FontDescriptor 197 0 R /Widths 198 0 R /FirstChar 33 /LastChar 34 >> endobj 199 0 obj << /Length 200 0 R /Length1 3376 /Filter /FlateDecode >> stream xՖ}xeǿ}?s:18 X0&orc!\4;2@&D B\&@i% Z i̭=GvQT«+JRIAT._U%o3g-!%uR{S^~hmuM\2[Wl RHڒU]#t F+i^*\d#DS#oȸ l;0сbՍu* ;$:OG%MEfӇS8SzWl} pjZa:T:t^ݤ,('Sr^Bȴ9zZP*9`FsS|,!Dl*_1T^pST@^!=mWT:ExYQ};?RvMƉٹ8Mej{\{=x@=/lӈ,#=E̗gi%Ǎ}PRՄ 2W3m9эduK4']gz؎nTgp'"lY^7|$M:Vnz I2YQ%: IY`nV=כeW<:)MDD}släs&:h%Y $QFW TwI51 ˚08|s]'⢐YyY}Z)!%8ȁv03I;OwN64}hF2}U&|/u޸X!$(tSʟtzfd{JIolR)u:Izn2]ƃwﰆ݌~|m.bzFwu\o2>x[ʽdm|Fm 0G붍*%la`2bv)jK~, ksc;w1W5MFzCn\WaJɪǒV1rgw0F%W?oXEWoV1˔UJv M+س~!bK"TB\@?JOM琹dMFr9AN'Ii#{Sr2-$ϐYir9VNYK/;z  L92I%257>E^˶?\)5'LҢ+o ;hxbrLzu5QpiYeE􈤨Ò|Pjam0cKB` endstream endobj 200 0 obj 1797 endobj 201 0 obj << /Type /FontDescriptor /Ascent 701 /CapHeight 0 /Descent -299 /Flags 32 /FontBBox [ 42 -177 550 706 ] /FontName /RBNCJB+Symbol /ItalicAngle 0 /StemV 0 /MaxWidth 1042 /FontFile2 199 0 R >> endobj 202 0 obj [ 250 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 549 ] endobj 28 0 obj << /Type /Font /Subtype /TrueType /BaseFont /RBNCJB+Symbol /FontDescriptor 201 0 R /Widths 202 0 R /FirstChar 32 /LastChar 61 /Encoding /MacRomanEncoding >> endobj 203 0 obj << /Length 204 0 R /Length1 3532 /Filter /FlateDecode >> stream xՖTg|!^AC" sΦ9e茉"rJNt2 ُlFF"疻cΖQS'nn[UJ</N9}y^ׅ*+/'K;-[_4"'}"wv5F@._\r>.'p$_(C;E\Vdy%g[]X1ǔ/TO^(QqkEt +*׉>4x~蕑EobS# N0 H]Fڄ h!IH 18=8ghԷK> IT:KѢ6E5lj5a:y fʑ^*KX|DШs#۝x!4r}[z]FԸ+3|@ ^iP;n͍{D_бI(q/vu3“V-Q:=Yjg'NJT<[nuk NbI(˅3MCVD"N;32)1!'e<>|J~Nv<1N/jbļtk5JÛRe9^$pQ1v05SZ3JtVs޸W{P::MHȉQ@9S| pb;]jkěHSP%ipUmJO1 '!FbD GW$K y)YE1'Ձ]tw+S:0DNJP'$_"Sɑ?JOgh㉾2hSG%ǐ=gld9Atr8& Q,FEJnT!S-$d0@_6?dwI}py;ϨD6_7}2;}GZt%y}> endobj 206 0 obj [ 744 549 ] endobj 60 0 obj << /Type /Font /Subtype /TrueType /BaseFont /RBNCJB+Symbol /FontDescriptor 205 0 R /Widths 206 0 R /FirstChar 33 /LastChar 34 >> endobj 207 0 obj << /Length 208 0 R /Length1 3476 /Filter /FlateDecode >> stream xՖT| ^Т(wD9 F Cb$Dn&&ܕ~Y9r392ל۴~537Z3Ǚtys9Ϗ}Ġ y+*bTrK@%zbM`u]eBkߺzMcMʢREn+WTԯ.mbl]@TSI'[ZѧևD/}j`ݪ@c~#6;;" m|4zr =PRT!޹x]8&i62tJa t9NVL}EX*:I؀Նsأ;<2LqҤCއ + 4GAЀ =_hw.b[r<:M>@k{A**SzS%uT Bjd t{Эq+EODq"v.Tv'~؍ľ[ʅiڑa$r"vd"=(qP:s̕LBiw1[:Iǯ<؎nHӧqE)yS#ͪjtNP b̌_rY)C:>ө07 Pj3Ó!ͪǓyjؓ{xbF-[F 31Zaz/S?WBiQ}C:;)dRBNjʙ<1}qqiA]Piv1.)jbѽ\nsjܽcH\`Foo&|zOΜKk 76oл<)sc!yӣ6Fqc|991#LeF+\ Quz0\e0Rc7γNr(ߩY@m0?'vxI% ݷyO(#^j0/p%w;aYx $jUTLR_Xe>}[μDiӃq@a͟~͇wL sx-ݤ\aC!Ԕ Ka}rD"A^$#/'%FC$Bf|oZԬlp[Y5d?;o_W $Io"EWh{Edr_ H8y9cɣdS09!<$Cҿt%Zx#61> endobj 210 0 obj [ 250 600 600 600 600 600 600 600 600 600 600 549 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 549 ] endobj 91 0 obj << /Type /Font /Subtype /TrueType /BaseFont /FDTCJB+Symbol /FontDescriptor 209 0 R /Widths 210 0 R /FirstChar 32 /LastChar 61 /Encoding /MacRomanEncoding >> endobj 211 0 obj << /Length 212 0 R /Length1 5648 /Filter /FlateDecode >> stream xW{XT׵_ky82fΌa(VAGD|1(((ǍFM4Fc[%Zu8R1֤ۘ!IyZ9w3\qg}{{^9Ѱ8jajumC?~Чo^дz ĂūW$4Βf'NJD5К 4[,]~ M+cXH u5pבLTٔ%5M[v-b>-M!9yY}s IDEcj)[TRHf\OFW4l 23]HKMdZb1Ѡq !'TۃA]8qGk:h{ujM~D֔h^lOΚRIgbVSvkb,ikhU{i^ŽdSA(u Y`#P5|d &^msjRv8 k cuvR$۞셪=OZTU@U6bA ZW_ w]A,o/tL ժT4IS- @ pO^dFbCj9TTROp$%i'׶v)8a[Owm Z:YmI/$X>)UwQD W:/ŜǥՉQveKՐaL$Y-̡YYօֆ,Y_dZ-f88d& -kLNL3c GdZl$gt ?oʴ$FNvcC+bqj\C)AP뛭ȪvZd삱;G $&X|m8Sax1*?1mWNAP56!%?>טS04񲩛_Oss2%ڸψ4Z͍) Ѥ{ovr"|_<bY ["5z4-d dj&0^?q{ |bM=K#g{8j>(VV#K yb! .Ğ"=I`M1!`P=A! *D:zA#0Zc!0أ7]&sJ K@8AȏB{n tRê)z3q3H:6?iꉿjxXsƗCl"h[ I*byxZ?qŸi¿¯kǴ#[H|~yx3~V'$h*%+'W>=Y^Sx+4xf1>=y{>NP c 46x*0ܐR UBQ~ U&^*A7ҩEld*~|\$@vLχ0Yv"8+ޖ]CNMٕFpR ^ee-AH_!8#g1,{ `<_'W%crU j$r(ȃ+Ku $"l!TckNm~)tjKQEبb!7T-U]ٕMB(q:ͦ_p*E˞BOL-E`)䠺NM{MڹUg 7yPdK3$U=1\!k;CvM ˮ™~5x5<()_%U v]vW=WUuE5\s "Q8 # {p+v^NyCnḫVxa)C)F8~ /ձxfSZk otHV><)B' K=BSueI9 ΐܭ 1GȗYla_#%p̥S۲ؚ÷6'|] osWٜ# 9Qa Y: 0گ I֥&-_d ?Rmi1ߘg|atS)Sld6EL&Igb&0%KR{`0`Щ\T?A M &X;S6Q{j먭(VRk֮\:es([=0mmb+z+Y 6 'AA|fig76vt>zxlۂ೥S+N %5P~b,e**{qPq7@jet|R*H]tqC4ͪZwgեwBҩߩ""  MA$IJFU b,=TNU$n[aЦӍa|Nx#r66VT-ZǭӰv endstream endobj 212 0 obj 3892 endobj 213 0 obj << /Type /FontDescriptor /Ascent 750 /CapHeight 0 /Descent -250 /Flags 32 /FontBBox [ 16 -15 757 676 ] /FontName /RBNCJB+Times-Bold /ItalicAngle 0 /StemV 0 /MaxWidth 1000 /FontFile2 211 0 R >> endobj 214 0 obj [ 556 778 778 778 778 778 556 ] endobj 98 0 obj << /Type /Font /Subtype /TrueType /BaseFont /RBNCJB+Times-Bold /FontDescriptor 213 0 R /Widths 214 0 R /FirstChar 98 /LastChar 104 /Encoding /MacRomanEncoding >> endobj 215 0 obj << /Length 216 0 R /Length1 5316 /Filter /FlateDecode >> stream xW{XT׵_ky^: pf<  Ri<:QD@)5j"$^*&^Gj&iL5ۚ[!iyZ9w3Y^^{>{(e` 4r~z=eDCU={gXN`iueҏ DIaL5 8`xӪkE I6,+*䐼dSmٺzK;N3$WV|~/,׭iބV/^/$ 6!xxD&j|X $j68$h]ovX sea$m7zr`lprs"P^? q蠙Ű % ҮW\UC+ZPH idg˵>A@YЦ]ЮdNL~t\ `KvW,M0dS`R fmv"4K~');8"a?ǁXNho ȧ .>YءhWIa3< {3F:^52= s.c$ b~VF{"Gu5 MҌd,Z<:8apd< ŏ5p?+p )�sǙX,O3}״?i_RV!rK;z S)fD{)WÛT)c?]Ѐq8, !;L8*xC((Xv͘clֆj9ZP e~0e)+lVC Y~S68HU374H0ނrbh{d'!KtrotO9:E5>Kt<eC^_R_S|0&GC!**:'jx2w*Gxw(xM4U1DNH;C  >s ձb8`=#%dcƋƛ4Syy&Ue>&|脵kP͚X`w86·BQ8u3e/El!fQ~f,ҙxsd9'ULԴN.=CR;m˶KvB=E#`\$WPav$y2?3KD%QYݶnw8mc?~2<(]Uܒ#7 ݈Lr,T%5zHQ.FLXGFU|T(GGLNN0 w~*FDG`4$A`I&hGN8ʹefN]0ntӬw `|FFiy΋o.#5 Ve<˼ '6 o E|#>͖ReJX7bQSqrr(E'GR ŝ351ʤ.*@ѕH(Xә}"^rw||,`QAGI٘1G&ă<4}YI'b._0hƈ :.^Hydδ:^ۛmuWi4\Q{ ܒ/-xN=G+Aߋ}ϙ7χiXCZk(Khj D7w$ۿ bf 'L)ʜrnR^u;!bi%X:IAbOĄSNbV1Ğ$b[Bl3Adm"%6CqSm 0ؿBl=b,`XI҇>|ׇvpwlĭ"9*HR.$+#~\a͝:cUgP[FHĖhQ XΏܬ7_6/5q 0ߣ%;u^t%*O<'6rW>DdVb_|/8/AB">-:_jֹK1JLAx CqX!_ht1R%^u]btq ;!~nZBZ$L-M #(P~:|?CWq#ep*-??UB +5\R]gTM՗NpJ=B&xUT_+a8W{͎Mji">&>'~HuZ-JZg;YwpIΝ+fSWjIisT Y݊C%Jz|Y˒)M.I`.~O _lwXCbZu;lqZߖ'&IiPd*pgU)ߧhI˕䋔ug51s9kZZX"-b0 XCU%ěL s)aha0ZžVj[mj멭DEzf-lC5g{ٺ:֤B&a-5}4&!,3{lۂŔ=;Z88"v1,f%ݸ'\RR& vP]mWlkz:u>hUڌt\dvR8)\PzX m(Vb4p-I7s:I*NRtfþv;tM~7^;h>SY]q? {+M/fS޹jzcYe\ =>̧[eO'-h}Ýa ùg endstream endobj 216 0 obj 3609 endobj 217 0 obj << /Type /FontDescriptor /Ascent 750 /CapHeight 0 /Descent -250 /Flags 32 /FontBBox [ 17 -15 757 676 ] /FontName /PYACJB+Times-Bold /ItalicAngle 0 /StemV 0 /MaxWidth 1000 /FontFile2 215 0 R >> endobj 218 0 obj [ 556 ] endobj 18 0 obj << /Type /Font /Subtype /TrueType /BaseFont /PYACJB+Times-Bold /FontDescriptor 217 0 R /Widths 218 0 R /FirstChar 98 /LastChar 98 /Encoding /MacRomanEncoding >> endobj 219 0 obj << /Length 220 0 R /Length1 6348 /Filter /FlateDecode >> stream xڭX TEU==33 = 3LH D$B $$$K M04gvF׷O?t0/;&&q]-(z]̻C9{uoݺuoUu x;{; ~50uulޖ}$XշSb M#^eM?eú?v`0@:wx  wv09_)VvlVG֎]H;oHכx~PƣH-GFH@ w1}OeW9g(b&E;<˰cNB&d<)hV$^>a7}[Gdz }Ԡ{P 78gԝ M&hM+ Pv!ȁrԴ"6|{ѮooxRm,C#iKлО)N|c$<30=ƾ_7}3mK-\i"&T|$VQm$$;NE8y =YK[hN-~N+cGake!mvp5EӗBšC+Ba>lgÏկTOj! aDՅFim:a܂ٌ܇|G48 k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ؚy^F735rWeN+;&z]جXꟇ&cv^T;*2BGEQ6kD̍$ݬF3X!Q'N<Ƞ<v |>,>| ך֠FiZR\G,ew hX%gղ@F8J,tt0t'1ݎi+͘0 ?z^i=NGHvur+kt7L5{z")2^~Z*- c> endobj 222 0 obj [ 556 611 611 611 611 611 611 611 611 611 611 611 611 611 611 611 611 611 611 611 611 611 611 444 611 611 500 611 611 611 611 611 611 611 611 611 611 611 389 ] endobj 96 0 obj << /Type /Font /Subtype /TrueType /BaseFont /LCQCJB+Times-Italic /FontDescriptor 221 0 R /Widths 222 0 R /FirstChar 84 /LastChar 122 /Encoding /MacRomanEncoding >> endobj 223 0 obj << /Length 224 0 R /Length1 3532 /Filter /FlateDecode >> stream xՖTg|!^AC" sΦ9e茉"rJNt2 ُlFF"疻cΖQS'nn[UJ</N9}y^ׅ*+/'K;-[_4"'}"wv5F@._\r>.'p$_(C;E\Vdy%g[]X1ǔ/TO^(QqkEt +*׉>4x~蕑EobS# N0 H]Fڄ h!IH 18=8ghԷK> IT:KѢ6E5lj5a:y fʑ^*KX|DШs#۝x!4r}[z]FԸ+3|@ ^iP;n͍{D_бI(q/vu3“V-Q:=Yjg'NJT<[nuk NbI(˅3MCVD"N;32)1!'e<>|J~Nv<1N/jbļtk5JÛRe9^$pQ1v05SZ3JtVs޸W{P::MHȉQ@9S| pb;]jkěHSP%ipUmJO1 '!FbD GW$K y)YE1'Ձ]tw+S:0DNJP'$_"Sɑ?JOgh㉾2hSG%ǐ=gld9Atr8& Q,FEJnT!S-$d0@_6?dwI}py;ϨD6_7}2;}GZt%y}> endobj 226 0 obj [ 744 549 ] endobj 76 0 obj << /Type /Font /Subtype /TrueType /BaseFont /RBNCJB+Symbol /FontDescriptor 225 0 R /Widths 226 0 R /FirstChar 33 /LastChar 34 >> endobj 227 0 obj << /Length 228 0 R /Length1 6688 /Filter /FlateDecode >> stream xڭ8 tוH%>dH`òlc0 8KM8nC>%%mM7 ʥ4l&P ͧIۜ['͒8mzH Ȑv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h zO_GǤR!6/4fHY?Yݬ4"J^CF76ݍF}f>B~2 ?1KCz>}d 6W&ZrɿOxN) Y< ZXU;'Zz%ƉUVMF>ѲX -e)DZ\<;E3R_) '8nvX#PU+)WIӬ _\ NGȊ "ɜ_aɄ/B %-Z" '}89iqOUr$.-OD聸~U!~N8Lw -ܛhG#wJ\#)K<*e܋/ ~U=@Þ b_8$8UW[扪Q3?\\b22b]/.unً12*Ǿ͏nn6c+X)?Ǐcnު5k$iZFj) k$^([9aAA#UU Qh)4V;h~wc݇.{bN۱`2z; tlNzln}-*s"hؐL5'2^*;l*GTV_w@, |8>e󘦟E =Nj/Q^hT1U`L{potsF$)L* MJM;*ܪ;u(JS Š\A(FQCcTźbZ(6bMRĎ뎕"IWEٓ_VdTIUE|>)"}(p̗3d/<]%g7 ?>=5tx56rw>IH52/o:n} ?-X endstream endobj 228 0 obj 4796 endobj 229 0 obj << /Type /FontDescriptor /Ascent 750 /CapHeight 0 /Descent -250 /Flags 96 /FontBBox [ -10 -19 768 682 ] /FontName /VPRCJB+Times-Italic /ItalicAngle -15 /StemV 0 /MaxWidth 1000 /FontFile2 227 0 R >> endobj 230 0 obj [ 444 611 611 611 611 611 611 611 611 611 556 611 611 611 611 611 611 611 611 611 611 611 611 611 611 611 611 611 611 611 500 611 611 444 611 611 500 ] endobj 73 0 obj << /Type /Font /Subtype /TrueType /BaseFont /VPRCJB+Times-Italic /FontDescriptor 229 0 R /Widths 230 0 R /FirstChar 74 /LastChar 110 /Encoding /MacRomanEncoding >> endobj 231 0 obj << /Length 232 0 R /Length1 5056 /Filter /FlateDecode >> stream xڭ7}\WޙɄ'!@>(D bEZZElEOW[ۭnZWno}ֵ_v_]jwkɼ3~xsr{;7@ ͷ 6w.*D_l‚e 6|g>z;[[|9C=kEAx+ۏֶF>#H{`g!߅ͷj~9ۑ,ltyY}Je7B;=ڲ}Gu>t0qj2:V*! y},A=o*dT/jC": r!#\&9Cp* 2z`:CyƐAxex Gv-GSFY!@=zy~}T+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}/~@$ʼn;?V;uWēGcڀ_Ou(:v86?+\]uz.GfE6~.5B=.άQ)fgNg:5GÑ5T8MI(NI8㇃֦S8MGűu9b2$RB~ ?坼OGII7#P^ӳzܷzS@$eIgPU{V FH eLv etޑ>~Orf| AJRC^$5r _y+VwCRV] _zPK} *YHG{T~h~pif*RͮC3s+هYowݛpЭts٪ |8s'u:ULZPYs9rФХsAkvVk5}}zZJov}svoأ6O 6t5Y,v\ަVZݶsU===R?G!۴uXZ>ζΖ6yMj,ˣ$mbs,Y>k\N  endstream endobj 232 0 obj 3648 endobj 233 0 obj << /Type /FontDescriptor /Ascent 750 /CapHeight 0 /Descent -250 /Flags 32 /FontBBox [ 8 -179 699 676 ] /FontName /DWQCJB+Times-Roman /ItalicAngle 0 /StemV 0 /MaxWidth 1000 /FontFile2 231 0 R >> endobj 234 0 obj [ 333 333 722 722 250 722 250 722 500 500 ] endobj 59 0 obj << /Type /Font /Subtype /TrueType /BaseFont /DWQCJB+Times-Roman /FontDescriptor 233 0 R /Widths 234 0 R /FirstChar 40 /LastChar 49 /Encoding /MacRomanEncoding >> endobj 235 0 obj << /Length 236 0 R /Length1 40856 /Filter /FlateDecode >> stream xڌ |T|ιsggddI22! aHL DDA)q+TR.kX h5 ֪5EմEk sg@}ߗ{ιn, bt <t x?&I  ^6\(Xar>}$ȫHh) =xD_b=`% .]6N8z5 ͇s;ѣnx<ʥ{QS<^-܍^wi1 z=N_B;t}+a#>ZXX[ڢj@h=ڈF?3D WžmNFdh\z<{pi?KЋ|;x# ogwBLAO[t2\jnK6'cc"L5acyyK*66 [/w3\ʭvq/>>/? &, Ϡ߇)-|%gg!^nnI; b$>g.efxy1!YnE#9M:p; gzPGܯY{#5-xX)jv]HbG }ZC hΠKOp'[p%6 }̄?)|7q<-'#9 Q܃]Hx/8M Ab@gd6C8J"Lc@_͘isyth$6׸,=Sv=Tt7H1ɽB^ ?!|Ja= ڶ셓G_ߊh0̭T@.Dp ?`7Y) {`sEMо! Z-2g 70A[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jAӿM "h4]$A51vHFÕ4  Skaah-^;E??d`A f'ۗl '鐆? t8GxGWg|-'P;ϓ ?D!M4/}}2Z}t2};JVL'}u2}Qr7L:,d+i݂ jˡ/SOL:ISxd P\qaz>Uԡ0h/Rl"xHC-g~8=' ˷?8y\WS8z,FtzWS ~!pr2XpsaxrUO7 o <&n;^EgKSB-3PSxgM)r)P3b,L/e]KLrZ[Y^wn.k):Ng筼ěy#/<9o߉'2]+HѸi|Ud@SLŸbFkWZSS WT+|ߕG0o*̽S%Iw{+VwK޻20+[PfMxu3j8OQ/*ɾ׺W Tr$r7]YFl<Ό4躂;:抡3@cQE!R QZ2 uu B+H! BתuE (QaЃZ82#"L4"ZY)t$"()r5 D[i3QrP/Ie eʤ-(n-]]mÕ/r\۬(Gd(66yuoVEx[gekS9igdo!ٛGЖGuNn*o o8K:0֒ϨlTDgdw'H[ݤn'h[W,}GxQ|1Nid ]ޗ8Ö!5P1WL$dA$YfHY] ޗS, -(;wڵ=)win5ݕo쯴Wڻ*jS-/Klom?>~]g$[_ bBCᐖd\> j»I=AR{RK;Bh H$dh@%Q6 ]Ła:2;X-٨*nɀ'KyC ;7  cs=չ]hW nJbwJ.պ "wA(B4u9m '% endstream endobj 236 0 obj 29344 endobj 237 0 obj << /Type /FontDescriptor /Ascent 891 /CapHeight 0 /Descent -216 /Flags 32 /FontBBox [ -569 -307 2029 1007 ] /FontName /XSVCLH+TimesNewRomanPSMT /ItalicAngle 0 /StemV 0 /Leading 42 /MaxWidth 2000 /FontFile2 235 0 R >> endobj 238 0 obj [ 250 778 778 778 778 778 778 778 333 333 778 778 250 333 250 778 500 500 500 500 500 500 500 500 500 500 278 778 778 778 778 778 778 722 778 667 722 611 556 722 778 333 778 778 611 889 722 722 556 778 778 556 611 722 778 778 778 778 778 778 778 778 778 500 778 444 500 444 500 444 333 500 500 278 278 500 278 778 500 500 500 500 333 389 278 500 500 722 500 500 444 ] endobj 9 0 obj << /Type /Font /Subtype /TrueType /BaseFont /XSVCL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ˢ')uR'y+AA&ԧʼnIWj=>zR7( v*kߗe~~~\5P:olr>_?_?\[Aq+A4:b2!ߋf!V|%V;3d Tk)>)Tl?CJ/b#OبE ~>EљEL#x7&:G%o b u1!8!8*{*zIz:zS֊cֈb7ƶ!VPfVƗa7KQb&[D>X':'3 (FTBgA@Y1(΄2i%GEʐE{BqVYp(cIʊg(!\d#d%RY(#yHl*:GF`D>Q Ⱦ} VG{HՂ}u][*7M wM"|;G _8u§npl # 0(|0 9hzp9_x6oX83_@X*h.4YRhuSwB KGXKuz'Ȗ@0+ :Av sԊ% &Y'hV*k_ >8'vy9G>]|,뚺;ᩲީ.%+y~i<8 +]o^z endstream endobj 240 0 obj 3786 endobj 241 0 obj << /Type /FontDescriptor /Ascent 750 /CapHeight 0 /Descent -250 /Flags 32 /FontBBox [ 16 -15 757 676 ] /FontName /PYACJB+Times-Bold /ItalicAngle 0 /StemV 0 /MaxWidth 1000 /FontFile2 239 0 R >> endobj 242 0 obj [ 722 ] endobj 66 0 obj << /Type /Font /Subtype /TrueType /BaseFont /PYACJB+Times-Bold /FontDescriptor 241 0 R /Widths 242 0 R /FirstChar 119 /LastChar 119 /Encoding /MacRomanEncoding >> endobj 243 0 obj << /Length 244 0 R /Length1 3532 /Filter /FlateDecode >> stream xՖTg|!^AC" sΦ9e茉"rJNt2 ُlFF"疻cΖQS'nn[UJ</N9}y^ׅ*+/'K;-[_4"'}"wv5F@._\r>.'p$_(C;E\Vdy%g[]X1ǔ/TO^(QqkEt +*׉>4x~蕑EobS# N0 H]Fڄ h!IH 18=8ghԷK> IT:KѢ6E5lj5a:y fʑ^*KX|DШs#۝x!4r}[z]FԸ+3|@ ^iP;n͍{D_бI(q/vu3“V-Q:=Yjg'NJT<[nuk NbI(˅3MCVD"N;32)1!'e<>|J~Nv<1N/jbļtk5JÛRe9^$pQ1v05SZ3JtVs޸W{P::MHȉQ@9S| pb;]jkěHSP%ipUmJO1 '!FbD GW$K y)YE1'Ձ]tw+S:0DNJP'$_"Sɑ?JOgh㉾2hSG%ǐ=gld9Atr8& Q,FEJnT!S-$d0@_6?dwI}py;ϨD6_7}2;}GZt%y}> endobj 246 0 obj [ 744 549 ] endobj 135 0 obj << /Type /Font /Subtype /TrueType /BaseFont /RBNCJB+Symbol /FontDescriptor 245 0 R /Widths 246 0 R /FirstChar 33 /LastChar 34 >> endobj 247 0 obj << /Length 248 0 R /Length1 3800 /Filter /FlateDecode >> stream xՖytUǿs !H$11D$"J8-!E""JMS*XTQjS8U mJ -I)$7߄ߞ|3 @8Q0lFaXI;kb߂5_VTiܲ1^ŶiE'<b6oΌ-W Gyb[5O[-^zU"ѽgPqZ)X^M="t} fRKj++YZhNEY;E񆄋Mȅ 2/-6 pCZ(QР`Jzh!IHtCʴ{lMQJi,LRea ZzX#KxڪW!(%X2d[;QbZ*gDyQNkB: hLÛc.>H] "LlfHUڥNOIxGT3Ro .9ˊB=#kbIjsT=-(L<#S!Mq䗢ĒԈ|PV`ӌT=Iħwd:F^'Esnk[u8a),C&%_G&k#©jΘ`3 M$H>MV$޹Ijޡ^l為njpʦQ SnjtRFظb :R}^tl7}MHK7^ N,c{N_N IglZž=3QӋ8XDY죊̮PKg=)Dz~LxO;y,#gBϤ 6+ul@կ) iݐ₴HOݷ >1^$k;,NE'%'IzO^hE=,%Śu{n cl%zňO U93 >DGm7Ih~fo_޽93@Z,՞{O)+p}j^鸪T68n|jW+2/'&}0<,nd 12ddUvV(ףħ6&:C Iy#S 6I'18*J%H䑈z"ebE BIZGJ["+8-%g[Hx-Ig:Z;23TBn&+ы HoBk!îx|//ݔ%_\k.ZdKl*+EG:SmYܔjf{Wȃ Z9~Qݮsuz9_^~:d?=7>R7INkt SukAI3<_yFզ+)#9hrUxɜ%j lR!EY0D d;yF^%FWe/%"yRg6-{<5#k|N> endobj 250 0 obj [ 744 768 247 ] endobj 67 0 obj << /Type /Font /Subtype /TrueType /BaseFont /FDTCJB+Symbol /FontDescriptor 249 0 R /Widths 250 0 R /FirstChar 33 /Last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`r'C{bLcO#ua3BA95|S'_ ĹcF?R?xU,sO}G uQ3ӞmL<&z(mdfm}`y(yY\U%15Fɚ!/k=G=sLKU*IK<)MEo˳|IP.0iΧ͕3)=<>WH.Q͖o^..ogE&aڬHjVVGH?fb37f\H/#C+B};{űEru9zOpՂFmSF2go?5P#n<3n_cJ[O+B$XA!Bд Aˇ ]|Smۨ@0xL566f}[MBBK[}׌RLCyyRg L#8kT\7*3ŋ猊8wz?iA6+6jZ\Mi-i+m>ms ,sCX }\.6[v_kU_kv\u~C7| _[-/#7ktqGڵMo J endstream endobj 252 0 obj 3309 endobj 253 0 obj << /Type /FontDescriptor /Ascent 750 /CapHeight 0 /Descent -250 /Flags 32 /FontBBox [ 16 -179 699 676 ] /FontName /LCQCJB+Times-Roman /ItalicAngle 0 /StemV 0 /MaxWidth 1000 /FontFile2 251 0 R >> endobj 254 0 obj [ 333 333 722 722 722 722 250 722 722 500 ] endobj 92 0 obj << /Type /Font /Subtype /TrueType /BaseFont /LCQCJB+Times-Roman /FontDescriptor 253 0 R /Widths 254 0 R /FirstChar 40 /LastChar 49 /Encoding /MacRomanEncoding >> endobj 255 0 obj << /Length 256 0 R /Length1 3688 /Filter /FlateDecode >> stream xՖTW"?@Bϔ98.GhL9%D #mK242̜ygΜMMmm"[9O>>o/W(m=tEUTOFSV,x51-zJUeGxEtZ;D D: v>vF&>|oWp cV8D+Uv  1xqX(dl:!>ԳqT2dDɧajZ'cZF=NݢjEHqKͫ(4{P,ΗjP2YjzZ7fF0/#B_c.8l= sѨ犧IWVguC*+&ۊ: cIgH] m*Sܣj?_f،'žYias\ 1brD>QDj21Y+)3{ndfA,VdvzWX}A_{ۨzv[t۵& 6_ٲ#)U:fϵq_u7 uE]yij{]Ej1V,uHY+Wvb<1Z!=56>7?#SSc}A{֤/tYAw@ФEgSᙌoHK&qzV'N:eNMά x*e"T۩}qi8PI o\`79EmrtDaa͍mtdbX(G70Ο5jC"^zH 'a9T?m~3T$x6NTMv*A}@nOo:%WEŞi! hgĄ6@C>#^%QQm 2#6(cι1[ㅊp}] l sqݯ>+CdtV^E hno3;oG"y1pGI6&}+ND|ĵ$Y7XʚwIbx;ҿ:bn[13KnB.笗uj,DiYݥ_0KPݯWѷJ,bW7k1 ۔ MG)he#m¤mۋ+d4كNv#HDWQwKLڞ/ٗNzBVIAI%Uɇw_?V&( endstream endobj 256 0 obj 2030 endobj 257 0 obj << /Type /FontDescriptor /Ascent 701 /CapHeight 0 /Descent -299 /Flags 32 /FontBBox [ 42 -177 550 706 ] /FontName /VPRCJB+Symbol /ItalicAngle 0 /StemV 0 /MaxWidth 1042 /FontFile2 255 0 R >> endobj 258 0 obj [ 250 600 600 600 600 600 600 600 600 600 600 549 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 549 549 549 ] endobj 83 0 obj << /Type /Font /Subtype /TrueType /BaseFont /VPRCJB+Symbol /FontDescriptor 257 0 R /Widths 258 0 R /FirstChar 32 /LastChar 62 /Encoding /MacRomanEncoding >> endobj 259 0 obj << /Length 260 0 R /Length1 7356 /Filter /FlateDecode >> stream xڭ9 tוH%d[mI#y$KX/# v c&6c K&nڄ J%iB$-u͂32{XolGXGŒj0$z ҄KVh#觟c, wz=w dS1HwB6,!I,˧QrB/W^&R#ulL= `-NӇA$ ) ,Zse=aJ[9Ls's19sg1[Ėهؗw3rn7[ƭ!n{  x~'%HCx!>E 硉]}l?#WYMs<b:J /.1}u }؏'ބ'<|j1E0[#XgMy3=n)v[zZbNIN2^ըy2@vH gvLiu3DҌo˄ےA\$q I"8ˡ<'u3BmuR3 >*drAr FioS&)*%]7a?>G,G7j 8'7.t44hwKv@$K ǝ4}{vʜS9)eή;%)%μgI01/ |Uy^MP!T!J"4+0U!jʄ8]!/|Q>Q>PU.L M~dtXTS#W˸iZy4Pnsz*q*mp9ɜL-:faZ^&mU%zxN^սj칢RM))-&w[**,68MGr{00zMdD ~gYSݒ4eJQT\XTl2;M,˱A'lP[ $/ s(8*\TZ5779a)W"SxN jl.#x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ï4k  NΕU"T7B+e6ӪPLQl"Y ŠL(F(2VbM2@1nVdcBu%ؠl`_Id"H"HW9Ec gٹ /ή|=ҡUjPUeU>İJ ߚc]u endstream endobj 260 0 obj 5324 endobj 261 0 obj << /Type /FontDescriptor /Ascent 750 /CapHeight 0 /Descent -250 /Flags 96 /FontBBox [ -26 -208 768 686 ] /FontName /ZFRCJB+Times-Italic /ItalicAngle -15 /StemV 0 /MaxWidth 1000 /FontFile2 259 0 R >> endobj 262 0 obj [ 667 556 611 611 611 611 611 611 611 556 611 611 611 611 611 611 611 611 611 611 611 611 611 500 611 611 611 611 611 611 611 611 444 611 611 500 611 611 611 611 611 611 611 611 611 611 444 ] endobj 120 0 obj << /Type /Font /Subtype /TrueType /BaseFont /ZFRCJB+Times-Italic /FontDescriptor 261 0 R /Widths 262 0 R /FirstChar 75 /LastChar 121 /Encoding /MacRomanEncoding >> endobj 263 0 obj << /Length 264 0 R /Length1 3844 /Filter /FlateDecode >> stream x՗yTUƿsDE"CF`Xjj(qDmeHP#ā8$H55jjmblBEc%F X%DT*MXWGt߮Ջw{P&*{(%tqTKkS0?wVX[f/*ʉi/ fͽZ8!pBWh w/ʟ3K=[ce~Z>Dʝw1r!.{.Uc<5 -ES#r Ge'00 SPluj3JU"^j4i<88mLGx9H6{<\aD` jU9jcڅmFZ0 8yYn"x5.xK6;`=ӱUaW]Twj liUΪ/IXR=9204ڵ1$j0jsxN9j]'xI fM9cś%bd4U%γ2W3kT5R D_!N[#:\Y<܍/2cG]ims$e{H/6&}F"nj3sQu;ھ+D:uHkVb5]mBBʈܪdEIL77튪ĪEQ{[['fY*gWe\o c&fEUՎ),1'#25+rg]K`Q~aǓn8p<)8 Xh.4Û/]wo=ă' Kmx#8؀R r7IIʓǚնRk+:2dNJ5J.kmjj. [b$%' !݌vzv1z[="ݐv;㒷[+uA_27zuyaZeJRĥzBThj`kXhLB,;4k˓# :ڧGHQ;+hSdjteF͈ KxlYo?|e%{s6yΝd˪Wst3jjr}"8#Ӌ%ɐoN*tO$H2E wIGl$ggD<)-p҄-tyKSK,@))؉B0Wh ;ЊWdnw= {krMuKtwP_ڨmi u}HXbD&=4|^wk\vvqo.ؕ--yߪo":k.0D-lo3e^l?||_fFRTiYA[D+#[f5yyl"o'o#"J67_{&Lܼseo\mWi_!//ɋ y),y˞#)jĶ{'۩iW?}ӊr>9C>Af3QMc?"GN!K>FNJM=@'Ǒc1?IOe#dD?B{8As4h?L%!C`)mʞ@rBzdL$O~L$0J؏d<q҆-oqKFa$B(#S~T"h$3A;\adW2nJ,bP{,Qۦl*Iّ@. Qf"H]bggRj$5IUJr/kTaɃ~wO?ԜG endstream endobj 264 0 obj 2246 endobj 265 0 obj << /Type /FontDescriptor /Ascent 701 /CapHeight 0 /Descent -299 /Flags 4 /FontBBox [ -39 -177 795 706 ] /FontName /FDTCJB+Symbol /ItalicAngle 0 /StemV 0 /MaxWidth 1042 /FontFile2 263 0 R >> endobj 266 0 obj [ 744 795 549 ] endobj 128 0 obj << /Type /Font /Subtype /TrueType /BaseFont /FDTCJB+Symbol /FontDescriptor 265 0 R /Widths 266 0 R /FirstChar 33 /LastChar 35 >> endobj 267 0 obj << /Length 268 0 R /Length1 5388 /Filter /FlateDecode >> stream xW}TT׵b5 80AD*f4~DDQD@)5DHPkSmeMj5Wj&iLkMcDӚ/41IjͧCvxٿsxk[[h 5[}G>,iK[5o SVv./t 56.DI&6@~$<}WPN2ieK}-|=CsVS>;F$W67xb!H[[ִ FrF֡zx<<"5F>o4j5p RmZok!6pG=? 蠙EU Ү9K(| !m7L`>,W=p@z呵;0Ga.JVRXG[ *hPٝCDCPVF5|T ^mNpjfϩyG:wNȥ|TVmwr?t,t=PښP Juؾe2Ĝ ]唚1ȥHgm@U"NhGh}|$KƮA9̭RR=>*%œ Jʀ]qö1>?{2Z;ubͼ $͐^3"8k]HRCQe.hUH/ %_./A} #߰%4A#3J:IXj(!emٳϼQ3׊o R$ZS,_\qE`).~Åmp gd8֤Dkr@̐GG rJu- Fئe%su w8Y9oSC옼2\Zݲ<о̴b֌Oh;ocQs4\~dw3Sö{@= Q&##ɨic8ف.onX.mYu-޼+~ӰȒ¬[&%YABm'G XXlAlm%faALm!0D@ASm$0C'ЇlNfk 0"Ii{~|Ïv qgw%,H[[XErՓ%?K1G4wh-%~ahIӖ2Mhg D<#7z3moħMm6qbXbƷM>7h<](.; E|Hj"xƓ=q0 `@\+v+*Cߢuo\4g?IYK`"=#~1_)NP,Pb!j4>ro\UjF|8 >Uj2Ԙ(?¿Bq|4Iz_"&xSqeF?(tWeşApRE%x^ s8W({͎MJM >ԤlPj&Wj&I%n|z5ۇcXC>6B[+h-Уͯ&Mn&+Ir-9+df!(<*?W*q>uO\f,y{HÞ$sIgANꤗu艕_c#3~> ~Lw-Ti3h4}'wԜK]Ejrs'R3l"w{ =K?GY2\\ZVGZ"wآu(r-\eOv'2hntDTOpyH9,I}?0w3(c1oFbLfd0Lİz3$, :us)ahb0ƺԶPDm#Q[KZz8_=~K\Ƕ ýC M¾FukY;ڦO+*ށy[p'[8*yUuT"4j,`UM JM zYA RFC/W^a}~/h*=ʑN.2@;y8 .Me0s5:66x4XlZؔmf9wrl')9m)2F;"4_Wᄡ} Ԃ7n~i?DFcmC mCw>ħeo[wU=?V*a|Jnk֮;Lӳ].nkgf˷|^[G:wNzGwe endstream endobj 268 0 obj 3665 endobj 269 0 obj << /Type /FontDescriptor /Ascent 750 /CapHeight 0 /Descent -250 /Flags 32 /FontBBox [ 16 0 757 676 ] /FontName /PYACJB+Times-Bold /ItalicAngle 0 /StemV 0 /MaxWidth 1000 /FontFile2 267 0 R >> endobj 270 0 obj [ 556 ] endobj 74 0 obj << /Type /Font /Subtype /TrueType /BaseFont /PYACJB+Times-Bold /FontDescriptor 269 0 R /Widths 270 0 R /FirstChar 104 /LastChar 104 /Encoding /MacRomanEncoding >> endobj 271 0 obj << /Length 272 0 R /Length1 4388 /Filter /FlateDecode >> stream x՗}XTUsϽw  30|Lf隩k "2 ~ۊ!klZk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 0 /Descent -299 /Flags 4 /FontBBox [ -39 -212 604 711 ] /FontName /DWQCJB+Symbol /ItalicAngle 0 /StemV 0 /MaxWidth 1042 /FontFile2 271 0 R >> endobj 274 0 obj [ 744 247 549 549 494 439 ] endobj 89 0 obj << /Type /Font /Subtype /TrueType /BaseFont /DWQCJB+Symbol /FontDescriptor 273 0 R /Widths 274 0 R /FirstChar 33 /LastChar 38 >> endobj 275 0 obj << /Length 276 0 R /Length1 3788 /Filter /FlateDecode >> stream x՗{x 8NBRAinKC$BI%V$t.E֚2k2ծ= ֒CkפL[ :1O%'|9ٳ/|01TѢ4J3rϒi# %vhEW^ =06y‚We h&.EWOR&kq5gsqҐ.9YRP+ ߯ly/CJ-,=yu@Hh zm&8|V E h1*573eذ)67iQvN*1Șh,όBdCI2wz ]nikAB'$t]hkiKH1pp鏞HINݫHʶ޻hEjT\ ԩ+_ KKvt%'uW$|c/0Wx-zh{qͲ#v]V-·lgcYgPh-@r2lӒd^lfLҦ9m_!Sd2I4IlPC8r0I7;t Xr c0&)RDK%v2*c&`ۑA"{ Giі(^[tcnFmR&@yQJ]d'2t"U萯 Q{H$5+~%,/NS~nTeC'=5 endstream endobj 276 0 obj 2181 endobj 277 0 obj << /Type /FontDescriptor /Ascent 701 /CapHeight 0 /Descent -299 /Flags 4 /FontBBox [ -39 -177 604 706 ] /FontName /FDTCJB+Symbol /ItalicAngle 0 /StemV 0 /MaxWidth 1042 /FontFile2 275 0 R >> endobj 278 0 obj [ 744 645 549 ] endobj 115 0 obj << /Type /Font /Subtype /TrueType /BaseFont /FDTCJB+Symbol /FontDescriptor 277 0 R /Widths 278 0 R /FirstChar 33 /LastChar 35 >> endobj 279 0 obj << /Length 280 0 R /Length1 3600 /Filter /FlateDecode >> stream xՖxU{/5ed,XD "@hL ƅ2@k nSE7$(*PF-H5&w}{W?z99 @6 $/V)/^*eJP =0^ZVfk._ q-unZ;H[&W) Dl@ Va\fQV6S[D=eEIْ< ͢Wv==#rIqtI8)_ach|HЁz&aZPڱO@63؇cR" ^Ӎ64M/ B7{6 V:ѢvEIij@;åf' ~!G7zV*P'}4+N2}W<%їw81z,V/L6u@Vo9xUU;?O$m{q@$L2N?%[Bj{Bϗ@6vawIM2dK!tS'Rxs6z9!Թur/T=+V\r#z>PH82 nTz9vk1PF&U dFL^ظ/:ΛR]u.o]d*U7U{xiQ)xx}ՆlFV繎 )Nbi$xWaQS#}ץ4:I;(b'mȹ<130YN]'ƹ"ZMbٻCѝN}JV>F aZzkjì|#,{ޗܶҲ*]`35*9o=dΈg=pD<Azu1B;uLkն|\/gWc?:Z֒kիs{uVbZaQs̭+0Llrf-_ceRr ,&B. 2vMyΧ\H~G~, rP'$gwș?H_`iqGO<%Io''m8imdYy,Y2Mf (3d&‘?M#0\pm\(CO8Dn #Na*)2FFВLyۻ>E̾obDF2:_ztmm)%p7ZH(i/G~ه>zr(CFndFV|BnIyBJD)>(5VU<$ : endstream endobj 280 0 obj 1919 endobj 281 0 obj << /Type /FontDescriptor /Ascent 701 /CapHeight 0 /Descent -299 /Flags 32 /FontBBox [ 41 -202 550 729 ] /FontName /LCQCJB+Symbol /ItalicAngle 0 /StemV 0 /MaxWidth 1042 /FontFile2 279 0 R >> endobj 282 0 obj [ 250 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 549 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 333 600 333 ] endobj 130 0 obj << /Type /Font /Subtype /TrueType /BaseFont /LCQCJB+Symbol /FontDescriptor 281 0 R /Widths 282 0 R /FirstChar 32 /LastChar 93 /Encoding /MacRomanEncoding >> endobj 283 0 obj << /Length 284 0 R /Length1 3632 /Filter /FlateDecode >> stream xՖXW|+^Ф%E$ Et(9)["w1sH\Ṷ̏el9sdtۚG$y͛S6@ yb~EH~*-ը7c~2REcZQQ,V~@t9g{:o'XY("&zFp`鑋SzG,|=s\I:0(QWmFz3؋crRki))='D+GMqjZ'a1U=u`nTNQlC.PbCJh=F}9NBiU苞6}~ss0uz:-]WQծN:K/pi~_D{IM*Wj ľUe5 Ӓ MĒT|9i݇dgW{m58u27 d`.9!=RRT뛒s:uzGӨ1DNz$wH:A S5}86v 0۹6w:mVPTn:scD5:ױ-tʗfwOM7CY?1Nt^!+S8̌gl~ڱb\,,+<\o;O !ņ1LK|--%ǥ$%h/=m-tSЅ `Hg}p5)T}>Ǎr%~~aòfw| 擣 woڴ;ݫ[7?MƘscQ&fWNtuS-QQQv/L{N8n>׮6mH 7z[zڬ}s̊UC^w kQ^_kn`g.RCڱ~TBmu-xHhv˽Ƒn-[9!IdN̚nuƻ?(>rm$k lYyˎ;3*QC@;rH#201'/Y9Ox8,tԟסW+aX&-<$Ԕ CtaEl#F$okU] W2ϔ/̖v_fd )M^ ϓo"ϑg?gߑ%CI&7$@_^umk˫E'p\ 1l/(D%ɟɟȟv:^bɍn4%e¤)ۍ+2JF]H/P+Q{Ȓ[.45+Tz_*RFI;$$RjTUAݓA endstream endobj 284 0 obj 2012 endobj 285 0 obj << /Type /FontDescriptor /Ascent 701 /CapHeight 0 /Descent -299 /Flags 32 /FontBBox [ 42 -197 550 725 ] /FontName /LCQCJB+Symbol /ItalicAngle 0 /StemV 0 /MaxWidth 1042 /FontFile2 283 0 R >> endobj 286 0 obj [ 250 600 600 600 600 600 600 600 333 333 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 549 ] endobj 123 0 obj << /Type /Font /Subtype /TrueType /BaseFont /LCQCJB+Symbol /FontDescriptor 285 0 R /Widths 286 0 R /FirstChar 32 /LastChar 61 /Encoding /MacRomanEncoding >> endobj 287 0 obj << /Length 288 0 R /Length1 3600 /Filter /FlateDecode >> stream xՖxU{/5ed,XD "@hL ƅ2@k nSE7$(*PF-H5&w}{W?z99 @6 $/V)/^*eJP =0^ZVfk._ q-unZ;H[&W) Dl@ Va\fQV6S[D=eEIْ< ͢Wv==#rIqtI8)_ach|HЁz&aZPڱO@63؇cR" ^Ӎ64M/ B7{6 V:ѢvEIij@;åf' ~!G7zV*P'}4+N2}W<%їw81z,V/L6u@Vo9xUU;?O$m{q@$L2N?%[Bj{Bϗ@6vawIM2dK!tS'Rxs6z9!Թur/T=+V\r#z>PH82 nTz9vk1PF&U dFL^ظ/:ΛR]u.o]d*U7U{xiQ)xx}ՆlFV繎 )Nbi$xWaQS#}ץ4:I;(b'mȹ<130YN]'ƹ"ZMbٻCѝN}JV>F aZzkjì|#,{ޗܶҲ*]`35*9o=dΈg=pD<Azu1B;uLkն|\/gWc?:Z֒kիs{uVbZaQs̭+0Llrf-_ceRr ,&B. 2vMyΧ\H~G~, rP'$gwș?H_`iqGO<%Io''m8imdYy,Y2Mf (3d&‘?M#0\pm\(CO8Dn #Na*)2FFВLyۻ>E̾obDF2:_ztmm)%p7ZH(i/G~ه>zr(CFndFV|BnIyBJD)>(5VU<$ : endstream endobj 288 0 obj 1919 endobj 289 0 obj << /Type /FontDescriptor /Ascent 701 /CapHeight 0 /Descent -299 /Flags 32 /FontBBox [ 41 -202 550 729 ] /FontName /LCQCJB+Symbol /ItalicAngle 0 /StemV 0 /MaxWidth 1042 /FontFile2 287 0 R >> endobj 290 0 obj [ 250 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 549 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 333 600 333 ] endobj 57 0 obj << /Type /Font /Subtype /TrueType /BaseFont /LCQCJB+Symbol /FontDescriptor 289 0 R /Widths 290 0 R /FirstChar 32 /LastChar 93 /Encoding /MacRomanEncoding >> endobj 291 0 obj << /Length 292 0 R /Length1 3532 /Filter /FlateDecode >> stream xՖTg|!^AC" sΦ9e茉"rJNt2 ُlFF"疻cΖQS'nn[UJ</N9}y^ׅ*+/'K;-[_4"'}"wv5F@._\r>.'p$_(C;E\Vdy%g[]X1ǔ/TO^(QqkEt +*׉>4x~蕑EobS# N0 H]Fڄ h!IH 18=8ghԷK> IT:KѢ6E5lj5a:y fʑ^*KX|DШs#۝x!4r}[z]FԸ+3|@ ^iP;n͍{D_бI(q/vu3“V-Q:=Yjg'NJT<[nuk NbI(˅3MCVD"N;32)1!'e<>|J~Nv<1N/jbļtk5JÛRe9^$pQ1v05SZ3JtVs޸W{P::MHȉQ@9S| pb;]jkěHSP%ipUmJO1 '!FbD GW$K y)YE1'Ձ]tw+S:0DNJP'$_"Sɑ?JOgh㉾2hSG%ǐ=gld9Atr8& Q,FEJnT!S-$d0@_6?dwI}py;ϨD6_7}2;}GZt%y}> endobj 294 0 obj [ 744 549 ] endobj 24 0 obj << /Type /Font /Subtype /TrueType /BaseFont /RBNCJB+Symbol /FontDescriptor 293 0 R /Widths 294 0 R /FirstChar 33 /LastChar 34 >> endobj 295 0 obj << /Length 296 0 R /Length1 5388 /Filter /FlateDecode >> stream xW}TT׵b5 80AD*f4~DDQD@)5DHPkSmeMj5Wj&iLkMcDӚ/41IjͧCvxٿsxk[[h 5[}G>,iK[5o SVv./t 56.DI&6@~$<}WPN2ieK}-|=CsVS>;F$W67xb!H[[ִ FrF֡zx<<"5F>o4j5p RmZok!6pG=? 蠙EU Ү9K(| !m7L`>,W=p@z呵;0Ga.JVRXG[ *hPٝCDCPVF5|T ^mNpjfϩyG:wNȥ|TVmwr?t,t=PښP Juؾe2Ĝ ]唚1ȥHgm@U"NhGh}|$KƮA9̭RR=>*%œ Jʀ]qö1>?{2Z;ubͼ $͐^3"8k]HRCQe.hUH/ %_./A} #߰%4A#3J:IXj(!emٳϼQ3׊o R$ZS,_\qE`).~Åmp gd8֤Dkr@̐GG rJu- Fئe%su w8Y9oSC옼2\Zݲ<о̴b֌Oh;ocQs4\~dw3Sö{@= Q&##ɨic8ف.onX.mYu-޼+~ӰȒ¬[&%YABm'G XXlAlm%faALm!0D@ASm$0C'ЇlNfk 0"Ii{~|Ïv qgw%,H[[XErՓ%?K1G4wh-%~ahIӖ2Mhg D<#7z3moħMm6qbXbƷM>7h<](.; E|Hj"xƓ=q0 `@\+v+*Cߢuo\4g?IYK`"=#~1_)NP,Pb!j4>ro\UjF|8 >Uj2Ԙ(?¿Bq|4Iz_"&xSqeF?(tWeşApRE%x^ s8W({͎MJM >ԤlPj&Wj&I%n|z5ۇcXC>6B[+h-Уͯ&Mn&+Ir-9+df!(<*?W*q>uO\f,y{HÞ$sIgANꤗu艕_c#3~> ~Lw-Ti3h4}'wԜK]Ejrs'R3l"w{ =K?GY2\\ZVGZ"wآu(r-\eOv'2hntDTOpyH9,I}?0w3(c1oFbLfd0Lİz3$, :us)ahb0ƺԶPDm#Q[KZz8_=~K\Ƕ ýC M¾FukY;ڦO+*ށy[p'[8*yUuT"4j,`UM JM zYA RFC/W^a}~/h*=ʑN.2@;y8 .Me0s5:66x4XlZؔmf9wrl')9m)2F;"4_Wᄡ} Ԃ7n~i?DFcmC mCw>ħeo[wU=?V*a|Jnk֮;Lӳ].nkgf˷|^[G:wNzGwe endstream endobj 296 0 obj 3665 endobj 297 0 obj << /Type /FontDescriptor /Ascent 750 /CapHeight 0 /Descent -250 /Flags 32 /FontBBox [ 16 0 757 676 ] /FontName /PYACJB+Times-Bold /ItalicAngle 0 /StemV 0 /MaxWidth 1000 /FontFile2 295 0 R >> endobj 298 0 obj [ 556 ] endobj 81 0 obj << /Type /Font /Subtype /TrueType /BaseFont /PYACJB+Times-Bold /FontDescriptor 297 0 R /Widths 298 0 R /FirstChar 104 /LastChar 104 /Encoding /MacRomanEncoding >> endobj 299 0 obj << /Length 300 0 R /Length1 6628 /Filter /FlateDecode >> stream xڭ8 tՕH%d[e#y$KXĎ;m)Nl;`qpBBBHqS`CZetd"T44[4 Pؖor(nKOe5{gٞ3z}{@M}[`!{a?[; ~ݖ6]»8°Qnڸs?hHa$n_92D7iG DCĝ7`leSߎ-f==m?|9lmT4]l?m?>=E؈|<^q۰Z.nd1mT?IR\&RG̖ㅧ>=ؾbX3> SD9w}Nh{80/# ر- "h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O&g/.u7ful} v~]KCwʺl椧W^O%.I'u^[4)-|^ >kufPxKM扶wA&"=Iu=1B{{q "k -M)дlS[,fOnk7ttJ/prgh6C9]Z$ 9u.$ϙT  .yڑ3 |FʮSuyoq;y 󬁎m-ԥiiwwl+l4n_D7,f -LK,$Rϵd|1g9!6I }ؗ[-)S & .*-1AL!,E|YN_FA>C3=Z4t'Wk;nϤlJ$<1pFL_WYmM|i0PTFDCx˘f~yn0WC.eo¶@^NGn73&`Z_aWHˎx]_Yb׃ ܘY)!F?5PVˋp0]gCG0B#F(U9FfQ?ao=7ހoqRA}LsdV޺  C6;A;lnm -_i%6E ՛K)޹w; ɀZj1ACcO/_BǷ[qqqx=9A4lMc1;AGd%]l z5A N :tށ =A{ :O= z;.Aw#`t&Aw"@ev vCr&BBv5ʍٴ[L6z}^g뵠-[̍i0KzݯYeAԠA 'Ў^srv|Yi7k효?A+ҧګYV+Vso5'ȿ#'GE#figgePxGxJksBl%g:|QXç!`{YCpCcUkpC<<ȥSF8.ބ#5b4BV3D)h&9bZhtq8] +G(_`I\|7O;)\ǽَ-yN|F|T|"<ЅN}ϓ0"x }Py_0AyNN8M]-ܛR FF_ѩW/^Rs^l  919/6eQ'4V.e)KJĒ!T/g>qmI\!DSه^>vmc+b>X!+್6g ch4Y#uPߓ& hj54EQb褣`܉e?;2v,2eT}YmR]֝tlk[DoHuD!(xESȡ</vPVo^+UlqB_}H[Οb]/xe^<m"CLg 1!2epڮRrw+nS]~6кhdkkޡ Nމt#* wd y D yJgOyh֡dyvmJc;&9VS'aβ=,c,y:K ,Xa uK9"ur՗`ܒ" 9 4=6oj|b^[2n} [L endstream endobj 300 0 obj 4771 endobj 301 0 obj << /Type /FontDescriptor /Ascent 750 /CapHeight 0 /Descent -250 /Flags 96 /FontBBox [ -10 -82 768 682 ] /FontName /VPRCJB+Times-Italic /ItalicAngle -15 /StemV 0 /MaxWidth 1000 /FontFile2 299 0 R >> endobj 302 0 obj [ 444 611 611 611 611 611 611 611 611 611 556 611 611 611 611 611 611 611 611 611 611 611 611 611 611 611 611 611 611 611 611 611 611 444 611 611 500 611 611 611 611 611 611 611 611 611 611 611 389 ] endobj 134 0 obj << /Type /Font /Subtype /TrueType /BaseFont /VPRCJB+Times-Italic /FontDescriptor 301 0 R /Widths 302 0 R /FirstChar 74 /LastChar 122 /Encoding /MacRomanEncoding >> endobj 303 0 obj << /Length 304 0 R /Length1 5648 /Filter /FlateDecode >> stream xW{XT׵_ky82fΌa(VAGD|1(((ǍFM4Fc[%Zu8R1֤ۘ!IyZ9w3\qg}{{^9Ѱ8jajumC?~Чo^дz ĂūW$4Βf'NJD5К 4[,]~ M+cXH u5pבLTٔ%5M[v-b>-M!9yY}s IDEcj)[TRHf\OFW4l 23]HKMdZb1Ѡq !'TۃA]8qGk:h{ujM~D֔h^lOΚRIgbVSvkb,ikhU{i^ŽdSA(u Y`#P5|d &^msjRv8 k cuvR$۞셪=OZTU@U6bA ZW_ w]A,o/tL ժT4IS- @ pO^dFbCj9TTROp$%i'׶v)8a[Owm Z:YmI/$X>)UwQD W:/ŜǥՉQveKՐaL$Y-̡YYօֆ,Y_dZ-f88d& -kLNL3c GdZl$gt ?oʴ$FNvcC+bqj\C)AP뛭ȪvZd삱;G $&X|m8Sax1*?1mWNAP56!%?>טS04񲩛_Oss2%ڸψ4Z͍) Ѥ{ovr"|_<bY ["5z4-d dj&0^?q{ |bM=K#g{8j>(VV#K yb! .Ğ"=I`M1!`P=A! *D:zA#0Zc!0أ7]&sJ K@8AȏB{n tRê)z3q3H:6?iꉿjxXsƗCl"h[ I*byxZ?qŸi¿¯kǴ#[H|~yx3~V'$h*%+'W>=Y^Sx+4xf1>=y{>NP c 46x*0ܐR UBQ~ U&^*A7ҩEld*~|\$@vLχ0Yv"8+ޖ]CNMٕFpR ^ee-AH_!8#g1,{ `<_'W%crU j$r(ȃ+Ku $"l!TckNm~)tjKQEبb!7T-U]ٕMB(q:ͦ_p*E˞BOL-E`)䠺NM{MڹUg 7yPdK3$U=1\!k;CvM ˮ™~5x5<()_%U v]vW=WUuE5\s "Q8 # {p+v^NyCnḫVxa)C)F8~ /ձxfSZk otHV><)B' K=BSueI9 ΐܭ 1GȗYla_#%p̥S۲ؚ÷6'|] osWٜ# 9Qa Y: 0گ I֥&-_d ?Rmi1ߘg|atS)Sld6EL&Igb&0%KR{`0`Щ\T?A M &X;S6Q{j먭(VRk֮\:es([=0mmb+z+Y 6 'AA|fig76vt>zxlۂ೥S+N %5P~b,e**{qPq7@jet|R*H]tqC4ͪZwgեwBҩߩ""  MA$IJFU b,=TNU$n[aЦӍa|Nx#r66VT-ZǭӰv endstream endobj 304 0 obj 3892 endobj 305 0 obj << /Type /FontDescriptor /Ascent 750 /CapHeight 0 /Descent -250 /Flags 32 /FontBBox [ 16 -15 757 676 ] /FontName /RBNCJB+Times-Bold /ItalicAngle 0 /StemV 0 /MaxWidth 1000 /FontFile2 303 0 R >> endobj 306 0 obj [ 556 778 778 778 778 778 556 ] endobj 27 0 obj << /Type /Font /Subtype /TrueType /BaseFont /RBNCJB+Times-Bold /FontDescriptor 305 0 R /Widths 306 0 R /FirstChar 98 /LastChar 104 /Encoding /MacRomanEncoding >> endobj 307 0 obj << /Length 308 0 R /Length1 4364 /Filter /FlateDecode >> stream x՗}XTUsϽw "2#Ç(`jF ")21bd暙kln_k5fefndK[({^Fvy|{=4ג 7@!Z:1/Y]oY9QF2UmwźjsҮ'P@_R ehΡB=qYM=W>jE nPo@]X cueeE/ꍨ{QނF[.)c@0Az11"mŷ 2Z%>8 `}]^ }MrY\2,HdH<ߙZWgW#2dV0|Mթ)@;R  m d:5*gl6jsO>tyN]k}*~Aӏϯ۹.O4n}9ѓLiQ8NK ~T |Uuk}uDފs3 'CRFNP&M0֢`bqmdCkxv}]v՘VK#ѝM<$tOqビ-F ѺK:: e.>A\Cv\MMKI e6s.XSɜ?exKL-;j^c|qW[5lvZyTk5ՙo'--X[Vi@h֥ ) !a@[DA12 &jw$c2(sBv yyB;;04iCgaV04051E j10`½#'_=]qȦW~}{m`1,%tU:׶7aQ{w?^P.14yo+~*,V,QZZ{M7=7|*(Q0CjK^)0^eVޗ&RiL&rx)̈ ~8D$^'^#^%x8@'~Owe߈}oĿb8p&d_|%ċ/$'{?#q*N@S} |:@aSN 8ljߧ#xN|x.ă܍:8Ocv6ր棢Mx8҅6ad &ԜM_pJ-A}آoa{jԄMh5G^(Le^"#Hu5$@lg*4Qp_phһIYc9L@6)T.|;p%sxl'cm4?<[">꿌}BGkg3܊9޶4RFh<0~ѳ<z`##E7O mÑ"""v("ayr#Zj}:%=g7qC-;fM}0m47aᰜ,#K\J\BXN,#.". b/$m|<⏈Ĺ4SsH."M,$EEI, {z;?,hGFTb>EB<$Db.愜C$:tqpFOmPL%y18 BK:$b"#x4!d`8K(9xBImP.1h PDA[",Z$h ̱(ʆ #K(QOA !:Bu](:8tD~ߊ//Fkg0y1ʬۙ'@OЗ endstream endobj 308 0 obj 2696 endobj 309 0 obj << /Type /FontDescriptor /Ascent 701 /CapHeight 0 /Descent -299 /Flags 4 /FontBBox [ -39 -177 605 711 ] /FontName /DWQCJB+Symbol /ItalicAngle 0 /StemV 0 /MaxWidth 1042 /FontFile2 307 0 R >> endobj 310 0 obj [ 744 247 549 631 494 439 ] endobj 100 0 obj << /Type /Font /Subtype /TrueType /BaseFont /DWQCJB+Symbol /FontDescriptor 309 0 R /Widths 310 0 R /FirstChar 33 /LastChar 38 >> endobj 311 0 obj << /Length 312 0 R /Length1 5760 /Filter /FlateDecode >> stream xW{xSU_k4m$-4 4MI@jӒPKy`R(JjaFt^$=t 8w uGtƋO$sRQw޿^{>;@l609MeLC:?\ֶe:ͥ>sIMK?<^y3@4g|u$=B g7[0_j]Pi 5% - Swoic⛈w]5mm'~ UCPQ=҃. 0 2Tlj\TKlrogu=n-zJ`%<-i RI#wb PaϠ$A1 8at@! =[6V؁c}VZ쑗~"udcdIx p5v~1MOyqCi%x%4b&Va bTn7V\Gddk)Bɿ "|_6cKq:.$z0maO2g~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/J{V*P&*P*tPR.Ug.v9޼míCkE U ʖ>l16z|JUpon$&<2}nM_G#EjCWl<+ Y A\&&RZH˂^U z,Ml* j"^DzH_|%)$HLo&U16DI&ͪ6gh$r"^7 p>6nƽƪ댣T?\F*uܴ~a{-nIC @d+>xp+jJ[־z|Ʈ~]׌ob3T]v`x:> endobj 314 0 obj [ 722 778 778 444 ] endobj 90 0 obj << /Type /Font /Subtype /TrueType /BaseFont /RBNCJB+Times-Bold /FontDescriptor 313 0 R /Widths 314 0 R /FirstChar 119 /LastChar 122 /Encoding /MacRomanEncoding >> endobj 315 0 obj << /Length 316 0 R /Length1 5300 /Filter /FlateDecode >> stream xW{XT׵_ky1:238|HC30(((%DM jM5Y㵵H͐GcRas͍_CMCzȹswb^{k=b"MH"EMyYI;*gϡIdLYXf 2aHXtEϭr*|BA 1UIV4=y)dڊr:@ِ jWYk ;Tl}@vծhP!V/ŝ LZ1VQ X;#Lq\ݯc<ٴ&rs,)TA$vaf.| r ٰkt>faCG_ ͢Sj7bn:oam$&C?L>/UOLy[=U2ŝ4;ϡy;_[JݤBfA9Cx4 ݘ)M>\Ta'Wm].,·jug %\Oͽ4G4L땗DpDi62"܁Ȁ9~i2"<+& 5͓bb&?hۊo ǜ}EQj#eK8wiIrN3Jdr]GhZ2?P|t!)_wGbo띸,q#/YrfYqױZS9*B OH&*bΦ/rw}zHyψcV'=}L}ݰIƑ5eF,I"9dZ⎣ESO?e|=_#F'=˧=kv)wi%Jdz";Y&[,aqV7YV3cl?: ^`Kq''S]F%&mroj]gɝpn zɎ yY4n\W;q]@6ߑy s8dv'1%Yzve?\{<|]߽fL@d'u`knf^_CukulO_ޘ*6Dţ[T<b=8P,QkX0Fſ Q E*IoA\mCykA(Cvv1UzD(G{Doc[V,D{EEֵeHa3TO6>[o;So{v޶vgmLowmz[i^\;WST6)z;7l ^ meamhVПiGvޮ*^M'KI=nnn{dcOv۰vېv[ 8AG#cvȠerQJ1|z)ir@ZJy6jZh e="1xGxgo*ATBNJ( p\ xE e^TBQ% x>GR/q|̯SJba4V)X | >6İn`=PZZjq.%\b1-BV(03WfJh$D ͐ l|E: g?7A~;(t'p~WG>/r5?^>͖- -ƒgfwh$=]*7ybzr_\cr/GBW=pijCD-p%*K eʳBl&, vO]lcwX}bZ;ln캚ŮG'1y|(U )r"t}Q-i#ZștYYYm?2瘳w.`s%bX-b YFՋA_]Ak BkEDEh"x (xx!jJp#IxT[!Ěv{F\-66=QEM`d1O87sK;!oB6MYON.hfIWÑQZG. > ; t %\ yy b]ZEԨTIԪQmZZV]ŸZt.]Pl'/ `'P3YɫyMVM Bjc3_՚W7xh*m(y2a?L\tul:fϊ-w]T_WmeI_V"͍e|mŞoUWF.+-ymk@[Ҷ_PG+~-7lf͊5[Sfz6=U]]5?U\> endobj 318 0 obj [ 444 ] endobj 136 0 obj << /Type /Font /Subtype /TrueType /BaseFont /PYACJB+Times-Bold /FontDescriptor 317 0 R /Widths 318 0 R /FirstChar 122 /LastChar 122 /Encoding /MacRomanEncoding >> endobj 319 0 obj << /Length 320 0 R /Length1 4800 /Filter /FlateDecode >> stream xڭ7kxUܪ58ή3bTu@ُcs׽umn✥ֳڶ$t/;aC,;K\.pŗKJ=Ĉ!zbG51wCDwmeb[m*d zhhVVãDۻ{KH ƓC22xN82j`Ha@ 9+4,#9ɂiV%Eɰ )L9=3 Wq,(N&,A;BVNNo^\0H{< Og9 ?6y?I$ds9tc[>o/O1^-8ȇ"RNx'p>d&\6{@A g0C](o'es.wduHUɷA.?!x^!+8s._ ҏP?2 |F^ӱn~|q1`)}lE:OQ __ RJYY8cQQo18 LX k` lxwqx .YFQ@3&P C ~̀YXY-sGx O_ KէտQ }:L%F>J`̅&XL^ߏ 0<\O`8ex_<2L" v4;sI\ qn 2˰ذsàkaK-8\<֨{δ(9@'sN)z*ݹazT bS*@3чqxu/#l8 GpGg$~50,n0\{ VcBpTp~Z}lgүoY%#R+|Tm!E|OU3Ff٦F75cej6%Q_B5Fu ~7bK{G8Eƙ̻8Y1gظ35cu,+n\qJ~C6%=9>li/Ϭdqq&aj~̶Fc+|&2#"Dnd5?s|iiF;`g@3jG5k}2Y-2zo &Qu1FZ견er:}C;1҈9W娰5`T (x\٦f}!Ghٌ'1LTA՛D_`-Z9N:E M-yͳ7%;QyM&^;l#6 u$_QW'^Ē::$NKDNM_O/bON_?mjqSZ\R-ګdqbxW2ǣvF DA-ĝĻv4)cn)+@ VC6 Jq2x ix=xt]:^.]O~gm[/~Jc~q0tٜ sŻH@*$TbO.v[W04R7 QjF/n88r&BW'NBrGgvÈ~DWSux}rss|.~έݠ2y\JfV҇/=> endobj 322 0 obj [ 333 333 722 722 250 722 250 722 722 500 ] endobj 16 0 obj << /Type /Font /Subtype /TrueType /BaseFont /VPRCJB+Times-Roman /FontDescriptor 321 0 R /Widths 322 0 R /FirstChar 40 /LastChar 49 /Encoding /MacRomanEncoding >> endobj 323 0 obj << /Length 324 0 R /Length1 6524 /Filter /FlateDecode >> stream xڽ8y|י{3% #Y,m-91`Cb™#~PhHJ(6MӐV$-@ 4imwd[oF o4}{9o F`@uG9Nwr=YU }wlr0Y:rK@u/:cgYU8/FEyy3{Vlbx>S}*cE]ut>ޕ`+wW׽?<4?GJրq7?J?&E??%pTr{ hьU@ <fxX Eߘ4q\h=^a"XJďyf0pL0 ʠT@ @i1([7z) JDZ hUG|W lFK?@+Q2qGVD}OK>IWB2C9nF/EM:X;`/<%ȃ䇬:_т8ozs> F29wďFa vF\0q>^z p'聵/klV)!HH1bV!9k^f+Y9Wy5j^aQ7ďOČ( ߀mհ A{ x\G Ċ6'/(P#jbzQ{J3/bmebKMBU0B+,X#( 0HYJjd 1!WRPnOa;CKq2>Ycbe*(V(T~muƖckc Ϡ5nF4;q>,5rK@N)uGpkA-( eT$D24c~Aud=yCr8m$&[.?a*(GmCT `렝.=t'gQzF`*:[9\bb>`U?wEbbҦ,S+V~ν{%xNrwGT^ÍWtfb9FHﱉ i=11˛Iw4c=fMIMF>i5jT %Ե"L'$t|q!V]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_',/@@DHlw&"/ Q2( Q`0X$߰sIf/`J!;U;M/ p^ݶ.'?xwvKcGWIOW(r .> endobj 326 0 obj [ 250 722 722 722 722 722 722 722 333 333 722 722 250 722 722 722 722 500 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 444 333 722 722 722 722 722 278 722 722 500 722 722 333 389 ] endobj 107 0 obj << /Type /Font /Subtype /TrueType /BaseFont /DQDWOL+Times-Roman /FontDescriptor 325 0 R /Widths 326 0 R /FirstChar 32 /LastChar 115 /Encoding /MacRomanEncoding >> endobj 327 0 obj << /Length 328 0 R /Length1 18696 /Filter /FlateDecode >> stream xڽy|[Ź0sg$#RFuK6b~ J~J+8߽!B+6\7t1jD+n[љB>j/YiA(s_  U\;c߲v%wؽ5C>nES3!eȱ~ɺ u7lBZXqu ƔucDއ9hA(xgjX$AR$CrXTirzd@FdBfdAVdC=m Tқ Sߊ.Gª-{_9>^,ڃh;uz]6Y0ʠ/xo/ &/Aq SMYPAt+ڊ~7qA@ŕH'zգ[Ѿo$SoԉKytp5n!j2:E`/ztԇJt0D/I0S?'!z֠V\O'UjBYt =~kq3]ǜ=th#-ށC[->*B_0Vݎ~ex5лiGSavϠ@]?=yW~gf(6qC? ſnk G;nch },C*JV1LET%Pjn]v9=~8x %*Asz7}`?rCk{wʣ?/Y5v|s/oE(>Z;FQxⰃSPe=z0u~m8ǻ0ރ+Vw}31fvчY}v:;t{hq3##*7j|ŏNj Hcv~6c2Zt0PEnd@ M~x05p1P@_o`6 ,~z?^Ux;~ĿԔrQ{{'HoG(bt}*#ͶH~:Q=C_-\x_xU3犇NvQ-pN7/G&];<0ׁ''τw} dn\Ҁ _#<7aïSM3+הQjP3Rj9A=@=L=M@~X%+#@W&:Nz^;~~9 =װ7 ɸ/fV271ODkDX.^#>,%>͎Enҋ>@q VIר65ŒS*<UÄ{nڋ[諱 N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+V $ūGh$B`=b{ ;"YtԷp䩃#' 6g֭7oJ>۝k&>_G2>0ngoY҉e;r> endobj 330 0 obj [ 250 778 778 778 778 778 778 778 778 778 778 778 250 333 250 778 778 778 778 778 778 778 778 778 778 778 778 778 778 778 778 778 778 778 778 778 778 778 778 778 778 778 778 778 778 778 778 778 778 778 778 778 778 778 778 778 778 778 778 778 778 778 778 778 778 500 500 444 500 444 278 500 500 278 778 444 278 722 500 500 500 778 389 389 278 500 444 667 444 444 389 ] endobj 8 0 obj << /Type /Font /Subtype /TrueType /BaseFont /LABAXT+TimesNewRomanPS-ItalicMT /FontDescriptor 329 0 R /Widths 330 0 R /FirstChar 32 /LastChar 122 /Encoding /MacRomanEncoding >> endobj 331 0 obj << /Length 332 0 R /Length1 4648 /Filter /FlateDecode >> stream xڭ7{XܙY#BuAD"( Q FBDI4p JxgC?̃`O+c=tn9|ܴE C8O3Q!8 58Mg6L +?φC[?){">f$P RWㇰ`jw ރ`8򜁥x nq<_1lL&~1vⒸ.嚸Raa5^ >W/(7Eci̡lkNpl0ko%$8DQ􆟄?ysfT /`!Qe9Xg6`WFp$#w /_1TVE ZY;[:g~6BpE\9 иc)]#_|?/ 6+,,8-Ӗ*g{GO+gͦ+VA'TgN#x@%%$jIDK|CR3!~#.n'EGEFXEs !˯7fOS** Z #-F"V:Ts]TG5իhsBav˯}+6zOitiue%Zݴw\6ZyO{G憌,T(ðeNB_KR|~-Q2.X6}7ݍY*-(ZLvcTwv #~TY=BK |Ak6|3ŧ%l ye[B˩4+Ff <@Te48hm4tiJ޿ju $5ɯ|4DrrSQKK <gXw ᪺uAÓ2\biLm3u&ӈ -v#҄TtPʹ\ q, `,z#H>(7}Ge .Tp)s8%EX9ֈuy G .VF pv\omL-.}-T}}0rm fB;&GK<'Yx>ZR\\BBž¨{GUo} űh- oH-!6ALM'^_S{&Ν&&/|ӻݳ^\f<l+aM#XlvK\<䨈z)&q|SјΏ\SB̐V`"$NΟoMfg'yU[4+ٽ76ɭ=);6V!v7 Hҷ/ 8aJTDXhuf,s^>m#dQpBiSZu)3ޅK :Ks;XHD_-qF mG{U1:^NϸzFGK Σ c.X8T .Lɚ[!~0=ۧ)-<ւu]#'W:ӓLhQ4z < wj-k0i=_.)h5cC_nDF\7f~>x#o=M4ھzw,!Ca`#Lg8D<4Ďٵ ՖUf֯h[]JoA\hDQ?jN=c | /y9f΀(K]d>7|]:hzY Ob3B ;i}L ll;INt%DՐ%D^盔b&!o<&%3ka`ښqQjd n/ς $i\҇.=%^PCtTV#H7HGp7r#]z9] K?IJzҥt=@-?1JJ闕ңJiCRrWJ-Ҥddzz<+"h9Kzp.%!`/p[>н 2x .x=zMAOm[,zК`0c•a 7%7fs*&`r'C{bLcO#ua3BA95|S'_ ĹcF?R?xU,sO}G uQ3ӞmL<&z(mdfm}`y(yY\U%15Fɚ!/k=G=sLKU*IK<)MEo˳|IP.0iΧ͕3)=<>WH.Q͖o^..ogE&aڬHjVVGH?fb37f\H/#C+B};{űEru9zOpՂFmSF2go?5P#n<3n_cJ[O+B$XA!Bд Aˇ ]|Smۨ@0xL566f}[MBBK[}׌RLCyyRg L#8kT\7*3ŋ猊8wz?iA6+6jZ\Mi-i+m>ms ,sCX }\.6[v_kU_kv\u~C7| _[-/#7ktqGڵMo J endstream endobj 332 0 obj 3309 endobj 333 0 obj << /Type /FontDescriptor /Ascent 750 /CapHeight 0 /Descent -250 /Flags 32 /FontBBox [ 16 -179 699 676 ] /FontName /LCQCJB+Times-Roman /ItalicAngle 0 /StemV 0 /MaxWidth 1000 /FontFile2 331 0 R >> endobj 334 0 obj [ 333 333 722 722 722 722 250 722 722 500 ] endobj 97 0 obj << /Type /Font /Subtype /TrueType /BaseFont /LCQCJB+Times-Roman /FontDescriptor 333 0 R /Widths 334 0 R /FirstChar 40 /LastChar 49 /Encoding /MacRomanEncoding >> endobj 335 0 obj << /Length 336 0 R /Length1 7480 /Filter /FlateDecode >> stream xڭ9 xSU9<&i4Mrs{&4mZJ4mH -``EPXF`Q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E::~sGxug9}ީ|G%ԞW!!GzHO.&{O1^+ td@yER6CCe "<˫& QJ (+ay6+¿+lzff9=μL-sYqA/'37c08 \O ݝ]Q ^Q6 5g늢vuLVMzVMd7W)[sr9nIRY""Wh* fNT7~CïCU6ҕ{ms9?8'\Y4؀]< $i~I$.ϺMscxK 5 >c2/ ʼnPOTZ8?jW*= 5YԔ6kg &I奢xz5F \ ҖKnPUd +n\wm dmtGƘ[d*j6wP7sz}Fƻ)P4_;'aRWWNVŏ_z bwdAwI^HbG ɟ&jZ4ueZwIL$ 3w3w3ԗoDO&}[4GjpEK11qJXf(˚ZC׮[`M}_/#3հ;ma,,}A5J1AhFxz`|:qt=>:*V*:mh<]U"f&辱f1#AXv݋{ zB`J ^unE`H#N;݁O4 z .AoF&6LnElA@FB@GѺ !70j\mT Ԗ=~NO~ W~FM? e<p-Xh<_h^h^h,^h[LhA9h1b|8bo1-רy!cQ2ԑt%OA+Npv-_|^ܥHy{T"ǠUg8*|!P*ޱR1AVE\5ֶ VKM1='֙I;fX |18ְRӑ:hPjpN.E:#ɜ< 7ψU 9&~;,$Q^x.T["$ għć*р:Ɂi -{ SL8#PٷۂgԵMk8kĕ: ]С=ToB3b{F GEQ;OO[6fS;)-wPM4]Equ#G.!;ȏ&~:~d-?ɏG*0?Ïx E+hM4^jH>)Y&C#(@*- 3DBKzXoź`݆u AéVFaza{ 6CFoFAieMc- ;㚽]q'mfuZj̕Mδo< tCZ۶hzRm?Ë/A^hFTU`Dyp^/V:)wwk<>6Nki$8Nk5XBQl*YŠJ(FQCePżFkSUżt*vN;*xJaFD}[d*oF$[ P! @}fa] ;8nf7#;[c^Yo+C>f endstream endobj 336 0 obj 5424 endobj 337 0 obj << /Type /FontDescriptor /Ascent 750 /CapHeight 0 /Descent -250 /Flags 96 /FontBBox [ -28 -82 768 682 ] /FontName /ZFRCJB+Times-Italic /ItalicAngle -15 /StemV 0 /MaxWidth 1000 /FontFile2 335 0 R >> endobj 338 0 obj [ 667 556 611 611 611 611 611 611 611 556 611 611 611 611 611 611 611 611 611 611 611 611 611 611 611 611 611 611 611 611 611 611 444 611 611 500 611 611 611 611 611 611 611 611 611 444 611 389 ] endobj 26 0 obj << /Type /Font /Subtype /TrueType /BaseFont /ZFRCJB+Times-Italic /FontDescriptor 337 0 R /Widths 338 0 R /FirstChar 75 /LastChar 122 /Encoding /MacRomanEncoding >> endobj 339 0 obj << /Length 340 0 R /Length1 5800 /Filter /FlateDecode >> stream xڭW tUﭪ$թΫ;SIM#4` &@@"1`xI&8(8"Ee:(#("x8v':=Ha{n `;0kj~àL4n!$2])Ë0W᧵`2PWy\4/&؆ ȅYIh%>= P[p@-B>9Nx W@/ρjWx& G4`,StH{&Cpej*i;av5mBkc.OM23!2H?F "3qE8biփ|P ~$'fHюkA+J0;ClQ"jղǴe+#O8A1Pz*؋zCpQđ4~yEL> "'iAFƍ0^7Cμ[ YԐǨ^GWueAvT̰b&xTТ܇{-{Ṅ0%9h߻j)T3里`ֱo?7֬hip.s=N72xދ|wã<+03so80;hEM&f|Zf'l';Nm<@1*F6ӥtMoз{S+ca c|e8+w36M.^ xͪj6¬ň fċY_<\O1ˡV-M}χç7^Eg`ѳT\Ϲd2zT5,!d%$-d+8^s1r!'g8j2҅:[. OO*g0_0Xl_?3Ǵ11{_3O00113ΌEl {=}=_8WMr+[[n rs?T^w}/K9ax~>ۙDFv1'>H^ŕU0^Gzpbq0OXư| ǵw }s8_|~gSBq3Sw,|'M,,^qdg).YHOKuSlbUy2@_*9*̞Jv]Ѫ5ZUn5k%}($}II"eP'Y=[!x~3(-:f6c.Y%_9oA}#C_~#X] m:_MSjjRcl q~&jSIu\e74|jFj7$Vo eEےfikѧyURڷ:~$/F#Sٳ:fahgGVjdI[Uҏe\_i]#e9c6‚ͮ`ZoD?6<Ԭt&H ,\ON7WW8wD<kȝ~ez2Ь+c: OG1|ZajnKr٢"\L2ŵ=mSx+ ۪׫b1?&4蘚׫+ݢcRZqw | u- -*m9'.s9W*OjιS*I_.K" \BbWr1ҜĄ9KXuz8e1] 9ނ/4H:u s KzD0 LNt1/!{kM/PՋ}=Rv\u%lI0Of\8W^'Ğ}BR{#)+K(2ČzR-Ydޓuߵ?s!!סCYǜ\2er~qyu&Ls~{E($#Ù-pD ]mXZXd9SG]S-EIW%K/ȰDɚo b|A:~>R*(H]TktM/ksbKϫvq^+] z/\4•yq{\ͥONq^MmxY R\Aؙ0Yv+e. n >Li*Yl2WZ/|iw2rkʭ).a[l9siQpo#d? 376U &|_7e 16_FmL;; :r嶦2! 3>dN3ڞ5,'m٣}ͮuo^ HhVt^o&XExK<41$3ά꺙ަ]lh[=zSԾtb{684I`cS ͡C=C@ρA:$ ҁR:$5FJ JI!: $n[BCnGN!Dw VqBlމvK }|nC0\nE`Ct ИMoD#BBWDɭ &Z4jv[X-TŐP /uQ'Whr /q5Kj6j0 5]7xyȨQz^'|[']'Q' uBQ]'}~~~!_Pg?>;_cxG炍y$D~IU:BG@2(Tld36ƩR, 6#, 6.FXl\l\SƐ<*U S4 q.3*]^.UYHTb8" *$GآZ|aX:+ȢJ7X>t3XZ}ҙ;(!Ggғnq@D9dFx0"Py'D~>+Sm`tk1wWVyp4rWzFҝ1zm2SzVg J3=>`TFijdh4htFp X|`:(|`dN0xV3ǘf5S.BG\}wI2:XfHF'Jtt7rX܁e MXz h=a1ҼnvnwG[wM&k#~N1X"ZJxUt{[))ʄ [ɬPFk'^/2C/Q^zD (0@@` uМ-j~W_3B+thihԴbC wJRP< .`w endstream endobj 340 0 obj 4102 endobj 341 0 obj << /Type /FontDescriptor /Ascent 750 /CapHeight 0 /Descent -250 /Flags 96 /FontBBox [ -10 -19 768 682 ] /FontName /FDTCJB+Times-Italic /ItalicAngle -15 /StemV 0 /MaxWidth 1000 /FontFile2 339 0 R >> endobj 342 0 obj [ 444 611 611 611 611 611 611 611 611 611 556 611 611 611 611 611 611 611 611 611 611 611 611 611 611 611 611 611 611 611 611 611 611 444 ] endobj 112 0 obj << /Type /Font /Subtype /TrueType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2123 endobj 345 0 obj << /Type /FontDescriptor /Ascent 701 /CapHeight 0 /Descent -299 /Flags 4 /FontBBox [ -39 -216 662 745 ] /FontName /FDTCJB+Symbol /ItalicAngle 0 /StemV 0 /MaxWidth 1042 /FontFile2 343 0 R >> endobj 346 0 obj [ 744 549 713 ] endobj 121 0 obj << /Type /Font /Subtype /TrueType /BaseFont /FDTCJB+Symbol /FontDescriptor 345 0 R /Widths 346 0 R /FirstChar 33 /LastChar 35 >> endobj 347 0 obj << /Length 348 0 R /Length1 5684 /Filter /FlateDecode >> stream xڭW tTE}tI}ovm:!!!NM !bB 6 L3qgAҲL ;ct݉xo7{f윳꫿@ 0 Wf`mbC!iw`z^LJ>e}`9R`æ[vmԛt|D icc>tw>Ez7yoݠ>V ˍ<˱6mFHED l<%C.s[ƸR(=H熧>x 66QAC= - $q.7pg^E<aC p-lp F݅KW߀F~2j5CNأ"FMp'ɭԏv~!I %HHg, =ӡGZ=#mTWB`>t[n؋wJWQZ,>ZQMp5 A|KRQW'ԗ/tsTC3]ka߁w1M'$%uMb]L8Qr3^MZ]szƑq<|MCJIr!'i]Ay:}G_dSl#Y빭0wPvXylYlel(vVUZG(FO'`;?Fu!,Ԋ+mX;ow*x k\K^Ǩ%ep=8FQ;YB:ud%!}l9aC~| qr|Er4ڨD 12t n\t+EF{c Ti4$3&)b2nfK  3\d.1RǾľO+pK܍(w?7E e6~7 ?oai?B_ó, G)z`{gyZpOWyWV3g<?`|>V bGշj_ c Gqǧ8 XYL)x 9czIqQ*7?#%ΚgfŜd2e(qKwŐ'\ʂA+sO/ Mf) )*hE?vwVn-dcBB^%X@S]eN3|s{~yPW~V!3-Wݫj G׫X>!DI |4#eBiMT˖KUP[%\BeŜf(~W(so^99;%1z#xrJ.-پ¾%wܻ<{{sz;qq=y5tiϩ \[Y2$'YT/v$8[lXXXb=ijn˔ecXslBN=36AhK-B1gnP$ܛ7͘nJ;S"T{N5bepbءWPZak .L/ L؊8v m'[+٥R^CfvgX9kfyYB|o1L PfV{:i~7Mcwe;*1SWWW\5L[9tqidǑƎ^ݘ6߽,Wozy xj}޼ʊU?};={߬x{fk9eUk;VotJ7#9T l+}dRNM^$'7[gt9Ic^o5kL1tR<0Bssqz\A*Njw>P?dl+}BN8q%Scx. F1ġ3,-|Z BI ,dOT9נdڙY3EXHF: e ٥e{BL==n+3Б-mB:ɸMYgZݞ۝̓ t"wܤ$r#>ns/ubnduTZ_tu\[|⛕w/X'^E0'ˮV] Ĩ&|)xey Ӟkel1°P{ 77E+0S|0_mCH]sjbv_i_To֢o'SzM?O!) 1J Æ0O-_@}ct\}t\o}4JUQ:iӣt!-JBH(݅ D(ADNs@H;v(F0E? t; Qz[(݂Df4f JVDBv7i5Nzy^률s]-e˴Eyr/>|ܚS/@zlYi1Z3[-/h&zKWdV&x\dk2Gɿl#GOG96[tͨHk<9R$u1d5Nah y]gkڻ"(YiF.Һayu%Bgu Z.iR6tCp!3#Z4Lty)bfxd$Z0k|!8U%K#yԓ?n$"~gIL(ڱ9".gG'z˯}qGၸ>]}({X]oC[|gśև7)oۼz%]{AYѧ럇&bH:+ΨSqeqjk17gRS,lmyEwZqhM#d^Zd{?Ƈ|F>/>\̇sO7ŘbL2#k/ңGdI7Xd@Ə4Jtt7;1|a1߆y M0=CBzݒhBLMtH&~N1%BQ *= ^Tt:23j5yQt%JG[7stH^˃yU^נ@XaM *N8t(O;;ZEuv6+ڛcPph1P;Ql.v-A(FQCczbZ5@1$]LuIM`e(xRa .2؏EtH.HW9E\g:{/nz gBm-ވH e[V endstream endobj 348 0 obj 4048 endobj 349 0 obj << /Type /FontDescriptor /Ascent 750 /CapHeight 0 /Descent -250 /Flags 96 /FontBBox [ -10 -12 768 682 ] /FontName /RBNCJB+Times-Italic /ItalicAngle -15 /StemV 0 /MaxWidth 1000 /FontFile2 347 0 R >> endobj 350 0 obj [ 444 611 611 500 ] endobj 82 0 obj << /Type /Font /Subtype /TrueType /BaseFont /RBNCJB+Times-Italic /FontDescriptor 349 0 R /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ߗe~~~\5P:olr>_?_?\[Aq+A4:b2!ߋf!V|%V;3d Tk)>)Tl?CJ/b#OبE ~>EљEL#x7&:G%o b u1!8!8*{*zIz:zS֊cֈb7ƶ!VPfVƗa7KQb&[D>X':'3 (FTBgA@Y1(΄2i%GEʐE{BqVYp(cIʊg(!\d#d%RY(#yHl*:GF`D>Q Ⱦ} VG{HՂ}u][*7M wM"|;G _8u§npl # 0(|0 9hzp9_x6oX83_@X*h.4YRhuSwB KGXKuz'Ȗ@0+ :Av sԊ% &Y'hV*k_ >8'vy9G>]|,뚺;ᩲީ.%+y~i<8 +]o^z endstream endobj 352 0 obj 3786 endobj 353 0 obj << /Type /FontDescriptor /Ascent 750 /CapHeight 0 /Descent -250 /Flags 32 /FontBBox [ 16 -15 757 676 ] /FontName /PYACJB+Times-Bold /ItalicAngle 0 /StemV 0 /MaxWidth 1000 /FontFile2 351 0 R >> endobj 354 0 obj [ 722 ] endobj 104 0 obj << /Type /Font /Subtype /TrueType /BaseFont /PYACJB+Times-Bold /FontDescriptor 353 0 R /Widths 354 0 R /FirstChar 119 /LastChar 119 /Encoding /MacRomanEncoding >> endobj 355 0 obj << /Length 356 0 R /Length1 6104 /Filter /FlateDecode >> stream xڭ7 tTEׯt:II{M'O!BL0$Lӎ뺺DmTPw۝xGo{{vW]u~TUWh :ִwC)un}y?Ju/_sOpf5#-_yYo)l_1{q|~'KE9.xЋӡe B hE0J`:<gXF,ȇ5 ɇ JPvzyZA_Fj.ZA?aL)}}&Y]>s)+qK^vN);'8+03¹߆#K mW hE41aI )XH&FZO^Gdه6 y#YMh+FЗ~A?0:81ol {3rq[aMpApoFy+oCտB $ 3Ŭ΃Xqe s (zxa~kM]G9zƍbp=O%9Q5z,"MVF.r;BX{'ar E=443SMaiuno}+0} 5 3QIc y|<<<Ϝf2ef`BFv+{?{_X.-r74w ~uxwڵːQx~3qL'/@=xпɛj u;V+5Šg|!\ /3ԾR~ێ9oq`ud>1y~2 3}ZvVfw wzZkSd[5ђg5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0 /Descent -250 /Flags 96 /FontBBox [ -10 -19 768 686 ] /FontName /LCQCJB+Times-Italic /ItalicAngle -15 /StemV 0 /MaxWidth 1000 /FontFile2 355 0 R >> endobj 358 0 obj [ 444 611 611 611 611 611 611 611 611 611 556 611 611 611 611 611 611 611 611 611 611 611 611 611 500 611 611 611 611 611 611 611 611 611 611 611 500 ] endobj 19 0 obj << /Type /Font /Subtype /TrueType /BaseFont /LCQCJB+Times-Italic /FontDescriptor 357 0 R /Widths 358 0 R /FirstChar 74 /LastChar 110 /Encoding /MacRomanEncoding >> endobj 359 0 obj << /Length 360 0 R /Length1 3700 /Filter /FlateDecode >> stream xՖmtG3ϳK aPB )B)ʆ"TƐbJ %dKb%[ bĈmH"])RJ+ ` X(1֚b?[>{gΝ0.( a6YS W.O[:WZ\Qf.^R]Lc398plG{ER^|UErasEU!_QNӖT,z΍;@AʪxC{D;lQa_x\l>p_r?QԎSMz3&M(Vmا!2YJ'y1I㐉fB EIʐ|Hzu*VI@ד^j FyI@ރbg/P Gd=F90"ݦB_c .` $êEP:KrW&LFӄ:)d.s%eڇlSԨc뤷DuMxO@s WQkRs?tjnD^ר=sYN>N-$'+2@:37UsЗu; NjW(7]s:e[ը&w,&.7[vǻҢF k^02/?Yv|n s-jߛA^OuBO37 t_ē>¿+9rf^aA:%v)b](,S2{BYtyNv^hF56gl褄@Bz !PAWI|o"qz#=t[؇-{To8o^N5+- r$'uGa.P²I[Jcn`d :,B_f0ܲ]m- AΗlY԰F m=dzNUJֱdHZ^5rfKΈj[~\-Gc?V5-Gɕܞs]e*-z4#B\GXB%W?1J,PUr+|m"r!0YL~G>$/=Q+bs)& Os\|y,Lrz[-Sx<%$ry/9^ZsVG~&ǐYb3Myy7It&3&}8[mwPW{C=M<[NZR)$Sr{;J&ёڒ-)Z{L%4ZH(i銧G&o#{>ҋBWnWQwKJZϊϗZ%E$RlUU#'F}5 endstream endobj 360 0 obj 2004 endobj 361 0 obj << /Type /FontDescriptor /Ascent 701 /CapHeight 0 /Descent -299 /Flags 32 /FontBBox [ 41 -202 550 729 ] /FontName /VPRCJB+Symbol /ItalicAngle 0 /StemV 0 /MaxWidth 1042 /FontFile2 359 0 R >> endobj 362 0 obj [ 250 600 600 600 600 600 600 600 600 600 600 549 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 549 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 333 600 333 ] endobj 17 0 obj << /Type /Font /Subtype /TrueType /BaseFont /VPRCJB+Symbol /FontDescriptor 361 0 R /Widths 362 0 R /FirstChar 32 /LastChar 93 /Encoding /MacRomanEncoding >> endobj 363 0 obj << /Length 364 0 R /Length1 3476 /Filter /FlateDecode >> stream xՖT| ^Т(wD9 F Cb$Dn&&ܕ~Y9r392ל۴~537Z3Ǚtys9Ϗ}Ġ y+*bTrK@%zbM`u]eBkߺzMcMʢREn+WTԯ.mbl]@TSI'[ZѧևD/}j`ݪ@c~#6;;" m|4zr =PRT!޹x]8&i62tJa t9NVL}EX*:I؀Նsأ;<2LqҤCއ + 4GAЀ =_hw.b[r<:M>@k{A**SzS%uT Bjd t{Эq+EODq"v.Tv'~؍ľ[ʅiڑa$r"vd"=(qP:s̕LBiw1[:Iǯ<؎nHӧqE)yS#ͪjtNP b̌_rY)C:>ө07 Pj3Ó!ͪǓyjؓ{xbF-[F 31Zaz/S?WBiQ}C:;)dRBNjʙ<1}qqiA]Piv1.)jbѽ\nsjܽcH\`Foo&|zOΜKk 76oл<)sc!yӣ6Fqc|991#LeF+\ Quz0\e0Rc7γNr(ߩY@m0?'vxI% ݷyO(#^j0/p%w;aYx $jUTLR_Xe>}[μDiӃq@a͟~͇wL sx-ݤ\aC!Ԕ Ka}rD"A^$#/'%FC$Bf|oZԬlp[Y5d?;o_W $Io"EWh{Edr_ H8y9cɣdS09!<$Cҿt%Zx#61> endobj 366 0 obj [ 250 600 600 600 600 600 600 600 600 600 600 549 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 549 ] endobj 99 0 obj << /Type /Font /Subtype /TrueType /BaseFont /FDTCJB+Symbol /FontDescriptor 365 0 R /Widths 366 0 R /FirstChar 32 /LastChar 61 /Encoding /MacRomanEncoding >> endobj 367 0 obj << /Length 368 0 R /Length1 5520 /Filter /FlateDecode >> stream xڭW tǙ{zF]3{ԒF !A !<ql` x;Ď 4KZc9v3n䄇-;'hzk 65 ^‘sX'4w?|,l_ȩ8R]`?`4-O&ȇ18u*HZkVU-on\AmmMkڭ^ kjk9 >ۗ\?G"l_oWHp98>=]u,$r3 iD3ױ)4Kqگ?a7>nSA&dP G0xwh],%p P.|p|t @ϡp; 8M{`/YF\mv!ƣM(ds]?_=$HNy|L}L "'dB `=A~=h 8I'UB rz~2l7ۧ0- #9-/Xf`VCZg1wϣeoI8 =!ቕd<> -BhUh9xf9{|]ozA\?_ ύ8= s{f{#(lWuxw!xW׾e\K m臛hE$ēd,$VYl$fB8#YEnoKc9NflL aYA.ǭ6q,cn B:Bu^ҳ}aVhF 3N)X|hs"z&<҇%e=zg 8EFGUQAl2# I+y#n,ȏW!r"7MNe34>h6 }/JҳiD1L341313sE 0l>[>̮gwﱟa#g n{z wmcQy?o=2 ~o O-z|L3~v'>O>ĝU$YGHd{ c*sy0ԾDۄ97>߈p)x~cq.e8wy9ٞ2iJK$'%u:bcbt9$f-P>eBf4l2qbA+M8t@*ЄeT¿%$(CqNSd|"kdzTdך}6$$\.!Je:Xz|eDN6 14PѴՉ`HDҧU*MkZ*\lT4+UPhtSW T-/6npɮ= MUXQJXd~LOhj隀& iR5eI;U҉e\-i\"6\iZ҈1ORaZW01۫OW\jiT|8=2+}8΅!))3p˹1S5ĚiF CI*7h@5<i ŪK,2bʥu 0JW4 X[`td0ȿW=5+ si4i%5Iie5 C~cSCQ2R֭ya>ꦩaZIAyThpN08rMoTp75/95/ZL$`|nQc{m,DYX #0J6Bd8=)Ci8$6#+vݍ52F]č`ЖZ7O9dcm5ǯ^5HG 7k}eqfeX.BbJ56&FbcS29eS"$S/GB@quZl),,;}4/%Ot;.9oI?1)ZxwqgxGk%CC_Т`+fq36Epeuf d\(U͝ss%Oj Y³7Ty/ťib~2\X.ԧuMݛv0`)]S]H88|{E)$99%'Ǔ$Qc5yJ3ivH'(k;ik@g&&ⴘ\1:7  r"eBTb-cN1B(/{(z6YsfI  =ƀ[;D<9' mui+6zz~3:?]B J(cѮ($tD%5ÝK?hHQ`.X>vnC5!ZQ݂ ht3O! xFlBiGVnD5'8G`5Z4f s@hDB؈qyzx@f;lV4[h]( o"ofjiZ[h!A(qZAjZadUk?g.uT U T jZȯҫ)\2:SHѷFD8kPŠ?[zȿRPrX~g{A2TtCPgp[ƠAxA,YA\>.)uAO*i * .Q Ɉ'E82X1_*20Jp噈ɆeTc0 J" J7POzPNcIP銻O:V:(WA]7N9&%,6G^sJ^5+a2M35Xo@2KUkaQ&F>i4mX6̵'2MrLLsad2JTAX05J26ž䠋u43-I+$W"idld3Fo!xl+R>X>R0>cQHkjXY+"Nӯy%"`a5"5Z>(R.s.Xb݂)nuX`ڥ_;b]b]78nmk{kh×&b;USlJv%xLH(uƔ 'Tq8 R_.nӯ1yl t7%j@C p 8Sk׫SԑFGOiQs{z/-}Ā^BK}ӌqRـbL1C"_"S=+LD6EELE*܆T7 vuavnk ~`gUav=OK?#[<<JK퓏T-5+v_Ol endstream endobj 368 0 obj 3885 endobj 369 0 obj << /Type /FontDescriptor /Ascent 750 /CapHeight 0 /Descent -250 /Flags 96 /FontBBox [ -10 -12 768 682 ] /FontName /RBNCJB+Times-Italic /ItalicAngle -15 /StemV 0 /MaxWidth 1000 /FontFile2 367 0 R >> endobj 370 0 obj [ 556 611 611 611 611 611 611 611 611 611 611 611 611 611 611 611 611 611 611 611 611 611 611 444 ] endobj 65 0 obj << /Type /Font /Subtype /TrueType /BaseFont /RBNCJB+Times-Italic /FontDescriptor 369 0 R /Widths 370 0 R /FirstChar 84 /LastChar 107 /Encoding /MacRomanEncoding >> endobj 371 0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Ͷ, ^kFK/Fqtf/ʲQhff R9ur^#SF-{D%c0#CjB, TM]V{1l96Cr+}WJ׿/_]T3$~xحZdh Cܱ$d`do+W}W>lIQD5D(%N5 9+5VsGq(!16x"^.ȹT"0J=dbkaM"u?O)SX ?(OxQmUBdw4J:"-W,+qEbĒJq8׳V43z ՝/e6GSk^ѓX JTJkfnt=.Nl-hu77񕼏.9Q㯇Nj5ZVy5Fdr܍4ҳ*JO%Z_Cwɞ9^c ^zr6k ?.SxN{cاkCcr1")i8ԢmvscxVs[|ZErG׫@!CЪV@2l#YP-Em> endobj 374 0 obj [ 250 722 722 722 722 722 722 722 722 722 722 722 722 722 250 722 500 500 722 722 722 722 722 722 722 722 722 722 722 564 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 500 278 722 722 722 722 722 722 722 722 722 722 278 722 722 722 ] endobj 122 0 obj << /Type /Font /Subtype /TrueType /BaseFont /NTHLZO+Times-Roman /FontDescriptor 373 0 R /Widths 374 0 R /FirstChar 32 /LastChar 119 /Encoding /MacRomanEncoding >> endobj 375 0 obj << /Length 376 0 R /Length1 6744 /Filter /FlateDecode >> stream xڭX xו>ΌF^#zX$B'Lg߅}(9ء n&c@?r>`0e218oBhp^9\ ?b(j C)lp0uB& wܖ.|7]߂_^qXcDCrI = {Z-5mJ `L((@w=p-{ &+ff,՘z!sy~`|v- fAx&/d5GSWRWǁ DlS - n7#%$|Htԑ62D"7h 1qVԟh 2DWЃ=1|NKJH#y,nYa'S+P5.Emah== ',F=˄#} ;')0p '>B`Tb2HvdKqr =D;hI#)a\}|mbG8w#UN_L%OL&ϧ!ULL=J`TxR F bTELUЋfV#\5;!OLC7ሚpDKRAVF[v8A-(9F^"s /GuDݴ#Dۃ`Ao!=GYh2ǔca1=̭A1 sb.34[–ײ;؟oEyRn5w3w 7ύq;RUvN~? ?\i_}^yW.b5d72%8W΂FhH8T,R-溜9lj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1޶axJUЦ4Y2L܊E3]g7aUbA"V=/CtʆeFiB&?.*dٸ1,Id\|ϟDI\۽ٶ.q'~l_yܯ(9{؝P#KmV xЩ3jJͪ)DhdTJYrN[%j uv: j]bnL0ݎi;1 Nn=ADžtv}r;kt:SJ.>Ǜ$5'x59qx[Zs|~ȺgnCZڶ"{_#"r *,0*?:#`wh#3^$RΖxXaXcޥvmDڵ(2yDY yZMi,&-Vt"6)5PD`@`_EFEG,r,Ϗy %{IN Kv nJ|P[kWn.?m"R endstream endobj 376 0 obj 4870 endobj 377 0 obj << /Type /FontDescriptor /Ascent 750 /CapHeight 0 /Descent -250 /Flags 96 /FontBBox [ -10 -19 768 682 ] /FontName /VPRCJB+Times-Italic /ItalicAngle -15 /StemV 0 /MaxWidth 1000 /FontFile2 375 0 R >> endobj 378 0 obj [ 444 611 611 611 611 611 611 611 611 611 556 611 611 611 611 611 611 611 611 611 611 611 611 611 611 611 611 611 611 611 611 611 611 444 611 611 500 611 611 611 611 611 611 611 611 667 ] endobj 61 0 obj << /Type /Font /Subtype /TrueType /BaseFont /VPRCJB+Times-Italic /FontDescriptor 377 0 R /Widths 378 0 R /FirstChar 74 /LastChar 119 /Encoding /MacRomanEncoding >> endobj 379 0 obj << /Length 380 0 R /Length1 3580 /Filter /FlateDecode >> stream xՖ}xeǿ}?snLa"1!C`!ј07;2@&&-R2B"b(#L RȐ(gau_^~$Ua ƃbi4kYKg68tp0#߸hImey~KK +ޝ~zT'E>`qU=V^!z% J}|U؟ѳW-ͷ-|F^5R4kmD caȻXr']ֹw Cyڿַ\䎵Z rP(̉A3Km d15r3kDSlIzlUiw#><peem=-kgFnOs4pֲ?2~⩧S5ҪK^@lcvDV[!r6.<\" W+ u aXZaQsÌKqت9ՌZ 2EBryYJ#cJYL ɻiɩrR$ϲqG<,$CXwcr4y'9JJYsVI d QJ~!T#IryJ|6+v=E=K5VZ2(#vO}-̕N&oN0 Ң+_k)zŴ/FI[wW -d2FI򅞜;[.5+_&/kg%E%RS5= endstream endobj 380 0 obj 1970 endobj 381 0 obj << /Type /FontDescriptor /Ascent 701 /CapHeight 0 /Descent -299 /Flags 32 /FontBBox [ 42 -177 550 706 ] /FontName /LCQCJB+Symbol /ItalicAngle 0 /StemV 0 /MaxWidth 1042 /FontFile2 379 0 R >> endobj 382 0 obj [ 250 600 600 600 600 600 600 600 600 600 600 549 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 549 549 ] endobj 108 0 obj << /Type /Font /Subtype /TrueType /BaseFont /LCQCJB+Symbol /FontDescriptor 381 0 R /Widths 382 0 R /FirstChar 32 /LastChar 62 /Encoding /MacRomanEncoding >> endobj 383 0 obj << /Length 384 0 R /Length1 6316 /Filter /FlateDecode >> stream xڭX tTEU~Iu'n$ݤ󟐐OH A !$& &Eqgu<"2(+Y!owA3.8H3sξꪯn[n[UU(|ۺ Nb{69`Z~񙏱 Wۺpbm7awbLT)"Թ~ӖnDcmhoc!/*Voҥ [w ~hH'wmظ))1Nz<l#G!6BTPd~Ǣ6a qBfC@}̟cshI8Azp?;z*O>.8 ˰v`Ra6A3dlP k'83Q.p,ؾz TM9xuA,:~AH~2jʀ|XaC j;D6ǡzWOvM(G:Ft$Hzړ8"qhiu{EC@ڽhx,pUTwz)hE! pp;IW_Q")Z`? cHEI=#W[Ϥ3{!V_qlRv/ G h%H#UqJЯY`—TK(FGO@KaЏ^hSpcd>qDK<$E~O>j3^q7psIG82sO72xνc]c$<+(#ű_7C mW hE0;d^+Ũ֓$dMqrM{ ~NatqϱgnsQMPAhqhY'4Æpj'#h8QI- FċQ1Jk+a-f zap[\KpiSIΨgH&,#7J8Lɯp9C.[ /G:iF.Ԇ`=N{ }>I8=H$3g~<<\`.2Uf`Bv;{2>?q&.-Vpk[~~n>kd^;~W!i?~NA}= QO .:N6y%0>@^ÕU (X\-80ۘ!/*D^T]& b qǛqG笎f& TTULDWZZ8eT!uiEа5ol\rYVe? [sN)'=mضs ]6^^,m$qd#UOk{(Hsq݉4I8J1g>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 /FontBBox [ -26 -208 768 682 ] /FontName /LCQCJB+Times-Italic /ItalicAngle -15 /StemV 0 /MaxWidth 1000 /FontFile2 383 0 R >> endobj 386 0 obj [ 556 611 611 611 611 611 611 611 611 611 611 611 611 611 611 611 611 611 611 611 611 611 611 444 611 611 500 611 611 611 611 611 611 611 611 611 611 444 ] endobj 88 0 obj << /Type /Font /Subtype /TrueType /BaseFont /LCQCJB+Times-Italic /FontDescriptor 385 0 R /Widths 386 0 R /FirstChar 84 /LastChar 121 /Encoding /MacRomanEncoding >> endobj 387 0 obj << /Length 388 0 R /Length1 5800 /Filter /FlateDecode >> stream xڭW tUﭪ$թΫ;SIM#4` &@@"1`xI&8(8"Ee:(#("x8v':=Ha{n `;0kj~àL4n!$2])Ë0W᧵`2PWy\4/&؆ ȅYIh%>= P[p@-B>9Nx W@/ρjWx& G4`,StH{&Cpej*i;av5mBkc.OM23!2H?F "3qE8biփ|P ~$'fHюkA+J0;ClQ"jղǴe+#O8A1Pz*؋zCpQđ4~yEL> "'iAFƍ0^7Cμ[ YԐǨ^GWueAvT̰b&xTТ܇{-{Ṅ0%9h߻j)T3里`ֱo?7֬hip.s=N72xދ|wã<+03so80;hEM&f|Zf'l';Nm<@1*F6ӥtMoз{S+ca c|e8+w36M.^ xͪj6¬ň fċY_<\O1ˡV-M}χç7^Eg`ѳT\Ϲd2zT5,!d%$-d+8^s1r!'g8j2҅:[. OO*g0_0Xl_?3Ǵ11{_3O00113ΌEl {=}=_8WMr+[[n rs?T^w}/K9ax~>ۙDFv1'>H^ŕU0^Gzpbq0OXư| ǵw }s8_|~gSBq3Sw,|'M,,^qdg).YHOKuSlbUy2@_*9*̞Jv]Ѫ5ZUn5k%}($}II"eP'Y=[!x~3(-:f6c.Y%_9oA}#C_~#X] m:_MSjjRcl q~&jSIu\e74|jFj7$Vo eEےfikѧyURڷ:~$/F#Sٳ:fahgGVjdI[Uҏe\_i]#e9c6‚ͮ`ZoD?6<Ԭt&H ,\ON7WW8wD<kȝ~ez2Ь+c: OG1|ZajnKr٢"\L2ŵ=mSx+ ۪׫b1?&4蘚׫+ݢcRZqw | u- -*m9'.s9W*OjιS*I_.K" \BbWr1ҜĄ9KXuz8e1] 9ނ/4H:u s KzD0 LNt1/!{kM/PՋ}=Rv\u%lI0Of\8W^'Ğ}BR{#)+K(2ČzR-Ydޓuߵ?s!!סCYǜ\2er~qyu&Ls~{E($#Ù-pD ]mXZXd9SG]S-EIW%K/ȰDɚo b|A:~>R*(H]TktM/ksbKϫvq^+] z/\4•yq{\ͥONq^MmxY R\Aؙ0Yv+e. n >Li*Yl2WZ/|iw2rkʭ).a[l9siQpo#d? 376U &|_7e 16_FmL;; :r嶦2! 3>dN3ڞ5,'m٣}ͮuo^ HhVt^o&XExK<41$3ά꺙ަ]lh[=zSԾtb{684I`cS ͡C=C@ρA:$ ҁR:$5FJ JI!: $n[BCnGN!Dw VqBlމvK }|nC0\nE`Ct ИMoD#BBWDɭ &Z4jv[X-TŐP /uQ'Whr /q5Kj6j0 5]7xyȨQz^'|[']'Q' uBQ]'}~~~!_Pg?>;_cxG炍y$D~IU:BG@2(Tld36ƩR, 6#, 6.FXl\l\SƐ<*U S4 q.3*]^.UYHTb8" *$GآZ|aX:+ȢJ7X>t3XZ}ҙ;(!Ggғnq@D9dFx0"Py'D~>+Sm`tk1wWVyp4rWzFҝ1zm2SzVg J3=>`TFijdh4htFp X|`:(|`dN0xV3ǘf5S.BG\}wI2:XfHF'Jtt7rX܁e MXz h=a1ҼnvnwG[wM&k#~N1X"ZJxUt{[))ʄ [ɬPFk'^/2C/Q^zD (0@@` uМ-j~W_3B+thihԴbC wJRP< .`w endstream endobj 388 0 obj 4102 endobj 389 0 obj << /Type /FontDescriptor /Ascent 750 /CapHeight 0 /Descent -250 /Flags 96 /FontBBox [ -10 -19 768 682 ] /FontName /FDTCJB+Times-Italic /ItalicAngle -15 /StemV 0 /MaxWidth 1000 /FontFile2 387 0 R >> endobj 390 0 obj [ 444 611 611 611 611 611 611 611 611 611 556 611 611 611 611 611 611 611 611 611 611 611 611 611 611 611 611 611 611 611 611 611 611 444 ] endobj 129 0 obj << /Type /Font /Subtype /TrueType /BaseFont /FDTCJB+Times-Italic /FontDescriptor 389 0 R /Widths 390 0 R /FirstChar 74 /LastChar 107 /Encoding /MacRomanEncoding >> endobj 391 0 obj << /Length 392 0 R /Length1 5096 /Filter /FlateDecode >> stream x7kte~UUyT ytbBuIGwhĤtGHx  ,(0Ttgq*MtQp2У3#"koU" Ѱ8P[(Hr[V_(+%sQn^p NXp&QF66GX;ZlS_'X)~I|x@{c }'⃧εwms,GI`ǁ?ƅH= # e I}e%4XQIy(dȂXJ|` <'Ӡ>"KXd[?:M"!Ay?O^/_6YMrK*d%ЉylR$aAR ބnCq`lYw"K`6eݜ񔞦:v0Ex~aN\s8'7NMP?v |FQga'<*(L7R>rt>n qi'] a0b[,XAj8zǫ.-e{}&I UU>!P " 6R ApؕiؒFYccI<rΪ&jxsҤ0>g]0&äeZ`|v ~#w*,2/.U"pAe`MaR>:.Xhq8r5lq6kbsdZ@r[C*47TG hX#.GKv.۾g~XfUJudpm̴[AMCI7$MKZֳju T5 5m)&o[;AE++7DmC?2N^ \Sw.hDrN45{IN0 2h4"rQcViBitP΁) K,k`q޾_gwCeɂ%4D dcq2B񕣪Ζ3ji%S%PV2XbJSMC VP˭L]( ^/V]1cEfd%F%&'%gI9%!cl3ئ[}Wl@׋q`}-R,rqEޱIx}gc([PWV118~\֔ }uz}(^*uGl .)3e]rrd!@"+D1(!B4Ec)D.4<6QqF3ggILHN,92F㋼lRG}e Uwu}\Ϥ|?ØObwXwOiC$dGAt)] +(E6K2g9K#BV9K$Fۨ Ptl;+0| EIkZNNhcIq IɉBqt2,ba5c]Uնԙ#Zh"nN:Oi)z{36ݚF?L?cjD(Wmf(PkxdA|ށ9iVfJnKJJ[YЋbrzoܸ?\],\0?d'oßBl4l6;}7ģw4S`5<sΑOpnĐZt%aV$If7gFeuENyu큥F czFZ.Xc=cٙlSj7)ǜl5gj!! |:I3hFq&QD f<[ ,D?Iz&(t$$a>qaq:qF&!8ɹ)8)L 8*o/QQC4A[A'ycsvI.[31ǵre\V+[+ʼnԷȩ YYr(KU:Kʒhu/Wj߫7UˏU eGܜ&JIwp؝;b!Ⱦ$vC^%'H `}.+剸ylf3*x%zLٴly%B˂A\^"`<<>ǂO2p^)R ~hLv4Ɩ`̅>JT!pwa妻NIr-?$kv* _+VNw/)+Gr;fxש}^R^u?ޢTv՛lVTϫJ~xe22}(d&Zӕrwr_D$˃ʸcNQrh{aeL}A!QSf-狳b]b8RLx*HR$IJ !c ,1&mĕ; %FW+& 'uK㊫|w眻tmWm_z6 hs5uklhSjBxſ8D+$~ j٦& D~Xd~f[|2.4sKYowכmmt |(s-ݦU3oOf:J7ydR5Lzzɠ;TWuz!!^R֊/lmtMN+=M.j7^n]M-mj/8[};w]Ի \vzw\uPܼ}X[nZ.ζΖ6F,oڬn6c{/Y.cţ[|u' endstream endobj 392 0 obj 3501 endobj 393 0 obj << /Type /FontDescriptor /Ascent 750 /CapHeight 0 /Descent -250 /Flags 32 /FontBBox [ -17 -143 699 674 ] /FontName /DWQCJB+Times-Roman /ItalicAngle 0 /StemV 0 /MaxWidth 1000 /FontFile2 391 0 R >> endobj 394 0 obj [ 250 722 722 722 722 722 722 722 722 722 722 722 250 722 250 722 500 500 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 333 ] endobj 127 0 obj << /Type /Font /Subtype /TrueType /BaseFont /DWQCJB+Times-Roman /FontDescriptor 393 0 R /Widths 394 0 R /FirstChar 32 /LastChar 246 /Encoding /MacRomanEncoding >> endobj 395 0 obj << /Length 396 0 R /Length1 4800 /Filter /FlateDecode >> stream xڭ7kxUܪ58ή3bTu@ُcs׽umn✥ֳڶ$t/;aC,;K\.pŗKJ=Ĉ!zbG51wCDwmeb[m*d zhhVVãDۻ{KH ƓC22xN82j`Ha@ 9+4,#9ɂiV%Eɰ )L9=3 Wq,(N&,A;BVNNo^\0H{< Og9 ?6y?I$ds9tc[>o/O1^-8ȇ"RNx'p>d&\6{@A g0C](o'es.wduHUɷA.?!x^!+8s._ ҏP?2 |F^ӱn~|q1`)}lE:OQ __ RJYY8cQQo18 LX k` lxwqx .YFQ@3&P C ~̀YXY-sGx O_ KէտQ }:L%F>J`̅&XL^ߏ 0<\O`8ex_<2L" v4;sI\ qn 2˰ذsàkaK-8\<֨{δ(9@'sN)z*ݹazT bS*@3чqxu/#l8 GpGg$~50,n0\{ VcBpTp~Z}lgүoY%#R+|Tm!E|OU3Ff٦F75cej6%Q_B5Fu ~7bK{G8Eƙ̻8Y1gظ35cu,+n\qJ~C6%=9>li/Ϭdqq&aj~̶Fc+|&2#"Dnd5?s|iiF;`g@3jG5k}2Y-2zo &Qu1FZ견er:}C;1҈9W娰5`T (x\٦f}!Ghٌ'1LTA՛D_`-Z9N:E M-yͳ7%;QyM&^;l#6 u$_QW'^Ē::$NKDNM_O/bON_?mjqSZ\R-ګdqbxW2ǣvF DA-ĝĻv4)cn)+@ VC6 Jq2x ix=xt]:^.]O~gm[/~Jc~q0tٜ sŻH@*$TbO.v[W04R7 QjF/n88r&BW'NBrGgvÈ~DWSux}rss|.~έݠ2y\JfV҇/=> endobj 398 0 obj [ 333 333 722 722 250 722 250 722 722 500 ] endobj 138 0 obj << /Type /Font /Subtype /TrueType /BaseFont /VPRCJB+Times-Roman /FontDescriptor 397 0 R /Widths 398 0 R /FirstChar 40 /LastChar 49 /Encoding /MacRomanEncoding >> endobj 399 0 obj << /Length 400 0 R /Length1 3700 /Filter /FlateDecode >> stream xՖmtG3ϳK aPB )B)ʆ"TƐbJ %dKb%[ bĈmH"])RJ+ ` X(1֚b?[>{gΝ0.( a6YS W.O[:WZ\Qf.^R]Lc398plG{ER^|UErasEU!_QNӖT,z΍;@AʪxC{D;lQa_x\l>p_r?QԎSMz3&M(Vmا!2YJ'y1I㐉fB EIʐ|Hzu*VI@ד^j FyI@ރbg/P Gd=F90"ݦB_c .` $êEP:KrW&LFӄ:)d.s%eڇlSԨc뤷DuMxO@s WQkRs?tjnD^ר=sYN>N-$'+2@:37UsЗu; NjW(7]s:e[ը&w,&.7[vǻҢF k^02/?Yv|n s-jߛA^OuBO37 t_ē>¿+9rf^aA:%v)b](,S2{BYtyNv^hF56gl褄@Bz !PAWI|o"qz#=t[؇-{To8o^N5+- r$'uGa.P²I[Jcn`d :,B_f0ܲ]m- AΗlY԰F m=dzNUJֱdHZ^5rfKΈj[~\-Gc?V5-Gɕܞs]e*-z4#B\GXB%W?1J,PUr+|m"r!0YL~G>$/=Q+bs)& Os\|y,Lrz[-Sx<%$ry/9^ZsVG~&ǐYb3Myy7It&3&}8[mwPW{C=M<[NZR)$Sr{;J&ёڒ-)Z{L%4ZH(i銧G&o#{>ҋBWnWQwKJZϊϗZ%E$RlUU#'F}5 endstream endobj 400 0 obj 2004 endobj 401 0 obj << /Type /FontDescriptor /Ascent 701 /CapHeight 0 /Descent -299 /Flags 32 /FontBBox [ 41 -202 550 729 ] /FontName /VPRCJB+Symbol /ItalicAngle 0 /StemV 0 /MaxWidth 1042 /FontFile2 399 0 R >> endobj 402 0 obj [ 250 600 600 600 600 600 600 600 600 600 600 549 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 549 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 333 600 333 ] endobj 137 0 obj << /Type /Font /Subtype /TrueType /BaseFont /VPRCJB+Symbol /FontDescriptor 401 0 R /Widths 402 0 R /FirstChar 32 /LastChar 93 /Encoding /MacRomanEncoding >> endobj 403 0 obj << /Length 404 0 R /Length1 5520 /Filter /FlateDecode >> stream xW}XSWss$!D&&(*ۀ QG2(Z ZqZ]mU @)4Kj1FvU6!xڦ!~mGE g,oa+?mC=RSX) BEb掀@:O\|ߕ.piwГKi Pl/%S6 X zZB8 _AAxI y^ ̂` :t>.Ѥ6vA0qt(e a鐜4Q"+ƃ&Z ZbY:MjH(( ^c-K#%D1KQmғV!{ 0Fit6V B7erKl\@l\؏߲ wLjrIc/opS4;s}|;d}am#$1\-|G>т|, "z 0mb/:~Ž, E%\Z~L>\NbAz"Gѧ%0IpcteDW%.D5FN1SM|>!IX'8|E&J) HM )YnM?"4mtl]DS,v1G')ǧ%:AQw说Ǯߑ:qZ#fUB-u^O?hgx/x!{'ĞrE-7fqOp2.9qSO;Yx/~ K?_SkkviQVfSn 'vX Ӊ0T6iɫOy譟F_`6|stV7"[:s<)6B*du0Km|%Rif9w%tkGl#ff8i60"5e%ٜ8,!d4cuQZWq !o/2jB {y[Q{OGMJ]˄5~I/I.ވ$EPζ{>5U++)J{Sf Vg a*moh/sgS !XL KCJ1]6n!Xg{I(54]g%۝Xbt0FnVW`:PJZ.S=!(,tG}VZm VpS0bb{ċz_Yb EK Kj(0Rx-~{/ib7YaumwX6~TÓъܩK3eM)Jd8uH CQk: Ѭ0ح_%~{jz 7t4>V%|{Sx@[V8*%JQasԶhzhon#E2zTf̤௝"Þ܅3.a.{hxޢKLaɖ4=idrN3S5R-<U^ܑ5ysk_־l9f:oMQe$(vg:2S,KrdLv.ΩՔjPC'htd𔬘4ħ9F;SG:hSS3:mY#P2Ÿxˌyy)cas{T8rXh*4{ '\ᑤ"N*2%jxCkNHc(1e6i EV` a32s0va,NGve jVGd6!fW ::wqG:n/@'O:%ꯔE}VO묖#Jܮl!ՏRQVi-Q-fxZAW5ބVVo[/׷ǷǴuxzSzFoE>ˢ')uR'y+AA&ԧʼnIWj=>zR7( v*kߗe~~~\5P:olr>_?_?\[Aq+A4:b2!ߋf!V|%V;3d Tk)>)Tl?CJ/b#OبE ~>EљEL#x7&:G%o b u1!8!8*{*zIz:zS֊cֈb7ƶ!VPfVƗa7KQb&[D>X':'3 (FTBgA@Y1(΄2i%GEʐE{BqVYp(cIʊg(!\d#d%RY(#yHl*:GF`D>Q Ⱦ} VG{HՂ}u][*7M wM"|;G _8u§npl # 0(|0 9hzp9_x6oX83_@X*h.4YRhuSwB KGXKuz'Ȗ@0+ :Av sԊ% &Y'hV*k_ >8'vy9G>]|,뚺;ᩲީ.%+y~i<8 +]o^z endstream endobj 404 0 obj 3786 endobj 405 0 obj << /Type /FontDescriptor /Ascent 750 /CapHeight 0 /Descent -250 /Flags 32 /FontBBox [ 16 -15 757 676 ] /FontName /PYACJB+Times-Bold /ItalicAngle 0 /StemV 0 /MaxWidth 1000 /FontFile2 403 0 R >> endobj 406 0 obj [ 722 ] endobj 58 0 obj << /Type /Font /Subtype /TrueType /BaseFont /PYACJB+Times-Bold /FontDescriptor 405 0 R /Widths 406 0 R /FirstChar 119 /LastChar 119 /Encoding /MacRomanEncoding >> endobj 407 0 obj << /Length 408 0 R /Length1 6224 /Filter /FlateDecode >> stream xڽ8y|S՚9&6m.ICқ4mi.&mB[R*` ŲԖ>RYOQ'iA~ 2ʌ`C<8M滷e?=;rη{NX Wrߓ+lzZr?k^sg׆P<@O߹oAٺKtvVbN$h:Aē;V}ƈC^ӽ|dߎe=o97 8HH)aP(<}E?8ruOf+&!|0 W yW"$Qao 8kaj-|`|N? gSs4!2 4(.R PxNb>F*xkH+Cl+B#r?6rp%r07&8+1Ț!\=$eax>!2|(? w{ĂdAꩂٰC!"YMc"E0 -Xv7g+w'7"Hu;`8h9]O/3zPFEGNFQ@4ƿX+a lE{w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~Lv,O(nXZ8я RA1Ty^^n1c b$,;;۸"\ YXh^ëxW,ydž"}rU$d:*tt_Z!$;{&L_\E2Vgl >om I6X ]"W䋀|)&@LL)u!e`a .1DEQ68KҐ 8Ҥq0e ebn.[sKػ -MQdYd"[Z]n, UP*HG'OfagG2{/QQdg=;#sݰ_շ8vl ]-ml>78o/:?8+pd󎥁tmk[ Clks, H;Ͳ.ɷ™oy˗σnd endstream endobj 408 0 obj 4509 endobj 409 0 obj << /Type /FontDescriptor /Ascent 750 /CapHeight 0 /Descent -250 /Flags 32 /FontBBox [ 16 -179 699 686 ] /FontName /TMZGEI+Times-Roman /ItalicAngle 0 /StemV 0 /MaxWidth 1000 /FontFile2 407 0 R >> endobj 410 0 obj [ 250 722 722 722 722 722 722 722 333 333 722 722 250 722 722 722 722 500 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 444 333 722 722 278 722 722 278 722 722 722 722 722 722 389 ] endobj 84 0 obj << /Type /Font /Subtype /TrueType /BaseFont /TMZGEI+Times-Roman /FontDescriptor 409 0 R /Widths 410 0 R /FirstChar 32 /LastChar 115 /Encoding /MacRomanEncoding >> endobj 411 0 obj << /Length 412 0 R /Length1 3600 /Filter /FlateDecode >> stream xՖxU{/5ed,XD "@hL ƅ2@k nSE7$(*PF-H5&w}{W?z99 @6 $/V)/^*eJP =0^ZVfk._ q-unZ;H[&W) Dl@ Va\fQV6S[D=eEIْ< ͢Wv==#rIqtI8)_ach|HЁz&aZPڱO@63؇cR" ^Ӎ64M/ B7{6 V:ѢvEIij@;åf' ~!G7zV*P'}4+N2}W<%їw81z,V/L6u@Vo9xUU;?O$m{q@$L2N?%[Bj{Bϗ@6vawIM2dK!tS'Rxs6z9!Թur/T=+V\r#z>PH82 nTz9vk1PF&U dFL^ظ/:ΛR]u.o]d*U7U{xiQ)xx}ՆlFV繎 )Nbi$xWaQS#}ץ4:I;(b'mȹ<130YN]'ƹ"ZMbٻCѝN}JV>F aZzkjì|#,{ޗܶҲ*]`35*9o=dΈg=pD<Azu1B;uLkն|\/gWc?:Z֒kիs{uVbZaQs̭+0Llrf-_ceRr ,&B. 2vMyΧ\H~G~, rP'$gwș?H_`iqGO<%Io''m8imdYy,Y2Mf (3d&‘?M#0\pm\(CO8Dn #Na*)2FFВLyۻ>E̾obDF2:_ztmm)%p7ZH(i/G~ه>zr(CFndFV|BnIyBJD)>(5VU<$ : endstream endobj 412 0 obj 1919 endobj 413 0 obj << /Type /FontDescriptor /Ascent 701 /CapHeight 0 /Descent -299 /Flags 32 /FontBBox [ 41 -202 550 729 ] /FontName /LCQCJB+Symbol /ItalicAngle 0 /StemV 0 /MaxWidth 1042 /FontFile2 411 0 R >> endobj 414 0 obj [ 250 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 549 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 333 600 333 ] endobj 114 0 obj << /Type /Font /Subtype /TrueType /BaseFont /LCQCJB+Symbol /FontDescriptor 413 0 R /Widths 414 0 R /FirstChar 32 /LastChar 93 /Encoding /MacRomanEncoding >> endobj 415 0 obj << /Length 416 0 R /Length1 8868 /Filter /FlateDecode >> stream xڵ9{|Tՙ9޹<2W&d2d&I&M2Mx $@0L*JUZ룕! l՚[iEVnn މvoؽg9w^;ߝ WmGH1xxVףzmֱfvI.@^ö5kʭ&8uC`u mzsK='av75X7 ܼIq`o@[7mܲ!~̓v߅?(N!$$^%S/.~vr! V 2ɽЃ[#( %xۘ {'cq,RL)nmMp<ZB9`8LX ga @ 6؈-pS/^E\<cp.fR<; p)w8G]Hq>;'}5ι6*5w7zE~M,(HB !78_'JSQ\=<1-;*7[u(9+䵜3w<õc8 ߕ$װ\ ,fLMN &B7\Ol[QM,UIYH6dy3,!я\6 rD> ?#9j^E###s \n=N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R{+v$*m4Ƕ> endobj 418 0 obj [ 250 722 722 722 722 722 722 722 333 333 722 722 722 722 250 722 722 500 500 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 722 444 722 722 722 722 722 500 500 278 722 722 278 722 500 722 500 722 722 389 278 500 722 722 ] endobj 25 0 obj << /Type /Font /Subtype /TrueType /BaseFont /HUQAVV+Times-Roman /FontDescriptor 417 0 R /Widths 418 0 R /FirstChar 32 /LastChar 119 /Encoding /MacRomanEncoding >> endobj 419 0 obj << /Length 420 0 R /Length1 3376 /Filter /FlateDecode >> stream xՖ}xeǿ}?s:18 X0&orc!\4;2@&D B\&@i% Z i̭=GvQT«+JRIAT._U%o3g-!%uR{S^~hmuM\2[Wl RHڒU]#t F+i^*\d#DS#oȸ l;0сbՍu* ;$:OG%MEfӇS8SzWl} pjZa:T:t^ݤ,('Sr^Bȴ9zZP*9`FsS|,!Dl*_1T^pST@^!=mWT:ExYQ};?RvMƉٹ8Mej{\{=x@=/lӈ,#=E̗gi%Ǎ}PRՄ 2W3m9эduK4']gz؎nTgp'"lY^7|$M:Vnz I2YQ%: IY`nV=כeW<:)MDD}släs&:h%Y $QFW TwI51 ˚08|s]'⢐YyY}Z)!%8ȁv03I;OwN64}hF2}U&|/u޸X!$(tSʟtzfd{JIolR)u:Izn2]ƃwﰆ݌~|m.bzFwu\o2>x[ʽdm|Fm 0G붍*%la`2bv)jK~, ksc;w1W5MFzCn\WaJɪǒV1rgw0F%W?oXEWoV1˔UJv M+س~!bK"TB\@?JOM琹dMFr9AN'Ii#{Sr2-$ϐYir9VNYK/;z  L92I%257>E^˶?\)5'LҢ+o ;hxbrLzu5QpiYeE􈤨Ò|Pjam0cKB` endstream endobj 420 0 obj 1797 endobj 421 0 obj << /Type /FontDescriptor /Ascent 701 /CapHeight 0 /Descent -299 /Flags 32 /FontBBox [ 42 -177 550 706 ] /FontName /RBNCJB+Symbol /ItalicAngle 0 /StemV 0 /MaxWidth 1042 /FontFile2 419 0 R >> endobj 422 0 obj [ 250 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 549 ] endobj 68 0 obj << /Type /Font /Subtype /TrueType /BaseFont /RBNCJB+Symbol /FontDescriptor 421 0 R /Widths 422 0 R /FirstChar 32 /LastChar 61 /Encoding /MacRomanEncoding >> endobj 5 0 obj << /Type /Pages /Count 2 /Kids [ 4 0 R 39 0 R ] >> endobj 423 0 obj << /Type /Catalog /Pages 5 0 R >> endobj 424 0 obj << /CreationDate (D:20060617203329+02'00') /Creator (Word) /ModDate (D:20060617203329+02'00') /Producer (Mac OS X 10.3.9 Quartz PDFContext) >> endobj 425 0 obj [ ] endobj xref 0 426 0000000000 65535 f 0000008594 00000 n 0000000022 00000 n 0000016906 00000 n 0000008614 00000 n 0000782766 00000 n 0000008720 00000 n 0000511713 00000 n 0000684071 00000 n 0000588537 00000 n 0000010337 00000 n 0000008917 00000 n 0000009602 00000 n 0000009429 00000 n 0000009449 00000 n 0000016040 00000 n 0000663887 00000 n 0000718229 00000 n 0000540888 00000 n 0000715455 00000 n 0000524941 00000 n 0000010160 00000 n 0000010180 00000 n 0000017771 00000 n 0000633963 00000 n 0000780155 00000 n 0000694102 00000 n 0000648062 00000 n 0000527345 00000 n 0000013612 00000 n 0000013633 00000 n 0000016020 00000 n 0000015211 00000 n 0000016886 00000 n 0000016077 00000 n 0000017751 00000 n 0000016942 00000 n 0000021229 00000 n 0000017808 00000 n 0000021250 00000 n 0000021359 00000 n 0000030425 00000 n 0000279127 00000 n 0000021669 00000 n 0000022435 00000 n 0000022963 00000 n 0000023734 00000 n 0000024742 00000 n 0000025615 00000 n 0000026495 00000 n 0000027430 00000 n 0000028121 00000 n 0000028962 00000 n 0000029652 00000 n 0000022257 00000 n 0000022277 00000 n 0000466113 00000 n 0000631480 00000 n 0000764648 00000 n 0000558280 00000 n 0000529828 00000 n 0000736081 00000 n 0000022799 00000 n 0000022819 00000 n 0000466983 00000 n 0000725247 00000 n 0000592856 00000 n 0000598060 00000 n 0000782593 00000 n 0000023556 00000 n 0000023576 00000 n 0000470465 00000 n 0000515936 00000 n 0000554066 00000 n 0000617550 00000 n 0000486491 00000 n 0000548627 00000 n 0000024564 00000 n 0000024584 00000 n 0000472206 00000 n 0000522486 00000 n 0000638120 00000 n 0000706088 00000 n 0000604575 00000 n 0000770019 00000 n 0000025436 00000 n 0000025456 00000 n 0000469595 00000 n 0000743915 00000 n 0000620814 00000 n 0000655798 00000 n 0000532314 00000 n 0000601901 00000 n 0000026315 00000 n 0000026335 00000 n 0000473947 00000 n 0000546137 00000 n 0000687958 00000 n 0000536752 00000 n 0000720743 00000 n 0000651302 00000 n 0000027243 00000 n 0000027264 00000 n 0000474817 00000 n 0000710404 00000 n 0000519159 00000 n 0000483800 00000 n 0000669514 00000 n 0000738697 00000 n 0000027949 00000 n 0000027970 00000 n 0000473076 00000 n 0000698870 00000 n 0000491373 00000 n 0000772707 00000 n 0000623494 00000 n 0000028775 00000 n 0000028796 00000 n 0000471335 00000 n 0000479206 00000 n 0000610611 00000 n 0000701528 00000 n 0000730497 00000 n 0000628797 00000 n 0000029480 00000 n 0000029501 00000 n 0000467853 00000 n 0000753573 00000 n 0000613392 00000 n 0000748683 00000 n 0000626149 00000 n 0000030238 00000 n 0000030259 00000 n 0000468724 00000 n 0000643616 00000 n 0000595345 00000 n 0000659894 00000 n 0000760339 00000 n 0000757566 00000 n 0000279103 00000 n 0000465257 00000 n 0000466092 00000 n 0000465281 00000 n 0000466962 00000 n 0000466151 00000 n 0000467832 00000 n 0000467021 00000 n 0000468703 00000 n 0000467892 00000 n 0000469574 00000 n 0000468763 00000 n 0000470444 00000 n 0000469633 00000 n 0000471314 00000 n 0000470503 00000 n 0000472185 00000 n 0000471374 00000 n 0000473055 00000 n 0000472244 00000 n 0000473926 00000 n 0000473115 00000 n 0000474796 00000 n 0000473985 00000 n 0000474856 00000 n 0000478937 00000 n 0000478959 00000 n 0000479169 00000 n 0000479386 00000 n 0000483526 00000 n 0000483548 00000 n 0000483763 00000 n 0000483982 00000 n 0000485993 00000 n 0000486015 00000 n 0000486222 00000 n 0000486664 00000 n 0000490257 00000 n 0000490279 00000 n 0000490492 00000 n 0000491553 00000 n 0000511066 00000 n 0000511089 00000 n 0000511328 00000 n 0000511902 00000 n 0000515642 00000 n 0000515664 00000 n 0000515875 00000 n 0000516114 00000 n 0000518877 00000 n 0000518899 00000 n 0000519106 00000 n 0000519305 00000 n 0000522204 00000 n 0000522226 00000 n 0000522433 00000 n 0000522631 00000 n 0000524683 00000 n 0000524705 00000 n 0000524912 00000 n 0000525086 00000 n 0000526975 00000 n 0000526997 00000 n 0000527204 00000 n 0000527518 00000 n 0000529570 00000 n 0000529592 00000 n 0000529799 00000 n 0000529973 00000 n 0000531944 00000 n 0000531966 00000 n 0000532173 00000 n 0000532487 00000 n 0000536471 00000 n 0000536493 00000 n 0000536703 00000 n 0000536930 00000 n 0000540631 00000 n 0000540653 00000 n 0000540863 00000 n 0000541065 00000 n 0000545723 00000 n 0000545745 00000 n 0000545960 00000 n 0000546317 00000 n 0000548369 00000 n 0000548391 00000 n 0000548598 00000 n 0000548772 00000 n 0000553660 00000 n 0000553682 00000 n 0000553897 00000 n 0000554246 00000 n 0000557986 00000 n 0000558008 00000 n 0000558219 00000 n 0000558458 00000 n 0000587895 00000 n 0000587918 00000 n 0000588152 00000 n 0000588721 00000 n 0000592599 00000 n 0000592621 00000 n 0000592831 00000 n 0000593035 00000 n 0000595087 00000 n 0000595109 00000 n 0000595316 00000 n 0000595491 00000 n 0000597798 00000 n 0000597820 00000 n 0000598027 00000 n 0000598205 00000 n 0000601606 00000 n 0000601628 00000 n 0000601840 00000 n 0000602079 00000 n 0000604201 00000 n 0000604223 00000 n 0000604430 00000 n 0000604748 00000 n 0000610164 00000 n 0000610186 00000 n 0000610402 00000 n 0000610792 00000 n 0000613130 00000 n 0000613152 00000 n 0000613359 00000 n 0000613538 00000 n 0000617295 00000 n 0000617317 00000 n 0000617525 00000 n 0000617729 00000 n 0000620540 00000 n 0000620562 00000 n 0000620769 00000 n 0000620959 00000 n 0000623232 00000 n 0000623254 00000 n 0000623461 00000 n 0000623640 00000 n 0000625651 00000 n 0000625673 00000 n 0000625880 00000 n 0000626323 00000 n 0000628427 00000 n 0000628449 00000 n 0000628656 00000 n 0000628971 00000 n 0000630982 00000 n 0000631004 00000 n 0000631211 00000 n 0000631653 00000 n 0000633705 00000 n 0000633727 00000 n 0000633934 00000 n 0000634108 00000 n 0000637865 00000 n 0000637887 00000 n 0000638095 00000 n 0000638299 00000 n 0000643162 00000 n 0000643184 00000 n 0000643399 00000 n 0000643797 00000 n 0000647781 00000 n 0000647803 00000 n 0000648013 00000 n 0000648240 00000 n 0000651028 00000 n 0000651050 00000 n 0000651257 00000 n 0000651448 00000 n 0000655529 00000 n 0000655551 00000 n 0000655761 00000 n 0000655977 00000 n 0000659639 00000 n 0000659661 00000 n 0000659869 00000 n 0000660074 00000 n 0000663592 00000 n 0000663614 00000 n 0000663826 00000 n 0000664065 00000 n 0000668924 00000 n 0000668946 00000 n 0000669157 00000 n 0000669694 00000 n 0000683416 00000 n 0000683439 00000 n 0000683686 00000 n 0000684262 00000 n 0000687663 00000 n 0000687685 00000 n 0000687897 00000 n 0000688136 00000 n 0000693652 00000 n 0000693674 00000 n 0000693889 00000 n 0000694282 00000 n 0000698476 00000 n 0000698498 00000 n 0000698713 00000 n 0000699051 00000 n 0000701266 00000 n 0000701288 00000 n 0000701495 00000 n 0000701674 00000 n 0000705814 00000 n 0000705836 00000 n 0000706051 00000 n 0000706269 00000 n 0000710147 00000 n 0000710169 00000 n 0000710379 00000 n 0000710584 00000 n 0000715049 00000 n 0000715071 00000 n 0000715286 00000 n 0000715635 00000 n 0000717731 00000 n 0000717753 00000 n 0000717960 00000 n 0000718402 00000 n 0000720373 00000 n 0000720395 00000 n 0000720602 00000 n 0000720916 00000 n 0000724893 00000 n 0000724915 00000 n 0000725130 00000 n 0000725427 00000 n 0000729892 00000 n 0000729914 00000 n 0000730124 00000 n 0000730677 00000 n 0000735639 00000 n 0000735661 00000 n 0000735876 00000 n 0000736261 00000 n 0000738323 00000 n 0000738345 00000 n 0000738552 00000 n 0000738871 00000 n 0000743504 00000 n 0000743526 00000 n 0000743742 00000 n 0000744095 00000 n 0000748289 00000 n 0000748311 00000 n 0000748526 00000 n 0000748864 00000 n 0000752457 00000 n 0000752479 00000 n 0000752692 00000 n 0000753753 00000 n 0000757271 00000 n 0000757293 00000 n 0000757505 00000 n 0000757745 00000 n 0000759841 00000 n 0000759863 00000 n 0000760070 00000 n 0000760513 00000 n 0000764391 00000 n 0000764413 00000 n 0000764623 00000 n 0000764827 00000 n 0000769428 00000 n 0000769450 00000 n 0000769662 00000 n 0000770198 00000 n 0000772209 00000 n 0000772231 00000 n 0000772438 00000 n 0000772881 00000 n 0000779549 00000 n 0000779571 00000 n 0000779782 00000 n 0000780334 00000 n 0000782223 00000 n 0000782245 00000 n 0000782452 00000 n 0000782832 00000 n 0000782883 00000 n 0000783043 00000 n trailer << /Size 426 /Root 423 0 R /Info 424 0 R /ID 425 0 R >> startxref 783134 %%EOF iem_utils-v0.0.20181004/iem_adaptfilt/AUTHORS.txt0000644000175000017500000000012112630366344021352 0ustar zmoelnigzmoelnigmarkus noisternig thomas musil iem_utils-v0.0.20181004/iem_adaptfilt/Makefile0000644000175000017500000000306513355471356021143 0ustar zmoelnigzmoelnig#!/usr/bin/make -f # Makefile to the 'iem_adaptfilt' library for Pure Data. # Needs Makefile.pdlibbuilder as helper makefile for platform-dependent build # settings and rules (https://github.com/pure-data/pd-lib-builder). lib.name = iem_adaptfilt ## iemlib.h lives in include/ cflags = -Iinclude # special file that does not provide a class lib.setup.sources = src/$(lib.name).c # all other C and C++ files in subdirs are source files per class # (alternatively, enumerate them by hand) # class.sources = $(filter-out $(lib.setup.sources),$(wildcard src/*.c)) class.sources = \ src/NLMS~.c \ src/NLMSerr_in~.c \ src/NLMSCC~.c \ src/n_CNLMS~.c \ src/n_CLNLMS~.c \ src/FXNLMSplus2in~.c \ src/FXNLMSplus3in~.c \ $(empty) datafiles = \ $(wildcard *.txt) \ $(wildcard *.pdf) \ $(wildcard *.pd) \ $(wildcard *.gif) \ $(wildcard *.bat) \ $(wildcard *.sh) \ $(wildcard *.wav) \ $(empty) #cflags = -DVERSION=$(shell cat VERSION.txt) ## build a multi-object library make-lib-executable=yes ## suppress "unused" warnings #suppress-wunused=yes ################################################################################ ### pdlibbuilder ############################################################### ################################################################################ # This Makefile is based on the Makefile from pd-lib-builder written by # Katja Vetter. You can get it from: # https://github.com/pure-data/pd-lib-builder PDLIBBUILDER_DIR=pd-lib-builder/ include $(firstword $(wildcard $(PDLIBBUILDER_DIR)/Makefile.pdlibbuilder Makefile.pdlibbuilder)) iem_utils-v0.0.20181004/iem_adaptfilt/include/0000755000175000017500000000000013355471356021122 5ustar zmoelnigzmoelnigiem_utils-v0.0.20181004/iem_adaptfilt/include/iemlib.h0000644000175000017500000001344013355471356022536 0ustar zmoelnigzmoelnig/* For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. iemlib written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2018 */ #ifndef __IEMLIB_H__ #define __IEMLIB_H__ #define IS_A_NULL(atom,index) ((atom+index)->a_type == A_NULL) #define IS_A_POINTER(atom,index) ((atom+index)->a_type == A_POINTER) #define IS_A_FLOAT(atom,index) ((atom+index)->a_type == A_FLOAT) #define IS_A_SYMBOL(atom,index) ((atom+index)->a_type == A_SYMBOL) #define IS_A_DOLLAR(atom,index) ((atom+index)->a_type == A_DOLLAR) #define IS_A_DOLLSYM(atom,index) ((atom+index)->a_type == A_DOLLSYM) #define IS_A_SEMI(atom,index) ((atom+index)->a_type == A_SEMI) #define IS_A_COMMA(atom,index) ((atom+index)->a_type == A_COMMA) #define SETNULL(atom) ((atom)->a_type = A_NULL) #ifdef MSW int sys_noloadbang; //t_symbol *iemgui_key_sym=0; #include #else extern int sys_noloadbang; //extern t_symbol *iemgui_key_sym; #include #endif //millers m_pd.h beg /* Microsoft Visual Studio is not C99, it does not provide stdint.h */ #ifdef _MSC_VER typedef signed __int8 int8_t; typedef signed __int16 int16_t; typedef signed __int32 int32_t; typedef signed __int64 int64_t; typedef unsigned __int8 uint8_t; typedef unsigned __int16 uint16_t; typedef unsigned __int32 uint32_t; typedef unsigned __int64 uint64_t; #else # include #endif #if !defined(PD_FLOATSIZE) /* if compiled pd version < 0.47*/ # define PD_FLOATSIZE 32 #endif typedef union { float f; unsigned int ui; }t_iemdenormal_f; typedef union { double f; unsigned int ui[2]; }t_iemdenormal_d; #ifndef _MSC_VER /* Microoft compiler can't handle "inline" function/macros */ #if defined(__i386__) || defined(__x86_64__) || defined(__arm__) /* a test for NANs and denormals. Should only be necessary on i386. */ static inline int IEM_DENORMAL_F(float f) /* malformed float 32 */ { t_iemdenormal_f pun; pun.f = f; pun.ui &= 0x7f800000; return((pun.ui == 0) | (pun.ui == 0x7f800000)); } static inline int IEM_DENORMAL_D(double f) /* malformed double 64 */ { t_iemdenormal_d pun; pun.f = f; pun.ui[1] &= 0x7ff00000; return((pun.ui[1] == 0) | (pun.ui[1] == 0x7ff00000)); } #if PD_FLOATSIZE == 32 typedef union { t_float f; unsigned int ui; }t_iemdenormal_t32; static inline int IEM_DENORMAL_T(t_float f) /* malformed t_float 32 */ { t_iemdenormal_t32 pun; pun.f = f; pun.ui &= 0x7f800000; return((pun.ui == 0) | (pun.ui == 0x7f800000)); } #elif PD_FLOATSIZE == 64 typedef union { t_float f; unsigned int ui[2]; }t_iemdenormal_t64; static inline int IEM_DENORMAL_T(t_float f) /* malformed t_float 64 */ { t_iemdenormal_t64 pun; pun.f = f; pun.ui[1] &= 0x7ff00000; return((pun.ui[1] == 0) | (pun.ui[1] == 0x7ff00000)); } #endif /* PD_FLOATSIZE */ #else /* not INTEL or ARM */ #define IEM_DENORMAL_T(f) 0 #endif #else /* _MSC_VER */ #define IEM_DENORMAL_F(f) ((((*(unsigned int*)&(f))&0x7f800000)==0) || \ (((*(unsigned int*)&(f))&0x7f800000)==0x7f800000)) static int IEM_DENORMAL_D(double f) /* malformed t_float 64 */ { t_iemdenormal_d pun; pun.f = f; pun.ui[1] &= 0x7ff00000; return((pun.ui[1] == 0) | (pun.ui[1] == 0x7ff00000)); } #if PD_FLOATSIZE == 32 #define IEM_DENORMAL_T(f) ((((*(unsigned int*)&(f))&0x7f800000)==0) || \ (((*(unsigned int*)&(f))&0x7f800000)==0x7f800000)) #else /* 64 bits... don't know what to do here */ //#define IEM_DENORMAL_T(f) (!(((f) >= 0) || ((f) <= 0))) int IEM_DENORMAL_T(t_float f) /* malformed t_float 64 */ { t_iemdenormal_t64 pun; pun.f = f; pun.ui[1] &= 0x7ff00000; return((pun.ui[1] == 0) | (pun.ui[1] == 0x7ff00000)); } #endif #endif /* _MSC_VER */ //millers m_pd.h end /* on 64bit systems we cannot use garray_getfloatarray... */ #if ((defined PD_MAJOR_VERSION && defined PD_MINOR_VERSION) && (PD_MAJOR_VERSION > 0 || PD_MINOR_VERSION > 40)) # define iemarray_t t_word # define iemarray_getarray garray_getfloatwords # define iemarray_getfloat(pointer, index) (pointer[index].w_float) # define iemarray_setfloat(pointer, index, fvalue) (pointer[index].w_float = fvalue) #else # define iemarray_t t_float # define iemarray_getarray garray_getfloatarray # define iemarray_getfloat(pointer, index) (pointer[index]) # define iemarray_setfloat(pointer, index, fvalue) (pointer[index] = fvalue) #endif #ifndef BUILD_DATE # define BUILD_DATE "" __DATE__ " : " __TIME__ #endif #if (defined PD_MAJOR_VERSION && defined PD_MINOR_VERSION) && (PD_MAJOR_VERSION > 0 || PD_MINOR_VERSION > 43) # define iem_open sys_open # define iem_close sys_close # define iem_fopen sys_fopen # define iem_fclose sys_fclose #else # define iem_open open # define iem_close close # define iem_fopen fopen # define iem_fclose fclose #endif // millers d_osc.c beg #define UNITBIT32 1572864. /* 3*2^19; bit 32 has place value 1 */ #if defined(__FreeBSD__) || defined(__APPLE__) || defined(__FreeBSD_kernel__) \ || defined(__OpenBSD__) #include #endif #if defined(__linux__) || defined(__CYGWIN__) || defined(__GNU__) || \ defined(ANDROID) #include #endif #ifdef __MINGW32__ #include #endif #ifdef _MSC_VER /* _MSVC lacks BYTE_ORDER and LITTLE_ENDIAN */ #define LITTLE_ENDIAN 0x0001 #define BYTE_ORDER LITTLE_ENDIAN #endif #if !defined(BYTE_ORDER) || !defined(LITTLE_ENDIAN) #error No byte order defined #endif #if BYTE_ORDER == LITTLE_ENDIAN # define HIOFFSET 1 # define LOWOFFSET 0 #else # define HIOFFSET 0 /* word offset to find MSB */ # define LOWOFFSET 1 /* word offset to find LSB */ #endif union tabfudge { double tf_d; int32_t tf_i[2]; }; // millers d_osc.c end // millers d_delay.c beg #define IEMDEFDELVS 64 #define IEMXTRASAMPS 4 #define IEMSAMPBLK 4 // millers d_delay.c end #endif iem_utils-v0.0.20181004/iem_adaptfilt/GnuGPL.txt0000644000175000017500000004311012630366344021326 0ustar zmoelnigzmoelnig GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This program is free software; you can redistribute it and/or 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, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Library General Public License instead of this License. iem_utils-v0.0.20181004/iem_adaptfilt/pd-lib-builder/0000755000175000017500000000000013355471356022272 5ustar zmoelnigzmoelnigiem_utils-v0.0.20181004/iem_adaptfilt/pd-lib-builder/Makefile.pdlibbuilder0000644000175000017500000012415213355471356026377 0ustar zmoelnigzmoelnig# Makefile.pdlibbuilder dated 2018-03-15 version = 0.5.1 # Helper makefile for Pure Data external libraries. # Written by Katja Vetter March-June 2015 for the public domain. No warranties. # Inspired by Hans Christoph Steiner's Makefile Template and Stephan Beal's # ShakeNMake. # # Grab the newest version of Makefile.pdlibbuilder from # https://github.com/pure-data/pd-lib-builder/ # # GNU make version >= 3.81 required. # # #=== characteristics =========================================================== # # # - defines build settings based on autodetected OS and architecture # - defines rules to build Pd class- or lib executables from C or C++ sources # - defines rules for libdir installation # - defines convenience targets for developer and user # - evaluates implicit dependencies for non-clean builds # # #=== basic usage =============================================================== # # # In your Makefile, define your Pd lib name and class files, and include # Makefile.pdlibbuilder at the end of the Makefile. Like so: # # ________________________________________________________________________ # # # Makefile for mylib # # lib.name = mylib # # class.sources = myclass1.c myclass2.c # # datafiles = myclass1-help.pd myclass2-help.pd README.txt LICENSE.txt # # include Makefile.pdlibbuilder # ________________________________________________________________________ # # # For files in class.sources it is assumed that class basename == source file # basename. The default target builds all classes as individual executables # with Pd's default extension for the platform. For anything more than the # most basic usage, continue reading. # # #=== list of Makefile.pdlibbuilder API variables =============================== # # # Variables available for definition in your library Makefile: # # - lib.name # - lib.setup.sources # - class.sources # - common.sources # - shared.sources # - .class.sources # - .class.ldflags # - .class.ldlibs # - cflags # - ldflags # - ldlibs # - datafiles # - datadirs # - makefiles # - makefiledirs # - externalsdir # # Optional multiline defines evaluated per operating system: # # - forLinux # - forDarwin # - forWindows # # Variables available for your makefile or make command line: # # - make-lib-executable # - suppress-wunused # # Path variables for make command line or environment: # # - PDDIR # - PDINCLUDEDIR # - PDBINDIR # - PDLIBDIR # # Standard make variables for make command line or environment: # # - CPPFLAGS # - CFLAGS # - LDFLAGS # - CC # - CXX # - INSTALL # - STRIP # - DESTDIR # # Deprecated path variables: # # - pdincludepath # - pdbinpath # - objectsdir # # #=== descriptions of Makefile.pdlibbuilder API variables ======================= # # # lib.name: # Name of the library directory as it will be installed / distributed. Also the # name of the lib executable in the case where all classes are linked into # a single binary. # # lib.setup.sources: # Source file(s) (C or C++) which must be compiled only when linking all classes # into a single lib binary. # # class.sources: # All sources files (C or C++) for which the condition holds that # class name == source file basename. # # .class.sources: # Source file(s) (C or C++) specific to class . Use this for # multiple-source classes or when class name != source file basename. # # common.sources: # Source file(s) which must be statically linked to each class in the library. # # shared.sources: # Source file(s) (C or C++) to build a shared dynamic link lib, to be linked # with all class executables. # # cflags, ldflags, ldlibs: # Define cflags (preprocessor&compiler), ldflags (linker) and ldlibs (dynamic # link libs) for the whole library. These flags are added to platform-specific # flags defined by Makefile.pdlibbuilder. # # .class.ldflags and .class.ldlibs: # Define ldflags resp. ldlibs specific to class . These flags are # added to platform-specific flags defined by Makefile.pdlibbuilder, and flags # defined in your Makefile for the whole library. Note: cflags can not be # defined per class in the current implementation. # # datafiles and datadirs: # All extra files you want to include in binary distributions of the # library: abstractions and help patches, example patches, meta patch, readme # and license texts, manuals, sound files, etcetera. Use 'datafiles' for all # files that should go into your lib rootdir and 'datadirs' for complete # directories you want to copy from source to distribution. # # forLinux, forDarwin, forWindows: # Shorthand for 'variable definitions for Linux only' etc. Use like: # define forLinux # cflags += -DLINUX # class.sources += linuxthing.c # endef # # makefiles and makefiledirs: # Extra makefiles or directories with makefiles that should be made in sub-make # processes. # # make-lib-executable: # When this variable is defined 'yes' in your makefile or as command argument, # Makefile.pdlibbuilder will try to build all classes into a single library # executable (but it will force exit if lib.setup.sources is undefined). # If your makefile defines 'make-lib-executable=yes' as the library default, # this can still be overridden with 'make-lib-executable=no' as command argument # to build individual class executables (the Makefile.pdlibbuilder default.) # # suppress-wunused: # When this variable is defined ('yes' or any other value), -Wunused-variable, # -Wunused-parameter, -Wunused-value and -Wunused-function are suppressed, # but the other warnings from -Wall are retained. # # PDDIR: # Root directory of 'portable' pd package. When defined, PDINCLUDEDIR and # PDBINDIR will be evaluated as $(PDDIR)/src and $(PDDIR)/bin. # # PDINCLUDEDIR: # Directory where Pd API m_pd.h should be found, and other Pd header files. # Overrides the default search path. # # PDBINDIR: # Directory where pd.dll should be found for linking (Windows only). Overrides # the default search path. # # PDLIBDIR: # Root directory for installation of Pd library directories. Overrides the # default install location. # # DESTDIR: # Prepended path component for staged install. # # CPPFLAGS: # Preprocessor flags which are not strictly required for building. # # CFLAGS: # Compiler flags which are not strictly required for building. Compiler flags # defined by Makefile.pdlibbuilder for warning, optimization and architecture # specification are overriden by CFLAGS. # # LDFLAGS: # Linker flags which are not strictly required for building. Linker flags # defined by Makefile.pdlibbuilder for architecture specification are overriden # by LDFLAGS. # # CC and CXX: # C and C++ compiler programs as defined in your build environment. # # INSTALL # Definition of install program. # # STRIP # Name of strip program. Default 'strip' can be overridden in cross compilation # environments. # # objectsdir: # Root directory for installation of Pd library directories, like PDLIBDIR but # not overridable by environment. Supported for compatibility with pd-extended # central makefile, but deprecated otherwise. # # pdincludepath, pdbinpath: # As PDINCLUDEDIR and PDBINDIR but not overridable by environment. Deprecated # as user variables. # # #=== paths ===================================================================== # # # Source files in directories other than current working directory must be # prefixed with their relative path. Do not rely on VPATH or vpath. # Object (.o) files are built in the directory of their source files. # Executables are built in current working directory. # # Default search path for m_pd.h and other API header files is platform # dependent, and overridable by PDINCLUDEDIR: # # Linux: /usr/include/pd # # OSX: /Applications/Pd*.app/Contents/Resources/src # # Windows: %PROGRAMFILES%/Pd/src # %PROGRAMFILES(X86)%/Pd/src (32 bit builds on 64 bit Windows) # # Default search path for binary pd.dll (Windows), overridable by PDBINDIR # # %PROGRAMFILES%/Pd/bin # %PROGRAMFILES(X86)%/Pd/bin (32 bit builds on 64 bit Windows) # # Default location to install pd libraries is platform dependent, and # overridable by PDLIBDIR: # # Linux: /usr/local/lib/pd-externals # OSX: ~/Library/Pd # Windows: %APPDATA%/Pd # # https://puredata.info/docs/faq/how-do-i-install-externals-and-help-files # The rationale for not installing to ~/pd-externals by default on Linux # is that some people share the home dir between 32 and 64 bit installations. # # #=== targets =================================================================== # # # all: build $(executables) plus optional post target # post: target to build after $(executables) # alldebug: build all with -g option turned on for debug symbols # : force clean build of an individual class # .pre: make preprocessor output file in current working directory # .lst: make asm/source output file in current working directory # # install: install executables and data files # clean: remove build products from source tree # # help: print help text # vars: print makefile variables # allvars: print all variables # depend: print generated prerequisites # coffee: dummy target # # Variable $(executables) expands to class executables plus optional shared lib, # or alternatively to single lib executable when make-lib-executable=true. # Targets pre and post can be defined by library makefile. Make sure to include # Makefile.pdlibbuilder first so default target all will not be redefined. # # #=== Pd-extended libdir concept ================================================ # # # For libdir layout as conceived by Hans-Christoph Steiner, see: # # https://puredata.info/docs/developer/Libdir # # Files README.txt, LICENSE.txt and -meta.pd are part of the libdir # convention. Help patches for each class and abstraction are supposed to be # available. Makefile.pdlibbuilder does not force the presence of these files # however. It does not automatically include such files in libdir installations. # Data files you want to include in distributions must be defined explicitly in # your Makefile. # # #=== Makefile.pdlibbuilder syntax conventions ================================== # # # Makefile.pdlibbuilder variable names are lower case. Default make variables, # environment variables, and standard user variables (CC, CXX, CFLAGS, DESTDIR) # are upper case. Use target 'allvars' to print all variables and their values. # # 'Fields' in data variables are separated by dots, like in 'foo.class.sources'. # Words in variables expressing a function or command are separated by dashes, # like in 'make-lib-executable'. # # #=== useful make options ======================================================= # # # Use 'make -d ' to print debug details of the make process. # Use 'make -p ' to print make's database. # # #=== TODO ====================================================================== # # # - decide whether to use -static-libgcc or shared dll in MinGW # - cygwin support # - android support # - figure out how to handle '$' in filenames # - add makefile template targets dpkg-source dist libdir distclean tags? # # #=== end of documentation sections ============================================= # # ################################################################################ ################################################################################ ################################################################################ # GNU make version 3.81 (2006) or higher is required because of the following: # - function 'info' # - variable '.DEFAULT_GOAL' # force exit when make version is < 3.81 ifneq ($(firstword $(sort 3.81 $(MAKE_VERSION))), 3.81) $(error GNU make version 3.81 or higher is required) endif # Relative path to externals root dir in multi-lib source tree like # pd-extended SVN. Default is parent of current working directory. May be # defined differently in including makefile. externalsdir ?= .. # variable you can use to check if Makefile.pdlibbuilder is already included Makefile.pdlibbuilder = true ################################################################################ ### variables: library name and version ######################################## ################################################################################ # strip possibles spaces from lib.name, they mess up calculated file names lib.name := $(strip $(lib.name)) # if meta file exists, check library version metafile := $(wildcard $(lib.name)-meta.pd) ifdef metafile lib.version := $(shell sed -n \ 's|^\#X text [0-9][0-9]* [0-9][0-9]* VERSION \(.*\);|\1|p' \ $(metafile)) endif ################################################################################ ### variables: files ########################################################### ################################################################################ #=== sources =================================================================== # (re)define .class.sources using file names in class.sources define add-class-source $(notdir $(basename $v)).class.sources += $v endef $(foreach v, $(class.sources), $(eval $(add-class-source))) # derive class names from .class.sources variables sourcevariables := $(filter %.class.sources, $(.VARIABLES)) classes := $(basename $(basename $(sourcevariables))) # accumulate all source files specified in makefile classes.sources := $(sort $(foreach v, $(sourcevariables), $($v))) all.sources := $(classes.sources) $(lib.setup.sources) \ $(shared.sources) $(common.sources) #=== object files ============================================================== # construct object filenames from all C and C++ source file names classes.objects := $(addsuffix .o, $(basename $(classes.sources))) common.objects := $(addsuffix .o, $(basename $(common.sources))) shared.objects := $(addsuffix .o, $(basename $(shared.sources))) lib.setup.objects := $(addsuffix .o, $(basename $(lib.setup.sources))) all.objects = $(classes.objects) $(common.objects) $(shared.objects) \ $(lib.setup.objects) #=== executables =============================================================== # use recursive variables here because executable extension is not yet known # construct class executable names from class names classes.executables = $(addsuffix .$(extension), $(classes)) # construct shared lib executable name if shared sources are defined ifdef shared.sources shared.lib = lib$(lib.name).$(shared.extension) else shared.lib = endif ################################################################################ ### platform detection ######################################################### ################################################################################ #=== operating system ========================================================== # The following systems are defined: Linux, Darwin, Windows. GNU and # GNU/kFreeBSD are treated as Linux to get the same options. uname := $(shell uname) ifeq ($(findstring $(uname), Linux GNU GNU/kFreeBSD), $(uname)) system = Linux endif ifeq ($(uname), Darwin) system = Darwin endif ifeq ($(filter MINGW% MSYS%, $(uname)), $(uname)) system = Windows endif # Unfortunately not all Mingw versions provide a link cc > gcc, therefore # gcc is hardcoded here (but not if CC is redefined). ifeq ($(system), Windows) ifeq ($(origin CC), default) CC = gcc endif endif # evaluate possible system-specific multiline defines from library makefile $(eval $(for$(system))) # TODO: Cygwin, Android #=== architecture ============================================================== # native architecture of the build machine build.arch := $(shell uname -m) # Target architecture as reported by compiler. Give precedence to eventual # user-defined compiler. The first field of -- is extracted. ifneq ($(origin CXX), default) dumpmachine.cpu = $(firstword $(subst -, ,$(shell $(CXX) -dumpmachine))) else dumpmachine.cpu = $(firstword $(subst -, ,$(shell $(CC) -dumpmachine))) endif # Target architecture as reported by compiler is only used for Windows at the # moment. For other systems this still has to be tested. ifeq ($(system), Windows) target.arch = $(dumpmachine.cpu) else target.arch = $(build.arch) endif ################################################################################ ### variables per platform ##################################################### ################################################################################ #=== flags per architecture ==================================================== # Set architecture-dependent cflags, mainly for Linux. For Mac and Windows, # arch.c.flags are overriden below. # Raspberry Pi 1st generation ifeq ($(target.arch), armv6l) arch.c.flags = -march=armv6 -mfpu=vfp -mfloat-abi=hard # Beagle, Udoo, RPi2 etc. else ifeq ($(target.arch), armv7l) arch.c.flags = -march=armv7-a -mfpu=vfpv3 -mfloat-abi=hard # Intel 32 bit, build with SSE and SSE2 instructions else ifeq ($(findstring $(target.arch), i386 i686), $(target.arch)) arch.c.flags = -march=pentium4 -mfpmath=sse -msse -msse2 # Intel/AMD 64 bit, build with SSE, SSE2 and SSE3 instructions else ifeq ($(findstring $(target.arch), x86_64), $(target.arch)) arch.c.flags = -march=core2 -mfpmath=sse -msse -msse2 -msse3 # if none of the above architectures detected else arch.c.flags = endif #=== flags and paths for Linux ================================================= ifeq ($(system), Linux) prefix = /usr/local libdir := $(prefix)/lib pkglibdir = $(libdir)/pd-externals pdincludepath := $(wildcard /usr/include/pd) extension = pd_linux cpp.flags := -DUNIX c.flags := -fPIC c.ldflags := -rdynamic -shared -fPIC -Wl,-rpath,"\$$ORIGIN",--enable-new-dtags c.ldlibs := -lc -lm cxx.flags := -fPIC -fcheck-new cxx.ldflags := -rdynamic -shared -fPIC -Wl,-rpath,"\$$ORIGIN",--enable-new-dtags cxx.ldlibs := -lc -lm -lstdc++ shared.extension = so shared.ldflags := -rdynamic -fPIC -shared -Wl,-soname,$(shared.lib) endif #=== flags and paths for Darwin ================================================ # On OSX we try to build fat binaries by default. It is assumed that OSX i386 # can build for ppc and OSX x86_64 can't. TODO: try to refine this condition. # LLVM-clang doesn't support -fcheck-new, therefore this flag is omitted for # OSX x86_64. ifeq ($(system), Darwin) pkglibdir = $(HOME)/Library/Pd pdincludepath := $(firstword $(wildcard \ /Applications/Pd*.app/Contents/Resources/src)) extension = pd_darwin cpp.flags := -DUNIX -DMACOSX -I /sw/include c.flags := c.ldflags := -undefined suppress -flat_namespace -bundle c.ldlibs := -lc cxx.ldflags := -undefined suppress -flat_namespace -bundle cxx.ldlibs := -lc shared.extension = dylib shared.ldflags = -dynamiclib -undefined dynamic_lookup \ -install_name @loader_path/$(shared.lib) \ -compatibility_version 1 -current_version 1.0 version.flag := $(filter $(cflags), -mmacosx-version-min=%) ifeq ($(target.arch), i386) cxx.flags := -fcheck-new arch := ppc i386 x86_64 version.flag ?= -mmacosx-version-min=10.4 endif ifeq ($(target.arch), x86_64) arch := i386 x86_64 version.flag ?= -mmacosx-version-min=10.5 endif arch.c.flags := $(addprefix -arch , $(arch)) $(version.flag) arch.ld.flags := $(arch.c.flags) endif #=== flags and paths for Windows =============================================== # Standard paths on Windows contain spaces, and GNU make functions treat such # paths as lists, with unintended effects. Therefore we must use shell function # ls instead of make's wildcard when probing for a path, and use double quotes # when specifying a path in a command argument. # Default paths in Mingw / Mingw-w64 environments. 'PROGRAMFILES' is standard # location for builds with native architecture, 'ProgramFiles(x86)' for i686 # builds on x86_64 Windows (detection method by Lucas Cordiviola). Curly braces # required because of parentheses in variable name. ifeq ($(system), Windows) pkglibdir := $(APPDATA)/Pd ifeq ($(MINGW_CHOST), i686-w64-mingw32) programfiles := ${ProgramFiles(x86)} else programfiles := $(PROGRAMFILES) endif pdbinpath := $(programfiles)/Pd/bin pdincludepath := $(programfiles)/Pd/src endif # Store default path to pd.dll in PDBINDIR if the latter is not user-defined. # For include path this is done in the platform-independent paths section below, # but for PDBINDIR it is done here so ld flags can be evaluated as immediate # variables. ifeq ($(system), Windows) ifdef PDDIR PDBINDIR := $(PDDIR)/bin endif PDBINDIR ?= $(pdbinpath) endif # TODO: decide whether -mms-bitfields should be specified. ifeq ($(system), Windows) cpp.flags := -DMSW -DNT ifeq ($(filter i%86 mingw32, $(target.arch)), $(target.arch)) arch.c.flags := -march=pentium4 -msse -msse2 -mfpmath=sse else ifeq (x86_64, $(target.arch)) cpp.flags := -DMSW -DNT -DPD_LONGINTTYPE=__int64 arch.c.flags := -march=core2 -msse -msse2 -msse3 -mfpmath=sse else arch.c.flags = endif extension = dll c.flags := c.ldflags := -static-libgcc -shared \ -Wl,--enable-auto-import "$(PDBINDIR)/pd.dll" c.ldlibs := cxx.flags := -fcheck-new cxx.ldflags := -static-libgcc -static-libstdc++ -shared \ -Wl,--enable-auto-import "$(PDBINDIR)/pd.dll" cxx.ldlibs := shared.extension = dll shared.ldflags := -static-libgcc -shared "$(PDBINDIR)/pd.dll" stripflags = --strip-all endif #=== paths ===================================================================== # Platform-dependent default paths are specified above, but overridable. # Path variables in upper case can be defined as make command argument or in the # environment. Variable 'objectsdir' is supported for compatibility with # the build system that pd-l2ork has inherited from pd-extended. PDINCLUDEDIR ?= $(pdincludepath) PDLIBDIR ?= $(firstword $(objectsdir) $(pkglibdir)) ifdef PDDIR PDINCLUDEDIR := $(wildcard $(PDDIR)/src) endif # base path where all components of the lib will be installed by default installpath := $(DESTDIR)$(PDLIBDIR)/$(lib.name) # check if include path contains spaces (as is often the case on Windows) # if so, store the path so we can later do checks with it pdincludepathwithspaces := $(if $(word 2, $(PDINCLUDEDIR)), $(PDINCLUDEDIR)) #=== accumulated build flags =================================================== # From GNU make docs: 'Users expect to be able to specify CFLAGS freely # themselves.' So we use CFLAGS to define options which are not strictly # required for compilation: optimizations, architecture specifications, and # warnings. CFLAGS can be safely overriden using a make command argument. # Variables cflags, ldflags and ldlibs may be defined in including makefile. optimization.flags = -O3 -ffast-math -funroll-loops -fomit-frame-pointer warn.flags = -Wall -Wextra -Wshadow -Winline -Wstrict-aliasing # suppress -Wunused-variable & Co if you don't want to clutter a build log ifdef suppress-wunused warn.flags += $(addprefix -Wno-unused-, function parameter value variable) endif CFLAGS = $(warn.flags) $(optimization.flags) $(arch.c.flags) # preprocessor flags cpp.flags := -DPD -I "$(PDINCLUDEDIR)" $(cpp.flags) $(CPPFLAGS) # flags for dependency checking (cflags from makefile may define -I options) depcheck.flags := $(cpp.flags) $(cflags) # architecture specifications for linker are overridable by LDFLAGS LDFLAGS := $(arch.ld.flags) # now add the same ld flags to shared dynamic lib shared.ldflags := $(shared.ldflags) $(LDFLAGS) # accumulated flags for C compiler / linker c.flags := $(cpp.flags) $(c.flags) $(cflags) $(CFLAGS) c.ldflags := $(c.ldflags) $(ldflags) $(LDFLAGS) c.ldlibs := $(c.ldlibs) $(ldlibs) # accumulated flags for C++ compiler / linker cxx.flags := $(cpp.flags) $(cxx.flags) $(cflags) $(CFLAGS) cxx.ldflags := $(cxx.ldflags) $(ldflags) $(LDFLAGS) cxx.ldlibs := $(cxx.ldlibs) $(ldlibs) ################################################################################ ### variables: tools ########################################################### ################################################################################ # aliases so we can later define 'compile-$1' and set 'c' or 'cxx' as argument compile-c := $(CC) compile-cxx := $(CXX) ################################################################################ ### checks ##################################################################### ################################################################################ # At this point most variables are defined. Now do some checks and info's # before rules begin. # 'forward declaration' of default target, needed to do checks all: # To avoid unpredictable results, make sure the default target is not redefined # by including makefile. ifneq ($(.DEFAULT_GOAL), all) $(error Default target must be 'all'.) endif # find out which target(s) will be made ifdef MAKECMDGOALS goals := $(MAKECMDGOALS) else goals := all endif # store path to Pd API m_pd.h if it is found ifdef PDINCLUDEDIR mpdh := $(shell ls "$(PDINCLUDEDIR)/m_pd.h") endif # store path to pd.dll; if not found, ls will give a useful error ifeq ($(system), Windows) pddll := $(shell ls "$(PDBINDIR)/pd.dll") endif # print Makefile.pdlibbuilder version $(info ++++ info: using Makefile.pdlibbuilder version $(version)) # when making target all, check if m_pd.h is found and print info about it ifeq ($(goals), all) $(if $(mpdh), \ $(info ++++ info: using Pd API $(mpdh)), \ $(warning Where is Pd API m_pd.h? Do 'make help' for info.)) endif # print target info $(info ++++ info: making target $(goals) $(if $(lib.name),in lib $(lib.name))) # when installing, print installpath info $(if $(filter install install-lib, $(goals)), $(info ++++ info: \ installpath is '$(installpath)')) #=== define executables ======================================================== # By default we build class executables, and optionally a shared dynamic link # lib. When make-lib-executable=yes we build all classes into a single lib # executable, on the condition that variable lib.setup.sources is defined. ifeq ($(make-lib-executable),yes) $(if $(lib.setup.sources), ,\ $(error Can not build library blob because lib.setup.sources is undefined)) executables := $(lib.name).$(extension) else executables := $(classes.executables) $(shared.lib) endif ################################################################################ ### rules: special targets ##################################################### ################################################################################ # Disable built-in rules. If some target can't be built with the specified # rules, it should not be built at all. MAKEFLAGS += --no-builtin-rules .PRECIOUS: .SUFFIXES: .PHONY: all post build-lib \ $(classes) $(makefiledirs) $(makefiles) \ install install-executables install-datafiles install-datadirs \ force clean vars allvars depend help ################################################################################ ### rules: build targets ####################################################### ################################################################################ # Target all forces the build of targets [$(executables) post] in # deterministic order. Target $(executables) builds class executables plus # optional shared lib or alternatively a single lib executable when # make-lib-executable=true. Target post is optionally defined by # library makefile. all: post post: $(executables) all: $(info ++++info: target all in lib $(lib.name) completed) # build all with -g option turned on for debug symbols alldebug: c.flags += -g alldebug: cxx.flags += -g alldebug: all #=== class executable ========================================================== # recipe for linking objects in class executable # argument $1 = compiler type (c or cxx) # argument $2 = class basename define link-class $(compile-$1) \ $($1.ldflags) $($2.class.ldflags) \ -o $2.$(extension) \ $(addsuffix .o, $(basename $($2.class.sources))) \ $(addsuffix .o, $(basename $(common.sources))) \ $($1.ldlibs) $($2.class.ldlibs) $(shared.lib) endef # general rule for linking object files in class executable %.$(extension): $(shared.lib) $(info ++++ info: linking objects in $@ for lib $(lib.name)) $(if $(filter %.cc %.cpp, $($*.class.sources)), \ $(call link-class,cxx,$*), \ $(call link-class,c,$*)) #=== library blob ============================================================== # build all classes into single executable build-lib: $(lib.name).$(extension) $(info ++++ info: library blob $(lib.name).$(extension) completed) # recipe for linking objects in lib executable # argument $1 = compiler type (c or cxx) define link-lib $(compile-$1) \ $($1.ldflags) $(lib.ldflags) \ -o $(lib.name).$(extension) $(all.objects) \ $($1.ldlibs) $(lib.ldlibs) endef # rule for linking objects in lib executable # declared conditionally to avoid name clashes ifeq ($(make-lib-executable),yes) $(lib.name).$(extension): $(all.objects) $(if $(filter %.cc %.cpp, $(all.sources)), \ $(call link-lib,cxx), \ $(call link-lib,c)) endif #=== shared dynamic lib ======================================================== # recipe for linking objects in shared executable # argument $1 = compiler type (c or cxx) define link-shared $(compile-$1) \ $(shared.ldflags) \ -o lib$(lib.name).$(shared.extension) $(shared.objects) \ $($1.ldlibs) $(shared.ldlibs) endef # rule for linking objects in shared executable # build recipe is in macro 'link-shared' lib$(lib.name).$(shared.extension): $(shared.objects) $(info ++++ info: linking objects in shared lib $@) $(if $(filter %.cc %.cpp, $(shared.sources)), \ $(call link-shared,cxx), \ $(call link-shared,c)) #=== object files ============================================================== # recipe to make .o file from source # argument $1 is compiler type (c or cxx) define make-object-file $(info ++++ info: making $@ in lib $(lib.name)) $(compile-$1) \ $($1.flags) \ -o $@ -c $< endef # Three rules to create .o files. These are double colon 'terminal' rules, # meaning they are the last in a rules chain. %.o:: %.c $(call make-object-file,c) %.o:: %.cc $(call make-object-file,cxx) %.o:: %.cpp $(call make-object-file,cxx) #=== explicit prerequisites for class executables ============================== # For class executables, prerequisite rules are declared in run time. Target # 'depend' prints these rules for debugging purposes. # declare explicit prerequisites rule like 'class: class.extension' # argument $v is class basename define declare-class-target $v: $v.$(extension) endef # declare explicit prerequisites rule like 'class.extension: object1.o object2.o' # argument $v is class basename define declare-class-executable-target $v.$(extension): $(addsuffix .o, $(basename $($v.class.sources))) \ $(addsuffix .o, $(basename $(common.sources))) endef # evaluate explicit prerequisite rules for all classes $(foreach v, $(classes), $(eval $(declare-class-target))) $(foreach v, $(classes), $(eval $(declare-class-executable-target))) #=== implicit prerequisites for class executables ============================== # Evaluating implicit prerequisites (header files) with help from the # preprocessor is 'expensive' so this is done conditionally and selectively. # Note that it is also possible to trigger a build via install targets, in # which case implicit prerequisites are not checked. # When the Pd include path contains spaces it will mess up the implicit # prerequisites rules. disable-dependency-tracking := $(strip $(pdincludepathwithspaces)) ifndef disable-dependency-tracking must-build-everything := $(filter all, $(goals)) must-build-class := $(filter $(classes), $(goals)) must-build-sources := $(foreach v, $(must-build-class), $($v.class.sources)) endif # declare implicit prerequisites rule like 'object.o: header1.h header2.h ...' # argument $1 is input source file(s) # dir is explicitly added because option -MM strips it by default define declare-object-target $(dir $1)$(filter %.o: %.h, $(shell $(CPP) $(depcheck.flags) -MM $1)) $(MAKEFILE_LIST) endef # evaluate implicit prerequisite rules when rebuilding everything ifdef must-build-everything $(if $(wildcard $(all.objects)), \ $(info ++++ info: evaluating implicit prerequisites in lib $(lib.name).....) \ $(foreach v, $(all.sources), $(eval $(call declare-object-target, $v)))) endif # evaluate implicit prerequisite rules when selectively building classes ifdef must-build-class $(foreach v, $(must-build-sources), \ $(eval $(call declare-object-target, $v))) $(foreach v, $(shared.sources), \ $(eval $(call declare-object-target, $v))) endif ################################################################################ ### rules: preprocessor and assembly files ##################################### ################################################################################ # Preprocessor and assembly output files for bug tracing etc. They are not part # of the build processes for executables. By default these files are created in # the current working directory. Dependency tracking is not performed, the build # is forced instead to make sure it's up to date. force: #=== preprocessor file ========================================================= # make preprocessor output file with extension .pre # argument $1 = compiler type (c or cxx) define make-preprocessor-file $(info ++++ info: making preprocessor output file $(notdir $*.pre) \ in current working directory) $(compile-$1) -E $< $(c.flags) $($1.flags) -o $(notdir $*.pre) endef %.pre:: %.c force $(call make-preprocessor-file,c) %.pre:: %.cc force $(call make-preprocessor-file,cxx) %.pre:: %.cpp force $(call make-preprocessor-file,cxx) #=== assembly file ============================================================= # make C / assembly interleaved output file with extension .lst # argument $1 = compiler type (c or cxx) define make-assembly-file $(info ++++ info: making assembly output file $(notdir $*.lst) \ in current working directory) $(compile-$1) \ -c -Wa,-a,-ad -fverbose-asm \ $($1.flags) \ $< > $(notdir $*.lst) endef %.lst:: %.c force $(call make-assembly-file,c) %.lst:: %.cc force $(call make-assembly-file,cxx) %.lst:: %.cpp force $(call make-assembly-file,cxx) ################################################################################ ### rules: installation targets ################################################ ################################################################################ #=== strip ===================================================================== # Stripping of installed binaries will only be done when variable 'stripflags' # is defined non-empty. No default definition is provided except for Windows # where the unstripped binaries are large, especially in the case of Mingw-w64. # Note: while stripping all symbols ('-s' or '--strip-all') is possible for # Linux and Windows, in the case of OSX only non-global symbols can be stripped # (option '-x' or '--discard-all'). # Make definition of strip command overridable so it can be defined in an # environment for cross-compilation. STRIP ?= strip # Commands in 'strip-executables' will be executed conditionally in the rule for # target 'install-executables'. strip-executables = cd "$(installpath)" && \ $(foreach v, $(executables), $(STRIP) $(stripflags) '$v';) #=== install =================================================================== # Install targets depend on successful exit status of target all because nothing # must be installed in case of a build error. # -p = preserve time stamps # -m = set permission mode (as in chmod) # -d = create all components of specified directories INSTALL = install INSTALL_PROGRAM := $(INSTALL) -p -m 644 INSTALL_DATA := $(INSTALL) -p -m 644 INSTALL_DIR := $(INSTALL) -m 755 -d # strip spaces from file names executables := $(strip $(executables)) datafiles := $(strip $(datafiles)) datadirs := $(strip $(datadirs)) # Do not make any install sub-target with empty variable definition because the # install program would exit with an error. install: $(if $(executables), install-executables) install: $(if $(datafiles), install-datafiles) install: $(if $(datadirs), install-datadirs) install-executables: all $(INSTALL_DIR) -v "$(installpath)" $(foreach v, $(executables), \ $(INSTALL_PROGRAM) '$v' "$(installpath)";) $(info ++++ info: executables of lib $(lib.name) installed \ from $(CURDIR) to $(installpath)) $(if $(stripflags), $(strip-executables),) install-datafiles: all $(INSTALL_DIR) -v "$(installpath)" $(foreach v, $(datafiles), \ $(INSTALL_DATA) '$(v)' "$(installpath)";) $(info ++++ info: data files of lib $(lib.name) installed \ from $(CURDIR) to $(installpath)) install-datadirs: all $(foreach v, $(datadirs), $(INSTALL_DIR) "$(installpath)/$v";) $(foreach v, $(datadirs), \ $(INSTALL_DATA) $(wildcard $v/*) "$(installpath)/$v";) $(info ++++ info: data directories of lib $(lib.name) installed \ from $(CURDIR) to $(installpath)) ################################################################################ ### rules: distribution targets ################################################ ################################################################################ # TODO # These targets are implemented in Makefile Template, but I have to figure out # how to do it under the not-so-strict conditions of Makefile.pdlibbuilder. # make source package dist: @echo "target dist not yet implemented" # make Debian source package dpkg-source: @echo "target dpkg-source not yet implemented" $(ORIGDIR): $(DISTDIR): ################################################################################ ### rules: clean targets ####################################################### ################################################################################ # delete build products from build tree clean: rm -f $(all.objects) rm -f $(classes.executables) $(lib.name).$(extension) $(shared.lib) rm -f *.pre *.lst # remove distribution directories and tarballs from build tree distclean: clean @echo "target distclean not yet implemented" ################################################################################ ### rules: submake targets ##################################################### ################################################################################ # Iterate over sub-makefiles or makefiles in other directories. # When 'continue-make=yes' is set, sub-makes will report 'true' to the parent # process regardless of their real exit status. This prevents the parent make # from being aborted by a sub-make error. Useful when you want to quickly find # out which sub-makes from a large set will succeed. ifeq ($(continue-make),yes) continue = || true endif # These targets will trigger sub-make processes for entries in 'makefiledirs' # and 'makefiles'. all alldebug install clean distclean dist dkpg-source: \ $(makefiledirs) $(makefiles) # this expands to identical rules for each entry in 'makefiledirs' $(makefiledirs): $(MAKE) --directory=$@ $(MAKECMDGOALS) $(continue) # this expands to identical rules for each entry in 'makefiles' $(makefiles): $(MAKE) --directory=$(dir $@) --makefile=$(notdir $@) $(MAKECMDGOALS) $(continue) ################################################################################ ### rules: convenience targets ################################################# ################################################################################ #=== show variables ============================================================ # Several 'function' macro's cause errors when expanded within a rule or without # proper arguments. Variables which are set with the define directive are only # shown by name for that reason. functions = \ add-class-source \ declare-class-target \ declare-class-executable-target \ declare-object-target \ link-class \ link-lib \ link-shared \ make-object-file \ make-preprocessor-file \ make-assembly-file # show variables from makefiles vars: $(info ++++ info: showing makefile variables:) $(foreach v,\ $(sort $(filter-out $(functions) functions, $(.VARIABLES))),\ $(if $(filter file, $(origin $v)),\ $(info variable $v = $($v)))) $(foreach v, $(functions), $(info 'function' name: $v)) @echo # show all variables allvars: $(info ++++ info: showing default, automatic and makefile variables:) $(foreach v, \ $(sort $(filter-out $(functions) functions, $(.VARIABLES))), \ $(info variable ($(origin $v)) $v = $($v))) $(foreach v, $(functions), $(info 'function' name: $v)) @echo #=== show dependencies ========================================================= # show generated prerequisites rules depend: $(info ++++ info: generated prerequisite rules) $(foreach v, $(classes), $(info $(declare-class-target))) $(foreach v, $(classes), $(info $(declare-class-executable-target))) $(foreach v, $(all.sources), $(info $(call declare-object-target, $v))) @echo #=== show help text ============================================================ # brief info about targets and paths ifdef mpdh mpdhinfo := $(mpdh) else mpdhinfo := m_pd.h was not found. Is Pd installed? endif help: @echo @echo " Main targets:" @echo " all: build executables (default target)" @echo " install: install all components of the library" @echo " vars: print makefile variables for troubleshooting" @echo " allvars: print all variables for troubleshooting" @echo " help: print this help text" @echo @echo " Pd API m_pd.h:" @echo " $(mpdhinfo)" @echo " You may specify your preferred Pd include directory as argument" @echo " to the make command, like 'PDINCLUDEDIR=path/to/pd/src'." @echo @echo " Path for installation of your libdir(s):" @echo " $(PDLIBDIR)" @echo " Alternatively you may specify your path for installation as argument" @echo " to the make command, like 'PDLIBDIR=path/to/pd-externals'." @echo @echo " Default paths are listed in the doc sections in Makefile.pdlibbuilder." @echo #=== dummy target ============================================================== coffee: @echo "Makefile.pdlibbuilder: Can not make coffee. Sorry." ################################################################################ ### end of rules sections ###################################################### ################################################################################ # for syntax highlighting in vim and github # vim: set filetype=make: iem_utils-v0.0.20181004/iem_dp/0000755000175000017500000000000013355472356016133 5ustar zmoelnigzmoelnigiem_utils-v0.0.20181004/iem_dp/max~~-help.pd0000644000175000017500000000511112630366345020560 0ustar zmoelnigzmoelnig#N canvas 291 113 860 543 10; #X symbolatom 196 386 25 0 0 0 - - -; #X text 133 493 IEM KUG; #X text 117 481 musil; #X text 154 481 @; #X text 163 481 iem.at; #X text 116 503 Graz \, Austria; #X text 176 455 @; #X text 185 455 iem.at; #X text 117 455 zmoelnig; #X text 388 386 sum displayed via a symbol; #X obj 139 97 sig~; #X obj 99 97 sig~; #X obj 360 144 sig~; #X obj 320 144 sig~; #X msg 11 91 \; pd dsp \$1; #X obj 11 71 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 1 1 ; #N canvas 0 22 330 356 sunsig~~ 0; #X obj 22 195 snapshot~; #X obj 47 103 metro 300; #X obj 46 81 loadbang; #X obj 22 18 inlet~; #X obj 122 18 inlet~; #X obj 122 195 snapshot~; #X obj 47 136 t b b; #X obj 36 277 outlet; #X obj 35 248 dptosym; #X connect 0 0 8 0; #X connect 1 0 6 0; #X connect 2 0 1 0; #X connect 3 0 0 0; #X connect 4 0 5 0; #X connect 5 0 8 1; #X connect 6 0 0 0; #X connect 6 1 5 0; #X connect 8 0 7 0; #X restore 195 260 pd sunsig~~; #X text 452 106 = symbol selector of an anything; #X text 442 95 double precision number beginning with a "double quote" =; #X text 230 60 = symbol selector of an anything; #X text 220 49 double precision number beginning with a "double quote" =; #X text 14 12 max~~; #X text 70 13 double precision comparsion \, output the greater value ; #X obj 194 203 max~~ ######; #X msg 99 48 "1.111111112; #X msg 320 94 "1.111111113; #X text 132 401 should be "1.111111113; #X text 450 14 15 digits accurate; #X text 68 442 (c) IOhannes m zmoelnig 1999 - 2013; #X text 68 470 (c) Thomas Musil 2000 - 2013; #X obj 99 72 symtodp; #X obj 320 115 symtodp; #X obj 496 228 sig~; #N canvas 0 22 330 356 sunsig~~ 0; #X obj 22 195 snapshot~; #X obj 47 103 metro 300; #X obj 46 81 loadbang; #X obj 22 18 inlet~; #X obj 122 18 inlet~; #X obj 122 195 snapshot~; #X obj 47 136 t b b; #X obj 36 277 outlet; #X obj 35 248 dptosym; #X connect 0 0 8 0; #X connect 1 0 6 0; #X connect 2 0 1 0; #X connect 3 0 0 0; #X connect 4 0 5 0; #X connect 5 0 8 1; #X connect 6 0 0 0; #X connect 6 1 5 0; #X connect 8 0 7 0; #X restore 496 282 pd sunsig~~; #X symbolatom 496 307 25 0 0 0 - - -; #X obj 496 254 max~~ 10 0; #X floatatom 496 207 5 0 0 0 - - -; #X floatatom 557 207 5 0 0 0 - - -; #X connect 10 0 23 1; #X connect 11 0 23 0; #X connect 12 0 23 3; #X connect 13 0 23 2; #X connect 15 0 14 0; #X connect 16 0 0 0; #X connect 23 0 16 0; #X connect 23 1 16 1; #X connect 24 0 30 0; #X connect 25 0 31 0; #X connect 30 0 11 0; #X connect 30 1 10 0; #X connect 31 0 13 0; #X connect 31 1 12 0; #X connect 32 0 35 0; #X connect 33 0 34 0; #X connect 35 0 33 0; #X connect 35 1 33 1; #X connect 36 0 32 0; #X connect 37 0 35 2; iem_utils-v0.0.20181004/iem_dp/LICENSE.txt0000644000175000017500000000324012630366345017750 0ustar zmoelnigzmoelnigiem_dp - dynamic library for pd; calculates pd signals or pd float messages in double precision. The goal of this library is to allow more than 24 bit accurate access to arrays and delay-lines. That means: with 32-bit IEEE floatingpoint we have a 23 bit mantissa with a resolution of 1 to 8388608. If you want to access to an array ( size greater than 8388608 ) by tabread4, you get a staircase-shaped output. The objects of this library work internal with double or 32-bit integer instead 24-bit mantissa of 32-bit float. To connect this higher resolution, we need 2 signal or 2 message cords. One for the float casted number and one for the difference to the higher resolution number. Copyright (C) 2000-2013 Thomas MUSIL [musil_at_iem.at] IEM - Institute of Electronic Music and Acoustics, Graz Inffeldgasse 10/3, 8010 Graz, Austria http://iem.at This program is free software; you can redistribute it and/or 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 ( GnuGPL.txt ). (e.g. http://www.gnu.org/copyleft/gpl.html) You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Graz, 28 June 2013 Thomas Musiliem_utils-v0.0.20181004/iem_dp/sub__-help0000644000175000017500000000260712630366345020073 0ustar zmoelnigzmoelnig#N canvas 224 167 932 536 10; #X symbolatom 167 326 25 0 0 0 - - -; #X text 104 453 IEM KUG; #X text 88 441 musil; #X text 125 441 @; #X text 134 441 iem.at; #X text 87 463 Graz \, Austria; #X text 147 415 @; #X text 156 415 iem.at; #X text 88 415 zmoelnig; #X floatatom 251 245 11 0 0 0 - - -; #X floatatom 227 273 11 0 0 0 - - -; #X text 337 244 difference; #X text 311 272 float casted; #X text 14 12 -__; #X text 70 13 double precision subtraction; #X obj 165 209 -__ 0 0; #X text 359 326 difference displayed via a symbol; #X text 203 83 = symbol selector of an anything; #X msg 70 71 "9.9999999999999; #X msg 292 108 "8.7654321234567; #X text 90 341 should be "1.2345678765432; #X text 193 72 double precision number beginning with a "double quote" =; #X text 422 119 = symbol selector of an anything; #X text 412 108 double precision number beginning with a "double quote" =; #X obj 166 303 dptosym; #X text 14 32 sub__; #X text 14 57 -''; #X obj 239 209 sub__ 0 0; #X obj 316 209 -'' 0 0; #X text 294 13 15 digits accurate; #X text 39 402 (c) IOhannes m zmoelnig 1999 - 2013; #X text 39 430 (c) Thomas Musil 2000 - 2013; #X obj 71 97 symtodp; #X obj 292 130 symtodp; #X connect 15 0 10 0; #X connect 15 0 24 0; #X connect 15 1 9 0; #X connect 15 1 24 1; #X connect 18 0 32 0; #X connect 19 0 33 0; #X connect 24 0 0 0; #X connect 32 0 15 0; #X connect 32 1 15 1; #X connect 33 0 15 2; #X connect 33 1 15 3; iem_utils-v0.0.20181004/iem_dp/vd~~-help.pd0000644000175000017500000000166212630366345020413 0ustar zmoelnigzmoelnig#N canvas 248 216 633 323 10; #X obj 32 25 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 1 ; #X msg 33 48 \; pd dsp \$1; #X obj 175 65 sig~; #X floatatom 174 40 5 0 0 0 - - -; #X obj 178 197 delread~~ abc 1234 0; #X obj 178 224 unsig~; #X floatatom 178 248 5 0 0 0 - - -; #X obj 176 91 delwrite~~ abc 9876 0; #X msg 221 166 2345 0; #X msg 242 145 3456 0; #X floatatom 163 148 5 0 0 0 - - -; #X floatatom 310 144 5 0 0 0 - - -; #X obj 390 226 unsig~; #X floatatom 390 250 5 0 0 0 - - -; #X floatatom 382 122 5 0 0 0 - - -; #X floatatom 437 122 5 0 0 0 - - -; #X obj 390 199 vd~~ abc; #X obj 382 141 sig~; #X obj 436 144 sig~; #X connect 0 0 1 0; #X connect 2 0 7 0; #X connect 3 0 2 0; #X connect 4 0 5 0; #X connect 5 0 6 0; #X connect 8 0 4 0; #X connect 9 0 4 0; #X connect 10 0 4 0; #X connect 11 0 4 1; #X connect 12 0 13 0; #X connect 14 0 17 0; #X connect 15 0 18 0; #X connect 16 0 12 0; #X connect 17 0 16 0; #X connect 18 0 16 1; iem_utils-v0.0.20181004/iem_dp/src/0000755000175000017500000000000013355472356016722 5ustar zmoelnigzmoelnigiem_utils-v0.0.20181004/iem_dp/src/tabread_dp.c0000644000175000017500000000407513303611047021142 0ustar zmoelnigzmoelnig/* For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. iem_dp written by IOhannes m zmoelnig, Thomas Musil, Copyright (c) IEM KUG Graz Austria 1999 - 2007 */ /* double precision library */ #include "m_pd.h" #include "iemlib.h" #include "iem_dp.h" /* -------------------------- tabread__ ------------------------------ */ /* based on miller's tabread which is part of pd */ static t_class *tabread_dp_class; typedef struct _tabread_dp { t_object x_obj; t_symbol *x_arrayname; t_float x_residual; } t_tabread_dp; static void *tabread_dp_new(t_symbol *s) { t_tabread_dp *x = (t_tabread_dp *)pd_new(tabread_dp_class); x->x_arrayname = s; floatinlet_new(&x->x_obj, &x->x_residual); outlet_new(&x->x_obj, &s_float); return (x); } static void tabread_dp_float(t_tabread_dp *x, t_floatarg f) { t_garray *a; iemarray_t *vec; int npoints; if (!(a = (t_garray *)pd_findbyclass(x->x_arrayname, garray_class))) { if (*x->x_arrayname->s_name) pd_error(x, "tabread__: %s: no such array", x->x_arrayname->s_name); vec = 0; } else if (!iemarray_getarray(a, &npoints, &vec)) { pd_error(x, "%s: bad template for tabread__", x->x_arrayname->s_name); vec = 0; } else { double findex = iem_dp_calc_sum(f, x->x_residual); int n = findex; if(n < 0) n = 0; else if(n >= npoints) n = npoints - 1; outlet_float(x->x_obj.ob_outlet, (npoints ? iemarray_getfloat(vec, n) : 0)); } } static void tabread_dp_set(t_tabread_dp *x, t_symbol *s) { x->x_arrayname = s; } static void tabread_dp_free(t_tabread_dp *x) { } void tabread_dp_setup(void) { tabread_dp_class = class_new(gensym("tabread__"), (t_newmethod)tabread_dp_new, (t_method)tabread_dp_free, sizeof(t_tabread_dp), 0, A_DEFSYM, 0); class_addcreator((t_newmethod)tabread_dp_new, gensym("tabread''"), A_DEFSYM, 0); class_addfloat(tabread_dp_class, (t_method)tabread_dp_float); class_addmethod(tabread_dp_class, (t_method)tabread_dp_set, gensym("set"), A_SYMBOL, 0); } iem_utils-v0.0.20181004/iem_dp/src/div__.c0000644000175000017500000000430213303611047020126 0ustar zmoelnigzmoelnig/* For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. iem_dp written by IOhannes m zmoelnig, Thomas Musil, Copyright (c) IEM KUG Graz Austria 1999 - 2007 */ /* double precision library */ #include "m_pd.h" #include "iemlib.h" #include "iem_dp.h" /* ------------------------ div__ or /__ ---------------------------- */ /* based on miller's /, which is part of pd, only with double precision */ static t_class *div___class; typedef struct _div__ { t_object x_obj; t_float x_coarse_left; t_float x_fine_left; t_float x_coarse_right; t_float x_fine_right; t_outlet *x_out_coarse; t_outlet *x_out_fine; } t_div__; static void div___bang(t_div__ *x) { double ddiv, nom; t_float fdiv; nom = iem_dp_calc_sum(x->x_coarse_right, x->x_fine_right); ddiv = (nom ? iem_dp_calc_sum(x->x_coarse_left, x->x_fine_left) / nom : 0); fdiv = (t_float)ddiv; outlet_float(x->x_out_fine, iem_dp_calc_residual(ddiv, fdiv)); outlet_float(x->x_out_coarse, fdiv); } static void div___float(t_div__ *x, t_floatarg f) { x->x_coarse_left = f; div___bang(x); } static void *div___new(t_symbol *s, int ac, t_atom *av) { t_div__ *x = (t_div__ *)pd_new(div___class); floatinlet_new(&x->x_obj, &x->x_fine_left); floatinlet_new(&x->x_obj, &x->x_coarse_right); floatinlet_new(&x->x_obj, &x->x_fine_right); x->x_coarse_left = 0.0f; x->x_fine_left = 0.0f; if((ac > 0) && (IS_A_FLOAT(av, 0))) x->x_coarse_right = atom_getfloatarg(0, ac, av); else x->x_coarse_right = 0.0f; if((ac > 1) && (IS_A_FLOAT(av, 1))) x->x_fine_right = atom_getfloatarg(1, ac, av); else x->x_fine_right = 0.0f; x->x_out_coarse = outlet_new(&x->x_obj, &s_float); x->x_out_fine = outlet_new(&x->x_obj, &s_float); return (x); } static void div___free(t_div__ *x) { } void div___setup(void) { div___class = class_new(gensym("div__"), (t_newmethod)div___new, 0, sizeof(t_div__), 0, A_GIMME, 0); class_addcreator((t_newmethod)div___new, gensym("/__"), A_GIMME, 0); class_addcreator((t_newmethod)div___new, gensym("/''"), A_GIMME, 0); class_addbang(div___class, div___bang); class_addfloat(div___class, div___float); } iem_utils-v0.0.20181004/iem_dp/src/delay~~.c0000644000175000017500000002770413303611047020553 0ustar zmoelnigzmoelnig/* Copyright (c) 1997-1999 Miller Puckette. * For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. */ #include "m_pd.h" #include "iemlib.h" #include "iem_dp.h" #define DEFDELVS_TT 64 /* LATER get this from canvas at DSP time */ #define XTRASAMPS_TT 4 #define SAMPBLK_TT 4 /* ----------------------------- delwrite~~ ----------------------------- */ typedef struct delwrite_tilde_tilde_ctl { int c_n; t_sample *c_vec; int c_phase; } t_delwrite_tilde_tilde_ctl; typedef struct _delwrite_tilde_tilde { t_object x_obj; t_symbol *x_sym; double x_deltime; t_delwrite_tilde_tilde_ctl x_cspace; int x_sortno; /* DSP sort number at which this was last put on chain */ int x_rsortno; /* DSP sort # for first delread or write in chain */ int x_vecsize; /* vector size for delread~ to use */ t_float x_f; } t_delwrite_tilde_tilde; //extern static int delread_zero; static t_class *delwrite_tilde_tilde_class; static void delwrite_tilde_tilde_updatesr (t_delwrite_tilde_tilde *x, t_float sr) /* added by Mathieu Bouchard */ { int nsamps = (int)(x->x_deltime * (double)sr * (double)(0.001)); if (nsamps < 1) nsamps = 1; nsamps += ((- nsamps) & (SAMPBLK_TT - 1)); nsamps += DEFDELVS_TT; if(x->x_cspace.c_n != nsamps) { x->x_cspace.c_vec = (t_sample *)resizebytes(x->x_cspace.c_vec, (x->x_cspace.c_n + XTRASAMPS_TT) * sizeof(t_sample), (nsamps + XTRASAMPS_TT) * sizeof(t_sample)); x->x_cspace.c_n = nsamps; x->x_cspace.c_phase = XTRASAMPS_TT; } } /* routine to check that all delwrites/delreads/vds have same vecsize */ static void delwrite_tilde_tilde_checkvecsize(t_delwrite_tilde_tilde *x, int vecsize) { if (x->x_rsortno != ugen_getsortno()) { x->x_vecsize = vecsize; x->x_rsortno = ugen_getsortno(); } /* LATER this should really check sample rate and blocking, once that is supported. Probably we don't actually care about vecsize. For now just suppress this check. */ #if 0 else if (vecsize != x->x_vecsize) pd_error(x, "delread/delwrite/vd vector size mismatch"); #endif } static void *delwrite_tilde_tilde_new(t_symbol *s, t_floatarg coarse_msec, t_floatarg fine_msec) { t_delwrite_tilde_tilde *x = (t_delwrite_tilde_tilde *)pd_new(delwrite_tilde_tilde_class); if(!*s->s_name) s = gensym("delwrite~~"); pd_bind(&x->x_obj.ob_pd, s); x->x_sym = s; x->x_deltime = iem_dp_calc_sum(coarse_msec, fine_msec); x->x_cspace.c_n = 0; x->x_cspace.c_vec = (t_sample *)getbytes(XTRASAMPS_TT * sizeof(t_sample)); x->x_sortno = 0; x->x_vecsize = 0; x->x_f = 0; return (x); } static t_int *delwrite_tilde_tilde_perform(t_int *w) { t_float *in = (t_float *)(w[1]); t_delwrite_tilde_tilde_ctl *c = (t_delwrite_tilde_tilde_ctl *)(w[2]); int n = (int)(w[3]); int phase = c->c_phase, nsamps = c->c_n; t_sample *vp = c->c_vec, *bp = vp + phase, *ep = vp + (c->c_n + XTRASAMPS_TT); phase += n; while (n--) { t_sample f = *in++; if(IEM_DENORMAL(f)) f = 0; *bp++ = f; if (bp == ep) { vp[0] = ep[-4]; vp[1] = ep[-3]; vp[2] = ep[-2]; vp[3] = ep[-1]; bp = vp + XTRASAMPS_TT; phase -= nsamps; } } c->c_phase = phase; return (w+4); } static void delwrite_tilde_tilde_dsp(t_delwrite_tilde_tilde *x, t_signal **sp) { dsp_add(delwrite_tilde_tilde_perform, 3, sp[0]->s_vec, &x->x_cspace, sp[0]->s_n); x->x_sortno = ugen_getsortno(); delwrite_tilde_tilde_checkvecsize(x, sp[0]->s_n); delwrite_tilde_tilde_updatesr(x, sp[0]->s_sr); } static void delwrite_tilde_tilde_free(t_delwrite_tilde_tilde *x) { pd_unbind(&x->x_obj.ob_pd, x->x_sym); freebytes(x->x_cspace.c_vec, (x->x_cspace.c_n + XTRASAMPS_TT) * sizeof(t_sample)); } static void delwrite_tilde_tilde_setup(void) { delwrite_tilde_tilde_class = class_new(gensym("delwrite~~"), (t_newmethod)delwrite_tilde_tilde_new, (t_method)delwrite_tilde_tilde_free, sizeof(t_delwrite_tilde_tilde), 0, A_DEFSYM, A_DEFFLOAT, A_DEFFLOAT, 0); CLASS_MAINSIGNALIN(delwrite_tilde_tilde_class, t_delwrite_tilde_tilde, x_f); class_addmethod(delwrite_tilde_tilde_class, (t_method)delwrite_tilde_tilde_dsp, gensym("dsp"), A_CANT, 0); } /* ----------------------------- delread~~ ----------------------------- */ static t_class *delread_tilde_tilde_class; typedef struct _delread_tilde_tilde { t_object x_obj; t_symbol *x_sym; t_float x_fine; double x_deltime; /* delay in msec */ int x_delsamps; /* delay in samples */ t_float x_sr; /* samples per msec */ t_float x_n; /* vector size */ int x_zerodel; /* 0 or vecsize depending on read/write order */ } t_delread_tilde_tilde; static void delread_tilde_tilde_list(t_delread_tilde_tilde *x, t_symbol *s, int ac, t_atom *av); static void *delread_tilde_tilde_new(t_symbol *s, int ac, t_atom *av) { t_symbol *delname; t_delread_tilde_tilde *x = (t_delread_tilde_tilde *)pd_new(delread_tilde_tilde_class); if((ac > 0) && IS_A_SYMBOL(av, 0)) delname = atom_getsymbolarg(0, ac, av); else delname = &s_; x->x_sym = delname; x->x_sr = 1; x->x_n = 1; x->x_zerodel = 0; delread_tilde_tilde_list(x, &s_list, ac-1, av+1); floatinlet_new(&x->x_obj, &x->x_fine); outlet_new(&x->x_obj, &s_signal); return (x); } static void delread_tilde_tilde_list(t_delread_tilde_tilde *x, t_symbol *s, int ac, t_atom *av) { t_float coarse, fine; t_delwrite_tilde_tilde *delwriter = (t_delwrite_tilde_tilde *)pd_findbyclass(x->x_sym, delwrite_tilde_tilde_class); if((ac > 0) && (IS_A_FLOAT(av, 0))) coarse = atom_getfloatarg(0, ac, av); else coarse = 0.0; if((ac > 1) && (IS_A_FLOAT(av, 1))) fine = atom_getfloatarg(1, ac, av); else fine = 0.0; x->x_deltime = iem_dp_calc_sum(coarse, fine); if(delwriter) { int delsize = delwriter->x_cspace.c_n; x->x_delsamps = (int)(0.5 + (double)x->x_sr * x->x_deltime) + x->x_n - x->x_zerodel; if(x->x_delsamps < x->x_n) x->x_delsamps = x->x_n; else if(x->x_delsamps > delwriter->x_cspace.c_n - DEFDELVS_TT) x->x_delsamps = delwriter->x_cspace.c_n - DEFDELVS_TT; } } static void delread_tilde_tilde_double(t_delread_tilde_tilde *x, double d) { t_delwrite_tilde_tilde *delwriter = (t_delwrite_tilde_tilde *)pd_findbyclass(x->x_sym, delwrite_tilde_tilde_class); x->x_deltime = d; if(delwriter) { int delsize = delwriter->x_cspace.c_n; x->x_delsamps = (int)(0.5 + (double)x->x_sr * x->x_deltime) + x->x_n - x->x_zerodel; if(x->x_delsamps < x->x_n) x->x_delsamps = x->x_n; else if(x->x_delsamps > delwriter->x_cspace.c_n - DEFDELVS_TT) x->x_delsamps = delwriter->x_cspace.c_n - DEFDELVS_TT; } } static void delread_tilde_tilde_float(t_delread_tilde_tilde *x, t_float coarse) { t_delwrite_tilde_tilde *delwriter = (t_delwrite_tilde_tilde *)pd_findbyclass(x->x_sym, delwrite_tilde_tilde_class); x->x_deltime = iem_dp_calc_sum(coarse, x->x_fine); if(delwriter) { int delsize = delwriter->x_cspace.c_n; x->x_delsamps = (int)(0.5 + (double)x->x_sr * x->x_deltime) + x->x_n - x->x_zerodel; if(x->x_delsamps < x->x_n) x->x_delsamps = x->x_n; else if(x->x_delsamps > delwriter->x_cspace.c_n - DEFDELVS_TT) x->x_delsamps = delwriter->x_cspace.c_n - DEFDELVS_TT; } } static t_int *delread_tilde_tilde_perform(t_int *w) { t_sample *out = (t_float *)(w[1]); t_delwrite_tilde_tilde_ctl *c = (t_delwrite_tilde_tilde_ctl *)(w[2]); int delsamps = *(int *)(w[3]); int n = (int)(w[4]); int phase = c->c_phase - delsamps, nsamps = c->c_n; t_sample *vp = c->c_vec, *bp, *ep = vp + (c->c_n + XTRASAMPS_TT); if(phase < 0) phase += nsamps; bp = vp + phase; while(n--) { *out++ = *bp++; if(bp == ep) bp -= nsamps; } return (w+5); } static void delread_tilde_tilde_dsp(t_delread_tilde_tilde *x, t_signal **sp) { t_delwrite_tilde_tilde *delwriter = (t_delwrite_tilde_tilde *)pd_findbyclass(x->x_sym, delwrite_tilde_tilde_class); x->x_sr = sp[0]->s_sr * 0.001; x->x_n = sp[0]->s_n; if(delwriter) { delwrite_tilde_tilde_checkvecsize(delwriter, sp[0]->s_n); x->x_zerodel = (delwriter->x_sortno == ugen_getsortno() ? 0 : delwriter->x_vecsize); delread_tilde_tilde_double(x, x->x_deltime); dsp_add(delread_tilde_tilde_perform, 4, sp[0]->s_vec, &delwriter->x_cspace, &x->x_delsamps, sp[0]->s_n); } else if (*x->x_sym->s_name) error("delread~~: %s: no such delwrite~~",x->x_sym->s_name); } static void delread_tilde_tilde_setup(void) { delread_tilde_tilde_class = class_new(gensym("delread~~"), (t_newmethod)delread_tilde_tilde_new, 0, sizeof(t_delread_tilde_tilde), 0, A_GIMME, 0); class_addmethod(delread_tilde_tilde_class, (t_method)delread_tilde_tilde_dsp, gensym("dsp"), A_CANT, 0); class_addfloat(delread_tilde_tilde_class, (t_method)delread_tilde_tilde_float); } /* ----------------------------- vd~~ ----------------------------- */ static t_class *vd_tilde_tilde_class; typedef struct _vd_tilde_tilde { t_object x_obj; t_symbol *x_sym; t_float x_sr; /* samples per msec */ int x_zerodel; /* 0 or vecsize depending on read/write order */ t_float x_f; } t_vd_tilde_tilde; static void *vd_tilde_tilde_new(t_symbol *s) { t_vd_tilde_tilde *x = (t_vd_tilde_tilde *)pd_new(vd_tilde_tilde_class); if(!*s->s_name) s = gensym("vd~~"); x->x_sym = s; x->x_sr = 1; x->x_zerodel = 0; inlet_new(&x->x_obj, &x->x_obj.ob_pd, &s_signal, &s_signal); outlet_new(&x->x_obj, &s_signal); x->x_f = 0; return (x); } static t_int *vd_tilde_tilde_perform(t_int *w) { t_sample *cin = (t_sample *)(w[1]); t_sample *fin = (t_sample *)(w[2]); t_sample *out = (t_sample *)(w[3]); t_delwrite_tilde_tilde_ctl *ctl = (t_delwrite_tilde_tilde_ctl *)(w[4]); t_vd_tilde_tilde *x = (t_vd_tilde_tilde *)(w[5]); int n = (int)(w[6]); int nsamps = ctl->c_n; double limit = (double)nsamps - (double)n - 1.0; t_sample fn = n-1; t_sample *vp = ctl->c_vec, *bp, *wp = vp + ctl->c_phase; t_sample zerodel = x->x_zerodel; while (n--) { double delsamps = (double)x->x_sr * iem_dp_calc_sum(*cin++, *fin++) - (double)zerodel; t_sample frac; int idelsamps; t_sample a, b, c, d, cminusb; if(delsamps < 1.00001) delsamps = 1.00001; if(delsamps > limit) delsamps = limit; delsamps += (double)fn; fn = fn - 1.0f; idelsamps = (int)delsamps; frac = (t_sample)(delsamps - (double)idelsamps); bp = wp - idelsamps; if(bp < vp + 4) bp += nsamps; d = bp[-3]; c = bp[-2]; b = bp[-1]; a = bp[0]; cminusb = c - b; *out++ = b + frac * ( cminusb - 0.1666667f * (1.-frac) * ( (d - a - 3.0f * cminusb) * frac + (d + 2.0f*a - 3.0f*b) ) ); } return (w+7); } static void vd_tilde_tilde_dsp(t_vd_tilde_tilde *x, t_signal **sp) { t_delwrite_tilde_tilde *delwriter = (t_delwrite_tilde_tilde *)pd_findbyclass(x->x_sym, delwrite_tilde_tilde_class); x->x_sr = sp[0]->s_sr * 0.001; if(delwriter) { delwrite_tilde_tilde_checkvecsize(delwriter, sp[0]->s_n); x->x_zerodel = (delwriter->x_sortno == ugen_getsortno() ? 0 : delwriter->x_vecsize); dsp_add(vd_tilde_tilde_perform, 6, sp[0]->s_vec, sp[1]->s_vec, sp[2]->s_vec, &delwriter->x_cspace, x, sp[0]->s_n); } else error("vd~~: %s: no such delwrite~~", x->x_sym->s_name); } static void vd_tilde_tilde_setup(void) { vd_tilde_tilde_class = class_new(gensym("vd~~"), (t_newmethod)vd_tilde_tilde_new, 0, sizeof(t_vd_tilde_tilde), 0, A_DEFSYM, 0); class_addmethod(vd_tilde_tilde_class, (t_method)vd_tilde_tilde_dsp, gensym("dsp"), A_CANT, 0); CLASS_MAINSIGNALIN(vd_tilde_tilde_class, t_vd_tilde_tilde, x_f); } /********************/ void delay_tilde_tilde_setup(void) { delwrite_tilde_tilde_setup(); delread_tilde_tilde_setup(); vd_tilde_tilde_setup(); } iem_utils-v0.0.20181004/iem_dp/src/mul__.c0000644000175000017500000000427113303611047020146 0ustar zmoelnigzmoelnig/* For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. iem_dp written by IOhannes m zmoelnig, Thomas Musil, Copyright (c) IEM KUG Graz Austria 1999 - 2007 */ /* double precision library */ #include "m_pd.h" #include "iemlib.h" #include "iem_dp.h" /* ------------------------ mul__ or *__ ---------------------------- */ /* based on miller's *, which is part of pd, only with double precision */ static t_class *mul___class; typedef struct _mul__ { t_object x_obj; t_float x_coarse_left; t_float x_fine_left; t_float x_coarse_right; t_float x_fine_right; t_outlet *x_out_coarse; t_outlet *x_out_fine; } t_mul__; static void mul___bang(t_mul__ *x) { double dprod; t_float fprod; dprod = iem_dp_calc_sum(x->x_coarse_left, x->x_fine_left) * iem_dp_calc_sum(x->x_coarse_right, x->x_fine_right); fprod = iem_dp_cast_to_float(dprod); outlet_float(x->x_out_fine, iem_dp_calc_residual(dprod, fprod)); outlet_float(x->x_out_coarse, fprod); } static void mul___float(t_mul__ *x, t_floatarg f) { x->x_coarse_left = f; mul___bang(x); } static void *mul___new(t_symbol *s, int ac, t_atom *av) { t_mul__ *x = (t_mul__ *)pd_new(mul___class); floatinlet_new(&x->x_obj, &x->x_fine_left); floatinlet_new(&x->x_obj, &x->x_coarse_right); floatinlet_new(&x->x_obj, &x->x_fine_right); x->x_coarse_left = 0.0f; x->x_fine_left = 0.0f; if((ac > 0) && (IS_A_FLOAT(av, 0))) x->x_coarse_right = atom_getfloatarg(0, ac, av); else x->x_coarse_right = 0.0f; if((ac > 1) && (IS_A_FLOAT(av, 1))) x->x_fine_right = atom_getfloatarg(1, ac, av); else x->x_fine_right = 0.0f; x->x_out_coarse = outlet_new(&x->x_obj, &s_float); x->x_out_fine = outlet_new(&x->x_obj, &s_float); return (x); } static void mul___free(t_mul__ *x) { } void mul___setup(void) { mul___class = class_new(gensym("mul__"), (t_newmethod)mul___new, 0, sizeof(t_mul__), 0, A_GIMME, 0); class_addcreator((t_newmethod)mul___new, gensym("*__"), A_GIMME, 0); class_addcreator((t_newmethod)mul___new, gensym("*''"), A_GIMME, 0); class_addbang(mul___class, mul___bang); class_addfloat(mul___class, mul___float); } iem_utils-v0.0.20181004/iem_dp/src/sub__.c0000644000175000017500000000427113303611047020142 0ustar zmoelnigzmoelnig/* For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. iem_dp written by IOhannes m zmoelnig, Thomas Musil, Copyright (c) IEM KUG Graz Austria 1999 - 2007 */ /* double precision library */ #include "m_pd.h" #include "iemlib.h" #include "iem_dp.h" /* ------------------------ sub__ or -__ ---------------------------- */ /* based on miller's -, which is part of pd, only with double precision */ static t_class *sub___class; typedef struct _sub__ { t_object x_obj; t_float x_coarse_left; t_float x_fine_left; t_float x_coarse_right; t_float x_fine_right; t_outlet *x_out_coarse; t_outlet *x_out_fine; } t_sub__; static void sub___bang(t_sub__ *x) { double ddiff; t_float fdiff; ddiff = iem_dp_calc_sum(x->x_coarse_left, x->x_fine_left) - iem_dp_calc_sum(x->x_coarse_right, x->x_fine_right); fdiff = iem_dp_cast_to_float(ddiff); outlet_float(x->x_out_fine, iem_dp_calc_residual(ddiff, fdiff)); outlet_float(x->x_out_coarse, fdiff); } static void sub___float(t_sub__ *x, t_floatarg f) { x->x_coarse_left = f; sub___bang(x); } static void *sub___new(t_symbol *s, int ac, t_atom *av) { t_sub__ *x = (t_sub__ *)pd_new(sub___class); floatinlet_new(&x->x_obj, &x->x_fine_left); floatinlet_new(&x->x_obj, &x->x_coarse_right); floatinlet_new(&x->x_obj, &x->x_fine_right); x->x_coarse_left = 0.0f; x->x_fine_left = 0.0f; if((ac > 0) && (IS_A_FLOAT(av, 0))) x->x_coarse_right = atom_getfloatarg(0, ac, av); else x->x_coarse_right = 0.0f; if((ac > 1) && (IS_A_FLOAT(av, 1))) x->x_fine_right = atom_getfloatarg(1, ac, av); else x->x_fine_right = 0.0f; x->x_out_coarse = outlet_new(&x->x_obj, &s_float); x->x_out_fine = outlet_new(&x->x_obj, &s_float); return (x); } static void sub___free(t_sub__ *x) { } void sub___setup(void) { sub___class = class_new(gensym("sub__"), (t_newmethod)sub___new, 0, sizeof(t_sub__), 0, A_GIMME, 0); class_addcreator((t_newmethod)sub___new, gensym("-__"), A_GIMME, 0); class_addcreator((t_newmethod)sub___new, gensym("-''"), A_GIMME, 0); class_addbang(sub___class, sub___bang); class_addfloat(sub___class, sub___float); } iem_utils-v0.0.20181004/iem_dp/src/samphold~~.c0000644000175000017500000000756313303611047021265 0ustar zmoelnigzmoelnig/* For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. iem_dp written by IOhannes m zmoelnig, Thomas Musil, Copyright (c) IEM KUG Graz Austria 1999 - 2007 */ /* double precision library */ #include "m_pd.h" #include "iemlib.h" #include "iem_dp.h" /* ---------------- samphold~~ - double precision sample and hold ----------------- */ /* based on miller's samphold~ which is part of pd */ typedef struct samphold_tilde_tilde { t_object x_obj; t_float x_f; t_sample *x_in1_coarse; t_sample *x_in1_fine; t_sample *x_in2_coarse; t_sample *x_in2_fine; t_sample *x_out_coarse; t_sample *x_out_fine; double x_lastin; double x_lastout; } t_samphold_tilde_tilde; t_class *samphold_tilde_tilde_class; static void *samphold_tilde_tilde_new(void) { t_samphold_tilde_tilde *x = (t_samphold_tilde_tilde *)pd_new(samphold_tilde_tilde_class); inlet_new(&x->x_obj, &x->x_obj.ob_pd, &s_signal, &s_signal); inlet_new(&x->x_obj, &x->x_obj.ob_pd, &s_signal, &s_signal); inlet_new(&x->x_obj, &x->x_obj.ob_pd, &s_signal, &s_signal); outlet_new(&x->x_obj, &s_signal); outlet_new(&x->x_obj, &s_signal); x->x_lastin = 0; x->x_lastout = 0; x->x_f = 0; return (x); } static t_int *samphold_tilde_tilde_perform(t_int *w) { t_samphold_tilde_tilde *x = (t_samphold_tilde_tilde *)(w[1]); int n = (int)(w[2]), i; t_sample *in1c = x->x_in1_coarse; t_sample *in1f = x->x_in1_fine; t_sample *in2c = x->x_in2_coarse; t_sample *in2f = x->x_in2_fine; t_sample *outc = x->x_out_coarse; t_sample *outf = x->x_out_fine; double lastin = x->x_lastin; double d_lastout = x->x_lastout; t_float f_lastout = 0.0f; for(i = 0; i < n; i++, in1c++, in1f++) { double next = iem_dp_calc_sum(*in2c++, *in2f++); if(next < lastin) d_lastout = iem_dp_calc_sum(*in1c, *in1f); f_lastout = iem_dp_cast_to_float(d_lastout); *outf++ = iem_dp_calc_residual(d_lastout, f_lastout); *outc++ = f_lastout; lastin = next; } x->x_lastin = lastin; x->x_lastout = d_lastout; return(w+3); } static void samphold_tilde_tilde_dsp(t_samphold_tilde_tilde *x, t_signal **sp) { x->x_in1_coarse = sp[0]->s_vec; x->x_in1_fine = sp[1]->s_vec; x->x_in2_coarse = sp[2]->s_vec; x->x_in2_fine = sp[3]->s_vec; x->x_out_coarse = sp[4]->s_vec; x->x_out_fine = sp[5]->s_vec; dsp_add(samphold_tilde_tilde_perform, 2, x, sp[0]->s_n); } static void samphold_tilde_tilde_reset(t_samphold_tilde_tilde *x, t_symbol *s, int argc, t_atom *argv) { t_float coarse, fine; if((argc > 0) && (IS_A_FLOAT(argv, 0))) coarse = atom_getfloatarg(0, argc, argv); else coarse = 1.0e20f; if((argc > 1) && (IS_A_FLOAT(argv, 1))) fine = atom_getfloatarg(1, argc, argv); else fine = 0.0f; x->x_lastin = iem_dp_calc_sum(coarse, fine); } static void samphold_tilde_tilde_set(t_samphold_tilde_tilde *x, t_symbol *s, int argc, t_atom *argv) { t_float coarse, fine; if((argc > 0) && (IS_A_FLOAT(argv, 0))) coarse = atom_getfloatarg(0, argc, argv); else coarse = 0.0f; if((argc > 1) && (IS_A_FLOAT(argv, 1))) fine = atom_getfloatarg(1, argc, argv); else fine = 0.0f; x->x_lastout = iem_dp_calc_sum(coarse, fine); } void samphold_tilde_tilde_setup(void) { samphold_tilde_tilde_class = class_new(gensym("samphold~~"), (t_newmethod)samphold_tilde_tilde_new, 0, sizeof(t_samphold_tilde_tilde), 0, 0); CLASS_MAINSIGNALIN(samphold_tilde_tilde_class, t_samphold_tilde_tilde, x_f); class_addmethod(samphold_tilde_tilde_class, (t_method)samphold_tilde_tilde_set, gensym("set"), A_GIMME, 0); class_addmethod(samphold_tilde_tilde_class, (t_method)samphold_tilde_tilde_reset, gensym("reset"), A_GIMME, 0); class_addmethod(samphold_tilde_tilde_class, (t_method)samphold_tilde_tilde_dsp, gensym("dsp"), A_CANT, 0); } iem_utils-v0.0.20181004/iem_dp/src/vline~~.c0000644000175000017500000001610413303611047020562 0ustar zmoelnigzmoelnig/* For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. iem_dp written by IOhannes m zmoelnig, Thomas Musil, Copyright (c) IEM KUG Graz Austria 1999 - 2007 */ /* double precision library */ #include "m_pd.h" #include "iemlib.h" #include "iem_dp.h" /* -------------------------- vline~~ ------------------------------ */ /* based on miller's vline~ which is part of pd */ static t_class *vline_tilde_tilde_class; typedef struct _vseg_tt { double s_targettime; double s_starttime; double s_target; struct _vseg_tt *s_next; } t_vseg_tt; typedef struct _vline_tilde_tilde { t_object x_obj; double x_value; double x_inc; double x_referencetime; double x_samppermsec; double x_msecpersamp; double x_targettime; double x_target; t_float x_inlet2_fine_target; t_float x_inlet3_coarse_ramp_duration; t_float x_inlet4_fine_ramp_duration; t_float x_inlet5_coarse_delay; t_float x_inlet6_fine_delay; t_vseg_tt *x_list; } t_vline_tilde_tilde; static t_int *vline_tilde_tilde_perform(t_int *w) { t_vline_tilde_tilde *x = (t_vline_tilde_tilde *)(w[1]); t_float *out_float_cast = (t_float *)(w[2]); t_float *out_residual = (t_float *)(w[3]); t_float f_val; int n = (int)(w[4]), i; double d_val = x->x_value; double inc = x->x_inc; double msecpersamp = x->x_msecpersamp; double samppermsec = x->x_samppermsec; double timenow = clock_gettimesince(x->x_referencetime) - (double)n * msecpersamp; t_vseg_tt *seg_list = x->x_list; for(i = 0; i < n; i++) { double timenext = timenow + msecpersamp; checknext_tt: if(seg_list) { /* has starttime elapsed? If so update value and increment */ if(seg_list->s_starttime < timenext) { if(x->x_targettime <= timenext) d_val = x->x_target, inc = 0; /* if zero-length segment bash output value */ if(seg_list->s_targettime <= seg_list->s_starttime) { d_val = seg_list->s_target; inc = 0; } else { double incpermsec = (seg_list->s_target - d_val)/(seg_list->s_targettime - seg_list->s_starttime); d_val += incpermsec * (timenext - seg_list->s_starttime); inc = incpermsec * msecpersamp; } x->x_inc = inc; x->x_target = seg_list->s_target; x->x_targettime = seg_list->s_targettime; x->x_list = seg_list->s_next; t_freebytes(seg_list, sizeof(*seg_list)); seg_list = x->x_list; goto checknext_tt; } } if(x->x_targettime <= timenext) { d_val = x->x_target; inc = x->x_inc = 0; x->x_targettime = 1e20; } f_val = iem_dp_cast_to_float(d_val); *out_residual++ = iem_dp_calc_residual(d_val, f_val); *out_float_cast++ = f_val; d_val += inc; timenow = timenext; } x->x_value = d_val; return (w+5); } static void vline_tilde_tilde_stop(t_vline_tilde_tilde *x) { t_vseg_tt *s1, *s2; for (s1 = x->x_list; s1; s1 = s2) s2 = s1->s_next, t_freebytes(s1, sizeof(*s1)); x->x_list = 0; x->x_inc = 0; x->x_inlet2_fine_target = x->x_inlet3_coarse_ramp_duration = 0; x->x_inlet4_fine_ramp_duration = x->x_inlet5_coarse_delay = x->x_inlet6_fine_delay = 0; x->x_target = x->x_value; x->x_targettime = 1e20; } static void vline_tilde_tilde_float(t_vline_tilde_tilde *x, t_float inlet1_coarse_target) /* coarse target value */ { double timenow = clock_gettimesince(x->x_referencetime); double inlet12_target = iem_dp_calc_sum(inlet1_coarse_target, x->x_inlet2_fine_target); double inlet34_ramp_duration = iem_dp_calc_sum(x->x_inlet3_coarse_ramp_duration, x->x_inlet4_fine_ramp_duration); double inlet56_delay = iem_dp_calc_sum(x->x_inlet5_coarse_delay, x->x_inlet6_fine_delay); double starttime = timenow + inlet56_delay; t_vseg_tt *s1, *s2, *deletefrom = 0, *snew; if(inlet34_ramp_duration < 0) inlet34_ramp_duration = 0; /* if (PD_BIGORSMALL(inlet12_target)) inlet12_target = 0; */ /* negative delay input means stop and jump immediately to new value */ if (inlet56_delay < 0) { x->x_value = inlet12_target; vline_tilde_tilde_stop(x); return; } snew = (t_vseg_tt *)t_getbytes(sizeof(*snew)); /* check if we supplant the first item in the list. We supplant an item by having an earlier starttime, or an equal starttime unless the equal one was instantaneous and the new one isn't (in which case we'll do a jump-and-slide starting at that time.) */ if (!x->x_list || x->x_list->s_starttime > starttime || (x->x_list->s_starttime == starttime && (x->x_list->s_targettime > x->x_list->s_starttime || inlet34_ramp_duration <= 0))) { deletefrom = x->x_list; x->x_list = snew; } else { for (s1 = x->x_list; s2 = s1->s_next; s1 = s2) { if (s2->s_starttime > starttime || (s2->s_starttime == starttime && (s2->s_targettime > s2->s_starttime || inlet34_ramp_duration <= 0))) { deletefrom = s2; s1->s_next = snew; goto vl_didit_tt; } } s1->s_next = snew; deletefrom = 0; vl_didit_tt: ; } while (deletefrom) { s1 = deletefrom->s_next; t_freebytes(deletefrom, sizeof(*deletefrom)); deletefrom = s1; } snew->s_next = 0; snew->s_target = inlet12_target; snew->s_starttime = starttime; snew->s_targettime = starttime + inlet34_ramp_duration; x->x_inlet3_coarse_ramp_duration = x->x_inlet4_fine_ramp_duration = 0; x->x_inlet5_coarse_delay = x->x_inlet6_fine_delay = 0; } static void vline_tilde_tilde_dsp(t_vline_tilde_tilde *x, t_signal **sp) { dsp_add(vline_tilde_tilde_perform, 4, x, sp[0]->s_vec, sp[1]->s_vec, sp[0]->s_n); x->x_samppermsec = ((double)(sp[0]->s_sr)) / 1000.0; x->x_msecpersamp = ((double)1000.0) / sp[0]->s_sr; } static void *vline_tilde_tilde_new(t_floatarg init_val) { t_vline_tilde_tilde *x = (t_vline_tilde_tilde *)pd_new(vline_tilde_tilde_class); outlet_new(&x->x_obj, gensym("signal")); outlet_new(&x->x_obj, gensym("signal")); floatinlet_new(&x->x_obj, &x->x_inlet2_fine_target); floatinlet_new(&x->x_obj, &x->x_inlet3_coarse_ramp_duration); floatinlet_new(&x->x_obj, &x->x_inlet4_fine_ramp_duration); floatinlet_new(&x->x_obj, &x->x_inlet5_coarse_delay); floatinlet_new(&x->x_obj, &x->x_inlet6_fine_delay); x->x_inlet2_fine_target = x->x_inlet3_coarse_ramp_duration = 0; x->x_inlet4_fine_ramp_duration = x->x_inlet5_coarse_delay = x->x_inlet6_fine_delay = 0; x->x_value = x->x_inc = 0; x->x_referencetime = clock_getlogicaltime(); x->x_list = 0; x->x_samppermsec = 0; x->x_targettime = 1e20; return (x); } void vline_tilde_tilde_setup(void) { vline_tilde_tilde_class = class_new(gensym("vline~~"), (t_newmethod)vline_tilde_tilde_new, (t_method)vline_tilde_tilde_stop, sizeof(t_vline_tilde_tilde), 0, 0); class_addfloat(vline_tilde_tilde_class, (t_method)vline_tilde_tilde_float); class_addmethod(vline_tilde_tilde_class, (t_method)vline_tilde_tilde_dsp, gensym("dsp"), A_CANT, 0); class_addmethod(vline_tilde_tilde_class, (t_method)vline_tilde_tilde_stop, gensym("stop"), 0); } iem_utils-v0.0.20181004/iem_dp/src/max~~.c0000644000175000017500000002064613303611047020240 0ustar zmoelnigzmoelnig/* For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. iem_dp written by IOhannes m zmoelnig, Thomas Musil, Copyright (c) IEM KUG Graz Austria 1999 - 2007 */ /* double precision library */ #include "m_pd.h" #include "iemlib.h" #include "iem_dp.h" /* -------------------------- max~~ ------------------------------ */ /* based on miller's max~ which is part of pd */ static t_class *max_tilde_tilde_class, *scalarmax_tilde_tilde_class; typedef struct _max_tilde_tilde { t_object x_obj; t_float x_f; t_sample *x_in1_coarse; t_sample *x_in1_fine; t_sample *x_in2_coarse; t_sample *x_in2_fine; t_sample *x_out_coarse; t_sample *x_out_fine; } t_max_tilde_tilde; typedef struct _scalarmax_tilde_tilde { t_object x_obj; t_float x_f; t_sample *x_in1_coarse; t_sample *x_in1_fine; t_sample *x_out_coarse; t_sample *x_out_fine; t_sample x_in2_coarse; t_sample x_in2_fine; } t_scalarmax_tilde_tilde; static void *max_tilde_tilde_new(t_symbol *s, int argc, t_atom *argv) { if(((argc==1)&&(argv->a_type == A_FLOAT))||(argc>=2)&&(argv->a_type == A_FLOAT)&&((argv+1)->a_type == A_FLOAT)) { t_scalarmax_tilde_tilde *x = (t_scalarmax_tilde_tilde *)pd_new(scalarmax_tilde_tilde_class); inlet_new(&x->x_obj, &x->x_obj.ob_pd, &s_signal, &s_signal); floatinlet_new(&x->x_obj, &x->x_in2_coarse); floatinlet_new(&x->x_obj, &x->x_in2_fine); x->x_in2_coarse = atom_getfloatarg(0, argc, argv); if(argc>=2) x->x_in2_fine = atom_getfloatarg(1, argc, argv); else x->x_in2_fine = 0; outlet_new(&x->x_obj, &s_signal); outlet_new(&x->x_obj, &s_signal); x->x_f = 0; return (x); } else /* either no arguments or symbols */ { t_max_tilde_tilde *x = (t_max_tilde_tilde *)pd_new(max_tilde_tilde_class); inlet_new(&x->x_obj, &x->x_obj.ob_pd, &s_signal, &s_signal); inlet_new(&x->x_obj, &x->x_obj.ob_pd, &s_signal, &s_signal); inlet_new(&x->x_obj, &x->x_obj.ob_pd, &s_signal, &s_signal); outlet_new(&x->x_obj, &s_signal); outlet_new(&x->x_obj, &s_signal); x->x_f = 0; return (x); } } static t_int *max_tilde_tilde_perform(t_int *w) { t_max_tilde_tilde *x = (t_max_tilde_tilde *)(w[1]); int n = (int)(w[2]); t_sample *in1c = x->x_in1_coarse; t_sample *in1f = x->x_in1_fine; t_sample *in2c = x->x_in2_coarse; t_sample *in2f = x->x_in2_fine; t_sample *outc = x->x_out_coarse; t_sample *outf = x->x_out_fine; while(n--) { t_sample i1c = *in1c++; t_sample i1f = *in1f++; t_sample i2c = *in2c++; t_sample i2f = *in2f++; double dleft = iem_dp_calc_sum(i1c, i1f); double dright = iem_dp_calc_sum(i2c, i2f); if(dleft > dright) { *outf++ = i1f; *outc++ = i1c; } else { *outf++ = i2f; *outc++ = i2c; } } return(w+3); } static t_int *max_tilde_tilde_perf8(t_int *w) { t_max_tilde_tilde *x = (t_max_tilde_tilde *)(w[1]); int n = (int)(w[2]); t_sample *in1c = x->x_in1_coarse; t_sample *in1f = x->x_in1_fine; t_sample *in2c = x->x_in2_coarse; t_sample *in2f = x->x_in2_fine; t_sample *outc = x->x_out_coarse; t_sample *outf = x->x_out_fine; for(; n; n -= 8, in1c += 8, in1f += 8, in2c += 8, in2f += 8, outc += 8, outf += 8) { double d; t_float f; d = iem_dp_calc_sum(in1c[0], in1f[0]) + iem_dp_calc_sum(in2c[0], in2f[0]); f = iem_dp_cast_to_float(d); outf[0] = iem_dp_calc_residual(d, f); outc[0] = f; d = iem_dp_calc_sum(in1c[1], in1f[1]) + iem_dp_calc_sum(in2c[1], in2f[1]); f = iem_dp_cast_to_float(d); outf[1] = iem_dp_calc_residual(d, f); outc[1] = f; d = iem_dp_calc_sum(in1c[2], in1f[2]) + iem_dp_calc_sum(in2c[2], in2f[2]); f = iem_dp_cast_to_float(d); outf[2] = iem_dp_calc_residual(d, f); outc[2] = f; d = iem_dp_calc_sum(in1c[3], in1f[3]) + iem_dp_calc_sum(in2c[3], in2f[3]); f = iem_dp_cast_to_float(d); outf[3] = iem_dp_calc_residual(d, f); outc[3] = f; d = iem_dp_calc_sum(in1c[4], in1f[4]) + iem_dp_calc_sum(in2c[4], in2f[4]); f = iem_dp_cast_to_float(d); outf[4] = iem_dp_calc_residual(d, f); outc[4] = f; d = iem_dp_calc_sum(in1c[5], in1f[5]) + iem_dp_calc_sum(in2c[5], in2f[5]); f = iem_dp_cast_to_float(d); outf[5] = iem_dp_calc_residual(d, f); outc[5] = f; d = iem_dp_calc_sum(in1c[6], in1f[6]) + iem_dp_calc_sum(in2c[6], in2f[6]); f = iem_dp_cast_to_float(d); outf[6] = iem_dp_calc_residual(d, f); outc[6] = f; d = iem_dp_calc_sum(in1c[7], in1f[7]) + iem_dp_calc_sum(in2c[7], in2f[7]); f = iem_dp_cast_to_float(d); outf[7] = iem_dp_calc_residual(d, f); outc[7] = f; } return(w+3); } static t_int *scalarmax_tilde_tilde_perform(t_int *w) { t_scalarmax_tilde_tilde *x = (t_scalarmax_tilde_tilde *)(w[1]); int n = (int)(w[2]); t_sample *in1c = x->x_in1_coarse; t_sample *in1f = x->x_in1_fine; t_sample i2c = x->x_in2_coarse; t_sample i2f = x->x_in2_fine; t_sample *outc = x->x_out_coarse; t_sample *outf = x->x_out_fine; double dright = iem_dp_calc_sum(i2c, i2f); while(n--) { t_sample i1c = *in1c++; t_sample i1f = *in1f++; double dleft = iem_dp_calc_sum(i1c, i1f); if(dleft > dright) { *outf++ = i1f; *outc++ = i1c; } else { *outf++ = i2f; *outc++ = i2c; } } return(w+3); } static t_int *scalarmax_tilde_tilde_perf8(t_int *w) { t_scalarmax_tilde_tilde *x = (t_scalarmax_tilde_tilde *)(w[1]); int n = (int)(w[2]); t_sample *inc = x->x_in1_coarse; t_sample *inf = x->x_in1_fine; t_sample *outc = x->x_out_coarse; t_sample *outf = x->x_out_fine; double g=iem_dp_calc_sum(x->x_in2_coarse, x->x_in2_fine); for(; n; n -= 8, inc += 8, inf += 8, outc += 8, outf += 8) { double d; t_float f; d = iem_dp_calc_sum(inc[0], inf[0]) + g; f = iem_dp_cast_to_float(d); outf[0] = iem_dp_calc_residual(d, f); outc[0] = f; d = iem_dp_calc_sum(inc[1], inf[1]) + g; f = iem_dp_cast_to_float(d); outf[1] = iem_dp_calc_residual(d, f); outc[1] = f; d = iem_dp_calc_sum(inc[2], inf[2]) + g; f = iem_dp_cast_to_float(d); outf[2] = iem_dp_calc_residual(d, f); outc[2] = f; d = iem_dp_calc_sum(inc[3], inf[3]) + g; f = iem_dp_cast_to_float(d); outf[3] = iem_dp_calc_residual(d, f); outc[3] = f; d = iem_dp_calc_sum(inc[4], inf[4]) + g; f = iem_dp_cast_to_float(d); outf[4] = iem_dp_calc_residual(d, f); outc[4] = f; d = iem_dp_calc_sum(inc[5], inf[5]) + g; f = iem_dp_cast_to_float(d); outf[5] = iem_dp_calc_residual(d, f); outc[5] = f; d = iem_dp_calc_sum(inc[6], inf[6]) + g; f = iem_dp_cast_to_float(d); outf[6] = iem_dp_calc_residual(d, f); outc[6] = f; d = iem_dp_calc_sum(inc[7], inf[7]) + g; f = iem_dp_cast_to_float(d); outf[7] = iem_dp_calc_residual(d, f); outc[7] = f; } return(w+3); } static void max_tilde_tilde_dsp(t_max_tilde_tilde *x, t_signal **sp) { x->x_in1_coarse = sp[0]->s_vec; x->x_in1_fine = sp[1]->s_vec; x->x_in2_coarse = sp[2]->s_vec; x->x_in2_fine = sp[3]->s_vec; x->x_out_coarse = sp[4]->s_vec; x->x_out_fine = sp[5]->s_vec; if(sp[0]->s_n&7) dsp_add(max_tilde_tilde_perform, 2, x, sp[0]->s_n); else dsp_add(max_tilde_tilde_perform, 2, x, sp[0]->s_n); //dsp_add(max_tilde_tilde_perf8, 2, x, sp[0]->s_n); } static void scalarmax_tilde_tilde_dsp(t_scalarmax_tilde_tilde *x, t_signal **sp) { x->x_in1_coarse = sp[0]->s_vec; x->x_in1_fine = sp[1]->s_vec; x->x_out_coarse = sp[2]->s_vec; x->x_out_fine = sp[3]->s_vec; if(sp[0]->s_n&7) dsp_add(scalarmax_tilde_tilde_perform, 2, sp[0]->s_n); else dsp_add(scalarmax_tilde_tilde_perform, 2, x, sp[0]->s_n); //dsp_add(scalarmax_tilde_tilde_perf8, 2, x, sp[0]->s_n); } void max_tilde_tilde_setup(void) { max_tilde_tilde_class = class_new(gensym("max~~"), (t_newmethod)max_tilde_tilde_new, 0, sizeof(t_max_tilde_tilde), 0, A_GIMME, 0); CLASS_MAINSIGNALIN(max_tilde_tilde_class, t_max_tilde_tilde, x_f); class_addmethod(max_tilde_tilde_class, (t_method)max_tilde_tilde_dsp, gensym("dsp"), A_CANT, 0); scalarmax_tilde_tilde_class = class_new(gensym("max~~"), 0, 0, sizeof(t_scalarmax_tilde_tilde), 0, 0); CLASS_MAINSIGNALIN(scalarmax_tilde_tilde_class, t_scalarmax_tilde_tilde, x_f); class_addmethod(scalarmax_tilde_tilde_class, (t_method)scalarmax_tilde_tilde_dsp, gensym("dsp"), A_CANT, 0); } iem_utils-v0.0.20181004/iem_dp/src/VC7/0000755000175000017500000000000012630366345017314 5ustar zmoelnigzmoelnigiem_utils-v0.0.20181004/iem_dp/src/VC7/iem_dp.vcproj0000644000175000017500000000241512630366345022000 0ustar zmoelnigzmoelnig iem_utils-v0.0.20181004/iem_dp/src/VC7/makefile_vc7proj0000644000175000017500000000245612630366345022475 0ustar zmoelnigzmoelnigTARGET = iem_dp all: ..\$(TARGET).dll VIS_CPP_PATH = "C:\Programme\Microsoft Visual Studio .NET 2003\Vc7" VIS_SDK_PATH = "C:\Programme\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK" PD_INST_PATH = "C:\Programme\pd-0.42-5" PD_WIN_INCLUDE_PATH = /I. /I$(PD_INST_PATH)\src /I$(VIS_CPP_PATH)\include PD_WIN_C_FLAGS = /nologo /W3 /WX /DMSW /DNT /DPD /DWIN32 /DWINDOWS /Ox -D_CRT_SECURE_NO_WARNINGS PD_WIN_L_FLAGS = /nologo PD_WIN_LIB = /NODEFAULTLIB:libcmt /NODEFAULTLIB:oldnames /NODEFAULTLIB:kernel32 \ $(VIS_CPP_PATH)\lib\libcmt.lib \ $(VIS_CPP_PATH)\lib\oldnames.lib \ $(VIS_SDK_PATH)\lib\kernel32.lib \ $(PD_INST_PATH)\bin\pd.lib SRC = symtodp.c \ dptosym.c \ dptohex.c \ ftohex.c \ vline~~.c \ samphold~~.c \ wrap~~.c \ phasor~~.c \ print~~.c \ add__.c \ sub__.c \ mul__.c \ div__.c \ add~~.c \ sub~~.c \ mul~~.c \ div~~.c \ tabwrite_dp.c \ tabread_dp.c \ tabread4_dp.c \ tabwrite~~.c \ tabread~~.c \ tabread4~~.c \ max__.c \ min__.c \ max~~.c \ min~~.c \ random__.c \ delay~~.c \ $(TARGET).c OBJ = $(SRC:.c=.obj) .c.obj: cl $(PD_WIN_C_FLAGS) $(PD_WIN_INCLUDE_PATH) /c $*.c ..\$(TARGET).dll: $(OBJ) link $(PD_WIN_L_FLAGS) /dll /export:$(TARGET)_setup \ /out:..\$(TARGET).dll $(OBJ) $(PD_WIN_LIB) clean: del *.obj iem_utils-v0.0.20181004/iem_dp/src/iem_dp.h0000644000175000017500000000241113303610432020304 0ustar zmoelnigzmoelnig/* For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. iem_dp written by IOhannes m zmoelnig, Thomas Musil, Copyright (c) IEM KUG Graz Austria 1999 - 2013 */ /* double precision library */ #ifndef __IEM_DP_H__ #define __IEM_DP_H__ /* #ifdef __i386__ */ /* more stringent test: anything not between 1e-19 and 1e19 in absolute val */ /* #define PD_BIGORSMALL(f) ((((*(unsigned int*)&(f))&0x60000000)==0) || \ (((*(unsigned int*)&(f))&0x60000000)==0x60000000)) #else #define PD_BIGORSMALL(f) 0 #endif #endif */ t_float iem_dp_cast_to_float(double d); double iem_dp_cast_to_double(t_float f); t_float iem_dp_calc_residual(double d, t_float f); double iem_dp_calc_sum(t_float f, t_float r); extern int ugen_getsortno(void); #endif /* #ifdef Z_USE_WORD_ARRAYS #define zarray_t t_word #define zarray_getarray garray_getfloatwords #define zarray_getfloat(pointer, index) (pointer[index].w_float) #define zarray_setfloat(pointer, index, value) (pointer[index].w_float = value) #else #define zarray_t t_float #define zarray_getarray garray_getfloatarray #define zarray_getfloat(pointer, index) (pointer[index]) #define zarray_setfloat(pointer, index, value) (pointer[index] = value) #endif*/ iem_utils-v0.0.20181004/iem_dp/src/min__.c0000644000175000017500000000430613303611047020133 0ustar zmoelnigzmoelnig/* For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. iem_dp written by IOhannes m zmoelnig, Thomas Musil, Copyright (c) IEM KUG Graz Austria 1999 - 2007 */ /* double precision library */ #include "m_pd.h" #include "iemlib.h" #include "iem_dp.h" /* ------------------------ min_dp ---------------------------- */ /* based on miller's min, which is part of pd, only with double precision */ static t_class *min_dp_class; typedef struct _min_dp { t_object x_obj; t_float x_coarse_left; t_float x_fine_left; t_float x_coarse_right; t_float x_fine_right; t_outlet *x_out_coarse; t_outlet *x_out_fine; } t_min_dp; static void min_dp_bang(t_min_dp *x) { double dleft, dright; dleft = iem_dp_calc_sum(x->x_coarse_left, x->x_fine_left); dright = iem_dp_calc_sum(x->x_coarse_right, x->x_fine_right); if(dleft < dright) { outlet_float(x->x_out_fine, x->x_fine_left); outlet_float(x->x_out_coarse, x->x_coarse_left); } else { outlet_float(x->x_out_fine, x->x_fine_right); outlet_float(x->x_out_coarse, x->x_coarse_right); } } static void min_dp_float(t_min_dp *x, t_floatarg f) { x->x_coarse_left = f; min_dp_bang(x); } static void *min_dp_new(t_symbol *s, int ac, t_atom *av) { t_min_dp *x = (t_min_dp *)pd_new(min_dp_class); floatinlet_new(&x->x_obj, &x->x_fine_left); floatinlet_new(&x->x_obj, &x->x_coarse_right); floatinlet_new(&x->x_obj, &x->x_fine_right); x->x_coarse_left = 0.0f; x->x_fine_left = 0.0f; if((ac > 0) && (IS_A_FLOAT(av, 0))) x->x_coarse_right = atom_getfloatarg(0, ac, av); else x->x_coarse_right = 0.0f; if((ac > 1) && (IS_A_FLOAT(av, 1))) x->x_fine_right = atom_getfloatarg(1, ac, av); else x->x_fine_right = 0.0f; x->x_out_coarse = outlet_new(&x->x_obj, &s_float); x->x_out_fine = outlet_new(&x->x_obj, &s_float); return (x); } void min_dp_setup(void) { min_dp_class = class_new(gensym("min__"), (t_newmethod)min_dp_new, 0, sizeof(t_min_dp), 0, A_GIMME, 0); class_addcreator((t_newmethod)min_dp_new, gensym("min''"), A_GIMME, 0); class_addbang(min_dp_class, min_dp_bang); class_addfloat(min_dp_class, min_dp_float); } iem_utils-v0.0.20181004/iem_dp/src/print~~.c0000644000175000017500000000541513303611047020604 0ustar zmoelnigzmoelnig/* For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. iem_dp written by IOhannes m zmoelnig, Thomas Musil, Copyright (c) IEM KUG Graz Austria 1999 - 2007 */ /* double precision library */ #include "m_pd.h" #include "iemlib.h" #include "iem_dp.h" /* -------------------------- print~~ ------------------------------ */ /* based on miller's print~ which is part of pd */ static t_class *print_tilde_tilde_class; typedef struct _print_tilde_tilde { t_object x_obj; t_float x_f; t_symbol *x_sym; int x_count; } t_print_tilde_tilde; static void *print_tilde_tilde_new(t_symbol *s) { t_print_tilde_tilde *x = (t_print_tilde_tilde *)pd_new(print_tilde_tilde_class); inlet_new(&x->x_obj, &x->x_obj.ob_pd, &s_signal, &s_signal); x->x_sym = (s->s_name[0] ? s : gensym("print~~")); x->x_count = 0; x->x_f = 0; return(x); } static t_int *print_tilde_tilde_perform(t_int *w) { t_print_tilde_tilde *x = (t_print_tilde_tilde *)(w[1]); t_sample *inc = (t_sample *)(w[2]); t_sample *inf = (t_sample *)(w[3]); int n = (int)(w[4]); if(x->x_count) { post("%s:", x->x_sym->s_name); while(n >= 4) { post("%-20.14g %-20.14g %-20.14g %-20.14g", iem_dp_calc_sum(inc[0], inf[0]), iem_dp_calc_sum(inc[1], inf[1]), iem_dp_calc_sum(inc[2], inf[2]), iem_dp_calc_sum(inc[3], inf[3])); n -= 4; inc += 4; inf += 4; } if(n) { if(n == 3) { post("%-20.14g %-20.14g %-20.14g", iem_dp_calc_sum(inc[0], inf[0]), iem_dp_calc_sum(inc[1], inf[1]), iem_dp_calc_sum(inc[2], inf[2])); } else if(n == 2) { post("%-20.14g %-20.14g", iem_dp_calc_sum(inc[0], inf[0]), iem_dp_calc_sum(inc[1], inf[1])); } else if(n == 1) { post("%-20.14g", iem_dp_calc_sum(inc[0], inf[0])); } } x->x_count--; } return(w+5); } static void print_tilde_tilde_float(t_print_tilde_tilde *x, t_floatarg f) { if(f < 0) f = 0; x->x_count = f; } static void print_tilde_tilde_bang(t_print_tilde_tilde *x) { x->x_count = 1; } static void print_tilde_tilde_dsp(t_print_tilde_tilde *x, t_signal **sp) { dsp_add(print_tilde_tilde_perform, 4, x, sp[0]->s_vec, sp[1]->s_vec, sp[0]->s_n); } void print_tilde_tilde_setup(void) { print_tilde_tilde_class = class_new(gensym("print~~"), (t_newmethod)print_tilde_tilde_new, 0, sizeof(t_print_tilde_tilde), 0, A_DEFSYM, 0); CLASS_MAINSIGNALIN(print_tilde_tilde_class, t_print_tilde_tilde, x_f); class_addmethod(print_tilde_tilde_class, (t_method)print_tilde_tilde_dsp, gensym("dsp"), A_CANT, 0); class_addbang(print_tilde_tilde_class, print_tilde_tilde_bang); class_addfloat(print_tilde_tilde_class, print_tilde_tilde_float); } iem_utils-v0.0.20181004/iem_dp/src/min~~.c0000644000175000017500000002064613303611047020236 0ustar zmoelnigzmoelnig/* For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. iem_dp written by IOhannes m zmoelnig, Thomas Musil, Copyright (c) IEM KUG Graz Austria 1999 - 2007 */ /* double precision library */ #include "m_pd.h" #include "iemlib.h" #include "iem_dp.h" /* -------------------------- min~~ ------------------------------ */ /* based on miller's min~ which is part of pd */ static t_class *min_tilde_tilde_class, *scalarmin_tilde_tilde_class; typedef struct _min_tilde_tilde { t_object x_obj; t_float x_f; t_sample *x_in1_coarse; t_sample *x_in1_fine; t_sample *x_in2_coarse; t_sample *x_in2_fine; t_sample *x_out_coarse; t_sample *x_out_fine; } t_min_tilde_tilde; typedef struct _scalarmin_tilde_tilde { t_object x_obj; t_float x_f; t_sample *x_in1_coarse; t_sample *x_in1_fine; t_sample *x_out_coarse; t_sample *x_out_fine; t_sample x_in2_coarse; t_sample x_in2_fine; } t_scalarmin_tilde_tilde; static void *min_tilde_tilde_new(t_symbol *s, int argc, t_atom *argv) { if(((argc==1)&&(argv->a_type == A_FLOAT))||(argc>=2)&&(argv->a_type == A_FLOAT)&&((argv+1)->a_type == A_FLOAT)) { t_scalarmin_tilde_tilde *x = (t_scalarmin_tilde_tilde *)pd_new(scalarmin_tilde_tilde_class); inlet_new(&x->x_obj, &x->x_obj.ob_pd, &s_signal, &s_signal); floatinlet_new(&x->x_obj, &x->x_in2_coarse); floatinlet_new(&x->x_obj, &x->x_in2_fine); x->x_in2_coarse = atom_getfloatarg(0, argc, argv); if(argc>=2) x->x_in2_fine = atom_getfloatarg(1, argc, argv); else x->x_in2_fine = 0; outlet_new(&x->x_obj, &s_signal); outlet_new(&x->x_obj, &s_signal); x->x_f = 0; return (x); } else /* either no arguments or symbols */ { t_min_tilde_tilde *x = (t_min_tilde_tilde *)pd_new(min_tilde_tilde_class); inlet_new(&x->x_obj, &x->x_obj.ob_pd, &s_signal, &s_signal); inlet_new(&x->x_obj, &x->x_obj.ob_pd, &s_signal, &s_signal); inlet_new(&x->x_obj, &x->x_obj.ob_pd, &s_signal, &s_signal); outlet_new(&x->x_obj, &s_signal); outlet_new(&x->x_obj, &s_signal); x->x_f = 0; return (x); } } static t_int *min_tilde_tilde_perform(t_int *w) { t_min_tilde_tilde *x = (t_min_tilde_tilde *)(w[1]); int n = (int)(w[2]); t_sample *in1c = x->x_in1_coarse; t_sample *in1f = x->x_in1_fine; t_sample *in2c = x->x_in2_coarse; t_sample *in2f = x->x_in2_fine; t_sample *outc = x->x_out_coarse; t_sample *outf = x->x_out_fine; while(n--) { t_sample i1c = *in1c++; t_sample i1f = *in1f++; t_sample i2c = *in2c++; t_sample i2f = *in2f++; double dleft = iem_dp_calc_sum(i1c, i1f); double dright = iem_dp_calc_sum(i2c, i2f); if(dleft < dright) { *outf++ = i1f; *outc++ = i1c; } else { *outf++ = i2f; *outc++ = i2c; } } return(w+3); } static t_int *min_tilde_tilde_perf8(t_int *w) { t_min_tilde_tilde *x = (t_min_tilde_tilde *)(w[1]); int n = (int)(w[2]); t_sample *in1c = x->x_in1_coarse; t_sample *in1f = x->x_in1_fine; t_sample *in2c = x->x_in2_coarse; t_sample *in2f = x->x_in2_fine; t_sample *outc = x->x_out_coarse; t_sample *outf = x->x_out_fine; for(; n; n -= 8, in1c += 8, in1f += 8, in2c += 8, in2f += 8, outc += 8, outf += 8) { double d; t_float f; d = iem_dp_calc_sum(in1c[0], in1f[0]) + iem_dp_calc_sum(in2c[0], in2f[0]); f = iem_dp_cast_to_float(d); outf[0] = iem_dp_calc_residual(d, f); outc[0] = f; d = iem_dp_calc_sum(in1c[1], in1f[1]) + iem_dp_calc_sum(in2c[1], in2f[1]); f = iem_dp_cast_to_float(d); outf[1] = iem_dp_calc_residual(d, f); outc[1] = f; d = iem_dp_calc_sum(in1c[2], in1f[2]) + iem_dp_calc_sum(in2c[2], in2f[2]); f = iem_dp_cast_to_float(d); outf[2] = iem_dp_calc_residual(d, f); outc[2] = f; d = iem_dp_calc_sum(in1c[3], in1f[3]) + iem_dp_calc_sum(in2c[3], in2f[3]); f = iem_dp_cast_to_float(d); outf[3] = iem_dp_calc_residual(d, f); outc[3] = f; d = iem_dp_calc_sum(in1c[4], in1f[4]) + iem_dp_calc_sum(in2c[4], in2f[4]); f = iem_dp_cast_to_float(d); outf[4] = iem_dp_calc_residual(d, f); outc[4] = f; d = iem_dp_calc_sum(in1c[5], in1f[5]) + iem_dp_calc_sum(in2c[5], in2f[5]); f = iem_dp_cast_to_float(d); outf[5] = iem_dp_calc_residual(d, f); outc[5] = f; d = iem_dp_calc_sum(in1c[6], in1f[6]) + iem_dp_calc_sum(in2c[6], in2f[6]); f = iem_dp_cast_to_float(d); outf[6] = iem_dp_calc_residual(d, f); outc[6] = f; d = iem_dp_calc_sum(in1c[7], in1f[7]) + iem_dp_calc_sum(in2c[7], in2f[7]); f = iem_dp_cast_to_float(d); outf[7] = iem_dp_calc_residual(d, f); outc[7] = f; } return(w+3); } static t_int *scalarmin_tilde_tilde_perform(t_int *w) { t_scalarmin_tilde_tilde *x = (t_scalarmin_tilde_tilde *)(w[1]); int n = (int)(w[2]); t_sample *in1c = x->x_in1_coarse; t_sample *in1f = x->x_in1_fine; t_sample i2c = x->x_in2_coarse; t_sample i2f = x->x_in2_fine; t_sample *outc = x->x_out_coarse; t_sample *outf = x->x_out_fine; double dright = iem_dp_calc_sum(i2c, i2f); while(n--) { t_sample i1c = *in1c++; t_sample i1f = *in1f++; double dleft = iem_dp_calc_sum(i1c, i1f); if(dleft < dright) { *outf++ = i1f; *outc++ = i1c; } else { *outf++ = i2f; *outc++ = i2c; } } return(w+3); } static t_int *scalarmin_tilde_tilde_perf8(t_int *w) { t_scalarmin_tilde_tilde *x = (t_scalarmin_tilde_tilde *)(w[1]); int n = (int)(w[2]); t_sample *inc = x->x_in1_coarse; t_sample *inf = x->x_in1_fine; t_sample *outc = x->x_out_coarse; t_sample *outf = x->x_out_fine; double g=iem_dp_calc_sum(x->x_in2_coarse, x->x_in2_fine); for(; n; n -= 8, inc += 8, inf += 8, outc += 8, outf += 8) { double d; t_float f; d = iem_dp_calc_sum(inc[0], inf[0]) + g; f = iem_dp_cast_to_float(d); outf[0] = iem_dp_calc_residual(d, f); outc[0] = f; d = iem_dp_calc_sum(inc[1], inf[1]) + g; f = iem_dp_cast_to_float(d); outf[1] = iem_dp_calc_residual(d, f); outc[1] = f; d = iem_dp_calc_sum(inc[2], inf[2]) + g; f = iem_dp_cast_to_float(d); outf[2] = iem_dp_calc_residual(d, f); outc[2] = f; d = iem_dp_calc_sum(inc[3], inf[3]) + g; f = iem_dp_cast_to_float(d); outf[3] = iem_dp_calc_residual(d, f); outc[3] = f; d = iem_dp_calc_sum(inc[4], inf[4]) + g; f = iem_dp_cast_to_float(d); outf[4] = iem_dp_calc_residual(d, f); outc[4] = f; d = iem_dp_calc_sum(inc[5], inf[5]) + g; f = iem_dp_cast_to_float(d); outf[5] = iem_dp_calc_residual(d, f); outc[5] = f; d = iem_dp_calc_sum(inc[6], inf[6]) + g; f = iem_dp_cast_to_float(d); outf[6] = iem_dp_calc_residual(d, f); outc[6] = f; d = iem_dp_calc_sum(inc[7], inf[7]) + g; f = iem_dp_cast_to_float(d); outf[7] = iem_dp_calc_residual(d, f); outc[7] = f; } return(w+3); } static void min_tilde_tilde_dsp(t_min_tilde_tilde *x, t_signal **sp) { x->x_in1_coarse = sp[0]->s_vec; x->x_in1_fine = sp[1]->s_vec; x->x_in2_coarse = sp[2]->s_vec; x->x_in2_fine = sp[3]->s_vec; x->x_out_coarse = sp[4]->s_vec; x->x_out_fine = sp[5]->s_vec; if(sp[0]->s_n&7) dsp_add(min_tilde_tilde_perform, 2, x, sp[0]->s_n); else dsp_add(min_tilde_tilde_perform, 2, x, sp[0]->s_n); //dsp_add(min_tilde_tilde_perf8, 2, x, sp[0]->s_n); } static void scalarmin_tilde_tilde_dsp(t_scalarmin_tilde_tilde *x, t_signal **sp) { x->x_in1_coarse = sp[0]->s_vec; x->x_in1_fine = sp[1]->s_vec; x->x_out_coarse = sp[2]->s_vec; x->x_out_fine = sp[3]->s_vec; if(sp[0]->s_n&7) dsp_add(scalarmin_tilde_tilde_perform, 2, sp[0]->s_n); else dsp_add(scalarmin_tilde_tilde_perform, 2, x, sp[0]->s_n); //dsp_add(scalarmin_tilde_tilde_perf8, 2, x, sp[0]->s_n); } void min_tilde_tilde_setup(void) { min_tilde_tilde_class = class_new(gensym("min~~"), (t_newmethod)min_tilde_tilde_new, 0, sizeof(t_min_tilde_tilde), 0, A_GIMME, 0); CLASS_MAINSIGNALIN(min_tilde_tilde_class, t_min_tilde_tilde, x_f); class_addmethod(min_tilde_tilde_class, (t_method)min_tilde_tilde_dsp, gensym("dsp"), A_CANT, 0); scalarmin_tilde_tilde_class = class_new(gensym("min~~"), 0, 0, sizeof(t_scalarmin_tilde_tilde), 0, 0); CLASS_MAINSIGNALIN(scalarmin_tilde_tilde_class, t_scalarmin_tilde_tilde, x_f); class_addmethod(scalarmin_tilde_tilde_class, (t_method)scalarmin_tilde_tilde_dsp, gensym("dsp"), A_CANT, 0); } iem_utils-v0.0.20181004/iem_dp/src/VC6/0000755000175000017500000000000012630366345017313 5ustar zmoelnigzmoelnigiem_utils-v0.0.20181004/iem_dp/src/VC6/iem_dp.dsp0000644000175000017500000000472412630366345021267 0ustar zmoelnigzmoelnig# Microsoft Developer Studio Project File - Name="iem_dp" - Package Owner=<4> # Microsoft Developer Studio Generated Build File, Format Version 6.00 # ** NICHT BEARBEITEN ** # TARGTYPE "Win32 (x86) External Target" 0x0106 CFG=iem_dp - Win32 Debug !MESSAGE Dies ist kein gltiges Makefile. Zum Erstellen dieses Projekts mit NMAKE !MESSAGE verwenden Sie den Befehl "Makefile exportieren" und fhren Sie den Befehl !MESSAGE !MESSAGE NMAKE /f "iem_dp.mak". !MESSAGE !MESSAGE Sie knnen beim Ausfhren von NMAKE eine Konfiguration angeben !MESSAGE durch Definieren des Makros CFG in der Befehlszeile. Zum Beispiel: !MESSAGE !MESSAGE NMAKE /f "iem_dp.mak" CFG="iem_dp - Win32 Debug" !MESSAGE !MESSAGE Fr die Konfiguration stehen zur Auswahl: !MESSAGE !MESSAGE "iem_dp - Win32 Release" (basierend auf "Win32 (x86) External Target") !MESSAGE "iem_dp - Win32 Debug" (basierend auf "Win32 (x86) External Target") !MESSAGE # Begin Project # PROP AllowPerConfigDependencies 0 # PROP Scc_ProjName "" # PROP Scc_LocalPath "" !IF "$(CFG)" == "iem_dp - Win32 Release" # PROP BASE Use_Debug_Libraries 0 # PROP BASE Output_Dir "Release" # PROP BASE Intermediate_Dir "Release" # PROP BASE Cmd_Line "NMAKE /f makefile_win" # PROP BASE Rebuild_Opt "/a" # PROP BASE Target_File "makefile_win.exe" # PROP BASE Bsc_Name "makefile_win.bsc" # PROP BASE Target_Dir "" # PROP Use_Debug_Libraries 0 # PROP Output_Dir "Release" # PROP Intermediate_Dir "Release" # PROP Cmd_Line "NMAKE /f makefile_win" # PROP Rebuild_Opt "/a" # PROP Target_File "iem_dp.exe" # PROP Bsc_Name "iem_dp.bsc" # PROP Target_Dir "" !ELSEIF "$(CFG)" == "iem_dp - Win32 Debug" # PROP BASE Use_Debug_Libraries 1 # PROP BASE Output_Dir "Debug" # PROP BASE Intermediate_Dir "Debug" # PROP BASE Cmd_Line "NMAKE /f makefile_win" # PROP BASE Rebuild_Opt "/a" # PROP BASE Target_File "makefile_win.exe" # PROP BASE Bsc_Name "makefile_win.bsc" # PROP BASE Target_Dir "" # PROP Use_Debug_Libraries 1 # PROP Output_Dir "Debug" # PROP Intermediate_Dir "Debug" # PROP Cmd_Line "NMAKE /f makefile_win" # PROP Rebuild_Opt "/a" # PROP Target_File "iem_dp.exe" # PROP Bsc_Name "iem_dp.bsc" # PROP Target_Dir "" !ENDIF # Begin Target # Name "iem_dp - Win32 Release" # Name "iem_dp - Win32 Debug" !IF "$(CFG)" == "iem_dp - Win32 Release" !ELSEIF "$(CFG)" == "iem_dp - Win32 Debug" !ENDIF # Begin Source File SOURCE=.\makefile_win # End Source File # End Target # End Project iem_utils-v0.0.20181004/iem_dp/src/VC6/iem_dp.dsw0000644000175000017500000000106312630366345021267 0ustar zmoelnigzmoelnigMicrosoft Developer Studio Workspace File, Format Version 6.00 # WARNUNG: DIESE ARBEITSBEREICHSDATEI DARF NICHT BEARBEITET ODER GELSCHT WERDEN! ############################################################################### Project: "iem_dp"=.\iem_dp.dsp - Package Owner=<4> Package=<5> {{{ }}} Package=<4> {{{ }}} ############################################################################### Global: Package=<5> {{{ }}} Package=<3> {{{ }}} ############################################################################### iem_utils-v0.0.20181004/iem_dp/src/VC6/makefile_win0000644000175000017500000000244312630366345021673 0ustar zmoelnigzmoelnigTARGET = iem_dp all: ..\$(TARGET).dll VIS_CPP_PATH = "C:\Programme\Microsoft Visual Studio\Vc98" PD_INST_PATH = "C:\Programme\pd" PD_WIN_INCLUDE_PATH = /I. /I$(PD_INST_PATH)\src /I$(VIS_CPP_PATH)\include PD_WIN_C_FLAGS = /nologo /W3 /WX /DMSW /DNT /DPD /DWIN32 /DWINDOWS /Ox -DPA_LITTLE_ENDIAN PD_WIN_L_FLAGS = /nologo PD_WIN_LIB = /NODEFAULTLIB:libc /NODEFAULTLIB:oldnames /NODEFAULTLIB:kernel /NODEFAULTLIB:uuid \ $(VIS_CPP_PATH)\lib\libc.lib \ $(VIS_CPP_PATH)\lib\oldnames.lib \ $(VIS_CPP_PATH)\lib\kernel32.lib \ $(VIS_CPP_PATH)\lib\wsock32.lib \ $(VIS_CPP_PATH)\lib\winmm.lib \ $(PD_INST_PATH)\bin\pd.lib SRC = symtodp.c \ dptosym.c \ dptohex.c \ ftohex.c \ vline~~.c \ samphold~~.c \ wrap~~.c \ phasor~~.c \ print~~.c \ add__.c \ sub__.c \ mul__.c \ div__.c \ add~~.c \ sub~~.c \ mul~~.c \ div~~.c \ tabwrite_dp.c \ tabread_dp.c \ tabread4_dp.c \ tabwrite~~.c \ tabread~~.c \ tabread4~~.c \ max__.c \ min__.c \ max~~.c \ min~~.c \ random__.c \ delay~~.c \ $(TARGET).c OBJ = $(SRC:.c=.obj) .c.obj: cl $(PD_WIN_C_FLAGS) $(PD_WIN_INCLUDE_PATH) /c $*.c ..\$(TARGET).dll: $(OBJ) link $(PD_WIN_L_FLAGS) /dll /export:$(TARGET)_setup \ /out:..\$(TARGET).dll $(OBJ) $(PD_WIN_LIB) clean: del *.obj iem_utils-v0.0.20181004/iem_dp/src/iemlib.h0000644000175000017500000000663113303610706020324 0ustar zmoelnigzmoelnig/* For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. iemlib written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2012 */ #ifndef __IEMLIB_H__ #define __IEMLIB_H__ #define IS_A_NULL(atom,index) ((atom+index)->a_type == A_NULL) #define IS_A_POINTER(atom,index) ((atom+index)->a_type == A_POINTER) #define IS_A_FLOAT(atom,index) ((atom+index)->a_type == A_FLOAT) #define IS_A_SYMBOL(atom,index) ((atom+index)->a_type == A_SYMBOL) #define IS_A_DOLLAR(atom,index) ((atom+index)->a_type == A_DOLLAR) #define IS_A_DOLLSYM(atom,index) ((atom+index)->a_type == A_DOLLSYM) #define IS_A_SEMI(atom,index) ((atom+index)->a_type == A_SEMI) #define IS_A_COMMA(atom,index) ((atom+index)->a_type == A_COMMA) #define SETNULL(atom) ((atom)->a_type = A_NULL) /* now miller's code starts : for 4 point interpolation for lookup tables for denormal floats */ #ifdef MSW int sys_noloadbang; //t_symbol *iemgui_key_sym=0; #include #else extern int sys_noloadbang; //extern t_symbol *iemgui_key_sym; #include #endif #define DEFDELVS 64 #define XTRASAMPS 4 #define SAMPBLK 4 #define UNITBIT32 1572864. /* 3*2^19; bit 32 has place value 1 */ /* machine-dependent definitions. These ifdefs really should have been by CPU type and not by operating system! */ #ifdef IRIX /* big-endian. Most significant byte is at low address in memory */ #define HIOFFSET 0 /* word offset to find MSB */ #define LOWOFFSET 1 /* word offset to find LSB */ #define int32 long /* a data type that has 32 bits */ #endif /* IRIX */ #ifdef MSW /* little-endian; most significant byte is at highest address */ #define HIOFFSET 1 #define LOWOFFSET 0 #define int32 long #endif /* MSW */ #if defined(__FreeBSD__) || defined(__APPLE__) || defined(__FreeBSD_kernel__) #include #endif #if defined(__linux__) || defined(__CYGWIN__) || defined(__GNU__) || defined(ANDROID) #include #endif #if defined(__unix__) || defined(__APPLE__) #if !defined(BYTE_ORDER) || !defined(LITTLE_ENDIAN) #error No byte order defined #endif #if BYTE_ORDER == LITTLE_ENDIAN #define HIOFFSET 1 #define LOWOFFSET 0 #else #define HIOFFSET 0 /* word offset to find MSB */ #define LOWOFFSET 1 /* word offset to find LSB */ #endif /* __BYTE_ORDER */ #include #define int32 int32_t #endif /* __unix__ or __APPLE__*/ union tabfudge_d { double tf_d; int32 tf_i[2]; }; union tabfudge_f { float tf_f; long tf_l; }; #if defined __i386__ || defined __x86_64__ #define IEM_DENORMAL(f) ((((*(unsigned int*)&(f))&0x60000000)==0) || \ (((*(unsigned int*)&(f))&0x60000000)==0x60000000)) /* more stringent test: anything not between 1e-19 and 1e19 in absolute val */ #else #define IEM_DENORMAL(f) 0 #endif /* on 64bit systems we cannot use garray_getfloatarray... */ #if ((defined PD_MAJOR_VERSION && defined PD_MINOR_VERSION) && (PD_MAJOR_VERSION > 0 || PD_MINOR_VERSION > 40)) # define iemarray_t t_word # define iemarray_getarray garray_getfloatwords # define iemarray_getfloat(pointer, index) (pointer[index].w_float) # define iemarray_setfloat(pointer, index, fvalue) (pointer[index].w_float = fvalue) #else # define iemarray_t t_float # define iemarray_getarray garray_getfloatarray # define iemarray_getfloat(pointer, index) (pointer[index]) # define iemarray_setfloat(pointer, index, fvalue) (pointer[index] = fvalue) #endif #endif iem_utils-v0.0.20181004/iem_dp/src/symtodp.c0000644000175000017500000000705013303611047020550 0ustar zmoelnigzmoelnig/* For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. iem_dp written by IOhannes m zmoelnig, Thomas Musil, Copyright (c) IEM KUG Graz Austria 1999 - 2013 */ /* double precision library */ #include "m_pd.h" #include "iemlib.h" #include "iem_dp.h" #include #include #include /* -------------------------- symtodp ------------------------------ */ /* symbol double precision number to double float converter */ /* double float is only internal used */ /* to transfer this value, we divide this double value into use one float casted value */ /* and into the difference to the accurate double value. */ /* double float (sign_1 + exp_12 + mant_51) */ static t_class *symtodp_class; typedef struct _symtodp { t_object x_obj; double x_inner_double_value; t_outlet *x_out_floatcasted; t_outlet *x_out_residual; } t_symtodp; static double symtodp_calc_list_sum(int ac, t_atom *av) { int i; char str[1000], buf[100], *dummy; str[0] = 0; for(i=0; ix_inner_double_value); outlet_float(x->x_out_residual, iem_dp_calc_residual(x->x_inner_double_value, float_casted_value)); outlet_float(x->x_out_floatcasted, float_casted_value); } static void symtodp_float(t_symtodp *x, t_floatarg f) { x->x_inner_double_value = (double)f; symtodp_bang(x); } static void symtodp_symbol(t_symtodp *x, t_symbol *s) { char *dummy; if((s->s_name[0] == '"') && (s->s_name[1])) { if((s->s_name[1] == '.') || (s->s_name[1] == '+') || (s->s_name[1] == '-') || ((s->s_name[1] >= '0') && (s->s_name[1] <= '9'))) { x->x_inner_double_value = strtod(s->s_name+1, &dummy); symtodp_bang(x); } } else if((s->s_name[0] == '.') || (s->s_name[0] == '+') || (s->s_name[0] == '-') || ((s->s_name[0] >= '0') && (s->s_name[0] <= '9'))) { x->x_inner_double_value = strtod(s->s_name, &dummy); symtodp_bang(x); } } static void symtodp_list(t_symtodp *x, t_symbol *s, int ac, t_atom *av) { if(ac > 0) { x->x_inner_double_value = symtodp_calc_list_sum(ac, av); // post("listtodp double: %.18g", x->x_inner_double_value); symtodp_bang(x); } } static void symtodp_anything(t_symtodp *x, t_symbol *s, int ac, t_atom *av) { char *dummy; if((s->s_name[0] == '"') && (s->s_name[1])) { if((s->s_name[1] == '.') || (s->s_name[1] == '+') || (s->s_name[1] == '-') || ((s->s_name[1] >= '0') && (s->s_name[1] <= '9'))) { x->x_inner_double_value = strtod(s->s_name+1, &dummy); symtodp_bang(x); } } } static void *symtodp_new(void) { t_symtodp *x = (t_symtodp *)pd_new(symtodp_class); x->x_inner_double_value = 0.0; x->x_out_floatcasted = outlet_new(&x->x_obj, &s_float); x->x_out_residual = outlet_new(&x->x_obj, &s_float); return (x); } static void symtodp_free(t_symtodp *x) { } void symtodp_setup(void) { symtodp_class = class_new(gensym("symtodp"), (t_newmethod)symtodp_new, (t_method)symtodp_free, sizeof(t_symtodp), 0, 0); class_addbang(symtodp_class, symtodp_bang); class_addfloat(symtodp_class, symtodp_float); class_addsymbol(symtodp_class, symtodp_symbol); class_addlist(symtodp_class, symtodp_list); class_addanything(symtodp_class, symtodp_anything); } iem_utils-v0.0.20181004/iem_dp/src/random__.c0000644000175000017500000000533113303611047020627 0ustar zmoelnigzmoelnig/* For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. iem_dp written by IOhannes m zmoelnig, Thomas Musil, Copyright (c) IEM KUG Graz Austria 1999 - 2007 */ /* double precision library */ #include "m_pd.h" #include "iemlib.h" #include "iem_dp.h" /* ------------------------ random_dp ---------------------------- */ /* based on miller's random, which is part of pd, only with double precision */ static t_class *random_dp_class; typedef struct _random_dp { t_object x_obj; t_float x_max_coarse; t_float x_max_fine; unsigned int x_state; t_outlet *x_out_coarse; t_outlet *x_out_fine; } t_random_dp; static int makeseed(void) { static unsigned int random_nextseed = 1489853723; random_nextseed = random_nextseed * 435898247 + 938284287; return (random_nextseed & 0x7fffffff); } static void *random_dp_new(t_symbol *s, int ac, t_atom *av) { t_random_dp *x = (t_random_dp *)pd_new(random_dp_class); if((ac > 0) && (IS_A_FLOAT(av, 0))) x->x_max_coarse = atom_getfloatarg(0, ac, av); else x->x_max_coarse = 0.0f; if((ac > 1) && (IS_A_FLOAT(av, 1))) x->x_max_fine = atom_getfloatarg(1, ac, av); else x->x_max_fine = 0.0f; x->x_state = makeseed(); floatinlet_new(&x->x_obj, &x->x_max_coarse); floatinlet_new(&x->x_obj, &x->x_max_fine); x->x_out_coarse = outlet_new(&x->x_obj, &s_float); x->x_out_fine = outlet_new(&x->x_obj, &s_float); return (x); } static void random_dp_bang(t_random_dp *x) { int n = (int)iem_dp_calc_sum(x->x_max_coarse, x->x_max_fine); int nval; int range = (n < 1 ? 1 : n); unsigned int randval = x->x_state; t_float fine, coarse; x->x_state = randval = randval * 472940017 + 832416023; nval = ((double)range) * ((double)randval) * (1./4294967296.); if(nval >= range) nval = range-1; coarse = iem_dp_cast_to_float((double)nval); outlet_float(x->x_out_fine, iem_dp_calc_residual((double)nval, coarse)); outlet_float(x->x_out_coarse, coarse); } static void random_dp_seed(t_random_dp *x, t_symbol *s, int ac, t_atom *av) { t_float fine, coarse; if((ac > 0) && (IS_A_FLOAT(av, 0))) coarse = atom_getfloatarg(0, ac, av); else coarse = 0.0f; if((ac > 1) && (IS_A_FLOAT(av, 1))) fine = atom_getfloatarg(1, ac, av); else fine = 0.0f; x->x_state = (int)iem_dp_calc_sum(coarse, fine); } void random_dp_setup(void) { random_dp_class = class_new(gensym("random__"), (t_newmethod)random_dp_new, 0, sizeof(t_random_dp), 0, A_GIMME, 0); class_addcreator((t_newmethod)random_dp_new, gensym("random''"), A_GIMME, 0); class_addbang(random_dp_class, random_dp_bang); class_addmethod(random_dp_class, (t_method)random_dp_seed, gensym("seed"), A_GIMME, 0); } iem_utils-v0.0.20181004/iem_dp/src/tabread~~.c0000644000175000017500000000626113303611047021052 0ustar zmoelnigzmoelnig/* For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. iem_dp written by IOhannes m zmoelnig, Thomas Musil, Copyright (c) IEM KUG Graz Austria 1999 - 2007 */ /* double precision library */ #include "m_pd.h" #include "iemlib.h" #include "iem_dp.h" /* -------------------------- tabread~~ ------------------------------ */ /* based on miller's tabread~ which is part of pd */ /******************** tabread~ ***********************/ static t_class *tabread_tilde_tilde_class; typedef struct _tabread_tilde_tilde { t_object x_obj; int x_npoints; iemarray_t *x_vec; t_symbol *x_arrayname; t_float x_f; } t_tabread_tilde_tilde; static void *tabread_tilde_tilde_new(t_symbol *s) { t_tabread_tilde_tilde *x = (t_tabread_tilde_tilde *)pd_new(tabread_tilde_tilde_class); x->x_arrayname = s; x->x_npoints=0; x->x_vec = 0; inlet_new(&x->x_obj, &x->x_obj.ob_pd, &s_signal, &s_signal); outlet_new(&x->x_obj, gensym("signal")); x->x_f = 0; return (x); } static t_int *tabread_tilde_tilde_perform(t_int *w) { t_tabread_tilde_tilde *x = (t_tabread_tilde_tilde *)(w[1]); t_sample *in0 = (t_sample *)(w[2]); t_sample *in1 = (t_sample *)(w[3]); t_sample *out = (t_sample *)(w[4]); int n = (int)(w[5]); int maxindexminusone; iemarray_t *buf = x->x_vec; int i; maxindexminusone = x->x_npoints - 1; if(!buf) { while(n--) *out++ = 0; return(w+6); } for (i = 0; i < n; i++) { t_sample in0_s=*in0++; t_sample in1_s=*in1++; double findex = iem_dp_calc_sum(in0_s, in1_s); int index = (int)findex; if (index < 0) index = 0; else if (index > maxindexminusone) index = maxindexminusone; *out++ = iemarray_getfloat(buf, index); } return (w+6); } void tabread_tilde_tilde_set(t_tabread_tilde_tilde *x, t_symbol *s) { t_garray *a; x->x_arrayname = s; if (!(a = (t_garray *)pd_findbyclass(x->x_arrayname, garray_class))) { if (*s->s_name) pd_error(x, "tabread~: %s: no such array", x->x_arrayname->s_name); x->x_vec = 0; } else if (!iemarray_getarray(a, &x->x_npoints, &x->x_vec)) { pd_error(x, "%s: bad template for tabread~", x->x_arrayname->s_name); x->x_vec = 0; } else garray_usedindsp(a); } static void tabread_tilde_tilde_dsp(t_tabread_tilde_tilde *x, t_signal **sp) { tabread_tilde_tilde_set(x, x->x_arrayname); dsp_add(tabread_tilde_tilde_perform, 5, x, sp[0]->s_vec, sp[1]->s_vec, sp[2]->s_vec, sp[0]->s_n); } static void tabread_tilde_tilde_free(t_tabread_tilde_tilde *x) { } void tabread_tilde_tilde_setup(void) { tabread_tilde_tilde_class = class_new(gensym("tabread~~"), (t_newmethod)tabread_tilde_tilde_new, (t_method)tabread_tilde_tilde_free, sizeof(t_tabread_tilde_tilde), 0, A_DEFSYM, 0); CLASS_MAINSIGNALIN(tabread_tilde_tilde_class, t_tabread_tilde_tilde, x_f); class_addmethod(tabread_tilde_tilde_class, (t_method)tabread_tilde_tilde_dsp, gensym("dsp"), A_CANT, 0); class_addmethod(tabread_tilde_tilde_class, (t_method)tabread_tilde_tilde_set, gensym("set"), A_SYMBOL, 0); } iem_utils-v0.0.20181004/iem_dp/src/tabwrite~~.c0000644000175000017500000001004313303611047021262 0ustar zmoelnigzmoelnig/* For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. iem_dp written by IOhannes m zmoelnig, Thomas Musil, Copyright (c) IEM KUG Graz Austria 1999 - 2007 */ /* double precision library */ #include "m_pd.h" #include "iemlib.h" #include "iem_dp.h" /* -------------------------- tabwrite~~ ------------------------------ */ /* based on miller's tabwrite~ which is part of pd */ static t_class *tabwrite_tilde_tilde_class; typedef struct _tabwrite_tilde_tilde { t_object x_obj; int x_phase; int x_nsampsintab; iemarray_t *x_vec; t_symbol *x_arrayname; t_float x_f; } t_tabwrite_tilde_tilde; static void *tabwrite_tilde_tilde_new(t_symbol *s) { t_tabwrite_tilde_tilde *x = (t_tabwrite_tilde_tilde *)pd_new(tabwrite_tilde_tilde_class); x->x_phase = 0x7fffffff; x->x_arrayname = s; x->x_vec = 0; x->x_nsampsintab=0; x->x_f = 0; return (x); } static void tabwrite_tilde_tilde_redraw(t_tabwrite_tilde_tilde *x) { t_garray *a = (t_garray *)pd_findbyclass(x->x_arrayname, garray_class); if(!a) bug("tabwrite~~_redraw"); else garray_redraw(a); } static t_int *tabwrite_tilde_tilde_perform(t_int *w) { t_tabwrite_tilde_tilde *x = (t_tabwrite_tilde_tilde *)(w[1]); t_sample *in = (t_sample *)(w[2]); int n = (int)(w[3]); int phase = x->x_phase, endphase = x->x_nsampsintab; iemarray_t *vec = x->x_vec; if(!x->x_vec) return(w+4); if(endphase > phase) { int nxfer = endphase - phase; int i; vec += phase; if(nxfer > n) nxfer = n; phase += nxfer; for(i=0; i= endphase) { tabwrite_tilde_tilde_redraw(x); phase = 0x7fffffff; } x->x_phase = phase; } else x->x_phase = 0x7fffffff; return (w+4); } static void tabwrite_tilde_tilde_set(t_tabwrite_tilde_tilde *x, t_symbol *s) { t_garray *a; x->x_arrayname = s; if(!(a = (t_garray *)pd_findbyclass(x->x_arrayname, garray_class))) { if(*s->s_name) pd_error(x, "tabwrite~~: %s: no such array", x->x_arrayname->s_name); x->x_vec = 0; } else if(!iemarray_getarray(a, &x->x_nsampsintab, &x->x_vec)) { pd_error(x, "%s: bad template for tabwrite~~", x->x_arrayname->s_name); x->x_vec = 0; } else garray_usedindsp(a); } static void tabwrite_tilde_tilde_dsp(t_tabwrite_tilde_tilde *x, t_signal **sp) { tabwrite_tilde_tilde_set(x, x->x_arrayname); dsp_add(tabwrite_tilde_tilde_perform, 3, x, sp[0]->s_vec, sp[0]->s_n); } static void tabwrite_tilde_tilde_bang(t_tabwrite_tilde_tilde *x) { x->x_phase = 0; } static void tabwrite_tilde_tilde_start(t_tabwrite_tilde_tilde *x, t_symbol *s, int ac, t_atom *av) { double fi=0; int ii=0; t_float f=0, c=0; if((ac > 0)&&((av+0)->a_type == A_FLOAT)) c = atom_getfloatarg(0, ac, av); if((ac > 1)&&((av+1)->a_type == A_FLOAT)) f = atom_getfloatarg(1, ac, av); fi = iem_dp_calc_sum(c, f); ii = (int)fi; x->x_phase = (ii > 0 ? ii : 0); } static void tabwrite_tilde_tilde_stop(t_tabwrite_tilde_tilde *x) { if(x->x_phase != 0x7fffffff) { tabwrite_tilde_tilde_redraw(x); x->x_phase = 0x7fffffff; } } void tabwrite_tilde_tilde_setup(void) { tabwrite_tilde_tilde_class = class_new(gensym("tabwrite~~"), (t_newmethod)tabwrite_tilde_tilde_new, 0, sizeof(t_tabwrite_tilde_tilde), 0, A_DEFSYM, 0); CLASS_MAINSIGNALIN(tabwrite_tilde_tilde_class, t_tabwrite_tilde_tilde, x_f); class_addmethod(tabwrite_tilde_tilde_class, (t_method)tabwrite_tilde_tilde_dsp, gensym("dsp"), A_CANT, 0); class_addmethod(tabwrite_tilde_tilde_class, (t_method)tabwrite_tilde_tilde_set, gensym("set"), A_SYMBOL, 0); class_addmethod(tabwrite_tilde_tilde_class, (t_method)tabwrite_tilde_tilde_start, gensym("start"), A_GIMME, 0); class_addmethod(tabwrite_tilde_tilde_class, (t_method)tabwrite_tilde_tilde_stop, gensym("stop"), 0); class_addbang(tabwrite_tilde_tilde_class, tabwrite_tilde_tilde_bang); } iem_utils-v0.0.20181004/iem_dp/src/VC9/0000755000175000017500000000000012630366345017316 5ustar zmoelnigzmoelnigiem_utils-v0.0.20181004/iem_dp/src/VC9/makefile_vc9proj0000644000175000017500000000243412630366345022475 0ustar zmoelnigzmoelnigTARGET = iem_dp all: ..\$(TARGET).dll VIS_CPP_PATH = "C:\Program Files\Microsoft Visual Studio 9.0\VC" VIS_SDK_PATH = "C:\Program Files\Microsoft SDKs\Windows\v6.0A" PD_INST_PATH = "C:\Program Files\pd-0.43.0" PD_WIN_INCLUDE_PATH = /I. /I$(PD_INST_PATH)\src /I$(VIS_CPP_PATH)\include PD_WIN_C_FLAGS = /nologo /W3 /WX /DMSW /DNT /DPD /DWIN32 /DWINDOWS /Ox -D_CRT_SECURE_NO_WARNINGS PD_WIN_L_FLAGS = /nologo PD_WIN_LIB = /NODEFAULTLIB:libcmt /NODEFAULTLIB:oldnames /NODEFAULTLIB:kernel32 \ $(VIS_CPP_PATH)\lib\libcmt.lib \ $(VIS_CPP_PATH)\lib\oldnames.lib \ $(VIS_SDK_PATH)\lib\kernel32.lib \ $(PD_INST_PATH)\bin\pd.lib SRC = symtodp.c \ dptosym.c \ dptohex.c \ ftohex.c \ vline~~.c \ samphold~~.c \ wrap~~.c \ phasor~~.c \ print~~.c \ add__.c \ sub__.c \ mul__.c \ div__.c \ add~~.c \ sub~~.c \ mul~~.c \ div~~.c \ tabwrite_dp.c \ tabread_dp.c \ tabread4_dp.c \ tabwrite~~.c \ tabread~~.c \ tabread4~~.c \ max__.c \ min__.c \ max~~.c \ min~~.c \ random__.c \ delay~~.c \ $(TARGET).c OBJ = $(SRC:.c=.obj) .c.obj: cl $(PD_WIN_C_FLAGS) $(PD_WIN_INCLUDE_PATH) /c $*.c ..\$(TARGET).dll: $(OBJ) link $(PD_WIN_L_FLAGS) /dll /export:$(TARGET)_setup \ /out:..\$(TARGET).dll $(OBJ) $(PD_WIN_LIB) clean: del *.obj iem_utils-v0.0.20181004/iem_dp/src/VC9/iem_dp.vcproj0000644000175000017500000000356112630366345022005 0ustar zmoelnigzmoelnig iem_utils-v0.0.20181004/iem_dp/src/VC9/iem_dp.sln0000644000175000017500000000155512630366345021277 0ustar zmoelnigzmoelnig Microsoft Visual Studio Solution File, Format Version 10.00 # Visual Studio 2008 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "iem_dp", "iem_dp.vcproj", "{6A44952F-0D55-44EE-9032-928368583BEC}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Win32 = Debug|Win32 Release|Win32 = Release|Win32 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {6A44952F-0D55-44EE-9032-928368583BEC}.Debug|Win32.ActiveCfg = Debug|Win32 {6A44952F-0D55-44EE-9032-928368583BEC}.Debug|Win32.Build.0 = Debug|Win32 {6A44952F-0D55-44EE-9032-928368583BEC}.Release|Win32.ActiveCfg = Release|Win32 {6A44952F-0D55-44EE-9032-928368583BEC}.Release|Win32.Build.0 = Release|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection EndGlobal iem_utils-v0.0.20181004/iem_dp/src/wrap~~.c0000644000175000017500000000367213303611047020424 0ustar zmoelnigzmoelnig/* For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. iem_dp written by IOhannes m zmoelnig, Thomas Musil, Copyright (c) IEM KUG Graz Austria 1999 - 2007 */ /* double precision library */ #include "m_pd.h" #include "iemlib.h" #include "iem_dp.h" /* -------------------------- wrap~~ ------------------------------ */ /* based on miller's wrap~ which is part of pd */ static t_class *wrap_tilde_tilde_class; typedef struct _wrap_tilde_tilde { t_object x_obj; t_float x_f; } t_wrap_tilde_tilde; static void *wrap_tilde_tilde_new(void) { t_wrap_tilde_tilde *x = (t_wrap_tilde_tilde *)pd_new(wrap_tilde_tilde_class); inlet_new(&x->x_obj, &x->x_obj.ob_pd, &s_signal, &s_signal); outlet_new(&x->x_obj, &s_signal); outlet_new(&x->x_obj, &s_signal); x->x_f = 0; return(x); } static t_int *wrap_tilde_tilde_perform(t_int *w) { t_sample *inc = (t_sample *)(w[1]); t_sample *inf = (t_sample *)(w[2]); t_sample *outc = (t_sample *)(w[3]); t_sample *outf = (t_sample *)(w[4]); int n = (int)(w[5]); while(n--) { double coarse = *inc++; double fine = *inf++; double d=iem_dp_calc_sum(coarse, fine); int k=(int)d; t_float f; if(d > 0) d -= (double)k; else d -= (double)(k-1); f = iem_dp_cast_to_float(d); *outf++ = iem_dp_calc_residual(d, f); *outc++ = f; } return(w+6); } static void wrap_tilde_tilde_dsp(t_wrap_tilde_tilde *x, t_signal **sp) { dsp_add(wrap_tilde_tilde_perform, 5, sp[0]->s_vec, sp[1]->s_vec, sp[2]->s_vec, sp[3]->s_vec, sp[0]->s_n); } void wrap_tilde_tilde_setup(void) { wrap_tilde_tilde_class = class_new(gensym("wrap~~"), (t_newmethod)wrap_tilde_tilde_new, 0, sizeof(t_wrap_tilde_tilde), 0, 0); CLASS_MAINSIGNALIN(wrap_tilde_tilde_class, t_wrap_tilde_tilde, x_f); class_addmethod(wrap_tilde_tilde_class, (t_method)wrap_tilde_tilde_dsp, gensym("dsp"), A_CANT, 0); } iem_utils-v0.0.20181004/iem_dp/src/sub~~.c0000644000175000017500000002010713303611047020234 0ustar zmoelnigzmoelnig/* For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. iem_dp written by IOhannes m zmoelnig, Thomas Musil, Copyright (c) IEM KUG Graz Austria 1999 - 2007 */ /* double precision library */ #include "m_pd.h" #include "iemlib.h" #include "iem_dp.h" /* -------------------------- sub~~ ------------------------------ */ /* based on miller's -~ which is part of pd */ static t_class *sub_tilde_tilde_class, *scalarsub_tilde_tilde_class; typedef struct _sub_tilde_tilde { t_object x_obj; t_float x_f; t_sample *x_in1_coarse; t_sample *x_in1_fine; t_sample *x_in2_coarse; t_sample *x_in2_fine; t_sample *x_out_coarse; t_sample *x_out_fine; } t_sub_tilde_tilde; typedef struct _scalarsub_tilde_tilde { t_object x_obj; t_float x_f; t_sample *x_in1_coarse; t_sample *x_in1_fine; t_sample *x_out_coarse; t_sample *x_out_fine; t_sample x_in2_coarse; t_sample x_in2_fine; } t_scalarsub_tilde_tilde; static void *sub_tilde_tilde_new(t_symbol *s, int argc, t_atom *argv) { if(((argc==1)&&(argv->a_type == A_FLOAT))||(argc>=2)&&(argv->a_type == A_FLOAT)&&((argv+1)->a_type == A_FLOAT)) { t_scalarsub_tilde_tilde *x = (t_scalarsub_tilde_tilde *)pd_new(scalarsub_tilde_tilde_class); inlet_new(&x->x_obj, &x->x_obj.ob_pd, &s_signal, &s_signal); floatinlet_new(&x->x_obj, &x->x_in2_coarse); floatinlet_new(&x->x_obj, &x->x_in2_fine); x->x_in2_coarse = atom_getfloatarg(0, argc, argv); if(argc>=2) x->x_in2_fine = atom_getfloatarg(1, argc, argv); else x->x_in2_fine = 0; outlet_new(&x->x_obj, &s_signal); outlet_new(&x->x_obj, &s_signal); x->x_f = 0; return (x); } else /* either no arguments or symbols */ { t_sub_tilde_tilde *x = (t_sub_tilde_tilde *)pd_new(sub_tilde_tilde_class); inlet_new(&x->x_obj, &x->x_obj.ob_pd, &s_signal, &s_signal); inlet_new(&x->x_obj, &x->x_obj.ob_pd, &s_signal, &s_signal); inlet_new(&x->x_obj, &x->x_obj.ob_pd, &s_signal, &s_signal); outlet_new(&x->x_obj, &s_signal); outlet_new(&x->x_obj, &s_signal); x->x_f = 0; return (x); } } static t_int *sub_tilde_tilde_perform(t_int *w) { t_sub_tilde_tilde *x = (t_sub_tilde_tilde *)(w[1]); int n = (int)(w[2]); t_sample *in1c = x->x_in1_coarse; t_sample *in1f = x->x_in1_fine; t_sample *in2c = x->x_in2_coarse; t_sample *in2f = x->x_in2_fine; t_sample *outc = x->x_out_coarse; t_sample *outf = x->x_out_fine; double d; t_float f; while(n--) { d = iem_dp_calc_sum(*in1c++, *in1f++) - iem_dp_calc_sum(*in2c++, *in2f++); f = iem_dp_cast_to_float(d); *outf++ = iem_dp_calc_residual(d, f); *outc++ = f; } return(w+3); } static t_int *sub_tilde_tilde_perf8(t_int *w) { t_sub_tilde_tilde *x = (t_sub_tilde_tilde *)(w[1]); int n = (int)(w[2]); t_sample *in1c = x->x_in1_coarse; t_sample *in1f = x->x_in1_fine; t_sample *in2c = x->x_in2_coarse; t_sample *in2f = x->x_in2_fine; t_sample *outc = x->x_out_coarse; t_sample *outf = x->x_out_fine; for(; n; n -= 8, in1c += 8, in1f += 8, in2c += 8, in2f += 8, outc += 8, outf += 8) { double d; t_float f; d = iem_dp_calc_sum(in1c[0], in1f[0]) - iem_dp_calc_sum(in2c[0], in2f[0]); f = iem_dp_cast_to_float(d); outf[0] = iem_dp_calc_residual(d, f); outc[0] = f; d = iem_dp_calc_sum(in1c[1], in1f[1]) - iem_dp_calc_sum(in2c[1], in2f[1]); f = iem_dp_cast_to_float(d); outf[1] = iem_dp_calc_residual(d, f); outc[1] = f; d = iem_dp_calc_sum(in1c[2], in1f[2]) - iem_dp_calc_sum(in2c[2], in2f[2]); f = iem_dp_cast_to_float(d); outf[2] = iem_dp_calc_residual(d, f); outc[2] = f; d = iem_dp_calc_sum(in1c[3], in1f[3]) - iem_dp_calc_sum(in2c[3], in2f[3]); f = iem_dp_cast_to_float(d); outf[3] = iem_dp_calc_residual(d, f); outc[3] = f; d = iem_dp_calc_sum(in1c[4], in1f[4]) - iem_dp_calc_sum(in2c[4], in2f[4]); f = iem_dp_cast_to_float(d); outf[4] = iem_dp_calc_residual(d, f); outc[4] = f; d = iem_dp_calc_sum(in1c[5], in1f[5]) - iem_dp_calc_sum(in2c[5], in2f[5]); f = iem_dp_cast_to_float(d); outf[5] = iem_dp_calc_residual(d, f); outc[5] = f; d = iem_dp_calc_sum(in1c[6], in1f[6]) - iem_dp_calc_sum(in2c[6], in2f[6]); f = iem_dp_cast_to_float(d); outf[6] = iem_dp_calc_residual(d, f); outc[6] = f; d = iem_dp_calc_sum(in1c[7], in1f[7]) - iem_dp_calc_sum(in2c[7], in2f[7]); f = iem_dp_cast_to_float(d); outf[7] = iem_dp_calc_residual(d, f); outc[7] = f; } return(w+3); } static t_int *scalarsub_tilde_tilde_perform(t_int *w) { t_scalarsub_tilde_tilde *x = (t_scalarsub_tilde_tilde *)(w[1]); int n = (int)(w[2]); t_sample *inc = x->x_in1_coarse; t_sample *inf = x->x_in1_fine; t_sample *outc = x->x_out_coarse; t_sample *outf = x->x_out_fine; double d, g=iem_dp_calc_sum(x->x_in2_coarse, x->x_in2_fine); t_float f; while(n--) { d = iem_dp_calc_sum(*inc++, *inf++) - g; f = iem_dp_cast_to_float(d); *outf++ = iem_dp_calc_residual(d, f); *outc++ = f; } return(w+3); } static t_int *scalarsub_tilde_tilde_perf8(t_int *w) { t_scalarsub_tilde_tilde *x = (t_scalarsub_tilde_tilde *)(w[1]); int n = (int)(w[2]); t_sample *inc = x->x_in1_coarse; t_sample *inf = x->x_in1_fine; t_sample *outc = x->x_out_coarse; t_sample *outf = x->x_out_fine; double g=iem_dp_calc_sum(x->x_in2_coarse, x->x_in2_fine); for(; n; n -= 8, inc += 8, inf += 8, outc += 8, outf += 8) { double d; t_float f; d = iem_dp_calc_sum(inc[0], inf[0]) - g; f = iem_dp_cast_to_float(d); outf[0] = iem_dp_calc_residual(d, f); outc[0] = f; d = iem_dp_calc_sum(inc[1], inf[1]) - g; f = iem_dp_cast_to_float(d); outf[1] = iem_dp_calc_residual(d, f); outc[1] = f; d = iem_dp_calc_sum(inc[2], inf[2]) - g; f = iem_dp_cast_to_float(d); outf[2] = iem_dp_calc_residual(d, f); outc[2] = f; d = iem_dp_calc_sum(inc[3], inf[3]) - g; f = iem_dp_cast_to_float(d); outf[3] = iem_dp_calc_residual(d, f); outc[3] = f; d = iem_dp_calc_sum(inc[4], inf[4]) - g; f = iem_dp_cast_to_float(d); outf[4] = iem_dp_calc_residual(d, f); outc[4] = f; d = iem_dp_calc_sum(inc[5], inf[5]) - g; f = iem_dp_cast_to_float(d); outf[5] = iem_dp_calc_residual(d, f); outc[5] = f; d = iem_dp_calc_sum(inc[6], inf[6]) - g; f = iem_dp_cast_to_float(d); outf[6] = iem_dp_calc_residual(d, f); outc[6] = f; d = iem_dp_calc_sum(inc[7], inf[7]) - g; f = iem_dp_cast_to_float(d); outf[7] = iem_dp_calc_residual(d, f); outc[7] = f; } return(w+3); } static void sub_tilde_tilde_dsp(t_sub_tilde_tilde *x, t_signal **sp) { x->x_in1_coarse = sp[0]->s_vec; x->x_in1_fine = sp[1]->s_vec; x->x_in2_coarse = sp[2]->s_vec; x->x_in2_fine = sp[3]->s_vec; x->x_out_coarse = sp[4]->s_vec; x->x_out_fine = sp[5]->s_vec; if(sp[0]->s_n&7) dsp_add(sub_tilde_tilde_perform, 2, x, sp[0]->s_n); else dsp_add(sub_tilde_tilde_perf8, 2, x, sp[0]->s_n); } static void scalarsub_tilde_tilde_dsp(t_scalarsub_tilde_tilde *x, t_signal **sp) { x->x_in1_coarse = sp[0]->s_vec; x->x_in1_fine = sp[1]->s_vec; x->x_out_coarse = sp[2]->s_vec; x->x_out_fine = sp[3]->s_vec; if(sp[0]->s_n&7) dsp_add(scalarsub_tilde_tilde_perform, 2, x, sp[0]->s_n); else dsp_add(scalarsub_tilde_tilde_perf8, 2, x, sp[0]->s_n); } void sub_tilde_tilde_setup(void) { sub_tilde_tilde_class = class_new(gensym("-~~"), (t_newmethod)sub_tilde_tilde_new, 0, sizeof(t_sub_tilde_tilde), 0, A_GIMME, 0); class_addcreator((t_newmethod)sub_tilde_tilde_new, gensym("sub~~"), A_GIMME, 0); CLASS_MAINSIGNALIN(sub_tilde_tilde_class, t_sub_tilde_tilde, x_f); class_addmethod(sub_tilde_tilde_class, (t_method)sub_tilde_tilde_dsp, gensym("dsp"), A_CANT, 0); scalarsub_tilde_tilde_class = class_new(gensym("-~~"), 0, 0, sizeof(t_scalarsub_tilde_tilde), 0, 0); CLASS_MAINSIGNALIN(scalarsub_tilde_tilde_class, t_scalarsub_tilde_tilde, x_f); class_addmethod(scalarsub_tilde_tilde_class, (t_method)scalarsub_tilde_tilde_dsp, gensym("dsp"), A_CANT, 0); } iem_utils-v0.0.20181004/iem_dp/src/max__.c0000644000175000017500000000430613303611047020135 0ustar zmoelnigzmoelnig/* For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. iem_dp written by IOhannes m zmoelnig, Thomas Musil, Copyright (c) IEM KUG Graz Austria 1999 - 2007 */ /* double precision library */ #include "m_pd.h" #include "iemlib.h" #include "iem_dp.h" /* ------------------------ max_dp ---------------------------- */ /* based on miller's max, which is part of pd, only with double precision */ static t_class *max_dp_class; typedef struct _max_dp { t_object x_obj; t_float x_coarse_left; t_float x_fine_left; t_float x_coarse_right; t_float x_fine_right; t_outlet *x_out_coarse; t_outlet *x_out_fine; } t_max_dp; static void max_dp_bang(t_max_dp *x) { double dleft, dright; dleft = iem_dp_calc_sum(x->x_coarse_left, x->x_fine_left); dright = iem_dp_calc_sum(x->x_coarse_right, x->x_fine_right); if(dleft > dright) { outlet_float(x->x_out_fine, x->x_fine_left); outlet_float(x->x_out_coarse, x->x_coarse_left); } else { outlet_float(x->x_out_fine, x->x_fine_right); outlet_float(x->x_out_coarse, x->x_coarse_right); } } static void max_dp_float(t_max_dp *x, t_floatarg f) { x->x_coarse_left = f; max_dp_bang(x); } static void *max_dp_new(t_symbol *s, int ac, t_atom *av) { t_max_dp *x = (t_max_dp *)pd_new(max_dp_class); floatinlet_new(&x->x_obj, &x->x_fine_left); floatinlet_new(&x->x_obj, &x->x_coarse_right); floatinlet_new(&x->x_obj, &x->x_fine_right); x->x_coarse_left = 0.0f; x->x_fine_left = 0.0f; if((ac > 0) && (IS_A_FLOAT(av, 0))) x->x_coarse_right = atom_getfloatarg(0, ac, av); else x->x_coarse_right = 0.0f; if((ac > 1) && (IS_A_FLOAT(av, 1))) x->x_fine_right = atom_getfloatarg(1, ac, av); else x->x_fine_right = 0.0f; x->x_out_coarse = outlet_new(&x->x_obj, &s_float); x->x_out_fine = outlet_new(&x->x_obj, &s_float); return (x); } void max_dp_setup(void) { max_dp_class = class_new(gensym("max__"), (t_newmethod)max_dp_new, 0, sizeof(t_max_dp), 0, A_GIMME, 0); class_addcreator((t_newmethod)max_dp_new, gensym("max''"), A_GIMME, 0); class_addbang(max_dp_class, max_dp_bang); class_addfloat(max_dp_class, max_dp_float); } iem_utils-v0.0.20181004/iem_dp/src/div~~.c0000644000175000017500000002167013303611047020233 0ustar zmoelnigzmoelnig/* For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. iem_dp written by IOhannes m zmoelnig, Thomas Musil, Copyright (c) IEM KUG Graz Austria 1999 - 2007 */ /* double precision library */ #include "m_pd.h" #include "iemlib.h" #include "iem_dp.h" /* -------------------------- div~~ ------------------------------ */ /* based on miller's /~ which is part of pd */ static t_class *div_tilde_tilde_class, *scalardiv_tilde_tilde_class; typedef struct _div_tilde_tilde { t_object x_obj; t_float x_f; t_sample *x_in1_coarse; t_sample *x_in1_fine; t_sample *x_in2_coarse; t_sample *x_in2_fine; t_sample *x_out_coarse; t_sample *x_out_fine; } t_div_tilde_tilde; typedef struct _scalardiv_tilde_tilde { t_object x_obj; t_float x_f; t_sample *x_in1_coarse; t_sample *x_in1_fine; t_sample *x_out_coarse; t_sample *x_out_fine; t_sample x_in2_coarse; t_sample x_in2_fine; } t_scalardiv_tilde_tilde; static void *div_tilde_tilde_new(t_symbol *s, int argc, t_atom *argv) { if(((argc==1)&&(argv->a_type == A_FLOAT))||(argc>=2)&&(argv->a_type == A_FLOAT)&&((argv+1)->a_type == A_FLOAT)) { t_scalardiv_tilde_tilde *x = (t_scalardiv_tilde_tilde *)pd_new(scalardiv_tilde_tilde_class); inlet_new(&x->x_obj, &x->x_obj.ob_pd, &s_signal, &s_signal); floatinlet_new(&x->x_obj, &x->x_in2_coarse); floatinlet_new(&x->x_obj, &x->x_in2_fine); x->x_in2_coarse = atom_getfloatarg(0, argc, argv); if(argc>=2) x->x_in2_fine = atom_getfloatarg(1, argc, argv); else x->x_in2_fine = 0; outlet_new(&x->x_obj, &s_signal); outlet_new(&x->x_obj, &s_signal); x->x_f = 0; return (x); } else /* either no arguments or symbols */ { t_div_tilde_tilde *x = (t_div_tilde_tilde *)pd_new(div_tilde_tilde_class); inlet_new(&x->x_obj, &x->x_obj.ob_pd, &s_signal, &s_signal); inlet_new(&x->x_obj, &x->x_obj.ob_pd, &s_signal, &s_signal); inlet_new(&x->x_obj, &x->x_obj.ob_pd, &s_signal, &s_signal); outlet_new(&x->x_obj, &s_signal); outlet_new(&x->x_obj, &s_signal); x->x_f = 0; return (x); } } static t_int *div_tilde_tilde_perform(t_int *w) { t_div_tilde_tilde *x = (t_div_tilde_tilde *)(w[1]); int n = (int)(w[2]); t_sample *in1c = x->x_in1_coarse; t_sample *in1f = x->x_in1_fine; t_sample *in2c = x->x_in2_coarse; t_sample *in2f = x->x_in2_fine; t_sample *outc = x->x_out_coarse; t_sample *outf = x->x_out_fine; double d, nom; t_float f; while(n--) { nom = iem_dp_calc_sum(*in2c++, *in2f++); d = (nom ? iem_dp_calc_sum(*in1c++, *in1f++) / nom : 0); f = iem_dp_cast_to_float(d); *outf++ = iem_dp_calc_residual(d, f); *outc++ = f; } return(w+3); } static t_int *div_tilde_tilde_perf8(t_int *w) { t_div_tilde_tilde *x = (t_div_tilde_tilde *)(w[1]); int n = (int)(w[2]); t_sample *in1c = x->x_in1_coarse; t_sample *in1f = x->x_in1_fine; t_sample *in2c = x->x_in2_coarse; t_sample *in2f = x->x_in2_fine; t_sample *outc = x->x_out_coarse; t_sample *outf = x->x_out_fine; for(; n; n -= 8, in1c += 8, in1f += 8, in2c += 8, in2f += 8, outc += 8, outf += 8) { double d, nom; t_float f; nom = iem_dp_calc_sum(in2c[0], in2f[0]); d = (nom ? iem_dp_calc_sum(in1c[0], in1f[0]) / nom : 0); f = iem_dp_cast_to_float(d); outf[0] = iem_dp_calc_residual(d, f); outc[0] = f; nom = iem_dp_calc_sum(in2c[1], in2f[1]); d = (nom ? iem_dp_calc_sum(in1c[1], in1f[1]) / nom : 0); f = iem_dp_cast_to_float(d); outf[1] = iem_dp_calc_residual(d, f); outc[1] = f; nom = iem_dp_calc_sum(in2c[2], in2f[2]); d = (nom ? iem_dp_calc_sum(in1c[2], in1f[2]) / nom : 0); f = iem_dp_cast_to_float(d); outf[2] = iem_dp_calc_residual(d, f); outc[2] = f; nom = iem_dp_calc_sum(in2c[3], in2f[3]); d = (nom ? iem_dp_calc_sum(in1c[3], in1f[3]) / nom : 0); f = iem_dp_cast_to_float(d); outf[3] = iem_dp_calc_residual(d, f); outc[3] = f; nom = iem_dp_calc_sum(in2c[4], in2f[4]); d = (nom ? iem_dp_calc_sum(in1c[4], in1f[4]) / nom : 0); f = iem_dp_cast_to_float(d); outf[4] = iem_dp_calc_residual(d, f); outc[4] = f; nom = iem_dp_calc_sum(in2c[5], in2f[5]); d = (nom ? iem_dp_calc_sum(in1c[5], in1f[5]) / nom : 0); f = iem_dp_cast_to_float(d); outf[5] = iem_dp_calc_residual(d, f); outc[5] = f; nom = iem_dp_calc_sum(in2c[6], in2f[6]); d = (nom ? iem_dp_calc_sum(in1c[6], in1f[6]) / nom : 0); f = iem_dp_cast_to_float(d); outf[6] = iem_dp_calc_residual(d, f); outc[6] = f; nom = iem_dp_calc_sum(in2c[7], in2f[7]); d = (nom ? iem_dp_calc_sum(in1c[7], in1f[7]) / nom : 0); f = iem_dp_cast_to_float(d); outf[7] = iem_dp_calc_residual(d, f); outc[7] = f; } return(w+3); } static t_int *scalardiv_tilde_tilde_perform(t_int *w) { t_scalardiv_tilde_tilde *x = (t_scalardiv_tilde_tilde *)(w[1]); int n = (int)(w[2]); t_sample *inc = x->x_in1_coarse; t_sample *inf = x->x_in1_fine; t_sample *outc = x->x_out_coarse; t_sample *outf = x->x_out_fine; double d, g=iem_dp_calc_sum(x->x_in2_coarse, x->x_in2_fine); t_float f; if(g) { double h=1.0/g; while(n--) { d = iem_dp_calc_sum(*inc++, *inf++) * h; f = iem_dp_cast_to_float(d); *outf++ = iem_dp_calc_residual(d, f); *outc++ = f; } } else { while(n--) { *outf++ = 0; *outc++ = 0; } } return(w+3); } static t_int *scalardiv_tilde_tilde_perf8(t_int *w) { t_scalardiv_tilde_tilde *x = (t_scalardiv_tilde_tilde *)(w[1]); int n = (int)(w[2]); t_sample *inc = x->x_in1_coarse; t_sample *inf = x->x_in1_fine; t_sample *outc = x->x_out_coarse; t_sample *outf = x->x_out_fine; double g=iem_dp_calc_sum(x->x_in2_coarse, x->x_in2_fine); if(g) { double h=1.0/g; for(; n; n -= 8, inc += 8, inf += 8, outc += 8, outf += 8) { double d; t_float f; d = iem_dp_calc_sum(inc[0], inf[0]) * h; f = iem_dp_cast_to_float(d); outf[0] = iem_dp_calc_residual(d, f); outc[0] = f; d = iem_dp_calc_sum(inc[1], inf[1]) * h; f = iem_dp_cast_to_float(d); outf[1] = iem_dp_calc_residual(d, f); outc[1] = f; d = iem_dp_calc_sum(inc[2], inf[2]) * h; f = iem_dp_cast_to_float(d); outf[2] = iem_dp_calc_residual(d, f); outc[2] = f; d = iem_dp_calc_sum(inc[3], inf[3]) * h; f = iem_dp_cast_to_float(d); outf[3] = iem_dp_calc_residual(d, f); outc[3] = f; d = iem_dp_calc_sum(inc[4], inf[4]) * h; f = iem_dp_cast_to_float(d); outf[4] = iem_dp_calc_residual(d, f); outc[4] = f; d = iem_dp_calc_sum(inc[5], inf[5]) * h; f = iem_dp_cast_to_float(d); outf[5] = iem_dp_calc_residual(d, f); outc[5] = f; d = iem_dp_calc_sum(inc[6], inf[6]) * h; f = iem_dp_cast_to_float(d); outf[6] = iem_dp_calc_residual(d, f); outc[6] = f; d = iem_dp_calc_sum(inc[7], inf[7]) * h; f = iem_dp_cast_to_float(d); outf[7] = iem_dp_calc_residual(d, f); outc[7] = f; } } else { for(; n; n -= 8, outc += 8, outf += 8) { outf[0] = 0; outc[0] = 0; outf[1] = 0; outc[1] = 0; outf[2] = 0; outc[2] = 0; outf[3] = 0; outc[3] = 0; outf[4] = 0; outc[4] = 0; outf[5] = 0; outc[5] = 0; outf[6] = 0; outc[6] = 0; outf[7] = 0; outc[7] = 0; } } return(w+3); } static void div_tilde_tilde_dsp(t_div_tilde_tilde *x, t_signal **sp) { x->x_in1_coarse = sp[0]->s_vec; x->x_in1_fine = sp[1]->s_vec; x->x_in2_coarse = sp[2]->s_vec; x->x_in2_fine = sp[3]->s_vec; x->x_out_coarse = sp[4]->s_vec; x->x_out_fine = sp[5]->s_vec; if(sp[0]->s_n&7) dsp_add(div_tilde_tilde_perform, 2, x, sp[0]->s_n); else dsp_add(div_tilde_tilde_perf8, 2, x, sp[0]->s_n); } static void scalardiv_tilde_tilde_dsp(t_scalardiv_tilde_tilde *x, t_signal **sp) { x->x_in1_coarse = sp[0]->s_vec; x->x_in1_fine = sp[1]->s_vec; x->x_out_coarse = sp[2]->s_vec; x->x_out_fine = sp[3]->s_vec; if(sp[0]->s_n&7) dsp_add(scalardiv_tilde_tilde_perform, 2, x, sp[0]->s_n); else dsp_add(scalardiv_tilde_tilde_perf8, 2, x, sp[0]->s_n); } void div_tilde_tilde_setup(void) { div_tilde_tilde_class = class_new(gensym("/~~"), (t_newmethod)div_tilde_tilde_new, 0, sizeof(t_div_tilde_tilde), 0, A_GIMME, 0); class_addcreator((t_newmethod)div_tilde_tilde_new, gensym("div~~"), A_GIMME, 0); CLASS_MAINSIGNALIN(div_tilde_tilde_class, t_div_tilde_tilde, x_f); class_addmethod(div_tilde_tilde_class, (t_method)div_tilde_tilde_dsp, gensym("dsp"), A_CANT, 0); scalardiv_tilde_tilde_class = class_new(gensym("/~~"), 0, 0, sizeof(t_scalardiv_tilde_tilde), 0, 0); CLASS_MAINSIGNALIN(scalardiv_tilde_tilde_class, t_scalardiv_tilde_tilde, x_f); class_addmethod(scalardiv_tilde_tilde_class, (t_method)scalardiv_tilde_tilde_dsp, gensym("dsp"), A_CANT, 0); } iem_utils-v0.0.20181004/iem_dp/src/iem_dp.c0000644000175000017500000000675413303611047020320 0ustar zmoelnigzmoelnig/* For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. * iem_dp written by IOhannes m zmoelnig, Thomas Musil, * Copyright (c) IEM KUG Graz Austria 2000 - 2008 */ /* iem_dp means double precision, it is a library of external pd objects */ /* which deal with array access and delay lines */ /* the way how objects comunicate with other objects in double precision is, */ /* to send two values on two different outputs to two different inputs */ /* one value is the float casted value of the original double value */ /* the other value is the difference in double of the original minus the float casted value */ /* the receiving inlets only cast them to double and add them */ #include "m_pd.h" #include "iemlib.h" //static int delread_zero = 0; /* four bytes of zero for delread~, vd~ */ t_float iem_dp_cast_to_float(double d) { return((t_float)d); } double iem_dp_cast_to_double(t_float f) { return((double)f); } t_float iem_dp_calc_residual(double d, t_float f) { return(iem_dp_cast_to_float(d - iem_dp_cast_to_double(f))); } double iem_dp_calc_sum(t_float f, t_float r) { return(iem_dp_cast_to_double(f) + iem_dp_cast_to_double(r)); } static t_class *iem_dp_class; static void *iem_dp_new(void) { t_object *x = (t_object *)pd_new(iem_dp_class); return (x); } void ftohex_setup(void); void symtodp_setup(void); void dptosym_setup(void); void dptohex_setup(void); void vline_tilde_tilde_setup(void); void samphold_tilde_tilde_setup(void); void wrap_tilde_tilde_setup(void); void phasor_tilde_tilde_setup(void); void print_tilde_tilde_setup(void); void add___setup(void); void sub___setup(void); void mul___setup(void); void div___setup(void); void add_tilde_tilde_setup(void); void sub_tilde_tilde_setup(void); void mul_tilde_tilde_setup(void); void div_tilde_tilde_setup(void); void tabwrite_dp_setup(void); void tabread_dp_setup(void); void tabread4_dp_setup(void); void tabwrite_tilde_tilde_setup(void); void tabread_tilde_tilde_setup(void); void tabread4_tilde_tilde_setup(void); void max_dp_setup(void); void min_dp_setup(void); void max_tilde_tilde_setup(void); void min_tilde_tilde_setup(void); void random_dp_setup(void); void delay_tilde_tilde_setup(void); //void listtodp_setup(void); //void dqnsymtodp_setup(void); //void dptodqnsym_setup(void); /* ------------------------ setup routine ------------------------- */ void iem_dp_setup(void) { iem_dp_class = class_new(gensym("iem_dp"), iem_dp_new, 0, sizeof(t_object), CLASS_NOINLET, 0); ftohex_setup(); symtodp_setup(); dptosym_setup(); dptohex_setup(); vline_tilde_tilde_setup(); samphold_tilde_tilde_setup(); wrap_tilde_tilde_setup(); phasor_tilde_tilde_setup(); print_tilde_tilde_setup(); add___setup(); sub___setup(); mul___setup(); div___setup(); add_tilde_tilde_setup(); sub_tilde_tilde_setup(); mul_tilde_tilde_setup(); div_tilde_tilde_setup(); tabwrite_dp_setup(); tabread_dp_setup(); tabread4_dp_setup(); tabwrite_tilde_tilde_setup(); tabread_tilde_tilde_setup(); tabread4_tilde_tilde_setup(); max_dp_setup(); min_dp_setup(); max_tilde_tilde_setup(); min_tilde_tilde_setup(); random_dp_setup(); delay_tilde_tilde_setup(); // listtodp_setup(); // dqnsymtodp_setup(); // dptodqnsym_setup(); post("iem_dp (R-1.19) library loaded! (c) IOhannes m zmoelnig, Thomas Musil 06.2013"); post(" zmoelnig%ciem.at iem KUG Graz Austria", '@'); post(" musil%ciem.at iem KUG Graz Austria", '@'); } iem_utils-v0.0.20181004/iem_dp/src/dptohex.c0000644000175000017500000000345013303611047020524 0ustar zmoelnigzmoelnig/* For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. iem_dp written by IOhannes m zmoelnig, Thomas Musil, Copyright (c) IEM KUG Graz Austria 1999 - 2013 */ /* double precision library */ #include "m_pd.h" #include "iemlib.h" #include "iem_dp.h" #include #include #include /* -------------------------- dptohex ------------------------------ */ /* double float to 16 digits of hexadecimal converter */ /* double float is only internal used */ /* to transfer this value, we divide this double value into use one float casted value */ /* and into the difference to the accurate double value. */ /* double float (sign_1 + exp_12 + mant_51) */ static t_class *dptohex_class; typedef struct _dptohex { t_object x_obj; t_float x_float_casted_value; t_float x_residual; } t_dptohex; static void dptohex_bang(t_dptohex *x) { char buf[100]; union tabfudge_d tf; tf.tf_d = iem_dp_calc_sum(x->x_float_casted_value, x->x_residual); sprintf(buf, "#%08X%08X", tf.tf_i[HIOFFSET], tf.tf_i[LOWOFFSET]); outlet_symbol(x->x_obj.ob_outlet, gensym(buf)); } static void dptohex_float(t_dptohex *x, t_floatarg f) { x->x_float_casted_value = f; dptohex_bang(x); } static void *dptohex_new(void) { t_dptohex *x = (t_dptohex *)pd_new(dptohex_class); floatinlet_new(&x->x_obj, &x->x_residual); x->x_float_casted_value = 0.0f; x->x_residual = 0.0f; outlet_new(&x->x_obj, &s_symbol); return (x); } static void dptohex_free(t_dptohex *x) { } void dptohex_setup(void) { dptohex_class = class_new(gensym("dptohex"), (t_newmethod)dptohex_new, (t_method)dptohex_free, sizeof(t_dptohex), 0, 0); class_addbang(dptohex_class, dptohex_bang); class_addfloat(dptohex_class, dptohex_float); } iem_utils-v0.0.20181004/iem_dp/src/ftohex.c0000644000175000017500000000221713303611047020346 0ustar zmoelnigzmoelnig/* For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. iem_dp written by IOhannes m zmoelnig, Thomas Musil, Copyright (c) IEM KUG Graz Austria 1999 - 2007 */ /* double precision library */ #include "m_pd.h" #include "iemlib.h" #include "iem_dp.h" #include #include #include /* -------------------------- ftohex ------------------------------ */ /* float to 8 digits of hexadecimal converter */ /* float (sign_1 + exp_8 + mant_23) */ static t_class *ftohex_class; typedef struct _ftohex { t_object x_obj; } t_ftohex; static void ftohex_float(t_ftohex *x, t_floatarg f) { char buf[100]; union tabfudge_f tf; tf.tf_f = f; sprintf(buf, "#%08X", (unsigned int)tf.tf_l); outlet_symbol(x->x_obj.ob_outlet, gensym(buf)); } static void *ftohex_new(void) { t_ftohex *x = (t_ftohex *)pd_new(ftohex_class); outlet_new(&x->x_obj, &s_symbol); return (x); } void ftohex_setup(void) { ftohex_class = class_new(gensym("ftohex"), (t_newmethod)ftohex_new, 0, sizeof(t_ftohex), 0, 0); class_addfloat(ftohex_class, ftohex_float); } iem_utils-v0.0.20181004/iem_dp/src/dptosym.c0000644000175000017500000000370313303611047020551 0ustar zmoelnigzmoelnig/* For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. iem_dp written by IOhannes m zmoelnig, Thomas Musil, Copyright (c) IEM KUG Graz Austria 1999 - 2007 */ /* double precision library */ #include "m_pd.h" #include "iemlib.h" #include "iem_dp.h" #include #include #include /* -------------------------- dptosym ------------------------------ */ /* double float to symbol-string of a double value converter */ /* double float is only internal used */ /* to transfer this value, we divide this double value into use one float casted value */ /* and into the difference to the accurate double value. */ /* double float (sign_1 + exp_12 + mant_51) */ static t_class *dptosym_class; typedef struct _dptosym { t_object x_obj; t_float x_float_casted_value; t_float x_residual; t_outlet *x_out_sym; t_outlet *x_out_any; } t_dptosym; static void dptosym_bang(t_dptosym *x) { char buf[100]; double d=iem_dp_calc_sum(x->x_float_casted_value, x->x_residual); t_atom at_dummy; sprintf(buf, "\"%.18g", d); outlet_anything(x->x_out_any, gensym(buf), 0, &at_dummy); outlet_symbol(x->x_out_sym, gensym(buf+1)); } static void dptosym_float(t_dptosym *x, t_floatarg f) { x->x_float_casted_value = f; // post("dptosym float float: %.12g + %.12g", x->x_float_casted_value, x->x_residual); dptosym_bang(x); } static void *dptosym_new(void) { t_dptosym *x = (t_dptosym *)pd_new(dptosym_class); floatinlet_new(&x->x_obj, &x->x_residual); x->x_float_casted_value = 0.0f; x->x_residual = 0.0f; x->x_out_sym = outlet_new(&x->x_obj, &s_symbol); x->x_out_any = outlet_new(&x->x_obj, &s_list); return (x); } void dptosym_setup(void) { dptosym_class = class_new(gensym("dptosym"), (t_newmethod)dptosym_new, 0, sizeof(t_dptosym), 0, 0); class_addbang(dptosym_class, dptosym_bang); class_addfloat(dptosym_class, dptosym_float); } iem_utils-v0.0.20181004/iem_dp/src/tabwrite_dp.c0000644000175000017500000000430213303611047021352 0ustar zmoelnigzmoelnig/* For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. iem_dp written by IOhannes m zmoelnig, Thomas Musil, Copyright (c) IEM KUG Graz Austria 1999 - 2007 */ /* double precision library */ #include "m_pd.h" #include "iemlib.h" #include "iem_dp.h" /* -------------------------- tabwrite__ ------------------------------ */ /* based on miller's tabwrite which is part of pd */ static t_class *tabwrite_dp_class; typedef struct _tabwrite_dp { t_object x_obj; t_symbol *x_arrayname; t_float x_float_casted_index; t_float x_residual_index; } t_tabwrite_dp; static void *tabwrite_dp_new(t_symbol *s) { t_tabwrite_dp *x = (t_tabwrite_dp *)pd_new(tabwrite_dp_class); x->x_arrayname = s; x->x_float_casted_index = 0.0f; x->x_residual_index = 0.0f; floatinlet_new(&x->x_obj, &x->x_float_casted_index); floatinlet_new(&x->x_obj, &x->x_residual_index); return (x); } static void tabwrite_dp_float(t_tabwrite_dp *x, t_floatarg fvalue) { t_garray *a; iemarray_t *vec; int npoints; if (!(a = (t_garray *)pd_findbyclass(x->x_arrayname, garray_class))) { if (*x->x_arrayname->s_name) pd_error(x, "tabwrite__: %s: no such array", x->x_arrayname->s_name); vec = 0; } else if (!iemarray_getarray(a, &npoints, &vec)) { pd_error(x, "%s: bad template for tabwrite__", x->x_arrayname->s_name); vec = 0; } else { double findex = iem_dp_calc_sum(x->x_float_casted_index, x->x_residual_index); int n = findex; if(n < 0) n = 0; else if(n >= npoints) n = npoints - 1; if(npoints) { iemarray_setfloat(vec, n, fvalue); garray_redraw(a); } } } static void tabwrite_dp_set(t_tabwrite_dp *x, t_symbol *s) { x->x_arrayname = s; } void tabwrite_dp_setup(void) { tabwrite_dp_class = class_new(gensym("tabwrite__"), (t_newmethod)tabwrite_dp_new, 0, sizeof(t_tabwrite_dp), 0, A_DEFSYM, 0); class_addcreator((t_newmethod)tabwrite_dp_new, gensym("tabwrite''"), A_DEFSYM, 0); class_addfloat(tabwrite_dp_class, (t_method)tabwrite_dp_float); class_addmethod(tabwrite_dp_class, (t_method)tabwrite_dp_set, gensym("set"), A_SYMBOL, 0); } iem_utils-v0.0.20181004/iem_dp/src/add__.c0000644000175000017500000000421113303611047020073 0ustar zmoelnigzmoelnig/* For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. iem_dp written by IOhannes m zmoelnig, Thomas Musil, Copyright (c) IEM KUG Graz Austria 1999 - 2007 */ /* double precision library */ #include "m_pd.h" #include "iemlib.h" #include "iem_dp.h" /* ------------------------ add__ or +__ ---------------------------- */ /* based on miller's +, which is part of pd, only with double precision */ static t_class *add___class; typedef struct _add__ { t_object x_obj; t_float x_coarse_left; t_float x_fine_left; t_float x_coarse_right; t_float x_fine_right; t_outlet *x_out_coarse; t_outlet *x_out_fine; } t_add__; static void add___bang(t_add__ *x) { double dsum; t_float fsum; dsum = iem_dp_calc_sum(x->x_coarse_left, x->x_fine_left) + iem_dp_calc_sum(x->x_coarse_right, x->x_fine_right); fsum = iem_dp_cast_to_float(dsum); outlet_float(x->x_out_fine, iem_dp_calc_residual(dsum, fsum)); outlet_float(x->x_out_coarse, fsum); } static void add___float(t_add__ *x, t_floatarg f) { x->x_coarse_left = f; add___bang(x); } static void *add___new(t_symbol *s, int ac, t_atom *av) { t_add__ *x = (t_add__ *)pd_new(add___class); floatinlet_new(&x->x_obj, &x->x_fine_left); floatinlet_new(&x->x_obj, &x->x_coarse_right); floatinlet_new(&x->x_obj, &x->x_fine_right); x->x_coarse_left = 0.0f; x->x_fine_left = 0.0f; if((ac > 0) && (IS_A_FLOAT(av, 0))) x->x_coarse_right = atom_getfloatarg(0, ac, av); else x->x_coarse_right = 0.0f; if((ac > 1) && (IS_A_FLOAT(av, 1))) x->x_fine_right = atom_getfloatarg(1, ac, av); else x->x_fine_right = 0.0f; x->x_out_coarse = outlet_new(&x->x_obj, &s_float); x->x_out_fine = outlet_new(&x->x_obj, &s_float); return (x); } void add___setup(void) { add___class = class_new(gensym("add__"), (t_newmethod)add___new, 0, sizeof(t_add__), 0, A_GIMME, 0); class_addcreator((t_newmethod)add___new, gensym("+__"), A_GIMME, 0); class_addcreator((t_newmethod)add___new, gensym("+''"), A_GIMME, 0); class_addbang(add___class, add___bang); class_addfloat(add___class, add___float); } iem_utils-v0.0.20181004/iem_dp/src/tabread4~~.c0000644000175000017500000000711513303611047021135 0ustar zmoelnigzmoelnig/* For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. iem_dp written by IOhannes m zmoelnig, Thomas Musil, Copyright (c) IEM KUG Graz Austria 1999 - 2007 */ /* double precision library */ #include "m_pd.h" #include "iemlib.h" #include "iem_dp.h" /* -------------------------- tabread4~~ ------------------------------ */ /* based on miller's tabread4~ which is part of pd */ static t_class *tabread4_tilde_tilde_class; typedef struct _tabread4_tilde_tilde { t_object x_obj; int x_npoints; iemarray_t *x_vec; t_symbol *x_arrayname; t_float x_f; } t_tabread4_tilde_tilde; static void *tabread4_tilde_tilde_new(t_symbol *s) { t_tabread4_tilde_tilde *x = (t_tabread4_tilde_tilde *)pd_new(tabread4_tilde_tilde_class); x->x_arrayname = s; x->x_vec = 0; x->x_npoints=0; inlet_new(&x->x_obj, &x->x_obj.ob_pd, &s_signal, &s_signal); outlet_new(&x->x_obj, &s_signal); x->x_f = 0; return (x); } static t_int *tabread4_tilde_tilde_perform(t_int *w) { t_tabread4_tilde_tilde *x = (t_tabread4_tilde_tilde *)(w[1]); t_sample *in0 = (t_sample *)(w[2]); t_sample *in1 = (t_sample *)(w[3]); t_sample *out = (t_sample *)(w[4]); int n = (int)(w[5]); int maxindex; iemarray_t *buf = x->x_vec, *wp; int i; maxindex = x->x_npoints - 3; if (!buf){ while (n--) *out++ = 0; return (w+6); } // post("xxx"); for (i = 0; i < n; i++) { t_sample in0_s=*in0++; t_sample in1_s=*in1++; double findex = iem_dp_calc_sum(in0_s, in1_s); long int index = findex; double frac; t_sample a, b, c, d, cminusb; if (index < 1) index = 1, frac = 0; else if (index > maxindex) index = maxindex, frac = 1; else frac = findex - index; // post("%f + %f = %f", in0_s, in1_s, findex); // post("%f - %f = %d", findex, frac, index); wp = buf + index; a = iemarray_getfloat(wp,-1); b = iemarray_getfloat(wp, 0); c = iemarray_getfloat(wp, 1); d = iemarray_getfloat(wp, 2); cminusb = c-b; *out++ = b + frac * (cminusb - 0.1666667f * (1.-frac) * ((d - a - 3.0f * cminusb) * frac + (d + 2.0f*a - 3.0f*b))); } return (w+6); } static void tabread4_tilde_tilde_set(t_tabread4_tilde_tilde *x, t_symbol *s) { t_garray *a; x->x_arrayname = s; if (!(a = (t_garray *)pd_findbyclass(x->x_arrayname, garray_class))) { if (*s->s_name) pd_error(x, "tabread4~~: %s: no such array", x->x_arrayname->s_name); iemarray_setfloat(x->x_vec, 0, 0.0f); } else if (!iemarray_getarray(a, &x->x_npoints, &x->x_vec)) { pd_error(x, "%s: bad template for tabread4~~", x->x_arrayname->s_name); iemarray_setfloat(x->x_vec, 0, 0.0f); } else garray_usedindsp(a); } static void tabread4_tilde_tilde_dsp(t_tabread4_tilde_tilde *x, t_signal **sp) { tabread4_tilde_tilde_set(x, x->x_arrayname); dsp_add(tabread4_tilde_tilde_perform, 5, x, sp[0]->s_vec, sp[1]->s_vec, sp[2]->s_vec, sp[0]->s_n); } static void tabread4_tilde_tilde_free(t_tabread4_tilde_tilde *x) { } void tabread4_tilde_tilde_setup(void) { tabread4_tilde_tilde_class = class_new(gensym("tabread4~~"), (t_newmethod)tabread4_tilde_tilde_new, (t_method)tabread4_tilde_tilde_free, sizeof(t_tabread4_tilde_tilde), 0, A_DEFSYM, 0); CLASS_MAINSIGNALIN(tabread4_tilde_tilde_class, t_tabread4_tilde_tilde, x_f); class_addmethod(tabread4_tilde_tilde_class, (t_method)tabread4_tilde_tilde_dsp, gensym("dsp"), A_CANT, 0); class_addmethod(tabread4_tilde_tilde_class, (t_method)tabread4_tilde_tilde_set, gensym("set"), A_SYMBOL, 0); } iem_utils-v0.0.20181004/iem_dp/src/add~~.c0000644000175000017500000002010713303611047020173 0ustar zmoelnigzmoelnig/* For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. iem_dp written by IOhannes m zmoelnig, Thomas Musil, Copyright (c) IEM KUG Graz Austria 1999 - 2007 */ /* double precision library */ #include "m_pd.h" #include "iemlib.h" #include "iem_dp.h" /* -------------------------- add~~ ------------------------------ */ /* based on miller's +~ which is part of pd */ static t_class *add_tilde_tilde_class, *scalaradd_tilde_tilde_class; typedef struct _add_tilde_tilde { t_object x_obj; t_float x_f; t_sample *x_in1_coarse; t_sample *x_in1_fine; t_sample *x_in2_coarse; t_sample *x_in2_fine; t_sample *x_out_coarse; t_sample *x_out_fine; } t_add_tilde_tilde; typedef struct _scalaradd_tilde_tilde { t_object x_obj; t_float x_f; t_sample *x_in1_coarse; t_sample *x_in1_fine; t_sample *x_out_coarse; t_sample *x_out_fine; t_sample x_in2_coarse; t_sample x_in2_fine; } t_scalaradd_tilde_tilde; static void *add_tilde_tilde_new(t_symbol *s, int argc, t_atom *argv) { if(((argc==1)&&(argv->a_type == A_FLOAT))||(argc>=2)&&(argv->a_type == A_FLOAT)&&((argv+1)->a_type == A_FLOAT)) { t_scalaradd_tilde_tilde *x = (t_scalaradd_tilde_tilde *)pd_new(scalaradd_tilde_tilde_class); inlet_new(&x->x_obj, &x->x_obj.ob_pd, &s_signal, &s_signal); floatinlet_new(&x->x_obj, &x->x_in2_coarse); floatinlet_new(&x->x_obj, &x->x_in2_fine); x->x_in2_coarse = atom_getfloatarg(0, argc, argv); if(argc>=2) x->x_in2_fine = atom_getfloatarg(1, argc, argv); else x->x_in2_fine = 0; outlet_new(&x->x_obj, &s_signal); outlet_new(&x->x_obj, &s_signal); x->x_f = 0; return (x); } else /* either no arguments or symbols */ { t_add_tilde_tilde *x = (t_add_tilde_tilde *)pd_new(add_tilde_tilde_class); inlet_new(&x->x_obj, &x->x_obj.ob_pd, &s_signal, &s_signal); inlet_new(&x->x_obj, &x->x_obj.ob_pd, &s_signal, &s_signal); inlet_new(&x->x_obj, &x->x_obj.ob_pd, &s_signal, &s_signal); outlet_new(&x->x_obj, &s_signal); outlet_new(&x->x_obj, &s_signal); x->x_f = 0; return (x); } } static t_int *add_tilde_tilde_perform(t_int *w) { t_add_tilde_tilde *x = (t_add_tilde_tilde *)(w[1]); int n = (int)(w[2]); t_sample *in1c = x->x_in1_coarse; t_sample *in1f = x->x_in1_fine; t_sample *in2c = x->x_in2_coarse; t_sample *in2f = x->x_in2_fine; t_sample *outc = x->x_out_coarse; t_sample *outf = x->x_out_fine; double d; t_float f; while(n--) { d = iem_dp_calc_sum(*in1c++, *in1f++) + iem_dp_calc_sum(*in2c++, *in2f++); f = iem_dp_cast_to_float(d); *outf++ = iem_dp_calc_residual(d, f); *outc++ = f; } return(w+3); } static t_int *add_tilde_tilde_perf8(t_int *w) { t_add_tilde_tilde *x = (t_add_tilde_tilde *)(w[1]); int n = (int)(w[2]); t_sample *in1c = x->x_in1_coarse; t_sample *in1f = x->x_in1_fine; t_sample *in2c = x->x_in2_coarse; t_sample *in2f = x->x_in2_fine; t_sample *outc = x->x_out_coarse; t_sample *outf = x->x_out_fine; for(; n; n -= 8, in1c += 8, in1f += 8, in2c += 8, in2f += 8, outc += 8, outf += 8) { double d; t_float f; d = iem_dp_calc_sum(in1c[0], in1f[0]) + iem_dp_calc_sum(in2c[0], in2f[0]); f = iem_dp_cast_to_float(d); outf[0] = iem_dp_calc_residual(d, f); outc[0] = f; d = iem_dp_calc_sum(in1c[1], in1f[1]) + iem_dp_calc_sum(in2c[1], in2f[1]); f = iem_dp_cast_to_float(d); outf[1] = iem_dp_calc_residual(d, f); outc[1] = f; d = iem_dp_calc_sum(in1c[2], in1f[2]) + iem_dp_calc_sum(in2c[2], in2f[2]); f = iem_dp_cast_to_float(d); outf[2] = iem_dp_calc_residual(d, f); outc[2] = f; d = iem_dp_calc_sum(in1c[3], in1f[3]) + iem_dp_calc_sum(in2c[3], in2f[3]); f = iem_dp_cast_to_float(d); outf[3] = iem_dp_calc_residual(d, f); outc[3] = f; d = iem_dp_calc_sum(in1c[4], in1f[4]) + iem_dp_calc_sum(in2c[4], in2f[4]); f = iem_dp_cast_to_float(d); outf[4] = iem_dp_calc_residual(d, f); outc[4] = f; d = iem_dp_calc_sum(in1c[5], in1f[5]) + iem_dp_calc_sum(in2c[5], in2f[5]); f = iem_dp_cast_to_float(d); outf[5] = iem_dp_calc_residual(d, f); outc[5] = f; d = iem_dp_calc_sum(in1c[6], in1f[6]) + iem_dp_calc_sum(in2c[6], in2f[6]); f = iem_dp_cast_to_float(d); outf[6] = iem_dp_calc_residual(d, f); outc[6] = f; d = iem_dp_calc_sum(in1c[7], in1f[7]) + iem_dp_calc_sum(in2c[7], in2f[7]); f = iem_dp_cast_to_float(d); outf[7] = iem_dp_calc_residual(d, f); outc[7] = f; } return(w+3); } static t_int *scalaradd_tilde_tilde_perform(t_int *w) { t_scalaradd_tilde_tilde *x = (t_scalaradd_tilde_tilde *)(w[1]); int n = (int)(w[2]); t_sample *inc = x->x_in1_coarse; t_sample *inf = x->x_in1_fine; t_sample *outc = x->x_out_coarse; t_sample *outf = x->x_out_fine; double d, g=iem_dp_calc_sum(x->x_in2_coarse, x->x_in2_fine); t_float f; while(n--) { d = iem_dp_calc_sum(*inc++, *inf++) + g; f = iem_dp_cast_to_float(d); *outf++ = iem_dp_calc_residual(d, f); *outc++ = f; } return(w+3); } static t_int *scalaradd_tilde_tilde_perf8(t_int *w) { t_scalaradd_tilde_tilde *x = (t_scalaradd_tilde_tilde *)(w[1]); int n = (int)(w[2]); t_sample *inc = x->x_in1_coarse; t_sample *inf = x->x_in1_fine; t_sample *outc = x->x_out_coarse; t_sample *outf = x->x_out_fine; double g=iem_dp_calc_sum(x->x_in2_coarse, x->x_in2_fine); for(; n; n -= 8, inc += 8, inf += 8, outc += 8, outf += 8) { double d; t_float f; d = iem_dp_calc_sum(inc[0], inf[0]) + g; f = iem_dp_cast_to_float(d); outf[0] = iem_dp_calc_residual(d, f); outc[0] = f; d = iem_dp_calc_sum(inc[1], inf[1]) + g; f = iem_dp_cast_to_float(d); outf[1] = iem_dp_calc_residual(d, f); outc[1] = f; d = iem_dp_calc_sum(inc[2], inf[2]) + g; f = iem_dp_cast_to_float(d); outf[2] = iem_dp_calc_residual(d, f); outc[2] = f; d = iem_dp_calc_sum(inc[3], inf[3]) + g; f = iem_dp_cast_to_float(d); outf[3] = iem_dp_calc_residual(d, f); outc[3] = f; d = iem_dp_calc_sum(inc[4], inf[4]) + g; f = iem_dp_cast_to_float(d); outf[4] = iem_dp_calc_residual(d, f); outc[4] = f; d = iem_dp_calc_sum(inc[5], inf[5]) + g; f = iem_dp_cast_to_float(d); outf[5] = iem_dp_calc_residual(d, f); outc[5] = f; d = iem_dp_calc_sum(inc[6], inf[6]) + g; f = iem_dp_cast_to_float(d); outf[6] = iem_dp_calc_residual(d, f); outc[6] = f; d = iem_dp_calc_sum(inc[7], inf[7]) + g; f = iem_dp_cast_to_float(d); outf[7] = iem_dp_calc_residual(d, f); outc[7] = f; } return(w+3); } static void add_tilde_tilde_dsp(t_add_tilde_tilde *x, t_signal **sp) { x->x_in1_coarse = sp[0]->s_vec; x->x_in1_fine = sp[1]->s_vec; x->x_in2_coarse = sp[2]->s_vec; x->x_in2_fine = sp[3]->s_vec; x->x_out_coarse = sp[4]->s_vec; x->x_out_fine = sp[5]->s_vec; if(sp[0]->s_n&7) dsp_add(add_tilde_tilde_perform, 2, x, sp[0]->s_n); else dsp_add(add_tilde_tilde_perf8, 2, x, sp[0]->s_n); } static void scalaradd_tilde_tilde_dsp(t_scalaradd_tilde_tilde *x, t_signal **sp) { x->x_in1_coarse = sp[0]->s_vec; x->x_in1_fine = sp[1]->s_vec; x->x_out_coarse = sp[2]->s_vec; x->x_out_fine = sp[3]->s_vec; if(sp[0]->s_n&7) dsp_add(scalaradd_tilde_tilde_perform, 2, x, sp[0]->s_n); else dsp_add(scalaradd_tilde_tilde_perf8, 2, x, sp[0]->s_n); } void add_tilde_tilde_setup(void) { add_tilde_tilde_class = class_new(gensym("+~~"), (t_newmethod)add_tilde_tilde_new, 0, sizeof(t_add_tilde_tilde), 0, A_GIMME, 0); class_addcreator((t_newmethod)add_tilde_tilde_new, gensym("add~~"), A_GIMME, 0); CLASS_MAINSIGNALIN(add_tilde_tilde_class, t_add_tilde_tilde, x_f); class_addmethod(add_tilde_tilde_class, (t_method)add_tilde_tilde_dsp, gensym("dsp"), A_CANT, 0); scalaradd_tilde_tilde_class = class_new(gensym("+~~"), 0, 0, sizeof(t_scalaradd_tilde_tilde), 0, 0); CLASS_MAINSIGNALIN(scalaradd_tilde_tilde_class, t_scalaradd_tilde_tilde, x_f); class_addmethod(scalaradd_tilde_tilde_class, (t_method)scalaradd_tilde_tilde_dsp, gensym("dsp"), A_CANT, 0); } iem_utils-v0.0.20181004/iem_dp/src/tabread4_dp.c0000644000175000017500000000501113303611047021215 0ustar zmoelnigzmoelnig/* For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. iem_dp written by IOhannes m zmoelnig, Thomas Musil, Copyright (c) IEM KUG Graz Austria 1999 - 2007 */ /* double precision library */ #include "m_pd.h" #include "iemlib.h" #include "iem_dp.h" /* -------------------------- tabread4__ ------------------------------ */ /* based on miller's tabread4 which is part of pd */ static t_class *tabread4_dp_class; typedef struct _tabread4_dp { t_object x_obj; t_symbol *x_arrayname; t_float x_residual; } t_tabread4_dp; static void *tabread4_dp_new(t_symbol *s) { t_tabread4_dp *x = (t_tabread4_dp *)pd_new(tabread4_dp_class); x->x_arrayname = s; floatinlet_new(&x->x_obj, &x->x_residual); outlet_new(&x->x_obj, &s_float); return (x); } static void tabread4_dp_float(t_tabread4_dp *x, t_floatarg f) { t_garray *ga; iemarray_t *vec; int npoints; if(!(ga = (t_garray *)pd_findbyclass(x->x_arrayname, garray_class))) { if(*x->x_arrayname->s_name) pd_error(x, "tabread4__: %s: no such array", x->x_arrayname->s_name); iemarray_setfloat(vec, 0, 0.0f); } else if (!iemarray_getarray(ga, &npoints, &vec)) { pd_error(x, "%s: bad template for tabread4__", x->x_arrayname->s_name); iemarray_setfloat(vec, 0, 0.0f); } else { double findex = iem_dp_calc_sum(f, x->x_residual); double frac; int index = findex; int maxindex = npoints - 3; t_sample a, b, c, d, cmb; if(index < 1) index = 1, frac = 0; else if (index > maxindex) index = maxindex, frac = 1; else frac = findex - index; vec += index; a = iemarray_getfloat(vec,-1); b = iemarray_getfloat(vec, 0); c = iemarray_getfloat(vec, 1); d = iemarray_getfloat(vec, 2); cmb = c-b; outlet_float(x->x_obj.ob_outlet, (npoints ? b+frac*(cmb-0.1666667f*(1.-frac)*((d-a-3.0f*cmb)*frac+(d+2.0f*a-3.0f*b))) : 0)); } } static void tabread4_dp_set(t_tabread4_dp *x, t_symbol *s) { x->x_arrayname = s; } static void tabread4_dp_free(t_tabread4_dp *x) { } void tabread4_dp_setup(void) { tabread4_dp_class = class_new(gensym("tabread4__"), (t_newmethod)tabread4_dp_new, (t_method)tabread4_dp_free, sizeof(t_tabread4_dp), 0, A_DEFSYM, 0); class_addcreator((t_newmethod)tabread4_dp_new, gensym("tabread4''"), A_DEFSYM, 0); class_addfloat(tabread4_dp_class, (t_method)tabread4_dp_float); class_addmethod(tabread4_dp_class, (t_method)tabread4_dp_set, gensym("set"), A_SYMBOL, 0); } iem_utils-v0.0.20181004/iem_dp/src/mul~~.c0000644000175000017500000002011113303611047020233 0ustar zmoelnigzmoelnig/* For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. iem_dp written by IOhannes m zmoelnig, Thomas Musil, Copyright (c) IEM KUG Graz Austria 1999 - 2007 */ /* double precision library */ #include "m_pd.h" #include "iemlib.h" #include "iem_dp.h" /* -------------------------- mul~~ ------------------------------ */ /* based on miller's *~ which is part of pd */ static t_class *mul_tilde_tilde_class, *scalarmul_tilde_tilde_class; typedef struct _mul_tilde_tilde { t_object x_obj; t_float x_f; t_sample *x_in1_coarse; t_sample *x_in1_fine; t_sample *x_in2_coarse; t_sample *x_in2_fine; t_sample *x_out_coarse; t_sample *x_out_fine; } t_mul_tilde_tilde; typedef struct _scalarmul_tilde_tilde { t_object x_obj; t_float x_f; t_sample *x_in1_coarse; t_sample *x_in1_fine; t_sample *x_out_coarse; t_sample *x_out_fine; t_sample x_in2_coarse; t_sample x_in2_fine; } t_scalarmul_tilde_tilde; static void *mul_tilde_tilde_new(t_symbol *s, int argc, t_atom *argv) { if(((argc==1)&&(argv->a_type == A_FLOAT))||(argc>=2)&&(argv->a_type == A_FLOAT)&&((argv+1)->a_type == A_FLOAT)) { t_scalarmul_tilde_tilde *x = (t_scalarmul_tilde_tilde *)pd_new(scalarmul_tilde_tilde_class); inlet_new(&x->x_obj, &x->x_obj.ob_pd, &s_signal, &s_signal); floatinlet_new(&x->x_obj, &x->x_in2_coarse); floatinlet_new(&x->x_obj, &x->x_in2_fine); x->x_in2_coarse = atom_getfloatarg(0, argc, argv); if(argc>=2) x->x_in2_fine = atom_getfloatarg(1, argc, argv); else x->x_in2_fine = 0; outlet_new(&x->x_obj, &s_signal); outlet_new(&x->x_obj, &s_signal); x->x_f = 0; return (x); } else /* either no arguments or symbols */ { t_mul_tilde_tilde *x = (t_mul_tilde_tilde *)pd_new(mul_tilde_tilde_class); inlet_new(&x->x_obj, &x->x_obj.ob_pd, &s_signal, &s_signal); inlet_new(&x->x_obj, &x->x_obj.ob_pd, &s_signal, &s_signal); inlet_new(&x->x_obj, &x->x_obj.ob_pd, &s_signal, &s_signal); outlet_new(&x->x_obj, &s_signal); outlet_new(&x->x_obj, &s_signal); x->x_f = 0; return (x); } } static t_int *mul_tilde_tilde_perform(t_int *w) { t_mul_tilde_tilde *x = (t_mul_tilde_tilde *)(w[1]); int n = (int)(w[2]); t_sample *in1c = x->x_in1_coarse; t_sample *in1f = x->x_in1_fine; t_sample *in2c = x->x_in2_coarse; t_sample *in2f = x->x_in2_fine; t_sample *outc = x->x_out_coarse; t_sample *outf = x->x_out_fine; double d; t_float f; while(n--) { d = iem_dp_calc_sum(*in1c++, *in1f++) * iem_dp_calc_sum(*in2c++, *in2f++); f = iem_dp_cast_to_float(d); *outf++ = iem_dp_calc_residual(d, f); *outc++ = f; } return(w+3); } static t_int *mul_tilde_tilde_perf8(t_int *w) { t_mul_tilde_tilde *x = (t_mul_tilde_tilde *)(w[1]); int n = (int)(w[2]); t_sample *in1c = x->x_in1_coarse; t_sample *in1f = x->x_in1_fine; t_sample *in2c = x->x_in2_coarse; t_sample *in2f = x->x_in2_fine; t_sample *outc = x->x_out_coarse; t_sample *outf = x->x_out_fine; for(; n; n -= 8, in1c += 8, in1f += 8, in2c += 8, in2f += 8, outc += 8, outf += 8) { double d; t_float f; d = iem_dp_calc_sum(in1c[0], in1f[0]) * iem_dp_calc_sum(in2c[0], in2f[0]); f = iem_dp_cast_to_float(d); outf[0] = iem_dp_calc_residual(d, f); outc[0] = f; d = iem_dp_calc_sum(in1c[1], in1f[1]) * iem_dp_calc_sum(in2c[1], in2f[1]); f = iem_dp_cast_to_float(d); outf[1] = iem_dp_calc_residual(d, f); outc[1] = f; d = iem_dp_calc_sum(in1c[2], in1f[2]) * iem_dp_calc_sum(in2c[2], in2f[2]); f = iem_dp_cast_to_float(d); outf[2] = iem_dp_calc_residual(d, f); outc[2] = f; d = iem_dp_calc_sum(in1c[3], in1f[3]) * iem_dp_calc_sum(in2c[3], in2f[3]); f = iem_dp_cast_to_float(d); outf[3] = iem_dp_calc_residual(d, f); outc[3] = f; d = iem_dp_calc_sum(in1c[4], in1f[4]) * iem_dp_calc_sum(in2c[4], in2f[4]); f = iem_dp_cast_to_float(d); outf[4] = iem_dp_calc_residual(d, f); outc[4] = f; d = iem_dp_calc_sum(in1c[5], in1f[5]) * iem_dp_calc_sum(in2c[5], in2f[5]); f = iem_dp_cast_to_float(d); outf[5] = iem_dp_calc_residual(d, f); outc[5] = f; d = iem_dp_calc_sum(in1c[6], in1f[6]) * iem_dp_calc_sum(in2c[6], in2f[6]); f = iem_dp_cast_to_float(d); outf[6] = iem_dp_calc_residual(d, f); outc[6] = f; d = iem_dp_calc_sum(in1c[7], in1f[7]) * iem_dp_calc_sum(in2c[7], in2f[7]); f = iem_dp_cast_to_float(d); outf[7] = iem_dp_calc_residual(d, f); outc[7] = f; } return(w+3); } static t_int *scalarmul_tilde_tilde_perform(t_int *w) { t_scalarmul_tilde_tilde *x = (t_scalarmul_tilde_tilde *)(w[1]); int n = (int)(w[2]); t_sample *inc = x->x_in1_coarse; t_sample *inf = x->x_in1_fine; t_sample *outc = x->x_out_coarse; t_sample *outf = x->x_out_fine; double d, g=iem_dp_calc_sum(x->x_in2_coarse, x->x_in2_fine); t_float f; while(n--) { d = iem_dp_calc_sum(*inc++, *inf++) * g; f = iem_dp_cast_to_float(d); *outf++ = iem_dp_calc_residual(d, f); *outc++ = f; } return(w+3); } static t_int *scalarmul_tilde_tilde_perf8(t_int *w) { t_scalarmul_tilde_tilde *x = (t_scalarmul_tilde_tilde *)(w[1]); int n = (int)(w[2]); t_sample *inc = x->x_in1_coarse; t_sample *inf = x->x_in1_fine; t_sample *outc = x->x_out_coarse; t_sample *outf = x->x_out_fine; double g=iem_dp_calc_sum(x->x_in2_coarse, x->x_in2_fine); for(; n; n -= 8, inc += 8, inf += 8, outc += 8, outf += 8) { double d; t_float f; d = iem_dp_calc_sum(inc[0], inf[0]) * g; f = iem_dp_cast_to_float(d); outf[0] = iem_dp_calc_residual(d, f); outc[0] = f; d = iem_dp_calc_sum(inc[1], inf[1]) * g; f = iem_dp_cast_to_float(d); outf[1] = iem_dp_calc_residual(d, f); outc[1] = f; d = iem_dp_calc_sum(inc[2], inf[2]) * g; f = iem_dp_cast_to_float(d); outf[2] = iem_dp_calc_residual(d, f); outc[2] = f; d = iem_dp_calc_sum(inc[3], inf[3]) * g; f = iem_dp_cast_to_float(d); outf[3] = iem_dp_calc_residual(d, f); outc[3] = f; d = iem_dp_calc_sum(inc[4], inf[4]) * g; f = iem_dp_cast_to_float(d); outf[4] = iem_dp_calc_residual(d, f); outc[4] = f; d = iem_dp_calc_sum(inc[5], inf[5]) * g; f = iem_dp_cast_to_float(d); outf[5] = iem_dp_calc_residual(d, f); outc[5] = f; d = iem_dp_calc_sum(inc[6], inf[6]) * g; f = iem_dp_cast_to_float(d); outf[6] = iem_dp_calc_residual(d, f); outc[6] = f; d = iem_dp_calc_sum(inc[7], inf[7]) * g; f = iem_dp_cast_to_float(d); outf[7] = iem_dp_calc_residual(d, f); outc[7] = f; } return(w+3); } static void mul_tilde_tilde_dsp(t_mul_tilde_tilde *x, t_signal **sp) { x->x_in1_coarse = sp[0]->s_vec; x->x_in1_fine = sp[1]->s_vec; x->x_in2_coarse = sp[2]->s_vec; x->x_in2_fine = sp[3]->s_vec; x->x_out_coarse = sp[4]->s_vec; x->x_out_fine = sp[5]->s_vec; if(sp[0]->s_n&7) dsp_add(mul_tilde_tilde_perform, 2, x, sp[0]->s_n); else dsp_add(mul_tilde_tilde_perf8, 2, x, sp[0]->s_n); } static void scalarmul_tilde_tilde_dsp(t_scalarmul_tilde_tilde *x, t_signal **sp) { x->x_in1_coarse = sp[0]->s_vec; x->x_in1_fine = sp[1]->s_vec; x->x_out_coarse = sp[2]->s_vec; x->x_out_fine = sp[3]->s_vec; if(sp[0]->s_n&7) dsp_add(scalarmul_tilde_tilde_perform, 2, x, sp[0]->s_n); else dsp_add(scalarmul_tilde_tilde_perf8, 2, x, sp[0]->s_n); } void mul_tilde_tilde_setup(void) { mul_tilde_tilde_class = class_new(gensym("*~~"), (t_newmethod)mul_tilde_tilde_new, 0, sizeof(t_mul_tilde_tilde), 0, A_GIMME, 0); class_addcreator((t_newmethod)mul_tilde_tilde_new, gensym("mul~~"), A_GIMME, 0); CLASS_MAINSIGNALIN(mul_tilde_tilde_class, t_mul_tilde_tilde, x_f); class_addmethod(mul_tilde_tilde_class, (t_method)mul_tilde_tilde_dsp, gensym("dsp"), A_CANT, 0); scalarmul_tilde_tilde_class = class_new(gensym("*~~"), 0, 0, sizeof(t_scalarmul_tilde_tilde), 0, 0); CLASS_MAINSIGNALIN(scalarmul_tilde_tilde_class, t_scalarmul_tilde_tilde, x_f); class_addmethod(scalarmul_tilde_tilde_class, (t_method)scalarmul_tilde_tilde_dsp, gensym("dsp"), A_CANT, 0); } iem_utils-v0.0.20181004/iem_dp/src/phasor~~.c0000644000175000017500000000500313303611047020735 0ustar zmoelnigzmoelnig/* For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. iem_dp written by IOhannes m zmoelnig, Thomas Musil, Copyright (c) IEM KUG Graz Austria 1999 - 2007 */ /* double precision library */ #include "m_pd.h" #include "iemlib.h" #include "iem_dp.h" /* -------------------------- phasor~~ ------------------------------ */ /* based on miller's phasor~ which is part of pd */ static t_class *phasor_tilde_tilde_class, *scalarphasor_tilde_tilde_class; typedef struct _phasor_tilde_tilde { t_object x_obj; double x_phase; double x_rcp_sr; t_float x_freq; } t_phasor_tilde_tilde; static void *phasor_tilde_tilde_new(t_floatarg freq) { t_phasor_tilde_tilde *x = (t_phasor_tilde_tilde *)pd_new(phasor_tilde_tilde_class); inlet_new(&x->x_obj, &x->x_obj.ob_pd, &s_float, gensym("ft1")); x->x_phase = 0; x->x_rcp_sr = 0; outlet_new(&x->x_obj, &s_signal); outlet_new(&x->x_obj, &s_signal); x->x_freq = freq; return(x); } static t_int *phasor_tilde_tilde_perform(t_int *w) { t_phasor_tilde_tilde *x = (t_phasor_tilde_tilde *)(w[1]); t_sample *freq_in = (t_sample *)(w[2]); t_sample *outc = (t_sample *)(w[3]); t_sample *outf = (t_sample *)(w[4]); int n = (int)(w[5]); double dphase = x->x_phase; double rcp_sr = x->x_rcp_sr; double fin; t_float fphase; int k; while(n--) { fin = (double)*freq_in++; k = (int)dphase; if(dphase >= 0) dphase -= (double)k; else dphase -= (double)(k-1); fphase = iem_dp_cast_to_float(dphase); *outf++ = iem_dp_calc_residual(dphase, fphase); *outc++ = fphase; dphase += fin * rcp_sr; } x->x_phase = dphase; return(w+6); } static void phasor_tilde_tilde_dsp(t_phasor_tilde_tilde *x, t_signal **sp) { x->x_rcp_sr = (double)(1.0)/(double)(sp[0]->s_sr); dsp_add(phasor_tilde_tilde_perform, 5, x, sp[0]->s_vec, sp[1]->s_vec, sp[2]->s_vec, sp[0]->s_n); } static void phasor_tilde_tilde_ft1(t_phasor_tilde_tilde *x, t_floatarg ph) { x->x_phase = (double)ph; } void phasor_tilde_tilde_setup(void) { phasor_tilde_tilde_class = class_new(gensym("phasor~~"), (t_newmethod)phasor_tilde_tilde_new, 0, sizeof(t_phasor_tilde_tilde), 0, A_DEFFLOAT, 0); CLASS_MAINSIGNALIN(phasor_tilde_tilde_class, t_phasor_tilde_tilde, x_freq); class_addmethod(phasor_tilde_tilde_class, (t_method)phasor_tilde_tilde_dsp, gensym("dsp"), A_CANT, 0); class_addmethod(phasor_tilde_tilde_class, (t_method)phasor_tilde_tilde_ft1, gensym("ft1"), A_FLOAT, 0); } iem_utils-v0.0.20181004/iem_dp/dptohex-help.pd0000644000175000017500000001071212630366345021055 0ustar zmoelnigzmoelnig#N canvas 159 54 987 753 10; #X floatatom 143 239 11 0 0 0 - - -; #X floatatom 120 266 11 0 0 0 - - -; #X symbolatom 21 380 25 0 0 0 - - -; #X symbolatom 473 281 25 0 0 0 - - -; #X obj 472 222 + 3.1415; #X msg 472 201 9.26536e-05; #X text 526 258 7-8 digits accurate; #X text 229 238 difference; #X text 204 265 truncated; #X text 203 380 internal value; #X text 664 617 IEM KUG; #X text 648 605 musil; #X text 685 605 @; #X text 694 605 iem.at; #X text 647 627 Graz \, Austria; #X text 707 579 @; #X text 716 579 iem.at; #X text 648 579 zmoelnig; #X text 75 53 the inputs are two floats \, left one is the float-truncated value of a double value \, the right one is the difference between double value and the float-truncated.; #X text 74 112 output is a symbol:hexadeximal of sum of both double casted inputs; #X symbolatom 104 459 25 0 0 0 - - -; #X obj 36 313 +__ 2; #X symbolatom 159 337 25 0 0 0 - - -; #X msg 668 440 1e-23; #X symbolatom 645 493 25 0 0 0 - - -; #X obj 644 470 ftohex; #X msg 719 440 2e-23; #X msg 773 440 4e-23; #X msg 824 440 8e-23; #X msg 707 361 1e+19; #X msg 756 360 1e+20; #X symbolatom 318 579 25 0 0 0 - - -; #X msg 670 385 1e-18; #X msg 719 385 1e-19; #X text 70 13 double to hexadecimal converter (only for debugging purpose) ; #X msg 20 149 "0.000000000000000001; #X msg 21 175 "1e-18; #X msg 19 199 "1e-23; #X msg 709 95 "22.2222222233; #X msg 708 71 "44.4444444444; #X msg 708 48 "44.444444444444; #X msg 710 119 "22.2222222222; #X msg 710 142 "-22.2222222222; #X msg 555 81 "1.234; #X msg 558 106 "1.9999; #X msg 562 131 "2.00123; #X msg 491 154 "0.987; #X msg 627 175 "1e-14; #X msg 384 388 "1e+19; #X msg 436 388 "1e+20; #X msg 396 413 "-1e+19; #X msg 456 413 "-1e+20; #X msg 365 448 "1e-18; #X msg 423 449 "1e-19; #X msg 377 471 "-1e-18; #X msg 423 513 "2; #X msg 441 473 "-1e-19; #N canvas 0 22 907 755 (subpatch) 0; #X symbolatom 317 582 25 0 0 0 - - -; #X msg 396 413 "-1e+19; #X msg 456 413 "-1e+20; #X msg 365 448 "1e-18; #X msg 423 449 "1e-19; #X msg 377 471 "-1e-18; #X msg 423 513 "2; #X msg 441 473 "-1e-19; #X symbolatom 163 312 10 0 0 0 - - -; #X obj 162 290 makefilename "1e%d; #X floatatom 163 254 5 -78 78 0 - - -; #X obj 164 334 unsymbol; #X symbolatom 314 311 10 0 0 0 - - -; #X floatatom 314 253 5 -46 39 0 - - -; #X obj 315 333 unsymbol; #X obj 313 289 makefilename "-1e%d; #X obj 316 559 dptohex; #X obj 317 531 symtodp; #X connect 1 0 17 0; #X connect 2 0 17 0; #X connect 3 0 17 0; #X connect 4 0 17 0; #X connect 5 0 17 0; #X connect 6 0 17 0; #X connect 7 0 17 0; #X connect 8 0 11 0; #X connect 9 0 8 0; #X connect 10 0 9 0; #X connect 11 0 17 0; #X connect 12 0 14 0; #X connect 13 0 15 0; #X connect 14 0 17 0; #X connect 15 0 12 0; #X connect 16 0 0 0; #X connect 17 0 16 0; #X connect 17 1 16 1; #X restore 76 577 pd; #X obj 548 377 pow; #X msg 546 355 10 \$1; #X floatatom 545 335 5 -46 39 0 - - -; #X floatatom 549 400 0 0 0 0 - - -; #X obj 595 376 pow; #X msg 593 354 10 \$1; #X floatatom 592 334 5 -46 39 0 - - -; #X floatatom 600 423 0 0 0 0 - - -; #X obj 598 400 * -1; #X obj 472 258 dptohex; #X obj 317 556 dptohex; #X obj 20 357 dptohex; #X obj 158 314 dptohex; #X obj 103 436 dptosym; #X text 14 12 dptohex; #X text 199 196 15 digits accurate; #X msg 94 169 "3.14159265358979; #X msg 100 477 "3.14159265358979; #X text 37 478 should be; #X obj 117 195 symtodp; #X obj 317 531 symtodp; #X text 599 566 (c) IOhannes m zmoelnig 1999 - 2013; #X text 599 594 (c) Thomas Musil 2000 - 2013; #X connect 4 0 67 0; #X connect 5 0 4 0; #X connect 21 0 69 0; #X connect 21 1 69 1; #X connect 23 0 25 0; #X connect 25 0 24 0; #X connect 26 0 25 0; #X connect 27 0 25 0; #X connect 28 0 25 0; #X connect 29 0 25 0; #X connect 30 0 25 0; #X connect 32 0 25 0; #X connect 33 0 25 0; #X connect 35 0 77 0; #X connect 36 0 77 0; #X connect 37 0 77 0; #X connect 48 0 78 0; #X connect 49 0 78 0; #X connect 50 0 78 0; #X connect 51 0 78 0; #X connect 52 0 78 0; #X connect 53 0 78 0; #X connect 54 0 78 0; #X connect 55 0 78 0; #X connect 56 0 78 0; #X connect 58 0 61 0; #X connect 59 0 58 0; #X connect 60 0 59 0; #X connect 61 0 25 0; #X connect 62 0 66 0; #X connect 63 0 62 0; #X connect 64 0 63 0; #X connect 65 0 25 0; #X connect 66 0 65 0; #X connect 67 0 3 0; #X connect 68 0 31 0; #X connect 69 0 2 0; #X connect 70 0 22 0; #X connect 71 0 20 0; #X connect 74 0 77 0; #X connect 77 0 1 0; #X connect 77 0 21 0; #X connect 77 0 70 0; #X connect 77 0 71 0; #X connect 77 1 0 0; #X connect 77 1 21 1; #X connect 77 1 70 1; #X connect 77 1 71 1; #X connect 78 0 68 0; #X connect 78 1 68 1; iem_utils-v0.0.20181004/iem_dp/wrap~~-help.pd0000644000175000017500000000243112630366345020746 0ustar zmoelnigzmoelnig#N canvas 78 22 598 414 10; #X obj 30 19 tgl 15 0 empty empty empty 20 8 0 10 -262144 -1 -1 0 1 ; #X floatatom 30 86 5 0 0 0 - - -; #X floatatom 46 64 3 0 0 0 - - -; #X obj 30 41 dsp; #X text 290 39 see also:; #X text 360 283 IEM KUG; #X text 344 271 musil; #X text 381 271 @; #X text 390 271 iem.at; #X text 343 293 Graz \, Austria; #X text 403 245 @; #X text 412 245 iem.at; #X text 344 245 zmoelnig; #X obj 357 40 wrap~; #X obj 145 292 metro 500; #X floatatom 34 116 0 0 0 0 - - -; #X floatatom 36 360 0 0 0 0 - - -; #X obj 36 327 snapshot~; #X obj 34 142 sig~; #X text 86 -9 - remainder modulo 1; #X text 65 115 <-- shift-drag here to get non-integers to try; #X text 15 -10 wrap~~; #X obj 145 267 loadbang; #X obj 34 221 wrap~~; #X text 83 208 <-- fine inlet; #X text 83 237 <-- fine outlet; #X obj 72 182 *~ 0.01; #X floatatom 104 360 0 0 0 0 - - -; #X obj 104 327 snapshot~; #X text 295 232 (c) IOhannes m zmoelnig 1999 - 2013; #X text 295 260 (c) Thomas Musil 2000 - 2013; #X connect 0 0 3 0; #X connect 3 0 1 0; #X connect 3 1 2 0; #X connect 14 0 17 0; #X connect 14 0 28 0; #X connect 15 0 18 0; #X connect 17 0 16 0; #X connect 18 0 23 0; #X connect 18 0 26 0; #X connect 22 0 14 0; #X connect 22 0 14 0; #X connect 23 0 17 0; #X connect 23 1 28 0; #X connect 26 0 23 1; #X connect 28 0 27 0; iem_utils-v0.0.20181004/iem_dp/min__-help.pd0000644000175000017500000000255212630366345020466 0ustar zmoelnigzmoelnig#N canvas 223 169 932 536 10; #X symbolatom 167 326 25 0 0 0 - - -; #X text 104 453 IEM KUG; #X text 88 441 musil; #X text 125 441 @; #X text 134 441 iem.at; #X text 87 463 Graz \, Austria; #X text 147 415 @; #X text 156 415 iem.at; #X text 88 415 zmoelnig; #X floatatom 251 245 11 0 0 0 - - -; #X floatatom 227 273 11 0 0 0 - - -; #X text 337 244 difference; #X text 311 272 float casted; #X text 349 326 product displayed via a symbol; #X text 258 73 = symbol selector of an anything; #X text 248 62 double precision number beginning with a "double quote" =; #X text 479 109 = symbol selector of an anything; #X text 469 98 double precision number beginning with a "double quote" =; #X obj 166 303 dptosym; #X msg 163 61 "1.111111112; #X msg 385 98 "1.111111113; #X text 14 12 min__; #X text 14 34 min''; #X obj 165 209 min__ 0 0; #X obj 246 211 min'' 0 0; #X text 90 342 should be "1.111111112; #X text 55 13 double precision comparsion \, output the less value ; #X text 419 12 15 digits accurate; #X text 39 402 (c) IOhannes m zmoelnig 1999 - 2013; #X text 39 430 (c) Thomas Musil 2000 - 2013; #X obj 164 86 symtodp; #X obj 385 120 symtodp; #X connect 18 0 0 0; #X connect 19 0 30 0; #X connect 20 0 31 0; #X connect 23 0 10 0; #X connect 23 0 18 0; #X connect 23 1 9 0; #X connect 23 1 18 1; #X connect 30 0 23 0; #X connect 30 1 23 1; #X connect 31 0 23 2; #X connect 31 1 23 3; iem_utils-v0.0.20181004/iem_dp/add__-help.pd0000644000175000017500000000257512630366345020440 0ustar zmoelnigzmoelnig#N canvas 291 113 932 536 10; #X symbolatom 167 326 25 0 0 0 - - -; #X text 104 453 IEM KUG; #X text 88 441 musil; #X text 125 441 @; #X text 134 441 iem.at; #X text 87 463 Graz \, Austria; #X text 147 415 @; #X text 156 415 iem.at; #X text 88 415 zmoelnig; #X floatatom 251 245 11 0 0 0 - - -; #X floatatom 227 273 11 0 0 0 - - -; #X text 337 244 difference; #X text 311 272 float casted; #X text 14 12 +__; #X text 70 13 double precision addition; #X text 359 326 sum displayed via a symbol; #X obj 165 209 +__ 0 0; #X text 201 83 = symbol selector of an anything; #X text 191 72 double precision number beginning with a "double quote" =; #X text 425 120 = symbol selector of an anything; #X text 415 109 double precision number beginning with a "double quote" =; #X msg 292 108 "8.7654321234567; #X msg 70 71 "1.2345678765432; #X text 90 342 should be "9.9999999999999; #X obj 166 303 dptosym; #X text 14 32 add__; #X text 14 57 +''; #X obj 239 209 add__ 0 0; #X obj 316 209 +'' 0 0; #X text 294 13 15 digits accurate; #X text 39 402 (c) IOhannes m zmoelnig 1999 - 2013; #X text 39 430 (c) Thomas Musil 2000 - 2013; #X obj 71 94 symtodp; #X obj 291 130 symtodp; #X connect 16 0 10 0; #X connect 16 0 24 0; #X connect 16 1 9 0; #X connect 16 1 24 1; #X connect 21 0 33 0; #X connect 22 0 32 0; #X connect 24 0 0 0; #X connect 32 0 16 0; #X connect 32 1 16 1; #X connect 33 0 16 2; #X connect 33 1 16 3; iem_utils-v0.0.20181004/iem_dp/sub~~-help.pd0000644000175000017500000000511612630366345020571 0ustar zmoelnigzmoelnig#N canvas 291 113 856 539 10; #X symbolatom 196 376 25 0 0 0 - - -; #X text 133 473 IEM KUG; #X text 117 461 musil; #X text 154 461 @; #X text 163 461 iem.at; #X text 116 483 Graz \, Austria; #X text 176 435 @; #X text 185 435 iem.at; #X text 117 435 zmoelnig; #X obj 139 97 sig~; #X obj 99 97 sig~; #X obj 360 144 sig~; #X obj 320 144 sig~; #X msg 11 91 \; pd dsp \$1; #X obj 11 71 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 1 ; #N canvas 0 22 330 356 sunsig~~ 0; #X obj 22 195 snapshot~; #X obj 47 103 metro 300; #X obj 46 81 loadbang; #X obj 22 18 inlet~; #X obj 122 18 inlet~; #X obj 122 195 snapshot~; #X obj 47 136 t b b; #X obj 36 277 outlet; #X obj 35 248 dptosym; #X connect 0 0 8 0; #X connect 1 0 6 0; #X connect 2 0 1 0; #X connect 3 0 0 0; #X connect 4 0 5 0; #X connect 5 0 8 1; #X connect 6 0 0 0; #X connect 6 1 5 0; #X connect 8 0 7 0; #X restore 195 260 pd sunsig~~; #X text 14 12 -~~; #X text 70 13 double precision signal subtraction; #X obj 194 202 -~~ #######; #X text 383 376 difference displayed via a symbol; #X text 119 391 should be "1.2345678765432; #X msg 99 48 "9.9999999999999; #X msg 320 94 "8.7654321234567; #X text 452 105 = symbol selector of an anything; #X text 442 94 double precision number beginning with a "double quote" =; #X text 231 60 = symbol selector of an anything; #X text 221 49 double precision number beginning with a "double quote" =; #X text 14 34 sub~~; #X obj 282 202 sub~~; #X text 355 12 15 digits accurate; #X text 68 422 (c) IOhannes m zmoelnig 1999 - 2013; #X text 68 450 (c) Thomas Musil 2000 - 2013; #X obj 99 72 symtodp; #X obj 319 115 symtodp; #X symbolatom 439 307 25 0 0 0 - - -; #N canvas 0 22 330 356 sunsig~~ 0; #X obj 22 195 snapshot~; #X obj 47 103 metro 300; #X obj 46 81 loadbang; #X obj 22 18 inlet~; #X obj 122 18 inlet~; #X obj 122 195 snapshot~; #X obj 47 136 t b b; #X obj 36 277 outlet; #X obj 35 248 dptosym; #X connect 0 0 8 0; #X connect 1 0 6 0; #X connect 2 0 1 0; #X connect 3 0 0 0; #X connect 4 0 5 0; #X connect 5 0 8 1; #X connect 6 0 0 0; #X connect 6 1 5 0; #X connect 8 0 7 0; #X restore 439 281 pd sunsig~~; #X obj 440 226 sig~; #X floatatom 439 206 5 0 0 0 - - -; #X obj 440 256 -~~ 100 0; #X obj 517 255 sub~~ 100 0; #X connect 9 0 18 1; #X connect 10 0 18 0; #X connect 11 0 18 3; #X connect 12 0 18 2; #X connect 14 0 13 0; #X connect 15 0 0 0; #X connect 18 0 15 0; #X connect 18 1 15 1; #X connect 21 0 32 0; #X connect 22 0 33 0; #X connect 32 0 10 0; #X connect 32 1 9 0; #X connect 33 0 12 0; #X connect 33 1 11 0; #X connect 35 0 34 0; #X connect 36 0 38 0; #X connect 37 0 36 0; #X connect 38 0 35 0; #X connect 38 1 35 1; iem_utils-v0.0.20181004/iem_dp/min~~-help.pd0000644000175000017500000000510612630366345020562 0ustar zmoelnigzmoelnig#N canvas 291 113 860 543 10; #X symbolatom 196 386 25 0 0 0 - - -; #X text 133 483 IEM KUG; #X text 117 471 musil; #X text 154 471 @; #X text 163 471 iem.at; #X text 116 493 Graz \, Austria; #X text 176 445 @; #X text 185 445 iem.at; #X text 117 445 zmoelnig; #X text 388 386 sum displayed via a symbol; #X obj 139 97 sig~; #X obj 99 97 sig~; #X obj 360 144 sig~; #X obj 320 144 sig~; #X msg 11 91 \; pd dsp \$1; #X obj 11 71 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 1 1 ; #N canvas 0 22 330 356 sunsig~~ 0; #X obj 22 195 snapshot~; #X obj 47 103 metro 300; #X obj 46 81 loadbang; #X obj 22 18 inlet~; #X obj 122 18 inlet~; #X obj 122 195 snapshot~; #X obj 47 136 t b b; #X obj 36 277 outlet; #X obj 35 248 dptosym; #X connect 0 0 8 0; #X connect 1 0 6 0; #X connect 2 0 1 0; #X connect 3 0 0 0; #X connect 4 0 5 0; #X connect 5 0 8 1; #X connect 6 0 0 0; #X connect 6 1 5 0; #X connect 8 0 7 0; #X restore 195 260 pd sunsig~~; #X text 452 106 = symbol selector of an anything; #X text 442 95 double precision number beginning with a "double quote" =; #X text 230 60 = symbol selector of an anything; #X text 220 49 double precision number beginning with a "double quote" =; #X msg 99 48 "1.111111112; #X msg 320 94 "1.111111113; #X text 14 11 min~~; #X text 70 13 double precision comparsion \, output the less value ; #X obj 194 203 min~~ ######; #X text 132 402 should be "1.111111112; #X text 450 14 15 digits accurate; #X text 68 432 (c) IOhannes m zmoelnig 1999 - 2013; #X text 68 460 (c) Thomas Musil 2000 - 2013; #X obj 99 72 symtodp; #X obj 320 115 symtodp; #X obj 462 220 sig~; #N canvas 0 22 330 356 sunsig~~ 0; #X obj 22 195 snapshot~; #X obj 47 103 metro 300; #X obj 46 81 loadbang; #X obj 22 18 inlet~; #X obj 122 18 inlet~; #X obj 122 195 snapshot~; #X obj 47 136 t b b; #X obj 36 277 outlet; #X obj 35 248 dptosym; #X connect 0 0 8 0; #X connect 1 0 6 0; #X connect 2 0 1 0; #X connect 3 0 0 0; #X connect 4 0 5 0; #X connect 5 0 8 1; #X connect 6 0 0 0; #X connect 6 1 5 0; #X connect 8 0 7 0; #X restore 462 274 pd sunsig~~; #X symbolatom 462 299 25 0 0 0 - - -; #X floatatom 462 199 5 0 0 0 - - -; #X floatatom 523 199 5 0 0 0 - - -; #X obj 462 246 min~~ 10 0; #X connect 10 0 25 1; #X connect 11 0 25 0; #X connect 12 0 25 3; #X connect 13 0 25 2; #X connect 15 0 14 0; #X connect 16 0 0 0; #X connect 21 0 30 0; #X connect 22 0 31 0; #X connect 25 0 16 0; #X connect 25 1 16 1; #X connect 30 0 11 0; #X connect 30 1 10 0; #X connect 31 0 13 0; #X connect 31 1 12 0; #X connect 32 0 37 0; #X connect 33 0 34 0; #X connect 35 0 32 0; #X connect 36 0 37 2; #X connect 37 0 33 0; #X connect 37 1 33 1; iem_utils-v0.0.20181004/iem_dp/tabread4~~-help.pd0000644000175000017500000000751112630366345021467 0ustar zmoelnigzmoelnig#N canvas 78 22 892 632 10; #X obj 28 14 tgl 15 0 empty empty empty 20 8 0 10 -262144 -1 -1 0 1 ; #X floatatom 28 81 5 0 0 0 - - -; #X floatatom 44 59 3 0 0 0 - - -; #X obj 28 36 dsp; #X obj 468 27 loadbang; #X text 425 251 see also:; #X obj 493 251 tabread4~; #N canvas 0 22 450 300 (subpatch) 0; #X array array99 13 float 0; #X coords 0 5.5 12 -5.5 250 200 1; #X restore 121 44 graph; #X text 116 -15 4-point-interpolating table lookup; #X obj 41 523 snapshot~; #X obj 194 489 metro 200; #X obj 40 426 sig~; #X floatatom 41 549 0 0 0 0 - - -; #X text 42 272 Tabread4~ is used to build samplers and other table lookup algorithms. The interpolation scheme is 4-point polynomial. ; #X text 13 -15 tabread4~~; #X obj 41 488 tabread4~~ array99; #X obj 194 444 loadbang; #X obj 194 468 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X obj 158 10 table array98 1.7e+07; #X obj 294 530 snapshot~; #X obj 293 454 sig~; #X floatatom 294 556 0 0 0 0 - - -; #X obj 293 491 tabread4~ array99; #X floatatom 155 356 0 0 0 0 - - -; #X obj 145 430 sig~; #N canvas 0 22 470 320 copy_99_into_98 0; #X obj 55 199 tabwrite~ array98; #X msg 80 105 start 1.698e+07; #X obj 55 128 tabplay~ array99; #X obj 55 62 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X msg 146 150 stop; #X obj 55 83 t b b; #X obj 55 24 inlet; #X connect 1 0 0 0; #X connect 2 0 0 0; #X connect 2 1 4 0; #X connect 3 0 5 0; #X connect 4 0 0 0; #X connect 5 0 2 0; #X connect 5 1 1 0; #X connect 6 0 3 0; #X restore 408 222 pd copy_99_into_98; #X obj 408 50 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X obj 293 432 + 0; #X obj 408 69 t b b; #X obj 158 337 hsl 101 15 1 11 0 0 empty empty empty -2 -6 0 8 -262144 -1 -1 6000 1; #X obj 306 412 r \$0_offset; #X obj 145 408 r \$0_offset; #X obj 334 467 r \$0_which_table; #X obj 47 461 r \$0_which_table; #X msg 433 92 \; array98 const 0 \; array99 resize 13 \; array99 0 -5 -5 -4 -3 -2 -1 0 1 2 3 4 5 5 \; array99 bounds 0 5.5 12 -5.5 \; array99 xticks 0 1 2 \; array99 yticks 0 0.5 5 \; array99 xlabel -6 0 2 4 6 8 10 12 \; array99 ylabel -0.4 -5 -4 -3 -2 -1 0 1 2 3 4 5; #N canvas 0 22 470 320 select_table 0; #X obj 55 24 inlet; #X msg 55 112 0; #X msg 109 180 1.698e+07; #X obj 55 90 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X obj 109 158 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X obj 55 133 s \$0_offset; #X obj 109 201 s \$0_offset; #X obj 186 200 s \$0_which_table; #X msg 186 178 set array98; #X obj 127 133 s \$0_which_table; #X msg 127 111 set array99; #X obj 55 47 sel 0 1; #X connect 0 0 11 0; #X connect 1 0 5 0; #X connect 2 0 6 0; #X connect 3 0 10 0; #X connect 3 0 1 0; #X connect 4 0 2 0; #X connect 4 0 8 0; #X connect 8 0 7 0; #X connect 10 0 9 0; #X connect 11 0 3 0; #X connect 11 1 4 0; #X restore 275 370 pd select_table; #X obj 275 336 vradio 15 1 0 2 empty empty empty 0 -6 0 8 -262144 -1 -1 1; #X text 294 334 array99 offset=0; #X text 293 349 array98 offset=1.698e+07; #X text 604 546 IEM KUG; #X text 588 534 musil; #X text 625 534 @; #X text 634 534 iem.at; #X text 587 556 Graz \, Austria; #X text 647 508 @; #X text 656 508 iem.at; #X text 588 508 zmoelnig; #X obj 408 29 sel 1; #X text 539 495 (c) IOhannes m zmoelnig 1999 - 2013; #X text 539 523 (c) Thomas Musil 2000 - 2013; #X connect 0 0 3 0; #X connect 0 0 47 0; #X connect 3 0 1 0; #X connect 3 1 2 0; #X connect 4 0 26 0; #X connect 9 0 12 0; #X connect 10 0 9 0; #X connect 10 0 19 0; #X connect 11 0 15 0; #X connect 15 0 9 0; #X connect 16 0 17 0; #X connect 17 0 10 0; #X connect 19 0 21 0; #X connect 20 0 22 0; #X connect 22 0 19 0; #X connect 23 0 11 0; #X connect 23 0 27 0; #X connect 24 0 15 1; #X connect 26 0 28 0; #X connect 27 0 20 0; #X connect 28 0 25 0; #X connect 28 1 34 0; #X connect 29 0 23 0; #X connect 30 0 27 1; #X connect 31 0 24 0; #X connect 32 0 22 0; #X connect 33 0 15 0; #X connect 36 0 35 0; #X connect 47 0 26 0; iem_utils-v0.0.20181004/iem_dp/random__-help.pd0000644000175000017500000000244112630366345021160 0ustar zmoelnigzmoelnig#N canvas 88 232 932 536 10; #X symbolatom 167 326 25 0 0 0 - - -; #X text 104 453 IEM KUG; #X text 88 441 musil; #X text 125 441 @; #X text 134 441 iem.at; #X text 87 463 Graz \, Austria; #X text 39 430 (c) Thomas Musil 2000 - 2007; #X text 39 402 (c) IOhannes m zmoelnig 1999 - 2007; #X text 147 415 @; #X text 156 415 iem.at; #X text 88 415 zmoelnig; #X floatatom 251 245 11 0 0 0 - - -; #X floatatom 227 273 11 0 0 0 - - -; #X text 337 244 difference; #X text 311 272 float casted; #X text 359 326 difference displayed via a symbol; #X text 203 83 = symbol selector of an anything; #X text 294 13 14 digits accurate; #X msg 292 108 "8.7654321234567; #X text 193 72 double precision number beginning with a "double quote" =; #X text 422 119 = symbol selector of an anything; #X text 412 108 double precision number beginning with a "double quote" =; #X obj 166 303 dptosym; #X obj 316 210 random'' 10 0; #X obj 165 209 random__ 10 0; #X msg 90 106 bang; #X msg 151 114 seed 20 0; #X text 97 13 double precision random; #X text 14 12 random__; #X text 14 32 random''; #X obj 292 130 symtodp; #X connect 18 0 30 0; #X connect 22 0 0 0; #X connect 24 0 12 0; #X connect 24 0 22 0; #X connect 24 1 11 0; #X connect 24 1 22 1; #X connect 25 0 24 0; #X connect 26 0 24 0; #X connect 30 0 24 1; #X connect 30 1 24 2; iem_utils-v0.0.20181004/iem_dp/mul~~-help.pd0000644000175000017500000000507712630366345020603 0ustar zmoelnigzmoelnig#N canvas 291 113 936 537 10; #X symbolatom 194 348 25 0 0 0 - - -; #X text 134 493 IEM KUG; #X text 118 481 musil; #X text 155 481 @; #X text 164 481 iem.at; #X text 117 503 Graz \, Austria; #X text 177 455 @; #X text 186 455 iem.at; #X text 118 455 zmoelnig; #X obj 139 97 sig~; #X obj 99 97 sig~; #X obj 360 144 sig~; #X obj 320 144 sig~; #X msg 11 91 \; pd dsp \$1; #X obj 11 71 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 1 ; #X text 14 12 *~~; #X text 70 13 double precision signal multiplication; #X obj 194 203 *~~ #######; #X text 386 348 product displayed via a symbol; #N canvas 0 22 330 356 sunsig~~ 0; #X obj 22 195 snapshot~; #X obj 47 103 metro 300; #X obj 46 81 loadbang; #X obj 22 18 inlet~; #X obj 122 18 inlet~; #X obj 122 195 snapshot~; #X obj 47 136 t b b; #X obj 36 277 outlet; #X obj 35 248 dptosym; #X connect 0 0 8 0; #X connect 1 0 6 0; #X connect 2 0 1 0; #X connect 3 0 0 0; #X connect 4 0 5 0; #X connect 5 0 8 1; #X connect 6 0 0 0; #X connect 6 1 5 0; #X connect 8 0 7 0; #X restore 195 260 pd sunsig~~; #X msg 320 94 "1.111111; #X msg 99 51 "1.111111; #X text 117 366 should be "1.234567654321; #X text 406 105 = symbol selector of an anything; #X text 396 94 double precision number beginning with a "double quote" =; #X text 183 62 = symbol selector of an anything; #X text 173 51 double precision number beginning with a "double quote" =; #X text 16 32 mul~~; #X obj 292 203 mul~~; #X text 374 13 15 digits accurate; #X text 69 442 (c) IOhannes m zmoelnig 1999 - 2013; #X text 69 470 (c) Thomas Musil 2000 - 2013; #X obj 99 74 symtodp; #X obj 320 115 symtodp; #X obj 440 256 *~~ 100 0; #X symbolatom 439 307 25 0 0 0 - - -; #N canvas 0 22 330 356 sunsig~~ 0; #X obj 22 195 snapshot~; #X obj 47 103 metro 300; #X obj 46 81 loadbang; #X obj 22 18 inlet~; #X obj 122 18 inlet~; #X obj 122 195 snapshot~; #X obj 47 136 t b b; #X obj 36 277 outlet; #X obj 35 248 dptosym; #X connect 0 0 8 0; #X connect 1 0 6 0; #X connect 2 0 1 0; #X connect 3 0 0 0; #X connect 4 0 5 0; #X connect 5 0 8 1; #X connect 6 0 0 0; #X connect 6 1 5 0; #X connect 8 0 7 0; #X restore 439 281 pd sunsig~~; #X obj 440 226 sig~; #X floatatom 439 206 5 0 0 0 - - -; #X obj 516 255 mul~~ 100 0; #X connect 9 0 17 1; #X connect 10 0 17 0; #X connect 11 0 17 3; #X connect 12 0 17 2; #X connect 14 0 13 0; #X connect 17 0 19 0; #X connect 17 1 19 1; #X connect 19 0 0 0; #X connect 20 0 33 0; #X connect 21 0 32 0; #X connect 32 0 10 0; #X connect 32 1 9 0; #X connect 33 0 12 0; #X connect 33 1 11 0; #X connect 34 0 36 0; #X connect 34 1 36 1; #X connect 36 0 35 0; #X connect 37 0 34 0; #X connect 38 0 37 0; iem_utils-v0.0.20181004/iem_dp/tabwrite__-help.pd0000644000175000017500000000314112630366345021517 0ustar zmoelnigzmoelnig#N canvas 41 42 639 550 10; #X text 334 93 see also:; #X obj 128 82 table array98 1.7e+07; #X text 206 462 IEM KUG; #X text 190 450 musil; #X text 227 450 @; #X text 236 450 iem.at; #X text 189 472 Graz \, Austria; #X text 249 424 @; #X text 258 424 iem.at; #X text 190 424 zmoelnig; #X obj 403 92 tabwrite; #X floatatom 121 191 5 0 0 0 - - -; #X obj 199 240 t f b f; #X msg 218 271 1.698e+07; #X obj 121 219 t f f; #X msg 49 283 1.698e+07; #X obj 49 254 t b f; #X floatatom 49 331 0 0 0 0 - - -; #X obj 49 307 tabread__ array98; #X obj 166 307 tabwrite__ array98; #X floatatom 393 173 5 0 0 0 - - -; #X obj 393 201 t f f; #X msg 312 282 1.698e+07; #X obj 312 253 t b f; #X floatatom 312 330 0 0 0 0 - - -; #X obj 475 225 t f b f; #X msg 493 251 1.698e+07; #X obj 499 273 +; #X obj 129 107 table array99 1.7e+07; #X obj 312 307 tabread__ array99; #X obj 435 307 tabwrite array99; #X text 13 11 tabwrite__; #X text 14 27 tabwrite''; #X text 116 10 write number in a lookup table with double precision index (15 digits accurate); #X text 141 411 (c) IOhannes m zmoelnig 1999 - 2013; #X text 141 439 (c) Thomas Musil 2000 - 2013; #X connect 11 0 14 0; #X connect 12 0 19 0; #X connect 12 1 13 0; #X connect 12 2 19 2; #X connect 13 0 19 1; #X connect 14 0 16 0; #X connect 14 1 12 0; #X connect 15 0 18 0; #X connect 16 0 15 0; #X connect 16 1 18 1; #X connect 18 0 17 0; #X connect 20 0 21 0; #X connect 21 0 23 0; #X connect 21 1 25 0; #X connect 22 0 29 0; #X connect 23 0 22 0; #X connect 23 1 29 1; #X connect 25 0 30 0; #X connect 25 1 26 0; #X connect 25 2 27 1; #X connect 26 0 27 0; #X connect 27 0 30 1; #X connect 29 0 24 0; iem_utils-v0.0.20181004/iem_dp/tabread4__-help.pd0000644000175000017500000000523712630366345021374 0ustar zmoelnigzmoelnig#N canvas 95 60 892 632 10; #X obj 406 74 loadbang; #X text 425 271 see also:; #N canvas 0 22 450 300 (subpatch) 0; #X array array99 13 float 0; #X coords 0 5.5 12 -5.5 250 200 1; #X restore 121 64 graph; #X floatatom 41 537 0 0 0 0 - - -; #X obj 497 55 table array98 1.7e+07; #X floatatom 293 537 0 0 0 0 - - -; #X floatatom 155 376 0 0 0 0 - - -; #X obj 293 452 + 0; #X obj 158 357 hsl 101 15 1 11 0 0 empty empty empty -2 -6 0 8 -262144 -1 -1 3500 1; #X obj 306 432 r \$0_offset; #X obj 145 428 r \$0_offset; #X obj 312 485 r \$0_which_table; #X obj 40 467 r \$0_which_table; #N canvas 0 22 470 320 select_table 0; #X obj 55 24 inlet; #X msg 55 112 0; #X msg 109 180 1.698e+07; #X obj 55 90 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X obj 109 158 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X obj 55 133 s \$0_offset; #X obj 109 201 s \$0_offset; #X obj 186 200 s \$0_which_table; #X msg 186 178 set array98; #X obj 127 133 s \$0_which_table; #X msg 127 111 set array99; #X obj 55 47 sel 0 1; #X connect 0 0 11 0; #X connect 1 0 5 0; #X connect 2 0 6 0; #X connect 3 0 10 0; #X connect 3 0 1 0; #X connect 4 0 2 0; #X connect 4 0 8 0; #X connect 8 0 7 0; #X connect 10 0 9 0; #X connect 11 0 3 0; #X connect 11 1 4 0; #X restore 275 390 pd select_table; #X obj 275 356 vradio 15 1 0 2 empty empty empty 0 -6 0 8 -262144 -1 -1 1; #X text 294 354 array99 offset=0; #X text 293 369 array98 offset=1.698e+07; #X text 604 566 IEM KUG; #X text 588 554 musil; #X text 625 554 @; #X text 634 554 iem.at; #X text 587 576 Graz \, Austria; #X text 647 528 @; #X text 656 528 iem.at; #X text 588 528 zmoelnig; #X text 13 11 tabread4__; #X obj 493 271 tabread4; #X msg 406 95 \; array98 const 0 \; array99 resize 13 \; array99 0 -5 -5 -4 -3 -2 -1 0 1 2 3 4 5 5 \; array99 bounds 0 5.5 12 -5.5 \; array99 xticks 0 1 2 \; array99 yticks 0 0.5 5 \; array99 xlabel -6 0 2 4 6 8 10 12 \; array99 ylabel -0.4 -5 -4 -3 -2 -1 0 1 2 3 4 5 \; array98 1.698e+07 -5 -5 -4 -3 -2 -1 0 1 2 3 4 5 5; #X obj 293 511 tabread4 array99; #X obj 41 508 tabread4__ array99; #X obj 77 533 tabread4'' array99; #X text 14 26 tabread4''; #X text 41 292 tabread4 is used to build samplers and other table lookup algorithms. The interpolation scheme is 4-point polynomial.; #X text 539 515 (c) IOhannes m zmoelnig 1999 - 2013; #X text 539 543 (c) Thomas Musil 2000 - 2013; #X text 116 10 4-point-interpolating table lookup with double precision index (15 digits accurate); #X connect 0 0 27 0; #X connect 6 0 7 0; #X connect 6 0 29 0; #X connect 7 0 28 0; #X connect 8 0 6 0; #X connect 9 0 7 1; #X connect 10 0 29 1; #X connect 11 0 28 0; #X connect 12 0 29 0; #X connect 14 0 13 0; #X connect 28 0 5 0; #X connect 29 0 3 0; iem_utils-v0.0.20181004/iem_dp/dptosym-help.pd0000644000175000017500000000415312630366345021103 0ustar zmoelnigzmoelnig#N canvas 502 22 781 599 10; #X symbolatom 525 160 25 0 0 0 - - -; #X obj 525 103 + 3.1415; #X msg 525 79 9.26536e-05; #X text 574 135 7-8 digits accurate; #X text 169 289 output is a symbol of sum of both double casted inputs ; #X text 361 15 (only for help and debugging purpose); #X symbolatom 109 353 25 0 0 0 - - -; #X text 149 467 IEM KUG; #X text 133 455 musil; #X text 170 455 @; #X text 179 455 iem.at; #X text 132 477 Graz \, Austria; #X text 192 429 @; #X text 201 429 iem.at; #X text 133 429 zmoelnig; #X text 46 369 should be "1.2345678765432; #X floatatom 88 102 11 0 0 0 - - -; #X floatatom 65 129 11 0 0 0 - - -; #X text 168 235 the inputs are two floats \, left one is the float-casted value of a double value \, the right one is the float difference between double value and the float-casted.; #X text 149 128 float-casted; #X text 174 101 difference to double; #X obj 110 288 dptosym; #X obj 525 134 dptosym; #X symbolatom 557 349 25 0 0 0 - - -; #X msg 596 293 9.26536e-05; #X text 606 324 7-8 digits accurate; #X obj 557 323 dptosym; #X msg 559 267 3.1415; #X obj 568 238 t b b; #X obj 568 215 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 -1; #X symbolatom 552 485 25 0 0 0 - - -; #X obj 558 438 dptosym; #X msg 32 46 "1.234567890123456789; #X msg 558 388 "3.1415926535897932; #X obj 577 462 symbol; #X obj 558 413 symtodp; #X obj 32 71 symtodp; #X text 84 416 (c) IOhannes m zmoelnig 1999 - 2013; #X text 84 444 (c) Thomas Musil 2000 - 2013; #X text 14 12 dptosym; #X text 81 12 double precision to symbol converter; #X symbolatom 147 332 25 0 0 0 - - -; #X obj 147 311 symbol; #X text 195 311 and a symbol number with a leading double quotes; #X connect 1 0 22 0; #X connect 2 0 1 0; #X connect 21 0 6 0; #X connect 21 1 42 0; #X connect 22 0 0 0; #X connect 24 0 26 1; #X connect 26 0 23 0; #X connect 27 0 26 0; #X connect 28 0 27 0; #X connect 28 1 24 0; #X connect 29 0 28 0; #X connect 31 1 34 0; #X connect 32 0 36 0; #X connect 33 0 35 0; #X connect 34 0 30 0; #X connect 35 0 31 0; #X connect 35 1 31 1; #X connect 36 0 17 0; #X connect 36 0 21 0; #X connect 36 1 16 0; #X connect 36 1 21 1; #X connect 42 0 41 0; iem_utils-v0.0.20181004/iem_dp/tabwrite~~-help.pd0000644000175000017500000000241412630366345021617 0ustar zmoelnigzmoelnig#N canvas 78 22 863 399 10; #X obj 28 14 tgl 15 0 empty empty empty 20 8 0 10 -262144 -1 -1 0 1 ; #X floatatom 28 81 5 0 0 0 - - -; #X floatatom 44 59 3 0 0 0 - - -; #X obj 28 36 dsp; #X text 420 277 see also:; #X text 658 295 IEM KUG; #X text 642 283 musil; #X text 679 283 @; #X text 688 283 iem.at; #X text 641 305 Graz \, Austria; #X text 701 257 @; #X text 710 257 iem.at; #X text 642 257 zmoelnig; #X obj 479 276 tabwrite~; #X msg 47 210 bang; #N canvas 0 22 450 300 (subpatch) 0; #X array array99 1000 float 0; #X coords 0 1 999 -1 200 100 1; #X restore 390 77 graph; #X text 190 318 creation argument initializes array name; #X msg 45 288 set array99; #X msg 48 260 stop; #X text 153 261 stop recording; #X text 175 234 start in middle of table; #X obj 27 187 phasor~ 200; #X text 148 209 start recording; #X text 149 286 set destination array; #X text 15 -11 tabwrite~~; #X obj 28 318 tabwrite~~ array99; #X msg 47 236 start 500 5; #X text 593 244 (c) IOhannes m zmoelnig 1999 - 2013; #X text 593 272 (c) Thomas Musil 2000 - 2013; #X text 109 -12 - write a signal in an array with a double precision start onset; #X connect 0 0 3 0; #X connect 3 0 1 0; #X connect 3 1 2 0; #X connect 14 0 25 0; #X connect 17 0 25 0; #X connect 18 0 25 0; #X connect 21 0 25 0; #X connect 26 0 25 0; iem_utils-v0.0.20181004/iem_dp/phasor~~-help.pd0000644000175000017500000000311612630366345021272 0ustar zmoelnigzmoelnig#N canvas 50 82 859 466 10; #X obj 28 14 tgl 15 0 empty empty empty 20 8 0 10 -262144 -1 -1 0 1 ; #X floatatom 28 81 5 0 0 0 - - -; #X floatatom 44 59 3 0 0 0 - - -; #X obj 28 36 dsp; #X text 639 34 see also:; #X text 592 211 IEM KUG; #X text 576 199 musil; #X text 613 199 @; #X text 622 199 iem.at; #X text 575 221 Graz \, Austria; #X text 635 173 @; #X text 644 173 iem.at; #X text 576 173 zmoelnig; #X text 13 -11 phasor~~; #X obj 719 35 phasor~; #N canvas 0 22 450 300 (subpatch) 0; #X array array99 100 float 0; #X coords 0 1 100 -1 200 100 1; #X restore 413 12 graph; #X obj 54 382 metro 500; #X floatatom 39 117 0 0 0 0 - - -; #X obj 39 141 sig~ 890; #X text 91 114 <-- specify frequency; #X text 106 140 <-- convert it to audio signal; #X text 177 404 <-- graph the output; #X text 149 195 <-- right inlet resets phase; #X obj 38 406 tabwrite~ array99; #X obj 54 357 loadbang; #X obj 120 357 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 -1; #X obj 39 226 phasor~~; #X floatatom 90 199 5 0 0 0 - - -; #X floatatom 91 285 0 0 0 0 - - -; #X obj 91 262 unsig~; #X text 97 246 fine out; #X text 45 325 coarse out; #X msg 91 179 0.5; #X text 80 -10 - sawtooth generator with double precision output; #X text 527 160 (c) IOhannes m zmoelnig 1999 - 2013; #X text 527 188 (c) Thomas Musil 2000 - 2013; #X connect 0 0 3 0; #X connect 3 0 1 0; #X connect 3 1 2 0; #X connect 16 0 23 0; #X connect 17 0 18 0; #X connect 18 0 26 0; #X connect 24 0 16 0; #X connect 24 0 16 0; #X connect 25 0 16 0; #X connect 26 0 23 0; #X connect 26 1 29 0; #X connect 27 0 26 1; #X connect 29 0 28 0; #X connect 32 0 27 0; iem_utils-v0.0.20181004/iem_dp/div__-help.pd0000644000175000017500000000437412630366345020471 0ustar zmoelnigzmoelnig#N canvas 291 113 1057 750 10; #X symbolatom 167 326 25 0 0 0 - - -; #X text 104 453 IEM KUG; #X text 88 441 musil; #X text 125 441 @; #X text 134 441 iem.at; #X text 87 463 Graz \, Austria; #X text 147 415 @; #X text 156 415 iem.at; #X text 88 415 zmoelnig; #X floatatom 251 245 11 0 0 0 - - -; #X floatatom 227 273 11 0 0 0 - - -; #X text 337 244 difference; #X text 311 272 float casted; #X text 14 12 /__; #X text 70 13 double precision division; #X obj 165 209 /__ 0 0; #X text 359 326 quotient displayed via a symbol; #X text 470 109 = symbol selector of an anything; #X text 460 98 double precision number beginning with a "double quote" =; #X text 288 72 = symbol selector of an anything; #X text 278 61 double precision number beginning with a "double quote" =; #X text 90 342 should be "1.111111; #X msg 385 98 "1.111111; #X msg 163 61 "1.234567654321; #X obj 166 303 dptosym; #X text 13 31 div__; #X symbolatom 409 641 25 0 0 0 - - -; #X floatatom 493 560 11 0 0 0 - - -; #X floatatom 469 588 11 0 0 0 - - -; #X text 579 559 difference; #X text 553 587 float casted; #X text 601 641 quotient displayed via a symbol; #X text 712 424 = symbol selector of an anything; #X text 702 413 double precision number beginning with a "double quote" =; #X text 530 387 = symbol selector of an anything; #X text 520 376 double precision number beginning with a "double quote" =; #X text 332 657 should be "1.111111; #X msg 627 413 "1.111111; #X msg 405 376 "1.234567654321; #X obj 408 618 dptosym; #X obj 407 524 div__ 0 0; #X text 14 57 /''; #X obj 239 209 div__ 0 0; #X obj 316 209 /'' 0 0; #X text 294 13 15 digits accurate; #X text 39 402 (c) IOhannes m zmoelnig 1999 - 2013; #X text 39 430 (c) Thomas Musil 2000 - 2013; #X obj 164 87 symtodp; #X obj 385 120 symtodp; #X obj 406 402 symtodp; #X obj 627 435 symtodp; #X connect 15 0 10 0; #X connect 15 0 24 0; #X connect 15 1 9 0; #X connect 15 1 24 1; #X connect 22 0 48 0; #X connect 23 0 47 0; #X connect 24 0 0 0; #X connect 37 0 50 0; #X connect 38 0 49 0; #X connect 39 0 26 0; #X connect 40 0 28 0; #X connect 40 0 39 0; #X connect 40 1 27 0; #X connect 40 1 39 1; #X connect 47 0 15 0; #X connect 47 1 15 1; #X connect 48 0 15 2; #X connect 48 1 15 3; #X connect 49 0 40 0; #X connect 49 1 40 1; #X connect 50 0 40 2; #X connect 50 1 40 3; iem_utils-v0.0.20181004/iem_dp/delwrite~~-help.pd0000644000175000017500000000166212630366345021621 0ustar zmoelnigzmoelnig#N canvas 248 216 633 323 10; #X obj 32 25 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 1 ; #X msg 33 48 \; pd dsp \$1; #X obj 175 65 sig~; #X floatatom 174 40 5 0 0 0 - - -; #X obj 178 197 delread~~ abc 1234 0; #X obj 178 224 unsig~; #X floatatom 178 248 5 0 0 0 - - -; #X obj 176 91 delwrite~~ abc 9876 0; #X msg 221 166 2345 0; #X msg 242 145 3456 0; #X floatatom 163 148 5 0 0 0 - - -; #X floatatom 310 144 5 0 0 0 - - -; #X obj 390 226 unsig~; #X floatatom 390 250 5 0 0 0 - - -; #X floatatom 382 122 5 0 0 0 - - -; #X floatatom 437 122 5 0 0 0 - - -; #X obj 390 199 vd~~ abc; #X obj 382 141 sig~; #X obj 436 144 sig~; #X connect 0 0 1 0; #X connect 2 0 7 0; #X connect 3 0 2 0; #X connect 4 0 5 0; #X connect 5 0 6 0; #X connect 8 0 4 0; #X connect 9 0 4 0; #X connect 10 0 4 0; #X connect 11 0 4 1; #X connect 12 0 13 0; #X connect 14 0 17 0; #X connect 15 0 18 0; #X connect 16 0 12 0; #X connect 17 0 16 0; #X connect 18 0 16 1; iem_utils-v0.0.20181004/iem_dp/add~~-help.pd0000644000175000017500000000510612630366345020527 0ustar zmoelnigzmoelnig#N canvas 291 113 860 543 10; #X symbolatom 196 376 25 0 0 0 - - -; #X text 133 473 IEM KUG; #X text 117 461 musil; #X text 154 461 @; #X text 163 461 iem.at; #X text 116 483 Graz \, Austria; #X text 176 435 @; #X text 185 435 iem.at; #X text 117 435 zmoelnig; #X text 388 376 sum displayed via a symbol; #X text 14 12 +~~; #X text 70 13 double precision signal addition; #X obj 139 97 sig~; #X obj 99 97 sig~; #X obj 360 144 sig~; #X obj 320 144 sig~; #X obj 194 203 +~~ #######; #X msg 11 91 \; pd dsp \$1; #X obj 11 71 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 1 1 ; #N canvas 0 22 330 356 sunsig~~ 0; #X obj 22 195 snapshot~; #X obj 47 103 metro 300; #X obj 46 81 loadbang; #X obj 22 18 inlet~; #X obj 122 18 inlet~; #X obj 122 195 snapshot~; #X obj 47 136 t b b; #X obj 36 277 outlet; #X obj 35 248 dptosym; #X connect 0 0 8 0; #X connect 1 0 6 0; #X connect 2 0 1 0; #X connect 3 0 0 0; #X connect 4 0 5 0; #X connect 5 0 8 1; #X connect 6 0 0 0; #X connect 6 1 5 0; #X connect 8 0 7 0; #X restore 195 260 pd sunsig~~; #X text 452 106 = symbol selector of an anything; #X text 442 95 double precision number beginning with a "double quote" =; #X text 230 60 = symbol selector of an anything; #X text 220 49 double precision number beginning with a "double quote" =; #X msg 99 48 "1.2345678765432; #X msg 320 94 "8.7654321234567; #X text 119 392 should be "9.9999999999999; #X text 14 34 add~~; #X obj 287 201 add~~; #X text 68 422 (c) IOhannes m zmoelnig 1999 - 2013; #X text 68 450 (c) Thomas Musil 2000 - 2013; #X text 314 13 15 digits accurate; #X obj 99 72 symtodp; #X obj 320 115 symtodp; #X symbolatom 439 307 25 0 0 0 - - -; #N canvas 0 22 330 356 sunsig~~ 0; #X obj 22 195 snapshot~; #X obj 47 103 metro 300; #X obj 46 81 loadbang; #X obj 22 18 inlet~; #X obj 122 18 inlet~; #X obj 122 195 snapshot~; #X obj 47 136 t b b; #X obj 36 277 outlet; #X obj 35 248 dptosym; #X connect 0 0 8 0; #X connect 1 0 6 0; #X connect 2 0 1 0; #X connect 3 0 0 0; #X connect 4 0 5 0; #X connect 5 0 8 1; #X connect 6 0 0 0; #X connect 6 1 5 0; #X connect 8 0 7 0; #X restore 439 281 pd sunsig~~; #X obj 440 226 sig~; #X floatatom 439 206 5 0 0 0 - - -; #X obj 440 256 +~~ 100 0; #X obj 516 255 add~~ 100 0; #X connect 12 0 16 1; #X connect 13 0 16 0; #X connect 14 0 16 3; #X connect 15 0 16 2; #X connect 16 0 19 0; #X connect 16 1 19 1; #X connect 18 0 17 0; #X connect 19 0 0 0; #X connect 24 0 32 0; #X connect 25 0 33 0; #X connect 32 0 13 0; #X connect 32 1 12 0; #X connect 33 0 15 0; #X connect 33 1 14 0; #X connect 35 0 34 0; #X connect 36 0 38 0; #X connect 37 0 36 0; #X connect 38 0 35 0; #X connect 38 1 35 1; iem_utils-v0.0.20181004/iem_dp/symtodp-help.pd0000644000175000017500000000410212630366345021075 0ustar zmoelnigzmoelnig#N canvas 175 36 767 494 10; #X text 169 289 output is a symbol of sum of both double casted inputs ; #X text 294 13 (only for help and debugging purpose); #X symbolatom 110 346 25 0 0 0 - - -; #X text 147 461 IEM KUG; #X text 131 449 musil; #X text 168 449 @; #X text 177 449 iem.at; #X text 130 471 Graz \, Austria; #X text 191 388 @; #X text 200 388 iem.at; #X text 131 423 zmoelnig; #X text 33 365 should be "1.2345678765432; #X floatatom 166 184 11 0 0 0 - - -; #X floatatom 143 211 11 0 0 0 - - -; #X text 168 235 the inputs are two floats \, left one is the float-casted value of a double value \, the right one is the float difference between double value and the float-casted.; #X text 227 210 float-casted; #X text 252 183 difference to double; #X obj 110 288 dptosym; #X text 81 13 symbol to double converter; #X text 14 12 symtodp; #X obj 61 157 symtodp; #X obj 61 86 makefilename %g67890; #X text 82 410 (c) IOhannes m zmoelnig 1999 - 2013; #X text 82 438 (c) Thomas Musil 2000 - 2013; #X text 59 47 symbol; #X msg 168 58 "1.234567890123456; #X msg 61 64 123.45; #X obj 61 109 makefilename %s123456; #X text 165 40 double quotes number selector; #X msg 620 78 1e+11; #X msg 619 102 1e+12; #X msg 378 103 1 0 0 0 0 0 0 0 0 0 0 0; #X msg 381 131 1 0 0 0 0 0 0 0 0 0 0 0 0; #X msg 379 77 3.14 15 926 535 89 79; #X obj 345 70 t l; #X text 378 44 space separated number list; #X text 619 51 float; #X obj 573 74 t f; #X text 403 57 (list of floats); #X text 386 152 the input needs a list of floats and integers \, which present a human readable double precision float; #X text 385 189 the outputs are two floats \, left one is the float-truncated value of internal double value \, the right one is the difference between internal value and left output.; #X connect 17 0 2 0; #X connect 20 0 13 0; #X connect 20 0 17 0; #X connect 20 1 12 0; #X connect 20 1 17 1; #X connect 21 0 27 0; #X connect 25 0 20 0; #X connect 26 0 21 0; #X connect 27 0 20 0; #X connect 29 0 37 0; #X connect 30 0 37 0; #X connect 31 0 34 0; #X connect 32 0 34 0; #X connect 33 0 34 0; #X connect 34 0 20 0; #X connect 37 0 20 0; iem_utils-v0.0.20181004/iem_dp/Makefile.pdlibbuilder0000644000175000017500000012415213303614575022232 0ustar zmoelnigzmoelnig# Makefile.pdlibbuilder dated 2018-03-15 version = 0.5.1 # Helper makefile for Pure Data external libraries. # Written by Katja Vetter March-June 2015 for the public domain. No warranties. # Inspired by Hans Christoph Steiner's Makefile Template and Stephan Beal's # ShakeNMake. # # Grab the newest version of Makefile.pdlibbuilder from # https://github.com/pure-data/pd-lib-builder/ # # GNU make version >= 3.81 required. # # #=== characteristics =========================================================== # # # - defines build settings based on autodetected OS and architecture # - defines rules to build Pd class- or lib executables from C or C++ sources # - defines rules for libdir installation # - defines convenience targets for developer and user # - evaluates implicit dependencies for non-clean builds # # #=== basic usage =============================================================== # # # In your Makefile, define your Pd lib name and class files, and include # Makefile.pdlibbuilder at the end of the Makefile. Like so: # # ________________________________________________________________________ # # # Makefile for mylib # # lib.name = mylib # # class.sources = myclass1.c myclass2.c # # datafiles = myclass1-help.pd myclass2-help.pd README.txt LICENSE.txt # # include Makefile.pdlibbuilder # ________________________________________________________________________ # # # For files in class.sources it is assumed that class basename == source file # basename. The default target builds all classes as individual executables # with Pd's default extension for the platform. For anything more than the # most basic usage, continue reading. # # #=== list of Makefile.pdlibbuilder API variables =============================== # # # Variables available for definition in your library Makefile: # # - lib.name # - lib.setup.sources # - class.sources # - common.sources # - shared.sources # - .class.sources # - .class.ldflags # - .class.ldlibs # - cflags # - ldflags # - ldlibs # - datafiles # - datadirs # - makefiles # - makefiledirs # - externalsdir # # Optional multiline defines evaluated per operating system: # # - forLinux # - forDarwin # - forWindows # # Variables available for your makefile or make command line: # # - make-lib-executable # - suppress-wunused # # Path variables for make command line or environment: # # - PDDIR # - PDINCLUDEDIR # - PDBINDIR # - PDLIBDIR # # Standard make variables for make command line or environment: # # - CPPFLAGS # - CFLAGS # - LDFLAGS # - CC # - CXX # - INSTALL # - STRIP # - DESTDIR # # Deprecated path variables: # # - pdincludepath # - pdbinpath # - objectsdir # # #=== descriptions of Makefile.pdlibbuilder API variables ======================= # # # lib.name: # Name of the library directory as it will be installed / distributed. Also the # name of the lib executable in the case where all classes are linked into # a single binary. # # lib.setup.sources: # Source file(s) (C or C++) which must be compiled only when linking all classes # into a single lib binary. # # class.sources: # All sources files (C or C++) for which the condition holds that # class name == source file basename. # # .class.sources: # Source file(s) (C or C++) specific to class . Use this for # multiple-source classes or when class name != source file basename. # # common.sources: # Source file(s) which must be statically linked to each class in the library. # # shared.sources: # Source file(s) (C or C++) to build a shared dynamic link lib, to be linked # with all class executables. # # cflags, ldflags, ldlibs: # Define cflags (preprocessor&compiler), ldflags (linker) and ldlibs (dynamic # link libs) for the whole library. These flags are added to platform-specific # flags defined by Makefile.pdlibbuilder. # # .class.ldflags and .class.ldlibs: # Define ldflags resp. ldlibs specific to class . These flags are # added to platform-specific flags defined by Makefile.pdlibbuilder, and flags # defined in your Makefile for the whole library. Note: cflags can not be # defined per class in the current implementation. # # datafiles and datadirs: # All extra files you want to include in binary distributions of the # library: abstractions and help patches, example patches, meta patch, readme # and license texts, manuals, sound files, etcetera. Use 'datafiles' for all # files that should go into your lib rootdir and 'datadirs' for complete # directories you want to copy from source to distribution. # # forLinux, forDarwin, forWindows: # Shorthand for 'variable definitions for Linux only' etc. Use like: # define forLinux # cflags += -DLINUX # class.sources += linuxthing.c # endef # # makefiles and makefiledirs: # Extra makefiles or directories with makefiles that should be made in sub-make # processes. # # make-lib-executable: # When this variable is defined 'yes' in your makefile or as command argument, # Makefile.pdlibbuilder will try to build all classes into a single library # executable (but it will force exit if lib.setup.sources is undefined). # If your makefile defines 'make-lib-executable=yes' as the library default, # this can still be overridden with 'make-lib-executable=no' as command argument # to build individual class executables (the Makefile.pdlibbuilder default.) # # suppress-wunused: # When this variable is defined ('yes' or any other value), -Wunused-variable, # -Wunused-parameter, -Wunused-value and -Wunused-function are suppressed, # but the other warnings from -Wall are retained. # # PDDIR: # Root directory of 'portable' pd package. When defined, PDINCLUDEDIR and # PDBINDIR will be evaluated as $(PDDIR)/src and $(PDDIR)/bin. # # PDINCLUDEDIR: # Directory where Pd API m_pd.h should be found, and other Pd header files. # Overrides the default search path. # # PDBINDIR: # Directory where pd.dll should be found for linking (Windows only). Overrides # the default search path. # # PDLIBDIR: # Root directory for installation of Pd library directories. Overrides the # default install location. # # DESTDIR: # Prepended path component for staged install. # # CPPFLAGS: # Preprocessor flags which are not strictly required for building. # # CFLAGS: # Compiler flags which are not strictly required for building. Compiler flags # defined by Makefile.pdlibbuilder for warning, optimization and architecture # specification are overriden by CFLAGS. # # LDFLAGS: # Linker flags which are not strictly required for building. Linker flags # defined by Makefile.pdlibbuilder for architecture specification are overriden # by LDFLAGS. # # CC and CXX: # C and C++ compiler programs as defined in your build environment. # # INSTALL # Definition of install program. # # STRIP # Name of strip program. Default 'strip' can be overridden in cross compilation # environments. # # objectsdir: # Root directory for installation of Pd library directories, like PDLIBDIR but # not overridable by environment. Supported for compatibility with pd-extended # central makefile, but deprecated otherwise. # # pdincludepath, pdbinpath: # As PDINCLUDEDIR and PDBINDIR but not overridable by environment. Deprecated # as user variables. # # #=== paths ===================================================================== # # # Source files in directories other than current working directory must be # prefixed with their relative path. Do not rely on VPATH or vpath. # Object (.o) files are built in the directory of their source files. # Executables are built in current working directory. # # Default search path for m_pd.h and other API header files is platform # dependent, and overridable by PDINCLUDEDIR: # # Linux: /usr/include/pd # # OSX: /Applications/Pd*.app/Contents/Resources/src # # Windows: %PROGRAMFILES%/Pd/src # %PROGRAMFILES(X86)%/Pd/src (32 bit builds on 64 bit Windows) # # Default search path for binary pd.dll (Windows), overridable by PDBINDIR # # %PROGRAMFILES%/Pd/bin # %PROGRAMFILES(X86)%/Pd/bin (32 bit builds on 64 bit Windows) # # Default location to install pd libraries is platform dependent, and # overridable by PDLIBDIR: # # Linux: /usr/local/lib/pd-externals # OSX: ~/Library/Pd # Windows: %APPDATA%/Pd # # https://puredata.info/docs/faq/how-do-i-install-externals-and-help-files # The rationale for not installing to ~/pd-externals by default on Linux # is that some people share the home dir between 32 and 64 bit installations. # # #=== targets =================================================================== # # # all: build $(executables) plus optional post target # post: target to build after $(executables) # alldebug: build all with -g option turned on for debug symbols # : force clean build of an individual class # .pre: make preprocessor output file in current working directory # .lst: make asm/source output file in current working directory # # install: install executables and data files # clean: remove build products from source tree # # help: print help text # vars: print makefile variables # allvars: print all variables # depend: print generated prerequisites # coffee: dummy target # # Variable $(executables) expands to class executables plus optional shared lib, # or alternatively to single lib executable when make-lib-executable=true. # Targets pre and post can be defined by library makefile. Make sure to include # Makefile.pdlibbuilder first so default target all will not be redefined. # # #=== Pd-extended libdir concept ================================================ # # # For libdir layout as conceived by Hans-Christoph Steiner, see: # # https://puredata.info/docs/developer/Libdir # # Files README.txt, LICENSE.txt and -meta.pd are part of the libdir # convention. Help patches for each class and abstraction are supposed to be # available. Makefile.pdlibbuilder does not force the presence of these files # however. It does not automatically include such files in libdir installations. # Data files you want to include in distributions must be defined explicitly in # your Makefile. # # #=== Makefile.pdlibbuilder syntax conventions ================================== # # # Makefile.pdlibbuilder variable names are lower case. Default make variables, # environment variables, and standard user variables (CC, CXX, CFLAGS, DESTDIR) # are upper case. Use target 'allvars' to print all variables and their values. # # 'Fields' in data variables are separated by dots, like in 'foo.class.sources'. # Words in variables expressing a function or command are separated by dashes, # like in 'make-lib-executable'. # # #=== useful make options ======================================================= # # # Use 'make -d ' to print debug details of the make process. # Use 'make -p ' to print make's database. # # #=== TODO ====================================================================== # # # - decide whether to use -static-libgcc or shared dll in MinGW # - cygwin support # - android support # - figure out how to handle '$' in filenames # - add makefile template targets dpkg-source dist libdir distclean tags? # # #=== end of documentation sections ============================================= # # ################################################################################ ################################################################################ ################################################################################ # GNU make version 3.81 (2006) or higher is required because of the following: # - function 'info' # - variable '.DEFAULT_GOAL' # force exit when make version is < 3.81 ifneq ($(firstword $(sort 3.81 $(MAKE_VERSION))), 3.81) $(error GNU make version 3.81 or higher is required) endif # Relative path to externals root dir in multi-lib source tree like # pd-extended SVN. Default is parent of current working directory. May be # defined differently in including makefile. externalsdir ?= .. # variable you can use to check if Makefile.pdlibbuilder is already included Makefile.pdlibbuilder = true ################################################################################ ### variables: library name and version ######################################## ################################################################################ # strip possibles spaces from lib.name, they mess up calculated file names lib.name := $(strip $(lib.name)) # if meta file exists, check library version metafile := $(wildcard $(lib.name)-meta.pd) ifdef metafile lib.version := $(shell sed -n \ 's|^\#X text [0-9][0-9]* [0-9][0-9]* VERSION \(.*\);|\1|p' \ $(metafile)) endif ################################################################################ ### variables: files ########################################################### ################################################################################ #=== sources =================================================================== # (re)define .class.sources using file names in class.sources define add-class-source $(notdir $(basename $v)).class.sources += $v endef $(foreach v, $(class.sources), $(eval $(add-class-source))) # derive class names from .class.sources variables sourcevariables := $(filter %.class.sources, $(.VARIABLES)) classes := $(basename $(basename $(sourcevariables))) # accumulate all source files specified in makefile classes.sources := $(sort $(foreach v, $(sourcevariables), $($v))) all.sources := $(classes.sources) $(lib.setup.sources) \ $(shared.sources) $(common.sources) #=== object files ============================================================== # construct object filenames from all C and C++ source file names classes.objects := $(addsuffix .o, $(basename $(classes.sources))) common.objects := $(addsuffix .o, $(basename $(common.sources))) shared.objects := $(addsuffix .o, $(basename $(shared.sources))) lib.setup.objects := $(addsuffix .o, $(basename $(lib.setup.sources))) all.objects = $(classes.objects) $(common.objects) $(shared.objects) \ $(lib.setup.objects) #=== executables =============================================================== # use recursive variables here because executable extension is not yet known # construct class executable names from class names classes.executables = $(addsuffix .$(extension), $(classes)) # construct shared lib executable name if shared sources are defined ifdef shared.sources shared.lib = lib$(lib.name).$(shared.extension) else shared.lib = endif ################################################################################ ### platform detection ######################################################### ################################################################################ #=== operating system ========================================================== # The following systems are defined: Linux, Darwin, Windows. GNU and # GNU/kFreeBSD are treated as Linux to get the same options. uname := $(shell uname) ifeq ($(findstring $(uname), Linux GNU GNU/kFreeBSD), $(uname)) system = Linux endif ifeq ($(uname), Darwin) system = Darwin endif ifeq ($(filter MINGW% MSYS%, $(uname)), $(uname)) system = Windows endif # Unfortunately not all Mingw versions provide a link cc > gcc, therefore # gcc is hardcoded here (but not if CC is redefined). ifeq ($(system), Windows) ifeq ($(origin CC), default) CC = gcc endif endif # evaluate possible system-specific multiline defines from library makefile $(eval $(for$(system))) # TODO: Cygwin, Android #=== architecture ============================================================== # native architecture of the build machine build.arch := $(shell uname -m) # Target architecture as reported by compiler. Give precedence to eventual # user-defined compiler. The first field of -- is extracted. ifneq ($(origin CXX), default) dumpmachine.cpu = $(firstword $(subst -, ,$(shell $(CXX) -dumpmachine))) else dumpmachine.cpu = $(firstword $(subst -, ,$(shell $(CC) -dumpmachine))) endif # Target architecture as reported by compiler is only used for Windows at the # moment. For other systems this still has to be tested. ifeq ($(system), Windows) target.arch = $(dumpmachine.cpu) else target.arch = $(build.arch) endif ################################################################################ ### variables per platform ##################################################### ################################################################################ #=== flags per architecture ==================================================== # Set architecture-dependent cflags, mainly for Linux. For Mac and Windows, # arch.c.flags are overriden below. # Raspberry Pi 1st generation ifeq ($(target.arch), armv6l) arch.c.flags = -march=armv6 -mfpu=vfp -mfloat-abi=hard # Beagle, Udoo, RPi2 etc. else ifeq ($(target.arch), armv7l) arch.c.flags = -march=armv7-a -mfpu=vfpv3 -mfloat-abi=hard # Intel 32 bit, build with SSE and SSE2 instructions else ifeq ($(findstring $(target.arch), i386 i686), $(target.arch)) arch.c.flags = -march=pentium4 -mfpmath=sse -msse -msse2 # Intel/AMD 64 bit, build with SSE, SSE2 and SSE3 instructions else ifeq ($(findstring $(target.arch), x86_64), $(target.arch)) arch.c.flags = -march=core2 -mfpmath=sse -msse -msse2 -msse3 # if none of the above architectures detected else arch.c.flags = endif #=== flags and paths for Linux ================================================= ifeq ($(system), Linux) prefix = /usr/local libdir := $(prefix)/lib pkglibdir = $(libdir)/pd-externals pdincludepath := $(wildcard /usr/include/pd) extension = pd_linux cpp.flags := -DUNIX c.flags := -fPIC c.ldflags := -rdynamic -shared -fPIC -Wl,-rpath,"\$$ORIGIN",--enable-new-dtags c.ldlibs := -lc -lm cxx.flags := -fPIC -fcheck-new cxx.ldflags := -rdynamic -shared -fPIC -Wl,-rpath,"\$$ORIGIN",--enable-new-dtags cxx.ldlibs := -lc -lm -lstdc++ shared.extension = so shared.ldflags := -rdynamic -fPIC -shared -Wl,-soname,$(shared.lib) endif #=== flags and paths for Darwin ================================================ # On OSX we try to build fat binaries by default. It is assumed that OSX i386 # can build for ppc and OSX x86_64 can't. TODO: try to refine this condition. # LLVM-clang doesn't support -fcheck-new, therefore this flag is omitted for # OSX x86_64. ifeq ($(system), Darwin) pkglibdir = $(HOME)/Library/Pd pdincludepath := $(firstword $(wildcard \ /Applications/Pd*.app/Contents/Resources/src)) extension = pd_darwin cpp.flags := -DUNIX -DMACOSX -I /sw/include c.flags := c.ldflags := -undefined suppress -flat_namespace -bundle c.ldlibs := -lc cxx.ldflags := -undefined suppress -flat_namespace -bundle cxx.ldlibs := -lc shared.extension = dylib shared.ldflags = -dynamiclib -undefined dynamic_lookup \ -install_name @loader_path/$(shared.lib) \ -compatibility_version 1 -current_version 1.0 version.flag := $(filter $(cflags), -mmacosx-version-min=%) ifeq ($(target.arch), i386) cxx.flags := -fcheck-new arch := ppc i386 x86_64 version.flag ?= -mmacosx-version-min=10.4 endif ifeq ($(target.arch), x86_64) arch := i386 x86_64 version.flag ?= -mmacosx-version-min=10.5 endif arch.c.flags := $(addprefix -arch , $(arch)) $(version.flag) arch.ld.flags := $(arch.c.flags) endif #=== flags and paths for Windows =============================================== # Standard paths on Windows contain spaces, and GNU make functions treat such # paths as lists, with unintended effects. Therefore we must use shell function # ls instead of make's wildcard when probing for a path, and use double quotes # when specifying a path in a command argument. # Default paths in Mingw / Mingw-w64 environments. 'PROGRAMFILES' is standard # location for builds with native architecture, 'ProgramFiles(x86)' for i686 # builds on x86_64 Windows (detection method by Lucas Cordiviola). Curly braces # required because of parentheses in variable name. ifeq ($(system), Windows) pkglibdir := $(APPDATA)/Pd ifeq ($(MINGW_CHOST), i686-w64-mingw32) programfiles := ${ProgramFiles(x86)} else programfiles := $(PROGRAMFILES) endif pdbinpath := $(programfiles)/Pd/bin pdincludepath := $(programfiles)/Pd/src endif # Store default path to pd.dll in PDBINDIR if the latter is not user-defined. # For include path this is done in the platform-independent paths section below, # but for PDBINDIR it is done here so ld flags can be evaluated as immediate # variables. ifeq ($(system), Windows) ifdef PDDIR PDBINDIR := $(PDDIR)/bin endif PDBINDIR ?= $(pdbinpath) endif # TODO: decide whether -mms-bitfields should be specified. ifeq ($(system), Windows) cpp.flags := -DMSW -DNT ifeq ($(filter i%86 mingw32, $(target.arch)), $(target.arch)) arch.c.flags := -march=pentium4 -msse -msse2 -mfpmath=sse else ifeq (x86_64, $(target.arch)) cpp.flags := -DMSW -DNT -DPD_LONGINTTYPE=__int64 arch.c.flags := -march=core2 -msse -msse2 -msse3 -mfpmath=sse else arch.c.flags = endif extension = dll c.flags := c.ldflags := -static-libgcc -shared \ -Wl,--enable-auto-import "$(PDBINDIR)/pd.dll" c.ldlibs := cxx.flags := -fcheck-new cxx.ldflags := -static-libgcc -static-libstdc++ -shared \ -Wl,--enable-auto-import "$(PDBINDIR)/pd.dll" cxx.ldlibs := shared.extension = dll shared.ldflags := -static-libgcc -shared "$(PDBINDIR)/pd.dll" stripflags = --strip-all endif #=== paths ===================================================================== # Platform-dependent default paths are specified above, but overridable. # Path variables in upper case can be defined as make command argument or in the # environment. Variable 'objectsdir' is supported for compatibility with # the build system that pd-l2ork has inherited from pd-extended. PDINCLUDEDIR ?= $(pdincludepath) PDLIBDIR ?= $(firstword $(objectsdir) $(pkglibdir)) ifdef PDDIR PDINCLUDEDIR := $(wildcard $(PDDIR)/src) endif # base path where all components of the lib will be installed by default installpath := $(DESTDIR)$(PDLIBDIR)/$(lib.name) # check if include path contains spaces (as is often the case on Windows) # if so, store the path so we can later do checks with it pdincludepathwithspaces := $(if $(word 2, $(PDINCLUDEDIR)), $(PDINCLUDEDIR)) #=== accumulated build flags =================================================== # From GNU make docs: 'Users expect to be able to specify CFLAGS freely # themselves.' So we use CFLAGS to define options which are not strictly # required for compilation: optimizations, architecture specifications, and # warnings. CFLAGS can be safely overriden using a make command argument. # Variables cflags, ldflags and ldlibs may be defined in including makefile. optimization.flags = -O3 -ffast-math -funroll-loops -fomit-frame-pointer warn.flags = -Wall -Wextra -Wshadow -Winline -Wstrict-aliasing # suppress -Wunused-variable & Co if you don't want to clutter a build log ifdef suppress-wunused warn.flags += $(addprefix -Wno-unused-, function parameter value variable) endif CFLAGS = $(warn.flags) $(optimization.flags) $(arch.c.flags) # preprocessor flags cpp.flags := -DPD -I "$(PDINCLUDEDIR)" $(cpp.flags) $(CPPFLAGS) # flags for dependency checking (cflags from makefile may define -I options) depcheck.flags := $(cpp.flags) $(cflags) # architecture specifications for linker are overridable by LDFLAGS LDFLAGS := $(arch.ld.flags) # now add the same ld flags to shared dynamic lib shared.ldflags := $(shared.ldflags) $(LDFLAGS) # accumulated flags for C compiler / linker c.flags := $(cpp.flags) $(c.flags) $(cflags) $(CFLAGS) c.ldflags := $(c.ldflags) $(ldflags) $(LDFLAGS) c.ldlibs := $(c.ldlibs) $(ldlibs) # accumulated flags for C++ compiler / linker cxx.flags := $(cpp.flags) $(cxx.flags) $(cflags) $(CFLAGS) cxx.ldflags := $(cxx.ldflags) $(ldflags) $(LDFLAGS) cxx.ldlibs := $(cxx.ldlibs) $(ldlibs) ################################################################################ ### variables: tools ########################################################### ################################################################################ # aliases so we can later define 'compile-$1' and set 'c' or 'cxx' as argument compile-c := $(CC) compile-cxx := $(CXX) ################################################################################ ### checks ##################################################################### ################################################################################ # At this point most variables are defined. Now do some checks and info's # before rules begin. # 'forward declaration' of default target, needed to do checks all: # To avoid unpredictable results, make sure the default target is not redefined # by including makefile. ifneq ($(.DEFAULT_GOAL), all) $(error Default target must be 'all'.) endif # find out which target(s) will be made ifdef MAKECMDGOALS goals := $(MAKECMDGOALS) else goals := all endif # store path to Pd API m_pd.h if it is found ifdef PDINCLUDEDIR mpdh := $(shell ls "$(PDINCLUDEDIR)/m_pd.h") endif # store path to pd.dll; if not found, ls will give a useful error ifeq ($(system), Windows) pddll := $(shell ls "$(PDBINDIR)/pd.dll") endif # print Makefile.pdlibbuilder version $(info ++++ info: using Makefile.pdlibbuilder version $(version)) # when making target all, check if m_pd.h is found and print info about it ifeq ($(goals), all) $(if $(mpdh), \ $(info ++++ info: using Pd API $(mpdh)), \ $(warning Where is Pd API m_pd.h? Do 'make help' for info.)) endif # print target info $(info ++++ info: making target $(goals) $(if $(lib.name),in lib $(lib.name))) # when installing, print installpath info $(if $(filter install install-lib, $(goals)), $(info ++++ info: \ installpath is '$(installpath)')) #=== define executables ======================================================== # By default we build class executables, and optionally a shared dynamic link # lib. When make-lib-executable=yes we build all classes into a single lib # executable, on the condition that variable lib.setup.sources is defined. ifeq ($(make-lib-executable),yes) $(if $(lib.setup.sources), ,\ $(error Can not build library blob because lib.setup.sources is undefined)) executables := $(lib.name).$(extension) else executables := $(classes.executables) $(shared.lib) endif ################################################################################ ### rules: special targets ##################################################### ################################################################################ # Disable built-in rules. If some target can't be built with the specified # rules, it should not be built at all. MAKEFLAGS += --no-builtin-rules .PRECIOUS: .SUFFIXES: .PHONY: all post build-lib \ $(classes) $(makefiledirs) $(makefiles) \ install install-executables install-datafiles install-datadirs \ force clean vars allvars depend help ################################################################################ ### rules: build targets ####################################################### ################################################################################ # Target all forces the build of targets [$(executables) post] in # deterministic order. Target $(executables) builds class executables plus # optional shared lib or alternatively a single lib executable when # make-lib-executable=true. Target post is optionally defined by # library makefile. all: post post: $(executables) all: $(info ++++info: target all in lib $(lib.name) completed) # build all with -g option turned on for debug symbols alldebug: c.flags += -g alldebug: cxx.flags += -g alldebug: all #=== class executable ========================================================== # recipe for linking objects in class executable # argument $1 = compiler type (c or cxx) # argument $2 = class basename define link-class $(compile-$1) \ $($1.ldflags) $($2.class.ldflags) \ -o $2.$(extension) \ $(addsuffix .o, $(basename $($2.class.sources))) \ $(addsuffix .o, $(basename $(common.sources))) \ $($1.ldlibs) $($2.class.ldlibs) $(shared.lib) endef # general rule for linking object files in class executable %.$(extension): $(shared.lib) $(info ++++ info: linking objects in $@ for lib $(lib.name)) $(if $(filter %.cc %.cpp, $($*.class.sources)), \ $(call link-class,cxx,$*), \ $(call link-class,c,$*)) #=== library blob ============================================================== # build all classes into single executable build-lib: $(lib.name).$(extension) $(info ++++ info: library blob $(lib.name).$(extension) completed) # recipe for linking objects in lib executable # argument $1 = compiler type (c or cxx) define link-lib $(compile-$1) \ $($1.ldflags) $(lib.ldflags) \ -o $(lib.name).$(extension) $(all.objects) \ $($1.ldlibs) $(lib.ldlibs) endef # rule for linking objects in lib executable # declared conditionally to avoid name clashes ifeq ($(make-lib-executable),yes) $(lib.name).$(extension): $(all.objects) $(if $(filter %.cc %.cpp, $(all.sources)), \ $(call link-lib,cxx), \ $(call link-lib,c)) endif #=== shared dynamic lib ======================================================== # recipe for linking objects in shared executable # argument $1 = compiler type (c or cxx) define link-shared $(compile-$1) \ $(shared.ldflags) \ -o lib$(lib.name).$(shared.extension) $(shared.objects) \ $($1.ldlibs) $(shared.ldlibs) endef # rule for linking objects in shared executable # build recipe is in macro 'link-shared' lib$(lib.name).$(shared.extension): $(shared.objects) $(info ++++ info: linking objects in shared lib $@) $(if $(filter %.cc %.cpp, $(shared.sources)), \ $(call link-shared,cxx), \ $(call link-shared,c)) #=== object files ============================================================== # recipe to make .o file from source # argument $1 is compiler type (c or cxx) define make-object-file $(info ++++ info: making $@ in lib $(lib.name)) $(compile-$1) \ $($1.flags) \ -o $@ -c $< endef # Three rules to create .o files. These are double colon 'terminal' rules, # meaning they are the last in a rules chain. %.o:: %.c $(call make-object-file,c) %.o:: %.cc $(call make-object-file,cxx) %.o:: %.cpp $(call make-object-file,cxx) #=== explicit prerequisites for class executables ============================== # For class executables, prerequisite rules are declared in run time. Target # 'depend' prints these rules for debugging purposes. # declare explicit prerequisites rule like 'class: class.extension' # argument $v is class basename define declare-class-target $v: $v.$(extension) endef # declare explicit prerequisites rule like 'class.extension: object1.o object2.o' # argument $v is class basename define declare-class-executable-target $v.$(extension): $(addsuffix .o, $(basename $($v.class.sources))) \ $(addsuffix .o, $(basename $(common.sources))) endef # evaluate explicit prerequisite rules for all classes $(foreach v, $(classes), $(eval $(declare-class-target))) $(foreach v, $(classes), $(eval $(declare-class-executable-target))) #=== implicit prerequisites for class executables ============================== # Evaluating implicit prerequisites (header files) with help from the # preprocessor is 'expensive' so this is done conditionally and selectively. # Note that it is also possible to trigger a build via install targets, in # which case implicit prerequisites are not checked. # When the Pd include path contains spaces it will mess up the implicit # prerequisites rules. disable-dependency-tracking := $(strip $(pdincludepathwithspaces)) ifndef disable-dependency-tracking must-build-everything := $(filter all, $(goals)) must-build-class := $(filter $(classes), $(goals)) must-build-sources := $(foreach v, $(must-build-class), $($v.class.sources)) endif # declare implicit prerequisites rule like 'object.o: header1.h header2.h ...' # argument $1 is input source file(s) # dir is explicitly added because option -MM strips it by default define declare-object-target $(dir $1)$(filter %.o: %.h, $(shell $(CPP) $(depcheck.flags) -MM $1)) $(MAKEFILE_LIST) endef # evaluate implicit prerequisite rules when rebuilding everything ifdef must-build-everything $(if $(wildcard $(all.objects)), \ $(info ++++ info: evaluating implicit prerequisites in lib $(lib.name).....) \ $(foreach v, $(all.sources), $(eval $(call declare-object-target, $v)))) endif # evaluate implicit prerequisite rules when selectively building classes ifdef must-build-class $(foreach v, $(must-build-sources), \ $(eval $(call declare-object-target, $v))) $(foreach v, $(shared.sources), \ $(eval $(call declare-object-target, $v))) endif ################################################################################ ### rules: preprocessor and assembly files ##################################### ################################################################################ # Preprocessor and assembly output files for bug tracing etc. They are not part # of the build processes for executables. By default these files are created in # the current working directory. Dependency tracking is not performed, the build # is forced instead to make sure it's up to date. force: #=== preprocessor file ========================================================= # make preprocessor output file with extension .pre # argument $1 = compiler type (c or cxx) define make-preprocessor-file $(info ++++ info: making preprocessor output file $(notdir $*.pre) \ in current working directory) $(compile-$1) -E $< $(c.flags) $($1.flags) -o $(notdir $*.pre) endef %.pre:: %.c force $(call make-preprocessor-file,c) %.pre:: %.cc force $(call make-preprocessor-file,cxx) %.pre:: %.cpp force $(call make-preprocessor-file,cxx) #=== assembly file ============================================================= # make C / assembly interleaved output file with extension .lst # argument $1 = compiler type (c or cxx) define make-assembly-file $(info ++++ info: making assembly output file $(notdir $*.lst) \ in current working directory) $(compile-$1) \ -c -Wa,-a,-ad -fverbose-asm \ $($1.flags) \ $< > $(notdir $*.lst) endef %.lst:: %.c force $(call make-assembly-file,c) %.lst:: %.cc force $(call make-assembly-file,cxx) %.lst:: %.cpp force $(call make-assembly-file,cxx) ################################################################################ ### rules: installation targets ################################################ ################################################################################ #=== strip ===================================================================== # Stripping of installed binaries will only be done when variable 'stripflags' # is defined non-empty. No default definition is provided except for Windows # where the unstripped binaries are large, especially in the case of Mingw-w64. # Note: while stripping all symbols ('-s' or '--strip-all') is possible for # Linux and Windows, in the case of OSX only non-global symbols can be stripped # (option '-x' or '--discard-all'). # Make definition of strip command overridable so it can be defined in an # environment for cross-compilation. STRIP ?= strip # Commands in 'strip-executables' will be executed conditionally in the rule for # target 'install-executables'. strip-executables = cd "$(installpath)" && \ $(foreach v, $(executables), $(STRIP) $(stripflags) '$v';) #=== install =================================================================== # Install targets depend on successful exit status of target all because nothing # must be installed in case of a build error. # -p = preserve time stamps # -m = set permission mode (as in chmod) # -d = create all components of specified directories INSTALL = install INSTALL_PROGRAM := $(INSTALL) -p -m 644 INSTALL_DATA := $(INSTALL) -p -m 644 INSTALL_DIR := $(INSTALL) -m 755 -d # strip spaces from file names executables := $(strip $(executables)) datafiles := $(strip $(datafiles)) datadirs := $(strip $(datadirs)) # Do not make any install sub-target with empty variable definition because the # install program would exit with an error. install: $(if $(executables), install-executables) install: $(if $(datafiles), install-datafiles) install: $(if $(datadirs), install-datadirs) install-executables: all $(INSTALL_DIR) -v "$(installpath)" $(foreach v, $(executables), \ $(INSTALL_PROGRAM) '$v' "$(installpath)";) $(info ++++ info: executables of lib $(lib.name) installed \ from $(CURDIR) to $(installpath)) $(if $(stripflags), $(strip-executables),) install-datafiles: all $(INSTALL_DIR) -v "$(installpath)" $(foreach v, $(datafiles), \ $(INSTALL_DATA) '$(v)' "$(installpath)";) $(info ++++ info: data files of lib $(lib.name) installed \ from $(CURDIR) to $(installpath)) install-datadirs: all $(foreach v, $(datadirs), $(INSTALL_DIR) "$(installpath)/$v";) $(foreach v, $(datadirs), \ $(INSTALL_DATA) $(wildcard $v/*) "$(installpath)/$v";) $(info ++++ info: data directories of lib $(lib.name) installed \ from $(CURDIR) to $(installpath)) ################################################################################ ### rules: distribution targets ################################################ ################################################################################ # TODO # These targets are implemented in Makefile Template, but I have to figure out # how to do it under the not-so-strict conditions of Makefile.pdlibbuilder. # make source package dist: @echo "target dist not yet implemented" # make Debian source package dpkg-source: @echo "target dpkg-source not yet implemented" $(ORIGDIR): $(DISTDIR): ################################################################################ ### rules: clean targets ####################################################### ################################################################################ # delete build products from build tree clean: rm -f $(all.objects) rm -f $(classes.executables) $(lib.name).$(extension) $(shared.lib) rm -f *.pre *.lst # remove distribution directories and tarballs from build tree distclean: clean @echo "target distclean not yet implemented" ################################################################################ ### rules: submake targets ##################################################### ################################################################################ # Iterate over sub-makefiles or makefiles in other directories. # When 'continue-make=yes' is set, sub-makes will report 'true' to the parent # process regardless of their real exit status. This prevents the parent make # from being aborted by a sub-make error. Useful when you want to quickly find # out which sub-makes from a large set will succeed. ifeq ($(continue-make),yes) continue = || true endif # These targets will trigger sub-make processes for entries in 'makefiledirs' # and 'makefiles'. all alldebug install clean distclean dist dkpg-source: \ $(makefiledirs) $(makefiles) # this expands to identical rules for each entry in 'makefiledirs' $(makefiledirs): $(MAKE) --directory=$@ $(MAKECMDGOALS) $(continue) # this expands to identical rules for each entry in 'makefiles' $(makefiles): $(MAKE) --directory=$(dir $@) --makefile=$(notdir $@) $(MAKECMDGOALS) $(continue) ################################################################################ ### rules: convenience targets ################################################# ################################################################################ #=== show variables ============================================================ # Several 'function' macro's cause errors when expanded within a rule or without # proper arguments. Variables which are set with the define directive are only # shown by name for that reason. functions = \ add-class-source \ declare-class-target \ declare-class-executable-target \ declare-object-target \ link-class \ link-lib \ link-shared \ make-object-file \ make-preprocessor-file \ make-assembly-file # show variables from makefiles vars: $(info ++++ info: showing makefile variables:) $(foreach v,\ $(sort $(filter-out $(functions) functions, $(.VARIABLES))),\ $(if $(filter file, $(origin $v)),\ $(info variable $v = $($v)))) $(foreach v, $(functions), $(info 'function' name: $v)) @echo # show all variables allvars: $(info ++++ info: showing default, automatic and makefile variables:) $(foreach v, \ $(sort $(filter-out $(functions) functions, $(.VARIABLES))), \ $(info variable ($(origin $v)) $v = $($v))) $(foreach v, $(functions), $(info 'function' name: $v)) @echo #=== show dependencies ========================================================= # show generated prerequisites rules depend: $(info ++++ info: generated prerequisite rules) $(foreach v, $(classes), $(info $(declare-class-target))) $(foreach v, $(classes), $(info $(declare-class-executable-target))) $(foreach v, $(all.sources), $(info $(call declare-object-target, $v))) @echo #=== show help text ============================================================ # brief info about targets and paths ifdef mpdh mpdhinfo := $(mpdh) else mpdhinfo := m_pd.h was not found. Is Pd installed? endif help: @echo @echo " Main targets:" @echo " all: build executables (default target)" @echo " install: install all components of the library" @echo " vars: print makefile variables for troubleshooting" @echo " allvars: print all variables for troubleshooting" @echo " help: print this help text" @echo @echo " Pd API m_pd.h:" @echo " $(mpdhinfo)" @echo " You may specify your preferred Pd include directory as argument" @echo " to the make command, like 'PDINCLUDEDIR=path/to/pd/src'." @echo @echo " Path for installation of your libdir(s):" @echo " $(PDLIBDIR)" @echo " Alternatively you may specify your path for installation as argument" @echo " to the make command, like 'PDLIBDIR=path/to/pd-externals'." @echo @echo " Default paths are listed in the doc sections in Makefile.pdlibbuilder." @echo #=== dummy target ============================================================== coffee: @echo "Makefile.pdlibbuilder: Can not make coffee. Sorry." ################################################################################ ### end of rules sections ###################################################### ################################################################################ # for syntax highlighting in vim and github # vim: set filetype=make: iem_utils-v0.0.20181004/iem_dp/div~~-help.pd0000644000175000017500000000510012630366345020553 0ustar zmoelnigzmoelnig#N canvas 291 113 944 545 10; #X symbolatom 194 388 25 0 0 0 - - -; #X text 134 493 IEM KUG; #X text 118 481 musil; #X text 155 481 @; #X text 164 481 iem.at; #X text 117 503 Graz \, Austria; #X text 177 455 @; #X text 186 455 iem.at; #X text 118 455 zmoelnig; #X obj 139 97 sig~; #X obj 99 97 sig~; #X obj 360 144 sig~; #X obj 320 144 sig~; #X msg 13 84 \; pd dsp \$1; #X obj 13 64 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 1 ; #X text 70 13 double precision signal multiplication; #N canvas 0 22 330 356 sunsig~~ 0; #X obj 22 195 snapshot~; #X obj 47 103 metro 300; #X obj 46 81 loadbang; #X obj 22 18 inlet~; #X obj 122 18 inlet~; #X obj 122 195 snapshot~; #X obj 47 136 t b b; #X obj 36 277 outlet; #X obj 35 248 dptosym; #X connect 0 0 8 0; #X connect 1 0 6 0; #X connect 2 0 1 0; #X connect 3 0 0 0; #X connect 4 0 5 0; #X connect 5 0 8 1; #X connect 6 0 0 0; #X connect 6 1 5 0; #X connect 8 0 7 0; #X restore 195 260 pd sunsig~~; #X text 14 12 /~~; #X obj 194 203 /~~ #######; #X text 117 406 should be "1.111111; #X text 406 105 = symbol selector of an anything; #X text 396 94 double precision number beginning with a "double quote" =; #X text 225 63 = symbol selector of an anything; #X text 215 52 double precision number beginning with a "double quote" =; #X msg 320 94 "1.111111; #X msg 99 51 "1.234567654321; #X text 386 388 quotient displayed via a symbol; #X text 13 38 div~~; #X obj 297 203 div~~; #X text 374 13 15 digits accurate; #X text 69 442 (c) IOhannes m zmoelnig 1999 - 2013; #X text 69 470 (c) Thomas Musil 2000 - 2013; #X obj 99 72 symtodp; #X obj 320 115 symtodp; #X symbolatom 439 307 25 0 0 0 - - -; #N canvas 0 22 330 356 sunsig~~ 0; #X obj 22 195 snapshot~; #X obj 47 103 metro 300; #X obj 46 81 loadbang; #X obj 22 18 inlet~; #X obj 122 18 inlet~; #X obj 122 195 snapshot~; #X obj 47 136 t b b; #X obj 36 277 outlet; #X obj 35 248 dptosym; #X connect 0 0 8 0; #X connect 1 0 6 0; #X connect 2 0 1 0; #X connect 3 0 0 0; #X connect 4 0 5 0; #X connect 5 0 8 1; #X connect 6 0 0 0; #X connect 6 1 5 0; #X connect 8 0 7 0; #X restore 439 281 pd sunsig~~; #X obj 440 226 sig~; #X floatatom 439 206 5 0 0 0 - - -; #X obj 440 256 /~~ 100 0; #X obj 516 255 div~~ 100 0; #X connect 9 0 18 1; #X connect 10 0 18 0; #X connect 11 0 18 3; #X connect 12 0 18 2; #X connect 14 0 13 0; #X connect 16 0 0 0; #X connect 18 0 16 0; #X connect 18 1 16 1; #X connect 24 0 33 0; #X connect 25 0 32 0; #X connect 32 0 10 0; #X connect 32 1 9 0; #X connect 33 0 12 0; #X connect 33 1 11 0; #X connect 35 0 34 0; #X connect 36 0 38 0; #X connect 37 0 36 0; #X connect 38 0 35 0; #X connect 38 1 35 1; iem_utils-v0.0.20181004/iem_dp/Makefile0000644000175000017500000000236513303617165017571 0ustar zmoelnigzmoelnig#!/usr/bin/make -f # Makefile to the 'iemguts' library for Pure Data. # Needs Makefile.pdlibbuilder as helper makefile for platform-dependent build # settings and rules (https://github.com/pure-data/pd-lib-builder). lib.name = iem_dp # special file that does not provide a class lib.setup.sources = src/iem_dp.c # all other C and C++ files in subdirs are source files per class # (alternatively, enumerate them by hand) class.sources = $(filter-out $(lib.setup.sources),$(wildcard src/*.c)) datafiles = \ $(wildcard *.pd) \ README.txt \ GnuGPL.txt \ LICENSE.txt \ $(empty) #cflags = -DVERSION=$(shell cat VERSION.txt) ## build a multi-object library make-lib-executable=yes ## suppress "unused" warnings #suppress-wunused=yes ################################################################################ ### pdlibbuilder ############################################################### ################################################################################ # This Makefile is based on the Makefile from pd-lib-builder written by # Katja Vetter. You can get it from: # https://github.com/pure-data/pd-lib-builder PDLIBBUILDER_DIR=pd-lib-builder/ include $(firstword $(wildcard $(PDLIBBUILDER_DIR)/Makefile.pdlibbuilder Makefile.pdlibbuilder)) iem_utils-v0.0.20181004/iem_dp/delread~~-help.pd0000644000175000017500000000166212630366345021402 0ustar zmoelnigzmoelnig#N canvas 248 216 633 323 10; #X obj 32 25 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 1 ; #X msg 33 48 \; pd dsp \$1; #X obj 175 65 sig~; #X floatatom 174 40 5 0 0 0 - - -; #X obj 178 197 delread~~ abc 1234 0; #X obj 178 224 unsig~; #X floatatom 178 248 5 0 0 0 - - -; #X obj 176 91 delwrite~~ abc 9876 0; #X msg 221 166 2345 0; #X msg 242 145 3456 0; #X floatatom 163 148 5 0 0 0 - - -; #X floatatom 310 144 5 0 0 0 - - -; #X obj 390 226 unsig~; #X floatatom 390 250 5 0 0 0 - - -; #X floatatom 382 122 5 0 0 0 - - -; #X floatatom 437 122 5 0 0 0 - - -; #X obj 390 199 vd~~ abc; #X obj 382 141 sig~; #X obj 436 144 sig~; #X connect 0 0 1 0; #X connect 2 0 7 0; #X connect 3 0 2 0; #X connect 4 0 5 0; #X connect 5 0 6 0; #X connect 8 0 4 0; #X connect 9 0 4 0; #X connect 10 0 4 0; #X connect 11 0 4 1; #X connect 12 0 13 0; #X connect 14 0 17 0; #X connect 15 0 18 0; #X connect 16 0 12 0; #X connect 17 0 16 0; #X connect 18 0 16 1; iem_utils-v0.0.20181004/iem_dp/mul__-help.pd0000644000175000017500000000257012630366345020500 0ustar zmoelnigzmoelnig#N canvas 223 169 932 536 10; #X symbolatom 167 326 25 0 0 0 - - -; #X text 104 453 IEM KUG; #X text 88 441 musil; #X text 125 441 @; #X text 134 441 iem.at; #X text 87 463 Graz \, Austria; #X text 147 415 @; #X text 156 415 iem.at; #X text 88 415 zmoelnig; #X floatatom 251 245 11 0 0 0 - - -; #X floatatom 227 273 11 0 0 0 - - -; #X text 337 244 difference; #X text 55 13 double precision multiplication; #X text 311 272 float casted; #X text 14 12 *__; #X text 349 326 product displayed via a symbol; #X obj 165 209 *__ 0 0; #X text 90 342 should be "1.234567654321; #X msg 163 61 "1.111111; #X msg 385 98 "1.111111; #X text 250 73 = symbol selector of an anything; #X text 240 62 double precision number beginning with a "double quote" =; #X text 471 109 = symbol selector of an anything; #X text 461 98 double precision number beginning with a "double quote" =; #X obj 166 303 dptosym; #X obj 239 209 mul__ 0 0; #X obj 316 209 *'' 0 0; #X text 14 32 mul__; #X text 14 57 *''; #X text 294 13 15 digits accurate; #X text 39 402 (c) IOhannes m zmoelnig 1999 - 2013; #X text 39 430 (c) Thomas Musil 2000 - 2013; #X obj 164 87 symtodp; #X obj 385 120 symtodp; #X connect 16 0 10 0; #X connect 16 0 24 0; #X connect 16 1 9 0; #X connect 16 1 24 1; #X connect 18 0 32 0; #X connect 19 0 33 0; #X connect 24 0 0 0; #X connect 32 0 16 0; #X connect 32 1 16 1; #X connect 33 0 16 2; #X connect 33 1 16 3; iem_utils-v0.0.20181004/iem_dp/tabread~~-help.pd0000644000175000017500000000376512630366345021412 0ustar zmoelnigzmoelnig#N canvas 78 22 896 636 10; #X obj 28 14 tgl 15 0 empty empty empty 20 8 0 10 -262144 -1 -1 0 1 ; #X floatatom 28 81 5 0 0 0 - - -; #X floatatom 44 59 3 0 0 0 - - -; #X obj 28 36 dsp; #X obj 408 27 loadbang; #X text 417 231 see also:; #N canvas 0 22 450 300 (subpatch) 0; #X array array99 13 float 0; #X coords 0 5.5 12 -5.5 250 200 1; #X restore 121 44 graph; #X obj 41 523 snapshot~; #X obj 176 507 metro 200; #X obj 40 408 sig~; #X floatatom 41 549 0 0 0 0 - - -; #X obj 176 462 loadbang; #X obj 176 486 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X floatatom 40 369 0 0 0 0 - - -; #X obj 408 50 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X obj 43 350 hsl 101 15 1 11 0 0 empty empty empty -2 -6 0 8 -262144 -1 -1 0 1; #X text 498 548 IEM KUG; #X text 482 536 musil; #X text 519 536 @; #X text 528 536 iem.at; #X text 481 558 Graz \, Austria; #X text 541 510 @; #X text 550 510 iem.at; #X text 482 510 zmoelnig; #X msg 408 72 \; array99 resize 13 \; array99 0 -5 -5 -4 -3 -2 -1 0 1 2 3 4 5 5 \; array99 bounds 0 5.5 12 -5.5 \; array99 xticks 0 1 2 \; array99 yticks 0 0.5 5 \; array99 xlabel -6 0 2 4 6 8 10 12 \; array99 ylabel -0.4 -5 -4 -3 -2 -1 0 1 2 3 4 5; #X obj 484 230 tabread~; #X obj 41 488 tabread~~ array99; #X obj 84 427 sig~; #X text 71 408 first part of float inlet sum; #X text 113 426 second part of float inlet sum; #X text 13 -15 tabread~~; #X text 434 497 (c) IOhannes m zmoelnig 1999 - 2013; #X text 433 525 (c) Thomas Musil 2000 - 2013; #X text 117 -13 non-interpolating table lookup with double precision index (15 digits accurate); #X text 118 -37; #X text 44 272 tabread is used to build samplers and other table lookup algorithms. The interpolation scheme is rounding down integer.; #X connect 0 0 3 0; #X connect 3 0 1 0; #X connect 3 1 2 0; #X connect 4 0 14 0; #X connect 7 0 10 0; #X connect 8 0 7 0; #X connect 9 0 26 0; #X connect 11 0 12 0; #X connect 12 0 8 0; #X connect 13 0 9 0; #X connect 14 0 24 0; #X connect 15 0 13 0; #X connect 26 0 7 0; #X connect 27 0 26 1; iem_utils-v0.0.20181004/iem_dp/GnuGPL.txt0000644000175000017500000004311012630366345017762 0ustar zmoelnigzmoelnig GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This program is free software; you can redistribute it and/or 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, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Library General Public License instead of this License. iem_utils-v0.0.20181004/iem_dp/tabread__-help.pd0000644000175000017500000000522612630366345021306 0ustar zmoelnigzmoelnig#N canvas 460 141 892 632 10; #X obj 406 74 loadbang; #X text 425 271 see also:; #N canvas 0 22 450 300 (subpatch) 0; #X array array99 13 float 0; #X coords 0 5.5 12 -5.5 250 200 1; #X restore 121 64 graph; #X floatatom 41 537 0 0 0 0 - - -; #X obj 497 55 table array98 1.7e+07; #X floatatom 293 537 0 0 0 0 - - -; #X floatatom 155 376 0 0 0 0 - - -; #X obj 293 452 + 0; #X obj 158 357 hsl 101 15 1 11 0 0 empty empty empty -2 -6 0 8 -262144 -1 -1 0 1; #X obj 306 432 r \$0_offset; #X obj 145 428 r \$0_offset; #X obj 312 485 r \$0_which_table; #X obj 40 467 r \$0_which_table; #N canvas 0 22 470 320 select_table 0; #X obj 55 24 inlet; #X msg 55 112 0; #X msg 109 180 1.698e+07; #X obj 55 90 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X obj 109 158 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X obj 55 133 s \$0_offset; #X obj 109 201 s \$0_offset; #X obj 186 200 s \$0_which_table; #X msg 186 178 set array98; #X obj 127 133 s \$0_which_table; #X msg 127 111 set array99; #X obj 55 47 sel 0 1; #X connect 0 0 11 0; #X connect 1 0 5 0; #X connect 2 0 6 0; #X connect 3 0 10 0; #X connect 3 0 1 0; #X connect 4 0 2 0; #X connect 4 0 8 0; #X connect 8 0 7 0; #X connect 10 0 9 0; #X connect 11 0 3 0; #X connect 11 1 4 0; #X restore 275 390 pd select_table; #X obj 275 356 vradio 15 1 0 2 empty empty empty 0 -6 0 8 -262144 -1 -1 0; #X text 294 354 array99 offset=0; #X text 293 369 array98 offset=1.698e+07; #X text 604 566 IEM KUG; #X text 588 554 musil; #X text 625 554 @; #X text 634 554 iem.at; #X text 587 576 Graz \, Austria; #X text 647 528 @; #X text 656 528 iem.at; #X text 588 528 zmoelnig; #X msg 406 95 \; array98 const 0 \; array99 resize 13 \; array99 0 -5 -5 -4 -3 -2 -1 0 1 2 3 4 5 5 \; array99 bounds 0 5.5 12 -5.5 \; array99 xticks 0 1 2 \; array99 yticks 0 0.5 5 \; array99 xlabel -6 0 2 4 6 8 10 12 \; array99 ylabel -0.4 -5 -4 -3 -2 -1 0 1 2 3 4 5 \; array98 1.698e+07 -5 -5 -4 -3 -2 -1 0 1 2 3 4 5 5; #X text 13 11 tabread__; #X text 14 27 tabread''; #X obj 41 508 tabread__ array99; #X obj 77 533 tabread'' array99; #X obj 293 511 tabread array99; #X obj 493 271 tabread; #X text 41 291 tabread is used to build samplers and other table lookup algorithms. The interpolation scheme is rounding down integer.; #X text 539 515 (c) IOhannes m zmoelnig 1999 - 2013; #X text 539 543 (c) Thomas Musil 2000 - 2013; #X text 116 10 non-interpolating table lookup with double precision index (15 digits accurate); #X connect 0 0 25 0; #X connect 6 0 7 0; #X connect 6 0 28 0; #X connect 7 0 30 0; #X connect 8 0 6 0; #X connect 9 0 7 1; #X connect 10 0 28 1; #X connect 11 0 30 0; #X connect 12 0 28 0; #X connect 14 0 13 0; #X connect 28 0 3 0; #X connect 30 0 5 0; iem_utils-v0.0.20181004/iem_dp/README.txt0000644000175000017500000000204013303610413017602 0ustar zmoelnigzmoelnigiem_dp is a double precision library written by Thomas Musil and IOhannes Zmoelnig The goal of this library is to allow more than 24 bit accurate access to arrays and delay-lines. That means: with 32-bit IEEE floatingpoint we have a 23 bit mantissa with a resolution of 1 to 8388608. If you want to access to an array ( size greater than 8388608 ) by tabread4, you get a staircase-shaped output. The objects of this library work internal with double or 32-bit integer instead 24-bit mantissa of 32-bit float. To connect this higher resolution, we need 2 signal or 2 message cords. One for the float casted number and one for the difference to the higher resolution number. ftohex symtodp dptosym dptohex vline~~ samphold~~ wrap~~ phasor~~ print~~ add__ , +__ , +'' sub__ , -__ , -'' mul__ , *__ , *'' div__ , /__ , /'' add~~ , +~~ sub~~ , -~~ mul~~ , *~~ div~~ , /~~ tabwrite__ , tabwrite'' tabread__ , tabread'' tabread4__ , tabread4'' tabwrite~~ tabread~~ tabread4~~ max__ , max'' min__ , min'' max~~ min~~ random__ , random'' delwrite~~ delread~~ vd~~iem_utils-v0.0.20181004/iem_dp/vline~~-help.pd0000644000175000017500000000573512630366345021124 0ustar zmoelnigzmoelnig#N canvas 84 36 1151 705 10; #X obj 30 19 tgl 15 0 empty empty empty 20 8 0 10 -262144 -1 -1 0 1 ; #X floatatom 30 86 5 0 0 0 - - -; #X floatatom 46 64 3 0 0 0 - - -; #X obj 30 41 dsp; #X text 416 24 see also:; #X text 381 117 IEM KUG; #X text 365 105 musil; #X text 402 105 @; #X text 411 105 iem.at; #X text 364 127 Graz \, Austria; #X text 424 79 @; #X text 433 79 iem.at; #X text 365 79 zmoelnig; #X obj 489 25 vline~; #X text 15 -10 vline~~; #X obj 35 579 snapshot~; #X floatatom 35 602 5 0 0 0 - - -; #X obj 45 552 metro 100; #X msg 87 477 stop; #X text 189 185 ramp up; #X text 198 204 ramp down; #X text 115 148 jump down; #X text 130 476 "stop" message freezes vline~ at its current value ; #X obj 45 527 loadbang; #X msg 66 149 0 0.1; #X obj 35 504 vline~~ #####; #X msg 60 130 1 0.1; #X text 109 129 jump up; #X text 275 290 delayed ramp up; #X text 284 309 delayed ramp down; #X msg 81 185 1 0.1 2000 20; #X msg 89 204 0 0.1 2000 20; #X msg 114 290 1 0.1 2000 20 1000 10; #X msg 122 309 0 0.1 2000 20 1000 10; #X text 242 238 delayed jump up; #X text 251 257 delayed jump down; #X msg 123 258 0 0.1 0 0 1000 10; #X text 133 330 ramp up \, stay at top \, jump down \, ramp up again \, stay top \, ramp down; #X msg 115 238 1 0.1 0 0 1000 10; #X msg 130 358 1 0.1 2000 20 0 0 \, 0 0.1 0 0 2500 25 \, 1 0.1 2000 20 2500 25 \, 0 0.1 2000 20 5000 50; #X msg 136 422 1 0.1 2000 20 0 0 \, 0 0.1 0 0 2000 20 \, 1 0.1 2000 20 2000 20 \, 0 0.1 2000 20 4000 40; #X text 135 402 ramp up \, jump down \, ramp up again \, ramp down ; #X obj 1002 61 loadbang; #N canvas 0 22 450 300 (subpatch) 0; #X array array99 200 float 0; #X coords 0 1.1 199 -0.1 250 200 1; #X restore 664 35 graph; #X obj 691 422 vline~~; #X obj 657 455 tabwrite~ array99; #X obj 656 325 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 -1; #X obj 656 349 t b b; #X msg 690 396 \$1 0 \$2 0 \$3 0; #X msg 689 372 1 1 0 \, 0 0 1.3 \, 1 1 1.6 \, 0 1 2.8; #X text 800 397 add to each parameter the fine offset of zero; #X msg 1001 84 \; array99 const 0 \; array99 resize 200 \; array99 bounds 0 1.1 199 -0.1 \; array99 xticks 0 5 4 \; array99 yticks 0 0.1 1 \; array99 xlabel -0.15 0 20 40 60 80 100 120 140 160 180 200 \; array99 ylabel -9 0 0.2 0.4 0.6 0.8 1; #X text 82 -11 - double precision audio ramp generator; #X text 316 67 (c) IOhannes m zmoelnig 1999 - 2013; #X text 316 94 (c) Thomas Musil 2000 - 2013; #X obj 139 579 snapshot~; #X floatatom 139 602 9 0 0 0 - - -; #X connect 0 0 3 0; #X connect 3 0 1 0; #X connect 3 1 2 0; #X connect 15 0 16 0; #X connect 17 0 15 0; #X connect 18 0 25 0; #X connect 23 0 17 0; #X connect 24 0 25 0; #X connect 25 0 15 0; #X connect 25 1 55 0; #X connect 26 0 25 0; #X connect 30 0 25 0; #X connect 31 0 25 0; #X connect 32 0 25 0; #X connect 33 0 25 0; #X connect 36 0 25 0; #X connect 38 0 25 0; #X connect 39 0 25 0; #X connect 40 0 25 0; #X connect 42 0 51 0; #X connect 44 0 45 0; #X connect 46 0 47 0; #X connect 47 0 45 0; #X connect 47 1 49 0; #X connect 48 0 44 0; #X connect 49 0 48 0; #X connect 55 0 56 0; iem_utils-v0.0.20181004/iem_dp/samphold~~-help.pd0000644000175000017500000000340312630366345021604 0ustar zmoelnigzmoelnig#N canvas 404 97 682 587 10; #X obj 30 19 tgl 15 0 empty empty empty 20 8 0 10 -262144 -1 -1 0 1 ; #X floatatom 30 86 5 0 0 0 - - -; #X floatatom 46 64 3 0 0 0 - - -; #X obj 30 41 dsp; #X text 516 25 see also:; #X text 468 119 IEM KUG; #X text 452 107 musil; #X text 489 107 @; #X text 498 107 iem.at; #X text 451 129 Graz \, Austria; #X text 511 81 @; #X text 520 81 iem.at; #X text 452 81 zmoelnig; #X obj 30 518 snapshot~; #X floatatom 30 541 5 0 0 0 - - -; #X obj 40 467 metro 100; #X obj 40 442 loadbang; #X text 11 -2 samphold~~; #X obj 588 25 samphold~; #X obj 30 419 samphold~~; #X obj 96 308 sig~; #X obj 259 311 sig~; #X floatatom 96 283 3 0 0 0 - - -; #X floatatom 259 286 3 0 0 0 - - -; #X msg 48 232 reset; #X text 127 162 set output to a number; #X text 134 283 sample signal; #X text 302 284 control signal; #X text 161 187 reset previous value; #X text 111 243 to force the next sample; #X text 160 201 for control inlet; #X text 110 229 reset to default 1e+20; #X msg 35 163 set 34 0.34; #X msg 43 195 reset 10 0.1; #X obj 108 335 *~ 0.01; #X obj 271 339 *~ 0.01; #X text 107 -1 - double precision sample and hold unit; #X text 403 68 (c) IOhannes m zmoelnig 1999 - 2013; #X text 403 96 (c) Thomas Musil 2000 - 2013; #X obj 64 494 t b b; #X obj 129 520 snapshot~; #X floatatom 129 543 9 0 0 0 - - -; #X connect 0 0 3 0; #X connect 3 0 1 0; #X connect 3 1 2 0; #X connect 13 0 14 0; #X connect 15 0 39 0; #X connect 16 0 15 0; #X connect 19 0 13 0; #X connect 19 1 40 0; #X connect 20 0 34 0; #X connect 20 0 19 0; #X connect 21 0 35 0; #X connect 21 0 19 2; #X connect 22 0 20 0; #X connect 23 0 21 0; #X connect 24 0 19 0; #X connect 32 0 19 0; #X connect 33 0 19 0; #X connect 34 0 19 1; #X connect 35 0 19 3; #X connect 39 0 13 0; #X connect 39 1 40 0; #X connect 40 0 41 0; iem_utils-v0.0.20181004/iem_dp/max__-help.pd0000644000175000017500000000255612630366345020474 0ustar zmoelnigzmoelnig#N canvas 223 169 932 536 10; #X symbolatom 167 326 25 0 0 0 - - -; #X text 104 453 IEM KUG; #X text 88 441 musil; #X text 125 441 @; #X text 134 441 iem.at; #X text 87 463 Graz \, Austria; #X text 147 415 @; #X text 156 415 iem.at; #X text 88 415 zmoelnig; #X floatatom 251 245 11 0 0 0 - - -; #X floatatom 227 273 11 0 0 0 - - -; #X text 337 244 difference; #X text 311 272 float casted; #X text 349 326 product displayed via a symbol; #X text 258 73 = symbol selector of an anything; #X text 248 62 double precision number beginning with a "double quote" =; #X text 479 109 = symbol selector of an anything; #X text 469 98 double precision number beginning with a "double quote" =; #X obj 166 303 dptosym; #X text 14 12 max__; #X text 14 34 max''; #X obj 165 209 max__ 0 0; #X obj 246 211 max'' 0 0; #X msg 163 61 "1.111111112; #X msg 385 98 "1.111111113; #X text 102 341 should be "1.111111113; #X text 55 13 double precision comparsion \, output the greater value ; #X text 419 12 15 digits accurate; #X text 39 402 (c) IOhannes m zmoelnig 1999 - 2013; #X text 39 430 (c) Thomas Musil 2000 - 2013; #X obj 164 87 symtodp; #X obj 385 120 symtodp; #X connect 18 0 0 0; #X connect 21 0 10 0; #X connect 21 0 18 0; #X connect 21 1 9 0; #X connect 21 1 18 1; #X connect 23 0 30 0; #X connect 24 0 31 0; #X connect 30 0 21 0; #X connect 30 1 21 1; #X connect 31 0 21 2; #X connect 31 1 21 3; iem_utils-v0.0.20181004/iem_roomsim/0000755000175000017500000000000013355472356017215 5ustar zmoelnigzmoelnigiem_utils-v0.0.20181004/iem_roomsim/LICENSE.txt0000644000175000017500000000250213355471360021031 0ustar zmoelnigzmoelnigThis library extends the performance of Miller S. Puckette's realtime-computermusic-environment puredata (pd). iem_roomsim contains 1 external library "iem_roomsim.dll" with 7 objects and their help files. iem_roomsim is published under the Gnu Lesser General Public License that is included (GnuLGPL.txt). Copyright (C) 2000-2018 Thomas MUSIL [musil_at_iem.at] IEM - Institute of Electronic Music and Acoustics, Graz Inffeldgasse 10/3, 8010 Graz, Austria http://iem.at This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library 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 Lesser General Public License for more details ( GnuLGPL.txt ). (e.g. http://www.gnu.org/copyleft/lesser.html) You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Graz, March 1st 2018 Thomas Musil iem_utils-v0.0.20181004/iem_roomsim/xyz_3_del_damp_theta_phi-help.pd0000644000175000017500000012427313355471360025421 0ustar zmoelnigzmoelnig#N canvas 250 0 2053 1022 10; #X msg 59 83 sonic_speed 340; #X obj 137 164 t b f; #X floatatom 82 147 5 -20 20 0 - - -, f 5; #X floatatom 139 147 5 -20 20 0 - - -, f 5; #X obj 140 290 t b f; #X floatatom 85 273 5 -20 20 0 - - -, f 5; #X floatatom 142 273 5 -20 20 0 - - -, f 5; #X obj 48 363 print; #X obj 96 364 s xxx; #X obj 368 19 r xxx; #X floatatom 368 948 5 0 0 0 - - -, f 5; #X floatatom 403 925 5 0 0 0 - - -, f 5; #X floatatom 438 905 5 0 0 0 - - -, f 5; #X text 694 760 degree; #X text 624 833 ms; #X text 477 906 degree; #X text 409 948 ms; #X text 78 435 IEM KUG; #X text 62 423 musil; #X text 92 423 @; #X text 98 423 iem.at; #X text 61 445 Graz \, Austria; #X text 163 81 sonic speed in meter per second; #X text 136 103 minimum raduis in meter; #X text 156 64 room dimensions in meter; #X text 198 312 object coordinates; #X text 201 183 subject coordinates; #X text 658 796 linear rms; #X text 441 923 linear rms; #X text 1014 768 |; #X text 1014 776 |; #X text 1014 784 |; #X text 1014 792 |; #X text 1050 768 |; #X text 1050 776 |; #X text 1050 784 |; #X text 1050 792 |; #X text 1086 768 |; #X text 1086 776 |; #X text 1086 784 |; #X text 1086 792 |; #X text 1122 768 |; #X text 1122 776 |; #X text 1122 784 |; #X text 1122 792 |; #X text 1158 768 |; #X text 1158 776 |; #X text 1158 784 |; #X text 1158 792 |; #X text 1098 712 + y; #X text 1001 761 --+-----+-----+-----+-----+-----+--; #X text 1194 768 |; #X text 1194 776 |; #X text 1194 784 |; #X text 1194 792 |; #X text 1014 806 |; #X text 1014 814 |; #X text 1014 822 |; #X text 1014 830 |; #X text 1050 806 |; #X text 1050 814 |; #X text 1050 822 |; #X text 1050 830 |; #X text 1086 806 |; #X text 1086 814 |; #X text 1086 822 |; #X text 1086 830 |; #X text 1122 806 |; #X text 1122 814 |; #X text 1122 822 |; #X text 1122 830 |; #X text 1158 806 |; #X text 1158 814 |; #X text 1158 822 |; #X text 1158 830 |; #X text 1001 799 --+-----+-----+-----+-----+-----+--; #X text 1194 806 |; #X text 1194 814 |; #X text 1194 822 |; #X text 1194 830 |; #X text 1014 844 |; #X text 1014 852 |; #X text 1014 860 |; #X text 1014 868 |; #X text 1050 844 |; #X text 1050 852 |; #X text 1050 860 |; #X text 1050 868 |; #X text 1086 844 |; #X text 1086 852 |; #X text 1086 860 |; #X text 1086 868 |; #X text 1122 844 |; #X text 1122 852 |; #X text 1122 860 |; #X text 1122 868 |; #X text 1158 844 |; #X text 1158 852 |; #X text 1158 860 |; #X text 1158 868 |; #X text 1001 837 --+-----+-----+-----+-----+-----+--; #X text 1194 844 |; #X text 1194 852 |; #X text 1194 860 |; #X text 1194 868 |; #X text 1014 882 |; #X text 1014 890 |; #X text 1014 898 |; #X text 1014 906 |; #X text 1050 882 |; #X text 1050 890 |; #X text 1050 898 |; #X text 1050 906 |; #X text 1086 882 |; #X text 1086 890 |; #X text 1086 898 |; #X text 1086 906 |; #X text 1122 882 |; #X text 1122 890 |; #X text 1122 898 |; #X text 1122 906 |; #X text 1158 882 |; #X text 1158 890 |; #X text 1158 898 |; #X text 1158 906 |; #X text 1001 875 --+-----+-----+-----+-----+-----+--; #X text 1194 882 |; #X text 1194 890 |; #X text 1194 898 |; #X text 1194 906 |; #X text 1014 920 |; #X text 1014 928 |; #X text 1014 936 |; #X text 1014 944 |; #X text 1050 920 |; #X text 1050 928 |; #X text 1050 936 |; #X text 1050 944 |; #X text 1086 920 |; #X text 1086 928 |; #X text 1086 936 |; #X text 1086 944 |; #X text 1122 920 |; #X text 1122 928 |; #X text 1122 936 |; #X text 1122 944 |; #X text 1158 920 |; #X text 1158 928 |; #X text 1158 936 |; #X text 1158 944 |; #X text 1001 913 --+-----+-----+-----+-----+-----+--; #X text 1194 920 |; #X text 1194 928 |; #X text 1194 936 |; #X text 1194 944 |; #X text 1001 951 --+-----+-----+-----+-----+-----+--; #X text 1080 851 ___________________________; #X text 1241 856 > + x; #X text 1104 728 |; #X text 1104 735 |; #X text 1104 742 |; #X text 1104 749 |; #X text 1104 756 |; #X text 1104 763 |; #X text 1104 770 |; #X text 1104 777 |; #X text 1104 784 |; #X text 1104 791 |; #X text 1104 798 |; #X text 1104 805 |; #X text 1104 804 |; #X text 1104 811 |; #X text 1104 818 |; #X text 1104 825 |; #X text 1104 831 |; #X text 1104 838 |; #X text 1104 845 |; #X text 1104 852 |; #X text 1104 859 |; #X text 1104 866 |; #X text 1104 873 |; #X text 1104 880 |; #X text 1104 724 ^; #X text 1129 864 e1_1; #X text 1092 819 e1_2; #X text 1058 864 e1_3; #X text 1093 897 e1_4; #X text 1165 864 e2_1; #X text 1097 864 d_1; #X text 905 862 d .. direct; #X text 900 874 e1 .. early 1; #X text 900 886 e2 .. early 2; #X text 1123 735 mirror source rooms; #X text 680 23 renders the delay time \, the damping and the direction of direct \, early_1 and early_2 reflections in a cuboid room model (2 dimensional); #X obj 368 41 route direct early1 early2 early3 early4; #X text 1130 819 e2_2; #X text 1092 779 e2_3; #X text 1058 819 e2_4; #X text 1022 864 e2_5; #X text 1058 895 e2_6; #X text 1093 933 e2_7; #X text 1130 895 e2_8; #X text 11 9 xyz_3_del_damp_theta_phi; #X obj 48 338 xyz_3_del_damp_theta_phi; #X text 13 412 (c) Thomas Musil 2000 - 2018; #X msg 67 104 r_min 1.4; #X msg 89 185 head_xyz \$1 \$2 \$3; #X msg 92 311 src_xyz \$1 \$2 \$3; #X msg 48 63 room_xyz 20 10 7; #X text 223 145 m x m x m; #X text 221 271 m x m x m; #X obj 177 164 t b f; #X floatatom 179 147 5 -20 20 0 - - -, f 5; #X obj 69 164 pack f f f; #X obj 72 290 pack f f f; #X obj 181 290 t b f; #X floatatom 183 273 5 -20 20 0 - - -, f 5; #X obj 368 864 route del damp theta phi; #X obj 415 685 route del damp theta phi; #X floatatom 473 885 5 0 0 0 - - -, f 5; #X text 512 886 degree; #X floatatom 520 723 5 0 0 0 - - -, f 5; #X floatatom 555 723 5 0 0 0 - - -, f 5; #X floatatom 590 723 5 0 0 0 - - -, f 5; #X floatatom 625 723 5 0 0 0 - - -, f 5; #X text 729 723 degree; #X obj 520 705 unpack 0 0 0 0 0 0, f 30; #X floatatom 660 723 5 0 0 0 - - -, f 5; #X floatatom 695 723 5 0 0 0 - - -, f 5; #X floatatom 485 759 5 0 0 0 - - -, f 5; #X floatatom 520 759 5 0 0 0 - - -, f 5; #X floatatom 555 759 5 0 0 0 - - -, f 5; #X floatatom 590 759 5 0 0 0 - - -, f 5; #X obj 485 741 unpack 0 0 0 0 0 0, f 30; #X floatatom 625 759 5 0 0 0 - - -, f 5; #X floatatom 660 759 5 0 0 0 - - -, f 5; #X floatatom 450 795 5 0 0 0 - - -, f 5; #X floatatom 485 795 5 0 0 0 - - -, f 5; #X floatatom 520 795 5 0 0 0 - - -, f 5; #X floatatom 555 795 5 0 0 0 - - -, f 5; #X obj 450 777 unpack 0 0 0 0 0 0, f 30; #X floatatom 590 795 5 0 0 0 - - -, f 5; #X floatatom 625 795 5 0 0 0 - - -, f 5; #X floatatom 415 832 5 0 0 0 - - -, f 5; #X floatatom 450 832 5 0 0 0 - - -, f 5; #X floatatom 485 832 5 0 0 0 - - -, f 5; #X floatatom 520 832 5 0 0 0 - - -, f 5; #X obj 415 814 unpack 0 0 0 0 0 0, f 30; #X floatatom 555 832 5 0 0 0 - - -, f 5; #X floatatom 590 832 5 0 0 0 - - -, f 5; #X text 1165 587 degree; #X text 1095 660 ms; #X text 1129 623 linear rms; #X obj 462 511 route del damp theta phi; #X floatatom 567 550 5 0 0 0 - - -, f 5; #X floatatom 602 550 5 0 0 0 - - -, f 5; #X floatatom 637 550 5 0 0 0 - - -, f 5; #X floatatom 672 550 5 0 0 0 - - -, f 5; #X text 1200 550 degree; #X floatatom 707 550 5 0 0 0 - - -, f 5; #X floatatom 742 550 5 0 0 0 - - -, f 5; #X obj 567 532 unpack 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0, f 99; #X floatatom 777 550 5 0 0 0 - - -, f 5; #X floatatom 812 550 5 0 0 0 - - -, f 5; #X floatatom 847 550 5 0 0 0 - - -, f 5; #X floatatom 882 550 5 0 0 0 - - -, f 5; #X floatatom 917 550 5 0 0 0 - - -, f 5; #X floatatom 952 550 5 0 0 0 - - -, f 5; #X floatatom 987 550 5 0 0 0 - - -, f 5; #X floatatom 1022 550 5 0 0 0 - - -, f 5; #X floatatom 1057 550 5 0 0 0 - - -, f 5; #X floatatom 1092 550 5 0 0 0 - - -, f 5; #X floatatom 1127 550 5 0 0 0 - - -, f 5; #X floatatom 1162 550 5 0 0 0 - - -, f 5; #X floatatom 532 587 5 0 0 0 - - -, f 5; #X floatatom 567 587 5 0 0 0 - - -, f 5; #X floatatom 602 587 5 0 0 0 - - -, f 5; #X floatatom 637 587 5 0 0 0 - - -, f 5; #X floatatom 672 587 5 0 0 0 - - -, f 5; #X floatatom 707 587 5 0 0 0 - - -, f 5; #X obj 532 569 unpack 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0, f 99; #X floatatom 742 587 5 0 0 0 - - -, f 5; #X floatatom 777 587 5 0 0 0 - - -, f 5; #X floatatom 812 587 5 0 0 0 - - -, f 5; #X floatatom 847 587 5 0 0 0 - - -, f 5; #X floatatom 882 587 5 0 0 0 - - -, f 5; #X floatatom 917 587 5 0 0 0 - - -, f 5; #X floatatom 952 587 5 0 0 0 - - -, f 5; #X floatatom 987 587 5 0 0 0 - - -, f 5; #X floatatom 1022 587 5 0 0 0 - - -, f 5; #X floatatom 1057 587 5 0 0 0 - - -, f 5; #X floatatom 1092 587 5 0 0 0 - - -, f 5; #X floatatom 1127 587 5 0 0 0 - - -, f 5; #X floatatom 497 623 5 0 0 0 - - -, f 5; #X floatatom 532 623 5 0 0 0 - - -, f 5; #X floatatom 567 623 5 0 0 0 - - -, f 5; #X floatatom 602 623 5 0 0 0 - - -, f 5; #X floatatom 637 623 5 0 0 0 - - -, f 5; #X floatatom 672 623 5 0 0 0 - - -, f 5; #X obj 497 605 unpack 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0, f 99; #X floatatom 707 623 5 0 0 0 - - -, f 5; #X floatatom 742 623 5 0 0 0 - - -, f 5; #X floatatom 777 623 5 0 0 0 - - -, f 5; #X floatatom 812 623 5 0 0 0 - - -, f 5; #X floatatom 847 623 5 0 0 0 - - -, f 5; #X floatatom 882 623 5 0 0 0 - - -, f 5; #X floatatom 917 623 5 0 0 0 - - -, f 5; #X floatatom 952 623 5 0 0 0 - - -, f 5; #X floatatom 987 623 5 0 0 0 - - -, f 5; #X floatatom 1022 623 5 0 0 0 - - -, f 5; #X floatatom 1057 623 5 0 0 0 - - -, f 5; #X floatatom 1092 623 5 0 0 0 - - -, f 5; #X floatatom 462 660 5 0 0 0 - - -, f 5; #X floatatom 497 660 5 0 0 0 - - -, f 5; #X floatatom 532 660 5 0 0 0 - - -, f 5; #X floatatom 567 660 5 0 0 0 - - -, f 5; #X floatatom 602 660 5 0 0 0 - - -, f 5; #X floatatom 637 660 5 0 0 0 - - -, f 5; #X obj 462 642 unpack 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0, f 99; #X floatatom 672 660 5 0 0 0 - - -, f 5; #X floatatom 707 660 5 0 0 0 - - -, f 5; #X floatatom 742 660 5 0 0 0 - - -, f 5; #X floatatom 777 660 5 0 0 0 - - -, f 5; #X floatatom 812 660 5 0 0 0 - - -, f 5; #X floatatom 847 660 5 0 0 0 - - -, f 5; #X floatatom 882 660 5 0 0 0 - - -, f 5; #X floatatom 917 660 5 0 0 0 - - -, f 5; #X floatatom 952 660 5 0 0 0 - - -, f 5; #X floatatom 987 660 5 0 0 0 - - -, f 5; #X floatatom 1022 660 5 0 0 0 - - -, f 5; #X floatatom 1057 660 5 0 0 0 - - -, f 5; #X text 1914 416 degree; #X text 1844 489 ms; #X text 1878 452 linear rms; #X obj 510 340 route del damp theta phi; #X floatatom 615 379 5 0 0 0 - - -, f 5; #X floatatom 650 379 5 0 0 0 - - -, f 5; #X floatatom 685 379 5 0 0 0 - - -, f 5; #X floatatom 720 379 5 0 0 0 - - -, f 5; #X text 1949 379 degree; #X floatatom 755 379 5 0 0 0 - - -, f 5; #X floatatom 790 379 5 0 0 0 - - -, f 5; #X floatatom 825 379 5 0 0 0 - - -, f 5; #X floatatom 860 379 5 0 0 0 - - -, f 5; #X floatatom 895 379 5 0 0 0 - - -, f 5; #X floatatom 930 379 5 0 0 0 - - -, f 5; #X floatatom 965 379 5 0 0 0 - - -, f 5; #X floatatom 1000 379 5 0 0 0 - - -, f 5; #X floatatom 1035 379 5 0 0 0 - - -, f 5; #X floatatom 1070 379 5 0 0 0 - - -, f 5; #X floatatom 1105 379 5 0 0 0 - - -, f 5; #X floatatom 1140 379 5 0 0 0 - - -, f 5; #X floatatom 1175 379 5 0 0 0 - - -, f 5; #X floatatom 1210 379 5 0 0 0 - - -, f 5; #X obj 615 361 unpack 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0, f 216; #X floatatom 1245 379 5 0 0 0 - - -, f 5; #X floatatom 1280 379 5 0 0 0 - - -, f 5; #X floatatom 1315 379 5 0 0 0 - - -, f 5; #X floatatom 1350 379 5 0 0 0 - - -, f 5; #X floatatom 1385 379 5 0 0 0 - - -, f 5; #X floatatom 1420 379 5 0 0 0 - - -, f 5; #X floatatom 1455 379 5 0 0 0 - - -, f 5; #X floatatom 1490 379 5 0 0 0 - - -, f 5; #X floatatom 1525 379 5 0 0 0 - - -, f 5; #X floatatom 1560 379 5 0 0 0 - - -, f 5; #X floatatom 1595 379 5 0 0 0 - - -, f 5; #X floatatom 1630 379 5 0 0 0 - - -, f 5; #X floatatom 1665 379 5 0 0 0 - - -, f 5; #X floatatom 1700 379 5 0 0 0 - - -, f 5; #X floatatom 1735 379 5 0 0 0 - - -, f 5; #X floatatom 1770 379 5 0 0 0 - - -, f 5; #X floatatom 1805 379 5 0 0 0 - - -, f 5; #X floatatom 1840 379 5 0 0 0 - - -, f 5; #X floatatom 1875 379 5 0 0 0 - - -, f 5; #X floatatom 1910 379 5 0 0 0 - - -, f 5; #X floatatom 580 415 5 0 0 0 - - -, f 5; #X floatatom 615 415 5 0 0 0 - - -, f 5; #X floatatom 650 415 5 0 0 0 - - -, f 5; #X floatatom 685 415 5 0 0 0 - - -, f 5; #X floatatom 720 415 5 0 0 0 - - -, f 5; #X floatatom 755 415 5 0 0 0 - - -, f 5; #X floatatom 790 415 5 0 0 0 - - -, f 5; #X floatatom 825 415 5 0 0 0 - - -, f 5; #X floatatom 860 415 5 0 0 0 - - -, f 5; #X floatatom 895 415 5 0 0 0 - - -, f 5; #X floatatom 930 415 5 0 0 0 - - -, f 5; #X floatatom 965 415 5 0 0 0 - - -, f 5; #X floatatom 1000 415 5 0 0 0 - - -, f 5; #X floatatom 1035 415 5 0 0 0 - - -, f 5; #X floatatom 1070 415 5 0 0 0 - - -, f 5; #X floatatom 1105 415 5 0 0 0 - - -, f 5; #X floatatom 1140 415 5 0 0 0 - - -, f 5; #X floatatom 1175 415 5 0 0 0 - - -, f 5; #X obj 580 397 unpack 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0, f 216; #X floatatom 1210 415 5 0 0 0 - - -, f 5; #X floatatom 1245 415 5 0 0 0 - - -, f 5; #X floatatom 1280 415 5 0 0 0 - - -, f 5; #X floatatom 1315 415 5 0 0 0 - - -, f 5; #X floatatom 1350 415 5 0 0 0 - - -, f 5; #X floatatom 1385 415 5 0 0 0 - - -, f 5; #X floatatom 1420 415 5 0 0 0 - - -, f 5; #X floatatom 1455 415 5 0 0 0 - - -, f 5; #X floatatom 1490 415 5 0 0 0 - - -, f 5; #X floatatom 1525 415 5 0 0 0 - - -, f 5; #X floatatom 1560 415 5 0 0 0 - - -, f 5; #X floatatom 1595 415 5 0 0 0 - - -, f 5; #X floatatom 1630 415 5 0 0 0 - - -, f 5; #X floatatom 1665 415 5 0 0 0 - - -, f 5; #X floatatom 1700 415 5 0 0 0 - - -, f 5; #X floatatom 1735 415 5 0 0 0 - - -, f 5; #X floatatom 1770 415 5 0 0 0 - - -, f 5; #X floatatom 1805 415 5 0 0 0 - - -, f 5; #X floatatom 1840 415 5 0 0 0 - - -, f 5; #X floatatom 1875 415 5 0 0 0 - - -, f 5; #X floatatom 545 451 5 0 0 0 - - -, f 5; #X floatatom 580 451 5 0 0 0 - - -, f 5; #X floatatom 615 451 5 0 0 0 - - -, f 5; #X floatatom 650 451 5 0 0 0 - - -, f 5; #X floatatom 685 451 5 0 0 0 - - -, f 5; #X floatatom 720 451 5 0 0 0 - - -, f 5; #X floatatom 755 451 5 0 0 0 - - -, f 5; #X floatatom 790 451 5 0 0 0 - - -, f 5; #X floatatom 825 451 5 0 0 0 - - -, f 5; #X floatatom 860 451 5 0 0 0 - - -, f 5; #X floatatom 895 451 5 0 0 0 - - -, f 5; #X floatatom 930 451 5 0 0 0 - - -, f 5; #X floatatom 965 451 5 0 0 0 - - -, f 5; #X floatatom 1000 451 5 0 0 0 - - -, f 5; #X floatatom 1035 451 5 0 0 0 - - -, f 5; #X floatatom 1070 451 5 0 0 0 - - -, f 5; #X floatatom 1105 451 5 0 0 0 - - -, f 5; #X floatatom 1140 451 5 0 0 0 - - -, f 5; #X obj 545 433 unpack 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0, f 216; #X floatatom 1175 451 5 0 0 0 - - -, f 5; #X floatatom 1210 451 5 0 0 0 - - -, f 5; #X floatatom 1245 451 5 0 0 0 - - -, f 5; #X floatatom 1280 451 5 0 0 0 - - -, f 5; #X floatatom 1315 451 5 0 0 0 - - -, f 5; #X floatatom 1350 451 5 0 0 0 - - -, f 5; #X floatatom 1385 451 5 0 0 0 - - -, f 5; #X floatatom 1420 451 5 0 0 0 - - -, f 5; #X floatatom 1455 451 5 0 0 0 - - -, f 5; #X floatatom 1490 451 5 0 0 0 - - -, f 5; #X floatatom 1525 451 5 0 0 0 - - -, f 5; #X floatatom 1560 451 5 0 0 0 - - -, f 5; #X floatatom 1595 451 5 0 0 0 - - -, f 5; #X floatatom 1630 451 5 0 0 0 - - -, f 5; #X floatatom 1665 451 5 0 0 0 - - -, f 5; #X floatatom 1700 451 5 0 0 0 - - -, f 5; #X floatatom 1735 451 5 0 0 0 - - -, f 5; #X floatatom 1770 451 5 0 0 0 - - -, f 5; #X floatatom 1805 451 5 0 0 0 - - -, f 5; #X floatatom 1840 451 5 0 0 0 - - -, f 5; #X floatatom 510 487 5 0 0 0 - - -, f 5; #X floatatom 545 487 5 0 0 0 - - -, f 5; #X floatatom 580 487 5 0 0 0 - - -, f 5; #X floatatom 615 487 5 0 0 0 - - -, f 5; #X floatatom 650 487 5 0 0 0 - - -, f 5; #X floatatom 685 487 5 0 0 0 - - -, f 5; #X floatatom 720 487 5 0 0 0 - - -, f 5; #X floatatom 755 487 5 0 0 0 - - -, f 5; #X floatatom 790 487 5 0 0 0 - - -, f 5; #X floatatom 825 487 5 0 0 0 - - -, f 5; #X floatatom 860 487 5 0 0 0 - - -, f 5; #X floatatom 895 487 5 0 0 0 - - -, f 5; #X floatatom 930 487 5 0 0 0 - - -, f 5; #X floatatom 965 487 5 0 0 0 - - -, f 5; #X floatatom 1000 487 5 0 0 0 - - -, f 5; #X floatatom 1035 487 5 0 0 0 - - -, f 5; #X floatatom 1070 487 5 0 0 0 - - -, f 5; #X floatatom 1105 487 5 0 0 0 - - -, f 5; #X obj 510 469 unpack 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0, f 216; #X floatatom 1140 487 5 0 0 0 - - -, f 5; #X floatatom 1175 487 5 0 0 0 - - -, f 5; #X floatatom 1210 487 5 0 0 0 - - -, f 5; #X floatatom 1245 487 5 0 0 0 - - -, f 5; #X floatatom 1280 487 5 0 0 0 - - -, f 5; #X floatatom 1315 487 5 0 0 0 - - -, f 5; #X floatatom 1350 487 5 0 0 0 - - -, f 5; #X floatatom 1385 487 5 0 0 0 - - -, f 5; #X floatatom 1420 487 5 0 0 0 - - -, f 5; #X floatatom 1455 487 5 0 0 0 - - -, f 5; #X floatatom 1490 487 5 0 0 0 - - -, f 5; #X floatatom 1525 487 5 0 0 0 - - -, f 5; #X floatatom 1560 487 5 0 0 0 - - -, f 5; #X floatatom 1595 487 5 0 0 0 - - -, f 5; #X floatatom 1630 487 5 0 0 0 - - -, f 5; #X floatatom 1665 487 5 0 0 0 - - -, f 5; #X floatatom 1700 487 5 0 0 0 - - -, f 5; #X floatatom 1735 487 5 0 0 0 - - -, f 5; #X floatatom 1770 487 5 0 0 0 - - -, f 5; #X floatatom 1805 487 5 0 0 0 - - -, f 5; #X obj 557 67 route del damp theta phi, f 34; #X floatatom 707 114 5 0 0 0 - - -, f 5; #X floatatom 742 114 5 0 0 0 - - -, f 5; #X floatatom 777 114 5 0 0 0 - - -, f 5; #X floatatom 812 114 5 0 0 0 - - -, f 5; #X floatatom 847 114 5 0 0 0 - - -, f 5; #X floatatom 882 114 5 0 0 0 - - -, f 5; #X floatatom 917 114 5 0 0 0 - - -, f 5; #X floatatom 952 114 5 0 0 0 - - -, f 5; #X floatatom 987 114 5 0 0 0 - - -, f 5; #X floatatom 1022 114 5 0 0 0 - - -, f 5; #X floatatom 1057 114 5 0 0 0 - - -, f 5; #X floatatom 1092 114 5 0 0 0 - - -, f 5; #X floatatom 1127 114 5 0 0 0 - - -, f 5; #X floatatom 1162 114 5 0 0 0 - - -, f 5; #X floatatom 1197 114 5 0 0 0 - - -, f 5; #X floatatom 1232 114 5 0 0 0 - - -, f 5; #X floatatom 1267 114 5 0 0 0 - - -, f 5; #X floatatom 1302 114 5 0 0 0 - - -, f 5; #X floatatom 1337 114 5 0 0 0 - - -, f 5; #X floatatom 1372 114 5 0 0 0 - - -, f 5; #X floatatom 1407 114 5 0 0 0 - - -, f 5; #X floatatom 1442 114 5 0 0 0 - - -, f 5; #X floatatom 1477 114 5 0 0 0 - - -, f 5; #X floatatom 1512 114 5 0 0 0 - - -, f 5; #X floatatom 1547 114 5 0 0 0 - - -, f 5; #X floatatom 1582 114 5 0 0 0 - - -, f 5; #X floatatom 1617 114 5 0 0 0 - - -, f 5; #X floatatom 1652 114 5 0 0 0 - - -, f 5; #X floatatom 1687 114 5 0 0 0 - - -, f 5; #X floatatom 1722 114 5 0 0 0 - - -, f 5; #X floatatom 1757 114 5 0 0 0 - - -, f 5; #X floatatom 1792 114 5 0 0 0 - - -, f 5; #X floatatom 1827 114 5 0 0 0 - - -, f 5; #X obj 707 86 list split 33; #X obj 707 96 unpack 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0, f 187; #X floatatom 739 134 5 0 0 0 - - -, f 5; #X floatatom 774 134 5 0 0 0 - - -, f 5; #X floatatom 809 134 5 0 0 0 - - -, f 5; #X floatatom 844 134 5 0 0 0 - - -, f 5; #X floatatom 879 134 5 0 0 0 - - -, f 5; #X floatatom 914 134 5 0 0 0 - - -, f 5; #X floatatom 949 134 5 0 0 0 - - -, f 5; #X floatatom 984 134 5 0 0 0 - - -, f 5; #X floatatom 1019 134 5 0 0 0 - - -, f 5; #X floatatom 1054 134 5 0 0 0 - - -, f 5; #X floatatom 1089 134 5 0 0 0 - - -, f 5; #X floatatom 1124 134 5 0 0 0 - - -, f 5; #X floatatom 1159 134 5 0 0 0 - - -, f 5; #X floatatom 1194 134 5 0 0 0 - - -, f 5; #X floatatom 1229 134 5 0 0 0 - - -, f 5; #X floatatom 1264 134 5 0 0 0 - - -, f 5; #X floatatom 1299 134 5 0 0 0 - - -, f 5; #X floatatom 1334 134 5 0 0 0 - - -, f 5; #X floatatom 1369 134 5 0 0 0 - - -, f 5; #X floatatom 1404 134 5 0 0 0 - - -, f 5; #X floatatom 1439 134 5 0 0 0 - - -, f 5; #X floatatom 1474 134 5 0 0 0 - - -, f 5; #X floatatom 1509 134 5 0 0 0 - - -, f 5; #X floatatom 1544 134 5 0 0 0 - - -, f 5; #X floatatom 1579 134 5 0 0 0 - - -, f 5; #X floatatom 1614 134 5 0 0 0 - - -, f 5; #X floatatom 1649 134 5 0 0 0 - - -, f 5; #X floatatom 1684 134 5 0 0 0 - - -, f 5; #X floatatom 1719 134 5 0 0 0 - - -, f 5; #X floatatom 1754 134 5 0 0 0 - - -, f 5; #X floatatom 1789 134 5 0 0 0 - - -, f 5; #X floatatom 1824 134 5 0 0 0 - - -, f 5; #X floatatom 1859 134 5 0 0 0 - - -, f 5; #X obj 739 96 unpack 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0, f 187; #X text 1888 114 degree 1..33; #X text 1900 134 degree 34..66; #X floatatom 657 174 5 0 0 0 - - -, f 5; #X floatatom 692 174 5 0 0 0 - - -, f 5; #X floatatom 727 174 5 0 0 0 - - -, f 5; #X floatatom 762 174 5 0 0 0 - - -, f 5; #X floatatom 797 174 5 0 0 0 - - -, f 5; #X floatatom 832 174 5 0 0 0 - - -, f 5; #X floatatom 867 174 5 0 0 0 - - -, f 5; #X floatatom 902 174 5 0 0 0 - - -, f 5; #X floatatom 937 174 5 0 0 0 - - -, f 5; #X floatatom 972 174 5 0 0 0 - - -, f 5; #X floatatom 1007 174 5 0 0 0 - - -, f 5; #X floatatom 1042 174 5 0 0 0 - - -, f 5; #X floatatom 1077 174 5 0 0 0 - - -, f 5; #X floatatom 1112 174 5 0 0 0 - - -, f 5; #X floatatom 1147 174 5 0 0 0 - - -, f 5; #X floatatom 1182 174 5 0 0 0 - - -, f 5; #X floatatom 1217 174 5 0 0 0 - - -, f 5; #X floatatom 1252 174 5 0 0 0 - - -, f 5; #X floatatom 1287 174 5 0 0 0 - - -, f 5; #X floatatom 1322 174 5 0 0 0 - - -, f 5; #X floatatom 1357 174 5 0 0 0 - - -, f 5; #X floatatom 1392 174 5 0 0 0 - - -, f 5; #X floatatom 1427 174 5 0 0 0 - - -, f 5; #X floatatom 1462 174 5 0 0 0 - - -, f 5; #X floatatom 1497 174 5 0 0 0 - - -, f 5; #X floatatom 1532 174 5 0 0 0 - - -, f 5; #X floatatom 1567 174 5 0 0 0 - - -, f 5; #X floatatom 1602 174 5 0 0 0 - - -, f 5; #X floatatom 1637 174 5 0 0 0 - - -, f 5; #X floatatom 1672 174 5 0 0 0 - - -, f 5; #X floatatom 1707 174 5 0 0 0 - - -, f 5; #X floatatom 1742 174 5 0 0 0 - - -, f 5; #X floatatom 1777 174 5 0 0 0 - - -, f 5; #X obj 657 146 list split 33; #X obj 657 156 unpack 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0, f 187; #X floatatom 689 194 5 0 0 0 - - -, f 5; #X floatatom 724 194 5 0 0 0 - - -, f 5; #X floatatom 759 194 5 0 0 0 - - -, f 5; #X floatatom 794 194 5 0 0 0 - - -, f 5; #X floatatom 829 194 5 0 0 0 - - -, f 5; #X floatatom 864 194 5 0 0 0 - - -, f 5; #X floatatom 899 194 5 0 0 0 - - -, f 5; #X floatatom 934 194 5 0 0 0 - - -, f 5; #X floatatom 969 194 5 0 0 0 - - -, f 5; #X floatatom 1004 194 5 0 0 0 - - -, f 5; #X floatatom 1039 194 5 0 0 0 - - -, f 5; #X floatatom 1074 194 5 0 0 0 - - -, f 5; #X floatatom 1109 194 5 0 0 0 - - -, f 5; #X floatatom 1144 194 5 0 0 0 - - -, f 5; #X floatatom 1179 194 5 0 0 0 - - -, f 5; #X floatatom 1214 194 5 0 0 0 - - -, f 5; #X floatatom 1249 194 5 0 0 0 - - -, f 5; #X floatatom 1284 194 5 0 0 0 - - -, f 5; #X floatatom 1319 194 5 0 0 0 - - -, f 5; #X floatatom 1354 194 5 0 0 0 - - -, f 5; #X floatatom 1389 194 5 0 0 0 - - -, f 5; #X floatatom 1424 194 5 0 0 0 - - -, f 5; #X floatatom 1459 194 5 0 0 0 - - -, f 5; #X floatatom 1494 194 5 0 0 0 - - -, f 5; #X floatatom 1529 194 5 0 0 0 - - -, f 5; #X floatatom 1564 194 5 0 0 0 - - -, f 5; #X floatatom 1599 194 5 0 0 0 - - -, f 5; #X floatatom 1634 194 5 0 0 0 - - -, f 5; #X floatatom 1669 194 5 0 0 0 - - -, f 5; #X floatatom 1704 194 5 0 0 0 - - -, f 5; #X floatatom 1739 194 5 0 0 0 - - -, f 5; #X floatatom 1774 194 5 0 0 0 - - -, f 5; #X floatatom 1809 194 5 0 0 0 - - -, f 5; #X obj 689 156 unpack 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0, f 187; #X text 1838 174 degree 1..33; #X text 1850 194 degree 34..66; #X floatatom 607 234 5 0 0 0 - - -, f 5; #X floatatom 642 234 5 0 0 0 - - -, f 5; #X floatatom 677 234 5 0 0 0 - - -, f 5; #X floatatom 712 234 5 0 0 0 - - -, f 5; #X floatatom 747 234 5 0 0 0 - - -, f 5; #X floatatom 782 234 5 0 0 0 - - -, f 5; #X floatatom 817 234 5 0 0 0 - - -, f 5; #X floatatom 852 234 5 0 0 0 - - -, f 5; #X floatatom 887 234 5 0 0 0 - - -, f 5; #X floatatom 922 234 5 0 0 0 - - -, f 5; #X floatatom 957 234 5 0 0 0 - - -, f 5; #X floatatom 992 234 5 0 0 0 - - -, f 5; #X floatatom 1027 234 5 0 0 0 - - -, f 5; #X floatatom 1062 234 5 0 0 0 - - -, f 5; #X floatatom 1097 234 5 0 0 0 - - -, f 5; #X floatatom 1132 234 5 0 0 0 - - -, f 5; #X floatatom 1167 234 5 0 0 0 - - -, f 5; #X floatatom 1202 234 5 0 0 0 - - -, f 5; #X floatatom 1237 234 5 0 0 0 - - -, f 5; #X floatatom 1272 234 5 0 0 0 - - -, f 5; #X floatatom 1307 234 5 0 0 0 - - -, f 5; #X floatatom 1342 234 5 0 0 0 - - -, f 5; #X floatatom 1377 234 5 0 0 0 - - -, f 5; #X floatatom 1412 234 5 0 0 0 - - -, f 5; #X floatatom 1447 234 5 0 0 0 - - -, f 5; #X floatatom 1482 234 5 0 0 0 - - -, f 5; #X floatatom 1517 234 5 0 0 0 - - -, f 5; #X floatatom 1552 234 5 0 0 0 - - -, f 5; #X floatatom 1587 234 5 0 0 0 - - -, f 5; #X floatatom 1622 234 5 0 0 0 - - -, f 5; #X floatatom 1657 234 5 0 0 0 - - -, f 5; #X floatatom 1692 234 5 0 0 0 - - -, f 5; #X floatatom 1727 234 5 0 0 0 - - -, f 5; #X obj 607 206 list split 33; #X obj 607 216 unpack 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0, f 187; #X floatatom 640 254 5 0 0 0 - - -, f 5; #X floatatom 675 254 5 0 0 0 - - -, f 5; #X floatatom 710 254 5 0 0 0 - - -, f 5; #X floatatom 745 254 5 0 0 0 - - -, f 5; #X floatatom 780 254 5 0 0 0 - - -, f 5; #X floatatom 815 254 5 0 0 0 - - -, f 5; #X floatatom 850 254 5 0 0 0 - - -, f 5; #X floatatom 885 254 5 0 0 0 - - -, f 5; #X floatatom 920 254 5 0 0 0 - - -, f 5; #X floatatom 955 254 5 0 0 0 - - -, f 5; #X floatatom 990 254 5 0 0 0 - - -, f 5; #X floatatom 1025 254 5 0 0 0 - - -, f 5; #X floatatom 1060 254 5 0 0 0 - - -, f 5; #X floatatom 1095 254 5 0 0 0 - - -, f 5; #X floatatom 1130 254 5 0 0 0 - - -, f 5; #X floatatom 1165 254 5 0 0 0 - - -, f 5; #X floatatom 1200 254 5 0 0 0 - - -, f 5; #X floatatom 1235 254 5 0 0 0 - - -, f 5; #X floatatom 1270 254 5 0 0 0 - - -, f 5; #X floatatom 1305 254 5 0 0 0 - - -, f 5; #X floatatom 1340 254 5 0 0 0 - - -, f 5; #X floatatom 1375 254 5 0 0 0 - - -, f 5; #X floatatom 1410 254 5 0 0 0 - - -, f 5; #X floatatom 1445 254 5 0 0 0 - - -, f 5; #X floatatom 1480 254 5 0 0 0 - - -, f 5; #X floatatom 1515 254 5 0 0 0 - - -, f 5; #X floatatom 1550 254 5 0 0 0 - - -, f 5; #X floatatom 1585 254 5 0 0 0 - - -, f 5; #X floatatom 1620 254 5 0 0 0 - - -, f 5; #X floatatom 1655 254 5 0 0 0 - - -, f 5; #X floatatom 1690 254 5 0 0 0 - - -, f 5; #X floatatom 1725 254 5 0 0 0 - - -, f 5; #X floatatom 1760 254 5 0 0 0 - - -, f 5; #X obj 640 216 unpack 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0, f 187; #X floatatom 557 294 5 0 0 0 - - -, f 5; #X floatatom 592 294 5 0 0 0 - - -, f 5; #X floatatom 627 294 5 0 0 0 - - -, f 5; #X floatatom 662 294 5 0 0 0 - - -, f 5; #X floatatom 697 294 5 0 0 0 - - -, f 5; #X floatatom 732 294 5 0 0 0 - - -, f 5; #X floatatom 767 294 5 0 0 0 - - -, f 5; #X floatatom 802 294 5 0 0 0 - - -, f 5; #X floatatom 837 294 5 0 0 0 - - -, f 5; #X floatatom 872 294 5 0 0 0 - - -, f 5; #X floatatom 907 294 5 0 0 0 - - -, f 5; #X floatatom 942 294 5 0 0 0 - - -, f 5; #X floatatom 977 294 5 0 0 0 - - -, f 5; #X floatatom 1012 294 5 0 0 0 - - -, f 5; #X floatatom 1047 294 5 0 0 0 - - -, f 5; #X floatatom 1082 294 5 0 0 0 - - -, f 5; #X floatatom 1117 294 5 0 0 0 - - -, f 5; #X floatatom 1152 294 5 0 0 0 - - -, f 5; #X floatatom 1187 294 5 0 0 0 - - -, f 5; #X floatatom 1222 294 5 0 0 0 - - -, f 5; #X floatatom 1257 294 5 0 0 0 - - -, f 5; #X floatatom 1292 294 5 0 0 0 - - -, f 5; #X floatatom 1327 294 5 0 0 0 - - -, f 5; #X floatatom 1362 294 5 0 0 0 - - -, f 5; #X floatatom 1397 294 5 0 0 0 - - -, f 5; #X floatatom 1432 294 5 0 0 0 - - -, f 5; #X floatatom 1467 294 5 0 0 0 - - -, f 5; #X floatatom 1502 294 5 0 0 0 - - -, f 5; #X floatatom 1537 294 5 0 0 0 - - -, f 5; #X floatatom 1572 294 5 0 0 0 - - -, f 5; #X floatatom 1607 294 5 0 0 0 - - -, f 5; #X floatatom 1642 294 5 0 0 0 - - -, f 5; #X floatatom 1677 294 5 0 0 0 - - -, f 5; #X obj 557 266 list split 33; #X obj 557 276 unpack 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0, f 187; #X floatatom 590 314 5 0 0 0 - - -, f 5; #X floatatom 625 314 5 0 0 0 - - -, f 5; #X floatatom 660 314 5 0 0 0 - - -, f 5; #X floatatom 695 314 5 0 0 0 - - -, f 5; #X floatatom 730 314 5 0 0 0 - - -, f 5; #X floatatom 765 314 5 0 0 0 - - -, f 5; #X floatatom 800 314 5 0 0 0 - - -, f 5; #X floatatom 835 314 5 0 0 0 - - -, f 5; #X floatatom 870 314 5 0 0 0 - - -, f 5; #X floatatom 905 314 5 0 0 0 - - -, f 5; #X floatatom 940 314 5 0 0 0 - - -, f 5; #X floatatom 975 314 5 0 0 0 - - -, f 5; #X floatatom 1010 314 5 0 0 0 - - -, f 5; #X floatatom 1045 314 5 0 0 0 - - -, f 5; #X floatatom 1080 314 5 0 0 0 - - -, f 5; #X floatatom 1115 314 5 0 0 0 - - -, f 5; #X floatatom 1150 314 5 0 0 0 - - -, f 5; #X floatatom 1185 314 5 0 0 0 - - -, f 5; #X floatatom 1220 314 5 0 0 0 - - -, f 5; #X floatatom 1255 314 5 0 0 0 - - -, f 5; #X floatatom 1290 314 5 0 0 0 - - -, f 5; #X floatatom 1325 314 5 0 0 0 - - -, f 5; #X floatatom 1360 314 5 0 0 0 - - -, f 5; #X floatatom 1395 314 5 0 0 0 - - -, f 5; #X floatatom 1430 314 5 0 0 0 - - -, f 5; #X floatatom 1465 314 5 0 0 0 - - -, f 5; #X floatatom 1500 314 5 0 0 0 - - -, f 5; #X floatatom 1535 314 5 0 0 0 - - -, f 5; #X floatatom 1570 314 5 0 0 0 - - -, f 5; #X floatatom 1605 314 5 0 0 0 - - -, f 5; #X floatatom 1640 314 5 0 0 0 - - -, f 5; #X floatatom 1675 314 5 0 0 0 - - -, f 5; #X floatatom 1710 314 5 0 0 0 - - -, f 5; #X obj 590 276 unpack 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0, f 187; #X text 1788 234 linear rms 1..33; #X text 1801 254 linear rms 34..66; #X text 1738 294 ms 1..33; #X text 1751 314 ms 34..66; #X obj 193 367 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 -1; #X connect 0 0 203 0; #X connect 1 0 213 0; #X connect 1 1 213 1; #X connect 2 0 213 0; #X connect 3 0 1 0; #X connect 4 0 214 0; #X connect 4 1 214 1; #X connect 5 0 214 0; #X connect 6 0 4 0; #X connect 9 0 194 0; #X connect 194 0 217 0; #X connect 194 1 218 0; #X connect 194 2 253 0; #X connect 194 3 334 0; #X connect 194 4 492 0; #X connect 203 0 7 0; #X connect 203 0 8 0; #X connect 203 0 777 0; #X connect 205 0 203 0; #X connect 206 0 203 0; #X connect 207 0 203 0; #X connect 208 0 203 0; #X connect 211 0 213 0; #X connect 211 1 213 2; #X connect 212 0 211 0; #X connect 213 0 206 0; #X connect 214 0 207 0; #X connect 215 0 214 0; #X connect 215 1 4 0; #X connect 216 0 215 0; #X connect 217 0 10 0; #X connect 217 1 11 0; #X connect 217 2 12 0; #X connect 217 3 219 0; #X connect 218 0 247 0; #X connect 218 1 240 0; #X connect 218 2 233 0; #X connect 218 3 226 0; #X connect 226 0 221 0; #X connect 226 1 222 0; #X connect 226 2 223 0; #X connect 226 3 224 0; #X connect 226 4 227 0; #X connect 226 5 228 0; #X connect 233 0 229 0; #X connect 233 1 230 0; #X connect 233 2 231 0; #X connect 233 3 232 0; #X connect 233 4 234 0; #X connect 233 5 235 0; #X connect 240 0 236 0; #X connect 240 1 237 0; #X connect 240 2 238 0; #X connect 240 3 239 0; #X connect 240 4 241 0; #X connect 240 5 242 0; #X connect 247 0 243 0; #X connect 247 1 244 0; #X connect 247 2 245 0; #X connect 247 3 246 0; #X connect 247 4 248 0; #X connect 247 5 249 0; #X connect 253 0 318 0; #X connect 253 1 299 0; #X connect 253 2 280 0; #X connect 253 3 261 0; #X connect 261 0 254 0; #X connect 261 1 255 0; #X connect 261 2 256 0; #X connect 261 3 257 0; #X connect 261 4 259 0; #X connect 261 5 260 0; #X connect 261 6 262 0; #X connect 261 7 263 0; #X connect 261 8 264 0; #X connect 261 9 265 0; #X connect 261 10 266 0; #X connect 261 11 267 0; #X connect 261 12 268 0; #X connect 261 13 269 0; #X connect 261 14 270 0; #X connect 261 15 271 0; #X connect 261 16 272 0; #X connect 261 17 273 0; #X connect 280 0 274 0; #X connect 280 1 275 0; #X connect 280 2 276 0; #X connect 280 3 277 0; #X connect 280 4 278 0; #X connect 280 5 279 0; #X connect 280 6 281 0; #X connect 280 7 282 0; #X connect 280 8 283 0; #X connect 280 9 284 0; #X connect 280 10 285 0; #X connect 280 11 286 0; #X connect 280 12 287 0; #X connect 280 13 288 0; #X connect 280 14 289 0; #X connect 280 15 290 0; #X connect 280 16 291 0; #X connect 280 17 292 0; #X connect 299 0 293 0; #X connect 299 1 294 0; #X connect 299 2 295 0; #X connect 299 3 296 0; #X connect 299 4 297 0; #X connect 299 5 298 0; #X connect 299 6 300 0; #X connect 299 7 301 0; #X connect 299 8 302 0; #X connect 299 9 303 0; #X connect 299 10 304 0; #X connect 299 11 305 0; #X connect 299 12 306 0; #X connect 299 13 307 0; #X connect 299 14 308 0; #X connect 299 15 309 0; #X connect 299 16 310 0; #X connect 299 17 311 0; #X connect 318 0 312 0; #X connect 318 1 313 0; #X connect 318 2 314 0; #X connect 318 3 315 0; #X connect 318 4 316 0; #X connect 318 5 317 0; #X connect 318 6 319 0; #X connect 318 7 320 0; #X connect 318 8 321 0; #X connect 318 9 322 0; #X connect 318 10 323 0; #X connect 318 11 324 0; #X connect 318 12 325 0; #X connect 318 13 326 0; #X connect 318 14 327 0; #X connect 318 15 328 0; #X connect 318 16 329 0; #X connect 318 17 330 0; #X connect 334 0 471 0; #X connect 334 1 432 0; #X connect 334 2 393 0; #X connect 334 3 354 0; #X connect 354 0 335 0; #X connect 354 1 336 0; #X connect 354 2 337 0; #X connect 354 3 338 0; #X connect 354 4 340 0; #X connect 354 5 341 0; #X connect 354 6 342 0; #X connect 354 7 343 0; #X connect 354 8 344 0; #X connect 354 9 345 0; #X connect 354 10 346 0; #X connect 354 11 347 0; #X connect 354 12 348 0; #X connect 354 13 349 0; #X connect 354 14 350 0; #X connect 354 15 351 0; #X connect 354 16 352 0; #X connect 354 17 353 0; #X connect 354 18 355 0; #X connect 354 19 356 0; #X connect 354 20 357 0; #X connect 354 21 358 0; #X connect 354 22 359 0; #X connect 354 23 360 0; #X connect 354 24 361 0; #X connect 354 25 362 0; #X connect 354 26 363 0; #X connect 354 27 364 0; #X connect 354 28 365 0; #X connect 354 29 366 0; #X connect 354 30 367 0; #X connect 354 31 368 0; #X connect 354 32 369 0; #X connect 354 33 370 0; #X connect 354 34 371 0; #X connect 354 35 372 0; #X connect 354 36 373 0; #X connect 354 37 374 0; #X connect 393 0 375 0; #X connect 393 1 376 0; #X connect 393 2 377 0; #X connect 393 3 378 0; #X connect 393 4 379 0; #X connect 393 5 380 0; #X connect 393 6 381 0; #X connect 393 7 382 0; #X connect 393 8 383 0; #X connect 393 9 384 0; #X connect 393 10 385 0; #X connect 393 11 386 0; #X connect 393 12 387 0; #X connect 393 13 388 0; #X connect 393 14 389 0; #X connect 393 15 390 0; #X connect 393 16 391 0; #X connect 393 17 392 0; #X connect 393 18 394 0; #X connect 393 19 395 0; #X connect 393 20 396 0; #X connect 393 21 397 0; #X connect 393 22 398 0; #X connect 393 23 399 0; #X connect 393 24 400 0; #X connect 393 25 401 0; #X connect 393 26 402 0; #X connect 393 27 403 0; #X connect 393 28 404 0; #X connect 393 29 405 0; #X connect 393 30 406 0; #X connect 393 31 407 0; #X connect 393 32 408 0; #X connect 393 33 409 0; #X connect 393 34 410 0; #X connect 393 35 411 0; #X connect 393 36 412 0; #X connect 393 37 413 0; #X connect 432 0 414 0; #X connect 432 1 415 0; #X connect 432 2 416 0; #X connect 432 3 417 0; #X connect 432 4 418 0; #X connect 432 5 419 0; #X connect 432 6 420 0; #X connect 432 7 421 0; #X connect 432 8 422 0; #X connect 432 9 423 0; #X connect 432 10 424 0; #X connect 432 11 425 0; #X connect 432 12 426 0; #X connect 432 13 427 0; #X connect 432 14 428 0; #X connect 432 15 429 0; #X connect 432 16 430 0; #X connect 432 17 431 0; #X connect 432 18 433 0; #X connect 432 19 434 0; #X connect 432 20 435 0; #X connect 432 21 436 0; #X connect 432 22 437 0; #X connect 432 23 438 0; #X connect 432 24 439 0; #X connect 432 25 440 0; #X connect 432 26 441 0; #X connect 432 27 442 0; #X connect 432 28 443 0; #X connect 432 29 444 0; #X connect 432 30 445 0; #X connect 432 31 446 0; #X connect 432 32 447 0; #X connect 432 33 448 0; #X connect 432 34 449 0; #X connect 432 35 450 0; #X connect 432 36 451 0; #X connect 432 37 452 0; #X connect 471 0 453 0; #X connect 471 1 454 0; #X connect 471 2 455 0; #X connect 471 3 456 0; #X connect 471 4 457 0; #X connect 471 5 458 0; #X connect 471 6 459 0; #X connect 471 7 460 0; #X connect 471 8 461 0; #X connect 471 9 462 0; #X connect 471 10 463 0; #X connect 471 11 464 0; #X connect 471 12 465 0; #X connect 471 13 466 0; #X connect 471 14 467 0; #X connect 471 15 468 0; #X connect 471 16 469 0; #X connect 471 17 470 0; #X connect 471 18 472 0; #X connect 471 19 473 0; #X connect 471 20 474 0; #X connect 471 21 475 0; #X connect 471 22 476 0; #X connect 471 23 477 0; #X connect 471 24 478 0; #X connect 471 25 479 0; #X connect 471 26 480 0; #X connect 471 27 481 0; #X connect 471 28 482 0; #X connect 471 29 483 0; #X connect 471 30 484 0; #X connect 471 31 485 0; #X connect 471 32 486 0; #X connect 471 33 487 0; #X connect 471 34 488 0; #X connect 471 35 489 0; #X connect 471 36 490 0; #X connect 471 37 491 0; #X connect 492 0 737 0; #X connect 492 1 668 0; #X connect 492 2 597 0; #X connect 492 3 526 0; #X connect 526 0 527 0; #X connect 526 1 561 0; #X connect 527 0 493 0; #X connect 527 1 494 0; #X connect 527 2 495 0; #X connect 527 3 496 0; #X connect 527 4 497 0; #X connect 527 5 498 0; #X connect 527 6 499 0; #X connect 527 7 500 0; #X connect 527 8 501 0; #X connect 527 9 502 0; #X connect 527 10 503 0; #X connect 527 11 504 0; #X connect 527 12 505 0; #X connect 527 13 506 0; #X connect 527 14 507 0; #X connect 527 15 508 0; #X connect 527 16 509 0; #X connect 527 17 510 0; #X connect 527 18 511 0; #X connect 527 19 512 0; #X connect 527 20 513 0; #X connect 527 21 514 0; #X connect 527 22 515 0; #X connect 527 23 516 0; #X connect 527 24 517 0; #X connect 527 25 518 0; #X connect 527 26 519 0; #X connect 527 27 520 0; #X connect 527 28 521 0; #X connect 527 29 522 0; #X connect 527 30 523 0; #X connect 527 31 524 0; #X connect 527 32 525 0; #X connect 561 0 528 0; #X connect 561 1 529 0; #X connect 561 2 530 0; #X connect 561 3 531 0; #X connect 561 4 532 0; #X connect 561 5 533 0; #X connect 561 6 534 0; #X connect 561 7 535 0; #X connect 561 8 536 0; #X connect 561 9 537 0; #X connect 561 10 538 0; #X connect 561 11 539 0; #X connect 561 12 540 0; #X connect 561 13 541 0; #X connect 561 14 542 0; #X connect 561 15 543 0; #X connect 561 16 544 0; #X connect 561 17 545 0; #X connect 561 18 546 0; #X connect 561 19 547 0; #X connect 561 20 548 0; #X connect 561 21 549 0; #X connect 561 22 550 0; #X connect 561 23 551 0; #X connect 561 24 552 0; #X connect 561 25 553 0; #X connect 561 26 554 0; #X connect 561 27 555 0; #X connect 561 28 556 0; #X connect 561 29 557 0; #X connect 561 30 558 0; #X connect 561 31 559 0; #X connect 561 32 560 0; #X connect 597 0 598 0; #X connect 597 1 632 0; #X connect 598 0 564 0; #X connect 598 1 565 0; #X connect 598 2 566 0; #X connect 598 3 567 0; #X connect 598 4 568 0; #X connect 598 5 569 0; #X connect 598 6 570 0; #X connect 598 7 571 0; #X connect 598 8 572 0; #X connect 598 9 573 0; #X connect 598 10 574 0; #X connect 598 11 575 0; #X connect 598 12 576 0; #X connect 598 13 577 0; #X connect 598 14 578 0; #X connect 598 15 579 0; #X connect 598 16 580 0; #X connect 598 17 581 0; #X connect 598 18 582 0; #X connect 598 19 583 0; #X connect 598 20 584 0; #X connect 598 21 585 0; #X connect 598 22 586 0; #X connect 598 23 587 0; #X connect 598 24 588 0; #X connect 598 25 589 0; #X connect 598 26 590 0; #X connect 598 27 591 0; #X connect 598 28 592 0; #X connect 598 29 593 0; #X connect 598 30 594 0; #X connect 598 31 595 0; #X connect 598 32 596 0; #X connect 632 0 599 0; #X connect 632 1 600 0; #X connect 632 2 601 0; #X connect 632 3 602 0; #X connect 632 4 603 0; #X connect 632 5 604 0; #X connect 632 6 605 0; #X connect 632 7 606 0; #X connect 632 8 607 0; #X connect 632 9 608 0; #X connect 632 10 609 0; #X connect 632 11 610 0; #X connect 632 12 611 0; #X connect 632 13 612 0; #X connect 632 14 613 0; #X connect 632 15 614 0; #X connect 632 16 615 0; #X connect 632 17 616 0; #X connect 632 18 617 0; #X connect 632 19 618 0; #X connect 632 20 619 0; #X connect 632 21 620 0; #X connect 632 22 621 0; #X connect 632 23 622 0; #X connect 632 24 623 0; #X connect 632 25 624 0; #X connect 632 26 625 0; #X connect 632 27 626 0; #X connect 632 28 627 0; #X connect 632 29 628 0; #X connect 632 30 629 0; #X connect 632 31 630 0; #X connect 632 32 631 0; #X connect 668 0 669 0; #X connect 668 1 703 0; #X connect 669 0 635 0; #X connect 669 1 636 0; #X connect 669 2 637 0; #X connect 669 3 638 0; #X connect 669 4 639 0; #X connect 669 5 640 0; #X connect 669 6 641 0; #X connect 669 7 642 0; #X connect 669 8 643 0; #X connect 669 9 644 0; #X connect 669 10 645 0; #X connect 669 11 646 0; #X connect 669 12 647 0; #X connect 669 13 648 0; #X connect 669 14 649 0; #X connect 669 15 650 0; #X connect 669 16 651 0; #X connect 669 17 652 0; #X connect 669 18 653 0; #X connect 669 19 654 0; #X connect 669 20 655 0; #X connect 669 21 656 0; #X connect 669 22 657 0; #X connect 669 23 658 0; #X connect 669 24 659 0; #X connect 669 25 660 0; #X connect 669 26 661 0; #X connect 669 27 662 0; #X connect 669 28 663 0; #X connect 669 29 664 0; #X connect 669 30 665 0; #X connect 669 31 666 0; #X connect 669 32 667 0; #X connect 703 0 670 0; #X connect 703 1 671 0; #X connect 703 2 672 0; #X connect 703 3 673 0; #X connect 703 4 674 0; #X connect 703 5 675 0; #X connect 703 6 676 0; #X connect 703 7 677 0; #X connect 703 8 678 0; #X connect 703 9 679 0; #X connect 703 10 680 0; #X connect 703 11 681 0; #X connect 703 12 682 0; #X connect 703 13 683 0; #X connect 703 14 684 0; #X connect 703 15 685 0; #X connect 703 16 686 0; #X connect 703 17 687 0; #X connect 703 18 688 0; #X connect 703 19 689 0; #X connect 703 20 690 0; #X connect 703 21 691 0; #X connect 703 22 692 0; #X connect 703 23 693 0; #X connect 703 24 694 0; #X connect 703 25 695 0; #X connect 703 26 696 0; #X connect 703 27 697 0; #X connect 703 28 698 0; #X connect 703 29 699 0; #X connect 703 30 700 0; #X connect 703 31 701 0; #X connect 703 32 702 0; #X connect 737 0 738 0; #X connect 737 1 772 0; #X connect 738 0 704 0; #X connect 738 1 705 0; #X connect 738 2 706 0; #X connect 738 3 707 0; #X connect 738 4 708 0; #X connect 738 5 709 0; #X connect 738 6 710 0; #X connect 738 7 711 0; #X connect 738 8 712 0; #X connect 738 9 713 0; #X connect 738 10 714 0; #X connect 738 11 715 0; #X connect 738 12 716 0; #X connect 738 13 717 0; #X connect 738 14 718 0; #X connect 738 15 719 0; #X connect 738 16 720 0; #X connect 738 17 721 0; #X connect 738 18 722 0; #X connect 738 19 723 0; #X connect 738 20 724 0; #X connect 738 21 725 0; #X connect 738 22 726 0; #X connect 738 23 727 0; #X connect 738 24 728 0; #X connect 738 25 729 0; #X connect 738 26 730 0; #X connect 738 27 731 0; #X connect 738 28 732 0; #X connect 738 29 733 0; #X connect 738 30 734 0; #X connect 738 31 735 0; #X connect 738 32 736 0; #X connect 772 0 739 0; #X connect 772 1 740 0; #X connect 772 2 741 0; #X connect 772 3 742 0; #X connect 772 4 743 0; #X connect 772 5 744 0; #X connect 772 6 745 0; #X connect 772 7 746 0; #X connect 772 8 747 0; #X connect 772 9 748 0; #X connect 772 10 749 0; #X connect 772 11 750 0; #X connect 772 12 751 0; #X connect 772 13 752 0; #X connect 772 14 753 0; #X connect 772 15 754 0; #X connect 772 16 755 0; #X connect 772 17 756 0; #X connect 772 18 757 0; #X connect 772 19 758 0; #X connect 772 20 759 0; #X connect 772 21 760 0; #X connect 772 22 761 0; #X connect 772 23 762 0; #X connect 772 24 763 0; #X connect 772 25 764 0; #X connect 772 26 765 0; #X connect 772 27 766 0; #X connect 772 28 767 0; #X connect 772 29 768 0; #X connect 772 30 769 0; #X connect 772 31 770 0; #X connect 772 32 771 0; iem_utils-v0.0.20181004/iem_roomsim/src/0000755000175000017500000000000013355472356020004 5ustar zmoelnigzmoelnigiem_utils-v0.0.20181004/iem_roomsim/src/nz~.c0000644000175000017500000001305613355471360020774 0ustar zmoelnigzmoelnig/* For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. iem_roomsim written by Thomas Musil (c) IEM KUG Graz Austria 2002 - 2018 */ #include "m_pd.h" #include "iemlib.h" #include "iem_roomsim.h" /* --------------------------- nz_tilde~ ------------------------------ */ /* --- one delwrite~and several delread~, independend of samplerate --- */ static t_class *nz_tilde_class; typedef struct _nz_tilde { t_object x_obj; t_sample *x_begmem1; t_sample *x_begmem2; int x_mallocsize; int x_max_delay_samples; int x_n_delays; int x_writeindex; int *x_del_samples; int x_blocksize; t_sample **x_io; t_float x_scalar_sig_in; } t_nz_tilde; static void nz_tilde_list(t_nz_tilde *x, t_symbol *s, int argc, t_atom *argv) { if(argc == x->x_n_delays) { int i, delay, max=x->x_max_delay_samples; for(i=0; i max) delay = max; x->x_del_samples[i] = delay; } } else post("nz~-ERROR: list need %d delay-values between 0 and %d samples !!!!", x->x_n_delays, x->x_max_delay_samples); } static t_int *nz_tilde_perform(t_int *w) { t_nz_tilde *x = (t_nz_tilde *)(w[1]); int n=(int)(w[2]); int num_dels=x->x_n_delays; t_sample *in; t_sample *out; int i, j; t_sample *writevec1; t_sample *writevec2; t_sample *readvec; writevec2 = x->x_begmem2 + x->x_writeindex; writevec1 = x->x_begmem1 + x->x_writeindex; in = x->x_io[0]; for(i=0; ix_io[j+1]; readvec = writevec2 - x->x_del_samples[j]; for(i=0; ix_writeindex += n; if(x->x_writeindex >= x->x_mallocsize) x->x_writeindex -= x->x_mallocsize; return(w+3); } static t_int *nz_tilde_perf8(t_int *w) { t_nz_tilde *x = (t_nz_tilde *)(w[1]); int n=(int)(w[2]); int num_dels=x->x_n_delays; t_sample *in; t_sample *out; int i, j; t_sample *writevec1; t_sample *writevec2; t_sample *readvec; writevec2 = x->x_begmem2 + x->x_writeindex; writevec1 = x->x_begmem1 + x->x_writeindex; in = x->x_io[0]; i = n; while(i) { writevec2[0] = in[0]; writevec2[1] = in[1]; writevec2[2] = in[2]; writevec2[3] = in[3]; writevec2[4] = in[4]; writevec2[5] = in[5]; writevec2[6] = in[6]; writevec2[7] = in[7]; writevec1[0] = in[0]; writevec1[1] = in[1]; writevec1[2] = in[2]; writevec1[3] = in[3]; writevec1[4] = in[4]; writevec1[5] = in[5]; writevec1[6] = in[6]; writevec1[7] = in[7]; writevec2 += 8; writevec1 += 8; in += 8; i -= 8; } for(j=0; jx_io[j+1]; readvec = x->x_begmem2 + x->x_writeindex - x->x_del_samples[j]; i = n; while(i) { out[0] = readvec[0]; out[1] = readvec[1]; out[2] = readvec[2]; out[3] = readvec[3]; out[4] = readvec[4]; out[5] = readvec[5]; out[6] = readvec[6]; out[7] = readvec[7]; out += 8; readvec += 8; i -= 8; } } x->x_writeindex += n; if(x->x_writeindex >= x->x_mallocsize) x->x_writeindex -= x->x_mallocsize; return(w+3); } static void nz_tilde_dsp(t_nz_tilde *x, t_signal **sp) { int n = sp[0]->s_n; int i, max_samps, num_io = x->x_n_delays + 1; if(!x->x_blocksize)/*first time*/ { max_samps = x->x_max_delay_samples; max_samps += ((- max_samps) & (n - 1)); max_samps += n; /* allocate memory as a multiple of blocksize */ x->x_mallocsize = max_samps; x->x_begmem1 = (t_sample *)getbytes(2 * x->x_mallocsize * sizeof(t_sample)); x->x_begmem2 = x->x_begmem1 + x->x_mallocsize; x->x_writeindex = 0; } else if(x->x_blocksize != n) { max_samps = x->x_max_delay_samples; max_samps += ((- max_samps) & (n - 1)); max_samps += n; /* allocate memory as a multiple of blocksize */ x->x_begmem1 = (t_sample *)resizebytes(x->x_begmem1, 2*x->x_mallocsize*sizeof(t_sample), 2*max_samps*sizeof(t_sample)); x->x_mallocsize = max_samps; x->x_begmem2 = x->x_begmem1 + x->x_mallocsize; x->x_writeindex = 0; } x->x_blocksize = n; for(i=0; ix_io[i] = sp[i]->s_vec; if(n&7) dsp_add(nz_tilde_perform, 2, x, n); else dsp_add(nz_tilde_perf8, 2, x, n); } static void *nz_tilde_new(t_floatarg n_delays, t_floatarg max_delay_samples) { t_nz_tilde *x = (t_nz_tilde *)pd_new(nz_tilde_class); int i, n_out = (int)n_delays; int max_samps = (int)max_delay_samples; if(n_out < 1) n_out = 1; x->x_n_delays = n_out; if(max_samps < 1) max_samps = 1; x->x_max_delay_samples = max_samps; x->x_mallocsize = 0; x->x_begmem1 = (t_sample *)0; x->x_begmem2 = (t_sample *)0; x->x_writeindex = 0; x->x_blocksize = 0; x->x_io = (t_sample **)getbytes((x->x_n_delays + 1) * sizeof(t_sample *)); x->x_del_samples = (int *)getbytes(x->x_n_delays * sizeof(int)); for(i=0; ix_obj, &s_signal); x->x_del_samples[i] = 0; } x->x_scalar_sig_in = (t_float)0.0; return (x); } static void nz_tilde_free(t_nz_tilde *x) { freebytes(x->x_del_samples, x->x_n_delays * sizeof(int)); freebytes(x->x_io, (x->x_n_delays + 1) * sizeof(t_sample *)); if(x->x_begmem1) freebytes(x->x_begmem1, 2 * x->x_mallocsize * sizeof(t_sample)); } void nz_tilde_setup(void) { nz_tilde_class = class_new(gensym("nz~"), (t_newmethod)nz_tilde_new, (t_method)nz_tilde_free, sizeof(t_nz_tilde), 0, A_DEFFLOAT, A_DEFFLOAT, 0); CLASS_MAINSIGNALIN(nz_tilde_class, t_nz_tilde, x_scalar_sig_in); class_addlist(nz_tilde_class, (t_method)nz_tilde_list); class_addmethod(nz_tilde_class, (t_method)nz_tilde_dsp, gensym("dsp"), A_CANT, 0); } iem_utils-v0.0.20181004/iem_roomsim/src/makefile_vc9proj0000644000175000017500000000176112630366346023161 0ustar zmoelnigzmoelnigTARGET = iem_roomsim all: ..\$(TARGET).dll VIS_CPP_PATH = "C:\Program Files\Microsoft Visual Studio 9.0\VC" VIS_SDK_PATH = "C:\Program Files\Microsoft SDKs\Windows\v6.0A" PD_INST_PATH = "C:\Program Files\pd-0.43.0" PD_WIN_INCLUDE_PATH = /I. /I$(PD_INST_PATH)\src /I$(VIS_CPP_PATH)\include PD_WIN_C_FLAGS = /nologo /W3 /WX /DMSW /DNT /DPD /DWIN32 /DWINDOWS /Ox -D_CRT_SECURE_NO_WARNINGS PD_WIN_L_FLAGS = /nologo PD_WIN_LIB = /NODEFAULTLIB:libcmt /NODEFAULTLIB:oldnames /NODEFAULTLIB:kernel32 \ $(VIS_CPP_PATH)\lib\libcmt.lib \ $(VIS_CPP_PATH)\lib\oldnames.lib \ $(VIS_SDK_PATH)\lib\kernel32.lib \ $(PD_INST_PATH)\bin\pd.lib SRC = early_reflections_3d.c \ early_reflections_2d.c \ cart2del_damp_2d.c \ cart2del_damp_3d.c \ iem_roomsim.c OBJ = $(SRC:.c=.obj) .c.obj: cl $(PD_WIN_C_FLAGS) $(PD_WIN_INCLUDE_PATH) /c $*.c ..\$(TARGET).dll: $(OBJ) link $(PD_WIN_L_FLAGS) /dll /export:$(TARGET)_setup \ /out:..\$(TARGET).dll $(OBJ) $(PD_WIN_LIB) clean: del *.obj iem_utils-v0.0.20181004/iem_roomsim/src/iem_roomsim.dsp0000644000175000017500000000512613355471360023031 0ustar zmoelnigzmoelnig# Microsoft Developer Studio Project File - Name="iem_roomsim" - Package Owner=<4> # Microsoft Developer Studio Generated Build File, Format Version 6.00 # ** NICHT BEARBEITEN ** # TARGTYPE "Win32 (x86) External Target" 0x0106 CFG=iem_roomsim - Win32 Debug !MESSAGE Dies ist kein gltiges Makefile. Zum Erstellen dieses Projekts mit NMAKE !MESSAGE verwenden Sie den Befehl "Makefile exportieren" und fhren Sie den Befehl !MESSAGE !MESSAGE NMAKE /f "iem_roomsim.mak". !MESSAGE !MESSAGE Sie knnen beim Ausfhren von NMAKE eine Konfiguration angeben !MESSAGE durch Definieren des Makros CFG in der Befehlszeile. Zum Beispiel: !MESSAGE !MESSAGE NMAKE /f "iem_roomsim.mak" CFG="iem_roomsim - Win32 Debug" !MESSAGE !MESSAGE Fr die Konfiguration stehen zur Auswahl: !MESSAGE !MESSAGE "iem_roomsim - Win32 Release" (basierend auf "Win32 (x86) External Target") !MESSAGE "iem_roomsim - Win32 Debug" (basierend auf "Win32 (x86) External Target") !MESSAGE # Begin Project # PROP AllowPerConfigDependencies 0 # PROP Scc_ProjName "" # PROP Scc_LocalPath "" !IF "$(CFG)" == "iem_roomsim - Win32 Release" # PROP BASE Use_Debug_Libraries 0 # PROP BASE Output_Dir "Release" # PROP BASE Intermediate_Dir "Release" # PROP BASE Cmd_Line "NMAKE /f makefile_vc12proj" # PROP BASE Rebuild_Opt "/a" # PROP BASE Target_File "makefile_vc12proj.exe" # PROP BASE Bsc_Name "makefile_vc12proj.bsc" # PROP BASE Target_Dir "" # PROP Use_Debug_Libraries 0 # PROP Output_Dir "Release" # PROP Intermediate_Dir "Release" # PROP Cmd_Line "NMAKE /f makefile_vc12proj" # PROP Rebuild_Opt "/a" # PROP Target_File "iem_roomsim.exe" # PROP Bsc_Name "iem_roomsim.bsc" # PROP Target_Dir "" !ELSEIF "$(CFG)" == "iem_roomsim - Win32 Debug" # PROP BASE Use_Debug_Libraries 1 # PROP BASE Output_Dir "Debug" # PROP BASE Intermediate_Dir "Debug" # PROP BASE Cmd_Line "NMAKE /f makefile_vc12proj" # PROP BASE Rebuild_Opt "/a" # PROP BASE Target_File "makefile_vc12proj.exe" # PROP BASE Bsc_Name "makefile_vc12proj.bsc" # PROP BASE Target_Dir "" # PROP Use_Debug_Libraries 1 # PROP Output_Dir "Debug" # PROP Intermediate_Dir "Debug" # PROP Cmd_Line "NMAKE /f makefile_vc12proj" # PROP Rebuild_Opt "/a" # PROP Target_File "iem_roomsim.exe" # PROP Bsc_Name "iem_roomsim.bsc" # PROP Target_Dir "" !ENDIF # Begin Target # Name "iem_roomsim - Win32 Release" # Name "iem_roomsim - Win32 Debug" !IF "$(CFG)" == "iem_roomsim - Win32 Release" !ELSEIF "$(CFG)" == "iem_roomsim - Win32 Debug" !ENDIF # Begin Source File SOURCE=.\makefile_vc12proj # End Source File # End Target # End Project iem_utils-v0.0.20181004/iem_roomsim/src/VC7/0000755000175000017500000000000012630366346020377 5ustar zmoelnigzmoelnigiem_utils-v0.0.20181004/iem_roomsim/src/VC7/iem_roomsim.vcproj0000644000175000017500000000244112630366346024144 0ustar zmoelnigzmoelnig iem_utils-v0.0.20181004/iem_roomsim/src/VC7/makefile_vc7proj0000644000175000017500000000200312630366346023544 0ustar zmoelnigzmoelnigTARGET = iem_roomsim all: ..\$(TARGET).dll VIS_CPP_PATH = "C:\Programme\Microsoft Visual Studio .NET 2003\Vc7" VIS_SDK_PATH = "C:\Programme\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK" PD_INST_PATH = "C:\Programme\pd-0.42-5" PD_WIN_INCLUDE_PATH = /I. /I$(PD_INST_PATH)\src /I$(VIS_CPP_PATH)\include PD_WIN_C_FLAGS = /nologo /W3 /WX /DMSW /DNT /DPD /DWIN32 /DWINDOWS /Ox -D_CRT_SECURE_NO_WARNINGS PD_WIN_L_FLAGS = /nologo PD_WIN_LIB = /NODEFAULTLIB:libcmt /NODEFAULTLIB:oldnames /NODEFAULTLIB:kernel32 \ $(VIS_CPP_PATH)\lib\libcmt.lib \ $(VIS_CPP_PATH)\lib\oldnames.lib \ $(VIS_SDK_PATH)\lib\kernel32.lib \ $(PD_INST_PATH)\bin\pd.lib SRC = early_reflections_3d.c \ early_reflections_2d.c \ cart2del_damp_2d.c \ cart2del_damp_3d.c \ iem_roomsim.c OBJ = $(SRC:.c=.obj) .c.obj: cl $(PD_WIN_C_FLAGS) $(PD_WIN_INCLUDE_PATH) /c $*.c ..\$(TARGET).dll: $(OBJ) link $(PD_WIN_L_FLAGS) /dll /export:$(TARGET)_setup \ /out:..\$(TARGET).dll $(OBJ) $(PD_WIN_LIB) clean: del *.obj iem_utils-v0.0.20181004/iem_roomsim/src/VC6/0000755000175000017500000000000012630366346020376 5ustar zmoelnigzmoelnigiem_utils-v0.0.20181004/iem_roomsim/src/VC6/iem_roomsim.dsp0000644000175000017500000000505112630366346023426 0ustar zmoelnigzmoelnig# Microsoft Developer Studio Project File - Name="iem_roomsim" - Package Owner=<4> # Microsoft Developer Studio Generated Build File, Format Version 6.00 # ** NICHT BEARBEITEN ** # TARGTYPE "Win32 (x86) External Target" 0x0106 CFG=iem_roomsim - Win32 Debug !MESSAGE Dies ist kein gltiges Makefile. Zum Erstellen dieses Projekts mit NMAKE !MESSAGE verwenden Sie den Befehl "Makefile exportieren" und fhren Sie den Befehl !MESSAGE !MESSAGE NMAKE /f "iem_roomsim.mak". !MESSAGE !MESSAGE Sie knnen beim Ausfhren von NMAKE eine Konfiguration angeben !MESSAGE durch Definieren des Makros CFG in der Befehlszeile. Zum Beispiel: !MESSAGE !MESSAGE NMAKE /f "iem_roomsim.mak" CFG="iem_roomsim - Win32 Debug" !MESSAGE !MESSAGE Fr die Konfiguration stehen zur Auswahl: !MESSAGE !MESSAGE "iem_roomsim - Win32 Release" (basierend auf "Win32 (x86) External Target") !MESSAGE "iem_roomsim - Win32 Debug" (basierend auf "Win32 (x86) External Target") !MESSAGE # Begin Project # PROP AllowPerConfigDependencies 0 # PROP Scc_ProjName "" # PROP Scc_LocalPath "" !IF "$(CFG)" == "iem_roomsim - Win32 Release" # PROP BASE Use_Debug_Libraries 0 # PROP BASE Output_Dir "Release" # PROP BASE Intermediate_Dir "Release" # PROP BASE Cmd_Line "NMAKE /f makefile_win" # PROP BASE Rebuild_Opt "/a" # PROP BASE Target_File "makefile_win.exe" # PROP BASE Bsc_Name "makefile_win.bsc" # PROP BASE Target_Dir "" # PROP Use_Debug_Libraries 0 # PROP Output_Dir "Release" # PROP Intermediate_Dir "Release" # PROP Cmd_Line "NMAKE /f makefile_win" # PROP Rebuild_Opt "/a" # PROP Target_File "iem_roomsim.exe" # PROP Bsc_Name "iem_roomsim.bsc" # PROP Target_Dir "" !ELSEIF "$(CFG)" == "iem_roomsim - Win32 Debug" # PROP BASE Use_Debug_Libraries 1 # PROP BASE Output_Dir "Debug" # PROP BASE Intermediate_Dir "Debug" # PROP BASE Cmd_Line "NMAKE /f makefile_win" # PROP BASE Rebuild_Opt "/a" # PROP BASE Target_File "makefile_win.exe" # PROP BASE Bsc_Name "makefile_win.bsc" # PROP BASE Target_Dir "" # PROP Use_Debug_Libraries 1 # PROP Output_Dir "Debug" # PROP Intermediate_Dir "Debug" # PROP Cmd_Line "NMAKE /f makefile_win" # PROP Rebuild_Opt "/a" # PROP Target_File "iem_roomsim.exe" # PROP Bsc_Name "iem_roomsim.bsc" # PROP Target_Dir "" !ENDIF # Begin Target # Name "iem_roomsim - Win32 Release" # Name "iem_roomsim - Win32 Debug" !IF "$(CFG)" == "iem_roomsim - Win32 Release" !ELSEIF "$(CFG)" == "iem_roomsim - Win32 Debug" !ENDIF # Begin Source File SOURCE=.\makefile_win # End Source File # End Target # End Project iem_utils-v0.0.20181004/iem_roomsim/src/VC6/iem_roomsim.dsw0000644000175000017500000000107512630366346023437 0ustar zmoelnigzmoelnigMicrosoft Developer Studio Workspace File, Format Version 6.00 # WARNUNG: DIESE ARBEITSBEREICHSDATEI DARF NICHT BEARBEITET ODER GELSCHT WERDEN! ############################################################################### Project: "iem_roomsim"=.\iem_roomsim.dsp - Package Owner=<4> Package=<5> {{{ }}} Package=<4> {{{ }}} ############################################################################### Global: Package=<5> {{{ }}} Package=<3> {{{ }}} ############################################################################### iem_utils-v0.0.20181004/iem_roomsim/src/VC6/makefile_win0000644000175000017500000000202012630366346022745 0ustar zmoelnigzmoelnig all: ..\iem_roomsim.dll VIS_CPP_PATH = "C:\Programme\Microsoft Visual Studio\Vc98" PD_INST_PATH = "C:\Programme\pd" PD_WIN_INCLUDE_PATH = /I. /I$(PD_INST_PATH)\src /I$(VIS_CPP_PATH)\include PD_WIN_C_FLAGS = /nologo /W3 /WX /DMSW /DNT /DPD /DWIN32 /DWINDOWS /Ox -DPA_LITTLE_ENDIAN PD_WIN_L_FLAGS = /nologo PD_WIN_LIB = /NODEFAULTLIB:libc /NODEFAULTLIB:oldnames /NODEFAULTLIB:kernel /NODEFAULTLIB:uuid \ $(VIS_CPP_PATH)\lib\libc.lib \ $(VIS_CPP_PATH)\lib\oldnames.lib \ $(VIS_CPP_PATH)\lib\kernel32.lib \ $(VIS_CPP_PATH)\lib\wsock32.lib \ $(VIS_CPP_PATH)\lib\winmm.lib \ $(PD_INST_PATH)\bin\pthreadVC.lib \ $(PD_INST_PATH)\bin\pd.lib SRC = early_reflections_3d.c \ early_reflections_2d.c \ cart2del_damp_2d.c \ cart2del_damp_3d.c \ iem_roomsim.c OBJ = $(SRC:.c=.obj) .c.obj: cl $(PD_WIN_C_FLAGS) $(PD_WIN_INCLUDE_PATH) /c $*.c ..\iem_roomsim.dll: $(OBJ) link $(PD_WIN_L_FLAGS) /dll /export:iem_roomsim_setup \ /out:..\iem_roomsim.dll $(OBJ) $(PD_WIN_LIB) clean: del *.obj iem_utils-v0.0.20181004/iem_roomsim/src/iem_roomsim.vcxproj0000644000175000017500000000612313355471360023734 0ustar zmoelnigzmoelnig Debug Win32 Release Win32 MakeFileProj {3446FCA3-769E-4EFC-8B8C-CF16D637040A} Makefile v110 Makefile v110 .\Debug\ .\Debug\ NMAKE /f makefile_vc12proj NMAKE /f makefile_vc12proj /a iem_roomsim.exe .\Release\ .\Release\ NMAKE /f makefile_vc12proj NMAKE /f makefile_vc12proj /a iem_roomsim.exe iem_utils-v0.0.20181004/iem_roomsim/src/xy_2_del_damp_phi.c0000644000175000017500000004177413355471360023525 0ustar zmoelnigzmoelnig/* For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. iem_roomsim written by Thomas Musil (c) IEM KUG Graz Austria 2002 - 2018 */ #include "m_pd.h" #include "iemlib.h" #include /* -------------------------- xy_2_del_damp_phi ------------------------------ */ /* ** pos. x-Richtung Nase ** pos. y-Richtung Linke Hand ** pos. z-Richtung Scheitel ** Kartesischer Koordinaten-Ursprung liegt in der Mitte des Raums am Boden aenderungen: src-index von 1 .. n auf 0 .. (n-1) aenderungen: azimuth von rad auf degree */ /* 1., 2., 3. und 4. reflexionen: +y ^ | | 29 30 16 28 31 17 07 15 27 32 18 08 02 06 14 26 33 19 09 03 00 01 05 13 25 ---> +x 34 20 10 04 12 24 40 35 21 11 23 39 36 22 38 37 */ typedef struct _xy_2_del_damp_phi { t_object x_obj; t_symbol *x_s_direct; t_symbol *x_s_early1; t_symbol *x_s_early2; t_symbol *x_s_early3; t_symbol *x_s_early4; t_symbol *x_s_del; t_symbol *x_s_damp; t_symbol *x_s_phi; t_float x_room_x; t_float x_room_y; t_float x_head_x; t_float x_head_y; t_float x_src_x; t_float x_src_y; t_float x_r_min; t_float x_speed; t_float x_180_over_pi; t_float *x_rad; t_atom *x_at; t_int x_size_rad; t_int x_size_at; void *x_clock; } t_xy_2_del_damp_phi; static t_class *xy_2_del_damp_phi_class; static t_float xy_2_del_damp_phi_calc_radius(t_float r_min, t_float dx, t_float dy) { t_float r = (t_float)sqrt(dx*dx + dy*dy); if(r < r_min) return(r_min); else return(r); } static t_float xy_2_del_damp_phi_calc_azimuth(t_float x_180_over_pi, t_float dx, t_float dy) { if(dx == 0.0f) { if(dy < 0.0f) return(270.0f); else return(90.0f); } else if(dx < 0.0f) { return(180.0f + x_180_over_pi * (t_float)atan(dy / dx)); } else { if(dy < 0.0f) return(360.0f + x_180_over_pi * (t_float)atan(dy / dx)); else return(x_180_over_pi * (t_float)atan(dy / dx)); } } static void xy_2_del_damp_phi_doit(t_xy_2_del_damp_phi *x) { t_float diff_x, diff_y; t_float sum_x, sum_y; t_float lx, wy; t_float x_0, y_0; t_float xp1, yp1, xn1, yn1; t_float xp2, yp2, xn2, yn2; t_float xp3, yp3, xn3, yn3; t_float xp4, yp4, xn4, yn4; t_float m2ms = 1000.0f / x->x_speed; t_float x_180_over_pi=x->x_180_over_pi; t_float r_min = x->x_r_min; t_float *rad=x->x_rad; t_atom *at=x->x_at; lx = x->x_room_x; wy = x->x_room_y; diff_x = x->x_src_x - x->x_head_x; diff_y = x->x_src_y - x->x_head_y; sum_x = x->x_src_x + x->x_head_x; sum_y = x->x_src_y + x->x_head_y; x_0 = diff_x; y_0 = diff_y; xp1 = lx - sum_x; yp1 = wy - sum_y; xn1 = -lx - sum_x; yn1 = -wy - sum_y; xp2 = 2.0f*lx + diff_x; yp2 = 2.0f*wy + diff_y; xn2 = -2.0f*lx + diff_x; yn2 = -2.0f*wy + diff_y; xp3 = 3.0f*lx - sum_x; yp3 = 3.0f*wy - sum_y; xn3 = -3.0f*lx - sum_x; yn3 = -3.0f*wy - sum_y; xp4 = 4.0f*lx + diff_x; yp4 = 4.0f*wy + diff_y; xn4 = -4.0f*lx + diff_x; yn4 = -4.0f*wy + diff_y; rad[0] = xy_2_del_damp_phi_calc_radius(r_min, x_0, y_0); rad[1] = xy_2_del_damp_phi_calc_radius(r_min, xp1, y_0); rad[2] = xy_2_del_damp_phi_calc_radius(r_min, x_0, yp1); rad[3] = xy_2_del_damp_phi_calc_radius(r_min, xn1, y_0); rad[4] = xy_2_del_damp_phi_calc_radius(r_min, x_0, yn1); rad[5] = xy_2_del_damp_phi_calc_radius(r_min, xp2, y_0); rad[6] = xy_2_del_damp_phi_calc_radius(r_min, xp1, yp1); rad[7] = xy_2_del_damp_phi_calc_radius(r_min, x_0, yp2); rad[8] = xy_2_del_damp_phi_calc_radius(r_min, xn1, yn1); rad[9] = xy_2_del_damp_phi_calc_radius(r_min, xn2, y_0); rad[10] = xy_2_del_damp_phi_calc_radius(r_min, xp1, yn1); rad[11] = xy_2_del_damp_phi_calc_radius(r_min, x_0, yn2); rad[12] = xy_2_del_damp_phi_calc_radius(r_min, xn1, yp1); rad[13] = xy_2_del_damp_phi_calc_radius(r_min, xp3, y_0); rad[14] = xy_2_del_damp_phi_calc_radius(r_min, xp2, yp1); rad[15] = xy_2_del_damp_phi_calc_radius(r_min, xp1, yp2); rad[16] = xy_2_del_damp_phi_calc_radius(r_min, x_0, yp3); rad[17] = xy_2_del_damp_phi_calc_radius(r_min, xn1, yp2); rad[18] = xy_2_del_damp_phi_calc_radius(r_min, xn2, yp1); rad[19] = xy_2_del_damp_phi_calc_radius(r_min, xn3, y_0); rad[20] = xy_2_del_damp_phi_calc_radius(r_min, xn2, yn1); rad[21] = xy_2_del_damp_phi_calc_radius(r_min, xn1, yn2); rad[22] = xy_2_del_damp_phi_calc_radius(r_min, x_0, yn3); rad[23] = xy_2_del_damp_phi_calc_radius(r_min, xp1, yn2); rad[24] = xy_2_del_damp_phi_calc_radius(r_min, xp2, yn1); rad[25] = xy_2_del_damp_phi_calc_radius(r_min, xp4, y_0); rad[26] = xy_2_del_damp_phi_calc_radius(r_min, xp3, yp1); rad[27] = xy_2_del_damp_phi_calc_radius(r_min, xp2, yp2); rad[28] = xy_2_del_damp_phi_calc_radius(r_min, xp1, yp3); rad[29] = xy_2_del_damp_phi_calc_radius(r_min, x_0, yp4); rad[30] = xy_2_del_damp_phi_calc_radius(r_min, xn1, yp3); rad[31] = xy_2_del_damp_phi_calc_radius(r_min, xn2, yp2); rad[32] = xy_2_del_damp_phi_calc_radius(r_min, xn3, yp1); rad[33] = xy_2_del_damp_phi_calc_radius(r_min, xn4, y_0); rad[34] = xy_2_del_damp_phi_calc_radius(r_min, xn3, yn1); rad[35] = xy_2_del_damp_phi_calc_radius(r_min, xn2, yn2); rad[36] = xy_2_del_damp_phi_calc_radius(r_min, xn1, yn3); rad[37] = xy_2_del_damp_phi_calc_radius(r_min, x_0, yn4); rad[38] = xy_2_del_damp_phi_calc_radius(r_min, xp1, yn3); rad[39] = xy_2_del_damp_phi_calc_radius(r_min, xp2, yn2); rad[40] = xy_2_del_damp_phi_calc_radius(r_min, xp3, yn1); /* delay-reihenfolge: 0, +1x, +1y, -1x, -1y +2x, +2y, -2x, -2y +1x+1y, -1x-1y +1x-1y, -1x+1y */ SETSYMBOL(at, x->x_s_del); SETFLOAT(at+1, rad[0] * m2ms); outlet_anything(x->x_obj.ob_outlet, x->x_s_direct, 2, at); SETFLOAT(at+1, rad[1] * m2ms); SETFLOAT(at+2, rad[2] * m2ms); SETFLOAT(at+3, rad[3] * m2ms); SETFLOAT(at+4, rad[4] * m2ms); outlet_anything(x->x_obj.ob_outlet, x->x_s_early1, 5, at); SETFLOAT(at+1, rad[5] * m2ms); SETFLOAT(at+2, rad[6] * m2ms); SETFLOAT(at+3, rad[7] * m2ms); SETFLOAT(at+4, rad[8] * m2ms); SETFLOAT(at+5, rad[9] * m2ms); SETFLOAT(at+6, rad[10] * m2ms); SETFLOAT(at+7, rad[11] * m2ms); SETFLOAT(at+8, rad[12] * m2ms); outlet_anything(x->x_obj.ob_outlet, x->x_s_early2, 9, at); SETFLOAT(at+1, rad[13] * m2ms); SETFLOAT(at+2, rad[14] * m2ms); SETFLOAT(at+3, rad[15] * m2ms); SETFLOAT(at+4, rad[16] * m2ms); SETFLOAT(at+5, rad[17] * m2ms); SETFLOAT(at+6, rad[18] * m2ms); SETFLOAT(at+7, rad[19] * m2ms); SETFLOAT(at+8, rad[20] * m2ms); SETFLOAT(at+9, rad[21] * m2ms); SETFLOAT(at+10, rad[22] * m2ms); SETFLOAT(at+11, rad[23] * m2ms); SETFLOAT(at+12, rad[24] * m2ms); outlet_anything(x->x_obj.ob_outlet, x->x_s_early3, 13, at); SETFLOAT(at+1, rad[25] * m2ms); SETFLOAT(at+2, rad[26] * m2ms); SETFLOAT(at+3, rad[27] * m2ms); SETFLOAT(at+4, rad[28] * m2ms); SETFLOAT(at+5, rad[29] * m2ms); SETFLOAT(at+6, rad[30] * m2ms); SETFLOAT(at+7, rad[31] * m2ms); SETFLOAT(at+8, rad[32] * m2ms); SETFLOAT(at+9, rad[33] * m2ms); SETFLOAT(at+10, rad[34] * m2ms); SETFLOAT(at+11, rad[35] * m2ms); SETFLOAT(at+12, rad[36] * m2ms); SETFLOAT(at+13, rad[37] * m2ms); SETFLOAT(at+14, rad[38] * m2ms); SETFLOAT(at+15, rad[39] * m2ms); SETFLOAT(at+16, rad[40] * m2ms); outlet_anything(x->x_obj.ob_outlet, x->x_s_early4, 17, at); /* daempfungs-reihenfolge: 0, +1x, +1y, -1x, -1y +2x, +2y, -2x, -2y +1x+1y, -1x-1y +1x-1y, -1x+1y */ SETSYMBOL(at, x->x_s_damp); SETFLOAT(at+1, r_min / rad[0]); outlet_anything(x->x_obj.ob_outlet, x->x_s_direct, 2, at); SETFLOAT(at+1, r_min / rad[1]); SETFLOAT(at+2, r_min / rad[2]); SETFLOAT(at+3, r_min / rad[3]); SETFLOAT(at+4, r_min / rad[4]); outlet_anything(x->x_obj.ob_outlet, x->x_s_early1, 5, at); SETFLOAT(at+1, r_min / rad[5]); SETFLOAT(at+2, r_min / rad[6]); SETFLOAT(at+3, r_min / rad[7]); SETFLOAT(at+4, r_min / rad[8]); SETFLOAT(at+5, r_min / rad[9]); SETFLOAT(at+6, r_min / rad[10]); SETFLOAT(at+7, r_min / rad[11]); SETFLOAT(at+8, r_min / rad[12]); outlet_anything(x->x_obj.ob_outlet, x->x_s_early2, 9, at); SETFLOAT(at+1, r_min / rad[13]); SETFLOAT(at+2, r_min / rad[14]); SETFLOAT(at+3, r_min / rad[15]); SETFLOAT(at+4, r_min / rad[16]); SETFLOAT(at+5, r_min / rad[17]); SETFLOAT(at+6, r_min / rad[18]); SETFLOAT(at+7, r_min / rad[19]); SETFLOAT(at+8, r_min / rad[20]); SETFLOAT(at+9, r_min / rad[21]); SETFLOAT(at+10, r_min / rad[22]); SETFLOAT(at+11, r_min / rad[23]); SETFLOAT(at+12, r_min / rad[24]); outlet_anything(x->x_obj.ob_outlet, x->x_s_early3, 13, at); SETFLOAT(at+1, r_min / rad[25]); SETFLOAT(at+2, r_min / rad[26]); SETFLOAT(at+3, r_min / rad[27]); SETFLOAT(at+4, r_min / rad[28]); SETFLOAT(at+5, r_min / rad[29]); SETFLOAT(at+6, r_min / rad[30]); SETFLOAT(at+7, r_min / rad[31]); SETFLOAT(at+8, r_min / rad[32]); SETFLOAT(at+9, r_min / rad[33]); SETFLOAT(at+10, r_min / rad[34]); SETFLOAT(at+11, r_min / rad[35]); SETFLOAT(at+12, r_min / rad[36]); SETFLOAT(at+13, r_min / rad[37]); SETFLOAT(at+14, r_min / rad[38]); SETFLOAT(at+15, r_min / rad[39]); SETFLOAT(at+16, r_min / rad[40]); outlet_anything(x->x_obj.ob_outlet, x->x_s_early4, 17, at); /* encoder-winkel-reihenfolge: index delta phi 0, +1x, +1y, -1x, -1y +2x, +2y, -2x, -2y +1x+1y, -1x-1y +1x-1y, -1x+1y */ SETSYMBOL(at, x->x_s_phi); SETFLOAT(at+1, xy_2_del_damp_phi_calc_azimuth(x_180_over_pi, x_0, y_0)); outlet_anything(x->x_obj.ob_outlet, x->x_s_direct, 2, at); SETFLOAT(at+1, xy_2_del_damp_phi_calc_azimuth(x_180_over_pi, xp1, y_0)); SETFLOAT(at+2, xy_2_del_damp_phi_calc_azimuth(x_180_over_pi, x_0, yp1)); SETFLOAT(at+3, xy_2_del_damp_phi_calc_azimuth(x_180_over_pi, xn1, y_0)); SETFLOAT(at+4, xy_2_del_damp_phi_calc_azimuth(x_180_over_pi, x_0, yn1)); outlet_anything(x->x_obj.ob_outlet, x->x_s_early1, 5, at); SETFLOAT(at+1, xy_2_del_damp_phi_calc_azimuth(x_180_over_pi, xp2, y_0)); SETFLOAT(at+2, xy_2_del_damp_phi_calc_azimuth(x_180_over_pi, xp1, yp1)); SETFLOAT(at+3, xy_2_del_damp_phi_calc_azimuth(x_180_over_pi, x_0, yp2)); SETFLOAT(at+4, xy_2_del_damp_phi_calc_azimuth(x_180_over_pi, xn1, yn1)); SETFLOAT(at+5, xy_2_del_damp_phi_calc_azimuth(x_180_over_pi, xn2, y_0)); SETFLOAT(at+6, xy_2_del_damp_phi_calc_azimuth(x_180_over_pi, xp1, yn1)); SETFLOAT(at+7, xy_2_del_damp_phi_calc_azimuth(x_180_over_pi, x_0, yn2)); SETFLOAT(at+8, xy_2_del_damp_phi_calc_azimuth(x_180_over_pi, xn1, yp1)); outlet_anything(x->x_obj.ob_outlet, x->x_s_early2, 9, at); SETFLOAT(at+1, xy_2_del_damp_phi_calc_azimuth(x_180_over_pi, xp3, y_0)); SETFLOAT(at+2, xy_2_del_damp_phi_calc_azimuth(x_180_over_pi, xp2, yp1)); SETFLOAT(at+3, xy_2_del_damp_phi_calc_azimuth(x_180_over_pi, xp1, yp2)); SETFLOAT(at+4, xy_2_del_damp_phi_calc_azimuth(x_180_over_pi, x_0, yp3)); SETFLOAT(at+5, xy_2_del_damp_phi_calc_azimuth(x_180_over_pi, xn1, yp2)); SETFLOAT(at+6, xy_2_del_damp_phi_calc_azimuth(x_180_over_pi, xn2, yp1)); SETFLOAT(at+7, xy_2_del_damp_phi_calc_azimuth(x_180_over_pi, xn3, y_0)); SETFLOAT(at+8, xy_2_del_damp_phi_calc_azimuth(x_180_over_pi, xn2, yn1)); SETFLOAT(at+9, xy_2_del_damp_phi_calc_azimuth(x_180_over_pi, xn1, yn2)); SETFLOAT(at+10, xy_2_del_damp_phi_calc_azimuth(x_180_over_pi, x_0, yn3)); SETFLOAT(at+11, xy_2_del_damp_phi_calc_azimuth(x_180_over_pi, xp1, yn2)); SETFLOAT(at+12, xy_2_del_damp_phi_calc_azimuth(x_180_over_pi, xp2, yn1)); outlet_anything(x->x_obj.ob_outlet, x->x_s_early3, 13, at); SETFLOAT(at+1, xy_2_del_damp_phi_calc_azimuth(x_180_over_pi, xp4, y_0)); SETFLOAT(at+2, xy_2_del_damp_phi_calc_azimuth(x_180_over_pi, xp3, yp1)); SETFLOAT(at+3, xy_2_del_damp_phi_calc_azimuth(x_180_over_pi, xp2, yp2)); SETFLOAT(at+4, xy_2_del_damp_phi_calc_azimuth(x_180_over_pi, xp1, yp3)); SETFLOAT(at+5, xy_2_del_damp_phi_calc_azimuth(x_180_over_pi, x_0, yp4)); SETFLOAT(at+6, xy_2_del_damp_phi_calc_azimuth(x_180_over_pi, xn1, yp3)); SETFLOAT(at+7, xy_2_del_damp_phi_calc_azimuth(x_180_over_pi, xn2, yp2)); SETFLOAT(at+8, xy_2_del_damp_phi_calc_azimuth(x_180_over_pi, xn3, yp1)); SETFLOAT(at+9, xy_2_del_damp_phi_calc_azimuth(x_180_over_pi, xn4, y_0)); SETFLOAT(at+10, xy_2_del_damp_phi_calc_azimuth(x_180_over_pi, xn3, yn1)); SETFLOAT(at+11, xy_2_del_damp_phi_calc_azimuth(x_180_over_pi, xn2, yn2)); SETFLOAT(at+12, xy_2_del_damp_phi_calc_azimuth(x_180_over_pi, xn1, yn3)); SETFLOAT(at+13, xy_2_del_damp_phi_calc_azimuth(x_180_over_pi, x_0, yn4)); SETFLOAT(at+14, xy_2_del_damp_phi_calc_azimuth(x_180_over_pi, xp1, yn3)); SETFLOAT(at+15, xy_2_del_damp_phi_calc_azimuth(x_180_over_pi, xp2, yn2)); SETFLOAT(at+16, xy_2_del_damp_phi_calc_azimuth(x_180_over_pi, xp3, yn1)); outlet_anything(x->x_obj.ob_outlet, x->x_s_early4, 17, at); } static void xy_2_del_damp_phi_src_xy(t_xy_2_del_damp_phi *x, t_symbol *s, int argc, t_atom *argv) { if((argc >= 2)&&IS_A_FLOAT(argv, 0)&&IS_A_FLOAT(argv, 1)) { t_float xr2=0.5f*x->x_room_x, yr2=0.5f*x->x_room_y; x->x_src_x = atom_getfloat(argv++); x->x_src_y = atom_getfloat(argv); if(x->x_src_x > xr2) x->x_src_x = xr2; if(x->x_src_x < -xr2) x->x_src_x = -xr2; if(x->x_src_y > yr2) x->x_src_y = yr2; if(x->x_src_y < -yr2) x->x_src_y = -yr2; clock_delay(x->x_clock, 0.0f); } } static void xy_2_del_damp_phi_head_xy(t_xy_2_del_damp_phi *x, t_symbol *s, int argc, t_atom *argv) { if((argc >= 2)&&IS_A_FLOAT(argv, 0)&&IS_A_FLOAT(argv, 1)) { t_float xr2=0.5f*x->x_room_x, yr2=0.5f*x->x_room_y; x->x_head_x = atom_getfloat(argv++); x->x_head_y = atom_getfloat(argv); if(x->x_head_x > xr2) x->x_head_x = xr2; if(x->x_head_x < -xr2) x->x_head_x = -xr2; if(x->x_head_y > yr2) x->x_head_y = yr2; if(x->x_head_y < -yr2) x->x_head_y = -yr2; clock_delay(x->x_clock, 0.0f); } } static void xy_2_del_damp_phi_room_xy(t_xy_2_del_damp_phi *x, t_symbol *s, int argc, t_atom *argv) { if((argc >= 2)&&IS_A_FLOAT(argv, 0)&&IS_A_FLOAT(argv, 1)) { t_float xr2=0.0f, yr2=0.0f; x->x_room_x = atom_getfloat(argv++); x->x_room_y = atom_getfloat(argv); if(x->x_room_x < 0.5f) x->x_room_x = 0.5f; if(x->x_room_y < 0.5f) x->x_room_y = 0.5f; xr2 = 0.5f*x->x_room_x; yr2 = 0.5f*x->x_room_y; if(x->x_src_x > xr2) x->x_src_x = xr2; if(x->x_src_x < -xr2) x->x_src_x = -xr2; if(x->x_src_y > yr2) x->x_src_y = yr2; if(x->x_src_y < -yr2) x->x_src_y = -yr2; if(x->x_head_x > xr2) x->x_head_x = xr2; if(x->x_head_x < -xr2) x->x_head_x = -xr2; if(x->x_head_y > yr2) x->x_head_y = yr2; if(x->x_head_y < -yr2) x->x_head_y = -yr2; clock_delay(x->x_clock, 0.0f); } } static void xy_2_del_damp_phi_r_min(t_xy_2_del_damp_phi *x, t_float r_min) { if(r_min < 0.1f) r_min = 0.1f; x->x_r_min = r_min; clock_delay(x->x_clock, 0.0f); } static void xy_2_del_damp_phi_sonic_speed(t_xy_2_del_damp_phi *x, t_float speed) { if(speed < 10.0f) speed = 10.0f; if(speed > 2000.0f) speed = 2000.0f; x->x_speed = speed; clock_delay(x->x_clock, 0.0f); } static void xy_2_del_damp_phi_free(t_xy_2_del_damp_phi *x) { clock_free(x->x_clock); freebytes(x->x_at, x->x_size_at * sizeof(t_atom)); freebytes(x->x_rad, x->x_size_rad * sizeof(t_float)); } static void *xy_2_del_damp_phi_new(t_symbol *s, int argc, t_atom *argv) { t_xy_2_del_damp_phi *x = (t_xy_2_del_damp_phi *)pd_new(xy_2_del_damp_phi_class); x->x_room_x = 12.0f; x->x_room_y = 8.0f; x->x_head_x = 0.0f; x->x_head_y = 0.0f; x->x_src_x = 3.0f; x->x_src_y = 0.5f; x->x_r_min = 1.4f; x->x_speed = 340.0f; x->x_s_direct = gensym("direct"); x->x_s_early1 = gensym("early1"); x->x_s_early2 = gensym("early2"); x->x_s_early3 = gensym("early3"); x->x_s_early4 = gensym("early4"); x->x_s_damp = gensym("damp"); x->x_s_del = gensym("del"); x->x_s_phi = gensym("phi"); x->x_size_rad = 41; // 1 + 4 + 8 + 12 + 16 x->x_size_at = 17; // 16 + 1 x->x_rad = (t_float *)getbytes(x->x_size_rad * sizeof(t_float)); x->x_at = (t_atom *)getbytes(x->x_size_at * sizeof(t_atom)); outlet_new(&x->x_obj, &s_list); x->x_clock = clock_new(x, (t_method)xy_2_del_damp_phi_doit); x->x_180_over_pi = (t_float)(180.0 / (4.0 * atan(1.0))); return (x); } void xy_2_del_damp_phi_setup(void) { xy_2_del_damp_phi_class = class_new(gensym("xy_2_del_damp_phi"), (t_newmethod)xy_2_del_damp_phi_new, (t_method)xy_2_del_damp_phi_free, sizeof(t_xy_2_del_damp_phi), 0, A_GIMME, 0); class_addmethod(xy_2_del_damp_phi_class, (t_method)xy_2_del_damp_phi_src_xy, gensym("src_xy"), A_GIMME, 0); class_addmethod(xy_2_del_damp_phi_class, (t_method)xy_2_del_damp_phi_head_xy, gensym("head_xy"), A_GIMME, 0); class_addmethod(xy_2_del_damp_phi_class, (t_method)xy_2_del_damp_phi_room_xy, gensym("room_xy"), A_GIMME, 0); class_addmethod(xy_2_del_damp_phi_class, (t_method)xy_2_del_damp_phi_sonic_speed, gensym("sonic_speed"), A_FLOAT, 0); class_addmethod(xy_2_del_damp_phi_class, (t_method)xy_2_del_damp_phi_r_min, gensym("r_min"), A_FLOAT, 0); } iem_utils-v0.0.20181004/iem_roomsim/src/makefile_vc12proj0000644000175000017500000000227213355471360023227 0ustar zmoelnigzmoelnigTARGET = iem_roomsim all: ..\$(TARGET).dll VIS_CPP_COMP = cl VIS_CPP_LINK = link VIS_CPP_PATH = "$(PROGRAMFILES)\Microsoft Visual Studio 11.0\VC" VIS_SDK_PATH = "$(PROGRAMFILES)\Windows Kits\8.1" PD_INST_PATH = "$(PROGRAMFILES)\pd-0.48-1" PD_WIN_INCLUDE_PATH = /I. /I$(PD_INST_PATH)\src /I$(VIS_CPP_PATH)\include /I..\include PD_WIN_C_FLAGS = /nologo /W3 /WX /DMSW /DNT /DPD /DWIN32 /DWINDOWS /Ox -D_CRT_SECURE_NO_WARNINGS PD_WIN_L_FLAGS = /nologo PD_WIN_LIB = /NODEFAULTLIB:libcmt /NODEFAULTLIB:oldnames /NODEFAULTLIB:kernel32 \ $(VIS_CPP_PATH)\lib\libcmt.lib \ $(VIS_CPP_PATH)\lib\oldnames.lib \ $(VIS_SDK_PATH)\Lib\winv6.3\um\x86\kernel32.lib \ $(PD_INST_PATH)\bin\pd.lib SRC = early_reflections_3d.c \ early_reflections_2d.c \ cart2del_damp_2d.c \ cart2del_damp_3d.c \ # xy_2_del_damp_phi.c \ # xyz_3_del_damp_theta_phi.c \ n_delay1p_line~.c \ n_delay2p_line~.c \ nz~.c \ block_delay~.c \ block_lp1~.c \ block_peak_env~.c \ $(TARGET).c OBJ = $(SRC:.c=.obj) .c.obj: $(VIS_CPP_COMP) $(PD_WIN_C_FLAGS) $(PD_WIN_INCLUDE_PATH) /c $*.c ..\$(TARGET).dll: $(OBJ) $(VIS_CPP_LINK) $(PD_WIN_L_FLAGS) /dll /export:$(TARGET)_setup \ /out:..\$(TARGET).dll $(OBJ) $(PD_WIN_LIB) clean: del *.obj iem_utils-v0.0.20181004/iem_roomsim/src/early_reflections_2d.c0000644000175000017500000003454513355471360024253 0ustar zmoelnigzmoelnig/* For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. iem_roomsim written by Thomas Musil (c) IEM KUG Graz Austria 2002 - 2006 */ #include "m_pd.h" #include "iemlib.h" #include /* -------------------------- early_reflections_2d ------------------------------ */ /* ** pos. x-Richtung Nase ** pos. y-Richtung Linke Hand ** pos. z-Richtung Scheitel ** Kartesischer Koordinaten-Ursprung liegt in der Mitte des Raums am Boden aenderungen: src-index von 1 .. n auf 0 .. (n-1) aenderungen: azimuth von rad auf degree */ /* Reihenfolge der bundle-sektoren: index phi: 1 0 2 45 3 90 4 135 5 180 6 225 7 270 8 315 1. und 2. reflexionen: +x 5 9 1 11 +y 6 2 0 4 8 12 3 10 7 */ typedef struct _early_reflections_2d { t_object x_obj; t_atom x_para_at[27]; void *x_direct_out; void *x_early_out; void *x_rev_out; t_symbol *x_s_del0; t_symbol *x_s_del1; t_symbol *x_s_del2; t_symbol *x_s_damp; t_symbol *x_s_index_phi; t_symbol *x_s_bundle; t_float x_azimuth_denominator; t_float x_azimuth_offset; t_float x_room_x; t_float x_room_y; t_float x_head_x; t_float x_head_y; int x_n_src; int x_bundle; t_float x_src_x[30]; t_float x_src_y[30]; t_float x_r_ambi; t_float x_speed; t_float x_180_over_pi; } t_early_reflections_2d; static t_class *early_reflections_2d_class; static t_float early_reflections_2d_calc_radius(t_floatarg r_ambi, t_floatarg dx, t_floatarg dy) { t_float r = (t_float)sqrt(dx*dx + dy*dy); if(r < r_ambi) return(r_ambi); else return(r); } static t_float early_reflections_2d_calc_azimuth(t_floatarg x_180_over_pi, t_floatarg dx, t_floatarg dy)/*changes*/ { if(dx == 0.0f) { if(dy < 0.0f) return(270.0f); else return(90.0f); } else if(dx < 0.0f) { return(180.0f + x_180_over_pi * (t_float)atan(dy / dx)); } else { if(dy < 0.0f) return(360.0f + x_180_over_pi * (t_float)atan(dy / dx)); else return(x_180_over_pi * (t_float)atan(dy / dx)); } } static t_float early_reflections_2d_calc_bundle_index(t_floatarg phi)/*changes*/ { phi += 22.5f; if(phi >= 360.0f) phi -= 360.0f; if(phi <= 180.0f) { if(phi <= 90.0f) { if(phi <= 45.0f)/* 0 .. 45 */ return(1.0f); else return(2.0f); } else { if(phi <= 135.0f) return(3.0f); else return(4.0f); } } else { if(phi <= 270.0f) { if(phi <= 225.0f) return(5.0f); else return(6.0f); } else { if(phi <= 315.0f)/* 270 .. 315 */ return(7.0f); else return(8.0f);/* 315 .. 360 */ } } } static void early_reflections_2d_doit(t_early_reflections_2d *x) { t_atom *at; t_float diff_x, diff_y; t_float sum_x, sum_y; t_float lx, wy; t_float x0, y0_; t_float xp1, yp1; t_float xn1, yn1; t_float xp2, yp2; t_float xn2, yn2; t_float m2ms = 1000.0f / x->x_speed; t_float x_180_over_pi=x->x_180_over_pi; t_float r_ambi = x->x_r_ambi; t_float phi[50]; t_float rad[50]; int n_src=x->x_n_src; int i; lx = x->x_room_x; wy = x->x_room_y; SETFLOAT(x->x_para_at, early_reflections_2d_calc_radius(r_ambi, lx, wy)*m2ms); outlet_anything(x->x_rev_out, x->x_s_del0, 1, x->x_para_at); for(i=0; ix_src_x[i] - x->x_head_x; diff_y = x->x_src_y[i] - x->x_head_y; sum_x = x->x_src_x[i] + x->x_head_x; sum_y = x->x_src_y[i] + x->x_head_y; x0 = diff_x; y0_ = diff_y; xp1 = lx - sum_x; yp1 = wy - sum_y; xn1 = -lx - sum_x; yn1 = -wy - sum_y; xp2 = 2.0f*lx + diff_x; yp2 = 2.0f*wy + diff_y; xn2 = -2.0f*lx + diff_x; yn2 = -2.0f*wy + diff_y; rad[0] = early_reflections_2d_calc_radius(r_ambi, x0, y0_); rad[1] = early_reflections_2d_calc_radius(r_ambi, xp1, y0_); rad[2] = early_reflections_2d_calc_radius(r_ambi, x0, yp1); rad[3] = early_reflections_2d_calc_radius(r_ambi, xn1, y0_); rad[4] = early_reflections_2d_calc_radius(r_ambi, x0, yn1); rad[5] = early_reflections_2d_calc_radius(r_ambi, xp2, y0_); rad[6] = early_reflections_2d_calc_radius(r_ambi, x0, yp2); rad[7] = early_reflections_2d_calc_radius(r_ambi, xn2, y0_); rad[8] = early_reflections_2d_calc_radius(r_ambi, x0, yn2); rad[9] = early_reflections_2d_calc_radius(r_ambi, xp1, yp1); rad[10] = early_reflections_2d_calc_radius(r_ambi, xn1, yn1); rad[11] = early_reflections_2d_calc_radius(r_ambi, xp1, yn1); rad[12] = early_reflections_2d_calc_radius(r_ambi, xn1, yp1); /* delay-reihenfolge: 0, +1x, +1y, -1x, -1y +2x, +2y, -2x, -2y +1x+1y, -1x-1y +1x-1y, -1x+1y */ at = x->x_para_at; SETFLOAT(at, (t_float)(i+1));/*changes*/ at++; SETFLOAT(at, rad[0] * m2ms); outlet_anything(x->x_direct_out, x->x_s_del0, 2, x->x_para_at); at = x->x_para_at+1; SETFLOAT(at, rad[1] *m2ms); at++; SETFLOAT(at, rad[2] *m2ms); at++; SETFLOAT(at, rad[3] *m2ms); at++; SETFLOAT(at, rad[4] *m2ms); outlet_anything(x->x_early_out, x->x_s_del1, 5, x->x_para_at); at = x->x_para_at+1; SETFLOAT(at, rad[5] *m2ms); at++; SETFLOAT(at, rad[6] *m2ms); at++; SETFLOAT(at, rad[7] *m2ms); at++; SETFLOAT(at, rad[8] *m2ms); at++; SETFLOAT(at, rad[9] *m2ms); at++; SETFLOAT(at, rad[10] *m2ms); at++; SETFLOAT(at, rad[11] *m2ms); at++; SETFLOAT(at, rad[12] *m2ms); outlet_anything(x->x_early_out, x->x_s_del2, 9, x->x_para_at); /* daempfungs-reihenfolge: 0, +1x, +1y, -1x, -1y +2x, +2y, -2x, -2y +1x+1y, -1x-1y +1x-1y, -1x+1y */ at = x->x_para_at+1; SETFLOAT(at, r_ambi / rad[0]); outlet_anything(x->x_direct_out, x->x_s_damp, 2, x->x_para_at); at = x->x_para_at+1; SETFLOAT(at, r_ambi / rad[1]); at++; SETFLOAT(at, r_ambi / rad[2]); at++; SETFLOAT(at, r_ambi / rad[3]); at++; SETFLOAT(at, r_ambi / rad[4]); at++; SETFLOAT(at, r_ambi / rad[5]); at++; SETFLOAT(at, r_ambi / rad[6]); at++; SETFLOAT(at, r_ambi / rad[7]); at++; SETFLOAT(at, r_ambi / rad[8]); at++; SETFLOAT(at, r_ambi / rad[9]); at++; SETFLOAT(at, r_ambi / rad[10]); at++; SETFLOAT(at, r_ambi / rad[11]); at++; SETFLOAT(at, r_ambi / rad[12]); outlet_anything(x->x_early_out, x->x_s_damp, 13, x->x_para_at); /* encoder-winkel-reihenfolge: index delta phi 0, +1x, +1y, -1x, -1y +2x, +2y, -2x, -2y +1x+1y, -1x-1y +1x-1y, -1x+1y */ at = x->x_para_at+1; SETFLOAT(at, early_reflections_2d_calc_azimuth(x_180_over_pi, x0, y0_)); outlet_anything(x->x_direct_out, x->x_s_index_phi, 2, x->x_para_at); /* encoder-winkel-reihenfolge: bundle 0, +1x, +1y, -1x, -1y +2x, +2y, -2x, -2y +1x+1y, -1x-1y +1x-1y, -1x+1y */ phi[0] = early_reflections_2d_calc_azimuth(x_180_over_pi, xp1, y0_); phi[1] = early_reflections_2d_calc_azimuth(x_180_over_pi, x0, yp1); phi[2] = early_reflections_2d_calc_azimuth(x_180_over_pi, xn1, y0_); phi[3] = early_reflections_2d_calc_azimuth(x_180_over_pi, x0, yn1); phi[4] = early_reflections_2d_calc_azimuth(x_180_over_pi, xp2, y0_); phi[5] = early_reflections_2d_calc_azimuth(x_180_over_pi, x0, yp2); phi[6] = early_reflections_2d_calc_azimuth(x_180_over_pi, xn2, y0_); phi[7] = early_reflections_2d_calc_azimuth(x_180_over_pi, x0, yn2); phi[8] = early_reflections_2d_calc_azimuth(x_180_over_pi, xp1, yp1); phi[9] = early_reflections_2d_calc_azimuth(x_180_over_pi, xn1, yn1); phi[10] = early_reflections_2d_calc_azimuth(x_180_over_pi, xp1, yn1); phi[11] = early_reflections_2d_calc_azimuth(x_180_over_pi, xn1, yp1); if(x->x_bundle) { at = x->x_para_at+1; SETFLOAT(at, early_reflections_2d_calc_bundle_index(phi[0])); at++; SETFLOAT(at, early_reflections_2d_calc_bundle_index(phi[1])); at++; SETFLOAT(at, early_reflections_2d_calc_bundle_index(phi[2])); at++; SETFLOAT(at, early_reflections_2d_calc_bundle_index(phi[3])); at++; SETFLOAT(at, early_reflections_2d_calc_bundle_index(phi[4])); at++; SETFLOAT(at, early_reflections_2d_calc_bundle_index(phi[5])); at++; SETFLOAT(at, early_reflections_2d_calc_bundle_index(phi[6])); at++; SETFLOAT(at, early_reflections_2d_calc_bundle_index(phi[7])); at++; SETFLOAT(at, early_reflections_2d_calc_bundle_index(phi[8])); at++; SETFLOAT(at, early_reflections_2d_calc_bundle_index(phi[9])); at++; SETFLOAT(at, early_reflections_2d_calc_bundle_index(phi[10])); at++; SETFLOAT(at, early_reflections_2d_calc_bundle_index(phi[11])); outlet_anything(x->x_early_out, x->x_s_bundle, 13, x->x_para_at); } at = x->x_para_at+1; SETFLOAT(at, 1.0f); at++; SETFLOAT(at, phi[0]); outlet_anything(x->x_early_out, x->x_s_index_phi, 3, x->x_para_at); at = x->x_para_at+1; SETFLOAT(at, 2.0f); at++; SETFLOAT(at, phi[1]); outlet_anything(x->x_early_out, x->x_s_index_phi, 3, x->x_para_at); at = x->x_para_at+1; SETFLOAT(at, 3.0f); at++; SETFLOAT(at, phi[2]); outlet_anything(x->x_early_out, x->x_s_index_phi, 3, x->x_para_at); at = x->x_para_at+1; SETFLOAT(at, 4.0f); at++; SETFLOAT(at, phi[3]); outlet_anything(x->x_early_out, x->x_s_index_phi, 3, x->x_para_at); at = x->x_para_at+1; SETFLOAT(at, 5.0f); at++; SETFLOAT(at, phi[4]); outlet_anything(x->x_early_out, x->x_s_index_phi, 3, x->x_para_at); at = x->x_para_at+1; SETFLOAT(at, 6.0f); at++; SETFLOAT(at, phi[5]); outlet_anything(x->x_early_out, x->x_s_index_phi, 3, x->x_para_at); at = x->x_para_at+1; SETFLOAT(at, 7.0f); at++; SETFLOAT(at, phi[6]); outlet_anything(x->x_early_out, x->x_s_index_phi, 3, x->x_para_at); at = x->x_para_at+1; SETFLOAT(at, 8.0f); at++; SETFLOAT(at, phi[7]); outlet_anything(x->x_early_out, x->x_s_index_phi, 3, x->x_para_at); at = x->x_para_at+1; SETFLOAT(at, 9.0f); at++; SETFLOAT(at, phi[8]); outlet_anything(x->x_early_out, x->x_s_index_phi, 3, x->x_para_at); at = x->x_para_at+1; SETFLOAT(at, 10.0f); at++; SETFLOAT(at, phi[9]); outlet_anything(x->x_early_out, x->x_s_index_phi, 3, x->x_para_at); at = x->x_para_at+1; SETFLOAT(at, 11.0f); at++; SETFLOAT(at, phi[10]); outlet_anything(x->x_early_out, x->x_s_index_phi, 3, x->x_para_at); at = x->x_para_at+1; SETFLOAT(at, 12.0f); at++; SETFLOAT(at, phi[11]); outlet_anything(x->x_early_out, x->x_s_index_phi, 3, x->x_para_at); } } static void early_reflections_2d_dump_para(t_early_reflections_2d *x) { int i, n=x->x_n_src; post("*******************************************************************************"); post("room-dimensions: L_x = %.3f, W_y = %.3f", x->x_room_x, x->x_room_y); post("hear-position: x_hear = %.3f, y_hear = %.3f", x->x_head_x, x->x_head_y); for(i=0; ix_src_x[i], i+1, x->x_src_y[i]); post("ambisonic-radius: %f", x->x_r_ambi); post("sonic-speed: %.3f", x->x_speed); post("order of outputs: direct early rev"); post("*******************************************************************************"); } static void early_reflections_2d_para(t_early_reflections_2d *x, t_symbol *s, int argc, t_atom *argv) { int i, n=x->x_n_src*2 + 5;/* r_ambi + 2*room + 2*head */ if(argc != n) { post("early_reflections_2d ERROR: para needs 1 r_ambi + 2*room + 2*head +n*2*src"); return; } x->x_r_ambi = atom_getfloat(argv++); x->x_room_x = atom_getfloat(argv++); x->x_room_y = atom_getfloat(argv++); x->x_head_x = atom_getfloat(argv++); x->x_head_y = atom_getfloat(argv++); n = x->x_n_src; for(i=0; ix_src_x[i] = atom_getfloat(argv++); x->x_src_y[i] = atom_getfloat(argv++); } early_reflections_2d_doit(x); } static void early_reflections_2d_sonic_speed(t_early_reflections_2d *x, t_floatarg speed) { if(speed < 300.0f) speed = 300.0f; if(speed > 400.0f) speed = 400.0f; x->x_speed = speed; } static void early_reflections_2d_bundle(t_early_reflections_2d *x, t_floatarg bundle) { if(bundle == 0.0f) x->x_bundle = 0; else x->x_bundle = 1; } static void early_reflections_2d_free(t_early_reflections_2d *x) { } static void *early_reflections_2d_new(t_floatarg fn_src) { int i, n; t_early_reflections_2d *x = (t_early_reflections_2d *)pd_new(early_reflections_2d_class); n = (int)fn_src; if(n < 1) n = 1; if(n > 30) n = 30; x->x_n_src = n; x->x_room_x = 12.0f; x->x_room_y = 8.0f; x->x_head_x = 0.0f; x->x_head_y = 0.0f; for(i=0; ix_src_x[i] = 3.0f; x->x_src_y[i] = 0.5f; } x->x_r_ambi = 1.4f; x->x_speed = 340.0f; x->x_s_del0 = gensym("del0"); x->x_s_del1 = gensym("del1"); x->x_s_del2 = gensym("del2"); x->x_s_damp = gensym("damp"); x->x_s_index_phi = gensym("index_phi"); x->x_s_bundle = gensym("bundle"); x->x_direct_out = outlet_new(&x->x_obj, &s_list); x->x_early_out = outlet_new(&x->x_obj, &s_list); x->x_rev_out = outlet_new(&x->x_obj, &s_list); x->x_180_over_pi = (t_float)(180.0 / (4.0 * atan(1.0))); x->x_bundle = 0; return (x); } void early_reflections_2d_setup(void) { early_reflections_2d_class = class_new(gensym("early_reflections_2d"), (t_newmethod)early_reflections_2d_new, (t_method)early_reflections_2d_free, sizeof(t_early_reflections_2d), 0, A_DEFFLOAT, 0); class_addmethod(early_reflections_2d_class, (t_method)early_reflections_2d_para, gensym("para"), A_GIMME, 0); class_addmethod(early_reflections_2d_class, (t_method)early_reflections_2d_sonic_speed, gensym("sonic_speed"), A_FLOAT, 0); class_addmethod(early_reflections_2d_class, (t_method)early_reflections_2d_bundle, gensym("bundle"), A_FLOAT, 0); class_addmethod(early_reflections_2d_class, (t_method)early_reflections_2d_dump_para, gensym("dump_para"), 0); // class_sethelpsymbol(early_reflections_2d_class, gensym("iemhelp2/early_reflections_2d-help")); } iem_utils-v0.0.20181004/iem_roomsim/src/n_delay2p_line~.c0000644000175000017500000002765613355471360023244 0ustar zmoelnigzmoelnig/* For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. iem_roomsim written by Thomas Musil (c) IEM KUG Graz Austria 2002 - 2018 */ #include "m_pd.h" #include "iemlib.h" #include "iem_roomsim.h" /* -------------------------- n_delay2p_line_tilde~ ------------------------------ */ /* ----------- n 2-point interpolated line~-signal driven delay taps ------------- */ static t_class *n_delay2p_line_tilde_class; t_float n_delay2p_line_tilde_256f[258]; typedef struct _n_delay2p_line_tilde { t_object x_obj; int x_mallocsize; t_float x_max_delay_ms; t_sample *x_begmem1; t_sample *x_begmem2; int x_writeindex; int x_n_delays; int *x_del_samp256_end; int *x_del_samp256_cur; int *x_inc256; int *x_biginc256; int x_blocksize; t_float x_sr; t_float x_ms2tick; t_float x_ms2samples256; t_float x_interpol_ms; int x_interpol_ticks; int x_ticksleft; int x_old; int x_retarget; t_sample **x_io; t_float x_scalar_sig_in; } t_n_delay2p_line_tilde; static void n_delay2p_line_tilde_init_f(t_n_delay2p_line_tilde *x) { if(n_delay2p_line_tilde_256f[257] == (t_float)0.0) { int i; for(i=0; i<257; i++) { n_delay2p_line_tilde_256f[i] = (t_float)i / (t_float)256.0; } n_delay2p_line_tilde_256f[257] = (t_float)1.0; } } static void n_delay2p_line_tilde_list(t_n_delay2p_line_tilde *x, t_symbol *s, int argc, t_atom *argv) { if(argc == x->x_n_delays) { int i; t_float delay, max=x->x_max_delay_ms; if(x->x_interpol_ms <= (t_float)0.0) x->x_ticksleft = x->x_retarget = 0; else x->x_retarget = 1; for(i=0; i max) delay = max; if(x->x_interpol_ms <= (t_float)0.0) x->x_del_samp256_end[i] = x->x_del_samp256_cur[i] = (int)(x->x_ms2samples256 * delay + (t_float)0.5) + 127; else x->x_del_samp256_end[i] = (int)(x->x_ms2samples256 * delay + (t_float)0.5) + 127; } } } static void n_delay2p_line_tilde_time(t_n_delay2p_line_tilde *x, t_floatarg interpol_ms) { if(interpol_ms < (t_float)0.0) interpol_ms = (t_float)0.0; x->x_interpol_ms = interpol_ms; x->x_interpol_ticks = (int)(x->x_ms2tick * interpol_ms); } static void n_delay2p_line_tilde_stop(t_n_delay2p_line_tilde *x) { int i, n=x->x_n_delays; for(i=0; ix_del_samp256_end[i] = x->x_del_samp256_cur[i]; x->x_ticksleft = x->x_retarget = 0; } static t_int *n_delay2p_line_tilde_perform(t_int *w) { t_n_delay2p_line_tilde *x = (t_n_delay2p_line_tilde *)(w[1]); int hn=(int)(w[2]); int nout=x->x_n_delays; t_sample *in; t_sample *out; int writeindex = x->x_writeindex; int i, j, n, fractindex; int malloc_samples = x->x_mallocsize; t_sample *begvec1 = x->x_begmem1; t_sample *begvec2 = x->x_begmem2; t_sample *writevec; t_sample *readvec; t_float fract; int del256, inc256; begvec1 += writeindex; writevec = begvec2 + writeindex; in=x->x_io[0]; n = hn; while(n--) { *begvec1++ = *in; *writevec++ = *in++; } if(x->x_retarget) { int nticks = x->x_interpol_ticks; if(!nticks) nticks = 1; x->x_ticksleft = nticks; for(j=0; jx_biginc256[j] = (x->x_del_samp256_end[j] - x->x_del_samp256_cur[j]) / nticks; x->x_inc256[j] = x->x_biginc256[j] / x->x_blocksize; } x->x_retarget = 0; } if(x->x_ticksleft) { for(j=0; jx_inc256[j]; del256 = x->x_del_samp256_cur[j]; out = x->x_io[j+1]; for(i=0; i> 8) + i; *out++ = readvec[0] - (readvec[0] - readvec[-1])*(t_sample)fract; del256 += inc256; } x->x_del_samp256_cur[j] += x->x_biginc256[j]; } x->x_ticksleft--; } else { for(j=0; jx_del_samp256_cur[j] = x->x_del_samp256_end[j]; readvec = begvec2 + writeindex - (del256 >> 8); out = x->x_io[j+1]; n = hn; while(n--) { *out++ = *readvec++; } } } writeindex += hn; if(writeindex >= malloc_samples) { writeindex -= malloc_samples; } x->x_writeindex = writeindex; return(w+3); } static t_int *n_delay2p_line_tilde_perf8(t_int *w) { t_n_delay2p_line_tilde *x = (t_n_delay2p_line_tilde *)(w[1]); int hn=(int)(w[2]); int nout=x->x_n_delays; t_sample *in; t_sample *out; int writeindex = x->x_writeindex; int i, j, k, n, fractindex; int malloc_samples = x->x_mallocsize; t_sample *begvec1 = x->x_begmem1; t_sample *begvec2 = x->x_begmem2; t_sample *writevec; t_sample *readvec; t_float fract; int del256, inc256; // post("writevec = %d",writeindex); begvec1 += writeindex; writevec = begvec2 + writeindex; in=x->x_io[0]; n = hn; while(n) { begvec1[0] = in[0]; begvec1[1] = in[1]; begvec1[2] = in[2]; begvec1[3] = in[3]; begvec1[4] = in[4]; begvec1[5] = in[5]; begvec1[6] = in[6]; begvec1[7] = in[7]; writevec[0] = in[0]; writevec[1] = in[1]; writevec[2] = in[2]; writevec[3] = in[3]; writevec[4] = in[4]; writevec[5] = in[5]; writevec[6] = in[6]; writevec[7] = in[7]; begvec1 += 8; writevec += 8; n -= 8; in += 8; } if(x->x_retarget) { int nticks = x->x_interpol_ticks; if(!nticks) nticks = 1; x->x_ticksleft = nticks; for(j=0; jx_biginc256[j] = (x->x_del_samp256_end[j] - x->x_del_samp256_cur[j]) / nticks; x->x_inc256[j] = x->x_biginc256[j] / x->x_blocksize; } x->x_retarget = 0; } if(x->x_ticksleft) { for(j=0; jx_inc256[j]; del256 = x->x_del_samp256_cur[j]; out = x->x_io[j+1]; readvec = begvec2 + writeindex; for(i=0; i> 8; out[0] = readvec[0-k] - (readvec[0-k] - readvec[-1-k])*(t_sample)fract; del256 += inc256; fractindex = del256 & 0xff; fract = n_delay2p_line_tilde_256f[fractindex]; k = del256 >> 8; out[1] = readvec[1-k] - (readvec[1-k] - readvec[0-k])*(t_sample)fract; del256 += inc256; fractindex = del256 & 0xff; fract = n_delay2p_line_tilde_256f[fractindex]; k = del256 >> 8; out[2] = readvec[2-k] - (readvec[2-k] - readvec[1-k])*(t_sample)fract; del256 += inc256; fractindex = del256 & 0xff; fract = n_delay2p_line_tilde_256f[fractindex]; k = del256 >> 8; out[3] = readvec[3-k] - (readvec[3-k] - readvec[2-k])*(t_sample)fract; del256 += inc256; fractindex = del256 & 0xff; fract = n_delay2p_line_tilde_256f[fractindex]; k = del256 >> 8; out[4] = readvec[4-k] - (readvec[4-k] - readvec[3-k])*(t_sample)fract; del256 += inc256; fractindex = del256 & 0xff; fract = n_delay2p_line_tilde_256f[fractindex]; k = del256 >> 8; out[5] = readvec[5-k] - (readvec[5-k] - readvec[4-k])*(t_sample)fract; del256 += inc256; fractindex = del256 & 0xff; fract = n_delay2p_line_tilde_256f[fractindex]; k = del256 >> 8; out[6] = readvec[6-k] - (readvec[6-k] - readvec[5-k])*(t_sample)fract; del256 += inc256; fractindex = del256 & 0xff; fract = n_delay2p_line_tilde_256f[fractindex]; k = del256 >> 8; out[7] = readvec[7-k] - (readvec[7-k] - readvec[6-k])*(t_sample)fract; del256 += inc256; out += 8; readvec += 8; } x->x_del_samp256_cur[j] += x->x_biginc256[j]; } x->x_ticksleft--; } else { for(j=0; jx_del_samp256_cur[j] = x->x_del_samp256_end[j]; readvec = begvec2 + writeindex - (del256 >> 8); out = x->x_io[j+1]; n = hn; while(n) { out[0] = readvec[0]; out[1] = readvec[1]; out[2] = readvec[2]; out[3] = readvec[3]; out[4] = readvec[4]; out[5] = readvec[5]; out[6] = readvec[6]; out[7] = readvec[7]; out += 8; readvec += 8; n -= 8; } } } writeindex += hn; if(writeindex >= malloc_samples) { writeindex -= malloc_samples; } x->x_writeindex = writeindex; return(w+3); } static void n_delay2p_line_tilde_dsp(t_n_delay2p_line_tilde *x, t_signal **sp) { int n = sp[0]->s_n; int i, nd = x->x_n_delays + 1; if(!x->x_blocksize)/*first time*/ { int nsamps = x->x_max_delay_ms * (t_float)sp[0]->s_sr * (t_float)0.001; if(nsamps < 1) nsamps = 1; nsamps += ((- nsamps) & (n - 1)); nsamps += n; x->x_mallocsize = nsamps; x->x_begmem1 = (t_sample *)getbytes(2 * x->x_mallocsize * sizeof(t_sample)); x->x_begmem2 = x->x_begmem1 + x->x_mallocsize; x->x_writeindex = n; } else if((x->x_blocksize != n) || ((t_float)sp[0]->s_sr != x->x_sr)) { int nsamps = x->x_max_delay_ms * (t_float)sp[0]->s_sr * (t_float)0.001; if(nsamps < 1) nsamps = 1; nsamps += ((- nsamps) & (n - 1)); nsamps += n; x->x_begmem1 = (t_sample *)resizebytes(x->x_begmem1, 2*x->x_mallocsize*sizeof(t_sample), 2*nsamps*sizeof(t_sample)); x->x_mallocsize = nsamps; x->x_begmem2 = x->x_begmem1 + x->x_mallocsize; if(x->x_writeindex >= nsamps) x->x_writeindex -= nsamps; } x->x_blocksize = n; x->x_ms2tick = (t_float)0.001 * (t_float)sp[0]->s_sr / (t_float)n; x->x_ms2samples256 = (t_float)0.256 * (t_float)sp[0]->s_sr; x->x_interpol_ticks = (int)(x->x_ms2tick * x->x_interpol_ms); for(i=0; ix_io[i] = sp[i]->s_vec; if(n&7) dsp_add(n_delay2p_line_tilde_perform, 2, x, n); else dsp_add(n_delay2p_line_tilde_perf8, 2, x, n); } static void *n_delay2p_line_tilde_new(t_floatarg fout, t_floatarg delay_ms, t_floatarg interpol_ms) { t_n_delay2p_line_tilde *x = (t_n_delay2p_line_tilde *)pd_new(n_delay2p_line_tilde_class); int i, n_out = (int)fout; int nsamps = delay_ms * sys_getsr() * (t_float)0.001; if(n_out < 1) n_out = 1; x->x_n_delays = n_out; x->x_max_delay_ms = delay_ms; if(nsamps < 1) nsamps = 1; nsamps += ((- nsamps) & (DELLINE_DEF_VEC_SIZE - 1)); nsamps += DELLINE_DEF_VEC_SIZE; x->x_mallocsize = nsamps; x->x_begmem1 = (t_sample *)getbytes(2 * x->x_mallocsize * sizeof(t_sample)); x->x_begmem2 = x->x_begmem1 + x->x_mallocsize; x->x_writeindex = DELLINE_DEF_VEC_SIZE; x->x_blocksize = 0; x->x_sr = (t_float)0.0; if(interpol_ms < (t_float)0.0) interpol_ms = (t_float)0.0; x->x_interpol_ms = interpol_ms; x->x_io = (t_sample **)getbytes((x->x_n_delays + 1) * sizeof(t_sample *)); for(i=0; ix_obj, &s_signal); x->x_del_samp256_end = (int *)getbytes(x->x_n_delays * sizeof(int)); x->x_del_samp256_cur = (int *)getbytes(x->x_n_delays * sizeof(int)); x->x_inc256 = (int *)getbytes(x->x_n_delays * sizeof(int)); x->x_biginc256 = (int *)getbytes(x->x_n_delays * sizeof(int)); x->x_ticksleft = x->x_retarget = 0; for(i=0; ix_del_samp256_cur[i] = x->x_del_samp256_end[i] = 0; x->x_inc256[i] = x->x_biginc256[i] = 0; } x->x_interpol_ticks = 0; x->x_scalar_sig_in = (t_float)0.0; n_delay2p_line_tilde_init_f(x); return (x); } static void n_delay2p_line_tilde_free(t_n_delay2p_line_tilde *x) { freebytes(x->x_del_samp256_end, x->x_n_delays * sizeof(int)); freebytes(x->x_del_samp256_cur, x->x_n_delays * sizeof(int)); freebytes(x->x_inc256, x->x_n_delays * sizeof(int)); freebytes(x->x_biginc256, x->x_n_delays * sizeof(int)); freebytes(x->x_io, (x->x_n_delays + 1) * sizeof(t_sample *)); freebytes(x->x_begmem1, 2 * x->x_mallocsize * sizeof(t_sample)); } void n_delay2p_line_tilde_setup(void) { n_delay2p_line_tilde_class = class_new(gensym("n_delay2p_line~"), (t_newmethod)n_delay2p_line_tilde_new, (t_method)n_delay2p_line_tilde_free, sizeof(t_n_delay2p_line_tilde), 0, A_DEFFLOAT, A_DEFFLOAT, A_DEFFLOAT, 0); CLASS_MAINSIGNALIN(n_delay2p_line_tilde_class, t_n_delay2p_line_tilde, x_scalar_sig_in); class_addlist(n_delay2p_line_tilde_class, (t_method)n_delay2p_line_tilde_list); class_addmethod(n_delay2p_line_tilde_class, (t_method)n_delay2p_line_tilde_dsp, gensym("dsp"), A_CANT, 0); class_addmethod(n_delay2p_line_tilde_class, (t_method)n_delay2p_line_tilde_stop, gensym("stop"), 0); class_addmethod(n_delay2p_line_tilde_class, (t_method)n_delay2p_line_tilde_time, gensym("time"), A_FLOAT, 0); } iem_utils-v0.0.20181004/iem_roomsim/src/makefile_d_fat0000644000175000017500000000215013355471360022631 0ustar zmoelnigzmoelnigcurrent: all .SUFFIXES: .d_fat # PDSOURCE = "/Applications/Pd.app/Contents/Resources/src" PDSOURCE = "../../../Pd-0.48-1.app/Contents/Resources/src" PD_INCLUDES = -I. -I$(PDSOURCE) PD_DEFINES = -DPD CFLAGS =-O2 -Wall -W -Wshadow -Wstrict-prototypes \ -Wno-unused -Wno-parentheses -Wno-switch -fPIC LFLAGS = -bundle -undefined suppress -flat_namespace ARCH_FLAGS=-arch i386 -arch x86_64 # the sources SRC = early_reflections_3d.c \ early_reflections_2d.c \ cart2del_damp_2d.c \ cart2del_damp_3d.c \ xy_2_del_damp_phi.c \ xyz_3_del_damp_theta_phi.c \ n_delay1p_line~.c \ n_delay2p_line~.c \ nz~.c \ block_delay~.c \ block_lp1~.c \ block_peak_env~.c \ iem_roomsim.c TARGET = iem_roomsim.d_fat OBJ = $(SRC:.c=.o) # # ------------------ targets ------------------------------------ # clean: rm -f ../$(TARGET) rm -f *.o all: $(OBJ) @echo :: $(OBJ) $(CC) $(ARCH_FLAGS) $(LFLAGS) -o $(TARGET) *.o strip -S -x $(TARGET) mv $(TARGET) .. $(OBJ) : %.o : %.c $(CC) $(ARCH_FLAGS) $(PD_DEFINES) $(CFLAGS) $(PD_INCLUDES) -c -o $*.o $*.c iem_utils-v0.0.20181004/iem_roomsim/src/VC9/0000755000175000017500000000000012630366346020401 5ustar zmoelnigzmoelnigiem_utils-v0.0.20181004/iem_roomsim/src/VC9/makefile_vc9proj0000644000175000017500000000176112630366346023562 0ustar zmoelnigzmoelnigTARGET = iem_roomsim all: ..\$(TARGET).dll VIS_CPP_PATH = "C:\Program Files\Microsoft Visual Studio 9.0\VC" VIS_SDK_PATH = "C:\Program Files\Microsoft SDKs\Windows\v6.0A" PD_INST_PATH = "C:\Program Files\pd-0.43.0" PD_WIN_INCLUDE_PATH = /I. /I$(PD_INST_PATH)\src /I$(VIS_CPP_PATH)\include PD_WIN_C_FLAGS = /nologo /W3 /WX /DMSW /DNT /DPD /DWIN32 /DWINDOWS /Ox -D_CRT_SECURE_NO_WARNINGS PD_WIN_L_FLAGS = /nologo PD_WIN_LIB = /NODEFAULTLIB:libcmt /NODEFAULTLIB:oldnames /NODEFAULTLIB:kernel32 \ $(VIS_CPP_PATH)\lib\libcmt.lib \ $(VIS_CPP_PATH)\lib\oldnames.lib \ $(VIS_SDK_PATH)\lib\kernel32.lib \ $(PD_INST_PATH)\bin\pd.lib SRC = early_reflections_3d.c \ early_reflections_2d.c \ cart2del_damp_2d.c \ cart2del_damp_3d.c \ iem_roomsim.c OBJ = $(SRC:.c=.obj) .c.obj: cl $(PD_WIN_C_FLAGS) $(PD_WIN_INCLUDE_PATH) /c $*.c ..\$(TARGET).dll: $(OBJ) link $(PD_WIN_L_FLAGS) /dll /export:$(TARGET)_setup \ /out:..\$(TARGET).dll $(OBJ) $(PD_WIN_LIB) clean: del *.obj iem_utils-v0.0.20181004/iem_roomsim/src/VC9/iem_roomsim.vcproj0000644000175000017500000000360512630366346024151 0ustar zmoelnigzmoelnig iem_utils-v0.0.20181004/iem_roomsim/src/VC9/iem_roomsim.sln0000644000175000017500000000156712630366346023447 0ustar zmoelnigzmoelnig Microsoft Visual Studio Solution File, Format Version 10.00 # Visual Studio 2008 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "iem_roomsim", "iem_roomsim.vcproj", "{6A44952F-0D55-44EE-9032-928368583BEC}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Win32 = Debug|Win32 Release|Win32 = Release|Win32 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {6A44952F-0D55-44EE-9032-928368583BEC}.Debug|Win32.ActiveCfg = Debug|Win32 {6A44952F-0D55-44EE-9032-928368583BEC}.Debug|Win32.Build.0 = Debug|Win32 {6A44952F-0D55-44EE-9032-928368583BEC}.Release|Win32.ActiveCfg = Release|Win32 {6A44952F-0D55-44EE-9032-928368583BEC}.Release|Win32.Build.0 = Release|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection EndGlobal iem_utils-v0.0.20181004/iem_roomsim/src/block_delay~.c0000644000175000017500000000603513355471360022614 0ustar zmoelnigzmoelnig/* For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. iem_roomsim written by Thomas Musil (c) IEM KUG Graz Austria 2002 - 2018 */ #include "m_pd.h" #include "iemlib.h" #include "iem_roomsim.h" /* -------------------------- block_delay~ ------------------------------ */ /* ----------------- delys a signal by blocksize samples ---------------- */ static t_class *block_delay_tilde_class; typedef struct _block_delay_tilde { t_object x_obj; t_sample *x_begmem; int x_blocksize; t_float x_scalar_sig_in; } t_block_delay_tilde; static t_int *block_delay_tilde_perform(t_int *w) { t_sample *in = (float *)(w[1]); t_sample *out = (float *)(w[2]); t_block_delay_tilde *x = (t_block_delay_tilde *)(w[3]); int i, n = (t_int)(w[4]); t_sample *rw_vec, f; rw_vec = x->x_begmem; for(i=0; ix_begmem; while(n) { f[0] = in[0]; f[1] = in[1]; f[2] = in[2]; f[3] = in[3]; f[4] = in[4]; f[5] = in[5]; f[6] = in[6]; f[7] = in[7]; out[0] = rw_vec[0]; out[1] = rw_vec[1]; out[2] = rw_vec[2]; out[3] = rw_vec[3]; out[4] = rw_vec[4]; out[5] = rw_vec[5]; out[6] = rw_vec[6]; out[7] = rw_vec[7]; rw_vec[0] = f[0]; rw_vec[1] = f[1]; rw_vec[2] = f[2]; rw_vec[3] = f[3]; rw_vec[4] = f[4]; rw_vec[5] = f[5]; rw_vec[6] = f[6]; rw_vec[7] = f[7]; rw_vec += 8; in += 8; out += 8; n -= 8; } return(w+5); } static void block_delay_tilde_dsp(t_block_delay_tilde *x, t_signal **sp) { int n = sp[0]->s_n; if(!x->x_blocksize)/*first time*/ x->x_begmem = (t_sample *)getbytes(n * sizeof(t_sample)); else if(x->x_blocksize != n) x->x_begmem = (t_sample *)resizebytes(x->x_begmem, x->x_blocksize*sizeof(t_sample), n*sizeof(t_sample)); x->x_blocksize = n; if(n&7) dsp_add(block_delay_tilde_perform, 4, sp[0]->s_vec, sp[1]->s_vec, x, sp[0]->s_n); else dsp_add(block_delay_tilde_perf8, 4, sp[0]->s_vec, sp[1]->s_vec, x, sp[0]->s_n); } static void *block_delay_tilde_new(void) { t_block_delay_tilde *x = (t_block_delay_tilde *)pd_new(block_delay_tilde_class); x->x_blocksize = 0; x->x_begmem = (t_sample *)0; outlet_new(&x->x_obj, &s_signal); x->x_scalar_sig_in = (t_float)0.0; return (x); } static void block_delay_tilde_free(t_block_delay_tilde *x) { if(x->x_begmem) freebytes(x->x_begmem, x->x_blocksize * sizeof(t_sample)); } void block_delay_tilde_setup(void) { block_delay_tilde_class = class_new(gensym("block_delay~"), (t_newmethod)block_delay_tilde_new, (t_method)block_delay_tilde_free, sizeof(t_block_delay_tilde), 0, 0); CLASS_MAINSIGNALIN(block_delay_tilde_class, t_block_delay_tilde, x_scalar_sig_in); class_addmethod(block_delay_tilde_class, (t_method)block_delay_tilde_dsp, gensym("dsp"), A_CANT, 0); } iem_utils-v0.0.20181004/iem_roomsim/src/iem_roomsim.dsw0000644000175000017500000000107512630366346023041 0ustar zmoelnigzmoelnigMicrosoft Developer Studio Workspace File, Format Version 6.00 # WARNUNG: DIESE ARBEITSBEREICHSDATEI DARF NICHT BEARBEITET ODER GELSCHT WERDEN! ############################################################################### Project: "iem_roomsim"=.\iem_roomsim.dsp - Package Owner=<4> Package=<5> {{{ }}} Package=<4> {{{ }}} ############################################################################### Global: Package=<5> {{{ }}} Package=<3> {{{ }}} ############################################################################### iem_utils-v0.0.20181004/iem_roomsim/src/iem_roomsim.c0000644000175000017500000000265013355471360022464 0ustar zmoelnigzmoelnig/* For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. iem_roomsim written by Thomas Musil (c) IEM KUG Graz Austria 2002 - 2018 */ #include "m_pd.h" #include "iemlib.h" static t_class *iem_roomsim_class; static void *iem_roomsim_new(void) { t_object *x = (t_object *)pd_new(iem_roomsim_class); return (x); } void early_reflections_3d_setup(void); void early_reflections_2d_setup(void); void cart2del_damp_2d_setup(void); void cart2del_damp_3d_setup(void); //void xy_2_del_damp_phi_setup(void); //void xyz_3_del_damp_theta_phi_setup(void); void n_delay1p_line_tilde_setup(void); void n_delay2p_line_tilde_setup(void); void nz_tilde_setup(void); void block_delay_tilde_setup(void); void block_lp1_tilde_setup(void); void block_peak_env_tilde_setup(void); /* ------------------------ setup routine ------------------------- */ void iem_roomsim_setup(void) { early_reflections_3d_setup(); early_reflections_2d_setup(); cart2del_damp_2d_setup(); cart2del_damp_3d_setup(); // xy_2_del_damp_phi_setup(); // xyz_3_del_damp_theta_phi_setup(); n_delay1p_line_tilde_setup(); n_delay2p_line_tilde_setup(); nz_tilde_setup(); block_delay_tilde_setup(); block_lp1_tilde_setup(); block_peak_env_tilde_setup(); post("iem_roomsim (1.21) library loaded! (c) Thomas Musil "BUILD_DATE); post(" musil%ciem.at iem KUG Graz Austria", '@'); } iem_utils-v0.0.20181004/iem_roomsim/src/block_lp1~.c0000644000175000017500000001004613355471360022207 0ustar zmoelnigzmoelnig/* For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. iem_roomsim written by Thomas Musil (c) IEM KUG Graz Austria 2002 - 2018 */ #include "m_pd.h" #include "iemlib.h" #include "iem_roomsim.h" /* -------------------------- block_lp1~ ------------------------------ */ static t_class *block_lp1_tilde_class; typedef struct _block_lp1_tilde { t_object x_obj; t_sample *x_begmem; int x_blocksize; t_float x_a; t_float x_b; t_float x_scalar_sig_in; } t_block_lp1_tilde; static void block_lp1_tilde_clear_mem(t_sample *vec, int n) { int i; for(i=0; i 1.0f) f = 1.0f; x->x_b = (t_float)f; x->x_a = 1.0f - x->x_b; } static void block_lp1_tilde_ft1(t_block_lp1_tilde *x, t_floatarg f) { block_lp1_tilde_float(x, f); } static t_int *block_lp1_tilde_perform(t_int *w) { // for each freq-bin-index n and for each block-time-index m : y(m,n) = b*y(m,n-1) + a*x(m,n) t_sample *in = (float *)(w[1]); t_sample *out = (float *)(w[2]); t_block_lp1_tilde *x = (t_block_lp1_tilde *)(w[3]); int i, n = (t_int)(w[4]); t_sample *old_block, fin=0.0f; t_float a=x->x_a, b=x->x_b; old_block = x->x_begmem; for(i=0; ix_a, b=x->x_b; old_block = x->x_begmem; while(n) { fin[0] = in[0]; fin[1] = in[1]; fin[2] = in[2]; fin[3] = in[3]; fin[4] = in[4]; fin[5] = in[5]; fin[6] = in[6]; fin[7] = in[7]; out[0] = b*old_block[0] + a*fin[0]; out[1] = b*old_block[1] + a*fin[1]; out[2] = b*old_block[2] + a*fin[2]; out[3] = b*old_block[3] + a*fin[3]; out[4] = b*old_block[4] + a*fin[4]; out[5] = b*old_block[5] + a*fin[5]; out[6] = b*old_block[6] + a*fin[6]; out[7] = b*old_block[7] + a*fin[7]; old_block[0] = out[0]; old_block[1] = out[1]; old_block[2] = out[2]; old_block[3] = out[3]; old_block[4] = out[4]; old_block[5] = out[5]; old_block[6] = out[6]; old_block[7] = out[7]; old_block += 8; in += 8; out += 8; n -= 8; } return(w+5); } static void block_lp1_tilde_dsp(t_block_lp1_tilde *x, t_signal **sp) { int n = sp[0]->s_n; if(!x->x_blocksize)/*first time*/ { x->x_begmem = (t_sample *)getbytes(n * sizeof(t_sample)); block_lp1_tilde_clear_mem(x->x_begmem, n); } else if(x->x_blocksize != n) { x->x_begmem = (t_sample *)resizebytes(x->x_begmem, x->x_blocksize*sizeof(t_sample), n*sizeof(t_sample)); block_lp1_tilde_clear_mem(x->x_begmem, n); } x->x_blocksize = n; if(n&7) dsp_add(block_lp1_tilde_perform, 4, sp[0]->s_vec, sp[1]->s_vec, x, sp[0]->s_n); else dsp_add(block_lp1_tilde_perf8, 4, sp[0]->s_vec, sp[1]->s_vec, x, sp[0]->s_n); } static void *block_lp1_tilde_new(t_floatarg f) { t_block_lp1_tilde *x = (t_block_lp1_tilde *)pd_new(block_lp1_tilde_class); block_lp1_tilde_float(x, f); x->x_blocksize = 0; x->x_begmem = (t_sample *)0; outlet_new(&x->x_obj, &s_signal); x->x_scalar_sig_in = (t_float)0.0; inlet_new(&x->x_obj, &x->x_obj.ob_pd, &s_float, gensym("ft1")); return (x); } static void block_lp1_tilde_free(t_block_lp1_tilde *x) { if(x->x_begmem) freebytes(x->x_begmem, x->x_blocksize * sizeof(t_sample)); } void block_lp1_tilde_setup(void) { block_lp1_tilde_class = class_new(gensym("block_lp1~"), (t_newmethod)block_lp1_tilde_new, (t_method)block_lp1_tilde_free, sizeof(t_block_lp1_tilde), 0, A_DEFFLOAT, 0); CLASS_MAINSIGNALIN(block_lp1_tilde_class, t_block_lp1_tilde, x_scalar_sig_in); class_addmethod(block_lp1_tilde_class, (t_method)block_lp1_tilde_dsp, gensym("dsp"), A_CANT, 0); class_addmethod(block_lp1_tilde_class, (t_method)block_lp1_tilde_ft1, gensym("ft1"), A_FLOAT, 0); } iem_utils-v0.0.20181004/iem_roomsim/src/cart2del_damp_2d.c0000644000175000017500000002541213355471360023234 0ustar zmoelnigzmoelnig/* For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. iem_roomsim written by Thomas Musil (c) IEM KUG Graz Austria 2002 - 2006 */ #include "m_pd.h" #include "iemlib.h" #include /* -------------------------- cart2del_damp_2d ------------------------------ */ /* ** pos. x-Richtung Nase ** pos. y-Richtung Linke Hand ** pos. z-Richtung Scheitel ** Kartesischer Koordinaten-Ursprung liegt in der Mitte des Raums am Boden aenderungen: src-index von 1 .. n auf 0 .. (n-1) aenderungen: azimuth von rad auf degree */ /* Reihenfolge der bundle-sektoren: index phi: 1 0 2 45 3 90 4 135 5 180 6 225 7 270 8 315 1. und 2. reflexionen: +x 5 9 1 11 +y 6 2 0 4 8 12 3 10 7 */ typedef struct _cart2del_damp_2d { t_object x_obj; t_symbol *x_s_direct; t_symbol *x_s_early1; t_symbol *x_s_early2; t_symbol *x_s_del; t_symbol *x_s_damp; t_symbol *x_s_index_phi; t_float x_room_x; t_float x_room_y; t_float x_head_x; t_float x_head_y; t_float x_src_x; t_float x_src_y; t_float x_r_ambi; t_float x_speed; t_float x_180_over_pi; void *x_clock; } t_cart2del_damp_2d; static t_class *cart2del_damp_2d_class; static t_float cart2del_damp_2d_calc_radius(t_floatarg r_ambi, t_floatarg dx, t_floatarg dy) { t_float r = (t_float)sqrt(dx*dx + dy*dy); if(r < r_ambi) return(r_ambi); else return(r); } static t_float cart2del_damp_2d_calc_azimuth(t_floatarg x_180_over_pi, t_floatarg dx, t_floatarg dy)/*changes*/ { if(dx == 0.0f) { if(dy < 0.0f) return(270.0f); else return(90.0f); } else if(dx < 0.0f) { return(180.0f + x_180_over_pi * (t_float)atan(dy / dx)); } else { if(dy < 0.0f) return(360.0f + x_180_over_pi * (t_float)atan(dy / dx)); else return(x_180_over_pi * (t_float)atan(dy / dx)); } } static void cart2del_damp_2d_doit(t_cart2del_damp_2d *x) { t_float diff_x, diff_y; t_float sum_x, sum_y; t_float lx, wy; t_float x0, y0_; t_float xp1, yp1; t_float xn1, yn1; t_float xp2, yp2; t_float xn2, yn2; t_float m2ms = 1000.0f / x->x_speed; t_float x_180_over_pi=x->x_180_over_pi; t_float r_ambi = x->x_r_ambi; t_float rad[20]; t_atom at[20]; lx = x->x_room_x; wy = x->x_room_y; diff_x = x->x_src_x - x->x_head_x; diff_y = x->x_src_y - x->x_head_y; sum_x = x->x_src_x + x->x_head_x; sum_y = x->x_src_y + x->x_head_y; x0 = diff_x; y0_ = diff_y; xp1 = lx - sum_x; yp1 = wy - sum_y; xn1 = -lx - sum_x; yn1 = -wy - sum_y; xp2 = 2.0f*lx + diff_x; yp2 = 2.0f*wy + diff_y; xn2 = -2.0f*lx + diff_x; yn2 = -2.0f*wy + diff_y; rad[0] = cart2del_damp_2d_calc_radius(r_ambi, x0, y0_); rad[1] = cart2del_damp_2d_calc_radius(r_ambi, xp1, y0_); rad[2] = cart2del_damp_2d_calc_radius(r_ambi, x0, yp1); rad[3] = cart2del_damp_2d_calc_radius(r_ambi, xn1, y0_); rad[4] = cart2del_damp_2d_calc_radius(r_ambi, x0, yn1); rad[5] = cart2del_damp_2d_calc_radius(r_ambi, xp2, y0_); rad[6] = cart2del_damp_2d_calc_radius(r_ambi, x0, yp2); rad[7] = cart2del_damp_2d_calc_radius(r_ambi, xn2, y0_); rad[8] = cart2del_damp_2d_calc_radius(r_ambi, x0, yn2); rad[9] = cart2del_damp_2d_calc_radius(r_ambi, xp1, yp1); rad[10] = cart2del_damp_2d_calc_radius(r_ambi, xn1, yn1); rad[11] = cart2del_damp_2d_calc_radius(r_ambi, xp1, yn1); rad[12] = cart2del_damp_2d_calc_radius(r_ambi, xn1, yp1); /* delay-reihenfolge: 0, +1x, +1y, -1x, -1y +2x, +2y, -2x, -2y +1x+1y, -1x-1y +1x-1y, -1x+1y */ SETSYMBOL(at, x->x_s_del); SETFLOAT(at+1, rad[0] * m2ms); outlet_anything(x->x_obj.ob_outlet, x->x_s_direct, 2, at); SETFLOAT(at+1, rad[1] *m2ms); SETFLOAT(at+2, rad[2] *m2ms); SETFLOAT(at+3, rad[3] *m2ms); SETFLOAT(at+4, rad[4] *m2ms); outlet_anything(x->x_obj.ob_outlet, x->x_s_early1, 5, at); SETFLOAT(at+1, rad[5] *m2ms); SETFLOAT(at+2, rad[6] *m2ms); SETFLOAT(at+3, rad[7] *m2ms); SETFLOAT(at+4, rad[8] *m2ms); SETFLOAT(at+5, rad[9] *m2ms); SETFLOAT(at+6, rad[10] *m2ms); SETFLOAT(at+7, rad[11] *m2ms); SETFLOAT(at+8, rad[12] *m2ms); outlet_anything(x->x_obj.ob_outlet, x->x_s_early2, 9, at); /* daempfungs-reihenfolge: 0, +1x, +1y, -1x, -1y +2x, +2y, -2x, -2y +1x+1y, -1x-1y +1x-1y, -1x+1y */ SETSYMBOL(at, x->x_s_damp); SETFLOAT(at+1, r_ambi / rad[0]); outlet_anything(x->x_obj.ob_outlet, x->x_s_direct, 2, at); SETFLOAT(at+1, r_ambi / rad[1]); SETFLOAT(at+2, r_ambi / rad[2]); SETFLOAT(at+3, r_ambi / rad[3]); SETFLOAT(at+4, r_ambi / rad[4]); outlet_anything(x->x_obj.ob_outlet, x->x_s_early1, 5, at); SETFLOAT(at+1, r_ambi / rad[5]); SETFLOAT(at+2, r_ambi / rad[6]); SETFLOAT(at+3, r_ambi / rad[7]); SETFLOAT(at+4, r_ambi / rad[8]); SETFLOAT(at+5, r_ambi / rad[9]); SETFLOAT(at+6, r_ambi / rad[10]); SETFLOAT(at+7, r_ambi / rad[11]); SETFLOAT(at+8, r_ambi / rad[12]); outlet_anything(x->x_obj.ob_outlet, x->x_s_early2, 9, at); /* encoder-winkel-reihenfolge: index delta phi 0, +1x, +1y, -1x, -1y +2x, +2y, -2x, -2y +1x+1y, -1x-1y +1x-1y, -1x+1y */ SETSYMBOL(at, x->x_s_index_phi); SETFLOAT(at+1, 1.0f); SETFLOAT(at+2, cart2del_damp_2d_calc_azimuth(x_180_over_pi, x0, y0_)); outlet_anything(x->x_obj.ob_outlet, x->x_s_direct, 3, at); SETFLOAT(at+1, 1.0f); SETFLOAT(at+2, cart2del_damp_2d_calc_azimuth(x_180_over_pi, xp1, y0_)); outlet_anything(x->x_obj.ob_outlet, x->x_s_early1, 3, at); SETFLOAT(at+1, 2.0f); SETFLOAT(at+2, cart2del_damp_2d_calc_azimuth(x_180_over_pi, x0, yp1)); outlet_anything(x->x_obj.ob_outlet, x->x_s_early1, 3, at); SETFLOAT(at+1, 3.0f); SETFLOAT(at+2, cart2del_damp_2d_calc_azimuth(x_180_over_pi, xn1, y0_)); outlet_anything(x->x_obj.ob_outlet, x->x_s_early1, 3, at); SETFLOAT(at+1, 4.0f); SETFLOAT(at+2, cart2del_damp_2d_calc_azimuth(x_180_over_pi, x0, yn1)); outlet_anything(x->x_obj.ob_outlet, x->x_s_early1, 3, at); SETFLOAT(at+1, 1.0f); SETFLOAT(at+2, cart2del_damp_2d_calc_azimuth(x_180_over_pi, xp2, y0_)); outlet_anything(x->x_obj.ob_outlet, x->x_s_early2, 3, at); SETFLOAT(at+1, 2.0f); SETFLOAT(at+2, cart2del_damp_2d_calc_azimuth(x_180_over_pi, x0, yp2)); outlet_anything(x->x_obj.ob_outlet, x->x_s_early2, 3, at); SETFLOAT(at+1, 3.0f); SETFLOAT(at+2, cart2del_damp_2d_calc_azimuth(x_180_over_pi, xn2, y0_)); outlet_anything(x->x_obj.ob_outlet, x->x_s_early2, 3, at); SETFLOAT(at+1, 4.0f); SETFLOAT(at+2, cart2del_damp_2d_calc_azimuth(x_180_over_pi, x0, yn2)); outlet_anything(x->x_obj.ob_outlet, x->x_s_early2, 3, at); SETFLOAT(at+1, 5.0f); SETFLOAT(at+2, cart2del_damp_2d_calc_azimuth(x_180_over_pi, xp1, yp1)); outlet_anything(x->x_obj.ob_outlet, x->x_s_early2, 3, at); SETFLOAT(at+1, 6.0f); SETFLOAT(at+2, cart2del_damp_2d_calc_azimuth(x_180_over_pi, xn1, yn1)); outlet_anything(x->x_obj.ob_outlet, x->x_s_early2, 3, at); SETFLOAT(at+1, 7.0f); SETFLOAT(at+2, cart2del_damp_2d_calc_azimuth(x_180_over_pi, xp1, yn1)); outlet_anything(x->x_obj.ob_outlet, x->x_s_early2, 3, at); SETFLOAT(at+1, 8.0f); SETFLOAT(at+2, cart2del_damp_2d_calc_azimuth(x_180_over_pi, xn1, yp1)); outlet_anything(x->x_obj.ob_outlet, x->x_s_early2, 3, at); } static void cart2del_damp_2d_src_xy(t_cart2del_damp_2d *x, t_symbol *s, int argc, t_atom *argv) { if((argc >= 2)&&IS_A_FLOAT(argv, 0)&&IS_A_FLOAT(argv, 1)) { t_float xr2=0.5f*x->x_room_x, yr2=0.5f*x->x_room_y; x->x_src_x = atom_getfloat(argv++); x->x_src_y = atom_getfloat(argv); if(x->x_src_x > xr2) x->x_src_x = xr2; if(x->x_src_x < -xr2) x->x_src_x = -xr2; if(x->x_src_y > yr2) x->x_src_y = yr2; if(x->x_src_y < -yr2) x->x_src_y = -yr2; clock_delay(x->x_clock, 0.0f); } } static void cart2del_damp_2d_head_xy(t_cart2del_damp_2d *x, t_symbol *s, int argc, t_atom *argv) { if((argc >= 2)&&IS_A_FLOAT(argv, 0)&&IS_A_FLOAT(argv, 1)) { t_float xr2=0.5f*x->x_room_x, yr2=0.5f*x->x_room_y; x->x_head_x = atom_getfloat(argv++); x->x_head_y = atom_getfloat(argv); if(x->x_head_x > xr2) x->x_head_x = xr2; if(x->x_head_x < -xr2) x->x_head_x = -xr2; if(x->x_head_y > yr2) x->x_head_y = yr2; if(x->x_head_y < -yr2) x->x_head_y = -yr2; clock_delay(x->x_clock, 0.0f); } } static void cart2del_damp_2d_room_dim(t_cart2del_damp_2d *x, t_symbol *s, int argc, t_atom *argv) { if((argc >= 2)&&IS_A_FLOAT(argv, 0)&&IS_A_FLOAT(argv, 1)) { x->x_room_x = atom_getfloat(argv++); x->x_room_y = atom_getfloat(argv); if(x->x_room_x < 0.5f) x->x_room_x = 0.5f; if(x->x_room_y < 0.5f) x->x_room_y = 0.5f; clock_delay(x->x_clock, 0.0f); } } static void cart2del_damp_2d_r_ambi(t_cart2del_damp_2d *x, t_floatarg r_ambi) { if(r_ambi < 0.1f) r_ambi = 0.1f; x->x_r_ambi = r_ambi; clock_delay(x->x_clock, 0.0f); } static void cart2del_damp_2d_sonic_speed(t_cart2del_damp_2d *x, t_floatarg speed) { if(speed < 10.0f) speed = 10.0f; if(speed > 2000.0f) speed = 2000.0f; x->x_speed = speed; clock_delay(x->x_clock, 0.0f); } static void cart2del_damp_2d_free(t_cart2del_damp_2d *x) { clock_free(x->x_clock); } static void *cart2del_damp_2d_new(t_symbol *s, int argc, t_atom *argv) { t_cart2del_damp_2d *x = (t_cart2del_damp_2d *)pd_new(cart2del_damp_2d_class); x->x_room_x = 12.0f; x->x_room_y = 8.0f; x->x_head_x = 0.0f; x->x_head_y = 0.0f; x->x_src_x = 3.0f; x->x_src_y = 0.5f; x->x_r_ambi = 1.4f; x->x_speed = 340.0f; x->x_s_direct = gensym("direct"); x->x_s_early1 = gensym("early1"); x->x_s_early2 = gensym("early2"); x->x_s_damp = gensym("damp"); x->x_s_del = gensym("del"); x->x_s_index_phi = gensym("index_phi"); outlet_new(&x->x_obj, &s_list); x->x_clock = clock_new(x, (t_method)cart2del_damp_2d_doit); x->x_180_over_pi = (t_float)(180.0 / (4.0 * atan(1.0))); return (x); } void cart2del_damp_2d_setup(void) { cart2del_damp_2d_class = class_new(gensym("cart2del_damp_2d"), (t_newmethod)cart2del_damp_2d_new, (t_method)cart2del_damp_2d_free, sizeof(t_cart2del_damp_2d), 0, A_GIMME, 0); class_addmethod(cart2del_damp_2d_class, (t_method)cart2del_damp_2d_src_xy, gensym("src_xy"), A_GIMME, 0); class_addmethod(cart2del_damp_2d_class, (t_method)cart2del_damp_2d_head_xy, gensym("head_xy"), A_GIMME, 0); class_addmethod(cart2del_damp_2d_class, (t_method)cart2del_damp_2d_room_dim, gensym("room_dim"), A_GIMME, 0); class_addmethod(cart2del_damp_2d_class, (t_method)cart2del_damp_2d_sonic_speed, gensym("sonic_speed"), A_FLOAT, 0); class_addmethod(cart2del_damp_2d_class, (t_method)cart2del_damp_2d_r_ambi, gensym("r_ambi"), A_FLOAT, 0); // class_sethelpsymbol(cart2del_damp_2d_class, gensym("iemhelp2/cart2del_damp_2d-help")); } iem_utils-v0.0.20181004/iem_roomsim/src/n_delay1p_line~.c0000644000175000017500000002474113355471360023233 0ustar zmoelnigzmoelnig/* For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. iem_roomsim written by Thomas Musil (c) IEM KUG Graz Austria 2002 - 2018 */ /* no good, hat schwirigkeiten bei help patch, kontinuierlich die formanten interpolation zu schaffen */ #include "m_pd.h" #include "iemlib.h" #include "iem_roomsim.h" /* -------------------------- n_delay1p_line_tilde~ ------------------------------ */ /* ----------- n non interpolated line~-signal driven delay taps ------------- */ static t_class *n_delay1p_line_tilde_class; typedef struct _n_delay1p_line_tilde { t_object x_obj; int x_mallocsize; t_float x_max_delay_ms; t_sample *x_begmem1; t_sample *x_begmem2; int x_writeindex; int x_n_delays; int *x_del_samp256_end; int *x_del_samp256_cur; int *x_inc256; int *x_biginc256; int x_blocksize; t_float x_sr; t_float x_ms2tick; t_float x_ms2samples256; t_float x_interpol_ms; int x_interpol_ticks; int x_ticksleft; int x_old; int x_retarget; t_sample **x_io; t_float x_scalar_sig_in; } t_n_delay1p_line_tilde; static void n_delay1p_line_tilde_list(t_n_delay1p_line_tilde *x, t_symbol *s, int argc, t_atom *argv) { if(argc == x->x_n_delays) { int i; t_float delay, max=x->x_max_delay_ms; if(x->x_interpol_ms <= (t_float)0.0) x->x_ticksleft = x->x_retarget = 0; else x->x_retarget = 1; for(i=0; i max) delay = max; if(x->x_interpol_ms <= (t_float)0.0) x->x_del_samp256_end[i] = x->x_del_samp256_cur[i] = (int)(x->x_ms2samples256 * delay + (t_float)0.5) + 127; else x->x_del_samp256_end[i] = (int)(x->x_ms2samples256 * delay + (t_float)0.5) + 127; } } } static void n_delay1p_line_tilde_time(t_n_delay1p_line_tilde *x, t_floatarg interpol_ms) { if(interpol_ms < (t_float)0.0) interpol_ms = (t_float)0.0; x->x_interpol_ms = interpol_ms; x->x_interpol_ticks = (int)(x->x_ms2tick * interpol_ms); } static void n_delay1p_line_tilde_stop(t_n_delay1p_line_tilde *x) { int i, n=x->x_n_delays; for(i=0; ix_del_samp256_end[i] = x->x_del_samp256_cur[i]; x->x_ticksleft = x->x_retarget = 0; } static t_int *n_delay1p_line_tilde_perform(t_int *w) { t_n_delay1p_line_tilde *x = (t_n_delay1p_line_tilde *)(w[1]); int hn=(int)(w[2]); int nout=x->x_n_delays; t_sample *in; t_sample *out; int writeindex = x->x_writeindex; int i, j, n; int malloc_samples = x->x_mallocsize; t_sample *begvec1 = x->x_begmem1; t_sample *begvec2 = x->x_begmem2; t_sample *writevec; t_sample *readvec; int del256, inc256; begvec1 += writeindex; writevec = begvec2 + writeindex; in=x->x_io[0]; n = hn; while(n--) { *begvec1++ = *in; *writevec++ = *in++; } if(x->x_retarget) { int nticks = x->x_interpol_ticks; if(!nticks) nticks = 1; x->x_ticksleft = nticks; for(j=0; jx_biginc256[j] = (x->x_del_samp256_end[j] - x->x_del_samp256_cur[j]) / nticks; x->x_inc256[j] = x->x_biginc256[j] / x->x_blocksize; } x->x_retarget = 0; } if(x->x_ticksleft) { for(j=0; jx_inc256[j]; del256 = x->x_del_samp256_cur[j]; out = x->x_io[j+1]; for(i=0; i> 8) + i; *out++ = *readvec; del256 += inc256; } x->x_del_samp256_cur[j] += x->x_biginc256[j]; } x->x_ticksleft--; } else { for(j=0; jx_del_samp256_cur[j] = x->x_del_samp256_end[j]; readvec = begvec2 + writeindex - (del256 >> 8); out = x->x_io[j+1]; n = hn; while(n--) { *out++ = *readvec++; } } } writeindex += hn; if(writeindex >= malloc_samples) { writeindex -= malloc_samples; } x->x_writeindex = writeindex; return(w+3); } static t_int *n_delay1p_line_tilde_perf8(t_int *w) { t_n_delay1p_line_tilde *x = (t_n_delay1p_line_tilde *)(w[1]); int hn=(int)(w[2]); int nout=x->x_n_delays; t_sample *in; t_sample *out; int writeindex = x->x_writeindex; int i, j, k, n; int malloc_samples = x->x_mallocsize; t_sample *begvec1 = x->x_begmem1; t_sample *begvec2 = x->x_begmem2; t_sample *writevec; t_sample *readvec; int del256, inc256; // post("writevec = %d",writeindex); begvec1 += writeindex; writevec = begvec2 + writeindex; in=x->x_io[0]; n = hn; while(n) { begvec1[0] = in[0]; begvec1[1] = in[1]; begvec1[2] = in[2]; begvec1[3] = in[3]; begvec1[4] = in[4]; begvec1[5] = in[5]; begvec1[6] = in[6]; begvec1[7] = in[7]; writevec[0] = in[0]; writevec[1] = in[1]; writevec[2] = in[2]; writevec[3] = in[3]; writevec[4] = in[4]; writevec[5] = in[5]; writevec[6] = in[6]; writevec[7] = in[7]; begvec1 += 8; writevec += 8; n -= 8; in += 8; } if(x->x_retarget) { int nticks = x->x_interpol_ticks; if(!nticks) nticks = 1; x->x_ticksleft = nticks; for(j=0; jx_biginc256[j] = (x->x_del_samp256_end[j] - x->x_del_samp256_cur[j]) / nticks; x->x_inc256[j] = x->x_biginc256[j] / x->x_blocksize; } x->x_retarget = 0; } if(x->x_ticksleft) { for(j=0; jx_inc256[j]; del256 = x->x_del_samp256_cur[j]; out = x->x_io[j+1]; readvec = begvec2 + writeindex; for(i=0; i> 8; out[0] = readvec[0-k]; del256 += inc256; k = del256 >> 8; out[1] = readvec[1-k]; del256 += inc256; k = del256 >> 8; out[2] = readvec[2-k]; del256 += inc256; k = del256 >> 8; out[3] = readvec[3-k]; del256 += inc256; k = del256 >> 8; out[4] = readvec[4-k]; del256 += inc256; k = del256 >> 8; out[5] = readvec[5-k]; del256 += inc256; k = del256 >> 8; out[6] = readvec[6-k]; del256 += inc256; k = del256 >> 8; out[7] = readvec[7-k]; del256 += inc256; out += 8; readvec += 8; } x->x_del_samp256_cur[j] += x->x_biginc256[j]; } x->x_ticksleft--; } else { for(j=0; jx_del_samp256_cur[j] = x->x_del_samp256_end[j]; readvec = begvec2 + writeindex - (del256 >> 8); out = x->x_io[j+1]; n = hn; while(n) { out[0] = readvec[0]; out[1] = readvec[1]; out[2] = readvec[2]; out[3] = readvec[3]; out[4] = readvec[4]; out[5] = readvec[5]; out[6] = readvec[6]; out[7] = readvec[7]; out += 8; readvec += 8; n -= 8; } } } writeindex += hn; if(writeindex >= malloc_samples) { writeindex -= malloc_samples; } x->x_writeindex = writeindex; return(w+3); } static void n_delay1p_line_tilde_dsp(t_n_delay1p_line_tilde *x, t_signal **sp) { int n = sp[0]->s_n; int i, nd = x->x_n_delays + 1; if(!x->x_blocksize)/*first time*/ { int nsamps = x->x_max_delay_ms * (t_float)sp[0]->s_sr * (t_float)0.001; if(nsamps < 1) nsamps = 1; nsamps += ((- nsamps) & (n - 1)); nsamps += n; x->x_mallocsize = nsamps; x->x_begmem1 = (t_sample *)getbytes(2 * x->x_mallocsize * sizeof(t_sample)); x->x_begmem2 = x->x_begmem1 + x->x_mallocsize; x->x_writeindex = n; } else if((x->x_blocksize != n) || ((t_float)sp[0]->s_sr != x->x_sr)) { int nsamps = x->x_max_delay_ms * (t_float)sp[0]->s_sr * (t_float)0.001; if(nsamps < 1) nsamps = 1; nsamps += ((- nsamps) & (n - 1)); nsamps += n; x->x_begmem1 = (t_sample *)resizebytes(x->x_begmem1, 2*x->x_mallocsize*sizeof(t_sample), 2*nsamps*sizeof(t_sample)); x->x_mallocsize = nsamps; x->x_begmem2 = x->x_begmem1 + x->x_mallocsize; if(x->x_writeindex >= nsamps) x->x_writeindex -= nsamps; } x->x_blocksize = n; x->x_ms2tick = (t_float)0.001 * (t_float)sp[0]->s_sr / (t_float)n; x->x_ms2samples256 = (t_float)0.256 * (t_float)sp[0]->s_sr; x->x_interpol_ticks = (int)(x->x_ms2tick * x->x_interpol_ms); for(i=0; ix_io[i] = sp[i]->s_vec; if(n&7) dsp_add(n_delay1p_line_tilde_perform, 2, x, n); else dsp_add(n_delay1p_line_tilde_perf8, 2, x, n); } static void *n_delay1p_line_tilde_new(t_floatarg fout, t_floatarg delay_ms, t_floatarg interpol_ms) { t_n_delay1p_line_tilde *x = (t_n_delay1p_line_tilde *)pd_new(n_delay1p_line_tilde_class); int i, n_out = (int)fout; int nsamps = delay_ms * sys_getsr() * (t_float)0.001; if(n_out < 1) n_out = 1; x->x_n_delays = n_out; x->x_max_delay_ms = delay_ms; if(nsamps < 1) nsamps = 1; nsamps += ((- nsamps) & (DELLINE_DEF_VEC_SIZE - 1)); nsamps += DELLINE_DEF_VEC_SIZE; x->x_mallocsize = nsamps; x->x_begmem1 = (t_sample *)getbytes(2 * x->x_mallocsize * sizeof(t_sample)); x->x_begmem2 = x->x_begmem1 + x->x_mallocsize; x->x_writeindex = DELLINE_DEF_VEC_SIZE; x->x_blocksize = 0; x->x_sr = (t_float)0.0; if(interpol_ms < (t_float)0.0) interpol_ms = (t_float)0.0; x->x_interpol_ms = interpol_ms; x->x_io = (t_sample **)getbytes((x->x_n_delays + 1) * sizeof(t_sample *)); for(i=0; ix_obj, &s_signal); x->x_del_samp256_end = (int *)getbytes(x->x_n_delays * sizeof(int)); x->x_del_samp256_cur = (int *)getbytes(x->x_n_delays * sizeof(int)); x->x_inc256 = (int *)getbytes(x->x_n_delays * sizeof(int)); x->x_biginc256 = (int *)getbytes(x->x_n_delays * sizeof(int)); x->x_ticksleft = x->x_retarget = 0; for(i=0; ix_del_samp256_cur[i] = x->x_del_samp256_end[i] = 0; x->x_inc256[i] = x->x_biginc256[i] = 0; } x->x_interpol_ticks = 0; x->x_scalar_sig_in = (t_float)0.0; return (x); } static void n_delay1p_line_tilde_free(t_n_delay1p_line_tilde *x) { freebytes(x->x_del_samp256_end, x->x_n_delays * sizeof(int)); freebytes(x->x_del_samp256_cur, x->x_n_delays * sizeof(int)); freebytes(x->x_inc256, x->x_n_delays * sizeof(int)); freebytes(x->x_biginc256, x->x_n_delays * sizeof(int)); freebytes(x->x_io, (x->x_n_delays + 1) * sizeof(t_sample *)); freebytes(x->x_begmem1, 2 * x->x_mallocsize * sizeof(t_sample)); } void n_delay1p_line_tilde_setup(void) { n_delay1p_line_tilde_class = class_new(gensym("n_delay1p_line~"), (t_newmethod)n_delay1p_line_tilde_new, (t_method)n_delay1p_line_tilde_free, sizeof(t_n_delay1p_line_tilde), 0, A_DEFFLOAT, A_DEFFLOAT, A_DEFFLOAT, 0); CLASS_MAINSIGNALIN(n_delay1p_line_tilde_class, t_n_delay1p_line_tilde, x_scalar_sig_in); class_addlist(n_delay1p_line_tilde_class, (t_method)n_delay1p_line_tilde_list); class_addmethod(n_delay1p_line_tilde_class, (t_method)n_delay1p_line_tilde_dsp, gensym("dsp"), A_CANT, 0); class_addmethod(n_delay1p_line_tilde_class, (t_method)n_delay1p_line_tilde_stop, gensym("stop"), 0); class_addmethod(n_delay1p_line_tilde_class, (t_method)n_delay1p_line_tilde_time, gensym("time"), A_FLOAT, 0); } iem_utils-v0.0.20181004/iem_roomsim/src/xyz_3_del_damp_theta_phi.c0000644000175000017500000015125613355471360025102 0ustar zmoelnigzmoelnig/* For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. iem_roomsim written by Thomas Musil (c) IEM KUG Graz Austria 2002 - 2018 */ #include "m_pd.h" #include "iemlib.h" #include /* -------------------------- xyz_3_del_damp_theta_phi ------------------------------ */ /* ** pos. x-Richtung Nase ** pos. y-Richtung Linke Hand ** pos. z-Richtung Scheitel ** Kartesischer Koordinaten-Ursprung liegt in der Mitte des Raums am Boden aenderungen: src-index von 1 .. n auf 0 .. (n-1) aenderungen: azimuth von rad auf degree */ /* 1., 2., 3. und 4. reflexionen: top +z +y ^ | | | | | | 103 ---------------> +x +y ^ | | | | | 100 101 49 99 ------------> +x 102 +y ^ | | | | 93 94 46 92 95 47 19 45 91 ---------> +x 96 48 98 97 +y ^ | | | 82 83 39 81 84 40 16 38 80 85 41 17 05 15 37 79 ------> +x 86 42 18 44 90 87 43 89 88 +y ^ | | 67 68 28 66 69 29 09 27 65 70 30 10 02 08 26 64 71 31 11 03 00 01 07 25 63 ---> +x 72 32 12 04 14 36 78 73 33 13 35 77 74 34 76 75 +y ^ | | | 107 108 52 106 109 53 21 51 105 110 54 22 06 20 50 104 -----> +x 111 55 23 57 115 112 56 114 113 +y ^ | | | | 118 119 59 117 120 60 24 58 116 --------> +x 121 61 123 122 +y ^ | | | | | 125 126 62 124 -----------> +x 127 +y ^ | | | | | | 128 ---------------> +x bottom -z */ typedef struct _xyz_3_del_damp_theta_phi { t_object x_obj; t_symbol *x_s_direct; t_symbol *x_s_early1; t_symbol *x_s_early2; t_symbol *x_s_early3; t_symbol *x_s_early4; t_symbol *x_s_del; t_symbol *x_s_damp; t_symbol *x_s_theta; t_symbol *x_s_phi; t_float x_room_x; t_float x_room_y; t_float x_room_z; t_float x_head_x; t_float x_head_y; t_float x_head_z; t_float x_src_x; t_float x_src_y; t_float x_src_z; t_float x_r_min; t_float x_speed; t_float x_180_over_pi; t_float *x_rad; t_atom *x_at; t_int x_size_rad; t_int x_size_at; void *x_clock; } t_xyz_3_del_damp_theta_phi; static t_class *xyz_3_del_damp_theta_phi_class; static t_float xyz_3_del_damp_theta_phi_calc_radius(t_float r_min, t_float dx, t_float dy, t_float dz) { t_float r = (t_float)sqrt(dx*dx + dy*dy + dz*dz); if(r < r_min) return(r_min); else return(r); } static t_float xyz_3_del_damp_theta_phi_calc_azimuth(t_float x_180_over_pi, t_float dx, t_float dy, t_float dz) { if(dx == 0.0f) { if(dy < 0.0f) return(270.0f); else return(90.0f); } else if(dx < 0.0f) { return(180.0f + x_180_over_pi * (t_float)atan(dy / dx)); } else { if(dy < 0.0f) return(360.0f + x_180_over_pi * (t_float)atan(dy / dx)); else return(x_180_over_pi * (t_float)atan(dy / dx)); } } static t_float xyz_3_del_damp_theta_phi_calc_elevation(t_float x_180_over_pi, t_float dx, t_float dy, t_float dz) { t_float dxy = sqrt(dx*dx + dy*dy); if(dxy == 0.0f) { if(dz < 0.0f) return(-90.0f); else return(90.0f); } else { return(x_180_over_pi * (t_float)atan(dz / dxy)); } } static void xyz_3_del_damp_theta_phi_doit(t_xyz_3_del_damp_theta_phi *x) { t_float diff_x, diff_y, diff_z; t_float sum_x, sum_y, sum_z; t_float lx, wy, hz; t_float x_0, y_0, z_0; t_float xp1, yp1, zp1, xn1, yn1, zn1; t_float xp2, yp2, zp2, xn2, yn2, zn2; t_float xp3, yp3, zp3, xn3, yn3, zn3; t_float xp4, yp4, zp4, xn4, yn4, zn4; t_float m2ms = 1000.0f / x->x_speed; t_float x_180_over_pi=x->x_180_over_pi; t_float r_min = x->x_r_min; t_float *rad=x->x_rad; t_atom *at=x->x_at; lx = x->x_room_x; wy = x->x_room_y; hz = x->x_room_z; diff_x = x->x_src_x - x->x_head_x; diff_y = x->x_src_y - x->x_head_y; diff_z = x->x_src_z - x->x_head_z; sum_x = x->x_src_x + x->x_head_x; sum_y = x->x_src_y + x->x_head_y; sum_z = x->x_src_z + x->x_head_z - hz; x_0 = diff_x; y_0 = diff_y; z_0 = diff_z; xp1 = lx - sum_x; yp1 = wy - sum_y; zp1 = hz - sum_z; xn1 = -lx - sum_x; yn1 = -wy - sum_y; zn1 = -hz - sum_z; xp2 = 2.0f*lx + diff_x; yp2 = 2.0f*wy + diff_y; zp2 = 2.0f*hz + diff_z; xn2 = -2.0f*lx + diff_x; yn2 = -2.0f*wy + diff_y; zn2 = -2.0f*hz + diff_z; xp3 = 3.0f*lx - sum_x; yp3 = 3.0f*wy - sum_y; zp3 = 3.0f*hz - sum_z; xn3 = -3.0f*lx - sum_x; yn3 = -3.0f*wy - sum_y; zn3 = -3.0f*hz - sum_z; xp4 = 4.0f*lx + diff_x; yp4 = 4.0f*wy + diff_y; zp4 = 4.0f*hz + diff_z; xn4 = -4.0f*lx + diff_x; yn4 = -4.0f*wy + diff_y; zn4 = -4.0f*hz + diff_z; rad[0] = xyz_3_del_damp_theta_phi_calc_radius(r_min, x_0, y_0, z_0); rad[1] = xyz_3_del_damp_theta_phi_calc_radius(r_min, xp1, y_0, z_0); rad[2] = xyz_3_del_damp_theta_phi_calc_radius(r_min, x_0, yp1, z_0); rad[3] = xyz_3_del_damp_theta_phi_calc_radius(r_min, xn1, y_0, z_0); rad[4] = xyz_3_del_damp_theta_phi_calc_radius(r_min, x_0, yn1, z_0); rad[5] = xyz_3_del_damp_theta_phi_calc_radius(r_min, x_0, y_0, zp1); rad[6] = xyz_3_del_damp_theta_phi_calc_radius(r_min, x_0, y_0, zn1); rad[7] = xyz_3_del_damp_theta_phi_calc_radius(r_min, xp2, y_0, z_0); rad[8] = xyz_3_del_damp_theta_phi_calc_radius(r_min, xp1, yp1, z_0); rad[9] = xyz_3_del_damp_theta_phi_calc_radius(r_min, x_0, yp2, z_0); rad[10] = xyz_3_del_damp_theta_phi_calc_radius(r_min, xn1, yp1, z_0); rad[11] = xyz_3_del_damp_theta_phi_calc_radius(r_min, xn2, y_0, z_0); rad[12] = xyz_3_del_damp_theta_phi_calc_radius(r_min, xn1, yn1, z_0); rad[13] = xyz_3_del_damp_theta_phi_calc_radius(r_min, x_0, yn2, z_0); rad[14] = xyz_3_del_damp_theta_phi_calc_radius(r_min, xp1, yn1, z_0); rad[15] = xyz_3_del_damp_theta_phi_calc_radius(r_min, xp1, y_0, zp1); rad[16] = xyz_3_del_damp_theta_phi_calc_radius(r_min, x_0, yp1, zp1); rad[17] = xyz_3_del_damp_theta_phi_calc_radius(r_min, xn1, y_0, zp1); rad[18] = xyz_3_del_damp_theta_phi_calc_radius(r_min, x_0, yn1, zp1); rad[19] = xyz_3_del_damp_theta_phi_calc_radius(r_min, x_0, y_0, zp2); rad[20] = xyz_3_del_damp_theta_phi_calc_radius(r_min, xp1, y_0, zn1); rad[21] = xyz_3_del_damp_theta_phi_calc_radius(r_min, x_0, yp1, zn1); rad[22] = xyz_3_del_damp_theta_phi_calc_radius(r_min, xn1, y_0, zn1); rad[23] = xyz_3_del_damp_theta_phi_calc_radius(r_min, x_0, yn1, zn1); rad[24] = xyz_3_del_damp_theta_phi_calc_radius(r_min, x_0, y_0, zn2); rad[25] = xyz_3_del_damp_theta_phi_calc_radius(r_min, xp3, y_0, z_0); rad[26] = xyz_3_del_damp_theta_phi_calc_radius(r_min, xp2, yp1, z_0); rad[27] = xyz_3_del_damp_theta_phi_calc_radius(r_min, xp1, yp2, z_0); rad[28] = xyz_3_del_damp_theta_phi_calc_radius(r_min, x_0, yp3, z_0); rad[29] = xyz_3_del_damp_theta_phi_calc_radius(r_min, xn1, yp2, z_0); rad[30] = xyz_3_del_damp_theta_phi_calc_radius(r_min, xn2, yp1, z_0); rad[31] = xyz_3_del_damp_theta_phi_calc_radius(r_min, xn3, y_0, z_0); rad[32] = xyz_3_del_damp_theta_phi_calc_radius(r_min, xn2, yn1, z_0); rad[33] = xyz_3_del_damp_theta_phi_calc_radius(r_min, xn1, yn2, z_0); rad[34] = xyz_3_del_damp_theta_phi_calc_radius(r_min, x_0, yn3, z_0); rad[35] = xyz_3_del_damp_theta_phi_calc_radius(r_min, xp1, yn2, z_0); rad[36] = xyz_3_del_damp_theta_phi_calc_radius(r_min, xp2, yn1, z_0); rad[37] = xyz_3_del_damp_theta_phi_calc_radius(r_min, xp2, y_0, zp1); rad[38] = xyz_3_del_damp_theta_phi_calc_radius(r_min, xp1, yp1, zp1); rad[39] = xyz_3_del_damp_theta_phi_calc_radius(r_min, x_0, yp2, zp1); rad[40] = xyz_3_del_damp_theta_phi_calc_radius(r_min, xn1, yp1, zp1); rad[41] = xyz_3_del_damp_theta_phi_calc_radius(r_min, xn2, y_0, zp1); rad[42] = xyz_3_del_damp_theta_phi_calc_radius(r_min, xn1, yn1, zp1); rad[43] = xyz_3_del_damp_theta_phi_calc_radius(r_min, x_0, yn2, zp1); rad[44] = xyz_3_del_damp_theta_phi_calc_radius(r_min, xp1, yn1, zp1); rad[45] = xyz_3_del_damp_theta_phi_calc_radius(r_min, xp1, y_0, zp2); rad[46] = xyz_3_del_damp_theta_phi_calc_radius(r_min, x_0, yp1, zp2); rad[47] = xyz_3_del_damp_theta_phi_calc_radius(r_min, xn1, y_0, zp2); rad[48] = xyz_3_del_damp_theta_phi_calc_radius(r_min, x_0, yn1, zp2); rad[49] = xyz_3_del_damp_theta_phi_calc_radius(r_min, x_0, y_0, zp3); rad[50] = xyz_3_del_damp_theta_phi_calc_radius(r_min, xp2, y_0, zn1); rad[51] = xyz_3_del_damp_theta_phi_calc_radius(r_min, xp1, yp1, zn1); rad[52] = xyz_3_del_damp_theta_phi_calc_radius(r_min, x_0, yp2, zn1); rad[53] = xyz_3_del_damp_theta_phi_calc_radius(r_min, xn1, yp1, zn1); rad[54] = xyz_3_del_damp_theta_phi_calc_radius(r_min, xn2, y_0, zn1); rad[55] = xyz_3_del_damp_theta_phi_calc_radius(r_min, xn1, yn1, zn1); rad[56] = xyz_3_del_damp_theta_phi_calc_radius(r_min, x_0, yn2, zn1); rad[57] = xyz_3_del_damp_theta_phi_calc_radius(r_min, xp1, yn1, zn1); rad[58] = xyz_3_del_damp_theta_phi_calc_radius(r_min, xp1, y_0, zn2); rad[59] = xyz_3_del_damp_theta_phi_calc_radius(r_min, x_0, yp1, zn2); rad[60] = xyz_3_del_damp_theta_phi_calc_radius(r_min, xn1, y_0, zn2); rad[61] = xyz_3_del_damp_theta_phi_calc_radius(r_min, x_0, yn1, zn2); rad[62] = xyz_3_del_damp_theta_phi_calc_radius(r_min, x_0, y_0, zn3); rad[63] = xyz_3_del_damp_theta_phi_calc_radius(r_min, xp4, y_0, z_0); rad[64] = xyz_3_del_damp_theta_phi_calc_radius(r_min, xp3, yp1, z_0); rad[65] = xyz_3_del_damp_theta_phi_calc_radius(r_min, xp2, yp2, z_0); rad[66] = xyz_3_del_damp_theta_phi_calc_radius(r_min, xp1, yp3, z_0); rad[67] = xyz_3_del_damp_theta_phi_calc_radius(r_min, x_0, yp4, z_0); rad[68] = xyz_3_del_damp_theta_phi_calc_radius(r_min, xn1, yp3, z_0); rad[69] = xyz_3_del_damp_theta_phi_calc_radius(r_min, xn2, yp2, z_0); rad[70] = xyz_3_del_damp_theta_phi_calc_radius(r_min, xn3, yp1, z_0); rad[71] = xyz_3_del_damp_theta_phi_calc_radius(r_min, xn4, y_0, z_0); rad[72] = xyz_3_del_damp_theta_phi_calc_radius(r_min, xn3, yn1, z_0); rad[73] = xyz_3_del_damp_theta_phi_calc_radius(r_min, xn2, yn2, z_0); rad[74] = xyz_3_del_damp_theta_phi_calc_radius(r_min, xn1, yn3, z_0); rad[75] = xyz_3_del_damp_theta_phi_calc_radius(r_min, x_0, yn4, z_0); rad[76] = xyz_3_del_damp_theta_phi_calc_radius(r_min, xp1, yn3, z_0); rad[77] = xyz_3_del_damp_theta_phi_calc_radius(r_min, xp2, yn2, z_0); rad[78] = xyz_3_del_damp_theta_phi_calc_radius(r_min, xp3, yn1, z_0); rad[79] = xyz_3_del_damp_theta_phi_calc_radius(r_min, xp3, y_0, zp1); rad[80] = xyz_3_del_damp_theta_phi_calc_radius(r_min, xp2, yp1, zp1); rad[81] = xyz_3_del_damp_theta_phi_calc_radius(r_min, xp1, yp2, zp1); rad[82] = xyz_3_del_damp_theta_phi_calc_radius(r_min, x_0, yp3, zp1); rad[83] = xyz_3_del_damp_theta_phi_calc_radius(r_min, xn1, yp2, zp1); rad[84] = xyz_3_del_damp_theta_phi_calc_radius(r_min, xn2, yp1, zp1); rad[85] = xyz_3_del_damp_theta_phi_calc_radius(r_min, xn3, y_0, zp1); rad[86] = xyz_3_del_damp_theta_phi_calc_radius(r_min, xn2, yn1, zp1); rad[87] = xyz_3_del_damp_theta_phi_calc_radius(r_min, xn1, yn2, zp1); rad[88] = xyz_3_del_damp_theta_phi_calc_radius(r_min, x_0, yn3, zp1); rad[89] = xyz_3_del_damp_theta_phi_calc_radius(r_min, xp1, yn2, zp1); rad[90] = xyz_3_del_damp_theta_phi_calc_radius(r_min, xp2, yn1, zp1); rad[91] = xyz_3_del_damp_theta_phi_calc_radius(r_min, xp2, y_0, zp2); rad[92] = xyz_3_del_damp_theta_phi_calc_radius(r_min, xp1, yp1, zp2); rad[93] = xyz_3_del_damp_theta_phi_calc_radius(r_min, x_0, yp2, zp2); rad[94] = xyz_3_del_damp_theta_phi_calc_radius(r_min, xn1, yp1, zp2); rad[95] = xyz_3_del_damp_theta_phi_calc_radius(r_min, xn2, y_0, zp2); rad[96] = xyz_3_del_damp_theta_phi_calc_radius(r_min, xn1, yn1, zp2); rad[97] = xyz_3_del_damp_theta_phi_calc_radius(r_min, x_0, yn2, zp2); rad[98] = xyz_3_del_damp_theta_phi_calc_radius(r_min, xp1, yn1, zp2); rad[99] = xyz_3_del_damp_theta_phi_calc_radius(r_min, xp1, y_0, zp3); rad[100] = xyz_3_del_damp_theta_phi_calc_radius(r_min, x_0, yp1, zp3); rad[101] = xyz_3_del_damp_theta_phi_calc_radius(r_min, xn1, y_0, zp3); rad[102] = xyz_3_del_damp_theta_phi_calc_radius(r_min, x_0, yn1, zp3); rad[103] = xyz_3_del_damp_theta_phi_calc_radius(r_min, x_0, y_0, zp4); rad[104] = xyz_3_del_damp_theta_phi_calc_radius(r_min, xp3, y_0, zn1); rad[105] = xyz_3_del_damp_theta_phi_calc_radius(r_min, xp2, yp1, zn1); rad[106] = xyz_3_del_damp_theta_phi_calc_radius(r_min, xp1, yp2, zn1); rad[107] = xyz_3_del_damp_theta_phi_calc_radius(r_min, x_0, yp3, zn1); rad[108] = xyz_3_del_damp_theta_phi_calc_radius(r_min, xn1, yp2, zn1); rad[109] = xyz_3_del_damp_theta_phi_calc_radius(r_min, xn2, yp1, zn1); rad[110] = xyz_3_del_damp_theta_phi_calc_radius(r_min, xn3, y_0, zn1); rad[111] = xyz_3_del_damp_theta_phi_calc_radius(r_min, xn2, yn1, zn1); rad[112] = xyz_3_del_damp_theta_phi_calc_radius(r_min, xn1, yn2, zn1); rad[113] = xyz_3_del_damp_theta_phi_calc_radius(r_min, x_0, yn3, zn1); rad[114] = xyz_3_del_damp_theta_phi_calc_radius(r_min, xp1, yn2, zn1); rad[115] = xyz_3_del_damp_theta_phi_calc_radius(r_min, xp2, yn1, zn1); rad[116] = xyz_3_del_damp_theta_phi_calc_radius(r_min, xp2, y_0, zn2); rad[117] = xyz_3_del_damp_theta_phi_calc_radius(r_min, xp1, yp1, zn2); rad[118] = xyz_3_del_damp_theta_phi_calc_radius(r_min, x_0, yp2, zn2); rad[119] = xyz_3_del_damp_theta_phi_calc_radius(r_min, xn1, yp1, zn2); rad[120] = xyz_3_del_damp_theta_phi_calc_radius(r_min, xn2, y_0, zn2); rad[121] = xyz_3_del_damp_theta_phi_calc_radius(r_min, xn1, yn1, zn2); rad[122] = xyz_3_del_damp_theta_phi_calc_radius(r_min, x_0, yn2, zn2); rad[123] = xyz_3_del_damp_theta_phi_calc_radius(r_min, xp1, yn1, zn2); rad[124] = xyz_3_del_damp_theta_phi_calc_radius(r_min, xp1, y_0, zn3); rad[125] = xyz_3_del_damp_theta_phi_calc_radius(r_min, x_0, yp1, zn3); rad[126] = xyz_3_del_damp_theta_phi_calc_radius(r_min, xn1, y_0, zn3); rad[127] = xyz_3_del_damp_theta_phi_calc_radius(r_min, x_0, yn1, zn3); rad[128] = xyz_3_del_damp_theta_phi_calc_radius(r_min, x_0, y_0, zn4); SETSYMBOL(at, x->x_s_del); SETFLOAT(at+1, rad[0] * m2ms); outlet_anything(x->x_obj.ob_outlet, x->x_s_direct, 2, at); SETFLOAT(at+1, rad[1] * m2ms); SETFLOAT(at+2, rad[2] * m2ms); SETFLOAT(at+3, rad[3] * m2ms); SETFLOAT(at+4, rad[4] * m2ms); SETFLOAT(at+5, rad[5] * m2ms); SETFLOAT(at+6, rad[6] * m2ms); outlet_anything(x->x_obj.ob_outlet, x->x_s_early1, 7, at); SETFLOAT(at+1, rad[7] * m2ms); SETFLOAT(at+2, rad[8] * m2ms); SETFLOAT(at+3, rad[9] * m2ms); SETFLOAT(at+4, rad[10] * m2ms); SETFLOAT(at+5, rad[11] * m2ms); SETFLOAT(at+6, rad[12] * m2ms); SETFLOAT(at+7, rad[13] * m2ms); SETFLOAT(at+8, rad[14] * m2ms); SETFLOAT(at+9, rad[15] * m2ms); SETFLOAT(at+10, rad[16] * m2ms); SETFLOAT(at+11, rad[17] * m2ms); SETFLOAT(at+12, rad[18] * m2ms); SETFLOAT(at+13, rad[19] * m2ms); SETFLOAT(at+14, rad[20] * m2ms); SETFLOAT(at+15, rad[21] * m2ms); SETFLOAT(at+16, rad[22] * m2ms); SETFLOAT(at+17, rad[23] * m2ms); SETFLOAT(at+18, rad[24] * m2ms); outlet_anything(x->x_obj.ob_outlet, x->x_s_early2, 19, at); SETFLOAT(at+1, rad[25] * m2ms); SETFLOAT(at+2, rad[26] * m2ms); SETFLOAT(at+3, rad[27] * m2ms); SETFLOAT(at+4, rad[28] * m2ms); SETFLOAT(at+5, rad[29] * m2ms); SETFLOAT(at+6, rad[30] * m2ms); SETFLOAT(at+7, rad[31] * m2ms); SETFLOAT(at+8, rad[32] * m2ms); SETFLOAT(at+9, rad[33] * m2ms); SETFLOAT(at+10, rad[34] * m2ms); SETFLOAT(at+11, rad[35] * m2ms); SETFLOAT(at+12, rad[36] * m2ms); SETFLOAT(at+13, rad[37] * m2ms); SETFLOAT(at+14, rad[38] * m2ms); SETFLOAT(at+15, rad[39] * m2ms); SETFLOAT(at+16, rad[40] * m2ms); SETFLOAT(at+17, rad[41] * m2ms); SETFLOAT(at+18, rad[42] * m2ms); SETFLOAT(at+19, rad[43] * m2ms); SETFLOAT(at+20, rad[44] * m2ms); SETFLOAT(at+21, rad[45] * m2ms); SETFLOAT(at+22, rad[46] * m2ms); SETFLOAT(at+23, rad[47] * m2ms); SETFLOAT(at+24, rad[48] * m2ms); SETFLOAT(at+25, rad[49] * m2ms); SETFLOAT(at+26, rad[50] * m2ms); SETFLOAT(at+27, rad[51] * m2ms); SETFLOAT(at+28, rad[52] * m2ms); SETFLOAT(at+29, rad[53] * m2ms); SETFLOAT(at+30, rad[54] * m2ms); SETFLOAT(at+31, rad[55] * m2ms); SETFLOAT(at+32, rad[56] * m2ms); SETFLOAT(at+33, rad[57] * m2ms); SETFLOAT(at+34, rad[58] * m2ms); SETFLOAT(at+35, rad[59] * m2ms); SETFLOAT(at+36, rad[60] * m2ms); SETFLOAT(at+37, rad[61] * m2ms); SETFLOAT(at+38, rad[62] * m2ms); outlet_anything(x->x_obj.ob_outlet, x->x_s_early3, 39, at); SETFLOAT(at+1, rad[63] * m2ms); SETFLOAT(at+2, rad[64] * m2ms); SETFLOAT(at+3, rad[65] * m2ms); SETFLOAT(at+4, rad[66] * m2ms); SETFLOAT(at+5, rad[67] * m2ms); SETFLOAT(at+6, rad[68] * m2ms); SETFLOAT(at+7, rad[69] * m2ms); SETFLOAT(at+8, rad[70] * m2ms); SETFLOAT(at+9, rad[71] * m2ms); SETFLOAT(at+10, rad[72] * m2ms); SETFLOAT(at+11, rad[73] * m2ms); SETFLOAT(at+12, rad[74] * m2ms); SETFLOAT(at+13, rad[75] * m2ms); SETFLOAT(at+14, rad[76] * m2ms); SETFLOAT(at+15, rad[77] * m2ms); SETFLOAT(at+16, rad[78] * m2ms); SETFLOAT(at+17, rad[79] * m2ms); SETFLOAT(at+18, rad[80] * m2ms); SETFLOAT(at+19, rad[81] * m2ms); SETFLOAT(at+20, rad[82] * m2ms); SETFLOAT(at+21, rad[83] * m2ms); SETFLOAT(at+22, rad[84] * m2ms); SETFLOAT(at+23, rad[85] * m2ms); SETFLOAT(at+24, rad[86] * m2ms); SETFLOAT(at+25, rad[87] * m2ms); SETFLOAT(at+26, rad[88] * m2ms); SETFLOAT(at+27, rad[89] * m2ms); SETFLOAT(at+28, rad[90] * m2ms); SETFLOAT(at+29, rad[91] * m2ms); SETFLOAT(at+30, rad[92] * m2ms); SETFLOAT(at+31, rad[93] * m2ms); SETFLOAT(at+32, rad[94] * m2ms); SETFLOAT(at+33, rad[95] * m2ms); SETFLOAT(at+34, rad[96] * m2ms); SETFLOAT(at+35, rad[97] * m2ms); SETFLOAT(at+36, rad[98] * m2ms); SETFLOAT(at+37, rad[99] * m2ms); SETFLOAT(at+38, rad[100] * m2ms); SETFLOAT(at+39, rad[101] * m2ms); SETFLOAT(at+40, rad[102] * m2ms); SETFLOAT(at+41, rad[103] * m2ms); SETFLOAT(at+42, rad[104] * m2ms); SETFLOAT(at+43, rad[105] * m2ms); SETFLOAT(at+44, rad[106] * m2ms); SETFLOAT(at+45, rad[107] * m2ms); SETFLOAT(at+46, rad[108] * m2ms); SETFLOAT(at+47, rad[109] * m2ms); SETFLOAT(at+48, rad[110] * m2ms); SETFLOAT(at+49, rad[111] * m2ms); SETFLOAT(at+50, rad[112] * m2ms); SETFLOAT(at+51, rad[113] * m2ms); SETFLOAT(at+52, rad[114] * m2ms); SETFLOAT(at+53, rad[115] * m2ms); SETFLOAT(at+54, rad[116] * m2ms); SETFLOAT(at+55, rad[117] * m2ms); SETFLOAT(at+56, rad[118] * m2ms); SETFLOAT(at+57, rad[119] * m2ms); SETFLOAT(at+58, rad[120] * m2ms); SETFLOAT(at+59, rad[121] * m2ms); SETFLOAT(at+60, rad[122] * m2ms); SETFLOAT(at+61, rad[123] * m2ms); SETFLOAT(at+62, rad[124] * m2ms); SETFLOAT(at+63, rad[125] * m2ms); SETFLOAT(at+64, rad[126] * m2ms); SETFLOAT(at+65, rad[127] * m2ms); SETFLOAT(at+66, rad[128] * m2ms); outlet_anything(x->x_obj.ob_outlet, x->x_s_early4, 67, at); SETSYMBOL(at, x->x_s_damp); SETFLOAT(at+1, r_min / rad[0]); outlet_anything(x->x_obj.ob_outlet, x->x_s_direct, 2, at); SETFLOAT(at+1, r_min / rad[1]); SETFLOAT(at+2, r_min / rad[2]); SETFLOAT(at+3, r_min / rad[3]); SETFLOAT(at+4, r_min / rad[4]); SETFLOAT(at+5, r_min / rad[5]); SETFLOAT(at+6, r_min / rad[6]); outlet_anything(x->x_obj.ob_outlet, x->x_s_early1, 7, at); SETFLOAT(at+1, r_min / rad[7]); SETFLOAT(at+2, r_min / rad[8]); SETFLOAT(at+3, r_min / rad[9]); SETFLOAT(at+4, r_min / rad[10]); SETFLOAT(at+5, r_min / rad[11]); SETFLOAT(at+6, r_min / rad[12]); SETFLOAT(at+7, r_min / rad[13]); SETFLOAT(at+8, r_min / rad[14]); SETFLOAT(at+9, r_min / rad[15]); SETFLOAT(at+10, r_min / rad[16]); SETFLOAT(at+11, r_min / rad[17]); SETFLOAT(at+12, r_min / rad[18]); SETFLOAT(at+13, r_min / rad[19]); SETFLOAT(at+14, r_min / rad[20]); SETFLOAT(at+15, r_min / rad[21]); SETFLOAT(at+16, r_min / rad[22]); SETFLOAT(at+17, r_min / rad[23]); SETFLOAT(at+18, r_min / rad[24]); outlet_anything(x->x_obj.ob_outlet, x->x_s_early2, 19, at); SETFLOAT(at+1, r_min / rad[25]); SETFLOAT(at+2, r_min / rad[26]); SETFLOAT(at+3, r_min / rad[27]); SETFLOAT(at+4, r_min / rad[28]); SETFLOAT(at+5, r_min / rad[29]); SETFLOAT(at+6, r_min / rad[30]); SETFLOAT(at+7, r_min / rad[31]); SETFLOAT(at+8, r_min / rad[32]); SETFLOAT(at+9, r_min / rad[33]); SETFLOAT(at+10, r_min / rad[34]); SETFLOAT(at+11, r_min / rad[35]); SETFLOAT(at+12, r_min / rad[36]); SETFLOAT(at+13, r_min / rad[37]); SETFLOAT(at+14, r_min / rad[38]); SETFLOAT(at+15, r_min / rad[39]); SETFLOAT(at+16, r_min / rad[40]); SETFLOAT(at+17, r_min / rad[41]); SETFLOAT(at+18, r_min / rad[42]); SETFLOAT(at+19, r_min / rad[43]); SETFLOAT(at+20, r_min / rad[44]); SETFLOAT(at+21, r_min / rad[45]); SETFLOAT(at+22, r_min / rad[46]); SETFLOAT(at+23, r_min / rad[47]); SETFLOAT(at+24, r_min / rad[48]); SETFLOAT(at+25, r_min / rad[49]); SETFLOAT(at+26, r_min / rad[50]); SETFLOAT(at+27, r_min / rad[51]); SETFLOAT(at+28, r_min / rad[52]); SETFLOAT(at+29, r_min / rad[53]); SETFLOAT(at+30, r_min / rad[54]); SETFLOAT(at+31, r_min / rad[55]); SETFLOAT(at+32, r_min / rad[56]); SETFLOAT(at+33, r_min / rad[57]); SETFLOAT(at+34, r_min / rad[58]); SETFLOAT(at+35, r_min / rad[59]); SETFLOAT(at+36, r_min / rad[60]); SETFLOAT(at+37, r_min / rad[61]); SETFLOAT(at+38, r_min / rad[62]); outlet_anything(x->x_obj.ob_outlet, x->x_s_early3, 39, at); SETFLOAT(at+1, r_min / rad[63]); SETFLOAT(at+2, r_min / rad[64]); SETFLOAT(at+3, r_min / rad[65]); SETFLOAT(at+4, r_min / rad[66]); SETFLOAT(at+5, r_min / rad[67]); SETFLOAT(at+6, r_min / rad[68]); SETFLOAT(at+7, r_min / rad[69]); SETFLOAT(at+8, r_min / rad[70]); SETFLOAT(at+9, r_min / rad[71]); SETFLOAT(at+10, r_min / rad[72]); SETFLOAT(at+11, r_min / rad[73]); SETFLOAT(at+12, r_min / rad[74]); SETFLOAT(at+13, r_min / rad[75]); SETFLOAT(at+14, r_min / rad[76]); SETFLOAT(at+15, r_min / rad[77]); SETFLOAT(at+16, r_min / rad[78]); SETFLOAT(at+17, r_min / rad[79]); SETFLOAT(at+18, r_min / rad[80]); SETFLOAT(at+19, r_min / rad[81]); SETFLOAT(at+20, r_min / rad[82]); SETFLOAT(at+21, r_min / rad[83]); SETFLOAT(at+22, r_min / rad[84]); SETFLOAT(at+23, r_min / rad[85]); SETFLOAT(at+24, r_min / rad[86]); SETFLOAT(at+25, r_min / rad[87]); SETFLOAT(at+26, r_min / rad[88]); SETFLOAT(at+27, r_min / rad[89]); SETFLOAT(at+28, r_min / rad[90]); SETFLOAT(at+29, r_min / rad[91]); SETFLOAT(at+30, r_min / rad[92]); SETFLOAT(at+31, r_min / rad[93]); SETFLOAT(at+32, r_min / rad[94]); SETFLOAT(at+33, r_min / rad[95]); SETFLOAT(at+34, r_min / rad[96]); SETFLOAT(at+35, r_min / rad[97]); SETFLOAT(at+36, r_min / rad[98]); SETFLOAT(at+37, r_min / rad[99]); SETFLOAT(at+38, r_min / rad[100]); SETFLOAT(at+39, r_min / rad[101]); SETFLOAT(at+40, r_min / rad[102]); SETFLOAT(at+41, r_min / rad[103]); SETFLOAT(at+42, r_min / rad[104]); SETFLOAT(at+43, r_min / rad[105]); SETFLOAT(at+44, r_min / rad[106]); SETFLOAT(at+45, r_min / rad[107]); SETFLOAT(at+46, r_min / rad[108]); SETFLOAT(at+47, r_min / rad[109]); SETFLOAT(at+48, r_min / rad[110]); SETFLOAT(at+49, r_min / rad[111]); SETFLOAT(at+50, r_min / rad[112]); SETFLOAT(at+51, r_min / rad[113]); SETFLOAT(at+52, r_min / rad[114]); SETFLOAT(at+53, r_min / rad[115]); SETFLOAT(at+54, r_min / rad[116]); SETFLOAT(at+55, r_min / rad[117]); SETFLOAT(at+56, r_min / rad[118]); SETFLOAT(at+57, r_min / rad[119]); SETFLOAT(at+58, r_min / rad[120]); SETFLOAT(at+59, r_min / rad[121]); SETFLOAT(at+60, r_min / rad[122]); SETFLOAT(at+61, r_min / rad[123]); SETFLOAT(at+62, r_min / rad[124]); SETFLOAT(at+63, r_min / rad[125]); SETFLOAT(at+64, r_min / rad[126]); SETFLOAT(at+65, r_min / rad[127]); SETFLOAT(at+66, r_min / rad[128]); outlet_anything(x->x_obj.ob_outlet, x->x_s_early4, 67, at); SETSYMBOL(at, x->x_s_theta); SETFLOAT(at+1, xyz_3_del_damp_theta_phi_calc_elevation(x_180_over_pi, x_0, y_0, z_0)); outlet_anything(x->x_obj.ob_outlet, x->x_s_direct, 2, at); SETFLOAT(at+1, xyz_3_del_damp_theta_phi_calc_elevation(x_180_over_pi, xp1, y_0, z_0)); SETFLOAT(at+2, xyz_3_del_damp_theta_phi_calc_elevation(x_180_over_pi, x_0, yp1, z_0)); SETFLOAT(at+3, xyz_3_del_damp_theta_phi_calc_elevation(x_180_over_pi, xn1, y_0, z_0)); SETFLOAT(at+4, xyz_3_del_damp_theta_phi_calc_elevation(x_180_over_pi, x_0, yn1, z_0)); SETFLOAT(at+5, xyz_3_del_damp_theta_phi_calc_elevation(x_180_over_pi, x_0, y_0, zp1)); SETFLOAT(at+6, xyz_3_del_damp_theta_phi_calc_elevation(x_180_over_pi, x_0, y_0, zn1)); outlet_anything(x->x_obj.ob_outlet, x->x_s_early1, 7, at); SETFLOAT(at+1, xyz_3_del_damp_theta_phi_calc_elevation(x_180_over_pi, xp2, y_0, z_0)); SETFLOAT(at+2, xyz_3_del_damp_theta_phi_calc_elevation(x_180_over_pi, xp1, yp1, z_0)); SETFLOAT(at+3, xyz_3_del_damp_theta_phi_calc_elevation(x_180_over_pi, x_0, yp2, z_0)); SETFLOAT(at+4, xyz_3_del_damp_theta_phi_calc_elevation(x_180_over_pi, xn1, yp1, z_0)); SETFLOAT(at+5, xyz_3_del_damp_theta_phi_calc_elevation(x_180_over_pi, xn2, y_0, z_0)); SETFLOAT(at+6, xyz_3_del_damp_theta_phi_calc_elevation(x_180_over_pi, xn1, yn1, z_0)); SETFLOAT(at+7, xyz_3_del_damp_theta_phi_calc_elevation(x_180_over_pi, x_0, yn2, z_0)); SETFLOAT(at+8, xyz_3_del_damp_theta_phi_calc_elevation(x_180_over_pi, xp1, yn1, z_0)); SETFLOAT(at+9, xyz_3_del_damp_theta_phi_calc_elevation(x_180_over_pi, xp1, y_0, zp1)); SETFLOAT(at+10, xyz_3_del_damp_theta_phi_calc_elevation(x_180_over_pi, x_0, yp1, zp1)); SETFLOAT(at+11, xyz_3_del_damp_theta_phi_calc_elevation(x_180_over_pi, xn1, y_0, zp1)); SETFLOAT(at+12, xyz_3_del_damp_theta_phi_calc_elevation(x_180_over_pi, x_0, yn1, zp1)); SETFLOAT(at+13, xyz_3_del_damp_theta_phi_calc_elevation(x_180_over_pi, x_0, y_0, zp2)); SETFLOAT(at+14, xyz_3_del_damp_theta_phi_calc_elevation(x_180_over_pi, xp1, y_0, zn1)); SETFLOAT(at+15, xyz_3_del_damp_theta_phi_calc_elevation(x_180_over_pi, x_0, yp1, zn1)); SETFLOAT(at+16, xyz_3_del_damp_theta_phi_calc_elevation(x_180_over_pi, xn1, y_0, zn1)); SETFLOAT(at+17, xyz_3_del_damp_theta_phi_calc_elevation(x_180_over_pi, x_0, yn1, zn1)); SETFLOAT(at+18, xyz_3_del_damp_theta_phi_calc_elevation(x_180_over_pi, x_0, y_0, zn2)); outlet_anything(x->x_obj.ob_outlet, x->x_s_early2, 19, at); SETFLOAT(at+1, xyz_3_del_damp_theta_phi_calc_elevation(x_180_over_pi, xp3, y_0, z_0)); SETFLOAT(at+2, xyz_3_del_damp_theta_phi_calc_elevation(x_180_over_pi, xp2, yp1, z_0)); SETFLOAT(at+3, xyz_3_del_damp_theta_phi_calc_elevation(x_180_over_pi, xp1, yp2, z_0)); SETFLOAT(at+4, xyz_3_del_damp_theta_phi_calc_elevation(x_180_over_pi, x_0, yp3, z_0)); SETFLOAT(at+5, xyz_3_del_damp_theta_phi_calc_elevation(x_180_over_pi, xn1, yp2, z_0)); SETFLOAT(at+6, xyz_3_del_damp_theta_phi_calc_elevation(x_180_over_pi, xn2, yp1, z_0)); SETFLOAT(at+7, xyz_3_del_damp_theta_phi_calc_elevation(x_180_over_pi, xn3, y_0, z_0)); SETFLOAT(at+8, xyz_3_del_damp_theta_phi_calc_elevation(x_180_over_pi, xn2, yn1, z_0)); SETFLOAT(at+9, xyz_3_del_damp_theta_phi_calc_elevation(x_180_over_pi, xn1, yn2, z_0)); SETFLOAT(at+10, xyz_3_del_damp_theta_phi_calc_elevation(x_180_over_pi, x_0, yn3, z_0)); SETFLOAT(at+11, xyz_3_del_damp_theta_phi_calc_elevation(x_180_over_pi, xp1, yn2, z_0)); SETFLOAT(at+12, xyz_3_del_damp_theta_phi_calc_elevation(x_180_over_pi, xp2, yn1, z_0)); SETFLOAT(at+13, xyz_3_del_damp_theta_phi_calc_elevation(x_180_over_pi, xp2, y_0, zp1)); SETFLOAT(at+14, xyz_3_del_damp_theta_phi_calc_elevation(x_180_over_pi, xp1, yp1, zp1)); SETFLOAT(at+15, xyz_3_del_damp_theta_phi_calc_elevation(x_180_over_pi, x_0, yp2, zp1)); SETFLOAT(at+16, xyz_3_del_damp_theta_phi_calc_elevation(x_180_over_pi, xn1, yp1, zp1)); SETFLOAT(at+17, xyz_3_del_damp_theta_phi_calc_elevation(x_180_over_pi, xn2, y_0, zp1)); SETFLOAT(at+18, xyz_3_del_damp_theta_phi_calc_elevation(x_180_over_pi, xn1, yn1, zp1)); SETFLOAT(at+19, xyz_3_del_damp_theta_phi_calc_elevation(x_180_over_pi, x_0, yn2, zp1)); SETFLOAT(at+20, xyz_3_del_damp_theta_phi_calc_elevation(x_180_over_pi, xp1, yn1, zp1)); SETFLOAT(at+21, xyz_3_del_damp_theta_phi_calc_elevation(x_180_over_pi, xp1, y_0, zp2)); SETFLOAT(at+22, xyz_3_del_damp_theta_phi_calc_elevation(x_180_over_pi, x_0, yp1, zp2)); SETFLOAT(at+23, xyz_3_del_damp_theta_phi_calc_elevation(x_180_over_pi, xn1, y_0, zp2)); SETFLOAT(at+24, xyz_3_del_damp_theta_phi_calc_elevation(x_180_over_pi, x_0, yn1, zp2)); SETFLOAT(at+25, xyz_3_del_damp_theta_phi_calc_elevation(x_180_over_pi, x_0, y_0, zp3)); SETFLOAT(at+26, xyz_3_del_damp_theta_phi_calc_elevation(x_180_over_pi, xp2, y_0, zn1)); SETFLOAT(at+27, xyz_3_del_damp_theta_phi_calc_elevation(x_180_over_pi, xp1, yp1, zn1)); SETFLOAT(at+28, xyz_3_del_damp_theta_phi_calc_elevation(x_180_over_pi, x_0, yp2, zn1)); SETFLOAT(at+29, xyz_3_del_damp_theta_phi_calc_elevation(x_180_over_pi, xn1, yp1, zn1)); SETFLOAT(at+30, xyz_3_del_damp_theta_phi_calc_elevation(x_180_over_pi, xn2, y_0, zn1)); SETFLOAT(at+31, xyz_3_del_damp_theta_phi_calc_elevation(x_180_over_pi, xn1, yn1, zn1)); SETFLOAT(at+32, xyz_3_del_damp_theta_phi_calc_elevation(x_180_over_pi, x_0, yn2, zn1)); SETFLOAT(at+33, xyz_3_del_damp_theta_phi_calc_elevation(x_180_over_pi, xp1, yn1, zn1)); SETFLOAT(at+34, xyz_3_del_damp_theta_phi_calc_elevation(x_180_over_pi, xp1, y_0, zn2)); SETFLOAT(at+35, xyz_3_del_damp_theta_phi_calc_elevation(x_180_over_pi, x_0, yp1, zn2)); SETFLOAT(at+36, xyz_3_del_damp_theta_phi_calc_elevation(x_180_over_pi, xn1, y_0, zn2)); SETFLOAT(at+37, xyz_3_del_damp_theta_phi_calc_elevation(x_180_over_pi, x_0, yn1, zn2)); SETFLOAT(at+38, xyz_3_del_damp_theta_phi_calc_elevation(x_180_over_pi, x_0, y_0, zn3)); outlet_anything(x->x_obj.ob_outlet, x->x_s_early3, 39, at); SETFLOAT(at+1, xyz_3_del_damp_theta_phi_calc_elevation(x_180_over_pi, xp4, y_0, z_0)); SETFLOAT(at+2, xyz_3_del_damp_theta_phi_calc_elevation(x_180_over_pi, xp3, yp1, z_0)); SETFLOAT(at+3, xyz_3_del_damp_theta_phi_calc_elevation(x_180_over_pi, xp2, yp2, z_0)); SETFLOAT(at+4, xyz_3_del_damp_theta_phi_calc_elevation(x_180_over_pi, xp1, yp3, z_0)); SETFLOAT(at+5, xyz_3_del_damp_theta_phi_calc_elevation(x_180_over_pi, x_0, yp4, z_0)); SETFLOAT(at+6, xyz_3_del_damp_theta_phi_calc_elevation(x_180_over_pi, xn1, yp3, z_0)); SETFLOAT(at+7, xyz_3_del_damp_theta_phi_calc_elevation(x_180_over_pi, xn2, yp2, z_0)); SETFLOAT(at+8, xyz_3_del_damp_theta_phi_calc_elevation(x_180_over_pi, xn3, yp1, z_0)); SETFLOAT(at+9, xyz_3_del_damp_theta_phi_calc_elevation(x_180_over_pi, xn4, y_0, z_0)); SETFLOAT(at+10, xyz_3_del_damp_theta_phi_calc_elevation(x_180_over_pi, xn3, yn1, z_0)); SETFLOAT(at+11, xyz_3_del_damp_theta_phi_calc_elevation(x_180_over_pi, xn2, yn2, z_0)); SETFLOAT(at+12, xyz_3_del_damp_theta_phi_calc_elevation(x_180_over_pi, xn1, yn3, z_0)); SETFLOAT(at+13, xyz_3_del_damp_theta_phi_calc_elevation(x_180_over_pi, x_0, yn4, z_0)); SETFLOAT(at+14, xyz_3_del_damp_theta_phi_calc_elevation(x_180_over_pi, xp1, yn3, z_0)); SETFLOAT(at+15, xyz_3_del_damp_theta_phi_calc_elevation(x_180_over_pi, xp2, yn2, z_0)); SETFLOAT(at+16, xyz_3_del_damp_theta_phi_calc_elevation(x_180_over_pi, xp3, yn1, z_0)); SETFLOAT(at+17, xyz_3_del_damp_theta_phi_calc_elevation(x_180_over_pi, xp3, y_0, zp1)); SETFLOAT(at+18, xyz_3_del_damp_theta_phi_calc_elevation(x_180_over_pi, xp2, yp1, zp1)); SETFLOAT(at+19, xyz_3_del_damp_theta_phi_calc_elevation(x_180_over_pi, xp1, yp2, zp1)); SETFLOAT(at+20, xyz_3_del_damp_theta_phi_calc_elevation(x_180_over_pi, x_0, yp3, zp1)); SETFLOAT(at+21, xyz_3_del_damp_theta_phi_calc_elevation(x_180_over_pi, xn1, yp2, zp1)); SETFLOAT(at+22, xyz_3_del_damp_theta_phi_calc_elevation(x_180_over_pi, xn2, yp1, zp1)); SETFLOAT(at+23, xyz_3_del_damp_theta_phi_calc_elevation(x_180_over_pi, xn3, y_0, zp1)); SETFLOAT(at+24, xyz_3_del_damp_theta_phi_calc_elevation(x_180_over_pi, xn2, yn1, zp1)); SETFLOAT(at+25, xyz_3_del_damp_theta_phi_calc_elevation(x_180_over_pi, xn1, yn2, zp1)); SETFLOAT(at+26, xyz_3_del_damp_theta_phi_calc_elevation(x_180_over_pi, x_0, yn3, zp1)); SETFLOAT(at+27, xyz_3_del_damp_theta_phi_calc_elevation(x_180_over_pi, xp1, yn2, zp1)); SETFLOAT(at+28, xyz_3_del_damp_theta_phi_calc_elevation(x_180_over_pi, xp2, yn1, zp1)); SETFLOAT(at+29, xyz_3_del_damp_theta_phi_calc_elevation(x_180_over_pi, xp2, y_0, zp2)); SETFLOAT(at+30, xyz_3_del_damp_theta_phi_calc_elevation(x_180_over_pi, xp1, yp1, zp2)); SETFLOAT(at+31, xyz_3_del_damp_theta_phi_calc_elevation(x_180_over_pi, x_0, yp2, zp2)); SETFLOAT(at+32, xyz_3_del_damp_theta_phi_calc_elevation(x_180_over_pi, xn1, yp1, zp2)); SETFLOAT(at+33, xyz_3_del_damp_theta_phi_calc_elevation(x_180_over_pi, xn2, y_0, zp2)); SETFLOAT(at+34, xyz_3_del_damp_theta_phi_calc_elevation(x_180_over_pi, xn1, yn1, zp2)); SETFLOAT(at+35, xyz_3_del_damp_theta_phi_calc_elevation(x_180_over_pi, x_0, yn2, zp2)); SETFLOAT(at+36, xyz_3_del_damp_theta_phi_calc_elevation(x_180_over_pi, xp1, yn1, zp2)); SETFLOAT(at+37, xyz_3_del_damp_theta_phi_calc_elevation(x_180_over_pi, xp1, y_0, zp3)); SETFLOAT(at+38, xyz_3_del_damp_theta_phi_calc_elevation(x_180_over_pi, x_0, yp1, zp3)); SETFLOAT(at+39, xyz_3_del_damp_theta_phi_calc_elevation(x_180_over_pi, xn1, y_0, zp3)); SETFLOAT(at+40, xyz_3_del_damp_theta_phi_calc_elevation(x_180_over_pi, x_0, yn1, zp3)); SETFLOAT(at+41, xyz_3_del_damp_theta_phi_calc_elevation(x_180_over_pi, x_0, y_0, zp4)); SETFLOAT(at+42, xyz_3_del_damp_theta_phi_calc_elevation(x_180_over_pi, xp3, y_0, zn1)); SETFLOAT(at+43, xyz_3_del_damp_theta_phi_calc_elevation(x_180_over_pi, xp2, yp1, zn1)); SETFLOAT(at+44, xyz_3_del_damp_theta_phi_calc_elevation(x_180_over_pi, xp1, yp2, zn1)); SETFLOAT(at+45, xyz_3_del_damp_theta_phi_calc_elevation(x_180_over_pi, x_0, yp3, zn1)); SETFLOAT(at+46, xyz_3_del_damp_theta_phi_calc_elevation(x_180_over_pi, xn1, yp2, zn1)); SETFLOAT(at+47, xyz_3_del_damp_theta_phi_calc_elevation(x_180_over_pi, xn2, yp1, zn1)); SETFLOAT(at+48, xyz_3_del_damp_theta_phi_calc_elevation(x_180_over_pi, xn3, y_0, zn1)); SETFLOAT(at+49, xyz_3_del_damp_theta_phi_calc_elevation(x_180_over_pi, xn2, yn1, zn1)); SETFLOAT(at+50, xyz_3_del_damp_theta_phi_calc_elevation(x_180_over_pi, xn1, yn2, zn1)); SETFLOAT(at+51, xyz_3_del_damp_theta_phi_calc_elevation(x_180_over_pi, x_0, yn3, zn1)); SETFLOAT(at+52, xyz_3_del_damp_theta_phi_calc_elevation(x_180_over_pi, xp1, yn2, zn1)); SETFLOAT(at+53, xyz_3_del_damp_theta_phi_calc_elevation(x_180_over_pi, xp2, yn1, zn1)); SETFLOAT(at+54, xyz_3_del_damp_theta_phi_calc_elevation(x_180_over_pi, xp2, y_0, zn2)); SETFLOAT(at+55, xyz_3_del_damp_theta_phi_calc_elevation(x_180_over_pi, xp1, yp1, zn2)); SETFLOAT(at+56, xyz_3_del_damp_theta_phi_calc_elevation(x_180_over_pi, x_0, yp2, zn2)); SETFLOAT(at+57, xyz_3_del_damp_theta_phi_calc_elevation(x_180_over_pi, xn1, yp1, zn2)); SETFLOAT(at+58, xyz_3_del_damp_theta_phi_calc_elevation(x_180_over_pi, xn2, y_0, zn2)); SETFLOAT(at+59, xyz_3_del_damp_theta_phi_calc_elevation(x_180_over_pi, xn1, yn1, zn2)); SETFLOAT(at+60, xyz_3_del_damp_theta_phi_calc_elevation(x_180_over_pi, x_0, yn2, zn2)); SETFLOAT(at+61, xyz_3_del_damp_theta_phi_calc_elevation(x_180_over_pi, xp1, yn1, zn2)); SETFLOAT(at+62, xyz_3_del_damp_theta_phi_calc_elevation(x_180_over_pi, xp1, y_0, zn3)); SETFLOAT(at+63, xyz_3_del_damp_theta_phi_calc_elevation(x_180_over_pi, x_0, yp1, zn3)); SETFLOAT(at+64, xyz_3_del_damp_theta_phi_calc_elevation(x_180_over_pi, xn1, y_0, zn3)); SETFLOAT(at+65, xyz_3_del_damp_theta_phi_calc_elevation(x_180_over_pi, x_0, yn1, zn3)); SETFLOAT(at+66, xyz_3_del_damp_theta_phi_calc_elevation(x_180_over_pi, x_0, y_0, zn4)); outlet_anything(x->x_obj.ob_outlet, x->x_s_early4, 67, at); SETSYMBOL(at, x->x_s_phi); SETFLOAT(at+1, xyz_3_del_damp_theta_phi_calc_azimuth(x_180_over_pi, x_0, y_0, z_0)); outlet_anything(x->x_obj.ob_outlet, x->x_s_direct, 2, at); SETFLOAT(at+1, xyz_3_del_damp_theta_phi_calc_azimuth(x_180_over_pi, xp1, y_0, z_0)); SETFLOAT(at+2, xyz_3_del_damp_theta_phi_calc_azimuth(x_180_over_pi, x_0, yp1, z_0)); SETFLOAT(at+3, xyz_3_del_damp_theta_phi_calc_azimuth(x_180_over_pi, xn1, y_0, z_0)); SETFLOAT(at+4, xyz_3_del_damp_theta_phi_calc_azimuth(x_180_over_pi, x_0, yn1, z_0)); SETFLOAT(at+5, xyz_3_del_damp_theta_phi_calc_azimuth(x_180_over_pi, x_0, y_0, zp1)); SETFLOAT(at+6, xyz_3_del_damp_theta_phi_calc_azimuth(x_180_over_pi, x_0, y_0, zn1)); outlet_anything(x->x_obj.ob_outlet, x->x_s_early1, 7, at); SETFLOAT(at+1, xyz_3_del_damp_theta_phi_calc_azimuth(x_180_over_pi, xp2, y_0, z_0)); SETFLOAT(at+2, xyz_3_del_damp_theta_phi_calc_azimuth(x_180_over_pi, xp1, yp1, z_0)); SETFLOAT(at+3, xyz_3_del_damp_theta_phi_calc_azimuth(x_180_over_pi, x_0, yp2, z_0)); SETFLOAT(at+4, xyz_3_del_damp_theta_phi_calc_azimuth(x_180_over_pi, xn1, yp1, z_0)); SETFLOAT(at+5, xyz_3_del_damp_theta_phi_calc_azimuth(x_180_over_pi, xn2, y_0, z_0)); SETFLOAT(at+6, xyz_3_del_damp_theta_phi_calc_azimuth(x_180_over_pi, xn1, yn1, z_0)); SETFLOAT(at+7, xyz_3_del_damp_theta_phi_calc_azimuth(x_180_over_pi, x_0, yn2, z_0)); SETFLOAT(at+8, xyz_3_del_damp_theta_phi_calc_azimuth(x_180_over_pi, xp1, yn1, z_0)); SETFLOAT(at+9, xyz_3_del_damp_theta_phi_calc_azimuth(x_180_over_pi, xp1, y_0, zp1)); SETFLOAT(at+10, xyz_3_del_damp_theta_phi_calc_azimuth(x_180_over_pi, x_0, yp1, zp1)); SETFLOAT(at+11, xyz_3_del_damp_theta_phi_calc_azimuth(x_180_over_pi, xn1, y_0, zp1)); SETFLOAT(at+12, xyz_3_del_damp_theta_phi_calc_azimuth(x_180_over_pi, x_0, yn1, zp1)); SETFLOAT(at+13, xyz_3_del_damp_theta_phi_calc_azimuth(x_180_over_pi, x_0, y_0, zp2)); SETFLOAT(at+14, xyz_3_del_damp_theta_phi_calc_azimuth(x_180_over_pi, xp1, y_0, zn1)); SETFLOAT(at+15, xyz_3_del_damp_theta_phi_calc_azimuth(x_180_over_pi, x_0, yp1, zn1)); SETFLOAT(at+16, xyz_3_del_damp_theta_phi_calc_azimuth(x_180_over_pi, xn1, y_0, zn1)); SETFLOAT(at+17, xyz_3_del_damp_theta_phi_calc_azimuth(x_180_over_pi, x_0, yn1, zn1)); SETFLOAT(at+18, xyz_3_del_damp_theta_phi_calc_azimuth(x_180_over_pi, x_0, y_0, zn2)); outlet_anything(x->x_obj.ob_outlet, x->x_s_early2, 19, at); SETFLOAT(at+1, xyz_3_del_damp_theta_phi_calc_azimuth(x_180_over_pi, xp3, y_0, z_0)); SETFLOAT(at+2, xyz_3_del_damp_theta_phi_calc_azimuth(x_180_over_pi, xp2, yp1, z_0)); SETFLOAT(at+3, xyz_3_del_damp_theta_phi_calc_azimuth(x_180_over_pi, xp1, yp2, z_0)); SETFLOAT(at+4, xyz_3_del_damp_theta_phi_calc_azimuth(x_180_over_pi, x_0, yp3, z_0)); SETFLOAT(at+5, xyz_3_del_damp_theta_phi_calc_azimuth(x_180_over_pi, xn1, yp2, z_0)); SETFLOAT(at+6, xyz_3_del_damp_theta_phi_calc_azimuth(x_180_over_pi, xn2, yp1, z_0)); SETFLOAT(at+7, xyz_3_del_damp_theta_phi_calc_azimuth(x_180_over_pi, xn3, y_0, z_0)); SETFLOAT(at+8, xyz_3_del_damp_theta_phi_calc_azimuth(x_180_over_pi, xn2, yn1, z_0)); SETFLOAT(at+9, xyz_3_del_damp_theta_phi_calc_azimuth(x_180_over_pi, xn1, yn2, z_0)); SETFLOAT(at+10, xyz_3_del_damp_theta_phi_calc_azimuth(x_180_over_pi, x_0, yn3, z_0)); SETFLOAT(at+11, xyz_3_del_damp_theta_phi_calc_azimuth(x_180_over_pi, xp1, yn2, z_0)); SETFLOAT(at+12, xyz_3_del_damp_theta_phi_calc_azimuth(x_180_over_pi, xp2, yn1, z_0)); SETFLOAT(at+13, xyz_3_del_damp_theta_phi_calc_azimuth(x_180_over_pi, xp2, y_0, zp1)); SETFLOAT(at+14, xyz_3_del_damp_theta_phi_calc_azimuth(x_180_over_pi, xp1, yp1, zp1)); SETFLOAT(at+15, xyz_3_del_damp_theta_phi_calc_azimuth(x_180_over_pi, x_0, yp2, zp1)); SETFLOAT(at+16, xyz_3_del_damp_theta_phi_calc_azimuth(x_180_over_pi, xn1, yp1, zp1)); SETFLOAT(at+17, xyz_3_del_damp_theta_phi_calc_azimuth(x_180_over_pi, xn2, y_0, zp1)); SETFLOAT(at+18, xyz_3_del_damp_theta_phi_calc_azimuth(x_180_over_pi, xn1, yn1, zp1)); SETFLOAT(at+19, xyz_3_del_damp_theta_phi_calc_azimuth(x_180_over_pi, x_0, yn2, zp1)); SETFLOAT(at+20, xyz_3_del_damp_theta_phi_calc_azimuth(x_180_over_pi, xp1, yn1, zp1)); SETFLOAT(at+21, xyz_3_del_damp_theta_phi_calc_azimuth(x_180_over_pi, xp1, y_0, zp2)); SETFLOAT(at+22, xyz_3_del_damp_theta_phi_calc_azimuth(x_180_over_pi, x_0, yp1, zp2)); SETFLOAT(at+23, xyz_3_del_damp_theta_phi_calc_azimuth(x_180_over_pi, xn1, y_0, zp2)); SETFLOAT(at+24, xyz_3_del_damp_theta_phi_calc_azimuth(x_180_over_pi, x_0, yn1, zp2)); SETFLOAT(at+25, xyz_3_del_damp_theta_phi_calc_azimuth(x_180_over_pi, x_0, y_0, zp3)); SETFLOAT(at+26, xyz_3_del_damp_theta_phi_calc_azimuth(x_180_over_pi, xp2, y_0, zn1)); SETFLOAT(at+27, xyz_3_del_damp_theta_phi_calc_azimuth(x_180_over_pi, xp1, yp1, zn1)); SETFLOAT(at+28, xyz_3_del_damp_theta_phi_calc_azimuth(x_180_over_pi, x_0, yp2, zn1)); SETFLOAT(at+29, xyz_3_del_damp_theta_phi_calc_azimuth(x_180_over_pi, xn1, yp1, zn1)); SETFLOAT(at+30, xyz_3_del_damp_theta_phi_calc_azimuth(x_180_over_pi, xn2, y_0, zn1)); SETFLOAT(at+31, xyz_3_del_damp_theta_phi_calc_azimuth(x_180_over_pi, xn1, yn1, zn1)); SETFLOAT(at+32, xyz_3_del_damp_theta_phi_calc_azimuth(x_180_over_pi, x_0, yn2, zn1)); SETFLOAT(at+33, xyz_3_del_damp_theta_phi_calc_azimuth(x_180_over_pi, xp1, yn1, zn1)); SETFLOAT(at+34, xyz_3_del_damp_theta_phi_calc_azimuth(x_180_over_pi, xp1, y_0, zn2)); SETFLOAT(at+35, xyz_3_del_damp_theta_phi_calc_azimuth(x_180_over_pi, x_0, yp1, zn2)); SETFLOAT(at+36, xyz_3_del_damp_theta_phi_calc_azimuth(x_180_over_pi, xn1, y_0, zn2)); SETFLOAT(at+37, xyz_3_del_damp_theta_phi_calc_azimuth(x_180_over_pi, x_0, yn1, zn2)); SETFLOAT(at+38, xyz_3_del_damp_theta_phi_calc_azimuth(x_180_over_pi, x_0, y_0, zn3)); outlet_anything(x->x_obj.ob_outlet, x->x_s_early3, 39, at); SETFLOAT(at+1, xyz_3_del_damp_theta_phi_calc_azimuth(x_180_over_pi, xp4, y_0, z_0)); SETFLOAT(at+2, xyz_3_del_damp_theta_phi_calc_azimuth(x_180_over_pi, xp3, yp1, z_0)); SETFLOAT(at+3, xyz_3_del_damp_theta_phi_calc_azimuth(x_180_over_pi, xp2, yp2, z_0)); SETFLOAT(at+4, xyz_3_del_damp_theta_phi_calc_azimuth(x_180_over_pi, xp1, yp3, z_0)); SETFLOAT(at+5, xyz_3_del_damp_theta_phi_calc_azimuth(x_180_over_pi, x_0, yp4, z_0)); SETFLOAT(at+6, xyz_3_del_damp_theta_phi_calc_azimuth(x_180_over_pi, xn1, yp3, z_0)); SETFLOAT(at+7, xyz_3_del_damp_theta_phi_calc_azimuth(x_180_over_pi, xn2, yp2, z_0)); SETFLOAT(at+8, xyz_3_del_damp_theta_phi_calc_azimuth(x_180_over_pi, xn3, yp1, z_0)); SETFLOAT(at+9, xyz_3_del_damp_theta_phi_calc_azimuth(x_180_over_pi, xn4, y_0, z_0)); SETFLOAT(at+10, xyz_3_del_damp_theta_phi_calc_azimuth(x_180_over_pi, xn3, yn1, z_0)); SETFLOAT(at+11, xyz_3_del_damp_theta_phi_calc_azimuth(x_180_over_pi, xn2, yn2, z_0)); SETFLOAT(at+12, xyz_3_del_damp_theta_phi_calc_azimuth(x_180_over_pi, xn1, yn3, z_0)); SETFLOAT(at+13, xyz_3_del_damp_theta_phi_calc_azimuth(x_180_over_pi, x_0, yn4, z_0)); SETFLOAT(at+14, xyz_3_del_damp_theta_phi_calc_azimuth(x_180_over_pi, xp1, yn3, z_0)); SETFLOAT(at+15, xyz_3_del_damp_theta_phi_calc_azimuth(x_180_over_pi, xp2, yn2, z_0)); SETFLOAT(at+16, xyz_3_del_damp_theta_phi_calc_azimuth(x_180_over_pi, xp3, yn1, z_0)); SETFLOAT(at+17, xyz_3_del_damp_theta_phi_calc_azimuth(x_180_over_pi, xp3, y_0, zp1)); SETFLOAT(at+18, xyz_3_del_damp_theta_phi_calc_azimuth(x_180_over_pi, xp2, yp1, zp1)); SETFLOAT(at+19, xyz_3_del_damp_theta_phi_calc_azimuth(x_180_over_pi, xp1, yp2, zp1)); SETFLOAT(at+20, xyz_3_del_damp_theta_phi_calc_azimuth(x_180_over_pi, x_0, yp3, zp1)); SETFLOAT(at+21, xyz_3_del_damp_theta_phi_calc_azimuth(x_180_over_pi, xn1, yp2, zp1)); SETFLOAT(at+22, xyz_3_del_damp_theta_phi_calc_azimuth(x_180_over_pi, xn2, yp1, zp1)); SETFLOAT(at+23, xyz_3_del_damp_theta_phi_calc_azimuth(x_180_over_pi, xn3, y_0, zp1)); SETFLOAT(at+24, xyz_3_del_damp_theta_phi_calc_azimuth(x_180_over_pi, xn2, yn1, zp1)); SETFLOAT(at+25, xyz_3_del_damp_theta_phi_calc_azimuth(x_180_over_pi, xn1, yn2, zp1)); SETFLOAT(at+26, xyz_3_del_damp_theta_phi_calc_azimuth(x_180_over_pi, x_0, yn3, zp1)); SETFLOAT(at+27, xyz_3_del_damp_theta_phi_calc_azimuth(x_180_over_pi, xp1, yn2, zp1)); SETFLOAT(at+28, xyz_3_del_damp_theta_phi_calc_azimuth(x_180_over_pi, xp2, yn1, zp1)); SETFLOAT(at+29, xyz_3_del_damp_theta_phi_calc_azimuth(x_180_over_pi, xp2, y_0, zp2)); SETFLOAT(at+30, xyz_3_del_damp_theta_phi_calc_azimuth(x_180_over_pi, xp1, yp1, zp2)); SETFLOAT(at+31, xyz_3_del_damp_theta_phi_calc_azimuth(x_180_over_pi, x_0, yp2, zp2)); SETFLOAT(at+32, xyz_3_del_damp_theta_phi_calc_azimuth(x_180_over_pi, xn1, yp1, zp2)); SETFLOAT(at+33, xyz_3_del_damp_theta_phi_calc_azimuth(x_180_over_pi, xn2, y_0, zp2)); SETFLOAT(at+34, xyz_3_del_damp_theta_phi_calc_azimuth(x_180_over_pi, xn1, yn1, zp2)); SETFLOAT(at+35, xyz_3_del_damp_theta_phi_calc_azimuth(x_180_over_pi, x_0, yn2, zp2)); SETFLOAT(at+36, xyz_3_del_damp_theta_phi_calc_azimuth(x_180_over_pi, xp1, yn1, zp2)); SETFLOAT(at+37, xyz_3_del_damp_theta_phi_calc_azimuth(x_180_over_pi, xp1, y_0, zp3)); SETFLOAT(at+38, xyz_3_del_damp_theta_phi_calc_azimuth(x_180_over_pi, x_0, yp1, zp3)); SETFLOAT(at+39, xyz_3_del_damp_theta_phi_calc_azimuth(x_180_over_pi, xn1, y_0, zp3)); SETFLOAT(at+40, xyz_3_del_damp_theta_phi_calc_azimuth(x_180_over_pi, x_0, yn1, zp3)); SETFLOAT(at+41, xyz_3_del_damp_theta_phi_calc_azimuth(x_180_over_pi, x_0, y_0, zp4)); SETFLOAT(at+42, xyz_3_del_damp_theta_phi_calc_azimuth(x_180_over_pi, xp3, y_0, zn1)); SETFLOAT(at+43, xyz_3_del_damp_theta_phi_calc_azimuth(x_180_over_pi, xp2, yp1, zn1)); SETFLOAT(at+44, xyz_3_del_damp_theta_phi_calc_azimuth(x_180_over_pi, xp1, yp2, zn1)); SETFLOAT(at+45, xyz_3_del_damp_theta_phi_calc_azimuth(x_180_over_pi, x_0, yp3, zn1)); SETFLOAT(at+46, xyz_3_del_damp_theta_phi_calc_azimuth(x_180_over_pi, xn1, yp2, zn1)); SETFLOAT(at+47, xyz_3_del_damp_theta_phi_calc_azimuth(x_180_over_pi, xn2, yp1, zn1)); SETFLOAT(at+48, xyz_3_del_damp_theta_phi_calc_azimuth(x_180_over_pi, xn3, y_0, zn1)); SETFLOAT(at+49, xyz_3_del_damp_theta_phi_calc_azimuth(x_180_over_pi, xn2, yn1, zn1)); SETFLOAT(at+50, xyz_3_del_damp_theta_phi_calc_azimuth(x_180_over_pi, xn1, yn2, zn1)); SETFLOAT(at+51, xyz_3_del_damp_theta_phi_calc_azimuth(x_180_over_pi, x_0, yn3, zn1)); SETFLOAT(at+52, xyz_3_del_damp_theta_phi_calc_azimuth(x_180_over_pi, xp1, yn2, zn1)); SETFLOAT(at+53, xyz_3_del_damp_theta_phi_calc_azimuth(x_180_over_pi, xp2, yn1, zn1)); SETFLOAT(at+54, xyz_3_del_damp_theta_phi_calc_azimuth(x_180_over_pi, xp2, y_0, zn2)); SETFLOAT(at+55, xyz_3_del_damp_theta_phi_calc_azimuth(x_180_over_pi, xp1, yp1, zn2)); SETFLOAT(at+56, xyz_3_del_damp_theta_phi_calc_azimuth(x_180_over_pi, x_0, yp2, zn2)); SETFLOAT(at+57, xyz_3_del_damp_theta_phi_calc_azimuth(x_180_over_pi, xn1, yp1, zn2)); SETFLOAT(at+58, xyz_3_del_damp_theta_phi_calc_azimuth(x_180_over_pi, xn2, y_0, zn2)); SETFLOAT(at+59, xyz_3_del_damp_theta_phi_calc_azimuth(x_180_over_pi, xn1, yn1, zn2)); SETFLOAT(at+60, xyz_3_del_damp_theta_phi_calc_azimuth(x_180_over_pi, x_0, yn2, zn2)); SETFLOAT(at+61, xyz_3_del_damp_theta_phi_calc_azimuth(x_180_over_pi, xp1, yn1, zn2)); SETFLOAT(at+62, xyz_3_del_damp_theta_phi_calc_azimuth(x_180_over_pi, xp1, y_0, zn3)); SETFLOAT(at+63, xyz_3_del_damp_theta_phi_calc_azimuth(x_180_over_pi, x_0, yp1, zn3)); SETFLOAT(at+64, xyz_3_del_damp_theta_phi_calc_azimuth(x_180_over_pi, xn1, y_0, zn3)); SETFLOAT(at+65, xyz_3_del_damp_theta_phi_calc_azimuth(x_180_over_pi, x_0, yn1, zn3)); SETFLOAT(at+66, xyz_3_del_damp_theta_phi_calc_azimuth(x_180_over_pi, x_0, y_0, zn4)); outlet_anything(x->x_obj.ob_outlet, x->x_s_early4, 67, at); } static void xyz_3_del_damp_theta_phi_src_xyz(t_xyz_3_del_damp_theta_phi *x, t_symbol *s, int argc, t_atom *argv) { if((argc >= 3)&&IS_A_FLOAT(argv, 0)&&IS_A_FLOAT(argv, 1)&&IS_A_FLOAT(argv, 2)) { t_float xr2=0.5f*x->x_room_x, yr2=0.5f*x->x_room_y; x->x_src_x = atom_getfloat(argv++); x->x_src_y = atom_getfloat(argv++); x->x_src_z = atom_getfloat(argv); if(x->x_src_x > xr2) x->x_src_x = xr2; if(x->x_src_x < -xr2) x->x_src_x = -xr2; if(x->x_src_y > yr2) x->x_src_y = yr2; if(x->x_src_y < -yr2) x->x_src_y = -yr2; if(x->x_src_z > x->x_room_z) x->x_src_z = x->x_room_z; if(x->x_src_z < 0.0f) x->x_src_z = 0.0f; clock_delay(x->x_clock, 0.0f); } } static void xyz_3_del_damp_theta_phi_head_xyz(t_xyz_3_del_damp_theta_phi *x, t_symbol *s, int argc, t_atom *argv) { if((argc >= 3)&&IS_A_FLOAT(argv, 0)&&IS_A_FLOAT(argv, 1)&&IS_A_FLOAT(argv, 2)) { t_float xr2=0.5f*x->x_room_x, yr2=0.5f*x->x_room_y; x->x_head_x = atom_getfloat(argv++); x->x_head_y = atom_getfloat(argv++); x->x_head_z = atom_getfloat(argv); if(x->x_head_x > xr2) x->x_head_x = xr2; if(x->x_head_x < -xr2) x->x_head_x = -xr2; if(x->x_head_y > yr2) x->x_head_y = yr2; if(x->x_head_y < -yr2) x->x_head_y = -yr2; if(x->x_head_z > x->x_room_z) x->x_head_z = x->x_room_z; if(x->x_head_z < 0.0f) x->x_head_z = 0.0f; clock_delay(x->x_clock, 0.0f); } } static void xyz_3_del_damp_theta_phi_room_xyz(t_xyz_3_del_damp_theta_phi *x, t_symbol *s, int argc, t_atom *argv) { if((argc >= 3)&&IS_A_FLOAT(argv, 0)&&IS_A_FLOAT(argv, 1)&&IS_A_FLOAT(argv, 2)) { t_float xr2=0.0f, yr2=0.0f; x->x_room_x = atom_getfloat(argv++); x->x_room_y = atom_getfloat(argv++); x->x_room_z = atom_getfloat(argv); if(x->x_room_x < 0.5f) x->x_room_x = 0.5f; if(x->x_room_y < 0.5f) x->x_room_y = 0.5f; if(x->x_room_z < 0.5f) x->x_room_z = 0.5f; xr2 = 0.5f*x->x_room_x; yr2 = 0.5f*x->x_room_y; if(x->x_src_x > xr2) x->x_src_x = xr2; if(x->x_src_x < -xr2) x->x_src_x = -xr2; if(x->x_src_y > yr2) x->x_src_y = yr2; if(x->x_src_y < -yr2) x->x_src_y = -yr2; if(x->x_src_z > x->x_room_z) x->x_src_z = x->x_room_z; if(x->x_src_z < 0.0f) x->x_src_z = 0.0f; if(x->x_head_x > xr2) x->x_head_x = xr2; if(x->x_head_x < -xr2) x->x_head_x = -xr2; if(x->x_head_y > yr2) x->x_head_y = yr2; if(x->x_head_y < -yr2) x->x_head_y = -yr2; if(x->x_head_z > x->x_room_z) x->x_head_z = x->x_room_z; if(x->x_head_z < 0.0f) x->x_head_z = 0.0f; clock_delay(x->x_clock, 0.0f); } } static void xyz_3_del_damp_theta_phi_r_min(t_xyz_3_del_damp_theta_phi *x, t_float r_min) { if(r_min < 0.1f) r_min = 0.1f; x->x_r_min = r_min; clock_delay(x->x_clock, 0.0f); } static void xyz_3_del_damp_theta_phi_sonic_speed(t_xyz_3_del_damp_theta_phi *x, t_float speed) { if(speed < 10.0f) speed = 10.0f; if(speed > 2000.0f) speed = 2000.0f; x->x_speed = speed; clock_delay(x->x_clock, 0.0f); } static void xyz_3_del_damp_theta_phi_free(t_xyz_3_del_damp_theta_phi *x) { clock_free(x->x_clock); freebytes(x->x_at, x->x_size_at * sizeof(t_atom)); freebytes(x->x_rad, x->x_size_rad * sizeof(t_float)); } static void *xyz_3_del_damp_theta_phi_new(t_symbol *s, int argc, t_atom *argv) { t_xyz_3_del_damp_theta_phi *x = (t_xyz_3_del_damp_theta_phi *)pd_new(xyz_3_del_damp_theta_phi_class); x->x_room_x = 12.0f; x->x_room_y = 8.0f; x->x_room_z = 4.0f; x->x_head_x = 0.0f; x->x_head_y = 0.0f; x->x_head_z = 1.7f; x->x_src_x = 3.0f; x->x_src_y = 0.5f; x->x_src_z = 2.5f; x->x_r_min = 1.4f; x->x_speed = 340.0f; x->x_s_direct = gensym("direct"); x->x_s_early1 = gensym("early1"); x->x_s_early2 = gensym("early2"); x->x_s_early3 = gensym("early3"); x->x_s_early4 = gensym("early4"); x->x_s_damp = gensym("damp"); x->x_s_del = gensym("del"); x->x_s_theta = gensym("theta"); x->x_s_phi = gensym("phi"); x->x_size_rad = 129; // 1 + 6 + 18 + 38 + 66; 129=1+(1+4)+(4+9)+(9+16)+(16+25)+(9+16)+(4+9)+(1+4)+1 x->x_size_at = 67; // 66 + 1; 66=1+4+8+12+16+12+8+4+1; 38=1+4+8+12+8+4+1 x->x_rad = (t_float *)getbytes(x->x_size_rad * sizeof(t_float)); x->x_at = (t_atom *)getbytes(x->x_size_at * sizeof(t_atom)); outlet_new(&x->x_obj, &s_list); x->x_clock = clock_new(x, (t_method)xyz_3_del_damp_theta_phi_doit); x->x_180_over_pi = (t_float)(180.0 / (4.0 * atan(1.0))); return (x); } void xyz_3_del_damp_theta_phi_setup(void) { xyz_3_del_damp_theta_phi_class = class_new(gensym("xyz_3_del_damp_theta_phi"), (t_newmethod)xyz_3_del_damp_theta_phi_new, (t_method)xyz_3_del_damp_theta_phi_free, sizeof(t_xyz_3_del_damp_theta_phi), 0, A_GIMME, 0); class_addmethod(xyz_3_del_damp_theta_phi_class, (t_method)xyz_3_del_damp_theta_phi_src_xyz, gensym("src_xyz"), A_GIMME, 0); class_addmethod(xyz_3_del_damp_theta_phi_class, (t_method)xyz_3_del_damp_theta_phi_head_xyz, gensym("head_xyz"), A_GIMME, 0); class_addmethod(xyz_3_del_damp_theta_phi_class, (t_method)xyz_3_del_damp_theta_phi_room_xyz, gensym("room_xyz"), A_GIMME, 0); class_addmethod(xyz_3_del_damp_theta_phi_class, (t_method)xyz_3_del_damp_theta_phi_sonic_speed, gensym("sonic_speed"), A_FLOAT, 0); class_addmethod(xyz_3_del_damp_theta_phi_class, (t_method)xyz_3_del_damp_theta_phi_r_min, gensym("r_min"), A_FLOAT, 0); } iem_utils-v0.0.20181004/iem_roomsim/src/block_peak_env~.c0000644000175000017500000001151513355471360023305 0ustar zmoelnigzmoelnig/* For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. iem_roomsim written by Thomas Musil (c) IEM KUG Graz Austria 2002 - 2018 */ #include "m_pd.h" #include "iemlib.h" #include "iem_roomsim.h" /* -------------------------- block_peak_env~ ------------------------------ */ static t_class *block_peak_env_tilde_class; typedef struct _block_peak_env_tilde { t_object x_obj; t_sample *x_begmem; int x_blocksize; t_float x_b; t_float x_scalar_sig_in; } t_block_peak_env_tilde; static void block_peak_env_tilde_clear_mem(t_sample *vec, int n) { int i; for(i=0; i 1.0f) f = 1.0f; x->x_b = (t_float)f; } static void block_peak_env_tilde_ft1(t_block_peak_env_tilde *x, t_floatarg f) { block_peak_env_tilde_float(x, f); } static t_int *block_peak_env_tilde_perform(t_int *w) { // for each freq-bin-index n and for each block-time-index m : y(m,n) = b*y(m,n-1) + a*x(m,n) t_sample *in = (float *)(w[1]); t_sample *out = (float *)(w[2]); t_block_peak_env_tilde *x = (t_block_peak_env_tilde *)(w[3]); int i, n = (t_int)(w[4]); t_sample *old_block, fin=0.0f, gout=0.0f; t_float b=x->x_b; old_block = x->x_begmem; for(i=0; i= gout) out[i] = fin; else out[i] = gout; old_block[i] = out[i]; } return(w+5); } static t_int *block_peak_env_tilde_perf8(t_int *w) { t_sample *in = (float *)(w[1]); t_sample *out = (float *)(w[2]); t_block_peak_env_tilde *x = (t_block_peak_env_tilde *)(w[3]); int i, n = (t_int)(w[4]); t_sample *old_block, fin[8], gout[8]; t_float b=x->x_b; old_block = x->x_begmem; while(n) { fin[0] = in[0]; fin[1] = in[1]; fin[2] = in[2]; fin[3] = in[3]; fin[4] = in[4]; fin[5] = in[5]; fin[6] = in[6]; fin[7] = in[7]; gout[0] = b*old_block[0]; gout[1] = b*old_block[1]; gout[2] = b*old_block[2]; gout[3] = b*old_block[3]; gout[4] = b*old_block[4]; gout[5] = b*old_block[5]; gout[6] = b*old_block[6]; gout[7] = b*old_block[7]; if(fin[0] >= gout[0]) out[0] = fin[0]; else out[0] = gout[0]; if(fin[1] >= gout[1]) out[1] = fin[1]; else out[1] = gout[1]; if(fin[2] >= gout[2]) out[2] = fin[2]; else out[2] = gout[2]; if(fin[3] >= gout[3]) out[3] = fin[3]; else out[3] = gout[3]; if(fin[4] >= gout[4]) out[4] = fin[4]; else out[4] = gout[4]; if(fin[5] >= gout[5]) out[5] = fin[5]; else out[5] = gout[5]; if(fin[6] >= gout[6]) out[6] = fin[6]; else out[6] = gout[6]; if(fin[7] >= gout[7]) out[7] = fin[7]; else out[7] = gout[7]; old_block[0] = out[0]; old_block[1] = out[1]; old_block[2] = out[2]; old_block[3] = out[3]; old_block[4] = out[4]; old_block[5] = out[5]; old_block[6] = out[6]; old_block[7] = out[7]; old_block += 8; in += 8; out += 8; n -= 8; } return(w+5); } static void block_peak_env_tilde_dsp(t_block_peak_env_tilde *x, t_signal **sp) { int n = sp[0]->s_n; if(!x->x_blocksize)/*first time*/ { x->x_begmem = (t_sample *)getbytes(n * sizeof(t_sample)); block_peak_env_tilde_clear_mem(x->x_begmem, n); } else if(x->x_blocksize != n) { x->x_begmem = (t_sample *)resizebytes(x->x_begmem, x->x_blocksize*sizeof(t_sample), n*sizeof(t_sample)); block_peak_env_tilde_clear_mem(x->x_begmem, n); } x->x_blocksize = n; if(n&7) dsp_add(block_peak_env_tilde_perform, 4, sp[0]->s_vec, sp[1]->s_vec, x, sp[0]->s_n); else dsp_add(block_peak_env_tilde_perf8, 4, sp[0]->s_vec, sp[1]->s_vec, x, sp[0]->s_n); } static void *block_peak_env_tilde_new(t_floatarg f) { t_block_peak_env_tilde *x = (t_block_peak_env_tilde *)pd_new(block_peak_env_tilde_class); block_peak_env_tilde_float(x, f); x->x_blocksize = 0; x->x_begmem = (t_sample *)0; outlet_new(&x->x_obj, &s_signal); x->x_scalar_sig_in = (t_float)0.0; inlet_new(&x->x_obj, &x->x_obj.ob_pd, &s_float, gensym("ft1")); return (x); } static void block_peak_env_tilde_free(t_block_peak_env_tilde *x) { if(x->x_begmem) freebytes(x->x_begmem, x->x_blocksize * sizeof(t_sample)); } void block_peak_env_tilde_setup(void) { block_peak_env_tilde_class = class_new(gensym("block_peak_env~"), (t_newmethod)block_peak_env_tilde_new, (t_method)block_peak_env_tilde_free, sizeof(t_block_peak_env_tilde), 0, A_DEFFLOAT, 0); CLASS_MAINSIGNALIN(block_peak_env_tilde_class, t_block_peak_env_tilde, x_scalar_sig_in); class_addmethod(block_peak_env_tilde_class, (t_method)block_peak_env_tilde_dsp, gensym("dsp"), A_CANT, 0); class_addmethod(block_peak_env_tilde_class, (t_method)block_peak_env_tilde_ft1, gensym("ft1"), A_FLOAT, 0); } iem_utils-v0.0.20181004/iem_roomsim/src/makefile_win0000644000175000017500000000202012630366346022347 0ustar zmoelnigzmoelnig all: ..\iem_roomsim.dll VIS_CPP_PATH = "C:\Programme\Microsoft Visual Studio\Vc98" PD_INST_PATH = "C:\Programme\pd" PD_WIN_INCLUDE_PATH = /I. /I$(PD_INST_PATH)\src /I$(VIS_CPP_PATH)\include PD_WIN_C_FLAGS = /nologo /W3 /WX /DMSW /DNT /DPD /DWIN32 /DWINDOWS /Ox -DPA_LITTLE_ENDIAN PD_WIN_L_FLAGS = /nologo PD_WIN_LIB = /NODEFAULTLIB:libc /NODEFAULTLIB:oldnames /NODEFAULTLIB:kernel /NODEFAULTLIB:uuid \ $(VIS_CPP_PATH)\lib\libc.lib \ $(VIS_CPP_PATH)\lib\oldnames.lib \ $(VIS_CPP_PATH)\lib\kernel32.lib \ $(VIS_CPP_PATH)\lib\wsock32.lib \ $(VIS_CPP_PATH)\lib\winmm.lib \ $(PD_INST_PATH)\bin\pthreadVC.lib \ $(PD_INST_PATH)\bin\pd.lib SRC = early_reflections_3d.c \ early_reflections_2d.c \ cart2del_damp_2d.c \ cart2del_damp_3d.c \ iem_roomsim.c OBJ = $(SRC:.c=.obj) .c.obj: cl $(PD_WIN_C_FLAGS) $(PD_WIN_INCLUDE_PATH) /c $*.c ..\iem_roomsim.dll: $(OBJ) link $(PD_WIN_L_FLAGS) /dll /export:iem_roomsim_setup \ /out:..\iem_roomsim.dll $(OBJ) $(PD_WIN_LIB) clean: del *.obj iem_utils-v0.0.20181004/iem_roomsim/src/cart2del_damp_3d.c0000644000175000017500000004465713355471360023251 0ustar zmoelnigzmoelnig/* For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. iem_roomsim written by Thomas Musil (c) IEM KUG Graz Austria 2002 - 2006 */ #include "m_pd.h" #include "iemlib.h" #include /* -------------------------- cart2del_damp_3d ------------------------------ */ /* ** pos. x-Richtung Nase ** pos. y-Richtung Linke Hand ** pos. z-Richtung Scheitel ** Kartesischer Koordinaten-Ursprung liegt in der Mitte des Raums am Boden */ /* Reihenfolge der bundle-sektoren: index delta phi: 1 90 0 2 45 45 3 45 135 4 45 225 5 45 315 6 0 0 7 0 45 8 0 90 9 0 135 10 0 180 11 0 225 12 0 270 13 0 315 14 -45 45 15 -45 135 16 -45 225 17 -45 315 top +x +y 9 +x 15 +y 23 3 14 24 +x 8 22 2 13 +y 10 4 0 1 7 16 5 19 11 +x 21 +y 17 6 20 18 +x +y 12 */ typedef struct _cart2del_damp_3d { t_object x_obj; t_symbol *x_s_direct; t_symbol *x_s_early1; t_symbol *x_s_early2; t_symbol *x_s_del; t_symbol *x_s_damp; t_symbol *x_s_index_theta_phi; t_float x_room_x; t_float x_room_y; t_float x_room_z; t_float x_head_x; t_float x_head_y; t_float x_head_z; t_float x_src_x; t_float x_src_y; t_float x_src_z; t_float x_r_ambi; t_float x_speed; t_float x_180_over_pi; void *x_clock; } t_cart2del_damp_3d; static t_class *cart2del_damp_3d_class; static t_float cart2del_damp_3d_calc_radius(t_floatarg r_ambi, t_floatarg dx, t_floatarg dy, t_floatarg dz) { t_float r = (t_float)sqrt(dx*dx + dy*dy + dz*dz); if(r < r_ambi) return(r_ambi); else return(r); } static t_float cart2del_damp_3d_calc_azimuth(t_floatarg x_180_over_pi, t_floatarg dx, t_floatarg dy, t_floatarg dz) { if(dx == 0.0f) { if(dy < 0.0f) return(270.0f); else return(90.0f); } else if(dx < 0.0f) { return(180.0f + x_180_over_pi * (t_float)atan(dy / dx)); } else { if(dy < 0.0f) return(360.0f + x_180_over_pi * (t_float)atan(dy / dx)); else return(x_180_over_pi * (t_float)atan(dy / dx)); } } static t_float cart2del_damp_3d_calc_elevation(t_floatarg x_180_over_pi, t_floatarg dx, t_floatarg dy, t_floatarg dz) { t_float dxy = sqrt(dx*dx + dy*dy); if(dxy == 0.0f) { if(dz < 0.0f) return(-90.0f); else return(90.0f); } else { return(x_180_over_pi * (t_float)atan(dz / dxy)); } } static void cart2del_damp_3d_doit(t_cart2del_damp_3d *x) { t_float diff_x, diff_y, diff_z; t_float sum_x, sum_y, sum_z; t_float lx, wy, hz; t_float x0, y0_, z0; t_float xp1, yp1, zp1; t_float xn1, yn1, zn1; t_float xp2, yp2, zp2; t_float xn2, yn2, zn2; t_float m2ms = 1000.0f / x->x_speed; t_float x_180_over_pi=x->x_180_over_pi; t_float r_ambi = x->x_r_ambi; t_float rad[30]; t_atom at[30]; lx = x->x_room_x; wy = x->x_room_y; hz = x->x_room_z; diff_x = x->x_src_x - x->x_head_x; diff_y = x->x_src_y - x->x_head_y; diff_z = x->x_src_z - x->x_head_z; sum_x = x->x_src_x + x->x_head_x; sum_y = x->x_src_y + x->x_head_y; sum_z = x->x_src_z + x->x_head_z - hz; x0 = diff_x; y0_ = diff_y; z0 = diff_z; xp1 = lx - sum_x; yp1 = wy - sum_y; zp1 = hz - sum_z; xn1 = -lx - sum_x; yn1 = -wy - sum_y; zn1 = -hz - sum_z; xp2 = 2.0f*lx + diff_x; yp2 = 2.0f*wy + diff_y; zp2 = 2.0f*hz + diff_z; xn2 = -2.0f*lx + diff_x; yn2 = -2.0f*wy + diff_y; zn2 = -2.0f*hz + diff_z; rad[0] = cart2del_damp_3d_calc_radius(r_ambi, x0, y0_, z0); rad[1] = cart2del_damp_3d_calc_radius(r_ambi, xp1, y0_, z0); rad[2] = cart2del_damp_3d_calc_radius(r_ambi, x0, yp1, z0); rad[3] = cart2del_damp_3d_calc_radius(r_ambi, x0, y0_, zp1); rad[4] = cart2del_damp_3d_calc_radius(r_ambi, xn1, y0_, z0); rad[5] = cart2del_damp_3d_calc_radius(r_ambi, x0, yn1, z0); rad[6] = cart2del_damp_3d_calc_radius(r_ambi, x0, y0_, zn1); rad[7] = cart2del_damp_3d_calc_radius(r_ambi, xp2, y0_, z0); rad[8] = cart2del_damp_3d_calc_radius(r_ambi, x0, yp2, z0); rad[9] = cart2del_damp_3d_calc_radius(r_ambi, x0, y0_, zp2); rad[10] = cart2del_damp_3d_calc_radius(r_ambi, xn2, y0_, z0); rad[11] = cart2del_damp_3d_calc_radius(r_ambi, x0, yn2, z0); rad[12] = cart2del_damp_3d_calc_radius(r_ambi, x0, y0_, zn2); rad[13] = cart2del_damp_3d_calc_radius(r_ambi, xp1, yp1, z0); rad[14] = cart2del_damp_3d_calc_radius(r_ambi, xp1, y0_, zp1); rad[15] = cart2del_damp_3d_calc_radius(r_ambi, x0, yp1, zp1); rad[16] = cart2del_damp_3d_calc_radius(r_ambi, xn1, yn1, z0); rad[17] = cart2del_damp_3d_calc_radius(r_ambi, xn1, y0_, zn1); rad[18] = cart2del_damp_3d_calc_radius(r_ambi, x0, yn1, zn1); rad[19] = cart2del_damp_3d_calc_radius(r_ambi, xp1, yn1, z0); rad[20] = cart2del_damp_3d_calc_radius(r_ambi, xp1, y0_, zn1); rad[21] = cart2del_damp_3d_calc_radius(r_ambi, x0, yp1, zn1); rad[22] = cart2del_damp_3d_calc_radius(r_ambi, xn1, yp1, z0); rad[23] = cart2del_damp_3d_calc_radius(r_ambi, xn1, y0_, zp1); rad[24] = cart2del_damp_3d_calc_radius(r_ambi, x0, yn1, zp1); /* delay-reihenfolge: 0 auslassen, +1x, +1y, +1z, -1x, -1y, -1z +2x, +2y, +2z, -2x, -2y, -2z +1x+1y, +1x+1z, +1y+1z -1x-1y, -1x-1z, -1y-1z +1x-1y, +1x-1z, +1y-1z -1x+1y, -1x+1z, -1y+1z */ SETSYMBOL(at, x->x_s_del); SETFLOAT(at+1, rad[0] * m2ms); outlet_anything(x->x_obj.ob_outlet, x->x_s_direct, 2, at); SETFLOAT(at+1, rad[1] *m2ms); SETFLOAT(at+2, rad[2] *m2ms); SETFLOAT(at+3, rad[3] *m2ms); SETFLOAT(at+4, rad[4] *m2ms); SETFLOAT(at+5, rad[5] *m2ms); SETFLOAT(at+6, rad[6] *m2ms); outlet_anything(x->x_obj.ob_outlet, x->x_s_early1, 7, at); SETFLOAT(at+1, rad[7] *m2ms); SETFLOAT(at+2, rad[8] *m2ms); SETFLOAT(at+3, rad[9] *m2ms); SETFLOAT(at+4, rad[10] *m2ms); SETFLOAT(at+5, rad[11] *m2ms); SETFLOAT(at+6, rad[12] *m2ms); SETFLOAT(at+7, rad[13] *m2ms); SETFLOAT(at+8, rad[14] *m2ms); SETFLOAT(at+9, rad[15] *m2ms); SETFLOAT(at+10, rad[16] *m2ms); SETFLOAT(at+11, rad[17] *m2ms); SETFLOAT(at+12, rad[18] *m2ms); SETFLOAT(at+13, rad[19] *m2ms); SETFLOAT(at+14, rad[20] *m2ms); SETFLOAT(at+15, rad[21] *m2ms); SETFLOAT(at+16, rad[22] *m2ms); SETFLOAT(at+17, rad[23] *m2ms); SETFLOAT(at+18, rad[24] *m2ms); outlet_anything(x->x_obj.ob_outlet, x->x_s_early2, 19, at); /* daempfungs-reihenfolge: 0, +1x, +1y, +1z, -1x, -1y, -1z +2x, +2y, +2z, -2x, -2y, -2z +1x+1y, +1x+1z, +1y+1z -1x-1y, -1x-1z, -1y-1z +1x-1y, +1x-1z, +1y-1z -1x+1y, -1x+1z, -1y+1z */ SETSYMBOL(at, x->x_s_damp); SETFLOAT(at+1, r_ambi / rad[0]); outlet_anything(x->x_obj.ob_outlet, x->x_s_direct, 2, at); SETFLOAT(at+1, r_ambi / rad[1]); SETFLOAT(at+2, r_ambi / rad[2]); SETFLOAT(at+3, r_ambi / rad[3]); SETFLOAT(at+4, r_ambi / rad[4]); SETFLOAT(at+5, r_ambi / rad[5]); SETFLOAT(at+6, r_ambi / rad[6]); outlet_anything(x->x_obj.ob_outlet, x->x_s_early1, 7, at); SETFLOAT(at+1, r_ambi / rad[7]); SETFLOAT(at+2, r_ambi / rad[8]); SETFLOAT(at+3, r_ambi / rad[9]); SETFLOAT(at+4, r_ambi / rad[10]); SETFLOAT(at+5, r_ambi / rad[11]); SETFLOAT(at+6, r_ambi / rad[12]); SETFLOAT(at+7, r_ambi / rad[13]); SETFLOAT(at+8, r_ambi / rad[14]); SETFLOAT(at+9, r_ambi / rad[15]); SETFLOAT(at+10, r_ambi / rad[16]); SETFLOAT(at+11, r_ambi / rad[17]); SETFLOAT(at+12, r_ambi / rad[18]); SETFLOAT(at+13, r_ambi / rad[19]); SETFLOAT(at+14, r_ambi / rad[20]); SETFLOAT(at+15, r_ambi / rad[21]); SETFLOAT(at+16, r_ambi / rad[22]); SETFLOAT(at+17, r_ambi / rad[23]); SETFLOAT(at+18, r_ambi / rad[24]); outlet_anything(x->x_obj.ob_outlet, x->x_s_early2, 19, at); /* encoder-winkel-reihenfolge: index delta phi 0, +1x, +1y, +1z, -1x, -1y, -1z +2x, +2y, +2z, -2x, -2y, -2z +1x+1y, +1x+1z, +1y+1z -1x-1y, -1x-1z, -1y-1z +1x-1y, +1x-1z, +1y-1z -1x+1y, -1x+1z, -1y+1z */ SETSYMBOL(at, x->x_s_index_theta_phi); SETFLOAT(at+1, 1.0f); SETFLOAT(at+2, cart2del_damp_3d_calc_elevation(x_180_over_pi, x0, y0_, z0)); SETFLOAT(at+3, cart2del_damp_3d_calc_azimuth(x_180_over_pi, x0, y0_, z0)); outlet_anything(x->x_obj.ob_outlet, x->x_s_direct, 4, at); SETFLOAT(at+1, 1.0f); SETFLOAT(at+2, cart2del_damp_3d_calc_elevation(x_180_over_pi, xp1, y0_, z0)); SETFLOAT(at+3, cart2del_damp_3d_calc_azimuth(x_180_over_pi, xp1, y0_, z0)); outlet_anything(x->x_obj.ob_outlet, x->x_s_early1, 4, at); SETFLOAT(at+1, 2.0f); SETFLOAT(at+2, cart2del_damp_3d_calc_elevation(x_180_over_pi, x0, yp1, z0)); SETFLOAT(at+3, cart2del_damp_3d_calc_azimuth(x_180_over_pi, x0, yp1, z0)); outlet_anything(x->x_obj.ob_outlet, x->x_s_early1, 4, at); SETFLOAT(at+1, 3.0f); SETFLOAT(at+2, cart2del_damp_3d_calc_elevation(x_180_over_pi, x0, y0_, zp1)); SETFLOAT(at+3, cart2del_damp_3d_calc_azimuth(x_180_over_pi, x0, y0_, zp1)); outlet_anything(x->x_obj.ob_outlet, x->x_s_early1, 4, at); SETFLOAT(at+1, 4.0f); SETFLOAT(at+2, cart2del_damp_3d_calc_elevation(x_180_over_pi, xn1, y0_, z0)); SETFLOAT(at+3, cart2del_damp_3d_calc_azimuth(x_180_over_pi, xn1, y0_, z0)); outlet_anything(x->x_obj.ob_outlet, x->x_s_early1, 4, at); SETFLOAT(at+1, 5.0f); SETFLOAT(at+2, cart2del_damp_3d_calc_elevation(x_180_over_pi, x0, yn1, z0)); SETFLOAT(at+3, cart2del_damp_3d_calc_azimuth(x_180_over_pi, x0, yn1, z0)); outlet_anything(x->x_obj.ob_outlet, x->x_s_early1, 4, at); SETFLOAT(at+1, 6.0f); SETFLOAT(at+2, cart2del_damp_3d_calc_elevation(x_180_over_pi, x0, y0_, zn1)); SETFLOAT(at+3, cart2del_damp_3d_calc_azimuth(x_180_over_pi, x0, y0_, zn1)); outlet_anything(x->x_obj.ob_outlet, x->x_s_early1, 4, at); SETFLOAT(at+1, 1.0f); SETFLOAT(at+2, cart2del_damp_3d_calc_elevation(x_180_over_pi, xp2, y0_, z0)); SETFLOAT(at+3, cart2del_damp_3d_calc_azimuth(x_180_over_pi, xp2, y0_, z0)); outlet_anything(x->x_obj.ob_outlet, x->x_s_early2, 4, at); SETFLOAT(at+1, 2.0f); SETFLOAT(at+2, cart2del_damp_3d_calc_elevation(x_180_over_pi, x0, yp2, z0)); SETFLOAT(at+3, cart2del_damp_3d_calc_azimuth(x_180_over_pi, x0, yp2, z0)); outlet_anything(x->x_obj.ob_outlet, x->x_s_early2, 4, at); SETFLOAT(at+1, 3.0f); SETFLOAT(at+2, cart2del_damp_3d_calc_elevation(x_180_over_pi, x0, y0_, zp2)); SETFLOAT(at+3, cart2del_damp_3d_calc_azimuth(x_180_over_pi, x0, y0_, zp2)); outlet_anything(x->x_obj.ob_outlet, x->x_s_early2, 4, at); SETFLOAT(at+1, 4.0f); SETFLOAT(at+2, cart2del_damp_3d_calc_elevation(x_180_over_pi, xn2, y0_, z0)); SETFLOAT(at+3, cart2del_damp_3d_calc_azimuth(x_180_over_pi, xn2, y0_, z0)); outlet_anything(x->x_obj.ob_outlet, x->x_s_early2, 4, at); SETFLOAT(at+1, 5.0f); SETFLOAT(at+2, cart2del_damp_3d_calc_elevation(x_180_over_pi, x0, yn2, z0)); SETFLOAT(at+3, cart2del_damp_3d_calc_azimuth(x_180_over_pi, x0, yn2, z0)); outlet_anything(x->x_obj.ob_outlet, x->x_s_early2, 4, at); SETFLOAT(at+1, 6.0f); SETFLOAT(at+2, cart2del_damp_3d_calc_elevation(x_180_over_pi, x0, y0_, zn2)); SETFLOAT(at+3, cart2del_damp_3d_calc_azimuth(x_180_over_pi, x0, y0_, zn2)); outlet_anything(x->x_obj.ob_outlet, x->x_s_early2, 4, at); SETFLOAT(at+1, 7.0f); SETFLOAT(at+2, cart2del_damp_3d_calc_elevation(x_180_over_pi, xp1, yp1, z0)); SETFLOAT(at+3, cart2del_damp_3d_calc_azimuth(x_180_over_pi, xp1, yp1, z0)); outlet_anything(x->x_obj.ob_outlet, x->x_s_early2, 4, at); SETFLOAT(at+1, 8.0f); SETFLOAT(at+2, cart2del_damp_3d_calc_elevation(x_180_over_pi, xp1, y0_, zp1)); SETFLOAT(at+3, cart2del_damp_3d_calc_azimuth(x_180_over_pi, xp1, y0_, zp1)); outlet_anything(x->x_obj.ob_outlet, x->x_s_early2, 4, at); SETFLOAT(at+1, 9.0f); SETFLOAT(at+2, cart2del_damp_3d_calc_elevation(x_180_over_pi, x0, yp1, zp1)); SETFLOAT(at+3, cart2del_damp_3d_calc_azimuth(x_180_over_pi, x0, yp1, zp1)); outlet_anything(x->x_obj.ob_outlet, x->x_s_early2, 4, at); SETFLOAT(at+1, 10.0f); SETFLOAT(at+2, cart2del_damp_3d_calc_elevation(x_180_over_pi, xn1, yn1, z0)); SETFLOAT(at+3, cart2del_damp_3d_calc_azimuth(x_180_over_pi, xn1, yn1, z0)); outlet_anything(x->x_obj.ob_outlet, x->x_s_early2, 4, at); SETFLOAT(at+1, 11.0f); SETFLOAT(at+2, cart2del_damp_3d_calc_elevation(x_180_over_pi, xn1, y0_, zn1)); SETFLOAT(at+3, cart2del_damp_3d_calc_azimuth(x_180_over_pi, xn1, y0_, zn1)); outlet_anything(x->x_obj.ob_outlet, x->x_s_early2, 4, at); SETFLOAT(at+1, 12.0f); SETFLOAT(at+2, cart2del_damp_3d_calc_elevation(x_180_over_pi, x0, yn1, zn1)); SETFLOAT(at+3, cart2del_damp_3d_calc_azimuth(x_180_over_pi, x0, yn1, zn1)); outlet_anything(x->x_obj.ob_outlet, x->x_s_early2, 4, at); SETFLOAT(at+1, 13.0f); SETFLOAT(at+2, cart2del_damp_3d_calc_elevation(x_180_over_pi, xp1, yn1, z0)); SETFLOAT(at+3, cart2del_damp_3d_calc_azimuth(x_180_over_pi, xp1, yn1, z0)); outlet_anything(x->x_obj.ob_outlet, x->x_s_early2, 4, at); SETFLOAT(at+1, 14.0f); SETFLOAT(at+2, cart2del_damp_3d_calc_elevation(x_180_over_pi, xp1, y0_, zn1)); SETFLOAT(at+3, cart2del_damp_3d_calc_azimuth(x_180_over_pi, xp1, y0_, zn1)); outlet_anything(x->x_obj.ob_outlet, x->x_s_early2, 4, at); SETFLOAT(at+1, 15.0f); SETFLOAT(at+2, cart2del_damp_3d_calc_elevation(x_180_over_pi, x0, yp1, zn1)); SETFLOAT(at+3, cart2del_damp_3d_calc_azimuth(x_180_over_pi, x0, yp1, zn1)); outlet_anything(x->x_obj.ob_outlet, x->x_s_early2, 4, at); SETFLOAT(at+1, 16.0f); SETFLOAT(at+2, cart2del_damp_3d_calc_elevation(x_180_over_pi, xn1, yp1, z0)); SETFLOAT(at+3, cart2del_damp_3d_calc_azimuth(x_180_over_pi, xn1, yp1, z0)); outlet_anything(x->x_obj.ob_outlet, x->x_s_early2, 4, at); SETFLOAT(at+1, 17.0f); SETFLOAT(at+2, cart2del_damp_3d_calc_elevation(x_180_over_pi, xn1, y0_, zp1)); SETFLOAT(at+3, cart2del_damp_3d_calc_azimuth(x_180_over_pi, xn1, y0_, zp1)); outlet_anything(x->x_obj.ob_outlet, x->x_s_early2, 4, at); SETFLOAT(at+1, 18.0f); SETFLOAT(at+2, cart2del_damp_3d_calc_elevation(x_180_over_pi, x0, yn1, zp1)); SETFLOAT(at+3, cart2del_damp_3d_calc_azimuth(x_180_over_pi, x0, yn1, zp1)); outlet_anything(x->x_obj.ob_outlet, x->x_s_early2, 4, at); } static void cart2del_damp_3d_src_xyz(t_cart2del_damp_3d *x, t_symbol *s, int argc, t_atom *argv) { if((argc >= 3)&&IS_A_FLOAT(argv, 0)&&IS_A_FLOAT(argv, 1)&&IS_A_FLOAT(argv, 2)) { t_float xr2=0.5f*x->x_room_x, yr2=0.5f*x->x_room_y; x->x_src_x = atom_getfloat(argv++); x->x_src_y = atom_getfloat(argv++); x->x_src_z = atom_getfloat(argv); if(x->x_src_x > xr2) x->x_src_x = xr2; if(x->x_src_x < -xr2) x->x_src_x = -xr2; if(x->x_src_y > yr2) x->x_src_y = yr2; if(x->x_src_y < -yr2) x->x_src_y = -yr2; if(x->x_src_z > x->x_room_z) x->x_src_z = x->x_room_z; if(x->x_src_z < 0.0f) x->x_src_z = 0.0f; clock_delay(x->x_clock, 0.0f); } } static void cart2del_damp_3d_head_xyz(t_cart2del_damp_3d *x, t_symbol *s, int argc, t_atom *argv) { if((argc >= 3)&&IS_A_FLOAT(argv, 0)&&IS_A_FLOAT(argv, 1)&&IS_A_FLOAT(argv, 2)) { t_float xr2=0.5f*x->x_room_x, yr2=0.5f*x->x_room_y; x->x_head_x = atom_getfloat(argv++); x->x_head_y = atom_getfloat(argv++); x->x_head_z = atom_getfloat(argv); if(x->x_head_x > xr2) x->x_head_x = xr2; if(x->x_head_x < -xr2) x->x_head_x = -xr2; if(x->x_head_y > yr2) x->x_head_y = yr2; if(x->x_head_y < -yr2) x->x_head_y = -yr2; if(x->x_head_z > x->x_room_z) x->x_head_z = x->x_room_z; if(x->x_head_z < 0.0f) x->x_head_z = 0.0f; clock_delay(x->x_clock, 0.0f); } } static void cart2del_damp_3d_room_dim(t_cart2del_damp_3d *x, t_symbol *s, int argc, t_atom *argv) { if((argc >= 3)&&IS_A_FLOAT(argv, 0)&&IS_A_FLOAT(argv, 1)&&IS_A_FLOAT(argv, 2)) { x->x_room_x = atom_getfloat(argv++); x->x_room_y = atom_getfloat(argv++); x->x_room_z = atom_getfloat(argv); if(x->x_room_x < 0.5f) x->x_room_x = 0.5f; if(x->x_room_y < 0.5f) x->x_room_y = 0.5f; if(x->x_room_z < 0.5f) x->x_room_z = 0.5f; clock_delay(x->x_clock, 0.0f); } } static void cart2del_damp_3d_r_ambi(t_cart2del_damp_3d *x, t_floatarg r_ambi) { if(r_ambi < 0.1f) r_ambi = 0.1f; x->x_r_ambi = r_ambi; clock_delay(x->x_clock, 0.0f); } static void cart2del_damp_3d_sonic_speed(t_cart2del_damp_3d *x, t_floatarg speed) { if(speed < 10.0f) speed = 10.0f; if(speed > 2000.0f) speed = 2000.0f; x->x_speed = speed; clock_delay(x->x_clock, 0.0f); } static void cart2del_damp_3d_free(t_cart2del_damp_3d *x) { clock_free(x->x_clock); } static void *cart2del_damp_3d_new(t_symbol *s, int argc, t_atom *argv) { t_cart2del_damp_3d *x = (t_cart2del_damp_3d *)pd_new(cart2del_damp_3d_class); x->x_room_x = 12.0f; x->x_room_y = 8.0f; x->x_room_z = 4.0f; x->x_head_x = 0.0f; x->x_head_y = 0.0f; x->x_head_z = 1.7f; x->x_src_x = 3.0f; x->x_src_y = 0.5f; x->x_src_z = 2.5f; x->x_r_ambi = 1.4f; x->x_speed = 340.0f; x->x_s_direct = gensym("direct"); x->x_s_early1 = gensym("early1"); x->x_s_early2 = gensym("early2"); x->x_s_del = gensym("del"); x->x_s_damp = gensym("damp"); x->x_s_index_theta_phi = gensym("index_theta_phi"); outlet_new(&x->x_obj, &s_list); x->x_clock = clock_new(x, (t_method)cart2del_damp_3d_doit); x->x_180_over_pi = (t_float)(180.0 / (4.0 * atan(1.0))); return (x); } void cart2del_damp_3d_setup(void) { cart2del_damp_3d_class = class_new(gensym("cart2del_damp_3d"), (t_newmethod)cart2del_damp_3d_new, (t_method)cart2del_damp_3d_free, sizeof(t_cart2del_damp_3d), 0, A_GIMME, 0); class_addmethod(cart2del_damp_3d_class, (t_method)cart2del_damp_3d_src_xyz, gensym("src_xyz"), A_GIMME, 0); class_addmethod(cart2del_damp_3d_class, (t_method)cart2del_damp_3d_head_xyz, gensym("head_xyz"), A_GIMME, 0); class_addmethod(cart2del_damp_3d_class, (t_method)cart2del_damp_3d_room_dim, gensym("room_dim"), A_GIMME, 0); class_addmethod(cart2del_damp_3d_class, (t_method)cart2del_damp_3d_sonic_speed, gensym("sonic_speed"), A_FLOAT, 0); class_addmethod(cart2del_damp_3d_class, (t_method)cart2del_damp_3d_r_ambi, gensym("r_ambi"), A_FLOAT, 0); // class_sethelpsymbol(cart2del_damp_3d_class, gensym("iemhelp2/cart2del_damp_3d-help")); } iem_utils-v0.0.20181004/iem_roomsim/src/iem_roomsim.sln0000644000175000017500000000157013355471360023036 0ustar zmoelnigzmoelnig Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 2012 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "iem_roomsim", "iem_roomsim.vcxproj", "{3446FCA3-769E-4EFC-8B8C-CF16D637040A}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Win32 = Debug|Win32 Release|Win32 = Release|Win32 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {3446FCA3-769E-4EFC-8B8C-CF16D637040A}.Debug|Win32.ActiveCfg = Debug|Win32 {3446FCA3-769E-4EFC-8B8C-CF16D637040A}.Debug|Win32.Build.0 = Debug|Win32 {3446FCA3-769E-4EFC-8B8C-CF16D637040A}.Release|Win32.ActiveCfg = Release|Win32 {3446FCA3-769E-4EFC-8B8C-CF16D637040A}.Release|Win32.Build.0 = Release|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection EndGlobal iem_utils-v0.0.20181004/iem_roomsim/src/early_reflections_3d.c0000644000175000017500000006501713355471360024252 0ustar zmoelnigzmoelnig/* For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. iem_roomsim written by Thomas Musil (c) IEM KUG Graz Austria 2002 - 2006 */ #include "m_pd.h" #include "iemlib.h" #include /* -------------------------- early_reflections_3d ------------------------------ */ /* ** pos. x-Richtung Nase ** pos. y-Richtung Linke Hand ** pos. z-Richtung Scheitel ** Kartesischer Koordinaten-Ursprung liegt in der Mitte des Raums am Boden */ /* Reihenfolge der bundle-sektoren: index delta phi: 1 90 0 2 45 45 3 45 135 4 45 225 5 45 315 6 0 0 7 0 45 8 0 90 9 0 135 10 0 180 11 0 225 12 0 270 13 0 315 14 -45 45 15 -45 135 16 -45 225 17 -45 315 top +x +y 9 +x 15 +y 23 3 14 24 +x 8 22 2 13 +y 10 4 0 1 7 16 5 19 11 +x 21 +y 17 6 20 18 +x +y 12 */ typedef struct _early_reflections_3d { t_object x_obj; t_atom x_para_at[27]; void *x_direct_out; void *x_early_out; void *x_rev_out; t_symbol *x_s_del0; t_symbol *x_s_del1; t_symbol *x_s_del2; t_symbol *x_s_damp; t_symbol *x_s_index_delta_phi; t_symbol *x_s_bundle; t_float x_room_x; t_float x_room_y; t_float x_room_z; t_float x_head_x; t_float x_head_y; t_float x_head_z; int x_n_src; int x_bundle; t_float x_src_x[30]; t_float x_src_y[30]; t_float x_src_z[30]; t_float x_r_ambi; t_float x_speed; t_float x_180_over_pi; } t_early_reflections_3d; static t_class *early_reflections_3d_class; static t_float early_reflections_3d_calc_radius(t_floatarg r_ambi, t_floatarg dx, t_floatarg dy, t_floatarg dz) { t_float r = (t_float)sqrt(dx*dx + dy*dy + dz*dz); if(r < r_ambi) return(r_ambi); else return(r); } static t_float early_reflections_3d_calc_azimuth(t_floatarg x_180_over_pi, t_floatarg dx, t_floatarg dy, t_floatarg dz) { if(dx == 0.0f) { if(dy < 0.0f) return(270.0f); else return(90.0f); } else if(dx < 0.0f) { return(180.0f + x_180_over_pi * (t_float)atan(dy / dx)); } else { if(dy < 0.0f) return(360.0f + x_180_over_pi * (t_float)atan(dy / dx)); else return(x_180_over_pi * (t_float)atan(dy / dx)); } } static t_float early_reflections_3d_calc_elevation(t_floatarg x_180_over_pi, t_floatarg dx, t_floatarg dy, t_floatarg dz)/*changes*/ { t_float dxy = sqrt(dx*dx + dy*dy); if(dxy == 0.0f) { if(dz < 0.0f) return(-90.0f); else return(90.0f); } else { return(x_180_over_pi * (t_float)atan(dz / dxy)); } } static t_float early_reflections_3d_calc_bundle_index(t_floatarg delta, t_floatarg phi)/*changes*/ { if(delta > 67.5f) return(1.0f); else if(delta > 22.5f) { if(phi <= 180.0f) { if(phi <= 90.0f) return(2.0f); else return(3.0f); } else { if(phi <= 270.0f) return(4.0f); else return(5.0f); } } else if(delta > -22.5f) { phi += 22.5f; if(phi >= 360.0f) phi -= 360.0f; if(phi <= 180.0f) { if(phi <= 90.0f) { if(phi <= 45.0f)/* 0 .. 45 */ return(6.0f); else return(7.0f); } else { if(phi <= 135.0f) return(8.0f); else return(9.0f); } } else { if(phi <= 270.0f) { if(phi <= 225.0f) return(10.0f); else return(11.0f); } else { if(phi <= 315.0f)/* 270 .. 315 */ return(12.0f); else return(13.0f);/* 315 .. 360 */ } } } else { if(phi <= 180.0f) { if(phi <= 90.0f) return(14.0f); else return(15.0f); } else { if(phi <= 270.0f) return(16.0f); else return(17.0f); } } } static void early_reflections_3d_doit(t_early_reflections_3d *x) { t_atom *at; t_float diff_x, diff_y, diff_z; t_float sum_x, sum_y, sum_z; t_float lx, wy, hz; t_float x0, y0_, z0; t_float xp1, yp1, zp1; t_float xn1, yn1, zn1; t_float xp2, yp2, zp2; t_float xn2, yn2, zn2; t_float m2ms = 1000.0f / x->x_speed; t_float x_180_over_pi=x->x_180_over_pi; t_float r_ambi = x->x_r_ambi; t_float rad[50], delta[50], phi[50]; int n_src=x->x_n_src; int i; /*t_float hz2 = 0.5f*x->x_room_z; diff_x = x->x_src_x - x->x_head_x; diff_y = x->x_src_y - x->x_head_y; diff_z = (x->x_src_z - hz2) - (x->x_head_z - hz2); sum_x = x->x_src_x + x->x_head_x; sum_y = x->x_src_y + x->x_head_y; sum_z = (x->x_src_z - hz2) + (x->x_head_z - hz2);*/ lx = x->x_room_x; wy = x->x_room_y; hz = x->x_room_z; SETFLOAT(x->x_para_at, early_reflections_3d_calc_radius(r_ambi, lx, wy, hz)*m2ms); outlet_anything(x->x_rev_out, x->x_s_del0, 1, x->x_para_at); for(i=0; ix_src_x[i] - x->x_head_x; diff_y = x->x_src_y[i] - x->x_head_y; diff_z = x->x_src_z[i] - x->x_head_z; sum_x = x->x_src_x[i] + x->x_head_x; sum_y = x->x_src_y[i] + x->x_head_y; sum_z = x->x_src_z[i] + x->x_head_z - hz; x0 = diff_x; y0_ = diff_y; z0 = diff_z; xp1 = lx - sum_x; yp1 = wy - sum_y; zp1 = hz - sum_z; xn1 = -lx - sum_x; yn1 = -wy - sum_y; zn1 = -hz - sum_z; xp2 = 2.0f*lx + diff_x; yp2 = 2.0f*wy + diff_y; zp2 = 2.0f*hz + diff_z; xn2 = -2.0f*lx + diff_x; yn2 = -2.0f*wy + diff_y; zn2 = -2.0f*hz + diff_z; rad[0] = early_reflections_3d_calc_radius(r_ambi, x0, y0_, z0); rad[1] = early_reflections_3d_calc_radius(r_ambi, xp1, y0_, z0); rad[2] = early_reflections_3d_calc_radius(r_ambi, x0, yp1, z0); rad[3] = early_reflections_3d_calc_radius(r_ambi, x0, y0_, zp1); rad[4] = early_reflections_3d_calc_radius(r_ambi, xn1, y0_, z0); rad[5] = early_reflections_3d_calc_radius(r_ambi, x0, yn1, z0); rad[6] = early_reflections_3d_calc_radius(r_ambi, x0, y0_, zn1); rad[7] = early_reflections_3d_calc_radius(r_ambi, xp2, y0_, z0); rad[8] = early_reflections_3d_calc_radius(r_ambi, x0, yp2, z0); rad[9] = early_reflections_3d_calc_radius(r_ambi, x0, y0_, zp2); rad[10] = early_reflections_3d_calc_radius(r_ambi, xn2, y0_, z0); rad[11] = early_reflections_3d_calc_radius(r_ambi, x0, yn2, z0); rad[12] = early_reflections_3d_calc_radius(r_ambi, x0, y0_, zn2); rad[13] = early_reflections_3d_calc_radius(r_ambi, xp1, yp1, z0); rad[14] = early_reflections_3d_calc_radius(r_ambi, xp1, y0_, zp1); rad[15] = early_reflections_3d_calc_radius(r_ambi, x0, yp1, zp1); rad[16] = early_reflections_3d_calc_radius(r_ambi, xn1, yn1, z0); rad[17] = early_reflections_3d_calc_radius(r_ambi, xn1, y0_, zn1); rad[18] = early_reflections_3d_calc_radius(r_ambi, x0, yn1, zn1); rad[19] = early_reflections_3d_calc_radius(r_ambi, xp1, yn1, z0); rad[20] = early_reflections_3d_calc_radius(r_ambi, xp1, y0_, zn1); rad[21] = early_reflections_3d_calc_radius(r_ambi, x0, yp1, zn1); rad[22] = early_reflections_3d_calc_radius(r_ambi, xn1, yp1, z0); rad[23] = early_reflections_3d_calc_radius(r_ambi, xn1, y0_, zp1); rad[24] = early_reflections_3d_calc_radius(r_ambi, x0, yn1, zp1); /* delay-reihenfolge: 0 auslassen, +1x, +1y, +1z, -1x, -1y, -1z +2x, +2y, +2z, -2x, -2y, -2z +1x+1y, +1x+1z, +1y+1z -1x-1y, -1x-1z, -1y-1z +1x-1y, +1x-1z, +1y-1z -1x+1y, -1x+1z, -1y+1z */ at = x->x_para_at; SETFLOAT(at, (t_float)(i+1));/*changes*/ at++; SETFLOAT(at, rad[0] * m2ms); outlet_anything(x->x_direct_out, x->x_s_del0, 2, x->x_para_at); at = x->x_para_at+1; SETFLOAT(at, rad[1] *m2ms); at++; SETFLOAT(at, rad[2] *m2ms); at++; SETFLOAT(at, rad[3] *m2ms); at++; SETFLOAT(at, rad[4] *m2ms); at++; SETFLOAT(at, rad[5] *m2ms); at++; SETFLOAT(at, rad[6] *m2ms); outlet_anything(x->x_early_out, x->x_s_del1, 7, x->x_para_at); at = x->x_para_at+1; SETFLOAT(at, rad[7] *m2ms); at++; SETFLOAT(at, rad[8] *m2ms); at++; SETFLOAT(at, rad[9] *m2ms); at++; SETFLOAT(at, rad[10] *m2ms); at++; SETFLOAT(at, rad[11] *m2ms); at++; SETFLOAT(at, rad[12] *m2ms); at++; SETFLOAT(at, rad[13] *m2ms); at++; SETFLOAT(at, rad[14] *m2ms); at++; SETFLOAT(at, rad[15] *m2ms); at++; SETFLOAT(at, rad[16] *m2ms); at++; SETFLOAT(at, rad[17] *m2ms); at++; SETFLOAT(at, rad[18] *m2ms); at++; SETFLOAT(at, rad[19] *m2ms); at++; SETFLOAT(at, rad[20] *m2ms); at++; SETFLOAT(at, rad[21] *m2ms); at++; SETFLOAT(at, rad[22] *m2ms); at++; SETFLOAT(at, rad[23] *m2ms); at++; SETFLOAT(at, rad[24] *m2ms); outlet_anything(x->x_early_out, x->x_s_del2, 19, x->x_para_at); /* daempfungs-reihenfolge: 0, +1x, +1y, +1z, -1x, -1y, -1z +2x, +2y, +2z, -2x, -2y, -2z +1x+1y, +1x+1z, +1y+1z -1x-1y, -1x-1z, -1y-1z +1x-1y, +1x-1z, +1y-1z -1x+1y, -1x+1z, -1y+1z */ at = x->x_para_at+1; SETFLOAT(at, r_ambi / rad[0]); outlet_anything(x->x_direct_out, x->x_s_damp, 2, x->x_para_at); at = x->x_para_at+1; SETFLOAT(at, r_ambi / rad[1]); at++; SETFLOAT(at, r_ambi / rad[2]); at++; SETFLOAT(at, r_ambi / rad[3]); at++; SETFLOAT(at, r_ambi / rad[4]); at++; SETFLOAT(at, r_ambi / rad[5]); at++; SETFLOAT(at, r_ambi / rad[6]); at++; SETFLOAT(at, r_ambi / rad[7]); at++; SETFLOAT(at, r_ambi / rad[8]); at++; SETFLOAT(at, r_ambi / rad[9]); at++; SETFLOAT(at, r_ambi / rad[10]); at++; SETFLOAT(at, r_ambi / rad[11]); at++; SETFLOAT(at, r_ambi / rad[12]); at++; SETFLOAT(at, r_ambi / rad[13]); at++; SETFLOAT(at, r_ambi / rad[14]); at++; SETFLOAT(at, r_ambi / rad[15]); at++; SETFLOAT(at, r_ambi / rad[16]); at++; SETFLOAT(at, r_ambi / rad[17]); at++; SETFLOAT(at, r_ambi / rad[18]); at++; SETFLOAT(at, r_ambi / rad[19]); at++; SETFLOAT(at, r_ambi / rad[20]); at++; SETFLOAT(at, r_ambi / rad[21]); at++; SETFLOAT(at, r_ambi / rad[22]); at++; SETFLOAT(at, r_ambi / rad[23]); at++; SETFLOAT(at, r_ambi / rad[24]); outlet_anything(x->x_early_out, x->x_s_damp, 25, x->x_para_at); /* encoder-winkel-reihenfolge: index delta phi 0, +1x, +1y, +1z, -1x, -1y, -1z +2x, +2y, +2z, -2x, -2y, -2z +1x+1y, +1x+1z, +1y+1z -1x-1y, -1x-1z, -1y-1z +1x-1y, +1x-1z, +1y-1z -1x+1y, -1x+1z, -1y+1z */ at = x->x_para_at+1; SETFLOAT(at, early_reflections_3d_calc_elevation(x_180_over_pi, x0, y0_, z0)); at++; SETFLOAT(at, early_reflections_3d_calc_azimuth(x_180_over_pi, x0, y0_, z0)); outlet_anything(x->x_direct_out, x->x_s_index_delta_phi, 3, x->x_para_at); /* encoder-winkel-reihenfolge: bundle 0, +1x, +1y, +1z, -1x, -1y, -1z +2x, +2y, +2z, -2x, -2y, -2z +1x+1y, +1x+1z, +1y+1z -1x-1y, -1x-1z, -1y-1z +1x-1y, +1x-1z, +1y-1z -1x+1y, -1x+1z, -1y+1z */ delta[0] = early_reflections_3d_calc_elevation(x_180_over_pi, xp1, y0_, z0); phi[0] = early_reflections_3d_calc_azimuth(x_180_over_pi, xp1, y0_, z0); delta[1] = early_reflections_3d_calc_elevation(x_180_over_pi, x0, yp1, z0); phi[1] = early_reflections_3d_calc_azimuth(x_180_over_pi, x0, yp1, z0); delta[2] = early_reflections_3d_calc_elevation(x_180_over_pi, x0, y0_, zp1); phi[2] = early_reflections_3d_calc_azimuth(x_180_over_pi, x0, y0_, zp1); delta[3] = early_reflections_3d_calc_elevation(x_180_over_pi, xn1, y0_, z0); phi[3] = early_reflections_3d_calc_azimuth(x_180_over_pi, xn1, y0_, z0); delta[4] = early_reflections_3d_calc_elevation(x_180_over_pi, x0, yn1, z0); phi[4] = early_reflections_3d_calc_azimuth(x_180_over_pi, x0, yn1, z0); delta[5] = early_reflections_3d_calc_elevation(x_180_over_pi, x0, y0_, zn1); phi[5] = early_reflections_3d_calc_azimuth(x_180_over_pi, x0, y0_, zn1); delta[6] = early_reflections_3d_calc_elevation(x_180_over_pi, xp2, y0_, z0); phi[6] = early_reflections_3d_calc_azimuth(x_180_over_pi, xp2, y0_, z0); delta[7] = early_reflections_3d_calc_elevation(x_180_over_pi, x0, yp2, z0); phi[7] = early_reflections_3d_calc_azimuth(x_180_over_pi, x0, yp2, z0); delta[8] = early_reflections_3d_calc_elevation(x_180_over_pi, x0, y0_, zp2); phi[8] = early_reflections_3d_calc_azimuth(x_180_over_pi, x0, y0_, zp2); delta[9] = early_reflections_3d_calc_elevation(x_180_over_pi, xn2, y0_, z0); phi[9] = early_reflections_3d_calc_azimuth(x_180_over_pi, xn2, y0_, z0); delta[10] = early_reflections_3d_calc_elevation(x_180_over_pi, x0, yn2, z0); phi[10] = early_reflections_3d_calc_azimuth(x_180_over_pi, x0, yn2, z0); delta[11] = early_reflections_3d_calc_elevation(x_180_over_pi, x0, y0_, zn2); phi[11] = early_reflections_3d_calc_azimuth(x_180_over_pi, x0, y0_, zn2); delta[12] = early_reflections_3d_calc_elevation(x_180_over_pi, xp1, yp1, z0); phi[12] = early_reflections_3d_calc_azimuth(x_180_over_pi, xp1, yp1, z0); delta[13] = early_reflections_3d_calc_elevation(x_180_over_pi, xp1, y0_, zp1); phi[13] = early_reflections_3d_calc_azimuth(x_180_over_pi, xp1, y0_, zp1); delta[14] = early_reflections_3d_calc_elevation(x_180_over_pi, x0, yp1, zp1); phi[14] = early_reflections_3d_calc_azimuth(x_180_over_pi, x0, yp1, zp1); delta[15] = early_reflections_3d_calc_elevation(x_180_over_pi, xn1, yn1, z0); phi[15] = early_reflections_3d_calc_azimuth(x_180_over_pi, xn1, yn1, z0); delta[16] = early_reflections_3d_calc_elevation(x_180_over_pi, xn1, y0_, zn1); phi[16] = early_reflections_3d_calc_azimuth(x_180_over_pi, xn1, y0_, zn1); delta[17] = early_reflections_3d_calc_elevation(x_180_over_pi, x0, yn1, zn1); phi[17] = early_reflections_3d_calc_azimuth(x_180_over_pi, x0, yn1, zn1); delta[18] = early_reflections_3d_calc_elevation(x_180_over_pi, xp1, yn1, z0); phi[18] = early_reflections_3d_calc_azimuth(x_180_over_pi, xp1, yn1, z0); delta[19] = early_reflections_3d_calc_elevation(x_180_over_pi, xp1, y0_, zn1); phi[19] = early_reflections_3d_calc_azimuth(x_180_over_pi, xp1, y0_, zn1); delta[20] = early_reflections_3d_calc_elevation(x_180_over_pi, x0, yp1, zn1); phi[20] = early_reflections_3d_calc_azimuth(x_180_over_pi, x0, yp1, zn1); delta[21] = early_reflections_3d_calc_elevation(x_180_over_pi, xn1, yp1, z0); phi[21] = early_reflections_3d_calc_azimuth(x_180_over_pi, xn1, yp1, z0); delta[22] = early_reflections_3d_calc_elevation(x_180_over_pi, xn1, y0_, zp1); phi[22] = early_reflections_3d_calc_azimuth(x_180_over_pi, xn1, y0_, zp1); delta[23] = early_reflections_3d_calc_elevation(x_180_over_pi, x0, yn1, zp1); phi[23] = early_reflections_3d_calc_azimuth(x_180_over_pi, x0, yn1, zp1); if(x->x_bundle) { at = x->x_para_at+1; SETFLOAT(at, early_reflections_3d_calc_bundle_index(delta[0], phi[0])); at++; SETFLOAT(at, early_reflections_3d_calc_bundle_index(delta[1], phi[1])); at++; SETFLOAT(at, early_reflections_3d_calc_bundle_index(delta[2], phi[2])); at++; SETFLOAT(at, early_reflections_3d_calc_bundle_index(delta[3], phi[3])); at++; SETFLOAT(at, early_reflections_3d_calc_bundle_index(delta[4], phi[4])); at++; SETFLOAT(at, early_reflections_3d_calc_bundle_index(delta[5], phi[5])); at++; SETFLOAT(at, early_reflections_3d_calc_bundle_index(delta[6], phi[6])); at++; SETFLOAT(at, early_reflections_3d_calc_bundle_index(delta[7], phi[7])); at++; SETFLOAT(at, early_reflections_3d_calc_bundle_index(delta[8], phi[8])); at++; SETFLOAT(at, early_reflections_3d_calc_bundle_index(delta[9], phi[9])); at++; SETFLOAT(at, early_reflections_3d_calc_bundle_index(delta[10], phi[10])); at++; SETFLOAT(at, early_reflections_3d_calc_bundle_index(delta[11], phi[11])); at++; SETFLOAT(at, early_reflections_3d_calc_bundle_index(delta[12], phi[12])); at++; SETFLOAT(at, early_reflections_3d_calc_bundle_index(delta[13], phi[13])); at++; SETFLOAT(at, early_reflections_3d_calc_bundle_index(delta[14], phi[14])); at++; SETFLOAT(at, early_reflections_3d_calc_bundle_index(delta[15], phi[15])); at++; SETFLOAT(at, early_reflections_3d_calc_bundle_index(delta[16], phi[16])); at++; SETFLOAT(at, early_reflections_3d_calc_bundle_index(delta[17], phi[17])); at++; SETFLOAT(at, early_reflections_3d_calc_bundle_index(delta[18], phi[18])); at++; SETFLOAT(at, early_reflections_3d_calc_bundle_index(delta[19], phi[19])); at++; SETFLOAT(at, early_reflections_3d_calc_bundle_index(delta[20], phi[20])); at++; SETFLOAT(at, early_reflections_3d_calc_bundle_index(delta[21], phi[21])); at++; SETFLOAT(at, early_reflections_3d_calc_bundle_index(delta[22], phi[22])); at++; SETFLOAT(at, early_reflections_3d_calc_bundle_index(delta[23], phi[23])); outlet_anything(x->x_early_out, x->x_s_bundle, 25, x->x_para_at); } at = x->x_para_at+1; SETFLOAT(at, 1.0f); at++; SETFLOAT(at, delta[0]); at++; SETFLOAT(at, phi[0]); outlet_anything(x->x_early_out, x->x_s_index_delta_phi, 4, x->x_para_at); at = x->x_para_at+1; SETFLOAT(at, 2.0f); at++; SETFLOAT(at, delta[1]); at++; SETFLOAT(at, phi[1]); outlet_anything(x->x_early_out, x->x_s_index_delta_phi, 4, x->x_para_at); at = x->x_para_at+1; SETFLOAT(at, 3.0f); at++; SETFLOAT(at, delta[2]); at++; SETFLOAT(at, phi[2]); outlet_anything(x->x_early_out, x->x_s_index_delta_phi, 4, x->x_para_at); at = x->x_para_at+1; SETFLOAT(at, 4.0f); at++; SETFLOAT(at, delta[3]); at++; SETFLOAT(at, phi[3]); outlet_anything(x->x_early_out, x->x_s_index_delta_phi, 4, x->x_para_at); at = x->x_para_at+1; SETFLOAT(at, 5.0f); at++; SETFLOAT(at, delta[4]); at++; SETFLOAT(at, phi[4]); outlet_anything(x->x_early_out, x->x_s_index_delta_phi, 4, x->x_para_at); at = x->x_para_at+1; SETFLOAT(at, 6.0f); at++; SETFLOAT(at, delta[5]); at++; SETFLOAT(at, phi[5]); outlet_anything(x->x_early_out, x->x_s_index_delta_phi, 4, x->x_para_at); at = x->x_para_at+1; SETFLOAT(at, 7.0f); at++; SETFLOAT(at, delta[6]); at++; SETFLOAT(at, phi[6]); outlet_anything(x->x_early_out, x->x_s_index_delta_phi, 4, x->x_para_at); at = x->x_para_at+1; SETFLOAT(at, 8.0f); at++; SETFLOAT(at, delta[7]); at++; SETFLOAT(at, phi[7]); outlet_anything(x->x_early_out, x->x_s_index_delta_phi, 4, x->x_para_at); at = x->x_para_at+1; SETFLOAT(at, 9.0f); at++; SETFLOAT(at, delta[8]); at++; SETFLOAT(at, phi[8]); outlet_anything(x->x_early_out, x->x_s_index_delta_phi, 4, x->x_para_at); at = x->x_para_at+1; SETFLOAT(at, 10.0f); at++; SETFLOAT(at, delta[9]); at++; SETFLOAT(at, phi[9]); outlet_anything(x->x_early_out, x->x_s_index_delta_phi, 4, x->x_para_at); at = x->x_para_at+1; SETFLOAT(at, 11.0f); at++; SETFLOAT(at, delta[10]); at++; SETFLOAT(at, phi[10]); outlet_anything(x->x_early_out, x->x_s_index_delta_phi, 4, x->x_para_at); at = x->x_para_at+1; SETFLOAT(at, 12.0f); at++; SETFLOAT(at, delta[11]); at++; SETFLOAT(at, phi[11]); outlet_anything(x->x_early_out, x->x_s_index_delta_phi, 4, x->x_para_at); at = x->x_para_at+1; SETFLOAT(at, 13.0f); at++; SETFLOAT(at, delta[12]); at++; SETFLOAT(at, phi[12]); outlet_anything(x->x_early_out, x->x_s_index_delta_phi, 4, x->x_para_at); at = x->x_para_at+1; SETFLOAT(at, 14.0f); at++; SETFLOAT(at, delta[13]); at++; SETFLOAT(at, phi[13]); outlet_anything(x->x_early_out, x->x_s_index_delta_phi, 4, x->x_para_at); at = x->x_para_at+1; SETFLOAT(at, 15.0f); at++; SETFLOAT(at, delta[14]); at++; SETFLOAT(at, phi[14]); outlet_anything(x->x_early_out, x->x_s_index_delta_phi, 4, x->x_para_at); at = x->x_para_at+1; SETFLOAT(at, 16.0f); at++; SETFLOAT(at, delta[15]); at++; SETFLOAT(at, phi[15]); outlet_anything(x->x_early_out, x->x_s_index_delta_phi, 4, x->x_para_at); at = x->x_para_at+1; SETFLOAT(at, 17.0f); at++; SETFLOAT(at, delta[16]); at++; SETFLOAT(at, phi[16]); outlet_anything(x->x_early_out, x->x_s_index_delta_phi, 4, x->x_para_at); at = x->x_para_at+1; SETFLOAT(at, 18.0f); at++; SETFLOAT(at, delta[17]); at++; SETFLOAT(at, phi[17]); outlet_anything(x->x_early_out, x->x_s_index_delta_phi, 4, x->x_para_at); at = x->x_para_at+1; SETFLOAT(at, 19.0f); at++; SETFLOAT(at, delta[18]); at++; SETFLOAT(at, phi[18]); outlet_anything(x->x_early_out, x->x_s_index_delta_phi, 4, x->x_para_at); at = x->x_para_at+1; SETFLOAT(at, 20.0f); at++; SETFLOAT(at, delta[19]); at++; SETFLOAT(at, phi[19]); outlet_anything(x->x_early_out, x->x_s_index_delta_phi, 4, x->x_para_at); at = x->x_para_at+1; SETFLOAT(at, 21.0f); at++; SETFLOAT(at, delta[20]); at++; SETFLOAT(at, phi[20]); outlet_anything(x->x_early_out, x->x_s_index_delta_phi, 4, x->x_para_at); at = x->x_para_at+1; SETFLOAT(at, 22.0f); at++; SETFLOAT(at, delta[21]); at++; SETFLOAT(at, phi[21]); outlet_anything(x->x_early_out, x->x_s_index_delta_phi, 4, x->x_para_at); at = x->x_para_at+1; SETFLOAT(at, 23.0f); at++; SETFLOAT(at, delta[22]); at++; SETFLOAT(at, phi[22]); outlet_anything(x->x_early_out, x->x_s_index_delta_phi, 4, x->x_para_at); at = x->x_para_at+1; SETFLOAT(at, 24.0f); at++; SETFLOAT(at, delta[23]); at++; SETFLOAT(at, phi[23]); outlet_anything(x->x_early_out, x->x_s_index_delta_phi, 4, x->x_para_at); } } static void early_reflections_3d_dump_para(t_early_reflections_3d *x) { int i, n=x->x_n_src; post("*******************************************************************************"); post("room-dimensions: L_x = %.3f, W_y = %.3f, H_z = %.3f", x->x_room_x, x->x_room_y, x->x_room_z); post("hear-position: x_hear = %.3f, y_hear = %.3f, z_hear = %.3f", x->x_head_x, x->x_head_y, x->x_head_z); for(i=0; ix_src_x[i], i+1, x->x_src_y[i], i+1, x->x_src_z[i], i+1); post("ambisonic-radius: %f", x->x_r_ambi); post("sonic-speed: %.3f", x->x_speed); post("order of outputs: direct early rev"); post("*******************************************************************************"); } static void early_reflections_3d_para(t_early_reflections_3d *x, t_symbol *s, int argc, t_atom *argv) { int i, n=x->x_n_src*3 + 7;/* r_ambi + 3*room + 3*head */ if(argc != n) { post("early_reflections_3d ERROR: para needs 1 r_ambi + 3*room + 3*head +n*3*src"); return; } x->x_r_ambi = atom_getfloat(argv++); x->x_room_x = atom_getfloat(argv++); x->x_room_y = atom_getfloat(argv++); x->x_room_z = atom_getfloat(argv++); x->x_head_x = atom_getfloat(argv++); x->x_head_y = atom_getfloat(argv++); x->x_head_z = atom_getfloat(argv++); n = x->x_n_src; for(i=0; ix_src_x[i] = atom_getfloat(argv++); x->x_src_y[i] = atom_getfloat(argv++); x->x_src_z[i] = atom_getfloat(argv++); } early_reflections_3d_doit(x); } static void early_reflections_3d_sonic_speed(t_early_reflections_3d *x, t_floatarg speed) { if(speed < 300.0f) speed = 300.0f; if(speed > 400.0f) speed = 400.0f; x->x_speed = speed; } static void early_reflections_3d_bundle(t_early_reflections_3d *x, t_floatarg bundle) { if(bundle == 0.0f) x->x_bundle = 0; else x->x_bundle = 1; } static void early_reflections_3d_free(t_early_reflections_3d *x) { } static void *early_reflections_3d_new(t_floatarg fn_src) { int i, n; t_early_reflections_3d *x = (t_early_reflections_3d *)pd_new(early_reflections_3d_class); n = (int)fn_src; if(n < 1) n = 1; if(n > 30) n = 30; x->x_n_src = n; x->x_room_x = 12.0f; x->x_room_y = 8.0f; x->x_room_z = 4.0f; x->x_head_x = 0.0f; x->x_head_y = 0.0f; x->x_head_z = 1.7f; for(i=0; ix_src_x[i] = 3.0f; x->x_src_y[i] = 0.5f; x->x_src_z[i] = 2.5f; } x->x_r_ambi = 1.4f; x->x_speed = 340.0f; x->x_s_del0 = gensym("del0"); x->x_s_del1 = gensym("del1"); x->x_s_del2 = gensym("del2"); x->x_s_damp = gensym("damp"); x->x_s_index_delta_phi = gensym("index_delta_phi"); x->x_s_bundle = gensym("bundle"); x->x_direct_out = outlet_new(&x->x_obj, &s_list); x->x_early_out = outlet_new(&x->x_obj, &s_list); x->x_rev_out = outlet_new(&x->x_obj, &s_list); x->x_180_over_pi = (t_float)(180.0 / (4.0 * atan(1.0))); x->x_bundle = 0; return (x); } void early_reflections_3d_setup(void) { early_reflections_3d_class = class_new(gensym("early_reflections_3d"), (t_newmethod)early_reflections_3d_new, (t_method)early_reflections_3d_free, sizeof(t_early_reflections_3d), 0, A_DEFFLOAT, 0); class_addmethod(early_reflections_3d_class, (t_method)early_reflections_3d_para, gensym("para"), A_GIMME, 0); class_addmethod(early_reflections_3d_class, (t_method)early_reflections_3d_sonic_speed, gensym("sonic_speed"), A_FLOAT, 0); class_addmethod(early_reflections_3d_class, (t_method)early_reflections_3d_bundle, gensym("bundle"), A_FLOAT, 0); class_addmethod(early_reflections_3d_class, (t_method)early_reflections_3d_dump_para, gensym("dump_para"), 0); // class_sethelpsymbol(early_reflections_3d_class, gensym("iemhelp2/early_reflections_3d-help")); } iem_utils-v0.0.20181004/iem_roomsim/block_lp1~-help.pd0000644000175000017500000001203413355471360022526 0ustar zmoelnigzmoelnig#N canvas 456 157 568 471 10; #X text 119 399 IEM KUG; #X text 93 387 musil; #X text 131 387 @; #X text 139 387 iem.at; #X text 102 409 Graz \, Austria; #X obj 21 43 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 1 1 ; #X floatatom 21 111 5 0 0 0 - - -, f 5; #X floatatom 51 91 5 0 0 0 - - -, f 5; #N canvas 0 22 450 300 (subpatch) 0; #X array array100 100 float 0; #X coords 0 1.1 99 -0.1 100 50 1; #X restore 404 153 graph; #X obj 192 49 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X obj 405 274 hsl 100 15 0 99 0 0 empty empty empty -2 -6 0 8 -262144 -1 -1 0 1; #X floatatom 402 295 5 0 0 0 - - -, f 5; #X text 52 376 (c) Thomas Musil 2000 - 2011; #N canvas 0 22 450 300 dirac 0; #X obj 103 44 inlet; #X obj 103 65 t b b; #X obj 71 100 del 2; #X msg 126 112 1; #X msg 70 122 0; #X obj 92 151 biquad~ 0 0 1 -1 0; #X obj 92 176 max~ 0; #X obj 92 197 outlet~; #X connect 0 0 1 0; #X connect 1 0 2 0; #X connect 1 1 3 0; #X connect 2 0 4 0; #X connect 3 0 5 0; #X connect 4 0 5 0; #X connect 5 0 6 0; #X connect 6 0 7 0; #X restore 192 73 pd dirac; #N canvas 0 22 528 567 dsp 0; #X obj 20 65 inlet; #X obj 20 406 outlet; #X msg 31 88 \; pd dsp \$1; #X obj 20 199 cputime; #X obj 20 178 t b b; #X text 15 11 dsp; #X text 59 65 1/0 = ON/OFF; #X text 97 313 CPU-load; #X obj 62 126 loadbang; #X obj 20 126 sel 1; #X text 64 12 turn dsp-kernel on & off \,; #X obj 20 240 t f f; #X obj 211 405 outlet; #X text 65 408 average; #X text 177 405 peak; #X obj 211 154 f; #X obj 146 179 > -1; #X obj 169 155 f -1; #X obj 179 91 t f b f; #X obj 146 204 sel 1; #X obj 192 132 f -1; #X obj 20 154 metro 500; #X obj 20 220 * 0.2; #X text 74 37 -dsp-load in %; #X text 65 24 measure average- and peak-; #X obj 20 292 1p1z 0.1 0 0.9; #X obj 20 315 * 100; #X obj 20 360 int; #X obj 20 338 + 0.499; #X obj 20 383 * 0.01; #X obj 246 207 r pd; #X obj 246 231 route dsp; #X text 245 318 to toggle input; #X msg 246 283 \; dsp_tgl set \$1; #X obj 247 341 r dsp_tgl; #X obj 246 257 route float; #X obj 146 227 del 3990; #X text 179 455 IEM KUG; #X text 153 443 musil; #X text 190 443 @; #X text 199 443 iem.at; #X text 162 465 Graz \, Austria; #X msg 275 108 \; pd audio-dialog 0 0 0 0 64 0 0 0 0 0 0 0 64 0 0 0 44100 \$1; #X obj 275 81 inlet; #X text 271 56 system delay time in ms; #N canvas 0 22 486 468 once 0; #X obj 89 162 spigot; #X obj 34 59 inlet; #X obj 89 111 t a b; #X obj 126 140 f 1; #X obj 89 194 t a b; #X obj 119 216 f 0; #X obj 89 247 outlet; #X obj 207 56 inlet; #X obj 207 79 bang; #X obj 207 102 f 1; #X text 8 6 once; #X text 64 7 only the first message passes through; #X text 29 37 message in; #X text 29 289 message out (only once); #X text 203 36 anything to init once; #X obj 34 80 route bang; #X obj 34 110 t b b; #X obj 34 162 spigot; #X obj 34 194 t b b; #X text 98 377 IEM KUG; #X text 73 363 musil; #X text 110 365 @; #X text 118 365 iem.at; #X text 81 387 Graz \, Austria; #X text 120 339 @; #X text 128 339 iem.at; #X text 33 338 (c) zmoelnig; #X text 33 352 (c) Thomas Musil 2000 - 2011; #X connect 0 0 4 0; #X connect 1 0 15 0; #X connect 2 0 0 0; #X connect 2 1 3 0; #X connect 3 0 0 1; #X connect 3 0 17 1; #X connect 4 0 6 0; #X connect 4 1 5 0; #X connect 5 0 3 1; #X connect 7 0 8 0; #X connect 8 0 9 0; #X connect 9 0 3 1; #X connect 15 0 16 0; #X connect 15 1 2 0; #X connect 16 0 17 0; #X connect 16 1 3 0; #X connect 17 0 18 0; #X connect 18 0 6 0; #X connect 18 1 5 0; #X restore 69 270 pd once; #X text 112 430 (c) Thomas Musil 2000 - 2011; #X connect 0 0 2 0; #X connect 0 0 9 0; #X connect 3 0 22 0; #X connect 4 0 3 0; #X connect 4 1 3 1; #X connect 8 0 21 0; #X connect 9 0 21 0; #X connect 11 0 25 0; #X connect 11 1 45 0; #X connect 15 0 17 1; #X connect 15 0 12 0; #X connect 16 0 19 0; #X connect 17 0 16 1; #X connect 18 0 16 0; #X connect 18 1 17 0; #X connect 18 2 15 1; #X connect 19 0 15 0; #X connect 19 0 36 0; #X connect 20 0 17 1; #X connect 21 0 4 0; #X connect 22 0 11 0; #X connect 22 0 18 0; #X connect 25 0 26 0; #X connect 26 0 28 0; #X connect 27 0 29 0; #X connect 28 0 27 0; #X connect 29 0 1 0; #X connect 30 0 31 0; #X connect 31 0 35 0; #X connect 35 0 33 0; #X connect 36 0 20 0; #X connect 43 0 42 0; #X connect 45 0 25 5; #X connect 45 0 25 4; #X restore 21 65 pd dsp; #X obj 21 261 block~ 64 1 1; #X msg 21 239 set \$1 1 1; #X floatatom 20 220 5 0 0 0 - - -, f 5; #X msg 20 163 32; #X msg 20 188 64; #X text 130 10 Constant signal delay of one blocksize.; #X text 21 11 block_lp1~; #X obj 173 244 block_lp1~ 0.999; #X text 283 244 1st argument:; #X obj 191 281 tabsend~ array100; #X obj 192 104 biquad~ 0 0 0 0 4; #X obj 192 128 biquad~ 0 0 0 0 4; #X obj 192 152 biquad~ 0 0 0 0 4; #X obj 192 174 biquad~ 0 0 0 0 4; #X msg 263 203 0.999; #X msg 316 216 0.998; #X msg 204 215 0.9995; #X connect 5 0 14 0; #X connect 9 0 13 0; #X connect 10 0 11 0; #X connect 13 0 25 0; #X connect 14 0 6 0; #X connect 14 1 7 0; #X connect 16 0 15 0; #X connect 17 0 16 0; #X connect 18 0 17 0; #X connect 19 0 17 0; #X connect 22 0 24 0; #X connect 25 0 26 0; #X connect 26 0 27 0; #X connect 27 0 28 0; #X connect 28 0 22 0; #X connect 29 0 22 1; #X connect 30 0 22 1; #X connect 31 0 22 1; iem_utils-v0.0.20181004/iem_roomsim/block_delay~-help.pd0000644000175000017500000001162113355471360023131 0ustar zmoelnigzmoelnig#N canvas 456 157 568 471 10; #X text 119 399 IEM KUG; #X text 93 387 musil; #X text 131 387 @; #X text 139 387 iem.at; #X text 102 409 Graz \, Austria; #X obj 21 43 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 1 ; #X floatatom 21 111 5 0 0 0 - - -; #X floatatom 51 91 5 0 0 0 - - -; #N canvas 0 22 450 300 (subpatch) 0; #X array array101 100 float 0; #X coords 0 1.1 99 -0.1 100 50 1; #X restore 404 223 graph; #X obj 187 258 tabwrite~ array101; #N canvas 0 22 450 300 (subpatch) 0; #X array array100 100 float 0; #X coords 0 1.1 99 -0.1 100 50 1; #X restore 404 153 graph; #X obj 226 192 tabwrite~ array100; #X text 250 220 no initial arguments; #X obj 162 220 block_delay~; #X obj 160 97 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X obj 405 274 hsl 100 15 0 99 0 0 empty empty empty -2 -6 0 8 -262144 -1 -1 6400 1; #X floatatom 402 295 5 0 0 0 - - -; #X text 21 11 block_delay~; #X text 52 376 (c) Thomas Musil 2000 - 2011; #N canvas 0 22 450 300 dirac 0; #X obj 103 44 inlet; #X obj 103 65 t b b; #X obj 71 100 del 2; #X msg 126 112 1; #X msg 70 122 0; #X obj 92 151 biquad~ 0 0 1 -1 0; #X obj 92 176 max~ 0; #X obj 92 197 outlet~; #X connect 0 0 1 0; #X connect 1 0 2 0; #X connect 1 1 3 0; #X connect 2 0 4 0; #X connect 3 0 5 0; #X connect 4 0 5 0; #X connect 5 0 6 0; #X connect 6 0 7 0; #X restore 161 139 pd dirac; #N canvas 0 22 528 567 dsp 0; #X obj 20 65 inlet; #X obj 20 406 outlet; #X msg 31 88 \; pd dsp \$1; #X obj 20 199 cputime; #X obj 20 178 t b b; #X text 15 11 dsp; #X text 59 65 1/0 = ON/OFF; #X text 97 313 CPU-load; #X obj 62 126 loadbang; #X obj 20 126 sel 1; #X text 64 12 turn dsp-kernel on & off \,; #X obj 20 240 t f f; #X obj 211 405 outlet; #X text 65 408 average; #X text 177 405 peak; #X obj 211 154 f; #X obj 146 179 > -1; #X obj 169 155 f -1; #X obj 179 91 t f b f; #X obj 146 204 sel 1; #X obj 192 132 f -1; #X obj 20 154 metro 500; #X obj 20 220 * 0.2; #X text 74 37 -dsp-load in %; #X text 65 24 measure average- and peak-; #X obj 20 292 1p1z 0.1 0 0.9; #X obj 20 315 * 100; #X obj 20 360 int; #X obj 20 338 + 0.499; #X obj 20 383 * 0.01; #X obj 246 207 r pd; #X obj 246 231 route dsp; #X text 245 318 to toggle input; #X msg 246 283 \; dsp_tgl set \$1; #X obj 247 341 r dsp_tgl; #X obj 246 257 route float; #X obj 146 227 del 3990; #X text 179 455 IEM KUG; #X text 153 443 musil; #X text 190 443 @; #X text 199 443 iem.at; #X text 162 465 Graz \, Austria; #X msg 275 108 \; pd audio-dialog 0 0 0 0 64 0 0 0 0 0 0 0 64 0 0 0 44100 \$1; #X obj 275 81 inlet; #X text 271 56 system delay time in ms; #N canvas 0 22 486 468 once 0; #X obj 89 162 spigot; #X obj 34 59 inlet; #X obj 89 111 t a b; #X obj 126 140 f 1; #X obj 89 194 t a b; #X obj 119 216 f 0; #X obj 89 247 outlet; #X obj 207 56 inlet; #X obj 207 79 bang; #X obj 207 102 f 1; #X text 8 6 once; #X text 64 7 only the first message passes through; #X text 29 37 message in; #X text 29 289 message out (only once); #X text 203 36 anything to init once; #X obj 34 80 route bang; #X obj 34 110 t b b; #X obj 34 162 spigot; #X obj 34 194 t b b; #X text 98 377 IEM KUG; #X text 73 363 musil; #X text 110 365 @; #X text 118 365 iem.at; #X text 81 387 Graz \, Austria; #X text 120 339 @; #X text 128 339 iem.at; #X text 33 338 (c) zmoelnig; #X text 33 352 (c) Thomas Musil 2000 - 2011; #X connect 0 0 4 0; #X connect 1 0 15 0; #X connect 2 0 0 0; #X connect 2 1 3 0; #X connect 3 0 0 1; #X connect 3 0 17 1; #X connect 4 0 6 0; #X connect 4 1 5 0; #X connect 5 0 3 1; #X connect 7 0 8 0; #X connect 8 0 9 0; #X connect 9 0 3 1; #X connect 15 0 16 0; #X connect 15 1 2 0; #X connect 16 0 17 0; #X connect 16 1 3 0; #X connect 17 0 18 0; #X connect 18 0 6 0; #X connect 18 1 5 0; #X restore 69 270 pd once; #X text 112 430 (c) Thomas Musil 2000 - 2011; #X connect 0 0 2 0; #X connect 0 0 9 0; #X connect 3 0 22 0; #X connect 4 0 3 0; #X connect 4 1 3 1; #X connect 8 0 21 0; #X connect 9 0 21 0; #X connect 11 0 25 0; #X connect 11 1 45 0; #X connect 15 0 17 1; #X connect 15 0 12 0; #X connect 16 0 19 0; #X connect 17 0 16 1; #X connect 18 0 16 0; #X connect 18 1 17 0; #X connect 18 2 15 1; #X connect 19 0 15 0; #X connect 19 0 36 0; #X connect 20 0 17 1; #X connect 21 0 4 0; #X connect 22 0 11 0; #X connect 22 0 18 0; #X connect 25 0 26 0; #X connect 26 0 28 0; #X connect 27 0 29 0; #X connect 28 0 27 0; #X connect 29 0 1 0; #X connect 30 0 31 0; #X connect 31 0 35 0; #X connect 35 0 33 0; #X connect 36 0 20 0; #X connect 43 0 42 0; #X connect 45 0 25 5; #X connect 45 0 25 4; #X restore 21 65 pd dsp; #X obj 21 261 block~ 64 1 1; #X msg 21 239 set \$1 1 1; #X floatatom 20 220 5 0 0 0 - - -; #X msg 20 163 32; #X msg 20 188 64; #X text 130 10 Constant signal delay of one blocksize.; #X connect 5 0 20 0; #X connect 13 0 9 0; #X connect 14 0 11 0; #X connect 14 0 9 0; #X connect 14 0 19 0; #X connect 15 0 16 0; #X connect 19 0 11 0; #X connect 19 0 13 0; #X connect 20 0 6 0; #X connect 20 1 7 0; #X connect 22 0 21 0; #X connect 23 0 22 0; #X connect 24 0 23 0; #X connect 25 0 23 0; iem_utils-v0.0.20181004/iem_roomsim/xy_2_del_damp_phi-help.pd0000644000175000017500000003476113355471360024043 0ustar zmoelnigzmoelnig#N canvas 250 120 1451 811 10; #X msg 59 83 sonic_speed 340; #X obj 105 154 pack; #X obj 139 154 t b f; #X floatatom 98 137 5 -20 20 0 - - -, f 5; #X floatatom 141 137 5 -20 20 0 - - -, f 5; #X text 183 136 m x m; #X obj 151 225 pack; #X obj 185 225 t b f; #X floatatom 144 208 5 -20 20 0 - - -, f 5; #X floatatom 187 208 5 -20 20 0 - - -, f 5; #X text 229 207 m x m; #X obj 48 313 print; #X msg 105 175 head_xy \$1 \$2; #X msg 151 246 src_xy \$1 \$2; #X obj 96 314 s xxx; #X obj 368 19 r xxx; #X floatatom 368 751 5 0 0 0 - - -, f 5; #X floatatom 403 728 5 0 0 0 - - -, f 5; #X floatatom 438 708 5 0 0 0 - - -, f 5; #X floatatom 485 583 5 0 0 0 - - -, f 5; #X floatatom 526 583 5 0 0 0 - - -, f 5; #X obj 415 640 unpack 0 0 0 0, f 21; #X floatatom 415 658 5 0 0 0 - - -, f 5; #X floatatom 457 658 5 0 0 0 - - -, f 5; #X floatatom 499 658 5 0 0 0 - - -, f 5; #X floatatom 542 658 5 0 0 0 - - -, f 5; #X obj 450 602 unpack 0 0 0 0, f 22; #X floatatom 450 620 5 0 0 0 - - -, f 5; #X floatatom 492 620 5 0 0 0 - - -, f 5; #X floatatom 534 620 5 0 0 0 - - -, f 5; #X floatatom 577 620 5 0 0 0 - - -, f 5; #X floatatom 567 583 5 0 0 0 - - -, f 5; #X floatatom 608 583 5 0 0 0 - - -, f 5; #X floatatom 532 425 5 0 0 0 - - -, f 5; #X floatatom 573 425 5 0 0 0 - - -, f 5; #X floatatom 462 503 5 0 0 0 - - -, f 5; #X floatatom 504 503 5 0 0 0 - - -, f 5; #X floatatom 546 503 5 0 0 0 - - -, f 5; #X floatatom 589 503 5 0 0 0 - - -, f 5; #X floatatom 614 425 5 0 0 0 - - -, f 5; #X floatatom 655 425 5 0 0 0 - - -, f 5; #X floatatom 696 425 5 0 0 0 - - -, f 5; #X floatatom 737 425 5 0 0 0 - - -, f 5; #X floatatom 778 425 5 0 0 0 - - -, f 5; #X floatatom 819 425 5 0 0 0 - - -, f 5; #X text 648 583 degree; #X text 584 657 ms; #X text 477 709 degree; #X text 409 751 ms; #X text 796 505 ms; #X obj 462 484 unpack 0 0 0 0 0 0 0 0, f 50; #X floatatom 631 503 5 0 0 0 - - -, f 5; #X floatatom 673 503 5 0 0 0 - - -, f 5; #X floatatom 715 503 5 0 0 0 - - -, f 5; #X floatatom 758 503 5 0 0 0 - - -, f 5; #X floatatom 497 463 5 0 0 0 - - -, f 5; #X floatatom 539 463 5 0 0 0 - - -, f 5; #X floatatom 581 463 5 0 0 0 - - -, f 5; #X floatatom 624 463 5 0 0 0 - - -, f 5; #X obj 497 444 unpack 0 0 0 0 0 0 0 0, f 50; #X floatatom 666 463 5 0 0 0 - - -, f 5; #X floatatom 708 463 5 0 0 0 - - -, f 5; #X floatatom 750 463 5 0 0 0 - - -, f 5; #X floatatom 793 463 5 0 0 0 - - -, f 5; #X text 857 423 degree; #X text 78 385 IEM KUG; #X text 62 373 musil; #X text 92 373 @; #X text 98 373 iem.at; #X text 61 395 Graz \, Austria; #X text 163 81 sonic speed in meter per second; #X text 148 105 minimum raduis in meter; #X text 149 64 room dimensions in meter; #X text 237 250 object coordinates; #X text 194 174 subject coordinates; #X text 830 463 linear rms; #X text 615 619 linear rms; #X text 441 726 linear rms; #X text 1114 538 |; #X text 1114 546 |; #X text 1114 554 |; #X text 1114 562 |; #X text 1150 538 |; #X text 1150 546 |; #X text 1150 554 |; #X text 1150 562 |; #X text 1186 538 |; #X text 1186 546 |; #X text 1186 554 |; #X text 1186 562 |; #X text 1222 538 |; #X text 1222 546 |; #X text 1222 554 |; #X text 1222 562 |; #X text 1258 538 |; #X text 1258 546 |; #X text 1258 554 |; #X text 1258 562 |; #X text 1198 482 + y; #X text 1101 531 --+-----+-----+-----+-----+-----+--; #X text 1294 538 |; #X text 1294 546 |; #X text 1294 554 |; #X text 1294 562 |; #X text 1114 576 |; #X text 1114 584 |; #X text 1114 592 |; #X text 1114 600 |; #X text 1150 576 |; #X text 1150 584 |; #X text 1150 592 |; #X text 1150 600 |; #X text 1186 576 |; #X text 1186 584 |; #X text 1186 592 |; #X text 1186 600 |; #X text 1222 576 |; #X text 1222 584 |; #X text 1222 592 |; #X text 1222 600 |; #X text 1258 576 |; #X text 1258 584 |; #X text 1258 592 |; #X text 1258 600 |; #X text 1101 569 --+-----+-----+-----+-----+-----+--; #X text 1294 576 |; #X text 1294 584 |; #X text 1294 592 |; #X text 1294 600 |; #X text 1114 614 |; #X text 1114 622 |; #X text 1114 630 |; #X text 1114 638 |; #X text 1150 614 |; #X text 1150 622 |; #X text 1150 630 |; #X text 1150 638 |; #X text 1186 614 |; #X text 1186 622 |; #X text 1186 630 |; #X text 1186 638 |; #X text 1222 614 |; #X text 1222 622 |; #X text 1222 630 |; #X text 1222 638 |; #X text 1258 614 |; #X text 1258 622 |; #X text 1258 630 |; #X text 1258 638 |; #X text 1101 607 --+-----+-----+-----+-----+-----+--; #X text 1294 614 |; #X text 1294 622 |; #X text 1294 630 |; #X text 1294 638 |; #X text 1114 652 |; #X text 1114 660 |; #X text 1114 668 |; #X text 1114 676 |; #X text 1150 652 |; #X text 1150 660 |; #X text 1150 668 |; #X text 1150 676 |; #X text 1186 652 |; #X text 1186 660 |; #X text 1186 668 |; #X text 1186 676 |; #X text 1222 652 |; #X text 1222 660 |; #X text 1222 668 |; #X text 1222 676 |; #X text 1258 652 |; #X text 1258 660 |; #X text 1258 668 |; #X text 1258 676 |; #X text 1101 645 --+-----+-----+-----+-----+-----+--; #X text 1294 652 |; #X text 1294 660 |; #X text 1294 668 |; #X text 1294 676 |; #X text 1114 690 |; #X text 1114 698 |; #X text 1114 706 |; #X text 1114 714 |; #X text 1150 690 |; #X text 1150 698 |; #X text 1150 706 |; #X text 1150 714 |; #X text 1186 690 |; #X text 1186 698 |; #X text 1186 706 |; #X text 1186 714 |; #X text 1222 690 |; #X text 1222 698 |; #X text 1222 706 |; #X text 1222 714 |; #X text 1258 690 |; #X text 1258 698 |; #X text 1258 706 |; #X text 1258 714 |; #X text 1101 683 --+-----+-----+-----+-----+-----+--; #X text 1294 690 |; #X text 1294 698 |; #X text 1294 706 |; #X text 1294 714 |; #X text 1101 721 --+-----+-----+-----+-----+-----+--; #X text 1180 621 ___________________________; #X text 1341 626 > + x; #X text 1204 498 |; #X text 1204 505 |; #X text 1204 512 |; #X text 1204 519 |; #X text 1204 526 |; #X text 1204 533 |; #X text 1204 540 |; #X text 1204 547 |; #X text 1204 554 |; #X text 1204 561 |; #X text 1204 568 |; #X text 1204 575 |; #X text 1204 574 |; #X text 1204 581 |; #X text 1204 588 |; #X text 1204 595 |; #X text 1204 601 |; #X text 1204 608 |; #X text 1204 615 |; #X text 1204 622 |; #X text 1204 629 |; #X text 1204 636 |; #X text 1204 643 |; #X text 1204 650 |; #X text 1204 494 ^; #X text 1229 634 e1_1; #X text 1192 589 e1_2; #X text 1158 634 e1_3; #X text 1193 667 e1_4; #X text 1265 634 e2_1; #X text 1197 634 d_1; #X text 1302 440 d .. direct; #X text 1297 452 e1 .. early 1; #X text 1297 464 e2 .. early 2; #X text 1223 505 mirror source rooms; #X text 680 23 renders the delay time \, the damping and the direction of direct \, early_1 and early_2 reflections in a cuboid room model (2 dimensional); #X text 11 9 xy_2_del_damp_phi; #X msg 48 63 room_xy 20 10; #X obj 48 288 xy_2_del_damp_phi; #X obj 368 687 route del damp phi; #X obj 415 541 route del damp phi; #X obj 462 382 route del damp phi; #X obj 485 565 unpack 0 0 0 0, f 21; #X obj 532 407 unpack 0 0 0 0 0 0 0 0, f 48; #X obj 368 41 route direct early1 early2 early3 early4; #X floatatom 580 275 5 0 0 0 - - -, f 5; #X floatatom 621 275 5 0 0 0 - - -, f 5; #X floatatom 662 275 5 0 0 0 - - -, f 5; #X floatatom 703 275 5 0 0 0 - - -, f 5; #X floatatom 744 275 5 0 0 0 - - -, f 5; #X floatatom 785 275 5 0 0 0 - - -, f 5; #X floatatom 826 275 5 0 0 0 - - -, f 5; #X floatatom 867 275 5 0 0 0 - - -, f 5; #X text 1003 353 ms; #X text 1069 273 degree; #X text 1038 314 linear rms; #X obj 510 232 route del damp phi; #X obj 580 257 unpack 0 0 0 0 0 0 0 0 0 0 0 0, f 75; #X floatatom 908 275 5 0 0 0 - - -, f 5; #X floatatom 949 275 5 0 0 0 - - -, f 5; #X floatatom 990 275 5 0 0 0 - - -, f 5; #X floatatom 1031 275 5 0 0 0 - - -, f 5; #X floatatom 545 314 5 0 0 0 - - -, f 5; #X floatatom 586 314 5 0 0 0 - - -, f 5; #X floatatom 627 314 5 0 0 0 - - -, f 5; #X floatatom 668 314 5 0 0 0 - - -, f 5; #X floatatom 709 314 5 0 0 0 - - -, f 5; #X floatatom 750 314 5 0 0 0 - - -, f 5; #X floatatom 791 314 5 0 0 0 - - -, f 5; #X floatatom 832 314 5 0 0 0 - - -, f 5; #X obj 545 296 unpack 0 0 0 0 0 0 0 0 0 0 0 0, f 75; #X floatatom 873 314 5 0 0 0 - - -, f 5; #X floatatom 914 314 5 0 0 0 - - -, f 5; #X floatatom 955 314 5 0 0 0 - - -, f 5; #X floatatom 996 314 5 0 0 0 - - -, f 5; #X floatatom 510 352 5 0 0 0 - - -, f 5; #X floatatom 551 352 5 0 0 0 - - -, f 5; #X floatatom 592 352 5 0 0 0 - - -, f 5; #X floatatom 633 352 5 0 0 0 - - -, f 5; #X floatatom 674 352 5 0 0 0 - - -, f 5; #X floatatom 715 352 5 0 0 0 - - -, f 5; #X floatatom 756 352 5 0 0 0 - - -, f 5; #X floatatom 797 352 5 0 0 0 - - -, f 5; #X obj 510 334 unpack 0 0 0 0 0 0 0 0 0 0 0 0, f 75; #X floatatom 838 352 5 0 0 0 - - -, f 5; #X floatatom 879 352 5 0 0 0 - - -, f 5; #X floatatom 920 352 5 0 0 0 - - -, f 5; #X floatatom 961 352 5 0 0 0 - - -, f 5; #X floatatom 627 125 5 0 0 0 - - -, f 5; #X floatatom 668 125 5 0 0 0 - - -, f 5; #X floatatom 709 125 5 0 0 0 - - -, f 5; #X floatatom 750 125 5 0 0 0 - - -, f 5; #X floatatom 791 125 5 0 0 0 - - -, f 5; #X floatatom 832 125 5 0 0 0 - - -, f 5; #X floatatom 873 125 5 0 0 0 - - -, f 5; #X floatatom 914 125 5 0 0 0 - - -, f 5; #X text 1210 203 ms; #X text 1276 123 degree; #X text 1245 164 linear rms; #X obj 557 82 route del damp phi; #X floatatom 955 125 5 0 0 0 - - -, f 5; #X floatatom 996 125 5 0 0 0 - - -, f 5; #X floatatom 1037 125 5 0 0 0 - - -, f 5; #X floatatom 1078 125 5 0 0 0 - - -, f 5; #X text 1230 589 e2_2; #X text 1192 549 e2_3; #X text 1158 589 e2_4; #X text 1122 634 e2_5; #X text 1158 665 e2_6; #X text 1193 703 e2_7; #X text 1230 665 e2_8; #X floatatom 1119 125 5 0 0 0 - - -, f 5; #X floatatom 1160 125 5 0 0 0 - - -, f 5; #X floatatom 1201 125 5 0 0 0 - - -, f 5; #X floatatom 1242 125 5 0 0 0 - - -, f 5; #X obj 627 107 unpack 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0, f 103; #X floatatom 592 165 5 0 0 0 - - -, f 5; #X floatatom 633 165 5 0 0 0 - - -, f 5; #X floatatom 674 165 5 0 0 0 - - -, f 5; #X floatatom 715 165 5 0 0 0 - - -, f 5; #X floatatom 756 165 5 0 0 0 - - -, f 5; #X floatatom 797 165 5 0 0 0 - - -, f 5; #X floatatom 838 165 5 0 0 0 - - -, f 5; #X floatatom 879 165 5 0 0 0 - - -, f 5; #X floatatom 920 165 5 0 0 0 - - -, f 5; #X floatatom 961 165 5 0 0 0 - - -, f 5; #X floatatom 1002 165 5 0 0 0 - - -, f 5; #X floatatom 1043 165 5 0 0 0 - - -, f 5; #X floatatom 1084 165 5 0 0 0 - - -, f 5; #X floatatom 1125 165 5 0 0 0 - - -, f 5; #X floatatom 1166 165 5 0 0 0 - - -, f 5; #X floatatom 1207 165 5 0 0 0 - - -, f 5; #X obj 592 147 unpack 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0, f 103; #X floatatom 557 205 5 0 0 0 - - -, f 5; #X floatatom 598 205 5 0 0 0 - - -, f 5; #X floatatom 639 205 5 0 0 0 - - -, f 5; #X floatatom 680 205 5 0 0 0 - - -, f 5; #X floatatom 721 205 5 0 0 0 - - -, f 5; #X floatatom 762 205 5 0 0 0 - - -, f 5; #X floatatom 803 205 5 0 0 0 - - -, f 5; #X floatatom 844 205 5 0 0 0 - - -, f 5; #X floatatom 885 205 5 0 0 0 - - -, f 5; #X floatatom 926 205 5 0 0 0 - - -, f 5; #X floatatom 967 205 5 0 0 0 - - -, f 5; #X floatatom 1008 205 5 0 0 0 - - -, f 5; #X floatatom 1049 205 5 0 0 0 - - -, f 5; #X floatatom 1090 205 5 0 0 0 - - -, f 5; #X floatatom 1131 205 5 0 0 0 - - -, f 5; #X floatatom 1172 205 5 0 0 0 - - -, f 5; #X obj 557 187 unpack 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0, f 103; #X msg 67 104 r_min 1.4; #X text 13 362 (c) Thomas Musil 2000 - 2018; #X connect 0 0 245 0; #X connect 1 0 12 0; #X connect 2 0 1 0; #X connect 2 1 1 1; #X connect 3 0 1 0; #X connect 4 0 2 0; #X connect 6 0 13 0; #X connect 7 0 6 0; #X connect 7 1 6 1; #X connect 8 0 6 0; #X connect 9 0 7 0; #X connect 12 0 245 0; #X connect 13 0 245 0; #X connect 15 0 251 0; #X connect 21 0 22 0; #X connect 21 1 23 0; #X connect 21 2 24 0; #X connect 21 3 25 0; #X connect 26 0 27 0; #X connect 26 1 28 0; #X connect 26 2 29 0; #X connect 26 3 30 0; #X connect 50 0 35 0; #X connect 50 1 36 0; #X connect 50 2 37 0; #X connect 50 3 38 0; #X connect 50 4 51 0; #X connect 50 5 52 0; #X connect 50 6 53 0; #X connect 50 7 54 0; #X connect 59 0 55 0; #X connect 59 1 56 0; #X connect 59 2 57 0; #X connect 59 3 58 0; #X connect 59 4 60 0; #X connect 59 5 61 0; #X connect 59 6 62 0; #X connect 59 7 63 0; #X connect 244 0 245 0; #X connect 245 0 11 0; #X connect 245 0 14 0; #X connect 246 0 16 0; #X connect 246 1 17 0; #X connect 246 2 18 0; #X connect 247 0 21 0; #X connect 247 1 26 0; #X connect 247 2 249 0; #X connect 248 0 50 0; #X connect 248 1 59 0; #X connect 248 2 250 0; #X connect 249 0 19 0; #X connect 249 1 20 0; #X connect 249 2 31 0; #X connect 249 3 32 0; #X connect 250 0 33 0; #X connect 250 1 34 0; #X connect 250 2 39 0; #X connect 250 3 40 0; #X connect 250 4 41 0; #X connect 250 5 42 0; #X connect 250 6 43 0; #X connect 250 7 44 0; #X connect 251 0 246 0; #X connect 251 1 247 0; #X connect 251 2 248 0; #X connect 251 3 263 0; #X connect 251 4 306 0; #X connect 263 0 290 0; #X connect 263 1 277 0; #X connect 263 2 264 0; #X connect 264 0 252 0; #X connect 264 1 253 0; #X connect 264 2 254 0; #X connect 264 3 255 0; #X connect 264 4 256 0; #X connect 264 5 257 0; #X connect 264 6 258 0; #X connect 264 7 259 0; #X connect 264 8 265 0; #X connect 264 9 266 0; #X connect 264 10 267 0; #X connect 264 11 268 0; #X connect 277 0 269 0; #X connect 277 1 270 0; #X connect 277 2 271 0; #X connect 277 3 272 0; #X connect 277 4 273 0; #X connect 277 5 274 0; #X connect 277 6 275 0; #X connect 277 7 276 0; #X connect 277 8 278 0; #X connect 277 9 279 0; #X connect 277 10 280 0; #X connect 277 11 281 0; #X connect 290 0 282 0; #X connect 290 1 283 0; #X connect 290 2 284 0; #X connect 290 3 285 0; #X connect 290 4 286 0; #X connect 290 5 287 0; #X connect 290 6 288 0; #X connect 290 7 289 0; #X connect 290 8 291 0; #X connect 290 9 292 0; #X connect 290 10 293 0; #X connect 290 11 294 0; #X connect 306 0 356 0; #X connect 306 1 339 0; #X connect 306 2 322 0; #X connect 322 0 295 0; #X connect 322 1 296 0; #X connect 322 2 297 0; #X connect 322 3 298 0; #X connect 322 4 299 0; #X connect 322 5 300 0; #X connect 322 6 301 0; #X connect 322 7 302 0; #X connect 322 8 307 0; #X connect 322 9 308 0; #X connect 322 10 309 0; #X connect 322 11 310 0; #X connect 322 12 318 0; #X connect 322 13 319 0; #X connect 322 14 320 0; #X connect 322 15 321 0; #X connect 339 0 323 0; #X connect 339 1 324 0; #X connect 339 2 325 0; #X connect 339 3 326 0; #X connect 339 4 327 0; #X connect 339 5 328 0; #X connect 339 6 329 0; #X connect 339 7 330 0; #X connect 339 8 331 0; #X connect 339 9 332 0; #X connect 339 10 333 0; #X connect 339 11 334 0; #X connect 339 12 335 0; #X connect 339 13 336 0; #X connect 339 14 337 0; #X connect 339 15 338 0; #X connect 356 0 340 0; #X connect 356 1 341 0; #X connect 356 2 342 0; #X connect 356 3 343 0; #X connect 356 4 344 0; #X connect 356 5 345 0; #X connect 356 6 346 0; #X connect 356 7 347 0; #X connect 356 8 348 0; #X connect 356 9 349 0; #X connect 356 10 350 0; #X connect 356 11 351 0; #X connect 356 12 352 0; #X connect 356 13 353 0; #X connect 356 14 354 0; #X connect 356 15 355 0; #X connect 357 0 245 0; iem_utils-v0.0.20181004/iem_roomsim/n_delay2p_line~-help.pd0000644000175000017500000001522213355471360023546 0ustar zmoelnigzmoelnig#N canvas 22 22 973 526 10; #X msg 454 136 100; #X msg 489 139 1000; #X msg 532 139 3000; #X obj 305 182 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #N canvas 0 22 450 300 (subpatch) 0; #X array array101 100 float 0; #X coords 0 1.1 99 -0.1 100 50 1; #X restore 845 186 graph; #N canvas 0 22 450 300 (subpatch) 0; #X array array102 100 float 0; #X coords 0 1.1 99 -0.1 100 50 1; #X restore 845 256 graph; #N canvas 0 22 450 300 (subpatch) 0; #X array array103 100 float 0; #X coords 0 1.1 99 -0.1 100 50 1; #X restore 845 326 graph; #X obj 203 309 tabwrite~ array101; #X obj 250 355 tabwrite~ array103; #X obj 225 332 tabwrite~ array102; #N canvas 0 22 450 300 (subpatch) 0; #X array array100 100 float 0; #X coords 0 1.1 99 -0.1 100 50 1; #X restore 845 116 graph; #X obj 304 254 tabwrite~ array100; #N canvas 0 22 450 300 dirac 0; #X obj 103 44 inlet; #X obj 103 65 t b b; #X obj 71 100 del 2; #X msg 126 112 1; #X msg 70 122 0; #X obj 92 151 biquad~ 0 0 1 -1 0; #X obj 92 176 max~ 0; #X obj 92 197 outlet~; #X connect 0 0 1 0; #X connect 1 0 2 0; #X connect 1 1 3 0; #X connect 2 0 4 0; #X connect 3 0 5 0; #X connect 4 0 5 0; #X connect 5 0 6 0; #X connect 6 0 7 0; #X restore 212 222 pd dirac; #X text 113 442 IEM KUG; #X text 87 430 musil; #X text 125 430 @; #X text 133 430 iem.at; #X text 96 452 Graz \, Austria; #X text 46 419 (c) Thomas Musil 2000 - 2011; #X obj 24 46 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 1 1 ; #X floatatom 24 110 5 0 0 0 - - -; #X floatatom 42 93 5 0 0 0 - - -; #N canvas 0 22 528 567 dsp 0; #X obj 20 65 inlet; #X obj 20 406 outlet; #X msg 31 88 \; pd dsp \$1; #X obj 20 199 cputime; #X obj 20 178 t b b; #X text 15 11 dsp; #X text 59 65 1/0 = ON/OFF; #X text 97 313 CPU-load; #X obj 62 126 loadbang; #X obj 20 126 sel 1; #X text 64 12 turn dsp-kernel on & off \,; #X obj 20 240 t f f; #X obj 211 405 outlet; #X text 65 408 average; #X text 177 405 peak; #X obj 211 154 f; #X obj 146 179 > -1; #X obj 169 155 f -1; #X obj 179 91 t f b f; #X obj 146 204 sel 1; #X obj 192 132 f -1; #X obj 20 154 metro 500; #X obj 20 220 * 0.2; #X text 74 37 -dsp-load in %; #X text 65 24 measure average- and peak-; #X obj 20 292 1p1z 0.1 0 0.9; #X obj 20 315 * 100; #X obj 20 360 int; #X obj 20 338 + 0.499; #X obj 20 383 * 0.01; #X obj 246 207 r pd; #X obj 246 231 route dsp; #X text 245 318 to toggle input; #X msg 246 283 \; dsp_tgl set \$1; #X obj 247 341 r dsp_tgl; #X obj 246 257 route float; #X obj 146 227 del 3990; #X text 179 455 IEM KUG; #X text 153 443 musil; #X text 190 443 @; #X text 199 443 iem.at; #X text 162 465 Graz \, Austria; #X msg 275 108 \; pd audio-dialog 0 0 0 0 64 0 0 0 0 0 0 0 64 0 0 0 44100 \$1; #X obj 275 81 inlet; #X text 271 56 system delay time in ms; #N canvas 0 22 486 468 once 0; #X obj 89 162 spigot; #X obj 34 59 inlet; #X obj 89 111 t a b; #X obj 126 140 f 1; #X obj 89 194 t a b; #X obj 119 216 f 0; #X obj 89 247 outlet; #X obj 207 56 inlet; #X obj 207 79 bang; #X obj 207 102 f 1; #X text 8 6 once; #X text 64 7 only the first message passes through; #X text 29 37 message in; #X text 29 289 message out (only once); #X text 203 36 anything to init once; #X obj 34 80 route bang; #X obj 34 110 t b b; #X obj 34 162 spigot; #X obj 34 194 t b b; #X text 98 377 IEM KUG; #X text 73 363 musil; #X text 110 365 @; #X text 118 365 iem.at; #X text 81 387 Graz \, Austria; #X text 120 339 @; #X text 128 339 iem.at; #X text 33 338 (c) zmoelnig; #X text 33 352 (c) Thomas Musil 2000 - 2011; #X connect 0 0 4 0; #X connect 1 0 15 0; #X connect 2 0 0 0; #X connect 2 1 3 0; #X connect 3 0 0 1; #X connect 3 0 17 1; #X connect 4 0 6 0; #X connect 4 1 5 0; #X connect 5 0 3 1; #X connect 7 0 8 0; #X connect 8 0 9 0; #X connect 9 0 3 1; #X connect 15 0 16 0; #X connect 15 1 2 0; #X connect 16 0 17 0; #X connect 16 1 3 0; #X connect 17 0 18 0; #X connect 18 0 6 0; #X connect 18 1 5 0; #X restore 69 270 pd once; #X text 112 430 (c) Thomas Musil 2000 - 2011; #X connect 0 0 2 0; #X connect 0 0 9 0; #X connect 3 0 22 0; #X connect 4 0 3 0; #X connect 4 1 3 1; #X connect 8 0 21 0; #X connect 9 0 21 0; #X connect 11 0 25 0; #X connect 11 1 45 0; #X connect 15 0 17 1; #X connect 15 0 12 0; #X connect 16 0 19 0; #X connect 17 0 16 1; #X connect 18 0 16 0; #X connect 18 1 17 0; #X connect 18 2 15 1; #X connect 19 0 15 0; #X connect 19 0 36 0; #X connect 20 0 17 1; #X connect 21 0 4 0; #X connect 22 0 11 0; #X connect 22 0 18 0; #X connect 25 0 26 0; #X connect 26 0 28 0; #X connect 27 0 29 0; #X connect 28 0 27 0; #X connect 29 0 1 0; #X connect 30 0 31 0; #X connect 31 0 35 0; #X connect 35 0 33 0; #X connect 36 0 20 0; #X connect 43 0 42 0; #X connect 45 0 25 5; #X connect 45 0 25 4; #X restore 24 69 pd dsp; #X text 420 465 3.) initial argument: interpolation time in ms; #X text 421 449 2.) inital argument: maximum delay time in ms; #X text 421 433 1.) inital argument: number of delay taps = outlets; #X msg 428 194 time \$1; #X floatatom 428 168 5 0 0 0 - - -; #X msg 420 137 0; #X text 20 146 of n delay times in ms; #X text 472 174 interpolation time in ms; #X msg 96 165 0.1 0.2 0.3; #X msg 76 190 1.8 1.7 1.6; #X obj 299 70 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 1; #X obj 300 117 sel 0 1; #X obj 300 92 t f b; #X msg 578 136 6000; #N canvas 0 22 472 410 del_chain 0; #X obj 158 58 inlet; #X obj 128 341 outlet; #X obj 207 86 del 10; #X obj 207 106 del 990; #X obj 207 127 del 990; #X obj 207 148 del 990; #X obj 207 169 del 990; #X obj 207 190 del 990; #X obj 207 211 del 990; #X obj 207 233 del 990; #X obj 207 254 del 990; #X connect 0 0 2 0; #X connect 2 0 3 0; #X connect 2 0 1 0; #X connect 3 0 4 0; #X connect 3 0 1 0; #X connect 4 0 5 0; #X connect 4 0 1 0; #X connect 5 0 6 0; #X connect 5 0 1 0; #X connect 6 0 7 0; #X connect 6 0 1 0; #X connect 7 0 8 0; #X connect 7 0 1 0; #X connect 8 0 1 0; #X connect 8 0 9 0; #X connect 9 0 10 0; #X connect 9 0 1 0; #X connect 10 0 1 0; #X restore 326 154 pd del_chain; #X text 21 13 n_delay2p_line~; #X obj 202 283 n_delay2p_line~ 3 5 100; #X text 161 12 One signal inlet and n delay tap outlets. Delay times change every sample with a 2-point interpolation and are given in ms. ; #X connect 0 0 27 0; #X connect 1 0 27 0; #X connect 2 0 27 0; #X connect 3 0 7 0; #X connect 3 0 9 0; #X connect 3 0 8 0; #X connect 3 0 11 0; #X connect 3 0 12 0; #X connect 12 0 11 0; #X connect 12 0 39 0; #X connect 19 0 22 0; #X connect 22 0 20 0; #X connect 22 1 21 0; #X connect 26 0 39 0; #X connect 27 0 26 0; #X connect 28 0 27 0; #X connect 31 0 39 0; #X connect 32 0 39 0; #X connect 33 0 35 0; #X connect 34 0 31 0; #X connect 34 1 32 0; #X connect 35 0 34 0; #X connect 35 1 36 0; #X connect 35 1 37 0; #X connect 36 0 27 0; #X connect 37 0 3 0; #X connect 39 0 7 0; #X connect 39 1 9 0; #X connect 39 2 8 0; iem_utils-v0.0.20181004/iem_roomsim/block_peak_env~-help.pd0000644000175000017500000001205613355471360023626 0ustar zmoelnigzmoelnig#N canvas 456 157 568 471 10; #X text 119 399 IEM KUG; #X text 93 387 musil; #X text 131 387 @; #X text 139 387 iem.at; #X text 102 409 Graz \, Austria; #X obj 21 43 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 1 1 ; #X floatatom 21 111 5 0 0 0 - - -, f 5; #X floatatom 51 91 5 0 0 0 - - -, f 5; #N canvas 0 22 450 300 (subpatch) 0; #X array array100 100 float 0; #X coords 0 1.1 99 -0.1 100 50 1; #X restore 404 153 graph; #X obj 192 49 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X obj 405 274 hsl 100 15 0 99 0 0 empty empty empty -2 -6 0 8 -262144 -1 -1 0 1; #X floatatom 402 295 5 0 0 0 - - -, f 5; #X text 52 376 (c) Thomas Musil 2000 - 2011; #N canvas 0 22 450 300 dirac 0; #X obj 103 44 inlet; #X obj 103 65 t b b; #X obj 71 100 del 2; #X msg 126 112 1; #X msg 70 122 0; #X obj 92 151 biquad~ 0 0 1 -1 0; #X obj 92 176 max~ 0; #X obj 92 197 outlet~; #X connect 0 0 1 0; #X connect 1 0 2 0; #X connect 1 1 3 0; #X connect 2 0 4 0; #X connect 3 0 5 0; #X connect 4 0 5 0; #X connect 5 0 6 0; #X connect 6 0 7 0; #X restore 192 73 pd dirac; #N canvas 0 22 528 567 dsp 0; #X obj 20 65 inlet; #X obj 20 406 outlet; #X msg 31 88 \; pd dsp \$1; #X obj 20 199 cputime; #X obj 20 178 t b b; #X text 15 11 dsp; #X text 59 65 1/0 = ON/OFF; #X text 97 313 CPU-load; #X obj 62 126 loadbang; #X obj 20 126 sel 1; #X text 64 12 turn dsp-kernel on & off \,; #X obj 20 240 t f f; #X obj 211 405 outlet; #X text 65 408 average; #X text 177 405 peak; #X obj 211 154 f; #X obj 146 179 > -1; #X obj 169 155 f -1; #X obj 179 91 t f b f; #X obj 146 204 sel 1; #X obj 192 132 f -1; #X obj 20 154 metro 500; #X obj 20 220 * 0.2; #X text 74 37 -dsp-load in %; #X text 65 24 measure average- and peak-; #X obj 20 292 1p1z 0.1 0 0.9; #X obj 20 315 * 100; #X obj 20 360 int; #X obj 20 338 + 0.499; #X obj 20 383 * 0.01; #X obj 246 207 r pd; #X obj 246 231 route dsp; #X text 245 318 to toggle input; #X msg 246 283 \; dsp_tgl set \$1; #X obj 247 341 r dsp_tgl; #X obj 246 257 route float; #X obj 146 227 del 3990; #X text 179 455 IEM KUG; #X text 153 443 musil; #X text 190 443 @; #X text 199 443 iem.at; #X text 162 465 Graz \, Austria; #X msg 275 108 \; pd audio-dialog 0 0 0 0 64 0 0 0 0 0 0 0 64 0 0 0 44100 \$1; #X obj 275 81 inlet; #X text 271 56 system delay time in ms; #N canvas 0 22 486 468 once 0; #X obj 89 162 spigot; #X obj 34 59 inlet; #X obj 89 111 t a b; #X obj 126 140 f 1; #X obj 89 194 t a b; #X obj 119 216 f 0; #X obj 89 247 outlet; #X obj 207 56 inlet; #X obj 207 79 bang; #X obj 207 102 f 1; #X text 8 6 once; #X text 64 7 only the first message passes through; #X text 29 37 message in; #X text 29 289 message out (only once); #X text 203 36 anything to init once; #X obj 34 80 route bang; #X obj 34 110 t b b; #X obj 34 162 spigot; #X obj 34 194 t b b; #X text 98 377 IEM KUG; #X text 73 363 musil; #X text 110 365 @; #X text 118 365 iem.at; #X text 81 387 Graz \, Austria; #X text 120 339 @; #X text 128 339 iem.at; #X text 33 338 (c) zmoelnig; #X text 33 352 (c) Thomas Musil 2000 - 2011; #X connect 0 0 4 0; #X connect 1 0 15 0; #X connect 2 0 0 0; #X connect 2 1 3 0; #X connect 3 0 0 1; #X connect 3 0 17 1; #X connect 4 0 6 0; #X connect 4 1 5 0; #X connect 5 0 3 1; #X connect 7 0 8 0; #X connect 8 0 9 0; #X connect 9 0 3 1; #X connect 15 0 16 0; #X connect 15 1 2 0; #X connect 16 0 17 0; #X connect 16 1 3 0; #X connect 17 0 18 0; #X connect 18 0 6 0; #X connect 18 1 5 0; #X restore 69 270 pd once; #X text 112 430 (c) Thomas Musil 2000 - 2011; #X connect 0 0 2 0; #X connect 0 0 9 0; #X connect 3 0 22 0; #X connect 4 0 3 0; #X connect 4 1 3 1; #X connect 8 0 21 0; #X connect 9 0 21 0; #X connect 11 0 25 0; #X connect 11 1 45 0; #X connect 15 0 17 1; #X connect 15 0 12 0; #X connect 16 0 19 0; #X connect 17 0 16 1; #X connect 18 0 16 0; #X connect 18 1 17 0; #X connect 18 2 15 1; #X connect 19 0 15 0; #X connect 19 0 36 0; #X connect 20 0 17 1; #X connect 21 0 4 0; #X connect 22 0 11 0; #X connect 22 0 18 0; #X connect 25 0 26 0; #X connect 26 0 28 0; #X connect 27 0 29 0; #X connect 28 0 27 0; #X connect 29 0 1 0; #X connect 30 0 31 0; #X connect 31 0 35 0; #X connect 35 0 33 0; #X connect 36 0 20 0; #X connect 43 0 42 0; #X connect 45 0 25 5; #X connect 45 0 25 4; #X restore 21 65 pd dsp; #X obj 21 261 block~ 64 1 1; #X msg 21 239 set \$1 1 1; #X floatatom 20 220 5 0 0 0 - - -, f 5; #X msg 20 163 32; #X msg 20 188 64; #X text 130 10 Constant signal delay of one blocksize.; #X text 306 243 1st argument:; #X obj 191 281 tabsend~ array100; #X text 21 11 block_peak_env~; #X obj 162 243 block_peak_env~ 0.999; #X obj 192 104 biquad~ 0 0 0 0 1.2; #X obj 192 129 biquad~ 0 0 0 0 1.2; #X obj 192 153 biquad~ 0 0 0 0 1.2; #X obj 192 177 biquad~ 0 0 0 0 1.2; #X msg 288 203 0.999; #X msg 341 216 0.998; #X msg 229 215 0.9995; #X connect 5 0 14 0; #X connect 9 0 13 0; #X connect 10 0 11 0; #X connect 13 0 25 0; #X connect 14 0 6 0; #X connect 14 1 7 0; #X connect 16 0 15 0; #X connect 17 0 16 0; #X connect 18 0 17 0; #X connect 19 0 17 0; #X connect 24 0 22 0; #X connect 25 0 26 0; #X connect 26 0 27 0; #X connect 27 0 28 0; #X connect 28 0 24 0; #X connect 29 0 24 1; #X connect 30 0 24 1; #X connect 31 0 24 1; iem_utils-v0.0.20181004/iem_roomsim/READ_ME.txt0000644000175000017500000000405213355471360021045 0ustar zmoelnigzmoelnigThis library extends the performance of Miller S. Puckette's realtime-computermusic-environment puredata (pd). iem_roomsim contains 1 external library "iem_roomsim.dll" with 7 objects and their help files (see CONTENT.txt). The main topics are various kinds of delays, signal-block-manipulations and mirror image source method rendering for acoustical room simulation. iem_roomsim is published under the Gnu Lesser General Public License (see LICENSE.txt and GnuLGPL.txt). iem_roomsim (Release 1.21) is written by Thomas Musil from IEM KUG Graz Austria and it is compiled against pd-0.48-1. You have to add the library -lib iem_roomsim (Menue: File: Preferences: Startup...: New...). For Windows "install_path" could be: "C:/Users/xx_ME_xx/AppData/Roaming/Pd" or "C:/Program Files (x86)/Common Files/Pd" or "C:/Users/xx_ME_xx/Documents/Pd/externals" or "C:/Program Files (x86)/pd/extra". For Apple OSX: "install_path" could be: "~/Library/Pd" or "/Library/Pd" or "/Applications/Pd.app/Contents/Resources/extra". For Linux: "install_path" could be: "~/.local/lib/pd/extra" or "~/pd-externals" or "/usr/local/lib/pd-externals" or "/usr/local/lib/pd/extra" or "/usr/lib/pd/extra". Make sure that you get the desired version of iem_roomsim if there are multiple installations on your computer (-verbose). Copyright (C) 2000-2018 Thomas MUSIL [musil_at_iem.at] THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. iem_utils-v0.0.20181004/iem_roomsim/CONTENT.txt0000644000175000017500000000245113355471360021064 0ustar zmoelnigzmoelnig content of iem_roomsim Release 1.21 from March 2018 ----------------- block~, room-simulation, delay~ stuff ------------------------------- block_delay~ delays a signal by blocksize samples block_lp1~ this lowpass recursive filter forms the current spectrum bin by bin isolated to the previous spectrum bin by bin (time shape filtering of spectrum) block_peak_env~ this peak envelope recursive filter forms the current spectrum bin by bin isolated to the previous spectrum bin by bin (time shape filtering of spectrum) cart2del_damp_2d calculates the delay time, distance damping factor, azimuth angle of an acoustical mirror source up to the 2nd reflections cart2del_damp_3d calculates the delay time, distance damping factor, elevation and azimuth angles of an acoustical mirror source up to the 2nd reflections n_delay1p_line~ delays a signal to n taps with no interpolation n_delay2p_line~ delays a signal to n taps with a 2-point interpolation postscriptum: "cart2del_damp_2d" and "cart2del_damp_3d". this are 2 mirror image source method rendering objects, they calculate the radius distance, the delay time and the spheric coordinates in case of 3D or the polar coordinates in case of 2D of all the first and second reflections between an subjekt and an object in a cuboid room.iem_utils-v0.0.20181004/iem_roomsim/GnuLGPL.txt0000644000175000017500000006346713355471360021200 0ustar zmoelnigzmoelnig GNU LESSER GENERAL PUBLIC LICENSE Version 2.1, February 1999 Copyright (C) 1991, 1999 Free Software Foundation, Inc. 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. [This is the first released version of the Lesser GPL. It also counts as the successor of the GNU Library Public License, version 2, hence the version number 2.1.] Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public Licenses are intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This license, the Lesser General Public License, applies to some specially designated software packages--typically libraries--of the Free Software Foundation and other authors who decide to use it. You can use it too, but we suggest you first think carefully about whether this license or the ordinary General Public License is the better strategy to use in any particular case, based on the explanations below. When we speak of free software, we are referring to freedom of use, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish); that you receive source code or can get it if you want it; that you can change the software and use pieces of it in new free programs; and that you are informed that you can do these things. To protect your rights, we need to make restrictions that forbid distributors to deny you these rights or to ask you to surrender these rights. These restrictions translate to certain responsibilities for you if you distribute copies of the library or if you modify it. For example, if you distribute copies of the library, whether gratis or for a fee, you must give the recipients all the rights that we gave you. You must make sure that they, too, receive or can get the source code. If you link other code with the library, you must provide complete object files to the recipients, so that they can relink them with the library after making changes to the library and recompiling it. And you must show them these terms so they know their rights. We protect your rights with a two-step method: (1) we copyright the library, and (2) we offer you this license, which gives you legal permission to copy, distribute and/or modify the library. To protect each distributor, we want to make it very clear that there is no warranty for the free library. Also, if the library is modified by someone else and passed on, the recipients should know that what they have is not the original version, so that the original author's reputation will not be affected by problems that might be introduced by others. Finally, software patents pose a constant threat to the existence of any free program. We wish to make sure that a company cannot effectively restrict the users of a free program by obtaining a restrictive license from a patent holder. Therefore, we insist that any patent license obtained for a version of the library must be consistent with the full freedom of use specified in this license. Most GNU software, including some libraries, is covered by the ordinary GNU General Public License. This license, the GNU Lesser General Public License, applies to certain designated libraries, and is quite different from the ordinary General Public License. We use this license for certain libraries in order to permit linking those libraries into non-free programs. When a program is linked with a library, whether statically or using a shared library, the combination of the two is legally speaking a combined work, a derivative of the original library. The ordinary General Public License therefore permits such linking only if the entire combination fits its criteria of freedom. The Lesser General Public License permits more lax criteria for linking other code with the library. We call this license the "Lesser" General Public License because it does Less to protect the user's freedom than the ordinary General Public License. It also provides other free software developers Less of an advantage over competing non-free programs. These disadvantages are the reason we use the ordinary General Public License for many libraries. However, the Lesser license provides advantages in certain special circumstances. For example, on rare occasions, there may be a special need to encourage the widest possible use of a certain library, so that it becomes a de-facto standard. To achieve this, non-free programs must be allowed to use the library. A more frequent case is that a free library does the same job as widely used non-free libraries. In this case, there is little to gain by limiting the free library to free software only, so we use the Lesser General Public License. In other cases, permission to use a particular library in non-free programs enables a greater number of people to use a large body of free software. For example, permission to use the GNU C Library in non-free programs enables many more people to use the whole GNU operating system, as well as its variant, the GNU/Linux operating system. Although the Lesser General Public License is Less protective of the users' freedom, it does ensure that the user of a program that is linked with the Library has the freedom and the wherewithal to run that program using a modified version of the Library. The precise terms and conditions for copying, distribution and modification follow. Pay close attention to the difference between a "work based on the library" and a "work that uses the library". The former contains code derived from the library, whereas the latter must be combined with the library in order to run. GNU LESSER GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License Agreement applies to any software library or other program which contains a notice placed by the copyright holder or other authorized party saying it may be distributed under the terms of this Lesser General Public License (also called "this License"). Each licensee is addressed as "you". A "library" means a collection of software functions and/or data prepared so as to be conveniently linked with application programs (which use some of those functions and data) to form executables. The "Library", below, refers to any such software library or work which has been distributed under these terms. A "work based on the Library" means either the Library or any derivative work under copyright law: that is to say, a work containing the Library or a portion of it, either verbatim or with modifications and/or translated straightforwardly into another language. (Hereinafter, translation is included without limitation in the term "modification".) "Source code" for a work means the preferred form of the work for making modifications to it. For a library, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the library. Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running a program using the Library is not restricted, and output from such a program is covered only if its contents constitute a work based on the Library (independent of the use of the Library in a tool for writing it). Whether that is true depends on what the Library does and what the program that uses the Library does. 1. You may copy and distribute verbatim copies of the Library's complete source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and distribute a copy of this License along with the Library. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Library or any portion of it, thus forming a work based on the Library, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) The modified work must itself be a software library. b) You must cause the files modified to carry prominent notices stating that you changed the files and the date of any change. c) You must cause the whole of the work to be licensed at no charge to all third parties under the terms of this License. d) If a facility in the modified Library refers to a function or a table of data to be supplied by an application program that uses the facility, other than as an argument passed when the facility is invoked, then you must make a good faith effort to ensure that, in the event an application does not supply such function or table, the facility still operates, and performs whatever part of its purpose remains meaningful. (For example, a function in a library to compute square roots has a purpose that is entirely well-defined independent of the application. Therefore, Subsection 2d requires that any application-supplied function or table used by this function must be optional: if the application does not supply it, the square root function must still compute square roots.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Library, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Library, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Library. In addition, mere aggregation of another work not based on the Library with the Library (or with a work based on the Library) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may opt to apply the terms of the ordinary GNU General Public License instead of this License to a given copy of the Library. To do this, you must alter all the notices that refer to this License, so that they refer to the ordinary GNU General Public License, version 2, instead of to this License. (If a newer version than version 2 of the ordinary GNU General Public License has appeared, then you can specify that version instead if you wish.) Do not make any other change in these notices. Once this change is made in a given copy, it is irreversible for that copy, so the ordinary GNU General Public License applies to all subsequent copies and derivative works made from that copy. This option is useful when you wish to copy part of the code of the Library into a program that is not a library. 4. You may copy and distribute the Library (or a portion or derivative of it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange. If distribution of object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place satisfies the requirement to distribute the source code, even though third parties are not compelled to copy the source along with the object code. 5. A program that contains no derivative of any portion of the Library, but is designed to work with the Library by being compiled or linked with it, is called a "work that uses the Library". Such a work, in isolation, is not a derivative work of the Library, and therefore falls outside the scope of this License. However, linking a "work that uses the Library" with the Library creates an executable that is a derivative of the Library (because it contains portions of the Library), rather than a "work that uses the library". The executable is therefore covered by this License. Section 6 states terms for distribution of such executables. When a "work that uses the Library" uses material from a header file that is part of the Library, the object code for the work may be a derivative work of the Library even though the source code is not. Whether this is true is especially significant if the work can be linked without the Library, or if the work is itself a library. The threshold for this to be true is not precisely defined by law. If such an object file uses only numerical parameters, data structure layouts and accessors, and small macros and small inline functions (ten lines or less in length), then the use of the object file is unrestricted, regardless of whether it is legally a derivative work. (Executables containing this object code plus portions of the Library will still fall under Section 6.) Otherwise, if the work is a derivative of the Library, you may distribute the object code for the work under the terms of Section 6. Any executables containing that work also fall under Section 6, whether or not they are linked directly with the Library itself. 6. As an exception to the Sections above, you may also combine or link a "work that uses the Library" with the Library to produce a work containing portions of the Library, and distribute that work under terms of your choice, provided that the terms permit modification of the work for the customer's own use and reverse engineering for debugging such modifications. You must give prominent notice with each copy of the work that the Library is used in it and that the Library and its use are covered by this License. You must supply a copy of this License. If the work during execution displays copyright notices, you must include the copyright notice for the Library among them, as well as a reference directing the user to the copy of this License. Also, you must do one of these things: a) Accompany the work with the complete corresponding machine-readable source code for the Library including whatever changes were used in the work (which must be distributed under Sections 1 and 2 above); and, if the work is an executable linked with the Library, with the complete machine-readable "work that uses the Library", as object code and/or source code, so that the user can modify the Library and then relink to produce a modified executable containing the modified Library. (It is understood that the user who changes the contents of definitions files in the Library will not necessarily be able to recompile the application to use the modified definitions.) b) Use a suitable shared library mechanism for linking with the Library. A suitable mechanism is one that (1) uses at run time a copy of the library already present on the user's computer system, rather than copying library functions into the executable, and (2) will operate properly with a modified version of the library, if the user installs one, as long as the modified version is interface-compatible with the version that the work was made with. c) Accompany the work with a written offer, valid for at least three years, to give the same user the materials specified in Subsection 6a, above, for a charge no more than the cost of performing this distribution. d) If distribution of the work is made by offering access to copy from a designated place, offer equivalent access to copy the above specified materials from the same place. e) Verify that the user has already received a copy of these materials or that you have already sent this user a copy. For an executable, the required form of the "work that uses the Library" must include any data and utility programs needed for reproducing the executable from it. However, as a special exception, the materials to be distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. It may happen that this requirement contradicts the license restrictions of other proprietary libraries that do not normally accompany the operating system. Such a contradiction means you cannot use both them and the Library together in an executable that you distribute. 7. You may place library facilities that are a work based on the Library side-by-side in a single library together with other library facilities not covered by this License, and distribute such a combined library, provided that the separate distribution of the work based on the Library and of the other library facilities is otherwise permitted, and provided that you do these two things: a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities. This must be distributed under the terms of the Sections above. b) Give prominent notice with the combined library of the fact that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work. 8. You may not copy, modify, sublicense, link with, or distribute the Library except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense, link with, or distribute the Library is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 9. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Library or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Library (or any work based on the Library), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Library or works based on it. 10. Each time you redistribute the Library (or any work based on the Library), the recipient automatically receives a license from the original licensor to copy, distribute, link with or modify the Library subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties with this License. 11. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Library at all. For example, if a patent license would not permit royalty-free redistribution of the Library by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Library. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply, and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 12. If the distribution and/or use of the Library is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Library under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 13. The Free Software Foundation may publish revised and/or new versions of the Lesser General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Library specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Library does not specify a license version number, you may choose any version ever published by the Free Software Foundation. 14. If you wish to incorporate parts of the Library into other free programs whose distribution conditions are incompatible with these, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Libraries If you develop a new library, and you want it to be of the greatest possible use to the public, we recommend making it free software that everyone can redistribute and change. You can do so by permitting redistribution under these terms (or, alternatively, under the terms of the ordinary General Public License). To apply these terms, attach the following notices to the library. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Also add information on how to contact you by electronic and paper mail. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the library, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the library `Frob' (a library for tweaking knobs) written by James Random Hacker. , 1 April 1990 Ty Coon, President of Vice That's all there is to it! iem_utils-v0.0.20181004/iem_roomsim/Makefile0000644000175000017500000000323113355471360020646 0ustar zmoelnigzmoelnig#!/usr/bin/make -f # Makefile to the 'iem_roomsim' library for Pure Data. # Needs Makefile.pdlibbuilder as helper makefile for platform-dependent build # settings and rules (https://github.com/pure-data/pd-lib-builder). lib.name = iem_roomsim ## iemlib.h lives in include/ cflags = -Iinclude # special file that does not provide a class lib.setup.sources = src/$(lib.name).c # all other C and C++ files in subdirs are source files per class # (alternatively, enumerate them by hand) # class.sources = $(filter-out $(lib.setup.sources),$(wildcard src/*.c)) class.sources = \ src/early_reflections_3d.c \ src/early_reflections_2d.c \ src/cart2del_damp_2d.c \ src/cart2del_damp_3d.c \ src/n_delay1p_line~.c \ src/n_delay2p_line~.c \ src/nz~.c \ src/block_delay~.c \ src/block_lp1~.c \ src/block_peak_env~.c \ $(empty) datafiles = \ $(wildcard *.txt) \ $(wildcard *.pdf) \ $(wildcard *.pd) \ $(wildcard *.gif) \ $(wildcard *.bat) \ $(wildcard *.sh) \ $(wildcard *.wav) \ $(empty) #cflags = -DVERSION=$(shell cat VERSION.txt) ## build a multi-object library make-lib-executable=yes ## suppress "unused" warnings #suppress-wunused=yes ################################################################################ ### pdlibbuilder ############################################################### ################################################################################ # This Makefile is based on the Makefile from pd-lib-builder written by # Katja Vetter. You can get it from: # https://github.com/pure-data/pd-lib-builder PDLIBBUILDER_DIR=pd-lib-builder/ include $(firstword $(wildcard $(PDLIBBUILDER_DIR)/Makefile.pdlibbuilder Makefile.pdlibbuilder)) iem_utils-v0.0.20181004/iem_roomsim/include/0000755000175000017500000000000013355471360020632 5ustar zmoelnigzmoelnigiem_utils-v0.0.20181004/iem_roomsim/include/iem_roomsim.h0000644000175000017500000000046613355471360023330 0ustar zmoelnigzmoelnig/* For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. iem_roomsim written by Thomas Musil (c) IEM KUG Graz Austria 2002 - 2018 */ #ifndef __IEMROOMSIM_H__ #define __IEMROOMSIM_H__ #define DELLINE_DEF_VEC_SIZE 64 #endif iem_utils-v0.0.20181004/iem_roomsim/include/iemlib.h0000644000175000017500000001344013355471360022246 0ustar zmoelnigzmoelnig/* For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. iemlib written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2018 */ #ifndef __IEMLIB_H__ #define __IEMLIB_H__ #define IS_A_NULL(atom,index) ((atom+index)->a_type == A_NULL) #define IS_A_POINTER(atom,index) ((atom+index)->a_type == A_POINTER) #define IS_A_FLOAT(atom,index) ((atom+index)->a_type == A_FLOAT) #define IS_A_SYMBOL(atom,index) ((atom+index)->a_type == A_SYMBOL) #define IS_A_DOLLAR(atom,index) ((atom+index)->a_type == A_DOLLAR) #define IS_A_DOLLSYM(atom,index) ((atom+index)->a_type == A_DOLLSYM) #define IS_A_SEMI(atom,index) ((atom+index)->a_type == A_SEMI) #define IS_A_COMMA(atom,index) ((atom+index)->a_type == A_COMMA) #define SETNULL(atom) ((atom)->a_type = A_NULL) #ifdef MSW int sys_noloadbang; //t_symbol *iemgui_key_sym=0; #include #else extern int sys_noloadbang; //extern t_symbol *iemgui_key_sym; #include #endif //millers m_pd.h beg /* Microsoft Visual Studio is not C99, it does not provide stdint.h */ #ifdef _MSC_VER typedef signed __int8 int8_t; typedef signed __int16 int16_t; typedef signed __int32 int32_t; typedef signed __int64 int64_t; typedef unsigned __int8 uint8_t; typedef unsigned __int16 uint16_t; typedef unsigned __int32 uint32_t; typedef unsigned __int64 uint64_t; #else # include #endif #if !defined(PD_FLOATSIZE) /* if compiled pd version < 0.47*/ # define PD_FLOATSIZE 32 #endif typedef union { float f; unsigned int ui; }t_iemdenormal_f; typedef union { double f; unsigned int ui[2]; }t_iemdenormal_d; #ifndef _MSC_VER /* Microoft compiler can't handle "inline" function/macros */ #if defined(__i386__) || defined(__x86_64__) || defined(__arm__) /* a test for NANs and denormals. Should only be necessary on i386. */ static inline int IEM_DENORMAL_F(float f) /* malformed float 32 */ { t_iemdenormal_f pun; pun.f = f; pun.ui &= 0x7f800000; return((pun.ui == 0) | (pun.ui == 0x7f800000)); } static inline int IEM_DENORMAL_D(double f) /* malformed double 64 */ { t_iemdenormal_d pun; pun.f = f; pun.ui[1] &= 0x7ff00000; return((pun.ui[1] == 0) | (pun.ui[1] == 0x7ff00000)); } #if PD_FLOATSIZE == 32 typedef union { t_float f; unsigned int ui; }t_iemdenormal_t32; static inline int IEM_DENORMAL_T(t_float f) /* malformed t_float 32 */ { t_iemdenormal_t32 pun; pun.f = f; pun.ui &= 0x7f800000; return((pun.ui == 0) | (pun.ui == 0x7f800000)); } #elif PD_FLOATSIZE == 64 typedef union { t_float f; unsigned int ui[2]; }t_iemdenormal_t64; static inline int IEM_DENORMAL_T(t_float f) /* malformed t_float 64 */ { t_iemdenormal_t64 pun; pun.f = f; pun.ui[1] &= 0x7ff00000; return((pun.ui[1] == 0) | (pun.ui[1] == 0x7ff00000)); } #endif /* PD_FLOATSIZE */ #else /* not INTEL or ARM */ #define IEM_DENORMAL_T(f) 0 #endif #else /* _MSC_VER */ #define IEM_DENORMAL_F(f) ((((*(unsigned int*)&(f))&0x7f800000)==0) || \ (((*(unsigned int*)&(f))&0x7f800000)==0x7f800000)) static int IEM_DENORMAL_D(double f) /* malformed t_float 64 */ { t_iemdenormal_d pun; pun.f = f; pun.ui[1] &= 0x7ff00000; return((pun.ui[1] == 0) | (pun.ui[1] == 0x7ff00000)); } #if PD_FLOATSIZE == 32 #define IEM_DENORMAL_T(f) ((((*(unsigned int*)&(f))&0x7f800000)==0) || \ (((*(unsigned int*)&(f))&0x7f800000)==0x7f800000)) #else /* 64 bits... don't know what to do here */ //#define IEM_DENORMAL_T(f) (!(((f) >= 0) || ((f) <= 0))) int IEM_DENORMAL_T(t_float f) /* malformed t_float 64 */ { t_iemdenormal_t64 pun; pun.f = f; pun.ui[1] &= 0x7ff00000; return((pun.ui[1] == 0) | (pun.ui[1] == 0x7ff00000)); } #endif #endif /* _MSC_VER */ //millers m_pd.h end /* on 64bit systems we cannot use garray_getfloatarray... */ #if ((defined PD_MAJOR_VERSION && defined PD_MINOR_VERSION) && (PD_MAJOR_VERSION > 0 || PD_MINOR_VERSION > 40)) # define iemarray_t t_word # define iemarray_getarray garray_getfloatwords # define iemarray_getfloat(pointer, index) (pointer[index].w_float) # define iemarray_setfloat(pointer, index, fvalue) (pointer[index].w_float = fvalue) #else # define iemarray_t t_float # define iemarray_getarray garray_getfloatarray # define iemarray_getfloat(pointer, index) (pointer[index]) # define iemarray_setfloat(pointer, index, fvalue) (pointer[index] = fvalue) #endif #ifndef BUILD_DATE # define BUILD_DATE "" __DATE__ " : " __TIME__ #endif #if (defined PD_MAJOR_VERSION && defined PD_MINOR_VERSION) && (PD_MAJOR_VERSION > 0 || PD_MINOR_VERSION > 43) # define iem_open sys_open # define iem_close sys_close # define iem_fopen sys_fopen # define iem_fclose sys_fclose #else # define iem_open open # define iem_close close # define iem_fopen fopen # define iem_fclose fclose #endif // millers d_osc.c beg #define UNITBIT32 1572864. /* 3*2^19; bit 32 has place value 1 */ #if defined(__FreeBSD__) || defined(__APPLE__) || defined(__FreeBSD_kernel__) \ || defined(__OpenBSD__) #include #endif #if defined(__linux__) || defined(__CYGWIN__) || defined(__GNU__) || \ defined(ANDROID) #include #endif #ifdef __MINGW32__ #include #endif #ifdef _MSC_VER /* _MSVC lacks BYTE_ORDER and LITTLE_ENDIAN */ #define LITTLE_ENDIAN 0x0001 #define BYTE_ORDER LITTLE_ENDIAN #endif #if !defined(BYTE_ORDER) || !defined(LITTLE_ENDIAN) #error No byte order defined #endif #if BYTE_ORDER == LITTLE_ENDIAN # define HIOFFSET 1 # define LOWOFFSET 0 #else # define HIOFFSET 0 /* word offset to find MSB */ # define LOWOFFSET 1 /* word offset to find LSB */ #endif union tabfudge { double tf_d; int32_t tf_i[2]; }; // millers d_osc.c end // millers d_delay.c beg #define IEMDEFDELVS 64 #define IEMXTRASAMPS 4 #define IEMSAMPBLK 4 // millers d_delay.c end #endif iem_utils-v0.0.20181004/iem_roomsim/pd-lib-builder/0000755000175000017500000000000013355471360022002 5ustar zmoelnigzmoelnigiem_utils-v0.0.20181004/iem_roomsim/pd-lib-builder/Makefile.pdlibbuilder0000644000175000017500000012415213355471360026107 0ustar zmoelnigzmoelnig# Makefile.pdlibbuilder dated 2018-03-15 version = 0.5.1 # Helper makefile for Pure Data external libraries. # Written by Katja Vetter March-June 2015 for the public domain. No warranties. # Inspired by Hans Christoph Steiner's Makefile Template and Stephan Beal's # ShakeNMake. # # Grab the newest version of Makefile.pdlibbuilder from # https://github.com/pure-data/pd-lib-builder/ # # GNU make version >= 3.81 required. # # #=== characteristics =========================================================== # # # - defines build settings based on autodetected OS and architecture # - defines rules to build Pd class- or lib executables from C or C++ sources # - defines rules for libdir installation # - defines convenience targets for developer and user # - evaluates implicit dependencies for non-clean builds # # #=== basic usage =============================================================== # # # In your Makefile, define your Pd lib name and class files, and include # Makefile.pdlibbuilder at the end of the Makefile. Like so: # # ________________________________________________________________________ # # # Makefile for mylib # # lib.name = mylib # # class.sources = myclass1.c myclass2.c # # datafiles = myclass1-help.pd myclass2-help.pd README.txt LICENSE.txt # # include Makefile.pdlibbuilder # ________________________________________________________________________ # # # For files in class.sources it is assumed that class basename == source file # basename. The default target builds all classes as individual executables # with Pd's default extension for the platform. For anything more than the # most basic usage, continue reading. # # #=== list of Makefile.pdlibbuilder API variables =============================== # # # Variables available for definition in your library Makefile: # # - lib.name # - lib.setup.sources # - class.sources # - common.sources # - shared.sources # - .class.sources # - .class.ldflags # - .class.ldlibs # - cflags # - ldflags # - ldlibs # - datafiles # - datadirs # - makefiles # - makefiledirs # - externalsdir # # Optional multiline defines evaluated per operating system: # # - forLinux # - forDarwin # - forWindows # # Variables available for your makefile or make command line: # # - make-lib-executable # - suppress-wunused # # Path variables for make command line or environment: # # - PDDIR # - PDINCLUDEDIR # - PDBINDIR # - PDLIBDIR # # Standard make variables for make command line or environment: # # - CPPFLAGS # - CFLAGS # - LDFLAGS # - CC # - CXX # - INSTALL # - STRIP # - DESTDIR # # Deprecated path variables: # # - pdincludepath # - pdbinpath # - objectsdir # # #=== descriptions of Makefile.pdlibbuilder API variables ======================= # # # lib.name: # Name of the library directory as it will be installed / distributed. Also the # name of the lib executable in the case where all classes are linked into # a single binary. # # lib.setup.sources: # Source file(s) (C or C++) which must be compiled only when linking all classes # into a single lib binary. # # class.sources: # All sources files (C or C++) for which the condition holds that # class name == source file basename. # # .class.sources: # Source file(s) (C or C++) specific to class . Use this for # multiple-source classes or when class name != source file basename. # # common.sources: # Source file(s) which must be statically linked to each class in the library. # # shared.sources: # Source file(s) (C or C++) to build a shared dynamic link lib, to be linked # with all class executables. # # cflags, ldflags, ldlibs: # Define cflags (preprocessor&compiler), ldflags (linker) and ldlibs (dynamic # link libs) for the whole library. These flags are added to platform-specific # flags defined by Makefile.pdlibbuilder. # # .class.ldflags and .class.ldlibs: # Define ldflags resp. ldlibs specific to class . These flags are # added to platform-specific flags defined by Makefile.pdlibbuilder, and flags # defined in your Makefile for the whole library. Note: cflags can not be # defined per class in the current implementation. # # datafiles and datadirs: # All extra files you want to include in binary distributions of the # library: abstractions and help patches, example patches, meta patch, readme # and license texts, manuals, sound files, etcetera. Use 'datafiles' for all # files that should go into your lib rootdir and 'datadirs' for complete # directories you want to copy from source to distribution. # # forLinux, forDarwin, forWindows: # Shorthand for 'variable definitions for Linux only' etc. Use like: # define forLinux # cflags += -DLINUX # class.sources += linuxthing.c # endef # # makefiles and makefiledirs: # Extra makefiles or directories with makefiles that should be made in sub-make # processes. # # make-lib-executable: # When this variable is defined 'yes' in your makefile or as command argument, # Makefile.pdlibbuilder will try to build all classes into a single library # executable (but it will force exit if lib.setup.sources is undefined). # If your makefile defines 'make-lib-executable=yes' as the library default, # this can still be overridden with 'make-lib-executable=no' as command argument # to build individual class executables (the Makefile.pdlibbuilder default.) # # suppress-wunused: # When this variable is defined ('yes' or any other value), -Wunused-variable, # -Wunused-parameter, -Wunused-value and -Wunused-function are suppressed, # but the other warnings from -Wall are retained. # # PDDIR: # Root directory of 'portable' pd package. When defined, PDINCLUDEDIR and # PDBINDIR will be evaluated as $(PDDIR)/src and $(PDDIR)/bin. # # PDINCLUDEDIR: # Directory where Pd API m_pd.h should be found, and other Pd header files. # Overrides the default search path. # # PDBINDIR: # Directory where pd.dll should be found for linking (Windows only). Overrides # the default search path. # # PDLIBDIR: # Root directory for installation of Pd library directories. Overrides the # default install location. # # DESTDIR: # Prepended path component for staged install. # # CPPFLAGS: # Preprocessor flags which are not strictly required for building. # # CFLAGS: # Compiler flags which are not strictly required for building. Compiler flags # defined by Makefile.pdlibbuilder for warning, optimization and architecture # specification are overriden by CFLAGS. # # LDFLAGS: # Linker flags which are not strictly required for building. Linker flags # defined by Makefile.pdlibbuilder for architecture specification are overriden # by LDFLAGS. # # CC and CXX: # C and C++ compiler programs as defined in your build environment. # # INSTALL # Definition of install program. # # STRIP # Name of strip program. Default 'strip' can be overridden in cross compilation # environments. # # objectsdir: # Root directory for installation of Pd library directories, like PDLIBDIR but # not overridable by environment. Supported for compatibility with pd-extended # central makefile, but deprecated otherwise. # # pdincludepath, pdbinpath: # As PDINCLUDEDIR and PDBINDIR but not overridable by environment. Deprecated # as user variables. # # #=== paths ===================================================================== # # # Source files in directories other than current working directory must be # prefixed with their relative path. Do not rely on VPATH or vpath. # Object (.o) files are built in the directory of their source files. # Executables are built in current working directory. # # Default search path for m_pd.h and other API header files is platform # dependent, and overridable by PDINCLUDEDIR: # # Linux: /usr/include/pd # # OSX: /Applications/Pd*.app/Contents/Resources/src # # Windows: %PROGRAMFILES%/Pd/src # %PROGRAMFILES(X86)%/Pd/src (32 bit builds on 64 bit Windows) # # Default search path for binary pd.dll (Windows), overridable by PDBINDIR # # %PROGRAMFILES%/Pd/bin # %PROGRAMFILES(X86)%/Pd/bin (32 bit builds on 64 bit Windows) # # Default location to install pd libraries is platform dependent, and # overridable by PDLIBDIR: # # Linux: /usr/local/lib/pd-externals # OSX: ~/Library/Pd # Windows: %APPDATA%/Pd # # https://puredata.info/docs/faq/how-do-i-install-externals-and-help-files # The rationale for not installing to ~/pd-externals by default on Linux # is that some people share the home dir between 32 and 64 bit installations. # # #=== targets =================================================================== # # # all: build $(executables) plus optional post target # post: target to build after $(executables) # alldebug: build all with -g option turned on for debug symbols # : force clean build of an individual class # .pre: make preprocessor output file in current working directory # .lst: make asm/source output file in current working directory # # install: install executables and data files # clean: remove build products from source tree # # help: print help text # vars: print makefile variables # allvars: print all variables # depend: print generated prerequisites # coffee: dummy target # # Variable $(executables) expands to class executables plus optional shared lib, # or alternatively to single lib executable when make-lib-executable=true. # Targets pre and post can be defined by library makefile. Make sure to include # Makefile.pdlibbuilder first so default target all will not be redefined. # # #=== Pd-extended libdir concept ================================================ # # # For libdir layout as conceived by Hans-Christoph Steiner, see: # # https://puredata.info/docs/developer/Libdir # # Files README.txt, LICENSE.txt and -meta.pd are part of the libdir # convention. Help patches for each class and abstraction are supposed to be # available. Makefile.pdlibbuilder does not force the presence of these files # however. It does not automatically include such files in libdir installations. # Data files you want to include in distributions must be defined explicitly in # your Makefile. # # #=== Makefile.pdlibbuilder syntax conventions ================================== # # # Makefile.pdlibbuilder variable names are lower case. Default make variables, # environment variables, and standard user variables (CC, CXX, CFLAGS, DESTDIR) # are upper case. Use target 'allvars' to print all variables and their values. # # 'Fields' in data variables are separated by dots, like in 'foo.class.sources'. # Words in variables expressing a function or command are separated by dashes, # like in 'make-lib-executable'. # # #=== useful make options ======================================================= # # # Use 'make -d ' to print debug details of the make process. # Use 'make -p ' to print make's database. # # #=== TODO ====================================================================== # # # - decide whether to use -static-libgcc or shared dll in MinGW # - cygwin support # - android support # - figure out how to handle '$' in filenames # - add makefile template targets dpkg-source dist libdir distclean tags? # # #=== end of documentation sections ============================================= # # ################################################################################ ################################################################################ ################################################################################ # GNU make version 3.81 (2006) or higher is required because of the following: # - function 'info' # - variable '.DEFAULT_GOAL' # force exit when make version is < 3.81 ifneq ($(firstword $(sort 3.81 $(MAKE_VERSION))), 3.81) $(error GNU make version 3.81 or higher is required) endif # Relative path to externals root dir in multi-lib source tree like # pd-extended SVN. Default is parent of current working directory. May be # defined differently in including makefile. externalsdir ?= .. # variable you can use to check if Makefile.pdlibbuilder is already included Makefile.pdlibbuilder = true ################################################################################ ### variables: library name and version ######################################## ################################################################################ # strip possibles spaces from lib.name, they mess up calculated file names lib.name := $(strip $(lib.name)) # if meta file exists, check library version metafile := $(wildcard $(lib.name)-meta.pd) ifdef metafile lib.version := $(shell sed -n \ 's|^\#X text [0-9][0-9]* [0-9][0-9]* VERSION \(.*\);|\1|p' \ $(metafile)) endif ################################################################################ ### variables: files ########################################################### ################################################################################ #=== sources =================================================================== # (re)define .class.sources using file names in class.sources define add-class-source $(notdir $(basename $v)).class.sources += $v endef $(foreach v, $(class.sources), $(eval $(add-class-source))) # derive class names from .class.sources variables sourcevariables := $(filter %.class.sources, $(.VARIABLES)) classes := $(basename $(basename $(sourcevariables))) # accumulate all source files specified in makefile classes.sources := $(sort $(foreach v, $(sourcevariables), $($v))) all.sources := $(classes.sources) $(lib.setup.sources) \ $(shared.sources) $(common.sources) #=== object files ============================================================== # construct object filenames from all C and C++ source file names classes.objects := $(addsuffix .o, $(basename $(classes.sources))) common.objects := $(addsuffix .o, $(basename $(common.sources))) shared.objects := $(addsuffix .o, $(basename $(shared.sources))) lib.setup.objects := $(addsuffix .o, $(basename $(lib.setup.sources))) all.objects = $(classes.objects) $(common.objects) $(shared.objects) \ $(lib.setup.objects) #=== executables =============================================================== # use recursive variables here because executable extension is not yet known # construct class executable names from class names classes.executables = $(addsuffix .$(extension), $(classes)) # construct shared lib executable name if shared sources are defined ifdef shared.sources shared.lib = lib$(lib.name).$(shared.extension) else shared.lib = endif ################################################################################ ### platform detection ######################################################### ################################################################################ #=== operating system ========================================================== # The following systems are defined: Linux, Darwin, Windows. GNU and # GNU/kFreeBSD are treated as Linux to get the same options. uname := $(shell uname) ifeq ($(findstring $(uname), Linux GNU GNU/kFreeBSD), $(uname)) system = Linux endif ifeq ($(uname), Darwin) system = Darwin endif ifeq ($(filter MINGW% MSYS%, $(uname)), $(uname)) system = Windows endif # Unfortunately not all Mingw versions provide a link cc > gcc, therefore # gcc is hardcoded here (but not if CC is redefined). ifeq ($(system), Windows) ifeq ($(origin CC), default) CC = gcc endif endif # evaluate possible system-specific multiline defines from library makefile $(eval $(for$(system))) # TODO: Cygwin, Android #=== architecture ============================================================== # native architecture of the build machine build.arch := $(shell uname -m) # Target architecture as reported by compiler. Give precedence to eventual # user-defined compiler. The first field of -- is extracted. ifneq ($(origin CXX), default) dumpmachine.cpu = $(firstword $(subst -, ,$(shell $(CXX) -dumpmachine))) else dumpmachine.cpu = $(firstword $(subst -, ,$(shell $(CC) -dumpmachine))) endif # Target architecture as reported by compiler is only used for Windows at the # moment. For other systems this still has to be tested. ifeq ($(system), Windows) target.arch = $(dumpmachine.cpu) else target.arch = $(build.arch) endif ################################################################################ ### variables per platform ##################################################### ################################################################################ #=== flags per architecture ==================================================== # Set architecture-dependent cflags, mainly for Linux. For Mac and Windows, # arch.c.flags are overriden below. # Raspberry Pi 1st generation ifeq ($(target.arch), armv6l) arch.c.flags = -march=armv6 -mfpu=vfp -mfloat-abi=hard # Beagle, Udoo, RPi2 etc. else ifeq ($(target.arch), armv7l) arch.c.flags = -march=armv7-a -mfpu=vfpv3 -mfloat-abi=hard # Intel 32 bit, build with SSE and SSE2 instructions else ifeq ($(findstring $(target.arch), i386 i686), $(target.arch)) arch.c.flags = -march=pentium4 -mfpmath=sse -msse -msse2 # Intel/AMD 64 bit, build with SSE, SSE2 and SSE3 instructions else ifeq ($(findstring $(target.arch), x86_64), $(target.arch)) arch.c.flags = -march=core2 -mfpmath=sse -msse -msse2 -msse3 # if none of the above architectures detected else arch.c.flags = endif #=== flags and paths for Linux ================================================= ifeq ($(system), Linux) prefix = /usr/local libdir := $(prefix)/lib pkglibdir = $(libdir)/pd-externals pdincludepath := $(wildcard /usr/include/pd) extension = pd_linux cpp.flags := -DUNIX c.flags := -fPIC c.ldflags := -rdynamic -shared -fPIC -Wl,-rpath,"\$$ORIGIN",--enable-new-dtags c.ldlibs := -lc -lm cxx.flags := -fPIC -fcheck-new cxx.ldflags := -rdynamic -shared -fPIC -Wl,-rpath,"\$$ORIGIN",--enable-new-dtags cxx.ldlibs := -lc -lm -lstdc++ shared.extension = so shared.ldflags := -rdynamic -fPIC -shared -Wl,-soname,$(shared.lib) endif #=== flags and paths for Darwin ================================================ # On OSX we try to build fat binaries by default. It is assumed that OSX i386 # can build for ppc and OSX x86_64 can't. TODO: try to refine this condition. # LLVM-clang doesn't support -fcheck-new, therefore this flag is omitted for # OSX x86_64. ifeq ($(system), Darwin) pkglibdir = $(HOME)/Library/Pd pdincludepath := $(firstword $(wildcard \ /Applications/Pd*.app/Contents/Resources/src)) extension = pd_darwin cpp.flags := -DUNIX -DMACOSX -I /sw/include c.flags := c.ldflags := -undefined suppress -flat_namespace -bundle c.ldlibs := -lc cxx.ldflags := -undefined suppress -flat_namespace -bundle cxx.ldlibs := -lc shared.extension = dylib shared.ldflags = -dynamiclib -undefined dynamic_lookup \ -install_name @loader_path/$(shared.lib) \ -compatibility_version 1 -current_version 1.0 version.flag := $(filter $(cflags), -mmacosx-version-min=%) ifeq ($(target.arch), i386) cxx.flags := -fcheck-new arch := ppc i386 x86_64 version.flag ?= -mmacosx-version-min=10.4 endif ifeq ($(target.arch), x86_64) arch := i386 x86_64 version.flag ?= -mmacosx-version-min=10.5 endif arch.c.flags := $(addprefix -arch , $(arch)) $(version.flag) arch.ld.flags := $(arch.c.flags) endif #=== flags and paths for Windows =============================================== # Standard paths on Windows contain spaces, and GNU make functions treat such # paths as lists, with unintended effects. Therefore we must use shell function # ls instead of make's wildcard when probing for a path, and use double quotes # when specifying a path in a command argument. # Default paths in Mingw / Mingw-w64 environments. 'PROGRAMFILES' is standard # location for builds with native architecture, 'ProgramFiles(x86)' for i686 # builds on x86_64 Windows (detection method by Lucas Cordiviola). Curly braces # required because of parentheses in variable name. ifeq ($(system), Windows) pkglibdir := $(APPDATA)/Pd ifeq ($(MINGW_CHOST), i686-w64-mingw32) programfiles := ${ProgramFiles(x86)} else programfiles := $(PROGRAMFILES) endif pdbinpath := $(programfiles)/Pd/bin pdincludepath := $(programfiles)/Pd/src endif # Store default path to pd.dll in PDBINDIR if the latter is not user-defined. # For include path this is done in the platform-independent paths section below, # but for PDBINDIR it is done here so ld flags can be evaluated as immediate # variables. ifeq ($(system), Windows) ifdef PDDIR PDBINDIR := $(PDDIR)/bin endif PDBINDIR ?= $(pdbinpath) endif # TODO: decide whether -mms-bitfields should be specified. ifeq ($(system), Windows) cpp.flags := -DMSW -DNT ifeq ($(filter i%86 mingw32, $(target.arch)), $(target.arch)) arch.c.flags := -march=pentium4 -msse -msse2 -mfpmath=sse else ifeq (x86_64, $(target.arch)) cpp.flags := -DMSW -DNT -DPD_LONGINTTYPE=__int64 arch.c.flags := -march=core2 -msse -msse2 -msse3 -mfpmath=sse else arch.c.flags = endif extension = dll c.flags := c.ldflags := -static-libgcc -shared \ -Wl,--enable-auto-import "$(PDBINDIR)/pd.dll" c.ldlibs := cxx.flags := -fcheck-new cxx.ldflags := -static-libgcc -static-libstdc++ -shared \ -Wl,--enable-auto-import "$(PDBINDIR)/pd.dll" cxx.ldlibs := shared.extension = dll shared.ldflags := -static-libgcc -shared "$(PDBINDIR)/pd.dll" stripflags = --strip-all endif #=== paths ===================================================================== # Platform-dependent default paths are specified above, but overridable. # Path variables in upper case can be defined as make command argument or in the # environment. Variable 'objectsdir' is supported for compatibility with # the build system that pd-l2ork has inherited from pd-extended. PDINCLUDEDIR ?= $(pdincludepath) PDLIBDIR ?= $(firstword $(objectsdir) $(pkglibdir)) ifdef PDDIR PDINCLUDEDIR := $(wildcard $(PDDIR)/src) endif # base path where all components of the lib will be installed by default installpath := $(DESTDIR)$(PDLIBDIR)/$(lib.name) # check if include path contains spaces (as is often the case on Windows) # if so, store the path so we can later do checks with it pdincludepathwithspaces := $(if $(word 2, $(PDINCLUDEDIR)), $(PDINCLUDEDIR)) #=== accumulated build flags =================================================== # From GNU make docs: 'Users expect to be able to specify CFLAGS freely # themselves.' So we use CFLAGS to define options which are not strictly # required for compilation: optimizations, architecture specifications, and # warnings. CFLAGS can be safely overriden using a make command argument. # Variables cflags, ldflags and ldlibs may be defined in including makefile. optimization.flags = -O3 -ffast-math -funroll-loops -fomit-frame-pointer warn.flags = -Wall -Wextra -Wshadow -Winline -Wstrict-aliasing # suppress -Wunused-variable & Co if you don't want to clutter a build log ifdef suppress-wunused warn.flags += $(addprefix -Wno-unused-, function parameter value variable) endif CFLAGS = $(warn.flags) $(optimization.flags) $(arch.c.flags) # preprocessor flags cpp.flags := -DPD -I "$(PDINCLUDEDIR)" $(cpp.flags) $(CPPFLAGS) # flags for dependency checking (cflags from makefile may define -I options) depcheck.flags := $(cpp.flags) $(cflags) # architecture specifications for linker are overridable by LDFLAGS LDFLAGS := $(arch.ld.flags) # now add the same ld flags to shared dynamic lib shared.ldflags := $(shared.ldflags) $(LDFLAGS) # accumulated flags for C compiler / linker c.flags := $(cpp.flags) $(c.flags) $(cflags) $(CFLAGS) c.ldflags := $(c.ldflags) $(ldflags) $(LDFLAGS) c.ldlibs := $(c.ldlibs) $(ldlibs) # accumulated flags for C++ compiler / linker cxx.flags := $(cpp.flags) $(cxx.flags) $(cflags) $(CFLAGS) cxx.ldflags := $(cxx.ldflags) $(ldflags) $(LDFLAGS) cxx.ldlibs := $(cxx.ldlibs) $(ldlibs) ################################################################################ ### variables: tools ########################################################### ################################################################################ # aliases so we can later define 'compile-$1' and set 'c' or 'cxx' as argument compile-c := $(CC) compile-cxx := $(CXX) ################################################################################ ### checks ##################################################################### ################################################################################ # At this point most variables are defined. Now do some checks and info's # before rules begin. # 'forward declaration' of default target, needed to do checks all: # To avoid unpredictable results, make sure the default target is not redefined # by including makefile. ifneq ($(.DEFAULT_GOAL), all) $(error Default target must be 'all'.) endif # find out which target(s) will be made ifdef MAKECMDGOALS goals := $(MAKECMDGOALS) else goals := all endif # store path to Pd API m_pd.h if it is found ifdef PDINCLUDEDIR mpdh := $(shell ls "$(PDINCLUDEDIR)/m_pd.h") endif # store path to pd.dll; if not found, ls will give a useful error ifeq ($(system), Windows) pddll := $(shell ls "$(PDBINDIR)/pd.dll") endif # print Makefile.pdlibbuilder version $(info ++++ info: using Makefile.pdlibbuilder version $(version)) # when making target all, check if m_pd.h is found and print info about it ifeq ($(goals), all) $(if $(mpdh), \ $(info ++++ info: using Pd API $(mpdh)), \ $(warning Where is Pd API m_pd.h? Do 'make help' for info.)) endif # print target info $(info ++++ info: making target $(goals) $(if $(lib.name),in lib $(lib.name))) # when installing, print installpath info $(if $(filter install install-lib, $(goals)), $(info ++++ info: \ installpath is '$(installpath)')) #=== define executables ======================================================== # By default we build class executables, and optionally a shared dynamic link # lib. When make-lib-executable=yes we build all classes into a single lib # executable, on the condition that variable lib.setup.sources is defined. ifeq ($(make-lib-executable),yes) $(if $(lib.setup.sources), ,\ $(error Can not build library blob because lib.setup.sources is undefined)) executables := $(lib.name).$(extension) else executables := $(classes.executables) $(shared.lib) endif ################################################################################ ### rules: special targets ##################################################### ################################################################################ # Disable built-in rules. If some target can't be built with the specified # rules, it should not be built at all. MAKEFLAGS += --no-builtin-rules .PRECIOUS: .SUFFIXES: .PHONY: all post build-lib \ $(classes) $(makefiledirs) $(makefiles) \ install install-executables install-datafiles install-datadirs \ force clean vars allvars depend help ################################################################################ ### rules: build targets ####################################################### ################################################################################ # Target all forces the build of targets [$(executables) post] in # deterministic order. Target $(executables) builds class executables plus # optional shared lib or alternatively a single lib executable when # make-lib-executable=true. Target post is optionally defined by # library makefile. all: post post: $(executables) all: $(info ++++info: target all in lib $(lib.name) completed) # build all with -g option turned on for debug symbols alldebug: c.flags += -g alldebug: cxx.flags += -g alldebug: all #=== class executable ========================================================== # recipe for linking objects in class executable # argument $1 = compiler type (c or cxx) # argument $2 = class basename define link-class $(compile-$1) \ $($1.ldflags) $($2.class.ldflags) \ -o $2.$(extension) \ $(addsuffix .o, $(basename $($2.class.sources))) \ $(addsuffix .o, $(basename $(common.sources))) \ $($1.ldlibs) $($2.class.ldlibs) $(shared.lib) endef # general rule for linking object files in class executable %.$(extension): $(shared.lib) $(info ++++ info: linking objects in $@ for lib $(lib.name)) $(if $(filter %.cc %.cpp, $($*.class.sources)), \ $(call link-class,cxx,$*), \ $(call link-class,c,$*)) #=== library blob ============================================================== # build all classes into single executable build-lib: $(lib.name).$(extension) $(info ++++ info: library blob $(lib.name).$(extension) completed) # recipe for linking objects in lib executable # argument $1 = compiler type (c or cxx) define link-lib $(compile-$1) \ $($1.ldflags) $(lib.ldflags) \ -o $(lib.name).$(extension) $(all.objects) \ $($1.ldlibs) $(lib.ldlibs) endef # rule for linking objects in lib executable # declared conditionally to avoid name clashes ifeq ($(make-lib-executable),yes) $(lib.name).$(extension): $(all.objects) $(if $(filter %.cc %.cpp, $(all.sources)), \ $(call link-lib,cxx), \ $(call link-lib,c)) endif #=== shared dynamic lib ======================================================== # recipe for linking objects in shared executable # argument $1 = compiler type (c or cxx) define link-shared $(compile-$1) \ $(shared.ldflags) \ -o lib$(lib.name).$(shared.extension) $(shared.objects) \ $($1.ldlibs) $(shared.ldlibs) endef # rule for linking objects in shared executable # build recipe is in macro 'link-shared' lib$(lib.name).$(shared.extension): $(shared.objects) $(info ++++ info: linking objects in shared lib $@) $(if $(filter %.cc %.cpp, $(shared.sources)), \ $(call link-shared,cxx), \ $(call link-shared,c)) #=== object files ============================================================== # recipe to make .o file from source # argument $1 is compiler type (c or cxx) define make-object-file $(info ++++ info: making $@ in lib $(lib.name)) $(compile-$1) \ $($1.flags) \ -o $@ -c $< endef # Three rules to create .o files. These are double colon 'terminal' rules, # meaning they are the last in a rules chain. %.o:: %.c $(call make-object-file,c) %.o:: %.cc $(call make-object-file,cxx) %.o:: %.cpp $(call make-object-file,cxx) #=== explicit prerequisites for class executables ============================== # For class executables, prerequisite rules are declared in run time. Target # 'depend' prints these rules for debugging purposes. # declare explicit prerequisites rule like 'class: class.extension' # argument $v is class basename define declare-class-target $v: $v.$(extension) endef # declare explicit prerequisites rule like 'class.extension: object1.o object2.o' # argument $v is class basename define declare-class-executable-target $v.$(extension): $(addsuffix .o, $(basename $($v.class.sources))) \ $(addsuffix .o, $(basename $(common.sources))) endef # evaluate explicit prerequisite rules for all classes $(foreach v, $(classes), $(eval $(declare-class-target))) $(foreach v, $(classes), $(eval $(declare-class-executable-target))) #=== implicit prerequisites for class executables ============================== # Evaluating implicit prerequisites (header files) with help from the # preprocessor is 'expensive' so this is done conditionally and selectively. # Note that it is also possible to trigger a build via install targets, in # which case implicit prerequisites are not checked. # When the Pd include path contains spaces it will mess up the implicit # prerequisites rules. disable-dependency-tracking := $(strip $(pdincludepathwithspaces)) ifndef disable-dependency-tracking must-build-everything := $(filter all, $(goals)) must-build-class := $(filter $(classes), $(goals)) must-build-sources := $(foreach v, $(must-build-class), $($v.class.sources)) endif # declare implicit prerequisites rule like 'object.o: header1.h header2.h ...' # argument $1 is input source file(s) # dir is explicitly added because option -MM strips it by default define declare-object-target $(dir $1)$(filter %.o: %.h, $(shell $(CPP) $(depcheck.flags) -MM $1)) $(MAKEFILE_LIST) endef # evaluate implicit prerequisite rules when rebuilding everything ifdef must-build-everything $(if $(wildcard $(all.objects)), \ $(info ++++ info: evaluating implicit prerequisites in lib $(lib.name).....) \ $(foreach v, $(all.sources), $(eval $(call declare-object-target, $v)))) endif # evaluate implicit prerequisite rules when selectively building classes ifdef must-build-class $(foreach v, $(must-build-sources), \ $(eval $(call declare-object-target, $v))) $(foreach v, $(shared.sources), \ $(eval $(call declare-object-target, $v))) endif ################################################################################ ### rules: preprocessor and assembly files ##################################### ################################################################################ # Preprocessor and assembly output files for bug tracing etc. They are not part # of the build processes for executables. By default these files are created in # the current working directory. Dependency tracking is not performed, the build # is forced instead to make sure it's up to date. force: #=== preprocessor file ========================================================= # make preprocessor output file with extension .pre # argument $1 = compiler type (c or cxx) define make-preprocessor-file $(info ++++ info: making preprocessor output file $(notdir $*.pre) \ in current working directory) $(compile-$1) -E $< $(c.flags) $($1.flags) -o $(notdir $*.pre) endef %.pre:: %.c force $(call make-preprocessor-file,c) %.pre:: %.cc force $(call make-preprocessor-file,cxx) %.pre:: %.cpp force $(call make-preprocessor-file,cxx) #=== assembly file ============================================================= # make C / assembly interleaved output file with extension .lst # argument $1 = compiler type (c or cxx) define make-assembly-file $(info ++++ info: making assembly output file $(notdir $*.lst) \ in current working directory) $(compile-$1) \ -c -Wa,-a,-ad -fverbose-asm \ $($1.flags) \ $< > $(notdir $*.lst) endef %.lst:: %.c force $(call make-assembly-file,c) %.lst:: %.cc force $(call make-assembly-file,cxx) %.lst:: %.cpp force $(call make-assembly-file,cxx) ################################################################################ ### rules: installation targets ################################################ ################################################################################ #=== strip ===================================================================== # Stripping of installed binaries will only be done when variable 'stripflags' # is defined non-empty. No default definition is provided except for Windows # where the unstripped binaries are large, especially in the case of Mingw-w64. # Note: while stripping all symbols ('-s' or '--strip-all') is possible for # Linux and Windows, in the case of OSX only non-global symbols can be stripped # (option '-x' or '--discard-all'). # Make definition of strip command overridable so it can be defined in an # environment for cross-compilation. STRIP ?= strip # Commands in 'strip-executables' will be executed conditionally in the rule for # target 'install-executables'. strip-executables = cd "$(installpath)" && \ $(foreach v, $(executables), $(STRIP) $(stripflags) '$v';) #=== install =================================================================== # Install targets depend on successful exit status of target all because nothing # must be installed in case of a build error. # -p = preserve time stamps # -m = set permission mode (as in chmod) # -d = create all components of specified directories INSTALL = install INSTALL_PROGRAM := $(INSTALL) -p -m 644 INSTALL_DATA := $(INSTALL) -p -m 644 INSTALL_DIR := $(INSTALL) -m 755 -d # strip spaces from file names executables := $(strip $(executables)) datafiles := $(strip $(datafiles)) datadirs := $(strip $(datadirs)) # Do not make any install sub-target with empty variable definition because the # install program would exit with an error. install: $(if $(executables), install-executables) install: $(if $(datafiles), install-datafiles) install: $(if $(datadirs), install-datadirs) install-executables: all $(INSTALL_DIR) -v "$(installpath)" $(foreach v, $(executables), \ $(INSTALL_PROGRAM) '$v' "$(installpath)";) $(info ++++ info: executables of lib $(lib.name) installed \ from $(CURDIR) to $(installpath)) $(if $(stripflags), $(strip-executables),) install-datafiles: all $(INSTALL_DIR) -v "$(installpath)" $(foreach v, $(datafiles), \ $(INSTALL_DATA) '$(v)' "$(installpath)";) $(info ++++ info: data files of lib $(lib.name) installed \ from $(CURDIR) to $(installpath)) install-datadirs: all $(foreach v, $(datadirs), $(INSTALL_DIR) "$(installpath)/$v";) $(foreach v, $(datadirs), \ $(INSTALL_DATA) $(wildcard $v/*) "$(installpath)/$v";) $(info ++++ info: data directories of lib $(lib.name) installed \ from $(CURDIR) to $(installpath)) ################################################################################ ### rules: distribution targets ################################################ ################################################################################ # TODO # These targets are implemented in Makefile Template, but I have to figure out # how to do it under the not-so-strict conditions of Makefile.pdlibbuilder. # make source package dist: @echo "target dist not yet implemented" # make Debian source package dpkg-source: @echo "target dpkg-source not yet implemented" $(ORIGDIR): $(DISTDIR): ################################################################################ ### rules: clean targets ####################################################### ################################################################################ # delete build products from build tree clean: rm -f $(all.objects) rm -f $(classes.executables) $(lib.name).$(extension) $(shared.lib) rm -f *.pre *.lst # remove distribution directories and tarballs from build tree distclean: clean @echo "target distclean not yet implemented" ################################################################################ ### rules: submake targets ##################################################### ################################################################################ # Iterate over sub-makefiles or makefiles in other directories. # When 'continue-make=yes' is set, sub-makes will report 'true' to the parent # process regardless of their real exit status. This prevents the parent make # from being aborted by a sub-make error. Useful when you want to quickly find # out which sub-makes from a large set will succeed. ifeq ($(continue-make),yes) continue = || true endif # These targets will trigger sub-make processes for entries in 'makefiledirs' # and 'makefiles'. all alldebug install clean distclean dist dkpg-source: \ $(makefiledirs) $(makefiles) # this expands to identical rules for each entry in 'makefiledirs' $(makefiledirs): $(MAKE) --directory=$@ $(MAKECMDGOALS) $(continue) # this expands to identical rules for each entry in 'makefiles' $(makefiles): $(MAKE) --directory=$(dir $@) --makefile=$(notdir $@) $(MAKECMDGOALS) $(continue) ################################################################################ ### rules: convenience targets ################################################# ################################################################################ #=== show variables ============================================================ # Several 'function' macro's cause errors when expanded within a rule or without # proper arguments. Variables which are set with the define directive are only # shown by name for that reason. functions = \ add-class-source \ declare-class-target \ declare-class-executable-target \ declare-object-target \ link-class \ link-lib \ link-shared \ make-object-file \ make-preprocessor-file \ make-assembly-file # show variables from makefiles vars: $(info ++++ info: showing makefile variables:) $(foreach v,\ $(sort $(filter-out $(functions) functions, $(.VARIABLES))),\ $(if $(filter file, $(origin $v)),\ $(info variable $v = $($v)))) $(foreach v, $(functions), $(info 'function' name: $v)) @echo # show all variables allvars: $(info ++++ info: showing default, automatic and makefile variables:) $(foreach v, \ $(sort $(filter-out $(functions) functions, $(.VARIABLES))), \ $(info variable ($(origin $v)) $v = $($v))) $(foreach v, $(functions), $(info 'function' name: $v)) @echo #=== show dependencies ========================================================= # show generated prerequisites rules depend: $(info ++++ info: generated prerequisite rules) $(foreach v, $(classes), $(info $(declare-class-target))) $(foreach v, $(classes), $(info $(declare-class-executable-target))) $(foreach v, $(all.sources), $(info $(call declare-object-target, $v))) @echo #=== show help text ============================================================ # brief info about targets and paths ifdef mpdh mpdhinfo := $(mpdh) else mpdhinfo := m_pd.h was not found. Is Pd installed? endif help: @echo @echo " Main targets:" @echo " all: build executables (default target)" @echo " install: install all components of the library" @echo " vars: print makefile variables for troubleshooting" @echo " allvars: print all variables for troubleshooting" @echo " help: print this help text" @echo @echo " Pd API m_pd.h:" @echo " $(mpdhinfo)" @echo " You may specify your preferred Pd include directory as argument" @echo " to the make command, like 'PDINCLUDEDIR=path/to/pd/src'." @echo @echo " Path for installation of your libdir(s):" @echo " $(PDLIBDIR)" @echo " Alternatively you may specify your path for installation as argument" @echo " to the make command, like 'PDLIBDIR=path/to/pd-externals'." @echo @echo " Default paths are listed in the doc sections in Makefile.pdlibbuilder." @echo #=== dummy target ============================================================== coffee: @echo "Makefile.pdlibbuilder: Can not make coffee. Sorry." ################################################################################ ### end of rules sections ###################################################### ################################################################################ # for syntax highlighting in vim and github # vim: set filetype=make: iem_utils-v0.0.20181004/iem_roomsim/n_delay1p_line~-help.pd0000644000175000017500000001521213355471360023544 0ustar zmoelnigzmoelnig#N canvas 22 22 973 526 10; #X msg 454 136 100; #X msg 489 139 1000; #X msg 532 139 3000; #X obj 305 182 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #N canvas 0 22 450 300 (subpatch) 0; #X array array101 100 float 0; #X coords 0 1.1 99 -0.1 100 50 1; #X restore 845 186 graph; #N canvas 0 22 450 300 (subpatch) 0; #X array array102 100 float 0; #X coords 0 1.1 99 -0.1 100 50 1; #X restore 845 256 graph; #N canvas 0 22 450 300 (subpatch) 0; #X array array103 100 float 0; #X coords 0 1.1 99 -0.1 100 50 1; #X restore 845 326 graph; #X obj 203 309 tabwrite~ array101; #X obj 250 355 tabwrite~ array103; #X obj 225 332 tabwrite~ array102; #N canvas 0 22 450 300 (subpatch) 0; #X array array100 100 float 0; #X coords 0 1.1 99 -0.1 100 50 1; #X restore 845 116 graph; #X obj 304 254 tabwrite~ array100; #X obj 202 283 n_delay1p_line~ 3 5 100; #X text 21 13 n_delay1p_line~; #N canvas 0 22 450 300 dirac 0; #X obj 103 44 inlet; #X obj 103 65 t b b; #X obj 71 100 del 2; #X msg 126 112 1; #X msg 70 122 0; #X obj 92 151 biquad~ 0 0 1 -1 0; #X obj 92 176 max~ 0; #X obj 92 197 outlet~; #X connect 0 0 1 0; #X connect 1 0 2 0; #X connect 1 1 3 0; #X connect 2 0 4 0; #X connect 3 0 5 0; #X connect 4 0 5 0; #X connect 5 0 6 0; #X connect 6 0 7 0; #X restore 212 222 pd dirac; #X text 113 442 IEM KUG; #X text 87 430 musil; #X text 125 430 @; #X text 133 430 iem.at; #X text 96 452 Graz \, Austria; #X text 46 419 (c) Thomas Musil 2000 - 2011; #X obj 24 46 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 1 1 ; #X floatatom 24 110 5 0 0 0 - - -; #X floatatom 42 93 5 0 0 0 - - -; #N canvas 0 22 528 567 dsp 0; #X obj 20 65 inlet; #X obj 20 406 outlet; #X msg 31 88 \; pd dsp \$1; #X obj 20 199 cputime; #X obj 20 178 t b b; #X text 15 11 dsp; #X text 59 65 1/0 = ON/OFF; #X text 97 313 CPU-load; #X obj 62 126 loadbang; #X obj 20 126 sel 1; #X text 64 12 turn dsp-kernel on & off \,; #X obj 20 240 t f f; #X obj 211 405 outlet; #X text 65 408 average; #X text 177 405 peak; #X obj 211 154 f; #X obj 146 179 > -1; #X obj 169 155 f -1; #X obj 179 91 t f b f; #X obj 146 204 sel 1; #X obj 192 132 f -1; #X obj 20 154 metro 500; #X obj 20 220 * 0.2; #X text 74 37 -dsp-load in %; #X text 65 24 measure average- and peak-; #X obj 20 292 1p1z 0.1 0 0.9; #X obj 20 315 * 100; #X obj 20 360 int; #X obj 20 338 + 0.499; #X obj 20 383 * 0.01; #X obj 246 207 r pd; #X obj 246 231 route dsp; #X text 245 318 to toggle input; #X msg 246 283 \; dsp_tgl set \$1; #X obj 247 341 r dsp_tgl; #X obj 246 257 route float; #X obj 146 227 del 3990; #X text 179 455 IEM KUG; #X text 153 443 musil; #X text 190 443 @; #X text 199 443 iem.at; #X text 162 465 Graz \, Austria; #X msg 275 108 \; pd audio-dialog 0 0 0 0 64 0 0 0 0 0 0 0 64 0 0 0 44100 \$1; #X obj 275 81 inlet; #X text 271 56 system delay time in ms; #N canvas 0 22 486 468 once 0; #X obj 89 162 spigot; #X obj 34 59 inlet; #X obj 89 111 t a b; #X obj 126 140 f 1; #X obj 89 194 t a b; #X obj 119 216 f 0; #X obj 89 247 outlet; #X obj 207 56 inlet; #X obj 207 79 bang; #X obj 207 102 f 1; #X text 8 6 once; #X text 64 7 only the first message passes through; #X text 29 37 message in; #X text 29 289 message out (only once); #X text 203 36 anything to init once; #X obj 34 80 route bang; #X obj 34 110 t b b; #X obj 34 162 spigot; #X obj 34 194 t b b; #X text 98 377 IEM KUG; #X text 73 363 musil; #X text 110 365 @; #X text 118 365 iem.at; #X text 81 387 Graz \, Austria; #X text 120 339 @; #X text 128 339 iem.at; #X text 33 338 (c) zmoelnig; #X text 33 352 (c) Thomas Musil 2000 - 2011; #X connect 0 0 4 0; #X connect 1 0 15 0; #X connect 2 0 0 0; #X connect 2 1 3 0; #X connect 3 0 0 1; #X connect 3 0 17 1; #X connect 4 0 6 0; #X connect 4 1 5 0; #X connect 5 0 3 1; #X connect 7 0 8 0; #X connect 8 0 9 0; #X connect 9 0 3 1; #X connect 15 0 16 0; #X connect 15 1 2 0; #X connect 16 0 17 0; #X connect 16 1 3 0; #X connect 17 0 18 0; #X connect 18 0 6 0; #X connect 18 1 5 0; #X restore 69 270 pd once; #X text 112 430 (c) Thomas Musil 2000 - 2011; #X connect 0 0 2 0; #X connect 0 0 9 0; #X connect 3 0 22 0; #X connect 4 0 3 0; #X connect 4 1 3 1; #X connect 8 0 21 0; #X connect 9 0 21 0; #X connect 11 0 25 0; #X connect 11 1 45 0; #X connect 15 0 17 1; #X connect 15 0 12 0; #X connect 16 0 19 0; #X connect 17 0 16 1; #X connect 18 0 16 0; #X connect 18 1 17 0; #X connect 18 2 15 1; #X connect 19 0 15 0; #X connect 19 0 36 0; #X connect 20 0 17 1; #X connect 21 0 4 0; #X connect 22 0 11 0; #X connect 22 0 18 0; #X connect 25 0 26 0; #X connect 26 0 28 0; #X connect 27 0 29 0; #X connect 28 0 27 0; #X connect 29 0 1 0; #X connect 30 0 31 0; #X connect 31 0 35 0; #X connect 35 0 33 0; #X connect 36 0 20 0; #X connect 43 0 42 0; #X connect 45 0 25 5; #X connect 45 0 25 4; #X restore 24 69 pd dsp; #X text 161 12 One signal inlet and n delay tap outlets. Delay times change every sample without interpolation and are given in ms.; #X text 420 465 3.) initial argument: interpolation time in ms; #X text 421 449 2.) inital argument: maximum delay time in ms; #X text 421 433 1.) inital argument: number of delay taps = outlets; #X msg 428 194 time \$1; #X floatatom 428 168 5 0 0 0 - - -; #X msg 420 137 0; #X text 20 146 of n delay times in ms; #X text 472 174 interpolation time in ms; #X msg 96 165 0.1 0.2 0.3; #X msg 76 190 1.8 1.7 1.6; #X obj 299 70 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 1 1; #X obj 300 117 sel 0 1; #X obj 300 92 t f b; #X msg 578 136 6000; #N canvas 0 22 472 410 del_chain 0; #X obj 158 58 inlet; #X obj 128 341 outlet; #X obj 207 86 del 10; #X obj 207 106 del 990; #X obj 207 127 del 990; #X obj 207 148 del 990; #X obj 207 169 del 990; #X obj 207 190 del 990; #X obj 207 211 del 990; #X obj 207 233 del 990; #X obj 207 254 del 990; #X connect 0 0 2 0; #X connect 2 0 3 0; #X connect 2 0 1 0; #X connect 3 0 4 0; #X connect 3 0 1 0; #X connect 4 0 5 0; #X connect 4 0 1 0; #X connect 5 0 6 0; #X connect 5 0 1 0; #X connect 6 0 7 0; #X connect 6 0 1 0; #X connect 7 0 8 0; #X connect 7 0 1 0; #X connect 8 0 1 0; #X connect 8 0 9 0; #X connect 9 0 10 0; #X connect 9 0 1 0; #X connect 10 0 1 0; #X restore 326 154 pd del_chain; #X connect 0 0 30 0; #X connect 1 0 30 0; #X connect 2 0 30 0; #X connect 3 0 7 0; #X connect 3 0 9 0; #X connect 3 0 8 0; #X connect 3 0 11 0; #X connect 3 0 14 0; #X connect 12 0 7 0; #X connect 12 1 9 0; #X connect 12 2 8 0; #X connect 14 0 12 0; #X connect 14 0 11 0; #X connect 21 0 24 0; #X connect 24 0 22 0; #X connect 24 1 23 0; #X connect 29 0 12 0; #X connect 30 0 29 0; #X connect 31 0 30 0; #X connect 34 0 12 0; #X connect 35 0 12 0; #X connect 36 0 38 0; #X connect 37 0 34 0; #X connect 37 1 35 0; #X connect 38 0 37 0; #X connect 38 1 39 0; #X connect 38 1 40 0; #X connect 39 0 30 0; #X connect 40 0 3 0; iem_utils-v0.0.20181004/iem_roomsim/cart2del_damp_2d-help.pd0000644000175000017500000002044513355471360023555 0ustar zmoelnigzmoelnig#N canvas 11 8 974 613 10; #X text 11 9 cart2del_damp_2d; #X obj 48 288 cart2del_damp_2d; #X msg 59 83 sonic_speed 340; #X msg 67 104 r_ambi 1.4; #X obj 105 154 pack; #X obj 139 154 t b f; #X floatatom 98 137 5 -20 20 0 - - -; #X floatatom 141 137 5 -20 20 0 - - -; #X text 183 136 m x m; #X obj 151 225 pack; #X obj 185 225 t b f; #X floatatom 144 208 5 -20 20 0 - - -; #X floatatom 187 208 5 -20 20 0 - - -; #X text 229 207 m x m; #X obj 48 313 print; #X msg 105 175 head_xy \$1 \$2; #X msg 151 246 src_xy \$1 \$2; #X obj 96 314 s xxx; #X obj 368 19 r xxx; #X obj 368 41 route direct early1 early2; #X obj 368 424 route del damp index_phi; #X floatatom 368 508 5 0 0 0 - - -; #X floatatom 414 485 5 0 0 0 - - -; #X floatatom 460 465 5 0 0 0 - - -; #X obj 418 241 route del damp index_phi; #X floatatom 510 290 5 0 0 0 - - -; #X floatatom 551 290 5 0 0 0 - - -; #X obj 418 358 unpack 0 0 0 0; #X floatatom 418 380 5 0 0 0 - - -; #X floatatom 460 380 5 0 0 0 - - -; #X floatatom 502 380 5 0 0 0 - - -; #X floatatom 545 380 5 0 0 0 - - -; #X obj 464 309 unpack 0 0 0 0; #X floatatom 464 339 5 0 0 0 - - -; #X floatatom 506 339 5 0 0 0 - - -; #X floatatom 548 339 5 0 0 0 - - -; #X floatatom 591 339 5 0 0 0 - - -; #X obj 460 444 route 1; #X obj 510 265 route 1 2 3 4; #X floatatom 592 290 5 0 0 0 - - -; #X floatatom 633 290 5 0 0 0 - - -; #X obj 468 62 route del damp index_phi; #X floatatom 560 112 5 0 0 0 - - -; #X floatatom 601 112 5 0 0 0 - - -; #X floatatom 468 204 5 0 0 0 - - -; #X floatatom 510 204 5 0 0 0 - - -; #X floatatom 552 204 5 0 0 0 - - -; #X floatatom 595 204 5 0 0 0 - - -; #X floatatom 642 112 5 0 0 0 - - -; #X floatatom 683 112 5 0 0 0 - - -; #X obj 560 87 route 1 2 3 4 5 6 7 8; #X floatatom 724 112 5 0 0 0 - - -; #X floatatom 765 112 5 0 0 0 - - -; #X floatatom 806 112 5 0 0 0 - - -; #X floatatom 847 112 5 0 0 0 - - -; #X text 673 290 degree; #X text 587 379 ms; #X text 499 466 degree; #X text 409 508 ms; #X text 808 204 ms; #X obj 468 181 unpack 0 0 0 0 0 0 0 0; #X floatatom 637 204 5 0 0 0 - - -; #X floatatom 679 204 5 0 0 0 - - -; #X floatatom 721 204 5 0 0 0 - - -; #X floatatom 764 204 5 0 0 0 - - -; #X floatatom 514 156 5 0 0 0 - - -; #X floatatom 556 156 5 0 0 0 - - -; #X floatatom 598 156 5 0 0 0 - - -; #X floatatom 641 156 5 0 0 0 - - -; #X obj 514 133 unpack 0 0 0 0 0 0 0 0; #X floatatom 683 156 5 0 0 0 - - -; #X floatatom 725 156 5 0 0 0 - - -; #X floatatom 767 156 5 0 0 0 - - -; #X floatatom 810 156 5 0 0 0 - - -; #X text 885 110 degree; #X text 78 385 IEM KUG; #X text 62 373 musil; #X text 92 373 @; #X text 98 373 iem.at; #X text 61 395 Graz \, Austria; #X text 13 362 (c) Thomas Musil 2000 - 2006; #X text 163 81 sonic speed in meter per second; #X text 148 105 minimum raduis in meter; #X text 149 64 room dimensions in meter; #X text 237 250 object coordinates; #X text 194 174 subject coordinates; #X text 847 156 linear rms; #X text 629 338 linear rms; #X text 452 483 linear rms; #X text 684 378 |; #X text 684 386 |; #X text 684 394 |; #X text 684 402 |; #X text 720 378 |; #X text 720 386 |; #X text 720 394 |; #X text 720 402 |; #X text 756 378 |; #X text 756 386 |; #X text 756 394 |; #X text 756 402 |; #X text 792 378 |; #X text 792 386 |; #X text 792 394 |; #X text 792 402 |; #X text 828 378 |; #X text 828 386 |; #X text 828 394 |; #X text 828 402 |; #X text 768 322 + y; #X text 671 371 --+-----+-----+-----+-----+-----+--; #X text 864 378 |; #X text 864 386 |; #X text 864 394 |; #X text 864 402 |; #X text 684 416 |; #X text 684 424 |; #X text 684 432 |; #X text 684 440 |; #X text 720 416 |; #X text 720 424 |; #X text 720 432 |; #X text 720 440 |; #X text 756 416 |; #X text 756 424 |; #X text 756 432 |; #X text 756 440 |; #X text 792 416 |; #X text 792 424 |; #X text 792 432 |; #X text 792 440 |; #X text 828 416 |; #X text 828 424 |; #X text 828 432 |; #X text 828 440 |; #X text 671 409 --+-----+-----+-----+-----+-----+--; #X text 864 416 |; #X text 864 424 |; #X text 864 432 |; #X text 864 440 |; #X text 684 454 |; #X text 684 462 |; #X text 684 470 |; #X text 684 478 |; #X text 720 454 |; #X text 720 462 |; #X text 720 470 |; #X text 720 478 |; #X text 756 454 |; #X text 756 462 |; #X text 756 470 |; #X text 756 478 |; #X text 792 454 |; #X text 792 462 |; #X text 792 470 |; #X text 792 478 |; #X text 828 454 |; #X text 828 462 |; #X text 828 470 |; #X text 828 478 |; #X text 671 447 --+-----+-----+-----+-----+-----+--; #X text 864 454 |; #X text 864 462 |; #X text 864 470 |; #X text 864 478 |; #X text 684 492 |; #X text 684 500 |; #X text 684 508 |; #X text 684 516 |; #X text 720 492 |; #X text 720 500 |; #X text 720 508 |; #X text 720 516 |; #X text 756 492 |; #X text 756 500 |; #X text 756 508 |; #X text 756 516 |; #X text 792 492 |; #X text 792 500 |; #X text 792 508 |; #X text 792 516 |; #X text 828 492 |; #X text 828 500 |; #X text 828 508 |; #X text 828 516 |; #X text 671 485 --+-----+-----+-----+-----+-----+--; #X text 864 492 |; #X text 864 500 |; #X text 864 508 |; #X text 864 516 |; #X text 684 530 |; #X text 684 538 |; #X text 684 546 |; #X text 684 554 |; #X text 720 530 |; #X text 720 538 |; #X text 720 546 |; #X text 720 554 |; #X text 756 530 |; #X text 756 538 |; #X text 756 546 |; #X text 756 554 |; #X text 792 530 |; #X text 792 538 |; #X text 792 546 |; #X text 792 554 |; #X text 828 530 |; #X text 828 538 |; #X text 828 546 |; #X text 828 554 |; #X text 671 523 --+-----+-----+-----+-----+-----+--; #X text 864 530 |; #X text 864 538 |; #X text 864 546 |; #X text 864 554 |; #X text 671 561 --+-----+-----+-----+-----+-----+--; #X text 750 461 ___________________________; #X text 911 466 > + x; #X text 774 338 |; #X text 774 345 |; #X text 774 352 |; #X text 774 359 |; #X text 774 366 |; #X text 774 373 |; #X text 774 380 |; #X text 774 387 |; #X text 774 394 |; #X text 774 401 |; #X text 774 408 |; #X text 774 415 |; #X text 774 414 |; #X text 774 421 |; #X text 774 428 |; #X text 774 435 |; #X text 774 441 |; #X text 774 448 |; #X text 774 455 |; #X text 774 462 |; #X text 774 469 |; #X text 774 476 |; #X text 774 483 |; #X text 774 490 |; #X text 774 334 ^; #X text 799 474 e1_1; #X text 762 429 e1_2; #X text 728 474 e1_3; #X text 763 507 e1_4; #X text 835 474 e2_1; #X text 762 389 e2_2; #X text 692 474 e2_3; #X text 763 543 e2_4; #X text 800 429 e2_5; #X text 728 429 e2_8; #X text 728 505 e2_6; #X text 800 505 e2_7; #X text 767 474 d_1; #X text 799 246 d .. direct; #X text 794 258 e1 .. early 1; #X text 794 270 e2 .. early 2; #X text 793 345 mirror source rooms; #X msg 48 63 room_dim 20 10; #X text 564 6 renders the delay time \, the damping and the direction of direct \, early_1 and early_2 reflections in a cuboid room model (2 dimensional); #X connect 1 0 14 0; #X connect 1 0 17 0; #X connect 2 0 1 0; #X connect 3 0 1 0; #X connect 4 0 15 0; #X connect 5 0 4 0; #X connect 5 1 4 1; #X connect 6 0 4 0; #X connect 7 0 5 0; #X connect 9 0 16 0; #X connect 10 0 9 0; #X connect 10 1 9 1; #X connect 11 0 9 0; #X connect 12 0 10 0; #X connect 15 0 1 0; #X connect 16 0 1 0; #X connect 18 0 19 0; #X connect 19 0 20 0; #X connect 19 1 24 0; #X connect 19 2 41 0; #X connect 20 0 21 0; #X connect 20 1 22 0; #X connect 20 2 37 0; #X connect 24 0 27 0; #X connect 24 1 32 0; #X connect 24 2 38 0; #X connect 27 0 28 0; #X connect 27 1 29 0; #X connect 27 2 30 0; #X connect 27 3 31 0; #X connect 32 0 33 0; #X connect 32 1 34 0; #X connect 32 2 35 0; #X connect 32 3 36 0; #X connect 37 0 23 0; #X connect 38 0 25 0; #X connect 38 1 26 0; #X connect 38 2 39 0; #X connect 38 3 40 0; #X connect 41 0 60 0; #X connect 41 1 69 0; #X connect 41 2 50 0; #X connect 50 0 42 0; #X connect 50 1 43 0; #X connect 50 2 48 0; #X connect 50 3 49 0; #X connect 50 4 51 0; #X connect 50 5 52 0; #X connect 50 6 53 0; #X connect 50 7 54 0; #X connect 60 0 44 0; #X connect 60 1 45 0; #X connect 60 2 46 0; #X connect 60 3 47 0; #X connect 60 4 61 0; #X connect 60 5 62 0; #X connect 60 6 63 0; #X connect 60 7 64 0; #X connect 69 0 65 0; #X connect 69 1 66 0; #X connect 69 2 67 0; #X connect 69 3 68 0; #X connect 69 4 70 0; #X connect 69 5 71 0; #X connect 69 6 72 0; #X connect 69 7 73 0; #X connect 260 0 1 0; iem_utils-v0.0.20181004/iem_roomsim/cart2del_damp_3d-help.pd0000644000175000017500000003571113355471360023560 0ustar zmoelnigzmoelnig#N canvas 65 59 947 553 10; #X msg 28 87 sonic_speed 340; #X msg 36 108 r_ambi 1.4; #X obj 17 339 print; #X obj 65 340 s xxx; #X obj 307 27 r xxx; #X obj 307 49 route direct early1 early2; #X floatatom 307 520 5 0 0 0 - - -; #X floatatom 365 504 5 0 0 0 - - -; #X floatatom 423 487 5 0 0 0 - - -; #X floatatom 535 493 5 0 0 0 - - -; #X floatatom 555 512 5 0 0 0 - - -; #X floatatom 576 493 5 0 0 0 - - -; #X floatatom 596 512 5 0 0 0 - - -; #X obj 423 466 route 1; #X floatatom 318 270 5 0 0 0 - - -; #X floatatom 332 287 5 0 0 0 - - -; #X floatatom 347 304 5 0 0 0 - - -; #X floatatom 361 270 5 0 0 0 - - -; #X text 873 514 degree; #X text 659 495 ms; #X text 462 488 degree; #X text 344 520 ms; #X text 603 304 ms; #X floatatom 376 287 5 0 0 0 - - -; #X floatatom 390 304 5 0 0 0 - - -; #X floatatom 405 270 5 0 0 0 - - -; #X floatatom 419 287 5 0 0 0 - - -; #X text 15 7 cart2del_damp_3d; #X obj 17 314 cart2del_damp_3d; #X obj 172 261 t b f; #X floatatom 81 244 5 -20 20 0 - - -; #X floatatom 174 244 5 -20 20 0 - - -; #X obj 88 261 pack 0 0 0; #X obj 222 261 t b f; #X floatatom 224 244 5 0 30 0 - - -; #X text 147 224 m x m x m; #X obj 143 179 t b f; #X floatatom 52 162 5 -20 20 0 - - -; #X floatatom 145 162 5 -20 20 0 - - -; #X obj 59 179 pack 0 0 0; #X obj 193 179 t b f; #X floatatom 195 162 5 0 30 0 - - -; #X text 108 140 m x m x m; #X msg 88 282 src_xyz \$1 \$2 \$3; #X msg 59 200 head_xyz \$1 \$2 \$3; #X msg 17 66 room_dim 20 10 5; #X obj 322 72 route del damp index_theta_phi; #X obj 535 351 route del damp index_theta_phi; #X obj 307 445 route del damp index_theta_phi; #X obj 535 472 unpack 0 0 0 0 0 0; #X floatatom 617 493 5 0 0 0 - - -; #X floatatom 638 512 5 0 0 0 - - -; #X obj 753 398 route 1 2 3 4 5 6; #X floatatom 434 304 5 0 0 0 - - -; #X floatatom 448 270 5 0 0 0 - - -; #X floatatom 463 287 5 0 0 0 - - -; #X floatatom 477 304 5 0 0 0 - - -; #X floatatom 492 270 5 0 0 0 - - -; #X floatatom 506 287 5 0 0 0 - - -; #X floatatom 521 304 5 0 0 0 - - -; #X floatatom 535 270 5 0 0 0 - - -; #X floatatom 550 287 5 0 0 0 - - -; #X floatatom 565 304 5 0 0 0 - - -; #X obj 318 247 unpack 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0; #X obj 378 102 route 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18; #X text 90 404 IEM KUG; #X text 74 392 musil; #X text 104 392 @; #X text 110 392 iem.at; #X text 73 414 Graz \, Austria; #X text 25 381 (c) Thomas Musil 2000 - 2006; #X text 127 87 sonic speed in meter per second; #X text 111 108 minimum raduis in meter; #X text 118 68 room dimensions in meter; #X text 194 281 object coordinates; #X text 171 199 subject coordinates; #X text 594 658 |; #X text 594 666 |; #X text 594 674 |; #X text 594 682 |; #X text 630 658 |; #X text 630 666 |; #X text 630 674 |; #X text 630 682 |; #X text 666 658 |; #X text 666 666 |; #X text 666 674 |; #X text 666 682 |; #X text 702 658 |; #X text 702 666 |; #X text 702 674 |; #X text 702 682 |; #X text 738 658 |; #X text 738 666 |; #X text 738 674 |; #X text 738 682 |; #X text 678 602 + y; #X text 581 651 --+-----+-----+-----+-----+-----+--; #X text 774 658 |; #X text 774 666 |; #X text 774 674 |; #X text 774 682 |; #X text 594 696 |; #X text 594 704 |; #X text 594 712 |; #X text 594 720 |; #X text 630 696 |; #X text 630 704 |; #X text 630 712 |; #X text 630 720 |; #X text 666 696 |; #X text 666 704 |; #X text 666 712 |; #X text 666 720 |; #X text 702 696 |; #X text 702 704 |; #X text 702 712 |; #X text 702 720 |; #X text 738 696 |; #X text 738 704 |; #X text 738 712 |; #X text 738 720 |; #X text 581 689 --+-----+-----+-----+-----+-----+--; #X text 774 696 |; #X text 774 704 |; #X text 774 712 |; #X text 774 720 |; #X text 594 734 |; #X text 594 742 |; #X text 594 750 |; #X text 594 758 |; #X text 630 734 |; #X text 630 742 |; #X text 630 750 |; #X text 630 758 |; #X text 666 734 |; #X text 666 742 |; #X text 666 750 |; #X text 666 758 |; #X text 702 734 |; #X text 702 742 |; #X text 702 750 |; #X text 702 758 |; #X text 738 734 |; #X text 738 742 |; #X text 738 750 |; #X text 738 758 |; #X text 581 727 --+-----+-----+-----+-----+-----+--; #X text 774 734 |; #X text 774 742 |; #X text 774 750 |; #X text 774 758 |; #X text 594 772 |; #X text 594 780 |; #X text 594 788 |; #X text 594 796 |; #X text 630 772 |; #X text 630 780 |; #X text 630 788 |; #X text 630 796 |; #X text 666 772 |; #X text 666 780 |; #X text 666 788 |; #X text 666 796 |; #X text 702 772 |; #X text 702 780 |; #X text 702 788 |; #X text 702 796 |; #X text 738 772 |; #X text 738 780 |; #X text 738 788 |; #X text 738 796 |; #X text 581 765 --+-----+-----+-----+-----+-----+--; #X text 774 772 |; #X text 774 780 |; #X text 774 788 |; #X text 774 796 |; #X text 594 810 |; #X text 594 818 |; #X text 594 826 |; #X text 594 834 |; #X text 630 810 |; #X text 630 818 |; #X text 630 826 |; #X text 630 834 |; #X text 666 810 |; #X text 666 818 |; #X text 666 826 |; #X text 666 834 |; #X text 702 810 |; #X text 702 818 |; #X text 702 826 |; #X text 702 834 |; #X text 738 810 |; #X text 738 818 |; #X text 738 826 |; #X text 738 834 |; #X text 581 803 --+-----+-----+-----+-----+-----+--; #X text 774 810 |; #X text 774 818 |; #X text 774 826 |; #X text 774 834 |; #X text 581 841 --+-----+-----+-----+-----+-----+--; #X text 660 741 ___________________________; #X text 821 746 > + x; #X text 684 618 |; #X text 684 625 |; #X text 684 632 |; #X text 684 639 |; #X text 684 646 |; #X text 684 653 |; #X text 684 660 |; #X text 684 667 |; #X text 684 674 |; #X text 684 681 |; #X text 684 688 |; #X text 684 695 |; #X text 684 694 |; #X text 684 701 |; #X text 684 708 |; #X text 684 715 |; #X text 684 721 |; #X text 684 728 |; #X text 684 735 |; #X text 684 742 |; #X text 684 749 |; #X text 684 756 |; #X text 684 763 |; #X text 684 770 |; #X text 684 614 ^; #X text 709 754 e1_1; #X text 672 709 e1_2; #X text 745 754 e2_1; #X text 672 669 e2_2; #X text 677 758 d_1; #X text 239 738 d .. direct; #X text 234 750 e1 .. early 1; #X text 234 762 e2 .. early 2; #X text 710 630 mirror source rooms; #X text 400 504 linear rms; #X floatatom 545 397 5 0 0 0 - - -; #X floatatom 565 416 5 0 0 0 - - -; #X floatatom 586 397 5 0 0 0 - - -; #X floatatom 606 416 5 0 0 0 - - -; #X obj 545 376 unpack 0 0 0 0 0 0; #X floatatom 627 397 5 0 0 0 - - -; #X floatatom 648 416 5 0 0 0 - - -; #X text 665 396 linear rms; #X obj 753 420 unpack; #X floatatom 753 457 5 0 0 0 - - -; #X floatatom 761 440 5 0 0 0 - - -; #X obj 769 477 unpack; #X floatatom 769 514 5 0 0 0 - - -; #X floatatom 777 497 5 0 0 0 - - -; #X obj 785 420 unpack; #X floatatom 785 457 5 0 0 0 - - -; #X floatatom 793 440 5 0 0 0 - - -; #X obj 801 477 unpack; #X floatatom 801 514 5 0 0 0 - - -; #X floatatom 809 497 5 0 0 0 - - -; #X obj 817 420 unpack; #X floatatom 817 457 5 0 0 0 - - -; #X floatatom 825 440 5 0 0 0 - - -; #X obj 833 477 unpack; #X floatatom 833 514 5 0 0 0 - - -; #X floatatom 841 497 5 0 0 0 - - -; #X text 879 497 degree; #X text 857 456 degree; #X text 863 439 degree; #X text 694 456 elevation; #X text 706 440 azimuth; #X text 709 512 elevation; #X text 723 495 azimuth; #X floatatom 617 275 5 0 0 0 - - -; #X floatatom 631 292 5 0 0 0 - - -; #X floatatom 646 309 5 0 0 0 - - -; #X floatatom 660 275 5 0 0 0 - - -; #X floatatom 675 292 5 0 0 0 - - -; #X floatatom 689 309 5 0 0 0 - - -; #X floatatom 704 275 5 0 0 0 - - -; #X floatatom 718 292 5 0 0 0 - - -; #X floatatom 733 309 5 0 0 0 - - -; #X floatatom 747 275 5 0 0 0 - - -; #X floatatom 762 292 5 0 0 0 - - -; #X floatatom 776 309 5 0 0 0 - - -; #X floatatom 791 275 5 0 0 0 - - -; #X floatatom 805 292 5 0 0 0 - - -; #X floatatom 820 309 5 0 0 0 - - -; #X floatatom 834 275 5 0 0 0 - - -; #X floatatom 849 292 5 0 0 0 - - -; #X floatatom 864 309 5 0 0 0 - - -; #X obj 617 252 unpack 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0; #X text 872 273 linear rms; #X obj 378 124 unpack; #X floatatom 378 161 5 0 0 0 - - -; #X floatatom 386 144 5 0 0 0 - - -; #X obj 410 124 unpack; #X floatatom 410 161 5 0 0 0 - - -; #X floatatom 418 144 5 0 0 0 - - -; #X obj 443 124 unpack; #X floatatom 443 161 5 0 0 0 - - -; #X floatatom 451 144 5 0 0 0 - - -; #X obj 394 181 unpack; #X floatatom 394 218 5 0 0 0 - - -; #X floatatom 402 201 5 0 0 0 - - -; #X obj 427 181 unpack; #X floatatom 427 218 5 0 0 0 - - -; #X floatatom 435 201 5 0 0 0 - - -; #X obj 459 181 unpack; #X floatatom 459 218 5 0 0 0 - - -; #X floatatom 467 201 5 0 0 0 - - -; #X obj 477 124 unpack; #X floatatom 477 161 5 0 0 0 - - -; #X floatatom 485 144 5 0 0 0 - - -; #X obj 509 124 unpack; #X floatatom 509 161 5 0 0 0 - - -; #X floatatom 517 144 5 0 0 0 - - -; #X obj 542 124 unpack; #X floatatom 542 161 5 0 0 0 - - -; #X floatatom 550 144 5 0 0 0 - - -; #X obj 493 181 unpack; #X floatatom 493 218 5 0 0 0 - - -; #X floatatom 501 201 5 0 0 0 - - -; #X obj 526 181 unpack; #X floatatom 526 218 5 0 0 0 - - -; #X floatatom 534 201 5 0 0 0 - - -; #X obj 558 181 unpack; #X floatatom 558 218 5 0 0 0 - - -; #X floatatom 566 201 5 0 0 0 - - -; #X obj 577 124 unpack; #X floatatom 577 161 5 0 0 0 - - -; #X floatatom 585 144 5 0 0 0 - - -; #X obj 609 124 unpack; #X floatatom 609 161 5 0 0 0 - - -; #X floatatom 617 144 5 0 0 0 - - -; #X obj 642 124 unpack; #X floatatom 642 161 5 0 0 0 - - -; #X floatatom 650 144 5 0 0 0 - - -; #X obj 593 181 unpack; #X floatatom 593 218 5 0 0 0 - - -; #X floatatom 601 201 5 0 0 0 - - -; #X obj 626 181 unpack; #X floatatom 626 218 5 0 0 0 - - -; #X floatatom 634 201 5 0 0 0 - - -; #X obj 658 181 unpack; #X floatatom 658 218 5 0 0 0 - - -; #X floatatom 666 201 5 0 0 0 - - -; #X text 694 218 degree; #X text 700 201 degree; #X text 678 160 degree; #X text 684 143 degree; #X text 319 160 elevation; #X text 331 144 azimuth; #X text 334 216 elevation; #X text 348 199 azimuth; #X text 564 6 renders the delay time \, the damping and the direction of direct \, early_1 and early_2 reflections in a cuboid room model (3 dimensional); #X text 679 746 (; #X text 689 746 ); #X text 684 741 -; #X text 684 751 -; #X text 687 740 .; #X text 682 740 .; #X text 682 748 .; #X text 687 748 .; #X text 685 744 .; #X text 684 744 .; #X text 684 745 .; #X text 685 745 .; #X text 685 743 .; #X text 684 743 .; #X text 689 737 +z; #X text 683 743 .; #X text 683 744 .; #X text 683 745 .; #X text 72 500 e2_3; #X text 74 560 e1_3; #X text 107 560 e2_8; #X text 74 543 e2_9; #X text 36 562 e2_17; #X text 74 579 e2_18; #X text 77 651 d_1; #X text 110 651 e1_1; #X text 77 634 e1_2; #X text 77 670 e1_5; #X text 39 653 e1_4; #X text 143 650 e2_1; #X text 75 619 e2_2; #X text 8 653 e2_4; #X text 78 685 e2_5; #X text 110 633 e2_7; #X text 36 670 e2_10; #X text 108 669 e2_13; #X text 37 636 e2_16; #X text 494 638 z-axe shows out of the display; #X text 78 745 e1_6; #X text 40 747 e2_11; #X text 78 764 e2_12; #X text 111 745 e2_14; #X text 78 728 e2_15; #X text 82 808 e2_6; #X text 635 708 e2_16; #X text 710 709 e2_7; #X text 638 754 e1_4; #X text 601 754 e2_4; #X text 635 786 e2_10; #X text 673 787 e1_5; #X text 708 786 e2_13; #X text 673 823 e2_5; #X text 70 851 bottom (-z); #X text 69 463 top (+z); #X text 489 656 shows only; #X text 487 676 the x/y-plane; #X text 52 449 mirror source rooms (3D); #X connect 0 0 28 0; #X connect 1 0 28 0; #X connect 4 0 5 0; #X connect 5 0 48 0; #X connect 5 1 47 0; #X connect 5 2 46 0; #X connect 13 0 8 0; #X connect 28 0 2 0; #X connect 28 0 3 0; #X connect 29 0 32 0; #X connect 29 1 32 1; #X connect 30 0 32 0; #X connect 31 0 29 0; #X connect 32 0 43 0; #X connect 33 0 32 0; #X connect 33 1 32 2; #X connect 34 0 33 0; #X connect 36 0 39 0; #X connect 36 1 39 1; #X connect 37 0 39 0; #X connect 38 0 36 0; #X connect 39 0 44 0; #X connect 40 0 39 0; #X connect 40 1 39 2; #X connect 41 0 40 0; #X connect 43 0 28 0; #X connect 44 0 28 0; #X connect 45 0 28 0; #X connect 46 0 63 0; #X connect 46 1 291 0; #X connect 46 2 64 0; #X connect 47 0 49 0; #X connect 47 1 244 0; #X connect 47 2 52 0; #X connect 48 0 6 0; #X connect 48 1 7 0; #X connect 48 2 13 0; #X connect 49 0 9 0; #X connect 49 1 10 0; #X connect 49 2 11 0; #X connect 49 3 12 0; #X connect 49 4 50 0; #X connect 49 5 51 0; #X connect 52 0 248 0; #X connect 52 1 251 0; #X connect 52 2 254 0; #X connect 52 3 257 0; #X connect 52 4 260 0; #X connect 52 5 263 0; #X connect 63 0 14 0; #X connect 63 1 15 0; #X connect 63 2 16 0; #X connect 63 3 17 0; #X connect 63 4 23 0; #X connect 63 5 24 0; #X connect 63 6 25 0; #X connect 63 7 26 0; #X connect 63 8 53 0; #X connect 63 9 54 0; #X connect 63 10 55 0; #X connect 63 11 56 0; #X connect 63 12 57 0; #X connect 63 13 58 0; #X connect 63 14 59 0; #X connect 63 15 60 0; #X connect 63 16 61 0; #X connect 63 17 62 0; #X connect 64 0 293 0; #X connect 64 1 302 0; #X connect 64 2 296 0; #X connect 64 3 305 0; #X connect 64 4 299 0; #X connect 64 5 308 0; #X connect 64 6 311 0; #X connect 64 7 320 0; #X connect 64 8 314 0; #X connect 64 9 323 0; #X connect 64 10 317 0; #X connect 64 11 326 0; #X connect 64 12 329 0; #X connect 64 13 338 0; #X connect 64 14 332 0; #X connect 64 15 341 0; #X connect 64 16 335 0; #X connect 64 17 344 0; #X connect 244 0 240 0; #X connect 244 1 241 0; #X connect 244 2 242 0; #X connect 244 3 243 0; #X connect 244 4 245 0; #X connect 244 5 246 0; #X connect 248 0 249 0; #X connect 248 1 250 0; #X connect 251 0 252 0; #X connect 251 1 253 0; #X connect 254 0 255 0; #X connect 254 1 256 0; #X connect 257 0 258 0; #X connect 257 1 259 0; #X connect 260 0 261 0; #X connect 260 1 262 0; #X connect 263 0 264 0; #X connect 263 1 265 0; #X connect 291 0 273 0; #X connect 291 1 274 0; #X connect 291 2 275 0; #X connect 291 3 276 0; #X connect 291 4 277 0; #X connect 291 5 278 0; #X connect 291 6 279 0; #X connect 291 7 280 0; #X connect 291 8 281 0; #X connect 291 9 282 0; #X connect 291 10 283 0; #X connect 291 11 284 0; #X connect 291 12 285 0; #X connect 291 13 286 0; #X connect 291 14 287 0; #X connect 291 15 288 0; #X connect 291 16 289 0; #X connect 291 17 290 0; #X connect 293 0 294 0; #X connect 293 1 295 0; #X connect 296 0 297 0; #X connect 296 1 298 0; #X connect 299 0 300 0; #X connect 299 1 301 0; #X connect 302 0 303 0; #X connect 302 1 304 0; #X connect 305 0 306 0; #X connect 305 1 307 0; #X connect 308 0 309 0; #X connect 308 1 310 0; #X connect 311 0 312 0; #X connect 311 1 313 0; #X connect 314 0 315 0; #X connect 314 1 316 0; #X connect 317 0 318 0; #X connect 317 1 319 0; #X connect 320 0 321 0; #X connect 320 1 322 0; #X connect 323 0 324 0; #X connect 323 1 325 0; #X connect 326 0 327 0; #X connect 326 1 328 0; #X connect 329 0 330 0; #X connect 329 1 331 0; #X connect 332 0 333 0; #X connect 332 1 334 0; #X connect 335 0 336 0; #X connect 335 1 337 0; #X connect 338 0 339 0; #X connect 338 1 340 0; #X connect 341 0 342 0; #X connect 341 1 343 0; #X connect 344 0 345 0; #X connect 344 1 346 0; iem_utils-v0.0.20181004/iem_spec2/0000755000175000017500000000000013355472356016544 5ustar zmoelnigzmoelnigiem_utils-v0.0.20181004/iem_spec2/spec2_shift~-help.pd0000644000175000017500000000262513355471363022430 0ustar zmoelnigzmoelnig#N canvas 10 8 548 293 10; #X obj 15 90 dsp; #X obj 15 67 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 1 ; #X floatatom 15 131 5 0 0 0 - - -; #X floatatom 28 114 5 0 0 0 - - -; #N canvas 0 0 450 300 graph2 0; #X array array100 64 float 1; #A 0 -0.550001 -0.750001 -0.700001 -0.600001 -0.500001 -0.400001 -0.400001 -0.350001 -0.25 -0.2 -0.15 -0.1 -0.0500001 -0.0500001 3.72529e-008 0.0500001 0.0500001 0.1 0.1 0.15 0.2 0.2 0.250001 0.250001 0.300001 0.350001 0.350001 0.400001 0.500001 0.500001 0.516668 0.533334 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0; #X coords 0 1 63 -1 64 40 1; #X restore 436 66 graph; #X text 83 210 IEM KUG; #X text 67 198 musil; #X text 97 198 @; #X text 103 198 iem.at; #X text 66 220 Graz \, Austria; #X text 18 187 (c) Thomas Musil 2000 - 2006; #N canvas 0 0 450 300 graph2 0; #X array array101 64 float 0; #X coords 0 1 63 -1 64 40 1; #X restore 436 126 graph; #X obj 143 102 spec2_shift~ 10; #X obj 144 131 tabsend~ array101; #X obj 142 71 tabreceive~ array100; #X floatatom 105 51 5 -32 32 0 - - -; #X text 15 10 spec2_shift~; #X text 248 101 1.arg: shift width; #X text 136 6 shift a spectrum of (blocksize/2 + 1) to the left or right about n bins (+- blocksize/2); #X text 80 37 shift width; #X connect 0 0 2 0; #X connect 0 1 3 0; #X connect 1 0 0 0; #X connect 12 0 13 0; #X connect 14 0 12 0; #X connect 15 0 12 0; iem_utils-v0.0.20181004/iem_spec2/spec2_sub~-help.pd0000644000175000017500000000060113355471363022074 0ustar zmoelnigzmoelnig#N canvas 52 28 466 260 10; #X text 86 51 no arg; #X text 83 169 IEM KUG; #X text 67 157 musil; #X text 97 157 @; #X text 103 157 iem.at; #X text 66 179 Graz \, Austria; #X text 18 146 (c) Thomas Musil 2000 - 2006; #X text 183 49 like; #X obj 30 52 spec2-~; #X text 30 15 spec2-~; #X obj 234 50 -~; #X text 106 14 subtract 2 signal spectras with (blocksize/2 + 1) bins ; iem_utils-v0.0.20181004/iem_spec2/LICENSE.txt0000644000175000017500000000247313355471363020372 0ustar zmoelnigzmoelnigThis library extends the performance of Miller S. Puckette's realtime-computermusic-environment puredata (pd). iem_spec2 contains 1 external library "iem_spec2.dll" with 23 objects and their help files. iem_tab is published under the Gnu Lesser General Public License that is included (GnuLGPL.txt). Copyright (C) 2000-2018 Thomas MUSIL [musil_at_iem.at] IEM - Institute of Electronic Music and Acoustics, Graz Inffeldgasse 10/3, 8010 Graz, Austria http://iem.at This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library 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 Lesser General Public License for more details ( GnuLGPL.txt ). (e.g. http://www.gnu.org/copyleft/lesser.html) You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Graz, March 1st 2018 Thomas Musil iem_utils-v0.0.20181004/iem_spec2/spec2_clip_min~-help.pd0000644000175000017500000000203313355471363023076 0ustar zmoelnigzmoelnig#N canvas 52 28 546 330 10; #X text 230 141 no arg; #X text 81 272 IEM KUG; #X text 65 260 musil; #X text 95 260 @; #X text 101 260 iem.at; #X text 64 282 Graz \, Austria; #X text 16 249 (c) Thomas Musil 2000 - 2006; #X text 351 143 like; #X obj 128 118 sig~; #X floatatom 128 98 5 0 0 0 - - -; #X obj 212 118 sig~; #X floatatom 212 98 5 0 0 0 - - -; #X obj 21 61 dsp; #X obj 21 38 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 1 1 ; #X floatatom 21 107 5 0 0 0 - - -; #X floatatom 34 86 5 0 0 0 - - -; #X text 120 28 iem_spec2 calculates only blocksize/2 + 1 samples of block; #X text 9 6 spec2_clip_min~; #X text 139 9 restrict a signal to lie higher than min limit; #X obj 401 144 max~; #X obj 128 141 spec2_clip_min~; #X obj 84 179 print~; #X obj 85 159 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X connect 8 0 20 0; #X connect 9 0 8 0; #X connect 10 0 20 1; #X connect 11 0 10 0; #X connect 12 0 14 0; #X connect 12 1 15 0; #X connect 13 0 12 0; #X connect 20 0 21 0; #X connect 22 0 21 0; iem_utils-v0.0.20181004/iem_spec2/src/0000755000175000017500000000000013355472356017333 5ustar zmoelnigzmoelnigiem_utils-v0.0.20181004/iem_spec2/src/spec2_mul_scalar~.c0000644000175000017500000000546113355471363023116 0ustar zmoelnigzmoelnig/* For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. iem_spec2 written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2006 */ #include "m_pd.h" #include "iemlib.h" /* -------------------------- spec2_mul_scalar~ ------------------------------ */ static t_class *spec2_mul_scalar_tilde_class; typedef struct _spec2_mul_scalar_tilde { t_object x_obj; t_float x_f; t_float x_msi; } t_spec2_mul_scalar_tilde; static void spec2_mul_scalar_tilde_ft1(t_spec2_mul_scalar_tilde *x, t_floatarg f) { x->x_f = f; } static t_int *spec2_mul_scalar_tilde_perform(t_int *w) { t_float *io = (t_float *)(w[1]); t_spec2_mul_scalar_tilde *x = (t_spec2_mul_scalar_tilde *)(w[2]); int i, n = (t_int)(w[3]); t_float f = x->x_f; for(i=0; i<=n; i++) { io[i] *= f; } return(w+4); } static t_int *spec2_mul_scalar_tilde_perf16(t_int *w) { t_float *io = (t_float *)(w[1]); t_spec2_mul_scalar_tilde *x = (t_spec2_mul_scalar_tilde *)(w[2]); int n = (t_int)(w[3]); t_float f = x->x_f; while(n) { io[0] *= f; io[1] *= f; io[2] *= f; io[3] *= f; io[4] *= f; io[5] *= f; io[6] *= f; io[7] *= f; io[8] *= f; io[9] *= f; io[10] *= f; io[11] *= f; io[12] *= f; io[13] *= f; io[14] *= f; io[15] *= f; io += 16; n -= 16; } io[0] *= f; return(w+4); } static void spec2_mul_scalar_tilde_dsp(t_spec2_mul_scalar_tilde *x, t_signal **sp) { int n = (sp[0]->s_n)/2; if(n&15) dsp_add(spec2_mul_scalar_tilde_perform, 3, sp[0]->s_vec, x, n); else dsp_add(spec2_mul_scalar_tilde_perf16, 3, sp[0]->s_vec, x, n); } static void *spec2_mul_scalar_tilde_new(t_floatarg f) { t_spec2_mul_scalar_tilde *x = (t_spec2_mul_scalar_tilde *)pd_new(spec2_mul_scalar_tilde_class); inlet_new(&x->x_obj, &x->x_obj.ob_pd, &s_float, gensym("ft1")); outlet_new(&x->x_obj, &s_signal); x->x_f = f; x->x_msi = 0.0f; return (x); } static void spec2_mul_scalar_tilde_free(t_spec2_mul_scalar_tilde *x) { } void spec2_mul_scalar_tilde_setup(void) { spec2_mul_scalar_tilde_class = class_new(gensym("spec2_mul_scalar~"), (t_newmethod)spec2_mul_scalar_tilde_new, (t_method)spec2_mul_scalar_tilde_free, sizeof(t_spec2_mul_scalar_tilde), 0, A_DEFFLOAT, 0); class_addcreator((t_newmethod)spec2_mul_scalar_tilde_new, gensym("spec2*s~"), A_DEFFLOAT, 0); CLASS_MAINSIGNALIN(spec2_mul_scalar_tilde_class, t_spec2_mul_scalar_tilde, x_msi); class_addmethod(spec2_mul_scalar_tilde_class, (t_method)spec2_mul_scalar_tilde_ft1, gensym("ft1"), A_FLOAT, 0); class_addmethod(spec2_mul_scalar_tilde_class, (t_method)spec2_mul_scalar_tilde_dsp, gensym("dsp"), A_CANT, 0); // class_sethelpsymbol(spec2_mul_scalar_tilde_class, gensym("iemhelp2/spec2_mul_scalar~-help")); } iem_utils-v0.0.20181004/iem_spec2/src/spec2_clip_min~.c0000644000175000017500000000714513355471363022567 0ustar zmoelnigzmoelnig/* For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. iem_spec2 written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2006 */ #include "m_pd.h" #include "iemlib.h" /* -------------------------- spec2_clip_min~ ------------------------------ */ static t_class *spec2_clip_min_tilde_class; typedef struct _spec2_clip_min_tilde { t_object x_obj; t_float x_msi; } t_spec2_clip_min_tilde; static t_int *spec2_clip_min_tilde_perform(t_int *w) { t_float *in = (t_float *)(w[1]); t_float *min = (t_float *)(w[2]); t_float *out = (t_float *)(w[3]); int i, n = (t_int)(w[4]); for(i=0; i<=n; i++) { if(in[i] < min[i]) out[i] = min[i]; else out[i] = in[i]; } return(w+5); } static t_int *spec2_clip_min_tilde_perf16(t_int *w) { t_float *in = (t_float *)(w[1]); t_float *min = (t_float *)(w[2]); t_float *out = (t_float *)(w[3]); int n = (t_int)(w[4]); while(n) { if(in[0] < min[0]) out[0] = min[0]; else out[0] = in[0]; if(in[1] < min[1]) out[1] = min[1]; else out[1] = in[1]; if(in[2] < min[2]) out[2] = min[2]; else out[2] = in[2]; if(in[3] < min[3]) out[3] = min[3]; else out[3] = in[3]; if(in[4] < min[4]) out[4] = min[4]; else out[4] = in[4]; if(in[5] < min[5]) out[5] = min[5]; else out[5] = in[5]; if(in[6] < min[6]) out[6] = min[6]; else out[6] = in[6]; if(in[7] < min[7]) out[7] = min[7]; else out[7] = in[7]; if(in[8] < min[8]) out[8] = min[8]; else out[8] = in[8]; if(in[9] < min[9]) out[9] = min[9]; else out[9] = in[9]; if(in[10] < min[10]) out[10] = min[10]; else out[10] = in[10]; if(in[11] < min[11]) out[11] = min[11]; else out[11] = in[11]; if(in[12] < min[12]) out[12] = min[12]; else out[12] = in[12]; if(in[13] < min[13]) out[13] = min[13]; else out[13] = in[13]; if(in[14] < min[14]) out[14] = min[14]; else out[14] = in[14]; if(in[15] < min[15]) out[15] = min[15]; else out[15] = in[15]; in += 16; min += 16; out += 16; n -= 16; } if(in[0] < min[0]) out[0] = min[0]; else out[0] = in[0]; return(w+5); } static void spec2_clip_min_tilde_dsp(t_spec2_clip_min_tilde *x, t_signal **sp) { int n = (sp[0]->s_n)/2; if(n&15) dsp_add(spec2_clip_min_tilde_perform, 4, sp[0]->s_vec, sp[1]->s_vec, sp[2]->s_vec, n); else dsp_add(spec2_clip_min_tilde_perf16, 4, sp[0]->s_vec, sp[1]->s_vec, sp[2]->s_vec, n); } static void *spec2_clip_min_tilde_new(void) { t_spec2_clip_min_tilde *x = (t_spec2_clip_min_tilde *)pd_new(spec2_clip_min_tilde_class); inlet_new(&x->x_obj, &x->x_obj.ob_pd, &s_signal, &s_signal); outlet_new(&x->x_obj, &s_signal); x->x_msi = 0.0f; return (x); } static void spec2_clip_min_tilde_free(t_spec2_clip_min_tilde *x) { } void spec2_clip_min_tilde_setup(void) { spec2_clip_min_tilde_class = class_new(gensym("spec2_clip_min~"), (t_newmethod)spec2_clip_min_tilde_new, (t_method)spec2_clip_min_tilde_free, sizeof(t_spec2_clip_min_tilde), 0, 0); CLASS_MAINSIGNALIN(spec2_clip_min_tilde_class, t_spec2_clip_min_tilde, x_msi); class_addmethod(spec2_clip_min_tilde_class, (t_method)spec2_clip_min_tilde_dsp, gensym("dsp"), A_CANT, 0); // class_sethelpsymbol(spec2_clip_min_tilde_class, gensym("iemhelp2/spec2_clip_min~-help")); } iem_utils-v0.0.20181004/iem_spec2/src/spec2_sub~.c0000644000175000017500000000521013355471363021555 0ustar zmoelnigzmoelnig/* For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. iem_spec2 written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2006 */ #include "m_pd.h" #include "iemlib.h" /* -------------------------- spec2_sub~ ------------------------------ */ static t_class *spec2_sub_tilde_class; typedef struct _spec2_sub_tilde { t_object x_obj; t_float x_msi; } t_spec2_sub_tilde; static t_int *spec2_sub_tilde_perform(t_int *w) { t_float *in1 = (t_float *)(w[1]); t_float *in2 = (t_float *)(w[2]); t_float *out = (t_float *)(w[3]); int i, n = (t_int)(w[4]); for(i=0; i<=n; i++) { out[i] = in1[i] - in2[i]; } return(w+5); } static t_int *spec2_sub_tilde_perf16(t_int *w) { t_float *in1 = (t_float *)(w[1]); t_float *in2 = (t_float *)(w[2]); t_float *out = (t_float *)(w[3]); int n = (t_int)(w[4]); while(n) { out[0] = in1[0] - in2[0]; out[1] = in1[1] - in2[1]; out[2] = in1[2] - in2[2]; out[3] = in1[3] - in2[3]; out[4] = in1[4] - in2[4]; out[5] = in1[5] - in2[5]; out[6] = in1[6] - in2[6]; out[7] = in1[7] - in2[7]; out[8] = in1[8] - in2[8]; out[9] = in1[9] - in2[9]; out[10] = in1[10] - in2[10]; out[11] = in1[11] - in2[11]; out[12] = in1[12] - in2[12]; out[13] = in1[13] - in2[13]; out[14] = in1[14] - in2[14]; out[15] = in1[15] - in2[15]; in1 += 16; in2 += 16; out += 16; n -= 16; } out[0] = in1[0] - in2[0]; return(w+5); } static void spec2_sub_tilde_dsp(t_spec2_sub_tilde *x, t_signal **sp) { int n = (sp[0]->s_n)/2; if(n&15) dsp_add(spec2_sub_tilde_perform, 4, sp[0]->s_vec, sp[1]->s_vec, sp[2]->s_vec, n); else dsp_add(spec2_sub_tilde_perf16, 4, sp[0]->s_vec, sp[1]->s_vec, sp[2]->s_vec, n); } static void *spec2_sub_tilde_new(void) { t_spec2_sub_tilde *x = (t_spec2_sub_tilde *)pd_new(spec2_sub_tilde_class); inlet_new(&x->x_obj, &x->x_obj.ob_pd, &s_signal, &s_signal); outlet_new(&x->x_obj, &s_signal); x->x_msi = 0.0f; return (x); } static void spec2_sub_tilde_free(t_spec2_sub_tilde *x) { } void spec2_sub_tilde_setup(void) { spec2_sub_tilde_class = class_new(gensym("spec2_sub~"), (t_newmethod)spec2_sub_tilde_new, (t_method)spec2_sub_tilde_free, sizeof(t_spec2_sub_tilde), 0, 0); class_addcreator((t_newmethod)spec2_sub_tilde_new, gensym("spec2-~"), 0); CLASS_MAINSIGNALIN(spec2_sub_tilde_class, t_spec2_sub_tilde, x_msi); class_addmethod(spec2_sub_tilde_class, (t_method)spec2_sub_tilde_dsp, gensym("dsp"), A_CANT, 0); // class_sethelpsymbol(spec2_sub_tilde_class, gensym("iemhelp2/spec2_sub~-help")); } iem_utils-v0.0.20181004/iem_spec2/src/spec2_sum~.c0000644000175000017500000000513413355471363021575 0ustar zmoelnigzmoelnig/* For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. iem_spec2 written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2006 */ #include "m_pd.h" #include "iemlib.h" /* ------------------------ spec2_sum_tilde~ ------------------------- */ static t_class *spec2_sum_tilde_class; typedef struct _spec2_sum_tilde { t_object x_obj; t_float x_msi; } t_spec2_sum_tilde; static t_int *spec2_sum_tilde_perform(t_int *w) { t_float *in = (t_float *)(w[1]); t_float *out = (t_float *)(w[2]); t_float sum = 0.0f; int n, hn; n = hn = w[3]; sum = *in++; while(n--) sum += (*in++)*2.0f; while(hn--) *out++ = sum; *out++ = sum; return(w+4); } static t_int *spec2_sum_tilde_perf16(t_int *w) { t_float *in = (t_float *)(w[1]); t_float *out = (t_float *)(w[2]); t_float sum=0.0f; int n, hn; n = hn = w[3]; sum = *in++; while(n) { sum += 2.0f*in[0]; sum += 2.0f*in[1]; sum += 2.0f*in[2]; sum += 2.0f*in[3]; sum += 2.0f*in[4]; sum += 2.0f*in[5]; sum += 2.0f*in[6]; sum += 2.0f*in[7]; sum += 2.0f*in[8]; sum += 2.0f*in[9]; sum += 2.0f*in[10]; sum += 2.0f*in[11]; sum += 2.0f*in[12]; sum += 2.0f*in[13]; sum += 2.0f*in[14]; sum += 2.0f*in[15]; in += 16; n -= 16; } while(hn) { out[0] = sum; out[1] = sum; out[2] = sum; out[3] = sum; out[4] = sum; out[5] = sum; out[6] = sum; out[7] = sum; out[8] = sum; out[9] = sum; out[10] = sum; out[11] = sum; out[12] = sum; out[13] = sum; out[14] = sum; out[15] = sum; out += 16; hn -= 16; } out[0] = sum; return(w+4); } static void spec2_sum_tilde_dsp(t_spec2_sum_tilde *x, t_signal **sp) { int n = (sp[0]->s_n)/2; if(n&15) dsp_add(spec2_sum_tilde_perform, 3, sp[0]->s_vec, sp[0]->s_vec, n); else dsp_add(spec2_sum_tilde_perf16, 3, sp[0]->s_vec, sp[0]->s_vec, n); } static void *spec2_sum_tilde_new(void) { t_spec2_sum_tilde *x = (t_spec2_sum_tilde *)pd_new(spec2_sum_tilde_class); outlet_new(&x->x_obj, &s_signal); x->x_msi = 0.0f; return (x); } void spec2_sum_tilde_setup(void) { spec2_sum_tilde_class = class_new(gensym("spec2_sum~"), (t_newmethod)spec2_sum_tilde_new, 0, sizeof(t_spec2_sum_tilde), 0, 0); CLASS_MAINSIGNALIN(spec2_sum_tilde_class, t_spec2_sum_tilde, x_msi); class_addmethod(spec2_sum_tilde_class, (t_method)spec2_sum_tilde_dsp, gensym("dsp"), A_CANT, 0); // class_sethelpsymbol(spec2_sum_tilde_class, gensym("iemhelp2/spec2_sum~-help")); } iem_utils-v0.0.20181004/iem_spec2/src/spec2_dbtopow~.c0000644000175000017500000000337313355471363022452 0ustar zmoelnigzmoelnig/* For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. iem_spec2 written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2006 */ #include "m_pd.h" #include "iemlib.h" #include #define SPEC2LOGTEN 2.302585092994f /* ------------------------ spec2_dbtopow_tilde~ ------------------------- */ static t_class *spec2_dbtopow_tilde_class; typedef struct _spec2_dbtopow_tilde { t_object x_obj; t_float x_msi; } t_spec2_dbtopow_tilde; static t_int *spec2_dbtopow_tilde_perform(t_int *w) { t_float *in = (t_float *)(w[1]); t_float *out = (t_float *)(w[2]); int n = w[3]+1; for (; n--; in++, out++) { t_float f = *in; if(f <= 0.0f) *out = 0.0f; else { if(f > 870.0f) f = 870.0f; *out = exp((SPEC2LOGTEN * 0.1f) * (f-100.0f)); } } return(w+4); } static void spec2_dbtopow_tilde_dsp(t_spec2_dbtopow_tilde *x, t_signal **sp) { int n = (sp[0]->s_n)/2; dsp_add(spec2_dbtopow_tilde_perform, 3, sp[0]->s_vec, sp[0]->s_vec, n); } static void *spec2_dbtopow_tilde_new(void) { t_spec2_dbtopow_tilde *x = (t_spec2_dbtopow_tilde *)pd_new(spec2_dbtopow_tilde_class); outlet_new(&x->x_obj, &s_signal); x->x_msi = 0.0f; return (x); } void spec2_dbtopow_tilde_setup(void) { spec2_dbtopow_tilde_class = class_new(gensym("spec2_dbtopow~"), (t_newmethod)spec2_dbtopow_tilde_new, 0, sizeof(t_spec2_dbtopow_tilde), 0, 0); CLASS_MAINSIGNALIN(spec2_dbtopow_tilde_class, t_spec2_dbtopow_tilde, x_msi); class_addmethod(spec2_dbtopow_tilde_class, (t_method)spec2_dbtopow_tilde_dsp, gensym("dsp"), A_CANT, 0); // class_sethelpsymbol(spec2_dbtopow_tilde_class, gensym("iemhelp2/spec2_dbtopow~-help")); } iem_utils-v0.0.20181004/iem_spec2/src/spec2_mul~.c0000644000175000017500000000521013355471363021561 0ustar zmoelnigzmoelnig/* For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. iem_spec2 written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2006 */ #include "m_pd.h" #include "iemlib.h" /* -------------------------- spec2_mul~ ------------------------------ */ static t_class *spec2_mul_tilde_class; typedef struct _spec2_mul_tilde { t_object x_obj; t_float x_msi; } t_spec2_mul_tilde; static t_int *spec2_mul_tilde_perform(t_int *w) { t_float *in1 = (t_float *)(w[1]); t_float *in2 = (t_float *)(w[2]); t_float *out = (t_float *)(w[3]); int i, n = (t_int)(w[4]); for(i=0; i<=n; i++) { out[i] = in1[i] * in2[i]; } return(w+5); } static t_int *spec2_mul_tilde_perf16(t_int *w) { t_float *in1 = (t_float *)(w[1]); t_float *in2 = (t_float *)(w[2]); t_float *out = (t_float *)(w[3]); int n = (t_int)(w[4]); while(n) { out[0] = in1[0] * in2[0]; out[1] = in1[1] * in2[1]; out[2] = in1[2] * in2[2]; out[3] = in1[3] * in2[3]; out[4] = in1[4] * in2[4]; out[5] = in1[5] * in2[5]; out[6] = in1[6] * in2[6]; out[7] = in1[7] * in2[7]; out[8] = in1[8] * in2[8]; out[9] = in1[9] * in2[9]; out[10] = in1[10] * in2[10]; out[11] = in1[11] * in2[11]; out[12] = in1[12] * in2[12]; out[13] = in1[13] * in2[13]; out[14] = in1[14] * in2[14]; out[15] = in1[15] * in2[15]; in1 += 16; in2 += 16; out += 16; n -= 16; } out[0] = in1[0] * in2[0]; return(w+5); } static void spec2_mul_tilde_dsp(t_spec2_mul_tilde *x, t_signal **sp) { int n = (sp[0]->s_n)/2; if(n&15) dsp_add(spec2_mul_tilde_perform, 4, sp[0]->s_vec, sp[1]->s_vec, sp[2]->s_vec, n); else dsp_add(spec2_mul_tilde_perf16, 4, sp[0]->s_vec, sp[1]->s_vec, sp[2]->s_vec, n); } static void *spec2_mul_tilde_new(void) { t_spec2_mul_tilde *x = (t_spec2_mul_tilde *)pd_new(spec2_mul_tilde_class); inlet_new(&x->x_obj, &x->x_obj.ob_pd, &s_signal, &s_signal); outlet_new(&x->x_obj, &s_signal); x->x_msi = 0.0f; return (x); } static void spec2_mul_tilde_free(t_spec2_mul_tilde *x) { } void spec2_mul_tilde_setup(void) { spec2_mul_tilde_class = class_new(gensym("spec2_mul~"), (t_newmethod)spec2_mul_tilde_new, (t_method)spec2_mul_tilde_free, sizeof(t_spec2_mul_tilde), 0, 0); class_addcreator((t_newmethod)spec2_mul_tilde_new, gensym("spec2*~"), 0); CLASS_MAINSIGNALIN(spec2_mul_tilde_class, t_spec2_mul_tilde, x_msi); class_addmethod(spec2_mul_tilde_class, (t_method)spec2_mul_tilde_dsp, gensym("dsp"), A_CANT, 0); // class_sethelpsymbol(spec2_mul_tilde_class, gensym("iemhelp2/spec2_mul~-help")); } iem_utils-v0.0.20181004/iem_spec2/src/makefile_vc9proj0000644000175000017500000000263012630366347022505 0ustar zmoelnigzmoelnigTARGET = iem_spec2 all: ..\$(TARGET).dll VIS_CPP_PATH = "$(PROGRAMFILES)\Microsoft Visual Studio 9.0\VC" VIS_SDK_PATH = "$(PROGRAMFILES)\Microsoft SDKs\Windows\v6.0A" PD_INST_PATH = "$(PROGRAMFILES)\pd" PD_WIN_INCLUDE_PATH = /I. /I..\..\include /I$(PD_INST_PATH)\src /I$(VIS_CPP_PATH)\include PD_WIN_C_FLAGS = /nologo /W3 /WX /DMSW /DNT /DPD /DWIN32 /DWINDOWS /DHAVE_G_CANVAS_H /Ox -D_CRT_SECURE_NO_WARNINGS PD_WIN_L_FLAGS = /nologo PD_WIN_LIB = /NODEFAULTLIB:libcmt /NODEFAULTLIB:oldnames /NODEFAULTLIB:kernel32 \ $(VIS_CPP_PATH)\lib\libcmt.lib \ $(VIS_CPP_PATH)\lib\oldnames.lib \ $(VIS_SDK_PATH)\lib\kernel32.lib \ $(PD_INST_PATH)\bin\pd.lib SRC = spec2_1p1z_freq~.c \ spec2_1p1z_time~.c \ spec2_abs~.c \ spec2_add_scalar~.c \ spec2_add~.c \ spec2_block_delay~.c \ spec2_clip_max~.c \ spec2_clip_min~.c \ spec2_dbtopow~.c \ spec2_dbtorms~.c \ spec2_matrix_bundle_stat~.c \ spec2_mul_scalar~.c \ spec2_mul~.c \ spec2_powtodb~.c \ spec2_rmstodb~.c \ spec2_shift~.c \ spec2_sqrt~.c \ spec2_stretch~.c \ spec2_sub~.c \ spec2_sum~.c \ spec2_tab_conv~.c \ spec2_tabreceive_enable~.c \ spec2_tabreceive~.c \ $(TARGET).c OBJ = $(SRC:.c=.obj) .c.obj: cl $(PD_WIN_C_FLAGS) $(PD_WIN_INCLUDE_PATH) /c $*.c ..\$(TARGET).dll: $(OBJ) link $(PD_WIN_L_FLAGS) /dll /export:$(TARGET)_setup \ /out:..\$(TARGET).dll $(OBJ) $(PD_WIN_LIB) clean: del *.obj iem_utils-v0.0.20181004/iem_spec2/src/spec2_1p1z_freq~.c0000644000175000017500000002453313355471363022605 0ustar zmoelnigzmoelnig/* For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. iem_spec2 written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2006 */ #include "m_pd.h" #include "iemlib.h" /* -- spec2_1p1z_freq~ - filter the spectrum with a 1.order IIR twice, once forwards, once backwards --- */ typedef struct spec2_1p1z_freq_tilde { t_object x_obj; t_float x_a0; t_float x_a1; t_float x_b1; t_float *x_begmem; int x_blocksize; t_float x_msi; } t_spec2_1p1z_freq_tilde; t_class *spec2_1p1z_freq_tilde_class; static void spec2_1p1z_freq_tilde_list(t_spec2_1p1z_freq_tilde *x, t_symbol *s, int argc, t_atom *argv) { if((argc >= 3) && IS_A_FLOAT(argv,0) && IS_A_FLOAT(argv,1) && IS_A_FLOAT(argv,2)) { x->x_a0 = (t_float)atom_getfloatarg(0, argc, argv); x->x_a1 = (t_float)atom_getfloatarg(1, argc, argv); x->x_b1 = (t_float)atom_getfloatarg(2, argc, argv); } } static t_int *spec2_1p1z_freq_tilde_perform(t_int *w) { t_float *in = (t_float *)(w[1]); t_float *out = (t_float *)(w[2]); t_spec2_1p1z_freq_tilde *x = (t_spec2_1p1z_freq_tilde *)(w[3]); int i, m, n = (int)(w[4]); t_float a0 = x->x_a0; t_float a1 = x->x_a1; t_float b1 = x->x_b1; t_float *vec1, *vec2, *vec3; t_float in_old, out_old, f; vec2 = x->x_begmem + n + 1; vec1 = vec2 - 1; vec3 = vec2 + 2*n; *vec2++ = in[0]; for(i=1; ix_begmem + 2; in_old = 0.0f; out_old = 0.0f; for(i=0; ix_begmem + 3*n - 2; in_old = 0.0f; out_old = 0.0f; for(i=0; ix_begmem + n + 1; for(i=0; i<=n; i++) { out[i] = *vec2++; } return(w+5); } static t_int *spec2_1p1z_freq_tilde_perf16(t_int *w) { t_float *in = (t_float *)(w[1]); t_float *out = (t_float *)(w[2]); t_spec2_1p1z_freq_tilde *x = (t_spec2_1p1z_freq_tilde *)(w[3]); int i, m, n = (int)(w[4]); t_float a0 = x->x_a0; t_float a1 = x->x_a1; t_float b1 = x->x_b1; t_float *vec1, *vec2, *vec3; t_float in_old, out_old, f; m = 3*n; vec2 = x->x_begmem + n + 1; vec1 = vec2; // vec3 = vec2 + 2*n + 2 - 2; vec3 = vec2 + 2*n; x->x_begmem[0] = 0.0f; x->x_begmem[m-1] = 0.0f; i = n; while(i) { f = in[0]; vec2[0] = f; vec1[0] = f; vec3[0] = f; f = in[1]; vec2[1] = f; vec1[-1] = f; vec3[-1] = f; f = in[2]; vec2[2] = f; vec1[-2] = f; vec3[-2] = f; f = in[3]; vec2[3] = f; vec1[-3] = f; vec3[-3] = f; f = in[4]; vec2[4] = f; vec1[-4] = f; vec3[-4] = f; f = in[5]; vec2[5] = f; vec1[-5] = f; vec3[-5] = f; f = in[6]; vec2[6] = f; vec1[-6] = f; vec3[-6] = f; f = in[7]; vec2[7] = f; vec1[-7] = f; vec3[-7] = f; f = in[8]; vec2[8] = f; vec1[-8] = f; vec3[-8] = f; f = in[9]; vec2[9] = f; vec1[-9] = f; vec3[-9] = f; f = in[10]; vec2[10] = f; vec1[-10] = f; vec3[-10] = f; f = in[11]; vec2[11] = f; vec1[-11] = f; vec3[-11] = f; f = in[12]; vec2[12] = f; vec1[-12] = f; vec3[-12] = f; f = in[13]; vec2[13] = f; vec1[-13] = f; vec3[-13] = f; f = in[14]; vec2[14] = f; vec1[-14] = f; vec3[-14] = f; f = in[15]; vec2[15] = f; vec1[-15] = f; vec3[-15] = f; in += 16; vec1 -= 16; vec2 += 16; vec3 -= 16; i -= 16; } f = in[0]; vec2[0] = f; vec1[0] = f; vec3[0] = f; vec2 = x->x_begmem; in_old = 0.0f; out_old = 0.0f; i = m; while(i) { f = vec2[0]; out_old = a0*f + a1*in_old + b1*out_old; in_old = f; vec2[0] = out_old; f = vec2[1]; out_old = a0*f + a1*in_old + b1*out_old; in_old = f; vec2[1] = out_old; f = vec2[2]; out_old = a0*f + a1*in_old + b1*out_old; in_old = f; vec2[2] = out_old; f = vec2[3]; out_old = a0*f + a1*in_old + b1*out_old; in_old = f; vec2[3] = out_old; f = vec2[4]; out_old = a0*f + a1*in_old + b1*out_old; in_old = f; vec2[4] = out_old; f = vec2[5]; out_old = a0*f + a1*in_old + b1*out_old; in_old = f; vec2[5] = out_old; f = vec2[6]; out_old = a0*f + a1*in_old + b1*out_old; in_old = f; vec2[6] = out_old; f = vec2[7]; out_old = a0*f + a1*in_old + b1*out_old; in_old = f; vec2[7] = out_old; f = vec2[8]; out_old = a0*f + a1*in_old + b1*out_old; in_old = f; vec2[8] = out_old; f = vec2[9]; out_old = a0*f + a1*in_old + b1*out_old; in_old = f; vec2[9] = out_old; f = vec2[10]; out_old = a0*f + a1*in_old + b1*out_old; in_old = f; vec2[10] = out_old; f = vec2[11]; out_old = a0*f + a1*in_old + b1*out_old; in_old = f; vec2[11] = out_old; f = vec2[12]; out_old = a0*f + a1*in_old + b1*out_old; in_old = f; vec2[12] = out_old; f = vec2[13]; out_old = a0*f + a1*in_old + b1*out_old; in_old = f; vec2[13] = out_old; f = vec2[14]; out_old = a0*f + a1*in_old + b1*out_old; in_old = f; vec2[14] = out_old; f = vec2[15]; out_old = a0*f + a1*in_old + b1*out_old; in_old = f; vec2[15] = out_old; vec2 += 16; i -= 16; } f = vec2[0]; out_old = a0*f + a1*in_old + b1*out_old; in_old = f; vec2[0] = out_old; f = vec2[1]; out_old = a0*f + a1*in_old + b1*out_old; in_old = f; vec2[1] = out_old; f = vec2[2]; out_old = a0*f + a1*in_old + b1*out_old; in_old = f; vec2[2] = out_old; // vec2 = x->x_begmem + 3*n - 1 + 3; vec2 = x->x_begmem + 3*n + 2; in_old = 0.0f; out_old = 0.0f; for(i=0; ix_begmem + n + 1; i = n; while(i) { out[0] = vec2[0]; out[1] = vec2[1]; out[2] = vec2[2]; out[3] = vec2[3]; out[4] = vec2[4]; out[5] = vec2[5]; out[6] = vec2[6]; out[7] = vec2[7]; out[8] = vec2[8]; out[9] = vec2[9]; out[10] = vec2[10]; out[11] = vec2[11]; out[12] = vec2[12]; out[13] = vec2[13]; out[14] = vec2[14]; out[15] = vec2[15]; vec2 += 16; out += 16; i -= 16; } out[0] = vec2[0]; return(w+5); } static void spec2_1p1z_freq_tilde_dsp(t_spec2_1p1z_freq_tilde *x, t_signal **sp) { int n = (sp[0]->s_n)/2; if(!x->x_blocksize) { x->x_begmem = (t_float *)getbytes(3*(n+1)*sizeof(t_float)); x->x_blocksize = n; } else if(x->x_blocksize != n) { x->x_begmem = (t_float *)resizebytes(x->x_begmem, 3*(x->x_blocksize+1)*sizeof(t_float), 3*(n+1)*sizeof(t_float)); x->x_blocksize = n; } if(n&15) dsp_add(spec2_1p1z_freq_tilde_perform, 4, sp[0]->s_vec, sp[1]->s_vec, x, n); else dsp_add(spec2_1p1z_freq_tilde_perform, 4, sp[0]->s_vec, sp[1]->s_vec, x, n); } static void spec2_1p1z_freq_tilde_free(t_spec2_1p1z_freq_tilde *x) { if(x->x_begmem) freebytes(x->x_begmem, 3*(x->x_blocksize+1)*sizeof(t_float)); } static void *spec2_1p1z_freq_tilde_new(t_symbol *s, int argc, t_atom *argv) { t_spec2_1p1z_freq_tilde *x = (t_spec2_1p1z_freq_tilde *)pd_new(spec2_1p1z_freq_tilde_class); outlet_new(&x->x_obj, &s_signal); x->x_blocksize = 0; x->x_begmem = (t_float *)0; if(argc >= 3) spec2_1p1z_freq_tilde_list(x, s, argc, argv); else { x->x_a0 = 1.0f; x->x_a1 = 0.0f; x->x_b1 = 0.0f; } x->x_msi = 0.0f; return (x); } void spec2_1p1z_freq_tilde_setup(void) { spec2_1p1z_freq_tilde_class = class_new(gensym("spec2_1p1z_freq~"), (t_newmethod)spec2_1p1z_freq_tilde_new, (t_method)spec2_1p1z_freq_tilde_free, sizeof(t_spec2_1p1z_freq_tilde), 0, A_GIMME, 0); CLASS_MAINSIGNALIN(spec2_1p1z_freq_tilde_class, t_spec2_1p1z_freq_tilde, x_msi); class_addmethod(spec2_1p1z_freq_tilde_class, (t_method)spec2_1p1z_freq_tilde_dsp, gensym("dsp"), A_CANT, 0); class_addlist(spec2_1p1z_freq_tilde_class, (t_method)spec2_1p1z_freq_tilde_list); // class_sethelpsymbol(spec2_1p1z_freq_tilde_class, gensym("iemhelp2/spec2_1p1z_freq~-help")); } iem_utils-v0.0.20181004/iem_spec2/src/iem_spec2.vcxproj0000644000175000017500000000611513355471363022616 0ustar zmoelnigzmoelnig Debug Win32 Release Win32 MakeFileProj {95441F75-6F85-457D-9174-37575E559755} Makefile v110 Makefile v110 .\Release\ .\Release\ NMAKE /f makefile_vc12proj NMAKE /f makefile_vc12proj /a iem_spec2.exe .\Debug\ .\Debug\ NMAKE /f makefile_vc12proj NMAKE /f makefile_vc12proj /a iem_spec2.exe iem_utils-v0.0.20181004/iem_spec2/src/spec2_matrix_bundle_stat~.c0000644000175000017500000001713613355471363024666 0ustar zmoelnigzmoelnig/* For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. iem_spec2 written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2006 */ #include "m_pd.h" #include "iemlib.h" /* ---------- spec2_matrix_bundle_stat~ - signal matrix multiplication object with message matrix-coeff. ----------- */ typedef struct spec2_matrix_bundle_stat_tilde { t_object x_obj; int *x_matbuf; t_float **x_io; t_float *x_outsumbuf; int x_outsumbufsize; int x_n_in; /* columns */ int x_n_out; /* rows */ t_float x_msi; } t_spec2_matrix_bundle_stat_tilde; t_class *spec2_matrix_bundle_stat_tilde_class; static void spec2_matrix_bundle_stat_tilde_element(t_spec2_matrix_bundle_stat_tilde *x, t_symbol *s, int argc, t_atom *argv) { int inindex, outindex; int *matrix = x->x_matbuf; if(argc < 2) { post("spec2_matrix_bundle_stat~ : bad list: output_row_index input_col_index !"); return; } outindex = (int)atom_getint(argv); argv++; inindex = (int)atom_getint(argv) - 1; if(inindex >= x->x_n_in) inindex = x->x_n_in - 1; if(inindex < 0) inindex = 0; if(outindex >= x->x_n_out) outindex = x->x_n_out; if(outindex < 0) outindex = 0; matrix[inindex] = outindex; } static void spec2_matrix_bundle_stat_tilde_list(t_spec2_matrix_bundle_stat_tilde *x, t_symbol *s, int argc, t_atom *argv) { int outindex, i, n=x->x_n_in; int *matrix = x->x_matbuf; if(argc < n) { post("spec2_matrix_bundle_stat~ : bad list: (number_of_input_cols = %d) * output_row_index !", n); return; } for(i=0; i= x->x_n_out) outindex = x->x_n_out; if(outindex < 0) outindex = 0; matrix[i] = outindex; } } static void spec2_matrix_bundle_stat_tilde_bundle(t_spec2_matrix_bundle_stat_tilde *x, t_symbol *s, int argc, t_atom *argv) { spec2_matrix_bundle_stat_tilde_list(x, &s_list, argc, argv); } /* the dsp thing */ static t_int *spec2_matrix_bundle_stat_tilde_perform(t_int *w) { t_spec2_matrix_bundle_stat_tilde *x = (t_spec2_matrix_bundle_stat_tilde *)(w[1]); int n = (int)(w[2]); t_float **io = x->x_io; t_float *outsum; int *mat = x->x_matbuf; int n_in = x->x_n_in; /* columns */ int n_out = x->x_n_out; /* rows */ t_float *in, *out; int i, j, thrw; outsum = x->x_outsumbuf; for(j=0; jx_outsumbuf + n*thrw; for(i=0; i<=n; i++) *outsum++ += *in++; } } outsum = x->x_outsumbuf; for(j=0; jx_io; t_float *outsum; int *mat = x->x_matbuf; int n_in = x->x_n_in; /* columns */ int n_out = x->x_n_out; /* rows */ t_float *in, *out; int i, j, thrw; for(j=0; jx_outsumbuf + j*(n+1); for(i=n; i; i -= 8, outsum += 8) { outsum[0] = 0.0f; outsum[1] = 0.0f; outsum[2] = 0.0f; outsum[3] = 0.0f; outsum[4] = 0.0f; outsum[5] = 0.0f; outsum[6] = 0.0f; outsum[7] = 0.0f; } outsum[0] = 0.0f; } for(j=0; jx_outsumbuf + (n+1)*thrw; for(i=n; i; i -= 8, outsum += 8, in += 8) { outsum[0] += in[0]; outsum[1] += in[1]; outsum[2] += in[2]; outsum[3] += in[3]; outsum[4] += in[4]; outsum[5] += in[5]; outsum[6] += in[6]; outsum[7] += in[7]; } outsum[0] += in[0]; } } for(j=0; jx_outsumbuf + j*(n+1); for (i=n; i; i -= 8, out += 8, outsum += 8) { out[0] = outsum[0]; out[1] = outsum[1]; out[2] = outsum[2]; out[3] = outsum[3]; out[4] = outsum[4]; out[5] = outsum[5]; out[6] = outsum[6]; out[7] = outsum[7]; } out[0] = outsum[0]; } return (w+3); } static void spec2_matrix_bundle_stat_tilde_dsp(t_spec2_matrix_bundle_stat_tilde *x, t_signal **sp) { int i, n=x->x_n_out*sp[0]->s_n/2; if(!x->x_outsumbuf) { x->x_outsumbufsize = n; x->x_outsumbuf = (t_float *)getbytes((x->x_outsumbufsize+x->x_n_out) * sizeof(t_float)); } else if(x->x_outsumbufsize != n) { x->x_outsumbuf = (t_float *)resizebytes(x->x_outsumbuf, (x->x_outsumbufsize+x->x_n_out)*sizeof(t_float), (n+x->x_n_out)*sizeof(t_float)); x->x_outsumbufsize = n; } n = x->x_n_in + x->x_n_out; for(i=0; ix_io[i] = sp[i]->s_vec; /*post("iovec_addr = %d", (unsigned int)x->x_io[i]);*/ } n = sp[0]->s_n/2; if(n&7) dsp_add(spec2_matrix_bundle_stat_tilde_perform, 2, x, n); else dsp_add(spec2_matrix_bundle_stat_tilde_perf8, 2, x, n); } /* setup/setdown things */ static void spec2_matrix_bundle_stat_tilde_free(t_spec2_matrix_bundle_stat_tilde *x) { freebytes(x->x_matbuf, x->x_n_in * sizeof(int)); freebytes(x->x_io, (x->x_n_in + x->x_n_out) * sizeof(t_float *)); if(x->x_outsumbuf) freebytes(x->x_outsumbuf, (x->x_outsumbufsize+1) * sizeof(t_float)); } static void *spec2_matrix_bundle_stat_tilde_new(t_symbol *s, int argc, t_atom *argv) { t_spec2_matrix_bundle_stat_tilde *x = (t_spec2_matrix_bundle_stat_tilde *)pd_new(spec2_matrix_bundle_stat_tilde_class); int i; switch (argc) { case 0: x->x_n_in = x->x_n_out = 1; break; case 1: x->x_n_in = x->x_n_out = (int)atom_getint(argv); break; default: x->x_n_in = (int)atom_getint(argv); x->x_n_out = (int)atom_getint(argv+1); break; } if(x->x_n_in < 1) x->x_n_in = 1; if(x->x_n_out < 1) x->x_n_out = 1; i = x->x_n_in - 1; while(i--) inlet_new(&x->x_obj, &x->x_obj.ob_pd, &s_signal, &s_signal); i = x->x_n_out; while(i--) outlet_new(&x->x_obj, &s_signal); x->x_msi = 0; x->x_outsumbuf = (t_float *)0; x->x_outsumbufsize = 0; x->x_matbuf = (int *)getbytes(x->x_n_in * sizeof(int)); x->x_io = (t_float **)getbytes((x->x_n_in + x->x_n_out) * sizeof(t_float *)); return (x); } void spec2_matrix_bundle_stat_tilde_setup(void) { spec2_matrix_bundle_stat_tilde_class = class_new(gensym("spec2_matrix_bundle_stat~"), (t_newmethod)spec2_matrix_bundle_stat_tilde_new, (t_method)spec2_matrix_bundle_stat_tilde_free, sizeof(t_spec2_matrix_bundle_stat_tilde), 0, A_GIMME, 0); CLASS_MAINSIGNALIN(spec2_matrix_bundle_stat_tilde_class, t_spec2_matrix_bundle_stat_tilde, x_msi); class_addmethod(spec2_matrix_bundle_stat_tilde_class, (t_method)spec2_matrix_bundle_stat_tilde_dsp, gensym("dsp"), A_CANT, 0); class_addlist(spec2_matrix_bundle_stat_tilde_class, (t_method)spec2_matrix_bundle_stat_tilde_list); class_addmethod(spec2_matrix_bundle_stat_tilde_class, (t_method)spec2_matrix_bundle_stat_tilde_element, gensym("element"), A_GIMME, 0); class_addmethod(spec2_matrix_bundle_stat_tilde_class, (t_method)spec2_matrix_bundle_stat_tilde_bundle, gensym("bundle"), A_GIMME, 0); // class_sethelpsymbol(spec2_matrix_bundle_stat_tilde_class, gensym("iemhelp2/spec2_matrix_bundle_stat~-help")); } iem_utils-v0.0.20181004/iem_spec2/src/VC7/0000755000175000017500000000000012630366347017727 5ustar zmoelnigzmoelnigiem_utils-v0.0.20181004/iem_spec2/src/VC7/iem_spec2.vcproj0000644000175000017500000000243112630366347023022 0ustar zmoelnigzmoelnig iem_utils-v0.0.20181004/iem_spec2/src/VC7/makefile_vc7proj0000644000175000017500000000262012630366347023101 0ustar zmoelnigzmoelnigTARGET = iem_spec2 all: ..\$(TARGET).dll VIS_CPP_PATH = "C:\Programme\Microsoft Visual Studio .NET 2003\Vc7" VIS_SDK_PATH = "C:\Programme\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK" PD_INST_PATH = "C:\Programme\pd-0.42-5" PD_WIN_INCLUDE_PATH = /I. /I$(PD_INST_PATH)\src /I$(VIS_CPP_PATH)\include PD_WIN_C_FLAGS = /nologo /W3 /WX /DMSW /DNT /DPD /DWIN32 /DWINDOWS /Ox -D_CRT_SECURE_NO_WARNINGS PD_WIN_L_FLAGS = /nologo PD_WIN_LIB = /NODEFAULTLIB:libcmt /NODEFAULTLIB:oldnames /NODEFAULTLIB:kernel32 \ $(VIS_CPP_PATH)\lib\libcmt.lib \ $(VIS_CPP_PATH)\lib\oldnames.lib \ $(VIS_SDK_PATH)\lib\kernel32.lib \ $(PD_INST_PATH)\bin\pd.lib SRC = spec2_1p1z_freq~.c \ spec2_1p1z_time~.c \ spec2_abs~.c \ spec2_add_scalar~.c \ spec2_add~.c \ spec2_block_delay~.c \ spec2_clip_max~.c \ spec2_clip_min~.c \ spec2_dbtopow~.c \ spec2_dbtorms~.c \ spec2_matrix_bundle_stat~.c \ spec2_mul_scalar~.c \ spec2_mul~.c \ spec2_powtodb~.c \ spec2_rmstodb~.c \ spec2_shift~.c \ spec2_sqrt~.c \ spec2_stretch~.c \ spec2_sub~.c \ spec2_sum~.c \ spec2_tab_conv~.c \ spec2_tabreceive_enable~.c \ spec2_tabreceive~.c \ iem_spec2.c OBJ = $(SRC:.c=.obj) .c.obj: cl $(PD_WIN_C_FLAGS) $(PD_WIN_INCLUDE_PATH) /c $*.c ..\$(TARGET).dll: $(OBJ) link $(PD_WIN_L_FLAGS) /dll /export:$(TARGET)_setup \ /out:..\$(TARGET).dll $(OBJ) $(PD_WIN_LIB) clean: del *.obj iem_utils-v0.0.20181004/iem_spec2/src/spec2_tabreceive_enable~.c0000644000175000017500000001123413355471363024406 0ustar zmoelnigzmoelnig/* For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. iem_spec2 written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2009 */ #include "m_pd.h" #include "iemlib.h" /* ------------------------ spec2_tabreceive_enable~ ------------------------- */ static t_class *spec2_tabreceive_enable_tilde_class; typedef struct _spec2_tabreceive_enable_tilde { t_object x_obj; iemarray_t *x_vec; t_symbol *x_arrayname; int x_enable; } t_spec2_tabreceive_enable_tilde; static void spec2_tabreceive_enable_tilde_symbol(t_spec2_tabreceive_enable_tilde *x, t_symbol *s) { x->x_arrayname = s; } static void spec2_tabreceive_enable_tilde_float(t_spec2_tabreceive_enable_tilde *x, t_floatarg f) { int i=(int)f; if(i) i = 1; x->x_enable = i; } static t_int *spec2_tabreceive_enable_tilde_perform(t_int *w) { t_spec2_tabreceive_enable_tilde *x = (t_spec2_tabreceive_enable_tilde *)(w[1]); t_float *out = (t_float *)(w[2]); int n = w[3]+1, i; iemarray_t *vec = x->x_vec; if(vec && x->x_enable) { for(i=0; ix_vec; if(vec && x->x_enable) { while(n) { out[0] = iemarray_getfloat(vec, 0); out[1] = iemarray_getfloat(vec, 1); out[2] = iemarray_getfloat(vec, 2); out[3] = iemarray_getfloat(vec, 3); out[4] = iemarray_getfloat(vec, 4); out[5] = iemarray_getfloat(vec, 5); out[6] = iemarray_getfloat(vec, 6); out[7] = iemarray_getfloat(vec, 7); out[8] = iemarray_getfloat(vec, 8); out[9] = iemarray_getfloat(vec, 9); out[10] = iemarray_getfloat(vec, 10); out[11] = iemarray_getfloat(vec, 11); out[12] = iemarray_getfloat(vec, 12); out[13] = iemarray_getfloat(vec, 13); out[14] = iemarray_getfloat(vec, 14); out[15] = iemarray_getfloat(vec, 15); vec += 16; out += 16; n -= 16; } out[0] = iemarray_getfloat(vec, 0); } else { while(n) { out[0] = 0.0f; out[1] = 0.0f; out[2] = 0.0f; out[3] = 0.0f; out[4] = 0.0f; out[5] = 0.0f; out[6] = 0.0f; out[7] = 0.0f; out[8] = 0.0f; out[9] = 0.0f; out[10] = 0.0f; out[11] = 0.0f; out[12] = 0.0f; out[13] = 0.0f; out[14] = 0.0f; out[15] = 0.0f; out += 16; n -= 16; } out[0] = 0.0f; } return(w+4); } static void spec2_tabreceive_enable_tilde_dsp(t_spec2_tabreceive_enable_tilde *x, t_signal **sp) { t_garray *a; int vecsize; if(!(a = (t_garray *)pd_findbyclass(x->x_arrayname, garray_class))) { if(*x->x_arrayname->s_name) error("spec2_tabreceive_enable~: %s: no such array", x->x_arrayname->s_name); } else if(!iemarray_getarray(a, &vecsize, &x->x_vec)) error("%s: bad template for spec2_tabreceive_enable~", x->x_arrayname->s_name); else { int n = sp[0]->s_n; if(n < vecsize) vecsize = n; vecsize /= 2; if(vecsize&15) dsp_add(spec2_tabreceive_enable_tilde_perform, 3, x, sp[0]->s_vec, vecsize); else dsp_add(spec2_tabreceive_enable_tilde_perf16, 3, x, sp[0]->s_vec, vecsize); } } static void *spec2_tabreceive_enable_tilde_new(t_symbol *s, int argc, t_atom *argv) { t_spec2_tabreceive_enable_tilde *x = (t_spec2_tabreceive_enable_tilde *)pd_new(spec2_tabreceive_enable_tilde_class); x->x_enable = 0; if((argc >= 1) && IS_A_SYMBOL(argv,0)) x->x_arrayname = atom_getsymbolarg(0, argc, argv); if((argc >= 2) && IS_A_FLOAT(argv,1)) x->x_enable = (int)atom_getintarg(1, argc, argv); if(x->x_enable) x->x_enable = 1; outlet_new(&x->x_obj, &s_signal); return (x); } void spec2_tabreceive_enable_tilde_setup(void) { spec2_tabreceive_enable_tilde_class = class_new(gensym("spec2_tabreceive_enable~"), (t_newmethod)spec2_tabreceive_enable_tilde_new, 0, sizeof(t_spec2_tabreceive_enable_tilde), 0, A_GIMME, 0); class_addmethod(spec2_tabreceive_enable_tilde_class, (t_method)spec2_tabreceive_enable_tilde_dsp, gensym("dsp"), A_CANT, 0); class_addsymbol(spec2_tabreceive_enable_tilde_class, (t_method)spec2_tabreceive_enable_tilde_symbol); class_addfloat(spec2_tabreceive_enable_tilde_class, (t_method)spec2_tabreceive_enable_tilde_float); // class_sethelpsymbol(spec2_tabreceive_enable_tilde_class, gensym("iemhelp2/spec2_tabreceive_enable~-help")); } iem_utils-v0.0.20181004/iem_spec2/src/iem_spec2.c0000644000175000017500000000451113355471363021343 0ustar zmoelnigzmoelnig/* For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. iem_spec2 written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2009 */ #include "m_pd.h" #include "iemlib.h" static t_class *iem_spec2_class; static void *iem_spec2_new(void) { t_object *x = (t_object *)pd_new(iem_spec2_class); return (x); } void spec2_1p1z_freq_tilde_setup(void); void spec2_1p1z_time_tilde_setup(void); void spec2_abs_tilde_setup(void); void spec2_add_scalar_tilde_setup(void); void spec2_add_tilde_setup(void); void spec2_block_delay_tilde_setup(void); void spec2_clip_max_tilde_setup(void); void spec2_clip_min_tilde_setup(void); void spec2_dbtopow_tilde_setup(void); void spec2_dbtorms_tilde_setup(void); void spec2_matrix_bundle_stat_tilde_setup(void); void spec2_mul_scalar_tilde_setup(void); void spec2_mul_tilde_setup(void); void spec2_powtodb_tilde_setup(void); void spec2_rmstodb_tilde_setup(void); void spec2_shift_tilde_setup(void); void spec2_sqrt_tilde_setup(void); void spec2_stretch_tilde_setup(void); void spec2_sub_tilde_setup(void); void spec2_sum_tilde_setup(void); void spec2_tab_conv_tilde_setup(void); void spec2_tabreceive_enable_tilde_setup(void); void spec2_tabreceive_tilde_setup(void); /* ------------------------ setup routine ------------------------- */ void iem_spec2_setup(void) { iem_spec2_class = class_new(gensym("iem_spec2"), iem_spec2_new, 0, sizeof(t_object), CLASS_NOINLET, 0); spec2_1p1z_freq_tilde_setup(); spec2_1p1z_time_tilde_setup(); spec2_abs_tilde_setup(); spec2_add_scalar_tilde_setup(); spec2_add_tilde_setup(); spec2_block_delay_tilde_setup(); spec2_clip_max_tilde_setup(); spec2_clip_min_tilde_setup(); spec2_dbtopow_tilde_setup(); spec2_dbtorms_tilde_setup(); spec2_matrix_bundle_stat_tilde_setup(); spec2_mul_scalar_tilde_setup(); spec2_mul_tilde_setup(); spec2_powtodb_tilde_setup(); spec2_rmstodb_tilde_setup(); spec2_shift_tilde_setup(); spec2_sqrt_tilde_setup(); spec2_stretch_tilde_setup(); spec2_sub_tilde_setup(); spec2_sum_tilde_setup(); spec2_tab_conv_tilde_setup(); spec2_tabreceive_enable_tilde_setup(); spec2_tabreceive_tilde_setup(); post("iem_spec2 (1.21) library loaded! (c) Thomas Musil "BUILD_DATE); post(" musil%ciem.at iem KUG Graz Austria", '@'); } iem_utils-v0.0.20181004/iem_spec2/src/VC6/0000755000175000017500000000000012630366347017726 5ustar zmoelnigzmoelnigiem_utils-v0.0.20181004/iem_spec2/src/VC6/iem_spec2.dsw0000644000175000017500000000107112630366347022312 0ustar zmoelnigzmoelnigMicrosoft Developer Studio Workspace File, Format Version 6.00 # WARNUNG: DIESE ARBEITSBEREICHSDATEI DARF NICHT BEARBEITET ODER GELSCHT WERDEN! ############################################################################### Project: "iem_spec2"=.\iem_spec2.dsp - Package Owner=<4> Package=<5> {{{ }}} Package=<4> {{{ }}} ############################################################################### Global: Package=<5> {{{ }}} Package=<3> {{{ }}} ############################################################################### iem_utils-v0.0.20181004/iem_spec2/src/VC6/makefile_win0000644000175000017500000000256112630366347022307 0ustar zmoelnigzmoelnig all: ..\iem_spec2.dll VIS_CPP_PATH = "C:\Programme\Microsoft Visual Studio\Vc98" PD_INST_PATH = "C:\Programme\pd" PD_WIN_INCLUDE_PATH = /I. /I$(PD_INST_PATH)\src /I$(VIS_CPP_PATH)\include PD_WIN_C_FLAGS = /nologo /W3 /WX /DMSW /DNT /DPD /DWIN32 /DWINDOWS /Ox -DPA_LITTLE_ENDIAN PD_WIN_L_FLAGS = /nologo PD_WIN_LIB = /NODEFAULTLIB:libc /NODEFAULTLIB:oldnames /NODEFAULTLIB:kernel /NODEFAULTLIB:uuid \ $(VIS_CPP_PATH)\lib\libc.lib \ $(VIS_CPP_PATH)\lib\oldnames.lib \ $(VIS_CPP_PATH)\lib\kernel32.lib \ $(VIS_CPP_PATH)\lib\wsock32.lib \ $(VIS_CPP_PATH)\lib\winmm.lib \ $(PD_INST_PATH)\bin\pd.lib SRC = spec2_1p1z_freq~.c \ spec2_1p1z_time~.c \ spec2_abs~.c \ spec2_add_scalar~.c \ spec2_add~.c \ spec2_block_delay~.c \ spec2_clip_max~.c \ spec2_clip_min~.c \ spec2_dbtopow~.c \ spec2_dbtorms~.c \ spec2_matrix_bundle_stat~.c \ spec2_mul_scalar~.c \ spec2_mul~.c \ spec2_powtodb~.c \ spec2_rmstodb~.c \ spec2_shift~.c \ spec2_sqrt~.c \ spec2_stretch~.c \ spec2_sub~.c \ spec2_sum~.c \ spec2_tab_conv~.c \ spec2_tabreceive_enable~.c \ spec2_tabreceive~.c \ iem_spec2.c OBJ = $(SRC:.c=.obj) .c.obj: cl $(PD_WIN_C_FLAGS) $(PD_WIN_INCLUDE_PATH) /c $*.c ..\iem_spec2.dll: $(OBJ) link $(PD_WIN_L_FLAGS) /dll /export:iem_spec2_setup \ /out:..\iem_spec2.dll $(OBJ) $(PD_WIN_LIB) clean: del *.obj iem_utils-v0.0.20181004/iem_spec2/src/VC6/iem_spec2.dsp0000644000175000017500000000500712630366347022306 0ustar zmoelnigzmoelnig# Microsoft Developer Studio Project File - Name="iem_spec2" - Package Owner=<4> # Microsoft Developer Studio Generated Build File, Format Version 6.00 # ** NICHT BEARBEITEN ** # TARGTYPE "Win32 (x86) External Target" 0x0106 CFG=iem_spec2 - Win32 Debug !MESSAGE Dies ist kein gltiges Makefile. Zum Erstellen dieses Projekts mit NMAKE !MESSAGE verwenden Sie den Befehl "Makefile exportieren" und fhren Sie den Befehl !MESSAGE !MESSAGE NMAKE /f "iem_spec2.mak". !MESSAGE !MESSAGE Sie knnen beim Ausfhren von NMAKE eine Konfiguration angeben !MESSAGE durch Definieren des Makros CFG in der Befehlszeile. Zum Beispiel: !MESSAGE !MESSAGE NMAKE /f "iem_spec2.mak" CFG="iem_spec2 - Win32 Debug" !MESSAGE !MESSAGE Fr die Konfiguration stehen zur Auswahl: !MESSAGE !MESSAGE "iem_spec2 - Win32 Release" (basierend auf "Win32 (x86) External Target") !MESSAGE "iem_spec2 - Win32 Debug" (basierend auf "Win32 (x86) External Target") !MESSAGE # Begin Project # PROP AllowPerConfigDependencies 0 # PROP Scc_ProjName "" # PROP Scc_LocalPath "" !IF "$(CFG)" == "iem_spec2 - Win32 Release" # PROP BASE Use_Debug_Libraries 0 # PROP BASE Output_Dir "Release" # PROP BASE Intermediate_Dir "Release" # PROP BASE Cmd_Line "NMAKE /f makefile_win" # PROP BASE Rebuild_Opt "/a" # PROP BASE Target_File "makefile_win.exe" # PROP BASE Bsc_Name "makefile_win.bsc" # PROP BASE Target_Dir "" # PROP Use_Debug_Libraries 0 # PROP Output_Dir "Release" # PROP Intermediate_Dir "Release" # PROP Cmd_Line "NMAKE /f makefile_win" # PROP Rebuild_Opt "/a" # PROP Target_File "iem_spec2.exe" # PROP Bsc_Name "iem_spec2.bsc" # PROP Target_Dir "" !ELSEIF "$(CFG)" == "iem_spec2 - Win32 Debug" # PROP BASE Use_Debug_Libraries 1 # PROP BASE Output_Dir "Debug" # PROP BASE Intermediate_Dir "Debug" # PROP BASE Cmd_Line "NMAKE /f makefile_win" # PROP BASE Rebuild_Opt "/a" # PROP BASE Target_File "makefile_win.exe" # PROP BASE Bsc_Name "makefile_win.bsc" # PROP BASE Target_Dir "" # PROP Use_Debug_Libraries 1 # PROP Output_Dir "Debug" # PROP Intermediate_Dir "Debug" # PROP Cmd_Line "NMAKE /f makefile_win" # PROP Rebuild_Opt "/a" # PROP Target_File "iem_spec2.exe" # PROP Bsc_Name "iem_spec2.bsc" # PROP Target_Dir "" !ENDIF # Begin Target # Name "iem_spec2 - Win32 Release" # Name "iem_spec2 - Win32 Debug" !IF "$(CFG)" == "iem_spec2 - Win32 Release" !ELSEIF "$(CFG)" == "iem_spec2 - Win32 Debug" !ENDIF # Begin Source File SOURCE=.\makefile_win # End Source File # End Target # End Project iem_utils-v0.0.20181004/iem_spec2/src/makefile_vc12proj0000644000175000017500000000262613355471363022564 0ustar zmoelnigzmoelnigTARGET = iem_spec2 all: ..\$(TARGET).dll VIS_CPP_COMP = cl VIS_CPP_LINK = link VIS_CPP_PATH = "$(PROGRAMFILES)\Microsoft Visual Studio 11.0\VC" VIS_SDK_PATH = "$(PROGRAMFILES)\Windows Kits\8.1" PD_INST_PATH = "$(PROGRAMFILES)\pd-0.48-1" PD_WIN_INCLUDE_PATH = /I. /I$(PD_INST_PATH)\src /I$(VIS_CPP_PATH)\include /I..\include PD_WIN_C_FLAGS = /nologo /W3 /WX /DMSW /DNT /DPD /DWIN32 /DWINDOWS /Ox -D_CRT_SECURE_NO_WARNINGS PD_WIN_L_FLAGS = /nologo PD_WIN_LIB = /NODEFAULTLIB:libcmt /NODEFAULTLIB:oldnames /NODEFAULTLIB:kernel32 \ $(VIS_CPP_PATH)\lib\libcmt.lib \ $(VIS_CPP_PATH)\lib\oldnames.lib \ $(VIS_SDK_PATH)\Lib\winv6.3\um\x86\kernel32.lib \ $(PD_INST_PATH)\bin\pd.lib SRC = spec2_1p1z_freq~.c \ spec2_1p1z_time~.c \ spec2_abs~.c \ spec2_add_scalar~.c \ spec2_add~.c \ spec2_block_delay~.c \ spec2_clip_max~.c \ spec2_clip_min~.c \ spec2_dbtopow~.c \ spec2_dbtorms~.c \ spec2_matrix_bundle_stat~.c \ spec2_mul_scalar~.c \ spec2_mul~.c \ spec2_powtodb~.c \ spec2_rmstodb~.c \ spec2_shift~.c \ spec2_sqrt~.c \ spec2_stretch~.c \ spec2_sub~.c \ spec2_sum~.c \ spec2_tab_conv~.c \ spec2_tabreceive_enable~.c \ spec2_tabreceive~.c \ $(TARGET).c OBJ = $(SRC:.c=.obj) .c.obj: $(VIS_CPP_COMP) $(PD_WIN_C_FLAGS) $(PD_WIN_INCLUDE_PATH) /c $*.c ..\$(TARGET).dll: $(OBJ) $(VIS_CPP_LINK) $(PD_WIN_L_FLAGS) /dll /export:$(TARGET)_setup \ /out:..\$(TARGET).dll $(OBJ) $(PD_WIN_LIB) clean: del *.obj iem_utils-v0.0.20181004/iem_spec2/src/spec2_add~.c0000644000175000017500000000521113355471363021515 0ustar zmoelnigzmoelnig/* For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. iem_spec2 written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2006 */ #include "m_pd.h" #include "iemlib.h" /* -------------------------- spec2_add~ ------------------------------ */ static t_class *spec2_add_tilde_class; typedef struct _spec2_add_tilde { t_object x_obj; t_float x_msi; } t_spec2_add_tilde; static t_int *spec2_add_tilde_perform(t_int *w) { t_float *in1 = (t_float *)(w[1]); t_float *in2 = (t_float *)(w[2]); t_float *out = (t_float *)(w[3]); int i, n = (t_int)(w[4]); for(i=0; i<=n; i++) { out[i] = in1[i] + in2[i]; } return(w+5); } static t_int *spec2_add_tilde_perf16(t_int *w) { t_float *in1 = (t_float *)(w[1]); t_float *in2 = (t_float *)(w[2]); t_float *out = (t_float *)(w[3]); int n = (t_int)(w[4]); while(n) { out[0] = in1[0] + in2[0]; out[1] = in1[1] + in2[1]; out[2] = in1[2] + in2[2]; out[3] = in1[3] + in2[3]; out[4] = in1[4] + in2[4]; out[5] = in1[5] + in2[5]; out[6] = in1[6] + in2[6]; out[7] = in1[7] + in2[7]; out[8] = in1[8] + in2[8]; out[9] = in1[9] + in2[9]; out[10] = in1[10] + in2[10]; out[11] = in1[11] + in2[11]; out[12] = in1[12] + in2[12]; out[13] = in1[13] + in2[13]; out[14] = in1[14] + in2[14]; out[15] = in1[15] + in2[15]; in1 += 16; in2 += 16; out += 16; n -= 16; } out[0] = in1[0] + in2[0]; return(w+5); } static void spec2_add_tilde_dsp(t_spec2_add_tilde *x, t_signal **sp) { int n = (sp[0]->s_n)/2; if(n&15) dsp_add(spec2_add_tilde_perform, 4, sp[0]->s_vec, sp[1]->s_vec, sp[2]->s_vec, n); else dsp_add(spec2_add_tilde_perf16, 4, sp[0]->s_vec, sp[1]->s_vec, sp[2]->s_vec, n); } static void *spec2_add_tilde_new(void) { t_spec2_add_tilde *x = (t_spec2_add_tilde *)pd_new(spec2_add_tilde_class); inlet_new(&x->x_obj, &x->x_obj.ob_pd, &s_signal, &s_signal); outlet_new(&x->x_obj, &s_signal); x->x_msi = 0.0f; return (x); } static void spec2_add_tilde_free(t_spec2_add_tilde *x) { } void spec2_add_tilde_setup(void) { spec2_add_tilde_class = class_new(gensym("spec2_add~"), (t_newmethod)spec2_add_tilde_new, (t_method)spec2_add_tilde_free, sizeof(t_spec2_add_tilde), 0, 0); class_addcreator((t_newmethod)spec2_add_tilde_new, gensym("spec2+~"), 0); CLASS_MAINSIGNALIN(spec2_add_tilde_class, t_spec2_add_tilde, x_msi); class_addmethod(spec2_add_tilde_class, (t_method)spec2_add_tilde_dsp, gensym("dsp"), A_CANT, 0); // class_sethelpsymbol(spec2_add_tilde_class, gensym("iemhelp2/spec2_add~-help")); } iem_utils-v0.0.20181004/iem_spec2/src/spec2_powtodb~.c0000644000175000017500000000336613355471363022454 0ustar zmoelnigzmoelnig/* For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. iem_spec2 written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2006 */ #include "m_pd.h" #include "iemlib.h" #include #define SPEC2LOGTEN 2.302585092994f /* ------------------------ spec2_powtodb_tilde~ ------------------------- */ static t_class *spec2_powtodb_tilde_class; typedef struct _spec2_powtodb_tilde { t_object x_obj; t_float x_msi; } t_spec2_powtodb_tilde; static t_int *spec2_powtodb_tilde_perform(t_int *w) { t_float *in = (t_float *)(w[1]); t_float *out = (t_float *)(w[2]); int n = w[3]+1; for(; n--; in++, out++) { t_float f = *in; if(f <= 0.0f) *out = 0.0f; else { t_float g = 100.0f + 10.0f/SPEC2LOGTEN * log(f); *out = (g < 0.0f ? 0.0f : g); } } return(w+4); } static void spec2_powtodb_tilde_dsp(t_spec2_powtodb_tilde *x, t_signal **sp) { int n = (sp[0]->s_n)/2; dsp_add(spec2_powtodb_tilde_perform, 3, sp[0]->s_vec, sp[0]->s_vec, n); } static void *spec2_powtodb_tilde_new(void) { t_spec2_powtodb_tilde *x = (t_spec2_powtodb_tilde *)pd_new(spec2_powtodb_tilde_class); outlet_new(&x->x_obj, &s_signal); x->x_msi = 0.0f; return (x); } void spec2_powtodb_tilde_setup(void) { spec2_powtodb_tilde_class = class_new(gensym("spec2_powtodb~"), (t_newmethod)spec2_powtodb_tilde_new, 0, sizeof(t_spec2_powtodb_tilde), 0, 0); CLASS_MAINSIGNALIN(spec2_powtodb_tilde_class, t_spec2_powtodb_tilde, x_msi); class_addmethod(spec2_powtodb_tilde_class, (t_method)spec2_powtodb_tilde_dsp, gensym("dsp"), A_CANT, 0); // class_sethelpsymbol(spec2_powtodb_tilde_class, gensym("iemhelp2/spec2_powtodb~-help")); } iem_utils-v0.0.20181004/iem_spec2/src/spec2_rmstodb~.c0000644000175000017500000000336713355471363022451 0ustar zmoelnigzmoelnig/* For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. iem_spec2 written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2006 */ #include "m_pd.h" #include "iemlib.h" #include #define SPEC2LOGTEN 2.302585092994f /* ------------------------ spec2_rmstodb_tilde~ ------------------------- */ static t_class *spec2_rmstodb_tilde_class; typedef struct _spec2_rmstodb_tilde { t_object x_obj; t_float x_msi; } t_spec2_rmstodb_tilde; static t_int *spec2_rmstodb_tilde_perform(t_int *w) { t_float *in = (t_float *)(w[1]); t_float *out = (t_float *)(w[2]); int n = w[3]+1; for(; n--; in++, out++) { t_float f = *in; if(f <= 0.0f) *out = 0.0f; else { t_float g = 100.0f + 20.0f/SPEC2LOGTEN * log(f); *out = (g < 0.0f ? 0.0f : g); } } return(w+4); } static void spec2_rmstodb_tilde_dsp(t_spec2_rmstodb_tilde *x, t_signal **sp) { int n = (sp[0]->s_n)/2; dsp_add(spec2_rmstodb_tilde_perform, 3, sp[0]->s_vec, sp[0]->s_vec, n); } static void *spec2_rmstodb_tilde_new(void) { t_spec2_rmstodb_tilde *x = (t_spec2_rmstodb_tilde *)pd_new(spec2_rmstodb_tilde_class); outlet_new(&x->x_obj, &s_signal); x->x_msi = 0.0f; return (x); } void spec2_rmstodb_tilde_setup(void) { spec2_rmstodb_tilde_class = class_new(gensym("spec2_rmstodb~"), (t_newmethod)spec2_rmstodb_tilde_new, 0, sizeof(t_spec2_rmstodb_tilde), 0, 0); CLASS_MAINSIGNALIN(spec2_rmstodb_tilde_class, t_spec2_rmstodb_tilde, x_msi); class_addmethod(spec2_rmstodb_tilde_class, (t_method)spec2_rmstodb_tilde_dsp, gensym("dsp"), A_CANT, 0); // class_sethelpsymbol(spec2_rmstodb_tilde_class, gensym("iemhelp2/spec2_rmstodb~-help")); } iem_utils-v0.0.20181004/iem_spec2/src/VC9/0000755000175000017500000000000012630366347017731 5ustar zmoelnigzmoelnigiem_utils-v0.0.20181004/iem_spec2/src/VC9/makefile_vc9proj0000644000175000017500000000257612630366347023117 0ustar zmoelnigzmoelnigTARGET = iem_spec2 all: ..\$(TARGET).dll VIS_CPP_PATH = "C:\Program Files\Microsoft Visual Studio 9.0\VC" VIS_SDK_PATH = "C:\Program Files\Microsoft SDKs\Windows\v6.0A" PD_INST_PATH = "C:\Program Files\pd-0.43.0" PD_WIN_INCLUDE_PATH = /I. /I$(PD_INST_PATH)\src /I$(VIS_CPP_PATH)\include PD_WIN_C_FLAGS = /nologo /W3 /WX /DMSW /DNT /DPD /DWIN32 /DWINDOWS /Ox -D_CRT_SECURE_NO_WARNINGS PD_WIN_L_FLAGS = /nologo PD_WIN_LIB = /NODEFAULTLIB:libcmt /NODEFAULTLIB:oldnames /NODEFAULTLIB:kernel32 \ $(VIS_CPP_PATH)\lib\libcmt.lib \ $(VIS_CPP_PATH)\lib\oldnames.lib \ $(VIS_SDK_PATH)\lib\kernel32.lib \ $(PD_INST_PATH)\bin\pd.lib SRC = spec2_1p1z_freq~.c \ spec2_1p1z_time~.c \ spec2_abs~.c \ spec2_add_scalar~.c \ spec2_add~.c \ spec2_block_delay~.c \ spec2_clip_max~.c \ spec2_clip_min~.c \ spec2_dbtopow~.c \ spec2_dbtorms~.c \ spec2_matrix_bundle_stat~.c \ spec2_mul_scalar~.c \ spec2_mul~.c \ spec2_powtodb~.c \ spec2_rmstodb~.c \ spec2_shift~.c \ spec2_sqrt~.c \ spec2_stretch~.c \ spec2_sub~.c \ spec2_sum~.c \ spec2_tab_conv~.c \ spec2_tabreceive_enable~.c \ spec2_tabreceive~.c \ iem_spec2.c OBJ = $(SRC:.c=.obj) .c.obj: cl $(PD_WIN_C_FLAGS) $(PD_WIN_INCLUDE_PATH) /c $*.c ..\$(TARGET).dll: $(OBJ) link $(PD_WIN_L_FLAGS) /dll /export:$(TARGET)_setup \ /out:..\$(TARGET).dll $(OBJ) $(PD_WIN_LIB) clean: del *.obj iem_utils-v0.0.20181004/iem_spec2/src/VC9/iem_spec2.vcproj0000644000175000017500000000357512630366347023036 0ustar zmoelnigzmoelnig iem_utils-v0.0.20181004/iem_spec2/src/VC9/iem_spec2.sln0000644000175000017500000000156312630366347022322 0ustar zmoelnigzmoelnig Microsoft Visual Studio Solution File, Format Version 10.00 # Visual Studio 2008 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "iem_spec2", "iem_spec2.vcproj", "{6A44952F-0D55-44EE-9032-928368583BEC}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Win32 = Debug|Win32 Release|Win32 = Release|Win32 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {6A44952F-0D55-44EE-9032-928368583BEC}.Debug|Win32.ActiveCfg = Debug|Win32 {6A44952F-0D55-44EE-9032-928368583BEC}.Debug|Win32.Build.0 = Debug|Win32 {6A44952F-0D55-44EE-9032-928368583BEC}.Release|Win32.ActiveCfg = Release|Win32 {6A44952F-0D55-44EE-9032-928368583BEC}.Release|Win32.Build.0 = Release|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection EndGlobal iem_utils-v0.0.20181004/iem_spec2/src/spec2_add_scalar~.c0000644000175000017500000000546213355471363023052 0ustar zmoelnigzmoelnig/* For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. iem_spec2 written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2006 */ #include "m_pd.h" #include "iemlib.h" /* -------------------------- spec2_add_scalar~ ------------------------------ */ static t_class *spec2_add_scalar_tilde_class; typedef struct _spec2_add_scalar_tilde { t_object x_obj; t_float x_f; t_float x_msi; } t_spec2_add_scalar_tilde; static void spec2_add_scalar_tilde_ft1(t_spec2_add_scalar_tilde *x, t_floatarg f) { x->x_f = f; } static t_int *spec2_add_scalar_tilde_perform(t_int *w) { t_float *io = (t_float *)(w[1]); t_spec2_add_scalar_tilde *x = (t_spec2_add_scalar_tilde *)(w[2]); int i, n = (t_int)(w[3]); t_float f = x->x_f; for(i=0; i<=n; i++) { io[i] += f; } return(w+4); } static t_int *spec2_add_scalar_tilde_perf16(t_int *w) { t_float *io = (t_float *)(w[1]); t_spec2_add_scalar_tilde *x = (t_spec2_add_scalar_tilde *)(w[2]); int n = (t_int)(w[3]); t_float f = x->x_f; while(n) { io[0] += f; io[1] += f; io[2] += f; io[3] += f; io[4] += f; io[5] += f; io[6] += f; io[7] += f; io[8] += f; io[9] += f; io[10] += f; io[11] += f; io[12] += f; io[13] += f; io[14] += f; io[15] += f; io += 16; n -= 16; } io[0] += f; return(w+4); } static void spec2_add_scalar_tilde_dsp(t_spec2_add_scalar_tilde *x, t_signal **sp) { int n = (sp[0]->s_n)/2; if(n&15) dsp_add(spec2_add_scalar_tilde_perform, 3, sp[0]->s_vec, x, n); else dsp_add(spec2_add_scalar_tilde_perf16, 3, sp[0]->s_vec, x, n); } static void *spec2_add_scalar_tilde_new(t_floatarg f) { t_spec2_add_scalar_tilde *x = (t_spec2_add_scalar_tilde *)pd_new(spec2_add_scalar_tilde_class); inlet_new(&x->x_obj, &x->x_obj.ob_pd, &s_float, gensym("ft1")); outlet_new(&x->x_obj, &s_signal); x->x_f = f; x->x_msi = 0.0f; return (x); } static void spec2_add_scalar_tilde_free(t_spec2_add_scalar_tilde *x) { } void spec2_add_scalar_tilde_setup(void) { spec2_add_scalar_tilde_class = class_new(gensym("spec2_add_scalar~"), (t_newmethod)spec2_add_scalar_tilde_new, (t_method)spec2_add_scalar_tilde_free, sizeof(t_spec2_add_scalar_tilde), 0, A_DEFFLOAT, 0); class_addcreator((t_newmethod)spec2_add_scalar_tilde_new, gensym("spec2+s~"), A_DEFFLOAT, 0); CLASS_MAINSIGNALIN(spec2_add_scalar_tilde_class, t_spec2_add_scalar_tilde, x_msi); class_addmethod(spec2_add_scalar_tilde_class, (t_method)spec2_add_scalar_tilde_ft1, gensym("ft1"), A_FLOAT, 0); class_addmethod(spec2_add_scalar_tilde_class, (t_method)spec2_add_scalar_tilde_dsp, gensym("dsp"), A_CANT, 0); // class_sethelpsymbol(spec2_add_scalar_tilde_class, gensym("iemhelp2/spec2_add_scalar~-help")); } iem_utils-v0.0.20181004/iem_spec2/src/spec2_stretch~.c0000644000175000017500000000552313355471363022447 0ustar zmoelnigzmoelnig/* For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. iem_spec2 written by Thomas Musil (c) IEM KUG Graz Austria 2000 - 2006 */ #include "m_pd.h" #include "iemlib.h" /* -- spec2_stretch~ - stretch spectral bins --- */ typedef struct spec2_stretch_tilde { t_object x_obj; int x_blocksize; t_float x_mul; t_float *x_spec; t_float x_msi; } t_spec2_stretch_tilde; t_class *spec2_stretch_tilde_class; static t_int *spec2_stretch_tilde_perform(t_int *w) { t_float *in = (t_float *)(w[1]); t_float *out = (t_float *)(w[2]); t_spec2_stretch_tilde *x = (t_spec2_stretch_tilde *)(w[3]); int i, j, m, n = (t_int)(w[4])+1; t_float yn0, yn1, fract; t_float *spec=x->x_spec; t_float mul=x->x_mul; t_float rcp_mul = 1.0f / mul; for(i=0; i n) m = n; for(i=0; ix_mul = mul; } static void spec2_stretch_tilde_dsp(t_spec2_stretch_tilde *x, t_signal **sp) { int n = (sp[0]->s_n)/2; if(!x->x_blocksize) { x->x_spec = (t_float *)getbytes((n+1)*sizeof(t_float)); x->x_blocksize = n; } else if(x->x_blocksize != n) { x->x_spec = (t_float *)resizebytes(x->x_spec, (x->x_blocksize+1)*sizeof(t_float), (n+1)*sizeof(t_float)); x->x_blocksize = n; } dsp_add(spec2_stretch_tilde_perform, 4, sp[0]->s_vec, sp[1]->s_vec, x, n); } static void *spec2_stretch_tilde_new(t_floatarg mul) { t_spec2_stretch_tilde *x = (t_spec2_stretch_tilde *)pd_new(spec2_stretch_tilde_class); outlet_new(&x->x_obj, &s_signal); if(mul <= 0.0f) mul = 1.0f; x->x_blocksize = 0; x->x_mul = mul; x->x_spec = (t_float *)0; return (x); } static void spec2_stretch_tilde_free(t_spec2_stretch_tilde *x) { if(x->x_spec) freebytes(x->x_spec, (x->x_blocksize+1) * sizeof(t_float)); } void spec2_stretch_tilde_setup(void) { spec2_stretch_tilde_class = class_new(gensym("spec2_stretch~"), (t_newmethod)spec2_stretch_tilde_new, 0, sizeof(t_spec2_stretch_tilde), 0, A_DEFFLOAT, 0); CLASS_MAINSIGNALIN(spec2_stretch_tilde_class, t_spec2_stretch_tilde, x_msi); class_addmethod(spec2_stretch_tilde_class, (t_method)spec2_stretch_tilde_dsp, gensym("dsp"), A_CANT, 0); class_addfloat(spec2_stretch_tilde_class, (t_method)spec2_stretch_tilde_mul); // class_sethelpsymbol(spec2_stretch_tilde_class, gensym("iemhelp/spec2_stretch~-help")); } iem_utils-v0.0.20181004/iem_spec2/src/spec2_abs~.c0000644000175000017500000000432313355471363021535 0ustar zmoelnigzmoelnig/* For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. iem_spec2 written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2006 */ #include "m_pd.h" #include "iemlib.h" #include /* ------------------------ spec2_abs_tilde~ ------------------------- */ static t_class *spec2_abs_tilde_class; typedef struct _spec2_abs_tilde { t_object x_obj; t_float x_msi; } t_spec2_abs_tilde; static t_int *spec2_abs_tilde_perform(t_int *w) { t_float *in = (t_float *)(w[1]); t_float *out = (t_float *)(w[2]); int n = w[3]+1; while(n--) { *in++ = fabs(*out++); } return(w+4); } static t_int *spec2_abs_tilde_perf16(t_int *w) { t_float *in = (t_float *)(w[1]); t_float *out = (t_float *)(w[2]); int n = w[3]; while(n) { in[0] = fabs(out[0]); in[1] = fabs(out[1]); in[2] = fabs(out[2]); in[3] = fabs(out[3]); in[4] = fabs(out[4]); in[5] = fabs(out[5]); in[6] = fabs(out[6]); in[7] = fabs(out[7]); in[8] = fabs(out[8]); in[9] = fabs(out[9]); in[10] = fabs(out[10]); in[11] = fabs(out[11]); in[12] = fabs(out[12]); in[13] = fabs(out[13]); in[14] = fabs(out[14]); in[15] = fabs(out[15]); in += 16; out += 16; n -= 16; } in[0] = fabs(out[0]); return(w+4); } static void spec2_abs_tilde_dsp(t_spec2_abs_tilde *x, t_signal **sp) { int n = (sp[0]->s_n)/2; if(n&15) dsp_add(spec2_abs_tilde_perform, 3, sp[0]->s_vec, sp[0]->s_vec, n); else dsp_add(spec2_abs_tilde_perf16, 3, sp[0]->s_vec, sp[0]->s_vec, n); } static void *spec2_abs_tilde_new(void) { t_spec2_abs_tilde *x = (t_spec2_abs_tilde *)pd_new(spec2_abs_tilde_class); outlet_new(&x->x_obj, &s_signal); x->x_msi = 0.0f; return (x); } void spec2_abs_tilde_setup(void) { spec2_abs_tilde_class = class_new(gensym("spec2_abs~"), (t_newmethod)spec2_abs_tilde_new, 0, sizeof(t_spec2_abs_tilde), 0, 0); CLASS_MAINSIGNALIN(spec2_abs_tilde_class, t_spec2_abs_tilde, x_msi); class_addmethod(spec2_abs_tilde_class, (t_method)spec2_abs_tilde_dsp, gensym("dsp"), A_CANT, 0); // class_sethelpsymbol(spec2_abs_tilde_class, gensym("iemhelp2/spec2_abs~-help")); } iem_utils-v0.0.20181004/iem_spec2/src/spec2_block_delay~.c0000644000175000017500000000774213355471363023250 0ustar zmoelnigzmoelnig/* For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. iem_spec2 written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2006 */ #include "m_pd.h" #include "iemlib.h" /* -------------------------- spec2_block_delay~ ------------------------------ */ static t_class *spec2_block_delay_tilde_class; typedef struct _spec2_block_delay_tilde { t_object x_obj; t_float *x_begmem; int x_blocksize; t_float x_msi; } t_spec2_block_delay_tilde; static t_int *spec2_block_delay_tilde_perform(t_int *w) { t_float *in = (t_float *)(w[1]); t_float *out = (t_float *)(w[2]); t_spec2_block_delay_tilde *x = (t_spec2_block_delay_tilde *)(w[3]); int i, n = (t_int)(w[4]); t_float *rw_vec; rw_vec = x->x_begmem; for(i=0; i<=n; i++) { t_float f = in[i]; out[i] = rw_vec[i]; rw_vec[i] = f; } return(w+5); } static t_int *spec2_block_delay_tilde_perf16(t_int *w) { t_float *in = (t_float *)(w[1]); t_float *out = (t_float *)(w[2]); t_spec2_block_delay_tilde *x = (t_spec2_block_delay_tilde *)(w[3]); int i, n = (t_int)(w[4]); t_float *rw_vec, ff; rw_vec = x->x_begmem; while(n) { t_float f[16]; f[0] = in[0]; f[1] = in[1]; f[2] = in[2]; f[3] = in[3]; f[4] = in[4]; f[5] = in[5]; f[6] = in[6]; f[7] = in[7]; f[8] = in[8]; f[9] = in[9]; f[10] = in[10]; f[11] = in[11]; f[12] = in[12]; f[13] = in[13]; f[14] = in[14]; f[15] = in[15]; out[0] = rw_vec[0]; out[1] = rw_vec[1]; out[2] = rw_vec[2]; out[3] = rw_vec[3]; out[4] = rw_vec[4]; out[5] = rw_vec[5]; out[6] = rw_vec[6]; out[7] = rw_vec[7]; out[8] = rw_vec[8]; out[9] = rw_vec[9]; out[10] = rw_vec[10]; out[11] = rw_vec[11]; out[12] = rw_vec[12]; out[13] = rw_vec[13]; out[14] = rw_vec[14]; out[15] = rw_vec[15]; rw_vec[0] = f[0]; rw_vec[1] = f[1]; rw_vec[2] = f[2]; rw_vec[3] = f[3]; rw_vec[4] = f[4]; rw_vec[5] = f[5]; rw_vec[6] = f[6]; rw_vec[7] = f[7]; rw_vec[8] = f[8]; rw_vec[9] = f[9]; rw_vec[10] = f[10]; rw_vec[11] = f[11]; rw_vec[12] = f[12]; rw_vec[13] = f[13]; rw_vec[14] = f[14]; rw_vec[15] = f[15]; rw_vec += 16; in += 16; out += 16; n -= 16; } ff = in[0]; out[0] = rw_vec[0]; rw_vec[0] = ff; return(w+5); } static void spec2_block_delay_tilde_dsp(t_spec2_block_delay_tilde *x, t_signal **sp) { int n = (sp[0]->s_n)/2; if(!x->x_blocksize)/*first time*/ { x->x_begmem = (t_float *)getbytes((n+1) * sizeof(t_float)); x->x_blocksize = n; } else if(x->x_blocksize != n) { x->x_begmem = (t_float *)resizebytes(x->x_begmem, (x->x_blocksize+1)*sizeof(t_float), (n+1)*sizeof(t_float)); x->x_blocksize = n; } if(n&15) dsp_add(spec2_block_delay_tilde_perform, 4, sp[0]->s_vec, sp[1]->s_vec, x, n); else dsp_add(spec2_block_delay_tilde_perf16, 4, sp[0]->s_vec, sp[1]->s_vec, x, n); } static void *spec2_block_delay_tilde_new(void) { t_spec2_block_delay_tilde *x = (t_spec2_block_delay_tilde *)pd_new(spec2_block_delay_tilde_class); x->x_blocksize = 0; x->x_begmem = (t_float *)0; outlet_new(&x->x_obj, &s_signal); x->x_msi = 0.0f; return (x); } static void spec2_block_delay_tilde_free(t_spec2_block_delay_tilde *x) { if(x->x_begmem) freebytes(x->x_begmem, (x->x_blocksize+1) * sizeof(t_float)); } void spec2_block_delay_tilde_setup(void) { spec2_block_delay_tilde_class = class_new(gensym("spec2_block_delay~"), (t_newmethod)spec2_block_delay_tilde_new, (t_method)spec2_block_delay_tilde_free, sizeof(t_spec2_block_delay_tilde), 0, 0); CLASS_MAINSIGNALIN(spec2_block_delay_tilde_class, t_spec2_block_delay_tilde, x_msi); class_addmethod(spec2_block_delay_tilde_class, (t_method)spec2_block_delay_tilde_dsp, gensym("dsp"), A_CANT, 0); // class_sethelpsymbol(spec2_block_delay_tilde_class, gensym("iemhelp2/spec2_block_delay~-help")); } iem_utils-v0.0.20181004/iem_spec2/src/spec2_sqrt~.c0000644000175000017500000000326313355471363021763 0ustar zmoelnigzmoelnig/* For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. iem_spec2 written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2006 */ #include "m_pd.h" #include "iemlib.h" #include /* ------------------------ spec2_sqrt_tilde~ ------------------------- */ static t_class *spec2_sqrt_tilde_class; typedef struct _spec2_sqrt_tilde { t_object x_obj; t_float x_msi; } t_spec2_sqrt_tilde; static t_int *spec2_sqrt_tilde_perform(t_int *w) { t_float *in = (t_float *)(w[1]); t_float *out = (t_float *)(w[2]); int n = w[3]+1; while(n--) { t_sample f = *in++; if (f<0.0) { *out++=0.0; } else { #if ((defined PD_MAJOR_VERSION && defined PD_MINOR_VERSION) && (PD_MAJOR_VERSION > 0 || PD_MINOR_VERSION > 43)) t_float g = q8_rsqrt(f); *out++ = f*g*(1.5 - 0.5 * g * g * f); #else *out++ = sqrt(f); #endif } } return(w+4); } static void spec2_sqrt_tilde_dsp(t_spec2_sqrt_tilde *x, t_signal **sp) { int n = (sp[0]->s_n)/2; dsp_add(spec2_sqrt_tilde_perform, 3, sp[0]->s_vec, sp[0]->s_vec, n); } static void *spec2_sqrt_tilde_new(void) { t_spec2_sqrt_tilde *x = (t_spec2_sqrt_tilde *)pd_new(spec2_sqrt_tilde_class); outlet_new(&x->x_obj, &s_signal); x->x_msi = 0.0f; return (x); } void spec2_sqrt_tilde_setup(void) { spec2_sqrt_tilde_class = class_new(gensym("spec2_sqrt~"), (t_newmethod)spec2_sqrt_tilde_new, 0, sizeof(t_spec2_sqrt_tilde), 0, 0); CLASS_MAINSIGNALIN(spec2_sqrt_tilde_class, t_spec2_sqrt_tilde, x_msi); class_addmethod(spec2_sqrt_tilde_class, (t_method)spec2_sqrt_tilde_dsp, gensym("dsp"), A_CANT, 0); } iem_utils-v0.0.20181004/iem_spec2/src/spec2_1p1z_time~.c0000644000175000017500000001412613355471363022603 0ustar zmoelnigzmoelnig/* For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. iem_spec2 written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2006 */ #include "m_pd.h" #include "iemlib.h" /* -------------------------- spec2_1p1z_time~ ------------------------------ */ static t_class *spec2_1p1z_time_tilde_class; typedef struct _spec2_1p1z_time_tilde { t_object x_obj; t_float x_a0; t_float x_a1; t_float x_b1; t_float *x_begmem_forw; t_float *x_begmem_back; int x_blocksize; t_float x_msi; } t_spec2_1p1z_time_tilde; static void spec2_1p1z_time_tilde_list(t_spec2_1p1z_time_tilde *x, t_symbol *s, int argc, t_atom *argv) { if((argc >= 3) && IS_A_FLOAT(argv,0) && IS_A_FLOAT(argv,1) && IS_A_FLOAT(argv,2)) { x->x_a0 = (t_float)atom_getfloatarg(0, argc, argv); x->x_a1 = (t_float)atom_getfloatarg(1, argc, argv); x->x_b1 = (t_float)atom_getfloatarg(2, argc, argv); } } static t_int *spec2_1p1z_time_tilde_perform(t_int *w) { t_float *in = (t_float *)(w[1]); t_float *out = (t_float *)(w[2]); t_spec2_1p1z_time_tilde *x = (t_spec2_1p1z_time_tilde *)(w[3]); int i, n = (t_int)(w[4]); t_float a0 = x->x_a0; t_float a1 = x->x_a1; t_float b1 = x->x_b1; t_float *vec_forw = x->x_begmem_forw; t_float *vec_back = x->x_begmem_back; t_float f; for(i=0; i<=n; i++) { f = in[i]; out[i] = a0*f + a1*vec_forw[i] + b1*vec_back[i]; vec_forw[i] = f; vec_back[i] = out[i]; } return(w+5); } static t_int *spec2_1p1z_time_tilde_perf16(t_int *w) { t_float *in = (t_float *)(w[1]); t_float *out = (t_float *)(w[2]); t_spec2_1p1z_time_tilde *x = (t_spec2_1p1z_time_tilde *)(w[3]); int n = (t_int)(w[4]); t_float a0 = x->x_a0; t_float a1 = x->x_a1; t_float b1 = x->x_b1; t_float *vec_forw = x->x_begmem_forw; t_float *vec_back = x->x_begmem_back; t_float ff; while(n) { t_float f[16]; f[0] = in[0]; f[1] = in[1]; f[2] = in[2]; f[3] = in[3]; f[4] = in[4]; f[5] = in[5]; f[6] = in[6]; f[7] = in[7]; f[8] = in[8]; f[9] = in[9]; f[10] = in[10]; f[11] = in[11]; f[12] = in[12]; f[13] = in[13]; f[14] = in[14]; f[15] = in[15]; out[0] = a0*f[0] + a1*vec_forw[0] + b1*vec_back[0]; out[1] = a0*f[1] + a1*vec_forw[1] + b1*vec_back[1]; out[2] = a0*f[2] + a1*vec_forw[2] + b1*vec_back[2]; out[3] = a0*f[3] + a1*vec_forw[3] + b1*vec_back[3]; out[4] = a0*f[4] + a1*vec_forw[4] + b1*vec_back[4]; out[5] = a0*f[5] + a1*vec_forw[5] + b1*vec_back[5]; out[6] = a0*f[6] + a1*vec_forw[6] + b1*vec_back[6]; out[7] = a0*f[7] + a1*vec_forw[7] + b1*vec_back[7]; out[8] = a0*f[8] + a1*vec_forw[8] + b1*vec_back[8]; out[9] = a0*f[9] + a1*vec_forw[9] + b1*vec_back[9]; out[10] = a0*f[10] + a1*vec_forw[10] + b1*vec_back[10]; out[11] = a0*f[11] + a1*vec_forw[11] + b1*vec_back[11]; out[12] = a0*f[12] + a1*vec_forw[12] + b1*vec_back[12]; out[13] = a0*f[13] + a1*vec_forw[13] + b1*vec_back[13]; out[14] = a0*f[14] + a1*vec_forw[14] + b1*vec_back[14]; out[15] = a0*f[15] + a1*vec_forw[15] + b1*vec_back[15]; vec_forw[0] = f[0]; vec_forw[1] = f[1]; vec_forw[2] = f[2]; vec_forw[3] = f[3]; vec_forw[4] = f[4]; vec_forw[5] = f[5]; vec_forw[6] = f[6]; vec_forw[7] = f[7]; vec_forw[8] = f[8]; vec_forw[9] = f[9]; vec_forw[10] = f[10]; vec_forw[11] = f[11]; vec_forw[12] = f[12]; vec_forw[13] = f[13]; vec_forw[14] = f[14]; vec_forw[15] = f[15]; vec_back[0] = out[0]; vec_back[1] = out[1]; vec_back[2] = out[2]; vec_back[3] = out[3]; vec_back[4] = out[4]; vec_back[5] = out[5]; vec_back[6] = out[6]; vec_back[7] = out[7]; vec_back[8] = out[8]; vec_back[9] = out[9]; vec_back[10] = out[10]; vec_back[11] = out[11]; vec_back[12] = out[12]; vec_back[13] = out[13]; vec_back[14] = out[14]; vec_back[15] = out[15]; in += 16; out += 16; vec_forw += 16; vec_back += 16; n -= 16; } ff = in[0]; out[0] = a0*ff + a1*vec_forw[0] + b1*vec_back[0]; vec_forw[0] = ff; vec_back[0] = out[0]; return(w+5); } static void spec2_1p1z_time_tilde_dsp(t_spec2_1p1z_time_tilde *x, t_signal **sp) { int n = (sp[0]->s_n)/2; if(!x->x_blocksize)/*first time*/ { x->x_begmem_forw = (t_float *)getbytes(2 * (n+1) * sizeof(t_float)); x->x_blocksize = n; x->x_begmem_back = x->x_begmem_forw + n + 1; } else if(x->x_blocksize != n) { x->x_begmem_forw = (t_float *)resizebytes(x->x_begmem_forw, 2*(x->x_blocksize+1)*sizeof(t_float), 2*(n+1)*sizeof(t_float)); x->x_blocksize = n; x->x_begmem_back = x->x_begmem_forw + n +1; } if(n&15) dsp_add(spec2_1p1z_time_tilde_perform, 4, sp[0]->s_vec, sp[1]->s_vec, x, n); else dsp_add(spec2_1p1z_time_tilde_perf16, 4, sp[0]->s_vec, sp[1]->s_vec, x, n); } static void *spec2_1p1z_time_tilde_new(t_symbol *s, int argc, t_atom *argv) { t_spec2_1p1z_time_tilde *x = (t_spec2_1p1z_time_tilde *)pd_new(spec2_1p1z_time_tilde_class); outlet_new(&x->x_obj, &s_signal); x->x_blocksize = 0; x->x_begmem_forw = (t_float *)0; if(argc >= 3) spec2_1p1z_time_tilde_list(x, s, argc, argv); else { x->x_a0 = 1.0f; x->x_a1 = 0.0f; x->x_b1 = 0.0f; } x->x_msi = 0.0f; return (x); } static void spec2_1p1z_time_tilde_free(t_spec2_1p1z_time_tilde *x) { if(x->x_begmem_forw) freebytes(x->x_begmem_forw, 2 * (x->x_blocksize+1) * sizeof(t_float)); } void spec2_1p1z_time_tilde_setup(void) { spec2_1p1z_time_tilde_class = class_new(gensym("spec2_1p1z_time~"), (t_newmethod)spec2_1p1z_time_tilde_new, (t_method)spec2_1p1z_time_tilde_free, sizeof(t_spec2_1p1z_time_tilde), 0, A_GIMME, 0); CLASS_MAINSIGNALIN(spec2_1p1z_time_tilde_class, t_spec2_1p1z_time_tilde, x_msi); class_addlist(spec2_1p1z_time_tilde_class, (t_method)spec2_1p1z_time_tilde_list); class_addmethod(spec2_1p1z_time_tilde_class, (t_method)spec2_1p1z_time_tilde_dsp, gensym("dsp"), A_CANT, 0); // class_sethelpsymbol(spec2_1p1z_time_tilde_class, gensym("iemhelp2/spec2_1p1z_time~-help")); } iem_utils-v0.0.20181004/iem_spec2/src/spec2_tab_conv~.c0000644000175000017500000001016413355471363022563 0ustar zmoelnigzmoelnig/* For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. iem_spec2 written by Thomas Musil (c) IEM KUG Graz Austria 2000 - 2009 */ #include "m_pd.h" #include "iemlib.h" /* -- spec2_tab_conv~ - convolute a spectrum with a table --- */ typedef struct spec2_tab_conv_tilde { t_object x_obj; t_float *x_spec; iemarray_t *x_beg_array; int x_blocksize; int x_winsize; int x_has_changed; t_symbol *x_sym_array; t_float x_msi; } t_spec2_tab_conv_tilde; t_class *spec2_tab_conv_tilde_class; static void spec2_tab_conv_tilde_set(t_spec2_tab_conv_tilde *x, t_symbol *s, int argc, t_atom *argv) { if((argc >= 2) && IS_A_SYMBOL(argv, 0) && IS_A_FLOAT(argv, 1)) { x->x_sym_array = (t_symbol *)(atom_getsymbol(argv)); x->x_winsize = (int)(atom_getint(argv+1)); x->x_has_changed = 1; } } static t_int *spec2_tab_conv_tilde_perform(t_int *w) { t_float *in = (t_float *)(w[1]); t_float *out = (t_float *)(w[2]); t_spec2_tab_conv_tilde *x = (t_spec2_tab_conv_tilde *)(w[3]); t_float sum=0.0f; t_float *vec1, *vec2, *vec3; iemarray_t*win; int i, m, n = (int)(w[4])+1; int j, ws=x->x_winsize; vec2 = x->x_spec + n; vec1 = vec2; vec3 = vec2 + 2*n - 2; for(i=0; ix_spec + n - ws/2; win = x->x_beg_array; for(i=0; is_n)/2; t_garray *a; int n_points; if(x->x_has_changed) { x->x_has_changed = 0; if(!(a = (t_garray *)pd_findbyclass(x->x_sym_array, garray_class))) { if(*x->x_sym_array->s_name) error("spec2_tab_conv~: %s: no such array", x->x_sym_array->s_name); } else if(!iemarray_getarray(a, &n_points, &x->x_beg_array)) error("%s: bad template for spec2_tab_conv~", x->x_sym_array->s_name); else { if(n_points > (n+1)) n_points = n+1; if(x->x_winsize < 0) x->x_winsize = 0; if(x->x_winsize > n_points) x->x_winsize = n_points; } } if(!x->x_blocksize) { x->x_spec = (t_float *)getbytes(3*(n+1)*sizeof(t_float)); x->x_blocksize = n; } else if(x->x_blocksize != n) { x->x_spec = (t_float *)resizebytes(x->x_spec, 3*(x->x_blocksize+1)*sizeof(t_float), 3*(n+1)*sizeof(t_float)); x->x_blocksize = n; } dsp_add(spec2_tab_conv_tilde_perform, 4, sp[0]->s_vec, sp[1]->s_vec, x, n); } static void spec2_tab_conv_tilde_free(t_spec2_tab_conv_tilde *x) { if(x->x_spec) freebytes(x->x_spec, 3*(x->x_blocksize+1)*sizeof(t_float)); } static void *spec2_tab_conv_tilde_new(t_symbol *s, int argc, t_atom *argv) { t_spec2_tab_conv_tilde *x = (t_spec2_tab_conv_tilde *)pd_new(spec2_tab_conv_tilde_class); if((argc >= 2) && IS_A_SYMBOL(argv,0) && IS_A_FLOAT(argv,1)) { x->x_sym_array = (t_symbol *)(atom_getsymbol(argv)); x->x_winsize = (int)(atom_getint(argv+1)); x->x_spec = (t_float *)0; x->x_beg_array = (iemarray_t *)0; x->x_blocksize = 0; x->x_has_changed = 1; outlet_new(&x->x_obj, &s_signal); x->x_msi = 0.0f; return(x); } else { post("spec2_tab_conv~-ERROR: needs 2 args: convolution-array-name + convolution-array-size !!!"); return(0); } } void spec2_tab_conv_tilde_setup(void) { spec2_tab_conv_tilde_class = class_new(gensym("spec2_tab_conv~"), (t_newmethod)spec2_tab_conv_tilde_new, (t_method)spec2_tab_conv_tilde_free, sizeof(t_spec2_tab_conv_tilde), 0, A_GIMME, 0); CLASS_MAINSIGNALIN(spec2_tab_conv_tilde_class, t_spec2_tab_conv_tilde, x_msi); class_addmethod(spec2_tab_conv_tilde_class, (t_method)spec2_tab_conv_tilde_dsp, gensym("dsp"), A_CANT, 0); class_addmethod(spec2_tab_conv_tilde_class, (t_method)spec2_tab_conv_tilde_set, gensym("set"), A_GIMME, 0); // class_sethelpsymbol(spec2_tab_conv_tilde_class, gensym("iemhelp/spec2_tab_conv~-help")); } iem_utils-v0.0.20181004/iem_spec2/src/iem_spec2.dsw0000644000175000017500000000107112630366347021714 0ustar zmoelnigzmoelnigMicrosoft Developer Studio Workspace File, Format Version 6.00 # WARNUNG: DIESE ARBEITSBEREICHSDATEI DARF NICHT BEARBEITET ODER GELSCHT WERDEN! ############################################################################### Project: "iem_spec2"=.\iem_spec2.dsp - Package Owner=<4> Package=<5> {{{ }}} Package=<4> {{{ }}} ############################################################################### Global: Package=<5> {{{ }}} Package=<3> {{{ }}} ############################################################################### iem_utils-v0.0.20181004/iem_spec2/src/iem_spec2.sln0000644000175000017500000000156413355471363021722 0ustar zmoelnigzmoelnig Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 2012 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "iem_spec2", "iem_spec2.vcxproj", "{95441F75-6F85-457D-9174-37575E559755}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Win32 = Debug|Win32 Release|Win32 = Release|Win32 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {95441F75-6F85-457D-9174-37575E559755}.Debug|Win32.ActiveCfg = Debug|Win32 {95441F75-6F85-457D-9174-37575E559755}.Debug|Win32.Build.0 = Debug|Win32 {95441F75-6F85-457D-9174-37575E559755}.Release|Win32.ActiveCfg = Release|Win32 {95441F75-6F85-457D-9174-37575E559755}.Release|Win32.Build.0 = Release|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection EndGlobal iem_utils-v0.0.20181004/iem_spec2/src/makefile_win0000644000175000017500000000256112630366347021711 0ustar zmoelnigzmoelnig all: ..\iem_spec2.dll VIS_CPP_PATH = "C:\Programme\Microsoft Visual Studio\Vc98" PD_INST_PATH = "C:\Programme\pd" PD_WIN_INCLUDE_PATH = /I. /I$(PD_INST_PATH)\src /I$(VIS_CPP_PATH)\include PD_WIN_C_FLAGS = /nologo /W3 /WX /DMSW /DNT /DPD /DWIN32 /DWINDOWS /Ox -DPA_LITTLE_ENDIAN PD_WIN_L_FLAGS = /nologo PD_WIN_LIB = /NODEFAULTLIB:libc /NODEFAULTLIB:oldnames /NODEFAULTLIB:kernel /NODEFAULTLIB:uuid \ $(VIS_CPP_PATH)\lib\libc.lib \ $(VIS_CPP_PATH)\lib\oldnames.lib \ $(VIS_CPP_PATH)\lib\kernel32.lib \ $(VIS_CPP_PATH)\lib\wsock32.lib \ $(VIS_CPP_PATH)\lib\winmm.lib \ $(PD_INST_PATH)\bin\pd.lib SRC = spec2_1p1z_freq~.c \ spec2_1p1z_time~.c \ spec2_abs~.c \ spec2_add_scalar~.c \ spec2_add~.c \ spec2_block_delay~.c \ spec2_clip_max~.c \ spec2_clip_min~.c \ spec2_dbtopow~.c \ spec2_dbtorms~.c \ spec2_matrix_bundle_stat~.c \ spec2_mul_scalar~.c \ spec2_mul~.c \ spec2_powtodb~.c \ spec2_rmstodb~.c \ spec2_shift~.c \ spec2_sqrt~.c \ spec2_stretch~.c \ spec2_sub~.c \ spec2_sum~.c \ spec2_tab_conv~.c \ spec2_tabreceive_enable~.c \ spec2_tabreceive~.c \ iem_spec2.c OBJ = $(SRC:.c=.obj) .c.obj: cl $(PD_WIN_C_FLAGS) $(PD_WIN_INCLUDE_PATH) /c $*.c ..\iem_spec2.dll: $(OBJ) link $(PD_WIN_L_FLAGS) /dll /export:iem_spec2_setup \ /out:..\iem_spec2.dll $(OBJ) $(PD_WIN_LIB) clean: del *.obj iem_utils-v0.0.20181004/iem_spec2/src/spec2_shift~.c0000644000175000017500000000562113355471363022107 0ustar zmoelnigzmoelnig/* For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. iem_spec2 written by Thomas Musil (c) IEM KUG Graz Austria 2000 - 2006 */ #include "m_pd.h" #include "iemlib.h" /* -- spec2_shift~ - shift spectral bins to left (lower, negative) or to right (higher, positiv) --- */ typedef struct spec2_shift_tilde { t_object x_obj; int x_blocksize; t_float x_add; t_float *x_spec; t_float x_msi; } t_spec2_shift_tilde; t_class *spec2_shift_tilde_class; static t_int *spec2_shift_tilde_perform(t_int *w) { t_float *in = (t_float *)(w[1]); t_float *out = (t_float *)(w[2]); t_spec2_shift_tilde *x = (t_spec2_shift_tilde *)(w[3]); int i, j, n = (t_int)(w[4])+1; t_float *spec=x->x_spec; t_float add=x->x_add; if((add >= n) || (add <= -n)) { for(i=0; i= 0) { for(i=0; ix_add = add; } static void spec2_shift_tilde_dsp(t_spec2_shift_tilde *x, t_signal **sp) { int n = (sp[0]->s_n)/2; if(!x->x_blocksize) { x->x_spec = (t_float *)getbytes((n+1)*sizeof(t_float)); x->x_blocksize = n; } else if(x->x_blocksize != n) { x->x_spec = (t_float *)resizebytes(x->x_spec, (x->x_blocksize+1)*sizeof(t_float), (n+1)*sizeof(t_float)); x->x_blocksize = n; } dsp_add(spec2_shift_tilde_perform, 4, sp[0]->s_vec, sp[1]->s_vec, x, n); } static void *spec2_shift_tilde_new(t_floatarg add) { t_spec2_shift_tilde *x = (t_spec2_shift_tilde *)pd_new(spec2_shift_tilde_class); outlet_new(&x->x_obj, &s_signal); x->x_blocksize = 0; x->x_add = add; x->x_spec = (t_float *)0; return (x); } static void spec2_shift_tilde_free(t_spec2_shift_tilde *x) { if(x->x_spec) freebytes(x->x_spec, (x->x_blocksize+1) * sizeof(t_float)); } void spec2_shift_tilde_setup(void) { spec2_shift_tilde_class = class_new(gensym("spec2_shift~"), (t_newmethod)spec2_shift_tilde_new, 0, sizeof(t_spec2_shift_tilde), 0, A_DEFFLOAT, 0); CLASS_MAINSIGNALIN(spec2_shift_tilde_class, t_spec2_shift_tilde, x_msi); class_addmethod(spec2_shift_tilde_class, (t_method)spec2_shift_tilde_dsp, gensym("dsp"), A_CANT, 0); class_addfloat(spec2_shift_tilde_class, (t_method)spec2_shift_tilde_add); // class_sethelpsymbol(spec2_shift_tilde_class, gensym("iemhelp/spec2_shift~-help")); } iem_utils-v0.0.20181004/iem_spec2/src/spec2_clip_max~.c0000644000175000017500000000714513355471363022571 0ustar zmoelnigzmoelnig/* For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. iem_spec2 written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2006 */ #include "m_pd.h" #include "iemlib.h" /* -------------------------- spec2_clip_max~ ------------------------------ */ static t_class *spec2_clip_max_tilde_class; typedef struct _spec2_clip_max_tilde { t_object x_obj; t_float x_msi; } t_spec2_clip_max_tilde; static t_int *spec2_clip_max_tilde_perform(t_int *w) { t_float *in = (t_float *)(w[1]); t_float *max = (t_float *)(w[2]); t_float *out = (t_float *)(w[3]); int i, n = (t_int)(w[4]); for(i=0; i<=n; i++) { if(in[i] > max[i]) out[i] = max[i]; else out[i] = in[i]; } return(w+5); } static t_int *spec2_clip_max_tilde_perf16(t_int *w) { t_float *in = (t_float *)(w[1]); t_float *max = (t_float *)(w[2]); t_float *out = (t_float *)(w[3]); int n = (t_int)(w[4]); while(n) { if(in[0] > max[0]) out[0] = max[0]; else out[0] = in[0]; if(in[1] > max[1]) out[1] = max[1]; else out[1] = in[1]; if(in[2] > max[2]) out[2] = max[2]; else out[2] = in[2]; if(in[3] > max[3]) out[3] = max[3]; else out[3] = in[3]; if(in[4] > max[4]) out[4] = max[4]; else out[4] = in[4]; if(in[5] > max[5]) out[5] = max[5]; else out[5] = in[5]; if(in[6] > max[6]) out[6] = max[6]; else out[6] = in[6]; if(in[7] > max[7]) out[7] = max[7]; else out[7] = in[7]; if(in[8] > max[8]) out[8] = max[8]; else out[8] = in[8]; if(in[9] > max[9]) out[9] = max[9]; else out[9] = in[9]; if(in[10] > max[10]) out[10] = max[10]; else out[10] = in[10]; if(in[11] > max[11]) out[11] = max[11]; else out[11] = in[11]; if(in[12] > max[12]) out[12] = max[12]; else out[12] = in[12]; if(in[13] > max[13]) out[13] = max[13]; else out[13] = in[13]; if(in[14] > max[14]) out[14] = max[14]; else out[14] = in[14]; if(in[15] > max[15]) out[15] = max[15]; else out[15] = in[15]; in += 16; max += 16; out += 16; n -= 16; } if(in[0] > max[0]) out[0] = max[0]; else out[0] = in[0]; return(w+5); } static void spec2_clip_max_tilde_dsp(t_spec2_clip_max_tilde *x, t_signal **sp) { int n = (sp[0]->s_n)/2; if(n&15) dsp_add(spec2_clip_max_tilde_perform, 4, sp[0]->s_vec, sp[1]->s_vec, sp[2]->s_vec, n); else dsp_add(spec2_clip_max_tilde_perf16, 4, sp[0]->s_vec, sp[1]->s_vec, sp[2]->s_vec, n); } static void *spec2_clip_max_tilde_new(void) { t_spec2_clip_max_tilde *x = (t_spec2_clip_max_tilde *)pd_new(spec2_clip_max_tilde_class); inlet_new(&x->x_obj, &x->x_obj.ob_pd, &s_signal, &s_signal); outlet_new(&x->x_obj, &s_signal); x->x_msi = 0.0f; return (x); } static void spec2_clip_max_tilde_free(t_spec2_clip_max_tilde *x) { } void spec2_clip_max_tilde_setup(void) { spec2_clip_max_tilde_class = class_new(gensym("spec2_clip_max~"), (t_newmethod)spec2_clip_max_tilde_new, (t_method)spec2_clip_max_tilde_free, sizeof(t_spec2_clip_max_tilde), 0, 0); CLASS_MAINSIGNALIN(spec2_clip_max_tilde_class, t_spec2_clip_max_tilde, x_msi); class_addmethod(spec2_clip_max_tilde_class, (t_method)spec2_clip_max_tilde_dsp, gensym("dsp"), A_CANT, 0); // class_sethelpsymbol(spec2_clip_max_tilde_class, gensym("iemhelp2/spec2_clip_max~-help")); } iem_utils-v0.0.20181004/iem_spec2/src/spec2_tabreceive~.c0000644000175000017500000000754713355471363023114 0ustar zmoelnigzmoelnig/* For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. iem_spec2 written by Thomas Musil (c) IEM KUG Graz Austria 2000 - 2009 */ #include "m_pd.h" #include "iemlib.h" /* ------------------------ spec2_tabreceive~ ------------------------- */ static t_class *spec2_tabreceive_tilde_class; typedef struct _spec2_tabreceive_tilde { t_object x_obj; iemarray_t *x_vec; t_symbol *x_arrayname; } t_spec2_tabreceive_tilde; static void spec2_tabreceive_tilde_symbol(t_spec2_tabreceive_tilde *x, t_symbol *s) { x->x_arrayname = s; } static t_int *spec2_tabreceive_tilde_perform(t_int *w) { t_spec2_tabreceive_tilde *x = (t_spec2_tabreceive_tilde *)(w[1]); t_float *out = (t_float *)(w[2]); int n = w[3]+1, i; iemarray_t *vec = x->x_vec; if(vec) { for(i=0; ix_vec; if(vec) { while(n) { out[0] = iemarray_getfloat(vec, 0); out[1] = iemarray_getfloat(vec, 1); out[2] = iemarray_getfloat(vec, 2); out[3] = iemarray_getfloat(vec, 3); out[4] = iemarray_getfloat(vec, 4); out[5] = iemarray_getfloat(vec, 5); out[6] = iemarray_getfloat(vec, 6); out[7] = iemarray_getfloat(vec, 7); out[8] = iemarray_getfloat(vec, 8); out[9] = iemarray_getfloat(vec, 9); out[10] = iemarray_getfloat(vec, 10); out[11] = iemarray_getfloat(vec, 11); out[12] = iemarray_getfloat(vec, 12); out[13] = iemarray_getfloat(vec, 13); out[14] = iemarray_getfloat(vec, 14); out[15] = iemarray_getfloat(vec, 15); vec += 16; out += 16; n -= 16; } out[0] = iemarray_getfloat(vec, 0); } else { while(n) { out[0] = 0.0f; out[1] = 0.0f; out[2] = 0.0f; out[3] = 0.0f; out[4] = 0.0f; out[5] = 0.0f; out[6] = 0.0f; out[7] = 0.0f; out[8] = 0.0f; out[9] = 0.0f; out[10] = 0.0f; out[11] = 0.0f; out[12] = 0.0f; out[13] = 0.0f; out[14] = 0.0f; out[15] = 0.0f; out += 16; n -= 16; } out[0] = 0.0f; } return(w+4); } static void spec2_tabreceive_tilde_dsp(t_spec2_tabreceive_tilde *x, t_signal **sp) { t_garray *a; int vecsize; if(!(a = (t_garray *)pd_findbyclass(x->x_arrayname, garray_class))) { if(*x->x_arrayname->s_name) error("spec2_tabreceive~: %s: no such array", x->x_arrayname->s_name); } else if(!iemarray_getarray(a, &vecsize, &x->x_vec)) error("%s: bad template for spec2_tabreceive~", x->x_arrayname->s_name); else { int n = sp[0]->s_n; if(n < vecsize) vecsize = n; vecsize /= 2; if(vecsize&15) dsp_add(spec2_tabreceive_tilde_perform, 3, x, sp[0]->s_vec, vecsize); else dsp_add(spec2_tabreceive_tilde_perf16, 3, x, sp[0]->s_vec, vecsize); } } static void *spec2_tabreceive_tilde_new(t_symbol *s) { t_spec2_tabreceive_tilde *x = (t_spec2_tabreceive_tilde *)pd_new(spec2_tabreceive_tilde_class); x->x_arrayname = s; outlet_new(&x->x_obj, &s_signal); return (x); } void spec2_tabreceive_tilde_setup(void) { spec2_tabreceive_tilde_class = class_new(gensym("spec2_tabreceive~"), (t_newmethod)spec2_tabreceive_tilde_new, 0, sizeof(t_spec2_tabreceive_tilde), 0, A_DEFSYM, 0); class_addmethod(spec2_tabreceive_tilde_class, (t_method)spec2_tabreceive_tilde_dsp, gensym("dsp"), A_CANT, 0); class_addsymbol(spec2_tabreceive_tilde_class, (t_method)spec2_tabreceive_tilde_symbol); // class_sethelpsymbol(spec2_tabreceive_tilde_class, gensym("iemhelp/spec2_tabreceive~-help")); } iem_utils-v0.0.20181004/iem_spec2/src/iem_spec2.dsp0000644000175000017500000000506413355471363021713 0ustar zmoelnigzmoelnig# Microsoft Developer Studio Project File - Name="iem_spec2" - Package Owner=<4> # Microsoft Developer Studio Generated Build File, Format Version 6.00 # ** NICHT BEARBEITEN ** # TARGTYPE "Win32 (x86) External Target" 0x0106 CFG=iem_spec2 - Win32 Debug !MESSAGE Dies ist kein gltiges Makefile. Zum Erstellen dieses Projekts mit NMAKE !MESSAGE verwenden Sie den Befehl "Makefile exportieren" und fhren Sie den Befehl !MESSAGE !MESSAGE NMAKE /f "iem_spec2.mak". !MESSAGE !MESSAGE Sie knnen beim Ausfhren von NMAKE eine Konfiguration angeben !MESSAGE durch Definieren des Makros CFG in der Befehlszeile. Zum Beispiel: !MESSAGE !MESSAGE NMAKE /f "iem_spec2.mak" CFG="iem_spec2 - Win32 Debug" !MESSAGE !MESSAGE Fr die Konfiguration stehen zur Auswahl: !MESSAGE !MESSAGE "iem_spec2 - Win32 Release" (basierend auf "Win32 (x86) External Target") !MESSAGE "iem_spec2 - Win32 Debug" (basierend auf "Win32 (x86) External Target") !MESSAGE # Begin Project # PROP AllowPerConfigDependencies 0 # PROP Scc_ProjName "" # PROP Scc_LocalPath "" !IF "$(CFG)" == "iem_spec2 - Win32 Release" # PROP BASE Use_Debug_Libraries 0 # PROP BASE Output_Dir "Release" # PROP BASE Intermediate_Dir "Release" # PROP BASE Cmd_Line "NMAKE /f makefile_vc12proj" # PROP BASE Rebuild_Opt "/a" # PROP BASE Target_File "makefile_vc12proj.exe" # PROP BASE Bsc_Name "makefile_vc12proj.bsc" # PROP BASE Target_Dir "" # PROP Use_Debug_Libraries 0 # PROP Output_Dir "Release" # PROP Intermediate_Dir "Release" # PROP Cmd_Line "NMAKE /f makefile_vc12proj" # PROP Rebuild_Opt "/a" # PROP Target_File "iem_spec2.exe" # PROP Bsc_Name "iem_spec2.bsc" # PROP Target_Dir "" !ELSEIF "$(CFG)" == "iem_spec2 - Win32 Debug" # PROP BASE Use_Debug_Libraries 1 # PROP BASE Output_Dir "Debug" # PROP BASE Intermediate_Dir "Debug" # PROP BASE Cmd_Line "NMAKE /f makefile_vc12proj" # PROP BASE Rebuild_Opt "/a" # PROP BASE Target_File "makefile_vc12proj.exe" # PROP BASE Bsc_Name "makefile_vc12proj.bsc" # PROP BASE Target_Dir "" # PROP Use_Debug_Libraries 1 # PROP Output_Dir "Debug" # PROP Intermediate_Dir "Debug" # PROP Cmd_Line "NMAKE /f makefile_vc12proj" # PROP Rebuild_Opt "/a" # PROP Target_File "iem_spec2.exe" # PROP Bsc_Name "iem_spec2.bsc" # PROP Target_Dir "" !ENDIF # Begin Target # Name "iem_spec2 - Win32 Release" # Name "iem_spec2 - Win32 Debug" !IF "$(CFG)" == "iem_spec2 - Win32 Release" !ELSEIF "$(CFG)" == "iem_spec2 - Win32 Debug" !ENDIF # Begin Source File SOURCE=.\makefile_vc12proj # End Source File # End Target # End Project iem_utils-v0.0.20181004/iem_spec2/src/spec2_dbtorms~.c0000644000175000017500000000337413355471363022447 0ustar zmoelnigzmoelnig/* For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. iem_spec2 written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2006 */ #include "m_pd.h" #include "iemlib.h" #include #define SPEC2LOGTEN 2.302585092994f /* ------------------------ spec2_dbtorms_tilde~ ------------------------- */ static t_class *spec2_dbtorms_tilde_class; typedef struct _spec2_dbtorms_tilde { t_object x_obj; t_float x_msi; } t_spec2_dbtorms_tilde; static t_int *spec2_dbtorms_tilde_perform(t_int *w) { t_float *in = (t_float *)(w[1]); t_float *out = (t_float *)(w[2]); int n = w[3]+1; for (; n--; in++, out++) { t_float f = *in; if(f <= 0.0f) *out = 0.0f; else { if(f > 485.0f) f = 485.0f; *out = exp((SPEC2LOGTEN * 0.05f) * (f-100.0f)); } } return(w+4); } static void spec2_dbtorms_tilde_dsp(t_spec2_dbtorms_tilde *x, t_signal **sp) { int n = (sp[0]->s_n)/2; dsp_add(spec2_dbtorms_tilde_perform, 3, sp[0]->s_vec, sp[0]->s_vec, n); } static void *spec2_dbtorms_tilde_new(void) { t_spec2_dbtorms_tilde *x = (t_spec2_dbtorms_tilde *)pd_new(spec2_dbtorms_tilde_class); outlet_new(&x->x_obj, &s_signal); x->x_msi = 0.0f; return (x); } void spec2_dbtorms_tilde_setup(void) { spec2_dbtorms_tilde_class = class_new(gensym("spec2_dbtorms~"), (t_newmethod)spec2_dbtorms_tilde_new, 0, sizeof(t_spec2_dbtorms_tilde), 0, 0); CLASS_MAINSIGNALIN(spec2_dbtorms_tilde_class, t_spec2_dbtorms_tilde, x_msi); class_addmethod(spec2_dbtorms_tilde_class, (t_method)spec2_dbtorms_tilde_dsp, gensym("dsp"), A_CANT, 0); // class_sethelpsymbol(spec2_dbtorms_tilde_class, gensym("iemhelp2/spec2_dbtorms~-help")); } iem_utils-v0.0.20181004/iem_spec2/spec2_tabreceive~-help.pd0000644000175000017500000000773613355471363023434 0ustar zmoelnigzmoelnig#N canvas 9 28 944 451 10; #X obj 44 49 dsp; #X obj 44 26 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 1 ; #X floatatom 44 90 5 0 0 0 - - -; #X floatatom 57 73 5 0 0 0 - - -; #N canvas 0 0 450 300 graph1 0; #X array scope 512 float 0; #X coords 0 1 511 -1 512 100 1; #X restore 350 236 graph; #X obj 211 175 tabwrite~ scope; #X obj 269 55 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X text 17 -25 spec2_tabreceive~; #N canvas 0 0 450 300 graph2 0; #X array filter 256 float 1; #A 0 0 0 0 0 0 0 0 0.04 0.04 0.08 0.14 0.18 0.2 0.24 0.26 0.28 0.32 0.34 0.36 0.38 0.4 0.42 0.44 0.44 0.46 0.5 0.54 0.58 0.6 0.62 0.646667 0.673334 0.7 0.74 0.76 0.78 0 0 0 0 0 0 -0.06 -0.0866667 -0.113333 -0.14 -0.175 -0.21 -0.245 -0.28 -0.31 -0.34 -0.366667 -0.393333 -0.42 -0.45 -0.48 -0.52 -0.56 -0.58 -0.62 -0.62 -0.66 -0.67 -0.68 -0.7 -0.74 -0.76 -0.78 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.8 0.78 0.76 0.68 0.62 0.58 0.5 0.473334 0.446667 0.42 0.38 0.34 0.3 0.266667 0.233333 0.2 0.17 0.14 0.11 0.08 0.05 0.02 0 0 0 0 0 0 -0.68 -0.68 -0.62 -0.56 -0.52 -0.48 -0.45 -0.42 -0.37 -0.32 -0.28 -0.24 -0.19 -0.14 -0.12 -0.1 -0.08 -0.02 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0; #X coords 0 1 255 -1 256 100 1; #X restore 488 -33 graph; #X obj 226 88 del 100; #X msg 767 2 \; filter const 0; #N canvas 70 41 953 575 spec2_blockfilter~ 0; #X obj 100 51 inlet~; #X obj 102 381 outlet~; #X obj 271 120 block~ 256 2; #N canvas 0 0 450 300 graph1 0; #X array rect 256 float 0; #X coords 0 1 255 -1 200 140 1; #X restore 460 21 graph; #X obj 276 459 tab_const rect; #X obj 279 396 t b b; #X msg 304 421 0 128 1; #X msg 224 419 128 128 0; #X obj 279 374 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X obj 279 350 loadbang; #X obj 100 135 rfft~; #X obj 101 284 rifft~; #X obj 101 309 /~ 256; #X obj 101 108 *~; #X obj 114 85 spec2_tabreceive~ rect; #N canvas 0 0 450 300 graph1 0; #X array real 256 float 0; #X coords 0 1 255 -1 200 140 1; #X restore 691 177 graph; #N canvas 0 0 450 300 graph1 0; #X array imag 256 float 0; #X coords 0 1 255 -1 200 140 1; #X restore 691 326 graph; #X obj 697 56 inlet; #X obj 697 80 t b; #X obj 246 153 spec2_tabreceive~ real; #X obj 262 178 spec2_tabreceive~ imag; #X text 407 178 1.arg: table-name; #X obj 157 264 spec2+~; #X obj 39 261 spec2-~; #X obj 31 216 spec2*~; #X obj 84 219 spec2*~; #X obj 145 218 spec2*~; #X obj 204 218 spec2*~; #X obj 697 102 tab_rfft filter real imag 256; #X connect 0 0 13 0; #X connect 5 0 7 0; #X connect 5 1 6 0; #X connect 6 0 4 0; #X connect 7 0 4 0; #X connect 8 0 5 0; #X connect 9 0 8 0; #X connect 10 0 24 0; #X connect 10 0 26 0; #X connect 10 1 25 0; #X connect 10 1 27 0; #X connect 11 0 12 0; #X connect 12 0 1 0; #X connect 13 0 10 0; #X connect 14 0 13 1; #X connect 17 0 18 0; #X connect 18 0 28 0; #X connect 19 0 24 1; #X connect 19 0 27 1; #X connect 20 0 25 1; #X connect 20 0 26 1; #X connect 22 0 11 1; #X connect 23 0 11 0; #X connect 24 0 23 0; #X connect 25 0 23 1; #X connect 26 0 22 0; #X connect 27 0 22 1; #X restore 248 137 pd spec2_blockfilter~ using spec2_tabreceive~; #X obj 582 122 spec2_tabreceive~ filter; #X text 735 121 1.arg: table-name; #X msg 607 92 symbol filter; #X text 90 302 IEM KUG; #X text 74 290 musil; #X text 104 290 @; #X text 110 290 iem.at; #X text 73 312 Graz \, Austria; #X text 25 279 (c) Thomas Musil 2000 - 2006; #X obj 249 114 dirac~; #X text 143 -11 iem_spec2 calculates only (blocksize/2 + 1) samples ; #X text 140 -27 receives spectrum from table with (blocksize/2 + 1) ; #X connect 0 0 2 0; #X connect 0 1 3 0; #X connect 1 0 0 0; #X connect 6 0 11 1; #X connect 6 0 9 0; #X connect 9 0 5 0; #X connect 9 0 21 0; #X connect 11 0 5 0; #X connect 14 0 12 0; #X connect 21 0 11 0; iem_utils-v0.0.20181004/iem_spec2/spec2_tab_conv~-help.pd0000644000175000017500000001147413355471363023110 0ustar zmoelnigzmoelnig#N canvas 9 18 777 596 10; #X obj 44 49 dsp; #X obj 44 26 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 1 ; #X floatatom 44 90 5 0 0 0 - - -; #X floatatom 57 73 5 0 0 0 - - -; #N canvas 0 0 450 300 graph1 0; #X array win 50 float 0; #X coords 0 1 49 -1 200 140 1; #X restore 267 333 graph; #X floatatom 64 144 7 0 0 0 - - -; #X obj 189 188 noise~; #X floatatom 316 170 5 2 40 0 - - -; #X msg 316 147 8; #X text 22 -1 spec2_tab_conv~; #X obj 64 166 osc~ 5000; #N canvas 148 208 734 434 gen_win 0; #X obj 92 43 inlet; #X obj 92 121 - 1; #X obj 92 142 t f f; #X obj 92 167 / 20; #X obj 92 188 * 3.14159; #X obj 92 211 sin; #X msg 92 232 \$1 \$1; #X obj 92 254 *; #X obj 92 65 t b f b; #X msg 253 218 1 \$1; #X obj 253 240 /; #X obj 224 367 outlet; #X obj 225 315 f; #X msg 224 337 set win \$1; #X obj 527 33 table hwin 50; #X obj 242 124 tab_const hwin; #X obj 92 274 tabwrite hwin; #X obj 191 146 tab_sum hwin; #X obj 253 264 tab_mul_scalar hwin hwin; #X obj 191 192 tab_copy hwin win; #X obj 93 95 for++ 1 20; #X connect 0 0 8 0; #X connect 1 0 2 0; #X connect 2 0 3 0; #X connect 2 1 16 1; #X connect 3 0 4 0; #X connect 4 0 5 0; #X connect 5 0 6 0; #X connect 6 0 7 0; #X connect 7 0 16 0; #X connect 8 0 20 0; #X connect 8 1 3 1; #X connect 8 1 12 1; #X connect 8 1 20 1; #X connect 8 2 15 0; #X connect 9 0 10 0; #X connect 10 0 18 0; #X connect 12 0 13 0; #X connect 13 0 11 0; #X connect 17 0 19 0; #X connect 17 1 9 0; #X connect 19 0 12 0; #X connect 20 0 1 0; #X connect 20 1 17 0; #X restore 316 189 pd gen_win; #X obj 316 124 loadbang; #N canvas 6 92 777 603 spec2_blockfilter~ 0; #X obj 59 29 inlet~; #X obj 72 488 outlet~; #X obj 61 101 rfft~; #X obj 71 392 rifft~; #X obj 407 22 inlet; #X text 199 240 1.arg: table-name; #X obj 474 23 block~ 256 2; #N canvas 0 0 450 300 graph1 0; #X array hsin 256 float 0; #X coords 0 1 255 -1 200 140 1; #X restore 423 296 graph; #X obj 458 140 for++ 0 255 0.1; #X obj 458 119 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X obj 458 160 t f f; #X obj 457 190 / 256; #X obj 457 210 * 3.14159; #X obj 457 229 sin; #X obj 457 251 tabwrite hsin; #X obj 72 51 tabreceive~ hsin; #X obj 60 73 *~; #X obj 458 95 loadbang; #X obj 241 100 rfft~; #X obj 252 50 tabreceive~ hsin; #X obj 240 72 *~; #X obj 241 26 inlet~; #X obj 84 417 tabreceive~ hsin; #X obj 72 439 *~; #X text 199 251 2.arg: table-size; #X obj 72 463 /~ 32768; #X obj 59 290 spec2_dbtorms~; #X obj 65 363 spec2*~; #X obj 122 366 spec2*~; #X obj 58 178 spec2+~; #X obj 47 151 spec2*~; #X obj 94 151 spec2*~; #X obj 58 201 spec2_powtodb~; #X obj 59 247 spec2_tab_conv~ win 8; #X connect 0 0 16 0; #X connect 2 0 30 0; #X connect 2 0 30 1; #X connect 2 1 31 0; #X connect 2 1 31 1; #X connect 3 0 23 0; #X connect 4 0 33 0; #X connect 8 0 10 0; #X connect 9 0 8 0; #X connect 10 0 11 0; #X connect 10 1 14 1; #X connect 11 0 12 0; #X connect 12 0 13 0; #X connect 13 0 14 0; #X connect 15 0 16 1; #X connect 16 0 2 0; #X connect 17 0 9 0; #X connect 18 0 27 1; #X connect 18 1 28 1; #X connect 19 0 20 1; #X connect 20 0 18 0; #X connect 21 0 20 0; #X connect 22 0 23 1; #X connect 23 0 25 0; #X connect 25 0 1 0; #X connect 26 0 27 0; #X connect 26 0 28 0; #X connect 27 0 3 0; #X connect 28 0 3 1; #X connect 29 0 32 0; #X connect 30 0 29 0; #X connect 31 0 29 1; #X connect 32 0 33 0; #X connect 33 0 26 0; #X restore 64 211 pd spec2_blockfilter~ using spec2_tab_conv~; #X text 550 227 1.arg: table-name; #X text 551 240 2.arg: table-size; #X msg 429 209 set win 8; #X obj 408 234 spec2_tab_conv~ win 8; #X obj 68 298 dac~; #X obj 144 311 prvu~; #X obj 145 339 vu 15 120 empty empty -1 -8 0 8 -66577 -1 1 0; #X floatatom 143 505 5 0 0 0 - - -; #X floatatom 154 479 5 0 0 0 - - -; #X msg 156 288 reset; #X text 146 4 convolute a spectrum of size (blocksize/2 + 1) with a table of size n; #X obj 69 266 *~ 0.003; #X obj 133 255 dbtorms; #X obj 201 252 hsl 128 15 0 127 0 0 empty empty empty -2 -6 0 8 -262144 -1 -1 0 1; #X obj 161 131 mtof; #X obj 165 111 hsl 137 15 0 136 0 0 empty empty empty -2 -6 0 8 -262144 -1 -1 0 1; #X text 98 553 IEM KUG; #X text 82 541 musil; #X text 112 541 @; #X text 118 541 iem.at; #X text 81 563 Graz \, Austria; #X text 33 530 (c) Thomas Musil 2000 - 2006; #X connect 0 0 2 0; #X connect 0 1 3 0; #X connect 1 0 0 0; #X connect 5 0 10 0; #X connect 6 0 13 1; #X connect 7 0 11 0; #X connect 8 0 7 0; #X connect 10 0 13 0; #X connect 11 0 13 2; #X connect 12 0 8 0; #X connect 13 0 25 0; #X connect 16 0 17 0; #X connect 19 0 20 0; #X connect 20 0 21 0; #X connect 20 1 22 0; #X connect 23 0 19 0; #X connect 25 0 19 0; #X connect 25 0 18 0; #X connect 25 0 18 1; #X connect 26 0 25 1; #X connect 27 0 26 0; #X connect 28 0 5 0; #X connect 29 0 28 0; iem_utils-v0.0.20181004/iem_spec2/spec2_1p1z_freq~-help.pd0000644000175000017500000000471613355471363023126 0ustar zmoelnigzmoelnig#N canvas 20 32 724 388 10; #X obj 42 70 dsp; #X obj 42 47 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 1 1 ; #X floatatom 42 111 5 0 0 0 - - -; #X floatatom 55 94 5 0 0 0 - - -; #N canvas 0 0 450 300 graph1 0; #X array scope 256 float 0; #X coords 0 100 255 0 300 200 1; #X restore 346 82 graph; #X text 130 39 iem_spec2 calculates only blocksize/2 + 1 samples of block; #N canvas 0 0 633 408 tables 0; #N canvas 0 0 450 300 graph1 0; #X array hann 259 float 0; #X coords 0 1 258 -1 200 140 1; #X restore 30 31 graph; #X obj 246 34 loadbang; #X msg 246 55 \; hann cosinesum 256 0.5 -0.5; #X connect 1 0 2 0; #X restore 149 82 pd tables; #X obj 42 145 noise~; #X obj 237 93 osc~ 11025; #X msg 292 58 0; #X obj 42 169 bpq2~ 7000 6 100; #X msg 206 187 1 0 0; #X msg 205 121 0.1 0 0.9; #X text 90 302 IEM KUG; #X text 74 290 musil; #X text 104 290 @; #X text 110 290 iem.at; #X text 73 312 Graz \, Austria; #X text 25 279 (c) Thomas Musil 2000 - 2006; #X text 18 5 spec2_1p1z_freq~; #N canvas 190 113 569 461 spec_analyse_by_1p1z_freq 0; #X obj 100 51 inlet~; #X obj 352 46 block~ 256 2; #X obj 102 156 rfft~; #X obj 101 108 *~; #X obj 298 46 inlet; #X obj 114 86 spec2_tabreceive~ hann; #X obj 97 186 *~; #X obj 124 186 *~; #X obj 104 211 +~; #X obj 104 266 powtodb~; #X obj 104 291 tabsend~ scope; #X obj 180 174 /; #X obj 101 131 *~ 0.032; #X msg 189 149 1 32; #X obj 188 127 loadbang; #X obj 300 225 spec2_1p1z_freq~ 0.5 0 0.5; #X connect 0 0 3 0; #X connect 2 0 6 0; #X connect 2 0 6 1; #X connect 2 1 7 0; #X connect 2 1 7 1; #X connect 3 0 12 0; #X connect 4 0 15 0; #X connect 5 0 3 1; #X connect 6 0 8 0; #X connect 7 0 8 1; #X connect 8 0 15 0; #X connect 9 0 10 0; #X connect 11 0 12 1; #X connect 12 0 2 0; #X connect 13 0 11 0; #X connect 14 0 13 0; #X connect 15 0 9 0; #X restore 42 214 pd spec_analyse_by_1p1z_freq; #X msg 205 143 0.3 0 0.7; #X msg 205 165 0.5 0 0.5; #X msg 105 123 6; #X msg 107 143 3; #X msg 134 122 16; #X msg 164 121 66; #X text 168 3 filter the spectrum with a 1p1z-IIR filter; #X text 169 14 first time from the left to right; #X text 169 26 second time from the right to left; #X connect 0 0 2 0; #X connect 0 1 3 0; #X connect 1 0 0 0; #X connect 7 0 10 0; #X connect 9 0 8 1; #X connect 10 0 20 0; #X connect 11 0 20 1; #X connect 12 0 20 1; #X connect 21 0 20 1; #X connect 22 0 20 1; #X connect 23 0 10 2; #X connect 24 0 10 2; #X connect 25 0 10 2; #X connect 26 0 10 2; iem_utils-v0.0.20181004/iem_spec2/spec2_stretch~-help.pd0000644000175000017500000000267613355471363022775 0ustar zmoelnigzmoelnig#N canvas 10 8 548 293 10; #X obj 15 90 dsp; #X obj 15 67 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 1 1 ; #X floatatom 15 131 5 0 0 0 - - -; #X floatatom 28 114 5 0 0 0 - - -; #N canvas 0 0 450 300 graph2 0; #X array array100 64 float 1; #A 0 -0.550001 -0.750001 -0.700001 -0.600001 -0.500001 -0.400001 -0.400001 -0.350001 -0.25 -0.2 -0.15 -0.1 -0.0500001 -0.0500001 3.72529e-008 0.0500001 0.0500001 0.1 0.1 0.15 0.2 0.2 0.250001 0.250001 0.300001 0.350001 0.350001 0.400001 0.500001 0.500001 0.516668 0.533334 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0; #X coords 0 1 63 -1 64 40 1; #X restore 436 66 graph; #X text 83 210 IEM KUG; #X text 67 198 musil; #X text 97 198 @; #X text 103 198 iem.at; #X text 66 220 Graz \, Austria; #X text 18 187 (c) Thomas Musil 2000 - 2006; #N canvas 0 0 450 300 graph2 0; #X array array101 64 float 0; #X coords 0 1 63 -1 64 40 1; #X restore 436 126 graph; #X obj 144 131 tabsend~ array101; #X obj 142 71 tabreceive~ array100; #X floatatom 93 41 5 20 500 0 - - -; #X obj 143 102 spec2_stretch~ 1; #X obj 93 58 / 100; #X floatatom 93 78 5 0 0 0 - - -; #X text 16 10 spec2_stretch~; #X text 137 6 stretch a spectrum of (blocksize/2 + 1) by a factor; #X text 256 102 1.arg: stretch factor; #X connect 0 0 2 0; #X connect 0 1 3 0; #X connect 1 0 0 0; #X connect 13 0 15 0; #X connect 14 0 16 0; #X connect 15 0 12 0; #X connect 16 0 17 0; #X connect 17 0 15 0; iem_utils-v0.0.20181004/iem_spec2/spec2_block_delay~-help.pd0000644000175000017500000000421113355471363023554 0ustar zmoelnigzmoelnig#N canvas 90 35 769 482 10; #X obj 42 70 dsp; #X obj 42 47 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 1 1 ; #X floatatom 42 111 5 0 0 0 - - -; #X floatatom 55 94 5 0 0 0 - - -; #N canvas 0 0 450 300 graph1 0; #X array array101 192 float 0; #X coords 0 1 191 -1 382 128 1; #X restore 319 224 graph; #X obj 46 156 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X text 19 4 spec2_block_delay~; #X text 202 216 no arguments; #X text 90 402 IEM KUG; #X text 74 390 musil; #X text 104 390 @; #X text 110 390 iem.at; #X text 73 412 Graz \, Austria; #X text 25 379 (c) Thomas Musil 2000 - 2006; #X obj 84 217 spec2_block_delay~; #X text 146 21 but copy only (blocksize/2 + 1) samples; #N canvas 0 0 470 320 init 0; #X obj 52 43 t f f; #X obj 50 -10 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X obj 43 77 + 0.5; #X obj 52 -36 loadbang; #X obj 50 11 for++ -64 63; #X obj 56 107 / 64; #X obj 101 105 + 64; #X obj 57 147 tabwrite array100; #X msg 161 -9 \; array100 xticks 0 32 2; #X msg 174 75 \; array101 xticks 0 32 2; #X msg 177 125 \; array101 xlabel -1.1 0 32 64 96 128 160 192; #X msg 165 30 \; array100 xlabel -1.1 0 32 64 96 128; #X connect 0 0 2 0; #X connect 0 1 6 0; #X connect 1 0 4 0; #X connect 2 0 5 0; #X connect 3 0 1 0; #X connect 3 0 8 0; #X connect 3 0 11 0; #X connect 3 0 9 0; #X connect 3 0 10 0; #X connect 4 0 0 0; #X connect 5 0 7 0; #X connect 6 0 7 1; #X restore 323 394 pd init; #N canvas 0 0 450 300 graph1 0; #X array array100 128 float 0; #X coords 0 1 127 -1 256 128 1; #X restore 319 62 graph; #X obj 84 192 tabplay~ array100; #X obj 46 252 tabwrite~ array101; #X text 161 4 delay spectrum around blocksize samples; #X text 484 372 0 .. 32: preceding signal (== 0); #X text 480 385 33 .. 63: ignored input ramp; #X text 481 399 64 .. 96: delayed ramp signal; #X text 477 412 97 .. 127: ignored input ramp; #X text 473 425 128 .. 160: delayed ramp signal; #X text 471 438 161 .. 191: ignored input signal (== 0); #X connect 0 0 2 0; #X connect 0 1 3 0; #X connect 1 0 0 0; #X connect 5 0 18 0; #X connect 5 0 19 0; #X connect 14 0 19 0; #X connect 18 0 14 0; iem_utils-v0.0.20181004/iem_spec2/spec2_powtodb~-help.pd0000644000175000017500000000066313355471363022771 0ustar zmoelnigzmoelnig#N canvas 52 29 470 263 10; #X text 120 53 no arg; #X text 83 169 IEM KUG; #X text 67 157 musil; #X text 97 157 @; #X text 103 157 iem.at; #X text 66 179 Graz \, Austria; #X text 18 146 (c) Thomas Musil 2000 - 2006; #X text 211 52 like; #X text 135 24 with (blocksize/2 + 1) bins; #X obj 26 53 spec2_powtodb~; #X text 29 15 spec2_powtodb~; #X obj 243 54 powtodb~; #X text 133 13 convert power to db of a signal spectrum; iem_utils-v0.0.20181004/iem_spec2/spec2_dbtorms~-help.pd0000644000175000017500000000066713355471363022771 0ustar zmoelnigzmoelnig#N canvas 52 29 470 263 10; #X text 120 53 no arg; #X text 83 169 IEM KUG; #X text 67 157 musil; #X text 97 157 @; #X text 103 157 iem.at; #X text 66 179 Graz \, Austria; #X text 18 146 (c) Thomas Musil 2000 - 2006; #X text 211 52 like; #X text 135 24 with (blocksize/2 + 1) bins; #X text 29 15 spec2_dbtorms~; #X obj 243 54 dbtorms~; #X obj 26 53 spec2_dbtorms~; #X text 132 13 convert dB to rms value of a signal spectrum; iem_utils-v0.0.20181004/iem_spec2/spec2_rmstodb~-help.pd0000644000175000017500000000066713355471363022771 0ustar zmoelnigzmoelnig#N canvas 52 29 470 263 10; #X text 120 53 no arg; #X text 83 169 IEM KUG; #X text 67 157 musil; #X text 97 157 @; #X text 103 157 iem.at; #X text 66 179 Graz \, Austria; #X text 18 146 (c) Thomas Musil 2000 - 2006; #X text 211 52 like; #X text 135 24 with (blocksize/2 + 1) bins; #X text 29 15 spec2_rmstodb~; #X text 132 13 convert rms value to db of a signal spectrum; #X obj 26 53 spec2_rmstodb~; #X obj 243 54 rmstodb~; iem_utils-v0.0.20181004/iem_spec2/spec2_abs~-help.pd0000644000175000017500000000064713355471363022062 0ustar zmoelnigzmoelnig#N canvas 52 28 470 264 10; #X text 102 53 no arg; #X text 83 169 IEM KUG; #X text 67 157 musil; #X text 97 157 @; #X text 103 157 iem.at; #X text 66 179 Graz \, Austria; #X text 18 146 (c) Thomas Musil 2000 - 2006; #X text 183 49 like; #X obj 29 52 spec2_abs~; #X text 30 16 spec2_abs~; #X obj 226 52 abs~; #X text 109 25 with (blocksize/2 + 1) bins; #X text 106 14 take absolute value of a signal spectrum; iem_utils-v0.0.20181004/iem_spec2/READ_ME.txt0000644000175000017500000000427613355471363020407 0ustar zmoelnigzmoelnigThis library extends the performance of Miller S. Puckette's realtime-computermusic-environment puredata (pd). iem_spec2 contains 1 external library "iem_spec2.dll" with 23 objects and their help files (see CONTENT.txt). The main topic is the efficient manipulation of signal blocks in the frequency domain (between fft~ and ifft~). All objects calculate only blocksize/2 + 1 samples of a signal vector, the 2nd half of the signal vector will be ignored and could have strange values. This objects are very experimental. iem_spec2 is published under the Gnu Lesser General Public License (see LICENSE.txt and GnuLGPL.txt). iem_spec2 (Release 1.21) is written by Thomas Musil from IEM KUG Graz Austria and it is compiled against pd-0.48-1. You have to add the library -lib iem_spec2 (Menue: File: Preferences: Startup...: New...). For Windows "install_path" could be: "C:/Users/xx_ME_xx/AppData/Roaming/Pd" or "C:/Program Files (x86)/Common Files/Pd" or "C:/Users/xx_ME_xx/Documents/Pd/externals" or "C:/Program Files (x86)/pd/extra". For Apple OSX: "install_path" could be: "~/Library/Pd" or "/Library/Pd" or "/Applications/Pd.app/Contents/Resources/extra". For Linux: "install_path" could be: "~/.local/lib/pd/extra" or "~/pd-externals" or "/usr/local/lib/pd-externals" or "/usr/local/lib/pd/extra" or "/usr/lib/pd/extra". Make sure that you get the desired version of iem_spec2 if there are multiple installations on your computer (-verbose). Copyright (C) 2000-2018 Thomas MUSIL [musil_at_iem.at] THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. iem_utils-v0.0.20181004/iem_spec2/CONTENT.txt0000644000175000017500000000306413355471363020417 0ustar zmoelnigzmoelnig content of iem_spec2 Release 1.21 from March 2018 -------------------- frequency domain signal stuff ------------------------------- spec2_1p1z_freq~ a 1p1z recursive filter forms the current spectrum, the recursion goes from a lower frequency bin to a higher one (frequency shape filtering of spectrum) spec2_1p1z_time~ a 1p1z recursive filter forms the current spectrum bin by bin isolated to the previous spectrum bin by bin (time shape filtering of spectrum) spec2_abs~ works like |abs~| spec2_add_scalar~, spec2_+s~ works like |+~ 1| spec2_add~, spec2+~ works like |+~| spec2_block_delay~ delays a signal by 1 signal vector blocksize spec2_clip_max~ works like |min~| spec2_clip_min~ works like |max~| spec2_dbtopow~ works like |dbtopow~| spec2_dbtorms~ works like |dbtorms~| spec2_matrix_bundle_stat~ a special matrix multiplication spec2_mul_scalar~, spec2_*s~ works like |*~ 1| spec2_mul~, spec2_*~ works like |*~| spec2_powtodb~ works like |powtodb~| spec2_rmstodb~ works like |rmstodb~| spec2_shift~ works like |lrshift~| spec2_sqrt~ works like |sqrt~| spec2_stretch~ stretches the half spectrum by a scalar factor spec2_sub~, spec2-~ works like |-~| spec2_sum~ accumulates all the frequency bins of the half spectrum and puts it out spec2_tab_conv~ calculates a convolution of 2 spectra spec2_tabreceive_enable~ works like |tabreceive~| with an enable input spec2_tabreceive~ works like |tabreceive~| all spectra will be calculated from index 0 to index blocksize/2, that are blocksize/2 + 1 frequency bins.iem_utils-v0.0.20181004/iem_spec2/GnuLGPL.txt0000644000175000017500000006346713355471363020532 0ustar zmoelnigzmoelnig GNU LESSER GENERAL PUBLIC LICENSE Version 2.1, February 1999 Copyright (C) 1991, 1999 Free Software Foundation, Inc. 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. [This is the first released version of the Lesser GPL. It also counts as the successor of the GNU Library Public License, version 2, hence the version number 2.1.] Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public Licenses are intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This license, the Lesser General Public License, applies to some specially designated software packages--typically libraries--of the Free Software Foundation and other authors who decide to use it. You can use it too, but we suggest you first think carefully about whether this license or the ordinary General Public License is the better strategy to use in any particular case, based on the explanations below. When we speak of free software, we are referring to freedom of use, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish); that you receive source code or can get it if you want it; that you can change the software and use pieces of it in new free programs; and that you are informed that you can do these things. To protect your rights, we need to make restrictions that forbid distributors to deny you these rights or to ask you to surrender these rights. These restrictions translate to certain responsibilities for you if you distribute copies of the library or if you modify it. For example, if you distribute copies of the library, whether gratis or for a fee, you must give the recipients all the rights that we gave you. You must make sure that they, too, receive or can get the source code. If you link other code with the library, you must provide complete object files to the recipients, so that they can relink them with the library after making changes to the library and recompiling it. And you must show them these terms so they know their rights. We protect your rights with a two-step method: (1) we copyright the library, and (2) we offer you this license, which gives you legal permission to copy, distribute and/or modify the library. To protect each distributor, we want to make it very clear that there is no warranty for the free library. Also, if the library is modified by someone else and passed on, the recipients should know that what they have is not the original version, so that the original author's reputation will not be affected by problems that might be introduced by others. Finally, software patents pose a constant threat to the existence of any free program. We wish to make sure that a company cannot effectively restrict the users of a free program by obtaining a restrictive license from a patent holder. Therefore, we insist that any patent license obtained for a version of the library must be consistent with the full freedom of use specified in this license. Most GNU software, including some libraries, is covered by the ordinary GNU General Public License. This license, the GNU Lesser General Public License, applies to certain designated libraries, and is quite different from the ordinary General Public License. We use this license for certain libraries in order to permit linking those libraries into non-free programs. When a program is linked with a library, whether statically or using a shared library, the combination of the two is legally speaking a combined work, a derivative of the original library. The ordinary General Public License therefore permits such linking only if the entire combination fits its criteria of freedom. The Lesser General Public License permits more lax criteria for linking other code with the library. We call this license the "Lesser" General Public License because it does Less to protect the user's freedom than the ordinary General Public License. It also provides other free software developers Less of an advantage over competing non-free programs. These disadvantages are the reason we use the ordinary General Public License for many libraries. However, the Lesser license provides advantages in certain special circumstances. For example, on rare occasions, there may be a special need to encourage the widest possible use of a certain library, so that it becomes a de-facto standard. To achieve this, non-free programs must be allowed to use the library. A more frequent case is that a free library does the same job as widely used non-free libraries. In this case, there is little to gain by limiting the free library to free software only, so we use the Lesser General Public License. In other cases, permission to use a particular library in non-free programs enables a greater number of people to use a large body of free software. For example, permission to use the GNU C Library in non-free programs enables many more people to use the whole GNU operating system, as well as its variant, the GNU/Linux operating system. Although the Lesser General Public License is Less protective of the users' freedom, it does ensure that the user of a program that is linked with the Library has the freedom and the wherewithal to run that program using a modified version of the Library. The precise terms and conditions for copying, distribution and modification follow. Pay close attention to the difference between a "work based on the library" and a "work that uses the library". The former contains code derived from the library, whereas the latter must be combined with the library in order to run. GNU LESSER GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License Agreement applies to any software library or other program which contains a notice placed by the copyright holder or other authorized party saying it may be distributed under the terms of this Lesser General Public License (also called "this License"). Each licensee is addressed as "you". A "library" means a collection of software functions and/or data prepared so as to be conveniently linked with application programs (which use some of those functions and data) to form executables. The "Library", below, refers to any such software library or work which has been distributed under these terms. A "work based on the Library" means either the Library or any derivative work under copyright law: that is to say, a work containing the Library or a portion of it, either verbatim or with modifications and/or translated straightforwardly into another language. (Hereinafter, translation is included without limitation in the term "modification".) "Source code" for a work means the preferred form of the work for making modifications to it. For a library, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the library. Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running a program using the Library is not restricted, and output from such a program is covered only if its contents constitute a work based on the Library (independent of the use of the Library in a tool for writing it). Whether that is true depends on what the Library does and what the program that uses the Library does. 1. You may copy and distribute verbatim copies of the Library's complete source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and distribute a copy of this License along with the Library. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Library or any portion of it, thus forming a work based on the Library, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) The modified work must itself be a software library. b) You must cause the files modified to carry prominent notices stating that you changed the files and the date of any change. c) You must cause the whole of the work to be licensed at no charge to all third parties under the terms of this License. d) If a facility in the modified Library refers to a function or a table of data to be supplied by an application program that uses the facility, other than as an argument passed when the facility is invoked, then you must make a good faith effort to ensure that, in the event an application does not supply such function or table, the facility still operates, and performs whatever part of its purpose remains meaningful. (For example, a function in a library to compute square roots has a purpose that is entirely well-defined independent of the application. Therefore, Subsection 2d requires that any application-supplied function or table used by this function must be optional: if the application does not supply it, the square root function must still compute square roots.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Library, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Library, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Library. In addition, mere aggregation of another work not based on the Library with the Library (or with a work based on the Library) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may opt to apply the terms of the ordinary GNU General Public License instead of this License to a given copy of the Library. To do this, you must alter all the notices that refer to this License, so that they refer to the ordinary GNU General Public License, version 2, instead of to this License. (If a newer version than version 2 of the ordinary GNU General Public License has appeared, then you can specify that version instead if you wish.) Do not make any other change in these notices. Once this change is made in a given copy, it is irreversible for that copy, so the ordinary GNU General Public License applies to all subsequent copies and derivative works made from that copy. This option is useful when you wish to copy part of the code of the Library into a program that is not a library. 4. You may copy and distribute the Library (or a portion or derivative of it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange. If distribution of object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place satisfies the requirement to distribute the source code, even though third parties are not compelled to copy the source along with the object code. 5. A program that contains no derivative of any portion of the Library, but is designed to work with the Library by being compiled or linked with it, is called a "work that uses the Library". Such a work, in isolation, is not a derivative work of the Library, and therefore falls outside the scope of this License. However, linking a "work that uses the Library" with the Library creates an executable that is a derivative of the Library (because it contains portions of the Library), rather than a "work that uses the library". The executable is therefore covered by this License. Section 6 states terms for distribution of such executables. When a "work that uses the Library" uses material from a header file that is part of the Library, the object code for the work may be a derivative work of the Library even though the source code is not. Whether this is true is especially significant if the work can be linked without the Library, or if the work is itself a library. The threshold for this to be true is not precisely defined by law. If such an object file uses only numerical parameters, data structure layouts and accessors, and small macros and small inline functions (ten lines or less in length), then the use of the object file is unrestricted, regardless of whether it is legally a derivative work. (Executables containing this object code plus portions of the Library will still fall under Section 6.) Otherwise, if the work is a derivative of the Library, you may distribute the object code for the work under the terms of Section 6. Any executables containing that work also fall under Section 6, whether or not they are linked directly with the Library itself. 6. As an exception to the Sections above, you may also combine or link a "work that uses the Library" with the Library to produce a work containing portions of the Library, and distribute that work under terms of your choice, provided that the terms permit modification of the work for the customer's own use and reverse engineering for debugging such modifications. You must give prominent notice with each copy of the work that the Library is used in it and that the Library and its use are covered by this License. You must supply a copy of this License. If the work during execution displays copyright notices, you must include the copyright notice for the Library among them, as well as a reference directing the user to the copy of this License. Also, you must do one of these things: a) Accompany the work with the complete corresponding machine-readable source code for the Library including whatever changes were used in the work (which must be distributed under Sections 1 and 2 above); and, if the work is an executable linked with the Library, with the complete machine-readable "work that uses the Library", as object code and/or source code, so that the user can modify the Library and then relink to produce a modified executable containing the modified Library. (It is understood that the user who changes the contents of definitions files in the Library will not necessarily be able to recompile the application to use the modified definitions.) b) Use a suitable shared library mechanism for linking with the Library. A suitable mechanism is one that (1) uses at run time a copy of the library already present on the user's computer system, rather than copying library functions into the executable, and (2) will operate properly with a modified version of the library, if the user installs one, as long as the modified version is interface-compatible with the version that the work was made with. c) Accompany the work with a written offer, valid for at least three years, to give the same user the materials specified in Subsection 6a, above, for a charge no more than the cost of performing this distribution. d) If distribution of the work is made by offering access to copy from a designated place, offer equivalent access to copy the above specified materials from the same place. e) Verify that the user has already received a copy of these materials or that you have already sent this user a copy. For an executable, the required form of the "work that uses the Library" must include any data and utility programs needed for reproducing the executable from it. However, as a special exception, the materials to be distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. It may happen that this requirement contradicts the license restrictions of other proprietary libraries that do not normally accompany the operating system. Such a contradiction means you cannot use both them and the Library together in an executable that you distribute. 7. You may place library facilities that are a work based on the Library side-by-side in a single library together with other library facilities not covered by this License, and distribute such a combined library, provided that the separate distribution of the work based on the Library and of the other library facilities is otherwise permitted, and provided that you do these two things: a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities. This must be distributed under the terms of the Sections above. b) Give prominent notice with the combined library of the fact that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work. 8. You may not copy, modify, sublicense, link with, or distribute the Library except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense, link with, or distribute the Library is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 9. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Library or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Library (or any work based on the Library), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Library or works based on it. 10. Each time you redistribute the Library (or any work based on the Library), the recipient automatically receives a license from the original licensor to copy, distribute, link with or modify the Library subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties with this License. 11. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Library at all. For example, if a patent license would not permit royalty-free redistribution of the Library by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Library. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply, and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 12. If the distribution and/or use of the Library is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Library under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 13. The Free Software Foundation may publish revised and/or new versions of the Lesser General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Library specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Library does not specify a license version number, you may choose any version ever published by the Free Software Foundation. 14. If you wish to incorporate parts of the Library into other free programs whose distribution conditions are incompatible with these, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Libraries If you develop a new library, and you want it to be of the greatest possible use to the public, we recommend making it free software that everyone can redistribute and change. You can do so by permitting redistribution under these terms (or, alternatively, under the terms of the ordinary General Public License). To apply these terms, attach the following notices to the library. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Also add information on how to contact you by electronic and paper mail. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the library, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the library `Frob' (a library for tweaking knobs) written by James Random Hacker. , 1 April 1990 Ty Coon, President of Vice That's all there is to it! iem_utils-v0.0.20181004/iem_spec2/spec2_dbtopow~-help.pd0000644000175000017500000000066313355471363022771 0ustar zmoelnigzmoelnig#N canvas 52 29 470 263 10; #X text 120 53 no arg; #X text 83 169 IEM KUG; #X text 67 157 musil; #X text 97 157 @; #X text 103 157 iem.at; #X text 66 179 Graz \, Austria; #X text 18 146 (c) Thomas Musil 2000 - 2006; #X text 211 52 like; #X text 135 24 with (blocksize/2 + 1) bins; #X obj 243 54 dbtopow~; #X obj 26 53 spec2_dbtopow~; #X text 29 15 spec2_dbtopow~; #X text 132 13 convert dB to power of a signal spectrum; iem_utils-v0.0.20181004/iem_spec2/spec2_mul~-help.pd0000644000175000017500000000060113355471363022100 0ustar zmoelnigzmoelnig#N canvas 52 28 474 268 10; #X text 86 51 no arg; #X text 83 169 IEM KUG; #X text 67 157 musil; #X text 97 157 @; #X text 103 157 iem.at; #X text 66 179 Graz \, Austria; #X text 18 146 (c) Thomas Musil 2000 - 2006; #X text 183 49 like; #X text 30 15 spec2*~; #X obj 30 52 spec2*~; #X obj 234 50 *~; #X text 106 14 multiply 2 signal spectras with (blocksize/2 + 1) bins ; iem_utils-v0.0.20181004/iem_spec2/spec2_add~-help.pd0000644000175000017500000000057213355471363022042 0ustar zmoelnigzmoelnig#N canvas 52 28 474 268 10; #X obj 30 52 spec2+~; #X text 86 51 no arg; #X text 83 169 IEM KUG; #X text 67 157 musil; #X text 97 157 @; #X text 103 157 iem.at; #X text 66 179 Graz \, Austria; #X text 18 146 (c) Thomas Musil 2000 - 2006; #X text 30 15 spec2+~; #X text 183 49 like; #X obj 234 50 +~; #X text 106 14 add 2 signal spectras with (blocksize/2 + 1) bins; iem_utils-v0.0.20181004/iem_spec2/Makefile0000644000175000017500000000373513355471363020211 0ustar zmoelnigzmoelnig#!/usr/bin/make -f # Makefile to the 'iem_spec2' library for Pure Data. # Needs Makefile.pdlibbuilder as helper makefile for platform-dependent build # settings and rules (https://github.com/pure-data/pd-lib-builder). lib.name = iem_spec2 ## iemlib.h lives in include/ cflags = -Iinclude # special file that does not provide a class lib.setup.sources = src/$(lib.name).c # all other C and C++ files in subdirs are source files per class # (alternatively, enumerate them by hand) # class.sources = $(filter-out $(lib.setup.sources),$(wildcard src/*.c)) class.sources = \ src/spec2_1p1z_freq~.c \ src/spec2_1p1z_time~.c \ src/spec2_abs~.c \ src/spec2_add_scalar~.c \ src/spec2_add~.c \ src/spec2_block_delay~.c \ src/spec2_clip_max~.c \ src/spec2_clip_min~.c \ src/spec2_dbtopow~.c \ src/spec2_dbtorms~.c \ src/spec2_matrix_bundle_stat~.c \ src/spec2_mul_scalar~.c \ src/spec2_mul~.c \ src/spec2_powtodb~.c \ src/spec2_rmstodb~.c \ src/spec2_shift~.c \ src/spec2_sqrt~.c \ src/spec2_stretch~.c \ src/spec2_sub~.c \ src/spec2_sum~.c \ src/spec2_tab_conv~.c \ src/spec2_tabreceive_enable~.c \ src/spec2_tabreceive~.c \ $(empty) datafiles = \ $(wildcard *.txt) \ $(wildcard *.pdf) \ $(wildcard *.pd) \ $(wildcard *.gif) \ $(wildcard *.bat) \ $(wildcard *.sh) \ $(wildcard *.wav) \ $(empty) #cflags = -DVERSION=$(shell cat VERSION.txt) ## build a multi-object library make-lib-executable=yes ## suppress "unused" warnings #suppress-wunused=yes ################################################################################ ### pdlibbuilder ############################################################### ################################################################################ # This Makefile is based on the Makefile from pd-lib-builder written by # Katja Vetter. You can get it from: # https://github.com/pure-data/pd-lib-builder PDLIBBUILDER_DIR=pd-lib-builder/ include $(firstword $(wildcard $(PDLIBBUILDER_DIR)/Makefile.pdlibbuilder Makefile.pdlibbuilder)) iem_utils-v0.0.20181004/iem_spec2/spec2_clip_max~-help.pd0000644000175000017500000000203013355471363023075 0ustar zmoelnigzmoelnig#N canvas 52 28 606 339 10; #X text 230 141 no arg; #X text 81 272 IEM KUG; #X text 65 260 musil; #X text 95 260 @; #X text 101 260 iem.at; #X text 64 282 Graz \, Austria; #X text 16 249 (c) Thomas Musil 2000 - 2006; #X text 351 143 like; #X obj 128 141 spec2_clip_max~; #X obj 128 118 sig~; #X floatatom 128 98 5 0 0 0 - - -; #X obj 212 118 sig~; #X floatatom 212 98 5 0 0 0 - - -; #X obj 401 144 min~; #X text 9 6 spec2_clip_max~; #X obj 21 61 dsp; #X obj 21 38 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 1 ; #X floatatom 21 107 5 0 0 0 - - -; #X floatatom 34 86 5 0 0 0 - - -; #X text 120 28 iem_spec2 calculates only blocksize/2 + 1 samples of block; #X text 139 9 restrict a signal to lie lower than max limit; #X obj 84 179 print~; #X obj 85 159 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X connect 8 0 21 0; #X connect 9 0 8 0; #X connect 10 0 9 0; #X connect 11 0 8 1; #X connect 12 0 11 0; #X connect 15 0 17 0; #X connect 15 1 18 0; #X connect 16 0 15 0; #X connect 22 0 21 0; iem_utils-v0.0.20181004/iem_spec2/spec2_mul_scalar~-help.pd0000644000175000017500000000067613355471363023441 0ustar zmoelnigzmoelnig#N canvas 52 28 591 268 10; #X text 83 169 IEM KUG; #X text 67 157 musil; #X text 97 157 @; #X text 103 157 iem.at; #X text 66 179 Graz \, Austria; #X text 18 146 (c) Thomas Musil 2000 - 2006; #X text 361 51 like; #X text 30 14 spec2*s~; #X text 107 26 with (blocksize/2 + 1) bins; #X text 106 14 multiply a value with a signal spectrum; #X text 134 53 1.arg: value to multiply; #X obj 30 52 spec2*s~ 0; #X obj 412 52 *~ 0; iem_utils-v0.0.20181004/iem_spec2/spec2_tabreceive_enable~-help.pd0000644000175000017500000001065013355471363024727 0ustar zmoelnigzmoelnig#N canvas 22 17 939 438 10; #X obj 44 49 dsp; #X obj 44 26 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 1 ; #X floatatom 44 90 5 0 0 0 - - -; #X floatatom 57 73 5 0 0 0 - - -; #N canvas 0 0 450 300 graph1 0; #X array scope 512 float 0; #X coords 0 1 511 -1 512 100 1; #X restore 371 240 graph; #X obj 121 178 tabwrite~ scope; #X obj 211 47 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #N canvas 0 0 450 300 graph2 0; #X array filter 256 float 1; #A 0 0 0 0 0 0 0 0 0.04 0.04 0.08 0.14 0.18 0.2 0.24 0.26 0.28 0.32 0.34 0.36 0.38 0.4 0.42 0.44 0.44 0.46 0.5 0.54 0.58 0.6 0.62 0.646667 0.673334 0.7 0.74 0.76 0.78 0 0 0 0 0 0 -0.06 -0.0866667 -0.113333 -0.14 -0.175 -0.21 -0.245 -0.28 -0.31 -0.34 -0.366667 -0.393333 -0.42 -0.45 -0.48 -0.52 -0.56 -0.58 -0.62 -0.62 -0.66 -0.67 -0.68 -0.7 -0.74 -0.76 -0.78 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.8 0.78 0.76 0.68 0.62 0.58 0.5 0.473334 0.446667 0.42 0.38 0.34 0.3 0.266667 0.233333 0.2 0.17 0.14 0.11 0.08 0.05 0.02 0 0 0 0 0 0 -0.68 -0.68 -0.62 -0.56 -0.52 -0.48 -0.45 -0.42 -0.37 -0.32 -0.28 -0.24 -0.19 -0.14 -0.12 -0.1 -0.08 -0.02 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0; #X coords 0 1 255 -1 256 100 1; #X restore 502 -33 graph; #X obj 136 91 del 100; #X msg 781 2 \; filter const 0; #X text 14 -28 spec2_tabreceive_enable~; #X obj 278 47 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 1 ; #X text 295 47 enable; #X text 209 -15 and enables/disables reading the table; #N canvas 63 41 965 587 spec2_blockfilter~ 0; #X obj 100 51 inlet~; #X obj 102 381 outlet~; #X obj 271 120 block~ 256 2; #N canvas 0 0 450 300 graph1 0; #X array rect 256 float 0; #X coords 0 1 255 -1 200 140 1; #X restore 460 21 graph; #X obj 276 459 tab_const rect; #X obj 279 396 t b b; #X msg 304 421 0 128 1; #X msg 224 419 128 128 0; #X obj 279 374 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X obj 279 350 loadbang; #X obj 101 309 /~ 256; #X obj 101 108 *~; #X obj 114 85 spec2_tabreceive~ rect; #N canvas 0 0 450 300 graph1 0; #X array real 256 float 0; #X coords 0 1 255 -1 200 140 1; #X restore 691 177 graph; #N canvas 0 0 450 300 graph1 0; #X array imag 256 float 0; #X coords 0 1 255 -1 200 140 1; #X restore 691 326 graph; #X obj 697 56 inlet; #X obj 697 80 t b; #X text 351 190 1.arg: table-name; #X obj 291 54 inlet; #X obj 101 131 rfft~; #X obj 102 280 rifft~; #X obj 158 260 spec2+~; #X obj 40 257 spec2-~; #X obj 32 212 spec2*~; #X obj 85 215 spec2*~; #X obj 146 214 spec2*~; #X obj 205 214 spec2*~; #X obj 247 149 spec2_tabreceive_enable~ real 0; #X obj 263 174 spec2_tabreceive_enable~ imag 0; #X text 352 205 2.arg: enable-state; #X obj 697 102 tab_rfft filter real imag 256; #X connect 0 0 11 0; #X connect 5 0 7 0; #X connect 5 1 6 0; #X connect 6 0 4 0; #X connect 7 0 4 0; #X connect 8 0 5 0; #X connect 9 0 8 0; #X connect 10 0 1 0; #X connect 11 0 19 0; #X connect 12 0 11 1; #X connect 15 0 16 0; #X connect 16 0 30 0; #X connect 18 0 27 0; #X connect 18 0 28 0; #X connect 19 0 23 0; #X connect 19 0 25 0; #X connect 19 1 24 0; #X connect 19 1 26 0; #X connect 20 0 10 0; #X connect 21 0 20 1; #X connect 22 0 20 0; #X connect 23 0 22 0; #X connect 24 0 22 1; #X connect 25 0 21 0; #X connect 26 0 21 1; #X connect 27 0 23 1; #X connect 27 0 26 1; #X connect 28 0 24 1; #X connect 28 0 25 1; #X restore 158 141 pd spec2_blockfilter~ using spec2_tabreceive_enable~ ; #X text 749 122 1.arg: table-name; #X msg 561 99 symbol filter; #X text 749 134 2.arg: enable-state; #X obj 536 129 spec2_tabreceive_enable~ filter 1; #X msg 496 89 1; #X msg 524 89 0; #X obj 159 117 dirac~; #X text 150 2 iem_spec2 calculates only (blocksize/2 + 1) samples; #X text 180 -27 receives spectrum from table with (blocksize/2 + 1) ; #X text 90 302 IEM KUG; #X text 74 290 musil; #X text 104 290 @; #X text 110 290 iem.at; #X text 73 312 Graz \, Austria; #X text 25 279 (c) Thomas Musil 2000 - 2006; #X connect 0 0 2 0; #X connect 0 1 3 0; #X connect 1 0 0 0; #X connect 6 0 14 2; #X connect 6 0 8 0; #X connect 8 0 5 0; #X connect 8 0 21 0; #X connect 11 0 14 1; #X connect 14 0 5 0; #X connect 16 0 18 0; #X connect 19 0 18 0; #X connect 20 0 18 0; #X connect 21 0 14 0; iem_utils-v0.0.20181004/iem_spec2/include/0000755000175000017500000000000013355471363020164 5ustar zmoelnigzmoelnigiem_utils-v0.0.20181004/iem_spec2/include/iem_spec2.h0000644000175000017500000000047313355471363022207 0ustar zmoelnigzmoelnig/* For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. iem_spec2 written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2009 */ #ifndef __IEMSPEC2_H__ #define __IEMSPEC2_H__ #define DELLINE_DEF_VEC_SIZE 64 #endif iem_utils-v0.0.20181004/iem_spec2/include/iemlib.h0000644000175000017500000001344013355471363021600 0ustar zmoelnigzmoelnig/* For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. iemlib written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2018 */ #ifndef __IEMLIB_H__ #define __IEMLIB_H__ #define IS_A_NULL(atom,index) ((atom+index)->a_type == A_NULL) #define IS_A_POINTER(atom,index) ((atom+index)->a_type == A_POINTER) #define IS_A_FLOAT(atom,index) ((atom+index)->a_type == A_FLOAT) #define IS_A_SYMBOL(atom,index) ((atom+index)->a_type == A_SYMBOL) #define IS_A_DOLLAR(atom,index) ((atom+index)->a_type == A_DOLLAR) #define IS_A_DOLLSYM(atom,index) ((atom+index)->a_type == A_DOLLSYM) #define IS_A_SEMI(atom,index) ((atom+index)->a_type == A_SEMI) #define IS_A_COMMA(atom,index) ((atom+index)->a_type == A_COMMA) #define SETNULL(atom) ((atom)->a_type = A_NULL) #ifdef MSW int sys_noloadbang; //t_symbol *iemgui_key_sym=0; #include #else extern int sys_noloadbang; //extern t_symbol *iemgui_key_sym; #include #endif //millers m_pd.h beg /* Microsoft Visual Studio is not C99, it does not provide stdint.h */ #ifdef _MSC_VER typedef signed __int8 int8_t; typedef signed __int16 int16_t; typedef signed __int32 int32_t; typedef signed __int64 int64_t; typedef unsigned __int8 uint8_t; typedef unsigned __int16 uint16_t; typedef unsigned __int32 uint32_t; typedef unsigned __int64 uint64_t; #else # include #endif #if !defined(PD_FLOATSIZE) /* if compiled pd version < 0.47*/ # define PD_FLOATSIZE 32 #endif typedef union { float f; unsigned int ui; }t_iemdenormal_f; typedef union { double f; unsigned int ui[2]; }t_iemdenormal_d; #ifndef _MSC_VER /* Microoft compiler can't handle "inline" function/macros */ #if defined(__i386__) || defined(__x86_64__) || defined(__arm__) /* a test for NANs and denormals. Should only be necessary on i386. */ static inline int IEM_DENORMAL_F(float f) /* malformed float 32 */ { t_iemdenormal_f pun; pun.f = f; pun.ui &= 0x7f800000; return((pun.ui == 0) | (pun.ui == 0x7f800000)); } static inline int IEM_DENORMAL_D(double f) /* malformed double 64 */ { t_iemdenormal_d pun; pun.f = f; pun.ui[1] &= 0x7ff00000; return((pun.ui[1] == 0) | (pun.ui[1] == 0x7ff00000)); } #if PD_FLOATSIZE == 32 typedef union { t_float f; unsigned int ui; }t_iemdenormal_t32; static inline int IEM_DENORMAL_T(t_float f) /* malformed t_float 32 */ { t_iemdenormal_t32 pun; pun.f = f; pun.ui &= 0x7f800000; return((pun.ui == 0) | (pun.ui == 0x7f800000)); } #elif PD_FLOATSIZE == 64 typedef union { t_float f; unsigned int ui[2]; }t_iemdenormal_t64; static inline int IEM_DENORMAL_T(t_float f) /* malformed t_float 64 */ { t_iemdenormal_t64 pun; pun.f = f; pun.ui[1] &= 0x7ff00000; return((pun.ui[1] == 0) | (pun.ui[1] == 0x7ff00000)); } #endif /* PD_FLOATSIZE */ #else /* not INTEL or ARM */ #define IEM_DENORMAL_T(f) 0 #endif #else /* _MSC_VER */ #define IEM_DENORMAL_F(f) ((((*(unsigned int*)&(f))&0x7f800000)==0) || \ (((*(unsigned int*)&(f))&0x7f800000)==0x7f800000)) static int IEM_DENORMAL_D(double f) /* malformed t_float 64 */ { t_iemdenormal_d pun; pun.f = f; pun.ui[1] &= 0x7ff00000; return((pun.ui[1] == 0) | (pun.ui[1] == 0x7ff00000)); } #if PD_FLOATSIZE == 32 #define IEM_DENORMAL_T(f) ((((*(unsigned int*)&(f))&0x7f800000)==0) || \ (((*(unsigned int*)&(f))&0x7f800000)==0x7f800000)) #else /* 64 bits... don't know what to do here */ //#define IEM_DENORMAL_T(f) (!(((f) >= 0) || ((f) <= 0))) int IEM_DENORMAL_T(t_float f) /* malformed t_float 64 */ { t_iemdenormal_t64 pun; pun.f = f; pun.ui[1] &= 0x7ff00000; return((pun.ui[1] == 0) | (pun.ui[1] == 0x7ff00000)); } #endif #endif /* _MSC_VER */ //millers m_pd.h end /* on 64bit systems we cannot use garray_getfloatarray... */ #if ((defined PD_MAJOR_VERSION && defined PD_MINOR_VERSION) && (PD_MAJOR_VERSION > 0 || PD_MINOR_VERSION > 40)) # define iemarray_t t_word # define iemarray_getarray garray_getfloatwords # define iemarray_getfloat(pointer, index) (pointer[index].w_float) # define iemarray_setfloat(pointer, index, fvalue) (pointer[index].w_float = fvalue) #else # define iemarray_t t_float # define iemarray_getarray garray_getfloatarray # define iemarray_getfloat(pointer, index) (pointer[index]) # define iemarray_setfloat(pointer, index, fvalue) (pointer[index] = fvalue) #endif #ifndef BUILD_DATE # define BUILD_DATE "" __DATE__ " : " __TIME__ #endif #if (defined PD_MAJOR_VERSION && defined PD_MINOR_VERSION) && (PD_MAJOR_VERSION > 0 || PD_MINOR_VERSION > 43) # define iem_open sys_open # define iem_close sys_close # define iem_fopen sys_fopen # define iem_fclose sys_fclose #else # define iem_open open # define iem_close close # define iem_fopen fopen # define iem_fclose fclose #endif // millers d_osc.c beg #define UNITBIT32 1572864. /* 3*2^19; bit 32 has place value 1 */ #if defined(__FreeBSD__) || defined(__APPLE__) || defined(__FreeBSD_kernel__) \ || defined(__OpenBSD__) #include #endif #if defined(__linux__) || defined(__CYGWIN__) || defined(__GNU__) || \ defined(ANDROID) #include #endif #ifdef __MINGW32__ #include #endif #ifdef _MSC_VER /* _MSVC lacks BYTE_ORDER and LITTLE_ENDIAN */ #define LITTLE_ENDIAN 0x0001 #define BYTE_ORDER LITTLE_ENDIAN #endif #if !defined(BYTE_ORDER) || !defined(LITTLE_ENDIAN) #error No byte order defined #endif #if BYTE_ORDER == LITTLE_ENDIAN # define HIOFFSET 1 # define LOWOFFSET 0 #else # define HIOFFSET 0 /* word offset to find MSB */ # define LOWOFFSET 1 /* word offset to find LSB */ #endif union tabfudge { double tf_d; int32_t tf_i[2]; }; // millers d_osc.c end // millers d_delay.c beg #define IEMDEFDELVS 64 #define IEMXTRASAMPS 4 #define IEMSAMPBLK 4 // millers d_delay.c end #endif iem_utils-v0.0.20181004/iem_spec2/spec2_1p1z_time~-help.pd0000644000175000017500000000420313355471363023116 0ustar zmoelnigzmoelnig#N canvas 20 32 712 376 10; #X obj 42 70 dsp; #X obj 42 47 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 1 1 ; #X floatatom 42 111 5 0 0 0 - - -; #X floatatom 55 94 5 0 0 0 - - -; #N canvas 0 0 450 300 graph1 0; #X array scope 256 float 0; #X coords 0 100 255 0 300 200 1; #X restore 346 82 graph; #X text 18 5 spec2_1p1z_time~; #X text 132 20 iem_spec2 calculates only blocksize/2 + 1 samples of block; #N canvas 0 0 629 404 tables 0; #N canvas 0 0 450 300 graph1 0; #X array hann 259 float 0; #X coords 0 1 258 -1 200 140 1; #X restore 30 31 graph; #X obj 246 34 loadbang; #X msg 246 55 \; hann cosinesum 256 0.5 -0.5; #X connect 1 0 2 0; #X restore 149 82 pd tables; #X obj 42 145 noise~; #X obj 237 93 osc~ 11025; #X msg 292 58 0; #X obj 42 169 bpq2~ 7000 6 100; #X msg 201 187 1 0 0; #X msg 200 165 0.1 0 0.9; #X msg 200 143 0.01 0 0.99; #N canvas 190 113 557 449 spec_analyse_by_1p1z_time 0; #X obj 100 51 inlet~; #X obj 352 46 block~ 256 2; #X obj 102 156 rfft~; #X obj 101 108 *~; #X obj 300 225 spec2_1p1z_time~ 0.5 0 0.5; #X obj 298 46 inlet; #X obj 114 86 spec2_tabreceive~ hann; #X obj 97 186 *~; #X obj 124 186 *~; #X obj 104 211 +~; #X obj 104 266 powtodb~; #X obj 104 291 tabsend~ scope; #X obj 180 174 /; #X obj 101 131 *~ 0.032; #X msg 189 149 1 32; #X obj 188 127 loadbang; #X connect 0 0 3 0; #X connect 2 0 7 0; #X connect 2 0 7 1; #X connect 2 1 8 0; #X connect 2 1 8 1; #X connect 3 0 13 0; #X connect 4 0 10 0; #X connect 5 0 4 0; #X connect 6 0 3 1; #X connect 7 0 9 0; #X connect 8 0 9 1; #X connect 9 0 4 0; #X connect 10 0 11 0; #X connect 12 0 13 1; #X connect 13 0 2 0; #X connect 14 0 12 0; #X connect 15 0 14 0; #X restore 42 214 pd spec_analyse_by_1p1z_time; #X text 90 302 IEM KUG; #X text 74 290 musil; #X text 104 290 @; #X text 110 290 iem.at; #X text 73 312 Graz \, Austria; #X text 25 279 (c) Thomas Musil 2000 - 2006; #X text 168 3 makes a feedback of the spectrum; #X connect 0 0 2 0; #X connect 0 1 3 0; #X connect 1 0 0 0; #X connect 8 0 11 0; #X connect 10 0 9 1; #X connect 11 0 15 0; #X connect 12 0 15 1; #X connect 13 0 15 1; #X connect 14 0 15 1; iem_utils-v0.0.20181004/iem_spec2/spec2_matrix_bundle_stat~-help.pd0000644000175000017500000001101713355471363025176 0ustar zmoelnigzmoelnig#N canvas 106 40 882 682 10; #X obj 18 44 dsp; #X obj 18 14 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 1 ; #X floatatom 18 100 5 0 0 0 - - -; #X floatatom 33 74 5 0 0 0 - - -; #X obj 46 322 sig~ 1; #X obj 96 353 sig~ 2; #X obj 145 377 sig~ 4; #X obj 195 402 sig~ 8; #X obj 234 431 sig~ 16; #X obj 47 488 unsig~; #X floatatom 47 512 5 0 0 0 - - -; #X obj 245 491 unsig~; #X floatatom 245 515 5 0 0 0 - - -; #X obj 298 442 any; #X msg 298 154 bundle 0 0 0 0 0; #X msg 298 180 bundle 1 1 1 1 1; #X msg 298 201 bundle 2 2 2 2 2; #X msg 298 227 bundle 1 0 0 0 0; #X msg 298 247 bundle 0 1 0 0 0; #X msg 298 267 bundle 0 0 1 0 0; #X msg 298 287 bundle 0 0 0 1 0; #X msg 298 307 bundle 0 0 0 0 1; #X msg 298 333 bundle 2 0 0 0 0; #X msg 298 353 bundle 0 2 0 0 0; #X msg 298 373 bundle 0 0 2 0 0; #X msg 298 393 bundle 0 0 0 2 0; #X msg 298 413 bundle 0 0 0 0 2; #X obj 432 442 pp element; #X obj 432 419 pack 0 0; #X obj 432 397 f; #X floatatom 475 368 4 1 5 0 - - -; #X floatatom 445 368 4 0 2 0 - - -; #X obj 422 375 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X text 706 15 SIG_OUT = A * SIG_IN; #X text 234 14 multiplies a n-dimensional signal-in-vector with a dynamic static (like sig~) signal-matrix to a n-dimensional signal-out-vector ; #X text 725 33 A is quadratic; #X text 662 50 dim(SIG_OUT) = dim(SIG_IN) = n; #X text 234 51 each matrix-column has only one one \, the other elements are zero; #X text 301 475 2.arg Nr. of outlets = rows; #X text 301 464 1.arg Nr. of inlets = columns; #X text 517 336 message "element"; #X text 531 365 2.) item column_index (1 .. nr_columns); #X text 531 353 1.) item row_index (0 .. nr_rows); #X text 446 111 message "bundle"; #X text 556 381 where the single one of the column will be placed; #X text 557 393 if (row-index == 0) -> the column has only zeros; #X text 449 126 (nr_inlets = nr_columns) row-indices (0 .. nr_row); #X text 454 162 if (row-index == 0) -> the column has only zeros; #X text 453 150 where the single one of each column will be placed ; #N canvas 176 206 818 475 block_______________________ 0; #X obj 564 88 block~ 128 2; #X obj 48 29 inlet~; #X obj 51 260 outlet~; #X obj 103 30 inlet~; #X obj 159 29 inlet~; #X obj 214 30 inlet~; #X obj 272 30 inlet~; #X obj 246 257 outlet~; #X obj 51 209 spec2_matrix_bundle_stat~ 5 2; #X obj 350 30 inlet; #X obj 586 308 for++ 0 127 0.1; #X obj 586 332 moses 64; #X msg 586 359 1 \$1; #X msg 637 358 0 \$1; #X obj 586 287 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X obj 586 267 loadbang; #X obj 540 240 table \$0_rect 128; #X obj 586 385 tabwrite \$0_rect; #X obj 64 57 tabreceive~ \$0_rect; #X obj 48 79 *~; #X obj 116 81 tabreceive~ \$0_rect; #X obj 100 103 *~; #X obj 170 103 tabreceive~ \$0_rect; #X obj 154 125 *~; #X obj 220 124 tabreceive~ \$0_rect; #X obj 204 146 *~; #X obj 270 146 tabreceive~ \$0_rect; #X obj 254 168 *~; #X connect 1 0 19 0; #X connect 3 0 21 0; #X connect 4 0 23 0; #X connect 5 0 25 0; #X connect 6 0 27 0; #X connect 8 0 2 0; #X connect 8 1 7 0; #X connect 9 0 8 0; #X connect 10 0 11 0; #X connect 11 0 12 0; #X connect 11 1 13 0; #X connect 12 0 17 0; #X connect 13 0 17 0; #X connect 14 0 10 0; #X connect 15 0 14 0; #X connect 18 0 19 1; #X connect 19 0 8 0; #X connect 20 0 21 1; #X connect 21 0 8 1; #X connect 22 0 23 1; #X connect 23 0 8 2; #X connect 24 0 25 1; #X connect 25 0 8 3; #X connect 26 0 27 1; #X connect 27 0 8 4; #X restore 48 463 pd block_______________________; #X text 50 13 spec2_matrix_bundle_stat~; #X text 90 575 IEM KUG; #X text 74 563 musil; #X text 104 563 @; #X text 110 563 iem.at; #X text 73 585 Graz \, Austria; #X text 25 552 (c) Thomas Musil 2000 - 2006; #X text 234 83 it calculates matrix only with (blocksize/2 + 1) samples per signalvector; #X connect 0 0 2 0; #X connect 0 1 3 0; #X connect 1 0 0 0; #X connect 4 0 49 0; #X connect 5 0 49 1; #X connect 6 0 49 2; #X connect 7 0 49 3; #X connect 8 0 49 4; #X connect 9 0 10 0; #X connect 11 0 12 0; #X connect 13 0 49 5; #X connect 14 0 13 0; #X connect 15 0 13 0; #X connect 16 0 13 0; #X connect 17 0 13 0; #X connect 18 0 13 0; #X connect 19 0 13 0; #X connect 20 0 13 0; #X connect 21 0 13 0; #X connect 22 0 13 0; #X connect 23 0 13 0; #X connect 24 0 13 0; #X connect 25 0 13 0; #X connect 26 0 13 0; #X connect 28 0 27 0; #X connect 29 0 28 0; #X connect 30 0 28 1; #X connect 31 0 29 1; #X connect 32 0 29 0; #X connect 49 0 9 0; #X connect 49 1 11 0; iem_utils-v0.0.20181004/iem_spec2/spec2_sum~-help.pd0000644000175000017500000000377513355471363022126 0ustar zmoelnigzmoelnig#N canvas 90 35 781 494 10; #X obj 42 70 dsp; #X obj 42 47 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 1 1 ; #X floatatom 42 111 5 0 0 0 - - -; #X floatatom 55 94 5 0 0 0 - - -; #N canvas 0 0 450 300 graph1 0; #X array array101 192 float 0; #X coords 0 50 191 -50 382 128 1; #X restore 319 224 graph; #X obj 46 156 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X text 202 216 no arguments; #X text 90 402 IEM KUG; #X text 74 390 musil; #X text 104 390 @; #X text 110 390 iem.at; #X text 73 412 Graz \, Austria; #X text 25 379 (c) Thomas Musil 2000 - 2006; #N canvas 0 0 754 332 init 0; #X obj 52 43 t f f; #X obj 50 -10 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X obj 52 -36 loadbang; #X obj 57 147 tabwrite array100; #X msg 161 -9 \; array100 xticks 0 32 2; #X msg 174 75 \; array101 xticks 0 32 2; #X msg 165 30 \; array100 xlabel -1.1 0 32 64 96 128; #X obj 50 11 for++ 0 127; #X obj 56 107 / 128; #X msg 431 -9 \; array100 yticks 0 0.5 2; #X msg 435 30 \; array100 ylabel -6 -1 -0.5 0 0.5 1; #X msg 177 125 \; array101 xlabel -55 0 32 64 96 128 160 192; #X msg 444 75 \; array101 yticks 0 25 2; #X msg 447 125 \; array101 ylabel -6 -50 -25 0 25 50; #X connect 0 0 8 0; #X connect 0 1 3 1; #X connect 1 0 7 0; #X connect 2 0 1 0; #X connect 2 0 4 0; #X connect 2 0 6 0; #X connect 2 0 5 0; #X connect 2 0 11 0; #X connect 2 0 9 0; #X connect 2 0 10 0; #X connect 2 0 12 0; #X connect 2 0 13 0; #X connect 7 0 0 0; #X connect 8 0 3 0; #X restore 323 394 pd init; #N canvas 0 0 450 300 graph1 0; #X array array100 128 float 0; #X coords 0 1 127 -1 256 128 1; #X restore 319 62 graph; #X obj 84 192 tabplay~ array100; #X obj 46 252 tabwrite~ array101; #X obj 84 218 spec2_sum~; #X text 19 4 spec2_sum~; #X text 400 5 (blocksize/2 + 1) bins; #X text 161 4 accumulate the sum of the spectrum with; #X connect 0 0 2 0; #X connect 0 1 3 0; #X connect 1 0 0 0; #X connect 5 0 15 0; #X connect 5 0 16 0; #X connect 15 0 17 0; #X connect 17 0 16 0; iem_utils-v0.0.20181004/iem_spec2/pd-lib-builder/0000755000175000017500000000000013355471363021334 5ustar zmoelnigzmoelnigiem_utils-v0.0.20181004/iem_spec2/pd-lib-builder/Makefile.pdlibbuilder0000644000175000017500000012415213355471363025441 0ustar zmoelnigzmoelnig# Makefile.pdlibbuilder dated 2018-03-15 version = 0.5.1 # Helper makefile for Pure Data external libraries. # Written by Katja Vetter March-June 2015 for the public domain. No warranties. # Inspired by Hans Christoph Steiner's Makefile Template and Stephan Beal's # ShakeNMake. # # Grab the newest version of Makefile.pdlibbuilder from # https://github.com/pure-data/pd-lib-builder/ # # GNU make version >= 3.81 required. # # #=== characteristics =========================================================== # # # - defines build settings based on autodetected OS and architecture # - defines rules to build Pd class- or lib executables from C or C++ sources # - defines rules for libdir installation # - defines convenience targets for developer and user # - evaluates implicit dependencies for non-clean builds # # #=== basic usage =============================================================== # # # In your Makefile, define your Pd lib name and class files, and include # Makefile.pdlibbuilder at the end of the Makefile. Like so: # # ________________________________________________________________________ # # # Makefile for mylib # # lib.name = mylib # # class.sources = myclass1.c myclass2.c # # datafiles = myclass1-help.pd myclass2-help.pd README.txt LICENSE.txt # # include Makefile.pdlibbuilder # ________________________________________________________________________ # # # For files in class.sources it is assumed that class basename == source file # basename. The default target builds all classes as individual executables # with Pd's default extension for the platform. For anything more than the # most basic usage, continue reading. # # #=== list of Makefile.pdlibbuilder API variables =============================== # # # Variables available for definition in your library Makefile: # # - lib.name # - lib.setup.sources # - class.sources # - common.sources # - shared.sources # - .class.sources # - .class.ldflags # - .class.ldlibs # - cflags # - ldflags # - ldlibs # - datafiles # - datadirs # - makefiles # - makefiledirs # - externalsdir # # Optional multiline defines evaluated per operating system: # # - forLinux # - forDarwin # - forWindows # # Variables available for your makefile or make command line: # # - make-lib-executable # - suppress-wunused # # Path variables for make command line or environment: # # - PDDIR # - PDINCLUDEDIR # - PDBINDIR # - PDLIBDIR # # Standard make variables for make command line or environment: # # - CPPFLAGS # - CFLAGS # - LDFLAGS # - CC # - CXX # - INSTALL # - STRIP # - DESTDIR # # Deprecated path variables: # # - pdincludepath # - pdbinpath # - objectsdir # # #=== descriptions of Makefile.pdlibbuilder API variables ======================= # # # lib.name: # Name of the library directory as it will be installed / distributed. Also the # name of the lib executable in the case where all classes are linked into # a single binary. # # lib.setup.sources: # Source file(s) (C or C++) which must be compiled only when linking all classes # into a single lib binary. # # class.sources: # All sources files (C or C++) for which the condition holds that # class name == source file basename. # # .class.sources: # Source file(s) (C or C++) specific to class . Use this for # multiple-source classes or when class name != source file basename. # # common.sources: # Source file(s) which must be statically linked to each class in the library. # # shared.sources: # Source file(s) (C or C++) to build a shared dynamic link lib, to be linked # with all class executables. # # cflags, ldflags, ldlibs: # Define cflags (preprocessor&compiler), ldflags (linker) and ldlibs (dynamic # link libs) for the whole library. These flags are added to platform-specific # flags defined by Makefile.pdlibbuilder. # # .class.ldflags and .class.ldlibs: # Define ldflags resp. ldlibs specific to class . These flags are # added to platform-specific flags defined by Makefile.pdlibbuilder, and flags # defined in your Makefile for the whole library. Note: cflags can not be # defined per class in the current implementation. # # datafiles and datadirs: # All extra files you want to include in binary distributions of the # library: abstractions and help patches, example patches, meta patch, readme # and license texts, manuals, sound files, etcetera. Use 'datafiles' for all # files that should go into your lib rootdir and 'datadirs' for complete # directories you want to copy from source to distribution. # # forLinux, forDarwin, forWindows: # Shorthand for 'variable definitions for Linux only' etc. Use like: # define forLinux # cflags += -DLINUX # class.sources += linuxthing.c # endef # # makefiles and makefiledirs: # Extra makefiles or directories with makefiles that should be made in sub-make # processes. # # make-lib-executable: # When this variable is defined 'yes' in your makefile or as command argument, # Makefile.pdlibbuilder will try to build all classes into a single library # executable (but it will force exit if lib.setup.sources is undefined). # If your makefile defines 'make-lib-executable=yes' as the library default, # this can still be overridden with 'make-lib-executable=no' as command argument # to build individual class executables (the Makefile.pdlibbuilder default.) # # suppress-wunused: # When this variable is defined ('yes' or any other value), -Wunused-variable, # -Wunused-parameter, -Wunused-value and -Wunused-function are suppressed, # but the other warnings from -Wall are retained. # # PDDIR: # Root directory of 'portable' pd package. When defined, PDINCLUDEDIR and # PDBINDIR will be evaluated as $(PDDIR)/src and $(PDDIR)/bin. # # PDINCLUDEDIR: # Directory where Pd API m_pd.h should be found, and other Pd header files. # Overrides the default search path. # # PDBINDIR: # Directory where pd.dll should be found for linking (Windows only). Overrides # the default search path. # # PDLIBDIR: # Root directory for installation of Pd library directories. Overrides the # default install location. # # DESTDIR: # Prepended path component for staged install. # # CPPFLAGS: # Preprocessor flags which are not strictly required for building. # # CFLAGS: # Compiler flags which are not strictly required for building. Compiler flags # defined by Makefile.pdlibbuilder for warning, optimization and architecture # specification are overriden by CFLAGS. # # LDFLAGS: # Linker flags which are not strictly required for building. Linker flags # defined by Makefile.pdlibbuilder for architecture specification are overriden # by LDFLAGS. # # CC and CXX: # C and C++ compiler programs as defined in your build environment. # # INSTALL # Definition of install program. # # STRIP # Name of strip program. Default 'strip' can be overridden in cross compilation # environments. # # objectsdir: # Root directory for installation of Pd library directories, like PDLIBDIR but # not overridable by environment. Supported for compatibility with pd-extended # central makefile, but deprecated otherwise. # # pdincludepath, pdbinpath: # As PDINCLUDEDIR and PDBINDIR but not overridable by environment. Deprecated # as user variables. # # #=== paths ===================================================================== # # # Source files in directories other than current working directory must be # prefixed with their relative path. Do not rely on VPATH or vpath. # Object (.o) files are built in the directory of their source files. # Executables are built in current working directory. # # Default search path for m_pd.h and other API header files is platform # dependent, and overridable by PDINCLUDEDIR: # # Linux: /usr/include/pd # # OSX: /Applications/Pd*.app/Contents/Resources/src # # Windows: %PROGRAMFILES%/Pd/src # %PROGRAMFILES(X86)%/Pd/src (32 bit builds on 64 bit Windows) # # Default search path for binary pd.dll (Windows), overridable by PDBINDIR # # %PROGRAMFILES%/Pd/bin # %PROGRAMFILES(X86)%/Pd/bin (32 bit builds on 64 bit Windows) # # Default location to install pd libraries is platform dependent, and # overridable by PDLIBDIR: # # Linux: /usr/local/lib/pd-externals # OSX: ~/Library/Pd # Windows: %APPDATA%/Pd # # https://puredata.info/docs/faq/how-do-i-install-externals-and-help-files # The rationale for not installing to ~/pd-externals by default on Linux # is that some people share the home dir between 32 and 64 bit installations. # # #=== targets =================================================================== # # # all: build $(executables) plus optional post target # post: target to build after $(executables) # alldebug: build all with -g option turned on for debug symbols # : force clean build of an individual class # .pre: make preprocessor output file in current working directory # .lst: make asm/source output file in current working directory # # install: install executables and data files # clean: remove build products from source tree # # help: print help text # vars: print makefile variables # allvars: print all variables # depend: print generated prerequisites # coffee: dummy target # # Variable $(executables) expands to class executables plus optional shared lib, # or alternatively to single lib executable when make-lib-executable=true. # Targets pre and post can be defined by library makefile. Make sure to include # Makefile.pdlibbuilder first so default target all will not be redefined. # # #=== Pd-extended libdir concept ================================================ # # # For libdir layout as conceived by Hans-Christoph Steiner, see: # # https://puredata.info/docs/developer/Libdir # # Files README.txt, LICENSE.txt and -meta.pd are part of the libdir # convention. Help patches for each class and abstraction are supposed to be # available. Makefile.pdlibbuilder does not force the presence of these files # however. It does not automatically include such files in libdir installations. # Data files you want to include in distributions must be defined explicitly in # your Makefile. # # #=== Makefile.pdlibbuilder syntax conventions ================================== # # # Makefile.pdlibbuilder variable names are lower case. Default make variables, # environment variables, and standard user variables (CC, CXX, CFLAGS, DESTDIR) # are upper case. Use target 'allvars' to print all variables and their values. # # 'Fields' in data variables are separated by dots, like in 'foo.class.sources'. # Words in variables expressing a function or command are separated by dashes, # like in 'make-lib-executable'. # # #=== useful make options ======================================================= # # # Use 'make -d ' to print debug details of the make process. # Use 'make -p ' to print make's database. # # #=== TODO ====================================================================== # # # - decide whether to use -static-libgcc or shared dll in MinGW # - cygwin support # - android support # - figure out how to handle '$' in filenames # - add makefile template targets dpkg-source dist libdir distclean tags? # # #=== end of documentation sections ============================================= # # ################################################################################ ################################################################################ ################################################################################ # GNU make version 3.81 (2006) or higher is required because of the following: # - function 'info' # - variable '.DEFAULT_GOAL' # force exit when make version is < 3.81 ifneq ($(firstword $(sort 3.81 $(MAKE_VERSION))), 3.81) $(error GNU make version 3.81 or higher is required) endif # Relative path to externals root dir in multi-lib source tree like # pd-extended SVN. Default is parent of current working directory. May be # defined differently in including makefile. externalsdir ?= .. # variable you can use to check if Makefile.pdlibbuilder is already included Makefile.pdlibbuilder = true ################################################################################ ### variables: library name and version ######################################## ################################################################################ # strip possibles spaces from lib.name, they mess up calculated file names lib.name := $(strip $(lib.name)) # if meta file exists, check library version metafile := $(wildcard $(lib.name)-meta.pd) ifdef metafile lib.version := $(shell sed -n \ 's|^\#X text [0-9][0-9]* [0-9][0-9]* VERSION \(.*\);|\1|p' \ $(metafile)) endif ################################################################################ ### variables: files ########################################################### ################################################################################ #=== sources =================================================================== # (re)define .class.sources using file names in class.sources define add-class-source $(notdir $(basename $v)).class.sources += $v endef $(foreach v, $(class.sources), $(eval $(add-class-source))) # derive class names from .class.sources variables sourcevariables := $(filter %.class.sources, $(.VARIABLES)) classes := $(basename $(basename $(sourcevariables))) # accumulate all source files specified in makefile classes.sources := $(sort $(foreach v, $(sourcevariables), $($v))) all.sources := $(classes.sources) $(lib.setup.sources) \ $(shared.sources) $(common.sources) #=== object files ============================================================== # construct object filenames from all C and C++ source file names classes.objects := $(addsuffix .o, $(basename $(classes.sources))) common.objects := $(addsuffix .o, $(basename $(common.sources))) shared.objects := $(addsuffix .o, $(basename $(shared.sources))) lib.setup.objects := $(addsuffix .o, $(basename $(lib.setup.sources))) all.objects = $(classes.objects) $(common.objects) $(shared.objects) \ $(lib.setup.objects) #=== executables =============================================================== # use recursive variables here because executable extension is not yet known # construct class executable names from class names classes.executables = $(addsuffix .$(extension), $(classes)) # construct shared lib executable name if shared sources are defined ifdef shared.sources shared.lib = lib$(lib.name).$(shared.extension) else shared.lib = endif ################################################################################ ### platform detection ######################################################### ################################################################################ #=== operating system ========================================================== # The following systems are defined: Linux, Darwin, Windows. GNU and # GNU/kFreeBSD are treated as Linux to get the same options. uname := $(shell uname) ifeq ($(findstring $(uname), Linux GNU GNU/kFreeBSD), $(uname)) system = Linux endif ifeq ($(uname), Darwin) system = Darwin endif ifeq ($(filter MINGW% MSYS%, $(uname)), $(uname)) system = Windows endif # Unfortunately not all Mingw versions provide a link cc > gcc, therefore # gcc is hardcoded here (but not if CC is redefined). ifeq ($(system), Windows) ifeq ($(origin CC), default) CC = gcc endif endif # evaluate possible system-specific multiline defines from library makefile $(eval $(for$(system))) # TODO: Cygwin, Android #=== architecture ============================================================== # native architecture of the build machine build.arch := $(shell uname -m) # Target architecture as reported by compiler. Give precedence to eventual # user-defined compiler. The first field of -- is extracted. ifneq ($(origin CXX), default) dumpmachine.cpu = $(firstword $(subst -, ,$(shell $(CXX) -dumpmachine))) else dumpmachine.cpu = $(firstword $(subst -, ,$(shell $(CC) -dumpmachine))) endif # Target architecture as reported by compiler is only used for Windows at the # moment. For other systems this still has to be tested. ifeq ($(system), Windows) target.arch = $(dumpmachine.cpu) else target.arch = $(build.arch) endif ################################################################################ ### variables per platform ##################################################### ################################################################################ #=== flags per architecture ==================================================== # Set architecture-dependent cflags, mainly for Linux. For Mac and Windows, # arch.c.flags are overriden below. # Raspberry Pi 1st generation ifeq ($(target.arch), armv6l) arch.c.flags = -march=armv6 -mfpu=vfp -mfloat-abi=hard # Beagle, Udoo, RPi2 etc. else ifeq ($(target.arch), armv7l) arch.c.flags = -march=armv7-a -mfpu=vfpv3 -mfloat-abi=hard # Intel 32 bit, build with SSE and SSE2 instructions else ifeq ($(findstring $(target.arch), i386 i686), $(target.arch)) arch.c.flags = -march=pentium4 -mfpmath=sse -msse -msse2 # Intel/AMD 64 bit, build with SSE, SSE2 and SSE3 instructions else ifeq ($(findstring $(target.arch), x86_64), $(target.arch)) arch.c.flags = -march=core2 -mfpmath=sse -msse -msse2 -msse3 # if none of the above architectures detected else arch.c.flags = endif #=== flags and paths for Linux ================================================= ifeq ($(system), Linux) prefix = /usr/local libdir := $(prefix)/lib pkglibdir = $(libdir)/pd-externals pdincludepath := $(wildcard /usr/include/pd) extension = pd_linux cpp.flags := -DUNIX c.flags := -fPIC c.ldflags := -rdynamic -shared -fPIC -Wl,-rpath,"\$$ORIGIN",--enable-new-dtags c.ldlibs := -lc -lm cxx.flags := -fPIC -fcheck-new cxx.ldflags := -rdynamic -shared -fPIC -Wl,-rpath,"\$$ORIGIN",--enable-new-dtags cxx.ldlibs := -lc -lm -lstdc++ shared.extension = so shared.ldflags := -rdynamic -fPIC -shared -Wl,-soname,$(shared.lib) endif #=== flags and paths for Darwin ================================================ # On OSX we try to build fat binaries by default. It is assumed that OSX i386 # can build for ppc and OSX x86_64 can't. TODO: try to refine this condition. # LLVM-clang doesn't support -fcheck-new, therefore this flag is omitted for # OSX x86_64. ifeq ($(system), Darwin) pkglibdir = $(HOME)/Library/Pd pdincludepath := $(firstword $(wildcard \ /Applications/Pd*.app/Contents/Resources/src)) extension = pd_darwin cpp.flags := -DUNIX -DMACOSX -I /sw/include c.flags := c.ldflags := -undefined suppress -flat_namespace -bundle c.ldlibs := -lc cxx.ldflags := -undefined suppress -flat_namespace -bundle cxx.ldlibs := -lc shared.extension = dylib shared.ldflags = -dynamiclib -undefined dynamic_lookup \ -install_name @loader_path/$(shared.lib) \ -compatibility_version 1 -current_version 1.0 version.flag := $(filter $(cflags), -mmacosx-version-min=%) ifeq ($(target.arch), i386) cxx.flags := -fcheck-new arch := ppc i386 x86_64 version.flag ?= -mmacosx-version-min=10.4 endif ifeq ($(target.arch), x86_64) arch := i386 x86_64 version.flag ?= -mmacosx-version-min=10.5 endif arch.c.flags := $(addprefix -arch , $(arch)) $(version.flag) arch.ld.flags := $(arch.c.flags) endif #=== flags and paths for Windows =============================================== # Standard paths on Windows contain spaces, and GNU make functions treat such # paths as lists, with unintended effects. Therefore we must use shell function # ls instead of make's wildcard when probing for a path, and use double quotes # when specifying a path in a command argument. # Default paths in Mingw / Mingw-w64 environments. 'PROGRAMFILES' is standard # location for builds with native architecture, 'ProgramFiles(x86)' for i686 # builds on x86_64 Windows (detection method by Lucas Cordiviola). Curly braces # required because of parentheses in variable name. ifeq ($(system), Windows) pkglibdir := $(APPDATA)/Pd ifeq ($(MINGW_CHOST), i686-w64-mingw32) programfiles := ${ProgramFiles(x86)} else programfiles := $(PROGRAMFILES) endif pdbinpath := $(programfiles)/Pd/bin pdincludepath := $(programfiles)/Pd/src endif # Store default path to pd.dll in PDBINDIR if the latter is not user-defined. # For include path this is done in the platform-independent paths section below, # but for PDBINDIR it is done here so ld flags can be evaluated as immediate # variables. ifeq ($(system), Windows) ifdef PDDIR PDBINDIR := $(PDDIR)/bin endif PDBINDIR ?= $(pdbinpath) endif # TODO: decide whether -mms-bitfields should be specified. ifeq ($(system), Windows) cpp.flags := -DMSW -DNT ifeq ($(filter i%86 mingw32, $(target.arch)), $(target.arch)) arch.c.flags := -march=pentium4 -msse -msse2 -mfpmath=sse else ifeq (x86_64, $(target.arch)) cpp.flags := -DMSW -DNT -DPD_LONGINTTYPE=__int64 arch.c.flags := -march=core2 -msse -msse2 -msse3 -mfpmath=sse else arch.c.flags = endif extension = dll c.flags := c.ldflags := -static-libgcc -shared \ -Wl,--enable-auto-import "$(PDBINDIR)/pd.dll" c.ldlibs := cxx.flags := -fcheck-new cxx.ldflags := -static-libgcc -static-libstdc++ -shared \ -Wl,--enable-auto-import "$(PDBINDIR)/pd.dll" cxx.ldlibs := shared.extension = dll shared.ldflags := -static-libgcc -shared "$(PDBINDIR)/pd.dll" stripflags = --strip-all endif #=== paths ===================================================================== # Platform-dependent default paths are specified above, but overridable. # Path variables in upper case can be defined as make command argument or in the # environment. Variable 'objectsdir' is supported for compatibility with # the build system that pd-l2ork has inherited from pd-extended. PDINCLUDEDIR ?= $(pdincludepath) PDLIBDIR ?= $(firstword $(objectsdir) $(pkglibdir)) ifdef PDDIR PDINCLUDEDIR := $(wildcard $(PDDIR)/src) endif # base path where all components of the lib will be installed by default installpath := $(DESTDIR)$(PDLIBDIR)/$(lib.name) # check if include path contains spaces (as is often the case on Windows) # if so, store the path so we can later do checks with it pdincludepathwithspaces := $(if $(word 2, $(PDINCLUDEDIR)), $(PDINCLUDEDIR)) #=== accumulated build flags =================================================== # From GNU make docs: 'Users expect to be able to specify CFLAGS freely # themselves.' So we use CFLAGS to define options which are not strictly # required for compilation: optimizations, architecture specifications, and # warnings. CFLAGS can be safely overriden using a make command argument. # Variables cflags, ldflags and ldlibs may be defined in including makefile. optimization.flags = -O3 -ffast-math -funroll-loops -fomit-frame-pointer warn.flags = -Wall -Wextra -Wshadow -Winline -Wstrict-aliasing # suppress -Wunused-variable & Co if you don't want to clutter a build log ifdef suppress-wunused warn.flags += $(addprefix -Wno-unused-, function parameter value variable) endif CFLAGS = $(warn.flags) $(optimization.flags) $(arch.c.flags) # preprocessor flags cpp.flags := -DPD -I "$(PDINCLUDEDIR)" $(cpp.flags) $(CPPFLAGS) # flags for dependency checking (cflags from makefile may define -I options) depcheck.flags := $(cpp.flags) $(cflags) # architecture specifications for linker are overridable by LDFLAGS LDFLAGS := $(arch.ld.flags) # now add the same ld flags to shared dynamic lib shared.ldflags := $(shared.ldflags) $(LDFLAGS) # accumulated flags for C compiler / linker c.flags := $(cpp.flags) $(c.flags) $(cflags) $(CFLAGS) c.ldflags := $(c.ldflags) $(ldflags) $(LDFLAGS) c.ldlibs := $(c.ldlibs) $(ldlibs) # accumulated flags for C++ compiler / linker cxx.flags := $(cpp.flags) $(cxx.flags) $(cflags) $(CFLAGS) cxx.ldflags := $(cxx.ldflags) $(ldflags) $(LDFLAGS) cxx.ldlibs := $(cxx.ldlibs) $(ldlibs) ################################################################################ ### variables: tools ########################################################### ################################################################################ # aliases so we can later define 'compile-$1' and set 'c' or 'cxx' as argument compile-c := $(CC) compile-cxx := $(CXX) ################################################################################ ### checks ##################################################################### ################################################################################ # At this point most variables are defined. Now do some checks and info's # before rules begin. # 'forward declaration' of default target, needed to do checks all: # To avoid unpredictable results, make sure the default target is not redefined # by including makefile. ifneq ($(.DEFAULT_GOAL), all) $(error Default target must be 'all'.) endif # find out which target(s) will be made ifdef MAKECMDGOALS goals := $(MAKECMDGOALS) else goals := all endif # store path to Pd API m_pd.h if it is found ifdef PDINCLUDEDIR mpdh := $(shell ls "$(PDINCLUDEDIR)/m_pd.h") endif # store path to pd.dll; if not found, ls will give a useful error ifeq ($(system), Windows) pddll := $(shell ls "$(PDBINDIR)/pd.dll") endif # print Makefile.pdlibbuilder version $(info ++++ info: using Makefile.pdlibbuilder version $(version)) # when making target all, check if m_pd.h is found and print info about it ifeq ($(goals), all) $(if $(mpdh), \ $(info ++++ info: using Pd API $(mpdh)), \ $(warning Where is Pd API m_pd.h? Do 'make help' for info.)) endif # print target info $(info ++++ info: making target $(goals) $(if $(lib.name),in lib $(lib.name))) # when installing, print installpath info $(if $(filter install install-lib, $(goals)), $(info ++++ info: \ installpath is '$(installpath)')) #=== define executables ======================================================== # By default we build class executables, and optionally a shared dynamic link # lib. When make-lib-executable=yes we build all classes into a single lib # executable, on the condition that variable lib.setup.sources is defined. ifeq ($(make-lib-executable),yes) $(if $(lib.setup.sources), ,\ $(error Can not build library blob because lib.setup.sources is undefined)) executables := $(lib.name).$(extension) else executables := $(classes.executables) $(shared.lib) endif ################################################################################ ### rules: special targets ##################################################### ################################################################################ # Disable built-in rules. If some target can't be built with the specified # rules, it should not be built at all. MAKEFLAGS += --no-builtin-rules .PRECIOUS: .SUFFIXES: .PHONY: all post build-lib \ $(classes) $(makefiledirs) $(makefiles) \ install install-executables install-datafiles install-datadirs \ force clean vars allvars depend help ################################################################################ ### rules: build targets ####################################################### ################################################################################ # Target all forces the build of targets [$(executables) post] in # deterministic order. Target $(executables) builds class executables plus # optional shared lib or alternatively a single lib executable when # make-lib-executable=true. Target post is optionally defined by # library makefile. all: post post: $(executables) all: $(info ++++info: target all in lib $(lib.name) completed) # build all with -g option turned on for debug symbols alldebug: c.flags += -g alldebug: cxx.flags += -g alldebug: all #=== class executable ========================================================== # recipe for linking objects in class executable # argument $1 = compiler type (c or cxx) # argument $2 = class basename define link-class $(compile-$1) \ $($1.ldflags) $($2.class.ldflags) \ -o $2.$(extension) \ $(addsuffix .o, $(basename $($2.class.sources))) \ $(addsuffix .o, $(basename $(common.sources))) \ $($1.ldlibs) $($2.class.ldlibs) $(shared.lib) endef # general rule for linking object files in class executable %.$(extension): $(shared.lib) $(info ++++ info: linking objects in $@ for lib $(lib.name)) $(if $(filter %.cc %.cpp, $($*.class.sources)), \ $(call link-class,cxx,$*), \ $(call link-class,c,$*)) #=== library blob ============================================================== # build all classes into single executable build-lib: $(lib.name).$(extension) $(info ++++ info: library blob $(lib.name).$(extension) completed) # recipe for linking objects in lib executable # argument $1 = compiler type (c or cxx) define link-lib $(compile-$1) \ $($1.ldflags) $(lib.ldflags) \ -o $(lib.name).$(extension) $(all.objects) \ $($1.ldlibs) $(lib.ldlibs) endef # rule for linking objects in lib executable # declared conditionally to avoid name clashes ifeq ($(make-lib-executable),yes) $(lib.name).$(extension): $(all.objects) $(if $(filter %.cc %.cpp, $(all.sources)), \ $(call link-lib,cxx), \ $(call link-lib,c)) endif #=== shared dynamic lib ======================================================== # recipe for linking objects in shared executable # argument $1 = compiler type (c or cxx) define link-shared $(compile-$1) \ $(shared.ldflags) \ -o lib$(lib.name).$(shared.extension) $(shared.objects) \ $($1.ldlibs) $(shared.ldlibs) endef # rule for linking objects in shared executable # build recipe is in macro 'link-shared' lib$(lib.name).$(shared.extension): $(shared.objects) $(info ++++ info: linking objects in shared lib $@) $(if $(filter %.cc %.cpp, $(shared.sources)), \ $(call link-shared,cxx), \ $(call link-shared,c)) #=== object files ============================================================== # recipe to make .o file from source # argument $1 is compiler type (c or cxx) define make-object-file $(info ++++ info: making $@ in lib $(lib.name)) $(compile-$1) \ $($1.flags) \ -o $@ -c $< endef # Three rules to create .o files. These are double colon 'terminal' rules, # meaning they are the last in a rules chain. %.o:: %.c $(call make-object-file,c) %.o:: %.cc $(call make-object-file,cxx) %.o:: %.cpp $(call make-object-file,cxx) #=== explicit prerequisites for class executables ============================== # For class executables, prerequisite rules are declared in run time. Target # 'depend' prints these rules for debugging purposes. # declare explicit prerequisites rule like 'class: class.extension' # argument $v is class basename define declare-class-target $v: $v.$(extension) endef # declare explicit prerequisites rule like 'class.extension: object1.o object2.o' # argument $v is class basename define declare-class-executable-target $v.$(extension): $(addsuffix .o, $(basename $($v.class.sources))) \ $(addsuffix .o, $(basename $(common.sources))) endef # evaluate explicit prerequisite rules for all classes $(foreach v, $(classes), $(eval $(declare-class-target))) $(foreach v, $(classes), $(eval $(declare-class-executable-target))) #=== implicit prerequisites for class executables ============================== # Evaluating implicit prerequisites (header files) with help from the # preprocessor is 'expensive' so this is done conditionally and selectively. # Note that it is also possible to trigger a build via install targets, in # which case implicit prerequisites are not checked. # When the Pd include path contains spaces it will mess up the implicit # prerequisites rules. disable-dependency-tracking := $(strip $(pdincludepathwithspaces)) ifndef disable-dependency-tracking must-build-everything := $(filter all, $(goals)) must-build-class := $(filter $(classes), $(goals)) must-build-sources := $(foreach v, $(must-build-class), $($v.class.sources)) endif # declare implicit prerequisites rule like 'object.o: header1.h header2.h ...' # argument $1 is input source file(s) # dir is explicitly added because option -MM strips it by default define declare-object-target $(dir $1)$(filter %.o: %.h, $(shell $(CPP) $(depcheck.flags) -MM $1)) $(MAKEFILE_LIST) endef # evaluate implicit prerequisite rules when rebuilding everything ifdef must-build-everything $(if $(wildcard $(all.objects)), \ $(info ++++ info: evaluating implicit prerequisites in lib $(lib.name).....) \ $(foreach v, $(all.sources), $(eval $(call declare-object-target, $v)))) endif # evaluate implicit prerequisite rules when selectively building classes ifdef must-build-class $(foreach v, $(must-build-sources), \ $(eval $(call declare-object-target, $v))) $(foreach v, $(shared.sources), \ $(eval $(call declare-object-target, $v))) endif ################################################################################ ### rules: preprocessor and assembly files ##################################### ################################################################################ # Preprocessor and assembly output files for bug tracing etc. They are not part # of the build processes for executables. By default these files are created in # the current working directory. Dependency tracking is not performed, the build # is forced instead to make sure it's up to date. force: #=== preprocessor file ========================================================= # make preprocessor output file with extension .pre # argument $1 = compiler type (c or cxx) define make-preprocessor-file $(info ++++ info: making preprocessor output file $(notdir $*.pre) \ in current working directory) $(compile-$1) -E $< $(c.flags) $($1.flags) -o $(notdir $*.pre) endef %.pre:: %.c force $(call make-preprocessor-file,c) %.pre:: %.cc force $(call make-preprocessor-file,cxx) %.pre:: %.cpp force $(call make-preprocessor-file,cxx) #=== assembly file ============================================================= # make C / assembly interleaved output file with extension .lst # argument $1 = compiler type (c or cxx) define make-assembly-file $(info ++++ info: making assembly output file $(notdir $*.lst) \ in current working directory) $(compile-$1) \ -c -Wa,-a,-ad -fverbose-asm \ $($1.flags) \ $< > $(notdir $*.lst) endef %.lst:: %.c force $(call make-assembly-file,c) %.lst:: %.cc force $(call make-assembly-file,cxx) %.lst:: %.cpp force $(call make-assembly-file,cxx) ################################################################################ ### rules: installation targets ################################################ ################################################################################ #=== strip ===================================================================== # Stripping of installed binaries will only be done when variable 'stripflags' # is defined non-empty. No default definition is provided except for Windows # where the unstripped binaries are large, especially in the case of Mingw-w64. # Note: while stripping all symbols ('-s' or '--strip-all') is possible for # Linux and Windows, in the case of OSX only non-global symbols can be stripped # (option '-x' or '--discard-all'). # Make definition of strip command overridable so it can be defined in an # environment for cross-compilation. STRIP ?= strip # Commands in 'strip-executables' will be executed conditionally in the rule for # target 'install-executables'. strip-executables = cd "$(installpath)" && \ $(foreach v, $(executables), $(STRIP) $(stripflags) '$v';) #=== install =================================================================== # Install targets depend on successful exit status of target all because nothing # must be installed in case of a build error. # -p = preserve time stamps # -m = set permission mode (as in chmod) # -d = create all components of specified directories INSTALL = install INSTALL_PROGRAM := $(INSTALL) -p -m 644 INSTALL_DATA := $(INSTALL) -p -m 644 INSTALL_DIR := $(INSTALL) -m 755 -d # strip spaces from file names executables := $(strip $(executables)) datafiles := $(strip $(datafiles)) datadirs := $(strip $(datadirs)) # Do not make any install sub-target with empty variable definition because the # install program would exit with an error. install: $(if $(executables), install-executables) install: $(if $(datafiles), install-datafiles) install: $(if $(datadirs), install-datadirs) install-executables: all $(INSTALL_DIR) -v "$(installpath)" $(foreach v, $(executables), \ $(INSTALL_PROGRAM) '$v' "$(installpath)";) $(info ++++ info: executables of lib $(lib.name) installed \ from $(CURDIR) to $(installpath)) $(if $(stripflags), $(strip-executables),) install-datafiles: all $(INSTALL_DIR) -v "$(installpath)" $(foreach v, $(datafiles), \ $(INSTALL_DATA) '$(v)' "$(installpath)";) $(info ++++ info: data files of lib $(lib.name) installed \ from $(CURDIR) to $(installpath)) install-datadirs: all $(foreach v, $(datadirs), $(INSTALL_DIR) "$(installpath)/$v";) $(foreach v, $(datadirs), \ $(INSTALL_DATA) $(wildcard $v/*) "$(installpath)/$v";) $(info ++++ info: data directories of lib $(lib.name) installed \ from $(CURDIR) to $(installpath)) ################################################################################ ### rules: distribution targets ################################################ ################################################################################ # TODO # These targets are implemented in Makefile Template, but I have to figure out # how to do it under the not-so-strict conditions of Makefile.pdlibbuilder. # make source package dist: @echo "target dist not yet implemented" # make Debian source package dpkg-source: @echo "target dpkg-source not yet implemented" $(ORIGDIR): $(DISTDIR): ################################################################################ ### rules: clean targets ####################################################### ################################################################################ # delete build products from build tree clean: rm -f $(all.objects) rm -f $(classes.executables) $(lib.name).$(extension) $(shared.lib) rm -f *.pre *.lst # remove distribution directories and tarballs from build tree distclean: clean @echo "target distclean not yet implemented" ################################################################################ ### rules: submake targets ##################################################### ################################################################################ # Iterate over sub-makefiles or makefiles in other directories. # When 'continue-make=yes' is set, sub-makes will report 'true' to the parent # process regardless of their real exit status. This prevents the parent make # from being aborted by a sub-make error. Useful when you want to quickly find # out which sub-makes from a large set will succeed. ifeq ($(continue-make),yes) continue = || true endif # These targets will trigger sub-make processes for entries in 'makefiledirs' # and 'makefiles'. all alldebug install clean distclean dist dkpg-source: \ $(makefiledirs) $(makefiles) # this expands to identical rules for each entry in 'makefiledirs' $(makefiledirs): $(MAKE) --directory=$@ $(MAKECMDGOALS) $(continue) # this expands to identical rules for each entry in 'makefiles' $(makefiles): $(MAKE) --directory=$(dir $@) --makefile=$(notdir $@) $(MAKECMDGOALS) $(continue) ################################################################################ ### rules: convenience targets ################################################# ################################################################################ #=== show variables ============================================================ # Several 'function' macro's cause errors when expanded within a rule or without # proper arguments. Variables which are set with the define directive are only # shown by name for that reason. functions = \ add-class-source \ declare-class-target \ declare-class-executable-target \ declare-object-target \ link-class \ link-lib \ link-shared \ make-object-file \ make-preprocessor-file \ make-assembly-file # show variables from makefiles vars: $(info ++++ info: showing makefile variables:) $(foreach v,\ $(sort $(filter-out $(functions) functions, $(.VARIABLES))),\ $(if $(filter file, $(origin $v)),\ $(info variable $v = $($v)))) $(foreach v, $(functions), $(info 'function' name: $v)) @echo # show all variables allvars: $(info ++++ info: showing default, automatic and makefile variables:) $(foreach v, \ $(sort $(filter-out $(functions) functions, $(.VARIABLES))), \ $(info variable ($(origin $v)) $v = $($v))) $(foreach v, $(functions), $(info 'function' name: $v)) @echo #=== show dependencies ========================================================= # show generated prerequisites rules depend: $(info ++++ info: generated prerequisite rules) $(foreach v, $(classes), $(info $(declare-class-target))) $(foreach v, $(classes), $(info $(declare-class-executable-target))) $(foreach v, $(all.sources), $(info $(call declare-object-target, $v))) @echo #=== show help text ============================================================ # brief info about targets and paths ifdef mpdh mpdhinfo := $(mpdh) else mpdhinfo := m_pd.h was not found. Is Pd installed? endif help: @echo @echo " Main targets:" @echo " all: build executables (default target)" @echo " install: install all components of the library" @echo " vars: print makefile variables for troubleshooting" @echo " allvars: print all variables for troubleshooting" @echo " help: print this help text" @echo @echo " Pd API m_pd.h:" @echo " $(mpdhinfo)" @echo " You may specify your preferred Pd include directory as argument" @echo " to the make command, like 'PDINCLUDEDIR=path/to/pd/src'." @echo @echo " Path for installation of your libdir(s):" @echo " $(PDLIBDIR)" @echo " Alternatively you may specify your path for installation as argument" @echo " to the make command, like 'PDLIBDIR=path/to/pd-externals'." @echo @echo " Default paths are listed in the doc sections in Makefile.pdlibbuilder." @echo #=== dummy target ============================================================== coffee: @echo "Makefile.pdlibbuilder: Can not make coffee. Sorry." ################################################################################ ### end of rules sections ###################################################### ################################################################################ # for syntax highlighting in vim and github # vim: set filetype=make: iem_utils-v0.0.20181004/iem_spec2/spec2_sqrt~-help.pd0000644000175000017500000000162513355471363022303 0ustar zmoelnigzmoelnig#N canvas 52 28 437 304 10; #X text 218 120 no arg; #X text 89 234 IEM KUG; #X text 73 222 musil; #X text 103 222 @; #X text 109 222 iem.at; #X text 72 244 Graz \, Austria; #X text 24 211 (c) Thomas Musil 2000 - 2006; #X text 327 115 like; #X text 109 25 with (blocksize/2 + 1) bins; #X text 17 13 spec2_sqrt~; #X obj 144 120 spec2_sqrt~; #X obj 359 116 sqrt~; #X obj 143 98 sig~ 16; #X obj 143 148 print~; #X obj 111 119 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X obj 29 97 dsp; #X obj 29 71 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 1 ; #X floatatom 143 79 5 0 0 0 - - -; #X floatatom 29 142 5 0 0 0 - - -; #X floatatom 42 122 5 0 0 0 - - -; #X text 106 14 take square root value of a signal spectrum; #X connect 10 0 13 0; #X connect 12 0 10 0; #X connect 14 0 13 0; #X connect 15 0 18 0; #X connect 15 1 19 0; #X connect 16 0 15 0; #X connect 17 0 12 0; iem_utils-v0.0.20181004/iem_spec2/spec2_add_scalar~-help.pd0000644000175000017500000000064213355471363023365 0ustar zmoelnigzmoelnig#N canvas 52 28 575 275 10; #X text 83 169 IEM KUG; #X text 67 157 musil; #X text 97 157 @; #X text 103 157 iem.at; #X text 66 179 Graz \, Austria; #X text 18 146 (c) Thomas Musil 2000 - 2006; #X text 361 51 like; #X obj 412 52 +~ 0; #X text 134 53 1.arg: value to add; #X text 106 14 add a value to a signal spectrum with (blocksize/2 + 1) bins; #X obj 30 52 spec2+s~ 0; #X text 30 14 spec2+s~; iem_utils-v0.0.20181004/iem_tab/0000755000175000017500000000000013355472356016276 5ustar zmoelnigzmoelnigiem_utils-v0.0.20181004/iem_tab/tab_counter-help.pd0000644000175000017500000000523612630366350022053 0ustar zmoelnigzmoelnig#N canvas 115 92 872 576 10; #N canvas 0 22 450 300 (subpatch) 0; #X array src 100 float 1; #A 0 0 0 0 0 0 0 0 0 0 0.9 0 0 0 0 0 0 0 0 0 0.9 0 0 0 0 0 0 0 0 0 0.9 0 0 0 0 0 0 0 0 0 0.9 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0; #X coords 0 1 99 0 200 140 1; #X restore 544 234 graph; #N canvas 0 22 450 300 (subpatch) 0; #X array dst 100 float 0; #X coords 0 10 99 0 200 140 1; #X restore 544 413 graph; #X obj 53 146 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X obj 55 398 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X text 219 367 1.arg: source-name; #X msg 146 317 dst dst; #X msg 101 296 src src; #X text 219 380 2.arg: destination-name; #X obj 55 359 tab_gt_scalar src dst; #X obj 53 121 tab_counter src dst; #X msg 82 93 reset; #X obj 53 33 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X msg 55 273 0 0 100; #N canvas 0 22 462 312 (subpatch) 0; #X msg 175 59 \; src const 0; #X msg 88 57 \; src \$1 0.9; #X floatatom 89 30 5 0 0 0 - - -; #X msg 88 127 \; dst ylabel -5.15 0 1 2 3 4 5 6 7 8 9 10; #X msg 87 93 \; dst yticks 0 1 1; #X obj 22 64 loadbang; #X connect 2 0 1 0; #X connect 5 0 4 0; #X connect 5 0 3 0; #X restore 496 285 pd; #X text 37 222 list of 3 floats:; #X text 78 455 IEM KUG; #X text 57 443 musil; #X text 92 443 @; #X text 100 443 iem.at; #X text 61 465 Graz \, Austria; #X text 49 233 1.) src onset; #X text 49 243 2.) dst onset; #X text 252 354 initial arguments:; #X text 64 379 output; #X text 158 296 xxx : change source name; #X text 199 318 xxx : change destination name; #X text 135 162 the minimum of both array lengths); #X text 12 3 tab_counter; #X msg 549 36 \; src 9 0.9 \; src 19 0.9 \; src 29 0.9 \; src 39 0.9 ; #X text 77 27 each element of the source array controls an increment counter in the destination array \, a nonzero value lets increment the counter value by one \, a zero value resets the counter value to zero.; #X text 124 93 resets all counter values to zero; #X text 122 148 (the number of samples which control counters are: ; #X text 49 253 3.) n samples to control n counters; #X text 13 432 (c) Thomas Musil 2000 - 2009; #X msg 684 37 \; src 9 -0.1 \; src 19 0 \; src 29 0 \; src 39 0.9; #X msg 686 133 \; src 9 0 \; src 19 0 \; src 29 0 \; src 39 0; #X msg 545 132 \; src 9 0 \; src 19 0.9 \; src 29 -0.1 \; src 39 0 ; #X text 536 15 4 indices incr.; #X text 677 14 2 indices incr.; #X text 537 112 2 indices incr.; #X text 695 114 reset; #X connect 5 0 8 0; #X connect 6 0 8 0; #X connect 8 0 3 0; #X connect 9 0 2 0; #X connect 10 0 9 0; #X connect 11 0 9 0; #X connect 12 0 8 0; iem_utils-v0.0.20181004/iem_tab/tab_rmstodb-help.pd0000644000175000017500000000457712630366350022055 0ustar zmoelnigzmoelnig#N canvas 369 22 790 417 10; #N canvas 0 22 450 300 (subpatch) 0; #X array src 100 float 1; #A 0 0.0214324 0.0214324 0.0214324 0.0214324 0.0214324 0.0214324 0.0357179 0.0357179 0.0428607 0.0428607 0.0428607 0.0500035 0.0642891 0.0714318 0.0785746 0.0857174 0.0857174 0.100003 0.100003 0.107146 0.107146 0.114289 0.114289 0.121431 0.121431 0.128574 0.128574 0.135717 0.14286 0.14286 0.14286 0.150002 0.157145 0.157145 0.171431 0.178574 0.185716 0.192859 0.200002 0.214287 0.214287 0.22143 0.228573 0.242859 0.242859 0.257144 0.257144 0.264287 0.278573 0.292858 0.300001 0.314286 0.335715 0.35 0.357143 0.364286 0.378571 0.392857 0.407143 0.414285 0.435714 0.442857 0.449999 0.457142 0.471428 0.485713 0.492856 0.499999 0.521427 0.52857 0.542856 0.542856 0.564284 0.578569 0.599998 0.621426 0.635712 0.642854 0.649997 0.671426 0.685711 0.699997 0.707139 0.714282 0.735711 0.757139 0.764282 0.771425 0.778567 0.799996 0.807138 0.821424 0.83571 0.864281 0.885709 0.885709 0.899995 0.935709 0.949994 0.957137; #X coords 0 1 99 0 200 140 1; #X restore 534 10 graph; #N canvas 0 22 450 300 (subpatch) 0; #X array dst 100 float 0; #X coords 0 100 99 0 200 140 1; #X restore 534 166 graph; #X obj 61 31 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X obj 61 106 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X obj 59 301 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X msg 59 211 50 20 50; #X text 44 154 list of 3 floats:; #X text 222 273 1.arg: source-name; #X text 222 286 2.arg: destination-name; #X msg 154 213 src src; #X msg 185 234 dst dst; #X text 78 365 IEM KUG; #X text 57 353 musil; #X text 92 353 @; #X text 100 353 iem.at; #X text 61 375 Graz \, Austria; #X text 56 165 1.) src onset; #X text 56 175 2.) dst onset; #X text 231 261 initial arguments:; #X text 68 283 output; #X text 208 213 xxx : change source name; #X text 240 233 xxx : change destination name; #X text 205 69 (the number of samples which are copied are:; #X text 218 83 the minimum of both array lengths); #X text 12 4 tab_rmstodb; #X obj 61 78 tab_rmstodb src dst; #X text 57 185 3.) n samples of rmstodb; #X obj 59 264 tab_rmstodb src dst; #X text 13 342 (c) Thomas Musil 2000 - 2010; #X text 90 29 calculates the rmstodb-value from src to dst; #X connect 2 0 25 0; #X connect 5 0 27 0; #X connect 9 0 27 0; #X connect 10 0 27 0; #X connect 25 0 3 0; #X connect 27 0 4 0; iem_utils-v0.0.20181004/iem_tab/tab_max_index-help.pd0000644000175000017500000000460312630366350022345 0ustar zmoelnigzmoelnig#N canvas 118 94 788 440 10; #N canvas 0 0 450 300 graph1 0; #X array src 100 float 1; #A 0 -0.442858 -0.414287 -0.385715 -0.342858 -0.314287 -0.257144 -0.128572 -0.0428573 0.128572 0.228572 0.285715 0.328572 0.400001 0.414287 0.457144 0.457144 0.442858 0.385715 0.314287 0.257144 0.214286 0.1 0.0428572 -0.0142858 -0.0428573 -0.114286 -0.142858 -0.200001 -0.242858 -0.285715 -0.328572 -0.342858 -0.37143 -0.385715 -0.414287 -0.414287 -0.414287 -0.414287 -0.400001 -0.357144 -0.314287 -0.257144 -0.185715 -0.0714288 0.0142857 0.0571429 0.185715 0.185715 0.200001 0.214286 0.214286 0.214286 0.228572 0.228572 0.214286 0.200001 0.185715 0.171429 0.142857 0.1 0.114286 0.0714285 -0.071429 -0.242858 -0.300001 -0.328573 -0.357144 -0.37143 -0.385715 -0.400001 -0.442858 -0.457144 -0.47143 -0.457144 -0.428573 -0.400001 -0.378573 -0.328572 -0.271429 -0.242858 -0.200001 -0.128572 -0.0428574 -0.0285717 0.0142858 0.114286 0.128572 0.185715 0.214286 0.257144 0.285715 0.314287 0.342858 0.357144 0.357144 0.357144 0.357144 0.357144 0.342858 0.328572; #X coords 0 1 99 -1 200 140 1; #X restore 529 24 graph; #X obj 61 31 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X obj 61 106 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X obj 59 294 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X text 205 270 1.arg: source-name; #X msg 101 213 src src; #X floatatom 109 103 5 0 0 0 - - -; #X floatatom 158 104 5 0 0 0 - - -; #X text 166 118 max; #X floatatom 107 320 5 0 0 0 - - -; #X floatatom 156 336 5 0 0 0 - - -; #X msg 59 193 35 50; #X obj 61 78 tab_max_index src; #X text 97 117 max_index; #X obj 59 262 tab_max_index src; #X text 75 384 IEM KUG; #X text 59 372 musil; #X text 89 372 @; #X text 95 372 iem.at; #X text 58 394 Graz \, Austria; #X text 10 361 (c) Thomas Musil 2000 - 2006; #X text 229 258 initial arguments:; #X text 65 280 output; #X text 152 213 xxx : change source name; #X text 11 6 tab_max_index; #X text 43 150 list of 2 floats:; #X text 55 160 1.) src onset; #X text 55 171 2.) n samples to calculate maximum; #X text 163 319 maximum value output; #X text 115 301 maximum index output; #X text 85 29 calculate maximum element and its index of array ; #X connect 1 0 12 0; #X connect 5 0 14 0; #X connect 11 0 14 0; #X connect 12 0 2 0; #X connect 12 1 6 0; #X connect 12 2 7 0; #X connect 14 0 3 0; #X connect 14 1 9 0; #X connect 14 2 10 0; iem_utils-v0.0.20181004/iem_tab/tab_mul_scalar-help.pd0000644000175000017500000000473212630366350022516 0ustar zmoelnigzmoelnig#N canvas 115 92 856 560 10; #N canvas 0 0 450 300 graph1 0; #X array src 100 float 1; #A 0 -0.442858 -0.414287 -0.385715 -0.342858 -0.314287 -0.257144 -0.128572 -0.0428573 0.128572 0.228572 0.285715 0.328572 0.400001 0.414287 0.457144 0.457144 0.442858 0.385715 0.314287 0.257144 0.214286 0.1 0.0428572 -0.0142858 -0.0428573 -0.114286 -0.142858 -0.200001 -0.242858 -0.285715 -0.328572 -0.342858 -0.37143 -0.385715 -0.414287 -0.414287 -0.414287 -0.414287 -0.400001 -0.357144 -0.314287 -0.257144 -0.185715 -0.0714288 0.0142857 0.0571429 0.171429 0.328572 0.400001 0.442858 0.47143 0.485715 0.485715 0.485715 0.485715 0.485715 0.442858 0.357144 0.242858 0.185715 0.114286 0.0714285 -0.071429 -0.242858 -0.300001 -0.328573 -0.357144 -0.37143 -0.385715 -0.400001 -0.442858 -0.457144 -0.47143 -0.457144 -0.428573 -0.400001 -0.378573 -0.328572 -0.271429 -0.242858 -0.200001 -0.128572 -0.0428574 -0.0285717 0.0142858 0.114286 0.128572 0.185715 0.214286 0.257144 0.285715 0.314287 0.342858 0.357144 0.357144 0.357144 0.357144 0.357144 0.342858 0.328572; #X coords 0 1 99 -1 200 140 1; #X restore 527 46 graph; #N canvas 0 0 450 300 graph1 0; #X array dst 100 float 0; #X coords 0 1 99 -1 200 140 1; #X restore 527 325 graph; #X obj 61 106 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X obj 59 340 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X text 211 336 1.arg: source-name; #X msg 197 270 dst dst; #X msg 47 36 0.5; #X msg 145 247 src src; #X msg 82 37 -0.5; #X msg 48 227 50 20 50 -0.8; #X text 211 349 2.arg: destination-name; #X text 31 163 list of 4 floats:; #X text 78 475 IEM KUG; #X text 62 463 musil; #X text 92 463 @; #X text 98 463 iem.at; #X text 61 485 Graz \, Austria; #X text 13 452 (c) Thomas Musil 2000 - 2006; #X text 234 322 initial arguments:; #X text 71 322 output; #X text 250 271 xxx : change destination name; #X text 218 86 the minimum of both array lengths); #X text 197 246 xxx : change source name; #X text 42 179 1.) src onset; #X text 42 190 2.) dst onset; #X text 205 72 (the number of samples which were added are:; #X text 12 3 tab_mul_scalar; #X text 129 29 multiply the src-array with this scalar to dst-array ; #X obj 61 78 tab_mul_scalar src dst; #X obj 59 301 tab_mul_scalar src dst; #X text 42 200 3.) n samples to multiply; #X text 42 210 4.) multiplied scalar value; #X connect 5 0 29 0; #X connect 6 0 28 0; #X connect 7 0 29 0; #X connect 8 0 28 0; #X connect 9 0 29 0; #X connect 28 0 2 0; #X connect 29 0 3 0; iem_utils-v0.0.20181004/iem_tab/LICENSE.txt0000644000175000017500000000246713355471365020131 0ustar zmoelnigzmoelnigThis library extends the performance of Miller S. Puckette's realtime-computermusic-environment puredata (pd). iem_tab contains 1 external library "iem_tab.dll" with 44 objects and their help files. iem_tab is published under the Gnu Lesser General Public License that is included (GnuLGPL.txt). Copyright (C) 2000-2018 Thomas MUSIL [musil_at_iem.at] IEM - Institute of Electronic Music and Acoustics, Graz Inffeldgasse 10/3, 8010 Graz, Austria http://iem.at This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library 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 Lesser General Public License for more details ( GnuLGPL.txt ). (e.g. http://www.gnu.org/copyleft/lesser.html) You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Graz, March 1st 2018 Thomas Musil iem_utils-v0.0.20181004/iem_tab/src/0000755000175000017500000000000013355472356017065 5ustar zmoelnigzmoelnigiem_utils-v0.0.20181004/iem_tab/src/tab_sqrt.c0000644000175000017500000001206313303612035021031 0ustar zmoelnigzmoelnig/* For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. iem_tab written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2009 */ #include "m_pd.h" #include "iemlib.h" #include "iem_tab.h" #include /* -------------------------- tab_sqrt ------------------------------ */ /* x_beg_mem_dst[i] = sqrt(x_beg_mem_src1[i]) */ typedef struct _tab_sqrt { t_object x_obj; int x_size_src1; int x_size_dst; int x_offset_src1; int x_offset_dst; iemarray_t *x_beg_mem_src1; iemarray_t *x_beg_mem_dst; t_symbol *x_sym_scr1; t_symbol *x_sym_dst; } t_tab_sqrt; static t_class *tab_sqrt_class; static void tab_sqrt_src(t_tab_sqrt *x, t_symbol *s) { x->x_sym_scr1 = s; } static void tab_sqrt_dst(t_tab_sqrt *x, t_symbol *s) { x->x_sym_dst = s; } static void tab_sqrt_bang(t_tab_sqrt *x) { int i, n; int ok_src, ok_dst; iemarray_t *vec_src, *vec_dst; ok_src = iem_tab_check_arrays(gensym("tab_sqrt"), x->x_sym_scr1, &x->x_beg_mem_src1, &x->x_size_src1, 0); ok_dst = iem_tab_check_arrays(gensym("tab_sqrt"), x->x_sym_dst, &x->x_beg_mem_dst, &x->x_size_dst, 0); if(ok_src && ok_dst) { if(x->x_size_src1 < x->x_size_dst) n = x->x_size_src1; else n = x->x_size_dst; vec_src = x->x_beg_mem_src1; vec_dst = x->x_beg_mem_dst; if(n) { t_garray *a; for(i=0; i 0 || PD_MINOR_VERSION > 43)) t_float g = q8_rsqrt(f); iemarray_setfloat(vec_dst, i, f*g*(1.5f - 0.5f * g * g * f)); #else iemarray_setfloat(vec_dst, i, sqrt(f)); #endif } } outlet_bang(x->x_obj.ob_outlet); a = (t_garray *)pd_findbyclass(x->x_sym_dst, garray_class); garray_redraw(a); } } } static void tab_sqrt_list(t_tab_sqrt *x, t_symbol *s, int argc, t_atom *argv) { int beg_src, beg_dst; int i, n; int ok_src, ok_dst; iemarray_t *vec_src, *vec_dst; if((argc >= 3) && IS_A_FLOAT(argv,0) && IS_A_FLOAT(argv,1) && IS_A_FLOAT(argv,2)) { beg_src = (int)atom_getintarg(0, argc, argv); beg_dst = (int)atom_getintarg(1, argc, argv); n = (int)atom_getintarg(2, argc, argv); if(beg_src < 0) beg_src = 0; if(beg_dst < 0) beg_dst = 0; if(n < 0) n = 0; ok_src = iem_tab_check_arrays(gensym("tab_sqrt"), x->x_sym_scr1, &x->x_beg_mem_src1, &x->x_size_src1, beg_src+n); ok_dst = iem_tab_check_arrays(gensym("tab_sqrt"), x->x_sym_dst, &x->x_beg_mem_dst, &x->x_size_dst, beg_dst+n); if(ok_src && ok_dst) { vec_src = x->x_beg_mem_src1 + beg_src; vec_dst = x->x_beg_mem_dst + beg_dst; if(n) { t_garray *a; for(i=0; i 0 || PD_MINOR_VERSION > 43)) t_float g = q8_rsqrt(f); iemarray_setfloat(vec_dst, i, f*g*(1.5f - 0.5f * g * g * f)); #else iemarray_setfloat(vec_dst, i, sqrt(f)); #endif } } outlet_bang(x->x_obj.ob_outlet); a = (t_garray *)pd_findbyclass(x->x_sym_dst, garray_class); garray_redraw(a); } } } else { post("tab_sqrt-ERROR: list need 3 float arguments:"); post(" source_offset + destination_offset + number_of_samples_to_sqrt"); } } static void tab_sqrt_free(t_tab_sqrt *x) { } static void *tab_sqrt_new(t_symbol *s, int argc, t_atom *argv) { t_tab_sqrt *x = (t_tab_sqrt *)pd_new(tab_sqrt_class); t_symbol *src, *dst; if((argc >= 2) && IS_A_SYMBOL(argv,0) && IS_A_SYMBOL(argv,1)) { src = (t_symbol *)atom_getsymbolarg(0, argc, argv); dst = (t_symbol *)atom_getsymbolarg(1, argc, argv); } else if((argc >= 1) && IS_A_SYMBOL(argv,0)) { src = (t_symbol *)atom_getsymbolarg(0, argc, argv); dst = src; } else { post("tab_sqrt-ERROR: need 2 symbols arguments:"); post(" source_array_name + destination_array_name"); return(0); } x->x_sym_scr1 = src; x->x_sym_dst = dst; outlet_new(&x->x_obj, &s_bang); return(x); } void tab_sqrt_setup(void) { tab_sqrt_class = class_new(gensym("tab_sqrt"), (t_newmethod)tab_sqrt_new, (t_method)tab_sqrt_free, sizeof(t_tab_sqrt), 0, A_GIMME, 0); class_addbang(tab_sqrt_class, (t_method)tab_sqrt_bang); class_addlist(tab_sqrt_class, (t_method)tab_sqrt_list); class_addmethod(tab_sqrt_class, (t_method)tab_sqrt_src, gensym("src"), A_DEFSYMBOL, 0); class_addmethod(tab_sqrt_class, (t_method)tab_sqrt_src, gensym("src1"), A_DEFSYMBOL, 0); class_addmethod(tab_sqrt_class, (t_method)tab_sqrt_dst, gensym("dst"), A_DEFSYMBOL, 0); } iem_utils-v0.0.20181004/iem_tab/src/tab_div.c0000644000175000017500000001306313303612035020623 0ustar zmoelnigzmoelnig/* For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. iem_tab written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2009 */ #include "m_pd.h" #include "iemlib.h" #include "iem_tab.h" /* -------------------------- tab_div ------------------------------ */ /* x_beg_mem_dst[i] = x_beg_mem_src1[i]/x_offset_src2[i] */ typedef struct _tab_div { t_object x_obj; int x_size_src1; int x_size_src2; int x_size_dst; int x_offset_src1; int x_offset_src2; int x_offset_dst; iemarray_t *x_beg_mem_src1; iemarray_t *x_beg_mem_src2; iemarray_t *x_beg_mem_dst; t_symbol *x_sym_scr1; t_symbol *x_sym_scr2; t_symbol *x_sym_dst; } t_tab_div; static t_class *tab_div_class; static void tab_div_src1(t_tab_div *x, t_symbol *s) { x->x_sym_scr1 = s; } static void tab_div_src2(t_tab_div *x, t_symbol *s) { x->x_sym_scr2 = s; } static void tab_div_dst(t_tab_div *x, t_symbol *s) { x->x_sym_dst = s; } static void tab_div_bang(t_tab_div *x) { int i, n; int ok_src1, ok_src2, ok_dst; iemarray_t *vec_src1, *vec_src2, *vec_dst; ok_src1 = iem_tab_check_arrays(gensym("tab_div"), x->x_sym_scr1, &x->x_beg_mem_src1, &x->x_size_src1, 0); ok_src2 = iem_tab_check_arrays(gensym("tab_div"), x->x_sym_scr2, &x->x_beg_mem_src2, &x->x_size_src2, 0); ok_dst = iem_tab_check_arrays(gensym("tab_div"), x->x_sym_dst, &x->x_beg_mem_dst, &x->x_size_dst, 0); if(ok_src1 && ok_src2 && ok_dst) { if(x->x_size_src1 < x->x_size_dst) n = x->x_size_src1; else n = x->x_size_dst; if(x->x_size_src2 < n) n = x->x_size_src2; vec_src1 = x->x_beg_mem_src1; vec_src2 = x->x_beg_mem_src2; vec_dst = x->x_beg_mem_dst; if(n) { t_garray *a; for(i=0; ix_obj.ob_outlet); a = (t_garray *)pd_findbyclass(x->x_sym_dst, garray_class); garray_redraw(a); } } } static void tab_div_list(t_tab_div *x, t_symbol *s, int argc, t_atom *argv) { int beg_src1, beg_src2, beg_dst; int i, n; int ok_src1, ok_src2, ok_dst; iemarray_t *vec_src1, *vec_src2, *vec_dst; if((argc >= 4) && IS_A_FLOAT(argv,0) && IS_A_FLOAT(argv,1) && IS_A_FLOAT(argv,2) && IS_A_FLOAT(argv,3)) { beg_src1 = (int)atom_getintarg(0, argc, argv); beg_src2 = (int)atom_getintarg(1, argc, argv); beg_dst = (int)atom_getintarg(2, argc, argv); n = (int)atom_getintarg(3, argc, argv); if(beg_src1 < 0) beg_src1 = 0; if(beg_src2 < 0) beg_src2 = 0; if(beg_dst < 0) beg_dst = 0; if(n < 0) n = 0; ok_src1 = iem_tab_check_arrays(gensym("tab_div"), x->x_sym_scr1, &x->x_beg_mem_src1, &x->x_size_src1, beg_src1+n); ok_src2 = iem_tab_check_arrays(gensym("tab_div"), x->x_sym_scr2, &x->x_beg_mem_src2, &x->x_size_src2, beg_src2+n); ok_dst = iem_tab_check_arrays(gensym("tab_div"), x->x_sym_dst, &x->x_beg_mem_dst, &x->x_size_dst, beg_dst+n); if(ok_src1 && ok_src2 && ok_dst) { vec_src1 = x->x_beg_mem_src1 + beg_src1; vec_src2 = x->x_beg_mem_src2 + beg_src2; vec_dst = x->x_beg_mem_dst + beg_dst; if(n) { t_garray *a; for(i=0; ix_obj.ob_outlet); a = (t_garray *)pd_findbyclass(x->x_sym_dst, garray_class); garray_redraw(a); } } } else { post("tab_div-ERROR: list need 4 float arguments:"); post(" source1_offset + source2_offset + destination_offset + number_of_samples_to_div"); } } static void tab_div_free(t_tab_div *x) { } static void *tab_div_new(t_symbol *s, int argc, t_atom *argv) { t_tab_div *x = (t_tab_div *)pd_new(tab_div_class); t_symbol *src1, *src2, *dst; if((argc >= 3) && IS_A_SYMBOL(argv,0) && IS_A_SYMBOL(argv,1) && IS_A_SYMBOL(argv,2)) { src1 = (t_symbol *)atom_getsymbolarg(0, argc, argv); src2 = (t_symbol *)atom_getsymbolarg(1, argc, argv); dst = (t_symbol *)atom_getsymbolarg(2, argc, argv); } else if((argc >= 2) && IS_A_SYMBOL(argv,0) && IS_A_SYMBOL(argv,1)) { src1 = (t_symbol *)atom_getsymbolarg(0, argc, argv); dst = src1; src2 = (t_symbol *)atom_getsymbolarg(1, argc, argv); } else { post("tab_div-ERROR: need 3 symbols arguments:"); post(" source1_array_name + source2_array_name + destination_array_name"); return(0); } x->x_sym_scr1 = src1; x->x_sym_scr2 = src2; x->x_sym_dst = dst; outlet_new(&x->x_obj, &s_bang); return(x); } void tab_div_setup(void) { tab_div_class = class_new(gensym("tab_div"), (t_newmethod)tab_div_new, (t_method)tab_div_free, sizeof(t_tab_div), 0, A_GIMME, 0); class_addbang(tab_div_class, (t_method)tab_div_bang); class_addlist(tab_div_class, (t_method)tab_div_list); class_addmethod(tab_div_class, (t_method)tab_div_src1, gensym("src1"), A_DEFSYMBOL, 0); class_addmethod(tab_div_class, (t_method)tab_div_src2, gensym("src2"), A_DEFSYMBOL, 0); class_addmethod(tab_div_class, (t_method)tab_div_dst, gensym("dst"), A_DEFSYMBOL, 0); // class_sethelpsymbol(tab_div_class, gensym("iemhelp2/tab_div-help")); } iem_utils-v0.0.20181004/iem_tab/src/tab_counter.c0000644000175000017500000001306613303612035021523 0ustar zmoelnigzmoelnig/* For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. iem_tab written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2009 */ #include "m_pd.h" #include "iemlib.h" #include "iem_tab.h" /* -------------------------- tab_counter ------------------------------ */ /* for(i=0; ix_sym_scr1 = s; } static void tab_counter_bang(t_tab_counter *x) { int i, n; int ok_src1, ok_dst; iemarray_t *vec_src1, *vec_dst; ok_src1 = iem_tab_check_arrays(gensym("tab_counter"), x->x_sym_scr1, &x->x_beg_mem_src1, &x->x_size_src1, 0); ok_dst = iem_tab_check_arrays(gensym("tab_counter"), x->x_sym_dst, &x->x_beg_mem_dst, &x->x_size_dst, 0); if(ok_src1 && ok_dst) { if(x->x_size_src1 < x->x_size_dst) n = x->x_size_src1; else n = x->x_size_dst; vec_src1 = x->x_beg_mem_src1; vec_dst = x->x_beg_mem_dst; if(n) { t_garray *a; for(i=0; ix_obj.ob_outlet); a = (t_garray *)pd_findbyclass(x->x_sym_dst, garray_class); garray_redraw(a); } } } static void tab_counter_dst(t_tab_counter *x, t_symbol *s) { x->x_sym_dst = s; } static void tab_counter_list(t_tab_counter *x, t_symbol *s, int argc, t_atom *argv) { int beg_src1, beg_dst; int i, n; int ok_src1, ok_dst; iemarray_t *vec_src1, *vec_dst; if((argc >= 3) && IS_A_FLOAT(argv,0) && IS_A_FLOAT(argv,1) && IS_A_FLOAT(argv,2)) { beg_src1 = (int)atom_getintarg(0, argc, argv); beg_dst = (int)atom_getintarg(1, argc, argv); n = (int)atom_getintarg(2, argc, argv); if(beg_src1 < 0) beg_src1 = 0; if(beg_dst < 0) beg_dst = 0; if(n < 0) n = 0; ok_src1 = iem_tab_check_arrays(gensym("tab_counter"), x->x_sym_scr1, &x->x_beg_mem_src1, &x->x_size_src1, beg_src1+n); ok_dst = iem_tab_check_arrays(gensym("tab_counter"), x->x_sym_dst, &x->x_beg_mem_dst, &x->x_size_dst, beg_dst+n); if(ok_src1 && ok_dst) { vec_src1 = x->x_beg_mem_src1 + beg_src1; vec_dst = x->x_beg_mem_dst + beg_dst; if(n) { t_garray *a; for(i=0; ix_obj.ob_outlet); a = (t_garray *)pd_findbyclass(x->x_sym_dst, garray_class); garray_redraw(a); } } } else { post("tab_counter-ERROR: list need 4 float arguments:"); post(" source1_offset + destination_offset + number_of_samples_to_add + add_scalar"); } } static void tab_counter_reset(t_tab_counter *x) { int beg_dst; int i, n; int ok_dst; iemarray_t *vec_dst; ok_dst = iem_tab_check_arrays(gensym("tab_counter"), x->x_sym_dst, &x->x_beg_mem_dst, &x->x_size_dst, 0); if(ok_dst) { n = x->x_size_dst; vec_dst = x->x_beg_mem_dst; if(n) { t_garray *a; for(i=0; ix_obj.ob_outlet); a = (t_garray *)pd_findbyclass(x->x_sym_dst, garray_class); garray_redraw(a); } } } static void tab_counter_free(t_tab_counter *x) { } static void *tab_counter_new(t_symbol *s, int argc, t_atom *argv) { t_tab_counter *x = (t_tab_counter *)pd_new(tab_counter_class); t_symbol *src1, *dst; if((argc >= 2) && IS_A_SYMBOL(argv,0) && IS_A_SYMBOL(argv,1)) { src1 = (t_symbol *)atom_getsymbolarg(0, argc, argv); dst = (t_symbol *)atom_getsymbolarg(1, argc, argv); } else if((argc >= 1) && IS_A_SYMBOL(argv,0)) { src1 = (t_symbol *)atom_getsymbolarg(0, argc, argv); dst = src1; } else { post("tab_counter-ERROR: need 2 symbol arguments:"); post(" source_array_name + destination_array_name"); return(0); } x->x_sym_scr1 = src1; x->x_sym_dst = dst; outlet_new(&x->x_obj, &s_bang); return(x); } void tab_counter_setup(void) { tab_counter_class = class_new(gensym("tab_counter"), (t_newmethod)tab_counter_new, (t_method)tab_counter_free, sizeof(t_tab_counter), 0, A_GIMME, 0); class_addbang(tab_counter_class, (t_method)tab_counter_bang); class_addlist(tab_counter_class, (t_method)tab_counter_list); class_addmethod(tab_counter_class, (t_method)tab_counter_src, gensym("src1"), A_DEFSYMBOL, 0); class_addmethod(tab_counter_class, (t_method)tab_counter_src, gensym("src"), A_DEFSYMBOL, 0); class_addmethod(tab_counter_class, (t_method)tab_counter_dst, gensym("dst"), A_DEFSYMBOL, 0); class_addmethod(tab_counter_class, (t_method)tab_counter_reset, gensym("reset"), 0); // class_sethelpsymbol(tab_counter_class, gensym("iemhelp2/tab_counter-help")); } iem_utils-v0.0.20181004/iem_tab/src/tab_cross_corr.c0000644000175000017500000001371213303612035022220 0ustar zmoelnigzmoelnig/* For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. iem_tab written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2009 */ #include "m_pd.h" #include "iemlib.h" #include "iem_tab.h" /* -------------------------- tab_cross_corr ------------------------------ */ typedef struct _tab_cross_corr { t_object x_obj; int x_size_src1; int x_size_src2; int x_size_dst; int x_n; iemarray_t *x_beg_mem_src1; iemarray_t *x_beg_mem_src2; iemarray_t *x_beg_mem_dst; t_float x_factor; t_symbol *x_sym_scr1; t_symbol *x_sym_scr2; t_symbol *x_sym_dst; t_float x_delay; int x_counter; void *x_clock; } t_tab_cross_corr; static t_class *tab_cross_corr_class; static void tab_cross_corr_tick(t_tab_cross_corr *x) { x->x_counter++; if(x->x_counter < x->x_n) { iemarray_t *vec_src1, *vec_src2, *vec_dst; t_float sum; int j, m; vec_src1 = x->x_beg_mem_src1 + x->x_counter; vec_src2 = x->x_beg_mem_src2; vec_dst = x->x_beg_mem_dst + x->x_counter; m = x->x_size_src2; sum = 0.0f; for(j=0; jx_factor); clock_delay(x->x_clock, x->x_delay); } else { t_garray *a; clock_unset(x->x_clock); outlet_bang(x->x_obj.ob_outlet); a = (t_garray *)pd_findbyclass(x->x_sym_dst, garray_class); garray_redraw(a); } } static void tab_cross_corr_time(t_tab_cross_corr *x, t_floatarg dtime) { if(dtime < 0.0f) dtime = 0.0f; x->x_delay = dtime; } static void tab_cross_corr_factor(t_tab_cross_corr *x, t_floatarg factor) { x->x_factor = factor; } static void tab_cross_corr_src1(t_tab_cross_corr *x, t_symbol *s) { x->x_sym_scr1 = s; } static void tab_cross_corr_src2(t_tab_cross_corr *x, t_symbol *s) { x->x_sym_scr2 = s; } static void tab_cross_corr_dst(t_tab_cross_corr *x, t_symbol *s) { x->x_sym_dst = s; } static void tab_cross_corr_bang(t_tab_cross_corr *x) { int i, j, m, n; int ok_src1, ok_src2, ok_dst; iemarray_t *vec_src1, *vec_src2, *vec_dst; t_float sum, f; ok_src1 = iem_tab_check_arrays(gensym("tab_cross_corr"), x->x_sym_scr1, &x->x_beg_mem_src1, &x->x_size_src1, 0); ok_src2 = iem_tab_check_arrays(gensym("tab_cross_corr"), x->x_sym_scr2, &x->x_beg_mem_src2, &x->x_size_src2, 0); ok_dst = iem_tab_check_arrays(gensym("tab_cross_corr"), x->x_sym_dst, &x->x_beg_mem_dst, &x->x_size_dst, 0); if(ok_src1 && ok_src2 && ok_dst) { if(x->x_size_src1 > x->x_size_src2) n = x->x_size_src1 - x->x_size_src2; else n = 0; if(n > x->x_size_dst) x->x_n = x->x_size_dst; else x->x_n = n; f = x->x_factor; if(n) { if(x->x_delay == 0.0f) { t_garray *a; vec_src1 = x->x_beg_mem_src1; vec_src2 = x->x_beg_mem_src2; vec_dst = x->x_beg_mem_dst; m = x->x_size_src2; for(i=0; ix_obj.ob_outlet); a = (t_garray *)pd_findbyclass(x->x_sym_dst, garray_class); garray_redraw(a); } else { x->x_counter = 0; vec_src1 = x->x_beg_mem_src1 + x->x_counter; vec_src2 = x->x_beg_mem_src2; vec_dst = x->x_beg_mem_dst + x->x_counter; m = x->x_size_src2; sum = 0.0f; for(j=0; jx_clock, x->x_delay); } } } } static void tab_cross_corr_free(t_tab_cross_corr *x) { clock_free(x->x_clock); } static void *tab_cross_corr_new(t_symbol *s, int argc, t_atom *argv) { t_tab_cross_corr *x = (t_tab_cross_corr *)pd_new(tab_cross_corr_class); t_symbol *src1, *src2, *dst; t_float dtime=0.0f, factor=1.0f; if((argc >= 5) && IS_A_FLOAT(argv,4)) dtime = (t_float)atom_getfloatarg(4, argc, argv); if((argc >= 4) && IS_A_FLOAT(argv,3)) factor = (t_float)atom_getfloatarg(3, argc, argv); if((argc >= 3) && IS_A_SYMBOL(argv,0) && IS_A_SYMBOL(argv,1) && IS_A_SYMBOL(argv,2)) { src1 = (t_symbol *)atom_getsymbolarg(0, argc, argv); src2 = (t_symbol *)atom_getsymbolarg(1, argc, argv); dst = (t_symbol *)atom_getsymbolarg(2, argc, argv); } else { post("tab_cross_corr-ERROR: need 3 symbol + 2 float arguments:"); post(" source_reference_array_name + source_measure_array_name + destination_array_name + norm_factor + calculation-time-per-sample_ms"); return(0); } if(dtime < 0.0f) dtime = 0.0f; x->x_delay = dtime; x->x_factor = factor; x->x_sym_scr1 = src1; x->x_sym_scr2 = src2; x->x_sym_dst = dst; outlet_new(&x->x_obj, &s_bang); x->x_clock = clock_new(x, (t_method)tab_cross_corr_tick); return(x); } void tab_cross_corr_setup(void) { tab_cross_corr_class = class_new(gensym("tab_cross_corr"), (t_newmethod)tab_cross_corr_new, (t_method)tab_cross_corr_free, sizeof(t_tab_cross_corr), 0, A_GIMME, 0); class_addbang(tab_cross_corr_class, (t_method)tab_cross_corr_bang); class_addmethod(tab_cross_corr_class, (t_method)tab_cross_corr_time, gensym("time"), A_DEFFLOAT, 0); class_addmethod(tab_cross_corr_class, (t_method)tab_cross_corr_factor, gensym("factor"), A_DEFFLOAT, 0); class_addmethod(tab_cross_corr_class, (t_method)tab_cross_corr_src2, gensym("src2"), A_DEFSYMBOL, 0); class_addmethod(tab_cross_corr_class, (t_method)tab_cross_corr_src1, gensym("src1"), A_DEFSYMBOL, 0); class_addmethod(tab_cross_corr_class, (t_method)tab_cross_corr_dst, gensym("dst"), A_DEFSYMBOL, 0); // class_sethelpsymbol(tab_cross_corr_class, gensym("iemhelp2/tab_cross_corr-help")); } iem_utils-v0.0.20181004/iem_tab/src/tab_lt.c0000644000175000017500000001307213303612035020460 0ustar zmoelnigzmoelnig/* For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. iem_tab written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2009 */ #include "m_pd.h" #include "iemlib.h" #include "iem_tab.h" /* -------------------------- tab_lt ------------------------------ */ /* if(x_beg_mem_src1[i] < x_beg_mem_src2[i]) */ /* x_beg_mem_dst[i] = 1.0f; */ /* else */ /* x_beg_mem_dst[i] = 0.0f; */ typedef struct _tab_lt { t_object x_obj; int x_size_src1; int x_size_src2; int x_size_dst; int x_offset_src1; int x_offset_src2; int x_offset_dst; iemarray_t *x_beg_mem_src1; iemarray_t *x_beg_mem_src2; iemarray_t *x_beg_mem_dst; t_symbol *x_sym_scr1; t_symbol *x_sym_scr2; t_symbol *x_sym_dst; } t_tab_lt; static t_class *tab_lt_class; static void tab_lt_src1(t_tab_lt *x, t_symbol *s) { x->x_sym_scr1 = s; } static void tab_lt_src2(t_tab_lt *x, t_symbol *s) { x->x_sym_scr2 = s; } static void tab_lt_dst(t_tab_lt *x, t_symbol *s) { x->x_sym_dst = s; } static void tab_lt_bang(t_tab_lt *x) { int i, n; int ok_src1, ok_src2, ok_dst; iemarray_t *vec_src1, *vec_src2, *vec_dst; ok_src1 = iem_tab_check_arrays(gensym("tab_lt"), x->x_sym_scr1, &x->x_beg_mem_src1, &x->x_size_src1, 0); ok_src2 = iem_tab_check_arrays(gensym("tab_lt"), x->x_sym_scr2, &x->x_beg_mem_src2, &x->x_size_src2, 0); ok_dst = iem_tab_check_arrays(gensym("tab_lt"), x->x_sym_dst, &x->x_beg_mem_dst, &x->x_size_dst, 0); if(ok_src1 && ok_src2 && ok_dst) { if(x->x_size_src1 < x->x_size_dst) n = x->x_size_src1; else n = x->x_size_dst; if(x->x_size_src2 < n) n = x->x_size_src2; vec_src1 = x->x_beg_mem_src1; vec_src2 = x->x_beg_mem_src2; vec_dst = x->x_beg_mem_dst; if(n) { t_garray *a; for(i=0; ix_obj.ob_outlet); a = (t_garray *)pd_findbyclass(x->x_sym_dst, garray_class); garray_redraw(a); } } } static void tab_lt_list(t_tab_lt *x, t_symbol *s, int argc, t_atom *argv) { int beg_src1, beg_src2, beg_dst; int i, n; int ok_src1, ok_src2, ok_dst; iemarray_t *vec_src1, *vec_src2, *vec_dst; if((argc >= 4) && IS_A_FLOAT(argv,0) && IS_A_FLOAT(argv,1) && IS_A_FLOAT(argv,2) && IS_A_FLOAT(argv,3)) { beg_src1 = (int)atom_getintarg(0, argc, argv); beg_src2 = (int)atom_getintarg(1, argc, argv); beg_dst = (int)atom_getintarg(2, argc, argv); n = (int)atom_getintarg(3, argc, argv); if(beg_src1 < 0) beg_src1 = 0; if(beg_src2 < 0) beg_src2 = 0; if(beg_dst < 0) beg_dst = 0; if(n < 0) n = 0; ok_src1 = iem_tab_check_arrays(gensym("tab_lt"), x->x_sym_scr1, &x->x_beg_mem_src1, &x->x_size_src1, beg_src1+n); ok_src2 = iem_tab_check_arrays(gensym("tab_lt"), x->x_sym_scr2, &x->x_beg_mem_src2, &x->x_size_src2, beg_src2+n); ok_dst = iem_tab_check_arrays(gensym("tab_lt"), x->x_sym_dst, &x->x_beg_mem_dst, &x->x_size_dst, beg_dst+n); if(ok_src1 && ok_src2 && ok_dst) { vec_src1 = x->x_beg_mem_src1 + beg_src1; vec_src2 = x->x_beg_mem_src2 + beg_src2; vec_dst = x->x_beg_mem_dst + beg_dst; if(n) { t_garray *a; for(i=0; ix_obj.ob_outlet); a = (t_garray *)pd_findbyclass(x->x_sym_dst, garray_class); garray_redraw(a); } } } else { post("tab_lt-ERROR: list need 4 float arguments:"); post(" source1_offset + source2_offset + destination_offset + number_of_samples_to_compare"); } } static void tab_lt_free(t_tab_lt *x) { } static void *tab_lt_new(t_symbol *s, int argc, t_atom *argv) { t_tab_lt *x = (t_tab_lt *)pd_new(tab_lt_class); t_symbol *src1, *src2, *dst; if((argc >= 3) && IS_A_SYMBOL(argv,0) && IS_A_SYMBOL(argv,1) && IS_A_SYMBOL(argv,2)) { src1 = (t_symbol *)atom_getsymbolarg(0, argc, argv); src2 = (t_symbol *)atom_getsymbolarg(1, argc, argv); dst = (t_symbol *)atom_getsymbolarg(2, argc, argv); } else if((argc >= 2) && IS_A_SYMBOL(argv,0) && IS_A_SYMBOL(argv,1)) { src1 = (t_symbol *)atom_getsymbolarg(0, argc, argv); dst = src1; src2 = (t_symbol *)atom_getsymbolarg(1, argc, argv); } else { post("tab_lt-ERROR: need 3 symbols arguments:"); post(" source1_array_name + source2_array_name + destination_array_name"); return(0); } x->x_sym_scr1 = src1; x->x_sym_scr2 = src2; x->x_sym_dst = dst; outlet_new(&x->x_obj, &s_bang); return(x); } void tab_lt_setup(void) { tab_lt_class = class_new(gensym("tab_lt"), (t_newmethod)tab_lt_new, (t_method)tab_lt_free, sizeof(t_tab_lt), 0, A_GIMME, 0); class_addbang(tab_lt_class, (t_method)tab_lt_bang); class_addlist(tab_lt_class, (t_method)tab_lt_list); class_addmethod(tab_lt_class, (t_method)tab_lt_src1, gensym("src1"), A_DEFSYMBOL, 0); class_addmethod(tab_lt_class, (t_method)tab_lt_src2, gensym("src2"), A_DEFSYMBOL, 0); class_addmethod(tab_lt_class, (t_method)tab_lt_dst, gensym("dst"), A_DEFSYMBOL, 0); // class_sethelpsymbol(tab_lt_class, gensym("iemhelp2/tab_lt-help")); } iem_utils-v0.0.20181004/iem_tab/src/tab_get_size.c0000644000175000017500000000360213303612036021651 0ustar zmoelnigzmoelnig/* For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. iem_tab written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2009 */ #include "m_pd.h" #include "iemlib.h" #include "iem_tab.h" /* -------------------------- tab_get_size ------------------------------ */ typedef struct _tab_get_size { t_object x_obj; t_symbol *x_sym_src; } t_tab_get_size; static t_class *tab_get_size_class; static void tab_get_size_set(t_tab_get_size *x, t_symbol *s) { x->x_sym_src = s; } static void tab_get_size_bang(t_tab_get_size *x) { int ok_src, size_src; iemarray_t *beg_mem_src; ok_src = iem_tab_check_arrays(gensym("tab_get_size"), x->x_sym_src, &beg_mem_src, &size_src, 0); if(ok_src) { outlet_float(x->x_obj.ob_outlet, (t_float)size_src); } } static void tab_get_size_free(t_tab_get_size *x) { } static void *tab_get_size_new(t_symbol *s, int argc, t_atom *argv) { t_tab_get_size *x = (t_tab_get_size *)pd_new(tab_get_size_class); t_symbol *src; if((argc >= 1) && IS_A_SYMBOL(argv,0)) { src = (t_symbol *)atom_getsymbolarg(0, argc, argv); } else { post("tab_get_size-ERROR: need 1 symbol argument:"); post(" destination_array_name"); return(0); } x->x_sym_src = src; outlet_new(&x->x_obj, &s_float); return(x); } void tab_get_size_setup(void) { tab_get_size_class = class_new(gensym("tab_get_size"), (t_newmethod)tab_get_size_new, (t_method)tab_get_size_free, sizeof(t_tab_get_size), 0, A_GIMME, 0); class_addbang(tab_get_size_class, (t_method)tab_get_size_bang); class_addmethod(tab_get_size_class, (t_method)tab_get_size_set, gensym("set"), A_DEFSYMBOL, 0); class_addmethod(tab_get_size_class, (t_method)tab_get_size_set, gensym("get"), A_DEFSYMBOL, 0); // class_sethelpsymbol(tab_get_size_class, gensym("iemhelp2/tab_get_size-help")); } iem_utils-v0.0.20181004/iem_tab/src/iem_tab.vcxproj0000644000175000017500000000610713303322332022063 0ustar zmoelnigzmoelnig Debug Win32 Release Win32 MakeFileProj {72CD00D4-3993-4691-A14F-67DD3CEEAF8E} Makefile v110 Makefile v110 .\Debug\ .\Debug\ NMAKE /f makefile_vc12proj NMAKE /f makefile_vc12proj /a iem_tab.exe .\Release\ .\Release\ NMAKE /f makefile_vc12proj NMAKE /f makefile_vc12proj /a iem_tab.exe iem_utils-v0.0.20181004/iem_tab/src/iem_tab.dsp0000644000175000017500000000502213303322332021151 0ustar zmoelnigzmoelnig# Microsoft Developer Studio Project File - Name="iem_tab" - Package Owner=<4> # Microsoft Developer Studio Generated Build File, Format Version 6.00 # ** NICHT BEARBEITEN ** # TARGTYPE "Win32 (x86) External Target" 0x0106 CFG=iem_tab - Win32 Debug !MESSAGE Dies ist kein gltiges Makefile. Zum Erstellen dieses Projekts mit NMAKE !MESSAGE verwenden Sie den Befehl "Makefile exportieren" und fhren Sie den Befehl !MESSAGE !MESSAGE NMAKE /f "iem_tab.mak". !MESSAGE !MESSAGE Sie knnen beim Ausfhren von NMAKE eine Konfiguration angeben !MESSAGE durch Definieren des Makros CFG in der Befehlszeile. Zum Beispiel: !MESSAGE !MESSAGE NMAKE /f "iem_tab.mak" CFG="iem_tab - Win32 Debug" !MESSAGE !MESSAGE Fr die Konfiguration stehen zur Auswahl: !MESSAGE !MESSAGE "iem_tab - Win32 Release" (basierend auf "Win32 (x86) External Target") !MESSAGE "iem_tab - Win32 Debug" (basierend auf "Win32 (x86) External Target") !MESSAGE # Begin Project # PROP AllowPerConfigDependencies 0 # PROP Scc_ProjName "" # PROP Scc_LocalPath "" !IF "$(CFG)" == "iem_tab - Win32 Release" # PROP BASE Use_Debug_Libraries 0 # PROP BASE Output_Dir "Release" # PROP BASE Intermediate_Dir "Release" # PROP BASE Cmd_Line "NMAKE /f makefile_vc12proj" # PROP BASE Rebuild_Opt "/a" # PROP BASE Target_File "makefile_vc12proj.exe" # PROP BASE Bsc_Name "makefile_vc12proj.bsc" # PROP BASE Target_Dir "" # PROP Use_Debug_Libraries 0 # PROP Output_Dir "Release" # PROP Intermediate_Dir "Release" # PROP Cmd_Line "NMAKE /f makefile_vc12proj" # PROP Rebuild_Opt "/a" # PROP Target_File "iem_tab.exe" # PROP Bsc_Name "iem_tab.bsc" # PROP Target_Dir "" !ELSEIF "$(CFG)" == "iem_tab - Win32 Debug" # PROP BASE Use_Debug_Libraries 1 # PROP BASE Output_Dir "Debug" # PROP BASE Intermediate_Dir "Debug" # PROP BASE Cmd_Line "NMAKE /f makefile_vc12proj" # PROP BASE Rebuild_Opt "/a" # PROP BASE Target_File "makefile_vc12proj.exe" # PROP BASE Bsc_Name "makefile_vc12proj.bsc" # PROP BASE Target_Dir "" # PROP Use_Debug_Libraries 1 # PROP Output_Dir "Debug" # PROP Intermediate_Dir "Debug" # PROP Cmd_Line "NMAKE /f makefile_vc12proj" # PROP Rebuild_Opt "/a" # PROP Target_File "iem_tab.exe" # PROP Bsc_Name "iem_tab.bsc" # PROP Target_Dir "" !ENDIF # Begin Target # Name "iem_tab - Win32 Release" # Name "iem_tab - Win32 Debug" !IF "$(CFG)" == "iem_tab - Win32 Release" !ELSEIF "$(CFG)" == "iem_tab - Win32 Debug" !ENDIF # Begin Source File SOURCE=.\makefile_vc12proj # End Source File # End Target # End Project iem_utils-v0.0.20181004/iem_tab/src/tab_rifft.c0000644000175000017500000003036613303612036021161 0ustar zmoelnigzmoelnig/* For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. iem_tab written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2009 */ #include "m_pd.h" #include "iemlib.h" #include "iem_tab.h" #include /* -------------------------- tab_rifft ------------------------------ */ /* complex spectral domain inverse FFT to real time domain */ typedef struct _tab_rifft { t_object x_obj; int x_size_src_re; int x_size_src_im; int x_size_dst; int x_offset_src_re; int x_offset_src_im; int x_offset_dst; int x_fftsize; iemarray_t *x_beg_mem_src_re; iemarray_t *x_beg_mem_src_im; iemarray_t *x_beg_mem_dst_re; iemarray_t *x_beg_mem_dst_im; TAB_COMPLEX *x_sin_cos; t_symbol *x_sym_src_re; t_symbol *x_sym_src_im; t_symbol *x_sym_dst; } t_tab_rifft; static t_class *tab_rifft_class; static void tab_rifft_init(t_tab_rifft *x) { int i, fftsize = x->x_fftsize; t_float f, g; TAB_COMPLEX *sincos = x->x_sin_cos; g = 2.0 * 3.141592653589793 / (t_float)fftsize; for(i=0; ix_fftsize) { x->x_sin_cos = (TAB_COMPLEX *)resizebytes(x->x_sin_cos, x->x_fftsize*sizeof(TAB_COMPLEX), i*sizeof(TAB_COMPLEX)); x->x_beg_mem_dst_im = (iemarray_t *)resizebytes(x->x_beg_mem_dst_im, x->x_fftsize*sizeof(iemarray_t), i*sizeof(iemarray_t)); x->x_fftsize = i; } tab_rifft_init(x); } static void tab_rifft_dst(t_tab_rifft *x, t_symbol *s) { x->x_sym_dst = s; } static void tab_rifft_src_re(t_tab_rifft *x, t_symbol *s) { x->x_sym_src_re = s; } static void tab_rifft_src_im(t_tab_rifft *x, t_symbol *s) { x->x_sym_src_im = s; } static void tab_rifft_bang(t_tab_rifft *x) { int i, j, k; int ok_src_re, ok_src_im, ok_dst; int w_index, w_inc, i_inc, v_index; int fftsize = x->x_fftsize; int fs1 = fftsize - 1; int fs2 = fftsize / 2; TAB_COMPLEX w; TAB_COMPLEX *sincos = x->x_sin_cos; iemarray_t *vec_src_re, *vec_src_im, *vec_dst_re, *vec_dst_im; t_float old1_re, old1_im, old2_re, old2_im, g; ok_src_re = iem_tab_check_arrays(gensym("tab_rifft"), x->x_sym_src_re, &x->x_beg_mem_src_re, &x->x_size_src_re, fftsize); ok_src_im = iem_tab_check_arrays(gensym("tab_rifft"), x->x_sym_src_im, &x->x_beg_mem_src_im, &x->x_size_src_im, fftsize); ok_dst = iem_tab_check_arrays(gensym("tab_rifft"), x->x_sym_dst, &x->x_beg_mem_dst_re, &x->x_size_dst, fftsize); if(ok_src_re && ok_src_im && ok_dst) { t_garray *a; vec_src_re=x->x_beg_mem_src_re; vec_src_im=x->x_beg_mem_src_im; vec_dst_re=x->x_beg_mem_dst_re; vec_dst_im=x->x_beg_mem_dst_im; iemarray_setfloat(vec_dst_re, 0, iemarray_getfloat(vec_src_re, 0)); iemarray_setfloat(vec_dst_im, 0, 0.0); for(j=1; j>= 1; } j = 0; for(i=1;i>= 1; } j = j + k; if(i < j) { old1_re = iemarray_getfloat(vec_dst_re, j); old1_im = iemarray_getfloat(vec_dst_im, j); iemarray_setfloat(vec_dst_re, j, iemarray_getfloat(vec_dst_re, i)); iemarray_setfloat(vec_dst_im, j, iemarray_getfloat(vec_dst_im, i)); iemarray_setfloat(vec_dst_re, i, old1_re); iemarray_setfloat(vec_dst_im, i, old1_im); } } // g = 2.0f / (t_float)fftsize; /* ein fehler tritt auf beim 0.sample, hier sollte nur mal 1.0 multipliziert werden wenn gelten soll : Energie im zeitfenster == Energie im Frequenz-dichte-fenster g = 1.0f; for(i = 0; i < fs2; i++) { vec_dst_re[i] *= g; vec_dst_im[i] *= g; } */ g = 1.0 / (t_float)fftsize; for(i = 0; i < fftsize; i++) { iemarray_setfloat(vec_dst_re, i, iemarray_getfloat(vec_dst_re, i)*g); } outlet_bang(x->x_obj.ob_outlet); a = (t_garray *)pd_findbyclass(x->x_sym_dst, garray_class); garray_redraw(a); } } static void tab_rifft_list(t_tab_rifft *x, t_symbol *s, int argc, t_atom *argv) { int beg_src_re, beg_src_im, beg_dst; int i, j, k; int ok_src_re, ok_src_im, ok_dst; int w_index, w_inc, i_inc, v_index; int fftsize = x->x_fftsize; int fs1 = fftsize - 1; int fs2 = fftsize / 2; TAB_COMPLEX w; TAB_COMPLEX *sincos = x->x_sin_cos; iemarray_t *vec_src_re, *vec_src_im, *vec_dst_re, *vec_dst_im; t_float old1_re, old1_im, old2_re, old2_im, g; if((argc >= 3) && IS_A_FLOAT(argv,0) && IS_A_FLOAT(argv,1) && IS_A_FLOAT(argv,2)) { beg_src_re = (int)atom_getintarg(0, argc, argv); beg_src_im = (int)atom_getintarg(1, argc, argv); beg_dst = (int)atom_getintarg(2, argc, argv); if(beg_src_re < 0) beg_src_re = 0; if(beg_src_im < 0) beg_src_im = 0; if(beg_dst < 0) beg_dst = 0; ok_src_re = iem_tab_check_arrays(gensym("tab_rifft"), x->x_sym_src_re, &x->x_beg_mem_src_re, &x->x_size_src_re, beg_src_re+fftsize); ok_src_im = iem_tab_check_arrays(gensym("tab_rifft"), x->x_sym_src_im, &x->x_beg_mem_src_im, &x->x_size_src_im, beg_src_im+fftsize); ok_dst = iem_tab_check_arrays(gensym("tab_rifft"), x->x_sym_dst, &x->x_beg_mem_dst_re, &x->x_size_dst, beg_dst+fftsize); if(ok_src_re && ok_src_im && ok_dst) { t_garray *a; vec_src_re=x->x_beg_mem_src_re + beg_src_re; vec_src_im=x->x_beg_mem_src_im + beg_src_im; vec_dst_re=x->x_beg_mem_dst_re + beg_dst; vec_dst_im=x->x_beg_mem_dst_im; for(j=0; j>= 1; } j = 0; for(i=1;i>= 1; } j = j + k; if(i < j) { old1_re = iemarray_getfloat(vec_dst_re, j); old1_im = iemarray_getfloat(vec_dst_im, j); iemarray_setfloat(vec_dst_re, j, iemarray_getfloat(vec_dst_re, i)); iemarray_setfloat(vec_dst_im, j, iemarray_getfloat(vec_dst_im, i)); iemarray_setfloat(vec_dst_re, i, old1_re); iemarray_setfloat(vec_dst_im, i, old1_im); } } // g = 2.0f / (t_float)fftsize; /* ein fehler tritt auf beim 0.sample, hier sollte nur mal 1.0 multipliziert werden wenn gelten soll : Energie im zeitfenster == Energie im Frequenz-dichte-fenster g = 1.0f; for(i = 0; i < fs2; i++) { vec_src_re[i] *= g; vec_src_im[i] *= g; } */ g = 1.0 / (t_float)fftsize; for(i = 0; i < fftsize; i++) { iemarray_setfloat(vec_dst_re, i, iemarray_getfloat(vec_dst_re, i)*g); } outlet_bang(x->x_obj.ob_outlet); a = (t_garray *)pd_findbyclass(x->x_sym_dst, garray_class); garray_redraw(a); } } else { post("tab_rifft-ERROR: list need 3 float arguments:"); post(" source_real_offset + source_imag_offset + destination_offset"); } } static void tab_rifft_free(t_tab_rifft *x) { freebytes(x->x_sin_cos, x->x_fftsize * sizeof(TAB_COMPLEX)); freebytes(x->x_beg_mem_dst_im, x->x_fftsize * sizeof(t_float)); } static void *tab_rifft_new(t_symbol *s, int argc, t_atom *argv) { t_tab_rifft *x = (t_tab_rifft *)pd_new(tab_rifft_class); t_symbol *src_re, *src_im, *dst; int fftsize, i=1; if((argc >= 4) && IS_A_SYMBOL(argv,0) && IS_A_SYMBOL(argv,1) && IS_A_SYMBOL(argv,2) && IS_A_FLOAT(argv,3)) { src_re = (t_symbol *)atom_getsymbolarg(0, argc, argv); src_im = (t_symbol *)atom_getsymbolarg(1, argc, argv); dst = (t_symbol *)atom_getsymbolarg(2, argc, argv); fftsize = (int)atom_getintarg(3, argc, argv); } else { post("tab_rifft-ERROR: need 3 symbols + 1 float arguments:"); post(" source_real_array_name + source_imag_array_name + destination_array_name + IFFT-size"); return(0); } if(fftsize < 8) fftsize = 8; while(i <= fftsize) i *= 2; i /= 2; fftsize = i; x->x_fftsize = fftsize; x->x_sym_src_re = src_re; x->x_sym_src_im = src_im; x->x_sym_dst = dst; x->x_sin_cos = (TAB_COMPLEX *)getbytes(x->x_fftsize * sizeof(TAB_COMPLEX)); x->x_beg_mem_dst_im = (iemarray_t *)getbytes(x->x_fftsize * sizeof(iemarray_t)); tab_rifft_init(x); outlet_new(&x->x_obj, &s_bang); return(x); } void tab_rifft_setup(void) { tab_rifft_class = class_new(gensym("tab_rifft"), (t_newmethod)tab_rifft_new, (t_method)tab_rifft_free, sizeof(t_tab_rifft), 0, A_GIMME, 0); class_addbang(tab_rifft_class, (t_method)tab_rifft_bang); class_addlist(tab_rifft_class, (t_method)tab_rifft_list); class_addmethod(tab_rifft_class, (t_method)tab_rifft_ifftsize, gensym("ifftsize"), A_DEFFLOAT, 0); class_addmethod(tab_rifft_class, (t_method)tab_rifft_src_re, gensym("src_re"), A_DEFSYMBOL, 0); class_addmethod(tab_rifft_class, (t_method)tab_rifft_src_im, gensym("src_im"), A_DEFSYMBOL, 0); class_addmethod(tab_rifft_class, (t_method)tab_rifft_src_re, gensym("src1"), A_DEFSYMBOL, 0); class_addmethod(tab_rifft_class, (t_method)tab_rifft_src_im, gensym("src2"), A_DEFSYMBOL, 0); class_addmethod(tab_rifft_class, (t_method)tab_rifft_dst, gensym("dst"), A_DEFSYMBOL, 0); class_addmethod(tab_rifft_class, (t_method)tab_rifft_dst, gensym("dst1"), A_DEFSYMBOL, 0); } iem_utils-v0.0.20181004/iem_tab/src/tab_abs.c0000644000175000017500000001041513303612036020605 0ustar zmoelnigzmoelnig/* For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. iem_tab written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2009 */ #include "m_pd.h" #include "iemlib.h" #include "iem_tab.h" #include /* -------------------------- tab_abs ------------------------------ */ /* x_beg_mem_dst[i] = abs(x_beg_mem_src1[i]) */ typedef struct _tab_abs { t_object x_obj; int x_size_src1; int x_size_dst; int x_offset_src1; int x_offset_dst; iemarray_t *x_beg_mem_src1; iemarray_t *x_beg_mem_dst; t_symbol *x_sym_scr1; t_symbol *x_sym_dst; } t_tab_abs; static t_class *tab_abs_class; static void tab_abs_src(t_tab_abs *x, t_symbol *s) { x->x_sym_scr1 = s; } static void tab_abs_dst(t_tab_abs *x, t_symbol *s) { x->x_sym_dst = s; } static void tab_abs_bang(t_tab_abs *x) { int i, n; int ok_src, ok_dst; iemarray_t *vec_src, *vec_dst; ok_src = iem_tab_check_arrays(gensym("tab_abs"), x->x_sym_scr1, &x->x_beg_mem_src1, &x->x_size_src1, 0); ok_dst = iem_tab_check_arrays(gensym("tab_abs"), x->x_sym_dst, &x->x_beg_mem_dst, &x->x_size_dst, 0); if(ok_src && ok_dst) { if(x->x_size_src1 < x->x_size_dst) n = x->x_size_src1; else n = x->x_size_dst; vec_src = x->x_beg_mem_src1; vec_dst = x->x_beg_mem_dst; if(n) { t_garray *a; for(i=0; ix_obj.ob_outlet); a = (t_garray *)pd_findbyclass(x->x_sym_dst, garray_class); garray_redraw(a); } } } static void tab_abs_list(t_tab_abs *x, t_symbol *s, int argc, t_atom *argv) { int beg_src, beg_dst; int i, n; int ok_src, ok_dst; iemarray_t *vec_src, *vec_dst; if((argc >= 3) && IS_A_FLOAT(argv,0) && IS_A_FLOAT(argv,1) && IS_A_FLOAT(argv,2)) { beg_src = (int)atom_getintarg(0, argc, argv); beg_dst = (int)atom_getintarg(1, argc, argv); n = (int)atom_getintarg(2, argc, argv); if(beg_src < 0) beg_src = 0; if(beg_dst < 0) beg_dst = 0; if(n < 0) n = 0; ok_src = iem_tab_check_arrays(gensym("tab_abs"), x->x_sym_scr1, &x->x_beg_mem_src1, &x->x_size_src1, beg_src+n); ok_dst = iem_tab_check_arrays(gensym("tab_abs"), x->x_sym_dst, &x->x_beg_mem_dst, &x->x_size_dst, beg_dst+n); if(ok_src && ok_dst) { vec_src = x->x_beg_mem_src1 + beg_src; vec_dst = x->x_beg_mem_dst + beg_dst; if(n) { t_garray *a; for(i=0; ix_obj.ob_outlet); a = (t_garray *)pd_findbyclass(x->x_sym_dst, garray_class); garray_redraw(a); } } } else { post("tab_abs-ERROR: list need 3 float arguments:"); post(" source_offset + destination_offset + number_of_samples_to_abs"); } } static void tab_abs_free(t_tab_abs *x) { } static void *tab_abs_new(t_symbol *s, int argc, t_atom *argv) { t_tab_abs *x = (t_tab_abs *)pd_new(tab_abs_class); t_symbol *src, *dst; if((argc >= 2) && IS_A_SYMBOL(argv,0) && IS_A_SYMBOL(argv,1)) { src = (t_symbol *)atom_getsymbolarg(0, argc, argv); dst = (t_symbol *)atom_getsymbolarg(1, argc, argv); } else if((argc >= 1) && IS_A_SYMBOL(argv,0)) { src = (t_symbol *)atom_getsymbolarg(0, argc, argv); dst = src; } else { post("tab_abs-ERROR: need 2 symbols arguments:"); post(" source_array_name + destination_array_name"); return(0); } x->x_sym_scr1 = src; x->x_sym_dst = dst; outlet_new(&x->x_obj, &s_bang); return(x); } void tab_abs_setup(void) { tab_abs_class = class_new(gensym("tab_abs"), (t_newmethod)tab_abs_new, (t_method)tab_abs_free, sizeof(t_tab_abs), 0, A_GIMME, 0); class_addbang(tab_abs_class, (t_method)tab_abs_bang); class_addlist(tab_abs_class, (t_method)tab_abs_list); class_addmethod(tab_abs_class, (t_method)tab_abs_src, gensym("src"), A_DEFSYMBOL, 0); class_addmethod(tab_abs_class, (t_method)tab_abs_src, gensym("src1"), A_DEFSYMBOL, 0); class_addmethod(tab_abs_class, (t_method)tab_abs_dst, gensym("dst"), A_DEFSYMBOL, 0); // class_sethelpsymbol(tab_abs_class, gensym("iemhelp2/tab_abs-help")); } iem_utils-v0.0.20181004/iem_tab/src/tab_le_scalar.c0000644000175000017500000001173213303612036021770 0ustar zmoelnigzmoelnig/* For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. iem_tab written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2009 */ #include "m_pd.h" #include "iemlib.h" #include "iem_tab.h" /* -------------------------- tab_le_scalar ------------------------------ */ /* if(x_beg_mem_src1[i] <= compare) */ /* x_beg_mem_dst[i] = 1.0f; */ /* else */ /* x_beg_mem_dst[i] += 0.0f; */ typedef struct _tab_le_scalar { t_object x_obj; int x_size_src1; int x_size_dst; int x_offset_src1; int x_offset_dst; iemarray_t *x_beg_mem_src1; iemarray_t *x_beg_mem_dst; t_symbol *x_sym_scr1; t_symbol *x_sym_dst; } t_tab_le_scalar; static t_class *tab_le_scalar_class; static void tab_le_scalar_src(t_tab_le_scalar *x, t_symbol *s) { x->x_sym_scr1 = s; } static void tab_le_scalar_float(t_tab_le_scalar *x, t_floatarg compare) { int i, n; int ok_src1, ok_dst; iemarray_t *vec_src1, *vec_dst; ok_src1 = iem_tab_check_arrays(gensym("tab_le_scalar"), x->x_sym_scr1, &x->x_beg_mem_src1, &x->x_size_src1, 0); ok_dst = iem_tab_check_arrays(gensym("tab_le_scalar"), x->x_sym_dst, &x->x_beg_mem_dst, &x->x_size_dst, 0); if(ok_src1 && ok_dst) { if(x->x_size_src1 < x->x_size_dst) n = x->x_size_src1; else n = x->x_size_dst; vec_src1 = x->x_beg_mem_src1; vec_dst = x->x_beg_mem_dst; if(n) { t_garray *a; for(i=0; ix_obj.ob_outlet); a = (t_garray *)pd_findbyclass(x->x_sym_dst, garray_class); garray_redraw(a); } } } static void tab_le_scalar_dst(t_tab_le_scalar *x, t_symbol *s) { x->x_sym_dst = s; } static void tab_le_scalar_list(t_tab_le_scalar *x, t_symbol *s, int argc, t_atom *argv) { int beg_src1, beg_dst; int i, n; int ok_src1, ok_dst; t_float compare; iemarray_t *vec_src1, *vec_dst; if((argc >= 4) && IS_A_FLOAT(argv,0) && IS_A_FLOAT(argv,1) && IS_A_FLOAT(argv,2) && IS_A_FLOAT(argv,3)) { beg_src1 = (int)atom_getintarg(0, argc, argv); beg_dst = (int)atom_getintarg(1, argc, argv); n = (int)atom_getintarg(2, argc, argv); compare = (t_float)atom_getfloatarg(3, argc, argv); if(beg_src1 < 0) beg_src1 = 0; if(beg_dst < 0) beg_dst = 0; if(n < 0) n = 0; ok_src1 = iem_tab_check_arrays(gensym("tab_le_scalar"), x->x_sym_scr1, &x->x_beg_mem_src1, &x->x_size_src1, beg_src1+n); ok_dst = iem_tab_check_arrays(gensym("tab_le_scalar"), x->x_sym_dst, &x->x_beg_mem_dst, &x->x_size_dst, beg_dst+n); if(ok_src1 && ok_dst) { vec_src1 = x->x_beg_mem_src1 + beg_src1; vec_dst = x->x_beg_mem_dst + beg_dst; if(n) { t_garray *a; for(i=0; ix_obj.ob_outlet); a = (t_garray *)pd_findbyclass(x->x_sym_dst, garray_class); garray_redraw(a); } } } else { post("tab_le_scalar-ERROR: list need 4 float arguments:"); post(" source1_offset + destination_offset + number_of_samples_to_compare + compare_scalar"); } } static void tab_le_scalar_free(t_tab_le_scalar *x) { } static void *tab_le_scalar_new(t_symbol *s, int argc, t_atom *argv) { t_tab_le_scalar *x = (t_tab_le_scalar *)pd_new(tab_le_scalar_class); t_symbol *src1, *dst; if((argc >= 2) && IS_A_SYMBOL(argv,0) && IS_A_SYMBOL(argv,1)) { src1 = (t_symbol *)atom_getsymbolarg(0, argc, argv); dst = (t_symbol *)atom_getsymbolarg(1, argc, argv); } else if((argc >= 1) && IS_A_SYMBOL(argv,0)) { src1 = (t_symbol *)atom_getsymbolarg(0, argc, argv); dst = src1; } else { post("tab_le_scalar-ERROR: need 2 symbol arguments:"); post(" source_array_name + destination_array_name"); return(0); } x->x_sym_scr1 = src1; x->x_sym_dst = dst; outlet_new(&x->x_obj, &s_bang); return(x); } void tab_le_scalar_setup(void) { tab_le_scalar_class = class_new(gensym("tab_le_scalar"), (t_newmethod)tab_le_scalar_new, (t_method)tab_le_scalar_free, sizeof(t_tab_le_scalar), 0, A_GIMME, 0); class_addfloat(tab_le_scalar_class, (t_method)tab_le_scalar_float); class_addlist(tab_le_scalar_class, (t_method)tab_le_scalar_list); class_addmethod(tab_le_scalar_class, (t_method)tab_le_scalar_src, gensym("src1"), A_DEFSYMBOL, 0); class_addmethod(tab_le_scalar_class, (t_method)tab_le_scalar_src, gensym("src"), A_DEFSYMBOL, 0); class_addmethod(tab_le_scalar_class, (t_method)tab_le_scalar_dst, gensym("dst"), A_DEFSYMBOL, 0); // class_sethelpsymbol(tab_le_scalar_class, gensym("iemhelp2/tab_le_scalar-help")); } iem_utils-v0.0.20181004/iem_tab/src/tab_rmstodb.c0000644000175000017500000001142113303612036021510 0ustar zmoelnigzmoelnig/* For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. iem_tab written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2010 */ #include "m_pd.h" #include "iemlib.h" #include "iem_tab.h" #include #define IEMTABLOGTEN 2.302585092994046 /* -------------------------- tab_rmstodb ------------------------------ */ typedef struct _tab_rmstodb { t_object x_obj; int x_size_src1; int x_size_dst; int x_offset_src1; int x_offset_dst; iemarray_t *x_beg_mem_src1; iemarray_t *x_beg_mem_dst; t_symbol *x_sym_scr1; t_symbol *x_sym_dst; } t_tab_rmstodb; static t_class *tab_rmstodb_class; static void tab_rmstodb_src(t_tab_rmstodb *x, t_symbol *s) { x->x_sym_scr1 = s; } static void tab_rmstodb_dst(t_tab_rmstodb *x, t_symbol *s) { x->x_sym_dst = s; } static void tab_rmstodb_bang(t_tab_rmstodb *x) { int i, n; int ok_src, ok_dst; iemarray_t *vec_src, *vec_dst; ok_src = iem_tab_check_arrays(gensym("tab_rmstodb"), x->x_sym_scr1, &x->x_beg_mem_src1, &x->x_size_src1, 0); ok_dst = iem_tab_check_arrays(gensym("tab_rmstodb"), x->x_sym_dst, &x->x_beg_mem_dst, &x->x_size_dst, 0); if(ok_src && ok_dst) { if(x->x_size_src1 < x->x_size_dst) n = x->x_size_src1; else n = x->x_size_dst; vec_src = x->x_beg_mem_src1; vec_dst = x->x_beg_mem_dst; if(n) { t_garray *a; for(i=0; ix_obj.ob_outlet); a = (t_garray *)pd_findbyclass(x->x_sym_dst, garray_class); garray_redraw(a); } } } static void tab_rmstodb_list(t_tab_rmstodb *x, t_symbol *s, int argc, t_atom *argv) { int beg_src, beg_dst; int i, n; int ok_src, ok_dst; iemarray_t *vec_src, *vec_dst; if((argc >= 3) && IS_A_FLOAT(argv,0) && IS_A_FLOAT(argv,1) && IS_A_FLOAT(argv,2)) { beg_src = (int)atom_getintarg(0, argc, argv); beg_dst = (int)atom_getintarg(1, argc, argv); n = (int)atom_getintarg(2, argc, argv); if(beg_src < 0) beg_src = 0; if(beg_dst < 0) beg_dst = 0; if(n < 0) n = 0; ok_src = iem_tab_check_arrays(gensym("tab_rmstodb"), x->x_sym_scr1, &x->x_beg_mem_src1, &x->x_size_src1, beg_src+n); ok_dst = iem_tab_check_arrays(gensym("tab_rmstodb"), x->x_sym_dst, &x->x_beg_mem_dst, &x->x_size_dst, beg_dst+n); if(ok_src && ok_dst) { vec_src = x->x_beg_mem_src1 + beg_src; vec_dst = x->x_beg_mem_dst + beg_dst; if(n) { t_garray *a; for(i=0; ix_obj.ob_outlet); a = (t_garray *)pd_findbyclass(x->x_sym_dst, garray_class); garray_redraw(a); } } } else { post("tab_rmstodb-ERROR: list need 3 float arguments:"); post(" source_offset + destination_offset + number_of_samples_to_rmstodb"); } } static void tab_rmstodb_free(t_tab_rmstodb *x) { } static void *tab_rmstodb_new(t_symbol *s, int argc, t_atom *argv) { t_tab_rmstodb *x = (t_tab_rmstodb *)pd_new(tab_rmstodb_class); t_symbol *src, *dst; if((argc >= 2) && IS_A_SYMBOL(argv,0) && IS_A_SYMBOL(argv,1)) { src = (t_symbol *)atom_getsymbolarg(0, argc, argv); dst = (t_symbol *)atom_getsymbolarg(1, argc, argv); } else if((argc >= 1) && IS_A_SYMBOL(argv,0)) { src = (t_symbol *)atom_getsymbolarg(0, argc, argv); dst = src; } else { post("tab_rmstodb-ERROR: need 2 symbols arguments:"); post(" source_array_name + destination_array_name"); return(0); } x->x_sym_scr1 = src; x->x_sym_dst = dst; outlet_new(&x->x_obj, &s_bang); return(x); } void tab_rmstodb_setup(void) { tab_rmstodb_class = class_new(gensym("tab_rmstodb"), (t_newmethod)tab_rmstodb_new, (t_method)tab_rmstodb_free, sizeof(t_tab_rmstodb), 0, A_GIMME, 0); class_addbang(tab_rmstodb_class, (t_method)tab_rmstodb_bang); class_addlist(tab_rmstodb_class, (t_method)tab_rmstodb_list); class_addmethod(tab_rmstodb_class, (t_method)tab_rmstodb_src, gensym("src"), A_DEFSYMBOL, 0); class_addmethod(tab_rmstodb_class, (t_method)tab_rmstodb_src, gensym("src1"), A_DEFSYMBOL, 0); class_addmethod(tab_rmstodb_class, (t_method)tab_rmstodb_dst, gensym("dst"), A_DEFSYMBOL, 0); } iem_utils-v0.0.20181004/iem_tab/src/tab_ne.c0000644000175000017500000001307513303612036020447 0ustar zmoelnigzmoelnig/* For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. iem_tab written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2009 */ #include "m_pd.h" #include "iemlib.h" #include "iem_tab.h" /* -------------------------- tab_ne ------------------------------ */ /* if(x_beg_mem_src1[i] != x_beg_mem_src2[i]) */ /* x_beg_mem_dst[i] = 1.0f; */ /* else */ /* x_beg_mem_dst[i] = 0.0f; */ typedef struct _tab_ne { t_object x_obj; int x_size_src1; int x_size_src2; int x_size_dst; int x_offset_src1; int x_offset_src2; int x_offset_dst; iemarray_t *x_beg_mem_src1; iemarray_t *x_beg_mem_src2; iemarray_t *x_beg_mem_dst; t_symbol *x_sym_scr1; t_symbol *x_sym_scr2; t_symbol *x_sym_dst; } t_tab_ne; static t_class *tab_ne_class; static void tab_ne_src1(t_tab_ne *x, t_symbol *s) { x->x_sym_scr1 = s; } static void tab_ne_src2(t_tab_ne *x, t_symbol *s) { x->x_sym_scr2 = s; } static void tab_ne_dst(t_tab_ne *x, t_symbol *s) { x->x_sym_dst = s; } static void tab_ne_bang(t_tab_ne *x) { int i, n; int ok_src1, ok_src2, ok_dst; iemarray_t *vec_src1, *vec_src2, *vec_dst; ok_src1 = iem_tab_check_arrays(gensym("tab_ne"), x->x_sym_scr1, &x->x_beg_mem_src1, &x->x_size_src1, 0); ok_src2 = iem_tab_check_arrays(gensym("tab_ne"), x->x_sym_scr2, &x->x_beg_mem_src2, &x->x_size_src2, 0); ok_dst = iem_tab_check_arrays(gensym("tab_ne"), x->x_sym_dst, &x->x_beg_mem_dst, &x->x_size_dst, 0); if(ok_src1 && ok_src2 && ok_dst) { if(x->x_size_src1 < x->x_size_dst) n = x->x_size_src1; else n = x->x_size_dst; if(x->x_size_src2 < n) n = x->x_size_src2; vec_src1 = x->x_beg_mem_src1; vec_src2 = x->x_beg_mem_src2; vec_dst = x->x_beg_mem_dst; if(n) { t_garray *a; for(i=0; ix_obj.ob_outlet); a = (t_garray *)pd_findbyclass(x->x_sym_dst, garray_class); garray_redraw(a); } } } static void tab_ne_list(t_tab_ne *x, t_symbol *s, int argc, t_atom *argv) { int beg_src1, beg_src2, beg_dst; int i, n; int ok_src1, ok_src2, ok_dst; iemarray_t *vec_src1, *vec_src2, *vec_dst; if((argc >= 4) && IS_A_FLOAT(argv,0) && IS_A_FLOAT(argv,1) && IS_A_FLOAT(argv,2) && IS_A_FLOAT(argv,3)) { beg_src1 = (int)atom_getintarg(0, argc, argv); beg_src2 = (int)atom_getintarg(1, argc, argv); beg_dst = (int)atom_getintarg(2, argc, argv); n = (int)atom_getintarg(3, argc, argv); if(beg_src1 < 0) beg_src1 = 0; if(beg_src2 < 0) beg_src2 = 0; if(beg_dst < 0) beg_dst = 0; if(n < 0) n = 0; ok_src1 = iem_tab_check_arrays(gensym("tab_ne"), x->x_sym_scr1, &x->x_beg_mem_src1, &x->x_size_src1, beg_src1+n); ok_src2 = iem_tab_check_arrays(gensym("tab_ne"), x->x_sym_scr2, &x->x_beg_mem_src2, &x->x_size_src2, beg_src2+n); ok_dst = iem_tab_check_arrays(gensym("tab_ne"), x->x_sym_dst, &x->x_beg_mem_dst, &x->x_size_dst, beg_dst+n); if(ok_src1 && ok_src2 && ok_dst) { vec_src1 = x->x_beg_mem_src1 + beg_src1; vec_src2 = x->x_beg_mem_src2 + beg_src2; vec_dst = x->x_beg_mem_dst + beg_dst; if(n) { t_garray *a; for(i=0; ix_obj.ob_outlet); a = (t_garray *)pd_findbyclass(x->x_sym_dst, garray_class); garray_redraw(a); } } } else { post("tab_ne-ERROR: list need 4 float arguments:"); post(" source1_offset + source2_offset + destination_offset + number_of_samples_to_compare"); } } static void tab_ne_free(t_tab_ne *x) { } static void *tab_ne_new(t_symbol *s, int argc, t_atom *argv) { t_tab_ne *x = (t_tab_ne *)pd_new(tab_ne_class); t_symbol *src1, *src2, *dst; if((argc >= 3) && IS_A_SYMBOL(argv,0) && IS_A_SYMBOL(argv,1) && IS_A_SYMBOL(argv,2)) { src1 = (t_symbol *)atom_getsymbolarg(0, argc, argv); src2 = (t_symbol *)atom_getsymbolarg(1, argc, argv); dst = (t_symbol *)atom_getsymbolarg(2, argc, argv); } else if((argc >= 2) && IS_A_SYMBOL(argv,0) && IS_A_SYMBOL(argv,1)) { src1 = (t_symbol *)atom_getsymbolarg(0, argc, argv); dst = src1; src2 = (t_symbol *)atom_getsymbolarg(1, argc, argv); } else { post("tab_ne-ERROR: need 3 symbols arguments:"); post(" source1_array_name + source2_array_name + destination_array_name"); return(0); } x->x_sym_scr1 = src1; x->x_sym_scr2 = src2; x->x_sym_dst = dst; outlet_new(&x->x_obj, &s_bang); return(x); } void tab_ne_setup(void) { tab_ne_class = class_new(gensym("tab_ne"), (t_newmethod)tab_ne_new, (t_method)tab_ne_free, sizeof(t_tab_ne), 0, A_GIMME, 0); class_addbang(tab_ne_class, (t_method)tab_ne_bang); class_addlist(tab_ne_class, (t_method)tab_ne_list); class_addmethod(tab_ne_class, (t_method)tab_ne_src1, gensym("src1"), A_DEFSYMBOL, 0); class_addmethod(tab_ne_class, (t_method)tab_ne_src2, gensym("src2"), A_DEFSYMBOL, 0); class_addmethod(tab_ne_class, (t_method)tab_ne_dst, gensym("dst"), A_DEFSYMBOL, 0); // class_sethelpsymbol(tab_ne_class, gensym("iemhelp2/tab_ne-help")); } iem_utils-v0.0.20181004/iem_tab/src/tab_lt_scalar.c0000644000175000017500000001172713303612037022014 0ustar zmoelnigzmoelnig/* For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. iem_tab written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2009 */ #include "m_pd.h" #include "iemlib.h" #include "iem_tab.h" /* -------------------------- tab_lt_scalar ------------------------------ */ /* if(x_beg_mem_src1[i] < compare) */ /* x_beg_mem_dst[i] = 1.0f; */ /* else */ /* x_beg_mem_dst[i] += 0.0f; */ typedef struct _tab_lt_scalar { t_object x_obj; int x_size_src1; int x_size_dst; int x_offset_src1; int x_offset_dst; iemarray_t *x_beg_mem_src1; iemarray_t *x_beg_mem_dst; t_symbol *x_sym_scr1; t_symbol *x_sym_dst; } t_tab_lt_scalar; static t_class *tab_lt_scalar_class; static void tab_lt_scalar_src(t_tab_lt_scalar *x, t_symbol *s) { x->x_sym_scr1 = s; } static void tab_lt_scalar_float(t_tab_lt_scalar *x, t_floatarg compare) { int i, n; int ok_src1, ok_dst; iemarray_t *vec_src1, *vec_dst; ok_src1 = iem_tab_check_arrays(gensym("tab_lt_scalar"), x->x_sym_scr1, &x->x_beg_mem_src1, &x->x_size_src1, 0); ok_dst = iem_tab_check_arrays(gensym("tab_lt_scalar"), x->x_sym_dst, &x->x_beg_mem_dst, &x->x_size_dst, 0); if(ok_src1 && ok_dst) { if(x->x_size_src1 < x->x_size_dst) n = x->x_size_src1; else n = x->x_size_dst; vec_src1 = x->x_beg_mem_src1; vec_dst = x->x_beg_mem_dst; if(n) { t_garray *a; for(i=0; ix_obj.ob_outlet); a = (t_garray *)pd_findbyclass(x->x_sym_dst, garray_class); garray_redraw(a); } } } static void tab_lt_scalar_dst(t_tab_lt_scalar *x, t_symbol *s) { x->x_sym_dst = s; } static void tab_lt_scalar_list(t_tab_lt_scalar *x, t_symbol *s, int argc, t_atom *argv) { int beg_src1, beg_dst; int i, n; int ok_src1, ok_dst; t_float compare; iemarray_t *vec_src1, *vec_dst; if((argc >= 4) && IS_A_FLOAT(argv,0) && IS_A_FLOAT(argv,1) && IS_A_FLOAT(argv,2) && IS_A_FLOAT(argv,3)) { beg_src1 = (int)atom_getintarg(0, argc, argv); beg_dst = (int)atom_getintarg(1, argc, argv); n = (int)atom_getintarg(2, argc, argv); compare = (t_float)atom_getfloatarg(3, argc, argv); if(beg_src1 < 0) beg_src1 = 0; if(beg_dst < 0) beg_dst = 0; if(n < 0) n = 0; ok_src1 = iem_tab_check_arrays(gensym("tab_lt_scalar"), x->x_sym_scr1, &x->x_beg_mem_src1, &x->x_size_src1, beg_src1+n); ok_dst = iem_tab_check_arrays(gensym("tab_lt_scalar"), x->x_sym_dst, &x->x_beg_mem_dst, &x->x_size_dst, beg_dst+n); if(ok_src1 && ok_dst) { vec_src1 = x->x_beg_mem_src1 + beg_src1; vec_dst = x->x_beg_mem_dst + beg_dst; if(n) { t_garray *a; for(i=0; ix_obj.ob_outlet); a = (t_garray *)pd_findbyclass(x->x_sym_dst, garray_class); garray_redraw(a); } } } else { post("tab_lt_scalar-ERROR: list need 4 float arguments:"); post(" source1_offset + destination_offset + number_of_samples_to_compare + compare_scalar"); } } static void tab_lt_scalar_free(t_tab_lt_scalar *x) { } static void *tab_lt_scalar_new(t_symbol *s, int argc, t_atom *argv) { t_tab_lt_scalar *x = (t_tab_lt_scalar *)pd_new(tab_lt_scalar_class); t_symbol *src1, *dst; if((argc >= 2) && IS_A_SYMBOL(argv,0) && IS_A_SYMBOL(argv,1)) { src1 = (t_symbol *)atom_getsymbolarg(0, argc, argv); dst = (t_symbol *)atom_getsymbolarg(1, argc, argv); } else if((argc >= 1) && IS_A_SYMBOL(argv,0)) { src1 = (t_symbol *)atom_getsymbolarg(0, argc, argv); dst = src1; } else { post("tab_lt_scalar-ERROR: need 2 symbol arguments:"); post(" source_array_name + destination_array_name"); return(0); } x->x_sym_scr1 = src1; x->x_sym_dst = dst; outlet_new(&x->x_obj, &s_bang); return(x); } void tab_lt_scalar_setup(void) { tab_lt_scalar_class = class_new(gensym("tab_lt_scalar"), (t_newmethod)tab_lt_scalar_new, (t_method)tab_lt_scalar_free, sizeof(t_tab_lt_scalar), 0, A_GIMME, 0); class_addfloat(tab_lt_scalar_class, (t_method)tab_lt_scalar_float); class_addlist(tab_lt_scalar_class, (t_method)tab_lt_scalar_list); class_addmethod(tab_lt_scalar_class, (t_method)tab_lt_scalar_src, gensym("src1"), A_DEFSYMBOL, 0); class_addmethod(tab_lt_scalar_class, (t_method)tab_lt_scalar_src, gensym("src"), A_DEFSYMBOL, 0); class_addmethod(tab_lt_scalar_class, (t_method)tab_lt_scalar_dst, gensym("dst"), A_DEFSYMBOL, 0); // class_sethelpsymbol(tab_lt_scalar_class, gensym("iemhelp2/tab_lt_scalar-help")); } iem_utils-v0.0.20181004/iem_tab/src/tab_mul_scalar.c0000644000175000017500000001124313303612037022163 0ustar zmoelnigzmoelnig/* For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. iem_tab written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2009 */ #include "m_pd.h" #include "iemlib.h" #include "iem_tab.h" /* -------------------------- tab_mul_scalar ------------------------------ */ /* x_beg_mem_dst[i] = x_beg_mem_src1[i]*m */ typedef struct _tab_mul_scalar { t_object x_obj; int x_size_src1; int x_size_dst; int x_offset_src1; int x_offset_dst; iemarray_t *x_beg_mem_src1; iemarray_t *x_beg_mem_dst; t_symbol *x_sym_scr1; t_symbol *x_sym_dst; } t_tab_mul_scalar; static t_class *tab_mul_scalar_class; static void tab_mul_scalar_src(t_tab_mul_scalar *x, t_symbol *s) { x->x_sym_scr1 = s; } static void tab_mul_scalar_float(t_tab_mul_scalar *x, t_floatarg m) { int i, n; int ok_src1, ok_dst; iemarray_t *vec_src1, *vec_dst; ok_src1 = iem_tab_check_arrays(gensym("tab_mul_scalar"), x->x_sym_scr1, &x->x_beg_mem_src1, &x->x_size_src1, 0); ok_dst = iem_tab_check_arrays(gensym("tab_mul_scalar"), x->x_sym_dst, &x->x_beg_mem_dst, &x->x_size_dst, 0); if(ok_src1 && ok_dst) { if(x->x_size_src1 < x->x_size_dst) n = x->x_size_src1; else n = x->x_size_dst; vec_src1 = x->x_beg_mem_src1; vec_dst = x->x_beg_mem_dst; if(n) { t_garray *a; for(i=0; ix_obj.ob_outlet); a = (t_garray *)pd_findbyclass(x->x_sym_dst, garray_class); garray_redraw(a); } } } static void tab_mul_scalar_dst(t_tab_mul_scalar *x, t_symbol *s) { x->x_sym_dst = s; } static void tab_mul_scalar_list(t_tab_mul_scalar *x, t_symbol *s, int argc, t_atom *argv) { int beg_src1, beg_dst; int i, n; int ok_src1, ok_dst; t_float m; iemarray_t *vec_src1, *vec_dst; if((argc >= 4) && IS_A_FLOAT(argv,0) && IS_A_FLOAT(argv,1) && IS_A_FLOAT(argv,2) && IS_A_FLOAT(argv,3)) { beg_src1 = (int)atom_getintarg(0, argc, argv); beg_dst = (int)atom_getintarg(1, argc, argv); n = (int)atom_getintarg(2, argc, argv); m = (t_float)atom_getfloatarg(3, argc, argv); if(beg_src1 < 0) beg_src1 = 0; if(beg_dst < 0) beg_dst = 0; if(n < 0) n = 0; ok_src1 = iem_tab_check_arrays(gensym("tab_mul_scalar"), x->x_sym_scr1, &x->x_beg_mem_src1, &x->x_size_src1, beg_src1+n); ok_dst = iem_tab_check_arrays(gensym("tab_mul_scalar"), x->x_sym_dst, &x->x_beg_mem_dst, &x->x_size_dst, beg_dst+n); if(ok_src1 && ok_dst) { vec_src1 = x->x_beg_mem_src1 + beg_src1; vec_dst = x->x_beg_mem_dst + beg_dst; if(n) { t_garray *a; for(i=0; ix_obj.ob_outlet); a = (t_garray *)pd_findbyclass(x->x_sym_dst, garray_class); garray_redraw(a); } } } else { post("tab_mul_scalar-ERROR: list need 4 float arguments:"); post(" source1_offset + destination_offset + number_of_samples_to_mul + mul_scalar"); } } static void tab_mul_scalar_free(t_tab_mul_scalar *x) { } static void *tab_mul_scalar_new(t_symbol *s, int argc, t_atom *argv) { t_tab_mul_scalar *x = (t_tab_mul_scalar *)pd_new(tab_mul_scalar_class); t_symbol *src1, *dst; if((argc >= 2) && IS_A_SYMBOL(argv,0) && IS_A_SYMBOL(argv,1)) { src1 = (t_symbol *)atom_getsymbolarg(0, argc, argv); dst = (t_symbol *)atom_getsymbolarg(1, argc, argv); } else if((argc >= 1) && IS_A_SYMBOL(argv,0)) { src1 = (t_symbol *)atom_getsymbolarg(0, argc, argv); dst = src1; } else { post("tab_mul_scalar-ERROR: need 2 symbol arguments:"); post(" source_array_name + destination_array_name"); return(0); } x->x_sym_scr1 = src1; x->x_sym_dst = dst; outlet_new(&x->x_obj, &s_bang); return(x); } void tab_mul_scalar_setup(void) { tab_mul_scalar_class = class_new(gensym("tab_mul_scalar"), (t_newmethod)tab_mul_scalar_new, (t_method)tab_mul_scalar_free, sizeof(t_tab_mul_scalar), 0, A_GIMME, 0); class_addfloat(tab_mul_scalar_class, (t_method)tab_mul_scalar_float); class_addlist(tab_mul_scalar_class, (t_method)tab_mul_scalar_list); class_addmethod(tab_mul_scalar_class, (t_method)tab_mul_scalar_src, gensym("src1"), A_DEFSYMBOL, 0); class_addmethod(tab_mul_scalar_class, (t_method)tab_mul_scalar_src, gensym("src"), A_DEFSYMBOL, 0); class_addmethod(tab_mul_scalar_class, (t_method)tab_mul_scalar_dst, gensym("dst"), A_DEFSYMBOL, 0); // class_sethelpsymbol(tab_mul_scalar_class, gensym("iemhelp2/tab_mul_scalar-help")); } iem_utils-v0.0.20181004/iem_tab/src/tab_max_index.c0000644000175000017500000000737213303612037022025 0ustar zmoelnigzmoelnig/* For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. iem_tab written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2009 */ #include "m_pd.h" #include "iemlib.h" #include "iem_tab.h" /* -------------------------- tab_max_index ------------------------------ */ typedef struct _tab_max_index { t_object x_obj; int x_size_src1; int x_offset_src1; iemarray_t *x_beg_mem_src1; t_symbol *x_sym_scr1; void *x_bang_out; void *x_max_out; void *x_max_index_out; } t_tab_max_index; static t_class *tab_max_index_class; static void tab_max_index_src(t_tab_max_index *x, t_symbol *s) { x->x_sym_scr1 = s; } static void tab_max_index_bang(t_tab_max_index *x) { int i, n; int ok_src, max_index=0; iemarray_t *vec_src; t_float max=-1.0e37; ok_src = iem_tab_check_arrays(gensym("tab_max_index"), x->x_sym_scr1, &x->x_beg_mem_src1, &x->x_size_src1, 0); if(ok_src) { n = x->x_size_src1; vec_src = x->x_beg_mem_src1; if(n) { for(i=0; i max) { max = iemarray_getfloat(vec_src, i); max_index = i; } } outlet_float(x->x_max_out, max); outlet_float(x->x_max_index_out, (t_float)max_index); outlet_bang(x->x_bang_out); } } } static void tab_max_index_list(t_tab_max_index *x, t_symbol *s, int argc, t_atom *argv) { int beg_src; int i, n; int ok_src, max_index=0; iemarray_t *vec_src; t_float max=-1.0e37; if((argc >= 2) && IS_A_FLOAT(argv,0) && IS_A_FLOAT(argv,1)) { beg_src = (int)atom_getintarg(0, argc, argv); n = (int)atom_getintarg(1, argc, argv); if(beg_src < 0) beg_src = 0; if(n < 0) n = 0; ok_src = iem_tab_check_arrays(gensym("tab_max_index"), x->x_sym_scr1, &x->x_beg_mem_src1, &x->x_size_src1, beg_src+n); if(ok_src) { vec_src = x->x_beg_mem_src1 + beg_src; if(n) { for(i=0; i max) { max = iemarray_getfloat(vec_src, i); max_index = i + beg_src; } } outlet_float(x->x_max_out, max); outlet_float(x->x_max_index_out, (t_float)max_index); outlet_bang(x->x_bang_out); } } } else { post("tab_max_index-ERROR: list need 2 float arguments:"); post(" source_offset + number_of_samples_to_calc_max_index"); } } static void tab_max_index_free(t_tab_max_index *x) { } static void *tab_max_index_new(t_symbol *s, int argc, t_atom *argv) { t_tab_max_index *x = (t_tab_max_index *)pd_new(tab_max_index_class); t_symbol *src; if((argc >= 1) && IS_A_SYMBOL(argv,0)) { src = (t_symbol *)atom_getsymbolarg(0, argc, argv); } else { post("tab_max_index-ERROR: need 1 symbol argument:"); post(" source_array_name"); return(0); } x->x_sym_scr1 = src; x->x_bang_out = outlet_new(&x->x_obj, &s_bang); x->x_max_index_out = outlet_new(&x->x_obj, &s_float); x->x_max_out = outlet_new(&x->x_obj, &s_float); return(x); } void tab_max_index_setup(void) { tab_max_index_class = class_new(gensym("tab_max_index"), (t_newmethod)tab_max_index_new, (t_method)tab_max_index_free, sizeof(t_tab_max_index), 0, A_GIMME, 0); class_addbang(tab_max_index_class, (t_method)tab_max_index_bang); class_addlist(tab_max_index_class, (t_method)tab_max_index_list); class_addmethod(tab_max_index_class, (t_method)tab_max_index_src, gensym("src"), A_DEFSYMBOL, 0); class_addmethod(tab_max_index_class, (t_method)tab_max_index_src, gensym("src1"), A_DEFSYMBOL, 0); // class_sethelpsymbol(tab_max_index_class, gensym("iemhelp2/tab_max_index-help")); } iem_utils-v0.0.20181004/iem_tab/src/tab_complex_inv.c0000644000175000017500000002015713303612037022370 0ustar zmoelnigzmoelnig/* For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. iem_tab written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2009 */ #include "m_pd.h" #include "iemlib.h" #include "iem_tab.h" /* -------------------------- tab_complex_inv ------------------------------ */ /* x_beg_mem_dst_re[i] = x_beg_mem_src1_re[i] / (x_beg_mem_src1_re[i]*x_beg_mem_src1_re[i] + x_beg_mem_src1_im[i]*x_beg_mem_src1_im[i]) */ /* x_beg_mem_dst_im[i] = -x_beg_mem_src1_im[i] / (x_beg_mem_src1_re[i]*x_beg_mem_src1_re[i] + x_beg_mem_src1_im[i]*x_beg_mem_src1_im[i]) */ typedef struct _tab_complex_inv { t_object x_obj; int x_size_src1_re; int x_size_dst_re; int x_size_src1_im; int x_size_dst_im; int x_offset_src1_re; int x_offset_dst_re; int x_offset_src1_im; int x_offset_dst_im; iemarray_t *x_beg_mem_src1_re; iemarray_t *x_beg_mem_dst_re; iemarray_t *x_beg_mem_src1_im; iemarray_t *x_beg_mem_dst_im; t_symbol *x_sym_scr1_re; t_symbol *x_sym_dst_re; t_symbol *x_sym_scr1_im; t_symbol *x_sym_dst_im; } t_tab_complex_inv; static t_class *tab_complex_inv_class; static void tab_complex_inv_src1_re(t_tab_complex_inv *x, t_symbol *s) { x->x_sym_scr1_re = s; } static void tab_complex_inv_src1_im(t_tab_complex_inv *x, t_symbol *s) { x->x_sym_scr1_im = s; } static void tab_complex_inv_dst_re(t_tab_complex_inv *x, t_symbol *s) { x->x_sym_dst_re = s; } static void tab_complex_inv_dst_im(t_tab_complex_inv *x, t_symbol *s) { x->x_sym_dst_im = s; } static void tab_complex_inv_bang(t_tab_complex_inv *x) { int i, n; int ok_src1_re, ok_dst_re; int ok_src1_im, ok_dst_im; iemarray_t *vec_src1_re, *vec_dst_re; iemarray_t *vec_src1_im, *vec_dst_im; ok_src1_re = iem_tab_check_arrays(gensym("tab_complex_inv"), x->x_sym_scr1_re, &x->x_beg_mem_src1_re, &x->x_size_src1_re, 0); ok_dst_re = iem_tab_check_arrays(gensym("tab_complex_inv"), x->x_sym_dst_re, &x->x_beg_mem_dst_re, &x->x_size_dst_re, 0); ok_src1_im = iem_tab_check_arrays(gensym("tab_complex_inv"), x->x_sym_scr1_im, &x->x_beg_mem_src1_im, &x->x_size_src1_im, 0); ok_dst_im = iem_tab_check_arrays(gensym("tab_complex_inv"), x->x_sym_dst_im, &x->x_beg_mem_dst_im, &x->x_size_dst_im, 0); if(ok_src1_re && ok_dst_re && ok_src1_im && ok_dst_im) { if(x->x_size_src1_re < x->x_size_dst_re) n = x->x_size_src1_re; else n = x->x_size_dst_re; if(x->x_size_src1_im < n) n = x->x_size_src1_im; if(x->x_size_dst_im < n) n = x->x_size_dst_im; vec_src1_re = x->x_beg_mem_src1_re; vec_dst_re = x->x_beg_mem_dst_re; vec_src1_im = x->x_beg_mem_src1_im; vec_dst_im = x->x_beg_mem_dst_im; if(n) { t_garray *a; for(i=0; ix_obj.ob_outlet); a = (t_garray *)pd_findbyclass(x->x_sym_dst_re, garray_class); garray_redraw(a); a = (t_garray *)pd_findbyclass(x->x_sym_dst_im, garray_class); garray_redraw(a); } } } static void tab_complex_inv_list(t_tab_complex_inv *x, t_symbol *s, int argc, t_atom *argv) { int i, n; int beg_src1_re, beg_dst_re; int beg_src1_im, beg_dst_im; int ok_src1_re, ok_dst_re; int ok_src1_im, ok_dst_im; iemarray_t *vec_src1_re, *vec_dst_re; iemarray_t *vec_src1_im, *vec_dst_im; if((argc >= 5) && IS_A_FLOAT(argv,0) && IS_A_FLOAT(argv,1) && IS_A_FLOAT(argv,2) && IS_A_FLOAT(argv,3) && IS_A_FLOAT(argv,4)) { beg_src1_re = (int)atom_getintarg(0, argc, argv); beg_src1_im = (int)atom_getintarg(1, argc, argv); beg_dst_re = (int)atom_getintarg(2, argc, argv); beg_dst_im = (int)atom_getintarg(3, argc, argv); n = (int)atom_getintarg(4, argc, argv); if(beg_src1_re < 0) beg_src1_re = 0; if(beg_dst_re < 0) beg_dst_re = 0; if(beg_src1_im < 0) beg_src1_im = 0; if(beg_dst_im < 0) beg_dst_im = 0; if(n < 0) n = 0; ok_src1_re = iem_tab_check_arrays(gensym("tab_complex_inv"), x->x_sym_scr1_re, &x->x_beg_mem_src1_re, &x->x_size_src1_re, beg_src1_re+n); ok_dst_re = iem_tab_check_arrays(gensym("tab_complex_inv"), x->x_sym_dst_re, &x->x_beg_mem_dst_re, &x->x_size_dst_re, beg_dst_re+n); ok_src1_im = iem_tab_check_arrays(gensym("tab_complex_inv"), x->x_sym_scr1_im, &x->x_beg_mem_src1_im, &x->x_size_src1_im, beg_src1_im+n); ok_dst_im = iem_tab_check_arrays(gensym("tab_complex_inv"), x->x_sym_dst_im, &x->x_beg_mem_dst_im, &x->x_size_dst_im, beg_dst_im+n); if(ok_src1_re && ok_dst_re && ok_src1_im && ok_dst_im) { vec_src1_re = x->x_beg_mem_src1_re + beg_src1_re; vec_dst_re = x->x_beg_mem_dst_re + beg_dst_re; vec_src1_im = x->x_beg_mem_src1_im + beg_src1_im; vec_dst_im = x->x_beg_mem_dst_im + beg_dst_im; if(n) { t_garray *a; for(i=0; ix_obj.ob_outlet); a = (t_garray *)pd_findbyclass(x->x_sym_dst_re, garray_class); garray_redraw(a); a = (t_garray *)pd_findbyclass(x->x_sym_dst_im, garray_class); garray_redraw(a); } } } else { post("tab_complex_inv-ERROR: list need 5 float arguments:"); post(" source1_real_offset + source1_imag_offset + destination_real_offset + destination_imag_offset + number_of_samples_to_complex_mul"); } } static void tab_complex_inv_free(t_tab_complex_inv *x) { } static void *tab_complex_inv_new(t_symbol *s, int argc, t_atom *argv) { t_tab_complex_inv *x = (t_tab_complex_inv *)pd_new(tab_complex_inv_class); t_symbol *src1_re, *src2_re, *dst_re, *src1_im, *src2_im, *dst_im; if((argc >= 4) && IS_A_SYMBOL(argv,0) && IS_A_SYMBOL(argv,1) && IS_A_SYMBOL(argv,2) && IS_A_SYMBOL(argv,3)) { src1_re = (t_symbol *)atom_getsymbolarg(0, argc, argv); src1_im = (t_symbol *)atom_getsymbolarg(1, argc, argv); dst_re = (t_symbol *)atom_getsymbolarg(2, argc, argv); dst_im = (t_symbol *)atom_getsymbolarg(3, argc, argv); } else if((argc >= 2) && IS_A_SYMBOL(argv,0) && IS_A_SYMBOL(argv,1)) { src1_re = (t_symbol *)atom_getsymbolarg(0, argc, argv); src1_im = (t_symbol *)atom_getsymbolarg(1, argc, argv); dst_re = src1_re; dst_im = src1_im; } else { post("tab_complex_inv-ERROR: need 4 symbols arguments:"); post(" source1_real_array_name + source1_imag_array_name + destination_real_array_name + destination_imag_array_name"); return(0); } x->x_sym_scr1_re = src1_re; x->x_sym_scr1_im = src1_im; x->x_sym_dst_re = dst_re; x->x_sym_dst_im = dst_im; outlet_new(&x->x_obj, &s_bang); return(x); } void tab_complex_inv_setup(void) { tab_complex_inv_class = class_new(gensym("tab_complex_inv"), (t_newmethod)tab_complex_inv_new, (t_method)tab_complex_inv_free, sizeof(t_tab_complex_inv), 0, A_GIMME, 0); class_addbang(tab_complex_inv_class, (t_method)tab_complex_inv_bang); class_addlist(tab_complex_inv_class, (t_method)tab_complex_inv_list); class_addmethod(tab_complex_inv_class, (t_method)tab_complex_inv_src1_re, gensym("src1_re"), A_DEFSYMBOL, 0); class_addmethod(tab_complex_inv_class, (t_method)tab_complex_inv_src1_re, gensym("src_re"), A_DEFSYMBOL, 0); class_addmethod(tab_complex_inv_class, (t_method)tab_complex_inv_dst_re, gensym("dst_re"), A_DEFSYMBOL, 0); class_addmethod(tab_complex_inv_class, (t_method)tab_complex_inv_src1_im, gensym("src1_im"), A_DEFSYMBOL, 0); class_addmethod(tab_complex_inv_class, (t_method)tab_complex_inv_src1_im, gensym("src_im"), A_DEFSYMBOL, 0); class_addmethod(tab_complex_inv_class, (t_method)tab_complex_inv_dst_im, gensym("dst_im"), A_DEFSYMBOL, 0); } iem_utils-v0.0.20181004/iem_tab/src/tab_rfft.c0000644000175000017500000002643213303612037021010 0ustar zmoelnigzmoelnig/* For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. iem_tab written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2009 */ #include "m_pd.h" #include "iemlib.h" #include "iem_tab.h" #include /* -------------------------- tab_rfft ------------------------------ */ /* real time domain FFT to complex spectral domain */ typedef struct _tab_rfft { t_object x_obj; int x_size_src1; int x_size_dst_re; int x_size_dst_im; int x_offset_src1; int x_offset_dst_re; int x_offset_dst_im; int x_fftsize; iemarray_t *x_beg_mem_src1; iemarray_t *x_beg_mem_dst_re; iemarray_t *x_beg_mem_dst_im; TAB_COMPLEX *x_sin_cos; t_symbol *x_sym_src1; t_symbol *x_sym_dst_re; t_symbol *x_sym_dst_im; } t_tab_rfft; static t_class *tab_rfft_class; static void tab_rfft_init(t_tab_rfft *x) { int i, fftsize = x->x_fftsize; t_float f, g; TAB_COMPLEX *sincos = x->x_sin_cos; g = 2.0 * 3.141592653589793 / (t_float)fftsize; for(i=0; ix_fftsize) { x->x_sin_cos = (TAB_COMPLEX *)resizebytes(x->x_sin_cos, x->x_fftsize*sizeof(TAB_COMPLEX), i*sizeof(TAB_COMPLEX)); x->x_fftsize = i; } tab_rfft_init(x); } static void tab_rfft_src(t_tab_rfft *x, t_symbol *s) { x->x_sym_src1 = s; } static void tab_rfft_dst_re(t_tab_rfft *x, t_symbol *s) { x->x_sym_dst_re = s; } static void tab_rfft_dst_im(t_tab_rfft *x, t_symbol *s) { x->x_sym_dst_im = s; } static void tab_rfft_bang(t_tab_rfft *x) { int i, j, k; int ok_src, ok_dst_re, ok_dst_im; int w_index, w_inc, i_inc, v_index; int fftsize = x->x_fftsize; int fs1 = fftsize - 1; int fs2 = fftsize / 2; TAB_COMPLEX w; TAB_COMPLEX *sincos = x->x_sin_cos; iemarray_t *vec_src, *vec_dst_re, *vec_dst_im; t_float old1_re, old1_im, old2_re, old2_im; ok_src = iem_tab_check_arrays(gensym("tab_rfft"), x->x_sym_src1, &x->x_beg_mem_src1, &x->x_size_src1, fftsize); ok_dst_re = iem_tab_check_arrays(gensym("tab_rfft"), x->x_sym_dst_re, &x->x_beg_mem_dst_re, &x->x_size_dst_re, fftsize); ok_dst_im = iem_tab_check_arrays(gensym("tab_rfft"), x->x_sym_dst_im, &x->x_beg_mem_dst_im, &x->x_size_dst_im, fftsize); if(ok_src && ok_dst_re && ok_dst_im) { t_garray *a; vec_src=x->x_beg_mem_src1; vec_dst_re=x->x_beg_mem_dst_re; vec_dst_im=x->x_beg_mem_dst_im; for(k=0; k>= 1; } j = 0; for(i=1;i>= 1; } j = j + k; if(i < j) { old1_re = iemarray_getfloat(vec_dst_re, j); old1_im = iemarray_getfloat(vec_dst_im, j); iemarray_setfloat(vec_dst_re, j, iemarray_getfloat(vec_dst_re, i)); iemarray_setfloat(vec_dst_im, j, iemarray_getfloat(vec_dst_im, i)); iemarray_setfloat(vec_dst_re, i, old1_re); iemarray_setfloat(vec_dst_im, i, old1_im); } } // g = 2.0f / (t_float)fftsize; /* ein fehler tritt auf beim 0.sample, hier sollte nur mal 1.0 multipliziert werden wenn gelten soll : Energie im zeitfenster == Energie im Frequenz-dichte-fenster g = 1.0f; for(i = 0; i < fs2; i++) { vec_dst_re[i] *= g; vec_dst_im[i] *= g; } */ iemarray_setfloat(vec_dst_im, 0, 0.0); iemarray_setfloat(vec_dst_im, fs2, 0.0); for(i = fs2+1; i < fftsize; i++) { iemarray_setfloat(vec_dst_re, i, 0.0); iemarray_setfloat(vec_dst_im, i, 0.0); } outlet_bang(x->x_obj.ob_outlet); a = (t_garray *)pd_findbyclass(x->x_sym_dst_re, garray_class); garray_redraw(a); a = (t_garray *)pd_findbyclass(x->x_sym_dst_im, garray_class); garray_redraw(a); } } static void tab_rfft_list(t_tab_rfft *x, t_symbol *s, int argc, t_atom *argv) { int beg_src, beg_dst_re, beg_dst_im; int i, j, k; int ok_src, ok_dst_re, ok_dst_im; int w_index, w_inc, i_inc, v_index; int fftsize = x->x_fftsize; int fs1 = fftsize - 1; int fs2 = fftsize / 2; TAB_COMPLEX w; TAB_COMPLEX *sincos = x->x_sin_cos; iemarray_t *vec_src, *vec_dst_re, *vec_dst_im; t_float old1_re, old1_im, old2_re, old2_im; if((argc >= 3) && IS_A_FLOAT(argv,0) && IS_A_FLOAT(argv,1) && IS_A_FLOAT(argv,2)) { beg_src = (int)atom_getintarg(0, argc, argv); beg_dst_re = (int)atom_getintarg(1, argc, argv); beg_dst_im = (int)atom_getintarg(2, argc, argv); if(beg_src < 0) beg_src = 0; if(beg_dst_re < 0) beg_dst_re = 0; if(beg_dst_im < 0) beg_dst_im = 0; ok_src = iem_tab_check_arrays(gensym("tab_rfft"), x->x_sym_src1, &x->x_beg_mem_src1, &x->x_size_src1, beg_src+fftsize); ok_dst_re = iem_tab_check_arrays(gensym("tab_rfft"), x->x_sym_dst_re, &x->x_beg_mem_dst_re, &x->x_size_dst_re, beg_dst_re+fftsize); ok_dst_im = iem_tab_check_arrays(gensym("tab_rfft"), x->x_sym_dst_im, &x->x_beg_mem_dst_im, &x->x_size_dst_im, beg_dst_im+fftsize); if(ok_src && ok_dst_re && ok_dst_im) { t_garray *a; vec_src=x->x_beg_mem_src1 + beg_src; vec_dst_re=x->x_beg_mem_dst_re + beg_dst_re; vec_dst_im=x->x_beg_mem_dst_im + beg_dst_im; for(k=0; k>= 1; } j = 0; for(i=1;i>= 1; } j = j + k; if(i < j) { old1_re = iemarray_getfloat(vec_dst_re, j); old1_im = iemarray_getfloat(vec_dst_im, j); iemarray_setfloat(vec_dst_re, j, iemarray_getfloat(vec_dst_re, i)); iemarray_setfloat(vec_dst_im, j, iemarray_getfloat(vec_dst_im, i)); iemarray_setfloat(vec_dst_re, i, old1_re); iemarray_setfloat(vec_dst_im, i, old1_im); } } // g = 2.0f / (t_float)fftsize; /* ein fehler tritt auf beim 0.sample, hier sollte nur mal 1.0 multipliziert werden wenn gelten soll : Energie im zeitfenster == Energie im Frequenz-dichte-fenster g = 1.0f; for(i = 0; i < fs2; i++) { vec_dst_re[i] *= g; vec_dst_im[i] *= g; } */ iemarray_setfloat(vec_dst_im, 0, 0.0); iemarray_setfloat(vec_dst_im, fs2, 0.0); for(i = fs2+1; i < fftsize; i++) { iemarray_setfloat(vec_dst_re, i, 0.0); iemarray_setfloat(vec_dst_im, i, 0.0); } outlet_bang(x->x_obj.ob_outlet); a = (t_garray *)pd_findbyclass(x->x_sym_dst_re, garray_class); garray_redraw(a); a = (t_garray *)pd_findbyclass(x->x_sym_dst_im, garray_class); garray_redraw(a); } } else { post("tab_rfft-ERROR: list need 3 float arguments:"); post(" source_offset + destination_real_offset + destination_imag_offset"); } } static void tab_rfft_free(t_tab_rfft *x) { freebytes(x->x_sin_cos, x->x_fftsize * sizeof(TAB_COMPLEX)); } static void *tab_rfft_new(t_symbol *s, int argc, t_atom *argv) { t_tab_rfft *x = (t_tab_rfft *)pd_new(tab_rfft_class); t_symbol *src, *dst_re, *dst_im; int fftsize, i=1; if((argc >= 4) && IS_A_SYMBOL(argv,0) && IS_A_SYMBOL(argv,1) && IS_A_SYMBOL(argv,2) && IS_A_FLOAT(argv,3)) { src = (t_symbol *)atom_getsymbolarg(0, argc, argv); dst_re = (t_symbol *)atom_getsymbolarg(1, argc, argv); dst_im = (t_symbol *)atom_getsymbolarg(2, argc, argv); fftsize = (int)atom_getintarg(3, argc, argv); } else { post("tab_rfft-ERROR: need 3 symbols + 1 float arguments:"); post(" source_array_name + destination_real_array_name + destination_imag_array_name + FFT-size"); return(0); } if(fftsize < 8) fftsize = 8; while(i <= fftsize) i *= 2; i /= 2; fftsize = i; x->x_fftsize = fftsize; x->x_sym_src1 = src; x->x_sym_dst_re = dst_re; x->x_sym_dst_im = dst_im; x->x_sin_cos = (TAB_COMPLEX *)getbytes(x->x_fftsize * sizeof(TAB_COMPLEX)); tab_rfft_init(x); outlet_new(&x->x_obj, &s_bang); return(x); } void tab_rfft_setup(void) { tab_rfft_class = class_new(gensym("tab_rfft"), (t_newmethod)tab_rfft_new, (t_method)tab_rfft_free, sizeof(t_tab_rfft), 0, A_GIMME, 0); class_addbang(tab_rfft_class, (t_method)tab_rfft_bang); class_addlist(tab_rfft_class, (t_method)tab_rfft_list); class_addmethod(tab_rfft_class, (t_method)tab_rfft_fftsize, gensym("fftsize"), A_DEFFLOAT, 0); class_addmethod(tab_rfft_class, (t_method)tab_rfft_src, gensym("src"), A_DEFSYMBOL, 0); class_addmethod(tab_rfft_class, (t_method)tab_rfft_src, gensym("src1"), A_DEFSYMBOL, 0); class_addmethod(tab_rfft_class, (t_method)tab_rfft_dst_re, gensym("dst_re"), A_DEFSYMBOL, 0); class_addmethod(tab_rfft_class, (t_method)tab_rfft_dst_im, gensym("dst_im"), A_DEFSYMBOL, 0); class_addmethod(tab_rfft_class, (t_method)tab_rfft_dst_re, gensym("dst1"), A_DEFSYMBOL, 0); class_addmethod(tab_rfft_class, (t_method)tab_rfft_dst_im, gensym("dst2"), A_DEFSYMBOL, 0); } iem_utils-v0.0.20181004/iem_tab/src/tab_reverse.c0000644000175000017500000001122513303612037021514 0ustar zmoelnigzmoelnig/* For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. iem_tab written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2009 */ #include "m_pd.h" #include "iemlib.h" #include "iem_tab.h" /* -------------------------- tab_reverse ------------------------------ */ typedef struct _tab_reverse { t_object x_obj; int x_size_src1; int x_size_dst; int x_offset_src1; int x_offset_dst; iemarray_t *x_beg_mem_src1; iemarray_t *x_beg_mem_dst; t_symbol *x_sym_scr1; t_symbol *x_sym_dst; } t_tab_reverse; static t_class *tab_reverse_class; static void tab_reverse_src(t_tab_reverse *x, t_symbol *s) { x->x_sym_scr1 = s; } static void tab_reverse_dst(t_tab_reverse *x, t_symbol *s) { x->x_sym_dst = s; } static void tab_reverse_bang(t_tab_reverse *x) { int i, j, n, n2; int ok_src, ok_dst; iemarray_t *vec_src, *vec_dst; t_float f; ok_src = iem_tab_check_arrays(gensym("tab_reverse"), x->x_sym_scr1, &x->x_beg_mem_src1, &x->x_size_src1, 0); ok_dst = iem_tab_check_arrays(gensym("tab_reverse"), x->x_sym_dst, &x->x_beg_mem_dst, &x->x_size_dst, 0); if(ok_src && ok_dst) { if(x->x_size_src1 < x->x_size_dst) n = x->x_size_src1; else n = x->x_size_dst; vec_src = x->x_beg_mem_src1; vec_dst = x->x_beg_mem_dst; n2 = n/2; if(n) { t_garray *a; for(i=0, j=n-1; ix_obj.ob_outlet); a = (t_garray *)pd_findbyclass(x->x_sym_dst, garray_class); garray_redraw(a); } } } static void tab_reverse_list(t_tab_reverse *x, t_symbol *s, int argc, t_atom *argv) { int beg_src, beg_dst; int i, j, n, n2; int ok_src, ok_dst; iemarray_t *vec_src, *vec_dst; t_float f; if((argc >= 3) && IS_A_FLOAT(argv,0) && IS_A_FLOAT(argv,1) && IS_A_FLOAT(argv,2)) { beg_src = (int)atom_getintarg(0, argc, argv); beg_dst = (int)atom_getintarg(1, argc, argv); n = (int)atom_getintarg(2, argc, argv); if(beg_src < 0) beg_src = 0; if(beg_dst < 0) beg_dst = 0; if(n < 0) n = 0; ok_src = iem_tab_check_arrays(gensym("tab_reverse"), x->x_sym_scr1, &x->x_beg_mem_src1, &x->x_size_src1, beg_src+n); ok_dst = iem_tab_check_arrays(gensym("tab_reverse"), x->x_sym_dst, &x->x_beg_mem_dst, &x->x_size_dst, beg_dst+n); if(ok_src && ok_dst) { vec_src = x->x_beg_mem_src1 + beg_src; vec_dst = x->x_beg_mem_dst + beg_dst; n2 = n/2; if(n) { t_garray *a; for(i=0, j=n-1; ix_obj.ob_outlet); a = (t_garray *)pd_findbyclass(x->x_sym_dst, garray_class); garray_redraw(a); } } } else { post("tab_reverse-ERROR: list need 3 float arguments:"); post(" source_offset + destination_offset + number_of_samples_to_copy"); } } static void tab_reverse_free(t_tab_reverse *x) { } static void *tab_reverse_new(t_symbol *s, int argc, t_atom *argv) { t_tab_reverse *x = (t_tab_reverse *)pd_new(tab_reverse_class); t_symbol *src, *dst; if((argc >= 2) && IS_A_SYMBOL(argv,0) && IS_A_SYMBOL(argv,1)) { src = (t_symbol *)atom_getsymbolarg(0, argc, argv); dst = (t_symbol *)atom_getsymbolarg(1, argc, argv); } else if((argc >= 1) && IS_A_SYMBOL(argv,0)) { src = (t_symbol *)atom_getsymbolarg(0, argc, argv); dst = src; } else { post("tab_reverse-ERROR: need 2 symbols arguments:"); post(" source_array_name + destination_array_name"); return(0); } x->x_sym_scr1 = src; x->x_sym_dst = dst; outlet_new(&x->x_obj, &s_bang); return(x); } void tab_reverse_setup(void) { tab_reverse_class = class_new(gensym("tab_reverse"), (t_newmethod)tab_reverse_new, (t_method)tab_reverse_free, sizeof(t_tab_reverse), 0, A_GIMME, 0); class_addbang(tab_reverse_class, (t_method)tab_reverse_bang); class_addlist(tab_reverse_class, (t_method)tab_reverse_list); class_addmethod(tab_reverse_class, (t_method)tab_reverse_src, gensym("src"), A_DEFSYMBOL, 0); class_addmethod(tab_reverse_class, (t_method)tab_reverse_src, gensym("src1"), A_DEFSYMBOL, 0); class_addmethod(tab_reverse_class, (t_method)tab_reverse_dst, gensym("dst"), A_DEFSYMBOL, 0); // class_sethelpsymbol(tab_reverse_class, gensym("iemhelp2/tab_reverse-help")); } iem_utils-v0.0.20181004/iem_tab/src/VC7/0000755000175000017500000000000012630366350017453 5ustar zmoelnigzmoelnigiem_utils-v0.0.20181004/iem_tab/src/VC7/iem_tab.vcproj0000644000175000017500000000242112630366350022277 0ustar zmoelnigzmoelnig iem_utils-v0.0.20181004/iem_tab/src/VC7/makefile_vc7proj0000644000175000017500000000311412630366350022624 0ustar zmoelnigzmoelnigTARGET = iem_tab all: ..\$(TARGET).dll VIS_CPP_PATH = "C:\Programme\Microsoft Visual Studio .NET 2003\Vc7" VIS_SDK_PATH = "C:\Programme\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK" PD_INST_PATH = "C:\Programme\pd-0.42-5" PD_WIN_INCLUDE_PATH = /I. /I$(PD_INST_PATH)\src /I$(VIS_CPP_PATH)\include PD_WIN_C_FLAGS = /nologo /W3 /WX /DMSW /DNT /DPD /DWIN32 /DWINDOWS /Ox -D_CRT_SECURE_NO_WARNINGS PD_WIN_L_FLAGS = /nologo PD_WIN_LIB = /NODEFAULTLIB:libcmt /NODEFAULTLIB:oldnames /NODEFAULTLIB:kernel32 \ $(VIS_CPP_PATH)\lib\libcmt.lib \ $(VIS_CPP_PATH)\lib\oldnames.lib \ $(VIS_SDK_PATH)\lib\kernel32.lib \ $(PD_INST_PATH)\bin\pd.lib SRC = tab_abs.c \ tab_add.c \ tab_add_scalar.c \ tab_carth2polar.c \ tab_complex_inv.c \ tab_complex_mul.c \ tab_const.c \ tab_conv.c \ tab_copy.c \ tab_counter.c \ tab_cross_corr.c \ tab_div.c \ tab_eq.c \ tab_eq_scalar.c \ tab_fft.c \ tab_find_exact_peaks.c \ tab_find_peaks.c \ tab_ge.c \ tab_ge_scalar.c \ tab_gt.c \ tab_gt_scalar.c \ tab_get_size.c \ tab_ifft.c \ tab_le.c \ tab_le_scalar.c \ tab_lt.c \ tab_lt_scalar.c \ tab_max_index.c \ tab_min_index.c \ tab_min_max.c \ tab_mul.c \ tab_mul_scalar.c \ tab_ne.c \ tab_ne_scalar.c \ tab_reverse.c \ tab_rfft.c \ tab_rifft.c \ tab_sqrt.c \ tab_sub.c \ tab_sum.c \ iem_tab.c OBJ = $(SRC:.c=.obj) .c.obj: cl $(PD_WIN_C_FLAGS) $(PD_WIN_INCLUDE_PATH) /c $*.c ..\$(TARGET).dll: $(OBJ) link $(PD_WIN_L_FLAGS) /dll /export:$(TARGET)_setup \ /out:..\$(TARGET).dll $(OBJ) $(PD_WIN_LIB) clean: del *.obj iem_utils-v0.0.20181004/iem_tab/src/tab_le.c0000644000175000017500000001307413303612040020437 0ustar zmoelnigzmoelnig/* For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. iem_tab written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2009 */ #include "m_pd.h" #include "iemlib.h" #include "iem_tab.h" /* -------------------------- tab_le ------------------------------ */ /* if(x_beg_mem_src1[i] <= x_beg_mem_src2[i]) */ /* x_beg_mem_dst[i] = 1.0f; */ /* else */ /* x_beg_mem_dst[i] = 0.0f; */ typedef struct _tab_le { t_object x_obj; int x_size_src1; int x_size_src2; int x_size_dst; int x_offset_src1; int x_offset_src2; int x_offset_dst; iemarray_t *x_beg_mem_src1; iemarray_t *x_beg_mem_src2; iemarray_t *x_beg_mem_dst; t_symbol *x_sym_scr1; t_symbol *x_sym_scr2; t_symbol *x_sym_dst; } t_tab_le; static t_class *tab_le_class; static void tab_le_src1(t_tab_le *x, t_symbol *s) { x->x_sym_scr1 = s; } static void tab_le_src2(t_tab_le *x, t_symbol *s) { x->x_sym_scr2 = s; } static void tab_le_dst(t_tab_le *x, t_symbol *s) { x->x_sym_dst = s; } static void tab_le_bang(t_tab_le *x) { int i, n; int ok_src1, ok_src2, ok_dst; iemarray_t *vec_src1, *vec_src2, *vec_dst; ok_src1 = iem_tab_check_arrays(gensym("tab_le"), x->x_sym_scr1, &x->x_beg_mem_src1, &x->x_size_src1, 0); ok_src2 = iem_tab_check_arrays(gensym("tab_le"), x->x_sym_scr2, &x->x_beg_mem_src2, &x->x_size_src2, 0); ok_dst = iem_tab_check_arrays(gensym("tab_le"), x->x_sym_dst, &x->x_beg_mem_dst, &x->x_size_dst, 0); if(ok_src1 && ok_src2 && ok_dst) { if(x->x_size_src1 < x->x_size_dst) n = x->x_size_src1; else n = x->x_size_dst; if(x->x_size_src2 < n) n = x->x_size_src2; vec_src1 = x->x_beg_mem_src1; vec_src2 = x->x_beg_mem_src2; vec_dst = x->x_beg_mem_dst; if(n) { t_garray *a; for(i=0; ix_obj.ob_outlet); a = (t_garray *)pd_findbyclass(x->x_sym_dst, garray_class); garray_redraw(a); } } } static void tab_le_list(t_tab_le *x, t_symbol *s, int argc, t_atom *argv) { int beg_src1, beg_src2, beg_dst; int i, n; int ok_src1, ok_src2, ok_dst; iemarray_t *vec_src1, *vec_src2, *vec_dst; if((argc >= 4) && IS_A_FLOAT(argv,0) && IS_A_FLOAT(argv,1) && IS_A_FLOAT(argv,2) && IS_A_FLOAT(argv,3)) { beg_src1 = (int)atom_getintarg(0, argc, argv); beg_src2 = (int)atom_getintarg(1, argc, argv); beg_dst = (int)atom_getintarg(2, argc, argv); n = (int)atom_getintarg(3, argc, argv); if(beg_src1 < 0) beg_src1 = 0; if(beg_src2 < 0) beg_src2 = 0; if(beg_dst < 0) beg_dst = 0; if(n < 0) n = 0; ok_src1 = iem_tab_check_arrays(gensym("tab_le"), x->x_sym_scr1, &x->x_beg_mem_src1, &x->x_size_src1, beg_src1+n); ok_src2 = iem_tab_check_arrays(gensym("tab_le"), x->x_sym_scr2, &x->x_beg_mem_src2, &x->x_size_src2, beg_src2+n); ok_dst = iem_tab_check_arrays(gensym("tab_le"), x->x_sym_dst, &x->x_beg_mem_dst, &x->x_size_dst, beg_dst+n); if(ok_src1 && ok_src2 && ok_dst) { vec_src1 = x->x_beg_mem_src1 + beg_src1; vec_src2 = x->x_beg_mem_src2 + beg_src2; vec_dst = x->x_beg_mem_dst + beg_dst; if(n) { t_garray *a; for(i=0; ix_obj.ob_outlet); a = (t_garray *)pd_findbyclass(x->x_sym_dst, garray_class); garray_redraw(a); } } } else { post("tab_le-ERROR: list need 4 float arguments:"); post(" source1_offset + source2_offset + destination_offset + number_of_samples_to_compare"); } } static void tab_le_free(t_tab_le *x) { } static void *tab_le_new(t_symbol *s, int argc, t_atom *argv) { t_tab_le *x = (t_tab_le *)pd_new(tab_le_class); t_symbol *src1, *src2, *dst; if((argc >= 3) && IS_A_SYMBOL(argv,0) && IS_A_SYMBOL(argv,1) && IS_A_SYMBOL(argv,2)) { src1 = (t_symbol *)atom_getsymbolarg(0, argc, argv); src2 = (t_symbol *)atom_getsymbolarg(1, argc, argv); dst = (t_symbol *)atom_getsymbolarg(2, argc, argv); } else if((argc >= 2) && IS_A_SYMBOL(argv,0) && IS_A_SYMBOL(argv,1)) { src1 = (t_symbol *)atom_getsymbolarg(0, argc, argv); dst = src1; src2 = (t_symbol *)atom_getsymbolarg(1, argc, argv); } else { post("tab_le-ERROR: need 3 symbols arguments:"); post(" source1_array_name + source2_array_name + destination_array_name"); return(0); } x->x_sym_scr1 = src1; x->x_sym_scr2 = src2; x->x_sym_dst = dst; outlet_new(&x->x_obj, &s_bang); return(x); } void tab_le_setup(void) { tab_le_class = class_new(gensym("tab_le"), (t_newmethod)tab_le_new, (t_method)tab_le_free, sizeof(t_tab_le), 0, A_GIMME, 0); class_addbang(tab_le_class, (t_method)tab_le_bang); class_addlist(tab_le_class, (t_method)tab_le_list); class_addmethod(tab_le_class, (t_method)tab_le_src1, gensym("src1"), A_DEFSYMBOL, 0); class_addmethod(tab_le_class, (t_method)tab_le_src2, gensym("src2"), A_DEFSYMBOL, 0); class_addmethod(tab_le_class, (t_method)tab_le_dst, gensym("dst"), A_DEFSYMBOL, 0); // class_sethelpsymbol(tab_le_class, gensym("iemhelp2/tab_le-help")); } iem_utils-v0.0.20181004/iem_tab/src/tab_dbtorms.c0000644000175000017500000001153213303612040021506 0ustar zmoelnigzmoelnig/* For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. iem_tab written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2010 */ #include "m_pd.h" #include "iemlib.h" #include "iem_tab.h" #include #define IEMTABLOGTEN 2.302585092994046 /* -------------------------- tab_dbtorms ------------------------------ */ /* x_beg_mem_dst[i] = sqrt(x_beg_mem_src1[i]) */ typedef struct _tab_dbtorms { t_object x_obj; int x_size_src1; int x_size_dst; int x_offset_src1; int x_offset_dst; iemarray_t *x_beg_mem_src1; iemarray_t *x_beg_mem_dst; t_symbol *x_sym_scr1; t_symbol *x_sym_dst; } t_tab_dbtorms; static t_class *tab_dbtorms_class; static void tab_dbtorms_src(t_tab_dbtorms *x, t_symbol *s) { x->x_sym_scr1 = s; } static void tab_dbtorms_dst(t_tab_dbtorms *x, t_symbol *s) { x->x_sym_dst = s; } static void tab_dbtorms_bang(t_tab_dbtorms *x) { int i, n; int ok_src, ok_dst; iemarray_t *vec_src, *vec_dst; ok_src = iem_tab_check_arrays(gensym("tab_dbtorms"), x->x_sym_scr1, &x->x_beg_mem_src1, &x->x_size_src1, 0); ok_dst = iem_tab_check_arrays(gensym("tab_dbtorms"), x->x_sym_dst, &x->x_beg_mem_dst, &x->x_size_dst, 0); if(ok_src && ok_dst) { if(x->x_size_src1 < x->x_size_dst) n = x->x_size_src1; else n = x->x_size_dst; vec_src = x->x_beg_mem_src1; vec_dst = x->x_beg_mem_dst; if(n) { t_garray *a; for(i=0; i 485.0) f = 485.0; iemarray_setfloat(vec_dst, i, exp((IEMTABLOGTEN * 0.05) * (f-100.0))); } } outlet_bang(x->x_obj.ob_outlet); a = (t_garray *)pd_findbyclass(x->x_sym_dst, garray_class); garray_redraw(a); } } } static void tab_dbtorms_list(t_tab_dbtorms *x, t_symbol *s, int argc, t_atom *argv) { int beg_src, beg_dst; int i, n; int ok_src, ok_dst; iemarray_t *vec_src, *vec_dst; if((argc >= 3) && IS_A_FLOAT(argv,0) && IS_A_FLOAT(argv,1) && IS_A_FLOAT(argv,2)) { beg_src = (int)atom_getintarg(0, argc, argv); beg_dst = (int)atom_getintarg(1, argc, argv); n = (int)atom_getintarg(2, argc, argv); if(beg_src < 0) beg_src = 0; if(beg_dst < 0) beg_dst = 0; if(n < 0) n = 0; ok_src = iem_tab_check_arrays(gensym("tab_dbtorms"), x->x_sym_scr1, &x->x_beg_mem_src1, &x->x_size_src1, beg_src+n); ok_dst = iem_tab_check_arrays(gensym("tab_dbtorms"), x->x_sym_dst, &x->x_beg_mem_dst, &x->x_size_dst, beg_dst+n); if(ok_src && ok_dst) { vec_src = x->x_beg_mem_src1 + beg_src; vec_dst = x->x_beg_mem_dst + beg_dst; if(n) { t_garray *a; for(i=0; i 485.0) f = 485.0; iemarray_setfloat(vec_dst, i, exp((IEMTABLOGTEN * 0.05) * (f-100.0))); } } outlet_bang(x->x_obj.ob_outlet); a = (t_garray *)pd_findbyclass(x->x_sym_dst, garray_class); garray_redraw(a); } } } else { post("tab_dbtorms-ERROR: list need 3 float arguments:"); post(" source_offset + destination_offset + number_of_samples_to_dbtorms"); } } static void tab_dbtorms_free(t_tab_dbtorms *x) { } static void *tab_dbtorms_new(t_symbol *s, int argc, t_atom *argv) { t_tab_dbtorms *x = (t_tab_dbtorms *)pd_new(tab_dbtorms_class); t_symbol *src, *dst; if((argc >= 2) && IS_A_SYMBOL(argv,0) && IS_A_SYMBOL(argv,1)) { src = (t_symbol *)atom_getsymbolarg(0, argc, argv); dst = (t_symbol *)atom_getsymbolarg(1, argc, argv); } else if((argc >= 1) && IS_A_SYMBOL(argv,0)) { src = (t_symbol *)atom_getsymbolarg(0, argc, argv); dst = src; } else { post("tab_dbtorms-ERROR: need 2 symbols arguments:"); post(" source_array_name + destination_array_name"); return(0); } x->x_sym_scr1 = src; x->x_sym_dst = dst; outlet_new(&x->x_obj, &s_bang); return(x); } void tab_dbtorms_setup(void) { tab_dbtorms_class = class_new(gensym("tab_dbtorms"), (t_newmethod)tab_dbtorms_new, (t_method)tab_dbtorms_free, sizeof(t_tab_dbtorms), 0, A_GIMME, 0); class_addbang(tab_dbtorms_class, (t_method)tab_dbtorms_bang); class_addlist(tab_dbtorms_class, (t_method)tab_dbtorms_list); class_addmethod(tab_dbtorms_class, (t_method)tab_dbtorms_src, gensym("src"), A_DEFSYMBOL, 0); class_addmethod(tab_dbtorms_class, (t_method)tab_dbtorms_src, gensym("src1"), A_DEFSYMBOL, 0); class_addmethod(tab_dbtorms_class, (t_method)tab_dbtorms_dst, gensym("dst"), A_DEFSYMBOL, 0); } iem_utils-v0.0.20181004/iem_tab/src/tab_add_scalar.c0000644000175000017500000001126413303612040022113 0ustar zmoelnigzmoelnig/* For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. iem_tab written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2009 */ #include "m_pd.h" #include "iemlib.h" #include "iem_tab.h" /* -------------------------- tab_add_scalar ------------------------------ */ /* x_beg_mem_dst[i] = x_beg_mem_src1[i] + add */ typedef struct _tab_add_scalar { t_object x_obj; int x_size_src1; int x_size_dst; int x_offset_src1; int x_offset_dst; iemarray_t *x_beg_mem_src1; iemarray_t *x_beg_mem_dst; t_symbol *x_sym_scr1; t_symbol *x_sym_dst; } t_tab_add_scalar; static t_class *tab_add_scalar_class; static void tab_add_scalar_src(t_tab_add_scalar *x, t_symbol *s) { x->x_sym_scr1 = s; } static void tab_add_scalar_float(t_tab_add_scalar *x, t_floatarg add) { int i, n; int ok_src1, ok_dst; iemarray_t *vec_src1, *vec_dst; ok_src1 = iem_tab_check_arrays(gensym("tab_add_scalar"), x->x_sym_scr1, &x->x_beg_mem_src1, &x->x_size_src1, 0); ok_dst = iem_tab_check_arrays(gensym("tab_add_scalar"), x->x_sym_dst, &x->x_beg_mem_dst, &x->x_size_dst, 0); if(ok_src1 && ok_dst) { if(x->x_size_src1 < x->x_size_dst) n = x->x_size_src1; else n = x->x_size_dst; vec_src1 = x->x_beg_mem_src1; vec_dst = x->x_beg_mem_dst; if(n) { t_garray *a; for(i=0; ix_obj.ob_outlet); a = (t_garray *)pd_findbyclass(x->x_sym_dst, garray_class); garray_redraw(a); } } } static void tab_add_scalar_dst(t_tab_add_scalar *x, t_symbol *s) { x->x_sym_dst = s; } static void tab_add_scalar_list(t_tab_add_scalar *x, t_symbol *s, int argc, t_atom *argv) { int beg_src1, beg_dst; int i, n; int ok_src1, ok_dst; iemarray_t *vec_src1, *vec_dst; t_float add; if((argc >= 4) && IS_A_FLOAT(argv,0) && IS_A_FLOAT(argv,1) && IS_A_FLOAT(argv,2) && IS_A_FLOAT(argv,3)) { beg_src1 = (int)atom_getintarg(0, argc, argv); beg_dst = (int)atom_getintarg(1, argc, argv); n = (int)atom_getintarg(2, argc, argv); add = (t_float)atom_getfloatarg(3, argc, argv); if(beg_src1 < 0) beg_src1 = 0; if(beg_dst < 0) beg_dst = 0; if(n < 0) n = 0; ok_src1 = iem_tab_check_arrays(gensym("tab_add_scalar"), x->x_sym_scr1, &x->x_beg_mem_src1, &x->x_size_src1, beg_src1+n); ok_dst = iem_tab_check_arrays(gensym("tab_add_scalar"), x->x_sym_dst, &x->x_beg_mem_dst, &x->x_size_dst, beg_dst+n); if(ok_src1 && ok_dst) { vec_src1 = x->x_beg_mem_src1 + beg_src1; vec_dst = x->x_beg_mem_dst + beg_dst; if(n) { t_garray *a; for(i=0; ix_obj.ob_outlet); a = (t_garray *)pd_findbyclass(x->x_sym_dst, garray_class); garray_redraw(a); } } } else { post("tab_add_scalar-ERROR: list need 4 float arguments:"); post(" source1_offset + destination_offset + number_of_samples_to_add + add_scalar"); } } static void tab_add_scalar_free(t_tab_add_scalar *x) { } static void *tab_add_scalar_new(t_symbol *s, int argc, t_atom *argv) { t_tab_add_scalar *x = (t_tab_add_scalar *)pd_new(tab_add_scalar_class); t_symbol *src1, *dst; if((argc >= 2) && IS_A_SYMBOL(argv,0) && IS_A_SYMBOL(argv,1)) { src1 = (t_symbol *)atom_getsymbolarg(0, argc, argv); dst = (t_symbol *)atom_getsymbolarg(1, argc, argv); } else if((argc >= 1) && IS_A_SYMBOL(argv,0)) { src1 = (t_symbol *)atom_getsymbolarg(0, argc, argv); dst = src1; } else { post("tab_add_scalar-ERROR: need 2 symbol arguments:"); post(" source_array_name + destination_array_name"); return(0); } x->x_sym_scr1 = src1; x->x_sym_dst = dst; outlet_new(&x->x_obj, &s_bang); return(x); } void tab_add_scalar_setup(void) { tab_add_scalar_class = class_new(gensym("tab_add_scalar"), (t_newmethod)tab_add_scalar_new, (t_method)tab_add_scalar_free, sizeof(t_tab_add_scalar), 0, A_GIMME, 0); class_addfloat(tab_add_scalar_class, (t_method)tab_add_scalar_float); class_addlist(tab_add_scalar_class, (t_method)tab_add_scalar_list); class_addmethod(tab_add_scalar_class, (t_method)tab_add_scalar_src, gensym("src1"), A_DEFSYMBOL, 0); class_addmethod(tab_add_scalar_class, (t_method)tab_add_scalar_src, gensym("src"), A_DEFSYMBOL, 0); class_addmethod(tab_add_scalar_class, (t_method)tab_add_scalar_dst, gensym("dst"), A_DEFSYMBOL, 0); // class_sethelpsymbol(tab_add_scalar_class, gensym("iemhelp2/tab_add_scalar-help")); } iem_utils-v0.0.20181004/iem_tab/src/tab_ifft.c0000644000175000017500000003074313303612040020771 0ustar zmoelnigzmoelnig/* For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. iem_tab written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2009 */ #include "m_pd.h" #include "iemlib.h" #include "iem_tab.h" #include /* -------------------------- tab_ifft ------------------------------ */ /* complex inverse FFT */ typedef struct _tab_ifft { t_object x_obj; int x_size_src_re; int x_size_src_im; int x_size_dst_re; int x_size_dst_im; int x_offset_src_re; int x_offset_src_im; int x_offset_dst_re; int x_offset_dst_im; int x_fftsize; iemarray_t *x_beg_mem_src_re; iemarray_t *x_beg_mem_src_im; iemarray_t *x_beg_mem_dst_re; iemarray_t *x_beg_mem_dst_im; TAB_COMPLEX *x_sin_cos; t_symbol *x_sym_src_re; t_symbol *x_sym_src_im; t_symbol *x_sym_dst_re; t_symbol *x_sym_dst_im; } t_tab_ifft; static t_class *tab_ifft_class; static void tab_ifft_init(t_tab_ifft *x) { int i, fftsize = x->x_fftsize; t_float f, g; TAB_COMPLEX *sincos = x->x_sin_cos; g = 2.0 * 3.141592653589793 / (t_float)fftsize; for(i=0; ix_fftsize) { x->x_sin_cos = (TAB_COMPLEX *)resizebytes(x->x_sin_cos, x->x_fftsize*sizeof(TAB_COMPLEX), i*sizeof(TAB_COMPLEX)); x->x_fftsize = i; } tab_ifft_init(x); } static void tab_ifft_dst_re(t_tab_ifft *x, t_symbol *s) { x->x_sym_dst_re = s; } static void tab_ifft_dst_im(t_tab_ifft *x, t_symbol *s) { x->x_sym_dst_im = s; } static void tab_ifft_src_re(t_tab_ifft *x, t_symbol *s) { x->x_sym_src_re = s; } static void tab_ifft_src_im(t_tab_ifft *x, t_symbol *s) { x->x_sym_src_im = s; } static void tab_ifft_bang(t_tab_ifft *x) { int i, j, k; int ok_src_re, ok_src_im, ok_dst_re, ok_dst_im; int w_index, w_inc, i_inc, v_index; int fftsize = x->x_fftsize; int fs1 = fftsize - 1; int fs2 = fftsize / 2; TAB_COMPLEX w; TAB_COMPLEX *sincos = x->x_sin_cos; iemarray_t *vec_src_re, *vec_src_im, *vec_dst_re, *vec_dst_im; t_float old1_re, old1_im, old2_re, old2_im, g; ok_src_re = iem_tab_check_arrays(gensym("tab_ifft"), x->x_sym_src_re, &x->x_beg_mem_src_re, &x->x_size_src_re, fftsize); ok_src_im = iem_tab_check_arrays(gensym("tab_ifft"), x->x_sym_src_im, &x->x_beg_mem_src_im, &x->x_size_src_im, fftsize); ok_dst_re = iem_tab_check_arrays(gensym("tab_ifft"), x->x_sym_dst_re, &x->x_beg_mem_dst_re, &x->x_size_dst_re, fftsize); ok_dst_im = iem_tab_check_arrays(gensym("tab_ifft"), x->x_sym_dst_im, &x->x_beg_mem_dst_im, &x->x_size_dst_im, fftsize); if(ok_src_re && ok_src_im && ok_dst_re && ok_dst_im) { t_garray *a; vec_src_re=x->x_beg_mem_src_re; vec_src_im=x->x_beg_mem_src_im; vec_dst_re=x->x_beg_mem_dst_re; vec_dst_im=x->x_beg_mem_dst_im; for(j=0; j>= 1; } j = 0; for(i=1;i>= 1; } j = j + k; if(i < j) { old1_re = iemarray_getfloat(vec_dst_re, j); old1_im = iemarray_getfloat(vec_dst_im, j); iemarray_setfloat(vec_dst_re, j, iemarray_getfloat(vec_dst_re, i)); iemarray_setfloat(vec_dst_im, j, iemarray_getfloat(vec_dst_im, i)); iemarray_setfloat(vec_dst_re, i, old1_re); iemarray_setfloat(vec_dst_im, i, old1_im); } } // g = 2.0f / (t_float)fftsize; /* ein fehler tritt auf beim 0.sample, hier sollte nur mal 1.0 multipliziert werden wenn gelten soll : Energie im zeitfenster == Energie im Frequenz-dichte-fenster g = 1.0f; for(i = 0; i < fs2; i++) { vec_dst_re[i] *= g; vec_dst_im[i] *= g; } */ g = 1.0 / (t_float)fftsize; for(i = 0; i < fftsize; i++) { iemarray_setfloat(vec_dst_re, i, iemarray_getfloat(vec_dst_re, i)*g); iemarray_setfloat(vec_dst_im, i, iemarray_getfloat(vec_dst_im, i)*g); } outlet_bang(x->x_obj.ob_outlet); a = (t_garray *)pd_findbyclass(x->x_sym_dst_re, garray_class); garray_redraw(a); a = (t_garray *)pd_findbyclass(x->x_sym_dst_im, garray_class); garray_redraw(a); } } static void tab_ifft_list(t_tab_ifft *x, t_symbol *s, int argc, t_atom *argv) { int beg_src_re, beg_src_im, beg_dst_re, beg_dst_im; int i, j, k; int ok_src_re, ok_src_im, ok_dst_re, ok_dst_im; int w_index, w_inc, i_inc, v_index; int fftsize = x->x_fftsize; int fs1 = fftsize - 1; int fs2 = fftsize / 2; TAB_COMPLEX w; TAB_COMPLEX *sincos = x->x_sin_cos; iemarray_t *vec_src_re, *vec_src_im, *vec_dst_re, *vec_dst_im; t_float old1_re, old1_im, old2_re, old2_im, g; if((argc >= 4) && IS_A_FLOAT(argv,0) && IS_A_FLOAT(argv,1) && IS_A_FLOAT(argv,2) && IS_A_FLOAT(argv,3)) { beg_src_re = (int)atom_getintarg(0, argc, argv); beg_src_im = (int)atom_getintarg(1, argc, argv); beg_dst_re = (int)atom_getintarg(2, argc, argv); beg_dst_im = (int)atom_getintarg(3, argc, argv); if(beg_src_re < 0) beg_src_re = 0; if(beg_src_im < 0) beg_src_im = 0; if(beg_dst_re < 0) beg_dst_re = 0; if(beg_dst_im < 0) beg_dst_im = 0; ok_src_re = iem_tab_check_arrays(gensym("tab_ifft"), x->x_sym_src_re, &x->x_beg_mem_src_re, &x->x_size_src_re, fftsize); ok_src_im = iem_tab_check_arrays(gensym("tab_ifft"), x->x_sym_src_im, &x->x_beg_mem_src_im, &x->x_size_src_im, fftsize); ok_dst_re = iem_tab_check_arrays(gensym("tab_ifft"), x->x_sym_dst_re, &x->x_beg_mem_dst_re, &x->x_size_dst_re, fftsize); ok_dst_im = iem_tab_check_arrays(gensym("tab_ifft"), x->x_sym_dst_im, &x->x_beg_mem_dst_im, &x->x_size_dst_im, fftsize); if(ok_src_re && ok_src_im && ok_dst_re && ok_dst_im) { t_garray *a; vec_src_re=x->x_beg_mem_src_re + beg_src_re; vec_src_im=x->x_beg_mem_src_im + beg_src_im; vec_dst_re=x->x_beg_mem_dst_re + beg_dst_re; vec_dst_im=x->x_beg_mem_dst_im + beg_dst_im; for(j=0; j>= 1; } j = 0; for(i=1;i>= 1; } j = j + k; if(i < j) { old1_re = iemarray_getfloat(vec_dst_re, j); old1_im = iemarray_getfloat(vec_dst_im, j); iemarray_setfloat(vec_dst_re, j, iemarray_getfloat(vec_dst_re, i)); iemarray_setfloat(vec_dst_im, j, iemarray_getfloat(vec_dst_im, i)); iemarray_setfloat(vec_dst_re, i, old1_re); iemarray_setfloat(vec_dst_im, i, old1_im); } } // g = 2.0f / (t_float)fftsize; /* ein fehler tritt auf beim 0.sample, hier sollte nur mal 1.0 multipliziert werden wenn gelten soll : Energie im zeitfenster == Energie im Frequenz-dichte-fenster g = 1.0f; for(i = 0; i < fs2; i++) { vec_dst_re[i] *= g; vec_dst_im[i] *= g; } */ g = 1.0 / (t_float)fftsize; for(i = 0; i < fftsize; i++) { iemarray_setfloat(vec_dst_re, i, iemarray_getfloat(vec_dst_re, i)*g); iemarray_setfloat(vec_dst_im, i, iemarray_getfloat(vec_dst_im, i)*g); } outlet_bang(x->x_obj.ob_outlet); a = (t_garray *)pd_findbyclass(x->x_sym_dst_re, garray_class); garray_redraw(a); a = (t_garray *)pd_findbyclass(x->x_sym_dst_im, garray_class); garray_redraw(a); } } else { post("tab_ifft-ERROR: list need 4 float arguments:"); post(" source_real_offset + source_imag_offset + destination_real_offset + destination_imag_offset"); } } static void tab_ifft_free(t_tab_ifft *x) { freebytes(x->x_sin_cos, x->x_fftsize * sizeof(TAB_COMPLEX)); } static void *tab_ifft_new(t_symbol *s, int argc, t_atom *argv) { t_tab_ifft *x = (t_tab_ifft *)pd_new(tab_ifft_class); t_symbol *src_re, *src_im, *dst_re, *dst_im; int fftsize, i=1; if((argc >= 5) && IS_A_SYMBOL(argv,0) && IS_A_SYMBOL(argv,1) && IS_A_SYMBOL(argv,2) && IS_A_SYMBOL(argv,3) && IS_A_FLOAT(argv,4)) { src_re = (t_symbol *)atom_getsymbolarg(0, argc, argv); src_im = (t_symbol *)atom_getsymbolarg(1, argc, argv); dst_re = (t_symbol *)atom_getsymbolarg(2, argc, argv); dst_im = (t_symbol *)atom_getsymbolarg(3, argc, argv); fftsize = (int)atom_getintarg(4, argc, argv); } else { post("tab_ifft-ERROR: need 4 symbols + 1 float arguments:"); post(" source_real_array_name + source_imag_array_name + destination_real_array_name + destination_imag_array_name + IFFT-size"); return(0); } if(fftsize < 8) fftsize = 8; while(i <= fftsize) i *= 2; i /= 2; fftsize = i; x->x_fftsize = fftsize; x->x_sym_src_re = src_re; x->x_sym_src_im = src_im; x->x_sym_dst_re = dst_re; x->x_sym_dst_im = dst_im; x->x_sin_cos = (TAB_COMPLEX *)getbytes(x->x_fftsize * sizeof(TAB_COMPLEX)); tab_ifft_init(x); outlet_new(&x->x_obj, &s_bang); return(x); } void tab_ifft_setup(void) { tab_ifft_class = class_new(gensym("tab_ifft"), (t_newmethod)tab_ifft_new, (t_method)tab_ifft_free, sizeof(t_tab_ifft), 0, A_GIMME, 0); class_addbang(tab_ifft_class, (t_method)tab_ifft_bang); class_addlist(tab_ifft_class, (t_method)tab_ifft_list); class_addmethod(tab_ifft_class, (t_method)tab_ifft_ifftsize, gensym("ifftsize"), A_DEFFLOAT, 0); class_addmethod(tab_ifft_class, (t_method)tab_ifft_src_re, gensym("src_re"), A_DEFSYMBOL, 0); class_addmethod(tab_ifft_class, (t_method)tab_ifft_src_im, gensym("src_im"), A_DEFSYMBOL, 0); class_addmethod(tab_ifft_class, (t_method)tab_ifft_src_re, gensym("src1"), A_DEFSYMBOL, 0); class_addmethod(tab_ifft_class, (t_method)tab_ifft_src_im, gensym("src2"), A_DEFSYMBOL, 0); class_addmethod(tab_ifft_class, (t_method)tab_ifft_dst_re, gensym("dst_re"), A_DEFSYMBOL, 0); class_addmethod(tab_ifft_class, (t_method)tab_ifft_dst_im, gensym("dst_im"), A_DEFSYMBOL, 0); class_addmethod(tab_ifft_class, (t_method)tab_ifft_dst_re, gensym("dst1"), A_DEFSYMBOL, 0); class_addmethod(tab_ifft_class, (t_method)tab_ifft_dst_im, gensym("dst2"), A_DEFSYMBOL, 0); } iem_utils-v0.0.20181004/iem_tab/src/tab_dbtopow.c0000644000175000017500000001144413303612040021514 0ustar zmoelnigzmoelnig/* For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. iem_tab written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2010 */ #include "m_pd.h" #include "iemlib.h" #include "iem_tab.h" #include #define IEMTABLOGTEN 2.302585092994046 /* -------------------------- tab_dbtopow ------------------------------ */ typedef struct _tab_dbtopow { t_object x_obj; int x_size_src1; int x_size_dst; int x_offset_src1; int x_offset_dst; iemarray_t *x_beg_mem_src1; iemarray_t *x_beg_mem_dst; t_symbol *x_sym_scr1; t_symbol *x_sym_dst; } t_tab_dbtopow; static t_class *tab_dbtopow_class; static void tab_dbtopow_src(t_tab_dbtopow *x, t_symbol *s) { x->x_sym_scr1 = s; } static void tab_dbtopow_dst(t_tab_dbtopow *x, t_symbol *s) { x->x_sym_dst = s; } static void tab_dbtopow_bang(t_tab_dbtopow *x) { int i, n; int ok_src, ok_dst; iemarray_t *vec_src, *vec_dst; ok_src = iem_tab_check_arrays(gensym("tab_dbtopow"), x->x_sym_scr1, &x->x_beg_mem_src1, &x->x_size_src1, 0); ok_dst = iem_tab_check_arrays(gensym("tab_dbtopow"), x->x_sym_dst, &x->x_beg_mem_dst, &x->x_size_dst, 0); if(ok_src && ok_dst) { if(x->x_size_src1 < x->x_size_dst) n = x->x_size_src1; else n = x->x_size_dst; vec_src = x->x_beg_mem_src1; vec_dst = x->x_beg_mem_dst; if(n) { t_garray *a; for(i=0; i 870.0) f = 870.0; iemarray_setfloat(vec_dst, i, exp((IEMTABLOGTEN * 0.1) * (f-100.0))); } } outlet_bang(x->x_obj.ob_outlet); a = (t_garray *)pd_findbyclass(x->x_sym_dst, garray_class); garray_redraw(a); } } } static void tab_dbtopow_list(t_tab_dbtopow *x, t_symbol *s, int argc, t_atom *argv) { int beg_src, beg_dst; int i, n; int ok_src, ok_dst; iemarray_t *vec_src, *vec_dst; if((argc >= 3) && IS_A_FLOAT(argv,0) && IS_A_FLOAT(argv,1) && IS_A_FLOAT(argv,2)) { beg_src = (int)atom_getintarg(0, argc, argv); beg_dst = (int)atom_getintarg(1, argc, argv); n = (int)atom_getintarg(2, argc, argv); if(beg_src < 0) beg_src = 0; if(beg_dst < 0) beg_dst = 0; if(n < 0) n = 0; ok_src = iem_tab_check_arrays(gensym("tab_dbtopow"), x->x_sym_scr1, &x->x_beg_mem_src1, &x->x_size_src1, beg_src+n); ok_dst = iem_tab_check_arrays(gensym("tab_dbtopow"), x->x_sym_dst, &x->x_beg_mem_dst, &x->x_size_dst, beg_dst+n); if(ok_src && ok_dst) { vec_src = x->x_beg_mem_src1 + beg_src; vec_dst = x->x_beg_mem_dst + beg_dst; if(n) { t_garray *a; for(i=0; i 870.0) f = 870.0; iemarray_setfloat(vec_dst, i, exp((IEMTABLOGTEN * 0.1) * (f-100.0))); } } outlet_bang(x->x_obj.ob_outlet); a = (t_garray *)pd_findbyclass(x->x_sym_dst, garray_class); garray_redraw(a); } } } else { post("tab_dbtopow-ERROR: list need 3 float arguments:"); post(" source_offset + destination_offset + number_of_samples_to_dbtopow"); } } static void tab_dbtopow_free(t_tab_dbtopow *x) { } static void *tab_dbtopow_new(t_symbol *s, int argc, t_atom *argv) { t_tab_dbtopow *x = (t_tab_dbtopow *)pd_new(tab_dbtopow_class); t_symbol *src, *dst; if((argc >= 2) && IS_A_SYMBOL(argv,0) && IS_A_SYMBOL(argv,1)) { src = (t_symbol *)atom_getsymbolarg(0, argc, argv); dst = (t_symbol *)atom_getsymbolarg(1, argc, argv); } else if((argc >= 1) && IS_A_SYMBOL(argv,0)) { src = (t_symbol *)atom_getsymbolarg(0, argc, argv); dst = src; } else { post("tab_dbtopow-ERROR: need 2 symbols arguments:"); post(" source_array_name + destination_array_name"); return(0); } x->x_sym_scr1 = src; x->x_sym_dst = dst; outlet_new(&x->x_obj, &s_bang); return(x); } void tab_dbtopow_setup(void) { tab_dbtopow_class = class_new(gensym("tab_dbtopow"), (t_newmethod)tab_dbtopow_new, (t_method)tab_dbtopow_free, sizeof(t_tab_dbtopow), 0, A_GIMME, 0); class_addbang(tab_dbtopow_class, (t_method)tab_dbtopow_bang); class_addlist(tab_dbtopow_class, (t_method)tab_dbtopow_list); class_addmethod(tab_dbtopow_class, (t_method)tab_dbtopow_src, gensym("src"), A_DEFSYMBOL, 0); class_addmethod(tab_dbtopow_class, (t_method)tab_dbtopow_src, gensym("src1"), A_DEFSYMBOL, 0); class_addmethod(tab_dbtopow_class, (t_method)tab_dbtopow_dst, gensym("dst"), A_DEFSYMBOL, 0); } iem_utils-v0.0.20181004/iem_tab/src/VC6/0000755000175000017500000000000012630366350017452 5ustar zmoelnigzmoelnigiem_utils-v0.0.20181004/iem_tab/src/VC6/iem_tab.dsp0000644000175000017500000000474512630366350021574 0ustar zmoelnigzmoelnig# Microsoft Developer Studio Project File - Name="iem_tab" - Package Owner=<4> # Microsoft Developer Studio Generated Build File, Format Version 6.00 # ** NICHT BEARBEITEN ** # TARGTYPE "Win32 (x86) External Target" 0x0106 CFG=iem_tab - Win32 Debug !MESSAGE Dies ist kein gltiges Makefile. Zum Erstellen dieses Projekts mit NMAKE !MESSAGE verwenden Sie den Befehl "Makefile exportieren" und fhren Sie den Befehl !MESSAGE !MESSAGE NMAKE /f "iem_tab.mak". !MESSAGE !MESSAGE Sie knnen beim Ausfhren von NMAKE eine Konfiguration angeben !MESSAGE durch Definieren des Makros CFG in der Befehlszeile. Zum Beispiel: !MESSAGE !MESSAGE NMAKE /f "iem_tab.mak" CFG="iem_tab - Win32 Debug" !MESSAGE !MESSAGE Fr die Konfiguration stehen zur Auswahl: !MESSAGE !MESSAGE "iem_tab - Win32 Release" (basierend auf "Win32 (x86) External Target") !MESSAGE "iem_tab - Win32 Debug" (basierend auf "Win32 (x86) External Target") !MESSAGE # Begin Project # PROP AllowPerConfigDependencies 0 # PROP Scc_ProjName "" # PROP Scc_LocalPath "" !IF "$(CFG)" == "iem_tab - Win32 Release" # PROP BASE Use_Debug_Libraries 0 # PROP BASE Output_Dir "Release" # PROP BASE Intermediate_Dir "Release" # PROP BASE Cmd_Line "NMAKE /f makefile_win" # PROP BASE Rebuild_Opt "/a" # PROP BASE Target_File "makefile_win.exe" # PROP BASE Bsc_Name "makefile_win.bsc" # PROP BASE Target_Dir "" # PROP Use_Debug_Libraries 0 # PROP Output_Dir "Release" # PROP Intermediate_Dir "Release" # PROP Cmd_Line "NMAKE /f makefile_win" # PROP Rebuild_Opt "/a" # PROP Target_File "iem_tab.exe" # PROP Bsc_Name "iem_tab.bsc" # PROP Target_Dir "" !ELSEIF "$(CFG)" == "iem_tab - Win32 Debug" # PROP BASE Use_Debug_Libraries 1 # PROP BASE Output_Dir "Debug" # PROP BASE Intermediate_Dir "Debug" # PROP BASE Cmd_Line "NMAKE /f makefile_win" # PROP BASE Rebuild_Opt "/a" # PROP BASE Target_File "makefile_win.exe" # PROP BASE Bsc_Name "makefile_win.bsc" # PROP BASE Target_Dir "" # PROP Use_Debug_Libraries 1 # PROP Output_Dir "Debug" # PROP Intermediate_Dir "Debug" # PROP Cmd_Line "NMAKE /f makefile_win" # PROP Rebuild_Opt "/a" # PROP Target_File "iem_tab.exe" # PROP Bsc_Name "iem_tab.bsc" # PROP Target_Dir "" !ENDIF # Begin Target # Name "iem_tab - Win32 Release" # Name "iem_tab - Win32 Debug" !IF "$(CFG)" == "iem_tab - Win32 Release" !ELSEIF "$(CFG)" == "iem_tab - Win32 Debug" !ENDIF # Begin Source File SOURCE=.\makefile_win # End Source File # End Target # End Project iem_utils-v0.0.20181004/iem_tab/src/VC6/makefile_win0000644000175000017500000000305112630366350022026 0ustar zmoelnigzmoelnig all: ..\iem_tab.dll VIS_CPP_PATH = "C:\Programme\Microsoft Visual Studio\Vc98" PD_INST_PATH = "C:\Programme\pd" PD_WIN_INCLUDE_PATH = /I. /I$(PD_INST_PATH)\src /I$(VIS_CPP_PATH)\include PD_WIN_C_FLAGS = /nologo /W3 /WX /DMSW /DNT /DPD /DWIN32 /DWINDOWS /Ox -DPA_LITTLE_ENDIAN PD_WIN_L_FLAGS = /nologo PD_WIN_LIB = /NODEFAULTLIB:libc /NODEFAULTLIB:oldnames /NODEFAULTLIB:kernel /NODEFAULTLIB:uuid \ $(VIS_CPP_PATH)\lib\libc.lib \ $(VIS_CPP_PATH)\lib\oldnames.lib \ $(VIS_CPP_PATH)\lib\kernel32.lib \ $(VIS_CPP_PATH)\lib\wsock32.lib \ $(VIS_CPP_PATH)\lib\winmm.lib \ $(PD_INST_PATH)\bin\pd.lib SRC = tab_abs.c \ tab_add.c \ tab_add_scalar.c \ tab_carth2polar.c \ tab_complex_inv.c \ tab_complex_mul.c \ tab_const.c \ tab_conv.c \ tab_copy.c \ tab_counter.c \ tab_cross_corr.c \ tab_div.c \ tab_eq.c \ tab_eq_scalar.c \ tab_fft.c \ tab_find_exact_peaks.c \ tab_find_peaks.c \ tab_ge.c \ tab_ge_scalar.c \ tab_gt.c \ tab_gt_scalar.c \ tab_get_size.c \ tab_ifft.c \ tab_le.c \ tab_le_scalar.c \ tab_lt.c \ tab_lt_scalar.c \ tab_max_index.c \ tab_min_index.c \ tab_min_max.c \ tab_mul.c \ tab_mul_scalar.c \ tab_ne.c \ tab_ne_scalar.c \ tab_reverse.c \ tab_rfft.c \ tab_rifft.c \ tab_sqrt.c \ tab_sub.c \ tab_sum.c \ iem_tab.c OBJ = $(SRC:.c=.obj) .c.obj: cl $(PD_WIN_C_FLAGS) $(PD_WIN_INCLUDE_PATH) /c $*.c ..\iem_tab.dll: $(OBJ) link $(PD_WIN_L_FLAGS) /dll /export:iem_tab_setup \ /out:..\iem_tab.dll $(OBJ) $(PD_WIN_LIB) clean: del *.obj iem_utils-v0.0.20181004/iem_tab/src/VC6/iem_tab.dsw0000644000175000017500000000106512630366350021573 0ustar zmoelnigzmoelnigMicrosoft Developer Studio Workspace File, Format Version 6.00 # WARNUNG: DIESE ARBEITSBEREICHSDATEI DARF NICHT BEARBEITET ODER GELSCHT WERDEN! ############################################################################### Project: "iem_tab"=.\iem_tab.dsp - Package Owner=<4> Package=<5> {{{ }}} Package=<4> {{{ }}} ############################################################################### Global: Package=<5> {{{ }}} Package=<3> {{{ }}} ############################################################################### iem_utils-v0.0.20181004/iem_tab/src/tab_min_max.c0000644000175000017500000000732213303612040021466 0ustar zmoelnigzmoelnig/* For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. iem_tab written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2009 */ #include "m_pd.h" #include "iemlib.h" #include "iem_tab.h" /* -------------------------- tab_min_max ------------------------------ */ typedef struct _tab_min_max { t_object x_obj; int x_size_src1; int x_offset_src1; iemarray_t *x_beg_mem_src1; t_symbol *x_sym_scr1; void *x_bang_out; void *x_min_out; void *x_max_out; } t_tab_min_max; static t_class *tab_min_max_class; static void tab_min_max_src(t_tab_min_max *x, t_symbol *s) { x->x_sym_scr1 = s; } static void tab_min_max_bang(t_tab_min_max *x) { int i, n; int ok_src; iemarray_t *vec_src; t_float min=1.0e37, max=-1.0e37; ok_src = iem_tab_check_arrays(gensym("tab_min_max"), x->x_sym_scr1, &x->x_beg_mem_src1, &x->x_size_src1, 0); if(ok_src) { n = x->x_size_src1; vec_src = x->x_beg_mem_src1; if(n) { for(i=0; i max) max = iemarray_getfloat(vec_src, i); if(iemarray_getfloat(vec_src, i) < min) min = iemarray_getfloat(vec_src, i); } outlet_float(x->x_max_out, max); outlet_float(x->x_min_out, min); outlet_bang(x->x_bang_out); } } } static void tab_min_max_list(t_tab_min_max *x, t_symbol *s, int argc, t_atom *argv) { int beg_src; int i, n; int ok_src; iemarray_t *vec_src; t_float min=1.0e37, max=-1.0e37; if((argc >= 2) && IS_A_FLOAT(argv,0) && IS_A_FLOAT(argv,1)) { beg_src = (int)atom_getintarg(0, argc, argv); n = (int)atom_getintarg(1, argc, argv); if(beg_src < 0) beg_src = 0; if(n < 0) n = 0; ok_src = iem_tab_check_arrays(gensym("tab_min_max"), x->x_sym_scr1, &x->x_beg_mem_src1, &x->x_size_src1, beg_src+n); if(ok_src) { vec_src = x->x_beg_mem_src1 + beg_src; if(n) { for(i=0; i max) max = iemarray_getfloat(vec_src, i); if(iemarray_getfloat(vec_src, i) < min) min = iemarray_getfloat(vec_src, i); } outlet_float(x->x_max_out, max); outlet_float(x->x_min_out, min); outlet_bang(x->x_bang_out); } } } else { post("tab_min_max-ERROR: list need 2 float arguments:"); post(" source_offset + number_of_samples_to_calc_min_max"); } } static void tab_min_max_free(t_tab_min_max *x) { } static void *tab_min_max_new(t_symbol *s, int argc, t_atom *argv) { t_tab_min_max *x = (t_tab_min_max *)pd_new(tab_min_max_class); t_symbol *src; if((argc >= 1) && IS_A_SYMBOL(argv,0)) { src = (t_symbol *)atom_getsymbolarg(0, argc, argv); } else { post("tab_min_max-ERROR: need 1 symbol argument:"); post(" source_array_name"); return(0); } x->x_sym_scr1 = src; x->x_bang_out = outlet_new(&x->x_obj, &s_bang); x->x_min_out = outlet_new(&x->x_obj, &s_float); x->x_max_out = outlet_new(&x->x_obj, &s_float); return(x); } void tab_min_max_setup(void) { tab_min_max_class = class_new(gensym("tab_min_max"), (t_newmethod)tab_min_max_new, (t_method)tab_min_max_free, sizeof(t_tab_min_max), 0, A_GIMME, 0); class_addbang(tab_min_max_class, (t_method)tab_min_max_bang); class_addlist(tab_min_max_class, (t_method)tab_min_max_list); class_addmethod(tab_min_max_class, (t_method)tab_min_max_src, gensym("src"), A_DEFSYMBOL, 0); class_addmethod(tab_min_max_class, (t_method)tab_min_max_src, gensym("src1"), A_DEFSYMBOL, 0); // class_sethelpsymbol(tab_min_max_class, gensym("iemhelp2/tab_min_max-help")); } iem_utils-v0.0.20181004/iem_tab/src/tab_conv.c0000644000175000017500000002710613303612041021006 0ustar zmoelnigzmoelnig/* For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. iem_tab written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2009 */ #include "m_pd.h" #include "iemlib.h" #include "iem_tab.h" /* ---------------------------- tab_conv ------------------------------- */ /* for(i=0; ix_sym_scr1 = s; } static void tab_conv_src2(t_tab_conv *x, t_symbol *s) { x->x_sym_scr2 = s; } static void tab_conv_dst(t_tab_conv *x, t_symbol *s) { x->x_sym_dst = s; } static void tab_conv_bang(t_tab_conv *x) { int i, j, k, l, m, n, p, q; int ok_src1, ok_src2, ok_dst; iemarray_t *vec_sig, *vec_ir, *vec_dst; t_float sum=0.0f; ok_src1 = iem_tab_check_arrays(gensym("tab_conv"), x->x_sym_scr1, &x->x_beg_mem_src1, &x->x_size_src1, 0); ok_src2 = iem_tab_check_arrays(gensym("tab_conv"), x->x_sym_scr2, &x->x_beg_mem_src2, &x->x_size_src2, 0); ok_dst = iem_tab_check_arrays(gensym("tab_conv"), x->x_sym_dst, &x->x_beg_mem_dst, &x->x_size_dst, 0); if(ok_src1 && ok_src2 && ok_dst) { t_garray *a; if((x->x_size_src1+x->x_size_src2-1) <= x->x_size_dst)// ok, the last part of dst is zero { if(x->x_size_src1 > x->x_size_src2)// src2(t-tau) is impuls response { vec_sig = x->x_beg_mem_src1; vec_ir = x->x_beg_mem_src2; n = x->x_size_src1; m = x->x_size_src2; } else// src1(t-tau) is impuls response { vec_sig = x->x_beg_mem_src2; vec_ir = x->x_beg_mem_src1; n = x->x_size_src2; m = x->x_size_src1; } vec_dst = x->x_beg_mem_dst; for(i=1; i0; i--, k++) { sum = 0.0f; for(j=1; j<=i; j++) sum += iemarray_getfloat(vec_sig, -j) * iemarray_getfloat(vec_ir, j+k); iemarray_setfloat(vec_dst, 0, sum); vec_dst++; } } else { if(x->x_size_src1 > x->x_size_src2)// src2(t-tau) is impuls response { vec_sig = x->x_beg_mem_src1; vec_ir = x->x_beg_mem_src2; n = x->x_size_src1; m = x->x_size_src2; } else// src1(t-tau) is impuls response { vec_sig = x->x_beg_mem_src2; vec_ir = x->x_beg_mem_src1; n = x->x_size_src2; m = x->x_size_src1; } vec_dst = x->x_beg_mem_dst; p = x->x_size_dst; q = 0; for(i=1; i= p) goto tab_conv_bang_end; } l = n - m + 1; for(i=0; i= p) goto tab_conv_bang_end; } for(i=m-1, k=0; i>0; i--, k++) { sum = 0.0f; for(j=1; j<=i; j++) sum += iemarray_getfloat(vec_sig, -j) * iemarray_getfloat(vec_ir, j+k); iemarray_setfloat(vec_dst, 0, sum); vec_dst++; q++; if(q >= p) goto tab_conv_bang_end; } for(i=m-1; i>0; i--) { sum = 0.0f; for(j=0, k=i-1; j= p) goto tab_conv_bang_end; } } tab_conv_bang_end: outlet_bang(x->x_obj.ob_outlet); a = (t_garray *)pd_findbyclass(x->x_sym_dst, garray_class); garray_redraw(a); } } static void tab_conv_list(t_tab_conv *x, t_symbol *s, int argc, t_atom *argv) { int beg_src1, beg_src2, beg_dst; int n_src1, n_src2; int i, j, k, l, m, n, p; int ok_src1, ok_src2, ok_dst; iemarray_t *vec_sig, *vec_ir, *vec_dst; t_float sum=0.0; if((argc >= 5) && IS_A_FLOAT(argv,0) && IS_A_FLOAT(argv,1) && IS_A_FLOAT(argv,2) && IS_A_FLOAT(argv,3) && IS_A_FLOAT(argv,4)) { beg_src1 = (int)atom_getintarg(0, argc, argv); beg_src2 = (int)atom_getintarg(1, argc, argv); beg_dst = (int)atom_getintarg(2, argc, argv); n_src1 = (int)atom_getintarg(3, argc, argv); n_src2 = (int)atom_getintarg(4, argc, argv); if(beg_src1 < 0) beg_src1 = 0; if(beg_src2 < 0) beg_src2 = 0; if(beg_dst < 0) beg_dst = 0; if(n_src1 < 0) n_src1 = 0; if(n_src2 < 0) n_src2 = 0; ok_src1 = iem_tab_check_arrays(gensym("tab_conv"), x->x_sym_scr1, &x->x_beg_mem_src1, &x->x_size_src1, beg_src1+n_src1); ok_src2 = iem_tab_check_arrays(gensym("tab_conv"), x->x_sym_scr2, &x->x_beg_mem_src2, &x->x_size_src2, beg_src2+n_src2); ok_dst = iem_tab_check_arrays(gensym("tab_conv"), x->x_sym_dst, &x->x_beg_mem_dst, &x->x_size_dst, beg_dst+n_src1); if(ok_src1 && ok_src2 && ok_dst) { t_garray *a; if((x->x_size_src1+x->x_size_src2-1) <= x->x_size_dst)// ok, the last part of dst is zero { if(x->x_size_src1 > x->x_size_src2)// src2(t-tau) is impuls response { vec_sig = x->x_beg_mem_src1; vec_ir = x->x_beg_mem_src2; n = x->x_size_src1; m = x->x_size_src2; } else// src1(t-tau) is impuls response { vec_sig = x->x_beg_mem_src2; vec_ir = x->x_beg_mem_src1; n = x->x_size_src2; m = x->x_size_src1; } vec_dst = x->x_beg_mem_dst; l = m - 1; for(i=0; i=0; i--) { sum = 0.0; for(j=0, k=i-1; jx_size_src1 > x->x_size_src2)// src2(t-tau) is impuls response { vec_sig = x->x_beg_mem_src1; vec_ir = x->x_beg_mem_src2; n = x->x_size_src1; m = x->x_size_src2; } else// src1(t-tau) is impuls response { vec_sig = x->x_beg_mem_src2; vec_ir = x->x_beg_mem_src1; n = x->x_size_src2; m = x->x_size_src1; } vec_dst = x->x_beg_mem_dst; p = x->x_size_dst; k = 0; l = m - 1; for(i=0; i= p) goto tab_conv_list_end; } l = n - m + 1; for(i=0; i= p) goto tab_conv_list_end; } l = m - 1; for(i=l-1; i>=0; i--) { sum = 0.0; for(j=0, k=i-1; j= p) goto tab_conv_list_end; } } tab_conv_list_end: outlet_bang(x->x_obj.ob_outlet); a = (t_garray *)pd_findbyclass(x->x_sym_dst, garray_class); garray_redraw(a); } } else { post("tab_conv-ERROR: list need 5 float arguments:"); post(" source1_offset + source2_offset + destination_offset + number_of_samples_to_convolute + convolution_window_width"); } } static void tab_conv_free(t_tab_conv *x) { } static void *tab_conv_new(t_symbol *s, int argc, t_atom *argv) { t_tab_conv *x = (t_tab_conv *)pd_new(tab_conv_class); t_symbol *src1, *src2, *dst; if((argc >= 3) && IS_A_SYMBOL(argv,0) && IS_A_SYMBOL(argv,1) && IS_A_SYMBOL(argv,2)) { src1 = (t_symbol *)atom_getsymbolarg(0, argc, argv); src2 = (t_symbol *)atom_getsymbolarg(1, argc, argv); dst = (t_symbol *)atom_getsymbolarg(2, argc, argv); } else if((argc >= 2) && IS_A_SYMBOL(argv,0) && IS_A_SYMBOL(argv,1)) { src1 = (t_symbol *)atom_getsymbolarg(0, argc, argv); dst = src1; src2 = (t_symbol *)atom_getsymbolarg(1, argc, argv); } else { post("tab_conv-ERROR: need 3 symbols arguments:"); post(" source1_array_name + source2_array_name + destination_array_name"); return(0); } x->x_sym_scr1 = src1; x->x_sym_scr2 = src2; x->x_sym_dst = dst; outlet_new(&x->x_obj, &s_bang); return(x); } void tab_conv_setup(void) { tab_conv_class = class_new(gensym("tab_conv"), (t_newmethod)tab_conv_new, (t_method)tab_conv_free, sizeof(t_tab_conv), 0, A_GIMME, 0); class_addbang(tab_conv_class, (t_method)tab_conv_bang); // class_addlist(tab_conv_class, (t_method)tab_conv_list); class_addmethod(tab_conv_class, (t_method)tab_conv_src1, gensym("src1"), A_DEFSYMBOL, 0); class_addmethod(tab_conv_class, (t_method)tab_conv_src2, gensym("src2"), A_DEFSYMBOL, 0); class_addmethod(tab_conv_class, (t_method)tab_conv_dst, gensym("dst"), A_DEFSYMBOL, 0); } iem_utils-v0.0.20181004/iem_tab/src/tab_gt_scalar.c0000644000175000017500000001172713303612041022002 0ustar zmoelnigzmoelnig/* For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. iem_tab written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2009 */ #include "m_pd.h" #include "iemlib.h" #include "iem_tab.h" /* -------------------------- tab_gt_scalar ------------------------------ */ /* if(x_beg_mem_src1[i] > compare) */ /* x_beg_mem_dst[i] = 1.0f; */ /* else */ /* x_beg_mem_dst[i] += 0.0f; */ typedef struct _tab_gt_scalar { t_object x_obj; int x_size_src1; int x_size_dst; int x_offset_src1; int x_offset_dst; iemarray_t *x_beg_mem_src1; iemarray_t *x_beg_mem_dst; t_symbol *x_sym_scr1; t_symbol *x_sym_dst; } t_tab_gt_scalar; static t_class *tab_gt_scalar_class; static void tab_gt_scalar_src(t_tab_gt_scalar *x, t_symbol *s) { x->x_sym_scr1 = s; } static void tab_gt_scalar_float(t_tab_gt_scalar *x, t_floatarg compare) { int i, n; int ok_src1, ok_dst; iemarray_t *vec_src1, *vec_dst; ok_src1 = iem_tab_check_arrays(gensym("tab_gt_scalar"), x->x_sym_scr1, &x->x_beg_mem_src1, &x->x_size_src1, 0); ok_dst = iem_tab_check_arrays(gensym("tab_gt_scalar"), x->x_sym_dst, &x->x_beg_mem_dst, &x->x_size_dst, 0); if(ok_src1 && ok_dst) { if(x->x_size_src1 < x->x_size_dst) n = x->x_size_src1; else n = x->x_size_dst; vec_src1 = x->x_beg_mem_src1; vec_dst = x->x_beg_mem_dst; if(n) { t_garray *a; for(i=0; i compare) iemarray_setfloat(vec_dst, i, 1.0f); else iemarray_setfloat(vec_dst, i, 0.0f); } outlet_bang(x->x_obj.ob_outlet); a = (t_garray *)pd_findbyclass(x->x_sym_dst, garray_class); garray_redraw(a); } } } static void tab_gt_scalar_dst(t_tab_gt_scalar *x, t_symbol *s) { x->x_sym_dst = s; } static void tab_gt_scalar_list(t_tab_gt_scalar *x, t_symbol *s, int argc, t_atom *argv) { int beg_src1, beg_dst; int i, n; int ok_src1, ok_dst; t_float compare; iemarray_t *vec_src1, *vec_dst; if((argc >= 4) && IS_A_FLOAT(argv,0) && IS_A_FLOAT(argv,1) && IS_A_FLOAT(argv,2) && IS_A_FLOAT(argv,3)) { beg_src1 = (int)atom_getintarg(0, argc, argv); beg_dst = (int)atom_getintarg(1, argc, argv); n = (int)atom_getintarg(2, argc, argv); compare = (t_float)atom_getfloatarg(3, argc, argv); if(beg_src1 < 0) beg_src1 = 0; if(beg_dst < 0) beg_dst = 0; if(n < 0) n = 0; ok_src1 = iem_tab_check_arrays(gensym("tab_gt_scalar"), x->x_sym_scr1, &x->x_beg_mem_src1, &x->x_size_src1, beg_src1+n); ok_dst = iem_tab_check_arrays(gensym("tab_gt_scalar"), x->x_sym_dst, &x->x_beg_mem_dst, &x->x_size_dst, beg_dst+n); if(ok_src1 && ok_dst) { vec_src1 = x->x_beg_mem_src1 + beg_src1; vec_dst = x->x_beg_mem_dst + beg_dst; if(n) { t_garray *a; for(i=0; i compare) iemarray_setfloat(vec_dst, i, 1.0f); else iemarray_setfloat(vec_dst, i, 0.0f); } outlet_bang(x->x_obj.ob_outlet); a = (t_garray *)pd_findbyclass(x->x_sym_dst, garray_class); garray_redraw(a); } } } else { post("tab_gt_scalar-ERROR: list need 4 float arguments:"); post(" source1_offset + destination_offset + number_of_samples_to_compare + compare_scalar"); } } static void tab_gt_scalar_free(t_tab_gt_scalar *x) { } static void *tab_gt_scalar_new(t_symbol *s, int argc, t_atom *argv) { t_tab_gt_scalar *x = (t_tab_gt_scalar *)pd_new(tab_gt_scalar_class); t_symbol *src1, *dst; if((argc >= 2) && IS_A_SYMBOL(argv,0) && IS_A_SYMBOL(argv,1)) { src1 = (t_symbol *)atom_getsymbolarg(0, argc, argv); dst = (t_symbol *)atom_getsymbolarg(1, argc, argv); } else if((argc >= 1) && IS_A_SYMBOL(argv,0)) { src1 = (t_symbol *)atom_getsymbolarg(0, argc, argv); dst = src1; } else { post("tab_gt_scalar-ERROR: need 2 symbol arguments:"); post(" source_array_name + destination_array_name"); return(0); } x->x_sym_scr1 = src1; x->x_sym_dst = dst; outlet_new(&x->x_obj, &s_bang); return(x); } void tab_gt_scalar_setup(void) { tab_gt_scalar_class = class_new(gensym("tab_gt_scalar"), (t_newmethod)tab_gt_scalar_new, (t_method)tab_gt_scalar_free, sizeof(t_tab_gt_scalar), 0, A_GIMME, 0); class_addfloat(tab_gt_scalar_class, (t_method)tab_gt_scalar_float); class_addlist(tab_gt_scalar_class, (t_method)tab_gt_scalar_list); class_addmethod(tab_gt_scalar_class, (t_method)tab_gt_scalar_src, gensym("src1"), A_DEFSYMBOL, 0); class_addmethod(tab_gt_scalar_class, (t_method)tab_gt_scalar_src, gensym("src"), A_DEFSYMBOL, 0); class_addmethod(tab_gt_scalar_class, (t_method)tab_gt_scalar_dst, gensym("dst"), A_DEFSYMBOL, 0); // class_sethelpsymbol(tab_gt_scalar_class, gensym("iemhelp2/tab_gt_scalar-help")); } iem_utils-v0.0.20181004/iem_tab/src/tab_min_index.c0000644000175000017500000000737113303612041022015 0ustar zmoelnigzmoelnig/* For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. iem_tab written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2009 */ #include "m_pd.h" #include "iemlib.h" #include "iem_tab.h" /* -------------------------- tab_min_index ------------------------------ */ typedef struct _tab_min_index { t_object x_obj; int x_size_src1; int x_offset_src1; iemarray_t *x_beg_mem_src1; t_symbol *x_sym_scr1; void *x_bang_out; void *x_min_out; void *x_min_index_out; } t_tab_min_index; static t_class *tab_min_index_class; static void tab_min_index_src(t_tab_min_index *x, t_symbol *s) { x->x_sym_scr1 = s; } static void tab_min_index_bang(t_tab_min_index *x) { int i, n; int ok_src, min_index=0; iemarray_t *vec_src; t_float min=1.0e37; ok_src = iem_tab_check_arrays(gensym("tab_min_index"), x->x_sym_scr1, &x->x_beg_mem_src1, &x->x_size_src1, 0); if(ok_src) { n = x->x_size_src1; vec_src = x->x_beg_mem_src1; if(n) { for(i=0; ix_min_out, min); outlet_float(x->x_min_index_out, (t_float)min_index); outlet_bang(x->x_bang_out); } } } static void tab_min_index_list(t_tab_min_index *x, t_symbol *s, int argc, t_atom *argv) { int beg_src; int i, n; int ok_src, min_index=0; iemarray_t *vec_src; t_float min=1.0e37; if((argc >= 2) && IS_A_FLOAT(argv,0) && IS_A_FLOAT(argv,1)) { beg_src = (int)atom_getintarg(0, argc, argv); n = (int)atom_getintarg(1, argc, argv); if(beg_src < 0) beg_src = 0; if(n < 0) n = 0; ok_src = iem_tab_check_arrays(gensym("tab_min_index"), x->x_sym_scr1, &x->x_beg_mem_src1, &x->x_size_src1, beg_src+n); if(ok_src) { vec_src = x->x_beg_mem_src1 + beg_src; if(n) { for(i=0; ix_min_out, min); outlet_float(x->x_min_index_out, (t_float)min_index); outlet_bang(x->x_bang_out); } } } else { post("tab_min_index-ERROR: list need 2 float arguments:"); post(" source_offset + number_of_samples_to_calc_min_index"); } } static void tab_min_index_free(t_tab_min_index *x) { } static void *tab_min_index_new(t_symbol *s, int argc, t_atom *argv) { t_tab_min_index *x = (t_tab_min_index *)pd_new(tab_min_index_class); t_symbol *src; if((argc >= 1) && IS_A_SYMBOL(argv,0)) { src = (t_symbol *)atom_getsymbolarg(0, argc, argv); } else { post("tab_min_index-ERROR: need 1 symbol argument:"); post(" source_array_name"); return(0); } x->x_sym_scr1 = src; x->x_bang_out = outlet_new(&x->x_obj, &s_bang); x->x_min_index_out = outlet_new(&x->x_obj, &s_float); x->x_min_out = outlet_new(&x->x_obj, &s_float); return(x); } void tab_min_index_setup(void) { tab_min_index_class = class_new(gensym("tab_min_index"), (t_newmethod)tab_min_index_new, (t_method)tab_min_index_free, sizeof(t_tab_min_index), 0, A_GIMME, 0); class_addbang(tab_min_index_class, (t_method)tab_min_index_bang); class_addlist(tab_min_index_class, (t_method)tab_min_index_list); class_addmethod(tab_min_index_class, (t_method)tab_min_index_src, gensym("src"), A_DEFSYMBOL, 0); class_addmethod(tab_min_index_class, (t_method)tab_min_index_src, gensym("src1"), A_DEFSYMBOL, 0); // class_sethelpsymbol(tab_min_index_class, gensym("iemhelp2/tab_min_index-help")); } iem_utils-v0.0.20181004/iem_tab/src/tab_find_peaks.c0000644000175000017500000002670613303612041022151 0ustar zmoelnigzmoelnig/* For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. iem_tab written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2009 */ #include "m_pd.h" #include "iemlib.h" #include "iem_tab.h" /* -------------------------- tab_find_peaks ------------------------------ */ #define IEMLIB_TAB_FIND_PEAKS_SORT_MODE_AMP 0 #define IEMLIB_TAB_FIND_PEAKS_SORT_MODE_FREQ 1 typedef struct _tab_find_peaks { t_object x_obj; int x_size_src1; int x_offset_src1; iemarray_t *x_beg_mem_src1; int x_work_alloc; int *x_beg_mem_work1; t_float *x_beg_mem_work2; int x_sort_mode; t_float x_hdiff; int x_min_width; int x_max_width; int x_n_peaks; t_symbol *x_sym_scr1; t_outlet *x_bang_out; t_outlet *x_sort_index_out; t_outlet *x_peak_value_out; t_outlet *x_peak_index_out; } t_tab_find_peaks; static t_class *tab_find_peaks_class; static void tab_find_peaks_max_peaks(t_tab_find_peaks *x, t_floatarg fmax_peaks) { int max_peaks = (int)fmax_peaks; if(max_peaks <= 0) max_peaks = 1; x->x_n_peaks = max_peaks; } static void tab_find_peaks_width_range(t_tab_find_peaks *x, t_symbol *s, int argc, t_atom *argv) { int minw, maxw, h; if((argc >= 2) && IS_A_FLOAT(argv,0) && IS_A_FLOAT(argv,1)) { minw = (int)atom_getintarg(0, argc, argv); maxw = (int)atom_getintarg(1, argc, argv); if(minw <= 0) minw = 1; if(maxw <= 0) maxw = 1; if(minw > maxw) { h = minw; minw = maxw; maxw = h; } x->x_min_width = minw; x->x_max_width = maxw; } } static void tab_find_peaks_abs_min_height_diff(t_tab_find_peaks *x, t_floatarg height_diff) { if(height_diff < 0.0f) height_diff *= -1.0f; x->x_hdiff = height_diff; } static void tab_find_peaks_amp_sort(t_tab_find_peaks *x) { x->x_sort_mode = IEMLIB_TAB_FIND_PEAKS_SORT_MODE_AMP; } static void tab_find_peaks_freq_sort(t_tab_find_peaks *x) { x->x_sort_mode = IEMLIB_TAB_FIND_PEAKS_SORT_MODE_FREQ; } static void tab_find_peaks_src(t_tab_find_peaks *x, t_symbol *s) { x->x_sym_scr1 = s; } static void tab_find_peaks_bang(t_tab_find_peaks *x) { int i, n, w, ww; int ok_src, peak_index=0; iemarray_t *vec_src; t_float *vec_work2; int *vec_work1; t_float max=-1.0e37; int max_peaks=x->x_n_peaks; int min_width=x->x_min_width; int max_width=x->x_max_width; t_float abs_min_height_diff=x->x_hdiff; ok_src = iem_tab_check_arrays(gensym("tab_find_peaks"), x->x_sym_scr1, &x->x_beg_mem_src1, &x->x_size_src1, 0); if(ok_src) { n = x->x_size_src1; if(n) { if(!x->x_work_alloc) { x->x_beg_mem_work1 = (int *)getbytes(n * sizeof(int)); x->x_beg_mem_work2 = (t_float *)getbytes(n * sizeof(t_float)); x->x_work_alloc = n; } else if(n != x->x_work_alloc) { x->x_beg_mem_work1 = (int *)resizebytes(x->x_beg_mem_work1, x->x_work_alloc*sizeof(int), n*sizeof(int)); x->x_beg_mem_work2 = (t_float *)resizebytes(x->x_beg_mem_work2, x->x_work_alloc*sizeof(t_float), n*sizeof(t_float)); x->x_work_alloc = n; } vec_src = x->x_beg_mem_src1; vec_work1 = x->x_beg_mem_work1; vec_work2 = x->x_beg_mem_work2; if(x->x_sort_mode == IEMLIB_TAB_FIND_PEAKS_SORT_MODE_FREQ) // FREQ_SORT BEGIN { int sort_index=1,old=0,j; for(i=0; ix_peak_value_out, iemarray_getfloat(vec_src, i)); outlet_float(x->x_peak_index_out, (t_float)peak_index); outlet_float(x->x_sort_index_out, sort_index); sort_index++; } else i = n+1; } old = vec_work1[i]; } outlet_bang(x->x_bang_out); } // FREQ_SORT END else if(x->x_sort_mode == IEMLIB_TAB_FIND_PEAKS_SORT_MODE_AMP) // AMP_SORT BEGIN { int sort_index=1,old=0,j; for(i=0; i max) { max = vec_work2[i]; peak_index = i; } } } if(peak_index >= 0) { outlet_float(x->x_peak_value_out, max); outlet_float(x->x_peak_index_out, (t_float)peak_index); outlet_float(x->x_sort_index_out, sort_index); vec_work1[peak_index] = 0; vec_work2[peak_index] = 0.0f; j=peak_index+1; while(vec_work1[j]) { vec_work1[j] = 0; j++; } j=peak_index-1; while(vec_work1[j]) { vec_work1[j] = 0; j--; } } else sort_index = max_peaks+1; } outlet_bang(x->x_bang_out); } } // AMP_SORT END } /* [n] zu [n-1] u. [n+1] (ww=0)(w=1)(beg=1)(end=n-1) [n-1] u. [n] zu [n-2] u. [n+1] (ww=0)(w=2)(beg=2)(end=n-1) [n] u. [n+1] zu [n-1] u. [n+2] (ww=1)(w=2)(beg=1)(end=n-2) [n-2] u. [n-1] u. [n] zu [n-3] u. [n+1] (ww=0)(w=3)(beg=3)(end=n-1) [n-1] u. [n] u. [n+1] zu [n-2] u. [n+2] (ww=1)(w=3)(beg=2)(end=n-2) [n] u. [n+1] u. [n+2] zu [n-1] u. [n+3] (ww=2)(w=3)(beg=1)(end=n-3) */ } /*static void tab_find_peaks_list(t_tab_find_peaks *x, t_symbol *s, int argc, t_atom *argv) { int beg_src; int i, n; int ok_src, max_index=0; t_float *vec_src; t_float max=-1.0e37; if((argc >= 2) && IS_A_FLOAT(argv,0) && IS_A_FLOAT(argv,1)) { beg_src = (int)atom_getintarg(0, argc, argv); n = (int)atom_getintarg(1, argc, argv); if(beg_src < 0) beg_src = 0; if(n < 0) n = 0; ok_src = iem_tab_check_arrays(gensym("tab_find_peaks"), x->x_sym_scr1, &x->x_beg_mem_src1, &x->x_size_src1, beg_src+n); if(ok_src) { vec_src = x->x_beg_mem_src1 + beg_src; if(n) { for(i=0; i max) { max = vec_src[i]; max_index = i + beg_src; } } outlet_float(x->x_peak_value_out, max); outlet_float(x->x_peak_index_out, (t_float)max_index); outlet_bang(x->x_bang_out); } } } else { post("tab_find_peaks-ERROR: list need 2 float arguments:"); post(" source_offset + number_of_samples_to_calc_max_index"); } }*/ static void tab_find_peaks_free(t_tab_find_peaks *x) { if(x->x_work_alloc) { freebytes(x->x_beg_mem_work1, x->x_work_alloc * sizeof(int)); freebytes(x->x_beg_mem_work2, x->x_work_alloc * sizeof(t_float)); } } static void *tab_find_peaks_new(t_symbol *s, int argc, t_atom *argv) { t_tab_find_peaks *x = (t_tab_find_peaks *)pd_new(tab_find_peaks_class); t_symbol *src; if((argc >= 1) && IS_A_SYMBOL(argv,0)) { src = (t_symbol *)atom_getsymbolarg(0, argc, argv); } else { post("tab_find_peaks-ERROR: need 1 symbol argument:"); post(" source_array_name"); return(0); } x->x_work_alloc = 0; x->x_beg_mem_work1 = (int *)0; x->x_beg_mem_work2 = (t_float *)0; x->x_sym_scr1 = src; x->x_bang_out = (t_outlet *)outlet_new(&x->x_obj, &s_bang); // ready x->x_sort_index_out = (t_outlet *)outlet_new(&x->x_obj, &s_float); // sort index x->x_peak_index_out = (t_outlet *)outlet_new(&x->x_obj, &s_float); // freq x->x_peak_value_out = (t_outlet *)outlet_new(&x->x_obj, &s_float); // value return(x); } void tab_find_peaks_setup(void) { tab_find_peaks_class = class_new(gensym("tab_find_peaks"), (t_newmethod)tab_find_peaks_new, (t_method)tab_find_peaks_free, sizeof(t_tab_find_peaks), 0, A_GIMME, 0); class_addbang(tab_find_peaks_class, (t_method)tab_find_peaks_bang); /*class_addlist(tab_find_peaks_class, (t_method)tab_find_peaks_list);*/ class_addmethod(tab_find_peaks_class, (t_method)tab_find_peaks_src, gensym("src"), A_DEFSYMBOL, 0); class_addmethod(tab_find_peaks_class, (t_method)tab_find_peaks_src, gensym("src1"), A_DEFSYMBOL, 0); class_addmethod(tab_find_peaks_class, (t_method)tab_find_peaks_max_peaks, gensym("max_peaks"), A_DEFFLOAT, 0); class_addmethod(tab_find_peaks_class, (t_method)tab_find_peaks_width_range, gensym("width_range"), A_GIMME, 0); class_addmethod(tab_find_peaks_class, (t_method)tab_find_peaks_abs_min_height_diff, gensym("abs_min_height_diff"), A_DEFFLOAT, 0); class_addmethod(tab_find_peaks_class, (t_method)tab_find_peaks_amp_sort, gensym("amp_sort"), 0); class_addmethod(tab_find_peaks_class, (t_method)tab_find_peaks_freq_sort, gensym("freq_sort"), 0); // class_sethelpsymbol(tab_find_peaks_class, gensym("iemhelp2/tab_find_peaks-help")); } iem_utils-v0.0.20181004/iem_tab/src/makefile_vc12proj0000644000175000017500000000320713355471365022314 0ustar zmoelnigzmoelnigTARGET = iem_tab all: ..\$(TARGET).dll VIS_CPP_COMP = cl VIS_CPP_LINK = link VIS_CPP_PATH = "$(PROGRAMFILES)\Microsoft Visual Studio 11.0\VC" VIS_SDK_PATH = "$(PROGRAMFILES)\Windows Kits\8.1" PD_INST_PATH = "$(PROGRAMFILES)\pd-0.48-1" PD_WIN_INCLUDE_PATH = /I. /I$(PD_INST_PATH)\src /I$(VIS_CPP_PATH)\include /I..\include PD_WIN_C_FLAGS = /nologo /W3 /WX /DMSW /DNT /DPD /DWIN32 /DWINDOWS /Ox -D_CRT_SECURE_NO_WARNINGS PD_WIN_L_FLAGS = /nologo PD_WIN_LIB = /NODEFAULTLIB:libcmt /NODEFAULTLIB:oldnames /NODEFAULTLIB:kernel32 \ $(VIS_CPP_PATH)\lib\libcmt.lib \ $(VIS_CPP_PATH)\lib\oldnames.lib \ $(VIS_SDK_PATH)\Lib\winv6.3\um\x86\kernel32.lib \ $(PD_INST_PATH)\bin\pd.lib SRC = tab_abs.c \ tab_add.c \ tab_add_scalar.c \ tab_carth2polar.c \ tab_complex_inv.c \ tab_complex_mul.c \ tab_const.c \ tab_conv.c \ tab_copy.c \ tab_counter.c \ tab_cross_corr.c \ tab_dbtorms.c \ tab_dbtopow.c \ tab_div.c \ tab_eq.c \ tab_eq_scalar.c \ tab_fft.c \ tab_find_exact_peaks.c \ tab_find_peaks.c \ tab_ge.c \ tab_ge_scalar.c \ tab_gt.c \ tab_gt_scalar.c \ tab_get_size.c \ tab_ifft.c \ tab_le.c \ tab_le_scalar.c \ tab_lt.c \ tab_lt_scalar.c \ tab_max_index.c \ tab_min_index.c \ tab_min_max.c \ tab_mul.c \ tab_mul_scalar.c \ tab_ne.c \ tab_ne_scalar.c \ tab_powtodb.c \ tab_reverse.c \ tab_rmstodb.c \ tab_rfft.c \ tab_rifft.c \ tab_sqrt.c \ tab_sub.c \ tab_sum.c \ $(TARGET).c OBJ = $(SRC:.c=.obj) .c.obj: $(VIS_CPP_COMP) $(PD_WIN_C_FLAGS) $(PD_WIN_INCLUDE_PATH) /c $*.c ..\$(TARGET).dll: $(OBJ) $(VIS_CPP_LINK) $(PD_WIN_L_FLAGS) /dll /export:$(TARGET)_setup \ /out:..\$(TARGET).dll $(OBJ) $(PD_WIN_LIB) clean: del *.obj iem_utils-v0.0.20181004/iem_tab/src/tab_powtodb.c0000644000175000017500000001150213303612041021510 0ustar zmoelnigzmoelnig/* For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. iem_tab written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2010 */ #include "m_pd.h" #include "iemlib.h" #include "iem_tab.h" #include #define IEMTABLOGTEN 2.302585092994046 /* -------------------------- tab_powtodb ------------------------------ */ /* x_beg_mem_dst[i] = sqrt(x_beg_mem_src1[i]) */ typedef struct _tab_powtodb { t_object x_obj; int x_size_src1; int x_size_dst; int x_offset_src1; int x_offset_dst; iemarray_t *x_beg_mem_src1; iemarray_t *x_beg_mem_dst; t_symbol *x_sym_scr1; t_symbol *x_sym_dst; } t_tab_powtodb; static t_class *tab_powtodb_class; static void tab_powtodb_src(t_tab_powtodb *x, t_symbol *s) { x->x_sym_scr1 = s; } static void tab_powtodb_dst(t_tab_powtodb *x, t_symbol *s) { x->x_sym_dst = s; } static void tab_powtodb_bang(t_tab_powtodb *x) { int i, n; int ok_src, ok_dst; iemarray_t *vec_src, *vec_dst; ok_src = iem_tab_check_arrays(gensym("tab_powtodb"), x->x_sym_scr1, &x->x_beg_mem_src1, &x->x_size_src1, 0); ok_dst = iem_tab_check_arrays(gensym("tab_powtodb"), x->x_sym_dst, &x->x_beg_mem_dst, &x->x_size_dst, 0); if(ok_src && ok_dst) { if(x->x_size_src1 < x->x_size_dst) n = x->x_size_src1; else n = x->x_size_dst; vec_src = x->x_beg_mem_src1; vec_dst = x->x_beg_mem_dst; if(n) { t_garray *a; for(i=0; ix_obj.ob_outlet); a = (t_garray *)pd_findbyclass(x->x_sym_dst, garray_class); garray_redraw(a); } } } static void tab_powtodb_list(t_tab_powtodb *x, t_symbol *s, int argc, t_atom *argv) { int beg_src, beg_dst; int i, n; int ok_src, ok_dst; iemarray_t *vec_src, *vec_dst; if((argc >= 3) && IS_A_FLOAT(argv,0) && IS_A_FLOAT(argv,1) && IS_A_FLOAT(argv,2)) { beg_src = (int)atom_getintarg(0, argc, argv); beg_dst = (int)atom_getintarg(1, argc, argv); n = (int)atom_getintarg(2, argc, argv); if(beg_src < 0) beg_src = 0; if(beg_dst < 0) beg_dst = 0; if(n < 0) n = 0; ok_src = iem_tab_check_arrays(gensym("tab_powtodb"), x->x_sym_scr1, &x->x_beg_mem_src1, &x->x_size_src1, beg_src+n); ok_dst = iem_tab_check_arrays(gensym("tab_powtodb"), x->x_sym_dst, &x->x_beg_mem_dst, &x->x_size_dst, beg_dst+n); if(ok_src && ok_dst) { vec_src = x->x_beg_mem_src1 + beg_src; vec_dst = x->x_beg_mem_dst + beg_dst; if(n) { t_garray *a; for(i=0; ix_obj.ob_outlet); a = (t_garray *)pd_findbyclass(x->x_sym_dst, garray_class); garray_redraw(a); } } } else { post("tab_powtodb-ERROR: list need 3 float arguments:"); post(" source_offset + destination_offset + number_of_samples_to_sqrt"); } } static void tab_powtodb_free(t_tab_powtodb *x) { } static void *tab_powtodb_new(t_symbol *s, int argc, t_atom *argv) { t_tab_powtodb *x = (t_tab_powtodb *)pd_new(tab_powtodb_class); t_symbol *src, *dst; if((argc >= 2) && IS_A_SYMBOL(argv,0) && IS_A_SYMBOL(argv,1)) { src = (t_symbol *)atom_getsymbolarg(0, argc, argv); dst = (t_symbol *)atom_getsymbolarg(1, argc, argv); } else if((argc >= 1) && IS_A_SYMBOL(argv,0)) { src = (t_symbol *)atom_getsymbolarg(0, argc, argv); dst = src; } else { post("tab_powtodb-ERROR: need 2 symbols arguments:"); post(" source_array_name + destination_array_name"); return(0); } x->x_sym_scr1 = src; x->x_sym_dst = dst; outlet_new(&x->x_obj, &s_bang); return(x); } void tab_powtodb_setup(void) { tab_powtodb_class = class_new(gensym("tab_powtodb"), (t_newmethod)tab_powtodb_new, (t_method)tab_powtodb_free, sizeof(t_tab_powtodb), 0, A_GIMME, 0); class_addbang(tab_powtodb_class, (t_method)tab_powtodb_bang); class_addlist(tab_powtodb_class, (t_method)tab_powtodb_list); class_addmethod(tab_powtodb_class, (t_method)tab_powtodb_src, gensym("src"), A_DEFSYMBOL, 0); class_addmethod(tab_powtodb_class, (t_method)tab_powtodb_src, gensym("src1"), A_DEFSYMBOL, 0); class_addmethod(tab_powtodb_class, (t_method)tab_powtodb_dst, gensym("dst"), A_DEFSYMBOL, 0); } iem_utils-v0.0.20181004/iem_tab/src/tab_ne_scalar.c0000644000175000017500000001173213303612042021767 0ustar zmoelnigzmoelnig/* For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. iem_tab written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2009 */ #include "m_pd.h" #include "iemlib.h" #include "iem_tab.h" /* -------------------------- tab_ne_scalar ------------------------------ */ /* if(x_beg_mem_src1[i] != compare) */ /* x_beg_mem_dst[i] = 1.0f; */ /* else */ /* x_beg_mem_dst[i] += 0.0f; */ typedef struct _tab_ne_scalar { t_object x_obj; int x_size_src1; int x_size_dst; int x_offset_src1; int x_offset_dst; iemarray_t *x_beg_mem_src1; iemarray_t *x_beg_mem_dst; t_symbol *x_sym_scr1; t_symbol *x_sym_dst; } t_tab_ne_scalar; static t_class *tab_ne_scalar_class; static void tab_ne_scalar_src(t_tab_ne_scalar *x, t_symbol *s) { x->x_sym_scr1 = s; } static void tab_ne_scalar_float(t_tab_ne_scalar *x, t_floatarg compare) { int i, n; int ok_src1, ok_dst; iemarray_t *vec_src1, *vec_dst; ok_src1 = iem_tab_check_arrays(gensym("tab_ne_scalar"), x->x_sym_scr1, &x->x_beg_mem_src1, &x->x_size_src1, 0); ok_dst = iem_tab_check_arrays(gensym("tab_ne_scalar"), x->x_sym_dst, &x->x_beg_mem_dst, &x->x_size_dst, 0); if(ok_src1 && ok_dst) { if(x->x_size_src1 < x->x_size_dst) n = x->x_size_src1; else n = x->x_size_dst; vec_src1 = x->x_beg_mem_src1; vec_dst = x->x_beg_mem_dst; if(n) { t_garray *a; for(i=0; ix_obj.ob_outlet); a = (t_garray *)pd_findbyclass(x->x_sym_dst, garray_class); garray_redraw(a); } } } static void tab_ne_scalar_dst(t_tab_ne_scalar *x, t_symbol *s) { x->x_sym_dst = s; } static void tab_ne_scalar_list(t_tab_ne_scalar *x, t_symbol *s, int argc, t_atom *argv) { int beg_src1, beg_dst; int i, n; int ok_src1, ok_dst; t_float compare; iemarray_t *vec_src1, *vec_dst; if((argc >= 4) && IS_A_FLOAT(argv,0) && IS_A_FLOAT(argv,1) && IS_A_FLOAT(argv,2) && IS_A_FLOAT(argv,3)) { beg_src1 = (int)atom_getintarg(0, argc, argv); beg_dst = (int)atom_getintarg(1, argc, argv); n = (int)atom_getintarg(2, argc, argv); compare = (t_float)atom_getfloatarg(3, argc, argv); if(beg_src1 < 0) beg_src1 = 0; if(beg_dst < 0) beg_dst = 0; if(n < 0) n = 0; ok_src1 = iem_tab_check_arrays(gensym("tab_ne_scalar"), x->x_sym_scr1, &x->x_beg_mem_src1, &x->x_size_src1, beg_src1+n); ok_dst = iem_tab_check_arrays(gensym("tab_ne_scalar"), x->x_sym_dst, &x->x_beg_mem_dst, &x->x_size_dst, beg_dst+n); if(ok_src1 && ok_dst) { vec_src1 = x->x_beg_mem_src1 + beg_src1; vec_dst = x->x_beg_mem_dst + beg_dst; if(n) { t_garray *a; for(i=0; ix_obj.ob_outlet); a = (t_garray *)pd_findbyclass(x->x_sym_dst, garray_class); garray_redraw(a); } } } else { post("tab_ne_scalar-ERROR: list need 4 float arguments:"); post(" source1_offset + destination_offset + number_of_samples_to_compare + compare_scalar"); } } static void tab_ne_scalar_free(t_tab_ne_scalar *x) { } static void *tab_ne_scalar_new(t_symbol *s, int argc, t_atom *argv) { t_tab_ne_scalar *x = (t_tab_ne_scalar *)pd_new(tab_ne_scalar_class); t_symbol *src1, *dst; if((argc >= 2) && IS_A_SYMBOL(argv,0) && IS_A_SYMBOL(argv,1)) { src1 = (t_symbol *)atom_getsymbolarg(0, argc, argv); dst = (t_symbol *)atom_getsymbolarg(1, argc, argv); } else if((argc >= 1) && IS_A_SYMBOL(argv,0)) { src1 = (t_symbol *)atom_getsymbolarg(0, argc, argv); dst = src1; } else { post("tab_ne_scalar-ERROR: need 2 symbol arguments:"); post(" source_array_name + destination_array_name"); return(0); } x->x_sym_scr1 = src1; x->x_sym_dst = dst; outlet_new(&x->x_obj, &s_bang); return(x); } void tab_ne_scalar_setup(void) { tab_ne_scalar_class = class_new(gensym("tab_ne_scalar"), (t_newmethod)tab_ne_scalar_new, (t_method)tab_ne_scalar_free, sizeof(t_tab_ne_scalar), 0, A_GIMME, 0); class_addfloat(tab_ne_scalar_class, (t_method)tab_ne_scalar_float); class_addlist(tab_ne_scalar_class, (t_method)tab_ne_scalar_list); class_addmethod(tab_ne_scalar_class, (t_method)tab_ne_scalar_src, gensym("src1"), A_DEFSYMBOL, 0); class_addmethod(tab_ne_scalar_class, (t_method)tab_ne_scalar_src, gensym("src"), A_DEFSYMBOL, 0); class_addmethod(tab_ne_scalar_class, (t_method)tab_ne_scalar_dst, gensym("dst"), A_DEFSYMBOL, 0); // class_sethelpsymbol(tab_ne_scalar_class, gensym("iemhelp2/tab_ne_scalar-help")); } iem_utils-v0.0.20181004/iem_tab/src/VC9/0000755000175000017500000000000012630366350017455 5ustar zmoelnigzmoelnigiem_utils-v0.0.20181004/iem_tab/src/VC9/makefile_vc9proj0000644000175000017500000000307212630366350022633 0ustar zmoelnigzmoelnigTARGET = iem_tab all: ..\$(TARGET).dll VIS_CPP_PATH = "C:\Program Files\Microsoft Visual Studio 9.0\VC" VIS_SDK_PATH = "C:\Program Files\Microsoft SDKs\Windows\v6.0A" PD_INST_PATH = "C:\Program Files\pd-0.43.0" PD_WIN_INCLUDE_PATH = /I. /I$(PD_INST_PATH)\src /I$(VIS_CPP_PATH)\include PD_WIN_C_FLAGS = /nologo /W3 /WX /DMSW /DNT /DPD /DWIN32 /DWINDOWS /Ox -D_CRT_SECURE_NO_WARNINGS PD_WIN_L_FLAGS = /nologo PD_WIN_LIB = /NODEFAULTLIB:libcmt /NODEFAULTLIB:oldnames /NODEFAULTLIB:kernel32 \ $(VIS_CPP_PATH)\lib\libcmt.lib \ $(VIS_CPP_PATH)\lib\oldnames.lib \ $(VIS_SDK_PATH)\lib\kernel32.lib \ $(PD_INST_PATH)\bin\pd.lib SRC = tab_abs.c \ tab_add.c \ tab_add_scalar.c \ tab_carth2polar.c \ tab_complex_inv.c \ tab_complex_mul.c \ tab_const.c \ tab_conv.c \ tab_copy.c \ tab_counter.c \ tab_cross_corr.c \ tab_div.c \ tab_eq.c \ tab_eq_scalar.c \ tab_fft.c \ tab_find_exact_peaks.c \ tab_find_peaks.c \ tab_ge.c \ tab_ge_scalar.c \ tab_gt.c \ tab_gt_scalar.c \ tab_get_size.c \ tab_ifft.c \ tab_le.c \ tab_le_scalar.c \ tab_lt.c \ tab_lt_scalar.c \ tab_max_index.c \ tab_min_index.c \ tab_min_max.c \ tab_mul.c \ tab_mul_scalar.c \ tab_ne.c \ tab_ne_scalar.c \ tab_reverse.c \ tab_rfft.c \ tab_rifft.c \ tab_sqrt.c \ tab_sub.c \ tab_sum.c \ iem_tab.c OBJ = $(SRC:.c=.obj) .c.obj: cl $(PD_WIN_C_FLAGS) $(PD_WIN_INCLUDE_PATH) /c $*.c ..\$(TARGET).dll: $(OBJ) link $(PD_WIN_L_FLAGS) /dll /export:$(TARGET)_setup \ /out:..\$(TARGET).dll $(OBJ) $(PD_WIN_LIB) clean: del *.obj iem_utils-v0.0.20181004/iem_tab/src/VC9/iem_tab.vcproj0000644000175000017500000000356512630366350022313 0ustar zmoelnigzmoelnig iem_utils-v0.0.20181004/iem_tab/src/VC9/iem_tab.sln0000644000175000017500000000155712630366350021603 0ustar zmoelnigzmoelnig Microsoft Visual Studio Solution File, Format Version 10.00 # Visual Studio 2008 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "iem_tab", "iem_tab.vcproj", "{6A44952F-0D55-44EE-9032-928368583BEC}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Win32 = Debug|Win32 Release|Win32 = Release|Win32 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {6A44952F-0D55-44EE-9032-928368583BEC}.Debug|Win32.ActiveCfg = Debug|Win32 {6A44952F-0D55-44EE-9032-928368583BEC}.Debug|Win32.Build.0 = Debug|Win32 {6A44952F-0D55-44EE-9032-928368583BEC}.Release|Win32.ActiveCfg = Release|Win32 {6A44952F-0D55-44EE-9032-928368583BEC}.Release|Win32.Build.0 = Release|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection EndGlobal iem_utils-v0.0.20181004/iem_tab/src/tab_eq_scalar.c0000644000175000017500000001173213303612042021772 0ustar zmoelnigzmoelnig/* For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. iem_tab written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2009 */ #include "m_pd.h" #include "iemlib.h" #include "iem_tab.h" /* -------------------------- tab_eq_scalar ------------------------------ */ /* if(x_beg_mem_src1[i] == compare) */ /* x_beg_mem_dst[i] = 1.0f; */ /* else */ /* x_beg_mem_dst[i] += 0.0f; */ typedef struct _tab_eq_scalar { t_object x_obj; int x_size_src1; int x_size_dst; int x_offset_src1; int x_offset_dst; iemarray_t *x_beg_mem_src1; iemarray_t *x_beg_mem_dst; t_symbol *x_sym_scr1; t_symbol *x_sym_dst; } t_tab_eq_scalar; static t_class *tab_eq_scalar_class; static void tab_eq_scalar_src(t_tab_eq_scalar *x, t_symbol *s) { x->x_sym_scr1 = s; } static void tab_eq_scalar_float(t_tab_eq_scalar *x, t_floatarg compare) { int i, n; int ok_src1, ok_dst; iemarray_t *vec_src1, *vec_dst; ok_src1 = iem_tab_check_arrays(gensym("tab_eq_scalar"), x->x_sym_scr1, &x->x_beg_mem_src1, &x->x_size_src1, 0); ok_dst = iem_tab_check_arrays(gensym("tab_eq_scalar"), x->x_sym_dst, &x->x_beg_mem_dst, &x->x_size_dst, 0); if(ok_src1 && ok_dst) { if(x->x_size_src1 < x->x_size_dst) n = x->x_size_src1; else n = x->x_size_dst; vec_src1 = x->x_beg_mem_src1; vec_dst = x->x_beg_mem_dst; if(n) { t_garray *a; for(i=0; ix_obj.ob_outlet); a = (t_garray *)pd_findbyclass(x->x_sym_dst, garray_class); garray_redraw(a); } } } static void tab_eq_scalar_dst(t_tab_eq_scalar *x, t_symbol *s) { x->x_sym_dst = s; } static void tab_eq_scalar_list(t_tab_eq_scalar *x, t_symbol *s, int argc, t_atom *argv) { int beg_src1, beg_dst; int i, n; int ok_src1, ok_dst; iemarray_t *vec_src1, *vec_dst; t_float compare; if((argc >= 4) && IS_A_FLOAT(argv,0) && IS_A_FLOAT(argv,1) && IS_A_FLOAT(argv,2) && IS_A_FLOAT(argv,3)) { beg_src1 = (int)atom_getintarg(0, argc, argv); beg_dst = (int)atom_getintarg(1, argc, argv); n = (int)atom_getintarg(2, argc, argv); compare = (t_float)atom_getfloatarg(3, argc, argv); if(beg_src1 < 0) beg_src1 = 0; if(beg_dst < 0) beg_dst = 0; if(n < 0) n = 0; ok_src1 = iem_tab_check_arrays(gensym("tab_eq_scalar"), x->x_sym_scr1, &x->x_beg_mem_src1, &x->x_size_src1, beg_src1+n); ok_dst = iem_tab_check_arrays(gensym("tab_eq_scalar"), x->x_sym_dst, &x->x_beg_mem_dst, &x->x_size_dst, beg_dst+n); if(ok_src1 && ok_dst) { vec_src1 = x->x_beg_mem_src1 + beg_src1; vec_dst = x->x_beg_mem_dst + beg_dst; if(n) { t_garray *a; for(i=0; ix_obj.ob_outlet); a = (t_garray *)pd_findbyclass(x->x_sym_dst, garray_class); garray_redraw(a); } } } else { post("tab_eq_scalar-ERROR: list need 4 float arguments:"); post(" source1_offset + destination_offset + number_of_samples_to_compare + compare_scalar"); } } static void tab_eq_scalar_free(t_tab_eq_scalar *x) { } static void *tab_eq_scalar_new(t_symbol *s, int argc, t_atom *argv) { t_tab_eq_scalar *x = (t_tab_eq_scalar *)pd_new(tab_eq_scalar_class); t_symbol *src1, *dst; if((argc >= 2) && IS_A_SYMBOL(argv,0) && IS_A_SYMBOL(argv,1)) { src1 = (t_symbol *)atom_getsymbolarg(0, argc, argv); dst = (t_symbol *)atom_getsymbolarg(1, argc, argv); } else if((argc >= 1) && IS_A_SYMBOL(argv,0)) { src1 = (t_symbol *)atom_getsymbolarg(0, argc, argv); dst = src1; } else { post("tab_eq_scalar-ERROR: need 2 symbol arguments:"); post(" source_array_name + destination_array_name"); return(0); } x->x_sym_scr1 = src1; x->x_sym_dst = dst; outlet_new(&x->x_obj, &s_bang); return(x); } void tab_eq_scalar_setup(void) { tab_eq_scalar_class = class_new(gensym("tab_eq_scalar"), (t_newmethod)tab_eq_scalar_new, (t_method)tab_eq_scalar_free, sizeof(t_tab_eq_scalar), 0, A_GIMME, 0); class_addfloat(tab_eq_scalar_class, (t_method)tab_eq_scalar_float); class_addlist(tab_eq_scalar_class, (t_method)tab_eq_scalar_list); class_addmethod(tab_eq_scalar_class, (t_method)tab_eq_scalar_src, gensym("src1"), A_DEFSYMBOL, 0); class_addmethod(tab_eq_scalar_class, (t_method)tab_eq_scalar_src, gensym("src"), A_DEFSYMBOL, 0); class_addmethod(tab_eq_scalar_class, (t_method)tab_eq_scalar_dst, gensym("dst"), A_DEFSYMBOL, 0); // class_sethelpsymbol(tab_eq_scalar_class, gensym("iemhelp2/tab_eq_scalar-help")); } iem_utils-v0.0.20181004/iem_tab/src/tab_gt.c0000644000175000017500000001307113303612042020450 0ustar zmoelnigzmoelnig/* For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. iem_tab written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2009 */ #include "m_pd.h" #include "iemlib.h" #include "iem_tab.h" /* -------------------------- tab_gt ------------------------------ */ /* if(x_beg_mem_src1[i] > x_beg_mem_src2[i]) */ /* x_beg_mem_dst[i] = 1.0f; */ /* else */ /* x_beg_mem_dst[i] = 0.0f; */ typedef struct _tab_gt { t_object x_obj; int x_size_src1; int x_size_src2; int x_size_dst; int x_offset_src1; int x_offset_src2; int x_offset_dst; iemarray_t *x_beg_mem_src1; iemarray_t *x_beg_mem_src2; iemarray_t *x_beg_mem_dst; t_symbol *x_sym_scr1; t_symbol *x_sym_scr2; t_symbol *x_sym_dst; } t_tab_gt; static t_class *tab_gt_class; static void tab_gt_src1(t_tab_gt *x, t_symbol *s) { x->x_sym_scr1 = s; } static void tab_gt_src2(t_tab_gt *x, t_symbol *s) { x->x_sym_scr2 = s; } static void tab_gt_dst(t_tab_gt *x, t_symbol *s) { x->x_sym_dst = s; } static void tab_gt_bang(t_tab_gt *x) { int i, n; int ok_src1, ok_src2, ok_dst; iemarray_t *vec_src1, *vec_src2, *vec_dst; ok_src1 = iem_tab_check_arrays(gensym("tab_gt"), x->x_sym_scr1, &x->x_beg_mem_src1, &x->x_size_src1, 0); ok_src2 = iem_tab_check_arrays(gensym("tab_gt"), x->x_sym_scr2, &x->x_beg_mem_src2, &x->x_size_src2, 0); ok_dst = iem_tab_check_arrays(gensym("tab_gt"), x->x_sym_dst, &x->x_beg_mem_dst, &x->x_size_dst, 0); if(ok_src1 && ok_src2 && ok_dst) { if(x->x_size_src1 < x->x_size_dst) n = x->x_size_src1; else n = x->x_size_dst; if(x->x_size_src2 < n) n = x->x_size_src2; vec_src1 = x->x_beg_mem_src1; vec_src2 = x->x_beg_mem_src2; vec_dst = x->x_beg_mem_dst; if(n) { t_garray *a; for(i=0; i iemarray_getfloat(vec_src2, i)) iemarray_setfloat(vec_dst, i, 1.0f); else iemarray_setfloat(vec_dst, i, 0.0f); } outlet_bang(x->x_obj.ob_outlet); a = (t_garray *)pd_findbyclass(x->x_sym_dst, garray_class); garray_redraw(a); } } } static void tab_gt_list(t_tab_gt *x, t_symbol *s, int argc, t_atom *argv) { int beg_src1, beg_src2, beg_dst; int i, n; int ok_src1, ok_src2, ok_dst; iemarray_t *vec_src1, *vec_src2, *vec_dst; if((argc >= 4) && IS_A_FLOAT(argv,0) && IS_A_FLOAT(argv,1) && IS_A_FLOAT(argv,2) && IS_A_FLOAT(argv,3)) { beg_src1 = (int)atom_getintarg(0, argc, argv); beg_src2 = (int)atom_getintarg(1, argc, argv); beg_dst = (int)atom_getintarg(2, argc, argv); n = (int)atom_getintarg(3, argc, argv); if(beg_src1 < 0) beg_src1 = 0; if(beg_src2 < 0) beg_src2 = 0; if(beg_dst < 0) beg_dst = 0; if(n < 0) n = 0; ok_src1 = iem_tab_check_arrays(gensym("tab_gt"), x->x_sym_scr1, &x->x_beg_mem_src1, &x->x_size_src1, beg_src1+n); ok_src2 = iem_tab_check_arrays(gensym("tab_gt"), x->x_sym_scr2, &x->x_beg_mem_src2, &x->x_size_src2, beg_src2+n); ok_dst = iem_tab_check_arrays(gensym("tab_gt"), x->x_sym_dst, &x->x_beg_mem_dst, &x->x_size_dst, beg_dst+n); if(ok_src1 && ok_src2 && ok_dst) { vec_src1 = x->x_beg_mem_src1 + beg_src1; vec_src2 = x->x_beg_mem_src2 + beg_src2; vec_dst = x->x_beg_mem_dst + beg_dst; if(n) { t_garray *a; for(i=0; i iemarray_getfloat(vec_src2, i)) iemarray_setfloat(vec_dst, i, 1.0f); else iemarray_setfloat(vec_dst, i, 0.0f); } outlet_bang(x->x_obj.ob_outlet); a = (t_garray *)pd_findbyclass(x->x_sym_dst, garray_class); garray_redraw(a); } } } else { post("tab_gt-ERROR: list need 4 float arguments:"); post(" source1_offset + source2_offset + destination_offset + number_of_samples_to_compare"); } } static void tab_gt_free(t_tab_gt *x) { } static void *tab_gt_new(t_symbol *s, int argc, t_atom *argv) { t_tab_gt *x = (t_tab_gt *)pd_new(tab_gt_class); t_symbol *src1, *src2, *dst; if((argc >= 3) && IS_A_SYMBOL(argv,0) && IS_A_SYMBOL(argv,1) && IS_A_SYMBOL(argv,2)) { src1 = (t_symbol *)atom_getsymbolarg(0, argc, argv); src2 = (t_symbol *)atom_getsymbolarg(1, argc, argv); dst = (t_symbol *)atom_getsymbolarg(2, argc, argv); } else if((argc >= 2) && IS_A_SYMBOL(argv,0) && IS_A_SYMBOL(argv,1)) { src1 = (t_symbol *)atom_getsymbolarg(0, argc, argv); dst = src1; src2 = (t_symbol *)atom_getsymbolarg(1, argc, argv); } else { post("tab_gt-ERROR: need 3 symbols arguments:"); post(" source1_array_name + source2_array_name + destination_array_name"); return(0); } x->x_sym_scr1 = src1; x->x_sym_scr2 = src2; x->x_sym_dst = dst; outlet_new(&x->x_obj, &s_bang); return(x); } void tab_gt_setup(void) { tab_gt_class = class_new(gensym("tab_gt"), (t_newmethod)tab_gt_new, (t_method)tab_gt_free, sizeof(t_tab_gt), 0, A_GIMME, 0); class_addbang(tab_gt_class, (t_method)tab_gt_bang); class_addlist(tab_gt_class, (t_method)tab_gt_list); class_addmethod(tab_gt_class, (t_method)tab_gt_src1, gensym("src1"), A_DEFSYMBOL, 0); class_addmethod(tab_gt_class, (t_method)tab_gt_src2, gensym("src2"), A_DEFSYMBOL, 0); class_addmethod(tab_gt_class, (t_method)tab_gt_dst, gensym("dst"), A_DEFSYMBOL, 0); // class_sethelpsymbol(tab_gt_class, gensym("iemhelp2/tab_gt-help")); } iem_utils-v0.0.20181004/iem_tab/src/tab_find_exact_peaks.c0000644000175000017500000002747013303612042023335 0ustar zmoelnigzmoelnig/* For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. iem_tab written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2009 */ #include "m_pd.h" #include "iemlib.h" #include "iem_tab.h" /* -------------------------- tab_find_exact_peaks ------------------------------ */ #define IEMLIB_TAB_FIND_EXACT_PEAKS_SORT_MODE_AMP 0 #define IEMLIB_TAB_FIND_EXACT_PEAKS_SORT_MODE_FREQ 1 typedef struct _tab_find_exact_peaks { t_object x_obj; int x_size_src1; int x_offset_src1; iemarray_t *x_beg_mem_src1; int x_work_alloc; int *x_beg_mem_work1; t_float *x_beg_mem_work2; int x_sort_mode; t_float x_hdiff; int x_min_width; int x_max_width; int x_n_peaks; t_symbol *x_sym_scr1; t_outlet *x_bang_out; t_outlet *x_sort_index_out; t_outlet *x_peak_value_out; t_outlet *x_peak_index_out; } t_tab_find_exact_peaks; static t_class *tab_find_exact_peaks_class; static void tab_find_exact_peaks_max_peaks(t_tab_find_exact_peaks *x, t_floatarg fmax_peaks) { int max_peaks = (int)fmax_peaks; if(max_peaks <= 0) max_peaks = 1; x->x_n_peaks = max_peaks; } static void tab_find_exact_peaks_width_range(t_tab_find_exact_peaks *x, t_symbol *s, int argc, t_atom *argv) { int minw, maxw, h; if((argc >= 2) && IS_A_FLOAT(argv,0) && IS_A_FLOAT(argv,1)) { minw = (int)atom_getintarg(0, argc, argv); maxw = (int)atom_getintarg(1, argc, argv); if(minw <= 0) minw = 1; if(maxw <= 0) maxw = 1; if(minw > maxw) { h = minw; minw = maxw; maxw = h; } x->x_min_width = minw; x->x_max_width = maxw; } } static void tab_find_exact_peaks_abs_min_height_diff(t_tab_find_exact_peaks *x, t_floatarg height_diff) { if(height_diff < 0.0f) height_diff *= -1.0f; x->x_hdiff = height_diff; } static void tab_find_exact_peaks_amp_sort(t_tab_find_exact_peaks *x) { x->x_sort_mode = IEMLIB_TAB_FIND_EXACT_PEAKS_SORT_MODE_AMP; } static void tab_find_exact_peaks_freq_sort(t_tab_find_exact_peaks *x) { x->x_sort_mode = IEMLIB_TAB_FIND_EXACT_PEAKS_SORT_MODE_FREQ; } static void tab_find_exact_peaks_src(t_tab_find_exact_peaks *x, t_symbol *s) { x->x_sym_scr1 = s; } static void tab_find_exact_peaks_bang(t_tab_find_exact_peaks *x) { int i, n, w, ww; int ok_src, peak_index=0; t_float *vec_work2; iemarray_t *vec_src; int *vec_work1; t_float max=-1.0e37; int max_peaks=x->x_n_peaks; int min_width=x->x_min_width; int max_width=x->x_max_width; t_float abs_min_height_diff=x->x_hdiff; ok_src = iem_tab_check_arrays(gensym("tab_find_exact_peaks"), x->x_sym_scr1, &x->x_beg_mem_src1, &x->x_size_src1, 0); if(ok_src) { n = x->x_size_src1; if(n) { if(!x->x_work_alloc) { x->x_beg_mem_work1 = (int *)getbytes(n * sizeof(int)); x->x_beg_mem_work2 = (t_float *)getbytes(n * sizeof(t_float)); x->x_work_alloc = n; } else if(n != x->x_work_alloc) { x->x_beg_mem_work1 = (int *)resizebytes(x->x_beg_mem_work1, x->x_work_alloc*sizeof(int), n*sizeof(int)); x->x_beg_mem_work2 = (t_float *)resizebytes(x->x_beg_mem_work2, x->x_work_alloc*sizeof(t_float), n*sizeof(t_float)); x->x_work_alloc = n; } vec_src = x->x_beg_mem_src1; vec_work1 = x->x_beg_mem_work1; vec_work2 = x->x_beg_mem_work2; if(x->x_sort_mode == IEMLIB_TAB_FIND_EXACT_PEAKS_SORT_MODE_FREQ) // FREQ_SORT BEGIN { int sort_index=1,old=0,j; for(i=0; ix_peak_value_out, iemarray_getfloat(vec_src, i)); outlet_float(x->x_peak_index_out, (t_float)peak_index); outlet_float(x->x_sort_index_out, sort_index); sort_index++; } else i = n+1; } old = vec_work1[i]; } outlet_bang(x->x_bang_out); } // FREQ_SORT END else if(x->x_sort_mode == IEMLIB_TAB_FIND_EXACT_PEAKS_SORT_MODE_AMP) // AMP_SORT BEGIN { int sort_index=1,old=0,j; for(i=0; i max) { max = vec_work2[i]; peak_index = i; } } } if(peak_index >= 0) { outlet_float(x->x_peak_value_out, max); outlet_float(x->x_peak_index_out, (t_float)peak_index); outlet_float(x->x_sort_index_out, sort_index); vec_work1[peak_index] = 0; vec_work2[peak_index] = 0.0f; j=peak_index+1; while(vec_work1[j]) { vec_work1[j] = 0; j++; } j=peak_index-1; while(vec_work1[j]) { vec_work1[j] = 0; j--; } } else sort_index = max_peaks+1; } outlet_bang(x->x_bang_out); } } // AMP_SORT END } /* [n] zu [n-1] u. [n+1] (ww=0)(w=1)(beg=1)(end=n-1) [n-1] u. [n] zu [n-2] u. [n+1] (ww=0)(w=2)(beg=2)(end=n-1) [n] u. [n+1] zu [n-1] u. [n+2] (ww=1)(w=2)(beg=1)(end=n-2) [n-2] u. [n-1] u. [n] zu [n-3] u. [n+1] (ww=0)(w=3)(beg=3)(end=n-1) [n-1] u. [n] u. [n+1] zu [n-2] u. [n+2] (ww=1)(w=3)(beg=2)(end=n-2) [n] u. [n+1] u. [n+2] zu [n-1] u. [n+3] (ww=2)(w=3)(beg=1)(end=n-3) */ } /*static void tab_find_exact_peaks_list(t_tab_find_exact_peaks *x, t_symbol *s, int argc, t_atom *argv) { int beg_src; int i, n; int ok_src, max_index=0; t_float *vec_src; t_float max=-1.0e37; if((argc >= 2) && IS_A_FLOAT(argv,0) && IS_A_FLOAT(argv,1)) { beg_src = (int)atom_getintarg(0, argc, argv); n = (int)atom_getintarg(1, argc, argv); if(beg_src < 0) beg_src = 0; if(n < 0) n = 0; ok_src = iem_tab_check_arrays(gensym("tab_find_exact_peaks"), x->x_sym_scr1, &x->x_beg_mem_src1, &x->x_size_src1, beg_src+n); if(ok_src) { vec_src = x->x_beg_mem_src1 + beg_src; if(n) { for(i=0; i max) { max = vec_src[i]; max_index = i + beg_src; } } outlet_float(x->x_peak_value_out, max); outlet_float(x->x_peak_index_out, (t_float)max_index); outlet_bang(x->x_bang_out); } } } else { post("tab_find_exact_peaks-ERROR: list need 2 float arguments:"); post(" source_offset + number_of_samples_to_calc_max_index"); } }*/ static void tab_find_exact_peaks_free(t_tab_find_exact_peaks *x) { if(x->x_work_alloc) { freebytes(x->x_beg_mem_work1, x->x_work_alloc * sizeof(int)); freebytes(x->x_beg_mem_work2, x->x_work_alloc * sizeof(t_float)); } } static void *tab_find_exact_peaks_new(t_symbol *s, int argc, t_atom *argv) { t_tab_find_exact_peaks *x = (t_tab_find_exact_peaks *)pd_new(tab_find_exact_peaks_class); t_symbol *src; if((argc >= 1) && IS_A_SYMBOL(argv,0)) { src = (t_symbol *)atom_getsymbolarg(0, argc, argv); } else { post("tab_find_exact_peaks-ERROR: need 1 symbol argument:"); post(" source_array_name"); return(0); } x->x_work_alloc = 0; x->x_beg_mem_work1 = (int *)0; x->x_beg_mem_work2 = (t_float *)0; x->x_sym_scr1 = src; x->x_bang_out = (t_outlet *)outlet_new(&x->x_obj, &s_bang); // ready x->x_sort_index_out = (t_outlet *)outlet_new(&x->x_obj, &s_float); // sort index x->x_peak_index_out = (t_outlet *)outlet_new(&x->x_obj, &s_float); // freq x->x_peak_value_out = (t_outlet *)outlet_new(&x->x_obj, &s_float); // value return(x); } void tab_find_exact_peaks_setup(void) { tab_find_exact_peaks_class = class_new(gensym("tab_find_exact_peaks"), (t_newmethod)tab_find_exact_peaks_new, (t_method)tab_find_exact_peaks_free, sizeof(t_tab_find_exact_peaks), 0, A_GIMME, 0); class_addbang(tab_find_exact_peaks_class, (t_method)tab_find_exact_peaks_bang); /*class_addlist(tab_find_exact_peaks_class, (t_method)tab_find_exact_peaks_list);*/ class_addmethod(tab_find_exact_peaks_class, (t_method)tab_find_exact_peaks_src, gensym("src"), A_DEFSYMBOL, 0); class_addmethod(tab_find_exact_peaks_class, (t_method)tab_find_exact_peaks_src, gensym("src1"), A_DEFSYMBOL, 0); class_addmethod(tab_find_exact_peaks_class, (t_method)tab_find_exact_peaks_max_peaks, gensym("max_peaks"), A_DEFFLOAT, 0); class_addmethod(tab_find_exact_peaks_class, (t_method)tab_find_exact_peaks_width_range, gensym("width_range"), A_GIMME, 0); class_addmethod(tab_find_exact_peaks_class, (t_method)tab_find_exact_peaks_abs_min_height_diff, gensym("abs_min_height_diff"), A_DEFFLOAT, 0); class_addmethod(tab_find_exact_peaks_class, (t_method)tab_find_exact_peaks_amp_sort, gensym("amp_sort"), 0); class_addmethod(tab_find_exact_peaks_class, (t_method)tab_find_exact_peaks_freq_sort, gensym("freq_sort"), 0); // class_sethelpsymbol(tab_find_exact_peaks_class, gensym("iemhelp2/help-tab_find_exact_peaks")); } iem_utils-v0.0.20181004/iem_tab/src/tab_eq.c0000644000175000017500000001307413303612042020446 0ustar zmoelnigzmoelnig/* For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. iem_tab written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2009 */ #include "m_pd.h" #include "iemlib.h" #include "iem_tab.h" /* -------------------------- tab_eq ------------------------------ */ /* if(x_beg_mem_src1[i] == x_beg_mem_src2[i]) */ /* x_beg_mem_dst[i] = 1.0f; */ /* else */ /* x_beg_mem_dst[i] = 0.0f; */ typedef struct _tab_eq { t_object x_obj; int x_size_src1; int x_size_src2; int x_size_dst; int x_offset_src1; int x_offset_src2; int x_offset_dst; iemarray_t *x_beg_mem_src1; iemarray_t *x_beg_mem_src2; iemarray_t *x_beg_mem_dst; t_symbol *x_sym_scr1; t_symbol *x_sym_scr2; t_symbol *x_sym_dst; } t_tab_eq; static t_class *tab_eq_class; static void tab_eq_src1(t_tab_eq *x, t_symbol *s) { x->x_sym_scr1 = s; } static void tab_eq_src2(t_tab_eq *x, t_symbol *s) { x->x_sym_scr2 = s; } static void tab_eq_dst(t_tab_eq *x, t_symbol *s) { x->x_sym_dst = s; } static void tab_eq_bang(t_tab_eq *x) { int i, n; int ok_src1, ok_src2, ok_dst; iemarray_t *vec_src1, *vec_src2, *vec_dst; ok_src1 = iem_tab_check_arrays(gensym("tab_eq"), x->x_sym_scr1, &x->x_beg_mem_src1, &x->x_size_src1, 0); ok_src2 = iem_tab_check_arrays(gensym("tab_eq"), x->x_sym_scr2, &x->x_beg_mem_src2, &x->x_size_src2, 0); ok_dst = iem_tab_check_arrays(gensym("tab_eq"), x->x_sym_dst, &x->x_beg_mem_dst, &x->x_size_dst, 0); if(ok_src1 && ok_src2 && ok_dst) { if(x->x_size_src1 < x->x_size_dst) n = x->x_size_src1; else n = x->x_size_dst; if(x->x_size_src2 < n) n = x->x_size_src2; vec_src1 = x->x_beg_mem_src1; vec_src2 = x->x_beg_mem_src2; vec_dst = x->x_beg_mem_dst; if(n) { t_garray *a; for(i=0; ix_obj.ob_outlet); a = (t_garray *)pd_findbyclass(x->x_sym_dst, garray_class); garray_redraw(a); } } } static void tab_eq_list(t_tab_eq *x, t_symbol *s, int argc, t_atom *argv) { int beg_src1, beg_src2, beg_dst; int i, n; int ok_src1, ok_src2, ok_dst; iemarray_t *vec_src1, *vec_src2, *vec_dst; if((argc >= 4) && IS_A_FLOAT(argv,0) && IS_A_FLOAT(argv,1) && IS_A_FLOAT(argv,2) && IS_A_FLOAT(argv,3)) { beg_src1 = (int)atom_getintarg(0, argc, argv); beg_src2 = (int)atom_getintarg(1, argc, argv); beg_dst = (int)atom_getintarg(2, argc, argv); n = (int)atom_getintarg(3, argc, argv); if(beg_src1 < 0) beg_src1 = 0; if(beg_src2 < 0) beg_src2 = 0; if(beg_dst < 0) beg_dst = 0; if(n < 0) n = 0; ok_src1 = iem_tab_check_arrays(gensym("tab_eq"), x->x_sym_scr1, &x->x_beg_mem_src1, &x->x_size_src1, beg_src1+n); ok_src2 = iem_tab_check_arrays(gensym("tab_eq"), x->x_sym_scr2, &x->x_beg_mem_src2, &x->x_size_src2, beg_src2+n); ok_dst = iem_tab_check_arrays(gensym("tab_eq"), x->x_sym_dst, &x->x_beg_mem_dst, &x->x_size_dst, beg_dst+n); if(ok_src1 && ok_src2 && ok_dst) { vec_src1 = x->x_beg_mem_src1 + beg_src1; vec_src2 = x->x_beg_mem_src2 + beg_src2; vec_dst = x->x_beg_mem_dst + beg_dst; if(n) { t_garray *a; for(i=0; ix_obj.ob_outlet); a = (t_garray *)pd_findbyclass(x->x_sym_dst, garray_class); garray_redraw(a); } } } else { post("tab_eq-ERROR: list need 4 float arguments:"); post(" source1_offset + source2_offset + destination_offset + number_of_samples_to_compare"); } } static void tab_eq_free(t_tab_eq *x) { } static void *tab_eq_new(t_symbol *s, int argc, t_atom *argv) { t_tab_eq *x = (t_tab_eq *)pd_new(tab_eq_class); t_symbol *src1, *src2, *dst; if((argc >= 3) && IS_A_SYMBOL(argv,0) && IS_A_SYMBOL(argv,1) && IS_A_SYMBOL(argv,2)) { src1 = (t_symbol *)atom_getsymbolarg(0, argc, argv); src2 = (t_symbol *)atom_getsymbolarg(1, argc, argv); dst = (t_symbol *)atom_getsymbolarg(2, argc, argv); } else if((argc >= 2) && IS_A_SYMBOL(argv,0) && IS_A_SYMBOL(argv,1)) { src1 = (t_symbol *)atom_getsymbolarg(0, argc, argv); dst = src1; src2 = (t_symbol *)atom_getsymbolarg(1, argc, argv); } else { post("tab_eq-ERROR: need 3 symbols arguments:"); post(" source1_array_name + source2_array_name + destination_array_name"); return(0); } x->x_sym_scr1 = src1; x->x_sym_scr2 = src2; x->x_sym_dst = dst; outlet_new(&x->x_obj, &s_bang); return(x); } void tab_eq_setup(void) { tab_eq_class = class_new(gensym("tab_eq"), (t_newmethod)tab_eq_new, (t_method)tab_eq_free, sizeof(t_tab_eq), 0, A_GIMME, 0); class_addbang(tab_eq_class, (t_method)tab_eq_bang); class_addlist(tab_eq_class, (t_method)tab_eq_list); class_addmethod(tab_eq_class, (t_method)tab_eq_src1, gensym("src1"), A_DEFSYMBOL, 0); class_addmethod(tab_eq_class, (t_method)tab_eq_src2, gensym("src2"), A_DEFSYMBOL, 0); class_addmethod(tab_eq_class, (t_method)tab_eq_dst, gensym("dst"), A_DEFSYMBOL, 0); // class_sethelpsymbol(tab_eq_class, gensym("iemhelp2/tab_eq-help")); } iem_utils-v0.0.20181004/iem_tab/src/tab_const.c0000644000175000017500000000727213303612042021172 0ustar zmoelnigzmoelnig/* For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. iem_tab written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2009 */ #include "m_pd.h" #include "iemlib.h" #include "iem_tab.h" /* -------------------------- tab_const ------------------------------ */ /* x_beg_mem_dst[i] = c */ typedef struct _tab_const { t_object x_obj; int x_size_dst; int x_offset_dst; t_float x_const; iemarray_t *x_beg_mem_dst; t_symbol *x_sym_dst; } t_tab_const; static t_class *tab_const_class; static void tab_const_dst(t_tab_const *x, t_symbol *s) { x->x_sym_dst = s; } static void tab_const_bang(t_tab_const *x) { int i, n; int ok_dst; iemarray_t *vec_dst; ok_dst = iem_tab_check_arrays(gensym("tab_const"), x->x_sym_dst, &x->x_beg_mem_dst, &x->x_size_dst, 0); if(ok_dst) { n = x->x_size_dst; vec_dst = x->x_beg_mem_dst; if(n) { t_garray *a; for(i=0; ix_obj.ob_outlet); a = (t_garray *)pd_findbyclass(x->x_sym_dst, garray_class); garray_redraw(a); } } } static void tab_const_float(t_tab_const *x, t_floatarg c) { int i, n; int ok_dst; iemarray_t *vec_dst; ok_dst = iem_tab_check_arrays(gensym("tab_const"), x->x_sym_dst, &x->x_beg_mem_dst, &x->x_size_dst, 0); if(ok_dst) { n = x->x_size_dst; vec_dst = x->x_beg_mem_dst; if(n) { t_garray *a; for(i=0; ix_obj.ob_outlet); a = (t_garray *)pd_findbyclass(x->x_sym_dst, garray_class); garray_redraw(a); } } } static void tab_const_list(t_tab_const *x, t_symbol *s, int argc, t_atom *argv) { int beg_dst; int i, n; int ok_dst; iemarray_t *vec_dst; t_float c; if((argc >= 3) && IS_A_FLOAT(argv,0) && IS_A_FLOAT(argv,1) && IS_A_FLOAT(argv,2)) { beg_dst = (int)atom_getintarg(0, argc, argv); n = (int)atom_getintarg(1, argc, argv); c = (t_float)atom_getfloatarg(2, argc, argv); if(beg_dst < 0) beg_dst = 0; if(n < 0) n = 0; ok_dst = iem_tab_check_arrays(gensym("tab_const"), x->x_sym_dst, &x->x_beg_mem_dst, &x->x_size_dst, beg_dst+n); if(ok_dst) { vec_dst = x->x_beg_mem_dst + beg_dst; if(n) { t_garray *a; for(i=0; ix_obj.ob_outlet); a = (t_garray *)pd_findbyclass(x->x_sym_dst, garray_class); garray_redraw(a); } } } else { post("tab_const-ERROR: list need 3 float arguments:"); post(" destination_offset + number_of_samples_to_copy + constant-value"); } } static void tab_const_free(t_tab_const *x) { } static void *tab_const_new(t_symbol *s, int argc, t_atom *argv) { t_tab_const *x = (t_tab_const *)pd_new(tab_const_class); t_symbol *dst; if((argc >= 1) && IS_A_SYMBOL(argv,0)) { dst = (t_symbol *)atom_getsymbolarg(0, argc, argv); } else { post("tab_const-ERROR: need 1 symbol argument:"); post(" destination_array_name"); return(0); } x->x_sym_dst = dst; outlet_new(&x->x_obj, &s_bang); return(x); } void tab_const_setup(void) { tab_const_class = class_new(gensym("tab_const"), (t_newmethod)tab_const_new, (t_method)tab_const_free, sizeof(t_tab_const), 0, A_GIMME, 0); class_addbang(tab_const_class, (t_method)tab_const_bang); class_addfloat(tab_const_class, (t_method)tab_const_float); class_addlist(tab_const_class, (t_method)tab_const_list); class_addmethod(tab_const_class, (t_method)tab_const_dst, gensym("dst"), A_DEFSYMBOL, 0); } iem_utils-v0.0.20181004/iem_tab/src/tab_sum.c0000644000175000017500000000626513303612043020652 0ustar zmoelnigzmoelnig/* For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. iem_tab written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2009 */ #include "m_pd.h" #include "iemlib.h" #include "iem_tab.h" /* -------------------------- tab_sum ------------------------------ */ /* sum = 0.0f; */ /* for(i=0; ix_sym_scr1 = s; } static void tab_sum_bang(t_tab_sum *x) { int i, n; int ok_src; iemarray_t *vec_src; t_float sum=0.0f; ok_src = iem_tab_check_arrays(gensym("tab_sum"), x->x_sym_scr1, &x->x_beg_mem_src1, &x->x_size_src1, 0); if(ok_src) { n = x->x_size_src1; vec_src = x->x_beg_mem_src1; if(n) { for(i=0; ix_sum_out, sum); outlet_bang(x->x_bang_out); } } } static void tab_sum_list(t_tab_sum *x, t_symbol *s, int argc, t_atom *argv) { int beg_src; int i, n; int ok_src; iemarray_t *vec_src; t_float sum=0.0f; if((argc >= 2) && IS_A_FLOAT(argv,0) && IS_A_FLOAT(argv,1)) { beg_src = (int)atom_getintarg(0, argc, argv); n = (int)atom_getintarg(1, argc, argv); if(beg_src < 0) beg_src = 0; if(n < 0) n = 0; ok_src = iem_tab_check_arrays(gensym("tab_sum"), x->x_sym_scr1, &x->x_beg_mem_src1, &x->x_size_src1, beg_src+n); if(ok_src) { vec_src = x->x_beg_mem_src1 + beg_src; if(n) { for(i=0; ix_sum_out, sum); outlet_bang(x->x_bang_out); } } } else { post("tab_sum-ERROR: list need 2 float arguments:"); post(" source_offset + number_of_samples_to_calc_sum-value"); } } static void tab_sum_free(t_tab_sum *x) { } static void *tab_sum_new(t_symbol *s, int argc, t_atom *argv) { t_tab_sum *x = (t_tab_sum *)pd_new(tab_sum_class); t_symbol *src; if((argc >= 1) && IS_A_SYMBOL(argv,0)) { src = (t_symbol *)atom_getsymbolarg(0, argc, argv); } else { post("tab_sum-ERROR: need 1 symbol argument:"); post(" source_array_name"); return(0); } x->x_sym_scr1 = src; x->x_bang_out = outlet_new(&x->x_obj, &s_bang); x->x_sum_out = outlet_new(&x->x_obj, &s_float); return(x); } void tab_sum_setup(void) { tab_sum_class = class_new(gensym("tab_sum"), (t_newmethod)tab_sum_new, (t_method)tab_sum_free, sizeof(t_tab_sum), 0, A_GIMME, 0); class_addbang(tab_sum_class, (t_method)tab_sum_bang); class_addlist(tab_sum_class, (t_method)tab_sum_list); class_addmethod(tab_sum_class, (t_method)tab_sum_src, gensym("src"), A_DEFSYMBOL, 0); class_addmethod(tab_sum_class, (t_method)tab_sum_src, gensym("src1"), A_DEFSYMBOL, 0); // class_sethelpsymbol(tab_sum_class, gensym("iemhelp2/tab_sum-help")); } iem_utils-v0.0.20181004/iem_tab/src/tab_mls.c0000644000175000017500000001151313303612043020631 0ustar zmoelnigzmoelnig/* For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. iem_tab written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2009 */ #include "m_pd.h" #include "iemlib.h" #include "iem_tab.h" /* -------------------------- tab_mls ------------------------------ */ typedef struct _tab_mls { t_object x_obj; int x_size_dst; int x_offset_dst; iemarray_t *x_beg_mem_dst; t_symbol *x_sym_dst; } t_tab_mls; static t_class *tab_mls_class; static int tab_mls_exp2(int mls_order) { int i, j=1; for(i=0; i> 1; exor = 0; for(j=0; j>= 1; } if(exor & 1) { iemarray_setfloat(vec, i, 1.0f); work1 = work2 | source; } else { iemarray_setfloat(vec, i, -1.0f); work1 = work2; } } return; } static void tab_mls_dst(t_tab_mls *x, t_symbol *s) { x->x_sym_dst = s; } static void tab_mls_float(t_tab_mls *x, t_floatarg fmls_order) { int mls_order=(int)fmls_order; int ok_dst, mls_size; mls_size = tab_mls_exp2(mls_order) - 1; ok_dst = iem_tab_check_arrays(gensym("tab_mls"), x->x_sym_dst, &x->x_beg_mem_dst, &x->x_size_dst, mls_size); if(ok_dst) { if((mls_order >= 3) && (mls_order <= 20)) { t_garray *a; tab_mls_calc(x->x_beg_mem_dst, mls_order); outlet_bang(x->x_obj.ob_outlet); a = (t_garray *)pd_findbyclass(x->x_sym_dst, garray_class); garray_redraw(a); } } } static void tab_mls_list(t_tab_mls *x, t_symbol *s, int argc, t_atom *argv) { int beg_dst; int i, n; int ok_dst; t_float c; iemarray_t *vec_dst; if((argc >= 3) && IS_A_FLOAT(argv,0) && IS_A_FLOAT(argv,1) && IS_A_FLOAT(argv,2)) { beg_dst = (int)atom_getintarg(0, argc, argv); n = (int)atom_getintarg(1, argc, argv); c = (t_float)atom_getfloatarg(2, argc, argv); if(beg_dst < 0) beg_dst = 0; if(n < 0) n = 0; ok_dst = iem_tab_check_arrays(gensym("tab_mls"), x->x_sym_dst, &x->x_beg_mem_dst, &x->x_size_dst, beg_dst+n); if(ok_dst) { vec_dst = x->x_beg_mem_dst + beg_dst; if(n) { t_garray *a; for(i=0; ix_obj.ob_outlet); a = (t_garray *)pd_findbyclass(x->x_sym_dst, garray_class); garray_redraw(a); } } } else { post("tab_mls-ERROR: list need 3 float arguments:"); post(" destination_offset + number_of_samples_to_copy + constant-value"); } } static void tab_mls_free(t_tab_mls *x) { } static void *tab_mls_new(t_symbol *s, int argc, t_atom *argv) { t_tab_mls *x = (t_tab_mls *)pd_new(tab_mls_class); t_symbol *dst; t_float time; if((argc >= 1) && IS_A_SYMBOL(argv,0)) { dst = (t_symbol *)atom_getsymbolarg(0, argc, argv); } else { post("tab_mls-ERROR: need 1 symbol argument:"); post(" destination_array_name"); return(0); } x->x_sym_dst = dst; outlet_new(&x->x_obj, &s_bang); return(x); } void tab_mls_setup(void) { tab_mls_class = class_new(gensym("tab_mls"), (t_newmethod)tab_mls_new, (t_method)tab_mls_free, sizeof(t_tab_mls), 0, A_GIMME, 0); class_addfloat(tab_mls_class, (t_method)tab_mls_float); class_addlist(tab_mls_class, (t_method)tab_mls_list); class_addmethod(tab_mls_class, (t_method)tab_mls_dst, gensym("dst"), A_DEFSYMBOL, 0); // class_sethelpsymbol(tab_mls_class, gensym("iemhelp2/tab_mls-help")); } iem_utils-v0.0.20181004/iem_tab/src/tab_add.c0000644000175000017500000001245213303612043020571 0ustar zmoelnigzmoelnig/* For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. iem_tab written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2009 */ #include "m_pd.h" #include "iemlib.h" #include "iem_tab.h" /* -------------------------- tab_add ------------------------------ */ /* x_beg_mem_dst[i] = x_beg_mem_src1[i] + x_beg_mem_src2[i] */ typedef struct _tab_add { t_object x_obj; int x_size_src1; int x_size_src2; int x_size_dst; int x_offset_src1; int x_offset_src2; int x_offset_dst; iemarray_t *x_beg_mem_src1; iemarray_t *x_beg_mem_src2; iemarray_t *x_beg_mem_dst; t_symbol *x_sym_scr1; t_symbol *x_sym_scr2; t_symbol *x_sym_dst; } t_tab_add; static t_class *tab_add_class; static void tab_add_src1(t_tab_add *x, t_symbol *s) { x->x_sym_scr1 = s; } static void tab_add_src2(t_tab_add *x, t_symbol *s) { x->x_sym_scr2 = s; } static void tab_add_dst(t_tab_add *x, t_symbol *s) { x->x_sym_dst = s; } static void tab_add_bang(t_tab_add *x) { int i, n; int ok_src1, ok_src2, ok_dst; iemarray_t *vec_src1, *vec_src2, *vec_dst; ok_src1 = iem_tab_check_arrays(gensym("tab_add"), x->x_sym_scr1, &x->x_beg_mem_src1, &x->x_size_src1, 0); ok_src2 = iem_tab_check_arrays(gensym("tab_add"), x->x_sym_scr2, &x->x_beg_mem_src2, &x->x_size_src2, 0); ok_dst = iem_tab_check_arrays(gensym("tab_add"), x->x_sym_dst, &x->x_beg_mem_dst, &x->x_size_dst, 0); if(ok_src1 && ok_src2 && ok_dst) { if(x->x_size_src1 < x->x_size_dst) n = x->x_size_src1; else n = x->x_size_dst; if(x->x_size_src2 < n) n = x->x_size_src2; vec_src1 = x->x_beg_mem_src1; vec_src2 = x->x_beg_mem_src2; vec_dst = x->x_beg_mem_dst; if(n) { t_garray *a; for(i=0; ix_obj.ob_outlet); a = (t_garray *)pd_findbyclass(x->x_sym_dst, garray_class); garray_redraw(a); } } } static void tab_add_list(t_tab_add *x, t_symbol *s, int argc, t_atom *argv) { int beg_src1, beg_src2, beg_dst; int i, n; int ok_src1, ok_src2, ok_dst; iemarray_t *vec_src1, *vec_src2, *vec_dst; if((argc >= 4) && IS_A_FLOAT(argv,0) && IS_A_FLOAT(argv,1) && IS_A_FLOAT(argv,2) && IS_A_FLOAT(argv,3)) { beg_src1 = (int)atom_getintarg(0, argc, argv); beg_src2 = (int)atom_getintarg(1, argc, argv); beg_dst = (int)atom_getintarg(2, argc, argv); n = (int)atom_getintarg(3, argc, argv); if(beg_src1 < 0) beg_src1 = 0; if(beg_src2 < 0) beg_src2 = 0; if(beg_dst < 0) beg_dst = 0; if(n < 0) n = 0; ok_src1 = iem_tab_check_arrays(gensym("tab_add"), x->x_sym_scr1, &x->x_beg_mem_src1, &x->x_size_src1, beg_src1+n); ok_src2 = iem_tab_check_arrays(gensym("tab_add"), x->x_sym_scr2, &x->x_beg_mem_src2, &x->x_size_src2, beg_src2+n); ok_dst = iem_tab_check_arrays(gensym("tab_add"), x->x_sym_dst, &x->x_beg_mem_dst, &x->x_size_dst, beg_dst+n); if(ok_src1 && ok_src2 && ok_dst) { vec_src1 = x->x_beg_mem_src1 + beg_src1; vec_src2 = x->x_beg_mem_src2 + beg_src2; vec_dst = x->x_beg_mem_dst + beg_dst; if(n) { t_garray *a; for(i=0; ix_obj.ob_outlet); a = (t_garray *)pd_findbyclass(x->x_sym_dst, garray_class); garray_redraw(a); } } } else { post("tab_add-ERROR: list need 4 float arguments:"); post(" source1_offset + source2_offset + destination_offset + number_of_samples_to_add"); } } static void tab_add_free(t_tab_add *x) { } static void *tab_add_new(t_symbol *s, int argc, t_atom *argv) { t_tab_add *x = (t_tab_add *)pd_new(tab_add_class); t_symbol *src1, *src2, *dst; if((argc >= 3) && IS_A_SYMBOL(argv,0) && IS_A_SYMBOL(argv,1) && IS_A_SYMBOL(argv,2)) { src1 = (t_symbol *)atom_getsymbolarg(0, argc, argv); src2 = (t_symbol *)atom_getsymbolarg(1, argc, argv); dst = (t_symbol *)atom_getsymbolarg(2, argc, argv); } else if((argc >= 2) && IS_A_SYMBOL(argv,0) && IS_A_SYMBOL(argv,1)) { src1 = (t_symbol *)atom_getsymbolarg(0, argc, argv); dst = src1; src2 = (t_symbol *)atom_getsymbolarg(1, argc, argv); } else { post("tab_add-ERROR: need 3 symbols arguments:"); post(" source1_array_name + source2_array_name + destination_array_name"); return(0); } x->x_sym_scr1 = src1; x->x_sym_scr2 = src2; x->x_sym_dst = dst; outlet_new(&x->x_obj, &s_bang); return(x); } void tab_add_setup(void) { tab_add_class = class_new(gensym("tab_add"), (t_newmethod)tab_add_new, (t_method)tab_add_free, sizeof(t_tab_add), 0, A_GIMME, 0); class_addbang(tab_add_class, (t_method)tab_add_bang); class_addlist(tab_add_class, (t_method)tab_add_list); class_addmethod(tab_add_class, (t_method)tab_add_src1, gensym("src1"), A_DEFSYMBOL, 0); class_addmethod(tab_add_class, (t_method)tab_add_src2, gensym("src2"), A_DEFSYMBOL, 0); class_addmethod(tab_add_class, (t_method)tab_add_dst, gensym("dst"), A_DEFSYMBOL, 0); // class_sethelpsymbol(tab_add_class, gensym("iemhelp2/tab_add-help")); } iem_utils-v0.0.20181004/iem_tab/src/tab_carth2polar.c0000644000175000017500000001773513303612043022273 0ustar zmoelnigzmoelnig/* For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. iem_tab written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2009 */ #include "m_pd.h" #include "iemlib.h" #include "iem_tab.h" #include /* -------------------------- tab_carth2polar ------------------------------ */ /* x_beg_mem_dst_mag[i] = sqrt(x_beg_mem_src_re[i]*x_beg_mem_src_re[i] + x_beg_mem_src_im[i]*x_beg_mem_src_im[i]) */ /* x_beg_mem_dst_arg[i] = atan2(x_beg_mem_src_im[i], x_beg_mem_src_re[i]) */ typedef struct _tab_carth2polar { t_object x_obj; int x_size_src_re; int x_size_dst_mag; int x_size_src_im; int x_size_dst_arg; int x_offset_src_re; int x_offset_dst_mag; int x_offset_src_im; int x_offset_dst_arg; iemarray_t *x_beg_mem_src_re; iemarray_t *x_beg_mem_dst_mag; iemarray_t *x_beg_mem_src_im; iemarray_t *x_beg_mem_dst_arg; t_symbol *x_sym_src_re; t_symbol *x_sym_dst_mag; t_symbol *x_sym_src_im; t_symbol *x_sym_dst_arg; } t_tab_carth2polar; static t_class *tab_carth2polar_class; static void tab_carth2polar_src_re(t_tab_carth2polar *x, t_symbol *s) { x->x_sym_src_re = s; } static void tab_carth2polar_src_im(t_tab_carth2polar *x, t_symbol *s) { x->x_sym_src_im = s; } static void tab_carth2polar_dst_mag(t_tab_carth2polar *x, t_symbol *s) { x->x_sym_dst_mag = s; } static void tab_carth2polar_dst_arg(t_tab_carth2polar *x, t_symbol *s) { x->x_sym_dst_arg = s; } static void tab_carth2polar_bang(t_tab_carth2polar *x) { int i, n; int ok_src_re, ok_dst_mag; int ok_src_im, ok_dst_arg; iemarray_t *vec_src_re, *vec_dst_mag; iemarray_t *vec_src_im, *vec_dst_arg; ok_src_re = iem_tab_check_arrays(gensym("tab_carth2polar"), x->x_sym_src_re, &x->x_beg_mem_src_re, &x->x_size_src_re, 0); ok_dst_mag = iem_tab_check_arrays(gensym("tab_carth2polar"), x->x_sym_dst_mag, &x->x_beg_mem_dst_mag, &x->x_size_dst_mag, 0); ok_src_im = iem_tab_check_arrays(gensym("tab_carth2polar"), x->x_sym_src_im, &x->x_beg_mem_src_im, &x->x_size_src_im, 0); ok_dst_arg = iem_tab_check_arrays(gensym("tab_carth2polar"), x->x_sym_dst_arg, &x->x_beg_mem_dst_arg, &x->x_size_dst_arg, 0); if(ok_src_re && ok_dst_mag && ok_src_im && ok_dst_arg) { if(x->x_size_src_re < x->x_size_dst_mag) n = x->x_size_src_re; else n = x->x_size_dst_mag; if(x->x_size_src_im < n) n = x->x_size_src_im; if(x->x_size_dst_arg < n) n = x->x_size_dst_arg; vec_src_re = x->x_beg_mem_src_re; vec_dst_mag = x->x_beg_mem_dst_mag; vec_src_im = x->x_beg_mem_src_im; vec_dst_arg = x->x_beg_mem_dst_arg; if(n) { t_garray *a; t_float rcp_two_pi=0.125/atan(1.0); for(i=0; ix_obj.ob_outlet); a = (t_garray *)pd_findbyclass(x->x_sym_dst_mag, garray_class); garray_redraw(a); a = (t_garray *)pd_findbyclass(x->x_sym_dst_arg, garray_class); garray_redraw(a); } } } static void tab_carth2polar_list(t_tab_carth2polar *x, t_symbol *s, int argc, t_atom *argv) { int i, n; int beg_src_re, beg_dst_mag; int beg_src_im, beg_dst_arg; int ok_src_re, ok_dst_mag; int ok_src_im, ok_dst_arg; iemarray_t *vec_src_re, *vec_dst_mag; iemarray_t *vec_src_im, *vec_dst_arg; if((argc >= 5) && IS_A_FLOAT(argv,0) && IS_A_FLOAT(argv,1) && IS_A_FLOAT(argv,2) && IS_A_FLOAT(argv,3) && IS_A_FLOAT(argv,4)) { beg_src_re = (int)atom_getintarg(0, argc, argv); beg_src_im = (int)atom_getintarg(1, argc, argv); beg_dst_mag = (int)atom_getintarg(2, argc, argv); beg_dst_arg = (int)atom_getintarg(3, argc, argv); n = (int)atom_getintarg(4, argc, argv); if(beg_src_re < 0) beg_src_re = 0; if(beg_dst_mag < 0) beg_dst_mag = 0; if(beg_src_im < 0) beg_src_im = 0; if(beg_dst_arg < 0) beg_dst_arg = 0; if(n < 0) n = 0; ok_src_re = iem_tab_check_arrays(gensym("tab_carth2polar"), x->x_sym_src_re, &x->x_beg_mem_src_re, &x->x_size_src_re, beg_src_re+n); ok_dst_mag = iem_tab_check_arrays(gensym("tab_carth2polar"), x->x_sym_dst_mag, &x->x_beg_mem_dst_mag, &x->x_size_dst_mag, beg_dst_mag+n); ok_src_im = iem_tab_check_arrays(gensym("tab_carth2polar"), x->x_sym_src_im, &x->x_beg_mem_src_im, &x->x_size_src_im, beg_src_im+n); ok_dst_arg = iem_tab_check_arrays(gensym("tab_carth2polar"), x->x_sym_dst_arg, &x->x_beg_mem_dst_arg, &x->x_size_dst_arg, beg_dst_arg+n); if(ok_src_re && ok_dst_mag && ok_src_im && ok_dst_arg) { vec_src_re = x->x_beg_mem_src_re + beg_src_re; vec_dst_mag = x->x_beg_mem_dst_mag + beg_dst_mag; vec_src_im = x->x_beg_mem_src_im + beg_src_im; vec_dst_arg = x->x_beg_mem_dst_arg + beg_dst_arg; if(n) { t_garray *a; t_float rcp_two_pi=0.125/atan(1.0); for(i=0; ix_obj.ob_outlet); a = (t_garray *)pd_findbyclass(x->x_sym_dst_mag, garray_class); garray_redraw(a); a = (t_garray *)pd_findbyclass(x->x_sym_dst_arg, garray_class); garray_redraw(a); } } } else { post("tab_carth2polar-ERROR: list need 5 float arguments:"); post(" source_real_offset + source_imag_offset + destination_magnitude_offset + destination_phase_argument_offset + number_of_samples_to_convert"); } } static void tab_carth2polar_free(t_tab_carth2polar *x) { } static void *tab_carth2polar_new(t_symbol *s, int argc, t_atom *argv) { t_tab_carth2polar *x = (t_tab_carth2polar *)pd_new(tab_carth2polar_class); t_symbol *src_re, *dst_mag, *src_im, *dst_arg; if((argc >= 4) && IS_A_SYMBOL(argv,0) && IS_A_SYMBOL(argv,1) && IS_A_SYMBOL(argv,2) && IS_A_SYMBOL(argv,3)) { src_re = (t_symbol *)atom_getsymbolarg(0, argc, argv); src_im = (t_symbol *)atom_getsymbolarg(1, argc, argv); dst_mag = (t_symbol *)atom_getsymbolarg(2, argc, argv); dst_arg = (t_symbol *)atom_getsymbolarg(3, argc, argv); } else { post("tab_carth2polar-ERROR: need 4 symbols arguments:"); post(" source_real_array_name + source_imag_array_name + destination_magnitude_array_name + destination_phase_argument_array_name"); return(0); } x->x_sym_src_re = src_re; x->x_sym_src_im = src_im; x->x_sym_dst_mag = dst_mag; x->x_sym_dst_arg = dst_arg; outlet_new(&x->x_obj, &s_bang); return(x); } void tab_carth2polar_setup(void) { tab_carth2polar_class = class_new(gensym("tab_carth2polar"), (t_newmethod)tab_carth2polar_new, (t_method)tab_carth2polar_free, sizeof(t_tab_carth2polar), 0, A_GIMME, 0); class_addbang(tab_carth2polar_class, (t_method)tab_carth2polar_bang); class_addlist(tab_carth2polar_class, (t_method)tab_carth2polar_list); class_addmethod(tab_carth2polar_class, (t_method)tab_carth2polar_src_re, gensym("src_re"), A_DEFSYMBOL, 0); class_addmethod(tab_carth2polar_class, (t_method)tab_carth2polar_src_im, gensym("src_im"), A_DEFSYMBOL, 0); class_addmethod(tab_carth2polar_class, (t_method)tab_carth2polar_src_re, gensym("src1_re"), A_DEFSYMBOL, 0); class_addmethod(tab_carth2polar_class, (t_method)tab_carth2polar_src_im, gensym("src1_im"), A_DEFSYMBOL, 0); class_addmethod(tab_carth2polar_class, (t_method)tab_carth2polar_dst_mag, gensym("dst_mag"), A_DEFSYMBOL, 0); class_addmethod(tab_carth2polar_class, (t_method)tab_carth2polar_dst_arg, gensym("dst_arg"), A_DEFSYMBOL, 0); } iem_utils-v0.0.20181004/iem_tab/src/iem_tab.c0000644000175000017500000000723013355471365020632 0ustar zmoelnigzmoelnig/* For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. iem_tab written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2018 */ #include "m_pd.h" #include "iemlib.h" int iem_tab_check_arrays(t_symbol *obj_name, t_symbol *array_name, iemarray_t **beg_mem, int *array_size, int max_index) { int ok=1; t_garray *a; if(!(a = (t_garray *)pd_findbyclass(array_name, garray_class))) { error("%s: no such array", array_name->s_name); ok = 0; } else if(!iemarray_getarray(a, array_size, beg_mem)) { error("%s: bad template for %s", array_name->s_name, obj_name->s_name); ok = 0; } else if(*array_size < max_index) { error("%s: bad array-size: %d", array_name->s_name, *array_size); ok = 0; } return(ok); } // Georg Holzmann: #ifdef IEMTAB_SINGLE_OBJ // for single externals disable the iem_tab object #else // build as library static t_class *iem_tab_class; static void *iem_tab_new(void) { t_object *x = (t_object *)pd_new(iem_tab_class); return (x); } void tab_abs_setup(void); void tab_add_setup(void); void tab_add_scalar_setup(void); void tab_carth2polar_setup(void); void tab_complex_inv_setup(void); void tab_complex_mul_setup(void); void tab_const_setup(void); void tab_conv_setup(void); void tab_copy_setup(void); void tab_counter_setup(void); void tab_cross_corr_setup(void); void tab_dbtopow_setup(void); void tab_dbtorms_setup(void); void tab_div_setup(void); void tab_eq_setup(void); void tab_eq_scalar_setup(void); void tab_fft_setup(void); void tab_find_exact_peaks_setup(void); void tab_find_peaks_setup(void); void tab_ge_setup(void); void tab_ge_scalar_setup(void); void tab_get_size_setup(void); void tab_gt_setup(void); void tab_gt_scalar_setup(void); void tab_ifft_setup(void); void tab_le_setup(void); void tab_le_scalar_setup(void); void tab_lt_setup(void); void tab_lt_scalar_setup(void); void tab_max_index_setup(void); void tab_min_index_setup(void); void tab_min_max_setup(void); void tab_mul_setup(void); void tab_mul_scalar_setup(void); void tab_ne_setup(void); void tab_ne_scalar_setup(void); void tab_powtodb_setup(void); void tab_reverse_setup(void); void tab_rfft_setup(void); void tab_rifft_setup(void); void tab_rmstodb_setup(void); void tab_sqrt_setup(void); void tab_sub_setup(void); void tab_sum_setup(void); /* ------------------------ setup routine ------------------------- */ void iem_tab_setup(void) { iem_tab_class = class_new(gensym("iem_tab"), iem_tab_new, 0, sizeof(t_object), CLASS_NOINLET, 0); tab_abs_setup(); tab_add_setup(); tab_add_scalar_setup(); tab_carth2polar_setup(); tab_complex_inv_setup(); tab_complex_mul_setup(); tab_const_setup(); tab_conv_setup(); tab_copy_setup(); tab_counter_setup(); tab_cross_corr_setup(); tab_dbtopow_setup(); tab_dbtorms_setup(); tab_div_setup(); tab_eq_setup(); tab_eq_scalar_setup(); tab_fft_setup(); tab_find_exact_peaks_setup(); tab_find_peaks_setup(); tab_ge_setup(); tab_ge_scalar_setup(); tab_gt_setup(); tab_gt_scalar_setup(); tab_get_size_setup(); tab_ifft_setup(); tab_le_setup(); tab_le_scalar_setup(); tab_lt_setup(); tab_lt_scalar_setup(); tab_max_index_setup(); tab_min_index_setup(); tab_min_max_setup(); tab_mul_setup(); tab_mul_scalar_setup(); tab_ne_setup(); tab_ne_scalar_setup(); tab_powtodb_setup(); tab_reverse_setup(); tab_rfft_setup(); tab_rifft_setup(); tab_rmstodb_setup(); tab_sqrt_setup(); tab_sub_setup(); tab_sum_setup(); post("iem_tab (1.21) library loaded! (c) Thomas Musil "BUILD_DATE); post(" musil%ciem.at iem KUG Graz Austria", '@'); } #endif // library iem_utils-v0.0.20181004/iem_tab/src/tab_complex_mul.c0000644000175000017500000002501313303612043022362 0ustar zmoelnigzmoelnig/* For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. iem_tab written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2009 */ #include "m_pd.h" #include "iemlib.h" #include "iem_tab.h" /* -------------------------- tab_complex_mul ------------------------------ */ /* x_beg_mem_dst_re[i] = x_beg_mem_src1_re[i]*x_beg_mem_src2_re[i] - x_beg_mem_src1_im[i]*x_beg_mem_src2_im[i] */ /* x_beg_mem_dst_im[i] = x_beg_mem_src1_re[i]*x_beg_mem_src2_im[i] + x_beg_mem_src1_im[i]*x_beg_mem_src2_re[i] */ typedef struct _tab_complex_mul { t_object x_obj; int x_size_src1_re; int x_size_src2_re; int x_size_dst_re; int x_size_src1_im; int x_size_src2_im; int x_size_dst_im; int x_offset_src1_re; int x_offset_src2_re; int x_offset_dst_re; int x_offset_src1_im; int x_offset_src2_im; int x_offset_dst_im; iemarray_t *x_beg_mem_src1_re; iemarray_t *x_beg_mem_src2_re; iemarray_t *x_beg_mem_dst_re; iemarray_t *x_beg_mem_src1_im; iemarray_t *x_beg_mem_src2_im; iemarray_t *x_beg_mem_dst_im; t_symbol *x_sym_scr1_re; t_symbol *x_sym_scr2_re; t_symbol *x_sym_dst_re; t_symbol *x_sym_scr1_im; t_symbol *x_sym_scr2_im; t_symbol *x_sym_dst_im; } t_tab_complex_mul; static t_class *tab_complex_mul_class; static void tab_complex_mul_src1_re(t_tab_complex_mul *x, t_symbol *s) { x->x_sym_scr1_re = s; } static void tab_complex_mul_src1_im(t_tab_complex_mul *x, t_symbol *s) { x->x_sym_scr1_im = s; } static void tab_complex_mul_src2_re(t_tab_complex_mul *x, t_symbol *s) { x->x_sym_scr2_re = s; } static void tab_complex_mul_src2_im(t_tab_complex_mul *x, t_symbol *s) { x->x_sym_scr2_im = s; } static void tab_complex_mul_dst_re(t_tab_complex_mul *x, t_symbol *s) { x->x_sym_dst_re = s; } static void tab_complex_mul_dst_im(t_tab_complex_mul *x, t_symbol *s) { x->x_sym_dst_im = s; } static void tab_complex_mul_bang(t_tab_complex_mul *x) { int i, n; int ok_src1_re, ok_src2_re, ok_dst_re; int ok_src1_im, ok_src2_im, ok_dst_im; iemarray_t *vec_src1_re, *vec_src2_re, *vec_dst_re; iemarray_t *vec_src1_im, *vec_src2_im, *vec_dst_im; ok_src1_re = iem_tab_check_arrays(gensym("tab_complex_mul"), x->x_sym_scr1_re, &x->x_beg_mem_src1_re, &x->x_size_src1_re, 0); ok_src2_re = iem_tab_check_arrays(gensym("tab_complex_mul"), x->x_sym_scr2_re, &x->x_beg_mem_src2_re, &x->x_size_src2_re, 0); ok_dst_re = iem_tab_check_arrays(gensym("tab_complex_mul"), x->x_sym_dst_re, &x->x_beg_mem_dst_re, &x->x_size_dst_re, 0); ok_src1_im = iem_tab_check_arrays(gensym("tab_complex_mul"), x->x_sym_scr1_im, &x->x_beg_mem_src1_im, &x->x_size_src1_im, 0); ok_src2_im = iem_tab_check_arrays(gensym("tab_complex_mul"), x->x_sym_scr2_im, &x->x_beg_mem_src2_im, &x->x_size_src2_im, 0); ok_dst_im = iem_tab_check_arrays(gensym("tab_complex_mul"), x->x_sym_dst_im, &x->x_beg_mem_dst_im, &x->x_size_dst_im, 0); if(ok_src1_re && ok_src2_re && ok_dst_re && ok_src1_im && ok_src2_im && ok_dst_im) { if(x->x_size_src1_re < x->x_size_dst_re) n = x->x_size_src1_re; else n = x->x_size_dst_re; if(x->x_size_src2_re < n) n = x->x_size_src2_re; if(x->x_size_src1_im < n) n = x->x_size_src1_im; if(x->x_size_src2_im < n) n = x->x_size_src2_im; if(x->x_size_dst_im < n) n = x->x_size_dst_im; vec_src1_re = x->x_beg_mem_src1_re; vec_src2_re = x->x_beg_mem_src2_re; vec_dst_re = x->x_beg_mem_dst_re; vec_src1_im = x->x_beg_mem_src1_im; vec_src2_im = x->x_beg_mem_src2_im; vec_dst_im = x->x_beg_mem_dst_im; if(n) { t_garray *a; for(i=0; ix_obj.ob_outlet); a = (t_garray *)pd_findbyclass(x->x_sym_dst_re, garray_class); garray_redraw(a); a = (t_garray *)pd_findbyclass(x->x_sym_dst_im, garray_class); garray_redraw(a); } } } static void tab_complex_mul_list(t_tab_complex_mul *x, t_symbol *s, int argc, t_atom *argv) { int i, n; int beg_src1_re, beg_src2_re, beg_dst_re; int beg_src1_im, beg_src2_im, beg_dst_im; int ok_src1_re, ok_src2_re, ok_dst_re; int ok_src1_im, ok_src2_im, ok_dst_im; iemarray_t *vec_src1_re, *vec_src2_re, *vec_dst_re; iemarray_t *vec_src1_im, *vec_src2_im, *vec_dst_im; if((argc >= 7) && IS_A_FLOAT(argv,0) && IS_A_FLOAT(argv,1) && IS_A_FLOAT(argv,2) && IS_A_FLOAT(argv,3) && IS_A_FLOAT(argv,4) && IS_A_FLOAT(argv,5) && IS_A_FLOAT(argv,6)) { beg_src1_re = (int)atom_getintarg(0, argc, argv); beg_src1_im = (int)atom_getintarg(1, argc, argv); beg_src2_re = (int)atom_getintarg(2, argc, argv); beg_src2_im = (int)atom_getintarg(3, argc, argv); beg_dst_re = (int)atom_getintarg(4, argc, argv); beg_dst_im = (int)atom_getintarg(5, argc, argv); n = (int)atom_getintarg(6, argc, argv); if(beg_src1_re < 0) beg_src1_re = 0; if(beg_src2_re < 0) beg_src2_re = 0; if(beg_dst_re < 0) beg_dst_re = 0; if(beg_src1_im < 0) beg_src1_im = 0; if(beg_src2_im < 0) beg_src2_im = 0; if(beg_dst_im < 0) beg_dst_im = 0; if(n < 0) n = 0; ok_src1_re = iem_tab_check_arrays(gensym("tab_complex_mul"), x->x_sym_scr1_re, &x->x_beg_mem_src1_re, &x->x_size_src1_re, beg_src1_re+n); ok_src2_re = iem_tab_check_arrays(gensym("tab_complex_mul"), x->x_sym_scr2_re, &x->x_beg_mem_src2_re, &x->x_size_src2_re, beg_src2_re+n); ok_dst_re = iem_tab_check_arrays(gensym("tab_complex_mul"), x->x_sym_dst_re, &x->x_beg_mem_dst_re, &x->x_size_dst_re, beg_dst_re+n); ok_src1_im = iem_tab_check_arrays(gensym("tab_complex_mul"), x->x_sym_scr1_im, &x->x_beg_mem_src1_im, &x->x_size_src1_im, beg_src1_im+n); ok_src2_im = iem_tab_check_arrays(gensym("tab_complex_mul"), x->x_sym_scr2_im, &x->x_beg_mem_src2_im, &x->x_size_src2_im, beg_src2_im+n); ok_dst_im = iem_tab_check_arrays(gensym("tab_complex_mul"), x->x_sym_dst_im, &x->x_beg_mem_dst_im, &x->x_size_dst_im, beg_dst_im+n); if(ok_src1_re && ok_src2_re && ok_dst_re && ok_src1_im && ok_src2_im && ok_dst_im) { vec_src1_re = x->x_beg_mem_src1_re + beg_src1_re; vec_src2_re = x->x_beg_mem_src2_re + beg_src2_re; vec_dst_re = x->x_beg_mem_dst_re + beg_dst_re; vec_src1_im = x->x_beg_mem_src1_im + beg_src1_im; vec_src2_im = x->x_beg_mem_src2_im + beg_src2_im; vec_dst_im = x->x_beg_mem_dst_im + beg_dst_im; if(n) { t_garray *a; for(i=0; ix_obj.ob_outlet); a = (t_garray *)pd_findbyclass(x->x_sym_dst_re, garray_class); garray_redraw(a); a = (t_garray *)pd_findbyclass(x->x_sym_dst_im, garray_class); garray_redraw(a); } } } else { post("tab_complex_mul-ERROR: list need 7 float arguments:"); post(" source1_real_offset + source1_imag_offset + source2_real_offset + source2_imag_offset + destination_real_offset + destination_imag_offset + number_of_samples_to_complex_mul"); } } static void tab_complex_mul_free(t_tab_complex_mul *x) { } static void *tab_complex_mul_new(t_symbol *s, int argc, t_atom *argv) { t_tab_complex_mul *x = (t_tab_complex_mul *)pd_new(tab_complex_mul_class); t_symbol *src1_re, *src2_re, *dst_re, *src1_im, *src2_im, *dst_im; if((argc >= 6) && IS_A_SYMBOL(argv,0) && IS_A_SYMBOL(argv,1) && IS_A_SYMBOL(argv,2) && IS_A_SYMBOL(argv,3) && IS_A_SYMBOL(argv,4) && IS_A_SYMBOL(argv,5)) { src1_re = (t_symbol *)atom_getsymbolarg(0, argc, argv); src1_im = (t_symbol *)atom_getsymbolarg(1, argc, argv); src2_re = (t_symbol *)atom_getsymbolarg(2, argc, argv); src2_im = (t_symbol *)atom_getsymbolarg(3, argc, argv); dst_re = (t_symbol *)atom_getsymbolarg(4, argc, argv); dst_im = (t_symbol *)atom_getsymbolarg(5, argc, argv); } else if((argc >= 4) && IS_A_SYMBOL(argv,0) && IS_A_SYMBOL(argv,1) && IS_A_SYMBOL(argv,2) && IS_A_SYMBOL(argv,4)) { src1_re = (t_symbol *)atom_getsymbolarg(0, argc, argv); src1_im = (t_symbol *)atom_getsymbolarg(1, argc, argv); src2_re = (t_symbol *)atom_getsymbolarg(2, argc, argv); src2_im = (t_symbol *)atom_getsymbolarg(3, argc, argv); dst_re = src1_re; dst_im = src1_im; } else { post("tab_complex_mul-ERROR: need 6 symbols arguments:"); post(" source1_real_array_name + source1_imag_array_name + source2_real_array_name + source2_imag_array_name + destination_real_array_name + destination_imag_array_name"); return(0); } x->x_sym_scr1_re = src1_re; x->x_sym_scr1_im = src1_im; x->x_sym_scr2_re = src2_re; x->x_sym_scr2_im = src2_im; x->x_sym_dst_re = dst_re; x->x_sym_dst_im = dst_im; outlet_new(&x->x_obj, &s_bang); return(x); } void tab_complex_mul_setup(void) { tab_complex_mul_class = class_new(gensym("tab_complex_mul"), (t_newmethod)tab_complex_mul_new, (t_method)tab_complex_mul_free, sizeof(t_tab_complex_mul), 0, A_GIMME, 0); class_addbang(tab_complex_mul_class, (t_method)tab_complex_mul_bang); class_addlist(tab_complex_mul_class, (t_method)tab_complex_mul_list); class_addmethod(tab_complex_mul_class, (t_method)tab_complex_mul_src1_re, gensym("src1_re"), A_DEFSYMBOL, 0); class_addmethod(tab_complex_mul_class, (t_method)tab_complex_mul_src2_re, gensym("src2_re"), A_DEFSYMBOL, 0); class_addmethod(tab_complex_mul_class, (t_method)tab_complex_mul_dst_re, gensym("dst_re"), A_DEFSYMBOL, 0); class_addmethod(tab_complex_mul_class, (t_method)tab_complex_mul_src1_im, gensym("src1_im"), A_DEFSYMBOL, 0); class_addmethod(tab_complex_mul_class, (t_method)tab_complex_mul_src2_im, gensym("src2_im"), A_DEFSYMBOL, 0); class_addmethod(tab_complex_mul_class, (t_method)tab_complex_mul_dst_im, gensym("dst_im"), A_DEFSYMBOL, 0); // class_sethelpsymbol(tab_complex_mul_class, gensym("iemhelp2/tab_complex_mul-help")); } iem_utils-v0.0.20181004/iem_tab/src/tab_fft.c0000644000175000017500000002774313303612044020632 0ustar zmoelnigzmoelnig/* For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. iem_tab written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2009 */ #include "m_pd.h" #include "iemlib.h" #include "iem_tab.h" #include /* -------------------------- tab_fft ------------------------------ */ /* complex FFT */ typedef struct _tab_fft { t_object x_obj; int x_size_src_re; int x_size_src_im; int x_size_dst_re; int x_size_dst_im; int x_offset_src_re; int x_offset_src_im; int x_offset_dst_re; int x_offset_dst_im; int x_fftsize; iemarray_t *x_beg_mem_src_re; iemarray_t *x_beg_mem_src_im; iemarray_t *x_beg_mem_dst_re; iemarray_t *x_beg_mem_dst_im; TAB_COMPLEX *x_sin_cos; t_symbol *x_sym_src_re; t_symbol *x_sym_src_im; t_symbol *x_sym_dst_re; t_symbol *x_sym_dst_im; } t_tab_fft; static t_class *tab_fft_class; static void tab_fft_init(t_tab_fft *x) { int i, fftsize = x->x_fftsize; t_float f, g; TAB_COMPLEX *sincos = x->x_sin_cos; g = 2.0 * 3.141592653589793 / (t_float)fftsize; for(i=0; ix_fftsize) { x->x_sin_cos = (TAB_COMPLEX *)resizebytes(x->x_sin_cos, x->x_fftsize*sizeof(TAB_COMPLEX), i*sizeof(TAB_COMPLEX)); x->x_fftsize = i; } tab_fft_init(x); } static void tab_fft_src_re(t_tab_fft *x, t_symbol *s) { x->x_sym_src_re = s; } static void tab_fft_src_im(t_tab_fft *x, t_symbol *s) { x->x_sym_src_im = s; } static void tab_fft_dst_re(t_tab_fft *x, t_symbol *s) { x->x_sym_dst_re = s; } static void tab_fft_dst_im(t_tab_fft *x, t_symbol *s) { x->x_sym_dst_im = s; } static void tab_fft_bang(t_tab_fft *x) { int i, j, k; int ok_src_re, ok_src_im, ok_dst_re, ok_dst_im; int w_index, w_inc, i_inc, v_index; int fftsize = x->x_fftsize; int fs1 = fftsize - 1; int fs2 = fftsize / 2; TAB_COMPLEX w; TAB_COMPLEX *sincos = x->x_sin_cos; iemarray_t *vec_src_re, *vec_src_im, *vec_dst_re, *vec_dst_im; t_float old1_re, old1_im, old2_re, old2_im; ok_src_re = iem_tab_check_arrays(gensym("tab_fft"), x->x_sym_src_re, &x->x_beg_mem_src_re, &x->x_size_src_re, fftsize); ok_src_im = iem_tab_check_arrays(gensym("tab_fft"), x->x_sym_src_im, &x->x_beg_mem_src_im, &x->x_size_src_im, fftsize); ok_dst_re = iem_tab_check_arrays(gensym("tab_fft"), x->x_sym_dst_re, &x->x_beg_mem_dst_re, &x->x_size_dst_re, fftsize); ok_dst_im = iem_tab_check_arrays(gensym("tab_fft"), x->x_sym_dst_im, &x->x_beg_mem_dst_im, &x->x_size_dst_im, fftsize); if(ok_src_re && ok_src_im && ok_dst_re && ok_dst_im) { t_garray *a; vec_src_re=x->x_beg_mem_src_re; vec_src_im=x->x_beg_mem_src_im; vec_dst_re=x->x_beg_mem_dst_re; vec_dst_im=x->x_beg_mem_dst_im; for(k=0; k>= 1; } j = 0; for(i=1;i>= 1; } j = j + k; if(i < j) { old1_re = iemarray_getfloat(vec_dst_re, j); old1_im = iemarray_getfloat(vec_dst_im, j); iemarray_setfloat(vec_dst_re, j, iemarray_getfloat(vec_dst_re, i)); iemarray_setfloat(vec_dst_im, j, iemarray_getfloat(vec_dst_im, i)); iemarray_setfloat(vec_dst_re, i, old1_re); iemarray_setfloat(vec_dst_im, i, old1_im); } } // g = 2.0f / (t_float)fftsize; /* ein fehler tritt auf beim 0.sample, hier sollte nur mal 1.0 multipliziert werden wenn gelten soll : Energie im zeitfenster == Energie im Frequenz-dichte-fenster g = 1.0f; for(i = 0; i < fs2; i++) { vec_dst_re[i] *= g; vec_dst_im[i] *= g; } */ outlet_bang(x->x_obj.ob_outlet); a = (t_garray *)pd_findbyclass(x->x_sym_dst_re, garray_class); garray_redraw(a); a = (t_garray *)pd_findbyclass(x->x_sym_dst_im, garray_class); garray_redraw(a); } } static void tab_fft_list(t_tab_fft *x, t_symbol *s, int argc, t_atom *argv) { int beg_src_re, beg_src_im, beg_dst_re, beg_dst_im; int i, j, k; int ok_src_re, ok_src_im, ok_dst_re, ok_dst_im; int w_index, w_inc, i_inc, v_index; int fftsize = x->x_fftsize; int fs1 = fftsize - 1; int fs2 = fftsize / 2; TAB_COMPLEX w; TAB_COMPLEX *sincos = x->x_sin_cos; iemarray_t *vec_src_re, *vec_src_im, *vec_dst_re, *vec_dst_im; t_float old1_re, old1_im, old2_re, old2_im; if((argc >= 4) && IS_A_FLOAT(argv,0) && IS_A_FLOAT(argv,1) && IS_A_FLOAT(argv,2) && IS_A_FLOAT(argv,3)) { beg_src_re = (int)atom_getintarg(0, argc, argv); beg_src_im = (int)atom_getintarg(1, argc, argv); beg_dst_re = (int)atom_getintarg(2, argc, argv); beg_dst_im = (int)atom_getintarg(3, argc, argv); if(beg_src_re < 0) beg_src_re = 0; if(beg_src_im < 0) beg_src_im = 0; if(beg_dst_re < 0) beg_dst_re = 0; if(beg_dst_im < 0) beg_dst_im = 0; ok_src_re = iem_tab_check_arrays(gensym("tab_fft"), x->x_sym_src_re, &x->x_beg_mem_src_re, &x->x_size_src_re, beg_src_re+fftsize); ok_src_im = iem_tab_check_arrays(gensym("tab_fft"), x->x_sym_src_im, &x->x_beg_mem_src_im, &x->x_size_src_im, beg_src_im+fftsize); ok_dst_re = iem_tab_check_arrays(gensym("tab_fft"), x->x_sym_dst_re, &x->x_beg_mem_dst_re, &x->x_size_dst_re, beg_dst_re+fftsize); ok_dst_im = iem_tab_check_arrays(gensym("tab_fft"), x->x_sym_dst_im, &x->x_beg_mem_dst_im, &x->x_size_dst_im, beg_dst_im+fftsize); if(ok_src_re && ok_src_im && ok_dst_re && ok_dst_im) { t_garray *a; vec_src_re=x->x_beg_mem_src_re + beg_src_re; vec_src_im=x->x_beg_mem_src_im + beg_src_im; vec_dst_re=x->x_beg_mem_dst_re + beg_dst_re; vec_dst_im=x->x_beg_mem_dst_im + beg_dst_im; for(k=0; k>= 1; } j = 0; for(i=1;i>= 1; } j = j + k; if(i < j) { old1_re = iemarray_getfloat(vec_dst_re, j); old1_im = iemarray_getfloat(vec_dst_im, j); iemarray_setfloat(vec_dst_re, j, iemarray_getfloat(vec_dst_re, i)); iemarray_setfloat(vec_dst_im, j, iemarray_getfloat(vec_dst_im, i)); iemarray_setfloat(vec_dst_re, i, old1_re); iemarray_setfloat(vec_dst_im, i, old1_im); } } // g = 2.0f / (t_float)fftsize; /* ein fehler tritt auf beim 0.sample, hier sollte nur mal 1.0 multipliziert werden wenn gelten soll : Energie im zeitfenster == Energie im Frequenz-dichte-fenster g = 1.0f; for(i = 0; i < fs2; i++) { vec_dst_re[i] *= g; vec_dst_im[i] *= g; } */ outlet_bang(x->x_obj.ob_outlet); a = (t_garray *)pd_findbyclass(x->x_sym_dst_re, garray_class); garray_redraw(a); a = (t_garray *)pd_findbyclass(x->x_sym_dst_im, garray_class); garray_redraw(a); } } else { post("tab_fft-ERROR: list need 4 float arguments:"); post(" source_real_offset + source_imag_offset + destination_real_offset + destination_imag_offset"); } } static void tab_fft_free(t_tab_fft *x) { freebytes(x->x_sin_cos, x->x_fftsize * sizeof(TAB_COMPLEX)); } static void *tab_fft_new(t_symbol *s, int argc, t_atom *argv) { t_tab_fft *x = (t_tab_fft *)pd_new(tab_fft_class); t_symbol *src_re, *src_im, *dst_re, *dst_im; int fftsize, i=1; if((argc >= 5) && IS_A_SYMBOL(argv,0) && IS_A_SYMBOL(argv,1) && IS_A_SYMBOL(argv,2) && IS_A_SYMBOL(argv,3) && IS_A_FLOAT(argv,4)) { src_re = (t_symbol *)atom_getsymbolarg(0, argc, argv); src_im = (t_symbol *)atom_getsymbolarg(1, argc, argv); dst_re = (t_symbol *)atom_getsymbolarg(2, argc, argv); dst_im = (t_symbol *)atom_getsymbolarg(3, argc, argv); fftsize = (int)atom_getintarg(4, argc, argv); } else { post("tab_fft-ERROR: need 4 symbols + 1 float arguments:"); post(" source_real_array_name + source_imag_array_name + destination_real_array_name + destination_imag_array_name + FFT-size"); return(0); } if(fftsize < 8) fftsize = 8; while(i <= fftsize) i *= 2; i /= 2; fftsize = i; x->x_fftsize = fftsize; x->x_sym_src_re = src_re; x->x_sym_src_im = src_im; x->x_sym_dst_re = dst_re; x->x_sym_dst_im = dst_im; x->x_sin_cos = (TAB_COMPLEX *)getbytes(x->x_fftsize * sizeof(TAB_COMPLEX)); tab_fft_init(x); outlet_new(&x->x_obj, &s_bang); return(x); } void tab_fft_setup(void) { tab_fft_class = class_new(gensym("tab_fft"), (t_newmethod)tab_fft_new, (t_method)tab_fft_free, sizeof(t_tab_fft), 0, A_GIMME, 0); class_addbang(tab_fft_class, (t_method)tab_fft_bang); class_addlist(tab_fft_class, (t_method)tab_fft_list); class_addmethod(tab_fft_class, (t_method)tab_fft_fftsize, gensym("fftsize"), A_DEFFLOAT, 0); class_addmethod(tab_fft_class, (t_method)tab_fft_src_re, gensym("src_re"), A_DEFSYMBOL, 0); class_addmethod(tab_fft_class, (t_method)tab_fft_src_im, gensym("src_im"), A_DEFSYMBOL, 0); class_addmethod(tab_fft_class, (t_method)tab_fft_src_re, gensym("src1"), A_DEFSYMBOL, 0); class_addmethod(tab_fft_class, (t_method)tab_fft_src_im, gensym("src2"), A_DEFSYMBOL, 0); class_addmethod(tab_fft_class, (t_method)tab_fft_dst_re, gensym("dst_re"), A_DEFSYMBOL, 0); class_addmethod(tab_fft_class, (t_method)tab_fft_dst_im, gensym("dst_im"), A_DEFSYMBOL, 0); class_addmethod(tab_fft_class, (t_method)tab_fft_dst_re, gensym("dst1"), A_DEFSYMBOL, 0); class_addmethod(tab_fft_class, (t_method)tab_fft_dst_im, gensym("dst2"), A_DEFSYMBOL, 0); } iem_utils-v0.0.20181004/iem_tab/src/iem_tab.sln0000644000175000017500000000156013303322332021162 0ustar zmoelnigzmoelnig Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 2012 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "iem_tab", "iem_tab.vcxproj", "{72CD00D4-3993-4691-A14F-67DD3CEEAF8E}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Win32 = Debug|Win32 Release|Win32 = Release|Win32 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {72CD00D4-3993-4691-A14F-67DD3CEEAF8E}.Debug|Win32.ActiveCfg = Debug|Win32 {72CD00D4-3993-4691-A14F-67DD3CEEAF8E}.Debug|Win32.Build.0 = Debug|Win32 {72CD00D4-3993-4691-A14F-67DD3CEEAF8E}.Release|Win32.ActiveCfg = Release|Win32 {72CD00D4-3993-4691-A14F-67DD3CEEAF8E}.Release|Win32.Build.0 = Release|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection EndGlobal iem_utils-v0.0.20181004/iem_tab/src/makefile_win0000644000175000017500000000316112630366350021432 0ustar zmoelnigzmoelnig all: ..\iem_tab.dll VIS_CPP_PATH = "C:\Programme\Microsoft Visual Studio\Vc98" PD_INST_PATH = "C:\Programme\pd" PD_WIN_INCLUDE_PATH = /I. /I$(PD_INST_PATH)\src /I$(VIS_CPP_PATH)\include PD_WIN_C_FLAGS = /nologo /W3 /WX /DMSW /DNT /DPD /DWIN32 /DWINDOWS /Ox -DPA_LITTLE_ENDIAN PD_WIN_L_FLAGS = /nologo PD_WIN_LIB = /NODEFAULTLIB:libc /NODEFAULTLIB:oldnames /NODEFAULTLIB:kernel /NODEFAULTLIB:uuid \ $(VIS_CPP_PATH)\lib\libc.lib \ $(VIS_CPP_PATH)\lib\oldnames.lib \ $(VIS_CPP_PATH)\lib\kernel32.lib \ $(VIS_CPP_PATH)\lib\wsock32.lib \ $(VIS_CPP_PATH)\lib\winmm.lib \ $(PD_INST_PATH)\bin\pd.lib SRC = tab_abs.c \ tab_add.c \ tab_add_scalar.c \ tab_carth2polar.c \ tab_complex_inv.c \ tab_complex_mul.c \ tab_const.c \ tab_conv.c \ tab_copy.c \ tab_counter.c \ tab_cross_corr.c \ tab_dbtopow.c \ tab_dbtorms.c \ tab_div.c \ tab_eq.c \ tab_eq_scalar.c \ tab_fft.c \ tab_find_exact_peaks.c \ tab_find_peaks.c \ tab_ge.c \ tab_ge_scalar.c \ tab_gt.c \ tab_gt_scalar.c \ tab_get_size.c \ tab_ifft.c \ tab_le.c \ tab_le_scalar.c \ tab_lt.c \ tab_lt_scalar.c \ tab_max_index.c \ tab_min_index.c \ tab_min_max.c \ tab_mul.c \ tab_mul_scalar.c \ tab_ne.c \ tab_ne_scalar.c \ tab_powtodb.c \ tab_reverse.c \ tab_rfft.c \ tab_rifft.c \ tab_rmstodb.c \ tab_sqrt.c \ tab_sub.c \ tab_sum.c \ iem_tab.c OBJ = $(SRC:.c=.obj) .c.obj: cl $(PD_WIN_C_FLAGS) $(PD_WIN_INCLUDE_PATH) /c $*.c ..\iem_tab.dll: $(OBJ) link $(PD_WIN_L_FLAGS) /dll /export:iem_tab_setup \ /out:..\iem_tab.dll $(OBJ) $(PD_WIN_LIB) clean: del *.obj iem_utils-v0.0.20181004/iem_tab/src/tab_ge.c0000644000175000017500000001307413303612044020436 0ustar zmoelnigzmoelnig/* For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. iem_tab written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2006 */ #include "m_pd.h" #include "iemlib.h" #include "iem_tab.h" /* -------------------------- tab_ge ------------------------------ */ /* if(x_beg_mem_src1[i] >= x_beg_mem_src2[i]) */ /* x_beg_mem_dst[i] = 1.0f; */ /* else */ /* x_beg_mem_dst[i] = 0.0f; */ typedef struct _tab_ge { t_object x_obj; int x_size_src1; int x_size_src2; int x_size_dst; int x_offset_src1; int x_offset_src2; int x_offset_dst; iemarray_t *x_beg_mem_src1; iemarray_t *x_beg_mem_src2; iemarray_t *x_beg_mem_dst; t_symbol *x_sym_scr1; t_symbol *x_sym_scr2; t_symbol *x_sym_dst; } t_tab_ge; static t_class *tab_ge_class; static void tab_ge_src1(t_tab_ge *x, t_symbol *s) { x->x_sym_scr1 = s; } static void tab_ge_src2(t_tab_ge *x, t_symbol *s) { x->x_sym_scr2 = s; } static void tab_ge_dst(t_tab_ge *x, t_symbol *s) { x->x_sym_dst = s; } static void tab_ge_bang(t_tab_ge *x) { int i, n; int ok_src1, ok_src2, ok_dst; iemarray_t *vec_src1, *vec_src2, *vec_dst; ok_src1 = iem_tab_check_arrays(gensym("tab_ge"), x->x_sym_scr1, &x->x_beg_mem_src1, &x->x_size_src1, 0); ok_src2 = iem_tab_check_arrays(gensym("tab_ge"), x->x_sym_scr2, &x->x_beg_mem_src2, &x->x_size_src2, 0); ok_dst = iem_tab_check_arrays(gensym("tab_ge"), x->x_sym_dst, &x->x_beg_mem_dst, &x->x_size_dst, 0); if(ok_src1 && ok_src2 && ok_dst) { if(x->x_size_src1 < x->x_size_dst) n = x->x_size_src1; else n = x->x_size_dst; if(x->x_size_src2 < n) n = x->x_size_src2; vec_src1 = x->x_beg_mem_src1; vec_src2 = x->x_beg_mem_src2; vec_dst = x->x_beg_mem_dst; if(n) { t_garray *a; for(i=0; i= iemarray_getfloat(vec_src2, i)) iemarray_setfloat(vec_dst, i, 1.0f); else iemarray_setfloat(vec_dst, i, 0.0f); } outlet_bang(x->x_obj.ob_outlet); a = (t_garray *)pd_findbyclass(x->x_sym_dst, garray_class); garray_redraw(a); } } } static void tab_ge_list(t_tab_ge *x, t_symbol *s, int argc, t_atom *argv) { int beg_src1, beg_src2, beg_dst; int i, n; int ok_src1, ok_src2, ok_dst; iemarray_t *vec_src1, *vec_src2, *vec_dst; if((argc >= 4) && IS_A_FLOAT(argv,0) && IS_A_FLOAT(argv,1) && IS_A_FLOAT(argv,2) && IS_A_FLOAT(argv,3)) { beg_src1 = (int)atom_getintarg(0, argc, argv); beg_src2 = (int)atom_getintarg(1, argc, argv); beg_dst = (int)atom_getintarg(2, argc, argv); n = (int)atom_getintarg(3, argc, argv); if(beg_src1 < 0) beg_src1 = 0; if(beg_src2 < 0) beg_src2 = 0; if(beg_dst < 0) beg_dst = 0; if(n < 0) n = 0; ok_src1 = iem_tab_check_arrays(gensym("tab_ge"), x->x_sym_scr1, &x->x_beg_mem_src1, &x->x_size_src1, beg_src1+n); ok_src2 = iem_tab_check_arrays(gensym("tab_ge"), x->x_sym_scr2, &x->x_beg_mem_src2, &x->x_size_src2, beg_src2+n); ok_dst = iem_tab_check_arrays(gensym("tab_ge"), x->x_sym_dst, &x->x_beg_mem_dst, &x->x_size_dst, beg_dst+n); if(ok_src1 && ok_src2 && ok_dst) { vec_src1 = x->x_beg_mem_src1 + beg_src1; vec_src2 = x->x_beg_mem_src2 + beg_src2; vec_dst = x->x_beg_mem_dst + beg_dst; if(n) { t_garray *a; for(i=0; i= iemarray_getfloat(vec_src2, i)) iemarray_setfloat(vec_dst, i, 1.0f); else iemarray_setfloat(vec_dst, i, 0.0f); } outlet_bang(x->x_obj.ob_outlet); a = (t_garray *)pd_findbyclass(x->x_sym_dst, garray_class); garray_redraw(a); } } } else { post("tab_ge-ERROR: list need 4 float arguments:"); post(" source1_offset + source2_offset + destination_offset + number_of_samples_to_compare"); } } static void tab_ge_free(t_tab_ge *x) { } static void *tab_ge_new(t_symbol *s, int argc, t_atom *argv) { t_tab_ge *x = (t_tab_ge *)pd_new(tab_ge_class); t_symbol *src1, *src2, *dst; if((argc >= 3) && IS_A_SYMBOL(argv,0) && IS_A_SYMBOL(argv,1) && IS_A_SYMBOL(argv,2)) { src1 = (t_symbol *)atom_getsymbolarg(0, argc, argv); src2 = (t_symbol *)atom_getsymbolarg(1, argc, argv); dst = (t_symbol *)atom_getsymbolarg(2, argc, argv); } else if((argc >= 2) && IS_A_SYMBOL(argv,0) && IS_A_SYMBOL(argv,1)) { src1 = (t_symbol *)atom_getsymbolarg(0, argc, argv); dst = src1; src2 = (t_symbol *)atom_getsymbolarg(1, argc, argv); } else { post("tab_ge-ERROR: need 3 symbols arguments:"); post(" source1_array_name + source2_array_name + destination_array_name"); return(0); } x->x_sym_scr1 = src1; x->x_sym_scr2 = src2; x->x_sym_dst = dst; outlet_new(&x->x_obj, &s_bang); return(x); } void tab_ge_setup(void) { tab_ge_class = class_new(gensym("tab_ge"), (t_newmethod)tab_ge_new, (t_method)tab_ge_free, sizeof(t_tab_ge), 0, A_GIMME, 0); class_addbang(tab_ge_class, (t_method)tab_ge_bang); class_addlist(tab_ge_class, (t_method)tab_ge_list); class_addmethod(tab_ge_class, (t_method)tab_ge_src1, gensym("src1"), A_DEFSYMBOL, 0); class_addmethod(tab_ge_class, (t_method)tab_ge_src2, gensym("src2"), A_DEFSYMBOL, 0); class_addmethod(tab_ge_class, (t_method)tab_ge_dst, gensym("dst"), A_DEFSYMBOL, 0); // class_sethelpsymbol(tab_ge_class, gensym("iemhelp2/tab_ge-help")); } iem_utils-v0.0.20181004/iem_tab/src/tab_mul.c0000644000175000017500000001244413303612044020640 0ustar zmoelnigzmoelnig/* For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. iem_tab written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2009 */ #include "m_pd.h" #include "iemlib.h" #include "iem_tab.h" /* -------------------------- tab_mul ------------------------------ */ /* x_beg_mem_dst[i] = x_beg_mem_src1[i]*x_offset_src2[i] */ typedef struct _tab_mul { t_object x_obj; int x_size_src1; int x_size_src2; int x_size_dst; int x_offset_src1; int x_offset_src2; int x_offset_dst; iemarray_t *x_beg_mem_src1; iemarray_t *x_beg_mem_src2; iemarray_t *x_beg_mem_dst; t_symbol *x_sym_scr1; t_symbol *x_sym_scr2; t_symbol *x_sym_dst; } t_tab_mul; static t_class *tab_mul_class; static void tab_mul_src1(t_tab_mul *x, t_symbol *s) { x->x_sym_scr1 = s; } static void tab_mul_src2(t_tab_mul *x, t_symbol *s) { x->x_sym_scr2 = s; } static void tab_mul_dst(t_tab_mul *x, t_symbol *s) { x->x_sym_dst = s; } static void tab_mul_bang(t_tab_mul *x) { int i, n; int ok_src1, ok_src2, ok_dst; iemarray_t *vec_src1, *vec_src2, *vec_dst; ok_src1 = iem_tab_check_arrays(gensym("tab_mul"), x->x_sym_scr1, &x->x_beg_mem_src1, &x->x_size_src1, 0); ok_src2 = iem_tab_check_arrays(gensym("tab_mul"), x->x_sym_scr2, &x->x_beg_mem_src2, &x->x_size_src2, 0); ok_dst = iem_tab_check_arrays(gensym("tab_mul"), x->x_sym_dst, &x->x_beg_mem_dst, &x->x_size_dst, 0); if(ok_src1 && ok_src2 && ok_dst) { if(x->x_size_src1 < x->x_size_dst) n = x->x_size_src1; else n = x->x_size_dst; if(x->x_size_src2 < n) n = x->x_size_src2; vec_src1 = x->x_beg_mem_src1; vec_src2 = x->x_beg_mem_src2; vec_dst = x->x_beg_mem_dst; if(n) { t_garray *a; for(i=0; ix_obj.ob_outlet); a = (t_garray *)pd_findbyclass(x->x_sym_dst, garray_class); garray_redraw(a); } } } static void tab_mul_list(t_tab_mul *x, t_symbol *s, int argc, t_atom *argv) { int beg_src1, beg_src2, beg_dst; int i, n; int ok_src1, ok_src2, ok_dst; iemarray_t *vec_src1, *vec_src2, *vec_dst; if((argc >= 4) && IS_A_FLOAT(argv,0) && IS_A_FLOAT(argv,1) && IS_A_FLOAT(argv,2) && IS_A_FLOAT(argv,3)) { beg_src1 = (int)atom_getintarg(0, argc, argv); beg_src2 = (int)atom_getintarg(1, argc, argv); beg_dst = (int)atom_getintarg(2, argc, argv); n = (int)atom_getintarg(3, argc, argv); if(beg_src1 < 0) beg_src1 = 0; if(beg_src2 < 0) beg_src2 = 0; if(beg_dst < 0) beg_dst = 0; if(n < 0) n = 0; ok_src1 = iem_tab_check_arrays(gensym("tab_mul"), x->x_sym_scr1, &x->x_beg_mem_src1, &x->x_size_src1, beg_src1+n); ok_src2 = iem_tab_check_arrays(gensym("tab_mul"), x->x_sym_scr2, &x->x_beg_mem_src2, &x->x_size_src2, beg_src2+n); ok_dst = iem_tab_check_arrays(gensym("tab_mul"), x->x_sym_dst, &x->x_beg_mem_dst, &x->x_size_dst, beg_dst+n); if(ok_src1 && ok_src2 && ok_dst) { vec_src1 = x->x_beg_mem_src1 + beg_src1; vec_src2 = x->x_beg_mem_src2 + beg_src2; vec_dst = x->x_beg_mem_dst + beg_dst; if(n) { t_garray *a; for(i=0; ix_obj.ob_outlet); a = (t_garray *)pd_findbyclass(x->x_sym_dst, garray_class); garray_redraw(a); } } } else { post("tab_mul-ERROR: list need 4 float arguments:"); post(" source1_offset + source2_offset + destination_offset + number_of_samples_to_mul"); } } static void tab_mul_free(t_tab_mul *x) { } static void *tab_mul_new(t_symbol *s, int argc, t_atom *argv) { t_tab_mul *x = (t_tab_mul *)pd_new(tab_mul_class); t_symbol *src1, *src2, *dst; if((argc >= 3) && IS_A_SYMBOL(argv,0) && IS_A_SYMBOL(argv,1) && IS_A_SYMBOL(argv,2)) { src1 = (t_symbol *)atom_getsymbolarg(0, argc, argv); src2 = (t_symbol *)atom_getsymbolarg(1, argc, argv); dst = (t_symbol *)atom_getsymbolarg(2, argc, argv); } else if((argc >= 2) && IS_A_SYMBOL(argv,0) && IS_A_SYMBOL(argv,1)) { src1 = (t_symbol *)atom_getsymbolarg(0, argc, argv); dst = src1; src2 = (t_symbol *)atom_getsymbolarg(1, argc, argv); } else { post("tab_mul-ERROR: need 3 symbols arguments:"); post(" source1_array_name + source2_array_name + destination_array_name"); return(0); } x->x_sym_scr1 = src1; x->x_sym_scr2 = src2; x->x_sym_dst = dst; outlet_new(&x->x_obj, &s_bang); return(x); } void tab_mul_setup(void) { tab_mul_class = class_new(gensym("tab_mul"), (t_newmethod)tab_mul_new, (t_method)tab_mul_free, sizeof(t_tab_mul), 0, A_GIMME, 0); class_addbang(tab_mul_class, (t_method)tab_mul_bang); class_addlist(tab_mul_class, (t_method)tab_mul_list); class_addmethod(tab_mul_class, (t_method)tab_mul_src1, gensym("src1"), A_DEFSYMBOL, 0); class_addmethod(tab_mul_class, (t_method)tab_mul_src2, gensym("src2"), A_DEFSYMBOL, 0); class_addmethod(tab_mul_class, (t_method)tab_mul_dst, gensym("dst"), A_DEFSYMBOL, 0); // class_sethelpsymbol(tab_mul_class, gensym("iemhelp2/tab_mul-help")); } iem_utils-v0.0.20181004/iem_tab/src/tab_ge_scalar.c0000644000175000017500000001173213303612044021762 0ustar zmoelnigzmoelnig/* For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. iem_tab written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2009 */ #include "m_pd.h" #include "iemlib.h" #include "iem_tab.h" /* -------------------------- tab_ge_scalar ------------------------------ */ /* if(x_beg_mem_src1[i] >= compare) */ /* x_beg_mem_dst[i] = 1.0f; */ /* else */ /* x_beg_mem_dst[i] += 0.0f; */ typedef struct _tab_ge_scalar { t_object x_obj; int x_size_src1; int x_size_dst; int x_offset_src1; int x_offset_dst; iemarray_t *x_beg_mem_src1; iemarray_t *x_beg_mem_dst; t_symbol *x_sym_scr1; t_symbol *x_sym_dst; } t_tab_ge_scalar; static t_class *tab_ge_scalar_class; static void tab_ge_scalar_src(t_tab_ge_scalar *x, t_symbol *s) { x->x_sym_scr1 = s; } static void tab_ge_scalar_float(t_tab_ge_scalar *x, t_floatarg compare) { int i, n; int ok_src1, ok_dst; iemarray_t *vec_src1, *vec_dst; ok_src1 = iem_tab_check_arrays(gensym("tab_ge_scalar"), x->x_sym_scr1, &x->x_beg_mem_src1, &x->x_size_src1, 0); ok_dst = iem_tab_check_arrays(gensym("tab_ge_scalar"), x->x_sym_dst, &x->x_beg_mem_dst, &x->x_size_dst, 0); if(ok_src1 && ok_dst) { if(x->x_size_src1 < x->x_size_dst) n = x->x_size_src1; else n = x->x_size_dst; vec_src1 = x->x_beg_mem_src1; vec_dst = x->x_beg_mem_dst; if(n) { t_garray *a; for(i=0; i= compare) iemarray_setfloat(vec_dst, i, 1.0f); else iemarray_setfloat(vec_dst, i, 0.0f); } outlet_bang(x->x_obj.ob_outlet); a = (t_garray *)pd_findbyclass(x->x_sym_dst, garray_class); garray_redraw(a); } } } static void tab_ge_scalar_dst(t_tab_ge_scalar *x, t_symbol *s) { x->x_sym_dst = s; } static void tab_ge_scalar_list(t_tab_ge_scalar *x, t_symbol *s, int argc, t_atom *argv) { int beg_src1, beg_dst; int i, n; int ok_src1, ok_dst; t_float compare; iemarray_t *vec_src1, *vec_dst; if((argc >= 4) && IS_A_FLOAT(argv,0) && IS_A_FLOAT(argv,1) && IS_A_FLOAT(argv,2) && IS_A_FLOAT(argv,3)) { beg_src1 = (int)atom_getintarg(0, argc, argv); beg_dst = (int)atom_getintarg(1, argc, argv); n = (int)atom_getintarg(2, argc, argv); compare = (t_float)atom_getfloatarg(3, argc, argv); if(beg_src1 < 0) beg_src1 = 0; if(beg_dst < 0) beg_dst = 0; if(n < 0) n = 0; ok_src1 = iem_tab_check_arrays(gensym("tab_ge_scalar"), x->x_sym_scr1, &x->x_beg_mem_src1, &x->x_size_src1, beg_src1+n); ok_dst = iem_tab_check_arrays(gensym("tab_ge_scalar"), x->x_sym_dst, &x->x_beg_mem_dst, &x->x_size_dst, beg_dst+n); if(ok_src1 && ok_dst) { vec_src1 = x->x_beg_mem_src1 + beg_src1; vec_dst = x->x_beg_mem_dst + beg_dst; if(n) { t_garray *a; for(i=0; i= compare) iemarray_setfloat(vec_dst, i, 1.0f); else iemarray_setfloat(vec_dst, i, 0.0f); } outlet_bang(x->x_obj.ob_outlet); a = (t_garray *)pd_findbyclass(x->x_sym_dst, garray_class); garray_redraw(a); } } } else { post("tab_ge_scalar-ERROR: list need 4 float arguments:"); post(" source1_offset + destination_offset + number_of_samples_to_compare + compare_scalar"); } } static void tab_ge_scalar_free(t_tab_ge_scalar *x) { } static void *tab_ge_scalar_new(t_symbol *s, int argc, t_atom *argv) { t_tab_ge_scalar *x = (t_tab_ge_scalar *)pd_new(tab_ge_scalar_class); t_symbol *src1, *dst; if((argc >= 2) && IS_A_SYMBOL(argv,0) && IS_A_SYMBOL(argv,1)) { src1 = (t_symbol *)atom_getsymbolarg(0, argc, argv); dst = (t_symbol *)atom_getsymbolarg(1, argc, argv); } else if((argc >= 1) && IS_A_SYMBOL(argv,0)) { src1 = (t_symbol *)atom_getsymbolarg(0, argc, argv); dst = src1; } else { post("tab_ge_scalar-ERROR: need 2 symbol arguments:"); post(" source_array_name + destination_array_name"); return(0); } x->x_sym_scr1 = src1; x->x_sym_dst = dst; outlet_new(&x->x_obj, &s_bang); return(x); } void tab_ge_scalar_setup(void) { tab_ge_scalar_class = class_new(gensym("tab_ge_scalar"), (t_newmethod)tab_ge_scalar_new, (t_method)tab_ge_scalar_free, sizeof(t_tab_ge_scalar), 0, A_GIMME, 0); class_addfloat(tab_ge_scalar_class, (t_method)tab_ge_scalar_float); class_addlist(tab_ge_scalar_class, (t_method)tab_ge_scalar_list); class_addmethod(tab_ge_scalar_class, (t_method)tab_ge_scalar_src, gensym("src1"), A_DEFSYMBOL, 0); class_addmethod(tab_ge_scalar_class, (t_method)tab_ge_scalar_src, gensym("src"), A_DEFSYMBOL, 0); class_addmethod(tab_ge_scalar_class, (t_method)tab_ge_scalar_dst, gensym("dst"), A_DEFSYMBOL, 0); // class_sethelpsymbol(tab_ge_scalar_class, gensym("iemhelp2/tab_ge_scalar-help")); } iem_utils-v0.0.20181004/iem_tab/src/iem_tab.dsw0000644000175000017500000000106512630366350021175 0ustar zmoelnigzmoelnigMicrosoft Developer Studio Workspace File, Format Version 6.00 # WARNUNG: DIESE ARBEITSBEREICHSDATEI DARF NICHT BEARBEITET ODER GELSCHT WERDEN! ############################################################################### Project: "iem_tab"=.\iem_tab.dsp - Package Owner=<4> Package=<5> {{{ }}} Package=<4> {{{ }}} ############################################################################### Global: Package=<5> {{{ }}} Package=<3> {{{ }}} ############################################################################### iem_utils-v0.0.20181004/iem_tab/src/tab_copy.c0000644000175000017500000001042213303612044021007 0ustar zmoelnigzmoelnig/* For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. iem_tab written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2009 */ /* x_beg_mem_dst[i] = x_beg_mem_src1[i] */ #include "m_pd.h" #include "iemlib.h" #include "iem_tab.h" /* -------------------------- tab_copy ------------------------------ */ typedef struct _tab_copy { t_object x_obj; int x_size_src1; int x_size_dst; int x_offset_src1; int x_offset_dst; iemarray_t *x_beg_mem_src1; iemarray_t *x_beg_mem_dst; t_symbol *x_sym_scr1; t_symbol *x_sym_dst; } t_tab_copy; static t_class *tab_copy_class; static void tab_copy_src(t_tab_copy *x, t_symbol *s) { x->x_sym_scr1 = s; } static void tab_copy_dst(t_tab_copy *x, t_symbol *s) { x->x_sym_dst = s; } static void tab_copy_bang(t_tab_copy *x) { int i, n; int ok_src, ok_dst; iemarray_t *vec_src, *vec_dst; ok_src = iem_tab_check_arrays(gensym("tab_copy"), x->x_sym_scr1, &x->x_beg_mem_src1, &x->x_size_src1, 0); ok_dst = iem_tab_check_arrays(gensym("tab_copy"), x->x_sym_dst, &x->x_beg_mem_dst, &x->x_size_dst, 0); if(ok_src && ok_dst) { if(x->x_size_src1 < x->x_size_dst) n = x->x_size_src1; else n = x->x_size_dst; vec_src = x->x_beg_mem_src1; vec_dst = x->x_beg_mem_dst; if(n) { t_garray *a; for(i=0; ix_obj.ob_outlet); a = (t_garray *)pd_findbyclass(x->x_sym_dst, garray_class); garray_redraw(a); } } } static void tab_copy_list(t_tab_copy *x, t_symbol *s, int argc, t_atom *argv) { int beg_src, beg_dst; int i, n; int ok_src, ok_dst; iemarray_t *vec_src, *vec_dst; if((argc >= 3) && IS_A_FLOAT(argv,0) && IS_A_FLOAT(argv,1) && IS_A_FLOAT(argv,2)) { beg_src = (int)atom_getintarg(0, argc, argv); beg_dst = (int)atom_getintarg(1, argc, argv); n = (int)atom_getintarg(2, argc, argv); if(beg_src < 0) beg_src = 0; if(beg_dst < 0) beg_dst = 0; if(n < 0) n = 0; ok_src = iem_tab_check_arrays(gensym("tab_copy"), x->x_sym_scr1, &x->x_beg_mem_src1, &x->x_size_src1, beg_src+n); ok_dst = iem_tab_check_arrays(gensym("tab_copy"), x->x_sym_dst, &x->x_beg_mem_dst, &x->x_size_dst, beg_dst+n); if(ok_src && ok_dst) { vec_src = x->x_beg_mem_src1 + beg_src; vec_dst = x->x_beg_mem_dst + beg_dst; if(n) { t_garray *a; for(i=0; ix_obj.ob_outlet); a = (t_garray *)pd_findbyclass(x->x_sym_dst, garray_class); garray_redraw(a); } } } else { post("tab_copy-ERROR: list need 3 float arguments:"); post(" source_offset + destination_offset + number_of_samples_to_copy"); } } static void tab_copy_free(t_tab_copy *x) { } static void *tab_copy_new(t_symbol *s, int argc, t_atom *argv) { t_tab_copy *x = (t_tab_copy *)pd_new(tab_copy_class); t_symbol *src, *dst; if((argc >= 2) && IS_A_SYMBOL(argv,0) && IS_A_SYMBOL(argv,1)) { src = (t_symbol *)atom_getsymbolarg(0, argc, argv); dst = (t_symbol *)atom_getsymbolarg(1, argc, argv); } else if((argc >= 1) && IS_A_SYMBOL(argv,0)) { src = (t_symbol *)atom_getsymbolarg(0, argc, argv); dst = src; } else { post("tab_copy-ERROR: need 2 symbols arguments:"); post(" source_array_name + destination_array_name"); return(0); } x->x_sym_scr1 = src; x->x_sym_dst = dst; outlet_new(&x->x_obj, &s_bang); return(x); } void tab_copy_setup(void) { tab_copy_class = class_new(gensym("tab_copy"), (t_newmethod)tab_copy_new, (t_method)tab_copy_free, sizeof(t_tab_copy), 0, A_GIMME, 0); class_addbang(tab_copy_class, (t_method)tab_copy_bang); class_addlist(tab_copy_class, (t_method)tab_copy_list); class_addmethod(tab_copy_class, (t_method)tab_copy_src, gensym("src"), A_DEFSYMBOL, 0); class_addmethod(tab_copy_class, (t_method)tab_copy_src, gensym("src1"), A_DEFSYMBOL, 0); class_addmethod(tab_copy_class, (t_method)tab_copy_dst, gensym("dst"), A_DEFSYMBOL, 0); // class_sethelpsymbol(tab_copy_class, gensym("iemhelp2/tab_copy-help")); } iem_utils-v0.0.20181004/iem_tab/src/tab_sub.c0000644000175000017500000001245213303612044020633 0ustar zmoelnigzmoelnig/* For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. iem_tab written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2009 */ #include "m_pd.h" #include "iemlib.h" #include "iem_tab.h" /* -------------------------- tab_sub ------------------------------ */ /* x_beg_mem_dst[i] = x_beg_mem_src1[i] - x_offset_src2[i] */ typedef struct _tab_sub { t_object x_obj; int x_size_src1; int x_size_src2; int x_size_dst; int x_offset_src1; int x_offset_src2; int x_offset_dst; iemarray_t *x_beg_mem_src1; iemarray_t *x_beg_mem_src2; iemarray_t *x_beg_mem_dst; t_symbol *x_sym_scr1; t_symbol *x_sym_scr2; t_symbol *x_sym_dst; } t_tab_sub; static t_class *tab_sub_class; static void tab_sub_src1(t_tab_sub *x, t_symbol *s) { x->x_sym_scr1 = s; } static void tab_sub_src2(t_tab_sub *x, t_symbol *s) { x->x_sym_scr2 = s; } static void tab_sub_dst(t_tab_sub *x, t_symbol *s) { x->x_sym_dst = s; } static void tab_sub_bang(t_tab_sub *x) { int i, n; int ok_src1, ok_src2, ok_dst; iemarray_t *vec_src1, *vec_src2, *vec_dst; ok_src1 = iem_tab_check_arrays(gensym("tab_sub"), x->x_sym_scr1, &x->x_beg_mem_src1, &x->x_size_src1, 0); ok_src2 = iem_tab_check_arrays(gensym("tab_sub"), x->x_sym_scr2, &x->x_beg_mem_src2, &x->x_size_src2, 0); ok_dst = iem_tab_check_arrays(gensym("tab_sub"), x->x_sym_dst, &x->x_beg_mem_dst, &x->x_size_dst, 0); if(ok_src1 && ok_src2 && ok_dst) { if(x->x_size_src1 < x->x_size_dst) n = x->x_size_src1; else n = x->x_size_dst; if(x->x_size_src2 < n) n = x->x_size_src2; vec_src1 = x->x_beg_mem_src1; vec_src2 = x->x_beg_mem_src2; vec_dst = x->x_beg_mem_dst; if(n) { t_garray *a; for(i=0; ix_obj.ob_outlet); a = (t_garray *)pd_findbyclass(x->x_sym_dst, garray_class); garray_redraw(a); } } } static void tab_sub_list(t_tab_sub *x, t_symbol *s, int argc, t_atom *argv) { int beg_src1, beg_src2, beg_dst; int i, n; int ok_src1, ok_src2, ok_dst; iemarray_t *vec_src1, *vec_src2, *vec_dst; if((argc >= 4) && IS_A_FLOAT(argv,0) && IS_A_FLOAT(argv,1) && IS_A_FLOAT(argv,2) && IS_A_FLOAT(argv,3)) { beg_src1 = (int)atom_getintarg(0, argc, argv); beg_src2 = (int)atom_getintarg(1, argc, argv); beg_dst = (int)atom_getintarg(2, argc, argv); n = (int)atom_getintarg(3, argc, argv); if(beg_src1 < 0) beg_src1 = 0; if(beg_src2 < 0) beg_src2 = 0; if(beg_dst < 0) beg_dst = 0; if(n < 0) n = 0; ok_src1 = iem_tab_check_arrays(gensym("tab_sub"), x->x_sym_scr1, &x->x_beg_mem_src1, &x->x_size_src1, beg_src1+n); ok_src2 = iem_tab_check_arrays(gensym("tab_sub"), x->x_sym_scr2, &x->x_beg_mem_src2, &x->x_size_src2, beg_src2+n); ok_dst = iem_tab_check_arrays(gensym("tab_sub"), x->x_sym_dst, &x->x_beg_mem_dst, &x->x_size_dst, beg_dst+n); if(ok_src1 && ok_src2 && ok_dst) { vec_src1 = x->x_beg_mem_src1 + beg_src1; vec_src2 = x->x_beg_mem_src2 + beg_src2; vec_dst = x->x_beg_mem_dst + beg_dst; if(n) { t_garray *a; for(i=0; ix_obj.ob_outlet); a = (t_garray *)pd_findbyclass(x->x_sym_dst, garray_class); garray_redraw(a); } } } else { post("tab_sub-ERROR: list need 4 float arguments:"); post(" source1_offset + source2_offset + destination_offset + number_of_samples_to_sub"); } } static void tab_sub_free(t_tab_sub *x) { } static void *tab_sub_new(t_symbol *s, int argc, t_atom *argv) { t_tab_sub *x = (t_tab_sub *)pd_new(tab_sub_class); t_symbol *src1, *src2, *dst; if((argc >= 3) && IS_A_SYMBOL(argv,0) && IS_A_SYMBOL(argv,1) && IS_A_SYMBOL(argv,2)) { src1 = (t_symbol *)atom_getsymbolarg(0, argc, argv); src2 = (t_symbol *)atom_getsymbolarg(1, argc, argv); dst = (t_symbol *)atom_getsymbolarg(2, argc, argv); } else if((argc >= 2) && IS_A_SYMBOL(argv,0) && IS_A_SYMBOL(argv,1)) { src1 = (t_symbol *)atom_getsymbolarg(0, argc, argv); dst = src1; src2 = (t_symbol *)atom_getsymbolarg(1, argc, argv); } else { post("tab_sub-ERROR: need 3 symbols arguments:"); post(" source1_array_name + source2_array_name + destination_array_name"); return(0); } x->x_sym_scr1 = src1; x->x_sym_scr2 = src2; x->x_sym_dst = dst; outlet_new(&x->x_obj, &s_bang); return(x); } void tab_sub_setup(void) { tab_sub_class = class_new(gensym("tab_sub"), (t_newmethod)tab_sub_new, (t_method)tab_sub_free, sizeof(t_tab_sub), 0, A_GIMME, 0); class_addbang(tab_sub_class, (t_method)tab_sub_bang); class_addlist(tab_sub_class, (t_method)tab_sub_list); class_addmethod(tab_sub_class, (t_method)tab_sub_src1, gensym("src1"), A_DEFSYMBOL, 0); class_addmethod(tab_sub_class, (t_method)tab_sub_src2, gensym("src2"), A_DEFSYMBOL, 0); class_addmethod(tab_sub_class, (t_method)tab_sub_dst, gensym("dst"), A_DEFSYMBOL, 0); // class_sethelpsymbol(tab_sub_class, gensym("iemhelp2/tab_sub-help")); } iem_utils-v0.0.20181004/iem_tab/tab_lt_scalar-help.pd0000644000175000017500000000460512630366350022337 0ustar zmoelnigzmoelnig#N canvas 22 55 884 588 10; #N canvas 0 0 450 300 graph1 0; #X array src 100 float 1; #A 0 -0.5 -0.5 -0.5 -0.5 -0.5 -0.5 -0.5 -0.5 -0.5 -0.485714 -0.457143 -0.4 -0.285713 -0.0571409 0.157146 0.328575 0.442861 0.557148 0.628577 0.714292 0.800006 0.85715 0.885721 0.885721 0.871435 0.842864 0.757149 0.557148 0.41429 0.257146 -0.0142835 -0.314285 -0.528572 -0.714287 -0.757145 -0.757145 -0.757145 -0.742859 -0.742859 -0.728573 -0.714287 -0.685715 -0.657144 -0.585715 -0.528572 -0.4 -0.242856 -0.0428551 0.157146 0.342861 0.51429 0.728577 0.800006 0.828578 0.828578 0.828578 0.828578 0.800006 0.771435 0.714292 0.571433 0.41429 0.242861 0.0857169 -0.0571409 -0.242856 -0.385714 -0.542858 -0.685716 -0.757145 -0.800002 -0.828574 -0.828574 -0.814288 -0.800002 -0.785716 -0.757145 -0.728573 -0.67143 -0.585715 -0.471429 -0.271428 -0.0857125 0.114288 0.228575 0.314289 0.385718 0.414285 0.428571 0.457143 0.471428 0.485714 0.485714 0.5 0.5 0.5 0.5 0.5 0.5 0.5; #X coords 0 1 99 -1 200 140 1; #X restore 527 116 graph; #N canvas 0 0 450 300 graph1 0; #X array dst 100 float 0; #X coords 0 1 99 -1 200 140 1; #X restore 527 325 graph; #X obj 61 106 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X obj 59 370 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X msg 178 272 dst dst; #X msg 129 249 src src; #X msg 47 36 0.5; #X msg 82 37 -0.5; #X text 201 332 1.arg: source-name; #X text 201 345 2.arg: destination-name; #X text 31 163 list of 4 floats:; #X text 78 475 IEM KUG; #X text 62 463 musil; #X text 92 463 @; #X text 98 463 iem.at; #X text 61 485 Graz \, Austria; #X text 13 452 (c) Thomas Musil 2000 - 2006; #X text 224 318 initial arguments:; #X text 75 351 output; #X text 229 272 xxx : change destination name; #X text 218 86 the minimum of both array lengths); #X text 182 248 xxx : change source name; #X text 42 179 1.) src onset; #X text 42 190 2.) dst onset; #X text 42 201 3.) n samples to compare; #X text 42 210 4.) compared scalar value; #X text 205 72 (the number of samples which were compared are:; #X text 12 3 tab_lt_scalar; #X text 129 29 compare "less than" the src-array with this scalar to dst-array; #X obj 59 331 tab_lt_scalar src dst; #X msg 48 228 0 0 100 0.5; #X obj 61 78 tab_lt_scalar src dst; #X connect 4 0 29 0; #X connect 5 0 29 0; #X connect 6 0 31 0; #X connect 7 0 31 0; #X connect 29 0 3 0; #X connect 30 0 29 0; #X connect 31 0 2 0; iem_utils-v0.0.20181004/iem_tab/tab_cross_corr-help.pd0000644000175000017500000000635012630366350022550 0ustar zmoelnigzmoelnig#N canvas 107 80 1053 581 10; #X obj 55 51 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X obj 55 92 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #N canvas 0 22 478 328 init_tables 0; #X obj 45 113 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 1 ; #X obj 239 151 noise~; #X obj 114 193 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X obj 134 234 tabwrite~ ref; #X obj 238 234 tabwrite~ meas; #X obj 149 15 inlet; #X obj 149 37 t b; #X obj 188 99 del 100; #X msg 53 82 1; #X msg 188 122 0; #X obj 167 64 del 100; #N canvas 0 22 238 185 dsp 0; #X msg 28 63 \; pd dsp \$1; #X obj 28 34 inlet; #X connect 1 0 0 0; #X restore 45 139 pd dsp; #N canvas 448 145 462 312 delay 0; #X obj 75 169 outlet~; #X obj 75 23 inlet~; #N canvas 0 22 458 308 del1 0; #X obj 75 169 outlet~; #X obj 75 23 inlet~; #X obj 105 101 delwrite~ \$0delz 5; #X connect 1 0 2 0; #X connect 1 0 0 0; #X restore 75 66 pd del1; #N canvas 0 22 458 308 del2 0; #X obj 75 169 outlet~; #X obj 75 23 inlet~; #X obj 75 122 delread~ \$0delz 1.31; #X connect 2 0 0 0; #X restore 75 116 pd del2; #X connect 1 0 2 0; #X connect 2 0 3 0; #X connect 3 0 0 0; #X restore 136 190 pd delay; #X connect 0 0 11 0; #X connect 1 0 4 0; #X connect 1 0 12 0; #X connect 2 0 3 0; #X connect 2 0 4 0; #X connect 5 0 6 0; #X connect 6 0 8 0; #X connect 6 0 10 0; #X connect 7 0 9 0; #X connect 8 0 0 0; #X connect 9 0 0 0; #X connect 10 0 7 0; #X connect 10 0 2 0; #X connect 12 0 3 0; #X restore 636 311 pd init_tables; #X obj 636 266 loadbang; #N canvas 0 22 450 300 (subpatch) 0; #X array ref 200 float 0; #X coords 0 1 199 -1 199 100 1; #X restore 483 20 graph; #N canvas 0 22 450 300 (subpatch) 0; #X array meas 100 float 0; #X coords 0 1 99 -1 99 100 1; #X restore 541 140 graph; #N canvas 0 22 450 300 (subpatch) 0; #X array cross_corr 100 float 0; #X coords 0 1 99 -1 99 100 1; #X restore 483 260 graph; #X text 94 459 IEM KUG; #X text 73 447 musil; #X text 108 447 @; #X text 116 447 iem.at; #X text 77 469 Graz \, Austria; #X text 380 381 initial arguments:; #X text 12 7 tab_cross_corr; #X text 77 37 correlates the 2nd array "measured" with the 1st array "reference" to the destination array "cross_corr"; #X text 78 92 (the number of samples which were correlated are: the positive minimum of the difference (src1-src2) and dst array lengths) ; #X text 358 393 1.arg: source1-name; #X text 358 405 2.arg: source2-name; #X text 358 417 3.arg: destination-name; #X text 533 452 calculation in ms; #X text 358 441 5.arg: delay time per destination sample; #X msg 63 257 bang; #X msg 80 278 time 1; #X msg 135 361 dst cross_corr; #X msg 124 340 src2 meas; #X msg 109 319 src1 ref; #X obj 636 290 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X msg 97 297 factor 0.02; #X obj 63 389 tab_cross_corr ref meas cross_corr 0.02 1; #X text 62 155 !! array length of src1 > array length of src2 !!; #X text 29 436 (c) Thomas Musil 2000 - 2009; #X obj 55 70 tab_cross_corr ref meas cross_corr 0.04 1; #X text 358 429 4.arg: scaling factor; #X connect 0 0 31 0; #X connect 3 0 26 0; #X connect 21 0 28 0; #X connect 22 0 28 0; #X connect 23 0 28 0; #X connect 24 0 28 0; #X connect 25 0 28 0; #X connect 26 0 2 0; #X connect 27 0 28 0; #X connect 31 0 1 0; iem_utils-v0.0.20181004/iem_tab/tab_fft-help.pd0000644000175000017500000002446512630366350021160 0ustar zmoelnigzmoelnig#N canvas 29 22 965 544 10; #N canvas 0 22 450 300 (subpatch) 0; #X array src_re 100 float 0; #X coords 0 1 99 -1 199 100 1; #X restore 694 10 graph; #N canvas 0 22 450 300 (subpatch) 0; #X array dst_re 100 float 0; #X coords 0 1 99 -1 199 100 1; #X restore 694 239 graph; #X obj 24 47 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X obj 24 122 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X obj 62 371 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #N canvas 0 22 450 300 (subpatch) 0; #X array dst_im 100 float 0; #X coords 0 1 99 -1 199 100 1; #X restore 694 353 graph; #X msg 103 276 dst_re dst_re; #X msg 118 299 dst_im dst_im; #X msg 139 322 fftsize 64; #X floatatom 473 22 5 0 63 0 - - -; #X msg 546 341 \; dst_re const 0 \; dst_im const 0; #X text 10 0 tab_fft; #X text 93 -1 complex FTT with arrays; #X text 102 464 IEM KUG; #X text 81 452 musil; #X text 116 452 @; #X text 124 452 iem.at; #X text 85 474 Graz \, Austria; #N canvas 0 22 474 324 generate_a_dirac 0; #X obj 61 62 clip 0 63; #X obj 61 32 inlet; #X msg 60 103 \; src_re const 0 \; src_re \$1 1; #X connect 0 0 2 0; #X connect 1 0 0 0; #X restore 474 41 pd generate_a_dirac; #X floatatom 514 22 5 -32 32 0 - - -; #N canvas 0 22 531 484 generate_a_cos 0; #X obj 120 18 inlet; #X obj 219 176 t f f; #X obj 219 211 / 32; #X obj 219 232 * 3.14159; #X obj 219 283 cos; #X obj 219 257 * 8; #X obj 219 308 / 32; #X obj 219 127 t b f; #X obj 219 331 tabwrite src_re; #X obj 120 43 moses 0; #X obj 39 178 t f f; #X obj 39 213 / 32; #X obj 39 234 * 3.14159; #X obj 39 285 cos; #X obj 39 259 * 8; #X obj 39 129 t b f; #X obj 39 333 tabwrite src_re; #X obj 90 70 * -1; #X obj 39 310 / -32; #N canvas 193 158 454 304 counter 0; #X obj 108 25 inlet; #X obj 109 163 outlet; #X obj 109 133 f; #X obj 142 133 + 1; #X obj 108 50 t b b; #X msg 154 76 0; #X msg 109 75 64; #X obj 110 98 until; #X connect 0 0 4 0; #X connect 2 0 3 0; #X connect 2 0 1 0; #X connect 3 0 2 1; #X connect 4 0 6 0; #X connect 4 1 5 0; #X connect 5 0 2 1; #X connect 6 0 7 0; #X connect 7 0 2 0; #X restore 219 151 pd counter; #N canvas 193 158 454 304 counter 0; #X obj 108 25 inlet; #X obj 109 163 outlet; #X obj 109 133 f; #X obj 142 133 + 1; #X obj 108 50 t b b; #X msg 154 76 0; #X msg 109 75 64; #X obj 110 98 until; #X connect 0 0 4 0; #X connect 2 0 3 0; #X connect 2 0 1 0; #X connect 3 0 2 1; #X connect 4 0 6 0; #X connect 4 1 5 0; #X connect 5 0 2 1; #X connect 6 0 7 0; #X connect 7 0 2 0; #X restore 38 154 pd counter; #X obj 219 106 clip 0 32; #X obj 39 108 clip 0 32; #X connect 0 0 9 0; #X connect 1 0 2 0; #X connect 1 1 8 1; #X connect 2 0 3 0; #X connect 3 0 5 0; #X connect 4 0 6 0; #X connect 5 0 4 0; #X connect 6 0 8 0; #X connect 7 0 19 0; #X connect 7 1 5 1; #X connect 9 0 17 0; #X connect 9 1 21 0; #X connect 10 0 11 0; #X connect 10 1 16 1; #X connect 11 0 12 0; #X connect 12 0 14 0; #X connect 13 0 18 0; #X connect 14 0 13 0; #X connect 15 0 20 0; #X connect 15 1 14 1; #X connect 17 0 22 0; #X connect 18 0 16 0; #X connect 19 0 1 0; #X connect 20 0 10 0; #X connect 21 0 7 0; #X connect 22 0 15 0; #X restore 514 61 pd generate_a_cos; #X floatatom 555 22 5 -31 31 0 - - -; #N canvas 0 22 491 415 generate_a_sin 0; #X obj 102 37 inlet; #X obj 246 182 t f f; #X obj 246 217 / 32; #X obj 246 238 * 3.14159; #X obj 246 263 * 8; #X obj 246 314 / 32; #X obj 246 112 clip 0 31; #X obj 246 133 t b f; #X obj 246 337 tabwrite src_re; #X obj 246 289 sin; #X obj 54 180 t f f; #X obj 54 215 / 32; #X obj 54 236 * 3.14159; #X obj 54 261 * 8; #X obj 54 110 clip 0 31; #X obj 54 132 t b f; #X obj 54 335 tabwrite src_re; #X obj 54 287 sin; #X obj 54 312 / -32; #X obj 102 60 moses 0; #X obj 54 88 * -1; #N canvas 193 158 454 304 counter 0; #X obj 108 25 inlet; #X obj 109 163 outlet; #X obj 109 133 f; #X obj 142 133 + 1; #X obj 108 50 t b b; #X msg 154 76 0; #X msg 109 75 64; #X obj 110 98 until; #X connect 0 0 4 0; #X connect 2 0 3 0; #X connect 2 0 1 0; #X connect 3 0 2 1; #X connect 4 0 6 0; #X connect 4 1 5 0; #X connect 5 0 2 1; #X connect 6 0 7 0; #X connect 7 0 2 0; #X restore 54 156 pd counter; #N canvas 193 158 454 304 counter 0; #X obj 108 25 inlet; #X obj 109 163 outlet; #X obj 109 133 f; #X obj 142 133 + 1; #X obj 108 50 t b b; #X msg 154 76 0; #X msg 109 75 64; #X obj 110 98 until; #X connect 0 0 4 0; #X connect 2 0 3 0; #X connect 2 0 1 0; #X connect 3 0 2 1; #X connect 4 0 6 0; #X connect 4 1 5 0; #X connect 5 0 2 1; #X connect 6 0 7 0; #X connect 7 0 2 0; #X restore 246 156 pd counter; #X connect 0 0 19 0; #X connect 1 0 2 0; #X connect 1 1 8 1; #X connect 2 0 3 0; #X connect 3 0 4 0; #X connect 4 0 9 0; #X connect 5 0 8 0; #X connect 6 0 7 0; #X connect 7 0 22 0; #X connect 7 1 4 1; #X connect 9 0 5 0; #X connect 10 0 11 0; #X connect 10 1 16 1; #X connect 11 0 12 0; #X connect 12 0 13 0; #X connect 13 0 17 0; #X connect 14 0 15 0; #X connect 15 0 21 0; #X connect 15 1 13 1; #X connect 17 0 18 0; #X connect 18 0 16 0; #X connect 19 0 20 0; #X connect 19 1 6 0; #X connect 20 0 14 0; #X connect 21 0 10 0; #X connect 22 0 1 0; #X restore 555 82 pd generate_a_sin; #X text 299 365 initial arguments:; #X text 45 56 calculates a complex fourier transformation of complex src-arrays to complex dst-arrays; #X text 37 147 list of 4 floats:; #X text 49 178 3.) dst_re-onset; #X text 49 188 4.) dst_im-onset; #X text 49 158 1.) src_re-onset; #X text 49 168 2.) src_im-onset; #X msg 62 207 20 20 30 30; #X text 259 412 4.arg: imag_destination-name; #X text 259 400 3.arg: real_destination-name; #X text 259 389 2.arg: imag_source-name; #X text 259 378 1.arg: real_source-name; #X text 259 424 5.arg: fftsize; #N canvas 0 22 450 300 (subpatch) 0; #X array src_im 100 float 0; #X coords 0 1 99 -1 199 100 1; #X restore 694 124 graph; #X obj 24 94 tab_fft src_re src_im dst_re dst_im 64; #X msg 76 230 src_re src_re; #X msg 90 253 src_im src_im; #X obj 62 348 tab_fft src_re src_im dst_re dst_im 64; #X msg 546 283 \; src_re const 0 \; src_im const 0; #X floatatom 474 132 5 0 63 0 - - -; #N canvas 0 22 478 328 generate_a_dirac 0; #X obj 61 62 clip 0 63; #X obj 61 32 inlet; #X msg 62 88 \; src_im const 0 \; src_im \$1 1; #X connect 0 0 2 0; #X connect 1 0 0 0; #X restore 474 151 pd generate_a_dirac; #X floatatom 514 132 5 -32 32 0 - - -; #N canvas 0 22 495 419 generate_a_cos 0; #X obj 120 18 inlet; #X obj 219 176 t f f; #X obj 219 211 / 32; #X obj 219 232 * 3.14159; #X obj 219 283 cos; #X obj 219 257 * 8; #X obj 219 308 / 32; #X obj 219 127 t b f; #X obj 120 43 moses 0; #X obj 39 178 t f f; #X obj 39 213 / 32; #X obj 39 234 * 3.14159; #X obj 39 285 cos; #X obj 39 259 * 8; #X obj 39 129 t b f; #X obj 90 70 * -1; #X obj 39 310 / -32; #X obj 40 334 tabwrite src_im; #X obj 220 331 tabwrite src_im; #N canvas 193 158 454 304 counter 0; #X obj 108 25 inlet; #X obj 109 163 outlet; #X obj 109 133 f; #X obj 142 133 + 1; #X obj 108 50 t b b; #X msg 154 76 0; #X msg 109 75 64; #X obj 110 98 until; #X connect 0 0 4 0; #X connect 2 0 3 0; #X connect 2 0 1 0; #X connect 3 0 2 1; #X connect 4 0 6 0; #X connect 4 1 5 0; #X connect 5 0 2 1; #X connect 6 0 7 0; #X connect 7 0 2 0; #X restore 39 153 pd counter; #N canvas 193 158 454 304 counter 0; #X obj 108 25 inlet; #X obj 109 163 outlet; #X obj 109 133 f; #X obj 142 133 + 1; #X obj 108 50 t b b; #X msg 154 76 0; #X msg 109 75 64; #X obj 110 98 until; #X connect 0 0 4 0; #X connect 2 0 3 0; #X connect 2 0 1 0; #X connect 3 0 2 1; #X connect 4 0 6 0; #X connect 4 1 5 0; #X connect 5 0 2 1; #X connect 6 0 7 0; #X connect 7 0 2 0; #X restore 219 153 pd counter; #X obj 218 106 clip 0 32; #X obj 39 108 clip 0 32; #X connect 0 0 8 0; #X connect 1 0 2 0; #X connect 1 1 18 1; #X connect 2 0 3 0; #X connect 3 0 5 0; #X connect 4 0 6 0; #X connect 5 0 4 0; #X connect 6 0 18 0; #X connect 7 0 20 0; #X connect 7 1 5 1; #X connect 8 0 15 0; #X connect 8 1 21 0; #X connect 9 0 10 0; #X connect 9 1 17 1; #X connect 10 0 11 0; #X connect 11 0 13 0; #X connect 12 0 16 0; #X connect 13 0 12 0; #X connect 14 0 19 0; #X connect 14 1 13 1; #X connect 15 0 22 0; #X connect 16 0 17 0; #X connect 19 0 9 0; #X connect 20 0 1 0; #X connect 21 0 7 0; #X connect 22 0 14 0; #X restore 514 171 pd generate_a_cos; #X floatatom 555 132 5 -31 31 0 - - -; #N canvas 0 22 491 415 generate_a_sin 0; #X obj 102 37 inlet; #X obj 246 182 t f f; #X obj 246 217 / 32; #X obj 246 238 * 3.14159; #X obj 246 263 * 8; #X obj 246 314 / 32; #X obj 246 112 clip 0 31; #X obj 246 133 t b f; #X obj 246 289 sin; #X obj 54 180 t f f; #X obj 54 215 / 32; #X obj 54 236 * 3.14159; #X obj 54 261 * 8; #X obj 54 110 clip 0 31; #X obj 54 131 t b f; #X obj 54 287 sin; #X obj 54 312 / -32; #X obj 102 60 moses 0; #X obj 54 88 * -1; #X obj 246 337 tabwrite src_im; #X obj 54 336 tabwrite src_im; #N canvas 193 158 454 304 counter 0; #X obj 108 25 inlet; #X obj 109 163 outlet; #X obj 109 133 f; #X obj 142 133 + 1; #X obj 108 50 t b b; #X msg 154 76 0; #X msg 109 75 64; #X obj 110 98 until; #X connect 0 0 4 0; #X connect 2 0 3 0; #X connect 2 0 1 0; #X connect 3 0 2 1; #X connect 4 0 6 0; #X connect 4 1 5 0; #X connect 5 0 2 1; #X connect 6 0 7 0; #X connect 7 0 2 0; #X restore 54 156 pd counter; #N canvas 193 158 454 304 counter 0; #X obj 108 25 inlet; #X obj 109 163 outlet; #X obj 109 133 f; #X obj 142 133 + 1; #X obj 108 50 t b b; #X msg 154 76 0; #X msg 109 75 64; #X obj 110 98 until; #X connect 0 0 4 0; #X connect 2 0 3 0; #X connect 2 0 1 0; #X connect 3 0 2 1; #X connect 4 0 6 0; #X connect 4 1 5 0; #X connect 5 0 2 1; #X connect 6 0 7 0; #X connect 7 0 2 0; #X restore 246 156 pd counter; #X connect 0 0 17 0; #X connect 1 0 2 0; #X connect 1 1 19 1; #X connect 2 0 3 0; #X connect 3 0 4 0; #X connect 4 0 8 0; #X connect 5 0 19 0; #X connect 6 0 7 0; #X connect 7 0 22 0; #X connect 7 1 4 1; #X connect 8 0 5 0; #X connect 9 0 10 0; #X connect 9 1 20 1; #X connect 10 0 11 0; #X connect 11 0 12 0; #X connect 12 0 15 0; #X connect 13 0 14 0; #X connect 14 0 21 0; #X connect 14 1 12 1; #X connect 15 0 16 0; #X connect 16 0 20 0; #X connect 17 0 18 0; #X connect 17 1 6 0; #X connect 18 0 13 0; #X connect 21 0 9 0; #X connect 22 0 1 0; #X restore 555 192 pd generate_a_sin; #X text 37 441 (c) Thomas Musil 2000 - 2009; #X connect 2 0 37 0; #X connect 6 0 40 0; #X connect 7 0 40 0; #X connect 8 0 40 0; #X connect 9 0 18 0; #X connect 19 0 20 0; #X connect 21 0 22 0; #X connect 30 0 40 0; #X connect 37 0 3 0; #X connect 38 0 40 0; #X connect 39 0 40 0; #X connect 40 0 4 0; #X connect 42 0 43 0; #X connect 44 0 45 0; #X connect 46 0 47 0; iem_utils-v0.0.20181004/iem_tab/tab_min_max-help.pd0000644000175000017500000000460612630366350022024 0ustar zmoelnigzmoelnig#N canvas 82 83 782 436 10; #N canvas 0 0 450 300 graph1 0; #X array src 100 float 1; #A 0 -0.442858 -0.414287 -0.385715 -0.342858 -0.314287 -0.257144 -0.128572 -0.0428573 0.128572 0.228572 0.285715 0.328572 0.400001 0.414287 0.457144 0.457144 0.442858 0.385715 0.314287 0.257144 0.214286 0.1 0.0428572 -0.0142858 -0.0428573 -0.114286 -0.142858 -0.200001 -0.242858 -0.285715 -0.328572 -0.342858 -0.37143 -0.385715 -0.414287 -0.414287 -0.414287 -0.414287 -0.400001 -0.357144 -0.314287 -0.257144 -0.185715 -0.0714288 0.0142857 0.0571429 0.185715 0.185715 0.200001 0.214286 0.214286 0.214286 0.228572 0.228572 0.214286 0.200001 0.185715 0.171429 0.142857 0.1 0.114286 0.0714285 -0.071429 -0.242858 -0.300001 -0.328573 -0.357144 -0.37143 -0.385715 -0.400001 -0.442858 -0.457144 -0.47143 -0.457144 -0.428573 -0.400001 -0.378573 -0.328572 -0.271429 -0.242858 -0.200001 -0.128572 -0.0428574 -0.0285717 0.0142858 0.114286 0.128572 0.185715 0.214286 0.257144 0.285715 0.314287 0.342858 0.357144 0.357144 0.357144 0.357144 0.357144 0.342858 0.328572; #X coords 0 1 99 -1 200 140 1; #X restore 534 20 graph; #X obj 61 34 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X obj 61 109 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X obj 59 297 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X text 205 273 1.arg: source-name; #X msg 101 216 src src; #X floatatom 103 106 5 0 0 0 - - -; #X floatatom 146 107 5 0 0 0 - - -; #X text 154 121 max; #X floatatom 101 323 5 0 0 0 - - -; #X floatatom 144 339 5 0 0 0 - - -; #X msg 59 196 35 50; #X text 75 387 IEM KUG; #X text 59 375 musil; #X text 89 375 @; #X text 95 375 iem.at; #X text 58 397 Graz \, Austria; #X text 10 364 (c) Thomas Musil 2000 - 2006; #X text 229 261 initial arguments:; #X text 65 283 output; #X text 152 216 xxx : change source name; #X text 43 153 list of 2 floats:; #X text 55 163 1.) src onset; #X text 151 322 maximum value output; #X text 11 9 tab_min_max; #X text 85 32 calculate minimum and maximum element value of array; #X text 55 174 2.) n samples to calculate minimum and maximum; #X text 110 120 min; #X obj 61 81 tab_min_max src; #X text 108 304 minimum value output; #X obj 59 265 tab_min_max src; #X connect 1 0 28 0; #X connect 5 0 30 0; #X connect 11 0 30 0; #X connect 28 0 2 0; #X connect 28 1 6 0; #X connect 28 2 7 0; #X connect 30 0 3 0; #X connect 30 1 9 0; #X connect 30 2 10 0; iem_utils-v0.0.20181004/iem_tab/tab_carth2polar-help.pd0000644000175000017500000000512712630366350022614 0ustar zmoelnigzmoelnig#N canvas 132 30 866 532 10; #N canvas 0 22 450 300 (subpatch) 0; #X array real 100 float 0; #X coords 0 1 99 -1 100 40 1; #X restore 451 29 graph; #X obj 61 43 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X obj 61 106 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X obj 40 381 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #N canvas 0 22 450 300 (subpatch) 0; #X array imag 100 float 0; #X coords 0 1 99 -1 100 40 1; #X restore 451 71 graph; #N canvas 0 22 450 300 (subpatch) 0; #X array mag 100 float 0; #X coords 0 1 99 -1 100 40 1; #X restore 596 29 graph; #N canvas 0 22 450 300 (subpatch) 0; #X array arg 100 float 0; #X coords 0 1 99 -1 100 40 1; #X restore 596 71 graph; #X msg 696 220 2; #X floatatom 647 276 5 0 0 0 - - -; #X floatatom 730 277 5 0 0 0 - - -; #X obj 710 131 loadbang; #X text 96 444 IEM KUG; #X text 75 432 musil; #X text 110 432 @; #X text 118 432 iem.at; #X text 79 454 Graz \, Austria; #X text 324 276 initial arguments:; #X text 81 39 invert the complex src-arrays to the complex dst-arrays ; #X text 98 113 the minimum of the 4 array lengths); #X text 85 99 (the number of samples which were inverted are:; #X text 302 288 1.arg: real_source-name; #X text 302 300 2.arg: imag_source-name; #X text 53 160 list of 5 floats:; #X msg 40 229 0 0 0 0 64; #X text 12 7 tab_carth2polar; #X obj 684 316 * 360; #X floatatom 684 341 5 0 0 0 - - -; #X text 74 179 2.) src_imag-onset; #X text 74 169 1.) src_real-onset; #X text 74 209 5.) number of samples to convert; #X msg 710 152 \; real const 0.75 \; imag const -0.75; #X msg 584 153 \; real const 0.75 \; imag const 0.75; #X text 302 312 3.arg: magnitude_destination-name; #X text 302 323 4.arg: phase_argument_destination-name; #X text 74 189 3.) dst_magnitude-onset; #X text 74 199 4.) dst_phase_argument-onset; #X obj 647 254 tabread mag; #X obj 730 253 tabread arg; #X obj 61 78 tab_carth2polar real imag mag arg; #X obj 40 360 tab_carth2polar real imag mag arg; #X msg 143 331 dst_arg arg; #X msg 110 306 dst_mag mag; #X msg 91 279 src_im imag; #X msg 74 253 src_re real; #X floatatom 743 352 5 0 0 0 - - -; #X obj 743 304 * 2; #X obj 743 327 * 3.14159; #X text 31 421 (c) Thomas Musil 2000 - 2009; #X connect 1 0 38 0; #X connect 7 0 36 0; #X connect 7 0 37 0; #X connect 9 0 25 0; #X connect 9 0 45 0; #X connect 10 0 30 0; #X connect 23 0 39 0; #X connect 25 0 26 0; #X connect 36 0 8 0; #X connect 37 0 9 0; #X connect 38 0 2 0; #X connect 39 0 3 0; #X connect 40 0 39 0; #X connect 41 0 39 0; #X connect 42 0 39 0; #X connect 43 0 39 0; #X connect 45 0 46 0; #X connect 46 0 44 0; iem_utils-v0.0.20181004/iem_tab/tab_dbtorms-help.pd0000644000175000017500000000441612630366350022045 0ustar zmoelnigzmoelnig#N canvas 369 22 790 417 10; #N canvas 0 22 450 300 (subpatch) 0; #X array src 100 float 1; #A 0 0.0214324 5.77858 10.0643 15.0643 17.2072 22.2072 31.4929 33.6358 37.2072 38.9929 40.7786 45.0644 49.3501 51.4929 53.6358 55.4215 57.2072 59.3501 61.493 62.6834 63.8739 65.0644 66.8501 68.6358 70.4215 70.7787 71.493 72.9215 73.2787 73.6358 75.0644 75.4216 75.7787 76.493 76.8501 77.2073 77.5644 77.9216 78.6358 79.3501 80.0644 80.7787 81.493 81.8501 82.2073 83.6358 84.3501 85.0644 85.4216 85.7787 87.2073 87.5644 87.9216 88.6359 89.3501 90.0644 90.7787 90.7787 91.493 92.2073 92.2073 92.2073 92.2073 92.2073 92.2073 92.2073 93.6359 93.6359 93.6359 93.6359 93.6359 93.6359 93.6359 93.6359 93.6359 93.6359 93.6359 93.6359 93.6359 94.3502 94.3502 94.3502 95.0644 95.0644 95.7787 96.493 96.493 96.493 97.9216 98.6359 98.6359 99.3502 99.3502 99.3502 100.064 100.064 100.064 100.064 100.779 100.779; #X coords 0 100 99 0 200 140 1; #X restore 534 10 graph; #N canvas 0 22 450 300 (subpatch) 0; #X array dst 100 float 0; #X coords 0 1 99 0 200 140 1; #X restore 534 166 graph; #X obj 61 31 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X obj 61 106 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X obj 59 301 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X msg 59 211 50 20 50; #X text 44 154 list of 3 floats:; #X text 222 273 1.arg: source-name; #X text 222 286 2.arg: destination-name; #X msg 154 213 src src; #X msg 185 234 dst dst; #X text 78 365 IEM KUG; #X text 57 353 musil; #X text 92 353 @; #X text 100 353 iem.at; #X text 61 375 Graz \, Austria; #X text 56 165 1.) src onset; #X text 56 175 2.) dst onset; #X text 231 261 initial arguments:; #X text 68 283 output; #X text 208 213 xxx : change source name; #X text 240 233 xxx : change destination name; #X text 205 69 (the number of samples which are copied are:; #X text 218 83 the minimum of both array lengths); #X text 13 342 (c) Thomas Musil 2000 - 2010; #X text 12 4 tab_dbtorms; #X text 90 30 calculates the dbtorms-value from src to dst; #X obj 61 79 tab_dbtorms src dst; #X obj 59 264 tab_dbtorms src dst; #X text 57 185 3.) n samples of dbtorms; #X connect 2 0 27 0; #X connect 5 0 28 0; #X connect 9 0 28 0; #X connect 10 0 28 0; #X connect 27 0 3 0; #X connect 28 0 4 0; iem_utils-v0.0.20181004/iem_tab/tab_ge-help.pd0000644000175000017500000000651012630366350020763 0ustar zmoelnigzmoelnig#N canvas 116 92 859 564 10; #N canvas 0 0 450 300 graph1 0; #X array src1 100 float 1; #A 0 -0.442858 -0.414287 -0.385715 -0.342858 -0.314287 -0.257144 -0.128572 -0.0428573 0.128572 0.228572 0.285715 0.328572 0.400001 0.414287 0.457144 0.457144 0.442858 0.385715 0.314287 0.257144 0.214286 0.1 0.0428572 -0.0142858 -0.0428573 -0.114286 -0.142858 -0.200001 -0.242858 -0.285715 -0.328572 -0.342858 -0.37143 -0.385715 -0.414287 -0.414287 -0.414287 -0.414287 -0.400001 -0.357144 -0.314287 -0.257144 -0.185715 -0.0714288 0.0142857 0.0571429 0.171429 0.328572 0.400001 0.442858 0.47143 0.485715 0.485715 0.485715 0.485715 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.485715 0.471429 0.457144 0.442858 0.442858 0.428572 0.414286 0.385715 0.357143 0.342858 0.314286 0.285715 0.242857 0.185714 0.142857 0.114286 0.085714; #X coords 0 1 99 -1 200 140 1; #X restore 534 10 graph; #N canvas 0 0 450 300 graph1 0; #X array dst 100 float 0; #X coords 0 1 99 -1 200 140 1; #X restore 535 358 graph; #X obj 61 31 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X obj 61 106 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X obj 59 340 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X msg 255 276 dst dst; #N canvas 0 0 450 300 graph1 0; #X array src2 100 float 1; #A 0 0.557135 0.57142 0.557135 0.528564 0.499992 0.428564 0.357136 0.299994 0.0999951 -0.0571467 -0.157146 -0.228574 -0.300002 -0.328573 -0.357145 -0.385716 -0.400001 -0.400001 -0.385716 -0.385716 -0.37143 -0.364287 -0.357145 -0.328573 -0.300002 -0.271431 -0.24286 -0.214288 -0.14286 -0.085718 -0.0428611 -4.28595e-006 0.0428526 0.099995 0.171423 0.21428 0.257137 0.328565 0.371422 0.442849 0.457135 0.471421 0.471421 0.485706 0.485706 0.485706 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.485714 0.471429 0.457135 0.428564 0.371422 0.314279 0.242851 0.0857095 -0.0857178 -0.271431 -0.400001 -0.514286 -0.542858 -0.557143 -0.585714 -0.585714 -0.6 -0.6 -0.614286 -0.614286 -0.614286; #X coords 0 1 99 -1 200 140 1; #X restore 535 161 graph; #X msg 136 233 src1 src1; #X msg 195 255 src2 src2; #X msg 59 211 50 50 20 50; #X text 45 139 list of 4 floats:; #X text 212 353 3.arg: destination-name; #X text 78 435 IEM KUG; #X text 62 423 musil; #X text 92 423 @; #X text 98 423 iem.at; #X text 61 445 Graz \, Austria; #X text 13 412 (c) Thomas Musil 2000 - 2006; #X text 234 312 initial arguments:; #X text 72 319 output; #X text 306 275 xxx : change destination name; #X text 208 86 the minimum of the 3 array lengths); #X text 56 177 3.) dst onset; #X text 56 155 1.) src_1 onset; #X text 56 166 2.) src_2 onset; #X text 199 233 xxx : change source name 1; #X text 257 255 xxx : change source name 2; #X text 211 326 1.arg: source-name 1; #X text 211 339 2.arg: source-name 2; #X text 195 72 (the number of samples which were compared are:; #X text 56 187 4.) n samples to compare; #X text 12 3 tab_ge; #X obj 61 78 tab_ge src1 src2 dst; #X obj 59 301 tab_ge src1 src2 dst; #X text 90 29 compare "greater than or equal to" the 2 src-arrays to dst-array; #X connect 2 0 32 0; #X connect 5 0 33 0; #X connect 7 0 33 0; #X connect 8 0 33 0; #X connect 9 0 33 0; #X connect 32 0 3 0; #X connect 33 0 4 0; iem_utils-v0.0.20181004/iem_tab/tab_sqrt-help.pd0000644000175000017500000000461212630366350021362 0ustar zmoelnigzmoelnig#N canvas 116 92 786 482 10; #N canvas 0 0 450 300 graph1 0; #X array src 100 float 1; #A 0 0.916135 0.888992 0.83593 0.810011 0.784501 0.759399 0.734704 0.710418 0.663071 0.640009 0.595111 0.573274 0.551845 0.510212 0.490007 0.450823 0.413271 0.395108 0.377353 0.326536 0.310413 0.279392 0.264494 0.250004 0.222248 0.196126 0.171635 0.160003 0.148778 0.127553 0.0987772 0.0900016 0.0736748 0.0661237 0.0522459 0.0459193 0.0344905 0.0246944 0.0204086 0.0130616 0.0100003 0.00326543 0.00183682 0.000816378 5.03628e-013 0.000204064 0.0018367 0.00510201 0.00510201 0.00999999 0.0165306 0.0204082 0.0293879 0.0400002 0.0459187 0.05898 0.0661229 0.0816333 0.0816333 0.0987763 0.10796 0.127552 0.13796 0.148777 0.160001 0.183675 0.196124 0.208982 0.235921 0.250002 0.279391 0.294697 0.310411 0.343065 0.360004 0.377351 0.395106 0.431841 0.470209 0.490005 0.510209 0.530822 0.551843 0.573271 0.595108 0.617354 0.640007 0.663068 0.686538 0.710416 0.734702 0.734702 0.759396 0.784498 0.810009 0.835928 0.862254 0.862254 0.88899 0.916133; #X coords 0 1 99 -1 200 140 1; #X restore 534 10 graph; #N canvas 0 0 450 300 graph1 0; #X array dst 100 float 0; #X coords 0 1 99 -1 200 140 1; #X restore 534 176 graph; #X obj 60 35 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X obj 60 110 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X obj 58 345 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X msg 58 215 50 20 50; #X text 194 318 1.arg: source-name; #X text 194 331 2.arg: destination-name; #X msg 115 235 src src; #X msg 165 253 dst dst; #X text 184 73 (the number of samples which are copied are:; #X text 197 87 the minimum of both array lengths); #X text 43 168 list of 3 floats:; #X text 77 419 IEM KUG; #X text 61 407 musil; #X text 91 407 @; #X text 97 407 iem.at; #X text 60 429 Graz \, Austria; #X text 12 396 (c) Thomas Musil 2000 - 2006; #X text 55 179 1.) src onset; #X text 55 189 2.) dst onset; #X text 225 306 initial arguments:; #X text 73 323 output; #X text 172 233 xxx : change source name; #X text 218 252 xxx : change destination name; #X text 11 7 tab_sqrt; #X text 89 33 copy square root value from src to dst; #X obj 60 82 tab_sqrt src dst; #X text 55 198 3.) n samples to copy square root; #X obj 58 306 tab_sqrt src dst; #X connect 2 0 27 0; #X connect 5 0 29 0; #X connect 8 0 29 0; #X connect 9 0 29 0; #X connect 27 0 3 0; #X connect 29 0 4 0; iem_utils-v0.0.20181004/iem_tab/tab_sum-help.pd0000644000175000017500000000426612630366350021202 0ustar zmoelnigzmoelnig#N canvas 116 92 798 425 10; #N canvas 0 22 450 300 (subpatch) 0; #X array src 100 float 1; #A 0 -0.442858 -0.414287 -0.385715 -0.342858 -0.314287 -0.257144 -0.128572 -0.0428573 0.128572 0.228572 0.285715 0.328572 0.400001 0.414287 0.457144 0.457144 0.442858 0.385715 0.314287 0.257144 0.214286 0.1 0.0428572 -0.0142858 -0.0428573 -0.114286 -0.142858 -0.200001 -0.242858 -0.285715 -0.328572 -0.342858 -0.37143 -0.385715 -0.414287 -0.414287 -0.414287 -0.414287 -0.400001 -0.357144 -0.314287 -0.257144 -0.185715 -0.0714288 0.0142857 0.0571429 0.171429 0.328572 0.400001 0.442858 0.47143 0.485715 0.485715 0.485715 0.485715 0.485715 0.442858 0.357144 0.242858 0.185715 0.114286 0.0714285 -0.071429 -0.242858 -0.300001 -0.328573 -0.357144 -0.37143 -0.385715 -0.400001 -0.442858 -0.457144 -0.47143 -0.457144 -0.428573 -0.400001 -0.378573 -0.328572 -0.271429 -0.242858 -0.200001 -0.128572 -0.0428574 -0.0285717 0.0142858 0.114286 0.128572 0.185715 0.214286 0.257144 0.285715 0.314287 0.342858 0.357144 0.357144 0.357144 0.357144 0.357144 0.342858 0.328572; #X coords 0 1 99 -1 200 140 1; #X restore 524 40 graph; #X obj 61 31 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X obj 61 106 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X obj 59 301 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X msg 93 213 src src; #X obj 61 78 tab_sum src; #X floatatom 122 104 5 0 0 0 - - -; #X obj 59 244 tab_sum src; #X msg 59 188 50 20; #X floatatom 120 305 5 0 0 0 - - -; #X text 75 364 IEM KUG; #X text 54 352 musil; #X text 89 352 @; #X text 97 352 iem.at; #X text 58 374 Graz \, Austria; #X text 90 29 calc sum of all array elements; #X text 182 234 initial arguments:; #X text 65 260 output; #X text 11 6 tab_sum; #X text 55 171 2.) n samples to calc sum; #X text 142 213 xxx : change source name; #X text 164 247 1.arg: source-name; #X text 125 280 sum output; #X text 118 118 sum value; #X text 43 150 list of 2 floats:; #X text 55 160 1.) src onset; #X msg 391 84 \; src const 0.5; #X text 10 341 (c) Thomas Musil 2000 - 2009; #X connect 1 0 5 0; #X connect 4 0 7 0; #X connect 5 0 2 0; #X connect 5 1 6 0; #X connect 7 0 3 0; #X connect 7 1 9 0; #X connect 8 0 7 0; iem_utils-v0.0.20181004/iem_tab/tab_eq_scalar-help.pd0000644000175000017500000000421612630366350022323 0ustar zmoelnigzmoelnig#N canvas 22 55 884 588 10; #N canvas 0 22 450 300 (subpatch) 0; #X array src 100 float 1; #A 0 -0.5 -0.5 -0.5 -0.5 -0.5 -0.5 -0.5 -0.5 -0.5 -0.5 -0.5 -0.5 -0.5 -0.5 -0.5 -0.5 -0.5 -0.5 -0.5 -0.5 -0.5 -0.5 -0.5 -0.5 -0.5 -0.5 -0.5 -0.5 -0.542857 -0.614286 -0.657144 -0.67143 -0.700001 -0.714287 -0.757145 -0.757145 -0.757145 -0.742859 -0.742859 -0.728573 -0.714287 -0.685715 -0.657144 -0.585715 -0.528572 -0.4 -0.242856 -0.0428551 0.157146 0.342861 0.51429 0.728577 0.800006 0.828578 0.828578 0.828578 0.828578 0.800006 0.771435 0.714292 0.571433 0.528572 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5; #X coords 0 1 99 -1 200 140 1; #X restore 527 116 graph; #N canvas 0 22 450 300 (subpatch) 0; #X array dst 100 float 0; #X coords 0 1 99 -1 200 140 1; #X restore 527 325 graph; #X obj 61 106 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X obj 59 370 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X msg 178 272 dst dst; #X msg 129 249 src src; #X obj 61 78 tab_eq_scalar src dst; #X obj 59 331 tab_eq_scalar src dst; #X msg 47 36 0.5; #X msg 82 37 -0.5; #X text 221 332 1.arg: source-name; #X text 221 345 2.arg: destination-name; #X text 31 163 list of 4 floats:; #X text 78 475 IEM KUG; #X text 57 463 musil; #X text 92 463 @; #X text 100 463 iem.at; #X text 61 485 Graz \, Austria; #X text 244 318 initial arguments:; #X text 75 351 output; #X text 229 272 xxx : change destination name; #X text 218 86 the minimum of both array lengths); #X text 182 248 xxx : change source name; #X text 42 179 1.) src onset; #X text 42 190 2.) dst onset; #X text 12 3 tab_eq_scalar; #X text 42 201 3.) n samples to compare; #X text 42 210 4.) compared scalar value; #X text 129 29 compare "equal to" the src-array with this scalar to dst-array; #X text 205 72 (the number of samples which were compared are:; #X msg 48 228 0 0 100 0.5; #X text 13 452 (c) Thomas Musil 2000 - 2009; #X connect 4 0 7 0; #X connect 5 0 7 0; #X connect 6 0 2 0; #X connect 7 0 3 0; #X connect 8 0 6 0; #X connect 9 0 6 0; #X connect 30 0 7 0; iem_utils-v0.0.20181004/iem_tab/tab_ge_scalar-help.pd0000644000175000017500000000462412630366350022314 0ustar zmoelnigzmoelnig#N canvas 22 55 888 592 10; #N canvas 0 0 450 300 graph1 0; #X array src 100 float 1; #A 0 -0.5 -0.5 -0.5 -0.5 -0.5 -0.5 -0.5 -0.5 -0.5 -0.485714 -0.457143 -0.4 -0.285713 -0.0571409 0.157146 0.328575 0.442861 0.557148 0.628577 0.714292 0.800006 0.85715 0.885721 0.885721 0.871435 0.842864 0.757149 0.557148 0.41429 0.257146 -0.0142835 -0.314285 -0.528572 -0.714287 -0.757145 -0.757145 -0.757145 -0.742859 -0.742859 -0.728573 -0.714287 -0.685715 -0.657144 -0.585715 -0.528572 -0.4 -0.242856 -0.0428551 0.157146 0.342861 0.51429 0.728577 0.800006 0.828578 0.828578 0.828578 0.828578 0.800006 0.771435 0.714292 0.571433 0.41429 0.242861 0.0857169 -0.0571409 -0.242856 -0.385714 -0.542858 -0.685716 -0.757145 -0.800002 -0.828574 -0.828574 -0.814288 -0.800002 -0.785716 -0.757145 -0.728573 -0.67143 -0.585715 -0.471429 -0.271428 -0.0857125 0.114288 0.228575 0.314289 0.385718 0.414285 0.428571 0.457143 0.471428 0.485714 0.485714 0.5 0.5 0.5 0.5 0.5 0.5 0.5; #X coords 0 1 99 -1 200 140 1; #X restore 527 116 graph; #N canvas 0 0 450 300 graph1 0; #X array dst 100 float 0; #X coords 0 1 99 -1 200 140 1; #X restore 527 325 graph; #X obj 61 106 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X obj 59 370 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X msg 178 272 dst dst; #X msg 129 249 src src; #X msg 47 36 0.5; #X msg 82 37 -0.5; #X text 201 332 1.arg: source-name; #X text 201 345 2.arg: destination-name; #X text 31 162 list of 4 floats:; #X text 78 475 IEM KUG; #X text 62 463 musil; #X text 92 463 @; #X text 98 463 iem.at; #X text 61 485 Graz \, Austria; #X text 13 452 (c) Thomas Musil 2000 - 2006; #X text 224 318 initial arguments:; #X text 75 351 output; #X text 229 272 xxx : change destination name; #X text 218 86 the minimum of both array lengths); #X text 182 248 xxx : change source name; #X text 42 178 1.) src onset; #X text 42 189 2.) dst onset; #X text 42 200 3.) n samples to compare; #X text 42 210 4.) compared scalar value; #X text 205 72 (the number of samples which were compared are:; #X msg 48 228 0 0 100 0.5; #X text 12 3 tab_ge_scalar; #X obj 61 78 tab_ge_scalar src dst; #X obj 59 331 tab_ge_scalar src dst; #X text 129 29 compare "greater than or equal to" the src-array with this scalar to dst-array; #X connect 4 0 30 0; #X connect 5 0 30 0; #X connect 6 0 29 0; #X connect 7 0 29 0; #X connect 27 0 30 0; #X connect 29 0 2 0; #X connect 30 0 3 0; iem_utils-v0.0.20181004/iem_tab/tab_find_peaks-help.pd0000644000175000017500000000553712630366350022503 0ustar zmoelnigzmoelnig#N canvas 191 230 938 537 10; #X obj 60 52 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X obj 31 331 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X text 200 306 1.arg: source-name; #X floatatom 94 372 5 0 0 0 - - -; #X floatatom 143 373 5 0 0 0 - - -; #X msg 88 78 src src; #X msg 118 102 amp_sort; #X msg 120 124 freq_sort; #X obj 60 302 tab_find_peaks src; #X floatatom 198 371 5 0 0 0 - - -; #X obj 263 369 pack 0 0 0; #X obj 263 392 print; #X msg 233 173 abs_min_height_diff 10; #X text 69 385 sort_index; #X text 204 382 amp; #X text 147 387 index; #N canvas 0 22 450 300 (subpatch) 0; #X array src 100 float 1; #A 0 9.99997 9.28569 9.28569 10.7143 7.14284 7.85712 8.5714 39 10 11 38 8.5714 7.85712 8.5714 9.28569 8.5714 9.99997 39 40 41 38 12.8571 12.8571 14.2857 12.8571 11.4285 12.1428 11.4285 9.99997 10.7143 11.4285 9.99997 9.28569 9.28569 9.99997 10.7143 10.7143 45 9.99997 9.99997 10.7143 11.4285 12.1428 10.7143 11.4285 12.1428 11.4285 46 11.4285 11.4285 11.4285 12.1428 12.8571 11.4285 11.4285 12.1428 12.8571 12.1428 12.1428 12.1428 12.1428 12.1428 11.4285 11.4285 11.4285 11.4285 10.7143 48 49 43 11.4285 12.1428 13.5714 15 13.5714 13.5714 14.2857 14.2857 15 15 14.2857 14.2857 14.2857 15 15 15.7142 15.7142 51 53 15 15 15 15 15 14.2857 14.2857 15 15.7142 16.4285 16.4285; #X coords 0 100 99 0 200 140 1; #X restore 638 93 graph; #X msg 171 149 max_peaks 9; #X text 20 347 ready; #X msg 289 194 width_range 1 4; #X text 21 6 tab_find_peaks; #X msg 289 216 width_range 1 1; #N canvas 0 22 470 320 (subpatch) 0; #X msg 355 125 \; src const 0; #X msg 303 175 \; src 37 45; #X msg 310 223 \; src 47 46; #X msg 187 177 \; src 67 48 49 43; #X msg 180 218 \; src 87 51 53; #X msg 44 223 \; src 7 39 10 11 38; #X msg 50 181 \; src 17 39 40 41 38; #X obj 65 25 loadbang; #X msg 33 50 \; src xticks 0 1 5; #X msg 34 84 \; src xlabel -5.15 0 10 20 30 40 50 60 70 80 90; #X connect 7 0 8 0; #X connect 7 0 9 0; #X restore 696 289 pd; #X obj 311 69 loadbang; #X text 89 50 calculate all peaks (index bin amplitude); #X text 218 61 of an array; #X text 78 442 IEM KUG; #X text 57 430 musil; #X text 92 430 @; #X text 100 430 iem.at; #X text 61 452 Graz \, Austria; #X text 218 296 initial arguments:; #X text 190 111 kind of order; #X text 257 148 maximum number of peaks detected; #X text 395 171 vertical difference between peak; #X text 397 180 and noise; #X text 413 205 width range of peak in bins; #X text 13 419 (c) Thomas Musil 2000 - 2009; #X connect 0 0 8 0; #X connect 5 0 8 0; #X connect 6 0 8 0; #X connect 7 0 8 0; #X connect 8 0 1 0; #X connect 8 1 3 0; #X connect 8 1 10 0; #X connect 8 2 4 0; #X connect 8 2 10 1; #X connect 8 3 9 0; #X connect 8 3 10 2; #X connect 10 0 11 0; #X connect 12 0 8 0; #X connect 17 0 8 0; #X connect 19 0 8 0; #X connect 21 0 8 0; #X connect 23 0 6 0; #X connect 23 0 17 0; #X connect 23 0 12 0; #X connect 23 0 19 0; iem_utils-v0.0.20181004/iem_tab/tab_complex_inv-help.pd0000644000175000017500000000437512630366350022722 0ustar zmoelnigzmoelnig#N canvas 132 30 858 524 10; #N canvas 0 22 450 300 (subpatch) 0; #X array re1 100 float 0; #X coords 0 1 99 -1 100 40 1; #X restore 451 29 graph; #X obj 61 43 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X obj 61 106 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X obj 40 381 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #N canvas 0 22 450 300 (subpatch) 0; #X array im1 100 float 0; #X coords 0 1 99 -1 100 40 1; #X restore 451 71 graph; #N canvas 0 22 450 300 (subpatch) 0; #X array re2 100 float 0; #X coords 0 1 99 -1 100 40 1; #X restore 596 29 graph; #N canvas 0 22 450 300 (subpatch) 0; #X array im2 100 float 0; #X coords 0 1 99 -1 100 40 1; #X restore 596 71 graph; #X msg 700 247 2; #X floatatom 651 303 5 0 0 0 - - -; #X floatatom 734 304 5 0 0 0 - - -; #X obj 710 131 loadbang; #X text 96 444 IEM KUG; #X text 75 432 musil; #X text 110 432 @; #X text 118 432 iem.at; #X text 79 454 Graz \, Austria; #X text 324 276 initial arguments:; #X text 12 7 tab_complex_inv; #X text 81 39 invert the complex src-arrays to the complex dst-arrays ; #X obj 61 78 tab_complex_inv re1 im1 re2 im2; #X text 128 113 the minimum of the 4 array lengths); #X text 115 99 (the number of samples which were inverted are:; #X msg 74 253 src_re re1; #X msg 91 279 src_im im1; #X msg 110 306 dst_re re2; #X msg 143 331 dst_im im2; #X obj 40 360 tab_complex_inv re1 im1 re2 im2; #X text 302 312 3.arg: real_destination-name; #X text 302 323 4.arg: imag_destination-name; #X text 302 288 1.arg: real_source-name; #X text 302 300 2.arg: imag_source-name; #X obj 651 280 tabread re2; #X obj 734 280 tabread im2; #X msg 710 152 \; re1 const 0.8 \; im1 const -0.6; #X text 105 155 1.) src_re-onset; #X text 105 165 2.) src_im-onset; #X text 105 175 3.) dst_re-onset; #X text 105 185 4.) dst_im-onset; #X text 105 195 5.) number of samples to multiply; #X text 84 146 list of 5 floats:; #X msg 40 229 0 0 0 0 64; #X text 31 421 (c) Thomas Musil 2000 - 2009; #X connect 1 0 19 0; #X connect 7 0 31 0; #X connect 7 0 32 0; #X connect 10 0 33 0; #X connect 19 0 2 0; #X connect 22 0 26 0; #X connect 23 0 26 0; #X connect 24 0 26 0; #X connect 25 0 26 0; #X connect 26 0 3 0; #X connect 31 0 8 0; #X connect 32 0 9 0; #X connect 40 0 26 0; iem_utils-v0.0.20181004/iem_tab/tab_add_scalar-help.pd0000644000175000017500000000472412630366350022452 0ustar zmoelnigzmoelnig#N canvas 115 92 864 568 10; #N canvas 0 22 450 300 (subpatch) 0; #X array src 100 float 1; #A 0 -0.442858 -0.414287 -0.385715 -0.342858 -0.314287 -0.257144 -0.128572 -0.0428573 0.128572 0.228572 0.285715 0.328572 0.400001 0.414287 0.457144 0.457144 0.442858 0.385715 0.314287 0.257144 0.214286 0.1 0.0428572 -0.0142858 -0.0428573 -0.114286 -0.142858 -0.200001 -0.242858 -0.285715 -0.328572 -0.342858 -0.37143 -0.385715 -0.414287 -0.414287 -0.414287 -0.414287 -0.400001 -0.357144 -0.314287 -0.257144 -0.185715 -0.0714288 0.0142857 0.0571429 0.171429 0.328572 0.400001 0.442858 0.47143 0.485715 0.485715 0.485715 0.485715 0.485715 0.442858 0.357144 0.242858 0.185715 0.114286 0.0714285 -0.071429 -0.242858 -0.300001 -0.328573 -0.357144 -0.37143 -0.385715 -0.400001 -0.442858 -0.457144 -0.47143 -0.457144 -0.428573 -0.400001 -0.378573 -0.328572 -0.271429 -0.242858 -0.200001 -0.128572 -0.0428574 -0.0285717 0.0142858 0.114286 0.128572 0.185715 0.214286 0.257144 0.285715 0.314287 0.342858 0.357144 0.357144 0.357144 0.357144 0.357144 0.342858 0.328572; #X coords 0 1 99 -1 200 140 1; #X restore 527 46 graph; #N canvas 0 22 450 300 (subpatch) 0; #X array dst 100 float 0; #X coords 0 1 99 -1 200 140 1; #X restore 527 325 graph; #X obj 61 106 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X obj 59 340 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X text 211 336 1.arg: source-name; #X msg 197 270 dst dst; #X msg 47 36 0.5; #X msg 145 247 src src; #X msg 82 37 -0.5; #X obj 61 78 tab_add_scalar src dst; #X obj 59 301 tab_add_scalar src dst; #X msg 48 227 50 20 50 -0.8; #X text 211 349 2.arg: destination-name; #X text 129 29 add the src-array with this scalar to dst-array ; #X text 31 163 list of 4 floats:; #X text 78 475 IEM KUG; #X text 58 463 musil; #X text 92 463 @; #X text 100 463 iem.at; #X text 61 485 Graz \, Austria; #X text 234 322 initial arguments:; #X text 71 322 output; #X text 250 271 xxx : change destination name; #X text 12 3 tab_add_scalar; #X text 218 86 the minimum of both array lengths); #X text 197 246 xxx : change source name; #X text 42 179 1.) src onset; #X text 42 190 2.) dst onset; #X text 42 200 3.) n samples to add; #X text 42 210 4.) added scalar value; #X text 205 72 (the number of samples which were added are:; #X text 13 452 (c) Thomas Musil 2000 - 2009; #X connect 5 0 10 0; #X connect 6 0 9 0; #X connect 7 0 10 0; #X connect 8 0 9 0; #X connect 9 0 2 0; #X connect 10 0 3 0; #X connect 11 0 10 0; iem_utils-v0.0.20181004/iem_tab/tab_rfft-help.pd0000644000175000017500000001353012630366350021331 0ustar zmoelnigzmoelnig#N canvas 0 22 965 544 10; #N canvas 0 22 450 300 (subpatch) 0; #X array src 100 float 0; #X coords 0 1 99 -1 199 100 1; #X restore 694 10 graph; #N canvas 0 22 450 300 (subpatch) 0; #X array dst_re 100 float 0; #X coords 0 1 99 -1 199 100 1; #X restore 694 239 graph; #X obj 24 47 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X obj 24 122 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X obj 61 345 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #N canvas 0 22 450 300 (subpatch) 0; #X array dst_im 100 float 0; #X coords 0 1 99 -1 199 100 1; #X restore 694 353 graph; #X msg 89 252 dst_re dst_re; #X msg 104 275 dst_im dst_im; #X msg 125 298 fftsize 64; #X floatatom 474 22 5 0 63 0 - - -; #X msg 546 341 \; dst_re const 0 \; dst_im const 0; #N canvas 0 22 482 332 generate_a_dirac 0; #X obj 61 62 clip 0 63; #X obj 61 32 inlet; #X msg 61 89 \; src const 0 \; src \$1 1; #X connect 0 0 2 0; #X connect 1 0 0 0; #X restore 474 41 pd generate_a_dirac; #X floatatom 514 22 5 -32 32 0 - - -; #N canvas 0 22 507 431 generate_a_cos 0; #X obj 120 18 inlet; #X obj 219 176 t f f; #X obj 219 211 / 32; #X obj 219 232 * 3.14159; #X obj 219 283 cos; #X obj 219 257 * 8; #X obj 219 308 / 32; #X obj 219 127 t b f; #X obj 120 43 moses 0; #X obj 39 178 t f f; #X obj 39 213 / 32; #X obj 39 234 * 3.14159; #X obj 39 285 cos; #X obj 39 259 * 8; #X obj 39 129 t b f; #X obj 90 70 * -1; #X obj 39 310 / -32; #N canvas 193 158 454 304 counter 0; #X obj 108 25 inlet; #X obj 109 163 outlet; #X obj 109 133 f; #X obj 142 133 + 1; #X obj 108 50 t b b; #X msg 154 76 0; #X msg 109 75 64; #X obj 110 98 until; #X connect 0 0 4 0; #X connect 2 0 3 0; #X connect 2 0 1 0; #X connect 3 0 2 1; #X connect 4 0 6 0; #X connect 4 1 5 0; #X connect 5 0 2 1; #X connect 6 0 7 0; #X connect 7 0 2 0; #X restore 219 151 pd counter; #N canvas 193 158 458 308 counter 0; #X obj 108 25 inlet; #X obj 109 163 outlet; #X obj 109 133 f; #X obj 142 133 + 1; #X obj 108 50 t b b; #X msg 154 76 0; #X msg 109 75 64; #X obj 110 98 until; #X connect 0 0 4 0; #X connect 2 0 3 0; #X connect 2 0 1 0; #X connect 3 0 2 1; #X connect 4 0 6 0; #X connect 4 1 5 0; #X connect 5 0 2 1; #X connect 6 0 7 0; #X connect 7 0 2 0; #X restore 38 154 pd counter; #X obj 219 106 clip 0 32; #X obj 39 108 clip 0 32; #X obj 39 333 tabwrite src; #X obj 219 331 tabwrite src; #X connect 0 0 8 0; #X connect 1 0 2 0; #X connect 1 1 22 1; #X connect 2 0 3 0; #X connect 3 0 5 0; #X connect 4 0 6 0; #X connect 5 0 4 0; #X connect 6 0 22 0; #X connect 7 0 17 0; #X connect 7 1 5 1; #X connect 8 0 15 0; #X connect 8 1 19 0; #X connect 9 0 10 0; #X connect 9 1 21 1; #X connect 10 0 11 0; #X connect 11 0 13 0; #X connect 12 0 16 0; #X connect 13 0 12 0; #X connect 14 0 18 0; #X connect 14 1 13 1; #X connect 15 0 20 0; #X connect 16 0 21 0; #X connect 17 0 1 0; #X connect 18 0 9 0; #X connect 19 0 7 0; #X connect 20 0 14 0; #X restore 514 61 pd generate_a_cos; #X floatatom 555 22 5 -31 31 0 - - -; #N canvas 0 22 503 427 generate_a_sin 0; #X obj 102 37 inlet; #X obj 246 182 t f f; #X obj 246 217 / 32; #X obj 246 238 * 3.14159; #X obj 246 263 * 8; #X obj 246 314 / 32; #X obj 246 112 clip 0 31; #X obj 246 133 t b f; #X obj 246 289 sin; #X obj 54 180 t f f; #X obj 54 215 / 32; #X obj 54 236 * 3.14159; #X obj 54 261 * 8; #X obj 54 110 clip 0 31; #X obj 54 132 t b f; #X obj 54 287 sin; #X obj 54 312 / -32; #X obj 102 60 moses 0; #X obj 54 88 * -1; #N canvas 193 158 454 304 counter 0; #X obj 108 25 inlet; #X obj 109 163 outlet; #X obj 109 133 f; #X obj 142 133 + 1; #X obj 108 50 t b b; #X msg 154 76 0; #X msg 109 75 64; #X obj 110 98 until; #X connect 0 0 4 0; #X connect 2 0 3 0; #X connect 2 0 1 0; #X connect 3 0 2 1; #X connect 4 0 6 0; #X connect 4 1 5 0; #X connect 5 0 2 1; #X connect 6 0 7 0; #X connect 7 0 2 0; #X restore 54 156 pd counter; #N canvas 193 158 454 304 counter 0; #X obj 108 25 inlet; #X obj 109 163 outlet; #X obj 109 133 f; #X obj 142 133 + 1; #X obj 108 50 t b b; #X msg 154 76 0; #X msg 109 75 64; #X obj 110 98 until; #X connect 0 0 4 0; #X connect 2 0 3 0; #X connect 2 0 1 0; #X connect 3 0 2 1; #X connect 4 0 6 0; #X connect 4 1 5 0; #X connect 5 0 2 1; #X connect 6 0 7 0; #X connect 7 0 2 0; #X restore 246 156 pd counter; #X obj 54 334 tabwrite src; #X obj 246 337 tabwrite src; #X connect 0 0 17 0; #X connect 1 0 2 0; #X connect 1 1 22 1; #X connect 2 0 3 0; #X connect 3 0 4 0; #X connect 4 0 8 0; #X connect 5 0 22 0; #X connect 6 0 7 0; #X connect 7 0 20 0; #X connect 7 1 4 1; #X connect 8 0 5 0; #X connect 9 0 10 0; #X connect 9 1 21 1; #X connect 10 0 11 0; #X connect 11 0 12 0; #X connect 12 0 15 0; #X connect 13 0 14 0; #X connect 14 0 19 0; #X connect 14 1 12 1; #X connect 15 0 16 0; #X connect 16 0 21 0; #X connect 17 0 18 0; #X connect 17 1 6 0; #X connect 18 0 13 0; #X connect 19 0 9 0; #X connect 20 0 1 0; #X restore 555 82 pd generate_a_sin; #X text 309 355 initial arguments:; #X msg 546 283 \; src const 0; #X msg 76 230 src src; #X msg 62 207 20 30 30; #X text 49 158 1.) src-onset; #X text 49 168 2.) dst_re-onset; #X text 49 178 3.) dst_im-onset; #X text 37 147 list of 3 floats:; #X text 269 368 1.arg: source-name; #X text 269 380 2.arg: real_destination-name; #X text 269 392 3.arg: imag_destination-name; #X text 269 404 4.arg: fftsize; #X text 10 0 tab_rfft; #X text 93 -1 real FTT with arrays; #X text 45 56 calculates a real fourier transformation of a real src-array to complex dst-arrays; #X obj 24 94 tab_rfft src dst_re dst_im 64; #X obj 62 322 tab_rfft src dst_re dst_im 64; #X text 102 464 IEM KUG; #X text 81 452 musil; #X text 116 452 @; #X text 124 452 iem.at; #X text 85 474 Graz \, Austria; #X text 37 441 (c) Thomas Musil 2000 - 2009; #X connect 2 0 31 0; #X connect 6 0 32 0; #X connect 7 0 32 0; #X connect 8 0 32 0; #X connect 9 0 11 0; #X connect 12 0 13 0; #X connect 14 0 15 0; #X connect 18 0 32 0; #X connect 19 0 32 0; #X connect 31 0 3 0; #X connect 32 0 4 0; iem_utils-v0.0.20181004/iem_tab/tab_rifft-help.pd0000644000175000017500000001436712630366350021513 0ustar zmoelnigzmoelnig#N canvas 24 39 991 674 10; #N canvas 0 22 450 300 (subpatch) 0; #X array src_re 100 float 0; #X coords 0 1 99 -1 199 100 1; #X restore 694 210 graph; #N canvas 0 22 450 300 (subpatch) 0; #X array src_im 100 float 0; #X coords 0 1 99 -1 199 100 1; #X restore 694 327 graph; #X obj 24 47 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X obj 24 122 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X obj 61 345 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #N canvas 0 22 450 300 (subpatch) 0; #X array dst 100 float 0; #X coords 0 1 99 -1 199 100 1; #X restore 694 513 graph; #X msg 125 298 fftsize 64; #X text 309 425 initial arguments:; #X text 10 0 tab_rifft; #X text 93 -1 real inverse FTT with arrays; #X text 37 147 list of 3 floats:; #X msg 587 540 \; dst const 0; #X obj 62 322 tab_rifft src_re src_im dst 64; #X obj 24 94 tab_rifft src_re src_im dst 64; #X text 49 158 1.) src_re-onset; #X text 49 168 2.) src_im-onset; #X text 49 178 3.) dst-onset; #X msg 62 207 20 20 30; #X msg 76 230 src_re src_re; #X msg 89 252 src_im src_im; #X msg 104 275 dst dst; #X text 269 438 1.arg: real source-name; #X text 269 450 2.arg: imag_source-name; #X text 269 462 3.arg: destination-name; #X text 45 56 calculates a real inverse fourier transformation of complex src-arrays to a real dst-array; #X text 269 474 4.arg: ifftsize; #N canvas 0 22 450 300 (subpatch) 0; #X array src 100 float 0; #X coords 0 1 99 -1 199 100 1; #X restore 694 31 graph; #X floatatom 479 40 5 0 63 0 - - -; #N canvas 0 22 486 336 generate_a_dirac 0; #X obj 61 62 clip 0 63; #X obj 61 32 inlet; #X msg 61 89 \; src const 0 \; src \$1 1; #X connect 0 0 2 0; #X connect 1 0 0 0; #X restore 479 59 pd generate_a_dirac; #X floatatom 519 40 5 -32 32 0 - - -; #N canvas 0 22 515 439 generate_a_cos 0; #X obj 120 18 inlet; #X obj 219 176 t f f; #X obj 219 211 / 32; #X obj 219 232 * 3.14159; #X obj 219 283 cos; #X obj 219 257 * 8; #X obj 219 308 / 32; #X obj 219 127 t b f; #X obj 120 43 moses 0; #X obj 39 178 t f f; #X obj 39 213 / 32; #X obj 39 234 * 3.14159; #X obj 39 285 cos; #X obj 39 259 * 8; #X obj 39 129 t b f; #X obj 90 70 * -1; #X obj 39 310 / -32; #N canvas 193 158 454 304 counter 0; #X obj 108 25 inlet; #X obj 109 163 outlet; #X obj 109 133 f; #X obj 142 133 + 1; #X obj 108 50 t b b; #X msg 154 76 0; #X msg 109 75 64; #X obj 110 98 until; #X connect 0 0 4 0; #X connect 2 0 3 0; #X connect 2 0 1 0; #X connect 3 0 2 1; #X connect 4 0 6 0; #X connect 4 1 5 0; #X connect 5 0 2 1; #X connect 6 0 7 0; #X connect 7 0 2 0; #X restore 219 151 pd counter; #N canvas 193 158 458 308 counter 0; #X obj 108 25 inlet; #X obj 109 163 outlet; #X obj 109 133 f; #X obj 142 133 + 1; #X obj 108 50 t b b; #X msg 154 76 0; #X msg 109 75 64; #X obj 110 98 until; #X connect 0 0 4 0; #X connect 2 0 3 0; #X connect 2 0 1 0; #X connect 3 0 2 1; #X connect 4 0 6 0; #X connect 4 1 5 0; #X connect 5 0 2 1; #X connect 6 0 7 0; #X connect 7 0 2 0; #X restore 38 154 pd counter; #X obj 219 106 clip 0 32; #X obj 39 108 clip 0 32; #X obj 39 333 tabwrite src; #X obj 219 331 tabwrite src; #X connect 0 0 8 0; #X connect 1 0 2 0; #X connect 1 1 22 1; #X connect 2 0 3 0; #X connect 3 0 5 0; #X connect 4 0 6 0; #X connect 5 0 4 0; #X connect 6 0 22 0; #X connect 7 0 17 0; #X connect 7 1 5 1; #X connect 8 0 15 0; #X connect 8 1 19 0; #X connect 9 0 10 0; #X connect 9 1 21 1; #X connect 10 0 11 0; #X connect 11 0 13 0; #X connect 12 0 16 0; #X connect 13 0 12 0; #X connect 14 0 18 0; #X connect 14 1 13 1; #X connect 15 0 20 0; #X connect 16 0 21 0; #X connect 17 0 1 0; #X connect 18 0 9 0; #X connect 19 0 7 0; #X connect 20 0 14 0; #X restore 519 79 pd generate_a_cos; #X floatatom 560 40 5 -31 31 0 - - -; #N canvas 0 22 507 431 generate_a_sin 0; #X obj 102 37 inlet; #X obj 246 182 t f f; #X obj 246 217 / 32; #X obj 246 238 * 3.14159; #X obj 246 263 * 8; #X obj 246 314 / 32; #X obj 246 112 clip 0 31; #X obj 246 133 t b f; #X obj 246 289 sin; #X obj 54 180 t f f; #X obj 54 215 / 32; #X obj 54 236 * 3.14159; #X obj 54 261 * 8; #X obj 54 110 clip 0 31; #X obj 54 132 t b f; #X obj 54 287 sin; #X obj 54 312 / -32; #X obj 102 60 moses 0; #X obj 54 88 * -1; #N canvas 193 158 454 304 counter 0; #X obj 108 25 inlet; #X obj 109 163 outlet; #X obj 109 133 f; #X obj 142 133 + 1; #X obj 108 50 t b b; #X msg 154 76 0; #X msg 109 75 64; #X obj 110 98 until; #X connect 0 0 4 0; #X connect 2 0 3 0; #X connect 2 0 1 0; #X connect 3 0 2 1; #X connect 4 0 6 0; #X connect 4 1 5 0; #X connect 5 0 2 1; #X connect 6 0 7 0; #X connect 7 0 2 0; #X restore 54 156 pd counter; #N canvas 193 158 454 304 counter 0; #X obj 108 25 inlet; #X obj 109 163 outlet; #X obj 109 133 f; #X obj 142 133 + 1; #X obj 108 50 t b b; #X msg 154 76 0; #X msg 109 75 64; #X obj 110 98 until; #X connect 0 0 4 0; #X connect 2 0 3 0; #X connect 2 0 1 0; #X connect 3 0 2 1; #X connect 4 0 6 0; #X connect 4 1 5 0; #X connect 5 0 2 1; #X connect 6 0 7 0; #X connect 7 0 2 0; #X restore 246 156 pd counter; #X obj 54 334 tabwrite src; #X obj 246 337 tabwrite src; #X connect 0 0 17 0; #X connect 1 0 2 0; #X connect 1 1 22 1; #X connect 2 0 3 0; #X connect 3 0 4 0; #X connect 4 0 8 0; #X connect 5 0 22 0; #X connect 6 0 7 0; #X connect 7 0 20 0; #X connect 7 1 4 1; #X connect 8 0 5 0; #X connect 9 0 10 0; #X connect 9 1 21 1; #X connect 10 0 11 0; #X connect 11 0 12 0; #X connect 12 0 15 0; #X connect 13 0 14 0; #X connect 14 0 19 0; #X connect 14 1 12 1; #X connect 15 0 16 0; #X connect 16 0 21 0; #X connect 17 0 18 0; #X connect 17 1 6 0; #X connect 18 0 13 0; #X connect 19 0 9 0; #X connect 20 0 1 0; #X restore 560 100 pd generate_a_sin; #X obj 471 258 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X obj 471 333 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X obj 471 305 tab_rfft src src_re src_im 64; #X msg 590 127 \; src const 0; #X text 102 464 IEM KUG; #X text 81 452 musil; #X text 116 452 @; #X text 124 452 iem.at; #X text 85 474 Graz \, Austria; #X text 37 441 (c) Thomas Musil 2000 - 2009; #X text 521 17 1.); #X text 469 236 2.); #X text 44 25 3.); #X connect 2 0 13 0; #X connect 6 0 12 0; #X connect 12 0 4 0; #X connect 13 0 3 0; #X connect 17 0 12 0; #X connect 18 0 12 0; #X connect 19 0 12 0; #X connect 20 0 12 0; #X connect 27 0 28 0; #X connect 29 0 30 0; #X connect 31 0 32 0; #X connect 33 0 35 0; #X connect 35 0 34 0; iem_utils-v0.0.20181004/iem_tab/tab_const-help.pd0000644000175000017500000000411112630366350021511 0ustar zmoelnigzmoelnig#N canvas 117 93 790 448 10; #N canvas 0 22 450 300 (subpatch) 0; #X array dst 100 float 1; #A 0 0 0 0 0 0 0 0.0428571 0.1 0.128571 0.185714 0.257143 0.3 0.371429 0.428571 0.471429 0.557143 0.614286 0.671429 0.4 0.171429 0.0714286 -0.0857142 -0.285714 -0.557143 -0.542857 -0.485714 -0.457143 -0.428571 -0.357143 -0.314286 -0.271429 -0.221429 -0.171429 -0.128571 -0.0857143 -0.0428571 1.49012e-08 0.0428572 0.0857143 0.128571 0.171429 0.271429 0.357143 0.442857 0.471429 -0.514286 -0.514286 -0.485714 -0.428571 -0.342857 -0.292857 -0.242857 -0.2 -0.157143 -0.0285715 0.0357142 0.1 0.152381 0.204762 0.257143 0.321429 0.385714 0.435714 0.485714 0.528571 0.571429 0.621429 -0.242857 -0.414286 -0.414286 -0.4 -0.357143 -0.328571 -0.3 -0.257143 -0.214286 -0.185714 -0.157143 -0.128571 -0.0785714 -0.0285714 0.00476191 0.0380952 0.0714286 0.114286 0.157143 0.2 0.242857 0.278571 0.314286 -0.228571 -0.242857 -0.214286 -0.2 -0.142857 -0.114286 -0.0714285 -0.0285714 3.53903e-08 0.114286; #X coords 0 1 99 -1 200 140 1; #X restore 518 36 graph; #X obj 61 31 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X obj 61 130 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X obj 60 302 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X msg 122 218 dst dst; #X obj 61 102 tab_const dst; #X msg 60 195 30 50 0.5; #X text 172 270 1.arg: destination-name; #X obj 60 261 tab_const dst; #X msg 82 59 -0.7; #X msg 114 78 0.8; #X text 11 6 tab_const; #X text 90 29 set all samples of array to zero; #X text 114 58 set all samples of array to this float value ; #X text 55 163 1.) dst onset; #X text 55 174 2.) n samples to set; #X text 190 257 initial arguments:; #X text 174 219 xxx : change destination name; #X text 75 374 IEM KUG; #X text 54 362 musil; #X text 89 362 @; #X text 97 362 iem.at; #X text 58 384 Graz \, Austria; #X text 65 280 output; #X text 43 153 list of 2 floats:; #X text 10 351 (c) Thomas Musil 2000 - 2009; #X connect 1 0 5 0; #X connect 4 0 8 0; #X connect 5 0 2 0; #X connect 6 0 8 0; #X connect 8 0 3 0; #X connect 9 0 5 0; #X connect 10 0 5 0; iem_utils-v0.0.20181004/iem_tab/tab_dbtopow-help.pd0000644000175000017500000000441612630366350022051 0ustar zmoelnigzmoelnig#N canvas 369 22 790 417 10; #N canvas 0 22 450 300 (subpatch) 0; #X array src 100 float 1; #A 0 0.0214324 5.77858 10.0643 15.0643 17.2072 22.2072 31.4929 33.6358 37.2072 38.9929 40.7786 45.0644 49.3501 51.4929 53.6358 55.4215 57.2072 59.3501 61.493 62.6834 63.8739 65.0644 66.8501 68.6358 70.4215 70.7787 71.493 72.9215 73.2787 73.6358 75.0644 75.4216 75.7787 76.493 76.8501 77.2073 77.5644 77.9216 78.6358 79.3501 80.0644 80.7787 81.493 81.8501 82.2073 83.6358 84.3501 85.0644 85.4216 85.7787 87.2073 87.5644 87.9216 88.6359 89.3501 90.0644 90.7787 90.7787 91.493 92.2073 92.2073 92.2073 92.2073 92.2073 92.2073 92.2073 93.6359 93.6359 93.6359 93.6359 93.6359 93.6359 93.6359 93.6359 93.6359 93.6359 93.6359 93.6359 93.6359 94.3502 94.3502 94.3502 95.0644 95.0644 95.7787 96.493 96.493 96.493 97.9216 98.6359 98.6359 99.3502 99.3502 99.3502 100.064 100.064 100.064 100.064 100.779 100.779; #X coords 0 100 99 0 200 140 1; #X restore 534 10 graph; #N canvas 0 22 450 300 (subpatch) 0; #X array dst 100 float 0; #X coords 0 1 99 0 200 140 1; #X restore 534 166 graph; #X obj 61 31 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X obj 61 106 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X obj 59 301 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X msg 59 211 50 20 50; #X text 44 154 list of 3 floats:; #X text 222 273 1.arg: source-name; #X text 222 286 2.arg: destination-name; #X msg 154 213 src src; #X msg 185 234 dst dst; #X text 78 365 IEM KUG; #X text 57 353 musil; #X text 92 353 @; #X text 100 353 iem.at; #X text 61 375 Graz \, Austria; #X text 56 165 1.) src onset; #X text 56 175 2.) dst onset; #X text 231 261 initial arguments:; #X text 68 283 output; #X text 208 213 xxx : change source name; #X text 240 233 xxx : change destination name; #X text 205 69 (the number of samples which are copied are:; #X text 218 83 the minimum of both array lengths); #X text 13 342 (c) Thomas Musil 2000 - 2010; #X text 57 185 3.) n samples of dbtorms; #X text 12 4 tab_dbtopow; #X text 91 32 calculates the dbtopow-value from src to dst; #X obj 61 79 tab_dbtopow src dst; #X obj 59 264 tab_dbtopow src dst; #X connect 2 0 28 0; #X connect 5 0 29 0; #X connect 9 0 29 0; #X connect 10 0 29 0; #X connect 28 0 3 0; #X connect 29 0 4 0; iem_utils-v0.0.20181004/iem_tab/tab_ne_scalar-help.pd0000644000175000017500000000461012630366350022316 0ustar zmoelnigzmoelnig#N canvas 22 55 880 584 10; #N canvas 0 0 450 300 graph1 0; #X array src 100 float 1; #A 0 -0.5 -0.5 -0.5 -0.5 -0.5 -0.5 -0.5 -0.5 -0.5 -0.485714 -0.457143 -0.4 -0.285713 -0.0571409 0.157146 0.328575 0.442861 0.557148 0.628577 0.714292 0.800006 0.85715 0.885721 0.885721 0.871435 0.842864 0.757149 0.557148 0.41429 0.257146 -0.0142835 -0.314285 -0.528572 -0.714287 -0.757145 -0.757145 -0.757145 -0.742859 -0.742859 -0.728573 -0.714287 -0.685715 -0.657144 -0.585715 -0.528572 -0.4 -0.242856 -0.0428551 0.157146 0.342861 0.51429 0.728577 0.800006 0.828578 0.828578 0.828578 0.828578 0.800006 0.771435 0.714292 0.571433 0.41429 0.242861 0.0857169 -0.0571409 -0.242856 -0.385714 -0.542858 -0.685716 -0.757145 -0.800002 -0.828574 -0.828574 -0.814288 -0.800002 -0.785716 -0.757145 -0.728573 -0.67143 -0.585715 -0.471429 -0.271428 -0.0857125 0.114288 0.228575 0.314289 0.385718 0.414285 0.428571 0.457143 0.471428 0.485714 0.485714 0.5 0.5 0.5 0.5 0.5 0.5 0.5; #X coords 0 1 99 -1 200 140 1; #X restore 527 116 graph; #N canvas 0 0 450 300 graph1 0; #X array dst 100 float 0; #X coords 0 1 99 -1 200 140 1; #X restore 527 325 graph; #X obj 61 106 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X obj 59 370 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X msg 178 272 dst dst; #X msg 129 249 src src; #X msg 47 36 0.5; #X msg 82 37 -0.5; #X text 201 332 1.arg: source-name; #X text 201 345 2.arg: destination-name; #X text 31 163 list of 4 floats:; #X text 78 475 IEM KUG; #X text 62 463 musil; #X text 92 463 @; #X text 98 463 iem.at; #X text 61 485 Graz \, Austria; #X text 13 452 (c) Thomas Musil 2000 - 2006; #X text 224 318 initial arguments:; #X text 75 351 output; #X text 229 272 xxx : change destination name; #X text 218 86 the minimum of both array lengths); #X text 182 248 xxx : change source name; #X text 42 179 1.) src onset; #X text 42 190 2.) dst onset; #X text 42 200 3.) n samples to compare; #X text 42 210 4.) compared scalar value; #X text 12 3 tab_ne_scalar; #X text 129 29 compare "not equal to" the src-array with this scalar to dst-array; #X obj 61 78 tab_ne_scalar src dst; #X text 205 72 (the number of samples which were compared are:; #X msg 48 228 0 0 100 0.5; #X obj 59 331 tab_ne_scalar src dst; #X connect 4 0 31 0; #X connect 5 0 31 0; #X connect 6 0 28 0; #X connect 7 0 28 0; #X connect 28 0 2 0; #X connect 30 0 31 0; #X connect 31 0 3 0; iem_utils-v0.0.20181004/iem_tab/tab_complex_mul-help.pd0000644000175000017500000000702712630366350022720 0ustar zmoelnigzmoelnig#N canvas 132 30 862 634 10; #N canvas 0 22 450 300 (subpatch) 0; #X array re1 100 float 0; #X coords 0 1 99 -1 100 40 1; #X restore 481 29 graph; #X obj 61 43 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X obj 61 106 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X obj 54 439 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #N canvas 0 22 450 300 (subpatch) 0; #X array im1 100 float 0; #X coords 0 1 99 -1 100 40 1; #X restore 481 71 graph; #N canvas 0 22 450 300 (subpatch) 0; #X array re2 100 float 0; #X coords 0 1 99 -1 100 40 1; #X restore 606 29 graph; #N canvas 0 22 450 300 (subpatch) 0; #X array im2 100 float 0; #X coords 0 1 99 -1 100 40 1; #X restore 606 71 graph; #N canvas 0 22 450 300 (subpatch) 0; #X array re3 100 float 0; #X coords 0 1 99 -1 100 40 1; #X restore 735 28 graph; #N canvas 0 22 450 300 (subpatch) 0; #X array im3 100 float 0; #X coords 0 1 99 -1 100 40 1; #X restore 735 70 graph; #X msg 710 152 \; re1 const 0.9 \; im1 const 0.6 \; re2 const 0.7 \; im2 const -0.8; #X obj 61 78 tab_complex_mul re1 im1 re2 im2 re3 im3; #X obj 662 472 tabread re3; #X obj 745 472 tabread im3; #X msg 711 439 2; #X floatatom 662 495 5 0 0 0 - - -; #X floatatom 745 496 5 0 0 0 - - -; #X obj 692 350 *; #X obj 715 350 *; #X obj 760 350 *; #X obj 783 350 *; #X obj 767 372 +; #X obj 698 372 -; #X msg 692 304 0.9 0.7; #X msg 715 328 0.6 -0.8; #X floatatom 699 395 5 0 0 0 - - -; #X msg 760 305 0.9 -0.8; #X msg 777 329 0.6 0.7; #X floatatom 767 394 5 0 0 0 - - -; #X obj 54 418 tab_complex_mul re1 im1 re2 im2 re3 im3; #X msg 74 258 src1_re re1; #X msg 191 368 dst_re re3; #X msg 232 391 dst_im im3; #X msg 91 284 src1_im im1; #X msg 143 309 src2_re re2; #X msg 161 335 src2_im im2; #X msg 40 234 0 0 0 0 0 0 64; #X text 84 146 list of 7 floats:; #X text 353 419 1.arg: real_source1-name; #X text 353 431 2.arg: imag_source1-name; #X text 353 443 3.arg: real_source2-name; #X text 354 454 4.arg: imag_source2-name; #X text 354 466 5.arg: real_destination-name; #X text 354 477 6.arg: imag_destination-name; #X obj 728 281 t b b b b; #X obj 728 257 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X obj 710 131 loadbang; #X text 87 537 IEM KUG; #X text 66 525 musil; #X text 101 525 @; #X text 109 525 iem.at; #X text 70 547 Graz \, Austria; #X text 12 7 tab_complex_mul; #X text 375 407 initial arguments:; #X text 115 99 (the number of samples which were multiplied are:; #X text 105 155 1.) src1_re-onset; #X text 105 165 2.) src1_im-onset; #X text 105 175 3.) src2_re-onset; #X text 105 185 4.) src2_im-onset; #X text 105 195 5.) dst_re-onset; #X text 105 205 6.) dst_im-onset; #X text 105 215 7.) number of samples to multiply; #X text 81 39 multiply the complex src1-arrays with the complex src2-arrays to complex dst-array; #X text 128 113 the minimum of the 6 array lengths); #X text 22 514 (c) Thomas Musil 2000 - 2009; #X connect 1 0 10 0; #X connect 10 0 2 0; #X connect 11 0 14 0; #X connect 12 0 15 0; #X connect 13 0 11 0; #X connect 13 0 12 0; #X connect 16 0 21 0; #X connect 17 0 21 1; #X connect 18 0 20 0; #X connect 19 0 20 1; #X connect 20 0 27 0; #X connect 21 0 24 0; #X connect 22 0 16 0; #X connect 23 0 17 0; #X connect 25 0 18 0; #X connect 26 0 19 0; #X connect 28 0 3 0; #X connect 29 0 28 0; #X connect 30 0 28 0; #X connect 31 0 28 0; #X connect 32 0 28 0; #X connect 33 0 28 0; #X connect 34 0 28 0; #X connect 35 0 28 0; #X connect 43 0 22 0; #X connect 43 1 23 0; #X connect 43 2 25 0; #X connect 43 3 26 0; #X connect 44 0 43 0; #X connect 45 0 9 0; iem_utils-v0.0.20181004/iem_tab/tab_add-help.pd0000644000175000017500000000721512630366350021123 0ustar zmoelnigzmoelnig#N canvas 116 92 859 564 10; #N canvas 0 22 450 300 (subpatch) 0; #X array src1 100 float 1; #A 0 -0.442858 -0.414287 -0.385715 -0.342858 -0.314287 -0.257144 -0.128572 -0.0428573 0.128572 0.228572 0.285715 0.328572 0.400001 0.414287 0.457144 0.457144 0.442858 0.385715 0.314287 0.257144 0.214286 0.1 0.0428572 -0.0142858 -0.0428573 -0.114286 -0.142858 -0.200001 -0.242858 -0.285715 -0.328572 -0.342858 -0.37143 -0.385715 -0.414287 -0.414287 -0.414287 -0.414287 -0.400001 -0.357144 -0.314287 -0.257144 -0.185715 -0.0714288 0.0142857 0.0571429 0.171429 0.328572 0.400001 0.442858 0.47143 0.485715 0.485715 0.485715 0.485715 0.485715 0.442858 0.357144 0.242858 0.185715 0.114286 0.0714285 -0.071429 -0.242858 -0.300001 -0.328573 -0.357144 -0.37143 -0.385715 -0.400001 -0.442858 -0.457144 -0.47143 -0.457144 -0.428573 -0.400001 -0.378573 -0.328572 -0.271429 -0.242858 -0.200001 -0.128572 -0.0428574 -0.0285717 0.0142858 0.114286 0.128572 0.185715 0.214286 0.257144 0.285715 0.314287 0.342858 0.357144 0.357144 0.357144 0.357144 0.357144 0.342858 0.328572; #X coords 0 1 99 -1 200 140 1; #X restore 534 10 graph; #N canvas 0 22 450 300 (subpatch) 0; #X array dst 100 float 0; #X coords 0 1 99 -1 200 140 1; #X restore 535 358 graph; #X obj 61 31 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X obj 61 106 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X obj 59 340 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X msg 255 276 dst dst; #N canvas 0 22 450 300 (subpatch) 0; #X array src2 100 float 1; #A 0 0.557135 0.57142 0.557135 0.528564 0.499992 0.428564 0.357136 0.299994 0.0999951 -0.0571467 -0.157146 -0.228574 -0.300002 -0.328573 -0.357145 -0.385716 -0.400001 -0.400001 -0.385716 -0.385716 -0.37143 -0.364287 -0.357145 -0.328573 -0.300002 -0.271431 -0.24286 -0.214288 -0.14286 -0.085718 -0.0428611 -4.28595e-06 0.0428526 0.099995 0.171423 0.21428 0.257137 0.328565 0.371422 0.428564 0.457135 0.485707 0.499992 0.514278 0.499992 0.471421 0.44285 0.414279 0.357136 0.285708 0.171423 0.0999952 0.0142815 -0.100003 -0.214288 -0.314288 -0.385716 -0.457144 -0.471429 -0.514286 -0.500001 -0.47143 -0.442858 -0.414287 -0.37143 -0.300002 -0.228574 -0.157146 -0.0714324 0.0571381 0.128566 0.199994 0.271422 0.34285 0.414278 0.457135 0.485707 0.499992 0.528563 0.542849 0.499992 0.457135 0.428564 0.371422 0.314279 0.242851 0.0857095 -0.0857178 -0.271431 -0.400001 -0.514286 -0.542858 -0.557143 -0.585714 -0.585714 -0.6 -0.6 -0.614286 -0.614286 -0.614286; #X coords 0 1 99 -1 200 140 1; #X restore 535 161 graph; #X msg 136 233 src1 src1; #X msg 195 255 src2 src2; #X msg 59 211 50 50 20 50; #X text 45 139 list of 4 floats:; #X text 212 353 3.arg: destination-name; #X text 90 29 add the 2 src-arrays to dst-array; #X obj 61 78 tab_add src1 src2 dst; #X obj 59 301 tab_add src1 src2 dst; #X text 78 435 IEM KUG; #X text 58 423 musil; #X text 92 423 @; #X text 100 423 iem.at; #X text 61 445 Graz \, Austria; #X text 234 312 initial arguments:; #X text 72 319 output; #X text 306 275 xxx : change destination name; #X text 12 3 tab_add; #X text 225 86 the minimum of the 3 array lengths); #X text 56 177 3.) dst onset; #X text 56 155 1.) src_1 onset; #X text 56 166 2.) src_2 onset; #X text 56 187 4.) n samples to add; #X text 199 233 xxx : change source name 1; #X text 257 255 xxx : change source name 2; #X text 211 326 1.arg: source-name 1; #X text 211 339 2.arg: source-name 2; #X text 212 72 (the number of samples which were added are:; #X text 13 412 (c) Thomas Musil 2000 - 2009; #X connect 2 0 13 0; #X connect 5 0 14 0; #X connect 7 0 14 0; #X connect 8 0 14 0; #X connect 9 0 14 0; #X connect 13 0 3 0; #X connect 14 0 4 0; iem_utils-v0.0.20181004/iem_tab/tab_conv-help.pd0000644000175000017500000000716412630366350021343 0ustar zmoelnigzmoelnig#N canvas 18 36 1204 616 10; #X obj 55 56 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X obj 55 97 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #N canvas 0 22 711 532 init_tables 0; #X obj 45 113 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 1 ; #X obj 133 200 noise~; #X obj 104 144 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X obj 149 15 inlet; #X obj 149 37 t b; #X obj 188 99 del 100; #X msg 53 82 1; #X msg 188 122 0; #X obj 167 64 del 100; #X obj 134 234 tabwrite~ in; #X obj 228 235 tabwrite~ filt; #X obj 229 180 *~ 10; #N canvas 0 22 238 185 dsp 0; #X msg 28 63 \; pd dsp \$1; #X obj 28 34 inlet; #X connect 1 0 0 0; #X restore 45 132 pd dsp; #N canvas 448 145 458 308 dirac~ 0; #X obj 75 23 inlet; #X obj 75 96 sig~; #X obj 75 121 biquad~ 0 0 1 -1 0; #X obj 75 143 clip~ 0 1; #X obj 75 169 outlet~; #X obj 110 48 del 2; #X msg 75 49 1; #X msg 111 69 0; #X connect 0 0 5 0; #X connect 0 0 6 0; #X connect 1 0 2 0; #X connect 2 0 3 0; #X connect 3 0 4 0; #X connect 5 0 7 0; #X connect 6 0 1 0; #X connect 7 0 1 0; #X restore 229 155 pd dirac~; #X obj 229 209 bp~ 1000 10; #X connect 0 0 12 0; #X connect 1 0 9 0; #X connect 2 0 9 0; #X connect 2 0 10 0; #X connect 3 0 4 0; #X connect 4 0 6 0; #X connect 4 0 8 0; #X connect 5 0 7 0; #X connect 6 0 0 0; #X connect 7 0 0 0; #X connect 8 0 5 0; #X connect 8 0 2 0; #X connect 8 0 13 0; #X connect 11 0 14 0; #X connect 13 0 11 0; #X connect 14 0 10 0; #X restore 678 278 pd init_tables; #X obj 678 233 loadbang; #N canvas 0 22 450 300 (subpatch) 0; #X array in 800 float 0; #X coords 0 1 799 -1 399 100 1; #X restore 483 25 graph; #N canvas 0 22 450 300 (subpatch) 0; #X array filt 200 float 0; #X coords 0 0.1 199 -0.1 99 100 1; #X restore 483 219 graph; #N canvas 0 22 450 300 (subpatch) 0; #X array out 800 float 0; #X coords 0 1 799 -1 399 100 1; #X restore 483 382 graph; #X text 94 464 IEM KUG; #X text 73 452 musil; #X text 108 452 @; #X text 116 452 iem.at; #X text 77 474 Graz \, Austria; #X text 248 365 initial arguments:; #X text 78 97 (the number of samples which were correlated are: the positive minimum of the difference (src1-src2) and dst array lengths) ; #X text 226 377 1.arg: source1-name; #X text 226 389 2.arg: source2-name; #X text 226 401 3.arg: destination-name; #X msg 77 302 bang; #X obj 678 257 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X text 12 12 tab_conv; #X obj 55 75 tab_conv in filt out; #X text 29 441 (c) Thomas Musil 2000 - 2009; #X msg 109 324 src1 in; #X msg 124 345 src2 filt; #X msg 135 366 dst out; #X obj 63 394 tab_conv in filt out; #X msg 54 251 0 0 0 800 200; #N canvas 0 22 450 300 (subpatch) 0; #X array in2 16 float 2; #X coords 0 1 16 -1 160 100 1; #X restore 903 25 graph; #N canvas 0 22 450 300 (subpatch) 0; #X array filt2 4 float 2; #X coords 0 1 4 -1 40 100 1; #X restore 903 151 graph; #N canvas 0 22 450 300 (subpatch) 0; #X array out2 19 float 2; #X coords 0 1 19 -1 190 100 1; #X restore 903 282 graph; #X obj 972 227 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X obj 972 246 tab_conv in2 filt2 out2; #X msg 971 139 \; filt2 0 0.9 0.7 0.5 0.3 \; in2 const 0 \; in2 1 0.9 \; in2 8 0.9 \; in2 14 -0.9; #X text 162 250 not working yet; #X text 25 158 !!! array length of src1 + array length of src2 - 1 ; #X text 391 158 >= array length of dst !!!; #X text 78 39 convolutes the 2nd array "src2" with the 1st array "src1" to the destination array "dst"; #X connect 0 0 20 0; #X connect 3 0 18 0; #X connect 17 0 25 0; #X connect 18 0 2 0; #X connect 20 0 1 0; #X connect 22 0 25 0; #X connect 23 0 25 0; #X connect 24 0 25 0; #X connect 26 0 25 0; #X connect 30 0 31 0; iem_utils-v0.0.20181004/iem_tab/READ_ME.txt0000644000175000017500000000366713355471365020146 0ustar zmoelnigzmoelnigThis library extends the performance of Miller S. Puckette's realtime-computermusic-environment puredata (pd). iem_tab contains 1 external library "iem_tab.dll" with 44 objects and their help files (see CONTENT.txt). The main topic is the manipulation of table contents. iem_tab is published under the Gnu Lesser General Public License (see LICENSE.txt and GnuLGPL.txt). iem_tab (Release 1.21) is written by Thomas Musil from IEM KUG Graz Austria and it is compiled against pd-0.48-1. You have to add the library -lib iem_tab (Menue: File: Preferences: Startup...: New...). For Windows "install_path" could be: "C:/Users/xx_ME_xx/AppData/Roaming/Pd" or "C:/Program Files (x86)/Common Files/Pd" or "C:/Users/xx_ME_xx/Documents/Pd/externals" or "C:/Program Files (x86)/pd/extra". For Apple OSX: "install_path" could be: "~/Library/Pd" or "/Library/Pd" or "/Applications/Pd.app/Contents/Resources/extra". For Linux: "install_path" could be: "~/.local/lib/pd/extra" or "~/pd-externals" or "/usr/local/lib/pd-externals" or "/usr/local/lib/pd/extra" or "/usr/lib/pd/extra". Make sure that you get the desired version of iem_tab if there are multiple installations on your computer (-verbose). Copyright (C) 2000-2018 Thomas MUSIL [musil_at_iem.at] THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. iem_utils-v0.0.20181004/iem_tab/tab_lt-help.pd0000644000175000017500000000647112630366350021015 0ustar zmoelnigzmoelnig#N canvas 116 92 859 564 10; #N canvas 0 0 450 300 graph1 0; #X array src1 100 float 1; #A 0 -0.442858 -0.414287 -0.385715 -0.342858 -0.314287 -0.257144 -0.128572 -0.0428573 0.128572 0.228572 0.285715 0.328572 0.400001 0.414287 0.457144 0.457144 0.442858 0.385715 0.314287 0.257144 0.214286 0.1 0.0428572 -0.0142858 -0.0428573 -0.114286 -0.142858 -0.200001 -0.242858 -0.285715 -0.328572 -0.342858 -0.37143 -0.385715 -0.414287 -0.414287 -0.414287 -0.414287 -0.400001 -0.357144 -0.314287 -0.257144 -0.185715 -0.0714288 0.0142857 0.0571429 0.171429 0.328572 0.400001 0.442858 0.47143 0.485715 0.485715 0.485715 0.485715 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.485715 0.471429 0.457144 0.442858 0.442858 0.428572 0.414286 0.385715 0.357143 0.342858 0.314286 0.285715 0.242857 0.185714 0.142857 0.114286 0.085714; #X coords 0 1 99 -1 200 140 1; #X restore 534 10 graph; #N canvas 0 0 450 300 graph1 0; #X array dst 100 float 0; #X coords 0 1 99 -1 200 140 1; #X restore 535 358 graph; #X obj 61 31 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X obj 61 106 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X obj 59 340 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X msg 255 276 dst dst; #N canvas 0 0 450 300 graph1 0; #X array src2 100 float 1; #A 0 0.557135 0.57142 0.557135 0.528564 0.499992 0.428564 0.357136 0.299994 0.0999951 -0.0571467 -0.157146 -0.228574 -0.300002 -0.328573 -0.357145 -0.385716 -0.400001 -0.400001 -0.385716 -0.385716 -0.37143 -0.364287 -0.357145 -0.328573 -0.300002 -0.271431 -0.24286 -0.214288 -0.14286 -0.085718 -0.0428611 -4.28595e-006 0.0428526 0.099995 0.171423 0.21428 0.257137 0.328565 0.371422 0.442849 0.457135 0.471421 0.471421 0.485706 0.485706 0.485706 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.485714 0.471429 0.457135 0.428564 0.371422 0.314279 0.242851 0.0857095 -0.0857178 -0.271431 -0.400001 -0.514286 -0.542858 -0.557143 -0.585714 -0.585714 -0.6 -0.6 -0.614286 -0.614286 -0.614286; #X coords 0 1 99 -1 200 140 1; #X restore 535 161 graph; #X msg 136 233 src1 src1; #X msg 195 255 src2 src2; #X msg 59 211 50 50 20 50; #X text 45 139 list of 4 floats:; #X text 212 353 3.arg: destination-name; #X text 78 435 IEM KUG; #X text 62 423 musil; #X text 92 423 @; #X text 98 423 iem.at; #X text 61 445 Graz \, Austria; #X text 13 412 (c) Thomas Musil 2000 - 2006; #X text 234 312 initial arguments:; #X text 72 319 output; #X text 306 275 xxx : change destination name; #X text 208 86 the minimum of the 3 array lengths); #X text 56 177 3.) dst onset; #X text 56 155 1.) src_1 onset; #X text 56 166 2.) src_2 onset; #X text 199 233 xxx : change source name 1; #X text 257 255 xxx : change source name 2; #X text 211 326 1.arg: source-name 1; #X text 211 339 2.arg: source-name 2; #X text 195 72 (the number of samples which were compared are:; #X text 56 187 4.) n samples to compare; #X text 12 3 tab_lt; #X text 90 29 compare less than" the 2 src-arrays to dst-array ; #X obj 61 78 tab_lt src1 src2 dst; #X obj 59 301 tab_lt src1 src2 dst; #X connect 2 0 33 0; #X connect 5 0 34 0; #X connect 7 0 34 0; #X connect 8 0 34 0; #X connect 9 0 34 0; #X connect 33 0 3 0; #X connect 34 0 4 0; iem_utils-v0.0.20181004/iem_tab/tab_gt-help.pd0000644000175000017500000000647512630366350021014 0ustar zmoelnigzmoelnig#N canvas 116 92 859 564 10; #N canvas 0 0 450 300 graph1 0; #X array src1 100 float 1; #A 0 -0.442858 -0.414287 -0.385715 -0.342858 -0.314287 -0.257144 -0.128572 -0.0428573 0.128572 0.228572 0.285715 0.328572 0.400001 0.414287 0.457144 0.457144 0.442858 0.385715 0.314287 0.257144 0.214286 0.1 0.0428572 -0.0142858 -0.0428573 -0.114286 -0.142858 -0.200001 -0.242858 -0.285715 -0.328572 -0.342858 -0.37143 -0.385715 -0.414287 -0.414287 -0.414287 -0.414287 -0.400001 -0.357144 -0.314287 -0.257144 -0.185715 -0.0714288 0.0142857 0.0571429 0.171429 0.328572 0.400001 0.442858 0.47143 0.485715 0.485715 0.485715 0.485715 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.485715 0.471429 0.457144 0.442858 0.442858 0.428572 0.414286 0.385715 0.357143 0.342858 0.314286 0.285715 0.242857 0.185714 0.142857 0.114286 0.085714; #X coords 0 1 99 -1 200 140 1; #X restore 534 10 graph; #N canvas 0 0 450 300 graph1 0; #X array dst 100 float 0; #X coords 0 1 99 -1 200 140 1; #X restore 535 358 graph; #X obj 61 31 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X obj 61 106 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X obj 59 340 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X msg 255 276 dst dst; #N canvas 0 0 450 300 graph1 0; #X array src2 100 float 1; #A 0 0.557135 0.57142 0.557135 0.528564 0.499992 0.428564 0.357136 0.299994 0.0999951 -0.0571467 -0.157146 -0.228574 -0.300002 -0.328573 -0.357145 -0.385716 -0.400001 -0.400001 -0.385716 -0.385716 -0.37143 -0.364287 -0.357145 -0.328573 -0.300002 -0.271431 -0.24286 -0.214288 -0.14286 -0.085718 -0.0428611 -4.28595e-006 0.0428526 0.099995 0.171423 0.21428 0.257137 0.328565 0.371422 0.442849 0.457135 0.471421 0.471421 0.485706 0.485706 0.485706 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.485714 0.471429 0.457135 0.428564 0.371422 0.314279 0.242851 0.0857095 -0.0857178 -0.271431 -0.400001 -0.514286 -0.542858 -0.557143 -0.585714 -0.585714 -0.6 -0.6 -0.614286 -0.614286 -0.614286; #X coords 0 1 99 -1 200 140 1; #X restore 535 161 graph; #X msg 136 233 src1 src1; #X msg 195 255 src2 src2; #X msg 59 211 50 50 20 50; #X text 45 139 list of 4 floats:; #X text 212 353 3.arg: destination-name; #X text 78 435 IEM KUG; #X text 62 423 musil; #X text 92 423 @; #X text 98 423 iem.at; #X text 61 445 Graz \, Austria; #X text 13 412 (c) Thomas Musil 2000 - 2006; #X text 234 312 initial arguments:; #X text 72 319 output; #X text 306 275 xxx : change destination name; #X text 208 86 the minimum of the 3 array lengths); #X text 56 177 3.) dst onset; #X text 56 155 1.) src_1 onset; #X text 56 166 2.) src_2 onset; #X text 199 233 xxx : change source name 1; #X text 257 255 xxx : change source name 2; #X text 211 326 1.arg: source-name 1; #X text 211 339 2.arg: source-name 2; #X text 195 72 (the number of samples which were compared are:; #X text 56 187 4.) n samples to compare; #X text 12 3 tab_gt; #X text 90 29 compare "greater than" the 2 src-arrays to dst-array ; #X obj 61 78 tab_gt src1 src2 dst; #X obj 59 301 tab_gt src1 src2 dst; #X connect 2 0 33 0; #X connect 5 0 34 0; #X connect 7 0 34 0; #X connect 8 0 34 0; #X connect 9 0 34 0; #X connect 33 0 3 0; #X connect 34 0 4 0; iem_utils-v0.0.20181004/iem_tab/CONTENT.txt0000644000175000017500000001116113355471365020150 0ustar zmoelnigzmoelnig content of iem_tab Release 1.21 from March 2018 -------------------- table or array stuff ------------------------------- tab_abs calculates the absolute value of every sample within begin- and end-index tab_add calculates the sum of every sample of 2 tables within begin- and end-index tab_add_scalar calculates the sum of every sample with a scalar value within begin- and end-index tab_carth2polar converts the samples of 2 tables read as carthesian coordinates within begin- and end-index into samples read as polar coordinates tab_complex_inv calculates the complex inversion of every sample of 2 tables within begin- and end-index tab_complex_mul calculates the complex product of every sample of 4 tables within begin- and end-index tab_const sets the content of a table to a scalar value within begin- and end-index tab_conv calculates the convolution of 2 tables within begin- and end-index tab_copy copies the content from one to an other table within begin- and end-index tab_counter increments every sample of destination table in dependency of every sample of the source table within begin- and end-index (if source sample not equal zero then increment destination sample else reset destination sample) tab_cross_corr calculates the cross-correlation of 2 tables within begin- and end-index tab_dbtopow calculates the square value of every midi-db-sample within begin- and end-index tab_dbtorms calculates the root-mean-square value of every midi-db-sample within begin- and end-index tab_div calculates the ratio of every sample of 2 tables within begin- and end-index tab_eq calculates the equal comparsion of every sample of 2 tables within begin- and end-index tab_eq_scalar calculates the equal comparsion of every sample with a scalar value within begin- and end-index tab_fft calculates the complex fourier transformation of 2 tables within begin- and end-index tab_find_exact_peaks calculates the same as tab_find_peaks below (work in progress) tab_find_peaks calculates lists of every relative maximum in a tables within begin- and end-index, the list contains the peak-sorted index, the table-index and the maximum value of a peak tab_ge calculates the greater-equal comparsion of every sample of 2 tables within begin- and end-index tab_ge_scalar calculates the greater-equal comparsion of every sample with a scalar value within begin- and end-index tab_gt calculates the greater-than comparsion of every sample of 2 tables within begin- and end-index tab_gt_scalar calculates the greater-than comparsion of every sample with a scalar value within begin- and end-index tab_get_size calculates the size of a table tab_ifft calculates the complex inverse fourier transformation of 2 tables within begin- and end-index tab_le calculates the less-equal comparsion of every sample of 2 tables within begin- and end-index tab_le_scalar calculates the less-equal comparsion of every sample with a scalar value within begin- and end-index tab_lt calculates the less-than comparsion of every sample of 2 tables within begin- and end-index tab_lt_scalar calculates the less-than comparsion of every sample with a scalar value within begin- and end-index tab_max_index calculates the maximum value and its index of all samples within begin- and end-index tab_min_index calculates the minimum value and its index of all samples within begin- and end-index tab_min_max calculates the minimum and the maximum value all samples within begin- and end-index tab_mul calculates the product of every sample of 2 tables within begin- and end-index tab_mul_scalar calculates the product of every sample with a scalar value within begin- and end-index tab_ne calculates the not-equal comparsion of every sample of 2 tables within begin- and end-index tab_ne_scalar calculates the not-equal comparsion of every sample with a scalar value within begin- and end-index tab_powtodb calculates the midi-db value of every square-value-sample within begin- and end-index tab_reverse reverses the order of all samples of a table within begin- and end-index tab_rfft calculates the real fourier transformation of a table within begin- and end-index tab_rifft calculates the real inverse fourier transformation of 2 tables within begin- and end-index tab_rmstodb calculates the midi-db value of every root-mean-square-sample within begin- and end-index tab_sqrt calculates the squareroot value of every sample within begin- and end-index tab_sub calculates the difference of every sample of 2 tables within begin- and end-index tab_sum calculates the sum of all samples of a table within begin- and end-index iem_utils-v0.0.20181004/iem_tab/tab_reverse-help.pd0000644000175000017500000000466012630366350022047 0ustar zmoelnigzmoelnig#N canvas 96 21 782 474 10; #N canvas 0 0 450 300 graph1 0; #X array src 100 float 1; #A 0 -0.871431 -0.84286 -0.814288 -0.814288 -0.800002 -0.771431 -0.757145 -0.742859 -0.728574 -0.714288 -0.685716 -0.671431 -0.657145 -0.642859 -0.628573 -0.614288 -0.600002 -0.585716 -0.57143 -0.542859 -0.542859 -0.528573 -0.514287 -0.500002 -0.485716 -0.47143 -0.457144 -0.442859 -0.428573 -0.414287 -0.400002 -0.385716 -0.385716 -0.357144 -0.342859 -0.342859 -0.328573 -0.314287 -0.300001 -0.285716 -0.27143 -0.257144 -0.228573 -0.228573 -0.200001 -0.185715 -0.185715 -0.17143 -0.142858 -0.142858 -0.128572 -0.114287 -0.085715 -0.085715 -0.0571435 -0.028572 -0.0142863 -5.01052e-007 0.0142853 0.028571 0.0571425 0.0714283 0.0714283 0.0999998 0.114286 0.142857 0.142857 0.171429 0.185714 0.214286 0.228572 0.242857 0.257143 0.285715 0.3 0.328572 0.342858 0.357143 0.371429 0.400001 0.414286 0.428572 0.457143 0.471429 0.485715 0.500001 0.514286 0.542858 0.571429 0.585715 0.600001 0.628572 0.642858 0.657144 0.685715 0.700001 0.714287 0.742858 0.757144 0.77143; #X coords 0 1 99 -1 200 140 1; #X restore 534 10 graph; #N canvas 0 0 450 300 graph1 0; #X array dst 100 float 0; #X coords 0 1 99 -1 200 140 1; #X restore 534 176 graph; #X obj 61 31 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X obj 61 106 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X obj 61 78 tab_reverse src dst; #X obj 59 341 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X msg 59 211 50 20 50; #X text 195 314 1.arg: source-name; #X text 195 327 2.arg: destination-name; #X msg 116 231 src src; #X msg 166 249 dst dst; #X obj 59 302 tab_reverse src dst; #X text 185 69 (the number of samples which are copied are:; #X text 198 83 the minimum of both array lengths); #X text 12 3 tab_reverse; #X text 90 29 copy value from src to dst in reverse arrangement ; #X text 44 164 list of 3 floats:; #X text 78 415 IEM KUG; #X text 62 403 musil; #X text 92 403 @; #X text 98 403 iem.at; #X text 61 425 Graz \, Austria; #X text 13 392 (c) Thomas Musil 2000 - 2006; #X text 56 175 1.) src onset; #X text 56 185 2.) dst onset; #X text 226 302 initial arguments:; #X text 74 319 output; #X text 173 229 xxx : change source name; #X text 219 248 xxx : change destination name; #X text 56 195 3.) n samples to copy reversal; #X connect 2 0 4 0; #X connect 4 0 3 0; #X connect 6 0 11 0; #X connect 9 0 11 0; #X connect 10 0 11 0; #X connect 11 0 5 0; iem_utils-v0.0.20181004/iem_tab/GnuLGPL.txt0000644000175000017500000006346713355471365020266 0ustar zmoelnigzmoelnig GNU LESSER GENERAL PUBLIC LICENSE Version 2.1, February 1999 Copyright (C) 1991, 1999 Free Software Foundation, Inc. 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. [This is the first released version of the Lesser GPL. It also counts as the successor of the GNU Library Public License, version 2, hence the version number 2.1.] Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public Licenses are intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This license, the Lesser General Public License, applies to some specially designated software packages--typically libraries--of the Free Software Foundation and other authors who decide to use it. You can use it too, but we suggest you first think carefully about whether this license or the ordinary General Public License is the better strategy to use in any particular case, based on the explanations below. When we speak of free software, we are referring to freedom of use, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish); that you receive source code or can get it if you want it; that you can change the software and use pieces of it in new free programs; and that you are informed that you can do these things. To protect your rights, we need to make restrictions that forbid distributors to deny you these rights or to ask you to surrender these rights. These restrictions translate to certain responsibilities for you if you distribute copies of the library or if you modify it. For example, if you distribute copies of the library, whether gratis or for a fee, you must give the recipients all the rights that we gave you. You must make sure that they, too, receive or can get the source code. If you link other code with the library, you must provide complete object files to the recipients, so that they can relink them with the library after making changes to the library and recompiling it. And you must show them these terms so they know their rights. We protect your rights with a two-step method: (1) we copyright the library, and (2) we offer you this license, which gives you legal permission to copy, distribute and/or modify the library. To protect each distributor, we want to make it very clear that there is no warranty for the free library. Also, if the library is modified by someone else and passed on, the recipients should know that what they have is not the original version, so that the original author's reputation will not be affected by problems that might be introduced by others. Finally, software patents pose a constant threat to the existence of any free program. We wish to make sure that a company cannot effectively restrict the users of a free program by obtaining a restrictive license from a patent holder. Therefore, we insist that any patent license obtained for a version of the library must be consistent with the full freedom of use specified in this license. Most GNU software, including some libraries, is covered by the ordinary GNU General Public License. This license, the GNU Lesser General Public License, applies to certain designated libraries, and is quite different from the ordinary General Public License. We use this license for certain libraries in order to permit linking those libraries into non-free programs. When a program is linked with a library, whether statically or using a shared library, the combination of the two is legally speaking a combined work, a derivative of the original library. The ordinary General Public License therefore permits such linking only if the entire combination fits its criteria of freedom. The Lesser General Public License permits more lax criteria for linking other code with the library. We call this license the "Lesser" General Public License because it does Less to protect the user's freedom than the ordinary General Public License. It also provides other free software developers Less of an advantage over competing non-free programs. These disadvantages are the reason we use the ordinary General Public License for many libraries. However, the Lesser license provides advantages in certain special circumstances. For example, on rare occasions, there may be a special need to encourage the widest possible use of a certain library, so that it becomes a de-facto standard. To achieve this, non-free programs must be allowed to use the library. A more frequent case is that a free library does the same job as widely used non-free libraries. In this case, there is little to gain by limiting the free library to free software only, so we use the Lesser General Public License. In other cases, permission to use a particular library in non-free programs enables a greater number of people to use a large body of free software. For example, permission to use the GNU C Library in non-free programs enables many more people to use the whole GNU operating system, as well as its variant, the GNU/Linux operating system. Although the Lesser General Public License is Less protective of the users' freedom, it does ensure that the user of a program that is linked with the Library has the freedom and the wherewithal to run that program using a modified version of the Library. The precise terms and conditions for copying, distribution and modification follow. Pay close attention to the difference between a "work based on the library" and a "work that uses the library". The former contains code derived from the library, whereas the latter must be combined with the library in order to run. GNU LESSER GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License Agreement applies to any software library or other program which contains a notice placed by the copyright holder or other authorized party saying it may be distributed under the terms of this Lesser General Public License (also called "this License"). Each licensee is addressed as "you". A "library" means a collection of software functions and/or data prepared so as to be conveniently linked with application programs (which use some of those functions and data) to form executables. The "Library", below, refers to any such software library or work which has been distributed under these terms. A "work based on the Library" means either the Library or any derivative work under copyright law: that is to say, a work containing the Library or a portion of it, either verbatim or with modifications and/or translated straightforwardly into another language. (Hereinafter, translation is included without limitation in the term "modification".) "Source code" for a work means the preferred form of the work for making modifications to it. For a library, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the library. Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running a program using the Library is not restricted, and output from such a program is covered only if its contents constitute a work based on the Library (independent of the use of the Library in a tool for writing it). Whether that is true depends on what the Library does and what the program that uses the Library does. 1. You may copy and distribute verbatim copies of the Library's complete source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and distribute a copy of this License along with the Library. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Library or any portion of it, thus forming a work based on the Library, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) The modified work must itself be a software library. b) You must cause the files modified to carry prominent notices stating that you changed the files and the date of any change. c) You must cause the whole of the work to be licensed at no charge to all third parties under the terms of this License. d) If a facility in the modified Library refers to a function or a table of data to be supplied by an application program that uses the facility, other than as an argument passed when the facility is invoked, then you must make a good faith effort to ensure that, in the event an application does not supply such function or table, the facility still operates, and performs whatever part of its purpose remains meaningful. (For example, a function in a library to compute square roots has a purpose that is entirely well-defined independent of the application. Therefore, Subsection 2d requires that any application-supplied function or table used by this function must be optional: if the application does not supply it, the square root function must still compute square roots.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Library, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Library, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Library. In addition, mere aggregation of another work not based on the Library with the Library (or with a work based on the Library) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may opt to apply the terms of the ordinary GNU General Public License instead of this License to a given copy of the Library. To do this, you must alter all the notices that refer to this License, so that they refer to the ordinary GNU General Public License, version 2, instead of to this License. (If a newer version than version 2 of the ordinary GNU General Public License has appeared, then you can specify that version instead if you wish.) Do not make any other change in these notices. Once this change is made in a given copy, it is irreversible for that copy, so the ordinary GNU General Public License applies to all subsequent copies and derivative works made from that copy. This option is useful when you wish to copy part of the code of the Library into a program that is not a library. 4. You may copy and distribute the Library (or a portion or derivative of it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange. If distribution of object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place satisfies the requirement to distribute the source code, even though third parties are not compelled to copy the source along with the object code. 5. A program that contains no derivative of any portion of the Library, but is designed to work with the Library by being compiled or linked with it, is called a "work that uses the Library". Such a work, in isolation, is not a derivative work of the Library, and therefore falls outside the scope of this License. However, linking a "work that uses the Library" with the Library creates an executable that is a derivative of the Library (because it contains portions of the Library), rather than a "work that uses the library". The executable is therefore covered by this License. Section 6 states terms for distribution of such executables. When a "work that uses the Library" uses material from a header file that is part of the Library, the object code for the work may be a derivative work of the Library even though the source code is not. Whether this is true is especially significant if the work can be linked without the Library, or if the work is itself a library. The threshold for this to be true is not precisely defined by law. If such an object file uses only numerical parameters, data structure layouts and accessors, and small macros and small inline functions (ten lines or less in length), then the use of the object file is unrestricted, regardless of whether it is legally a derivative work. (Executables containing this object code plus portions of the Library will still fall under Section 6.) Otherwise, if the work is a derivative of the Library, you may distribute the object code for the work under the terms of Section 6. Any executables containing that work also fall under Section 6, whether or not they are linked directly with the Library itself. 6. As an exception to the Sections above, you may also combine or link a "work that uses the Library" with the Library to produce a work containing portions of the Library, and distribute that work under terms of your choice, provided that the terms permit modification of the work for the customer's own use and reverse engineering for debugging such modifications. You must give prominent notice with each copy of the work that the Library is used in it and that the Library and its use are covered by this License. You must supply a copy of this License. If the work during execution displays copyright notices, you must include the copyright notice for the Library among them, as well as a reference directing the user to the copy of this License. Also, you must do one of these things: a) Accompany the work with the complete corresponding machine-readable source code for the Library including whatever changes were used in the work (which must be distributed under Sections 1 and 2 above); and, if the work is an executable linked with the Library, with the complete machine-readable "work that uses the Library", as object code and/or source code, so that the user can modify the Library and then relink to produce a modified executable containing the modified Library. (It is understood that the user who changes the contents of definitions files in the Library will not necessarily be able to recompile the application to use the modified definitions.) b) Use a suitable shared library mechanism for linking with the Library. A suitable mechanism is one that (1) uses at run time a copy of the library already present on the user's computer system, rather than copying library functions into the executable, and (2) will operate properly with a modified version of the library, if the user installs one, as long as the modified version is interface-compatible with the version that the work was made with. c) Accompany the work with a written offer, valid for at least three years, to give the same user the materials specified in Subsection 6a, above, for a charge no more than the cost of performing this distribution. d) If distribution of the work is made by offering access to copy from a designated place, offer equivalent access to copy the above specified materials from the same place. e) Verify that the user has already received a copy of these materials or that you have already sent this user a copy. For an executable, the required form of the "work that uses the Library" must include any data and utility programs needed for reproducing the executable from it. However, as a special exception, the materials to be distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. It may happen that this requirement contradicts the license restrictions of other proprietary libraries that do not normally accompany the operating system. Such a contradiction means you cannot use both them and the Library together in an executable that you distribute. 7. You may place library facilities that are a work based on the Library side-by-side in a single library together with other library facilities not covered by this License, and distribute such a combined library, provided that the separate distribution of the work based on the Library and of the other library facilities is otherwise permitted, and provided that you do these two things: a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities. This must be distributed under the terms of the Sections above. b) Give prominent notice with the combined library of the fact that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work. 8. You may not copy, modify, sublicense, link with, or distribute the Library except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense, link with, or distribute the Library is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 9. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Library or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Library (or any work based on the Library), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Library or works based on it. 10. Each time you redistribute the Library (or any work based on the Library), the recipient automatically receives a license from the original licensor to copy, distribute, link with or modify the Library subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties with this License. 11. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Library at all. For example, if a patent license would not permit royalty-free redistribution of the Library by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Library. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply, and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 12. If the distribution and/or use of the Library is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Library under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 13. The Free Software Foundation may publish revised and/or new versions of the Lesser General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Library specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Library does not specify a license version number, you may choose any version ever published by the Free Software Foundation. 14. If you wish to incorporate parts of the Library into other free programs whose distribution conditions are incompatible with these, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Libraries If you develop a new library, and you want it to be of the greatest possible use to the public, we recommend making it free software that everyone can redistribute and change. You can do so by permitting redistribution under these terms (or, alternatively, under the terms of the ordinary General Public License). To apply these terms, attach the following notices to the library. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Also add information on how to contact you by electronic and paper mail. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the library, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the library `Frob' (a library for tweaking knobs) written by James Random Hacker. , 1 April 1990 Ty Coon, President of Vice That's all there is to it! iem_utils-v0.0.20181004/iem_tab/tab_sub-help.pd0000644000175000017500000000721612630366350021165 0ustar zmoelnigzmoelnig#N canvas 116 92 855 560 10; #N canvas 0 0 450 300 graph1 0; #X array src1 100 float 1; #A 0 -0.442858 -0.414287 -0.385715 -0.342858 -0.314287 -0.257144 -0.128572 -0.0428573 0.128572 0.228572 0.285715 0.328572 0.400001 0.414287 0.457144 0.457144 0.442858 0.385715 0.314287 0.257144 0.214286 0.1 0.0428572 -0.0142858 -0.0428573 -0.114286 -0.142858 -0.200001 -0.242858 -0.285715 -0.328572 -0.342858 -0.37143 -0.385715 -0.414287 -0.414287 -0.414287 -0.414287 -0.400001 -0.357144 -0.314287 -0.257144 -0.185715 -0.0714288 0.0142857 0.0571429 0.171429 0.328572 0.400001 0.442858 0.47143 0.485715 0.485715 0.485715 0.485715 0.485715 0.442858 0.357144 0.242858 0.185715 0.114286 0.0714285 -0.071429 -0.242858 -0.300001 -0.328573 -0.357144 -0.37143 -0.385715 -0.400001 -0.442858 -0.457144 -0.47143 -0.457144 -0.428573 -0.400001 -0.378573 -0.328572 -0.271429 -0.242858 -0.200001 -0.128572 -0.0428574 -0.0285717 0.0142858 0.114286 0.128572 0.185715 0.214286 0.257144 0.285715 0.314287 0.342858 0.357144 0.357144 0.357144 0.357144 0.357144 0.342858 0.328572; #X coords 0 1 99 -1 200 140 1; #X restore 534 20 graph; #N canvas 0 0 450 300 graph1 0; #X array dst 100 float 0; #X coords 0 1 99 -1 200 140 1; #X restore 535 368 graph; #X obj 61 41 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X obj 61 116 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X obj 59 350 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X msg 255 286 dst dst; #N canvas 0 0 450 300 graph1 0; #X array src2 100 float 1; #A 0 0.557135 0.57142 0.557135 0.528564 0.499992 0.428564 0.357136 0.299994 0.0999951 -0.0571467 -0.157146 -0.228574 -0.300002 -0.328573 -0.357145 -0.385716 -0.400001 -0.400001 -0.385716 -0.385716 -0.37143 -0.364287 -0.357145 -0.328573 -0.300002 -0.271431 -0.24286 -0.214288 -0.14286 -0.085718 -0.0428611 -4.28595e-006 0.0428526 0.099995 0.171423 0.21428 0.257137 0.328565 0.371422 0.428564 0.457135 0.485707 0.499992 0.514278 0.499992 0.471421 0.44285 0.414279 0.357136 0.285708 0.171423 0.0999952 0.0142815 -0.100003 -0.214288 -0.314288 -0.385716 -0.457144 -0.471429 -0.514286 -0.500001 -0.47143 -0.442858 -0.414287 -0.37143 -0.300002 -0.228574 -0.157146 -0.0714324 0.0571381 0.128566 0.199994 0.271422 0.34285 0.414278 0.457135 0.485707 0.499992 0.528563 0.542849 0.499992 0.457135 0.428564 0.371422 0.314279 0.242851 0.0857095 -0.0857178 -0.271431 -0.400001 -0.514286 -0.542858 -0.557143 -0.585714 -0.585714 -0.6 -0.6 -0.614286 -0.614286 -0.614286; #X coords 0 1 99 -1 200 140 1; #X restore 535 171 graph; #X msg 136 243 src1 src1; #X msg 195 265 src2 src2; #X msg 59 221 50 50 20 50; #X text 45 149 list of 4 floats:; #X text 212 363 3.arg: destination-name; #X text 78 445 IEM KUG; #X text 62 433 musil; #X text 92 433 @; #X text 98 433 iem.at; #X text 61 455 Graz \, Austria; #X text 13 422 (c) Thomas Musil 2000 - 2006; #X text 234 322 initial arguments:; #X text 72 329 output; #X text 306 285 xxx : change destination name; #X text 208 96 the minimum of the 3 array lengths); #X text 56 187 3.) dst onset; #X text 56 165 1.) src_1 onset; #X text 56 176 2.) src_2 onset; #X text 199 243 xxx : change source name 1; #X text 257 265 xxx : change source name 2; #X text 211 336 1.arg: source-name 1; #X text 211 349 2.arg: source-name 2; #X text 12 13 tab_sub; #X obj 61 88 tab_sub src1 src2 dst; #X obj 59 311 tab_sub src1 src2 dst; #X text 90 39 subtract the 2 src-arrays to dst-array; #X text 56 197 4.) n samples to subtract; #X text 195 82 (the number of samples which were subtracted are:; #X connect 2 0 30 0; #X connect 5 0 31 0; #X connect 7 0 31 0; #X connect 8 0 31 0; #X connect 9 0 31 0; #X connect 30 0 3 0; #X connect 31 0 4 0; iem_utils-v0.0.20181004/iem_tab/tab_powtodb-help.pd0000644000175000017500000000457712630366350022061 0ustar zmoelnigzmoelnig#N canvas 369 22 790 417 10; #N canvas 0 22 450 300 (subpatch) 0; #X array src 100 float 1; #A 0 0.0214324 0.0214324 0.0214324 0.0214324 0.0214324 0.0214324 0.0357179 0.0357179 0.0428607 0.0428607 0.0428607 0.0500035 0.0642891 0.0714318 0.0785746 0.0857174 0.0857174 0.100003 0.100003 0.107146 0.107146 0.114289 0.114289 0.121431 0.121431 0.128574 0.128574 0.135717 0.14286 0.14286 0.14286 0.150002 0.157145 0.157145 0.171431 0.178574 0.185716 0.192859 0.200002 0.214287 0.214287 0.22143 0.228573 0.242859 0.242859 0.257144 0.257144 0.264287 0.278573 0.292858 0.300001 0.314286 0.335715 0.35 0.357143 0.364286 0.378571 0.392857 0.407143 0.414285 0.435714 0.442857 0.449999 0.457142 0.471428 0.485713 0.492856 0.499999 0.521427 0.52857 0.542856 0.542856 0.564284 0.578569 0.599998 0.621426 0.635712 0.642854 0.649997 0.671426 0.685711 0.699997 0.707139 0.714282 0.735711 0.757139 0.764282 0.771425 0.778567 0.799996 0.807138 0.821424 0.83571 0.864281 0.885709 0.885709 0.899995 0.935709 0.949994 0.957137; #X coords 0 1 99 0 200 140 1; #X restore 534 10 graph; #N canvas 0 22 450 300 (subpatch) 0; #X array dst 100 float 0; #X coords 0 100 99 0 200 140 1; #X restore 534 166 graph; #X obj 61 31 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X obj 61 106 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X obj 59 301 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X msg 59 211 50 20 50; #X text 44 154 list of 3 floats:; #X text 222 273 1.arg: source-name; #X text 222 286 2.arg: destination-name; #X msg 154 213 src src; #X msg 185 234 dst dst; #X text 78 365 IEM KUG; #X text 57 353 musil; #X text 92 353 @; #X text 100 353 iem.at; #X text 61 375 Graz \, Austria; #X text 56 165 1.) src onset; #X text 56 175 2.) dst onset; #X text 231 261 initial arguments:; #X text 68 283 output; #X text 208 213 xxx : change source name; #X text 240 233 xxx : change destination name; #X text 205 69 (the number of samples which are copied are:; #X text 218 83 the minimum of both array lengths); #X text 13 342 (c) Thomas Musil 2000 - 2010; #X text 90 29 calculates the powtodb-value from src to dst; #X obj 61 78 tab_powtodb src dst; #X obj 59 264 tab_powtodb src dst; #X text 57 185 3.) n samples of powtodb; #X text 12 4 tab_powtodb; #X connect 2 0 26 0; #X connect 5 0 27 0; #X connect 9 0 27 0; #X connect 10 0 27 0; #X connect 26 0 3 0; #X connect 27 0 4 0; iem_utils-v0.0.20181004/iem_tab/tab_eq-help.pd0000644000175000017500000000651012630366350020775 0ustar zmoelnigzmoelnig#N canvas 116 92 863 568 10; #N canvas 0 22 450 300 (subpatch) 0; #X array src1 100 float 1; #A 0 -0.442858 -0.414287 -0.385715 -0.342858 -0.314287 -0.257144 -0.128572 -0.0428573 0.128572 0.228572 0.285715 0.328572 0.400001 0.414287 0.457144 0.457144 0.442858 0.385715 0.314287 0.257144 0.214286 0.1 0.0428572 -0.0142858 -0.0428573 -0.114286 -0.142858 -0.200001 -0.242858 -0.285715 -0.328572 -0.342858 -0.37143 -0.385715 -0.414287 -0.414287 -0.414287 -0.414287 -0.400001 -0.357144 -0.314287 -0.257144 -0.185715 -0.0714288 0.0142857 0.0571429 0.171429 0.328572 0.400001 0.442858 0.47143 0.485715 0.485715 0.485715 0.485715 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.485715 0.471429 0.457144 0.442858 0.442858 0.428572 0.414286 0.385715 0.357143 0.342858 0.314286 0.285715 0.242857 0.185714 0.142857 0.114286 0.085714; #X coords 0 1 99 -1 200 140 1; #X restore 584 10 graph; #N canvas 0 22 450 300 (subpatch) 0; #X array dst 100 float 0; #X coords 0 1 99 -1 200 140 1; #X restore 585 358 graph; #X obj 61 31 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X obj 61 106 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X obj 59 340 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X msg 255 276 dst dst; #N canvas 0 22 450 300 (subpatch) 0; #X array src2 100 float 1; #A 0 0.557135 0.57142 0.557135 0.528564 0.499992 0.428564 0.357136 0.299994 0.0999951 -0.0571467 -0.157146 -0.228574 -0.300002 -0.328573 -0.357145 -0.385716 -0.400001 -0.400001 -0.385716 -0.385716 -0.37143 -0.364287 -0.357145 -0.328573 -0.300002 -0.271431 -0.24286 -0.214288 -0.14286 -0.085718 -0.0428611 -4.28595e-06 0.0428526 0.099995 0.171423 0.21428 0.257137 0.328565 0.371422 0.442849 0.457135 0.471421 0.471421 0.485706 0.485706 0.485706 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.485714 0.471429 0.457135 0.428564 0.371422 0.314279 0.242851 0.0857095 -0.0857178 -0.271431 -0.400001 -0.514286 -0.542858 -0.557143 -0.585714 -0.585714 -0.6 -0.6 -0.614286 -0.614286 -0.614286; #X coords 0 1 99 -1 200 140 1; #X restore 585 161 graph; #X msg 136 233 src1 src1; #X msg 195 255 src2 src2; #X msg 59 211 50 50 20 50; #X text 45 139 list of 4 floats:; #X text 212 353 3.arg: destination-name; #X text 78 435 IEM KUG; #X text 57 423 musil; #X text 92 423 @; #X text 100 423 iem.at; #X text 61 445 Graz \, Austria; #X text 234 312 initial arguments:; #X text 72 319 output; #X text 316 275 xxx : change destination name; #X text 219 86 the minimum of the 3 array lengths); #X text 56 177 3.) dst onset; #X text 56 155 1.) src_1 onset; #X text 56 166 2.) src_2 onset; #X text 209 233 xxx : change source name 1; #X text 267 255 xxx : change source name 2; #X text 211 326 1.arg: source-name 1; #X text 211 339 2.arg: source-name 2; #X text 12 3 tab_eq; #X text 90 29 compare "equal to" the 2 src-arrays to dst-array ; #X obj 61 78 tab_eq src1 src2 dst; #X text 206 72 (the number of samples which were compared are:; #X text 56 187 4.) n samples to compare; #X obj 59 301 tab_eq src1 src2 dst; #X text 13 412 (c) Thomas Musil 2000 - 2009; #X connect 2 0 30 0; #X connect 5 0 33 0; #X connect 7 0 33 0; #X connect 8 0 33 0; #X connect 9 0 33 0; #X connect 30 0 3 0; #X connect 33 0 4 0; iem_utils-v0.0.20181004/iem_tab/Makefile0000644000175000017500000000444013355471365017737 0ustar zmoelnigzmoelnig#!/usr/bin/make -f # Makefile to the 'iem_tab' library for Pure Data. # Needs Makefile.pdlibbuilder as helper makefile for platform-dependent build # settings and rules (https://github.com/pure-data/pd-lib-builder). lib.name = iem_tab ## iemlib.h lives in include/ cflags = -Iinclude # special file that does not provide a class lib.setup.sources = src/$(lib.name).c # all other C and C++ files in subdirs are source files per class # (alternatively, enumerate them by hand) # class.sources = $(filter-out $(lib.setup.sources),$(wildcard src/*.c)) class.sources = \ src/tab_abs.c \ src/tab_add.c \ src/tab_add_scalar.c \ src/tab_carth2polar.c \ src/tab_complex_inv.c \ src/tab_complex_mul.c \ src/tab_const.c \ src/tab_conv.c \ src/tab_copy.c \ src/tab_counter.c \ src/tab_cross_corr.c \ src/tab_dbtorms.c \ src/tab_dbtopow.c \ src/tab_div.c \ src/tab_eq.c \ src/tab_eq_scalar.c \ src/tab_fft.c \ src/tab_find_exact_peaks.c \ src/tab_find_peaks.c \ src/tab_ge.c \ src/tab_ge_scalar.c \ src/tab_gt.c \ src/tab_gt_scalar.c \ src/tab_get_size.c \ src/tab_ifft.c \ src/tab_le.c \ src/tab_le_scalar.c \ src/tab_lt.c \ src/tab_lt_scalar.c \ src/tab_max_index.c \ src/tab_min_index.c \ src/tab_min_max.c \ src/tab_mul.c \ src/tab_mul_scalar.c \ src/tab_ne.c \ src/tab_ne_scalar.c \ src/tab_powtodb.c \ src/tab_reverse.c \ src/tab_rmstodb.c \ src/tab_rfft.c \ src/tab_rifft.c \ src/tab_sqrt.c \ src/tab_sub.c \ src/tab_sum.c \ $(empty) datafiles = \ $(wildcard *.txt) \ $(wildcard *.pdf) \ $(wildcard *.pd) \ $(wildcard *.gif) \ $(wildcard *.bat) \ $(wildcard *.sh) \ $(wildcard *.wav) \ $(empty) #cflags = -DVERSION=$(shell cat VERSION.txt) ## build a multi-object library make-lib-executable=yes ## suppress "unused" warnings #suppress-wunused=yes ################################################################################ ### pdlibbuilder ############################################################### ################################################################################ # This Makefile is based on the Makefile from pd-lib-builder written by # Katja Vetter. You can get it from: # https://github.com/pure-data/pd-lib-builder PDLIBBUILDER_DIR=pd-lib-builder/ include $(firstword $(wildcard $(PDLIBBUILDER_DIR)/Makefile.pdlibbuilder Makefile.pdlibbuilder)) iem_utils-v0.0.20181004/iem_tab/tab_find_exact_peaks-help.pd0000644000175000017500000000572412630366350023665 0ustar zmoelnigzmoelnig#N canvas 178 103 949 490 10; #X obj 60 52 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X obj 31 331 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X text 249 306 1.arg: source-name; #X floatatom 94 372 5 0 0 0 - - -; #X floatatom 143 373 5 0 0 0 - - -; #X msg 88 78 src src; #X msg 118 102 amp_sort; #X msg 120 124 freq_sort; #X floatatom 198 371 5 0 0 0 - - -; #X obj 263 369 pack 0 0 0; #X obj 263 392 print; #X msg 233 173 abs_min_height_diff 10; #X text 69 385 sort_index; #X text 204 382 amp; #X text 147 387 index; #N canvas 0 22 450 300 (subpatch) 0; #X array src 100 float 1; #A 0 9.99997 9.28569 9.28569 10.7143 7.14284 7.85712 8.5714 39 10 11 38 8.5714 7.85712 8.5714 9.28569 8.5714 9.99997 39 40 41 38 12.8571 12.8571 14.2857 12.8571 11.4285 12.1428 11.4285 9.99997 10.7143 11.4285 9.99997 9.28569 9.28569 9.99997 10.7143 10.7143 45 9.99997 9.99997 10.7143 11.4285 12.1428 10.7143 11.4285 12.1428 11.4285 46 11.4285 11.4285 11.4285 12.1428 12.8571 11.4285 11.4285 12.1428 12.8571 12.1428 12.1428 12.1428 12.1428 12.1428 11.4285 11.4285 11.4285 11.4285 10.7143 48 49 43 11.4285 12.1428 13.5714 15 13.5714 13.5714 14.2857 14.2857 15 15 14.2857 14.2857 14.2857 15 15 15.7142 15.7142 51 53 15 15 15 15 15 14.2857 14.2857 15 15.7142 16.4285 16.4285; #X coords 0 100 99 0 200 140 1; #X restore 658 93 graph; #X msg 171 149 max_peaks 9; #X text 20 347 ready; #X msg 289 194 width_range 1 4; #X msg 289 216 width_range 1 1; #N canvas 0 22 466 316 (subpatch) 0; #X msg 355 125 \; src const 0; #X msg 303 175 \; src 37 45; #X msg 310 223 \; src 47 46; #X msg 187 177 \; src 67 48 49 43; #X msg 180 218 \; src 87 51 53; #X msg 44 223 \; src 7 39 10 11 38; #X msg 50 181 \; src 17 39 40 41 38; #X obj 65 25 loadbang; #X msg 33 50 \; src xticks 0 1 5; #X msg 34 84 \; src xlabel -5.15 0 10 20 30 40 50 60 70 80 90; #X connect 7 0 8 0; #X connect 7 0 9 0; #X restore 716 289 pd; #X obj 314 73 loadbang; #X text 89 50 calculate all peaks (index bin amplitude); #X text 218 61 of an array; #X text 78 442 IEM KUG; #X text 57 430 musil; #X text 92 430 @; #X text 100 430 iem.at; #X text 61 452 Graz \, Austria; #X text 267 296 initial arguments:; #X text 192 111 kind of order; #X text 258 150 maximum number of peaks detected; #X text 395 168 vertical difference between peak; #X text 399 177 and noise; #X text 406 205 width range of peak in bins; #X text 21 6 tab_exact_find_peaks; #X obj 60 302 tab_find_exact_peaks src; #X text 184 7 same like tab_find_peaks; #X text 13 419 (c) Thomas Musil 2000 - 2009; #X msg 289 240 width_range 3 5; #X connect 0 0 36 0; #X connect 5 0 36 0; #X connect 6 0 36 0; #X connect 7 0 36 0; #X connect 9 0 10 0; #X connect 11 0 36 0; #X connect 16 0 36 0; #X connect 18 0 36 0; #X connect 19 0 36 0; #X connect 21 0 6 0; #X connect 21 0 16 0; #X connect 21 0 11 0; #X connect 21 0 18 0; #X connect 36 0 1 0; #X connect 36 1 3 0; #X connect 36 1 9 0; #X connect 36 2 4 0; #X connect 36 2 9 1; #X connect 36 3 8 0; #X connect 36 3 9 2; #X connect 39 0 36 0; iem_utils-v0.0.20181004/iem_tab/tab_get_size-help.pd0000644000175000017500000000312512630366350022200 0ustar zmoelnigzmoelnig#N canvas 116 92 706 333 10; #N canvas 0 22 450 300 (subpatch) 0; #X array src 100 float 1; #A 0 -0.442858 -0.414287 -0.385715 -0.342858 -0.314287 -0.257144 -0.128572 -0.0428573 0.128572 0.228572 0.285715 0.328572 0.400001 0.414287 0.457144 0.457144 0.442858 0.385715 0.314287 0.257144 0.214286 0.1 0.0428572 -0.0142858 -0.0428573 -0.114286 -0.142858 -0.200001 -0.242858 -0.285715 -0.328572 -0.342858 -0.37143 -0.385715 -0.414287 -0.414287 -0.414287 -0.414287 -0.400001 -0.357144 -0.314287 -0.257144 -0.185715 -0.0714288 0.0142857 0.0571429 0.171429 0.328572 0.400001 0.442858 0.47143 0.485715 0.485715 0.485715 0.485715 0.485715 0.442858 0.357144 0.242858 0.185715 0.114286 0.0714285 -0.071429 -0.242858 -0.300001 -0.328573 -0.357144 -0.37143 -0.385715 -0.400001 -0.442858 -0.457144 -0.47143 -0.457144 -0.428573 -0.400001 -0.378573 -0.328572 -0.271429 -0.242858 -0.200001 -0.128572 -0.0428574 -0.0285717 0.0142858 0.114286 0.128572 0.185715 0.214286 0.257144 0.285715 0.314287 0.342858 0.357144 0.357144 0.357144 0.357144 0.357144 0.342858 0.328572; #X coords 0 1 99 -1 200 140 1; #X restore 433 42 graph; #X obj 61 31 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X floatatom 60 102 5 0 0 0 - - -; #X text 93 224 IEM KUG; #X text 72 212 musil; #X text 107 212 @; #X text 115 212 iem.at; #X text 76 234 Graz \, Austria; #X text 201 68 initial arguments:; #X text 11 6 tab_sum; #X text 183 81 1.arg: source-name; #X text 28 201 (c) Thomas Musil 2000 - 2009; #X obj 61 78 tab_get_size src; #X text 56 116 array size; #X text 90 29 calc size of array; #X connect 1 0 12 0; #X connect 12 0 2 0; iem_utils-v0.0.20181004/iem_tab/tab_le-help.pd0000644000175000017500000000650512630366350020774 0ustar zmoelnigzmoelnig#N canvas 116 92 863 568 10; #N canvas 0 0 450 300 graph1 0; #X array src1 100 float 1; #A 0 -0.442858 -0.414287 -0.385715 -0.342858 -0.314287 -0.257144 -0.128572 -0.0428573 0.128572 0.228572 0.285715 0.328572 0.400001 0.414287 0.457144 0.457144 0.442858 0.385715 0.314287 0.257144 0.214286 0.1 0.0428572 -0.0142858 -0.0428573 -0.114286 -0.142858 -0.200001 -0.242858 -0.285715 -0.328572 -0.342858 -0.37143 -0.385715 -0.414287 -0.414287 -0.414287 -0.414287 -0.400001 -0.357144 -0.314287 -0.257144 -0.185715 -0.0714288 0.0142857 0.0571429 0.171429 0.328572 0.400001 0.442858 0.47143 0.485715 0.485715 0.485715 0.485715 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.485715 0.471429 0.457144 0.442858 0.442858 0.428572 0.414286 0.385715 0.357143 0.342858 0.314286 0.285715 0.242857 0.185714 0.142857 0.114286 0.085714; #X coords 0 1 99 -1 200 140 1; #X restore 534 10 graph; #N canvas 0 0 450 300 graph1 0; #X array dst 100 float 0; #X coords 0 1 99 -1 200 140 1; #X restore 535 358 graph; #X obj 61 31 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X obj 61 106 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X obj 59 340 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X msg 255 276 dst dst; #N canvas 0 0 450 300 graph1 0; #X array src2 100 float 1; #A 0 0.557135 0.57142 0.557135 0.528564 0.499992 0.428564 0.357136 0.299994 0.0999951 -0.0571467 -0.157146 -0.228574 -0.300002 -0.328573 -0.357145 -0.385716 -0.400001 -0.400001 -0.385716 -0.385716 -0.37143 -0.364287 -0.357145 -0.328573 -0.300002 -0.271431 -0.24286 -0.214288 -0.14286 -0.085718 -0.0428611 -4.28595e-006 0.0428526 0.099995 0.171423 0.21428 0.257137 0.328565 0.371422 0.442849 0.457135 0.471421 0.471421 0.485706 0.485706 0.485706 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.485714 0.471429 0.457135 0.428564 0.371422 0.314279 0.242851 0.0857095 -0.0857178 -0.271431 -0.400001 -0.514286 -0.542858 -0.557143 -0.585714 -0.585714 -0.6 -0.6 -0.614286 -0.614286 -0.614286; #X coords 0 1 99 -1 200 140 1; #X restore 535 161 graph; #X msg 136 233 src1 src1; #X msg 195 255 src2 src2; #X msg 59 211 50 50 20 50; #X text 45 139 list of 4 floats:; #X text 212 353 3.arg: destination-name; #X text 78 435 IEM KUG; #X text 62 423 musil; #X text 92 423 @; #X text 98 423 iem.at; #X text 61 445 Graz \, Austria; #X text 13 412 (c) Thomas Musil 2000 - 2006; #X text 234 312 initial arguments:; #X text 72 319 output; #X text 306 275 xxx : change destination name; #X text 208 86 the minimum of the 3 array lengths); #X text 56 177 3.) dst onset; #X text 56 155 1.) src_1 onset; #X text 56 166 2.) src_2 onset; #X text 199 233 xxx : change source name 1; #X text 257 255 xxx : change source name 2; #X text 211 326 1.arg: source-name 1; #X text 211 339 2.arg: source-name 2; #X text 195 72 (the number of samples which were compared are:; #X text 56 187 4.) n samples to compare; #X text 12 3 tab_le; #X obj 61 78 tab_le src1 src2 dst; #X obj 59 301 tab_le src1 src2 dst; #X text 90 29 compare "less than or equal to" the 2 src-arrays to dst-array; #X connect 2 0 32 0; #X connect 5 0 33 0; #X connect 7 0 33 0; #X connect 8 0 33 0; #X connect 9 0 33 0; #X connect 32 0 3 0; #X connect 33 0 4 0; iem_utils-v0.0.20181004/iem_tab/tab_mul-help.pd0000644000175000017500000000721612630366350021171 0ustar zmoelnigzmoelnig#N canvas 116 92 853 558 10; #N canvas 0 0 450 300 graph1 0; #X array src1 100 float 1; #A 0 -0.442858 -0.414287 -0.385715 -0.342858 -0.314287 -0.257144 -0.128572 -0.0428573 0.128572 0.228572 0.285715 0.328572 0.400001 0.414287 0.457144 0.457144 0.442858 0.385715 0.314287 0.257144 0.214286 0.1 0.0428572 -0.0142858 -0.0428573 -0.114286 -0.142858 -0.200001 -0.242858 -0.285715 -0.328572 -0.342858 -0.37143 -0.385715 -0.414287 -0.414287 -0.414287 -0.414287 -0.400001 -0.357144 -0.314287 -0.257144 -0.185715 -0.0714288 0.0142857 0.0571429 0.171429 0.328572 0.400001 0.442858 0.47143 0.485715 0.485715 0.485715 0.485715 0.485715 0.442858 0.357144 0.242858 0.185715 0.114286 0.0714285 -0.071429 -0.242858 -0.300001 -0.328573 -0.357144 -0.37143 -0.385715 -0.400001 -0.442858 -0.457144 -0.47143 -0.457144 -0.428573 -0.400001 -0.378573 -0.328572 -0.271429 -0.242858 -0.200001 -0.128572 -0.0428574 -0.0285717 0.0142858 0.114286 0.128572 0.185715 0.214286 0.257144 0.285715 0.314287 0.342858 0.357144 0.357144 0.357144 0.357144 0.357144 0.342858 0.328572; #X coords 0 1 99 -1 200 140 1; #X restore 534 20 graph; #N canvas 0 0 450 300 graph1 0; #X array dst 100 float 0; #X coords 0 1 99 -1 200 140 1; #X restore 535 368 graph; #X obj 61 41 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X obj 61 116 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X obj 59 350 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X msg 255 286 dst dst; #N canvas 0 0 450 300 graph1 0; #X array src2 100 float 1; #A 0 0.557135 0.57142 0.557135 0.528564 0.499992 0.428564 0.357136 0.299994 0.0999951 -0.0571467 -0.157146 -0.228574 -0.300002 -0.328573 -0.357145 -0.385716 -0.400001 -0.400001 -0.385716 -0.385716 -0.37143 -0.364287 -0.357145 -0.328573 -0.300002 -0.271431 -0.24286 -0.214288 -0.14286 -0.085718 -0.0428611 -4.28595e-006 0.0428526 0.099995 0.171423 0.21428 0.257137 0.328565 0.371422 0.428564 0.457135 0.485707 0.499992 0.514278 0.499992 0.471421 0.44285 0.414279 0.357136 0.285708 0.171423 0.0999952 0.0142815 -0.100003 -0.214288 -0.314288 -0.385716 -0.457144 -0.471429 -0.514286 -0.500001 -0.47143 -0.442858 -0.414287 -0.37143 -0.300002 -0.228574 -0.157146 -0.0714324 0.0571381 0.128566 0.199994 0.271422 0.34285 0.414278 0.457135 0.485707 0.499992 0.528563 0.542849 0.499992 0.457135 0.428564 0.371422 0.314279 0.242851 0.0857095 -0.0857178 -0.271431 -0.400001 -0.514286 -0.542858 -0.557143 -0.585714 -0.585714 -0.6 -0.6 -0.614286 -0.614286 -0.614286; #X coords 0 1 99 -1 200 140 1; #X restore 535 171 graph; #X msg 136 243 src1 src1; #X msg 195 265 src2 src2; #X msg 59 221 50 50 20 50; #X text 45 149 list of 4 floats:; #X text 212 363 3.arg: destination-name; #X text 78 445 IEM KUG; #X text 62 433 musil; #X text 92 433 @; #X text 98 433 iem.at; #X text 61 455 Graz \, Austria; #X text 13 422 (c) Thomas Musil 2000 - 2006; #X text 234 322 initial arguments:; #X text 72 329 output; #X text 306 285 xxx : change destination name; #X text 208 96 the minimum of the 3 array lengths); #X text 56 187 3.) dst onset; #X text 56 165 1.) src_1 onset; #X text 56 176 2.) src_2 onset; #X text 199 243 xxx : change source name 1; #X text 257 265 xxx : change source name 2; #X text 211 336 1.arg: source-name 1; #X text 211 349 2.arg: source-name 2; #X text 12 13 tab_mul; #X text 90 39 multiply the 2 src-arrays to dst-array; #X text 195 82 (the number of samples which were multiplied are:; #X text 56 197 4.) n samples to multiply; #X obj 59 311 tab_mul src1 src2 dst; #X obj 61 88 tab_mul src1 src2 dst; #X connect 2 0 34 0; #X connect 5 0 33 0; #X connect 7 0 33 0; #X connect 8 0 33 0; #X connect 9 0 33 0; #X connect 33 0 4 0; #X connect 34 0 3 0; iem_utils-v0.0.20181004/iem_tab/include/0000755000175000017500000000000013355471365017720 5ustar zmoelnigzmoelnigiem_utils-v0.0.20181004/iem_tab/include/iemlib.h0000644000175000017500000001344013355471365021334 0ustar zmoelnigzmoelnig/* For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. iemlib written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2018 */ #ifndef __IEMLIB_H__ #define __IEMLIB_H__ #define IS_A_NULL(atom,index) ((atom+index)->a_type == A_NULL) #define IS_A_POINTER(atom,index) ((atom+index)->a_type == A_POINTER) #define IS_A_FLOAT(atom,index) ((atom+index)->a_type == A_FLOAT) #define IS_A_SYMBOL(atom,index) ((atom+index)->a_type == A_SYMBOL) #define IS_A_DOLLAR(atom,index) ((atom+index)->a_type == A_DOLLAR) #define IS_A_DOLLSYM(atom,index) ((atom+index)->a_type == A_DOLLSYM) #define IS_A_SEMI(atom,index) ((atom+index)->a_type == A_SEMI) #define IS_A_COMMA(atom,index) ((atom+index)->a_type == A_COMMA) #define SETNULL(atom) ((atom)->a_type = A_NULL) #ifdef MSW int sys_noloadbang; //t_symbol *iemgui_key_sym=0; #include #else extern int sys_noloadbang; //extern t_symbol *iemgui_key_sym; #include #endif //millers m_pd.h beg /* Microsoft Visual Studio is not C99, it does not provide stdint.h */ #ifdef _MSC_VER typedef signed __int8 int8_t; typedef signed __int16 int16_t; typedef signed __int32 int32_t; typedef signed __int64 int64_t; typedef unsigned __int8 uint8_t; typedef unsigned __int16 uint16_t; typedef unsigned __int32 uint32_t; typedef unsigned __int64 uint64_t; #else # include #endif #if !defined(PD_FLOATSIZE) /* if compiled pd version < 0.47*/ # define PD_FLOATSIZE 32 #endif typedef union { float f; unsigned int ui; }t_iemdenormal_f; typedef union { double f; unsigned int ui[2]; }t_iemdenormal_d; #ifndef _MSC_VER /* Microoft compiler can't handle "inline" function/macros */ #if defined(__i386__) || defined(__x86_64__) || defined(__arm__) /* a test for NANs and denormals. Should only be necessary on i386. */ static inline int IEM_DENORMAL_F(float f) /* malformed float 32 */ { t_iemdenormal_f pun; pun.f = f; pun.ui &= 0x7f800000; return((pun.ui == 0) | (pun.ui == 0x7f800000)); } static inline int IEM_DENORMAL_D(double f) /* malformed double 64 */ { t_iemdenormal_d pun; pun.f = f; pun.ui[1] &= 0x7ff00000; return((pun.ui[1] == 0) | (pun.ui[1] == 0x7ff00000)); } #if PD_FLOATSIZE == 32 typedef union { t_float f; unsigned int ui; }t_iemdenormal_t32; static inline int IEM_DENORMAL_T(t_float f) /* malformed t_float 32 */ { t_iemdenormal_t32 pun; pun.f = f; pun.ui &= 0x7f800000; return((pun.ui == 0) | (pun.ui == 0x7f800000)); } #elif PD_FLOATSIZE == 64 typedef union { t_float f; unsigned int ui[2]; }t_iemdenormal_t64; static inline int IEM_DENORMAL_T(t_float f) /* malformed t_float 64 */ { t_iemdenormal_t64 pun; pun.f = f; pun.ui[1] &= 0x7ff00000; return((pun.ui[1] == 0) | (pun.ui[1] == 0x7ff00000)); } #endif /* PD_FLOATSIZE */ #else /* not INTEL or ARM */ #define IEM_DENORMAL_T(f) 0 #endif #else /* _MSC_VER */ #define IEM_DENORMAL_F(f) ((((*(unsigned int*)&(f))&0x7f800000)==0) || \ (((*(unsigned int*)&(f))&0x7f800000)==0x7f800000)) static int IEM_DENORMAL_D(double f) /* malformed t_float 64 */ { t_iemdenormal_d pun; pun.f = f; pun.ui[1] &= 0x7ff00000; return((pun.ui[1] == 0) | (pun.ui[1] == 0x7ff00000)); } #if PD_FLOATSIZE == 32 #define IEM_DENORMAL_T(f) ((((*(unsigned int*)&(f))&0x7f800000)==0) || \ (((*(unsigned int*)&(f))&0x7f800000)==0x7f800000)) #else /* 64 bits... don't know what to do here */ //#define IEM_DENORMAL_T(f) (!(((f) >= 0) || ((f) <= 0))) int IEM_DENORMAL_T(t_float f) /* malformed t_float 64 */ { t_iemdenormal_t64 pun; pun.f = f; pun.ui[1] &= 0x7ff00000; return((pun.ui[1] == 0) | (pun.ui[1] == 0x7ff00000)); } #endif #endif /* _MSC_VER */ //millers m_pd.h end /* on 64bit systems we cannot use garray_getfloatarray... */ #if ((defined PD_MAJOR_VERSION && defined PD_MINOR_VERSION) && (PD_MAJOR_VERSION > 0 || PD_MINOR_VERSION > 40)) # define iemarray_t t_word # define iemarray_getarray garray_getfloatwords # define iemarray_getfloat(pointer, index) (pointer[index].w_float) # define iemarray_setfloat(pointer, index, fvalue) (pointer[index].w_float = fvalue) #else # define iemarray_t t_float # define iemarray_getarray garray_getfloatarray # define iemarray_getfloat(pointer, index) (pointer[index]) # define iemarray_setfloat(pointer, index, fvalue) (pointer[index] = fvalue) #endif #ifndef BUILD_DATE # define BUILD_DATE "" __DATE__ " : " __TIME__ #endif #if (defined PD_MAJOR_VERSION && defined PD_MINOR_VERSION) && (PD_MAJOR_VERSION > 0 || PD_MINOR_VERSION > 43) # define iem_open sys_open # define iem_close sys_close # define iem_fopen sys_fopen # define iem_fclose sys_fclose #else # define iem_open open # define iem_close close # define iem_fopen fopen # define iem_fclose fclose #endif // millers d_osc.c beg #define UNITBIT32 1572864. /* 3*2^19; bit 32 has place value 1 */ #if defined(__FreeBSD__) || defined(__APPLE__) || defined(__FreeBSD_kernel__) \ || defined(__OpenBSD__) #include #endif #if defined(__linux__) || defined(__CYGWIN__) || defined(__GNU__) || \ defined(ANDROID) #include #endif #ifdef __MINGW32__ #include #endif #ifdef _MSC_VER /* _MSVC lacks BYTE_ORDER and LITTLE_ENDIAN */ #define LITTLE_ENDIAN 0x0001 #define BYTE_ORDER LITTLE_ENDIAN #endif #if !defined(BYTE_ORDER) || !defined(LITTLE_ENDIAN) #error No byte order defined #endif #if BYTE_ORDER == LITTLE_ENDIAN # define HIOFFSET 1 # define LOWOFFSET 0 #else # define HIOFFSET 0 /* word offset to find MSB */ # define LOWOFFSET 1 /* word offset to find LSB */ #endif union tabfudge { double tf_d; int32_t tf_i[2]; }; // millers d_osc.c end // millers d_delay.c beg #define IEMDEFDELVS 64 #define IEMXTRASAMPS 4 #define IEMSAMPBLK 4 // millers d_delay.c end #endif iem_utils-v0.0.20181004/iem_tab/include/iem_tab.h0000644000175000017500000000072413355471365021474 0ustar zmoelnigzmoelnig/* For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. iem_tab written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2009 */ #ifndef __IEMTAB_H__ #define __IEMTAB_H__ typedef struct { t_float real; t_float imag; } TAB_COMPLEX; int iem_tab_check_arrays(t_symbol *obj_name, t_symbol *array_name, iemarray_t **beg_mem, int *array_size, int max_index); #endif iem_utils-v0.0.20181004/iem_tab/tab_le_scalar-help.pd0000644000175000017500000000462112630366350022316 0ustar zmoelnigzmoelnig#N canvas 22 55 884 588 10; #N canvas 0 0 450 300 graph1 0; #X array src 100 float 1; #A 0 -0.5 -0.5 -0.5 -0.5 -0.5 -0.5 -0.5 -0.5 -0.5 -0.485714 -0.457143 -0.4 -0.285713 -0.0571409 0.157146 0.328575 0.442861 0.557148 0.628577 0.714292 0.800006 0.85715 0.885721 0.885721 0.871435 0.842864 0.757149 0.557148 0.41429 0.257146 -0.0142835 -0.314285 -0.528572 -0.714287 -0.757145 -0.757145 -0.757145 -0.742859 -0.742859 -0.728573 -0.714287 -0.685715 -0.657144 -0.585715 -0.528572 -0.4 -0.242856 -0.0428551 0.157146 0.342861 0.51429 0.728577 0.800006 0.828578 0.828578 0.828578 0.828578 0.800006 0.771435 0.714292 0.571433 0.41429 0.242861 0.0857169 -0.0571409 -0.242856 -0.385714 -0.542858 -0.685716 -0.757145 -0.800002 -0.828574 -0.828574 -0.814288 -0.800002 -0.785716 -0.757145 -0.728573 -0.67143 -0.585715 -0.471429 -0.271428 -0.0857125 0.114288 0.228575 0.314289 0.385718 0.414285 0.428571 0.457143 0.471428 0.485714 0.485714 0.5 0.5 0.5 0.5 0.5 0.5 0.5; #X coords 0 1 99 -1 200 140 1; #X restore 527 116 graph; #N canvas 0 0 450 300 graph1 0; #X array dst 100 float 0; #X coords 0 1 99 -1 200 140 1; #X restore 527 325 graph; #X obj 61 106 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X obj 59 370 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X msg 178 272 dst dst; #X msg 129 249 src src; #X msg 47 36 0.5; #X msg 82 37 -0.5; #X text 201 332 1.arg: source-name; #X text 201 345 2.arg: destination-name; #X text 31 163 list of 4 floats:; #X text 78 475 IEM KUG; #X text 62 463 musil; #X text 92 463 @; #X text 98 463 iem.at; #X text 61 485 Graz \, Austria; #X text 13 452 (c) Thomas Musil 2000 - 2006; #X text 224 318 initial arguments:; #X text 75 351 output; #X text 229 272 xxx : change destination name; #X text 218 86 the minimum of both array lengths); #X text 182 248 xxx : change source name; #X text 42 179 1.) src onset; #X text 42 190 2.) dst onset; #X text 42 201 3.) n samples to compare; #X text 42 210 4.) compared scalar value; #X text 205 72 (the number of samples which were compared are:; #X msg 48 228 0 0 100 0.5; #X text 12 3 tab_le_scalar; #X text 129 29 compare "less than or equal to" the src-array with this scalar to dst-array; #X obj 61 78 tab_le_scalar src dst; #X obj 59 331 tab_le_scalar src dst; #X connect 4 0 31 0; #X connect 5 0 31 0; #X connect 6 0 30 0; #X connect 7 0 30 0; #X connect 27 0 31 0; #X connect 30 0 2 0; #X connect 31 0 3 0; iem_utils-v0.0.20181004/iem_tab/tab_gt_scalar-help.pd0000644000175000017500000000460712630366350022334 0ustar zmoelnigzmoelnig#N canvas 22 55 880 584 10; #N canvas 0 0 450 300 graph1 0; #X array src 100 float 1; #A 0 -0.5 -0.5 -0.5 -0.5 -0.5 -0.5 -0.5 -0.5 -0.5 -0.485714 -0.457143 -0.4 -0.285713 -0.0571409 0.157146 0.328575 0.442861 0.557148 0.628577 0.714292 0.800006 0.85715 0.885721 0.885721 0.871435 0.842864 0.757149 0.557148 0.41429 0.257146 -0.0142835 -0.314285 -0.528572 -0.714287 -0.757145 -0.757145 -0.757145 -0.742859 -0.742859 -0.728573 -0.714287 -0.685715 -0.657144 -0.585715 -0.528572 -0.4 -0.242856 -0.0428551 0.157146 0.342861 0.51429 0.728577 0.800006 0.828578 0.828578 0.828578 0.828578 0.800006 0.771435 0.714292 0.571433 0.41429 0.242861 0.0857169 -0.0571409 -0.242856 -0.385714 -0.542858 -0.685716 -0.757145 -0.800002 -0.828574 -0.828574 -0.814288 -0.800002 -0.785716 -0.757145 -0.728573 -0.67143 -0.585715 -0.471429 -0.271428 -0.0857125 0.114288 0.228575 0.314289 0.385718 0.414285 0.428571 0.457143 0.471428 0.485714 0.485714 0.5 0.5 0.5 0.5 0.5 0.5 0.5; #X coords 0 1 99 -1 200 140 1; #X restore 527 116 graph; #N canvas 0 0 450 300 graph1 0; #X array dst 100 float 0; #X coords 0 1 99 -1 200 140 1; #X restore 527 325 graph; #X obj 61 106 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X obj 59 370 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X msg 178 272 dst dst; #X msg 129 249 src src; #X msg 48 228 0 0 100 0.3; #X msg 47 36 0.5; #X msg 82 37 -0.5; #X text 201 332 1.arg: source-name; #X text 201 345 2.arg: destination-name; #X text 31 163 list of 4 floats:; #X text 78 475 IEM KUG; #X text 62 463 musil; #X text 92 463 @; #X text 98 463 iem.at; #X text 61 485 Graz \, Austria; #X text 13 452 (c) Thomas Musil 2000 - 2006; #X text 224 318 initial arguments:; #X text 75 351 output; #X text 229 272 xxx : change destination name; #X text 218 86 the minimum of both array lengths); #X text 182 248 xxx : change source name; #X text 42 179 1.) src onset; #X text 42 190 2.) dst onset; #X text 42 201 3.) n samples to compare; #X text 42 210 4.) compared scalar value; #X text 205 72 (the number of samples which were compared are:; #X text 12 3 tab_gt_scalar; #X obj 61 78 tab_gt_scalar src dst; #X obj 59 331 tab_gt_scalar src dst; #X text 129 29 compare "greater than" the src-array with this scalar to dst-array; #X connect 4 0 30 0; #X connect 5 0 30 0; #X connect 6 0 30 0; #X connect 7 0 29 0; #X connect 8 0 29 0; #X connect 29 0 2 0; #X connect 30 0 3 0; iem_utils-v0.0.20181004/iem_tab/tab_min_index-help.pd0000644000175000017500000000460212630366350022342 0ustar zmoelnigzmoelnig#N canvas 116 92 784 436 10; #N canvas 0 0 450 300 graph1 0; #X array src 100 float 1; #A 0 -0.442858 -0.414287 -0.385715 -0.342858 -0.314287 -0.257144 -0.128572 -0.0428573 0.128572 0.228572 0.285715 0.328572 0.400001 0.414287 0.457144 0.457144 0.442858 0.385715 0.314287 0.257144 0.214286 0.1 0.0428572 -0.0142858 -0.0428573 -0.114286 -0.142858 -0.200001 -0.242858 -0.285715 -0.328572 -0.342858 -0.37143 -0.385715 -0.414287 -0.414287 -0.414287 -0.414287 -0.400001 -0.357144 -0.314287 -0.257144 -0.185715 -0.0714288 0.0142857 0.0571429 0.185715 0.185715 0.200001 0.214286 0.214286 0.214286 0.228572 0.228572 0.214286 0.200001 0.185715 0.171429 0.142857 0.1 0.114286 0.0714285 -0.071429 -0.242858 -0.300001 -0.328573 -0.357144 -0.37143 -0.385715 -0.400001 -0.442858 -0.457144 -0.47143 -0.457144 -0.428573 -0.400001 -0.378573 -0.328572 -0.271429 -0.242858 -0.200001 -0.128572 -0.0428574 -0.0285717 0.0142858 0.114286 0.128572 0.185715 0.214286 0.257144 0.285715 0.314287 0.342858 0.357144 0.357144 0.357144 0.357144 0.357144 0.342858 0.328572; #X coords 0 1 99 -1 200 140 1; #X restore 529 24 graph; #X obj 61 31 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X obj 61 106 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X obj 59 294 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X text 205 270 1.arg: source-name; #X msg 101 213 src src; #X floatatom 109 103 5 0 0 0 - - -; #X floatatom 158 104 5 0 0 0 - - -; #X floatatom 107 320 5 0 0 0 - - -; #X floatatom 156 336 5 0 0 0 - - -; #X msg 59 193 35 50; #X text 75 384 IEM KUG; #X text 59 372 musil; #X text 89 372 @; #X text 95 372 iem.at; #X text 58 394 Graz \, Austria; #X text 10 361 (c) Thomas Musil 2000 - 2006; #X text 229 258 initial arguments:; #X text 65 280 output; #X text 152 213 xxx : change source name; #X text 43 150 list of 2 floats:; #X text 55 160 1.) src onset; #X text 11 6 tab_min_index; #X obj 61 78 tab_min_index src; #X obj 59 262 tab_min_index src; #X text 55 171 2.) n samples to calculate minimum; #X text 115 301 minimum index output; #X text 163 319 minimum value output; #X text 166 118 min; #X text 97 117 min_index; #X text 85 29 calculate minimum element and its index of array ; #X connect 1 0 23 0; #X connect 5 0 24 0; #X connect 10 0 24 0; #X connect 23 0 2 0; #X connect 23 1 6 0; #X connect 23 2 7 0; #X connect 24 0 3 0; #X connect 24 1 8 0; #X connect 24 2 9 0; iem_utils-v0.0.20181004/iem_tab/tab_div-help.pd0000644000175000017500000000722612630366350021157 0ustar zmoelnigzmoelnig#N canvas 116 92 851 556 10; #N canvas 0 22 450 300 (subpatch) 0; #X array src1 100 float 1; #A 0 -0.442858 -0.414287 -0.385715 -0.342858 -0.314287 -0.257144 -0.128572 -0.0428573 0.128572 0.228572 0.285715 0.328572 0.400001 0.414287 0.457144 0.457144 0.442858 0.385715 0.314287 0.257144 0.214286 0.1 0.0428572 -0.0142858 -0.0428573 -0.114286 -0.142858 -0.200001 -0.242858 -0.285715 -0.328572 -0.342858 -0.37143 -0.385715 -0.414287 -0.414287 -0.414287 -0.414287 -0.400001 -0.357144 -0.314287 -0.257144 -0.185715 -0.0714288 0.0142857 0.0571429 0.171429 0.328572 0.400001 0.442858 0.47143 0.485715 0.485715 0.485715 0.485715 0.485715 0.442858 0.357144 0.242858 0.185715 0.114286 0.0714285 -0.071429 -0.242858 -0.300001 -0.328573 -0.357144 -0.37143 -0.385715 -0.400001 -0.442858 -0.457144 -0.47143 -0.457144 -0.428573 -0.400001 -0.378573 -0.328572 -0.271429 -0.242858 -0.200001 -0.128572 -0.0428574 -0.0285717 0.0142858 0.114286 0.128572 0.185715 0.214286 0.257144 0.285715 0.314287 0.342858 0.357144 0.357144 0.357144 0.357144 0.357144 0.342858 0.328572; #X coords 0 1 99 -1 200 140 1; #X restore 574 20 graph; #N canvas 0 22 450 300 (subpatch) 0; #X array dst 100 float 0; #X coords 0 1 99 -1 200 140 1; #X restore 575 368 graph; #X obj 61 41 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X obj 61 116 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X obj 59 350 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X msg 255 286 dst dst; #N canvas 0 22 450 300 (subpatch) 0; #X array src2 100 float 1; #A 0 0.557135 0.57142 0.557135 0.528564 0.499992 0.428564 0.357136 0.299994 0.0999951 -0.0571467 -0.157146 -0.228574 -0.300002 -0.328573 -0.357145 -0.385716 -0.400001 -0.400001 -0.385716 -0.385716 -0.37143 -0.364287 -0.357145 -0.328573 -0.300002 -0.271431 -0.24286 -0.214288 -0.14286 -0.085718 -0.0428611 -4.28595e-06 0.0428526 0.099995 0.171423 0.21428 0.257137 0.328565 0.371422 0.428564 0.457135 0.485707 0.499992 0.514278 0.499992 0.471421 0.44285 0.414279 0.357136 0.285708 0.171423 0.0999952 0.0142815 -0.100003 -0.214288 -0.314288 -0.385716 -0.457144 -0.471429 -0.514286 -0.500001 -0.47143 -0.442858 -0.414287 -0.37143 -0.300002 -0.228574 -0.157146 -0.0714324 0.0571381 0.128566 0.199994 0.271422 0.34285 0.414278 0.457135 0.485707 0.499992 0.528563 0.542849 0.499992 0.457135 0.428564 0.371422 0.314279 0.242851 0.0857095 -0.0857178 -0.271431 -0.400001 -0.514286 -0.542858 -0.557143 -0.585714 -0.585714 -0.6 -0.6 -0.614286 -0.614286 -0.614286; #X coords 0 1 99 -1 200 140 1; #X restore 575 171 graph; #X msg 136 243 src1 src1; #X msg 195 265 src2 src2; #X msg 59 221 50 50 20 50; #X text 45 149 list of 4 floats:; #X text 212 363 3.arg: destination-name; #X text 78 445 IEM KUG; #X text 56 433 musil; #X text 92 433 @; #X text 100 433 iem.at; #X text 61 455 Graz \, Austria; #X text 234 322 initial arguments:; #X text 72 329 output; #X text 314 285 xxx : change destination name; #X text 229 96 the minimum of the 3 array lengths); #X text 56 187 3.) dst onset; #X text 56 165 1.) src_1 onset; #X text 56 176 2.) src_2 onset; #X text 207 243 xxx : change source name 1; #X text 265 265 xxx : change source name 2; #X text 211 336 1.arg: source-name 1; #X text 211 349 2.arg: source-name 2; #X text 12 13 tab_div; #X text 90 39 divide the 2 src-arrays to dst-array; #X text 216 82 (the number of samples which were divided are:; #X text 56 197 4.) n samples to divide; #X obj 61 88 tab_div src1 src2 dst; #X obj 59 311 tab_div src1 src2 dst; #X text 13 422 (c) Thomas Musil 2000 - 2009; #X connect 2 0 32 0; #X connect 5 0 33 0; #X connect 7 0 33 0; #X connect 8 0 33 0; #X connect 9 0 33 0; #X connect 32 0 3 0; #X connect 33 0 4 0; iem_utils-v0.0.20181004/iem_tab/tab_copy-help.pd0000644000175000017500000000461512630366350021346 0ustar zmoelnigzmoelnig#N canvas 116 92 784 483 10; #N canvas 0 22 450 300 (subpatch) 0; #X array src 100 float 1; #A 0 -0.442858 -0.414287 -0.385715 -0.342858 -0.314287 -0.257144 -0.128572 -0.0428573 0.128572 0.228572 0.285715 0.328572 0.400001 0.414287 0.457144 0.457144 0.442858 0.385715 0.314287 0.257144 0.214286 0.1 0.0428572 -0.0142858 -0.0428573 -0.114286 -0.142858 -0.200001 -0.242858 -0.285715 -0.328572 -0.342858 -0.37143 -0.385715 -0.414287 -0.414287 -0.414287 -0.414287 -0.400001 -0.357144 -0.314287 -0.257144 -0.185715 -0.0714288 0.0142857 0.0571429 0.171429 0.328572 0.400001 0.442858 0.47143 0.485715 0.485715 0.485715 0.485715 0.485715 0.442858 0.357144 0.242858 0.185715 0.114286 0.0714285 -0.071429 -0.242858 -0.300001 -0.328573 -0.357144 -0.37143 -0.385715 -0.400001 -0.442858 -0.457144 -0.47143 -0.457144 -0.428573 -0.400001 -0.378573 -0.328572 -0.271429 -0.242858 -0.200001 -0.128572 -0.0428574 -0.0285717 0.0142858 0.114286 0.128572 0.185715 0.214286 0.257144 0.285715 0.314287 0.342858 0.357144 0.357144 0.357144 0.357144 0.357144 0.342858 0.328572; #X coords 0 1 99 -1 200 140 1; #X restore 533 14 graph; #N canvas 0 22 450 300 (subpatch) 0; #X array dst 100 float 0; #X coords 0 1 99 -1 200 140 1; #X restore 533 180 graph; #X obj 60 35 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X obj 60 110 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X obj 58 345 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X msg 58 215 50 20 50; #X text 194 318 1.arg: source-name; #X text 194 331 2.arg: destination-name; #X msg 115 235 src src; #X msg 165 253 dst dst; #X text 184 73 (the number of samples which are copied are:; #X text 197 87 the minimum of both array lengths); #X text 43 168 list of 3 floats:; #X text 77 419 IEM KUG; #X text 56 407 musil; #X text 91 407 @; #X text 99 407 iem.at; #X text 60 429 Graz \, Austria; #X text 55 179 1.) src onset; #X text 55 189 2.) dst onset; #X text 225 306 initial arguments:; #X text 73 323 output; #X text 172 233 xxx : change source name; #X text 218 252 xxx : change destination name; #X text 11 7 tab_copy; #X text 89 33 copy value from src to dst; #X obj 60 82 tab_copy src dst; #X text 55 198 3.) n samples to copy; #X obj 58 306 tab_copy src dst; #X text 12 396 (c) Thomas Musil 2000 - 2009; #X connect 2 0 26 0; #X connect 5 0 28 0; #X connect 8 0 28 0; #X connect 9 0 28 0; #X connect 26 0 3 0; #X connect 28 0 4 0; iem_utils-v0.0.20181004/iem_tab/pd-lib-builder/0000755000175000017500000000000013355471365021070 5ustar zmoelnigzmoelnigiem_utils-v0.0.20181004/iem_tab/pd-lib-builder/Makefile.pdlibbuilder0000644000175000017500000012415213355471365025175 0ustar zmoelnigzmoelnig# Makefile.pdlibbuilder dated 2018-03-15 version = 0.5.1 # Helper makefile for Pure Data external libraries. # Written by Katja Vetter March-June 2015 for the public domain. No warranties. # Inspired by Hans Christoph Steiner's Makefile Template and Stephan Beal's # ShakeNMake. # # Grab the newest version of Makefile.pdlibbuilder from # https://github.com/pure-data/pd-lib-builder/ # # GNU make version >= 3.81 required. # # #=== characteristics =========================================================== # # # - defines build settings based on autodetected OS and architecture # - defines rules to build Pd class- or lib executables from C or C++ sources # - defines rules for libdir installation # - defines convenience targets for developer and user # - evaluates implicit dependencies for non-clean builds # # #=== basic usage =============================================================== # # # In your Makefile, define your Pd lib name and class files, and include # Makefile.pdlibbuilder at the end of the Makefile. Like so: # # ________________________________________________________________________ # # # Makefile for mylib # # lib.name = mylib # # class.sources = myclass1.c myclass2.c # # datafiles = myclass1-help.pd myclass2-help.pd README.txt LICENSE.txt # # include Makefile.pdlibbuilder # ________________________________________________________________________ # # # For files in class.sources it is assumed that class basename == source file # basename. The default target builds all classes as individual executables # with Pd's default extension for the platform. For anything more than the # most basic usage, continue reading. # # #=== list of Makefile.pdlibbuilder API variables =============================== # # # Variables available for definition in your library Makefile: # # - lib.name # - lib.setup.sources # - class.sources # - common.sources # - shared.sources # - .class.sources # - .class.ldflags # - .class.ldlibs # - cflags # - ldflags # - ldlibs # - datafiles # - datadirs # - makefiles # - makefiledirs # - externalsdir # # Optional multiline defines evaluated per operating system: # # - forLinux # - forDarwin # - forWindows # # Variables available for your makefile or make command line: # # - make-lib-executable # - suppress-wunused # # Path variables for make command line or environment: # # - PDDIR # - PDINCLUDEDIR # - PDBINDIR # - PDLIBDIR # # Standard make variables for make command line or environment: # # - CPPFLAGS # - CFLAGS # - LDFLAGS # - CC # - CXX # - INSTALL # - STRIP # - DESTDIR # # Deprecated path variables: # # - pdincludepath # - pdbinpath # - objectsdir # # #=== descriptions of Makefile.pdlibbuilder API variables ======================= # # # lib.name: # Name of the library directory as it will be installed / distributed. Also the # name of the lib executable in the case where all classes are linked into # a single binary. # # lib.setup.sources: # Source file(s) (C or C++) which must be compiled only when linking all classes # into a single lib binary. # # class.sources: # All sources files (C or C++) for which the condition holds that # class name == source file basename. # # .class.sources: # Source file(s) (C or C++) specific to class . Use this for # multiple-source classes or when class name != source file basename. # # common.sources: # Source file(s) which must be statically linked to each class in the library. # # shared.sources: # Source file(s) (C or C++) to build a shared dynamic link lib, to be linked # with all class executables. # # cflags, ldflags, ldlibs: # Define cflags (preprocessor&compiler), ldflags (linker) and ldlibs (dynamic # link libs) for the whole library. These flags are added to platform-specific # flags defined by Makefile.pdlibbuilder. # # .class.ldflags and .class.ldlibs: # Define ldflags resp. ldlibs specific to class . These flags are # added to platform-specific flags defined by Makefile.pdlibbuilder, and flags # defined in your Makefile for the whole library. Note: cflags can not be # defined per class in the current implementation. # # datafiles and datadirs: # All extra files you want to include in binary distributions of the # library: abstractions and help patches, example patches, meta patch, readme # and license texts, manuals, sound files, etcetera. Use 'datafiles' for all # files that should go into your lib rootdir and 'datadirs' for complete # directories you want to copy from source to distribution. # # forLinux, forDarwin, forWindows: # Shorthand for 'variable definitions for Linux only' etc. Use like: # define forLinux # cflags += -DLINUX # class.sources += linuxthing.c # endef # # makefiles and makefiledirs: # Extra makefiles or directories with makefiles that should be made in sub-make # processes. # # make-lib-executable: # When this variable is defined 'yes' in your makefile or as command argument, # Makefile.pdlibbuilder will try to build all classes into a single library # executable (but it will force exit if lib.setup.sources is undefined). # If your makefile defines 'make-lib-executable=yes' as the library default, # this can still be overridden with 'make-lib-executable=no' as command argument # to build individual class executables (the Makefile.pdlibbuilder default.) # # suppress-wunused: # When this variable is defined ('yes' or any other value), -Wunused-variable, # -Wunused-parameter, -Wunused-value and -Wunused-function are suppressed, # but the other warnings from -Wall are retained. # # PDDIR: # Root directory of 'portable' pd package. When defined, PDINCLUDEDIR and # PDBINDIR will be evaluated as $(PDDIR)/src and $(PDDIR)/bin. # # PDINCLUDEDIR: # Directory where Pd API m_pd.h should be found, and other Pd header files. # Overrides the default search path. # # PDBINDIR: # Directory where pd.dll should be found for linking (Windows only). Overrides # the default search path. # # PDLIBDIR: # Root directory for installation of Pd library directories. Overrides the # default install location. # # DESTDIR: # Prepended path component for staged install. # # CPPFLAGS: # Preprocessor flags which are not strictly required for building. # # CFLAGS: # Compiler flags which are not strictly required for building. Compiler flags # defined by Makefile.pdlibbuilder for warning, optimization and architecture # specification are overriden by CFLAGS. # # LDFLAGS: # Linker flags which are not strictly required for building. Linker flags # defined by Makefile.pdlibbuilder for architecture specification are overriden # by LDFLAGS. # # CC and CXX: # C and C++ compiler programs as defined in your build environment. # # INSTALL # Definition of install program. # # STRIP # Name of strip program. Default 'strip' can be overridden in cross compilation # environments. # # objectsdir: # Root directory for installation of Pd library directories, like PDLIBDIR but # not overridable by environment. Supported for compatibility with pd-extended # central makefile, but deprecated otherwise. # # pdincludepath, pdbinpath: # As PDINCLUDEDIR and PDBINDIR but not overridable by environment. Deprecated # as user variables. # # #=== paths ===================================================================== # # # Source files in directories other than current working directory must be # prefixed with their relative path. Do not rely on VPATH or vpath. # Object (.o) files are built in the directory of their source files. # Executables are built in current working directory. # # Default search path for m_pd.h and other API header files is platform # dependent, and overridable by PDINCLUDEDIR: # # Linux: /usr/include/pd # # OSX: /Applications/Pd*.app/Contents/Resources/src # # Windows: %PROGRAMFILES%/Pd/src # %PROGRAMFILES(X86)%/Pd/src (32 bit builds on 64 bit Windows) # # Default search path for binary pd.dll (Windows), overridable by PDBINDIR # # %PROGRAMFILES%/Pd/bin # %PROGRAMFILES(X86)%/Pd/bin (32 bit builds on 64 bit Windows) # # Default location to install pd libraries is platform dependent, and # overridable by PDLIBDIR: # # Linux: /usr/local/lib/pd-externals # OSX: ~/Library/Pd # Windows: %APPDATA%/Pd # # https://puredata.info/docs/faq/how-do-i-install-externals-and-help-files # The rationale for not installing to ~/pd-externals by default on Linux # is that some people share the home dir between 32 and 64 bit installations. # # #=== targets =================================================================== # # # all: build $(executables) plus optional post target # post: target to build after $(executables) # alldebug: build all with -g option turned on for debug symbols # : force clean build of an individual class # .pre: make preprocessor output file in current working directory # .lst: make asm/source output file in current working directory # # install: install executables and data files # clean: remove build products from source tree # # help: print help text # vars: print makefile variables # allvars: print all variables # depend: print generated prerequisites # coffee: dummy target # # Variable $(executables) expands to class executables plus optional shared lib, # or alternatively to single lib executable when make-lib-executable=true. # Targets pre and post can be defined by library makefile. Make sure to include # Makefile.pdlibbuilder first so default target all will not be redefined. # # #=== Pd-extended libdir concept ================================================ # # # For libdir layout as conceived by Hans-Christoph Steiner, see: # # https://puredata.info/docs/developer/Libdir # # Files README.txt, LICENSE.txt and -meta.pd are part of the libdir # convention. Help patches for each class and abstraction are supposed to be # available. Makefile.pdlibbuilder does not force the presence of these files # however. It does not automatically include such files in libdir installations. # Data files you want to include in distributions must be defined explicitly in # your Makefile. # # #=== Makefile.pdlibbuilder syntax conventions ================================== # # # Makefile.pdlibbuilder variable names are lower case. Default make variables, # environment variables, and standard user variables (CC, CXX, CFLAGS, DESTDIR) # are upper case. Use target 'allvars' to print all variables and their values. # # 'Fields' in data variables are separated by dots, like in 'foo.class.sources'. # Words in variables expressing a function or command are separated by dashes, # like in 'make-lib-executable'. # # #=== useful make options ======================================================= # # # Use 'make -d ' to print debug details of the make process. # Use 'make -p ' to print make's database. # # #=== TODO ====================================================================== # # # - decide whether to use -static-libgcc or shared dll in MinGW # - cygwin support # - android support # - figure out how to handle '$' in filenames # - add makefile template targets dpkg-source dist libdir distclean tags? # # #=== end of documentation sections ============================================= # # ################################################################################ ################################################################################ ################################################################################ # GNU make version 3.81 (2006) or higher is required because of the following: # - function 'info' # - variable '.DEFAULT_GOAL' # force exit when make version is < 3.81 ifneq ($(firstword $(sort 3.81 $(MAKE_VERSION))), 3.81) $(error GNU make version 3.81 or higher is required) endif # Relative path to externals root dir in multi-lib source tree like # pd-extended SVN. Default is parent of current working directory. May be # defined differently in including makefile. externalsdir ?= .. # variable you can use to check if Makefile.pdlibbuilder is already included Makefile.pdlibbuilder = true ################################################################################ ### variables: library name and version ######################################## ################################################################################ # strip possibles spaces from lib.name, they mess up calculated file names lib.name := $(strip $(lib.name)) # if meta file exists, check library version metafile := $(wildcard $(lib.name)-meta.pd) ifdef metafile lib.version := $(shell sed -n \ 's|^\#X text [0-9][0-9]* [0-9][0-9]* VERSION \(.*\);|\1|p' \ $(metafile)) endif ################################################################################ ### variables: files ########################################################### ################################################################################ #=== sources =================================================================== # (re)define .class.sources using file names in class.sources define add-class-source $(notdir $(basename $v)).class.sources += $v endef $(foreach v, $(class.sources), $(eval $(add-class-source))) # derive class names from .class.sources variables sourcevariables := $(filter %.class.sources, $(.VARIABLES)) classes := $(basename $(basename $(sourcevariables))) # accumulate all source files specified in makefile classes.sources := $(sort $(foreach v, $(sourcevariables), $($v))) all.sources := $(classes.sources) $(lib.setup.sources) \ $(shared.sources) $(common.sources) #=== object files ============================================================== # construct object filenames from all C and C++ source file names classes.objects := $(addsuffix .o, $(basename $(classes.sources))) common.objects := $(addsuffix .o, $(basename $(common.sources))) shared.objects := $(addsuffix .o, $(basename $(shared.sources))) lib.setup.objects := $(addsuffix .o, $(basename $(lib.setup.sources))) all.objects = $(classes.objects) $(common.objects) $(shared.objects) \ $(lib.setup.objects) #=== executables =============================================================== # use recursive variables here because executable extension is not yet known # construct class executable names from class names classes.executables = $(addsuffix .$(extension), $(classes)) # construct shared lib executable name if shared sources are defined ifdef shared.sources shared.lib = lib$(lib.name).$(shared.extension) else shared.lib = endif ################################################################################ ### platform detection ######################################################### ################################################################################ #=== operating system ========================================================== # The following systems are defined: Linux, Darwin, Windows. GNU and # GNU/kFreeBSD are treated as Linux to get the same options. uname := $(shell uname) ifeq ($(findstring $(uname), Linux GNU GNU/kFreeBSD), $(uname)) system = Linux endif ifeq ($(uname), Darwin) system = Darwin endif ifeq ($(filter MINGW% MSYS%, $(uname)), $(uname)) system = Windows endif # Unfortunately not all Mingw versions provide a link cc > gcc, therefore # gcc is hardcoded here (but not if CC is redefined). ifeq ($(system), Windows) ifeq ($(origin CC), default) CC = gcc endif endif # evaluate possible system-specific multiline defines from library makefile $(eval $(for$(system))) # TODO: Cygwin, Android #=== architecture ============================================================== # native architecture of the build machine build.arch := $(shell uname -m) # Target architecture as reported by compiler. Give precedence to eventual # user-defined compiler. The first field of -- is extracted. ifneq ($(origin CXX), default) dumpmachine.cpu = $(firstword $(subst -, ,$(shell $(CXX) -dumpmachine))) else dumpmachine.cpu = $(firstword $(subst -, ,$(shell $(CC) -dumpmachine))) endif # Target architecture as reported by compiler is only used for Windows at the # moment. For other systems this still has to be tested. ifeq ($(system), Windows) target.arch = $(dumpmachine.cpu) else target.arch = $(build.arch) endif ################################################################################ ### variables per platform ##################################################### ################################################################################ #=== flags per architecture ==================================================== # Set architecture-dependent cflags, mainly for Linux. For Mac and Windows, # arch.c.flags are overriden below. # Raspberry Pi 1st generation ifeq ($(target.arch), armv6l) arch.c.flags = -march=armv6 -mfpu=vfp -mfloat-abi=hard # Beagle, Udoo, RPi2 etc. else ifeq ($(target.arch), armv7l) arch.c.flags = -march=armv7-a -mfpu=vfpv3 -mfloat-abi=hard # Intel 32 bit, build with SSE and SSE2 instructions else ifeq ($(findstring $(target.arch), i386 i686), $(target.arch)) arch.c.flags = -march=pentium4 -mfpmath=sse -msse -msse2 # Intel/AMD 64 bit, build with SSE, SSE2 and SSE3 instructions else ifeq ($(findstring $(target.arch), x86_64), $(target.arch)) arch.c.flags = -march=core2 -mfpmath=sse -msse -msse2 -msse3 # if none of the above architectures detected else arch.c.flags = endif #=== flags and paths for Linux ================================================= ifeq ($(system), Linux) prefix = /usr/local libdir := $(prefix)/lib pkglibdir = $(libdir)/pd-externals pdincludepath := $(wildcard /usr/include/pd) extension = pd_linux cpp.flags := -DUNIX c.flags := -fPIC c.ldflags := -rdynamic -shared -fPIC -Wl,-rpath,"\$$ORIGIN",--enable-new-dtags c.ldlibs := -lc -lm cxx.flags := -fPIC -fcheck-new cxx.ldflags := -rdynamic -shared -fPIC -Wl,-rpath,"\$$ORIGIN",--enable-new-dtags cxx.ldlibs := -lc -lm -lstdc++ shared.extension = so shared.ldflags := -rdynamic -fPIC -shared -Wl,-soname,$(shared.lib) endif #=== flags and paths for Darwin ================================================ # On OSX we try to build fat binaries by default. It is assumed that OSX i386 # can build for ppc and OSX x86_64 can't. TODO: try to refine this condition. # LLVM-clang doesn't support -fcheck-new, therefore this flag is omitted for # OSX x86_64. ifeq ($(system), Darwin) pkglibdir = $(HOME)/Library/Pd pdincludepath := $(firstword $(wildcard \ /Applications/Pd*.app/Contents/Resources/src)) extension = pd_darwin cpp.flags := -DUNIX -DMACOSX -I /sw/include c.flags := c.ldflags := -undefined suppress -flat_namespace -bundle c.ldlibs := -lc cxx.ldflags := -undefined suppress -flat_namespace -bundle cxx.ldlibs := -lc shared.extension = dylib shared.ldflags = -dynamiclib -undefined dynamic_lookup \ -install_name @loader_path/$(shared.lib) \ -compatibility_version 1 -current_version 1.0 version.flag := $(filter $(cflags), -mmacosx-version-min=%) ifeq ($(target.arch), i386) cxx.flags := -fcheck-new arch := ppc i386 x86_64 version.flag ?= -mmacosx-version-min=10.4 endif ifeq ($(target.arch), x86_64) arch := i386 x86_64 version.flag ?= -mmacosx-version-min=10.5 endif arch.c.flags := $(addprefix -arch , $(arch)) $(version.flag) arch.ld.flags := $(arch.c.flags) endif #=== flags and paths for Windows =============================================== # Standard paths on Windows contain spaces, and GNU make functions treat such # paths as lists, with unintended effects. Therefore we must use shell function # ls instead of make's wildcard when probing for a path, and use double quotes # when specifying a path in a command argument. # Default paths in Mingw / Mingw-w64 environments. 'PROGRAMFILES' is standard # location for builds with native architecture, 'ProgramFiles(x86)' for i686 # builds on x86_64 Windows (detection method by Lucas Cordiviola). Curly braces # required because of parentheses in variable name. ifeq ($(system), Windows) pkglibdir := $(APPDATA)/Pd ifeq ($(MINGW_CHOST), i686-w64-mingw32) programfiles := ${ProgramFiles(x86)} else programfiles := $(PROGRAMFILES) endif pdbinpath := $(programfiles)/Pd/bin pdincludepath := $(programfiles)/Pd/src endif # Store default path to pd.dll in PDBINDIR if the latter is not user-defined. # For include path this is done in the platform-independent paths section below, # but for PDBINDIR it is done here so ld flags can be evaluated as immediate # variables. ifeq ($(system), Windows) ifdef PDDIR PDBINDIR := $(PDDIR)/bin endif PDBINDIR ?= $(pdbinpath) endif # TODO: decide whether -mms-bitfields should be specified. ifeq ($(system), Windows) cpp.flags := -DMSW -DNT ifeq ($(filter i%86 mingw32, $(target.arch)), $(target.arch)) arch.c.flags := -march=pentium4 -msse -msse2 -mfpmath=sse else ifeq (x86_64, $(target.arch)) cpp.flags := -DMSW -DNT -DPD_LONGINTTYPE=__int64 arch.c.flags := -march=core2 -msse -msse2 -msse3 -mfpmath=sse else arch.c.flags = endif extension = dll c.flags := c.ldflags := -static-libgcc -shared \ -Wl,--enable-auto-import "$(PDBINDIR)/pd.dll" c.ldlibs := cxx.flags := -fcheck-new cxx.ldflags := -static-libgcc -static-libstdc++ -shared \ -Wl,--enable-auto-import "$(PDBINDIR)/pd.dll" cxx.ldlibs := shared.extension = dll shared.ldflags := -static-libgcc -shared "$(PDBINDIR)/pd.dll" stripflags = --strip-all endif #=== paths ===================================================================== # Platform-dependent default paths are specified above, but overridable. # Path variables in upper case can be defined as make command argument or in the # environment. Variable 'objectsdir' is supported for compatibility with # the build system that pd-l2ork has inherited from pd-extended. PDINCLUDEDIR ?= $(pdincludepath) PDLIBDIR ?= $(firstword $(objectsdir) $(pkglibdir)) ifdef PDDIR PDINCLUDEDIR := $(wildcard $(PDDIR)/src) endif # base path where all components of the lib will be installed by default installpath := $(DESTDIR)$(PDLIBDIR)/$(lib.name) # check if include path contains spaces (as is often the case on Windows) # if so, store the path so we can later do checks with it pdincludepathwithspaces := $(if $(word 2, $(PDINCLUDEDIR)), $(PDINCLUDEDIR)) #=== accumulated build flags =================================================== # From GNU make docs: 'Users expect to be able to specify CFLAGS freely # themselves.' So we use CFLAGS to define options which are not strictly # required for compilation: optimizations, architecture specifications, and # warnings. CFLAGS can be safely overriden using a make command argument. # Variables cflags, ldflags and ldlibs may be defined in including makefile. optimization.flags = -O3 -ffast-math -funroll-loops -fomit-frame-pointer warn.flags = -Wall -Wextra -Wshadow -Winline -Wstrict-aliasing # suppress -Wunused-variable & Co if you don't want to clutter a build log ifdef suppress-wunused warn.flags += $(addprefix -Wno-unused-, function parameter value variable) endif CFLAGS = $(warn.flags) $(optimization.flags) $(arch.c.flags) # preprocessor flags cpp.flags := -DPD -I "$(PDINCLUDEDIR)" $(cpp.flags) $(CPPFLAGS) # flags for dependency checking (cflags from makefile may define -I options) depcheck.flags := $(cpp.flags) $(cflags) # architecture specifications for linker are overridable by LDFLAGS LDFLAGS := $(arch.ld.flags) # now add the same ld flags to shared dynamic lib shared.ldflags := $(shared.ldflags) $(LDFLAGS) # accumulated flags for C compiler / linker c.flags := $(cpp.flags) $(c.flags) $(cflags) $(CFLAGS) c.ldflags := $(c.ldflags) $(ldflags) $(LDFLAGS) c.ldlibs := $(c.ldlibs) $(ldlibs) # accumulated flags for C++ compiler / linker cxx.flags := $(cpp.flags) $(cxx.flags) $(cflags) $(CFLAGS) cxx.ldflags := $(cxx.ldflags) $(ldflags) $(LDFLAGS) cxx.ldlibs := $(cxx.ldlibs) $(ldlibs) ################################################################################ ### variables: tools ########################################################### ################################################################################ # aliases so we can later define 'compile-$1' and set 'c' or 'cxx' as argument compile-c := $(CC) compile-cxx := $(CXX) ################################################################################ ### checks ##################################################################### ################################################################################ # At this point most variables are defined. Now do some checks and info's # before rules begin. # 'forward declaration' of default target, needed to do checks all: # To avoid unpredictable results, make sure the default target is not redefined # by including makefile. ifneq ($(.DEFAULT_GOAL), all) $(error Default target must be 'all'.) endif # find out which target(s) will be made ifdef MAKECMDGOALS goals := $(MAKECMDGOALS) else goals := all endif # store path to Pd API m_pd.h if it is found ifdef PDINCLUDEDIR mpdh := $(shell ls "$(PDINCLUDEDIR)/m_pd.h") endif # store path to pd.dll; if not found, ls will give a useful error ifeq ($(system), Windows) pddll := $(shell ls "$(PDBINDIR)/pd.dll") endif # print Makefile.pdlibbuilder version $(info ++++ info: using Makefile.pdlibbuilder version $(version)) # when making target all, check if m_pd.h is found and print info about it ifeq ($(goals), all) $(if $(mpdh), \ $(info ++++ info: using Pd API $(mpdh)), \ $(warning Where is Pd API m_pd.h? Do 'make help' for info.)) endif # print target info $(info ++++ info: making target $(goals) $(if $(lib.name),in lib $(lib.name))) # when installing, print installpath info $(if $(filter install install-lib, $(goals)), $(info ++++ info: \ installpath is '$(installpath)')) #=== define executables ======================================================== # By default we build class executables, and optionally a shared dynamic link # lib. When make-lib-executable=yes we build all classes into a single lib # executable, on the condition that variable lib.setup.sources is defined. ifeq ($(make-lib-executable),yes) $(if $(lib.setup.sources), ,\ $(error Can not build library blob because lib.setup.sources is undefined)) executables := $(lib.name).$(extension) else executables := $(classes.executables) $(shared.lib) endif ################################################################################ ### rules: special targets ##################################################### ################################################################################ # Disable built-in rules. If some target can't be built with the specified # rules, it should not be built at all. MAKEFLAGS += --no-builtin-rules .PRECIOUS: .SUFFIXES: .PHONY: all post build-lib \ $(classes) $(makefiledirs) $(makefiles) \ install install-executables install-datafiles install-datadirs \ force clean vars allvars depend help ################################################################################ ### rules: build targets ####################################################### ################################################################################ # Target all forces the build of targets [$(executables) post] in # deterministic order. Target $(executables) builds class executables plus # optional shared lib or alternatively a single lib executable when # make-lib-executable=true. Target post is optionally defined by # library makefile. all: post post: $(executables) all: $(info ++++info: target all in lib $(lib.name) completed) # build all with -g option turned on for debug symbols alldebug: c.flags += -g alldebug: cxx.flags += -g alldebug: all #=== class executable ========================================================== # recipe for linking objects in class executable # argument $1 = compiler type (c or cxx) # argument $2 = class basename define link-class $(compile-$1) \ $($1.ldflags) $($2.class.ldflags) \ -o $2.$(extension) \ $(addsuffix .o, $(basename $($2.class.sources))) \ $(addsuffix .o, $(basename $(common.sources))) \ $($1.ldlibs) $($2.class.ldlibs) $(shared.lib) endef # general rule for linking object files in class executable %.$(extension): $(shared.lib) $(info ++++ info: linking objects in $@ for lib $(lib.name)) $(if $(filter %.cc %.cpp, $($*.class.sources)), \ $(call link-class,cxx,$*), \ $(call link-class,c,$*)) #=== library blob ============================================================== # build all classes into single executable build-lib: $(lib.name).$(extension) $(info ++++ info: library blob $(lib.name).$(extension) completed) # recipe for linking objects in lib executable # argument $1 = compiler type (c or cxx) define link-lib $(compile-$1) \ $($1.ldflags) $(lib.ldflags) \ -o $(lib.name).$(extension) $(all.objects) \ $($1.ldlibs) $(lib.ldlibs) endef # rule for linking objects in lib executable # declared conditionally to avoid name clashes ifeq ($(make-lib-executable),yes) $(lib.name).$(extension): $(all.objects) $(if $(filter %.cc %.cpp, $(all.sources)), \ $(call link-lib,cxx), \ $(call link-lib,c)) endif #=== shared dynamic lib ======================================================== # recipe for linking objects in shared executable # argument $1 = compiler type (c or cxx) define link-shared $(compile-$1) \ $(shared.ldflags) \ -o lib$(lib.name).$(shared.extension) $(shared.objects) \ $($1.ldlibs) $(shared.ldlibs) endef # rule for linking objects in shared executable # build recipe is in macro 'link-shared' lib$(lib.name).$(shared.extension): $(shared.objects) $(info ++++ info: linking objects in shared lib $@) $(if $(filter %.cc %.cpp, $(shared.sources)), \ $(call link-shared,cxx), \ $(call link-shared,c)) #=== object files ============================================================== # recipe to make .o file from source # argument $1 is compiler type (c or cxx) define make-object-file $(info ++++ info: making $@ in lib $(lib.name)) $(compile-$1) \ $($1.flags) \ -o $@ -c $< endef # Three rules to create .o files. These are double colon 'terminal' rules, # meaning they are the last in a rules chain. %.o:: %.c $(call make-object-file,c) %.o:: %.cc $(call make-object-file,cxx) %.o:: %.cpp $(call make-object-file,cxx) #=== explicit prerequisites for class executables ============================== # For class executables, prerequisite rules are declared in run time. Target # 'depend' prints these rules for debugging purposes. # declare explicit prerequisites rule like 'class: class.extension' # argument $v is class basename define declare-class-target $v: $v.$(extension) endef # declare explicit prerequisites rule like 'class.extension: object1.o object2.o' # argument $v is class basename define declare-class-executable-target $v.$(extension): $(addsuffix .o, $(basename $($v.class.sources))) \ $(addsuffix .o, $(basename $(common.sources))) endef # evaluate explicit prerequisite rules for all classes $(foreach v, $(classes), $(eval $(declare-class-target))) $(foreach v, $(classes), $(eval $(declare-class-executable-target))) #=== implicit prerequisites for class executables ============================== # Evaluating implicit prerequisites (header files) with help from the # preprocessor is 'expensive' so this is done conditionally and selectively. # Note that it is also possible to trigger a build via install targets, in # which case implicit prerequisites are not checked. # When the Pd include path contains spaces it will mess up the implicit # prerequisites rules. disable-dependency-tracking := $(strip $(pdincludepathwithspaces)) ifndef disable-dependency-tracking must-build-everything := $(filter all, $(goals)) must-build-class := $(filter $(classes), $(goals)) must-build-sources := $(foreach v, $(must-build-class), $($v.class.sources)) endif # declare implicit prerequisites rule like 'object.o: header1.h header2.h ...' # argument $1 is input source file(s) # dir is explicitly added because option -MM strips it by default define declare-object-target $(dir $1)$(filter %.o: %.h, $(shell $(CPP) $(depcheck.flags) -MM $1)) $(MAKEFILE_LIST) endef # evaluate implicit prerequisite rules when rebuilding everything ifdef must-build-everything $(if $(wildcard $(all.objects)), \ $(info ++++ info: evaluating implicit prerequisites in lib $(lib.name).....) \ $(foreach v, $(all.sources), $(eval $(call declare-object-target, $v)))) endif # evaluate implicit prerequisite rules when selectively building classes ifdef must-build-class $(foreach v, $(must-build-sources), \ $(eval $(call declare-object-target, $v))) $(foreach v, $(shared.sources), \ $(eval $(call declare-object-target, $v))) endif ################################################################################ ### rules: preprocessor and assembly files ##################################### ################################################################################ # Preprocessor and assembly output files for bug tracing etc. They are not part # of the build processes for executables. By default these files are created in # the current working directory. Dependency tracking is not performed, the build # is forced instead to make sure it's up to date. force: #=== preprocessor file ========================================================= # make preprocessor output file with extension .pre # argument $1 = compiler type (c or cxx) define make-preprocessor-file $(info ++++ info: making preprocessor output file $(notdir $*.pre) \ in current working directory) $(compile-$1) -E $< $(c.flags) $($1.flags) -o $(notdir $*.pre) endef %.pre:: %.c force $(call make-preprocessor-file,c) %.pre:: %.cc force $(call make-preprocessor-file,cxx) %.pre:: %.cpp force $(call make-preprocessor-file,cxx) #=== assembly file ============================================================= # make C / assembly interleaved output file with extension .lst # argument $1 = compiler type (c or cxx) define make-assembly-file $(info ++++ info: making assembly output file $(notdir $*.lst) \ in current working directory) $(compile-$1) \ -c -Wa,-a,-ad -fverbose-asm \ $($1.flags) \ $< > $(notdir $*.lst) endef %.lst:: %.c force $(call make-assembly-file,c) %.lst:: %.cc force $(call make-assembly-file,cxx) %.lst:: %.cpp force $(call make-assembly-file,cxx) ################################################################################ ### rules: installation targets ################################################ ################################################################################ #=== strip ===================================================================== # Stripping of installed binaries will only be done when variable 'stripflags' # is defined non-empty. No default definition is provided except for Windows # where the unstripped binaries are large, especially in the case of Mingw-w64. # Note: while stripping all symbols ('-s' or '--strip-all') is possible for # Linux and Windows, in the case of OSX only non-global symbols can be stripped # (option '-x' or '--discard-all'). # Make definition of strip command overridable so it can be defined in an # environment for cross-compilation. STRIP ?= strip # Commands in 'strip-executables' will be executed conditionally in the rule for # target 'install-executables'. strip-executables = cd "$(installpath)" && \ $(foreach v, $(executables), $(STRIP) $(stripflags) '$v';) #=== install =================================================================== # Install targets depend on successful exit status of target all because nothing # must be installed in case of a build error. # -p = preserve time stamps # -m = set permission mode (as in chmod) # -d = create all components of specified directories INSTALL = install INSTALL_PROGRAM := $(INSTALL) -p -m 644 INSTALL_DATA := $(INSTALL) -p -m 644 INSTALL_DIR := $(INSTALL) -m 755 -d # strip spaces from file names executables := $(strip $(executables)) datafiles := $(strip $(datafiles)) datadirs := $(strip $(datadirs)) # Do not make any install sub-target with empty variable definition because the # install program would exit with an error. install: $(if $(executables), install-executables) install: $(if $(datafiles), install-datafiles) install: $(if $(datadirs), install-datadirs) install-executables: all $(INSTALL_DIR) -v "$(installpath)" $(foreach v, $(executables), \ $(INSTALL_PROGRAM) '$v' "$(installpath)";) $(info ++++ info: executables of lib $(lib.name) installed \ from $(CURDIR) to $(installpath)) $(if $(stripflags), $(strip-executables),) install-datafiles: all $(INSTALL_DIR) -v "$(installpath)" $(foreach v, $(datafiles), \ $(INSTALL_DATA) '$(v)' "$(installpath)";) $(info ++++ info: data files of lib $(lib.name) installed \ from $(CURDIR) to $(installpath)) install-datadirs: all $(foreach v, $(datadirs), $(INSTALL_DIR) "$(installpath)/$v";) $(foreach v, $(datadirs), \ $(INSTALL_DATA) $(wildcard $v/*) "$(installpath)/$v";) $(info ++++ info: data directories of lib $(lib.name) installed \ from $(CURDIR) to $(installpath)) ################################################################################ ### rules: distribution targets ################################################ ################################################################################ # TODO # These targets are implemented in Makefile Template, but I have to figure out # how to do it under the not-so-strict conditions of Makefile.pdlibbuilder. # make source package dist: @echo "target dist not yet implemented" # make Debian source package dpkg-source: @echo "target dpkg-source not yet implemented" $(ORIGDIR): $(DISTDIR): ################################################################################ ### rules: clean targets ####################################################### ################################################################################ # delete build products from build tree clean: rm -f $(all.objects) rm -f $(classes.executables) $(lib.name).$(extension) $(shared.lib) rm -f *.pre *.lst # remove distribution directories and tarballs from build tree distclean: clean @echo "target distclean not yet implemented" ################################################################################ ### rules: submake targets ##################################################### ################################################################################ # Iterate over sub-makefiles or makefiles in other directories. # When 'continue-make=yes' is set, sub-makes will report 'true' to the parent # process regardless of their real exit status. This prevents the parent make # from being aborted by a sub-make error. Useful when you want to quickly find # out which sub-makes from a large set will succeed. ifeq ($(continue-make),yes) continue = || true endif # These targets will trigger sub-make processes for entries in 'makefiledirs' # and 'makefiles'. all alldebug install clean distclean dist dkpg-source: \ $(makefiledirs) $(makefiles) # this expands to identical rules for each entry in 'makefiledirs' $(makefiledirs): $(MAKE) --directory=$@ $(MAKECMDGOALS) $(continue) # this expands to identical rules for each entry in 'makefiles' $(makefiles): $(MAKE) --directory=$(dir $@) --makefile=$(notdir $@) $(MAKECMDGOALS) $(continue) ################################################################################ ### rules: convenience targets ################################################# ################################################################################ #=== show variables ============================================================ # Several 'function' macro's cause errors when expanded within a rule or without # proper arguments. Variables which are set with the define directive are only # shown by name for that reason. functions = \ add-class-source \ declare-class-target \ declare-class-executable-target \ declare-object-target \ link-class \ link-lib \ link-shared \ make-object-file \ make-preprocessor-file \ make-assembly-file # show variables from makefiles vars: $(info ++++ info: showing makefile variables:) $(foreach v,\ $(sort $(filter-out $(functions) functions, $(.VARIABLES))),\ $(if $(filter file, $(origin $v)),\ $(info variable $v = $($v)))) $(foreach v, $(functions), $(info 'function' name: $v)) @echo # show all variables allvars: $(info ++++ info: showing default, automatic and makefile variables:) $(foreach v, \ $(sort $(filter-out $(functions) functions, $(.VARIABLES))), \ $(info variable ($(origin $v)) $v = $($v))) $(foreach v, $(functions), $(info 'function' name: $v)) @echo #=== show dependencies ========================================================= # show generated prerequisites rules depend: $(info ++++ info: generated prerequisite rules) $(foreach v, $(classes), $(info $(declare-class-target))) $(foreach v, $(classes), $(info $(declare-class-executable-target))) $(foreach v, $(all.sources), $(info $(call declare-object-target, $v))) @echo #=== show help text ============================================================ # brief info about targets and paths ifdef mpdh mpdhinfo := $(mpdh) else mpdhinfo := m_pd.h was not found. Is Pd installed? endif help: @echo @echo " Main targets:" @echo " all: build executables (default target)" @echo " install: install all components of the library" @echo " vars: print makefile variables for troubleshooting" @echo " allvars: print all variables for troubleshooting" @echo " help: print this help text" @echo @echo " Pd API m_pd.h:" @echo " $(mpdhinfo)" @echo " You may specify your preferred Pd include directory as argument" @echo " to the make command, like 'PDINCLUDEDIR=path/to/pd/src'." @echo @echo " Path for installation of your libdir(s):" @echo " $(PDLIBDIR)" @echo " Alternatively you may specify your path for installation as argument" @echo " to the make command, like 'PDLIBDIR=path/to/pd-externals'." @echo @echo " Default paths are listed in the doc sections in Makefile.pdlibbuilder." @echo #=== dummy target ============================================================== coffee: @echo "Makefile.pdlibbuilder: Can not make coffee. Sorry." ################################################################################ ### end of rules sections ###################################################### ################################################################################ # for syntax highlighting in vim and github # vim: set filetype=make: iem_utils-v0.0.20181004/iem_tab/tab_ifft-help.pd0000644000175000017500000002423112630366350021320 0ustar zmoelnigzmoelnig#N canvas 265 105 961 540 10; #N canvas 0 22 450 300 (subpatch) 0; #X array src_re 100 float 0; #X coords 0 1 99 -1 199 100 1; #X restore 694 10 graph; #N canvas 0 22 450 300 (subpatch) 0; #X array dst_re 100 float 0; #X coords 0 1 99 -1 199 100 1; #X restore 694 239 graph; #X obj 24 47 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X obj 24 122 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X obj 62 371 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #N canvas 0 22 450 300 (subpatch) 0; #X array dst_im 100 float 0; #X coords 0 1 99 -1 199 100 1; #X restore 694 353 graph; #X msg 103 276 dst_re dst_re; #X msg 118 299 dst_im dst_im; #X msg 139 322 fftsize 64; #X floatatom 474 22 5 0 63 0 - - -; #X msg 546 341 \; dst_re const 0 \; dst_im const 0; #X text 102 464 IEM KUG; #X text 81 452 musil; #X text 116 452 @; #X text 124 452 iem.at; #X text 85 474 Graz \, Austria; #N canvas 0 22 478 328 generate_a_dirac 0; #X obj 61 62 clip 0 63; #X obj 61 32 inlet; #X msg 60 103 \; src_re const 0 \; src_re \$1 1; #X connect 0 0 2 0; #X connect 1 0 0 0; #X restore 474 41 pd generate_a_dirac; #X floatatom 514 22 5 -32 32 0 - - -; #N canvas 0 22 543 496 generate_a_cos 0; #X obj 120 18 inlet; #X obj 219 176 t f f; #X obj 219 211 / 32; #X obj 219 232 * 3.14159; #X obj 219 283 cos; #X obj 219 257 * 8; #X obj 219 127 t b f; #X obj 219 331 tabwrite src_re; #X obj 120 43 moses 0; #X obj 39 178 t f f; #X obj 39 213 / 32; #X obj 39 234 * 3.14159; #X obj 39 285 cos; #X obj 39 259 * 8; #X obj 39 129 t b f; #X obj 39 333 tabwrite src_re; #X obj 90 70 * -1; #N canvas 193 158 454 304 counter 0; #X obj 108 25 inlet; #X obj 109 163 outlet; #X obj 109 133 f; #X obj 142 133 + 1; #X obj 108 50 t b b; #X msg 154 76 0; #X msg 109 75 64; #X obj 110 98 until; #X connect 0 0 4 0; #X connect 2 0 3 0; #X connect 2 0 1 0; #X connect 3 0 2 1; #X connect 4 0 6 0; #X connect 4 1 5 0; #X connect 5 0 2 1; #X connect 6 0 7 0; #X connect 7 0 2 0; #X restore 219 151 pd counter; #N canvas 193 158 454 304 counter 0; #X obj 108 25 inlet; #X obj 109 163 outlet; #X obj 109 133 f; #X obj 142 133 + 1; #X obj 108 50 t b b; #X msg 154 76 0; #X msg 109 75 64; #X obj 110 98 until; #X connect 0 0 4 0; #X connect 2 0 3 0; #X connect 2 0 1 0; #X connect 3 0 2 1; #X connect 4 0 6 0; #X connect 4 1 5 0; #X connect 5 0 2 1; #X connect 6 0 7 0; #X connect 7 0 2 0; #X restore 38 154 pd counter; #X obj 39 310 * -1; #X obj 219 106 clip 0 32; #X obj 39 108 clip 0 32; #X connect 0 0 8 0; #X connect 1 0 2 0; #X connect 1 1 7 1; #X connect 2 0 3 0; #X connect 3 0 5 0; #X connect 4 0 7 0; #X connect 5 0 4 0; #X connect 6 0 17 0; #X connect 6 1 5 1; #X connect 8 0 16 0; #X connect 8 1 20 0; #X connect 9 0 10 0; #X connect 9 1 15 1; #X connect 10 0 11 0; #X connect 11 0 13 0; #X connect 12 0 19 0; #X connect 13 0 12 0; #X connect 14 0 18 0; #X connect 14 1 13 1; #X connect 16 0 21 0; #X connect 17 0 1 0; #X connect 18 0 9 0; #X connect 19 0 15 0; #X connect 20 0 6 0; #X connect 21 0 14 0; #X restore 514 61 pd generate_a_cos; #X floatatom 555 22 5 -31 31 0 - - -; #N canvas 0 22 499 423 generate_a_sin 0; #X obj 102 37 inlet; #X obj 246 182 t f f; #X obj 246 217 / 32; #X obj 246 238 * 3.14159; #X obj 246 263 * 8; #X obj 246 112 clip 0 31; #X obj 246 133 t b f; #X obj 246 337 tabwrite src_re; #X obj 246 289 sin; #X obj 54 180 t f f; #X obj 54 215 / 32; #X obj 54 236 * 3.14159; #X obj 54 261 * 8; #X obj 54 110 clip 0 31; #X obj 54 132 t b f; #X obj 54 335 tabwrite src_re; #X obj 54 287 sin; #X obj 102 60 moses 0; #X obj 54 88 * -1; #N canvas 193 158 454 304 counter 0; #X obj 108 25 inlet; #X obj 109 163 outlet; #X obj 109 133 f; #X obj 142 133 + 1; #X obj 108 50 t b b; #X msg 154 76 0; #X msg 109 75 64; #X obj 110 98 until; #X connect 0 0 4 0; #X connect 2 0 3 0; #X connect 2 0 1 0; #X connect 3 0 2 1; #X connect 4 0 6 0; #X connect 4 1 5 0; #X connect 5 0 2 1; #X connect 6 0 7 0; #X connect 7 0 2 0; #X restore 54 156 pd counter; #N canvas 193 158 454 304 counter 0; #X obj 108 25 inlet; #X obj 109 163 outlet; #X obj 109 133 f; #X obj 142 133 + 1; #X obj 108 50 t b b; #X msg 154 76 0; #X msg 109 75 64; #X obj 110 98 until; #X connect 0 0 4 0; #X connect 2 0 3 0; #X connect 2 0 1 0; #X connect 3 0 2 1; #X connect 4 0 6 0; #X connect 4 1 5 0; #X connect 5 0 2 1; #X connect 6 0 7 0; #X connect 7 0 2 0; #X restore 246 156 pd counter; #X obj 54 312 * -1; #X connect 0 0 17 0; #X connect 1 0 2 0; #X connect 1 1 7 1; #X connect 2 0 3 0; #X connect 3 0 4 0; #X connect 4 0 8 0; #X connect 5 0 6 0; #X connect 6 0 20 0; #X connect 6 1 4 1; #X connect 8 0 7 0; #X connect 9 0 10 0; #X connect 9 1 15 1; #X connect 10 0 11 0; #X connect 11 0 12 0; #X connect 12 0 16 0; #X connect 13 0 14 0; #X connect 14 0 19 0; #X connect 14 1 12 1; #X connect 16 0 21 0; #X connect 17 0 18 0; #X connect 17 1 5 0; #X connect 18 0 13 0; #X connect 19 0 9 0; #X connect 20 0 1 0; #X connect 21 0 15 0; #X restore 555 82 pd generate_a_sin; #X text 299 365 initial arguments:; #X text 37 147 list of 4 floats:; #X text 49 178 3.) dst_re-onset; #X text 49 188 4.) dst_im-onset; #X text 49 158 1.) src_re-onset; #X text 49 168 2.) src_im-onset; #X msg 62 207 20 20 30 30; #X text 259 412 4.arg: imag_destination-name; #X text 259 400 3.arg: real_destination-name; #X text 259 389 2.arg: imag_source-name; #X text 259 378 1.arg: real_source-name; #N canvas 0 22 450 300 (subpatch) 0; #X array src_im 100 float 0; #X coords 0 1 99 -1 199 100 1; #X restore 694 124 graph; #X msg 76 230 src_re src_re; #X msg 90 253 src_im src_im; #X msg 546 283 \; src_re const 0 \; src_im const 0; #X floatatom 474 132 5 0 63 0 - - -; #N canvas 0 22 478 328 generate_a_dirac 0; #X obj 61 62 clip 0 63; #X obj 61 32 inlet; #X msg 61 99 \; src_im const 0 \; src_im \$1 1; #X connect 0 0 2 0; #X connect 1 0 0 0; #X restore 474 151 pd generate_a_dirac; #X floatatom 514 132 5 -32 32 0 - - -; #N canvas 0 22 499 423 generate_a_cos 0; #X obj 120 18 inlet; #X obj 219 176 t f f; #X obj 219 211 / 32; #X obj 219 232 * 3.14159; #X obj 219 283 cos; #X obj 219 257 * 8; #X obj 219 127 t b f; #X obj 120 43 moses 0; #X obj 39 178 t f f; #X obj 39 213 / 32; #X obj 39 234 * 3.14159; #X obj 39 285 cos; #X obj 39 259 * 8; #X obj 39 129 t b f; #X obj 90 70 * -1; #X obj 40 334 tabwrite src_im; #X obj 220 331 tabwrite src_im; #N canvas 193 158 454 304 counter 0; #X obj 108 25 inlet; #X obj 109 163 outlet; #X obj 109 133 f; #X obj 142 133 + 1; #X obj 108 50 t b b; #X msg 154 76 0; #X msg 109 75 64; #X obj 110 98 until; #X connect 0 0 4 0; #X connect 2 0 3 0; #X connect 2 0 1 0; #X connect 3 0 2 1; #X connect 4 0 6 0; #X connect 4 1 5 0; #X connect 5 0 2 1; #X connect 6 0 7 0; #X connect 7 0 2 0; #X restore 39 153 pd counter; #N canvas 193 158 454 304 counter 0; #X obj 108 25 inlet; #X obj 109 163 outlet; #X obj 109 133 f; #X obj 142 133 + 1; #X obj 108 50 t b b; #X msg 154 76 0; #X msg 109 75 64; #X obj 110 98 until; #X connect 0 0 4 0; #X connect 2 0 3 0; #X connect 2 0 1 0; #X connect 3 0 2 1; #X connect 4 0 6 0; #X connect 4 1 5 0; #X connect 5 0 2 1; #X connect 6 0 7 0; #X connect 7 0 2 0; #X restore 219 153 pd counter; #X obj 39 311 * -1; #X obj 219 106 clip 0 32; #X obj 39 108 clip 0 32; #X connect 0 0 7 0; #X connect 1 0 2 0; #X connect 1 1 16 1; #X connect 2 0 3 0; #X connect 3 0 5 0; #X connect 4 0 16 0; #X connect 5 0 4 0; #X connect 6 0 18 0; #X connect 6 1 5 1; #X connect 7 0 14 0; #X connect 7 1 20 0; #X connect 8 0 9 0; #X connect 8 1 15 1; #X connect 9 0 10 0; #X connect 10 0 12 0; #X connect 11 0 19 0; #X connect 12 0 11 0; #X connect 13 0 17 0; #X connect 13 1 12 1; #X connect 14 0 21 0; #X connect 17 0 8 0; #X connect 18 0 1 0; #X connect 19 0 15 0; #X connect 20 0 6 0; #X connect 21 0 13 0; #X restore 514 171 pd generate_a_cos; #X floatatom 555 132 5 -31 31 0 - - -; #N canvas 0 22 495 419 generate_a_sin 0; #X obj 102 37 inlet; #X obj 246 182 t f f; #X obj 246 217 / 32; #X obj 246 238 * 3.14159; #X obj 246 263 * 8; #X obj 246 112 clip 0 31; #X obj 246 133 t b f; #X obj 246 289 sin; #X obj 54 180 t f f; #X obj 54 215 / 32; #X obj 54 236 * 3.14159; #X obj 54 261 * 8; #X obj 54 110 clip 0 31; #X obj 54 131 t b f; #X obj 54 287 sin; #X obj 102 60 moses 0; #X obj 54 88 * -1; #X obj 246 337 tabwrite src_im; #X obj 54 336 tabwrite src_im; #N canvas 193 158 454 304 counter 0; #X obj 108 25 inlet; #X obj 109 163 outlet; #X obj 109 133 f; #X obj 142 133 + 1; #X obj 108 50 t b b; #X msg 154 76 0; #X msg 109 75 64; #X obj 110 98 until; #X connect 0 0 4 0; #X connect 2 0 3 0; #X connect 2 0 1 0; #X connect 3 0 2 1; #X connect 4 0 6 0; #X connect 4 1 5 0; #X connect 5 0 2 1; #X connect 6 0 7 0; #X connect 7 0 2 0; #X restore 54 156 pd counter; #N canvas 193 158 454 304 counter 0; #X obj 108 25 inlet; #X obj 109 163 outlet; #X obj 109 133 f; #X obj 142 133 + 1; #X obj 108 50 t b b; #X msg 154 76 0; #X msg 109 75 64; #X obj 110 98 until; #X connect 0 0 4 0; #X connect 2 0 3 0; #X connect 2 0 1 0; #X connect 3 0 2 1; #X connect 4 0 6 0; #X connect 4 1 5 0; #X connect 5 0 2 1; #X connect 6 0 7 0; #X connect 7 0 2 0; #X restore 246 156 pd counter; #X obj 53 312 * -1; #X connect 0 0 15 0; #X connect 1 0 2 0; #X connect 1 1 17 1; #X connect 2 0 3 0; #X connect 3 0 4 0; #X connect 4 0 7 0; #X connect 5 0 6 0; #X connect 6 0 20 0; #X connect 6 1 4 1; #X connect 7 0 17 0; #X connect 8 0 9 0; #X connect 8 1 18 1; #X connect 9 0 10 0; #X connect 10 0 11 0; #X connect 11 0 14 0; #X connect 12 0 13 0; #X connect 13 0 19 0; #X connect 13 1 11 1; #X connect 14 0 21 0; #X connect 15 0 16 0; #X connect 15 1 5 0; #X connect 16 0 12 0; #X connect 19 0 8 0; #X connect 20 0 1 0; #X connect 21 0 18 0; #X restore 555 192 pd generate_a_sin; #X text 37 441 (c) Thomas Musil 2000 - 2009; #X text 10 0 tab_ifft; #X text 93 -1 complex inverse FTT with arrays; #X text 45 56 calculates a complex inverse fourier transformation of complex src-arrays to complex dst-arrays; #X obj 24 94 tab_ifft src_re src_im dst_re dst_im 64; #X obj 62 348 tab_ifft src_re src_im dst_re dst_im 64; #X text 259 424 5.arg: ifftsize; #X connect 2 0 46 0; #X connect 6 0 47 0; #X connect 7 0 47 0; #X connect 8 0 47 0; #X connect 9 0 16 0; #X connect 17 0 18 0; #X connect 19 0 20 0; #X connect 27 0 47 0; #X connect 33 0 47 0; #X connect 34 0 47 0; #X connect 36 0 37 0; #X connect 38 0 39 0; #X connect 40 0 41 0; #X connect 46 0 3 0; #X connect 47 0 4 0; iem_utils-v0.0.20181004/iem_tab/tab_ne-help.pd0000644000175000017500000000647512630366350021004 0ustar zmoelnigzmoelnig#N canvas 116 92 863 568 10; #N canvas 0 0 450 300 graph1 0; #X array src1 100 float 1; #A 0 -0.442858 -0.414287 -0.385715 -0.342858 -0.314287 -0.257144 -0.128572 -0.0428573 0.128572 0.228572 0.285715 0.328572 0.400001 0.414287 0.457144 0.457144 0.442858 0.385715 0.314287 0.257144 0.214286 0.1 0.0428572 -0.0142858 -0.0428573 -0.114286 -0.142858 -0.200001 -0.242858 -0.285715 -0.328572 -0.342858 -0.37143 -0.385715 -0.414287 -0.414287 -0.414287 -0.414287 -0.400001 -0.357144 -0.314287 -0.257144 -0.185715 -0.0714288 0.0142857 0.0571429 0.171429 0.328572 0.400001 0.442858 0.47143 0.485715 0.485715 0.485715 0.485715 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.485715 0.471429 0.457144 0.442858 0.442858 0.428572 0.414286 0.385715 0.357143 0.342858 0.314286 0.285715 0.242857 0.185714 0.142857 0.114286 0.085714; #X coords 0 1 99 -1 200 140 1; #X restore 534 10 graph; #N canvas 0 0 450 300 graph1 0; #X array dst 100 float 0; #X coords 0 1 99 -1 200 140 1; #X restore 535 358 graph; #X obj 61 31 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X obj 61 106 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X obj 59 340 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X msg 255 276 dst dst; #N canvas 0 0 450 300 graph1 0; #X array src2 100 float 1; #A 0 0.557135 0.57142 0.557135 0.528564 0.499992 0.428564 0.357136 0.299994 0.0999951 -0.0571467 -0.157146 -0.228574 -0.300002 -0.328573 -0.357145 -0.385716 -0.400001 -0.400001 -0.385716 -0.385716 -0.37143 -0.364287 -0.357145 -0.328573 -0.300002 -0.271431 -0.24286 -0.214288 -0.14286 -0.085718 -0.0428611 -4.28595e-006 0.0428526 0.099995 0.171423 0.21428 0.257137 0.328565 0.371422 0.442849 0.457135 0.471421 0.471421 0.485706 0.485706 0.485706 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.485714 0.471429 0.457135 0.428564 0.371422 0.314279 0.242851 0.0857095 -0.0857178 -0.271431 -0.400001 -0.514286 -0.542858 -0.557143 -0.585714 -0.585714 -0.6 -0.6 -0.614286 -0.614286 -0.614286; #X coords 0 1 99 -1 200 140 1; #X restore 535 161 graph; #X msg 136 233 src1 src1; #X msg 195 255 src2 src2; #X msg 59 211 50 50 20 50; #X text 45 139 list of 4 floats:; #X text 212 353 3.arg: destination-name; #X text 78 435 IEM KUG; #X text 62 423 musil; #X text 92 423 @; #X text 98 423 iem.at; #X text 61 445 Graz \, Austria; #X text 13 412 (c) Thomas Musil 2000 - 2006; #X text 234 312 initial arguments:; #X text 72 319 output; #X text 306 275 xxx : change destination name; #X text 208 86 the minimum of the 3 array lengths); #X text 56 177 3.) dst onset; #X text 56 155 1.) src_1 onset; #X text 56 166 2.) src_2 onset; #X text 199 233 xxx : change source name 1; #X text 257 255 xxx : change source name 2; #X text 211 326 1.arg: source-name 1; #X text 211 339 2.arg: source-name 2; #X text 195 72 (the number of samples which were compared are:; #X text 56 187 4.) n samples to compare; #X text 12 3 tab_ne; #X text 90 29 compare "not equal to" the 2 src-arrays to dst-array ; #X obj 61 78 tab_ne src1 src2 dst; #X obj 59 301 tab_ne src1 src2 dst; #X connect 2 0 33 0; #X connect 5 0 34 0; #X connect 7 0 34 0; #X connect 8 0 34 0; #X connect 9 0 34 0; #X connect 33 0 3 0; #X connect 34 0 4 0; iem_utils-v0.0.20181004/iem_tab/tab_abs-help.pd0000644000175000017500000000466512630366350021146 0ustar zmoelnigzmoelnig#N canvas 369 22 790 417 10; #N canvas 0 22 450 300 (subpatch) 0; #X array src 100 float 1; #A 0 -0.442858 -0.414287 -0.385715 -0.342858 -0.314287 -0.257144 -0.128572 -0.0428573 0.128572 0.228572 0.285715 0.328572 0.400001 0.414287 0.457144 0.457144 0.442858 0.385715 0.314287 0.257144 0.214286 0.1 0.0428572 -0.0142858 -0.0428573 -0.114286 -0.142858 -0.200001 -0.242858 -0.285715 -0.328572 -0.342858 -0.37143 -0.385715 -0.414287 -0.414287 -0.414287 -0.414287 -0.400001 -0.357144 -0.314287 -0.257144 -0.185715 -0.0714288 0.0142857 0.0571429 0.171429 0.328572 0.400001 0.442858 0.47143 0.485715 0.485715 0.485715 0.485715 0.485715 0.442858 0.357144 0.242858 0.185715 0.114286 0.0714285 -0.071429 -0.242858 -0.300001 -0.328573 -0.357144 -0.37143 -0.385715 -0.400001 -0.442858 -0.457144 -0.47143 -0.457144 -0.428573 -0.400001 -0.378573 -0.328572 -0.271429 -0.242858 -0.200001 -0.128572 -0.0428574 -0.0285717 0.0142858 0.114286 0.128572 0.185715 0.214286 0.257144 0.285715 0.314287 0.342858 0.357144 0.357144 0.357144 0.357144 0.357144 0.342858 0.328572; #X coords 0 1 99 -1 200 140 1; #X restore 534 10 graph; #N canvas 0 22 450 300 (subpatch) 0; #X array dst 100 float 0; #X coords 0 1 99 -1 200 140 1; #X restore 534 166 graph; #X obj 61 31 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X obj 61 106 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X obj 59 301 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X msg 59 211 50 20 50; #X text 44 154 list of 3 floats:; #X text 162 273 1.arg: source-name; #X text 162 286 2.arg: destination-name; #X msg 154 213 src src; #X msg 185 234 dst dst; #X obj 61 78 tab_abs src dst; #X obj 59 264 tab_abs src dst; #X text 78 365 IEM KUG; #X text 57 353 musil; #X text 92 353 @; #X text 100 353 iem.at; #X text 61 375 Graz \, Austria; #X text 12 3 tab_abs; #X text 90 29 copy absolute-value from src to dst; #X text 56 165 1.) src onset; #X text 56 175 2.) dst onset; #X text 171 261 initial arguments:; #X text 68 283 output; #X text 208 213 xxx : change source name; #X text 240 233 xxx : change destination name; #X text 175 69 (the number of samples which are copied are:; #X text 188 83 the minimum of both array lengths); #X text 56 185 3.) n samples to copy; #X text 190 185 absolute value; #X text 13 342 (c) Thomas Musil 2000 - 2009; #X connect 2 0 11 0; #X connect 5 0 12 0; #X connect 9 0 12 0; #X connect 10 0 12 0; #X connect 11 0 3 0; #X connect 12 0 4 0; iem_utils-v0.0.20181004/kiosk-plugin/0000755000175000017500000000000012661077615017310 5ustar zmoelnigzmoelnigiem_utils-v0.0.20181004/kiosk-plugin/LICENSE.txt0000644000175000017500000000304112661077615021131 0ustar zmoelnigzmoelnigThis software is copyrighted by Miller Puckette and others. The following terms (the "Standard Improved BSD License") apply to all files associated with the software unless explicitly disclaimed in individual files: Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. The name of the author may not be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. iem_utils-v0.0.20181004/kiosk-plugin/kiosk-plugin.tcl0000644000175000017500000001124112661077615022427 0ustar zmoelnigzmoelnig# META NAME Kiosk # META DESCRIPTION all windows in fullscreen mode # META DESCRIPTION main window invisible # META DESCRIPTION no keybindings # META AUTHOR IOhannes m zmölnig package require Tcl 8.5 package require Tk package require pdwindow 0.1 namespace eval ::kiosk:: { variable ::kiosk::config } ## default values set ::kiosk::config(KioskNewWindow) False set ::kiosk::config(ShowMenu) True set ::kiosk::config(FullScreen) False set ::kiosk::config(HideMain) False #set ::kiosk::config(WindowTitle) "Pd KIOSK" set ::kiosk::config(WindowTitle) "" set ::kiosk::config(HidePopup) False set ::kiosk::config(ScrollBars) True set ::kiosk::config(QuitOnClose) False set ::kiosk::config(PreventClose) False set ::kiosk::config(Bindings) True set ::kiosk::config(QuitBinding) True set ::kiosk::config(GeometryMain) "" proc ::kiosk::readconfig {{fname kiosk.cfg}} { set orgname $fname if {[file exists $fname]} { set fp [open $fname r] } else { set fname [file join $::current_plugin_loadpath $fname] if {[file exists $fname]} { set fp [open $fname r] } else { puts "kiosk-configuration not found: $orgname" return False } } while {![eof $fp]} { set data [gets $fp] if { [string is list $data ] } { if { [llength $data ] > 1 } { set ::kiosk::config([lindex $data 0]) [lindex $data 1] } } } return True } # this is just an empty menu menu .kioskmenu ## KIOSkify a window proc ::kiosk::makekiosk {mywin} { ## refuse to kioskify the main Pd window if { $mywin == ".pdwindow" } { return; } # puts "KIOSKing $mywin" #remove menu if { $::kiosk::config(ShowMenu) } { } { $mywin configure -menu .kioskmenu; } # make fullscreen if { $::kiosk::config(FullScreen) } { wm attributes $mywin -fullscreen 1 } # set the title of the window # (makes mostly sense in non-fullscren...) if { $::kiosk::config(WindowTitle) != "" } { wm title $mywin $::kiosk::config(WindowTitle) } # close pd if the window is closed (or no close at all) if { $::kiosk::config(PreventClose) } { # prevent WindowClose using Alt-F4 or clicking on the "x" wm protocol $mywin WM_DELETE_WINDOW ";" } { # if we do allow closing of windows, we might want to Quit as well if { $::kiosk::config(QuitOnClose) } { #wm protocol $mywin WM_DELETE_WINDOW "pdsend \"pd quit\"" bind $mywin "pdsend \"pd quit\"" } } set mycnv [tkcanvas_name $mywin ] # remove all special key/mouse bindings from the window if { $::kiosk::config(QuitBinding) } { } { # bind $mycnv {} # bind $mycnv {} # bind all {} # bind all {} bind $mycnv {} bind $mycnv {} bind all {} bind all {} } # remove all special key/mouse bindings from the window if { $::kiosk::config(Bindings) } { } { bindtags $mywin "" bindtags $mycnv "$mycnv" # rebind ordinary keypress events bind $mycnv {::pd_bindings::sendkey %W 1 %K %A 0} bind $mycnv {::pd_bindings::sendkey %W 0 %K %A 0} bind $mycnv {::pd_bindings::sendkey %W 1 %K %A 1} bind $mycnv {::pd_bindings::sendkey %W 0 %K %A 1} } } ###################################### ## read the default configuration file "kiosk.cfg" if { [info exists ::env(PD_KIOSK_CONFIG) ] } { ::kiosk::readconfig $::env(PD_KIOSK_CONFIG) } { ::kiosk::readconfig } ###### do some global KIOSK-settings ## set the geometry of the Pd window if { $::kiosk::config(GeometryMain) != "" } { wm geometry .pdwindow =$::kiosk::config(GeometryMain) } ## hide the Pd window if { $::kiosk::config(HideMain) } { set ::stderr 1 wm state .pdwindow withdraw } ## don't show popup menu on right-click if { $::kiosk::config(HidePopup) } { proc ::pdtk_canvas::pdtk_canvas_popup {mytoplevel xcanvas ycanvas hasproperties hasopen} { } } if { $::kiosk::config(ScrollBars) } { } { proc ::pdtk_canvas::pdtk_canvas_getscroll {tkcanvas} { } } # do the KIOSK-setting per existing window (those windows loaded at startup) foreach kioskwin [array names ::loaded] { ::kiosk::makekiosk $kioskwin } # do the KIOSKification for newly created windows as well if { $::kiosk::config(KioskNewWindow) } { ## not the most elegant way: KIOSKifying each window as it get's focus bind PatchWindow "+::kiosk::makekiosk %W" } pdtk_post "loaded: kiosk-plugin 0.2\n" iem_utils-v0.0.20181004/kiosk-plugin/kiosk.cfg0000644000175000017500000000301612661077615021111 0ustar zmoelnigzmoelnig# whether we want to hide the main PdWindow #HideMain True HideMain False # if main Window is not hidden, we can force a geometry to it #GeometryMain "500x400+20+50" # by default, only initially opened PatchWindows are KIOSKed # you can apply KIOSK settings to new windows, if you set the following to "True" #KioskNewWindow False KioskNewWindow False # whether you want to show the Menu-bar in the PatchWindows #ShowMenu False ShowMenu True # whether PatchWindows should be fullscreen #FullScreen True FullScreen False # override the name of the PatchWindowS (display this string rather than the # patch-name) # if set to "", the original window name is displayed #WindowTitle "Pd KIOSK" WindowTitle "" # prevent the PatchWindow to be closed using Alt-F4, clicking on the # "close-window" icon and the like #PreventClose True PreventClose False # if window closing is allowed and the main window is hidden, it is probably a # good idea to quit Pd, if one of the PatchWindowS is closed #QuitOnClose True QuitOnClose False # prevent the context menu to show up on Right-Click #HidePopup True HidePopup False # prevent special key-bindings (e.g. Control-Q for close) # ordinary key-bindings are still allowed to allow users to type #QuitBinding False QuitBinding True # prevent all special key-bindings (e.g. Control-W for close) # ordinary key-bindings are still allowed to allow users to type #Bindings False Bindings True # disable scroll-bars to appear, even if the content does not fit on the window #ScrollBars False ScrollBars True iem_utils-v0.0.20181004/kiosk-plugin/README.txt0000644000175000017500000000234112661077615021006 0ustar zmoelnigzmoelnigKIOSK mode for Pure Data ======================== KIOSK mode allows you to enable one or more of the following features * hiding the main Pd-window * disabling the menu bar in the patch window * making a patch window to be shown at fullsreen * setting a window name for the patch window (independent of the patch name) * prevent closing of patch windows (using Alt-F4, clicking on the "Close * Window" icon, et al.) * quit Pd when a patch window is closed * disable the (right click) context menu * disable key-bindings (like Ctrl-N) * prevent scroll bars from appearing, even if the patch content does not fit * on a single window you can enable/disable the parts you want to by editing a kiosk.cfg file. this config file is searched for in the working directory of Pd, and (if not found) in the plugin directory of the kiosk-plugin (usually ~/pd-externals/kiosk-plugin/) INSTALLATION ------------ just copy this directoy to ~/pd-externals/kiosk-plugin/ it will be automatically used, the next time you start Pd PREREQUISITES ------------- gui-plugins only work with Pd>=0.43 AUTHOR ------ IOhannes m zmölnig (though the fullscreen part was copied from András Murányi's "fullscreen" plugin) iem_utils-v0.0.20181004/patch2svg-plugin/0000755000175000017500000000000013207347064020064 5ustar zmoelnigzmoelnigiem_utils-v0.0.20181004/patch2svg-plugin/LICENSE.txt0000644000175000017500000000304512661077616021717 0ustar zmoelnigzmoelnigThis software is copyrighted by IOhannes m zmölnig and others. The following terms (the "Standard Improved BSD License") apply to all files associated with the software unless explicitly disclaimed in individual files: Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. The name of the author may not be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. iem_utils-v0.0.20181004/patch2svg-plugin/README.md0000644000175000017500000000212413207347064021342 0ustar zmoelnigzmoelnigSave Pd patches as SVG ====================== This adds a new menu-item to the "File" menu: "Save patch as SVG..." It allows you to save the current Pd patch as an SVG graphics. ## Installing Simply copy the [patch2svg-plugin.tcl](https://git.iem.at/pd-gui/patch2svg-plugin/raw/master/patch2svg-plugin.tcl) into your Pd searchpath. ## Repository The official repository is https://git.iem.at/pd-gui/patch2svg-plugin/ There is also a mirror on github: https://github.com/iem-projects/patch2svg-plugin ## Reporting Issues If you have discovered a bug or are missing some functionality, please do not hestitate to let me know. We are currently accepting bug-reports (and pull-requests) on our github mirror: https://github.com/iem-projects/patch2svg-plugin/issues ### Translating If you want the "Save patch as SVG..." menu-entry to be displayed in another language, please send me a translation (you can use the patch-tracker for this). ## AUTHORS - IOhannes m zmölnig - the canvas2svg converter was original written by Mats Bengtsson (and virtually no changes have been made to it). iem_utils-v0.0.20181004/patch2svg-plugin/patch2svg-plugin.tcl0000644000175000017500000013166212677304647024010 0ustar zmoelnigzmoelnig# META convert a patch to a picture (SVG) # META DESCRIPTION exports your patch as an SVG-image # META AUTHOR IOhannes m zmlnig # META VERSION 0.1 package require pdwindow 0.1 if [catch { package require msgcat ::msgcat::mcload po }] { puts "patch2svg: i18n failed" } #package require uriencode #package require tinyfileutils namespace eval ::patch2svg:: { variable label proc export {mytoplevel filename} { can2svg::canvas2file [tkcanvas_name $mytoplevel] $filename } # ::patch2svg::exportall proc exportall {{template "%s%x.svg"}} { ## exports all open windows to SVG ## template vars: ## - '%s' window name ## - '%x' window id if {[string length $template] == 0 } {set template "%s%x.svg" } foreach w [get_patchwindows] { set wname [lookup_windowname $w] set name [string map [list %s "$wname" %x "$w"] $template] pdtk_post "exporting to SVG: $name\n" puts "w $w" puts "wname $wname" puts "name $name" puts "template $template" puts "" export $w $name } } proc is_patchwindow {w} { #expr {[winfo toplevel $w] eq $w && ![catch {$w cget -menu}]} expr {[winfo class $w] eq "PatchWindow"} } proc get_patchwindows {{w .}} { set list {} if {[is_patchwindow $w]} { lappend list $w } foreach w [winfo children $w] { lappend list {*}[get_patchwindows $w] } return $list } # can2svg.tcl --- # # This file provides translation from canvas commands to XML/SVG format. # # Copyright (c) 2002-2007 Mats Bengtsson # # This file is distributed under BSD style license. # # $Id: can2svg.tcl,v 1.26 2008-01-27 08:19:36 matben Exp $ # # ########################### USAGE ############################################ # # NAME # can2svg - translate canvas command to SVG. # # SYNOPSIS # can2svg canvasCmd ?options? # canvasCmd is everything except the widget path name. # # can2svg::canvas2file widgetPath fileName ?options? # options: -height # -width # # can2svg::can2svg canvasCmd ?options? # options: -httpbasedir path # -imagehandler tclProc # -ovalasellipse 0|1 # -reusedefs 0|1 # -uritype file|http # -usestyleattribute 0|1 # -usetags 0|all|first|last # -windowitemhandler tclProc # # can2svg::config ?options? # options: -allownewlines 0 # -filtertags "" # -httpaddr localhost # -ovalasellipse 0 # -reusedefs 1 # -uritype file # -usetags all # -usestyleattribute 1 # -windowitemhandler tclProc # # ########################### CHANGES ########################################## # # 0.1 first release # 0.2 URI encoded image file path # 0.3 uses xmllists more, added svgasxmllist # # ########################### TODO ############################################# # # handle units (m->mm etc.) # better support for stipple patterns # how to handle tk editing? DOM? # # ... # We need URN encoding for the file path in images. From my whiteboard code. namespace eval can2svg { # namespace export can2svg canvas2file variable confopts array set confopts { -allownewlines 0 -filtertags "" -httpaddr localhost -ovalasellipse 0 -reusedefs 1 -uritype file -usetags all -usestyleattribute 1 -windowitemhandler "" } set confopts(-httpbasedir) [info script] variable formatArrowMarker variable formatArrowMarkerLast # The key into this array is 'arrowMarkerDef_$col_$a_$b_$c', where # col is color, and a, b, c are the arrow's shape. variable defsArrowMarkerArr # Similarly for stipple patterns. variable defsStipplePatternArr # This shouldn't be hardcoded! variable defaultFont {Helvetica 12} variable pi 3.14159265359 variable anglesToRadians [expr {$pi/180.0}] variable grayStipples {gray75 gray50 gray25 gray12} # Make 4x4 squares. Perhaps could be improved. variable stippleDataArr set stippleDataArr(gray75) \ {M 0 0 h3 M 0 1 h1 M 2 1 h2 M 0 2 h3 M 0 3 h1 M 2 3 h1} set stippleDataArr(gray50) \ {M 0 0 h1 M 2 0 h1 M 1 1 h1 M 3 1 h1 M 0 2 h1 M 2 2 h1 M 1 3 h1 M 3 3 h1} set stippleDataArr(gray25) \ {M 3 0 h1 M 1 1 h1 M 3 2 h1 M 1 3 h1} set stippleDataArr(gray12) \ {M 1 1 h1 M 3 3 h1} } proc can2svg::config {args} { variable confopts set options [lsort [array names confopts -*]] set usage [join $options ", "] if {[llength $args] == 0} { set result {} foreach name $options { lappend result $name $confopts($name) } return $result } regsub -all -- - $options {} options set pat ^-([join $options |])$ if {[llength $args] == 1} { set flag [lindex $args 0] if {[regexp -- $pat $flag]} { return $confopts($flag) } else { return -code error "Unknown option $flag, must be: $usage" } } else { foreach {flag value} $args { if {[regexp -- $pat $flag]} { set confopts($flag) $value } else { return -code error "Unknown option $flag, must be: $usage" } } } } # can2svg::can2svg -- # # Make xml out of a canvas command, widgetPath removed. # # Arguments: # cmd canvas create commands without prepending widget path. # args -httpbasedir path # -imagehandler tclProc # -ovalasellipse 0|1 # -reusedefs 0|1 # -uritype file|http # -usestyleattribute 0|1 # -usetags 0|all|first|last # # Results: # xml data proc can2svg::can2svg {cmd args} { set xml "" foreach xmllist [eval {svgasxmllist $cmd} $args] { append xml [MakeXML $xmllist] } return $xml } # can2svg::svgasxmllist -- # # Make a list of xmllists out of a canvas command, widgetPath removed. # # Arguments: # cmd canvas create command without prepending widget path. # args -httpbasedir path # -imagehandler tclProc # -ovalasellipse 0|1 # -reusedefs 0|1 # -uritype file|http # -usestyleattribute 0|1 # -usetags 0|all|first|last # # Results: # a list of xmllist = {tag attrlist isempty cdata {child1 child2 ...}} proc can2svg::svgasxmllist {cmd args} { variable confopts variable defsArrowMarkerArr variable defsStipplePatternArr variable defaultFont variable grayStipples set nonum_ {[^0-9]} set wsp_ {[ ]+} set xmlLL [list] array set argsA [array get confopts] array set argsA $args set args [array get argsA] if {![string equal [lindex $cmd 0] "create"]} { return } set type [lindex $cmd 1] set rest [lrange $cmd 2 end] # Separate coords from options. set indopt [lsearch -regexp $rest "-${nonum_}"] if {$indopt < 0} { set ind end set opts [list] } else { set ind [expr {$indopt - 1}] set opts [lrange $rest $indopt end] } # Flatten coordinate list! set coo [lrange $rest 0 $ind] if {[llength $coo] == 1} { set coo [lindex $coo 0] } array set optA $opts # Is the item in normal state? If not, return. if {[info exists optA(-state)] && $optA(-state) != "normal"} { return } # Figure out if we've got a spline. set haveSpline 0 if {[info exists optA(-smooth)] && ($optA(-smooth) != "0") && \ [info exists optA(-splinesteps)] && ($optA(-splinesteps) > 2)} { set haveSpline 1 } if {[info exists optA(-fill)]} { set fillValue $optA(-fill) if {![regexp {#[0-9]+} $fillValue]} { set fillValue [FormatColorName $fillValue] } } else { set fillValue black } if {[string length $argsA(-filtertags)] && [info exists optA(-tags)]} { set tag [uplevel #0 $argsA(-filtertags) [list $optA(-tags)]] set idAttr [list id $tag] } elseif {($argsA(-usetags) != "0") && [info exists optA(-tags)]} { # Remove any 'current' tag. set optA(-tags) \ [lsearch -all -not -inline $optA(-tags) current] switch -- $argsA(-usetags) { all { set idAttr [list id $optA(-tags)] } first { set idAttr [list id [lindex $optA(-tags) 0]] } last { set idAttr [list id [lindex $optA(-tags) end]] } } } else { set idAttr "" } # If we need a marker (arrow head) need to make that first. if {[info exists optA(-arrow)] && ![string equal $optA(-arrow) "none"]} { if {[info exists optA(-arrowshape)]} { # Make a key of the arrowshape list into the array. regsub -all -- $wsp_ $optA(-arrowshape) _ shapeKey set arrowKey ${fillValue}_${shapeKey} set arrowShape $optA(-arrowshape) } else { set arrowKey ${fillValue} set arrowShape {8 10 3} } if {!$argsA(-reusedefs) || \ ![info exists defsArrowMarkerArr($arrowKey)]} { set defsArrowMarkerArr($arrowKey) \ [eval {MakeArrowMarker} $arrowShape {$fillValue}] set xmlLL \ [concat $xmlLL $defsArrowMarkerArr($arrowKey)] } } # If we need a stipple bitmap, need to make that first. Limited!!! # Only: gray12, gray25, gray50, gray75 foreach key {-stipple -outlinestipple} { if {[info exists optA($key)] && \ ([lsearch $grayStipples $optA($key)] >= 0)} { set stipple $optA($key) if {![info exists defsStipplePatternArr($stipple)]} { set defsStipplePatternArr($stipple) \ [MakeGrayStippleDef $stipple] } lappend xmlLL $defsStipplePatternArr($stipple) } } #puts "can2svg::svgasxmllist cmd=$cmd, args=$args" switch -- $type { arc { # Had to do it the hard way! (?) # "Wrong" coordinate system :-( set attr [CoordsToAttr $type $coo $opts elem] if {[string length $idAttr] > 0} { set attr [concat $attr $idAttr] } set attr [concat $attr [MakeAttrList \ $type $opts $argsA(-usestyleattribute)]] lappend xmlLL [MakeXMLList $elem -attrlist $attr] } bitmap - image { if {[info exists optA(-image)]} { set elem "image" set attr [eval {MakeImageAttr $coo $opts} $args] if {[string length $idAttr] > 0} { set attr [concat $attr $idAttr] } set subEs [list] if {[info exists argsA(-imagehandler)]} { set subE [uplevel #0 $argsA(-imagehandler) [list $cmd] $args] if {[llength $subE]} { set subEs [list $subE] } } lappend xmlLL [MakeXMLList $elem -attrlist $attr -subtags $subEs] } } line { set attr [CoordsToAttr $type $coo $opts elem] if {[string length $idAttr] > 0} { set attr [concat $attr $idAttr] } set attr [concat $attr [MakeAttrList \ $type $opts $argsA(-usestyleattribute)]] lappend xmlLL [MakeXMLList $elem -attrlist $attr] } oval { set attr [CoordsToAttr $type $coo $opts elem] foreach {x y w h} [NormalizeRectCoords $coo] break if {[expr {$w == $h}] && !$argsA(-ovalasellipse)} { # set elem "circle";# circle needs an r: not an rx & ry set elem "ellipse" } else { set elem "ellipse" } if {[string length $idAttr] > 0} { set attr [concat $attr $idAttr] } set attr [concat $attr [MakeAttrList \ $type $opts $argsA(-usestyleattribute)]] lappend xmlLL [MakeXMLList $elem -attrlist $attr] } polygon { set attr [CoordsToAttr $type $coo $opts elem] if {[string length $idAttr] > 0} { set attr [concat $attr $idAttr] } set attr [concat $attr [MakeAttrList \ $type $opts $argsA(-usestyleattribute)]] lappend xmlLL [MakeXMLList $elem -attrlist $attr] } rectangle { set attr [CoordsToAttr $type $coo $opts elem] if {[string length $idAttr] > 0} { set attr [concat $attr $idAttr] } set attr [concat $attr [MakeAttrList \ $type $opts $argsA(-usestyleattribute)]] lappend xmlLL [MakeXMLList $elem -attrlist $attr] } text { set elem "text" set chdata "" set nlines 1 if {[info exists optA(-font)]} { set theFont $optA(-font) } else { set theFont $defaultFont } set ascent [font metrics $theFont -ascent] set lineSpace [font metrics $theFont -linespace] if {[info exists optA(-text)]} { set chdata $optA(-text) if {[info exists optA(-width)]} { # MICK O'DONNELL: if the text is wrapped in the wgt, we need # to simulate linebreaks # # If the item has got -width != 0 then we must wrap it ourselves # using newlines since the -text does not have extra newlines # at these linebreaks. set lines [split $chdata \n] set newlines {} foreach line $lines { set lines2 [SplitWrappedLines $line $theFont $optA(-width)] set newlines [concat $newlines $lines2] } set chdata [join $newlines \n] if {!$argsA(-allownewlines) || \ ([llength $newlines] > [llength $lines])} { set nlines [expr {[regexp -all "\n" $chdata] + 1}] } } else { if {!$argsA(-allownewlines)} { set nlines [expr {[regexp -all "\n" $chdata] + 1}] } } } # Figure out the coords of the first baseline. set anchor center if {[info exists optA(-anchor)]} { set anchor $optA(-anchor) } foreach {xbase ybase} \ [GetTextSVGCoords $coo $anchor $chdata $theFont $nlines] {} set attr [list "x" $xbase "y" $ybase] if {[string length $idAttr] > 0} { set attr [concat $attr $idAttr] } set attr [concat $attr [MakeAttrList \ $type $opts $argsA(-usestyleattribute)]] set dy 0 if {$nlines > 1} { # Use the 'tspan' trick here. set subList {} foreach line [split $chdata "\n"] { lappend subList [MakeXMLList "tspan" \ -attrlist [list "x" $xbase "dy" $dy] -chdata $line] set dy $lineSpace } lappend xmlLL [MakeXMLList $elem -attrlist $attr \ -subtags $subList] } else { lappend xmlLL [MakeXMLList $elem -attrlist $attr \ -chdata $chdata] } } window { # There is no svg for this; must be handled by application layer. #puts "window: $cmd" if {[string length $argsA(-windowitemhandler)]} { set xmllist \ [uplevel #0 $argsA(-windowitemhandler) [list $cmd] $args] if {[llength $xmllist]} { lappend xmlLL $xmllist } } } } return $xmlLL } # can2svg::CoordsToAttr -- # # Makes a list of attributes corresponding to type and coords. # # Arguments: # # # Results: # a list of attributes. proc can2svg::CoordsToAttr {type coo opts svgElementVar} { upvar $svgElementVar elem array set optA $opts # Figure out if we've got a spline. set haveSpline 0 if {[info exists optA(-smooth)] && ($optA(-smooth) != "0") && \ [info exists optA(-splinesteps)] && ($optA(-splinesteps) > 2)} { set haveSpline 1 } set attr {} switch -- $type { arc { set elem "path" set data [MakeArcPath $coo $opts] set attr [list "d" $data] } bitmap - image { array set __optA $opts if {[info exists __optA(-image)]} { set elem "image" set attr [ImageCoordsToAttr $coo $opts] } } line { if {$haveSpline} { set elem "path" set data [ParseSplineToPath $type $coo] set attr [list "d" $data] } else { set elem "polyline" set attr [list "points" $coo] } } oval { # Assume SVG ellipse. set elem "ellipse" foreach {x y w h} [NormalizeRectCoords $coo] break set attr [list \ "cx" [expr {$x + $w/2.0}] "cy" [expr {$y + $h/2.0}] \ "rx" [expr {$w/2.0}] "ry" [expr {$h/2.0}]] } polygon { if {$haveSpline} { set elem "path" set data [ParseSplineToPath $type $coo] set attr [list "d" $data] } else { set elem "polygon" set attr [list "points" $coo] } } rectangle { set elem "rect" foreach {x y w h} [NormalizeRectCoords $coo] break set attr [list "x" $x "y" $y "width" $w "height" $h] } text { set elem "text" # ? } } return $attr } # can2svg::MakeArcPath -- # # Makes a path using A commands from an arc. # Conversion from center to endpoint parameterization. # From: http://www.w3.org/TR/2003/REC-SVG11-20030114 proc can2svg::MakeArcPath {coo opts} { variable anglesToRadians variable pi # Canvas defaults. array set optA { -extent 90 -start 0 -style pieslice } array set optA $opts # Extract center and radius from bounding box. foreach {x1 y1 x2 y2} $coo break set cx [expr {($x1 + $x2)/2.0}] set cy [expr {($y1 + $y2)/2.0}] set rx [expr {abs($x1 - $x2)/2.0}] set ry [expr {abs($y1 - $y2)/2.0}] set start [expr {$anglesToRadians * $optA(-start)}] set extent [expr {$anglesToRadians * $optA(-extent)}] # NOTE: direction of angles are opposite for Tk and SVG! set theta1 [expr {-1*$start}] set delta [expr {-1*$extent}] set theta2 [expr {$theta1 + $delta}] set phi 0.0 # F.6.4 Conversion from center to endpoint parameterization. set x1 [expr {$cx + $rx * cos($theta1) * cos($phi) - \ $ry * sin($theta1) * sin($phi)}] set y1 [expr {$cy + $rx * cos($theta1) * sin($phi) + \ $ry * sin($theta1) * cos($phi)}] set x2 [expr {$cx + $rx * cos($theta2) * cos($phi) - \ $ry * sin($theta2) * sin($phi)}] set y2 [expr {$cy + $rx * cos($theta2) * sin($phi) + \ $ry * sin($theta2) * cos($phi)}] set fa [expr {abs($delta) > $pi ? 1 : 0}] set fs [expr {$delta > 0.0 ? 1 : 0}] set data [format "M %.1f %.1f A" $x1 $y1] append data [format " %.1f %.1f %.1f %1d %1d %.1f %.1f" \ $rx $ry $phi $fa $fs $x2 $y2] switch -- $optA(-style) { arc { # empty. } chord { append data " Z" } pieslice { append data [format " L %.1f %.1f Z" $cx $cy] } } return $data } # can2svg::MakeArcPathNonA -- # # Makes a path without any A commands from an arc. proc can2svg::MakeArcPathNonA {coo opts} { variable anglesToRadians array set optA $opts foreach {x1 y1 x2 y2} $coo break set cx [expr {($x1 + $x2)/2.0}] set cy [expr {($y1 + $y2)/2.0}] set rx [expr {abs($x1 - $x2)/2.0}] set ry [expr {abs($y1 - $y2)/2.0}] set rmin [expr {$rx > $ry ? $ry : $rx}] # This approximation gives a maximum half pixel error. set deltaPhi [expr {2.0/sqrt($rmin)}] set extent [expr {$anglesToRadians * $optA(-extent)}] set start [expr {$anglesToRadians * $optA(-start)}] set nsteps [expr {int(abs($extent)/$deltaPhi) + 2}] set delta [expr {$extent/$nsteps}] set data [format "M %.1f %.1f L" \ [expr {$cx + $rx*cos($start)}] [expr {$cy - $ry*sin($start)}]] for {set i 0} {$i <= $nsteps} {incr i} { set phi [expr {$start + $i * $delta}] append data [format " %.1f %.1f" \ [expr {$cx + $rx*cos($phi)}] [expr {$cy - $ry*sin($phi)}]] } if {[info exists optA(-style)]} { switch -- $optA(-style) { chord { append data " Z" } pieslice { append data [format " %.1f %.1f Z" $cx $cy] } } } else { # Pieslice is the default. append data [format " %.1f %.1f Z" $cx $cy] } return $data } # can2svg::MakeAttrList -- # # Handles the use of style attributes or presenetation attributes. proc can2svg::MakeAttrList {type opts usestyleattribute} { if {$usestyleattribute} { set attrList [list style [MakeStyleAttr $type $opts]] } else { set attrList [MakeStyleList $type $opts] } return $attrList } # can2svg::MakeStyleAttr -- # # Produce the SVG style attribute from the canvas item options. # # Arguments: # type tk canvas widget item type # opts # # Results: # The SVG style attribute as a a string. proc can2svg::MakeStyleAttr {type opts} { set style "" foreach {key value} [MakeStyleList $type $opts] { append style "${key}: ${value}; " } return [string trim $style] } proc can2svg::MakeStyleList {type opts args} { array set argsA { -setdefaults 1 } array set argsA $args # Defaults for everything except text. if {$argsA(-setdefaults) && ![string equal $type "text"]} { array set styleArr {fill none stroke black} } set fillCol black foreach {key value} $opts { switch -- $key { -arrow { set arrowValue $value } -arrowshape { set arrowShape $value } -capstyle { if {[string equal $value "projecting"]} { set value "square" } if {![string equal $value "butt"]} { set styleArr(stroke-linecap) $value } } -dash { set dashValue $value } -dashoffset { if {$value != 0} { set styleArr(stroke-dashoffset) $value } } -extent { # empty } -fill { # Need to translate names to hex spec. if {![regexp {#[0-9]+} $value]} { set value [FormatColorName $value] } set fillCol $value if {[string equal $type "line"]} { set styleArr(stroke) [MapEmptyToNone $value] } else { set styleArr(fill) [MapEmptyToNone $value] } } -font { array set styleArr [MakeFontStyleList $value] } -joinstyle { set styleArr(stroke-linejoin) $value } -outline { set styleArr(stroke) [MapEmptyToNone $value] } -outlinestipple { set outlineStippleValue $value } -start { # empty } -stipple { set stippleValue $value } -width { set styleArr(stroke-width) $value } } } # If any arrow specify its marker def url key. if {[info exists arrowValue]} { if {[info exists arrowShape]} { foreach {a b c} $arrowShape break set arrowIdKey "arrowMarkerDef_${fillCol}_${a}_${b}_${c}" set arrowIdKeyLast "arrowMarkerLastDef_${fillCol}_${a}_${b}_${c}" } else { set arrowIdKey "arrowMarkerDef_${fillCol}" set arrowIdKeyLast $arrowIdKey } switch -- $arrowValue { first { set styleArr(marker-start) "url(#$arrowIdKey)" } last { set styleArr(marker-end) "url(#$arrowIdKeyLast)" } both { set styleArr(marker-start) "url(#$arrowIdKey)" set styleArr(marker-end) "url(#$arrowIdKeyLast)" } } } if {[info exists stippleValue]} { # Overwrite any existing. set styleArr(fill) "url(#tile[string trimleft $stippleValue @])" } if {[info exists outlineStippleValue]} { # Overwrite any existing. set styleArr(stroke) "url(#tile[string trimleft $stippleValue @])" } # Transform dash value. if {[info exists dashValue]} { # Two different syntax here. if {[regexp {[\.,\-_]} $dashValue]} { # .=2 ,=4 -=6 space=4 times stroke width. # A space enlarges the... space. # Not foolproof! regsub -all -- {[^ ]} $dashValue "& " dash regsub -all -- " " $dash "12 " dash regsub -all -- " " $dash "8 " dash regsub -all -- " " $dash "4 " dash regsub -all -- {\.} $dash "2 " dash regsub -all -- {,} $dash "4 " dash regsub -all -- {-} $dash "6 " dash # Multiply with stroke width if > 1. if {[info exists styleArr(stroke-width)] && \ ($styleArr(stroke-width) > 1)} { set width $styleArr(stroke-width) set dashOrig $dash set dash {} foreach num $dashOrig { lappend dash [expr {int($width * $num)}] } } set styleArr(stroke-dasharray) [string trim $dash] } else { set dashValue [string trim $dashValue] if {$dashValue ne ""} { set styleArr(stroke-dasharray) $dashValue } } } if {[string equal $type "polygon"]} { set styleArr(fill-rule) "evenodd" } return [array get styleArr] } proc can2svg::FormatColorName {value} { if {[string length $value] == 0} { return $value } switch -- $value { black - white - red - green - blue { set col $value } default { # winfo rgb . white -> 65535 65535 65535 foreach rgb [winfo rgb . $value] { lappend rgbx [expr {$rgb >> 8}] } set col [eval {format "#%02x%02x%02x"} $rgbx] } } return $col } # can2svg::MakeFontStyleList -- # # Takes a tk font description and returns a flat style array. # # Arguments: # fontDesc a tk font description # # Results: # flat style array proc can2svg::MakeFontStyleList {fontDesc} { # MICK Modify - break a named font into its component fields set font [lindex $fontDesc 0] if {[lsearch -exact [font names] $font] > -1} { # This is a font name set styleArr(font-family) [font config $font -family] set fsize [font config $font -size] if {$fsize > 0} { # points set funit pt } else { # pixels (actually user units) set funit px } set styleArr(font-size) "[expr {abs($fsize)}]$funit" if {[font config $font -slant] == "italic"} { set styleArr(font-style) italic } if {[font config $font -weight] == "bold"} { set styleArr(font-weight) bold } if {[font config $font -underline]} { set styleArr(text-decoration) underline } if {[font config $font -overstrike]} { set styleArr(text-decoration) overline } } else { set styleArr(font-family) [lindex $fontDesc 0] if {[llength $fontDesc] > 1} { # Mick: added pt at end set fsize [lindex $fontDesc 1] if {$fsize > 0} { # points set funit pt } else { # pixels (actually user units) set funit px } set styleArr(font-size) "[expr {abs($fsize)}]$funit" } if {[llength $fontDesc] > 2} { set tkstyle [lindex $fontDesc 2] switch -- $tkstyle { bold { set styleArr(font-weight) $tkstyle } italic { set styleArr(font-style) $tkstyle } underline { set styleArr(text-decoration) underline } overstrike { set styleArr(text-decoration) overline } } } } return [array get styleArr] } # can2svg::SplitWrappedLines -- # # MICK O'DONNELL: added code to split wrapped lines # This is actally only needed for text items with -width != 0. # If -width = 0 then just return it. proc can2svg::SplitWrappedLines {line font wgtWidth} { # If the text is shorter than the widget width, no need to wrap # If the wgtWidth comes out as 0, don't wrap if {$wgtWidth == 0 || [font measure $font $line] <= $wgtWidth} { return [list $line] } # Wrap the line set width 0 set endchar 0 while {$width < $wgtWidth} { set substr [string range $line 0 [incr endchar]] set width [font measure $font $substr] } # Go back till we find a nonwhite char set char [string index $line $endchar] set default [expr {$endchar -1}] while {[BreakChar $char] == 0} { if {$endchar == 0} { # we got to the front without breaking, so break midword set endchar $default break } set char [string index $line [incr endchar -1]] } set first [string range $line 0 $endchar] set rest [string range $line [expr {$endchar+1}] end] return [concat [list $first] [SplitWrappedLines $rest $font $wgtWidth]] } proc can2svg::BreakChar {char} { if [string is space $char] {return 1} if {$char == "-"} {return 1} if {$char == ","} {return 1} return 0 } # can2svg::MakeImageAttr -- # # Special code is needed to make the attributes for an image item. # # Arguments: # elem # # Results: # proc can2svg::MakeImageAttr {coo opts args} { variable confopts array set optA {-anchor nw} array set optA $opts array set argsA $args set attrList [ImageCoordsToAttr $coo $opts] # We should make this an URI. set image $optA(-image) set fileName [$image cget -file] if {$fileName ne ""} { if {[string equal $argsA(-uritype) "file"]} { set uri [FileUriFromLocalFile $fileName] } elseif {[string equal $argsA(-uritype) "http"]} { set uri [HttpFromLocalFile $fileName] } lappend attrList "xlink:href" $uri } else { # Unclear if we can use base64 data in svg. } return $attrList } # Function : can2svg::ImageCoordsToAttr # ------------------------------ ------------------------------ --------- # Returns : list of x y width and height including description # Parameters : coo - coordinates of the image # opts - argument list -anchor nw ... # # Description : # fixme (Roger) 01/25/2008 :Why not using the bounding box? # # Written : 2002-2007, Mats # Rewritten : 01/25/2008, Roger # ------------------------------ ------------------------------ --------- proc can2svg::ImageCoordsToAttr {coo opts} { array set optArr {-anchor nw} array set optArr $opts if {![info exists optArr(-image)]} { return -code error "Missing -image option; can't parse that" } set theImage $optArr(-image) lassign $coo x0 y0 set w [image width $theImage] set h [image height $theImage] set x [expr {$x0 - $w/2.0}] set y [expr {$y0 - $h/2.0}] if { "center" ne $optArr(-anchor) } { foreach orientation [split $optArr(-anchor) {}] { switch $orientation { n { set y $y0 } s { set y [expr {$y0 - $w}] } e { set x [expr {$x0 - $h}] } w { set x $x0 } default {} } } } return [list "x" $x "y" $y "width" $w "height" $h] } proc can2svg::ImageCoordsToAttrBU {coo opts} { array set optA {-anchor nw} array set optA $opts if {[info exists optA(-image)]} { set theImage $optA(-image) set w [image width $theImage] set h [image height $theImage] } else { return -code error "Missing -image option; can't parse that" } foreach {x0 y0} $coo break switch -- $optA(-anchor) { nw { set x $x0 set y $y0 } n { set x [expr {$x0 - $w/2.0}] set y $y0 } ne { set x [expr {$x0 - $w}] set y $y0 } e { set x $x0 set y [expr {$y0 - $h/2.0}] } se { set x [expr {$x0 - $w}] set y [expr {$y0 - $h}] } s { set x [expr {$x0 - $w/2.0}] set y [expr {$y0 - $h}] } sw { set x $x0 set y [expr {$y0 - $h}] } w { set x $x0 set y [expr {$y0 - $h/2.0}] } center { set x [expr {$x0 - $w/2.0}] set y [expr {$y0 - $h/2.0}] } } set attrList [list "x" $x "y" $y "width" $w "height" $h] return $attrList } # can2svg::GetTextSVGCoords -- # # Figure out the baseline coords of the svg text element from # the canvas text item. # # Arguments: # coo {x y} # anchor # chdata character data, newlines included. # # Results: # raw xml data of the marker def element. proc can2svg::GetTextSVGCoords {coo anchor chdata theFont nlines} { foreach {x y} $coo break set ascent [font metrics $theFont -ascent] set lineSpace [font metrics $theFont -linespace] # If not anchored to the west it gets more complicated. if {![string match $anchor "*w*"]} { # Need to figure out the extent of the text. if {$nlines <= 1} { set textWidth [font measure $theFont $chdata] } else { set textWidth 0 foreach line [split $chdata "\n"] { set lineWidth [font measure $theFont $line] if {$lineWidth > $textWidth} { set textWidth $lineWidth } } } } switch -- $anchor { nw { set xbase $x set ybase [expr {$y + $ascent}] } w { set xbase $x set ybase [expr {$y - $nlines*$lineSpace/2.0 + $ascent}] } sw { set xbase $x set ybase [expr {$y - $nlines*$lineSpace + $ascent}] } s { set xbase [expr {$x - $textWidth/2.0}] set ybase [expr {$y - $nlines*$lineSpace + $ascent}] } se { set xbase [expr {$x - $textWidth}] set ybase [expr {$y - $nlines*$lineSpace + $ascent}] } e { set xbase [expr {$x - $textWidth}] set ybase [expr {$y - $nlines*$lineSpace/2.0 + $ascent}] } ne { set xbase [expr {$x - $textWidth}] set ybase [expr {$y + $ascent}] } n { set xbase [expr {$x - $textWidth/2.0}] set ybase [expr {$y + $ascent}] } center { set xbase [expr {$x - $textWidth/2.0}] set ybase [expr {$y - $nlines*$lineSpace/2.0 + $ascent}] } } return [list $xbase $ybase] } # can2svg::ParseSplineToPath -- # # Make the path data string for a bezier. # # Arguments: # type canvas type: line or polygon # coo its coordinate list # # Results: # path data string proc can2svg::ParseSplineToPath {type coo} { set npts [expr {[llength $coo]/2}] # line is open ended while the polygon must be closed. # Need to construct a closed smooth polygon with path instructions. switch -- $npts { 1 { set data "M [lrange $coo 0 1]" } 2 { set data "M [lrange $coo 0 1] L [lrange $coo 2 3]" } 3 { set data "M [lrange $coo 0 1] Q [lrange $coo 2 5]" } default { if {[string equal $type "polygon"]} { set x0s [expr {([lindex $coo 0] + [lindex $coo end-1])/2.}] set y0s [expr {([lindex $coo 1] + [lindex $coo end])/2.}] set data "M $x0s $y0s" # Add Q1 and Q2 points. append data " Q [lrange $coo 0 1]" set x0 [expr {([lindex $coo 0] + [lindex $coo 2])/2.}] set y0 [expr {([lindex $coo 1] + [lindex $coo 3])/2.}] append data " $x0 $y0" set xctrlp [lindex $coo 2] set yctrlp [lindex $coo 3] set tind 4 } else { set data "M [lrange $coo 0 1]" # Add Q1 and Q2 points. append data " Q [lrange $coo 2 3]" set x0 [expr {([lindex $coo 2] + [lindex $coo 4])/2.}] set y0 [expr {([lindex $coo 3] + [lindex $coo 5])/2.}] append data " $x0 $y0" set xctrlp [lindex $coo 4] set yctrlp [lindex $coo 5] set tind 6 } append data " T" foreach {x y} [lrange $coo $tind end-2] { #puts "x=$x, y=$y, xctrlp=$xctrlp, yctrlp=$yctrlp" # The T point is the midpoint between the # two control points. set x0 [expr {($x + $xctrlp)/2.0}] set y0 [expr {($y + $yctrlp)/2.0}] set xctrlp $x set yctrlp $y append data " $x0 $y0" #puts "data=$data" } if {[string equal $type "polygon"]} { set x0 [expr {([lindex $coo end-1] + $xctrlp)/2.0}] set y0 [expr {([lindex $coo end] + $yctrlp)/2.0}] append data " $x0 $y0" append data " $x0s $y0s" } else { append data " [lrange $coo end-1 end]" } #puts "data=$data" } } return $data } # can2svg::MakeArrowMarker -- # # Make the xml for an arrow marker def element. # # Arguments: # a arrows length along its symmetry line # b arrows total length # c arrows half width # col its color # # Results: # a list of xmllists of the marker def elements, both start and last. proc can2svg::MakeArrowMarker {a b c col} { variable formatArrowMarker variable formatArrowMarkerLast unset -nocomplain formatArrowMarker if {![info exists formatArrowMarker]} { # "M 0 c, b 0, a c, b 2*c Z" for the start marker. # "M 0 0, b c, 0 2*c, b-a c Z" for the last marker. set data "M 0 %s, %s 0, %s %s, %s %s Z" set style "fill: %s; stroke: %s;" set attr [list "d" $data "style" $style] set arrowList [MakeXMLList "path" -attrlist $attr] set markerAttr [list "id" %s "markerWidth" %s "markerHeight" %s \ "refX" %s "refY" %s "orient" "auto"] set defElemList [MakeXMLList "defs" -subtags \ [list [MakeXMLList "marker" -attrlist $markerAttr \ -subtags [list $arrowList] ] ] ] set formatArrowMarker $defElemList # ...and the last arrow marker. set dataLast "M 0 0, %s %s, 0 %s, %s %s Z" set attrLast [list "d" $dataLast "style" $style] set arrowLastList [MakeXMLList "path" -attrlist $attrLast] set defElemLastList [MakeXMLList "defs" -subtags \ [list [MakeXMLList "marker" -attrlist $markerAttr \ -subtags [list $arrowLastList] ] ] ] set formatArrowMarkerLast $defElemLastList } set idKey "arrowMarkerDef_${col}_${a}_${b}_${c}" set idKeyLast "arrowMarkerLastDef_${col}_${a}_${b}_${c}" # Figure out the order of all %s substitutions. set markerXML [format $formatArrowMarker $idKey \ $b [expr {2*$c}] 0 $c \ $c $b $a $c $b [expr {2*$c}] $col $col] set markerLastXML [format $formatArrowMarkerLast $idKeyLast \ $b [expr {2*$c}] $b $c \ $b $c [expr {2*$c}] [expr {$b-$a}] $c $col $col] return [list $markerXML $markerLastXML] } # can2svg::MakeGrayStippleDef -- # # proc can2svg::MakeGrayStippleDef {stipple} { variable stippleDataArr set pathList [MakeXMLList "path" -attrlist \ [list "d" $stippleDataArr($stipple) "style" "stroke: black; fill: none;"]] set patterAttr [list "id" "tile$stipple" "x" 0 "y" 0 "width" 4 "height" 4 \ "patternUnits" "userSpaceOnUse"] set defElemList [MakeXMLList "defs" -subtags \ [list [MakeXMLList "pattern" -attrlist $patterAttr \ -subtags [list $pathList] ] ] ] return $defElemList } # can2svg::MapEmptyToNone -- # # # Arguments: # elem # # Results: # proc can2svg::MapEmptyToNone {val} { if {[string length $val] == 0} { return "none" } else { return $val } } # can2svg::NormalizeRectCoords -- # # # Arguments: # elem # # Results: # proc can2svg::NormalizeRectCoords {coo} { foreach {x1 y1 x2 y2} $coo {} return [list [expr {$x2 > $x1 ? $x1 : $x2}] \ [expr {$y2 > $y1 ? $y1 : $y2}] \ [expr {abs($x1-$x2)}] \ [expr {abs($y1-$y2)}]] } # can2svg::makedocument -- # # Adds the prefix and suffix elements to make a complete XML/SVG # document. # # Arguments: # elem # # Results: # proc can2svg::makedocument {width height xml} { set pre "\n\ " set svgStart "" set svgEnd "" return "${pre}\n${svgStart}\n${xml}${svgEnd}" } # can2svg::canvas2file -- # # Takes everything on a canvas widget, translates it to XML/SVG, # and puts it on a file. # # Arguments: # wcan the canvas widget path # path the file path # args: -height # -width # # Results: # proc can2svg::canvas2file {wcan path args} { variable confopts variable defsArrowMarkerArr variable defsStipplePatternArr array set argsA [array get confopts] foreach {x y width height} [$wcan cget -scrollregion] break array set argsA [list -width $width -height $height] array set argsA $args set args [array get argsA] # Need to make a fresh start for marker def's. unset -nocomplain defsArrowMarkerArr defsStipplePatternArr set fd [open $path w] # This could have been done line by line. set xml "" foreach id [$wcan find all] { set type [$wcan type $id] set opts [$wcan itemconfigure $id] set opcmd {} foreach opt $opts { set op [lindex $opt 0] set val [lindex $opt 4] # Empty val's except -fill can be stripped off. if {![string equal $op "-fill"] && ([string length $val] == 0)} { continue } lappend opcmd $op $val } set co [$wcan coords $id] set cmd [concat "create" $type $co $opcmd] append xml "\t[eval {can2svg $cmd} $args]\n" } puts $fd [makedocument $argsA(-width) $argsA(-height) $xml] close $fd } # can2svg::MakeXML -- # # Creates raw xml data from a hierarchical list of xml code. # This proc gets called recursively for each child. # It makes also internal entity replacements on character data. # Mixed elements aren't treated correctly generally. # # Arguments: # xmlList a list of xml code in the format described in the header. # # Results: # raw xml data. proc can2svg::MakeXML {xmlList} { # Extract the XML data items. foreach {tag attrlist isempty chdata childlist} $xmlList {} set rawxml "<$tag" foreach {attr value} $attrlist { append rawxml " ${attr}='${value}'" } if {$isempty} { append rawxml "/>" return $rawxml } else { append rawxml ">" } # Call ourselves recursively for each child element. # There is an arbitrary choice here where childs are put before PCDATA. foreach child $childlist { append rawxml [MakeXML $child] } # Make standard entity replacements. if {[string length $chdata]} { append rawxml [XMLCrypt $chdata] } append rawxml "" return $rawxml } # can2svg::MakeXMLList -- # # Build an element list given the tag and the args. # # Arguments: # tagname: the name of this element. # args: # -empty 0|1 Is this an empty tag? If $chdata # and $subtags are empty, then whether # to make the tag empty or not is decided # here. (default: 1) # -attrlist {attr1 value1 attr2 value2 ..} Vars is a list # consisting of attr/value pairs, as shown. # -chdata $chdata ChData of tag (default: ""). # -subtags {$subchilds $subchilds ...} is a list containing xmldata # of $tagname's subtags. (default: no sub-tags) # # Results: # a list suitable for can2svg::MakeXML. proc can2svg::MakeXMLList {tagname args} { # Fill in the defaults. array set xmlarr {-isempty 1 -attrlist {} -chdata {} -subtags {}} # Override the defults with actual values. if {[llength $args] > 0} { array set xmlarr $args } if {!(($xmlarr(-chdata) eq "") && ($xmlarr(-subtags) eq ""))} { set xmlarr(-isempty) 0 } # Build sub elements list. set sublist [list] foreach child $xmlarr(-subtags) { lappend sublist $child } set xmlList [list $tagname $xmlarr(-attrlist) $xmlarr(-isempty) \ $xmlarr(-chdata) $sublist] return $xmlList } # can2svg::FileUriFromLocalFile -- # # Not foolproof! proc can2svg::FileUriFromLocalFile {path} { # Quote the disallowed characters according to the RFC for URN scheme. # ref: RFC2141 sec2.2 return file://[uriencode::quotepath $path] } # can2svg::HttpFromLocalFile -- # # Translates an absolute file path to an uri encoded http address. proc can2svg::HttpFromLocalFile {path} { variable confopts set relPath [::tfileutils::relative $confopts(-httpbasedir) $path] set relPath [uriencode::quotepath $relPath] return "http://$confopts(-httpaddr)/$relPath" } # can2svg::XMLCrypt -- # # Makes standard XML entity replacements. # # Arguments: # chdata: character data. # # Results: # chdata with XML standard entities replaced. proc can2svg::XMLCrypt {chdata} { foreach from {\& < > {"} {'}} \ to {{\&} {\<} {\>} {\"} {\'}} { regsub -all $from $chdata $to chdata } return $chdata } ## the following dummy is only here to undo the quoting error ## produced by some syntax-highlighters in the above function proc can2svg::dummy {} { puts {"} } #------------------------------------------------------------------------------- proc menu_export {mytoplevel} { if { ! [file isdirectory $::fileopendir]} {set ::fileopendir $::env(HOME)} set name [lookup_windowname $mytoplevel] # check if this is the default name 'Untitled' and if so, use 'pd.svg' # else strip the trailing .pd and add .svg set filename [tk_getSaveFile -initialfile ${name}.svg \ -defaultextension .svg \ -filetypes { {{Scalable Vector Graphics} {.svg}} } \ -initialdir $::fileopendir \ ] if {$filename ne ""} { set cnv [tkcanvas_name $mytoplevel] can2svg::canvas2file $cnv $filename set ::fileopendir [file dirname $filename] } } proc focus {winid state} { set menustate [expr $state?"normal":"disabled"] .menubar.file entryconfigure $::patch2svg::label -state $menustate } proc register {} { # create an entry for our "print2svg" in the "file" menu set ::patch2svg::label [_ "Export patch as SVG..."] set mymenu .menubar.file if {$::windowingsystem eq "aqua"} { set inserthere 8 } else { set inserthere 8 } #$mymenu insert $inserthere separator $mymenu insert $inserthere command \ -label $::patch2svg::label \ -state disabled \ -command {::patch2svg::menu_export $::focused_window} # bind all <$::modifier-Key-s> {::deken::open_helpbrowser .helpbrowser2} bind PatchWindow "+::patch2svg::focus %W 1" bind PdWindow "+::patch2svg::focus %W 0" set rpdr ::pd_connect::register_plugin_dispatch_receiver if {[info procs $rpdr] == $rpdr} { ${rpdr} ::patch2svg::exportall ::patch2svg::exportall } pdtk_post "loaded patch2svg-plugin\n" } } ::patch2svg::register iem_utils-v0.0.20181004/patch2svg-plugin/autoexport.pd0000644000175000017500000000054512661077616022635 0ustar zmoelnigzmoelnig#N canvas 446 419 596 293 10; #X obj 103 83 loadbang; #X obj 103 105 t b; #X obj 103 127 delay 1000; #X obj 103 149 t b b; #X obj 103 171 delay 100; #X msg 103 193 \; pd quit; #X msg 182 180 \; pd plugin-dispatch ::patch2svg::exportall; #X connect 0 0 1 0; #X connect 1 0 2 0; #X connect 2 0 3 0; #X connect 3 0 4 0; #X connect 3 1 6 0; #X connect 4 0 5 0; iem_utils-v0.0.20181004/patch2svg-plugin/po/0000755000175000017500000000000012661414061020475 5ustar zmoelnigzmoelnigiem_utils-v0.0.20181004/patch2svg-plugin/po/de.po0000644000175000017500000000110312661414036021422 0ustar zmoelnigzmoelnigmsgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: http://bugs.puredata.info\n" "POT-Creation-Date: 2016-02-17 22:39+0100\n" "PO-Revision-Date: \n" "Last-Translator: \n" "Language-Team: \n" "Language: de\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Generator: Poedit 1.8.7\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" # SOME DESCRIPTIVE TITLE. # This file is put in the public domain. # FIRST AUTHOR , YEAR. # msgid "Export patch as SVG..." msgstr "Patch als SVG exportieren..." iem_utils-v0.0.20181004/patch2svg-plugin/po/Makefile0000644000175000017500000000220612661414013022132 0ustar zmoelnigzmoelnig PACKAGE_NAME = patch to SVG PACKAGE_VERSION = 1.0 TCLFILES = patch2svg-plugin.tcl # we use all language files found here POFILES=$(wildcard *.po) MSGFILES=$(POFILES:.po=.msg) TEMPLATE = patch2svg.pot FILES = $(addprefix ../, $(TCLFILES)) # generate .msg files from the .po files all: $(TEMPLATE) $(MSGFILES) # refresh .po files from the template clean: -rm -f -- $(MSGFILES) -rm -f -- $(POFILES:=~) -rm -f -- $(TEMPLATE) distclean: clean po: $(TEMPLATE) $(POFILES) $(TEMPLATE): $(FILES) touch $(TEMPLATE) xgettext --join-existing \ --from-code=UTF-8 --language=Tcl --keyword=_ \ --sort-output --no-location --output=$(TEMPLATE) \ --package-name="$(PACKAGE_NAME)" \ --package-version=$(PACKAGE_VERSION) \ --copyright-holder='This file is put in the public domain' \ --foreign-user \ --msgid-bugs-address=http://bugs.puredata.info \ $(FILES) $(POFILES): $(TEMPLATE) touch $@ msgmerge --sort-output --no-fuzzy-matching --no-location --update $@ $(TEMPLATE) %.msg: %.po msgfmt --check --tcl --locale=$* -d . $< #install: $(MSGFILES) # install -d $(DESTDIR) # install $(MSGFILES) $(DESTDIR) install: @echo "nothing to install" iem_utils-v0.0.20181004/punish/0000755000175000017500000000000013303322335016164 5ustar zmoelnigzmoelnigiem_utils-v0.0.20181004/punish/triggerize-plugin/0000755000175000017500000000000013355472356021653 5ustar zmoelnigzmoelnigiem_utils-v0.0.20181004/punish/triggerize-plugin/triggerize-plugin.tcl0000644000175000017500000000377613355471367026044 0ustar zmoelnigzmoelnig# META helper plugin for triggerize-selection # META DESCRIPTION adds menu to tell the 'triggerize' library to doit # META AUTHOR IOhannes m zmlnig # META VERSION 0.1 package require pdwindow 0.1 if [catch { package require msgcat ::msgcat::mcload po }] { puts "iem::punish::triggerize: i18n failed" } namespace eval ::iem::punish::triggerize:: { variable label proc focus {winid state} { set menustate [expr $state?"normal":"disabled"] .menubar.edit entryconfigure "$::iem::punish::triggerize::label" -state $menustate } proc register {} { # create an entry for our "triggerize" in the "edit" menu set ::iem::punish::triggerize::label [_ "Triggerize Selection"] set accelerator $::pd_menus::accelerator set mymenu .menubar.edit if {$::windowingsystem eq "aqua"} { set inserthere 8 set accelerator "$accelerator" } else { set inserthere 8 set accelerator "$accelerator" } set accelerator "$accelerator+T" $mymenu insert $inserthere command \ -label $::iem::punish::triggerize::label \ -state disabled \ -accelerator "$accelerator" \ -command { menu_send $::focused_window triggerize } bind all <$::modifier-Key-t> {menu_send %W triggerize} bind PatchWindow "+::iem::punish::triggerize::focus %W 1" bind PdWindow "+::iem::punish::triggerize::focus %W 0" # attempt to load the 'triggerize' library from iem::punish # (that does all the work) set lib [string map {" " "\\ "} [file join $::current_plugin_loadpath triggerize]] pdsend "pd-_float_template declare -lib $lib" ::pdwindow::post "loaded iem::punish::triggerize-plugin\n" } } if {[ expr $::PD_MAJOR_VERSION.$::PD_MINOR_VERSION < 0.49 ]} { ::iem::punish::triggerize::register } { ::pdwindow::debug "disabled iem::punish::triggerize on Pd>=0.49\n" } iem_utils-v0.0.20181004/punish/triggerize-plugin/README.md0000644000175000017500000000443613355471367023142 0ustar zmoelnigzmoelnigtriggerize ========== - replace fan-outs with [t a a ...] - when selecting a single line: insert [t a] - when selecting a [trigger]: insert "a" at the beginning # Usage ### removing fan-outs - Select objects with fan-outs - Press Control+t - the (msg) fan-outs will be replaced by (connected) [t a a] objects ### removing all fan-outs - Select All objects (Control-a) - Press Control+t - all fan-outs will be replaced by (connected) [t a a] objects ### adding new left-hand outlet to [trigger] - Select a [trigger] object - Press Control+t - a new (unconnected) left-most outlet of type "a" will be created. ### inserting triggers - Select a single (msg) connection - Press Control+t - the connection will be replaced by a (connected) `[t a]` object ### inserting nop~ for signals - Select a single signal connection - Press Control+t - the connection will be replaced by a (connected) `[pd nop~]` object You can also use the menu: - `Edit` -> `Triggerize` OSX users should use Cmd instead of Control # Installation ## Building Build the external: make If you have an unusual setup (and/or your Pd installation is at a place not found by the compiler), you can parameterize the build. Try this first: make help ## Installing Put both the externals (`triggerize.pd_linux` or similar) and the GUI plugin (`triggerize-plugin.tcl`) into a directory `triggerize-plugin`, and put that into a place where Pd can find it. make install E.g. $ ls ~/.local/lib/pd/extra/triggerize-plugin/ ~/.local/lib/pd/extra/triggerize-plugin/triggerize.pd_linux ~/.local/lib/pd/extra/triggerize-plugin/triggerize-plugin.tcl # BUGS ## none known TODO # AUTHORS IOhannes m zmölnig # LICENSE `triggerize` is released under the Gnu GPL version 2 (or later). See LICENSE.md for the full text of the GPLv2. ## Special license grant to Miller Puckette I hereby grant Miller S. Puckette the exclusive right to include `triggerize` into Pure Data (Pd) under the BSD 3-clause license under which Pd is currently released. Once it has been included into Pd it is of course re-distributable under that license. Until then, the Gnu GPL v2 (or later) applies. iem_utils-v0.0.20181004/punish/triggerize-plugin/Makefile.pdlibbuilder0000644000175000017500000012415213303322335025740 0ustar zmoelnigzmoelnig# Makefile.pdlibbuilder dated 2018-03-15 version = 0.5.1 # Helper makefile for Pure Data external libraries. # Written by Katja Vetter March-June 2015 for the public domain. No warranties. # Inspired by Hans Christoph Steiner's Makefile Template and Stephan Beal's # ShakeNMake. # # Grab the newest version of Makefile.pdlibbuilder from # https://github.com/pure-data/pd-lib-builder/ # # GNU make version >= 3.81 required. # # #=== characteristics =========================================================== # # # - defines build settings based on autodetected OS and architecture # - defines rules to build Pd class- or lib executables from C or C++ sources # - defines rules for libdir installation # - defines convenience targets for developer and user # - evaluates implicit dependencies for non-clean builds # # #=== basic usage =============================================================== # # # In your Makefile, define your Pd lib name and class files, and include # Makefile.pdlibbuilder at the end of the Makefile. Like so: # # ________________________________________________________________________ # # # Makefile for mylib # # lib.name = mylib # # class.sources = myclass1.c myclass2.c # # datafiles = myclass1-help.pd myclass2-help.pd README.txt LICENSE.txt # # include Makefile.pdlibbuilder # ________________________________________________________________________ # # # For files in class.sources it is assumed that class basename == source file # basename. The default target builds all classes as individual executables # with Pd's default extension for the platform. For anything more than the # most basic usage, continue reading. # # #=== list of Makefile.pdlibbuilder API variables =============================== # # # Variables available for definition in your library Makefile: # # - lib.name # - lib.setup.sources # - class.sources # - common.sources # - shared.sources # - .class.sources # - .class.ldflags # - .class.ldlibs # - cflags # - ldflags # - ldlibs # - datafiles # - datadirs # - makefiles # - makefiledirs # - externalsdir # # Optional multiline defines evaluated per operating system: # # - forLinux # - forDarwin # - forWindows # # Variables available for your makefile or make command line: # # - make-lib-executable # - suppress-wunused # # Path variables for make command line or environment: # # - PDDIR # - PDINCLUDEDIR # - PDBINDIR # - PDLIBDIR # # Standard make variables for make command line or environment: # # - CPPFLAGS # - CFLAGS # - LDFLAGS # - CC # - CXX # - INSTALL # - STRIP # - DESTDIR # # Deprecated path variables: # # - pdincludepath # - pdbinpath # - objectsdir # # #=== descriptions of Makefile.pdlibbuilder API variables ======================= # # # lib.name: # Name of the library directory as it will be installed / distributed. Also the # name of the lib executable in the case where all classes are linked into # a single binary. # # lib.setup.sources: # Source file(s) (C or C++) which must be compiled only when linking all classes # into a single lib binary. # # class.sources: # All sources files (C or C++) for which the condition holds that # class name == source file basename. # # .class.sources: # Source file(s) (C or C++) specific to class . Use this for # multiple-source classes or when class name != source file basename. # # common.sources: # Source file(s) which must be statically linked to each class in the library. # # shared.sources: # Source file(s) (C or C++) to build a shared dynamic link lib, to be linked # with all class executables. # # cflags, ldflags, ldlibs: # Define cflags (preprocessor&compiler), ldflags (linker) and ldlibs (dynamic # link libs) for the whole library. These flags are added to platform-specific # flags defined by Makefile.pdlibbuilder. # # .class.ldflags and .class.ldlibs: # Define ldflags resp. ldlibs specific to class . These flags are # added to platform-specific flags defined by Makefile.pdlibbuilder, and flags # defined in your Makefile for the whole library. Note: cflags can not be # defined per class in the current implementation. # # datafiles and datadirs: # All extra files you want to include in binary distributions of the # library: abstractions and help patches, example patches, meta patch, readme # and license texts, manuals, sound files, etcetera. Use 'datafiles' for all # files that should go into your lib rootdir and 'datadirs' for complete # directories you want to copy from source to distribution. # # forLinux, forDarwin, forWindows: # Shorthand for 'variable definitions for Linux only' etc. Use like: # define forLinux # cflags += -DLINUX # class.sources += linuxthing.c # endef # # makefiles and makefiledirs: # Extra makefiles or directories with makefiles that should be made in sub-make # processes. # # make-lib-executable: # When this variable is defined 'yes' in your makefile or as command argument, # Makefile.pdlibbuilder will try to build all classes into a single library # executable (but it will force exit if lib.setup.sources is undefined). # If your makefile defines 'make-lib-executable=yes' as the library default, # this can still be overridden with 'make-lib-executable=no' as command argument # to build individual class executables (the Makefile.pdlibbuilder default.) # # suppress-wunused: # When this variable is defined ('yes' or any other value), -Wunused-variable, # -Wunused-parameter, -Wunused-value and -Wunused-function are suppressed, # but the other warnings from -Wall are retained. # # PDDIR: # Root directory of 'portable' pd package. When defined, PDINCLUDEDIR and # PDBINDIR will be evaluated as $(PDDIR)/src and $(PDDIR)/bin. # # PDINCLUDEDIR: # Directory where Pd API m_pd.h should be found, and other Pd header files. # Overrides the default search path. # # PDBINDIR: # Directory where pd.dll should be found for linking (Windows only). Overrides # the default search path. # # PDLIBDIR: # Root directory for installation of Pd library directories. Overrides the # default install location. # # DESTDIR: # Prepended path component for staged install. # # CPPFLAGS: # Preprocessor flags which are not strictly required for building. # # CFLAGS: # Compiler flags which are not strictly required for building. Compiler flags # defined by Makefile.pdlibbuilder for warning, optimization and architecture # specification are overriden by CFLAGS. # # LDFLAGS: # Linker flags which are not strictly required for building. Linker flags # defined by Makefile.pdlibbuilder for architecture specification are overriden # by LDFLAGS. # # CC and CXX: # C and C++ compiler programs as defined in your build environment. # # INSTALL # Definition of install program. # # STRIP # Name of strip program. Default 'strip' can be overridden in cross compilation # environments. # # objectsdir: # Root directory for installation of Pd library directories, like PDLIBDIR but # not overridable by environment. Supported for compatibility with pd-extended # central makefile, but deprecated otherwise. # # pdincludepath, pdbinpath: # As PDINCLUDEDIR and PDBINDIR but not overridable by environment. Deprecated # as user variables. # # #=== paths ===================================================================== # # # Source files in directories other than current working directory must be # prefixed with their relative path. Do not rely on VPATH or vpath. # Object (.o) files are built in the directory of their source files. # Executables are built in current working directory. # # Default search path for m_pd.h and other API header files is platform # dependent, and overridable by PDINCLUDEDIR: # # Linux: /usr/include/pd # # OSX: /Applications/Pd*.app/Contents/Resources/src # # Windows: %PROGRAMFILES%/Pd/src # %PROGRAMFILES(X86)%/Pd/src (32 bit builds on 64 bit Windows) # # Default search path for binary pd.dll (Windows), overridable by PDBINDIR # # %PROGRAMFILES%/Pd/bin # %PROGRAMFILES(X86)%/Pd/bin (32 bit builds on 64 bit Windows) # # Default location to install pd libraries is platform dependent, and # overridable by PDLIBDIR: # # Linux: /usr/local/lib/pd-externals # OSX: ~/Library/Pd # Windows: %APPDATA%/Pd # # https://puredata.info/docs/faq/how-do-i-install-externals-and-help-files # The rationale for not installing to ~/pd-externals by default on Linux # is that some people share the home dir between 32 and 64 bit installations. # # #=== targets =================================================================== # # # all: build $(executables) plus optional post target # post: target to build after $(executables) # alldebug: build all with -g option turned on for debug symbols # : force clean build of an individual class # .pre: make preprocessor output file in current working directory # .lst: make asm/source output file in current working directory # # install: install executables and data files # clean: remove build products from source tree # # help: print help text # vars: print makefile variables # allvars: print all variables # depend: print generated prerequisites # coffee: dummy target # # Variable $(executables) expands to class executables plus optional shared lib, # or alternatively to single lib executable when make-lib-executable=true. # Targets pre and post can be defined by library makefile. Make sure to include # Makefile.pdlibbuilder first so default target all will not be redefined. # # #=== Pd-extended libdir concept ================================================ # # # For libdir layout as conceived by Hans-Christoph Steiner, see: # # https://puredata.info/docs/developer/Libdir # # Files README.txt, LICENSE.txt and -meta.pd are part of the libdir # convention. Help patches for each class and abstraction are supposed to be # available. Makefile.pdlibbuilder does not force the presence of these files # however. It does not automatically include such files in libdir installations. # Data files you want to include in distributions must be defined explicitly in # your Makefile. # # #=== Makefile.pdlibbuilder syntax conventions ================================== # # # Makefile.pdlibbuilder variable names are lower case. Default make variables, # environment variables, and standard user variables (CC, CXX, CFLAGS, DESTDIR) # are upper case. Use target 'allvars' to print all variables and their values. # # 'Fields' in data variables are separated by dots, like in 'foo.class.sources'. # Words in variables expressing a function or command are separated by dashes, # like in 'make-lib-executable'. # # #=== useful make options ======================================================= # # # Use 'make -d ' to print debug details of the make process. # Use 'make -p ' to print make's database. # # #=== TODO ====================================================================== # # # - decide whether to use -static-libgcc or shared dll in MinGW # - cygwin support # - android support # - figure out how to handle '$' in filenames # - add makefile template targets dpkg-source dist libdir distclean tags? # # #=== end of documentation sections ============================================= # # ################################################################################ ################################################################################ ################################################################################ # GNU make version 3.81 (2006) or higher is required because of the following: # - function 'info' # - variable '.DEFAULT_GOAL' # force exit when make version is < 3.81 ifneq ($(firstword $(sort 3.81 $(MAKE_VERSION))), 3.81) $(error GNU make version 3.81 or higher is required) endif # Relative path to externals root dir in multi-lib source tree like # pd-extended SVN. Default is parent of current working directory. May be # defined differently in including makefile. externalsdir ?= .. # variable you can use to check if Makefile.pdlibbuilder is already included Makefile.pdlibbuilder = true ################################################################################ ### variables: library name and version ######################################## ################################################################################ # strip possibles spaces from lib.name, they mess up calculated file names lib.name := $(strip $(lib.name)) # if meta file exists, check library version metafile := $(wildcard $(lib.name)-meta.pd) ifdef metafile lib.version := $(shell sed -n \ 's|^\#X text [0-9][0-9]* [0-9][0-9]* VERSION \(.*\);|\1|p' \ $(metafile)) endif ################################################################################ ### variables: files ########################################################### ################################################################################ #=== sources =================================================================== # (re)define .class.sources using file names in class.sources define add-class-source $(notdir $(basename $v)).class.sources += $v endef $(foreach v, $(class.sources), $(eval $(add-class-source))) # derive class names from .class.sources variables sourcevariables := $(filter %.class.sources, $(.VARIABLES)) classes := $(basename $(basename $(sourcevariables))) # accumulate all source files specified in makefile classes.sources := $(sort $(foreach v, $(sourcevariables), $($v))) all.sources := $(classes.sources) $(lib.setup.sources) \ $(shared.sources) $(common.sources) #=== object files ============================================================== # construct object filenames from all C and C++ source file names classes.objects := $(addsuffix .o, $(basename $(classes.sources))) common.objects := $(addsuffix .o, $(basename $(common.sources))) shared.objects := $(addsuffix .o, $(basename $(shared.sources))) lib.setup.objects := $(addsuffix .o, $(basename $(lib.setup.sources))) all.objects = $(classes.objects) $(common.objects) $(shared.objects) \ $(lib.setup.objects) #=== executables =============================================================== # use recursive variables here because executable extension is not yet known # construct class executable names from class names classes.executables = $(addsuffix .$(extension), $(classes)) # construct shared lib executable name if shared sources are defined ifdef shared.sources shared.lib = lib$(lib.name).$(shared.extension) else shared.lib = endif ################################################################################ ### platform detection ######################################################### ################################################################################ #=== operating system ========================================================== # The following systems are defined: Linux, Darwin, Windows. GNU and # GNU/kFreeBSD are treated as Linux to get the same options. uname := $(shell uname) ifeq ($(findstring $(uname), Linux GNU GNU/kFreeBSD), $(uname)) system = Linux endif ifeq ($(uname), Darwin) system = Darwin endif ifeq ($(filter MINGW% MSYS%, $(uname)), $(uname)) system = Windows endif # Unfortunately not all Mingw versions provide a link cc > gcc, therefore # gcc is hardcoded here (but not if CC is redefined). ifeq ($(system), Windows) ifeq ($(origin CC), default) CC = gcc endif endif # evaluate possible system-specific multiline defines from library makefile $(eval $(for$(system))) # TODO: Cygwin, Android #=== architecture ============================================================== # native architecture of the build machine build.arch := $(shell uname -m) # Target architecture as reported by compiler. Give precedence to eventual # user-defined compiler. The first field of -- is extracted. ifneq ($(origin CXX), default) dumpmachine.cpu = $(firstword $(subst -, ,$(shell $(CXX) -dumpmachine))) else dumpmachine.cpu = $(firstword $(subst -, ,$(shell $(CC) -dumpmachine))) endif # Target architecture as reported by compiler is only used for Windows at the # moment. For other systems this still has to be tested. ifeq ($(system), Windows) target.arch = $(dumpmachine.cpu) else target.arch = $(build.arch) endif ################################################################################ ### variables per platform ##################################################### ################################################################################ #=== flags per architecture ==================================================== # Set architecture-dependent cflags, mainly for Linux. For Mac and Windows, # arch.c.flags are overriden below. # Raspberry Pi 1st generation ifeq ($(target.arch), armv6l) arch.c.flags = -march=armv6 -mfpu=vfp -mfloat-abi=hard # Beagle, Udoo, RPi2 etc. else ifeq ($(target.arch), armv7l) arch.c.flags = -march=armv7-a -mfpu=vfpv3 -mfloat-abi=hard # Intel 32 bit, build with SSE and SSE2 instructions else ifeq ($(findstring $(target.arch), i386 i686), $(target.arch)) arch.c.flags = -march=pentium4 -mfpmath=sse -msse -msse2 # Intel/AMD 64 bit, build with SSE, SSE2 and SSE3 instructions else ifeq ($(findstring $(target.arch), x86_64), $(target.arch)) arch.c.flags = -march=core2 -mfpmath=sse -msse -msse2 -msse3 # if none of the above architectures detected else arch.c.flags = endif #=== flags and paths for Linux ================================================= ifeq ($(system), Linux) prefix = /usr/local libdir := $(prefix)/lib pkglibdir = $(libdir)/pd-externals pdincludepath := $(wildcard /usr/include/pd) extension = pd_linux cpp.flags := -DUNIX c.flags := -fPIC c.ldflags := -rdynamic -shared -fPIC -Wl,-rpath,"\$$ORIGIN",--enable-new-dtags c.ldlibs := -lc -lm cxx.flags := -fPIC -fcheck-new cxx.ldflags := -rdynamic -shared -fPIC -Wl,-rpath,"\$$ORIGIN",--enable-new-dtags cxx.ldlibs := -lc -lm -lstdc++ shared.extension = so shared.ldflags := -rdynamic -fPIC -shared -Wl,-soname,$(shared.lib) endif #=== flags and paths for Darwin ================================================ # On OSX we try to build fat binaries by default. It is assumed that OSX i386 # can build for ppc and OSX x86_64 can't. TODO: try to refine this condition. # LLVM-clang doesn't support -fcheck-new, therefore this flag is omitted for # OSX x86_64. ifeq ($(system), Darwin) pkglibdir = $(HOME)/Library/Pd pdincludepath := $(firstword $(wildcard \ /Applications/Pd*.app/Contents/Resources/src)) extension = pd_darwin cpp.flags := -DUNIX -DMACOSX -I /sw/include c.flags := c.ldflags := -undefined suppress -flat_namespace -bundle c.ldlibs := -lc cxx.ldflags := -undefined suppress -flat_namespace -bundle cxx.ldlibs := -lc shared.extension = dylib shared.ldflags = -dynamiclib -undefined dynamic_lookup \ -install_name @loader_path/$(shared.lib) \ -compatibility_version 1 -current_version 1.0 version.flag := $(filter $(cflags), -mmacosx-version-min=%) ifeq ($(target.arch), i386) cxx.flags := -fcheck-new arch := ppc i386 x86_64 version.flag ?= -mmacosx-version-min=10.4 endif ifeq ($(target.arch), x86_64) arch := i386 x86_64 version.flag ?= -mmacosx-version-min=10.5 endif arch.c.flags := $(addprefix -arch , $(arch)) $(version.flag) arch.ld.flags := $(arch.c.flags) endif #=== flags and paths for Windows =============================================== # Standard paths on Windows contain spaces, and GNU make functions treat such # paths as lists, with unintended effects. Therefore we must use shell function # ls instead of make's wildcard when probing for a path, and use double quotes # when specifying a path in a command argument. # Default paths in Mingw / Mingw-w64 environments. 'PROGRAMFILES' is standard # location for builds with native architecture, 'ProgramFiles(x86)' for i686 # builds on x86_64 Windows (detection method by Lucas Cordiviola). Curly braces # required because of parentheses in variable name. ifeq ($(system), Windows) pkglibdir := $(APPDATA)/Pd ifeq ($(MINGW_CHOST), i686-w64-mingw32) programfiles := ${ProgramFiles(x86)} else programfiles := $(PROGRAMFILES) endif pdbinpath := $(programfiles)/Pd/bin pdincludepath := $(programfiles)/Pd/src endif # Store default path to pd.dll in PDBINDIR if the latter is not user-defined. # For include path this is done in the platform-independent paths section below, # but for PDBINDIR it is done here so ld flags can be evaluated as immediate # variables. ifeq ($(system), Windows) ifdef PDDIR PDBINDIR := $(PDDIR)/bin endif PDBINDIR ?= $(pdbinpath) endif # TODO: decide whether -mms-bitfields should be specified. ifeq ($(system), Windows) cpp.flags := -DMSW -DNT ifeq ($(filter i%86 mingw32, $(target.arch)), $(target.arch)) arch.c.flags := -march=pentium4 -msse -msse2 -mfpmath=sse else ifeq (x86_64, $(target.arch)) cpp.flags := -DMSW -DNT -DPD_LONGINTTYPE=__int64 arch.c.flags := -march=core2 -msse -msse2 -msse3 -mfpmath=sse else arch.c.flags = endif extension = dll c.flags := c.ldflags := -static-libgcc -shared \ -Wl,--enable-auto-import "$(PDBINDIR)/pd.dll" c.ldlibs := cxx.flags := -fcheck-new cxx.ldflags := -static-libgcc -static-libstdc++ -shared \ -Wl,--enable-auto-import "$(PDBINDIR)/pd.dll" cxx.ldlibs := shared.extension = dll shared.ldflags := -static-libgcc -shared "$(PDBINDIR)/pd.dll" stripflags = --strip-all endif #=== paths ===================================================================== # Platform-dependent default paths are specified above, but overridable. # Path variables in upper case can be defined as make command argument or in the # environment. Variable 'objectsdir' is supported for compatibility with # the build system that pd-l2ork has inherited from pd-extended. PDINCLUDEDIR ?= $(pdincludepath) PDLIBDIR ?= $(firstword $(objectsdir) $(pkglibdir)) ifdef PDDIR PDINCLUDEDIR := $(wildcard $(PDDIR)/src) endif # base path where all components of the lib will be installed by default installpath := $(DESTDIR)$(PDLIBDIR)/$(lib.name) # check if include path contains spaces (as is often the case on Windows) # if so, store the path so we can later do checks with it pdincludepathwithspaces := $(if $(word 2, $(PDINCLUDEDIR)), $(PDINCLUDEDIR)) #=== accumulated build flags =================================================== # From GNU make docs: 'Users expect to be able to specify CFLAGS freely # themselves.' So we use CFLAGS to define options which are not strictly # required for compilation: optimizations, architecture specifications, and # warnings. CFLAGS can be safely overriden using a make command argument. # Variables cflags, ldflags and ldlibs may be defined in including makefile. optimization.flags = -O3 -ffast-math -funroll-loops -fomit-frame-pointer warn.flags = -Wall -Wextra -Wshadow -Winline -Wstrict-aliasing # suppress -Wunused-variable & Co if you don't want to clutter a build log ifdef suppress-wunused warn.flags += $(addprefix -Wno-unused-, function parameter value variable) endif CFLAGS = $(warn.flags) $(optimization.flags) $(arch.c.flags) # preprocessor flags cpp.flags := -DPD -I "$(PDINCLUDEDIR)" $(cpp.flags) $(CPPFLAGS) # flags for dependency checking (cflags from makefile may define -I options) depcheck.flags := $(cpp.flags) $(cflags) # architecture specifications for linker are overridable by LDFLAGS LDFLAGS := $(arch.ld.flags) # now add the same ld flags to shared dynamic lib shared.ldflags := $(shared.ldflags) $(LDFLAGS) # accumulated flags for C compiler / linker c.flags := $(cpp.flags) $(c.flags) $(cflags) $(CFLAGS) c.ldflags := $(c.ldflags) $(ldflags) $(LDFLAGS) c.ldlibs := $(c.ldlibs) $(ldlibs) # accumulated flags for C++ compiler / linker cxx.flags := $(cpp.flags) $(cxx.flags) $(cflags) $(CFLAGS) cxx.ldflags := $(cxx.ldflags) $(ldflags) $(LDFLAGS) cxx.ldlibs := $(cxx.ldlibs) $(ldlibs) ################################################################################ ### variables: tools ########################################################### ################################################################################ # aliases so we can later define 'compile-$1' and set 'c' or 'cxx' as argument compile-c := $(CC) compile-cxx := $(CXX) ################################################################################ ### checks ##################################################################### ################################################################################ # At this point most variables are defined. Now do some checks and info's # before rules begin. # 'forward declaration' of default target, needed to do checks all: # To avoid unpredictable results, make sure the default target is not redefined # by including makefile. ifneq ($(.DEFAULT_GOAL), all) $(error Default target must be 'all'.) endif # find out which target(s) will be made ifdef MAKECMDGOALS goals := $(MAKECMDGOALS) else goals := all endif # store path to Pd API m_pd.h if it is found ifdef PDINCLUDEDIR mpdh := $(shell ls "$(PDINCLUDEDIR)/m_pd.h") endif # store path to pd.dll; if not found, ls will give a useful error ifeq ($(system), Windows) pddll := $(shell ls "$(PDBINDIR)/pd.dll") endif # print Makefile.pdlibbuilder version $(info ++++ info: using Makefile.pdlibbuilder version $(version)) # when making target all, check if m_pd.h is found and print info about it ifeq ($(goals), all) $(if $(mpdh), \ $(info ++++ info: using Pd API $(mpdh)), \ $(warning Where is Pd API m_pd.h? Do 'make help' for info.)) endif # print target info $(info ++++ info: making target $(goals) $(if $(lib.name),in lib $(lib.name))) # when installing, print installpath info $(if $(filter install install-lib, $(goals)), $(info ++++ info: \ installpath is '$(installpath)')) #=== define executables ======================================================== # By default we build class executables, and optionally a shared dynamic link # lib. When make-lib-executable=yes we build all classes into a single lib # executable, on the condition that variable lib.setup.sources is defined. ifeq ($(make-lib-executable),yes) $(if $(lib.setup.sources), ,\ $(error Can not build library blob because lib.setup.sources is undefined)) executables := $(lib.name).$(extension) else executables := $(classes.executables) $(shared.lib) endif ################################################################################ ### rules: special targets ##################################################### ################################################################################ # Disable built-in rules. If some target can't be built with the specified # rules, it should not be built at all. MAKEFLAGS += --no-builtin-rules .PRECIOUS: .SUFFIXES: .PHONY: all post build-lib \ $(classes) $(makefiledirs) $(makefiles) \ install install-executables install-datafiles install-datadirs \ force clean vars allvars depend help ################################################################################ ### rules: build targets ####################################################### ################################################################################ # Target all forces the build of targets [$(executables) post] in # deterministic order. Target $(executables) builds class executables plus # optional shared lib or alternatively a single lib executable when # make-lib-executable=true. Target post is optionally defined by # library makefile. all: post post: $(executables) all: $(info ++++info: target all in lib $(lib.name) completed) # build all with -g option turned on for debug symbols alldebug: c.flags += -g alldebug: cxx.flags += -g alldebug: all #=== class executable ========================================================== # recipe for linking objects in class executable # argument $1 = compiler type (c or cxx) # argument $2 = class basename define link-class $(compile-$1) \ $($1.ldflags) $($2.class.ldflags) \ -o $2.$(extension) \ $(addsuffix .o, $(basename $($2.class.sources))) \ $(addsuffix .o, $(basename $(common.sources))) \ $($1.ldlibs) $($2.class.ldlibs) $(shared.lib) endef # general rule for linking object files in class executable %.$(extension): $(shared.lib) $(info ++++ info: linking objects in $@ for lib $(lib.name)) $(if $(filter %.cc %.cpp, $($*.class.sources)), \ $(call link-class,cxx,$*), \ $(call link-class,c,$*)) #=== library blob ============================================================== # build all classes into single executable build-lib: $(lib.name).$(extension) $(info ++++ info: library blob $(lib.name).$(extension) completed) # recipe for linking objects in lib executable # argument $1 = compiler type (c or cxx) define link-lib $(compile-$1) \ $($1.ldflags) $(lib.ldflags) \ -o $(lib.name).$(extension) $(all.objects) \ $($1.ldlibs) $(lib.ldlibs) endef # rule for linking objects in lib executable # declared conditionally to avoid name clashes ifeq ($(make-lib-executable),yes) $(lib.name).$(extension): $(all.objects) $(if $(filter %.cc %.cpp, $(all.sources)), \ $(call link-lib,cxx), \ $(call link-lib,c)) endif #=== shared dynamic lib ======================================================== # recipe for linking objects in shared executable # argument $1 = compiler type (c or cxx) define link-shared $(compile-$1) \ $(shared.ldflags) \ -o lib$(lib.name).$(shared.extension) $(shared.objects) \ $($1.ldlibs) $(shared.ldlibs) endef # rule for linking objects in shared executable # build recipe is in macro 'link-shared' lib$(lib.name).$(shared.extension): $(shared.objects) $(info ++++ info: linking objects in shared lib $@) $(if $(filter %.cc %.cpp, $(shared.sources)), \ $(call link-shared,cxx), \ $(call link-shared,c)) #=== object files ============================================================== # recipe to make .o file from source # argument $1 is compiler type (c or cxx) define make-object-file $(info ++++ info: making $@ in lib $(lib.name)) $(compile-$1) \ $($1.flags) \ -o $@ -c $< endef # Three rules to create .o files. These are double colon 'terminal' rules, # meaning they are the last in a rules chain. %.o:: %.c $(call make-object-file,c) %.o:: %.cc $(call make-object-file,cxx) %.o:: %.cpp $(call make-object-file,cxx) #=== explicit prerequisites for class executables ============================== # For class executables, prerequisite rules are declared in run time. Target # 'depend' prints these rules for debugging purposes. # declare explicit prerequisites rule like 'class: class.extension' # argument $v is class basename define declare-class-target $v: $v.$(extension) endef # declare explicit prerequisites rule like 'class.extension: object1.o object2.o' # argument $v is class basename define declare-class-executable-target $v.$(extension): $(addsuffix .o, $(basename $($v.class.sources))) \ $(addsuffix .o, $(basename $(common.sources))) endef # evaluate explicit prerequisite rules for all classes $(foreach v, $(classes), $(eval $(declare-class-target))) $(foreach v, $(classes), $(eval $(declare-class-executable-target))) #=== implicit prerequisites for class executables ============================== # Evaluating implicit prerequisites (header files) with help from the # preprocessor is 'expensive' so this is done conditionally and selectively. # Note that it is also possible to trigger a build via install targets, in # which case implicit prerequisites are not checked. # When the Pd include path contains spaces it will mess up the implicit # prerequisites rules. disable-dependency-tracking := $(strip $(pdincludepathwithspaces)) ifndef disable-dependency-tracking must-build-everything := $(filter all, $(goals)) must-build-class := $(filter $(classes), $(goals)) must-build-sources := $(foreach v, $(must-build-class), $($v.class.sources)) endif # declare implicit prerequisites rule like 'object.o: header1.h header2.h ...' # argument $1 is input source file(s) # dir is explicitly added because option -MM strips it by default define declare-object-target $(dir $1)$(filter %.o: %.h, $(shell $(CPP) $(depcheck.flags) -MM $1)) $(MAKEFILE_LIST) endef # evaluate implicit prerequisite rules when rebuilding everything ifdef must-build-everything $(if $(wildcard $(all.objects)), \ $(info ++++ info: evaluating implicit prerequisites in lib $(lib.name).....) \ $(foreach v, $(all.sources), $(eval $(call declare-object-target, $v)))) endif # evaluate implicit prerequisite rules when selectively building classes ifdef must-build-class $(foreach v, $(must-build-sources), \ $(eval $(call declare-object-target, $v))) $(foreach v, $(shared.sources), \ $(eval $(call declare-object-target, $v))) endif ################################################################################ ### rules: preprocessor and assembly files ##################################### ################################################################################ # Preprocessor and assembly output files for bug tracing etc. They are not part # of the build processes for executables. By default these files are created in # the current working directory. Dependency tracking is not performed, the build # is forced instead to make sure it's up to date. force: #=== preprocessor file ========================================================= # make preprocessor output file with extension .pre # argument $1 = compiler type (c or cxx) define make-preprocessor-file $(info ++++ info: making preprocessor output file $(notdir $*.pre) \ in current working directory) $(compile-$1) -E $< $(c.flags) $($1.flags) -o $(notdir $*.pre) endef %.pre:: %.c force $(call make-preprocessor-file,c) %.pre:: %.cc force $(call make-preprocessor-file,cxx) %.pre:: %.cpp force $(call make-preprocessor-file,cxx) #=== assembly file ============================================================= # make C / assembly interleaved output file with extension .lst # argument $1 = compiler type (c or cxx) define make-assembly-file $(info ++++ info: making assembly output file $(notdir $*.lst) \ in current working directory) $(compile-$1) \ -c -Wa,-a,-ad -fverbose-asm \ $($1.flags) \ $< > $(notdir $*.lst) endef %.lst:: %.c force $(call make-assembly-file,c) %.lst:: %.cc force $(call make-assembly-file,cxx) %.lst:: %.cpp force $(call make-assembly-file,cxx) ################################################################################ ### rules: installation targets ################################################ ################################################################################ #=== strip ===================================================================== # Stripping of installed binaries will only be done when variable 'stripflags' # is defined non-empty. No default definition is provided except for Windows # where the unstripped binaries are large, especially in the case of Mingw-w64. # Note: while stripping all symbols ('-s' or '--strip-all') is possible for # Linux and Windows, in the case of OSX only non-global symbols can be stripped # (option '-x' or '--discard-all'). # Make definition of strip command overridable so it can be defined in an # environment for cross-compilation. STRIP ?= strip # Commands in 'strip-executables' will be executed conditionally in the rule for # target 'install-executables'. strip-executables = cd "$(installpath)" && \ $(foreach v, $(executables), $(STRIP) $(stripflags) '$v';) #=== install =================================================================== # Install targets depend on successful exit status of target all because nothing # must be installed in case of a build error. # -p = preserve time stamps # -m = set permission mode (as in chmod) # -d = create all components of specified directories INSTALL = install INSTALL_PROGRAM := $(INSTALL) -p -m 644 INSTALL_DATA := $(INSTALL) -p -m 644 INSTALL_DIR := $(INSTALL) -m 755 -d # strip spaces from file names executables := $(strip $(executables)) datafiles := $(strip $(datafiles)) datadirs := $(strip $(datadirs)) # Do not make any install sub-target with empty variable definition because the # install program would exit with an error. install: $(if $(executables), install-executables) install: $(if $(datafiles), install-datafiles) install: $(if $(datadirs), install-datadirs) install-executables: all $(INSTALL_DIR) -v "$(installpath)" $(foreach v, $(executables), \ $(INSTALL_PROGRAM) '$v' "$(installpath)";) $(info ++++ info: executables of lib $(lib.name) installed \ from $(CURDIR) to $(installpath)) $(if $(stripflags), $(strip-executables),) install-datafiles: all $(INSTALL_DIR) -v "$(installpath)" $(foreach v, $(datafiles), \ $(INSTALL_DATA) '$(v)' "$(installpath)";) $(info ++++ info: data files of lib $(lib.name) installed \ from $(CURDIR) to $(installpath)) install-datadirs: all $(foreach v, $(datadirs), $(INSTALL_DIR) "$(installpath)/$v";) $(foreach v, $(datadirs), \ $(INSTALL_DATA) $(wildcard $v/*) "$(installpath)/$v";) $(info ++++ info: data directories of lib $(lib.name) installed \ from $(CURDIR) to $(installpath)) ################################################################################ ### rules: distribution targets ################################################ ################################################################################ # TODO # These targets are implemented in Makefile Template, but I have to figure out # how to do it under the not-so-strict conditions of Makefile.pdlibbuilder. # make source package dist: @echo "target dist not yet implemented" # make Debian source package dpkg-source: @echo "target dpkg-source not yet implemented" $(ORIGDIR): $(DISTDIR): ################################################################################ ### rules: clean targets ####################################################### ################################################################################ # delete build products from build tree clean: rm -f $(all.objects) rm -f $(classes.executables) $(lib.name).$(extension) $(shared.lib) rm -f *.pre *.lst # remove distribution directories and tarballs from build tree distclean: clean @echo "target distclean not yet implemented" ################################################################################ ### rules: submake targets ##################################################### ################################################################################ # Iterate over sub-makefiles or makefiles in other directories. # When 'continue-make=yes' is set, sub-makes will report 'true' to the parent # process regardless of their real exit status. This prevents the parent make # from being aborted by a sub-make error. Useful when you want to quickly find # out which sub-makes from a large set will succeed. ifeq ($(continue-make),yes) continue = || true endif # These targets will trigger sub-make processes for entries in 'makefiledirs' # and 'makefiles'. all alldebug install clean distclean dist dkpg-source: \ $(makefiledirs) $(makefiles) # this expands to identical rules for each entry in 'makefiledirs' $(makefiledirs): $(MAKE) --directory=$@ $(MAKECMDGOALS) $(continue) # this expands to identical rules for each entry in 'makefiles' $(makefiles): $(MAKE) --directory=$(dir $@) --makefile=$(notdir $@) $(MAKECMDGOALS) $(continue) ################################################################################ ### rules: convenience targets ################################################# ################################################################################ #=== show variables ============================================================ # Several 'function' macro's cause errors when expanded within a rule or without # proper arguments. Variables which are set with the define directive are only # shown by name for that reason. functions = \ add-class-source \ declare-class-target \ declare-class-executable-target \ declare-object-target \ link-class \ link-lib \ link-shared \ make-object-file \ make-preprocessor-file \ make-assembly-file # show variables from makefiles vars: $(info ++++ info: showing makefile variables:) $(foreach v,\ $(sort $(filter-out $(functions) functions, $(.VARIABLES))),\ $(if $(filter file, $(origin $v)),\ $(info variable $v = $($v)))) $(foreach v, $(functions), $(info 'function' name: $v)) @echo # show all variables allvars: $(info ++++ info: showing default, automatic and makefile variables:) $(foreach v, \ $(sort $(filter-out $(functions) functions, $(.VARIABLES))), \ $(info variable ($(origin $v)) $v = $($v))) $(foreach v, $(functions), $(info 'function' name: $v)) @echo #=== show dependencies ========================================================= # show generated prerequisites rules depend: $(info ++++ info: generated prerequisite rules) $(foreach v, $(classes), $(info $(declare-class-target))) $(foreach v, $(classes), $(info $(declare-class-executable-target))) $(foreach v, $(all.sources), $(info $(call declare-object-target, $v))) @echo #=== show help text ============================================================ # brief info about targets and paths ifdef mpdh mpdhinfo := $(mpdh) else mpdhinfo := m_pd.h was not found. Is Pd installed? endif help: @echo @echo " Main targets:" @echo " all: build executables (default target)" @echo " install: install all components of the library" @echo " vars: print makefile variables for troubleshooting" @echo " allvars: print all variables for troubleshooting" @echo " help: print this help text" @echo @echo " Pd API m_pd.h:" @echo " $(mpdhinfo)" @echo " You may specify your preferred Pd include directory as argument" @echo " to the make command, like 'PDINCLUDEDIR=path/to/pd/src'." @echo @echo " Path for installation of your libdir(s):" @echo " $(PDLIBDIR)" @echo " Alternatively you may specify your path for installation as argument" @echo " to the make command, like 'PDLIBDIR=path/to/pd-externals'." @echo @echo " Default paths are listed in the doc sections in Makefile.pdlibbuilder." @echo #=== dummy target ============================================================== coffee: @echo "Makefile.pdlibbuilder: Can not make coffee. Sorry." ################################################################################ ### end of rules sections ###################################################### ################################################################################ # for syntax highlighting in vim and github # vim: set filetype=make: iem_utils-v0.0.20181004/punish/triggerize-plugin/triggerize-help.pd0000644000175000017500000000412113303322335025257 0ustar zmoelnigzmoelnig#N canvas 30 90 692 704 10; #X obj 21 159 cnv 15 350 160 empty empty empty 20 12 0 14 -233017 -66577 0; #X obj 331 339 cnv 15 250 160 empty empty empty 20 12 0 14 -233017 -66577 0; #X obj 21 339 cnv 15 200 160 empty empty empty 20 12 0 14 -233017 -66577 0; #X text 105 104 1st \, select a few objects; #X floatatom 391 411 5 0 0 0 - - -, f 5; #X floatatom 391 467 5 0 0 0 - - -, f 5; #X text 369 372 select coord; #X floatatom 105 393 5 0 0 0 - - -, f 5; #X obj 105 412 t b f; #X obj 119 448 i; #X floatatom 119 470 5 0 0 0 - - -, f 5; #X text 90 369 select [trigger]; #X obj 488 411 sig~ 3; #X obj 488 466 osc~; #X text 469 371 select coord; #X text 104 123 then press + (+ on OSX) to add [trigger] objects ad lib., f 75; #X text 33 346 expand [t] to the left::; #X text 342 347 insert objects into coord::; #X text 18 534 installation instructions:; #X text 37 618 2.) Restart Pd; #X text 66 596 "Just say NO" \, if the plugin installer asks you to do so.; #X text 38 553 1.) put the triggerize-plugin/ folder somewhere in Pd's search path., f 68; #X text 37 576 1.1) DO NOT add the triggerize-plugin/ folder to the search path., f 66; #X text 38 27 ==========; #X text 38 16 triggerize; #X text 37 48 all things trigger: get rid of fan-outs \, insert triggers into connections \, add new inlets to triggers \, ..., f 69; #X text 41 94 usage:; #X floatatom 45 219 5 0 0 0 - - -, f 5; #X obj 45 268 *; #X floatatom 45 290 5 0 0 0 - - -, f 5; #X floatatom 95 219 5 0 0 0 - - -, f 5; #X obj 95 268 *; #X floatatom 95 290 5 0 0 0 - - -, f 5; #X text 35 196 select numbox; #X floatatom 249 235 5 0 0 0 - - -, f 5; #X obj 253 276 + 1; #X obj 249 254 t b f; #X floatatom 284 279 5 0 0 0 - - -, f 5; #X text 239 208 select [trigger]; #X text 37 167 getting rid of fan-out::; #X connect 4 0 5 0; #X connect 7 0 8 0; #X connect 8 0 9 0; #X connect 8 1 9 1; #X connect 9 0 10 0; #X connect 12 0 13 0; #X connect 27 0 28 0; #X connect 27 0 28 1; #X connect 28 0 29 0; #X connect 30 0 31 1; #X connect 30 0 31 0; #X connect 31 0 32 0; #X connect 34 0 36 0; #X connect 36 0 35 0; #X connect 36 1 35 1; #X connect 36 1 37 0; iem_utils-v0.0.20181004/punish/triggerize-plugin/Makefile0000755000175000017500000000164113207347074023312 0ustar zmoelnigzmoelnig#!/usr/bin/make -f # Makefile for pure data externals in lib creb. # Needs Makefile.pdlibbuilder to work (https://github.com/pure-data/pd-lib-builder) punish.name = triggerize lib.name = $(punish.name)-plugin # special file that does not provide a class lib.setup.sources = # all other C and C++ files in subdirs are source files per class # (alternatively, enumerate them by hand) class.sources = $(punish.name).c datafiles = \ $(punish.name)-plugin.tcl \ $(wildcard *-help.pd) \ README.md LICENSE.md datadirs = ################################################################################ ### pdlibbuilder ############################################################### ################################################################################ # Include Makefile.pdlibbuilder from this directory, # or else from some user-defined folder PDLIBBUILDER_DIR=./ include $(PDLIBBUILDER_DIR)/Makefile.pdlibbuilder iem_utils-v0.0.20181004/punish/triggerize-plugin/LICENSE.md0000644000175000017500000004364213004410214023240 0ustar zmoelnigzmoelnigGNU GENERAL PUBLIC LICENSE ========================== Version 2, June 1991 > Copyright (C) 1989, 1991 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. # Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Lesser General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. # GNU GENERAL PUBLIC LICENSE # ## TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION ## - *0\.* This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. - 1\. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. - 2\. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. - 3\. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. - 4\. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. - 5\. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. - 6\. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. - 7\. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. - 8\. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. - 9\. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. - 10\. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. ## NO WARRANTY - 11\. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - 12\. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. ## END OF TERMS AND CONDITIONS ## --------------------------------------------------------------------------- ### How to Apply These Terms to Your New Programs ### If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This program is free software; you can redistribute it and/or 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, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. iem_utils-v0.0.20181004/punish/triggerize-plugin/triggerize.c0000644000175000017500000003207313355471367024200 0ustar zmoelnigzmoelnig/****************************************************** * * triggerize - implementation file * * copyleft (c) IOhannes m zmölnig * * 2016:forum::für::umläute:2016 * * institute of electronic music and acoustics (iem) * ****************************************************** * * license: GNU General Public License v.2 (or later) * ******************************************************/ #include "m_pd.h" #include "g_canvas.h" #include "m_imp.h" #define MARK() post("%s:%d\t%s", __FILE__, __LINE__, __FUNCTION__) /* ------------ utilities ---------- */ static t_gobj*o2g(t_object*obj) { return &(obj->te_g); } static t_object*g2o(t_gobj*gobj) { return pd_checkobject(&gobj->g_pd); } t_gobj*glist_getlast(t_glist*cnv) { t_gobj*result=NULL; for(result=cnv->gl_list; result->g_next;) result=result->g_next; return result; } static void dereconnect(t_glist*cnv, t_object*org, t_object*replace) { t_gobj*gobj; for(gobj=cnv->gl_list; gobj; gobj=gobj->g_next) { t_object*obj=g2o(gobj); int obj_nout=0; int nout; if(!obj)continue; obj_nout=obj_noutlets(obj); for(nout=0; noutgl_pd; s__N.s_thing = &pd_canvasmaker; binbuf_eval(b, 0, 0, 0); s__X.s_thing = boundx; s__N.s_thing = boundn; return g2o(glist_getlast(x)); } static void stack_conn(t_object*new, int*newoutlet, t_object*org, int orgoutlet, t_outconnect*conn){ t_object*dest=0; t_inlet *in =0; int which; conn=obj_nexttraverseoutlet(conn, &dest, &in, &which); if(conn) stack_conn(new, newoutlet, org, orgoutlet, conn); obj_disconnect(org, orgoutlet, dest, which); obj_connect(new, *newoutlet, dest, which); (*newoutlet)++; } static int has_fanout(t_object*obj) { int obj_nout=obj_noutlets(obj); int nout; /* check if we actually do have a fan out */ for(nout=0; noutgl_list; gobj; gobj=gobj->g_next) { t_object*obj=g2o(gobj); if(obj && glist_isselected(cnv, gobj) && (s_trigger != obj->te_g.g_pd->c_name)) { return 0; } } return 1; } /* ------------------------- triggerize ---------------------------- */ static int triggerize_fanout_inplace(t_glist*x, t_object*obj) { /* avoid fanouts in [t] objects by adding additional outlets */ int posX=obj->te_xpix; int posY=obj->te_ypix; t_atom*argv=binbuf_getvec(obj->te_binbuf); int argc=binbuf_getnatom(obj->te_binbuf); int obj_nout=obj_noutlets(obj); int nout, newout; t_binbuf*b=0; t_object*stub=0; /* check if we actually do have a fan out */ if(!has_fanout(obj))return 0; /* create a new trigger object, that has outlets for the fans */ b=binbuf_new(); binbuf_addv(b, "ssii", gensym("#X"), gensym("obj"), posX, posY); binbuf_add(b, 1, argv); argc--; argv++; for(nout=0; noutte_xpix-10; int posY=obj->te_ypix+20; t_binbuf*b=binbuf_new(); int didit=0; /* if the object is a [trigger], we just insert new outlets */ if(s_trigger == obj->te_g.g_pd->c_name) { return triggerize_fanout_inplace(x, obj); } /* for other objects, we create a new [trigger a a] object and replace the fan-out with that */ for(nout=0; nout1) { /* fan out */ int i; t_object*stub=0; binbuf_clear(b); binbuf_addv(b, "ssiis", gensym("#X"), gensym("obj"), posX, posY, gensym("t")); for(i=0; igl_list; gobj; gobj=gobj->g_next) { t_object*obj=g2o(gobj); if(obj && glist_isselected(cnv, gobj) && triggerize_fanout(cnv, obj)) count++; } return count; } static int triggerize_line(t_glist*x) { /* triggerize a single selected line, by inserting a [t a] object * (or it's signal equivalen) */ t_editor*ed=x->gl_editor; int src_obj, src_out, dst_obj ,dst_in; t_gobj *src = 0, *dst = 0; t_binbuf*b=0; int posx=100, posy=100; t_object*stub=0; if(!ed->e_selectedline) return 0; src_obj=ed->e_selectline_index1; src_out=ed->e_selectline_outno; dst_obj=ed->e_selectline_index2; dst_in =ed->e_selectline_inno; for (src = x->gl_list; src_obj; src = src->g_next, src_obj--) if (!src->g_next) goto bad; for (dst = x->gl_list; dst_obj; dst = dst->g_next, dst_obj--) if (!dst->g_next) goto bad; src_obj=ed->e_selectline_index1; dst_obj=ed->e_selectline_index2; if(1) { t_object*obj1=g2o(src); t_object*obj2=g2o(dst); if(obj1 && obj2) { posx=(obj1->te_xpix+obj2->te_xpix)>>1; posy=(obj1->te_ypix+obj2->te_ypix)>>1; } } b=binbuf_new(); if(obj_issignaloutlet(g2o(src), src_out)) { binbuf_addv(b, "ssiiiisi;", gensym("#N"), gensym("canvas"), 200, 100, 190, 200, gensym("nop~"), 0); binbuf_addv(b, "ssiis;", gensym("#X"), gensym("obj"), 50, 70, gensym("inlet~")); binbuf_addv(b, "ssiis;", gensym("#X"), gensym("obj"), 50,140, gensym("outlet~")); binbuf_addv(b, "ssiiii;", gensym("#X"), gensym("connect"), 0,0,1,0); binbuf_addv(b, "ssiiss", gensym("#X"), gensym("restore"), posx, posy, gensym("pd"), gensym("nop~")); } else { binbuf_addv(b,"ssii", gensym("#X"), gensym("obj"), posx, posy); binbuf_addv(b,"ss", gensym("t"), gensym("a")); } binbuf_addsemi(b); stub=triggerize_createobj(x, b); binbuf_free(b);b=0; obj_disconnect(g2o(src), src_out, g2o(dst), dst_in); obj_connect(g2o(src), src_out, stub, 0); obj_connect(stub, 0, g2o(dst), dst_in); glist_select(x, o2g(stub)); return 1; bad: return 0; } static int minimize_trigger(t_glist*cnv, t_object*obj) { /* remove all unused outlets from [trigger] */ t_binbuf*b=binbuf_new(); t_atom*argv=binbuf_getvec(obj->te_binbuf); t_object*stub=0; int obj_nout=obj_noutlets(obj); int nout; int count = 0; binbuf_addv(b, "ssii", gensym("#X"), gensym("obj"), obj->te_xpix, obj->te_ypix); binbuf_add(b, 1, argv); /* go through all the outlets, and add those that have connections */ for(nout = 0; nout < obj_nout; nout++) { t_outlet*out=0; t_outconnect*conn = obj_starttraverseoutlet(obj, &out, nout); if(conn) { binbuf_add(b, 1, argv + 1 + nout); } else { count++; } } if(!count || count == obj_nout) { /* either no outlet to delete or all: skip this object */ binbuf_free(b); return 0; } /* create the replacement object (which only has outlets that are going to be connected) */ stub=triggerize_createobj(cnv, b); /* no go through the original object's outlets, and duplicate the connection * of each to the new object */ for(nout=0, count=0; noutte_binbuf); t_atom*argv=binbuf_getvec(obj->te_binbuf); t_object*stub=0; int obj_nout=obj_noutlets(obj); int nout; binbuf_addv(b, "ssii", gensym("#X"), gensym("obj"), obj->te_xpix, obj->te_ypix); binbuf_add(b, 1, argv); binbuf_addv(b, "s", gensym("a")); binbuf_add(b, argc-1, argv+1); stub=triggerize_createobj(cnv, b); for(nout=0; noutgl_list; gobj; gobj=gobj->g_next) { t_object*obj=g2o(gobj); if(obj && glist_isselected(cnv, gobj)) { const t_symbol*c_name=obj->te_g.g_pd->c_name; if((s_trigger == c_name) && fun(cnv, obj)) count++; } } return count; } static int triggerize_triggers(t_glist*cnv) { /* cleanup [trigger] objects */ int count=0; /* nothing to do, if the selection is not exclusively [trigger] objects */ if(!only_triggers_selected(cnv)) return 0; /* TODO: here's the place to merge multiple connected triggers */ /* * remove all unused outlets from (selected) triggers */ count = with_triggers(cnv, minimize_trigger); if(count) return count; /* * expand each (selected) trigger to the left */ count = with_triggers(cnv, expand_trigger); if(count) return count; /* nothing more to do */ return 0; } static void canvas_do_triggerize(t_glist*cnv) { /* * selected msg-connection: insert [t a] * selected sig-connection: insert [pd nop~] * selected [trigger]s with fan-outs: remove them (by inserting new outlets of the correct type) * selected objects with fan-outs: remove fan-outs * selected [trigger]: remove unused outlets * selected [trigger]: else, add left-most "a" outlet */ if(triggerize_line(cnv))return; if(triggerize_fanouts(cnv))return; if(triggerize_triggers(cnv))return; } static void canvas_triggerize(t_glist*cnv) { int dspstate; if(NULL == cnv)return; /* suspend system */ dspstate = canvas_suspend_dsp(); canvas_do_triggerize(cnv); /* restore state */ canvas_redraw(cnv); glist_redraw(cnv); canvas_resume_dsp(dspstate); } void triggerize_setup(void) { int major, minor, bugfix; sys_getversion(&major, &minor, &bugfix); if((major>0 || minor >= 49)) { error("triggerize built into Pd>=0.49, not enabling iem::punish::triggerize"); return; } if(NULL==canvas_class) { verbose(10, "triggerize detected class_new() @ %p", class_new); return; } post("triggerize - insert [trigger] ad lib."); if(NULL==zgetfn(&canvas_class, gensym("triggerize"))) class_addmethod(canvas_class, (t_method)canvas_triggerize, gensym("triggerize"), 0); } iem_utils-v0.0.20181004/punish/patcherize-plugin/0000755000175000017500000000000013355472356021636 5ustar zmoelnigzmoelnigiem_utils-v0.0.20181004/punish/patcherize-plugin/patcherize.c0000644000175000017500000005274513303322335024135 0ustar zmoelnigzmoelnig/****************************************************** * * patcherize - implementation file * * copyleft (c) IOhannes m zmölnig * * 2016:forum::für::umläute:2016 * * institute of electronic music and acoustics (iem) * ****************************************************** * * license: GNU General Public License v.2 (or later) * ******************************************************/ /* * * - patcherize selection * * send a 'patcherize' message to the canvas, and all currently selected objects will * be moved into a newly created subpatch * * TODO: * - subpatch label * + if the containing canvas is visible, go into edit-mode and let the user type a canvas-name immediately * * LATER: * - save selection to file * */ #include "m_pd.h" #include "g_canvas.h" #include "m_imp.h" #include #include #include /* ------------------------- patcherize ---------------------------- */ /* ------------ utilities ---------- */ void update_minmax_i(int value, int*min_value, int*max_value) { if(min_value && *min_value > value) *min_value = value; if(max_value && *max_value < value) *max_value = value; } static t_gobj*o2g(t_object*obj) { return &(obj->te_g); } static t_object*g2o(t_gobj*gobj) { return pd_checkobject(&gobj->g_pd); } static void print_glist(t_glist*glist) { t_gobj*obj = NULL; if(NULL == glist)return; post("\tglist=%p", glist); for(obj=glist->gl_list; obj; obj=obj->g_next) { post ("\t%p [%p]", obj, obj->g_next); } } static int glist_suspend_editor(t_glist*glist) { int wanteditor = (NULL != glist->gl_editor); canvas_destroy_editor(glist); return wanteditor; } static void glist_resume_editor(t_glist*glist, int wanteditor) { if(wanteditor) { canvas_create_editor(glist); } glist_redraw(glist); } static int object_isabstraction(t_object*obj) { if(!obj || !obj->te_g.g_pd)return 0; return (gensym("canvas") == obj->te_g.g_pd->c_name && canvas_isabstraction((t_canvas*)obj)); } static int object_issubpatch(t_object*obj) { if(!obj || !obj->te_g.g_pd)return 0; return (gensym("canvas") == obj->te_g.g_pd->c_name && !canvas_isabstraction((t_canvas*)obj)); } static void object_typedmess(t_object *x, t_symbol *s, int argc, t_atom *argv) { pd_typedmess(&x->te_g.g_pd, s, argc, argv); } /* returns 0 if the object is to be excluded from patcherization */ static t_symbol**s_excluded_classnames = 0; static void build_exclude_list(void) { int i=0; s_excluded_classnames=getbytes(5 * sizeof(*s_excluded_classnames)); s_excluded_classnames[i++]=gensym("inlet"); s_excluded_classnames[i++]=gensym("outlet"); s_excluded_classnames[i++]=gensym("inlet~"); s_excluded_classnames[i++]=gensym("outlet~"); s_excluded_classnames[i++]=0; } static int include_in_patcherization(const t_object*obj) { const t_symbol*c_name=obj->te_g.g_pd->c_name; t_symbol**excluded; if(!s_excluded_classnames)build_exclude_list(); for(excluded=s_excluded_classnames;*excluded; excluded++) { if(c_name == *excluded)return 0; } return 1; } struct _patcherize_connectto { t_object *object; /* object that we connect to */ unsigned int index; /* which inlet of the given object is this? */ struct _patcherize_connectto *next; }; /* connection between subpatch and surrounding environment */ typedef struct _patcherize_connection { int is_signal; /* is this a signal outlet? */ t_object*object; /* object that we connect from */ unsigned int index; /* which outlet of the given object is this? */ struct _patcherize_connectto*to; /* list of connections */ struct _patcherize_connection*next; } t_patcherize_connection; typedef struct _patcherize_connections { t_patcherize_connection*inlets; t_patcherize_connection*outlets; } t_patcherize_connections; static int patcherize_conn_leftof_ref(t_object*ref_obj, unsigned int ref_idx, t_object*obj, unsigned int idx) { if(obj->te_xpix < ref_obj->te_xpix) return 1; if(obj->te_xpix > ref_obj->te_xpix) return 0; if(idx < ref_idx) return 1; if(idx > ref_idx) return 0; if(obj->te_ypix < ref_obj->te_ypix) return 1; if(obj->te_ypix > ref_obj->te_ypix) return 0; return 0; } static void insert_connection_to(t_patcherize_connection*iolets,t_object*to_obj, unsigned int to_index) { struct _patcherize_connectto*dest=iolets->to, *last=NULL; while(dest) { if((dest->object == to_obj) && (dest->index == to_index)) /* already inserted */ return; last=dest; dest=dest->next; } dest=calloc(1, sizeof(*dest)); dest->object=to_obj; dest->index=to_index; if(last) last->next=dest; else iolets->to=dest; } static t_patcherize_connection*create_connection(t_object*from_obj, int from_index, t_object*to_obj, int to_index) { t_patcherize_connection*conn=calloc(1, sizeof(*conn)); conn->is_signal=obj_issignaloutlet(from_obj, from_index); conn->object=from_obj; conn->index=from_index; insert_connection_to(conn, to_obj, to_index); return conn; } static t_patcherize_connection*insert_connection(t_patcherize_connection*iolets, t_object*from_obj, unsigned int from_index, t_object*to_obj, unsigned int to_index) { /* check whether iolets already contains from_obj/from_index */ t_patcherize_connection*cur=iolets, *last=NULL, *conn=NULL; if(!cur) { return create_connection(from_obj, from_index, to_obj, to_index); } while(cur) { if((cur->object == from_obj) && (cur->index == from_index)) { /* found it; insert new 'to' */ insert_connection_to(cur, to_obj, to_index); return iolets; } cur=cur->next; } /* if we reach this, then we didn't find the output in our list; so create it */ /* LATER: insert the new connection at a sorted location */ conn=create_connection(from_obj, from_index, to_obj, to_index); /* inserted into sorted list */ cur=iolets; last=NULL; while(cur) { if(patcherize_conn_leftof_ref(cur->object, cur->index, from_obj, from_index)) { /* we sort before current element, so insert! */ conn->next=cur; if(last) { last->next=conn; } else { /* insert beginning */ iolets=conn; } return iolets; } last=cur; cur=cur->next; } /* if we reached this, then the new outlet sorts last */ last->next=conn; return iolets; } static void print_conns(const char*name, t_patcherize_connection*conn) { post("%s: %p", name, conn); while(conn) { struct _patcherize_connectto *to=conn->to; while(to) { post("%s%p[%d] -> %p[%d]", name, conn->object, conn->index, to->object, to->index); to=to->next; } conn=conn->next; } } static t_patcherize_connection*get_object_connections(t_patcherize_connection*iolets, t_glist*cnv, t_object*obj) { int sel=glist_isselected(cnv,&obj->te_g); int obj_nout=obj_noutlets(obj); int nout=0; for(nout=0; noutte_g)) != sel) { /* this is a connection crossing the selection boundary; insert it */ iolets=insert_connection(iolets, obj, nout, dest, which); } } } return iolets; } static t_patcherize_connections*get_connections(t_glist*cnv) { t_patcherize_connections*connections=calloc(1, sizeof(*connections)); /* 1. iterate over all the objects in the canvas, and store any connecting objects */ t_gobj*gobj=NULL; for(gobj=cnv->gl_list; gobj; gobj=gobj->g_next) { t_object*obj=pd_checkobject(&gobj->g_pd); if(!obj)continue; if(glist_isselected(cnv, gobj)) { connections->outlets=get_object_connections(connections->outlets, cnv, obj); } else { connections->inlets=get_object_connections(connections->inlets, cnv, obj); } } return connections; } static unsigned int object_getmaxdollar(t_object*obj, unsigned int intermediate) { t_binbuf*b=obj->te_binbuf; int argc=binbuf_getnatom(b); t_atom*argv=binbuf_getvec(b); while(argc--) { t_atom*a=argv++; unsigned int dollarg=0; if(A_DOLLAR == a->a_type) dollarg=a->a_w.w_index; else if(A_DOLLSYM == a->a_type) { const char*s=a->a_w.w_symbol->s_name; while(*s){ if('$' == *s) { char*endptr=0; unsigned int v=(unsigned int)strtol(s+1, &endptr, 10); s=endptr; if(v>dollarg)dollarg=v; } else s++; } } if(dollarg>intermediate)intermediate=dollarg; } return intermediate; } static unsigned int get_maxdollarg(t_object*obj) { unsigned int result=0; if(object_issubpatch(obj)) { // a subpatch! recurse t_gobj*gobj; for(gobj=((t_glist*)obj)->gl_list; gobj; gobj=gobj->g_next) { unsigned int subdollar=get_maxdollarg(g2o(gobj)); if(subdollar>result)result=subdollar; } } return(object_getmaxdollar(obj, result)); } static void free_connectto(struct _patcherize_connectto*conn) { struct _patcherize_connectto*next=0; while(conn) { next=conn->next; conn->object=NULL; conn->index=0; conn->next=NULL; free(conn); conn=next; } } static void free_connection(t_patcherize_connection*conn) { t_patcherize_connection*next=0; while(conn) { next=conn->next; free_connectto(conn->to); conn->object=NULL; conn->index=0; conn->to=NULL; conn->next=NULL; free(conn); conn=next; } } static void free_connections(t_patcherize_connections*conns) { free_connection(conns->inlets); free_connection(conns->outlets); conns->inlets=conns->outlets=NULL; free(conns); } static void patcherize_boundary_disconnect(t_patcherize_connection*from) { while(from) { struct _patcherize_connectto*to=from->to; while(to) { obj_disconnect(from->object, from->index, to->object, to->index); to=to->next; } from=from->next; } } static void patcherize_boundary_reconnect(t_canvas*cnv,t_patcherize_connections*connections) { unsigned int index=0; t_gobj*gobj=cnv->gl_list; t_patcherize_connection*conns=connections->inlets; while(conns) { struct _patcherize_connectto*to=conns->to; /* connect outside objects with new subpatch */ obj_connect(conns->object, conns->index, (t_object*)cnv, index); while(to) { /* connect [inlet]s with inside objects */ obj_connect((t_object*)gobj, 0, to->object, to->index); to=to->next; } index++; gobj=gobj->g_next; conns=conns->next; } conns=connections->outlets; index=0; while(conns) { struct _patcherize_connectto*to=conns->to; /* connect inside objects with [outlet]s */ obj_connect(conns->object, conns->index, (t_object*)gobj, 0); while(to) { /* connect subpatch with outside objects */ obj_connect((t_object*)cnv, index, to->object, to->index); to=to->next; } index++; conns=conns->next; gobj=gobj->g_next; } } static void patcherize_fixcoordinates(unsigned int argc, t_gobj**argv, int xmin, int ymin) { unsigned int i; for(i=0; ig_pd); if(obj) { int x = obj->te_xpix; int y = obj->te_ypix; obj->te_xpix = x - xmin + 30; obj->te_ypix = y - ymin + 60; } } } static int patcherize_single_canvas(t_gobj*gobj, const char*name, int save2file) { /* sub-patcherizing abstraction: turn abstraction into subpatch * filepatcherizing sub-patch : turn sub-patch into abstraction */ t_object*obj=g2o(gobj); if(save2file && object_issubpatch(obj)) { post("patcherizing subpatch"); } else if(!save2file && object_isabstraction(obj)) { if (!name) { t_atom*argv=binbuf_getvec(obj->te_binbuf); name=atom_getsymbol(argv)->s_name; } post("sub-patcherizing abstraction: %s", name); } return 0; } static t_glist*patcherize_makesub(t_canvas*cnv, const char* name, /* subpatch name of filename */ int*save2file_, int X, int Y, int xmin, int ymin, int xmax, int ymax, int xwin, int ywin, t_patcherize_connections*connections, unsigned int maxdollarg); static t_glist* patcherize_makesub_tryagain(t_canvas*cnv, const char*name, int*save2file, int X, int Y, int xmin, int ymin, int xmax, int ymax, int xwin, int ywin, t_patcherize_connections*connections, unsigned int maxdollarg, t_binbuf*b, t_pd *boundx, t_pd *boundn) { /* things went wrong, try again as subpatch */ t_glist*res=patcherize_makesub(cnv, name, 0, X, Y, xmin, ymin, xmax, ymax, xwin, ywin, connections, maxdollarg); if(save2file)*save2file=0; s__X.s_thing = boundx; s__N.s_thing = boundn; binbuf_free(b); return res; } static t_glist*patcherize_makesub(t_canvas*cnv, const char* name, /* subpatch name of filename */ int*save2file_, int X, int Y, int xmin, int ymin, int xmax, int ymax, int xwin, int ywin, t_patcherize_connections*connections, unsigned int maxdollarg) { t_binbuf*b=NULL; t_gobj*result=NULL; t_patcherize_connection*iolets=NULL; int x, y; int width=xmax-xmin; int height=ymax-ymin; int save2file=(save2file_)?*save2file_:0; /* save and clear bindings to symbols #a, $N, $X; restore when done */ t_pd *boundx = s__X.s_thing, *boundn = s__N.s_thing; s__X.s_thing = &cnv->gl_pd; s__N.s_thing = &pd_canvasmaker; if(width <200) width=200; if(height<100)height=100; if (!name || !*name)save2file=0; if(save2file && strcmp(name + strlen(name) - 3, ".pd")) { /* not a Pd patch */ save2file=0; } b=binbuf_new(); if (save2file) { // #N canvas 4 49 450 300 10; binbuf_addv(b, "ssiiiii;", gensym("#N"), gensym("canvas"), xwin+xmin, ywin+ymin, width, height, 10); } else { binbuf_addv(b, "ssiiiisi;", gensym("#N"), gensym("canvas"), xwin+xmin, ywin+ymin, width, height, gensym(name), 0); } iolets=connections->inlets; x=20; y=20; while(iolets) { binbuf_addv(b, "ssiis;", gensym("#X"), gensym("obj"), x, y, obj_issignaloutlet(iolets->object, iolets->index)?gensym("inlet~"):gensym("inlet")); x+=50; iolets=iolets->next; } iolets=connections->outlets; x=20; y=height-30; while(iolets) { binbuf_addv(b, "ssiis;", gensym("#X"), gensym("obj"), x, y, obj_issignaloutlet(iolets->object, iolets->index)?gensym("outlet~"):gensym("outlet")); x+=50; iolets=iolets->next; } if(save2file) { } else { binbuf_addv(b, "ssiiss;", gensym("#X"), gensym("restore"), X, Y, gensym("pd"), gensym(name)); } if(save2file) { /* save the binbuf to file */ char dirbuf[MAXPDSTRING]; const char*nameptr; char*nameptr_res; char objname[MAXPDSTRING]; int fd; int len=strlen(name) -3 ; unsigned int i; strncpy(objname, name, MAXPDSTRING-1); objname[MAXPDSTRING-1]=0; if(len>0 && len= 0) { sys_close(fd); nameptr_res[-1]='/'; if(!strcmp(dirbuf, name)) { strncpy(objname, nameptr_res, MAXPDSTRING-2); objname[strlen(nameptr_res)-3]=0; // strip away ".pd".extension } } binbuf_clear(b); binbuf_addv(b, "ssiis", gensym("#X"), gensym("obj"), X, Y, gensym(objname)); for(i=1; i<=maxdollarg; i++) { t_atom a; char dollstring[MAXPDSTRING]; snprintf(dollstring, MAXPDSTRING-1, "$%d", i); dollstring[MAXPDSTRING-1]=0; SETSYMBOL(&a, gensym(dollstring)); binbuf_add(b, 1, &a); } binbuf_addsemi(b); } binbuf_eval(b, 0,0,0); binbuf_free(b); s__X.s_thing = boundx; s__N.s_thing = boundn; /* the new object is the last in the parent's glist */ for(result=cnv->gl_list; result->g_next;) result=result->g_next; if(save2file_)*save2file_=save2file; return pd_checkglist(&(result->g_pd)); } static void canvas_patcherize(t_glist*cnv, t_symbol*s) { /* migrate selected objects from one canvas to another without re-instantiating them */ int dspstate = 0; int editFrom = 0; t_gobj*gobj = NULL, *last=NULL; int objcount=0; t_gobj**gobjs=0; t_glist*to; int i=0; int xpos=0, ypos=0; int xmin, ymin, xmax, ymax; int numins=0, numouts=0; t_patcherize_connections*connections; const char*name = 0; int save2file=0; int maxdollarg=0; if(NULL == cnv)return; xmin=ymin=INT_MAX; xmax=ymax=INT_MIN; if (s && s->s_name && *s->s_name) { name=s->s_name; save2file=1; } /* store all the selected objects. * this needs to be done because the GUI-cleanup in glist_suspend_editor() * will undo any selection... */ gobjs=getbytes(0*sizeof(*gobjs)); for(gobj=cnv->gl_list; gobj; gobj=gobj->g_next) { if(glist_isselected(cnv, gobj)) { t_object*obj=pd_checkobject(&gobj->g_pd); if(!include_in_patcherization(obj)){ /* deselect excluded objects */ glist_deselect(cnv, gobj); continue; } if(obj) { int dollarg=get_maxdollarg(obj); int x=obj->te_xpix; int y=obj->te_ypix; xpos+=x; ypos+=y; update_minmax_i(x, &xmin, &xmax); update_minmax_i(y, &ymin, &ymax); if(dollarg>maxdollarg)maxdollarg=dollarg; } gobjs=resizebytes(gobjs, (objcount)*sizeof(*gobjs), (objcount+1)*sizeof(*gobjs)); gobjs[objcount]=gobj; objcount++; } } /* if nothing is selected, we are done... */ if(!objcount) { freebytes(gobjs,objcount * sizeof(*gobjs)); return; } if(1==objcount && patcherize_single_canvas(gobjs[0], name, save2file)) { post("single canvas patcherization"); } else { t_patcherize_connection*iolets; connections=get_connections(cnv); iolets=connections->inlets; if(!name)name="/*patcherized*/"; numins=0; while(iolets) { iolets=iolets->next; numins++; } iolets=connections->outlets; numouts=0; while(iolets) { iolets=iolets->next; numouts++; } dspstate=canvas_suspend_dsp(); /* disconnect the boundary connections */ patcherize_boundary_disconnect(connections->inlets); patcherize_boundary_disconnect(connections->outlets); /* create a new sub-patch to patcherize into */ to=patcherize_makesub(cnv, name, &save2file, xpos/objcount, ypos/objcount, xmin, ymin, xmax+50, ymax+150, cnv->gl_screenx1,cnv->gl_screeny1, connections, maxdollarg); if(!to) goto cleanup; editFrom=glist_suspend_editor(cnv); /* move the objects to the new subcanvas */ for(i=0; igl_list; gobj2; last=gobj2, gobj2=gobj2->g_next) { if (gobj == gobj2) { doit=1; break; } } if (!doit)continue; /* remove the object from the 'from'-canvas */ if (last) last->g_next = gobj->g_next; else cnv->gl_list = gobj->g_next; /* append it to the 'to'-canvas */ if(to->gl_list) { for(gobj2=to->gl_list; gobj2 && gobj2->g_next;) gobj2=gobj2->g_next; gobj2->g_next = gobj; } else { to->gl_list = gobj; } gobj->g_next = 0; } patcherize_fixcoordinates(objcount, gobjs, xmin, ymin); /* reconnect the boundary connections */ //print_conns("inlets :",connections->inlets); //print_conns("outlets:",connections->outlets); patcherize_boundary_reconnect(to, connections); } if(save2file) { object_typedmess(&to->gl_obj, gensym("menusave"), 0, 0); } canvas_dirty(cnv, 1); cleanup: /* cleanup */ free_connections(connections); freebytes(gobjs,objcount * sizeof(*gobjs)); /* restore state */ glist_resume_editor(cnv, editFrom); canvas_redraw(cnv); canvas_resume_dsp(dspstate); } void patcherize_setup(void) { if(NULL==canvas_class) { verbose(10, "patcherize detected class_new() @ %p", class_new); return; } //iemguts_boilerplate("patcherize - turn objects into a subpatch", 0); post("patcherize - turn objects into a subpatch"); if(NULL==zgetfn(&canvas_class, gensym("patcherize"))) class_addmethod(canvas_class, (t_method)canvas_patcherize, gensym("patcherize"), A_DEFSYM, 0); if(0) { print_glist(NULL); print_conns("", NULL); o2g(NULL); } } iem_utils-v0.0.20181004/punish/patcherize-plugin/README.md0000644000175000017500000000571213355471367023123 0ustar zmoelnigzmoelnigpatcherize ========== - connections to the containing patch will be kept (via inlets/outlets) - objects will keep their internal state # Usage - Select the objects you want to turn into a subpatch - Press Control+Shift+p to turn the selected objects into a subpatch. - the selection will be replaced by a subpatch `[pd /*patcherized*/]` - Alternatively, you can do this via the Menu: `Edit` -> `(Sub)patcherize Selection` You can also create an abstraction from the selection: - Select the objects you want to turn into a subpatch - Use the menu: `Edit` -> `Patcherize selection...` - a "Save As..." menu will appear, asking you where you want to save the patcherized selection (e.g. pick "foo.pd") - The selection will be replaced by an abstraction for the said name (e.g. `[foo]`). - If you saved the abstraction outside Pd's search path, the abstraction will be instantiated with its full name (e.g. `[/home/frodel/foo]`) # Installation ## Building Build the external: make If you have an unusual setup (and/or your Pd installation is at a place not found by the compiler), you can parameterize the build. Try this first: make help ## Installing Put both the externals (`patcherize.pd_linux` or similar) and the GUI plugin (`patcherize-plugin.tcl`) into a directory `patcherize-plugin`, and put that into a place where Pd can find it. make install E.g. $ ls ~/.local/lib/pd/extra/patcherize-plugin/ ~/.local/lib/pd/extra/patcherize-plugin/patcherize.pd_linux ~/.local/lib/pd/extra/patcherize-plugin/patcherize-plugin.tcl # BUGS ## Pd crashes when clicking on a patcherized msgbox Yes. Patcherization does not re-instantiate any object (or msgbox). Instead it just "moves" the selection to the new window, basically leaving the object unaware that it's context has changed. When clicking on the 'msgbox', the "flashing effect" will try to talk to the wrong window, resulting in a crash. This could be fixed by doing a Cut-n-Paste instead of sleekily migrating the objects, but this would result in objects losing their inner state (not a problem for a msgbox, that doesn't have any hidden inner state) ## GUI objects do not respond after being patcherized See above: the reason for this behaviour is the same (albeit less drastic) than the crashing msgbox. Unfortunately, generic GUI objects might (and most probably) will have a hidden inner state - which is the reason why i would rather not go the safe Cut-n-Paste route. # AUTHORS IOhannes m zmölnig # LICENSE `patcherize` is released under the Gnu GPL version 2 (or later). See LICENSE.md for the full text of the GPLv2. ## Special license grant to Miller Puckette I hereby grant Miller S. Puckette the exclusive right to include `patcherize` into Pure Data (Pd) under the BSD 3-clause license under which Pd is currently released. Once it has been included into Pd it is of course re-distributable under that license. Until then, the Gnu GPL v2 (or later) applies. iem_utils-v0.0.20181004/punish/patcherize-plugin/patcherize-plugin.tcl0000644000175000017500000000621513355471367026001 0ustar zmoelnigzmoelnig# META helper plugin for patcherize-selection # META DESCRIPTION adds menu to tell the 'patcherize' library to doit # META AUTHOR IOhannes m zmlnig # META VERSION 0.1 package require pdwindow 0.1 if [catch { package require msgcat ::msgcat::mcload po }] { puts "iem::punish::patcherize: i18n failed" } namespace eval ::iem::punish::patcherize:: { variable label_sub variable label_abs proc focus {winid state} { set menustate [expr $state?"normal":"disabled"] .menubar.edit entryconfigure "$::iem::punish::patcherize::label_sub" -state $menustate .menubar.edit entryconfigure "$::iem::punish::patcherize::label_abs" -state $menustate } ## helper function to pick a filename for saving # (why isn't there something like this in Pd-GUI?) proc savepanel {initialdir {initialfile ""} {defaultextension ".pd"} {filetypes $::filetypes} } { if { "$filetypes" == {$::filetypes} } { set filetypes $::filetypes } if { ! [file isdirectory $initialdir]} {set initialdir $::env(HOME)} set filename [tk_getSaveFile \ -defaultextension $defaultextension \ -filetypes $filetypes \ -initialfile $initialfile \ -initialdir $initialdir] return $filename } proc patcherize2file {winid} { set filename [::iem::punish::patcherize::savepanel "." "" ".pd" [list [list [_ "Pd Files"] {.pd} ]]] if { $filename != "" } { menu_send $::focused_window "patcherize [enquote_path $filename]" } } proc register {} { # create an entry for our "print2svg" in the "file" menu set ::iem::punish::patcherize::label_sub [_ "SubPatcherize Selection"] set ::iem::punish::patcherize::label_abs [_ "Patcherize Selection..."] set accelerator $::pd_menus::accelerator set mymenu .menubar.edit if {$::windowingsystem eq "aqua"} { set inserthere 8 set accelerator "$accelerator+Shift" } else { set inserthere 8 set accelerator "Shift+$accelerator" } set accelerator "$accelerator+P" $mymenu insert $inserthere command \ -label $::iem::punish::patcherize::label_sub \ -state disabled \ -accelerator "$accelerator" \ -command { menu_send $::focused_window patcherize } $mymenu insert [incr inserthere] command \ -label $::iem::punish::patcherize::label_abs \ -state disabled \ -command { ::iem::punish::patcherize::patcherize2file $::focused_window } bind all <$::modifier-Key-P> {menu_send %W patcherize} bind PatchWindow "+::iem::punish::patcherize::focus %W 1" bind PdWindow "+::iem::punish::patcherize::focus %W 0" # attempt to load the 'patcherize' library from iem::punish # (that does all the work) set lib [string map {" " "\\ "} [file join $::current_plugin_loadpath patcherize]] pdsend "pd-_float_template declare -lib $lib" ::pdwindow::post "loaded iem::punish::patcherize-plugin\n" } } ::iem::punish::patcherize::register iem_utils-v0.0.20181004/punish/patcherize-plugin/Makefile.pdlibbuilder0000644000175000017500000012415213303322335025723 0ustar zmoelnigzmoelnig# Makefile.pdlibbuilder dated 2018-03-15 version = 0.5.1 # Helper makefile for Pure Data external libraries. # Written by Katja Vetter March-June 2015 for the public domain. No warranties. # Inspired by Hans Christoph Steiner's Makefile Template and Stephan Beal's # ShakeNMake. # # Grab the newest version of Makefile.pdlibbuilder from # https://github.com/pure-data/pd-lib-builder/ # # GNU make version >= 3.81 required. # # #=== characteristics =========================================================== # # # - defines build settings based on autodetected OS and architecture # - defines rules to build Pd class- or lib executables from C or C++ sources # - defines rules for libdir installation # - defines convenience targets for developer and user # - evaluates implicit dependencies for non-clean builds # # #=== basic usage =============================================================== # # # In your Makefile, define your Pd lib name and class files, and include # Makefile.pdlibbuilder at the end of the Makefile. Like so: # # ________________________________________________________________________ # # # Makefile for mylib # # lib.name = mylib # # class.sources = myclass1.c myclass2.c # # datafiles = myclass1-help.pd myclass2-help.pd README.txt LICENSE.txt # # include Makefile.pdlibbuilder # ________________________________________________________________________ # # # For files in class.sources it is assumed that class basename == source file # basename. The default target builds all classes as individual executables # with Pd's default extension for the platform. For anything more than the # most basic usage, continue reading. # # #=== list of Makefile.pdlibbuilder API variables =============================== # # # Variables available for definition in your library Makefile: # # - lib.name # - lib.setup.sources # - class.sources # - common.sources # - shared.sources # - .class.sources # - .class.ldflags # - .class.ldlibs # - cflags # - ldflags # - ldlibs # - datafiles # - datadirs # - makefiles # - makefiledirs # - externalsdir # # Optional multiline defines evaluated per operating system: # # - forLinux # - forDarwin # - forWindows # # Variables available for your makefile or make command line: # # - make-lib-executable # - suppress-wunused # # Path variables for make command line or environment: # # - PDDIR # - PDINCLUDEDIR # - PDBINDIR # - PDLIBDIR # # Standard make variables for make command line or environment: # # - CPPFLAGS # - CFLAGS # - LDFLAGS # - CC # - CXX # - INSTALL # - STRIP # - DESTDIR # # Deprecated path variables: # # - pdincludepath # - pdbinpath # - objectsdir # # #=== descriptions of Makefile.pdlibbuilder API variables ======================= # # # lib.name: # Name of the library directory as it will be installed / distributed. Also the # name of the lib executable in the case where all classes are linked into # a single binary. # # lib.setup.sources: # Source file(s) (C or C++) which must be compiled only when linking all classes # into a single lib binary. # # class.sources: # All sources files (C or C++) for which the condition holds that # class name == source file basename. # # .class.sources: # Source file(s) (C or C++) specific to class . Use this for # multiple-source classes or when class name != source file basename. # # common.sources: # Source file(s) which must be statically linked to each class in the library. # # shared.sources: # Source file(s) (C or C++) to build a shared dynamic link lib, to be linked # with all class executables. # # cflags, ldflags, ldlibs: # Define cflags (preprocessor&compiler), ldflags (linker) and ldlibs (dynamic # link libs) for the whole library. These flags are added to platform-specific # flags defined by Makefile.pdlibbuilder. # # .class.ldflags and .class.ldlibs: # Define ldflags resp. ldlibs specific to class . These flags are # added to platform-specific flags defined by Makefile.pdlibbuilder, and flags # defined in your Makefile for the whole library. Note: cflags can not be # defined per class in the current implementation. # # datafiles and datadirs: # All extra files you want to include in binary distributions of the # library: abstractions and help patches, example patches, meta patch, readme # and license texts, manuals, sound files, etcetera. Use 'datafiles' for all # files that should go into your lib rootdir and 'datadirs' for complete # directories you want to copy from source to distribution. # # forLinux, forDarwin, forWindows: # Shorthand for 'variable definitions for Linux only' etc. Use like: # define forLinux # cflags += -DLINUX # class.sources += linuxthing.c # endef # # makefiles and makefiledirs: # Extra makefiles or directories with makefiles that should be made in sub-make # processes. # # make-lib-executable: # When this variable is defined 'yes' in your makefile or as command argument, # Makefile.pdlibbuilder will try to build all classes into a single library # executable (but it will force exit if lib.setup.sources is undefined). # If your makefile defines 'make-lib-executable=yes' as the library default, # this can still be overridden with 'make-lib-executable=no' as command argument # to build individual class executables (the Makefile.pdlibbuilder default.) # # suppress-wunused: # When this variable is defined ('yes' or any other value), -Wunused-variable, # -Wunused-parameter, -Wunused-value and -Wunused-function are suppressed, # but the other warnings from -Wall are retained. # # PDDIR: # Root directory of 'portable' pd package. When defined, PDINCLUDEDIR and # PDBINDIR will be evaluated as $(PDDIR)/src and $(PDDIR)/bin. # # PDINCLUDEDIR: # Directory where Pd API m_pd.h should be found, and other Pd header files. # Overrides the default search path. # # PDBINDIR: # Directory where pd.dll should be found for linking (Windows only). Overrides # the default search path. # # PDLIBDIR: # Root directory for installation of Pd library directories. Overrides the # default install location. # # DESTDIR: # Prepended path component for staged install. # # CPPFLAGS: # Preprocessor flags which are not strictly required for building. # # CFLAGS: # Compiler flags which are not strictly required for building. Compiler flags # defined by Makefile.pdlibbuilder for warning, optimization and architecture # specification are overriden by CFLAGS. # # LDFLAGS: # Linker flags which are not strictly required for building. Linker flags # defined by Makefile.pdlibbuilder for architecture specification are overriden # by LDFLAGS. # # CC and CXX: # C and C++ compiler programs as defined in your build environment. # # INSTALL # Definition of install program. # # STRIP # Name of strip program. Default 'strip' can be overridden in cross compilation # environments. # # objectsdir: # Root directory for installation of Pd library directories, like PDLIBDIR but # not overridable by environment. Supported for compatibility with pd-extended # central makefile, but deprecated otherwise. # # pdincludepath, pdbinpath: # As PDINCLUDEDIR and PDBINDIR but not overridable by environment. Deprecated # as user variables. # # #=== paths ===================================================================== # # # Source files in directories other than current working directory must be # prefixed with their relative path. Do not rely on VPATH or vpath. # Object (.o) files are built in the directory of their source files. # Executables are built in current working directory. # # Default search path for m_pd.h and other API header files is platform # dependent, and overridable by PDINCLUDEDIR: # # Linux: /usr/include/pd # # OSX: /Applications/Pd*.app/Contents/Resources/src # # Windows: %PROGRAMFILES%/Pd/src # %PROGRAMFILES(X86)%/Pd/src (32 bit builds on 64 bit Windows) # # Default search path for binary pd.dll (Windows), overridable by PDBINDIR # # %PROGRAMFILES%/Pd/bin # %PROGRAMFILES(X86)%/Pd/bin (32 bit builds on 64 bit Windows) # # Default location to install pd libraries is platform dependent, and # overridable by PDLIBDIR: # # Linux: /usr/local/lib/pd-externals # OSX: ~/Library/Pd # Windows: %APPDATA%/Pd # # https://puredata.info/docs/faq/how-do-i-install-externals-and-help-files # The rationale for not installing to ~/pd-externals by default on Linux # is that some people share the home dir between 32 and 64 bit installations. # # #=== targets =================================================================== # # # all: build $(executables) plus optional post target # post: target to build after $(executables) # alldebug: build all with -g option turned on for debug symbols # : force clean build of an individual class # .pre: make preprocessor output file in current working directory # .lst: make asm/source output file in current working directory # # install: install executables and data files # clean: remove build products from source tree # # help: print help text # vars: print makefile variables # allvars: print all variables # depend: print generated prerequisites # coffee: dummy target # # Variable $(executables) expands to class executables plus optional shared lib, # or alternatively to single lib executable when make-lib-executable=true. # Targets pre and post can be defined by library makefile. Make sure to include # Makefile.pdlibbuilder first so default target all will not be redefined. # # #=== Pd-extended libdir concept ================================================ # # # For libdir layout as conceived by Hans-Christoph Steiner, see: # # https://puredata.info/docs/developer/Libdir # # Files README.txt, LICENSE.txt and -meta.pd are part of the libdir # convention. Help patches for each class and abstraction are supposed to be # available. Makefile.pdlibbuilder does not force the presence of these files # however. It does not automatically include such files in libdir installations. # Data files you want to include in distributions must be defined explicitly in # your Makefile. # # #=== Makefile.pdlibbuilder syntax conventions ================================== # # # Makefile.pdlibbuilder variable names are lower case. Default make variables, # environment variables, and standard user variables (CC, CXX, CFLAGS, DESTDIR) # are upper case. Use target 'allvars' to print all variables and their values. # # 'Fields' in data variables are separated by dots, like in 'foo.class.sources'. # Words in variables expressing a function or command are separated by dashes, # like in 'make-lib-executable'. # # #=== useful make options ======================================================= # # # Use 'make -d ' to print debug details of the make process. # Use 'make -p ' to print make's database. # # #=== TODO ====================================================================== # # # - decide whether to use -static-libgcc or shared dll in MinGW # - cygwin support # - android support # - figure out how to handle '$' in filenames # - add makefile template targets dpkg-source dist libdir distclean tags? # # #=== end of documentation sections ============================================= # # ################################################################################ ################################################################################ ################################################################################ # GNU make version 3.81 (2006) or higher is required because of the following: # - function 'info' # - variable '.DEFAULT_GOAL' # force exit when make version is < 3.81 ifneq ($(firstword $(sort 3.81 $(MAKE_VERSION))), 3.81) $(error GNU make version 3.81 or higher is required) endif # Relative path to externals root dir in multi-lib source tree like # pd-extended SVN. Default is parent of current working directory. May be # defined differently in including makefile. externalsdir ?= .. # variable you can use to check if Makefile.pdlibbuilder is already included Makefile.pdlibbuilder = true ################################################################################ ### variables: library name and version ######################################## ################################################################################ # strip possibles spaces from lib.name, they mess up calculated file names lib.name := $(strip $(lib.name)) # if meta file exists, check library version metafile := $(wildcard $(lib.name)-meta.pd) ifdef metafile lib.version := $(shell sed -n \ 's|^\#X text [0-9][0-9]* [0-9][0-9]* VERSION \(.*\);|\1|p' \ $(metafile)) endif ################################################################################ ### variables: files ########################################################### ################################################################################ #=== sources =================================================================== # (re)define .class.sources using file names in class.sources define add-class-source $(notdir $(basename $v)).class.sources += $v endef $(foreach v, $(class.sources), $(eval $(add-class-source))) # derive class names from .class.sources variables sourcevariables := $(filter %.class.sources, $(.VARIABLES)) classes := $(basename $(basename $(sourcevariables))) # accumulate all source files specified in makefile classes.sources := $(sort $(foreach v, $(sourcevariables), $($v))) all.sources := $(classes.sources) $(lib.setup.sources) \ $(shared.sources) $(common.sources) #=== object files ============================================================== # construct object filenames from all C and C++ source file names classes.objects := $(addsuffix .o, $(basename $(classes.sources))) common.objects := $(addsuffix .o, $(basename $(common.sources))) shared.objects := $(addsuffix .o, $(basename $(shared.sources))) lib.setup.objects := $(addsuffix .o, $(basename $(lib.setup.sources))) all.objects = $(classes.objects) $(common.objects) $(shared.objects) \ $(lib.setup.objects) #=== executables =============================================================== # use recursive variables here because executable extension is not yet known # construct class executable names from class names classes.executables = $(addsuffix .$(extension), $(classes)) # construct shared lib executable name if shared sources are defined ifdef shared.sources shared.lib = lib$(lib.name).$(shared.extension) else shared.lib = endif ################################################################################ ### platform detection ######################################################### ################################################################################ #=== operating system ========================================================== # The following systems are defined: Linux, Darwin, Windows. GNU and # GNU/kFreeBSD are treated as Linux to get the same options. uname := $(shell uname) ifeq ($(findstring $(uname), Linux GNU GNU/kFreeBSD), $(uname)) system = Linux endif ifeq ($(uname), Darwin) system = Darwin endif ifeq ($(filter MINGW% MSYS%, $(uname)), $(uname)) system = Windows endif # Unfortunately not all Mingw versions provide a link cc > gcc, therefore # gcc is hardcoded here (but not if CC is redefined). ifeq ($(system), Windows) ifeq ($(origin CC), default) CC = gcc endif endif # evaluate possible system-specific multiline defines from library makefile $(eval $(for$(system))) # TODO: Cygwin, Android #=== architecture ============================================================== # native architecture of the build machine build.arch := $(shell uname -m) # Target architecture as reported by compiler. Give precedence to eventual # user-defined compiler. The first field of -- is extracted. ifneq ($(origin CXX), default) dumpmachine.cpu = $(firstword $(subst -, ,$(shell $(CXX) -dumpmachine))) else dumpmachine.cpu = $(firstword $(subst -, ,$(shell $(CC) -dumpmachine))) endif # Target architecture as reported by compiler is only used for Windows at the # moment. For other systems this still has to be tested. ifeq ($(system), Windows) target.arch = $(dumpmachine.cpu) else target.arch = $(build.arch) endif ################################################################################ ### variables per platform ##################################################### ################################################################################ #=== flags per architecture ==================================================== # Set architecture-dependent cflags, mainly for Linux. For Mac and Windows, # arch.c.flags are overriden below. # Raspberry Pi 1st generation ifeq ($(target.arch), armv6l) arch.c.flags = -march=armv6 -mfpu=vfp -mfloat-abi=hard # Beagle, Udoo, RPi2 etc. else ifeq ($(target.arch), armv7l) arch.c.flags = -march=armv7-a -mfpu=vfpv3 -mfloat-abi=hard # Intel 32 bit, build with SSE and SSE2 instructions else ifeq ($(findstring $(target.arch), i386 i686), $(target.arch)) arch.c.flags = -march=pentium4 -mfpmath=sse -msse -msse2 # Intel/AMD 64 bit, build with SSE, SSE2 and SSE3 instructions else ifeq ($(findstring $(target.arch), x86_64), $(target.arch)) arch.c.flags = -march=core2 -mfpmath=sse -msse -msse2 -msse3 # if none of the above architectures detected else arch.c.flags = endif #=== flags and paths for Linux ================================================= ifeq ($(system), Linux) prefix = /usr/local libdir := $(prefix)/lib pkglibdir = $(libdir)/pd-externals pdincludepath := $(wildcard /usr/include/pd) extension = pd_linux cpp.flags := -DUNIX c.flags := -fPIC c.ldflags := -rdynamic -shared -fPIC -Wl,-rpath,"\$$ORIGIN",--enable-new-dtags c.ldlibs := -lc -lm cxx.flags := -fPIC -fcheck-new cxx.ldflags := -rdynamic -shared -fPIC -Wl,-rpath,"\$$ORIGIN",--enable-new-dtags cxx.ldlibs := -lc -lm -lstdc++ shared.extension = so shared.ldflags := -rdynamic -fPIC -shared -Wl,-soname,$(shared.lib) endif #=== flags and paths for Darwin ================================================ # On OSX we try to build fat binaries by default. It is assumed that OSX i386 # can build for ppc and OSX x86_64 can't. TODO: try to refine this condition. # LLVM-clang doesn't support -fcheck-new, therefore this flag is omitted for # OSX x86_64. ifeq ($(system), Darwin) pkglibdir = $(HOME)/Library/Pd pdincludepath := $(firstword $(wildcard \ /Applications/Pd*.app/Contents/Resources/src)) extension = pd_darwin cpp.flags := -DUNIX -DMACOSX -I /sw/include c.flags := c.ldflags := -undefined suppress -flat_namespace -bundle c.ldlibs := -lc cxx.ldflags := -undefined suppress -flat_namespace -bundle cxx.ldlibs := -lc shared.extension = dylib shared.ldflags = -dynamiclib -undefined dynamic_lookup \ -install_name @loader_path/$(shared.lib) \ -compatibility_version 1 -current_version 1.0 version.flag := $(filter $(cflags), -mmacosx-version-min=%) ifeq ($(target.arch), i386) cxx.flags := -fcheck-new arch := ppc i386 x86_64 version.flag ?= -mmacosx-version-min=10.4 endif ifeq ($(target.arch), x86_64) arch := i386 x86_64 version.flag ?= -mmacosx-version-min=10.5 endif arch.c.flags := $(addprefix -arch , $(arch)) $(version.flag) arch.ld.flags := $(arch.c.flags) endif #=== flags and paths for Windows =============================================== # Standard paths on Windows contain spaces, and GNU make functions treat such # paths as lists, with unintended effects. Therefore we must use shell function # ls instead of make's wildcard when probing for a path, and use double quotes # when specifying a path in a command argument. # Default paths in Mingw / Mingw-w64 environments. 'PROGRAMFILES' is standard # location for builds with native architecture, 'ProgramFiles(x86)' for i686 # builds on x86_64 Windows (detection method by Lucas Cordiviola). Curly braces # required because of parentheses in variable name. ifeq ($(system), Windows) pkglibdir := $(APPDATA)/Pd ifeq ($(MINGW_CHOST), i686-w64-mingw32) programfiles := ${ProgramFiles(x86)} else programfiles := $(PROGRAMFILES) endif pdbinpath := $(programfiles)/Pd/bin pdincludepath := $(programfiles)/Pd/src endif # Store default path to pd.dll in PDBINDIR if the latter is not user-defined. # For include path this is done in the platform-independent paths section below, # but for PDBINDIR it is done here so ld flags can be evaluated as immediate # variables. ifeq ($(system), Windows) ifdef PDDIR PDBINDIR := $(PDDIR)/bin endif PDBINDIR ?= $(pdbinpath) endif # TODO: decide whether -mms-bitfields should be specified. ifeq ($(system), Windows) cpp.flags := -DMSW -DNT ifeq ($(filter i%86 mingw32, $(target.arch)), $(target.arch)) arch.c.flags := -march=pentium4 -msse -msse2 -mfpmath=sse else ifeq (x86_64, $(target.arch)) cpp.flags := -DMSW -DNT -DPD_LONGINTTYPE=__int64 arch.c.flags := -march=core2 -msse -msse2 -msse3 -mfpmath=sse else arch.c.flags = endif extension = dll c.flags := c.ldflags := -static-libgcc -shared \ -Wl,--enable-auto-import "$(PDBINDIR)/pd.dll" c.ldlibs := cxx.flags := -fcheck-new cxx.ldflags := -static-libgcc -static-libstdc++ -shared \ -Wl,--enable-auto-import "$(PDBINDIR)/pd.dll" cxx.ldlibs := shared.extension = dll shared.ldflags := -static-libgcc -shared "$(PDBINDIR)/pd.dll" stripflags = --strip-all endif #=== paths ===================================================================== # Platform-dependent default paths are specified above, but overridable. # Path variables in upper case can be defined as make command argument or in the # environment. Variable 'objectsdir' is supported for compatibility with # the build system that pd-l2ork has inherited from pd-extended. PDINCLUDEDIR ?= $(pdincludepath) PDLIBDIR ?= $(firstword $(objectsdir) $(pkglibdir)) ifdef PDDIR PDINCLUDEDIR := $(wildcard $(PDDIR)/src) endif # base path where all components of the lib will be installed by default installpath := $(DESTDIR)$(PDLIBDIR)/$(lib.name) # check if include path contains spaces (as is often the case on Windows) # if so, store the path so we can later do checks with it pdincludepathwithspaces := $(if $(word 2, $(PDINCLUDEDIR)), $(PDINCLUDEDIR)) #=== accumulated build flags =================================================== # From GNU make docs: 'Users expect to be able to specify CFLAGS freely # themselves.' So we use CFLAGS to define options which are not strictly # required for compilation: optimizations, architecture specifications, and # warnings. CFLAGS can be safely overriden using a make command argument. # Variables cflags, ldflags and ldlibs may be defined in including makefile. optimization.flags = -O3 -ffast-math -funroll-loops -fomit-frame-pointer warn.flags = -Wall -Wextra -Wshadow -Winline -Wstrict-aliasing # suppress -Wunused-variable & Co if you don't want to clutter a build log ifdef suppress-wunused warn.flags += $(addprefix -Wno-unused-, function parameter value variable) endif CFLAGS = $(warn.flags) $(optimization.flags) $(arch.c.flags) # preprocessor flags cpp.flags := -DPD -I "$(PDINCLUDEDIR)" $(cpp.flags) $(CPPFLAGS) # flags for dependency checking (cflags from makefile may define -I options) depcheck.flags := $(cpp.flags) $(cflags) # architecture specifications for linker are overridable by LDFLAGS LDFLAGS := $(arch.ld.flags) # now add the same ld flags to shared dynamic lib shared.ldflags := $(shared.ldflags) $(LDFLAGS) # accumulated flags for C compiler / linker c.flags := $(cpp.flags) $(c.flags) $(cflags) $(CFLAGS) c.ldflags := $(c.ldflags) $(ldflags) $(LDFLAGS) c.ldlibs := $(c.ldlibs) $(ldlibs) # accumulated flags for C++ compiler / linker cxx.flags := $(cpp.flags) $(cxx.flags) $(cflags) $(CFLAGS) cxx.ldflags := $(cxx.ldflags) $(ldflags) $(LDFLAGS) cxx.ldlibs := $(cxx.ldlibs) $(ldlibs) ################################################################################ ### variables: tools ########################################################### ################################################################################ # aliases so we can later define 'compile-$1' and set 'c' or 'cxx' as argument compile-c := $(CC) compile-cxx := $(CXX) ################################################################################ ### checks ##################################################################### ################################################################################ # At this point most variables are defined. Now do some checks and info's # before rules begin. # 'forward declaration' of default target, needed to do checks all: # To avoid unpredictable results, make sure the default target is not redefined # by including makefile. ifneq ($(.DEFAULT_GOAL), all) $(error Default target must be 'all'.) endif # find out which target(s) will be made ifdef MAKECMDGOALS goals := $(MAKECMDGOALS) else goals := all endif # store path to Pd API m_pd.h if it is found ifdef PDINCLUDEDIR mpdh := $(shell ls "$(PDINCLUDEDIR)/m_pd.h") endif # store path to pd.dll; if not found, ls will give a useful error ifeq ($(system), Windows) pddll := $(shell ls "$(PDBINDIR)/pd.dll") endif # print Makefile.pdlibbuilder version $(info ++++ info: using Makefile.pdlibbuilder version $(version)) # when making target all, check if m_pd.h is found and print info about it ifeq ($(goals), all) $(if $(mpdh), \ $(info ++++ info: using Pd API $(mpdh)), \ $(warning Where is Pd API m_pd.h? Do 'make help' for info.)) endif # print target info $(info ++++ info: making target $(goals) $(if $(lib.name),in lib $(lib.name))) # when installing, print installpath info $(if $(filter install install-lib, $(goals)), $(info ++++ info: \ installpath is '$(installpath)')) #=== define executables ======================================================== # By default we build class executables, and optionally a shared dynamic link # lib. When make-lib-executable=yes we build all classes into a single lib # executable, on the condition that variable lib.setup.sources is defined. ifeq ($(make-lib-executable),yes) $(if $(lib.setup.sources), ,\ $(error Can not build library blob because lib.setup.sources is undefined)) executables := $(lib.name).$(extension) else executables := $(classes.executables) $(shared.lib) endif ################################################################################ ### rules: special targets ##################################################### ################################################################################ # Disable built-in rules. If some target can't be built with the specified # rules, it should not be built at all. MAKEFLAGS += --no-builtin-rules .PRECIOUS: .SUFFIXES: .PHONY: all post build-lib \ $(classes) $(makefiledirs) $(makefiles) \ install install-executables install-datafiles install-datadirs \ force clean vars allvars depend help ################################################################################ ### rules: build targets ####################################################### ################################################################################ # Target all forces the build of targets [$(executables) post] in # deterministic order. Target $(executables) builds class executables plus # optional shared lib or alternatively a single lib executable when # make-lib-executable=true. Target post is optionally defined by # library makefile. all: post post: $(executables) all: $(info ++++info: target all in lib $(lib.name) completed) # build all with -g option turned on for debug symbols alldebug: c.flags += -g alldebug: cxx.flags += -g alldebug: all #=== class executable ========================================================== # recipe for linking objects in class executable # argument $1 = compiler type (c or cxx) # argument $2 = class basename define link-class $(compile-$1) \ $($1.ldflags) $($2.class.ldflags) \ -o $2.$(extension) \ $(addsuffix .o, $(basename $($2.class.sources))) \ $(addsuffix .o, $(basename $(common.sources))) \ $($1.ldlibs) $($2.class.ldlibs) $(shared.lib) endef # general rule for linking object files in class executable %.$(extension): $(shared.lib) $(info ++++ info: linking objects in $@ for lib $(lib.name)) $(if $(filter %.cc %.cpp, $($*.class.sources)), \ $(call link-class,cxx,$*), \ $(call link-class,c,$*)) #=== library blob ============================================================== # build all classes into single executable build-lib: $(lib.name).$(extension) $(info ++++ info: library blob $(lib.name).$(extension) completed) # recipe for linking objects in lib executable # argument $1 = compiler type (c or cxx) define link-lib $(compile-$1) \ $($1.ldflags) $(lib.ldflags) \ -o $(lib.name).$(extension) $(all.objects) \ $($1.ldlibs) $(lib.ldlibs) endef # rule for linking objects in lib executable # declared conditionally to avoid name clashes ifeq ($(make-lib-executable),yes) $(lib.name).$(extension): $(all.objects) $(if $(filter %.cc %.cpp, $(all.sources)), \ $(call link-lib,cxx), \ $(call link-lib,c)) endif #=== shared dynamic lib ======================================================== # recipe for linking objects in shared executable # argument $1 = compiler type (c or cxx) define link-shared $(compile-$1) \ $(shared.ldflags) \ -o lib$(lib.name).$(shared.extension) $(shared.objects) \ $($1.ldlibs) $(shared.ldlibs) endef # rule for linking objects in shared executable # build recipe is in macro 'link-shared' lib$(lib.name).$(shared.extension): $(shared.objects) $(info ++++ info: linking objects in shared lib $@) $(if $(filter %.cc %.cpp, $(shared.sources)), \ $(call link-shared,cxx), \ $(call link-shared,c)) #=== object files ============================================================== # recipe to make .o file from source # argument $1 is compiler type (c or cxx) define make-object-file $(info ++++ info: making $@ in lib $(lib.name)) $(compile-$1) \ $($1.flags) \ -o $@ -c $< endef # Three rules to create .o files. These are double colon 'terminal' rules, # meaning they are the last in a rules chain. %.o:: %.c $(call make-object-file,c) %.o:: %.cc $(call make-object-file,cxx) %.o:: %.cpp $(call make-object-file,cxx) #=== explicit prerequisites for class executables ============================== # For class executables, prerequisite rules are declared in run time. Target # 'depend' prints these rules for debugging purposes. # declare explicit prerequisites rule like 'class: class.extension' # argument $v is class basename define declare-class-target $v: $v.$(extension) endef # declare explicit prerequisites rule like 'class.extension: object1.o object2.o' # argument $v is class basename define declare-class-executable-target $v.$(extension): $(addsuffix .o, $(basename $($v.class.sources))) \ $(addsuffix .o, $(basename $(common.sources))) endef # evaluate explicit prerequisite rules for all classes $(foreach v, $(classes), $(eval $(declare-class-target))) $(foreach v, $(classes), $(eval $(declare-class-executable-target))) #=== implicit prerequisites for class executables ============================== # Evaluating implicit prerequisites (header files) with help from the # preprocessor is 'expensive' so this is done conditionally and selectively. # Note that it is also possible to trigger a build via install targets, in # which case implicit prerequisites are not checked. # When the Pd include path contains spaces it will mess up the implicit # prerequisites rules. disable-dependency-tracking := $(strip $(pdincludepathwithspaces)) ifndef disable-dependency-tracking must-build-everything := $(filter all, $(goals)) must-build-class := $(filter $(classes), $(goals)) must-build-sources := $(foreach v, $(must-build-class), $($v.class.sources)) endif # declare implicit prerequisites rule like 'object.o: header1.h header2.h ...' # argument $1 is input source file(s) # dir is explicitly added because option -MM strips it by default define declare-object-target $(dir $1)$(filter %.o: %.h, $(shell $(CPP) $(depcheck.flags) -MM $1)) $(MAKEFILE_LIST) endef # evaluate implicit prerequisite rules when rebuilding everything ifdef must-build-everything $(if $(wildcard $(all.objects)), \ $(info ++++ info: evaluating implicit prerequisites in lib $(lib.name).....) \ $(foreach v, $(all.sources), $(eval $(call declare-object-target, $v)))) endif # evaluate implicit prerequisite rules when selectively building classes ifdef must-build-class $(foreach v, $(must-build-sources), \ $(eval $(call declare-object-target, $v))) $(foreach v, $(shared.sources), \ $(eval $(call declare-object-target, $v))) endif ################################################################################ ### rules: preprocessor and assembly files ##################################### ################################################################################ # Preprocessor and assembly output files for bug tracing etc. They are not part # of the build processes for executables. By default these files are created in # the current working directory. Dependency tracking is not performed, the build # is forced instead to make sure it's up to date. force: #=== preprocessor file ========================================================= # make preprocessor output file with extension .pre # argument $1 = compiler type (c or cxx) define make-preprocessor-file $(info ++++ info: making preprocessor output file $(notdir $*.pre) \ in current working directory) $(compile-$1) -E $< $(c.flags) $($1.flags) -o $(notdir $*.pre) endef %.pre:: %.c force $(call make-preprocessor-file,c) %.pre:: %.cc force $(call make-preprocessor-file,cxx) %.pre:: %.cpp force $(call make-preprocessor-file,cxx) #=== assembly file ============================================================= # make C / assembly interleaved output file with extension .lst # argument $1 = compiler type (c or cxx) define make-assembly-file $(info ++++ info: making assembly output file $(notdir $*.lst) \ in current working directory) $(compile-$1) \ -c -Wa,-a,-ad -fverbose-asm \ $($1.flags) \ $< > $(notdir $*.lst) endef %.lst:: %.c force $(call make-assembly-file,c) %.lst:: %.cc force $(call make-assembly-file,cxx) %.lst:: %.cpp force $(call make-assembly-file,cxx) ################################################################################ ### rules: installation targets ################################################ ################################################################################ #=== strip ===================================================================== # Stripping of installed binaries will only be done when variable 'stripflags' # is defined non-empty. No default definition is provided except for Windows # where the unstripped binaries are large, especially in the case of Mingw-w64. # Note: while stripping all symbols ('-s' or '--strip-all') is possible for # Linux and Windows, in the case of OSX only non-global symbols can be stripped # (option '-x' or '--discard-all'). # Make definition of strip command overridable so it can be defined in an # environment for cross-compilation. STRIP ?= strip # Commands in 'strip-executables' will be executed conditionally in the rule for # target 'install-executables'. strip-executables = cd "$(installpath)" && \ $(foreach v, $(executables), $(STRIP) $(stripflags) '$v';) #=== install =================================================================== # Install targets depend on successful exit status of target all because nothing # must be installed in case of a build error. # -p = preserve time stamps # -m = set permission mode (as in chmod) # -d = create all components of specified directories INSTALL = install INSTALL_PROGRAM := $(INSTALL) -p -m 644 INSTALL_DATA := $(INSTALL) -p -m 644 INSTALL_DIR := $(INSTALL) -m 755 -d # strip spaces from file names executables := $(strip $(executables)) datafiles := $(strip $(datafiles)) datadirs := $(strip $(datadirs)) # Do not make any install sub-target with empty variable definition because the # install program would exit with an error. install: $(if $(executables), install-executables) install: $(if $(datafiles), install-datafiles) install: $(if $(datadirs), install-datadirs) install-executables: all $(INSTALL_DIR) -v "$(installpath)" $(foreach v, $(executables), \ $(INSTALL_PROGRAM) '$v' "$(installpath)";) $(info ++++ info: executables of lib $(lib.name) installed \ from $(CURDIR) to $(installpath)) $(if $(stripflags), $(strip-executables),) install-datafiles: all $(INSTALL_DIR) -v "$(installpath)" $(foreach v, $(datafiles), \ $(INSTALL_DATA) '$(v)' "$(installpath)";) $(info ++++ info: data files of lib $(lib.name) installed \ from $(CURDIR) to $(installpath)) install-datadirs: all $(foreach v, $(datadirs), $(INSTALL_DIR) "$(installpath)/$v";) $(foreach v, $(datadirs), \ $(INSTALL_DATA) $(wildcard $v/*) "$(installpath)/$v";) $(info ++++ info: data directories of lib $(lib.name) installed \ from $(CURDIR) to $(installpath)) ################################################################################ ### rules: distribution targets ################################################ ################################################################################ # TODO # These targets are implemented in Makefile Template, but I have to figure out # how to do it under the not-so-strict conditions of Makefile.pdlibbuilder. # make source package dist: @echo "target dist not yet implemented" # make Debian source package dpkg-source: @echo "target dpkg-source not yet implemented" $(ORIGDIR): $(DISTDIR): ################################################################################ ### rules: clean targets ####################################################### ################################################################################ # delete build products from build tree clean: rm -f $(all.objects) rm -f $(classes.executables) $(lib.name).$(extension) $(shared.lib) rm -f *.pre *.lst # remove distribution directories and tarballs from build tree distclean: clean @echo "target distclean not yet implemented" ################################################################################ ### rules: submake targets ##################################################### ################################################################################ # Iterate over sub-makefiles or makefiles in other directories. # When 'continue-make=yes' is set, sub-makes will report 'true' to the parent # process regardless of their real exit status. This prevents the parent make # from being aborted by a sub-make error. Useful when you want to quickly find # out which sub-makes from a large set will succeed. ifeq ($(continue-make),yes) continue = || true endif # These targets will trigger sub-make processes for entries in 'makefiledirs' # and 'makefiles'. all alldebug install clean distclean dist dkpg-source: \ $(makefiledirs) $(makefiles) # this expands to identical rules for each entry in 'makefiledirs' $(makefiledirs): $(MAKE) --directory=$@ $(MAKECMDGOALS) $(continue) # this expands to identical rules for each entry in 'makefiles' $(makefiles): $(MAKE) --directory=$(dir $@) --makefile=$(notdir $@) $(MAKECMDGOALS) $(continue) ################################################################################ ### rules: convenience targets ################################################# ################################################################################ #=== show variables ============================================================ # Several 'function' macro's cause errors when expanded within a rule or without # proper arguments. Variables which are set with the define directive are only # shown by name for that reason. functions = \ add-class-source \ declare-class-target \ declare-class-executable-target \ declare-object-target \ link-class \ link-lib \ link-shared \ make-object-file \ make-preprocessor-file \ make-assembly-file # show variables from makefiles vars: $(info ++++ info: showing makefile variables:) $(foreach v,\ $(sort $(filter-out $(functions) functions, $(.VARIABLES))),\ $(if $(filter file, $(origin $v)),\ $(info variable $v = $($v)))) $(foreach v, $(functions), $(info 'function' name: $v)) @echo # show all variables allvars: $(info ++++ info: showing default, automatic and makefile variables:) $(foreach v, \ $(sort $(filter-out $(functions) functions, $(.VARIABLES))), \ $(info variable ($(origin $v)) $v = $($v))) $(foreach v, $(functions), $(info 'function' name: $v)) @echo #=== show dependencies ========================================================= # show generated prerequisites rules depend: $(info ++++ info: generated prerequisite rules) $(foreach v, $(classes), $(info $(declare-class-target))) $(foreach v, $(classes), $(info $(declare-class-executable-target))) $(foreach v, $(all.sources), $(info $(call declare-object-target, $v))) @echo #=== show help text ============================================================ # brief info about targets and paths ifdef mpdh mpdhinfo := $(mpdh) else mpdhinfo := m_pd.h was not found. Is Pd installed? endif help: @echo @echo " Main targets:" @echo " all: build executables (default target)" @echo " install: install all components of the library" @echo " vars: print makefile variables for troubleshooting" @echo " allvars: print all variables for troubleshooting" @echo " help: print this help text" @echo @echo " Pd API m_pd.h:" @echo " $(mpdhinfo)" @echo " You may specify your preferred Pd include directory as argument" @echo " to the make command, like 'PDINCLUDEDIR=path/to/pd/src'." @echo @echo " Path for installation of your libdir(s):" @echo " $(PDLIBDIR)" @echo " Alternatively you may specify your path for installation as argument" @echo " to the make command, like 'PDLIBDIR=path/to/pd-externals'." @echo @echo " Default paths are listed in the doc sections in Makefile.pdlibbuilder." @echo #=== dummy target ============================================================== coffee: @echo "Makefile.pdlibbuilder: Can not make coffee. Sorry." ################################################################################ ### end of rules sections ###################################################### ################################################################################ # for syntax highlighting in vim and github # vim: set filetype=make: iem_utils-v0.0.20181004/punish/patcherize-plugin/Makefile0000755000175000017500000000164113207347074023275 0ustar zmoelnigzmoelnig#!/usr/bin/make -f # Makefile for pure data externals in lib creb. # Needs Makefile.pdlibbuilder to work (https://github.com/pure-data/pd-lib-builder) punish.name = patcherize lib.name = $(punish.name)-plugin # special file that does not provide a class lib.setup.sources = # all other C and C++ files in subdirs are source files per class # (alternatively, enumerate them by hand) class.sources = $(punish.name).c datafiles = \ $(punish.name)-plugin.tcl \ $(wildcard *-help.pd) \ README.md LICENSE.md datadirs = ################################################################################ ### pdlibbuilder ############################################################### ################################################################################ # Include Makefile.pdlibbuilder from this directory, # or else from some user-defined folder PDLIBBUILDER_DIR=./ include $(PDLIBBUILDER_DIR)/Makefile.pdlibbuilder iem_utils-v0.0.20181004/punish/patcherize-plugin/LICENSE.md0000644000175000017500000004364213004410214023223 0ustar zmoelnigzmoelnigGNU GENERAL PUBLIC LICENSE ========================== Version 2, June 1991 > Copyright (C) 1989, 1991 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. # Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Lesser General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. # GNU GENERAL PUBLIC LICENSE # ## TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION ## - *0\.* This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. - 1\. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. - 2\. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. - 3\. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. - 4\. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. - 5\. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. - 6\. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. - 7\. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. - 8\. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. - 9\. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. - 10\. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. ## NO WARRANTY - 11\. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - 12\. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. ## END OF TERMS AND CONDITIONS ## --------------------------------------------------------------------------- ### How to Apply These Terms to Your New Programs ### If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This program is free software; you can redistribute it and/or 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, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. iem_utils-v0.0.20181004/punish/patcherize-plugin/patcherize-help.pd0000644000175000017500000000364713303322335025241 0ustar zmoelnigzmoelnig#N canvas 30 90 472 613 10; #X declare -lib patcherize -path iemguts -stdpath iemguts; #N canvas 504 133 594 498 guts 0; #X obj 136 176 inlet; #X obj 207 262 sendcanvas 1; #X msg 207 242 patcherize; #X obj 207 222 t b; #X obj 136 380 canvasselect 1; #X msg 136 360 select \$1; #X obj 136 282 t b b; #X msg 215 356 deselect; #X obj 149 105 declare -lib patcherize -path iemguts -stdpath iemguts ; #X obj 425 321 s \$0-on; #X msg 425 300 1; #X obj 425 231 t b; #X msg 188 176 init; #X obj 136 198 route select patcherize init; #X obj 188 154 loadbang; #X msg 136 308 0 \, 1 \, 2; #X obj 136 330 + 8; #X connect 0 0 13 0; #X connect 2 0 1 0; #X connect 3 0 2 0; #X connect 5 0 4 0; #X connect 6 0 15 0; #X connect 6 1 7 0; #X connect 7 0 4 0; #X connect 10 0 9 0; #X connect 11 0 10 0; #X connect 12 0 13 0; #X connect 13 0 6 0; #X connect 13 1 3 0; #X connect 13 2 11 0; #X connect 14 0 12 0; #X connect 15 0 16 0; #X connect 16 0 5 0; #X restore 57 236 pd guts; #X obj 37 394 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 -1; #X obj 37 372 r \$0-beat; #X msg 57 170 select; #X msg 70 194 patcherize; #X text 114 383 objects will continue to work...; #X text 163 165 1st \, select a few objects; #X text 163 189 then turn selected objects into subpatch; #X obj 125 272 tgl 15 0 empty \$0-on empty 17 7 0 10 -262144 -1 -1 1 1; #X obj 125 316 s \$0-beat; #X obj 125 294 metro 500; #X text 40 26 patcherize; #X text 40 37 ==========; #X text 39 66 turn selected parts of your patch into a subpatch or an abstraction., f 69; #X text 18 454 installation instructions:; #X text 37 496 1.1) DO NOT add the patcherize-plugin/ folder to the search path., f 66; #X text 38 473 1.) put the patcherize-plugin/ folder somewhere in Pd's search path., f 68; #X text 37 538 2.) Restart Pd; #X text 66 516 "Just say NO" \, if the plugin installer asks you to do so.; #X connect 2 0 1 0; #X connect 3 0 0 0; #X connect 4 0 0 0; #X connect 8 0 10 0; #X connect 10 0 9 0; iem_utils-v0.0.20181004/punish/README.md0000644000175000017500000000132013207347074017451 0ustar zmoelnigzmoelnigpunish - IEM's Pure Data User Interface Hacks ============================================= a collection of hacks for the Pd User Interface # BIG FAT WARNING This collection is intended to explore ideas on how to improve Pd's user interface (from a library perspective). There are known crasher bugs. # Contents ## [patcherize](patcherize-plugin) turn selected objects into a subpatch (or abstraction) ## [triggerize](triggerize-plugin) - replace fan-outs with [trigger]s - expand [trigger] to the *left* - insert [trigger] into wires ## [double-chord](doublechord-plugin) - duplicate connections between two multi-iolet objects # LICENSE each hack comes with its own license # AUTHORS - IOhannes m zmölnig iem_utils-v0.0.20181004/punish/doublechord-plugin/0000755000175000017500000000000013355472356021772 5ustar zmoelnigzmoelnigiem_utils-v0.0.20181004/punish/doublechord-plugin/README.md0000644000175000017500000000267413355471367023263 0ustar zmoelnigzmoelnigdouble chord ============ duplicate patch chords # Usage ### removing fan-outs - Select objects with fan-outs - Press Control+t - the (msg) fan-outs will be replaced by (connected) [t a a] objects # Installation ## Building Build the external: make If you have an unusual setup (and/or your Pd installation is at a place not found by the compiler), you can parameterize the build. Try this first: make help ## Installing TODO these instructions are generic and not necessarily correct Put both the externals (`doublechord.pd_linux` or similar) and the GUI plugin (`doublechord-plugin.tcl`) into a directory `doublechord-plugin`, and put that into a place where Pd can find it. make install E.g. $ ls ~/.local/lib/pd/extra/doublechord-plugin/ ~/.local/lib/pd/extra/doublechord-plugin/doublechord.pd_linux ~/.local/lib/pd/extra/doublechord-plugin/doublechord-plugin.tcl # BUGS ## none known TODO # AUTHORS IOhannes m zmölnig # LICENSE `doublechord` is released under the Gnu GPL version 2 (or later). See LICENSE.md for the full text of the GPLv2. ## Special license grant to Miller Puckette I hereby grant Miller S. Puckette the exclusive right to include `doublechord` into Pure Data (Pd) under the BSD 3-clause license under which Pd is currently released. Once it has been included into Pd it is of course re-distributable under that license. Until then, the Gnu GPL v2 (or later) applies. iem_utils-v0.0.20181004/punish/doublechord-plugin/doublechord-plugin.tcl0000644000175000017500000000144613355471367026272 0ustar zmoelnigzmoelnig# META helper plugin for doublechord-selection # META DESCRIPTION adds menu to tell the 'doublechord' library to doit # META AUTHOR IOhannes m zmlnig # META VERSION 0.1 package require pdwindow 0.1 namespace eval ::iem::punish::doublechord:: { proc register {} { # attempt to load the 'doublechord' library from iem::punish # (that does all the work) set lib [string map {" " "\\ "} [file join $::current_plugin_loadpath doublechord]] pdsend "pd-_float_template declare -lib $lib" ::pdwindow::post "loaded iem::punish::doublechord-plugin\n" } } if {[ expr $::PD_MAJOR_VERSION.$::PD_MINOR_VERSION < 0.49 ]} { ::iem::punish::doublechord::register } { ::pdwindow::debug "disabled iem::punish::doublechord on Pd>=0.49\n" } iem_utils-v0.0.20181004/punish/doublechord-plugin/Makefile.pdlibbuilder0000644000175000017500000012415213303322335026057 0ustar zmoelnigzmoelnig# Makefile.pdlibbuilder dated 2018-03-15 version = 0.5.1 # Helper makefile for Pure Data external libraries. # Written by Katja Vetter March-June 2015 for the public domain. No warranties. # Inspired by Hans Christoph Steiner's Makefile Template and Stephan Beal's # ShakeNMake. # # Grab the newest version of Makefile.pdlibbuilder from # https://github.com/pure-data/pd-lib-builder/ # # GNU make version >= 3.81 required. # # #=== characteristics =========================================================== # # # - defines build settings based on autodetected OS and architecture # - defines rules to build Pd class- or lib executables from C or C++ sources # - defines rules for libdir installation # - defines convenience targets for developer and user # - evaluates implicit dependencies for non-clean builds # # #=== basic usage =============================================================== # # # In your Makefile, define your Pd lib name and class files, and include # Makefile.pdlibbuilder at the end of the Makefile. Like so: # # ________________________________________________________________________ # # # Makefile for mylib # # lib.name = mylib # # class.sources = myclass1.c myclass2.c # # datafiles = myclass1-help.pd myclass2-help.pd README.txt LICENSE.txt # # include Makefile.pdlibbuilder # ________________________________________________________________________ # # # For files in class.sources it is assumed that class basename == source file # basename. The default target builds all classes as individual executables # with Pd's default extension for the platform. For anything more than the # most basic usage, continue reading. # # #=== list of Makefile.pdlibbuilder API variables =============================== # # # Variables available for definition in your library Makefile: # # - lib.name # - lib.setup.sources # - class.sources # - common.sources # - shared.sources # - .class.sources # - .class.ldflags # - .class.ldlibs # - cflags # - ldflags # - ldlibs # - datafiles # - datadirs # - makefiles # - makefiledirs # - externalsdir # # Optional multiline defines evaluated per operating system: # # - forLinux # - forDarwin # - forWindows # # Variables available for your makefile or make command line: # # - make-lib-executable # - suppress-wunused # # Path variables for make command line or environment: # # - PDDIR # - PDINCLUDEDIR # - PDBINDIR # - PDLIBDIR # # Standard make variables for make command line or environment: # # - CPPFLAGS # - CFLAGS # - LDFLAGS # - CC # - CXX # - INSTALL # - STRIP # - DESTDIR # # Deprecated path variables: # # - pdincludepath # - pdbinpath # - objectsdir # # #=== descriptions of Makefile.pdlibbuilder API variables ======================= # # # lib.name: # Name of the library directory as it will be installed / distributed. Also the # name of the lib executable in the case where all classes are linked into # a single binary. # # lib.setup.sources: # Source file(s) (C or C++) which must be compiled only when linking all classes # into a single lib binary. # # class.sources: # All sources files (C or C++) for which the condition holds that # class name == source file basename. # # .class.sources: # Source file(s) (C or C++) specific to class . Use this for # multiple-source classes or when class name != source file basename. # # common.sources: # Source file(s) which must be statically linked to each class in the library. # # shared.sources: # Source file(s) (C or C++) to build a shared dynamic link lib, to be linked # with all class executables. # # cflags, ldflags, ldlibs: # Define cflags (preprocessor&compiler), ldflags (linker) and ldlibs (dynamic # link libs) for the whole library. These flags are added to platform-specific # flags defined by Makefile.pdlibbuilder. # # .class.ldflags and .class.ldlibs: # Define ldflags resp. ldlibs specific to class . These flags are # added to platform-specific flags defined by Makefile.pdlibbuilder, and flags # defined in your Makefile for the whole library. Note: cflags can not be # defined per class in the current implementation. # # datafiles and datadirs: # All extra files you want to include in binary distributions of the # library: abstractions and help patches, example patches, meta patch, readme # and license texts, manuals, sound files, etcetera. Use 'datafiles' for all # files that should go into your lib rootdir and 'datadirs' for complete # directories you want to copy from source to distribution. # # forLinux, forDarwin, forWindows: # Shorthand for 'variable definitions for Linux only' etc. Use like: # define forLinux # cflags += -DLINUX # class.sources += linuxthing.c # endef # # makefiles and makefiledirs: # Extra makefiles or directories with makefiles that should be made in sub-make # processes. # # make-lib-executable: # When this variable is defined 'yes' in your makefile or as command argument, # Makefile.pdlibbuilder will try to build all classes into a single library # executable (but it will force exit if lib.setup.sources is undefined). # If your makefile defines 'make-lib-executable=yes' as the library default, # this can still be overridden with 'make-lib-executable=no' as command argument # to build individual class executables (the Makefile.pdlibbuilder default.) # # suppress-wunused: # When this variable is defined ('yes' or any other value), -Wunused-variable, # -Wunused-parameter, -Wunused-value and -Wunused-function are suppressed, # but the other warnings from -Wall are retained. # # PDDIR: # Root directory of 'portable' pd package. When defined, PDINCLUDEDIR and # PDBINDIR will be evaluated as $(PDDIR)/src and $(PDDIR)/bin. # # PDINCLUDEDIR: # Directory where Pd API m_pd.h should be found, and other Pd header files. # Overrides the default search path. # # PDBINDIR: # Directory where pd.dll should be found for linking (Windows only). Overrides # the default search path. # # PDLIBDIR: # Root directory for installation of Pd library directories. Overrides the # default install location. # # DESTDIR: # Prepended path component for staged install. # # CPPFLAGS: # Preprocessor flags which are not strictly required for building. # # CFLAGS: # Compiler flags which are not strictly required for building. Compiler flags # defined by Makefile.pdlibbuilder for warning, optimization and architecture # specification are overriden by CFLAGS. # # LDFLAGS: # Linker flags which are not strictly required for building. Linker flags # defined by Makefile.pdlibbuilder for architecture specification are overriden # by LDFLAGS. # # CC and CXX: # C and C++ compiler programs as defined in your build environment. # # INSTALL # Definition of install program. # # STRIP # Name of strip program. Default 'strip' can be overridden in cross compilation # environments. # # objectsdir: # Root directory for installation of Pd library directories, like PDLIBDIR but # not overridable by environment. Supported for compatibility with pd-extended # central makefile, but deprecated otherwise. # # pdincludepath, pdbinpath: # As PDINCLUDEDIR and PDBINDIR but not overridable by environment. Deprecated # as user variables. # # #=== paths ===================================================================== # # # Source files in directories other than current working directory must be # prefixed with their relative path. Do not rely on VPATH or vpath. # Object (.o) files are built in the directory of their source files. # Executables are built in current working directory. # # Default search path for m_pd.h and other API header files is platform # dependent, and overridable by PDINCLUDEDIR: # # Linux: /usr/include/pd # # OSX: /Applications/Pd*.app/Contents/Resources/src # # Windows: %PROGRAMFILES%/Pd/src # %PROGRAMFILES(X86)%/Pd/src (32 bit builds on 64 bit Windows) # # Default search path for binary pd.dll (Windows), overridable by PDBINDIR # # %PROGRAMFILES%/Pd/bin # %PROGRAMFILES(X86)%/Pd/bin (32 bit builds on 64 bit Windows) # # Default location to install pd libraries is platform dependent, and # overridable by PDLIBDIR: # # Linux: /usr/local/lib/pd-externals # OSX: ~/Library/Pd # Windows: %APPDATA%/Pd # # https://puredata.info/docs/faq/how-do-i-install-externals-and-help-files # The rationale for not installing to ~/pd-externals by default on Linux # is that some people share the home dir between 32 and 64 bit installations. # # #=== targets =================================================================== # # # all: build $(executables) plus optional post target # post: target to build after $(executables) # alldebug: build all with -g option turned on for debug symbols # : force clean build of an individual class # .pre: make preprocessor output file in current working directory # .lst: make asm/source output file in current working directory # # install: install executables and data files # clean: remove build products from source tree # # help: print help text # vars: print makefile variables # allvars: print all variables # depend: print generated prerequisites # coffee: dummy target # # Variable $(executables) expands to class executables plus optional shared lib, # or alternatively to single lib executable when make-lib-executable=true. # Targets pre and post can be defined by library makefile. Make sure to include # Makefile.pdlibbuilder first so default target all will not be redefined. # # #=== Pd-extended libdir concept ================================================ # # # For libdir layout as conceived by Hans-Christoph Steiner, see: # # https://puredata.info/docs/developer/Libdir # # Files README.txt, LICENSE.txt and -meta.pd are part of the libdir # convention. Help patches for each class and abstraction are supposed to be # available. Makefile.pdlibbuilder does not force the presence of these files # however. It does not automatically include such files in libdir installations. # Data files you want to include in distributions must be defined explicitly in # your Makefile. # # #=== Makefile.pdlibbuilder syntax conventions ================================== # # # Makefile.pdlibbuilder variable names are lower case. Default make variables, # environment variables, and standard user variables (CC, CXX, CFLAGS, DESTDIR) # are upper case. Use target 'allvars' to print all variables and their values. # # 'Fields' in data variables are separated by dots, like in 'foo.class.sources'. # Words in variables expressing a function or command are separated by dashes, # like in 'make-lib-executable'. # # #=== useful make options ======================================================= # # # Use 'make -d ' to print debug details of the make process. # Use 'make -p ' to print make's database. # # #=== TODO ====================================================================== # # # - decide whether to use -static-libgcc or shared dll in MinGW # - cygwin support # - android support # - figure out how to handle '$' in filenames # - add makefile template targets dpkg-source dist libdir distclean tags? # # #=== end of documentation sections ============================================= # # ################################################################################ ################################################################################ ################################################################################ # GNU make version 3.81 (2006) or higher is required because of the following: # - function 'info' # - variable '.DEFAULT_GOAL' # force exit when make version is < 3.81 ifneq ($(firstword $(sort 3.81 $(MAKE_VERSION))), 3.81) $(error GNU make version 3.81 or higher is required) endif # Relative path to externals root dir in multi-lib source tree like # pd-extended SVN. Default is parent of current working directory. May be # defined differently in including makefile. externalsdir ?= .. # variable you can use to check if Makefile.pdlibbuilder is already included Makefile.pdlibbuilder = true ################################################################################ ### variables: library name and version ######################################## ################################################################################ # strip possibles spaces from lib.name, they mess up calculated file names lib.name := $(strip $(lib.name)) # if meta file exists, check library version metafile := $(wildcard $(lib.name)-meta.pd) ifdef metafile lib.version := $(shell sed -n \ 's|^\#X text [0-9][0-9]* [0-9][0-9]* VERSION \(.*\);|\1|p' \ $(metafile)) endif ################################################################################ ### variables: files ########################################################### ################################################################################ #=== sources =================================================================== # (re)define .class.sources using file names in class.sources define add-class-source $(notdir $(basename $v)).class.sources += $v endef $(foreach v, $(class.sources), $(eval $(add-class-source))) # derive class names from .class.sources variables sourcevariables := $(filter %.class.sources, $(.VARIABLES)) classes := $(basename $(basename $(sourcevariables))) # accumulate all source files specified in makefile classes.sources := $(sort $(foreach v, $(sourcevariables), $($v))) all.sources := $(classes.sources) $(lib.setup.sources) \ $(shared.sources) $(common.sources) #=== object files ============================================================== # construct object filenames from all C and C++ source file names classes.objects := $(addsuffix .o, $(basename $(classes.sources))) common.objects := $(addsuffix .o, $(basename $(common.sources))) shared.objects := $(addsuffix .o, $(basename $(shared.sources))) lib.setup.objects := $(addsuffix .o, $(basename $(lib.setup.sources))) all.objects = $(classes.objects) $(common.objects) $(shared.objects) \ $(lib.setup.objects) #=== executables =============================================================== # use recursive variables here because executable extension is not yet known # construct class executable names from class names classes.executables = $(addsuffix .$(extension), $(classes)) # construct shared lib executable name if shared sources are defined ifdef shared.sources shared.lib = lib$(lib.name).$(shared.extension) else shared.lib = endif ################################################################################ ### platform detection ######################################################### ################################################################################ #=== operating system ========================================================== # The following systems are defined: Linux, Darwin, Windows. GNU and # GNU/kFreeBSD are treated as Linux to get the same options. uname := $(shell uname) ifeq ($(findstring $(uname), Linux GNU GNU/kFreeBSD), $(uname)) system = Linux endif ifeq ($(uname), Darwin) system = Darwin endif ifeq ($(filter MINGW% MSYS%, $(uname)), $(uname)) system = Windows endif # Unfortunately not all Mingw versions provide a link cc > gcc, therefore # gcc is hardcoded here (but not if CC is redefined). ifeq ($(system), Windows) ifeq ($(origin CC), default) CC = gcc endif endif # evaluate possible system-specific multiline defines from library makefile $(eval $(for$(system))) # TODO: Cygwin, Android #=== architecture ============================================================== # native architecture of the build machine build.arch := $(shell uname -m) # Target architecture as reported by compiler. Give precedence to eventual # user-defined compiler. The first field of -- is extracted. ifneq ($(origin CXX), default) dumpmachine.cpu = $(firstword $(subst -, ,$(shell $(CXX) -dumpmachine))) else dumpmachine.cpu = $(firstword $(subst -, ,$(shell $(CC) -dumpmachine))) endif # Target architecture as reported by compiler is only used for Windows at the # moment. For other systems this still has to be tested. ifeq ($(system), Windows) target.arch = $(dumpmachine.cpu) else target.arch = $(build.arch) endif ################################################################################ ### variables per platform ##################################################### ################################################################################ #=== flags per architecture ==================================================== # Set architecture-dependent cflags, mainly for Linux. For Mac and Windows, # arch.c.flags are overriden below. # Raspberry Pi 1st generation ifeq ($(target.arch), armv6l) arch.c.flags = -march=armv6 -mfpu=vfp -mfloat-abi=hard # Beagle, Udoo, RPi2 etc. else ifeq ($(target.arch), armv7l) arch.c.flags = -march=armv7-a -mfpu=vfpv3 -mfloat-abi=hard # Intel 32 bit, build with SSE and SSE2 instructions else ifeq ($(findstring $(target.arch), i386 i686), $(target.arch)) arch.c.flags = -march=pentium4 -mfpmath=sse -msse -msse2 # Intel/AMD 64 bit, build with SSE, SSE2 and SSE3 instructions else ifeq ($(findstring $(target.arch), x86_64), $(target.arch)) arch.c.flags = -march=core2 -mfpmath=sse -msse -msse2 -msse3 # if none of the above architectures detected else arch.c.flags = endif #=== flags and paths for Linux ================================================= ifeq ($(system), Linux) prefix = /usr/local libdir := $(prefix)/lib pkglibdir = $(libdir)/pd-externals pdincludepath := $(wildcard /usr/include/pd) extension = pd_linux cpp.flags := -DUNIX c.flags := -fPIC c.ldflags := -rdynamic -shared -fPIC -Wl,-rpath,"\$$ORIGIN",--enable-new-dtags c.ldlibs := -lc -lm cxx.flags := -fPIC -fcheck-new cxx.ldflags := -rdynamic -shared -fPIC -Wl,-rpath,"\$$ORIGIN",--enable-new-dtags cxx.ldlibs := -lc -lm -lstdc++ shared.extension = so shared.ldflags := -rdynamic -fPIC -shared -Wl,-soname,$(shared.lib) endif #=== flags and paths for Darwin ================================================ # On OSX we try to build fat binaries by default. It is assumed that OSX i386 # can build for ppc and OSX x86_64 can't. TODO: try to refine this condition. # LLVM-clang doesn't support -fcheck-new, therefore this flag is omitted for # OSX x86_64. ifeq ($(system), Darwin) pkglibdir = $(HOME)/Library/Pd pdincludepath := $(firstword $(wildcard \ /Applications/Pd*.app/Contents/Resources/src)) extension = pd_darwin cpp.flags := -DUNIX -DMACOSX -I /sw/include c.flags := c.ldflags := -undefined suppress -flat_namespace -bundle c.ldlibs := -lc cxx.ldflags := -undefined suppress -flat_namespace -bundle cxx.ldlibs := -lc shared.extension = dylib shared.ldflags = -dynamiclib -undefined dynamic_lookup \ -install_name @loader_path/$(shared.lib) \ -compatibility_version 1 -current_version 1.0 version.flag := $(filter $(cflags), -mmacosx-version-min=%) ifeq ($(target.arch), i386) cxx.flags := -fcheck-new arch := ppc i386 x86_64 version.flag ?= -mmacosx-version-min=10.4 endif ifeq ($(target.arch), x86_64) arch := i386 x86_64 version.flag ?= -mmacosx-version-min=10.5 endif arch.c.flags := $(addprefix -arch , $(arch)) $(version.flag) arch.ld.flags := $(arch.c.flags) endif #=== flags and paths for Windows =============================================== # Standard paths on Windows contain spaces, and GNU make functions treat such # paths as lists, with unintended effects. Therefore we must use shell function # ls instead of make's wildcard when probing for a path, and use double quotes # when specifying a path in a command argument. # Default paths in Mingw / Mingw-w64 environments. 'PROGRAMFILES' is standard # location for builds with native architecture, 'ProgramFiles(x86)' for i686 # builds on x86_64 Windows (detection method by Lucas Cordiviola). Curly braces # required because of parentheses in variable name. ifeq ($(system), Windows) pkglibdir := $(APPDATA)/Pd ifeq ($(MINGW_CHOST), i686-w64-mingw32) programfiles := ${ProgramFiles(x86)} else programfiles := $(PROGRAMFILES) endif pdbinpath := $(programfiles)/Pd/bin pdincludepath := $(programfiles)/Pd/src endif # Store default path to pd.dll in PDBINDIR if the latter is not user-defined. # For include path this is done in the platform-independent paths section below, # but for PDBINDIR it is done here so ld flags can be evaluated as immediate # variables. ifeq ($(system), Windows) ifdef PDDIR PDBINDIR := $(PDDIR)/bin endif PDBINDIR ?= $(pdbinpath) endif # TODO: decide whether -mms-bitfields should be specified. ifeq ($(system), Windows) cpp.flags := -DMSW -DNT ifeq ($(filter i%86 mingw32, $(target.arch)), $(target.arch)) arch.c.flags := -march=pentium4 -msse -msse2 -mfpmath=sse else ifeq (x86_64, $(target.arch)) cpp.flags := -DMSW -DNT -DPD_LONGINTTYPE=__int64 arch.c.flags := -march=core2 -msse -msse2 -msse3 -mfpmath=sse else arch.c.flags = endif extension = dll c.flags := c.ldflags := -static-libgcc -shared \ -Wl,--enable-auto-import "$(PDBINDIR)/pd.dll" c.ldlibs := cxx.flags := -fcheck-new cxx.ldflags := -static-libgcc -static-libstdc++ -shared \ -Wl,--enable-auto-import "$(PDBINDIR)/pd.dll" cxx.ldlibs := shared.extension = dll shared.ldflags := -static-libgcc -shared "$(PDBINDIR)/pd.dll" stripflags = --strip-all endif #=== paths ===================================================================== # Platform-dependent default paths are specified above, but overridable. # Path variables in upper case can be defined as make command argument or in the # environment. Variable 'objectsdir' is supported for compatibility with # the build system that pd-l2ork has inherited from pd-extended. PDINCLUDEDIR ?= $(pdincludepath) PDLIBDIR ?= $(firstword $(objectsdir) $(pkglibdir)) ifdef PDDIR PDINCLUDEDIR := $(wildcard $(PDDIR)/src) endif # base path where all components of the lib will be installed by default installpath := $(DESTDIR)$(PDLIBDIR)/$(lib.name) # check if include path contains spaces (as is often the case on Windows) # if so, store the path so we can later do checks with it pdincludepathwithspaces := $(if $(word 2, $(PDINCLUDEDIR)), $(PDINCLUDEDIR)) #=== accumulated build flags =================================================== # From GNU make docs: 'Users expect to be able to specify CFLAGS freely # themselves.' So we use CFLAGS to define options which are not strictly # required for compilation: optimizations, architecture specifications, and # warnings. CFLAGS can be safely overriden using a make command argument. # Variables cflags, ldflags and ldlibs may be defined in including makefile. optimization.flags = -O3 -ffast-math -funroll-loops -fomit-frame-pointer warn.flags = -Wall -Wextra -Wshadow -Winline -Wstrict-aliasing # suppress -Wunused-variable & Co if you don't want to clutter a build log ifdef suppress-wunused warn.flags += $(addprefix -Wno-unused-, function parameter value variable) endif CFLAGS = $(warn.flags) $(optimization.flags) $(arch.c.flags) # preprocessor flags cpp.flags := -DPD -I "$(PDINCLUDEDIR)" $(cpp.flags) $(CPPFLAGS) # flags for dependency checking (cflags from makefile may define -I options) depcheck.flags := $(cpp.flags) $(cflags) # architecture specifications for linker are overridable by LDFLAGS LDFLAGS := $(arch.ld.flags) # now add the same ld flags to shared dynamic lib shared.ldflags := $(shared.ldflags) $(LDFLAGS) # accumulated flags for C compiler / linker c.flags := $(cpp.flags) $(c.flags) $(cflags) $(CFLAGS) c.ldflags := $(c.ldflags) $(ldflags) $(LDFLAGS) c.ldlibs := $(c.ldlibs) $(ldlibs) # accumulated flags for C++ compiler / linker cxx.flags := $(cpp.flags) $(cxx.flags) $(cflags) $(CFLAGS) cxx.ldflags := $(cxx.ldflags) $(ldflags) $(LDFLAGS) cxx.ldlibs := $(cxx.ldlibs) $(ldlibs) ################################################################################ ### variables: tools ########################################################### ################################################################################ # aliases so we can later define 'compile-$1' and set 'c' or 'cxx' as argument compile-c := $(CC) compile-cxx := $(CXX) ################################################################################ ### checks ##################################################################### ################################################################################ # At this point most variables are defined. Now do some checks and info's # before rules begin. # 'forward declaration' of default target, needed to do checks all: # To avoid unpredictable results, make sure the default target is not redefined # by including makefile. ifneq ($(.DEFAULT_GOAL), all) $(error Default target must be 'all'.) endif # find out which target(s) will be made ifdef MAKECMDGOALS goals := $(MAKECMDGOALS) else goals := all endif # store path to Pd API m_pd.h if it is found ifdef PDINCLUDEDIR mpdh := $(shell ls "$(PDINCLUDEDIR)/m_pd.h") endif # store path to pd.dll; if not found, ls will give a useful error ifeq ($(system), Windows) pddll := $(shell ls "$(PDBINDIR)/pd.dll") endif # print Makefile.pdlibbuilder version $(info ++++ info: using Makefile.pdlibbuilder version $(version)) # when making target all, check if m_pd.h is found and print info about it ifeq ($(goals), all) $(if $(mpdh), \ $(info ++++ info: using Pd API $(mpdh)), \ $(warning Where is Pd API m_pd.h? Do 'make help' for info.)) endif # print target info $(info ++++ info: making target $(goals) $(if $(lib.name),in lib $(lib.name))) # when installing, print installpath info $(if $(filter install install-lib, $(goals)), $(info ++++ info: \ installpath is '$(installpath)')) #=== define executables ======================================================== # By default we build class executables, and optionally a shared dynamic link # lib. When make-lib-executable=yes we build all classes into a single lib # executable, on the condition that variable lib.setup.sources is defined. ifeq ($(make-lib-executable),yes) $(if $(lib.setup.sources), ,\ $(error Can not build library blob because lib.setup.sources is undefined)) executables := $(lib.name).$(extension) else executables := $(classes.executables) $(shared.lib) endif ################################################################################ ### rules: special targets ##################################################### ################################################################################ # Disable built-in rules. If some target can't be built with the specified # rules, it should not be built at all. MAKEFLAGS += --no-builtin-rules .PRECIOUS: .SUFFIXES: .PHONY: all post build-lib \ $(classes) $(makefiledirs) $(makefiles) \ install install-executables install-datafiles install-datadirs \ force clean vars allvars depend help ################################################################################ ### rules: build targets ####################################################### ################################################################################ # Target all forces the build of targets [$(executables) post] in # deterministic order. Target $(executables) builds class executables plus # optional shared lib or alternatively a single lib executable when # make-lib-executable=true. Target post is optionally defined by # library makefile. all: post post: $(executables) all: $(info ++++info: target all in lib $(lib.name) completed) # build all with -g option turned on for debug symbols alldebug: c.flags += -g alldebug: cxx.flags += -g alldebug: all #=== class executable ========================================================== # recipe for linking objects in class executable # argument $1 = compiler type (c or cxx) # argument $2 = class basename define link-class $(compile-$1) \ $($1.ldflags) $($2.class.ldflags) \ -o $2.$(extension) \ $(addsuffix .o, $(basename $($2.class.sources))) \ $(addsuffix .o, $(basename $(common.sources))) \ $($1.ldlibs) $($2.class.ldlibs) $(shared.lib) endef # general rule for linking object files in class executable %.$(extension): $(shared.lib) $(info ++++ info: linking objects in $@ for lib $(lib.name)) $(if $(filter %.cc %.cpp, $($*.class.sources)), \ $(call link-class,cxx,$*), \ $(call link-class,c,$*)) #=== library blob ============================================================== # build all classes into single executable build-lib: $(lib.name).$(extension) $(info ++++ info: library blob $(lib.name).$(extension) completed) # recipe for linking objects in lib executable # argument $1 = compiler type (c or cxx) define link-lib $(compile-$1) \ $($1.ldflags) $(lib.ldflags) \ -o $(lib.name).$(extension) $(all.objects) \ $($1.ldlibs) $(lib.ldlibs) endef # rule for linking objects in lib executable # declared conditionally to avoid name clashes ifeq ($(make-lib-executable),yes) $(lib.name).$(extension): $(all.objects) $(if $(filter %.cc %.cpp, $(all.sources)), \ $(call link-lib,cxx), \ $(call link-lib,c)) endif #=== shared dynamic lib ======================================================== # recipe for linking objects in shared executable # argument $1 = compiler type (c or cxx) define link-shared $(compile-$1) \ $(shared.ldflags) \ -o lib$(lib.name).$(shared.extension) $(shared.objects) \ $($1.ldlibs) $(shared.ldlibs) endef # rule for linking objects in shared executable # build recipe is in macro 'link-shared' lib$(lib.name).$(shared.extension): $(shared.objects) $(info ++++ info: linking objects in shared lib $@) $(if $(filter %.cc %.cpp, $(shared.sources)), \ $(call link-shared,cxx), \ $(call link-shared,c)) #=== object files ============================================================== # recipe to make .o file from source # argument $1 is compiler type (c or cxx) define make-object-file $(info ++++ info: making $@ in lib $(lib.name)) $(compile-$1) \ $($1.flags) \ -o $@ -c $< endef # Three rules to create .o files. These are double colon 'terminal' rules, # meaning they are the last in a rules chain. %.o:: %.c $(call make-object-file,c) %.o:: %.cc $(call make-object-file,cxx) %.o:: %.cpp $(call make-object-file,cxx) #=== explicit prerequisites for class executables ============================== # For class executables, prerequisite rules are declared in run time. Target # 'depend' prints these rules for debugging purposes. # declare explicit prerequisites rule like 'class: class.extension' # argument $v is class basename define declare-class-target $v: $v.$(extension) endef # declare explicit prerequisites rule like 'class.extension: object1.o object2.o' # argument $v is class basename define declare-class-executable-target $v.$(extension): $(addsuffix .o, $(basename $($v.class.sources))) \ $(addsuffix .o, $(basename $(common.sources))) endef # evaluate explicit prerequisite rules for all classes $(foreach v, $(classes), $(eval $(declare-class-target))) $(foreach v, $(classes), $(eval $(declare-class-executable-target))) #=== implicit prerequisites for class executables ============================== # Evaluating implicit prerequisites (header files) with help from the # preprocessor is 'expensive' so this is done conditionally and selectively. # Note that it is also possible to trigger a build via install targets, in # which case implicit prerequisites are not checked. # When the Pd include path contains spaces it will mess up the implicit # prerequisites rules. disable-dependency-tracking := $(strip $(pdincludepathwithspaces)) ifndef disable-dependency-tracking must-build-everything := $(filter all, $(goals)) must-build-class := $(filter $(classes), $(goals)) must-build-sources := $(foreach v, $(must-build-class), $($v.class.sources)) endif # declare implicit prerequisites rule like 'object.o: header1.h header2.h ...' # argument $1 is input source file(s) # dir is explicitly added because option -MM strips it by default define declare-object-target $(dir $1)$(filter %.o: %.h, $(shell $(CPP) $(depcheck.flags) -MM $1)) $(MAKEFILE_LIST) endef # evaluate implicit prerequisite rules when rebuilding everything ifdef must-build-everything $(if $(wildcard $(all.objects)), \ $(info ++++ info: evaluating implicit prerequisites in lib $(lib.name).....) \ $(foreach v, $(all.sources), $(eval $(call declare-object-target, $v)))) endif # evaluate implicit prerequisite rules when selectively building classes ifdef must-build-class $(foreach v, $(must-build-sources), \ $(eval $(call declare-object-target, $v))) $(foreach v, $(shared.sources), \ $(eval $(call declare-object-target, $v))) endif ################################################################################ ### rules: preprocessor and assembly files ##################################### ################################################################################ # Preprocessor and assembly output files for bug tracing etc. They are not part # of the build processes for executables. By default these files are created in # the current working directory. Dependency tracking is not performed, the build # is forced instead to make sure it's up to date. force: #=== preprocessor file ========================================================= # make preprocessor output file with extension .pre # argument $1 = compiler type (c or cxx) define make-preprocessor-file $(info ++++ info: making preprocessor output file $(notdir $*.pre) \ in current working directory) $(compile-$1) -E $< $(c.flags) $($1.flags) -o $(notdir $*.pre) endef %.pre:: %.c force $(call make-preprocessor-file,c) %.pre:: %.cc force $(call make-preprocessor-file,cxx) %.pre:: %.cpp force $(call make-preprocessor-file,cxx) #=== assembly file ============================================================= # make C / assembly interleaved output file with extension .lst # argument $1 = compiler type (c or cxx) define make-assembly-file $(info ++++ info: making assembly output file $(notdir $*.lst) \ in current working directory) $(compile-$1) \ -c -Wa,-a,-ad -fverbose-asm \ $($1.flags) \ $< > $(notdir $*.lst) endef %.lst:: %.c force $(call make-assembly-file,c) %.lst:: %.cc force $(call make-assembly-file,cxx) %.lst:: %.cpp force $(call make-assembly-file,cxx) ################################################################################ ### rules: installation targets ################################################ ################################################################################ #=== strip ===================================================================== # Stripping of installed binaries will only be done when variable 'stripflags' # is defined non-empty. No default definition is provided except for Windows # where the unstripped binaries are large, especially in the case of Mingw-w64. # Note: while stripping all symbols ('-s' or '--strip-all') is possible for # Linux and Windows, in the case of OSX only non-global symbols can be stripped # (option '-x' or '--discard-all'). # Make definition of strip command overridable so it can be defined in an # environment for cross-compilation. STRIP ?= strip # Commands in 'strip-executables' will be executed conditionally in the rule for # target 'install-executables'. strip-executables = cd "$(installpath)" && \ $(foreach v, $(executables), $(STRIP) $(stripflags) '$v';) #=== install =================================================================== # Install targets depend on successful exit status of target all because nothing # must be installed in case of a build error. # -p = preserve time stamps # -m = set permission mode (as in chmod) # -d = create all components of specified directories INSTALL = install INSTALL_PROGRAM := $(INSTALL) -p -m 644 INSTALL_DATA := $(INSTALL) -p -m 644 INSTALL_DIR := $(INSTALL) -m 755 -d # strip spaces from file names executables := $(strip $(executables)) datafiles := $(strip $(datafiles)) datadirs := $(strip $(datadirs)) # Do not make any install sub-target with empty variable definition because the # install program would exit with an error. install: $(if $(executables), install-executables) install: $(if $(datafiles), install-datafiles) install: $(if $(datadirs), install-datadirs) install-executables: all $(INSTALL_DIR) -v "$(installpath)" $(foreach v, $(executables), \ $(INSTALL_PROGRAM) '$v' "$(installpath)";) $(info ++++ info: executables of lib $(lib.name) installed \ from $(CURDIR) to $(installpath)) $(if $(stripflags), $(strip-executables),) install-datafiles: all $(INSTALL_DIR) -v "$(installpath)" $(foreach v, $(datafiles), \ $(INSTALL_DATA) '$(v)' "$(installpath)";) $(info ++++ info: data files of lib $(lib.name) installed \ from $(CURDIR) to $(installpath)) install-datadirs: all $(foreach v, $(datadirs), $(INSTALL_DIR) "$(installpath)/$v";) $(foreach v, $(datadirs), \ $(INSTALL_DATA) $(wildcard $v/*) "$(installpath)/$v";) $(info ++++ info: data directories of lib $(lib.name) installed \ from $(CURDIR) to $(installpath)) ################################################################################ ### rules: distribution targets ################################################ ################################################################################ # TODO # These targets are implemented in Makefile Template, but I have to figure out # how to do it under the not-so-strict conditions of Makefile.pdlibbuilder. # make source package dist: @echo "target dist not yet implemented" # make Debian source package dpkg-source: @echo "target dpkg-source not yet implemented" $(ORIGDIR): $(DISTDIR): ################################################################################ ### rules: clean targets ####################################################### ################################################################################ # delete build products from build tree clean: rm -f $(all.objects) rm -f $(classes.executables) $(lib.name).$(extension) $(shared.lib) rm -f *.pre *.lst # remove distribution directories and tarballs from build tree distclean: clean @echo "target distclean not yet implemented" ################################################################################ ### rules: submake targets ##################################################### ################################################################################ # Iterate over sub-makefiles or makefiles in other directories. # When 'continue-make=yes' is set, sub-makes will report 'true' to the parent # process regardless of their real exit status. This prevents the parent make # from being aborted by a sub-make error. Useful when you want to quickly find # out which sub-makes from a large set will succeed. ifeq ($(continue-make),yes) continue = || true endif # These targets will trigger sub-make processes for entries in 'makefiledirs' # and 'makefiles'. all alldebug install clean distclean dist dkpg-source: \ $(makefiledirs) $(makefiles) # this expands to identical rules for each entry in 'makefiledirs' $(makefiledirs): $(MAKE) --directory=$@ $(MAKECMDGOALS) $(continue) # this expands to identical rules for each entry in 'makefiles' $(makefiles): $(MAKE) --directory=$(dir $@) --makefile=$(notdir $@) $(MAKECMDGOALS) $(continue) ################################################################################ ### rules: convenience targets ################################################# ################################################################################ #=== show variables ============================================================ # Several 'function' macro's cause errors when expanded within a rule or without # proper arguments. Variables which are set with the define directive are only # shown by name for that reason. functions = \ add-class-source \ declare-class-target \ declare-class-executable-target \ declare-object-target \ link-class \ link-lib \ link-shared \ make-object-file \ make-preprocessor-file \ make-assembly-file # show variables from makefiles vars: $(info ++++ info: showing makefile variables:) $(foreach v,\ $(sort $(filter-out $(functions) functions, $(.VARIABLES))),\ $(if $(filter file, $(origin $v)),\ $(info variable $v = $($v)))) $(foreach v, $(functions), $(info 'function' name: $v)) @echo # show all variables allvars: $(info ++++ info: showing default, automatic and makefile variables:) $(foreach v, \ $(sort $(filter-out $(functions) functions, $(.VARIABLES))), \ $(info variable ($(origin $v)) $v = $($v))) $(foreach v, $(functions), $(info 'function' name: $v)) @echo #=== show dependencies ========================================================= # show generated prerequisites rules depend: $(info ++++ info: generated prerequisite rules) $(foreach v, $(classes), $(info $(declare-class-target))) $(foreach v, $(classes), $(info $(declare-class-executable-target))) $(foreach v, $(all.sources), $(info $(call declare-object-target, $v))) @echo #=== show help text ============================================================ # brief info about targets and paths ifdef mpdh mpdhinfo := $(mpdh) else mpdhinfo := m_pd.h was not found. Is Pd installed? endif help: @echo @echo " Main targets:" @echo " all: build executables (default target)" @echo " install: install all components of the library" @echo " vars: print makefile variables for troubleshooting" @echo " allvars: print all variables for troubleshooting" @echo " help: print this help text" @echo @echo " Pd API m_pd.h:" @echo " $(mpdhinfo)" @echo " You may specify your preferred Pd include directory as argument" @echo " to the make command, like 'PDINCLUDEDIR=path/to/pd/src'." @echo @echo " Path for installation of your libdir(s):" @echo " $(PDLIBDIR)" @echo " Alternatively you may specify your path for installation as argument" @echo " to the make command, like 'PDLIBDIR=path/to/pd-externals'." @echo @echo " Default paths are listed in the doc sections in Makefile.pdlibbuilder." @echo #=== dummy target ============================================================== coffee: @echo "Makefile.pdlibbuilder: Can not make coffee. Sorry." ################################################################################ ### end of rules sections ###################################################### ################################################################################ # for syntax highlighting in vim and github # vim: set filetype=make: iem_utils-v0.0.20181004/punish/doublechord-plugin/doublechord.c0000644000175000017500000000613113355471367024432 0ustar zmoelnigzmoelnig/****************************************************** * * doublechord - implementation file * * copyleft (c) IOhannes m zmölnig * * 2017:forum::für::umläute:2017 * * institute of electronic music and acoustics (iem) * ****************************************************** * * license: GNU General Public License v.2 (or later) * ******************************************************/ /* * * - doublechord: duplicate patch chords * * select a connection (aka 'patch chord'), and press Ctrl-D * the connection will be duplicated to the right (if possible), * connecting the same two objects but the next outlets/inlets * */ #include "m_pd.h" #include "m_imp.h" #include "g_canvas.h" static t_object* index2glist(const t_glist*glist, int index) { t_gobj*obj=glist->gl_list; while(index-->0 && obj) { obj=obj->g_next; } return (t_object*)obj; } static int is_connected(t_object*src, int nsrc, const t_object*dst, const int ndst) { t_outlet *out = 0; t_outconnect*conn=obj_starttraverseoutlet(src, &out, nsrc); while(conn) { int which = 0; t_inlet *in = 0; t_object *dest = 0; conn=obj_nexttraverseoutlet(conn, &dest, &in, &which); if ((dst == dest) && (ndst == which)) return 1; } return 0; } /* ------------------------- doublechord ---------------------------- */ static void canvas_doublechord(t_canvas *x) { if (x && x->gl_editor && x->gl_editor->e_selectedline) { t_atom ap[4]; int outno = x->gl_editor->e_selectline_outno + 1; int inno = x->gl_editor->e_selectline_inno + 1; t_object*outobj = index2glist(x, x->gl_editor->e_selectline_index1); t_object*inobj = index2glist(x, x->gl_editor->e_selectline_index2); while(is_connected(outobj, outno, inobj, inno)) { outno++; inno++; } if (!outobj || obj_noutlets(outobj) <= outno) return; if (!inobj || obj_ninlets (inobj ) <= inno ) return; if(obj_issignaloutlet(outobj, outno) && !obj_issignalinlet(inobj, inno)) return; SETFLOAT(ap+0, x->gl_editor->e_selectline_index1); SETFLOAT(ap+1, outno); SETFLOAT(ap+2, x->gl_editor->e_selectline_index2); SETFLOAT(ap+3, inno); pd_typedmess((t_pd*)x, gensym("connect"), 4, ap); x->gl_editor->e_selectline_outno = outno; x->gl_editor->e_selectline_inno = inno; } else { pd_typedmess((t_pd*)x, gensym("duplicate doublechord"), 0, 0); } } void doublechord_setup(void) { t_gotfn dupfun = 0; int major, minor, bugfix; sys_getversion(&major, &minor, &bugfix); if((major>0 || minor >= 49)) { error("double-chord built into Pd>=0.49, not enabling iem::punish::doublechord"); return; } if(NULL==canvas_class) { verbose(10, "double-chord detected class_new() @ %p", class_new); return; } dupfun = zgetfn(&canvas_class, gensym("duplicate")); if((t_method)canvas_doublechord != (t_method)dupfun) { post("double-chord - duplicate patch chords"); class_addmethod(canvas_class, (t_method)dupfun, gensym("duplicate doublechord"), 0); class_addmethod(canvas_class, (t_method)canvas_doublechord, gensym("duplicate"), 0); } } iem_utils-v0.0.20181004/punish/doublechord-plugin/Makefile0000755000175000017500000000164213207347074023432 0ustar zmoelnigzmoelnig#!/usr/bin/make -f # Makefile for pure data externals in lib creb. # Needs Makefile.pdlibbuilder to work (https://github.com/pure-data/pd-lib-builder) punish.name = doublechord lib.name = $(punish.name)-plugin # special file that does not provide a class lib.setup.sources = # all other C and C++ files in subdirs are source files per class # (alternatively, enumerate them by hand) class.sources = $(punish.name).c datafiles = \ $(punish.name)-plugin.tcl \ $(wildcard *-help.pd) \ README.md LICENSE.md datadirs = ################################################################################ ### pdlibbuilder ############################################################### ################################################################################ # Include Makefile.pdlibbuilder from this directory, # or else from some user-defined folder PDLIBBUILDER_DIR=./ include $(PDLIBBUILDER_DIR)/Makefile.pdlibbuilder iem_utils-v0.0.20181004/punish/doublechord-plugin/LICENSE.md0000644000175000017500000004364213207347074023401 0ustar zmoelnigzmoelnigGNU GENERAL PUBLIC LICENSE ========================== Version 2, June 1991 > Copyright (C) 1989, 1991 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. # Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Lesser General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. # GNU GENERAL PUBLIC LICENSE # ## TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION ## - *0\.* This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. - 1\. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. - 2\. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. - 3\. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. - 4\. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. - 5\. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. - 6\. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. - 7\. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. - 8\. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. - 9\. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. - 10\. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. ## NO WARRANTY - 11\. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - 12\. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. ## END OF TERMS AND CONDITIONS ## --------------------------------------------------------------------------- ### How to Apply These Terms to Your New Programs ### If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This program is free software; you can redistribute it and/or 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, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. iem_utils-v0.0.20181004/punish/doublechord-plugin/doublechord-help.pd0000644000175000017500000000447413303322335025530 0ustar zmoelnigzmoelnig#N canvas 30 90 474 662 10; #X text 89 46 doublechord; #X text 89 57 ===========; #X text 25 88 an easy way to connect an object with many outlets and an object with many inlets.; #X text 30 150 usage:; #X text 111 152 1.) create two objects; #X text 111 168 2.) connect them; #X text 111 185 3.) select the *connection*; #X text 111 203 4.) press - (duplicate) to create a new connection right of the selected connection., f 43; #X text 111 247 5.) press - again to create more connections ; #X text 83 285 Pd will stop creating new connections once you've reached the rightmost inlet resp. outlet.; #X text 83 315 It will also stop \, if the outlet cannot be connected to the inlet because they are incompatible (e.g. you cannot connect a signal-outlet with a non-signal inlet); #X text 84 360 If there's already a connection in place \, Pd will skip it and proceed to the right.; #N canvas 180 311 450 300 \$0-try-it-out 0; #X obj 100 100 unpack 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0; #X obj 100 150 pack 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0; #X text 50 50 select the connection and click Ctrl-D (again).; #X connect 0 1 1 0; #X restore 136 460 pd \$0-try-it-out; #X text 268 461 <- try it!; #N canvas 202 208 969 430 try 0; #X obj 100 100 bng 20 250 50 0 \$0-try \$0-try empty 17 7 0 10 -262144 -1 -1; #X obj 168 125 r \$0-try; #X obj 168 147 t b b; #X obj 168 241 s pd-\$0-try-it-out; #X obj 310 102 loadbang; #X msg 168 199 vis 1 \, editmode 1; #X msg 80 199 clear; #X obj 310 124 t b b; #X msg 337 150 editmode 0 \, vis 0; #X msg 310 183 clear \, obj 100 100 unpack 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 \, obj 100 150 pack 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 \, connect 0 1 1 0 \, text 50 50 select the connection and click Ctrl-D (again).; #X connect 1 0 2 0; #X connect 2 0 5 0; #X connect 2 1 9 0; #X connect 4 0 7 0; #X connect 5 0 3 0; #X connect 6 0 3 0; #X connect 7 0 9 0; #X connect 7 1 8 0; #X connect 8 0 3 0; #X connect 9 0 3 0; #X coords 0 -1 1 1 20 20 2 100 100; #X restore 243 457 pd try; #X text 18 544 installation instructions:; #X text 37 628 2.) Restart Pd; #X text 66 606 "Just say NO" \, if the plugin installer asks you to do so.; #X text 38 563 1.) put the doublechord-plugin/ folder somewhere in Pd's search path., f 69; #X text 37 586 1.1) DO NOT add the doublechord-plugin/ folder to the search path., f 66; iem_utils-v0.0.20181004/punish/Makefile0000644000175000017500000000064513303322335017631 0ustar zmoelnigzmoelnigsubprojects=patcherize triggerize doublechord .PHONY: all $(subprojects) all: $(subprojects) $(subprojects): $(MAKE) -C $@-plugin .PHONY: clean $(subprojects%=%-clean) clean: $(subprojects:%=%-clean) $(subprojects:%=%-clean): $(MAKE) -C $(@:%-clean=%-plugin) clean .PHONY: install $(subprojects%=%-install) install: $(subprojects:%=%-install) $(subprojects:%=%-install): $(MAKE) -C $(@:%-install=%-plugin) install iem_utils-v0.0.20181004/tclprompt-plugin/0000755000175000017500000000000012661077617020216 5ustar zmoelnigzmoelnigiem_utils-v0.0.20181004/tclprompt-plugin/tclprompt-plugin.tcl0000644000175000017500000001036412661077617024246 0ustar zmoelnigzmoelnig# META TCL/TK prompt plugin # META DESCRIPTION enables a wee Tcl/Tk cmdline within the Pd-console # META AUTHOR IOhannes m zmölnig , Hans-Christoph Steiner # META VERSION 0.1 package require pdwindow 0.1 namespace eval ::tclprompt:: { } proc ::tclprompt_disable_menu {} { # disable the TclPrompt menu (as gives an error if we re-create) set mymenu .menubar.help if {[catch {$mymenu entryconfigure [_ "Tcl prompt"] -state disabled}]} { } } ## first check if the Pd-runtime provides a tcl_entry (and use it) if {[catch XXX::pdwindow::create_tcl_entry errorname]} { ## if that fails, we need to provide our own (code shamelessly taken from Pd-0.46) namespace eval ::tclprompt:: { variable tclentry {} variable tclentry_history {"console show"} variable history_position 0 variable show 1 } proc ::tclprompt::eval_tclentry {} { variable tclentry variable tclentry_history variable history_position 0 if {$tclentry eq ""} {return} ;# no need to do anything if empty if {[catch {uplevel #0 $tclentry} errorname]} { global errorInfo switch -regexp -- $errorname { "missing close-brace" { ::pdwindow::error [concat [_ "(Tcl) MISSING CLOSE-BRACE '\}': "] $errorInfo]\n } "missing close-bracket" { ::pdwindow::error [concat [_ "(Tcl) MISSING CLOSE-BRACKET '\]': "] $errorInfo]\n } "^invalid command name" { ::pdwindow::error [concat [_ "(Tcl) INVALID COMMAND NAME: "] $errorInfo]\n } default { ::pdwindow::error [concat [_ "(Tcl) UNHANDLED ERROR: "] $errorInfo]\n } } } lappend tclentry_history $tclentry set tclentry {} } proc ::tclprompt::get_history {direction} { variable tclentry_history variable history_position incr history_position $direction if {$history_position < 0} {set history_position 0} if {$history_position > [llength $tclentry_history]} { set history_position [llength $tclentry_history] } .pdwindow.tclprompt.entry delete 0 end .pdwindow.tclprompt.entry insert 0 \ [lindex $tclentry_history end-[expr $history_position - 1]] } proc ::tclprompt::validate_tcl {} { variable tclentry if {[info complete $tclentry]} { .pdwindow.tclprompt.entry configure -background "white" } else { .pdwindow.tclprompt.entry configure -background "#FFF0F0" } } #--create tcl entry-----------------------------------------------------------# proc ::tclprompt::create {} { # Tcl entry box frame frame .pdwindow.tclprompt -borderwidth 0 pack .pdwindow.tclprompt -side bottom -fill x -before .pdwindow.text label .pdwindow.tclprompt.label -text [_ "Tcl:"] -anchor e pack .pdwindow.tclprompt.label -side left entry .pdwindow.tclprompt.entry -width 200 \ -exportselection 1 -insertwidth 2 -insertbackground blue \ -textvariable ::tclprompt::tclentry -font {$::font_family -12} pack .pdwindow.tclprompt.entry -side left -fill x # bindings for the Tcl entry widget bind .pdwindow.tclprompt.entry <$::modifier-Key-a> "%W selection range 0 end; break" bind .pdwindow.tclprompt.entry "::tclprompt::eval_tclentry" bind .pdwindow.tclprompt.entry "::tclprompt::get_history 1" bind .pdwindow.tclprompt.entry "::tclprompt::get_history -1" bind .pdwindow.tclprompt.entry +"::tclprompt::validate_tcl" bind .pdwindow.text "focus .pdwindow.tclprompt.entry; break" # pack .pdwindow.tclprompt } proc ::tclprompt::destroy {} { ::destroy .pdwindow.tclprompt } ::tclprompt_disable_menu set mymenu .menubar.help $mymenu add separator $mymenu add check -label [_ "Tcl prompt"] -variable ::tclprompt::show \ -command {::tclprompt::toggle $::tclprompt::show} # bind all <$::modifier-Key-s> {::deken::open_helpbrowser .helpbrowser2} ::tclprompt::create } else { puts "built-in TclPrompt" ::tclprompt_disable_menu proc ::tclprompt::create {} {} proc ::tclprompt::destroy {} { # actually we *can* destroy it, but we cannot re-create it ::pdwindow::error "cannot destroy built-in TclPrompt" } } proc ::tclprompt::toggle {state} { if { $state } { ::tclprompt::create } { ::tclprompt::destroy } } proc ::tclprompt::test {} { after 1000 ::tclprompt::create ::tclprompt::destroy } pdtk_post "loaded tclprompt-plugin\n" iem_utils-v0.0.20181004/tclprompt-plugin/LICENSE0000644000175000017500000000271412661077617021227 0ustar zmoelnigzmoelnigCopyright (c) 2015, pure-data All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of tclprompt-plugin nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. iem_utils-v0.0.20181004/tclprompt-plugin/README.md0000644000175000017500000000115212661077617021474 0ustar zmoelnigzmoelniginteractive Tcl/Tk prompt === When developing GUI-plugins (or debugging Pd) it often helps to have a little interactive Tcl/Tk prompt within Pd. This plugin enables one for you. For Pd versions that come with their own implementation of a TclPrompt (that's Pd-0.43..0.46) it will simply enable that one. For newer versions of Pd that lack a built-in TclPrompt, the plugin provides one. ## Installing simply copy the [tclprompt-plugin.tcl](https://raw.githubusercontent.com/pure-data/tclprompt-plugin/master/tclprompt-plugin.tcl) into your Pd searchpath. ## AUTHORS - IOhannes m zmölnig - Hans-Christoph Steiner