nusmuk/0000755000175000017500000000000012622716031012632 5ustar zmoelnigzmoelnignusmuk/utils/0000775000175000017500000000000012621334244013775 5ustar zmoelnigzmoelnignusmuk/utils/pps.pd0000664000175000017500000000026612047230726015132 0ustar zmoelnigzmoelnig#N canvas 0 0 450 300 10; #X obj 55 24 inlet; #X obj 55 43 list prepend set; #X obj 55 65 list trim; #X obj 55 87 outlet; #X connect 0 0 1 0; #X connect 1 0 2 0; #X connect 2 0 3 0; nusmuk/utils/preset_param.pd0000664000175000017500000000105212455750472017014 0ustar zmoelnigzmoelnig#N canvas 2959 446 450 300 10; #X obj 37 27 inlet; #X obj 37 259 outlet; #X obj 37 82 change; #X obj 215 174 f; #X obj 215 144 t b f; #X obj 215 202 pack f f \$1; #X obj 122 41 r from_mtx_preset_\$1; #X msg 215 235 element \$3 \$2 \$1; #X obj 215 261 s to_mtx_preset; #X obj 64 228 s parametre_\$1; #X obj 215 117 r save_parameters; #X connect 0 0 2 0; #X connect 2 0 1 0; #X connect 2 0 3 1; #X connect 2 0 9 0; #X connect 3 0 5 0; #X connect 4 0 3 0; #X connect 4 1 5 1; #X connect 5 0 7 0; #X connect 6 0 2 0; #X connect 7 0 8 0; #X connect 10 0 4 0; nusmuk/utils/line3.c0000664000175000017500000001250112047230726015154 0ustar zmoelnigzmoelnig// line3 // based on miller puckette line object (so licence / copyright comes from pure data) // compatible with line, but with a 3d order polynome. // there is continuity of the variation speed /* This 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. */ // Cyrille Henry 01 2005 #include "m_pd.h" static t_class *line3_class; typedef struct _line3 { t_object x_obj; t_clock *x_clock; double x_targettime; t_float x_targetval,setderiv, a, b; double x_prevtime; t_float x_setval; int x_gotinlet; t_float x_grain; double x_1overtimediff; double x_in1val; } t_line3; void line3_tick(t_line3 *x) { double tmp, t; double timenow = clock_getsystime(); double msectogo = - clock_gettimesince(x->x_targettime); if (msectogo < 1E-9) { outlet_float(x->x_obj.ob_outlet, x->x_targetval); } else { t = (timenow - x->x_prevtime); tmp = x->a * t * t * t + x->b * t * t + x->setderiv * t + x->x_setval; outlet_float(x->x_obj.ob_outlet, tmp); clock_delay(x->x_clock, (x->x_grain > msectogo ? msectogo : x->x_grain)); } } void line3_float(t_line3 *x, t_float f) { double timenow = clock_getsystime(); if (x->x_gotinlet && x->x_in1val > 0) { if (timenow >= x->x_targettime) { x->x_setval = x->x_targetval; x->setderiv = 0; } else { x->x_setval = x->a * (timenow - x->x_prevtime) * (timenow - x->x_prevtime) * (timenow - x->x_prevtime) + x->b * (timenow - x->x_prevtime) * (timenow - x->x_prevtime) + x->setderiv * (timenow - x->x_prevtime) + x->x_setval; x->setderiv = 3 * x->a * (timenow - x->x_prevtime) * (timenow - x->x_prevtime) + 2 * x->b * (timenow - x->x_prevtime) + x->setderiv; } x->x_prevtime = timenow; x->x_targettime = clock_getsystimeafter(x->x_in1val); x->x_targetval = f; x->x_1overtimediff = 1./ (x->x_targettime - timenow); x->a = -2 * (x->x_targetval - x->x_setval) * x->x_1overtimediff; x->a += x->setderiv; x->a *= x->x_1overtimediff; x->a *= x->x_1overtimediff; x->b = 3 * (x->x_targetval - x->x_setval) * x->x_1overtimediff; x->b -= 2 * x->setderiv; x->b *= x->x_1overtimediff; line3_tick(x); x->x_gotinlet = 0; clock_delay(x->x_clock, (x->x_grain > x->x_in1val ? x->x_in1val : x->x_grain)); } else { clock_unset(x->x_clock); x->x_targetval = x->x_setval = f; x->x_targettime = timenow; outlet_float(x->x_obj.ob_outlet, f); } x->x_gotinlet = 0; } void line3_ft1(t_line3 *x, t_floatarg g) { x->x_in1val = g; x->x_gotinlet = 1; } void line3_stop(t_line3 *x) { x->x_targetval = x->x_setval; clock_unset(x->x_clock); } void line3_set(t_line3 *x, t_floatarg f) { clock_unset(x->x_clock); x->x_targetval = x->x_setval = f; x->setderiv = 0; } void line3_free(t_line3 *x) { clock_free(x->x_clock); } void *line3_new(t_floatarg f, t_floatarg grain) { t_line3 *x = (t_line3 *)pd_new(line3_class); x->x_targetval = x->x_setval = f; x->x_gotinlet = 0; x->setderiv = 0; x->x_1overtimediff = 1; x->x_clock = clock_new(x, (t_method)line3_tick); x->x_targettime = x->x_prevtime = clock_getsystime(); if (grain <= 0) grain = 20; x->x_grain = grain; outlet_new(&x->x_obj, gensym("float")); inlet_new(&x->x_obj, &x->x_obj.ob_pd, gensym("float"), gensym("ft1")); return (x); } void line3_setup(void) { line3_class = class_new(gensym("line3"), (t_newmethod)line3_new, (t_method)line3_free, sizeof(t_line3), 0, A_DEFFLOAT, A_DEFFLOAT, 0); class_addmethod(line3_class, (t_method)line3_ft1, gensym("ft1"), A_FLOAT, 0); class_addmethod(line3_class, (t_method)line3_stop, gensym("stop"), 0); class_addmethod(line3_class, (t_method)line3_set, gensym("set"), A_FLOAT, 0); class_addfloat(line3_class, (t_method)line3_float); } nusmuk/utils/common.h0000664000175000017500000000061112047230726015436 0ustar zmoelnigzmoelnig/* common.h -- those things we define often */ #define InRange(v,lo,hi) ((v)<=(hi)&&(v)>=(lo)) #define MAXIUM(a,b) ((a)>(b)?(a):(b)) #define MINIUM(a,b) ((a)<(b)?(a):(b)) #define RetKey 13 #define EnterKey 3 #define SpaceBar 32 #define BackSpace 8 #define BackSlash 0x5C #define VertBar 0x7C #define Grave 0x60 #define Tilde 0x7E #define TabKey 9 #define ClearKey 27 #define OptionSpace 202 nusmuk/utils/filtered_random-help.pd0000664000175000017500000000316512047230726020415 0ustar zmoelnigzmoelnig#N canvas 374 22 791 605 10; #X obj 84 102 vsl 15 128 0 127 0 0 empty empty empty 0 -9 0 10 -262144 -1 -1 240 1; #X obj 85 363 vsl 15 128 0 127 0 0 empty empty empty 0 -9 0 10 -262144 -1 -1 0 1; #X obj 111 362 vsl 15 128 0 127 0 0 empty empty empty 0 -9 0 10 -262144 -1 -1 12033 1; #X obj 187 362 vsl 15 128 0 127 0 0 empty empty empty 0 -9 0 10 -262144 -1 -1 5750 1; #X obj 214 362 vsl 15 128 0 127 0 0 empty empty empty 0 -9 0 10 -262144 -1 -1 6142 1; #X obj 283 362 vsl 15 128 0 127 0 0 empty empty empty 0 -9 0 10 -262144 -1 -1 126 1; #X obj 310 362 vsl 15 128 0 127 0 0 empty empty empty 0 -9 0 10 -262144 -1 -1 7655 1; #X obj 85 244 filtered_random 127 0 0.3 20 0; #X obj 84 79 filtered_random 127 0 0 20 0; #X obj 187 282 filtered_random 127 0 0 20 500; #X obj 310 339 filtered_random 127 0 0 20 100; #X obj 111 263 filtered_random 127 0 -0.3 20 0; #X obj 283 320 filtered_random 1000 0 0.5 20 100; #X floatatom 84 12 5 0 0 0 - - -; #X floatatom 220 12 5 0 0 0 - - -; #X floatatom 344 12 5 0 0 0 - - -; #X floatatom 470 12 5 0 0 0 - - -; #X floatatom 612 12 5 0 0 0 - - -; #X text 446 450 related to :; #X text 345 28 courbe (-1 1); #X text 470 26 metro (20 5000..); #X text 610 27 line (0 5000..); #X text 89 28 amplitude (0 1..); #X text 223 29 offset (0 1..); #X text 82 -36 generate stream of number \, based on random; #X obj 448 471 rnd_flow; #X obj 214 301 filtered_random 127 0 0 20 1500; #X connect 7 0 1 0; #X connect 8 0 0 0; #X connect 9 0 3 0; #X connect 10 0 6 0; #X connect 11 0 2 0; #X connect 12 0 5 0; #X connect 13 0 8 0; #X connect 14 0 8 1; #X connect 15 0 8 2; #X connect 16 0 8 3; #X connect 17 0 8 4; #X connect 26 0 4 0; nusmuk/utils/_mtx_preset-help.pd0000664000175000017500000000036012451004226017573 0ustar zmoelnigzmoelnig#N canvas 717 414 450 300 10; #X msg 163 139 read test.txt; #X msg 183 167 write test.txt; #X obj 163 201 _mtx_preset 12 3; #X text 40 16 same as mtx_preset but provide read / write fonctionalities ; #X connect 0 0 2 0; #X connect 1 0 2 0; nusmuk/utils/fmod.pd0000664000175000017500000000073012047230726015251 0ustar zmoelnigzmoelnig#N canvas 714 472 314 297 10; #X obj 52 36 inlet; #X obj 52 208 outlet; #X obj 110 36 inlet; #X obj 52 64 / \$1; #X obj 52 188 * \$1; #X obj 84 106 int; #X obj 52 84 t f f; #X obj 52 126 -; #X obj 52 146 moses 0; #X obj 52 167 + 1; #X connect 0 0 3 0; #X connect 2 0 3 1; #X connect 2 0 4 1; #X connect 3 0 6 0; #X connect 4 0 1 0; #X connect 5 0 7 1; #X connect 6 0 7 0; #X connect 6 1 5 0; #X connect 7 0 8 0; #X connect 8 0 9 0; #X connect 8 1 4 0; #X connect 9 0 4 0; nusmuk/utils/pbank.h0000664000175000017500000000043412047230726015244 0ustar zmoelnigzmoelnig typedef struct shared { t_symbol *s_sym; /* shared memory name */ t_atom **s_data; /* memory pointer */ int s_rows; /* memory dimension */ int s_columns; /* memory dimension */ int s_refcount; /* number of objects pointing to "s_data" */ struct shared *s_next; } t_shared; nusmuk/utils/tab_upsample_copy.c0000664000175000017500000000610012603463326017650 0ustar zmoelnigzmoelnig#include "m_pd.h" #define MIN(a,b) (((a)<(b))?(a):(b)) #define MAX(a,b) (((a)>(b))?(a):(b)) static t_class *tab_upsample_copy_class; typedef struct _tab_upsample_copy { t_object x_obj; t_symbol *x_arrayname_src; t_symbol *x_arrayname_dst; int factor, offset; t_outlet *b_out; } t_tab_upsample_copy; void *tab_upsample_copy_new(t_symbol *s_src,t_symbol *s_dst, t_float factor) { t_tab_upsample_copy *x = (t_tab_upsample_copy *)pd_new(tab_upsample_copy_class); x->x_arrayname_src = s_src; x->x_arrayname_dst = s_dst; x->factor = MAX(1, factor); x->offset = 0; x->b_out = outlet_new(&x->x_obj, &s_bang); return (void *)x; } void tab_upsample_copy_compute(t_tab_upsample_copy *x) { t_garray *a_src, *a_dst; int npoints_src, npoints_dst; t_word *vec_src, *vec_dst; int nb_max, i, j; if (!(a_src = (t_garray *)pd_findbyclass(x->x_arrayname_src, garray_class))) pd_error(x, "%s: no such array", x->x_arrayname_src->s_name); else if (!garray_getfloatwords(a_src, &npoints_src, &vec_src)) pd_error(x, "%s: bad template for tab_upsample_copy", x->x_arrayname_src->s_name); else if (!(a_dst = (t_garray *)pd_findbyclass(x->x_arrayname_dst, garray_class))) pd_error(x, "%s: no such array", x->x_arrayname_dst->s_name); else if (!garray_getfloatwords(a_dst, &npoints_dst, &vec_dst)) pd_error(x, "%s: bad template for tab_upsample_copy", x->x_arrayname_dst->s_name); else { nb_max = MIN(npoints_src*x->factor, npoints_dst-x->offset); // post("nb_max = %d",nb_max); for (i=0; ioffset].w_float = vec_src[i/x->factor].w_float; } garray_redraw(a_dst); } outlet_bang(x->b_out); } void tab_upsample_copy_bang(t_tab_upsample_copy *x) { x->offset = 0; tab_upsample_copy_compute(x) ; } void tab_upsample_copy_float(t_tab_upsample_copy *x, t_float offset) { x->offset = offset; tab_upsample_copy_compute(x) ; } void tab_upsample_copy_src(t_tab_upsample_copy *x, t_symbol *s_src) { x->x_arrayname_src = s_src; } void tab_upsample_copy_dst(t_tab_upsample_copy *x, t_symbol *s_dst) { x->x_arrayname_dst = s_dst; } void tab_upsample_copy_factor(t_tab_upsample_copy *x, t_float factor) { x->factor = MAX(1, factor); } void tab_upsample_copy_setup(void) { tab_upsample_copy_class = class_new(gensym("tab_upsample_copy"), (t_newmethod)tab_upsample_copy_new, 0, sizeof(t_tab_upsample_copy), CLASS_DEFAULT, A_DEFSYM, A_DEFSYM, A_DEFFLOAT, 0); class_addbang(tab_upsample_copy_class, tab_upsample_copy_bang); class_addmethod(tab_upsample_copy_class, (t_method)tab_upsample_copy_src, gensym("src"), A_DEFSYM, 0); class_addmethod(tab_upsample_copy_class, (t_method)tab_upsample_copy_dst, gensym("dst"), A_DEFSYM, 0); class_addmethod(tab_upsample_copy_class, (t_method)tab_upsample_copy_factor, gensym("factor"), A_DEFFLOAT, 0); class_addfloat(tab_upsample_copy_class, (t_method)tab_upsample_copy_float); } nusmuk/utils/tab_upsample-help.pd0000664000175000017500000000106712603450046017727 0ustar zmoelnigzmoelnig#N canvas 96 645 777 410 10; #X obj 97 73 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 -1; #X obj 411 55 table src2 1000; #X msg 139 91 src src2; #X msg 152 140 dst dst2; #X obj 85 248 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 -1; #X obj 411 105 table dst2 300; #X obj 410 33 table src 10; #X obj 411 85 table dst 50; #X obj 87 205 tab_upsample src dst 3; #X msg 182 177 factor 5; #X msg 237 125 1; #X text 267 127 offset; #X connect 0 0 8 0; #X connect 2 0 8 0; #X connect 3 0 8 0; #X connect 8 0 4 0; #X connect 9 0 8 0; #X connect 10 0 8 0; nusmuk/utils/mtx_preset.c0000664000175000017500000003512712455542056016352 0ustar zmoelnigzmoelnig/* mtx_preset : store and interpol presets that are in a matrix form Copyright (C) 2014 Cyrile Henry 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 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ #include "m_pd.h" #include "math.h" #define sizemaxX 1000 #define sizemaxY 1000 static t_class *mtx_preset_class; typedef struct _mtx_preset { t_object x_obj; t_outlet *main_outlet; t_int sizeX; t_int sizeY; t_float matrix[sizemaxX][sizemaxY+1]; } t_mtx_preset; t_float mix(t_float X, t_float Y, t_float mix) { return (1-mix)*X + mix*Y ; } #define min(X, Y) (((X) < (Y)) ? (X) : (Y)) #define max(X, Y) (((X) > (Y)) ? (X) : (Y)) void *mtx_preset_new(t_symbol *s, int argc, t_atom *argv) { int i, j; t_mtx_preset *x = (t_mtx_preset *)pd_new(mtx_preset_class); x->sizeX = 2; if ((argc>0) && (argv[0].a_type == A_FLOAT)) x->sizeX = atom_getfloatarg(0, argc, argv); if (x->sizeX > sizemaxX) x->sizeX = sizemaxX; if (x->sizeX < 1) x->sizeX = 1; x->sizeY = 2; if ((argc>1) && (argv[1].a_type == A_FLOAT)) x->sizeY = atom_getfloatarg(1, argc, argv); if (x->sizeY > sizemaxX) x->sizeY = sizemaxX; if (x->sizeY < 1) x->sizeY = 1; for (i=0; i < sizemaxX; i++) for (j=0; j < sizemaxY; j++) x->matrix[i][j] = 0; x->main_outlet = outlet_new(&x->x_obj, 0); return (void *)x; } void mtx_preset_resize(t_mtx_preset *x, t_float sizeX, t_float sizeY) { x->sizeX = sizeX; x->sizeY = sizeY; if (x->sizeX > sizemaxX) x->sizeX = sizemaxX; if (x->sizeX < 1) x->sizeX = 1; if (x->sizeY > sizemaxX) x->sizeY = sizemaxX; if (x->sizeY < 1) x->sizeY = 1; } void mtx_preset_matrix(t_mtx_preset *x, t_symbol *s, int argc, t_atom *argv) { int X,Y, mtxX, mtxY, i, j,k; if ((argc > 3) && (argv[0].a_type == A_FLOAT) && (argv[1].a_type == A_FLOAT) && (argv[2].a_type == A_FLOAT)) { // reception de matrix X Y values // copy data, carfull if matrix and mtx_interpol have different size mtxX = atom_getfloatarg(0,argc,argv); mtxY = atom_getfloatarg(1,argc,argv); X = min(x->sizeX, mtxX); Y = min(x->sizeY, mtxY); for (i=0; i < X; i++) { for (j=0; j < Y; j++) { k= j*mtxX + i + 2; if ((argc > k) && (argv[k].a_type == A_FLOAT)) x->matrix[i][j] = atom_getfloatarg(k,argc,argv); } } } else if ((argc > 0) && (argv[0].a_type == A_FLOAT)) { // reception de matrix value for (i=0; i < x->sizeX; i++) { for (j=0; j < x->sizeY; j++) { x->matrix[i][j] = atom_getfloatarg(0,argc,argv); } } } else { error("bad matrix"); return; } } void mtx_preset_row(t_mtx_preset *x, t_symbol *s, int argc, t_atom *argv) { // reception de row Y values... int row, i; if ((argc > 0) && (argv[0].a_type == A_FLOAT)) row = atom_getfloatarg(0,argc,argv); else { error("bad row"); return; } row = min(x->sizeY-1, row); row = max(0, row); for (i=0; i < x->sizeX; i++) if ((argc > i+1) && (argv[i+1].a_type == A_FLOAT)) x->matrix[i][row] = atom_getfloatarg(i+1,argc,argv); } void mtx_preset_col(t_mtx_preset *x, t_symbol *s, int argc, t_atom *argv) { // reception de col X values... int col, i; if ((argc > 0) && (argv[0].a_type == A_FLOAT)) col = atom_getfloatarg(0,argc,argv); else { error("bad col"); return; } col = min(x->sizeX-1, col); col = max(0, col); for (i=0; i < x->sizeY; i++) if ((argc > i+1) && (argv[i+1].a_type == A_FLOAT)) x->matrix[col][i] = atom_getfloatarg(i+1,argc,argv); } void mtx_preset_setrow(t_mtx_preset *x, t_float rowtoset, t_float value) { // reception de row Y value int row, i; row = min(x->sizeY-1, rowtoset); row = max(0, row); for (i=0; i < x->sizeX; i++) x->matrix[i][row] = value; } void mtx_preset_setcol(t_mtx_preset *x, t_float coltoset, t_float value) { // reception de col X value int col, i; col = min(x->sizeX-1, coltoset); col = max(0, col); for (i=0; i < x->sizeY; i++) x->matrix[col][i] = value; } void mtx_preset_element(t_mtx_preset *x, t_float posX, t_float posY, t_float value) { // reception de element X Y value if ((posX < x->sizeX) && (posY < x->sizeY) && (posX >= 0) && (posY >= 0)) { x->matrix[(int)posX][(int)posY] = value; } } void mtx_preset_getMatrix(t_mtx_preset *x) { int i, j; // dump matrix tailleX tailleY datas... t_atom std_out[x->sizeX*x->sizeY+2]; SETFLOAT(&(std_out[0]),x->sizeX); SETFLOAT(&(std_out[1]),x->sizeY); for (i=0; i < x->sizeX; i++) for (j=0; j < x->sizeY; j++) SETFLOAT(&(std_out[i+x->sizeX*j+2]),x->matrix[i][j]); outlet_anything(x->main_outlet, gensym("matrix"),x->sizeX*x->sizeY+2,std_out); } void mtx_preset_getRows(t_mtx_preset *x) { int i,j; t_atom std_out[x->sizeX+1]; for (i=0; i< x->sizeY; i++) { SETFLOAT(&(std_out[0]),i); for (j=0; j < x->sizeX; j++) { SETFLOAT(&(std_out[j+1]),x->matrix[j][i]); } outlet_anything(x->main_outlet, gensym("rows"),x->sizeX+1,std_out); } } void mtx_preset_getRow(t_mtx_preset *x, t_float row) { int i,a,b; t_float c; t_atom std_out[x->sizeX+1]; a = floor(row); b = a+1; c = row-a; a = min(a, x->sizeY-1); a = max(a,0); b = min(b, x->sizeY-1); b = max(b,0); for (i=0; i < x->sizeX; i++) { SETFLOAT(&(std_out[i]),mix(x->matrix[i][a], x->matrix[i][b], c)); } outlet_anything(x->main_outlet, gensym("row"), x->sizeX, std_out); } void mtx_preset_getElementss(t_mtx_preset *x) { int i, j; t_atom std_out[3]; for (j=0; j < x->sizeY; j++) { SETFLOAT(&(std_out[1]),j); for (i=0; i < x->sizeX; i++) { SETFLOAT(&(std_out[0]),i); SETFLOAT(&(std_out[2]),x->matrix[i][j]); outlet_anything(x->main_outlet, gensym("elementss"), 3, std_out); } } } void mtx_preset_getElements(t_mtx_preset *x, t_float row) { int i, a, b; t_float c; t_atom std_out[2]; a = floor(row); b = a+1; c = row-a; a = min(a, x->sizeY-1); a = max(a,0); b = min(b, x->sizeY-1); b = max(b,0); for (i=0; i < x->sizeX; i++) { SETFLOAT(&(std_out[0]),i); SETFLOAT(&(std_out[1]),mix(x->matrix[i][a], x->matrix[i][b], c)); outlet_anything(x->main_outlet, gensym("elements"), 2, std_out); } } void mtx_preset_getElement(t_mtx_preset *x, t_float col, t_float row) { int a, b, d; t_float c; t_atom std_out[1]; a = floor(row); b = a+1; c = row-a; a = min(a, x->sizeY-1); a = max(a,0); b = min(b, x->sizeY-1); b = max(b,0); d = min(col, x->sizeX-1); d = max(d,0); SETFLOAT(&(std_out[0]),mix(x->matrix[d][a], x->matrix[d][b], c)); outlet_anything(x->main_outlet, gensym("element"), 1, std_out); } void mtx_preset_mixRows(t_mtx_preset *x, t_symbol *s, int argc, t_atom *argv) { int i, j; t_atom std_out[x->sizeX]; t_float row[x->sizeX]; for (i=0; i < x->sizeX; i++) row[i] = 0; for (j=0; jsizeY); j++) if ((argv[j].a_type == A_FLOAT) && (atom_getfloatarg(j, argc, argv) != 0)) for (i=0; i < x->sizeX; i++) row[i] += x->matrix[i][j] * atom_getfloatarg(j, argc, argv); for (i=0; i < x->sizeX; i++) SETFLOAT(&(std_out[i]),row[i]); outlet_anything(x->main_outlet, gensym("mixRows"), x->sizeX, std_out); } void mtx_preset_mixElements(t_mtx_preset *x, t_symbol *s, int argc, t_atom *argv) { int i, j; t_atom std_out[x->sizeX]; t_float row[2]; for (i=0; i < x->sizeX; i++) row[i] = 0; for (j=0; jsizeY); j++) if ((argv[j].a_type == A_FLOAT) && (atom_getfloatarg(j, argc, argv) != 0)) for (i=0; i < x->sizeX; i++) row[i] += x->matrix[i][j] * atom_getfloatarg(j, argc, argv); for (i=0; i < x->sizeX; i++){ SETFLOAT(&(std_out[0]),i); SETFLOAT(&(std_out[1]),row[i]); outlet_anything(x->main_outlet, gensym("mixElements"), 2, std_out); } } void mtx_preset_copyRow(t_mtx_preset *x, t_float row1, t_float row2) { int i, rowA, rowB; rowA = min(x->sizeY-1, row1); rowA = max(0, rowA); rowB = min(x->sizeY-1, row2); rowB = max(0, rowB); for (i=0; i < x->sizeX; i++) x->matrix[i][rowB] = x->matrix[i][rowA]; } void mtx_preset_setup(void) { mtx_preset_class = class_new(gensym("mtx_preset"), (t_newmethod)mtx_preset_new, 0, sizeof(t_mtx_preset), CLASS_DEFAULT, A_GIMME, 0); class_addmethod(mtx_preset_class, (t_method)mtx_preset_matrix, gensym("matrix"),A_GIMME, 0); // put Matrix // matrix value -> all matrix will be at the float value // matrix sizeX sizeY values ... -> put the matrix in 0 0 class_addmethod(mtx_preset_class, (t_method)mtx_preset_row, gensym("row"),A_GIMME, 0); // put Row // row float float ... -> put all value to a row class_addmethod(mtx_preset_class, (t_method)mtx_preset_col, gensym("col"),A_GIMME, 0); // put Col // coll float float ... -> put all value to a col class_addmethod(mtx_preset_class, (t_method)mtx_preset_setrow, gensym("setRow"),A_FLOAT, A_FLOAT, 0); // set Row // row float float -> put value to a row class_addmethod(mtx_preset_class, (t_method)mtx_preset_setcol, gensym("setCol"),A_FLOAT, A_FLOAT, 0); // set Col // coll float float -> put value to a col class_addmethod(mtx_preset_class, (t_method)mtx_preset_element, gensym("element"),A_FLOAT, A_FLOAT, A_FLOAT, 0); // put 1 element // element posX posY value class_addmethod(mtx_preset_class, (t_method)mtx_preset_getMatrix, gensym("getMatrix"), 0); // get matrix (matrix sizeX sizeY value) class_addmethod(mtx_preset_class, (t_method)mtx_preset_getRows, gensym("getRows"), 0); // get row // getRow -> dump all row (row now_number row values) class_addmethod(mtx_preset_class, (t_method)mtx_preset_getRow, gensym("getRow"), A_FLOAT, 0); // get row // getRow row_number -> dump 1 row (values) // row_number can be float : row will be interpolated class_addmethod(mtx_preset_class, (t_method)mtx_preset_getElementss,gensym("getElementss"), 0); // get elements class_addmethod(mtx_preset_class, (t_method)mtx_preset_getElements,gensym("getElements"), A_FLOAT, 0); // get elements // get posX -> dump elements from 1 row // row_number can be float : row will be interpolated class_addmethod(mtx_preset_class, (t_method)mtx_preset_getElement,gensym("getElement"), A_FLOAT, A_FLOAT, 0); // get element // get posX posY -> dump 1 element // row_number can be float : row will be interpolated class_addmethod(mtx_preset_class, (t_method)mtx_preset_mixRows, gensym("mixRows"), A_GIMME, 0); // interpol between all row // mixRow value0 value1 value2 : (value0*row0 + value1*row1 + value2*row2) class_addmethod(mtx_preset_class, (t_method)mtx_preset_mixElements,gensym("mixElements"), A_GIMME, 0); // interpol between all row // mixELments value0 value1 value2 : (value0*row0 + value1*row1 + value2*row2) class_addmethod(mtx_preset_class, (t_method)mtx_preset_copyRow, gensym("copyRow"), A_FLOAT, A_FLOAT, 0); // copy row 1 to row 2 class_addmethod(mtx_preset_class, (t_method)mtx_preset_resize, gensym("resize"),A_FLOAT, A_FLOAT, 0); // resize matrix } nusmuk/utils/rnd_flow.pd0000664000175000017500000000276112047230726016144 0ustar zmoelnigzmoelnig#N canvas 596 195 579 445 10; #X obj 77 151 random 10001; #X obj 77 170 - 5000; #X obj 77 189 / 5000; #X obj 77 339 +; #X msg 131 74 0; #X obj 77 54 route bang reset; #X obj 77 246 +; #X obj 332 218 + 1; #X obj 332 181 1; #X obj 332 161 /; #X msg 332 141 1 \$1; #X obj 77 265 / 2; #X obj 77 227 * 1; #X obj 77 34 inlet; #X obj 77 365 outlet; #X obj 220 34 inlet; #X obj 332 34 inlet; #X obj 471 34 inlet; #X obj 77 208 * \$1; #X obj 109 338 * 1; #X obj 342 53 loadbang; #X obj 332 72 \$2; #X obj 332 91 max 0.0001; #X text 225 92 amplitude; #X text 342 109 filter (lop); #X text 345 124 0 .. 100; #X obj 471 91 / 1000; #X msg 471 110 1 \$1; #X obj 471 129 -; #X obj 480 53 loadbang; #X obj 471 72 \$3; #X text 474 153 filter (hip); #X text 476 168 0 .. 100; #X obj 230 53 loadbang; #X obj 220 72 \$1; #X connect 0 0 1 0; #X connect 1 0 2 0; #X connect 2 0 18 0; #X connect 3 0 14 0; #X connect 3 0 19 0; #X connect 4 0 3 1; #X connect 4 0 6 1; #X connect 5 0 0 0; #X connect 5 1 4 0; #X connect 6 0 11 0; #X connect 7 0 11 1; #X connect 8 0 7 0; #X connect 8 0 12 1; #X connect 9 0 8 0; #X connect 10 0 9 0; #X connect 11 0 6 1; #X connect 11 0 3 0; #X connect 12 0 6 0; #X connect 13 0 5 0; #X connect 15 0 34 0; #X connect 16 0 21 0; #X connect 17 0 30 0; #X connect 18 0 12 0; #X connect 19 0 3 1; #X connect 20 0 21 0; #X connect 21 0 22 0; #X connect 22 0 10 0; #X connect 26 0 27 0; #X connect 27 0 28 0; #X connect 28 0 19 1; #X connect 29 0 30 0; #X connect 30 0 26 0; #X connect 33 0 34 0; #X connect 34 0 18 1; nusmuk/utils/tab_downsample_average-help.pd0000664000175000017500000000100212457214030021727 0ustar zmoelnigzmoelnig#N canvas 102 636 777 410 10; #X obj 97 73 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 -1; #X obj 411 55 table src2 1000; #X msg 139 91 src src2; #X msg 152 140 dst dst2; #X msg 182 177 factor 2; #X obj 85 248 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 -1; #X obj 411 105 table dst2 300; #X obj 87 206 tab_downsample_average src dst 3; #X obj 410 33 table src 10; #X obj 411 85 table dst 3; #X connect 0 0 7 0; #X connect 2 0 7 0; #X connect 3 0 7 0; #X connect 4 0 7 0; #X connect 7 0 5 0; nusmuk/utils/tab_min.c0000664000175000017500000000763112570333456015570 0ustar zmoelnigzmoelnig#include "m_pd.h" #define MIN(a,b) (((a)<(b))?(a):(b)) #define MAX(a,b) (((a)>(b))?(a):(b)) static t_class *tab_min_class; typedef struct _tab_min { t_object x_obj; t_symbol *x_arrayname_src1; t_symbol *x_arrayname_src2; t_symbol *x_arrayname_dst; int offset_src1, offset_src2, offset_dst, nb_max; t_outlet *b_out; } t_tab_min; void *tab_min_new(t_symbol *s_src1, t_symbol *s_src2, t_symbol *s_dst) { t_tab_min *x = (t_tab_min *)pd_new(tab_min_class); x->x_arrayname_src1 = s_src1; x->x_arrayname_src2 = s_src2; x->x_arrayname_dst = s_dst; x->offset_src1 = 0; x->offset_src2 = 0; x->offset_dst = 0; x->b_out = outlet_new(&x->x_obj, &s_bang); return (void *)x; } void tab_min_compute(t_tab_min *x) { t_garray *a_src1, *a_src2, *a_dst; int npoints_src1, npoints_src2, npoints_dst; t_word *vec_src1, *vec_src2, *vec_dst; int nb_max, i; if (!(a_src1 = (t_garray *)pd_findbyclass(x->x_arrayname_src1, garray_class))) pd_error(x, "%s: no such array", x->x_arrayname_src1->s_name); else if (!garray_getfloatwords(a_src1, &npoints_src1, &vec_src1)) pd_error(x, "%s: bad template for tab_min", x->x_arrayname_src1->s_name); else if (!(a_src2 = (t_garray *)pd_findbyclass(x->x_arrayname_src2, garray_class))) pd_error(x, "%s: no such array", x->x_arrayname_src2->s_name); else if (!garray_getfloatwords(a_src2, &npoints_src2, &vec_src2)) pd_error(x, "%s: bad template for tab_min", x->x_arrayname_src2->s_name); else if (!(a_dst = (t_garray *)pd_findbyclass(x->x_arrayname_dst, garray_class))) pd_error(x, "%s: no such array", x->x_arrayname_dst->s_name); else if (!garray_getfloatwords(a_dst, &npoints_dst, &vec_dst)) pd_error(x, "%s: bad template for tab_min", x->x_arrayname_dst->s_name); else { nb_max = MIN(npoints_src1 - x->offset_src1, npoints_src2 - x->offset_src2); nb_max = MIN(npoints_dst, nb_max); if (x->nb_max >0) nb_max = MIN(nb_max, x->nb_max); // post("nb_max = %d",nb_max); for (i=0; ioffset_dst].w_float = MIN(vec_src1[i + x->offset_src1].w_float, vec_src2[i + x->offset_src2].w_float); } garray_redraw(a_dst); } outlet_bang(x->b_out); } void tab_min_bang(t_tab_min *x) { x->offset_src1 = 0; x->offset_src2 = 0; x->offset_dst = 0; x->nb_max = -1; tab_min_compute(x) ; } void tab_min_list(t_tab_min *x, t_symbol *s, int argc, t_atom *argv) { x->offset_src1 = 0; x->offset_src2 = 0; x->offset_dst = 0; x->nb_max = -1; if ((argc>=1) && (argv[0].a_type == A_FLOAT)) x->offset_src1 = atom_getfloatarg(0, argc, argv); if ((argc>=2) && (argv[1].a_type == A_FLOAT)) x->offset_src2 = atom_getfloatarg(1, argc, argv); if ((argc>=3) && (argv[2].a_type == A_FLOAT)) x->offset_dst = atom_getfloatarg(2, argc, argv); if ((argc>=4) && (argv[3].a_type == A_FLOAT)) x->nb_max = atom_getfloatarg(3, argc, argv); tab_min_compute(x) ; } void tab_min_src1(t_tab_min *x, t_symbol *s_src) { x->x_arrayname_src1 = s_src; }void tab_min_src2(t_tab_min *x, t_symbol *s_src) { x->x_arrayname_src2 = s_src; } void tab_min_dst(t_tab_min *x, t_symbol *s_dst) { x->x_arrayname_dst = s_dst; } void tab_min_setup(void) { tab_min_class = class_new(gensym("tab_min"), (t_newmethod)tab_min_new, 0, sizeof(t_tab_min), CLASS_DEFAULT, A_DEFSYM, A_DEFSYM, A_DEFSYM, 0); class_addbang(tab_min_class, tab_min_bang); class_addlist(tab_min_class, (t_method)tab_min_list); class_addmethod(tab_min_class, (t_method)tab_min_src1, gensym("src1"), A_DEFSYM, 0); class_addmethod(tab_min_class, (t_method)tab_min_src2, gensym("src2"), A_DEFSYM, 0); class_addmethod(tab_min_class, (t_method)tab_min_dst, gensym("dst"), A_DEFSYM, 0); } nusmuk/utils/tab_downsample_min-help.pd0000664000175000017500000000100212457211216021103 0ustar zmoelnigzmoelnig#N canvas 106 626 777 410 10; #X obj 97 73 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 -1; #X obj 411 85 table dst 300; #X obj 410 33 table src 1000; #X obj 411 55 table src2 1000; #X msg 139 91 src src2; #X msg 152 140 dst dst2; #X msg 182 177 factor 2; #X obj 85 248 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 -1; #X obj 411 105 table dst2 300; #X obj 87 206 tab_downsample_min src dst 3; #X connect 0 0 9 0; #X connect 4 0 9 0; #X connect 5 0 9 0; #X connect 6 0 9 0; #X connect 9 0 7 0; nusmuk/utils/tab_max-help.pd0000664000175000017500000000731212457426102016670 0ustar zmoelnigzmoelnig#N canvas 112 102 859 564 10; #N canvas 0 50 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 50 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 50 450 300 (subpatch) 0; #X array src2 100 float 1; #A 0 -0.471423 -0.714277 -0.685706 -0.657135 -0.614278 -0.557136 -0.471423 -0.428566 -0.342853 -0.299996 -0.242854 -0.185712 -0.128569 -0.071427 -0.0499987 -0.0285704 0.0428575 0.0714286 0.357136 0.399993 0.44285 0.457135 0.485706 0.514278 0.542849 0.557134 0.557134 0.542849 0.471421 0.428564 0.385707 0.31428 0.285709 0.257137 0.18571 0.149996 0.114282 0.0571395 -2.74181e-06 -0.0428594 -0.142858 -0.228572 -0.271428 -0.328571 -0.357142 -0.385713 -0.342856 -0.3 -0.242857 -0.214286 -0.185715 -0.128573 -0.0714306 -2.74181e-06 0.042854 0.0999962 0.142853 0.257137 0.31428 0.371422 0.414279 0.514278 0.557134 0.628562 0.657133 0.685704 0.657133 0.599991 0.542849 0.457135 0.371422 0.214281 0.157138 0.0857106 -0.057145 -0.17143 -0.228572 -0.328571 -0.385713 -0.442855 -0.471426 -0.499997 -0.514283 -0.542854 -0.55714 -0.571425 -0.585711 -0.585711 -0.571425 -0.564283 -0.55714 -0.528569 -0.50714 -0.485712 -0.471426 -0.457141 -0.414284 -0.399999 -0.385713 -0.0428594; #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 108 465 IEM KUG; #X text 88 453 musil; #X text 122 453 @; #X text 130 453 iem.at; #X text 91 475 Graz \, Austria; #X text 234 312 initial arguments:; #X text 72 319 output; #X text 306 275 xxx : change destination name; #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 43 442 (c) Thomas Musil 2000 - 2009; #X text 12 3 tab_max; #X text 90 29 max the 2 src-arrays to dst-array; #X obj 61 78 tab_max src1 src2 dst; #X text 54 420 ch \, help file based on :; #X obj 59 301 tab_max src1 src2 dst; #X connect 2 0 33 0; #X connect 5 0 35 0; #X connect 7 0 35 0; #X connect 8 0 35 0; #X connect 9 0 35 0; #X connect 33 0 3 0; #X connect 35 0 4 0; nusmuk/utils/examples/0000775000175000017500000000000012047230726015615 5ustar zmoelnigzmoelnignusmuk/utils/examples/bushmeat.pbank0000664000175000017500000000053212047230726020442 0ustar zmoelnigzmoelnigpbank 4 12, 166 1.10236 236 94, 874 0.629921 7086 85, 2286 0.629921 4251 85, 285.433 1.43937 2792.13 71, 585.61 1.48661 2886.93 75, 165.362 3.46457 7414.57 75, 5935.83 0.209449 9764.96 75, 403 0.472441 9921 75, 403 0.472441 6692 75, 403 0.472441 1811 75, CarrierFQ ModulatorFQ FMindex Gain, PARAM1 PARAM2 PARAM3 PARAM4, nusmuk/utils/lb-help.pd0000664000175000017500000000110212047230726015641 0ustar zmoelnigzmoelnig#N canvas 198 102 450 300 10; #X obj 83 92 lb; #X obj 113 92 loadbang; #X obj 83 112 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 -1; #X obj 113 113 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 -1; #X obj 58 92 lb; #X obj 58 112 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 -1; #X obj 205 91 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 -1; #X obj 205 112 s lb; #X text 102 29 This is mostly a shortcut for loadbang; #X text 103 45 you can send bangs to lb; #X connect 0 0 2 0; #X connect 1 0 3 0; #X connect 4 0 5 0; #X connect 6 0 7 0; nusmuk/utils/_mtx_preset.pd0000664000175000017500000000231012451004346016645 0ustar zmoelnigzmoelnig#N canvas 1048 381 730 584 10; #X obj 232 527 outlet; #X obj 139 40 inlet; #X obj 139 67 route read write; #X obj 232 400 spigot 1; #X msg 248 116 0; #X msg 185 117 1; #X obj 302 526 textfile; #X msg 334 466 clear; #X obj 302 399 spigot 0; #X obj 139 222 textfile; #X msg 139 154 read \$1; #X obj 139 176 t b a; #X obj 139 199 until; #X obj 277 318 f; #X obj 347 369 == 0; #X obj 185 95 t b a b b b; #X obj 302 442 list trim; #X obj 302 420 list prepend add; #X msg 381 467 write \$1; #X obj 381 444 symbol; #X obj 139 95 symbol; #X msg 216 230 getRow; #X obj 232 273 mtx_preset \$1 \$2; #X connect 1 0 2 0; #X connect 2 0 20 0; #X connect 2 1 15 0; #X connect 2 2 22 0; #X connect 3 0 0 0; #X connect 4 0 13 0; #X connect 5 0 13 0; #X connect 7 0 6 0; #X connect 8 0 17 0; #X connect 9 0 22 0; #X connect 9 1 12 1; #X connect 10 0 11 0; #X connect 11 0 12 0; #X connect 12 0 9 0; #X connect 13 0 3 1; #X connect 13 0 14 0; #X connect 14 0 8 1; #X connect 15 0 5 0; #X connect 15 1 19 0; #X connect 15 2 21 0; #X connect 15 3 7 0; #X connect 15 4 4 0; #X connect 16 0 6 0; #X connect 17 0 16 0; #X connect 18 0 6 0; #X connect 19 0 18 0; #X connect 20 0 10 0; #X connect 21 0 22 0; #X connect 22 0 3 0; #X connect 22 0 8 0; nusmuk/utils/randn.pd0000664000175000017500000000211612621334116015422 0ustar zmoelnigzmoelnig#N canvas 146 129 994 651 10; #X text 273 329 u1; #X obj 310 376 log; #X obj 310 401 * -2; #X obj 310 430 sqrt; #X obj 419 435 cos; #X obj 419 405 * 6.283; #X obj 310 463 *; #X text 521 339 u2; #X text 370 512 sigma; #X text 373 557 mean; #X obj 375 258 t b b; #X obj 310 214 route seed; #X obj 419 259 * 65636; #X obj 310 156 inlet; #X msg 419 311 seed \$1; #X msg 310 298 seed \$1; #X obj 310 592 outlet; #X obj 310 514 * \$1; #X obj 310 552 + \$2; #X obj 384 482 inlet; #X obj 471 483 inlet; #X obj 310 328 random 6.5e+06; #X obj 310 355 / 6.5e+06; #X obj 419 337 random 6.5e+06; #X obj 419 364 / 6.5e+06; #X connect 1 0 2 0; #X connect 2 0 3 0; #X connect 3 0 6 0; #X connect 4 0 6 1; #X connect 5 0 4 0; #X connect 6 0 17 0; #X connect 10 0 21 0; #X connect 10 1 23 0; #X connect 11 0 12 0; #X connect 11 0 15 0; #X connect 11 1 10 0; #X connect 12 0 14 0; #X connect 13 0 11 0; #X connect 14 0 23 0; #X connect 15 0 21 0; #X connect 17 0 18 0; #X connect 18 0 16 0; #X connect 19 0 17 1; #X connect 20 0 18 1; #X connect 21 0 22 0; #X connect 22 0 1 0; #X connect 23 0 24 0; #X connect 24 0 5 0; nusmuk/utils/between-help.pd0000664000175000017500000000065212047230726016706 0ustar zmoelnigzmoelnig#N canvas 0 0 450 300 10; #X obj 29 91 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X floatatom 29 183 5 0 0 0 - - -; #X floatatom 68 131 5 0 0 0 - - -; #X floatatom 108 131 5 0 0 0 - - -; #X obj 29 156 between 2 15; #X text 164 129 input range; #X text 62 20 output a float that is between a min and a max; #X text 52 90 <-- bang; #X connect 0 0 4 0; #X connect 2 0 4 1; #X connect 3 0 4 2; #X connect 4 0 1 0; nusmuk/utils/rand_diff.pd0000664000175000017500000000131512047230726016240 0ustar zmoelnigzmoelnig#N canvas 90 260 450 300 10; #X obj 51 169 random; #X obj 81 207 %; #X obj 51 207 +; #X obj 51 188 + 1; #X obj 174 100 sqrt; #X obj 174 138 i; #X obj 174 119 * 1.5; #X obj 174 11 inlet; #X obj 51 30 route bang seed; #X obj 51 11 inlet; #X obj 51 49 t b b; #X msg 102 81 seed \$1; #X obj 81 227 outlet; #X obj 174 81 \$1; #X obj 187 55 loadbang; #X connect 0 0 3 0; #X connect 1 0 2 1; #X connect 1 0 12 0; #X connect 2 0 1 0; #X connect 3 0 2 0; #X connect 4 0 6 0; #X connect 5 0 0 1; #X connect 6 0 5 0; #X connect 7 0 13 0; #X connect 8 0 10 0; #X connect 8 1 11 0; #X connect 9 0 8 0; #X connect 10 0 0 0; #X connect 10 1 13 0; #X connect 11 0 0 0; #X connect 13 0 1 1; #X connect 13 0 4 0; #X connect 14 0 13 0; nusmuk/utils/lfo-help.pd0000664000175000017500000000117712047230726016040 0ustar zmoelnigzmoelnig#N canvas 77 355 426 472 10; #X floatatom 54 63 5 0 0 0 - - -; #X obj 54 237 vsl 15 128 0 127 0 0 empty empty empty 0 -8 0 8 -262144 -1 -1 3302 1; #X obj 54 188 * 127; #X text 93 85 creation arguments:; #X text 125 125 2 time grain in milliseconds; #X text 123 105 1 period time (ms); #X text 152 25 Low Frequency Modulator; #X text 105 63 <- time (ms); #X obj 54 165 lfo 2000 20 ______; #X obj 177 238 vsl 15 128 0 127 0 0 empty empty empty 0 -8 0 8 -262144 -1 -1 12700 1; #X obj 177 209 * 64; #X obj 177 188 + 1; #X connect 0 0 8 0; #X connect 2 0 1 0; #X connect 8 0 2 0; #X connect 8 1 11 0; #X connect 10 0 9 0; #X connect 11 0 10 0; nusmuk/utils/rand_diff-help.pd0000664000175000017500000000107612621334120017161 0ustar zmoelnigzmoelnig#N canvas 93 73 450 300 10; #X msg 53 132 bang; #X floatatom 53 232 0 0 0 0 - - -; #X msg 63 156 seed 123; #X text 105 130 bang for output; #X text 145 156 message to set the seed; #X floatatom 134 183 0 0 0 0 - - -; #X text 164 183 inlet to reset the range; #X text 144 206 argument to initialize the range; #X text 125 77 \$1 : range; #X obj 53 206 rand_diff 10; #X text 45 31 rand-diff - random number with very few redondancy from precedent output; #X text 45 60 output are mostly growing; #X connect 0 0 9 0; #X connect 2 0 9 0; #X connect 5 0 9 1; #X connect 9 0 1 0; nusmuk/utils/tab_downsample-help.pd0000664000175000017500000000104112457214262020247 0ustar zmoelnigzmoelnig#N canvas 102 636 777 410 10; #X obj 97 73 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 -1; #X obj 411 55 table src2 1000; #X msg 139 91 src src2; #X msg 152 140 dst dst2; #X msg 182 177 factor 2; #X obj 85 248 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 -1; #X obj 411 105 table dst2 300; #X obj 410 33 table src 10; #X obj 411 85 table dst 3; #X obj 87 205 tab_downsample src dst 3; #X msg 236 125 3; #X connect 0 0 9 0; #X connect 2 0 9 0; #X connect 3 0 9 0; #X connect 4 0 9 0; #X connect 9 0 5 0; #X connect 10 0 9 0; nusmuk/utils/p-help.pd0000664000175000017500000000032712047230726015513 0ustar zmoelnigzmoelnig#N canvas 0 0 450 300 10; #X obj 103 97 p; #X floatatom 103 76 5 0 0 0 - - -; #X floatatom 145 77 5 0 0 0 - - -; #X obj 145 98 p foo; #X text 100 20 p is a shortcut to print; #X connect 1 0 0 0; #X connect 2 0 3 0; nusmuk/utils/README.txt0000664000175000017500000000045212047230726015476 0ustar zmoelnigzmoelnigThis are a collection of usefull abstraction and that can be usefull. This lib is made by Cyrille Henry (exept pbank for zack settel), you can contact him on his webpage : http://www.chnry.net/ch/?001-Cyrille-Henry This lib is realese under the GNU Public License. To build it, just type make. nusmuk/utils/tab_upsample_copy-help.pd0000664000175000017500000000105112457247160020762 0ustar zmoelnigzmoelnig#N canvas 96 645 777 410 10; #X obj 97 73 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 -1; #X obj 411 55 table src2 1000; #X msg 139 91 src src2; #X msg 152 140 dst dst2; #X obj 85 248 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 -1; #X obj 411 105 table dst2 300; #X obj 410 33 table src 10; #X obj 411 85 table dst 50; #X msg 182 177 factor 5; #X msg 237 125 1; #X obj 87 205 tab_upsample_copy src dst 3; #X connect 0 0 10 0; #X connect 2 0 10 0; #X connect 3 0 10 0; #X connect 8 0 10 0; #X connect 9 0 10 0; #X connect 10 0 4 0; nusmuk/utils/many_bang.pd0000664000175000017500000000416212047230726016262 0ustar zmoelnigzmoelnig#N canvas 444 320 434 452 10; #X obj 149 208 moses \$1; #X obj 149 136 f; #X obj 149 163 + 1; #X obj 162 290 delay \$3; #X obj 149 383 outlet; #X obj 200 383 outlet; #X obj 84 20 inlet; #X obj 149 75 t b b; #X msg 149 97 0; #X obj 200 323 t b b; #X obj 149 233 t b f b; #X obj 200 155 i; #X obj 200 127 + 0.5; #X obj 84 45 route stop; #X msg 84 74 stop; #N canvas 0 0 450 300 between 0; #X obj 61 29 inlet; #X obj 211 31 inlet; #X obj 350 33 inlet; #X obj 195 172 \$1; #X obj 225 352 / 100000; #X obj 225 281 i; #X obj 195 380 +; #X obj 195 206 t f f; #X obj 195 410 outlet; #X obj 225 230 - \$2; #X obj 225 304 t b f; #X obj 225 328 random 0; #X obj 225 256 * -100000; #X obj 61 67 t b; #X connect 0 0 13 0; #X connect 1 0 3 1; #X connect 2 0 9 1; #X connect 3 0 7 0; #X connect 4 0 6 1; #X connect 5 0 10 0; #X connect 6 0 8 0; #X connect 7 0 6 0; #X connect 7 1 9 0; #X connect 9 0 12 0; #X connect 10 0 11 0; #X connect 10 1 11 1; #X connect 11 0 4 0; #X connect 12 0 5 0; #X connect 13 0 3 0; #X restore 199 104 pd between; #N canvas 0 0 478 635 between 0; #X obj 61 29 inlet; #X obj 211 31 inlet; #X obj 350 33 inlet; #X obj 225 352 / 100000; #X obj 225 281 i; #X obj 195 380 +; #X obj 195 206 t f f; #X obj 195 410 outlet; #X obj 225 304 t b f; #X obj 225 328 random 0; #X obj 225 256 * -100000; #X obj 61 67 t b; #X obj 225 230 - \$4; #X obj 195 172 \$3; #X connect 0 0 11 0; #X connect 1 0 13 1; #X connect 2 0 12 1; #X connect 3 0 5 1; #X connect 4 0 8 0; #X connect 5 0 7 0; #X connect 6 0 5 0; #X connect 6 1 12 0; #X connect 8 0 9 0; #X connect 8 1 9 1; #X connect 9 0 3 0; #X connect 10 0 4 0; #X connect 11 0 13 0; #X connect 12 0 10 0; #X connect 13 0 6 0; #X restore 213 262 pd between; #X connect 0 0 10 0; #X connect 0 1 9 0; #X connect 1 0 2 0; #X connect 2 0 0 0; #X connect 3 0 1 0; #X connect 6 0 13 0; #X connect 7 0 8 0; #X connect 7 1 15 0; #X connect 8 0 1 0; #X connect 9 0 5 0; #X connect 9 1 4 0; #X connect 10 0 3 0; #X connect 10 0 4 0; #X connect 10 1 1 1; #X connect 10 2 16 0; #X connect 11 0 0 1; #X connect 12 0 11 0; #X connect 13 0 14 0; #X connect 13 1 7 0; #X connect 14 0 3 0; #X connect 15 0 12 0; #X connect 16 0 3 1; nusmuk/utils/pbank-help.pd0000664000175000017500000003675312621334116016357 0ustar zmoelnigzmoelnig#N canvas 212 22 1013 667 10; #X msg 487 31 set 1 2 100 3.1415 shupsh; #X msg 500 59 0 1 1.234; #X text 573 59 write 1.234 to column 0 of row 1; #X text 672 31 set list of elements starting at column 1 in row 2; #X msg 513 87 0 1; #X text 542 87 read value at column 0 of row 1; #X msg 538 138 2 0 coptox; #X text 556 110 read value at column 2 of row 0; #X msg 526 110 2 0; #X msg 608 245 put 0 100 3.14159 shupsh; #X text 793 251 put list of elements starting at column 0 in edit buffer ; #X text 41 -12 A 2-dimensional parameter bank for floats or symbols ; #X text -19 42 args:; #X text -4 56 argument1 gives the number of columns (X axis): \; argument2 gives the number of rows (Y axis): \; argument3 is the name of the pbank: ; #X text 66 95 The arg3 (pbank 'name') is used by pbank in two ways: when a patch using a pbank is loaded \, a pbank data file corresponding to arg3 will be searched for and loaded if found. The 'name' also allows other pbanks with the same name to share data -in the way that tables do. If these two features are not wanted \, Arg3 (the 'name') can be set to the empty string: "" (two quotes) - see example below-; #X text 616 138 write symbol "coptox" to column 2 of row 0; #X text 777 564 The left-hand outlet outputs lists of the form: columnNo item ; #X text 777 589 note: Do not forget that this outlet is only used by pbank if argument 4 undefined (omitted) -see arguments; #X text 40 0 note: The structure of pbank includes an additional row that serves as an edit buffer. - see Messages; #X msg 654 336 store 3; #X msg 625 273 recall 3; #X text -5 187 argument4; #X text 65 187 is the symbol that pbank uses when directing its output to receives based on this symbol: ; #X obj -7 315 pbank 4 12; #X text -8 330 Creates a parameter bank of 4 columns by 12 rows; #X text -10 378 Creates a parameter bank of 4 columns by 12 rows \, reading in the contents of the file name "bushmeat.pbank" \, and sharing data with any other pbanks with the same name; #X floatatom 776 777 5 0 0 0 - - -; #X floatatom 816 777 5 0 0 0 - - -; #X obj 883 742 print pbankOut; #X obj 776 742 route 0 1 2 3; #X floatatom 856 777 5 0 0 0 - - -; #X floatatom 896 777 5 0 0 0 - - -; #X obj 614 636 send toPbanks; #X obj 776 682 receive toPbanks; #X text 486 3 MESSAGES: read/write; #X text 587 221 MESSAGES: edit buffer; #X text 696 485 MESSAGES: file IO; #X obj 383 677 route 0 1 2 3; #X msg 383 707 set \$1; #X msg 384 768 untitled_10; #X msg 484 707 set \$1; #X msg 484 768 0; #X msg 577 707 set \$1; #X msg 577 768 0; #X msg 670 707 set \$1; #X msg 670 768 0; #X msg 419 623 recall 11; #X msg 420 602 recall 10; #X obj 510 388 vradio 18 1 0 10 empty empty empty 0 -6 0 8 -262144 -1 -1 7; #X msg 510 574 recall \$1; #X obj -9 437 receive toPbanks; #X floatatom 397 752 5 0 0 0 - - -; #X floatatom 490 752 5 0 0 0 - - -; #X floatatom 583 752 5 0 0 0 - - -; #X floatatom 676 752 5 0 0 0 - - -; #X obj -9 573 pbank 4 12 "" wireless; #X obj 420 576 loadbang; #X obj 397 730 r wireless-0; #X obj 490 730 r wireless-1; #X obj 583 730 r wireless-2; #X obj 676 730 r wireless-3; #X text -11 592 Creates an unnamed parameter bank of 4 columns by 12 rows \, whose output will be sent to 4 corresponding receives whose names are based on the symbol "wireless-n" \, where n is the corresponding column number. Note that the argument3 has been set to the empty string: "".; #N canvas 291 52 1062 794 An_EXAMPLE 0; #X obj 109 8 r synth-0; #X msg 87 32 set \$1; #X msg 109 79 set \$1; #X obj 109 174 vsl 15 128 50 15000 0 0 empty empty empty 0 -8 0 8 -262144 -1 -1 0 1; #X floatatom 87 336 7 0 0 1 hz - -; #X msg 87 357 put 0 \$1; #X obj 259 426 s toSynthPbank; #X obj 117 104 r name-0; #X msg 117 126 set \$1; #X msg 117 147 untitled_10; #N canvas 571 157 505 529 SYNTH 0; #X obj 80 43 inlet; #X obj 192 43 inlet; #X obj 300 43 inlet; #X obj 399 43 inlet; #X text 89 23 fq; #X text 178 24 modFQscaler; #X text 299 23 index; #X text 401 23 gain; #X floatatom 80 69 5 0 0 0 - - -; #X obj 123 110 float; #X obj 80 156 sig~; #X obj 192 71 t b f; #X obj 123 156 * 1; #X obj 123 178 sig~; #X obj 123 207 osc~; #X floatatom 222 110 5 0 0 0 - - -; #X obj 123 238 *~; #X obj 300 154 sig~; #X floatatom 300 110 5 0 0 0 - - -; #X obj 80 285 +~; #X obj 80 330 osc~; #X obj 399 72 vsl 15 128 0 127 0 0 empty empty empty 0 -8 0 8 -262144 -1 -1 0 1; #X obj 79 441 dac~; #X text 19 474 xjimmies lib. z. settel/jm dumas 2003-2007; #X obj 80 410 gain2~; #X obj 98 388 r \$0-gain; #X obj 80 364 gain1~; #X connect 0 0 8 0; #X connect 1 0 11 0; #X connect 2 0 18 0; #X connect 3 0 21 0; #X connect 8 0 10 0; #X connect 8 0 9 0; #X connect 9 0 12 0; #X connect 10 0 19 0; #X connect 11 0 9 0; #X connect 11 1 15 0; #X connect 12 0 13 0; #X connect 13 0 14 0; #X connect 14 0 16 0; #X connect 15 0 12 1; #X connect 16 0 19 1; #X connect 17 0 16 1; #X connect 18 0 17 0; #X connect 19 0 20 0; #X connect 20 0 26 0; #X connect 21 0 26 1; #X connect 24 0 22 0; #X connect 24 0 22 1; #X connect 25 0 24 1; #X connect 26 0 24 0; #X restore 623 425 pd SYNTH; #X msg 259 33 set \$1; #X msg 281 80 set \$1; #X obj 281 175 vsl 15 128 0 20 0 0 empty empty empty 0 -8 0 8 -262144 -1 -1 0 1; #X floatatom 259 337 7 0 0 1 hz - -; #X msg 289 127 set \$1; #X msg 289 148 0; #X msg 437 31 set \$1; #X msg 459 78 set \$1; #X obj 459 173 vsl 15 128 50 10000 0 0 empty empty empty 0 -8 0 8 -262144 -1 -1 0 1; #X floatatom 437 335 7 0 0 1 hz - -; #X msg 467 125 set \$1; #X msg 467 146 0; #X msg 608 34 set \$1; #X obj 630 176 vsl 15 128 0 127 0 0 empty empty empty 0 -8 0 8 -262144 -1 -1 0 1; #X floatatom 608 338 7 0 0 1 hz - -; #X msg 634 126 set \$1; #X msg 634 147 0; #X obj 281 9 r synth-1; #X obj 459 7 r synth-2; #X obj 608 7 r synth-3; #X obj 634 104 r name-3; #X obj 467 103 r name-2; #X obj 289 105 r name-1; #X msg 259 358 put 1 \$1; #X msg 437 356 put 2 \$1; #X msg 608 359 put 3 \$1; #X obj 721 530 r toSynthPbank; #X obj 447 554 s toSynthPbank; #X msg 447 526 recall \$1; #X msg 810 480 recall 11; #X msg 723 480 recall 10; #X obj 723 460 loadbang; #X obj 723 506 pbank 4 12 bushmeat.pbank name; #X obj 449 501 i; #X obj 366 486 bng 15 250 50 0 empty empty empty 0 -6 0 8 -18753 -1 -1; #X text 381 487 recall; #X obj 366 604 s toSynthPbank; #X obj 366 550 i; #X obj 366 466 bng 15 250 50 0 empty empty empty 0 -6 0 8 -258049 -1 -1; #X text 388 465 store; #X msg 366 576 store \$1; #X floatatom 476 479 5 0 0 0 - - -; #X text 517 479 select memory; #X floatatom 476 502 5 0 0 0 - - -; #X text 518 500 current memory; #X obj 748 333 r synth-0; #X obj 748 353 r synth-1; #X obj 748 374 r synth-2; #X obj 748 395 r synth-3; #X obj 763 124 vsl 15 128 -99 18 0 1 \$0-gain empty Output -15 -14 0 14 -260097 -1 -1 9300 1; #X floatatom 763 260 5 0 0 1 _db - -; #X obj 106 657 s toSynthPbank; #X obj 116 471 vradio 15 1 0 8 empty empty empty 0 -6 0 8 -262144 -1 -1 0; #X obj 475 433 hradio 15 1 0 8 empty empty empty 0 -6 0 8 -262144 -1 -1 0; #X floatatom 106 607 5 0 0 0 - - -; #X obj 723 629 pbank 4 12 bushmeat.pbank; #X msg 723 603 dump; #X msg 762 603 dump 2; #N canvas 675 151 189 317 interpol 0; #X obj 11 26 inlet; #X obj 72 98 min 127; #X obj 72 121 max 0; #X obj 11 98 min 127; #X obj 11 121 max 0; #N canvas 0 22 355 236 position 0; #X obj 49 121 pack f f; #X obj 49 17 inlet; #X obj 236 15 inlet; #X obj 49 152 outlet; #X obj 236 62 / 127; #X obj 49 93 / 127; #X obj 237 90 t b f; #X connect 0 0 3 0; #X connect 1 0 5 0; #X connect 2 0 4 0; #X connect 4 0 6 0; #X connect 5 0 0 0; #X connect 6 0 0 0; #X connect 6 1 0 1; #X restore 11 171 pd position; #N canvas 300 173 814 597 distance 0; #X obj 35 27 inlet; #X obj 37 538 outlet; #X obj 194 539 outlet; #X obj 37 144 unpack f f; #X obj 206 143 unpack f f; #X obj 341 142 unpack f f; #X obj 495 142 unpack f f; #X obj 634 140 unpack f f; #X obj 37 168 +; #X msg 37 192 1 \$1; #X obj 37 214 -; #X obj 206 171 - 1; #X obj 206 195 * -1; #X obj 205 224 +; #X msg 205 248 1 \$1; #X obj 205 270 -; #X obj 340 230 +; #X msg 340 254 1 \$1; #X obj 340 276 -; #X obj 492 223 +; #X msg 492 247 1 \$1; #X obj 492 269 -; #X obj 395 172 - 1; #X obj 395 196 * -1; #X obj 494 172 - 1; #X obj 494 196 * -1; #X obj 547 175 - 1; #X obj 547 199 * -1; #X obj 37 239 max 0; #X obj 206 292 max 0; #X obj 338 301 max 0; #X obj 493 298 max 0; #X obj 35 49 t a a a a a; #X obj 628 224 +; #X msg 628 248 1 \$1; #X obj 628 270 -; #X obj 629 299 max 0; #X obj 632 173 - 0.5; #X obj 683 176 - 0.5; #X obj 683 200 abs; #X obj 630 197 abs; #X obj 509 322 +; #X obj 379 349 +; #X obj 257 378 +; #X obj 62 413 +; #X obj 37 513 /; #X obj 37 264 t f f; #X obj 193 493 f; #X obj 193 517 /; #X obj 70 437 t b f; #X obj 325 487 f; #X obj 325 511 /; #X obj 480 481 f; #X obj 480 505 /; #X obj 616 480 f; #X obj 616 504 /; #X obj 480 531 outlet; #X obj 325 537 outlet; #X obj 616 532 outlet; #X connect 0 0 32 0; #X connect 3 0 8 0; #X connect 3 1 8 1; #X connect 4 0 11 0; #X connect 4 1 13 1; #X connect 5 0 16 0; #X connect 5 1 22 0; #X connect 6 0 24 0; #X connect 6 1 26 0; #X connect 7 0 37 0; #X connect 7 1 38 0; #X connect 8 0 9 0; #X connect 9 0 10 0; #X connect 10 0 28 0; #X connect 11 0 12 0; #X connect 12 0 13 0; #X connect 13 0 14 0; #X connect 14 0 15 0; #X connect 15 0 29 0; #X connect 16 0 17 0; #X connect 17 0 18 0; #X connect 18 0 30 0; #X connect 19 0 20 0; #X connect 20 0 21 0; #X connect 21 0 31 0; #X connect 22 0 23 0; #X connect 23 0 16 1; #X connect 24 0 25 0; #X connect 25 0 19 0; #X connect 26 0 27 0; #X connect 27 0 19 1; #X connect 28 0 46 0; #X connect 29 0 43 0; #X connect 29 0 47 1; #X connect 30 0 42 0; #X connect 30 0 50 1; #X connect 31 0 41 0; #X connect 31 0 52 1; #X connect 32 0 3 0; #X connect 32 1 4 0; #X connect 32 2 5 0; #X connect 32 3 6 0; #X connect 32 4 7 0; #X connect 33 0 34 0; #X connect 34 0 35 0; #X connect 35 0 36 0; #X connect 36 0 41 1; #X connect 36 0 54 1; #X connect 37 0 40 0; #X connect 38 0 39 0; #X connect 39 0 33 1; #X connect 40 0 33 0; #X connect 41 0 42 1; #X connect 42 0 43 1; #X connect 43 0 44 1; #X connect 44 0 45 1; #X connect 44 0 49 0; #X connect 45 0 1 0; #X connect 46 0 45 0; #X connect 46 1 44 0; #X connect 47 0 48 0; #X connect 48 0 2 0; #X connect 49 0 47 0; #X connect 49 0 50 0; #X connect 49 0 52 0; #X connect 49 0 54 0; #X connect 49 1 48 1; #X connect 49 1 51 1; #X connect 49 1 53 1; #X connect 49 1 55 1; #X connect 50 0 51 0; #X connect 51 0 57 0; #X connect 52 0 53 0; #X connect 53 0 56 0; #X connect 54 0 55 0; #X connect 55 0 58 0; #X restore 11 194 pd distance; #X obj 11 217 pack f f f f f; #X obj 11 266 outlet; #X msg 11 242 interp \$1 \$2 \$3 \$4 \$5; #X obj 11 50 unpack f f; #X obj 11 73 / 2; #X obj 72 72 / 2; #X obj 11 144 change; #X obj 72 144 change; #X connect 0 0 10 0; #X connect 1 0 2 0; #X connect 2 0 14 0; #X connect 3 0 4 0; #X connect 4 0 13 0; #X connect 5 0 6 0; #X connect 6 0 7 0; #X connect 6 1 7 1; #X connect 6 2 7 2; #X connect 6 3 7 3; #X connect 6 4 7 4; #X connect 7 0 9 0; #X connect 9 0 8 0; #X connect 10 0 11 0; #X connect 10 1 12 0; #X connect 11 0 3 0; #X connect 12 0 1 0; #X connect 13 0 5 0; #X connect 14 0 5 1; #X restore 200 616 pd interpol; #X obj 96 474 vsl 15 115 7 0 0 1 empty empty empty 0 -8 0 8 -262144 -1 -1 11400 1; #X obj 721 560 pbank 4 12 bushmeat.pbank synth; #X msg 106 627 recall \$1; #X text 47 455 interpolation beetween adjacent presets; #X text 171 563 complicated interpolation; #X obj 200 592 xy; #X text 229 590 <- click here; #X connect 0 0 1 0; #X connect 0 0 2 0; #X connect 1 0 4 0; #X connect 2 0 3 0; #X connect 3 0 4 0; #X connect 4 0 5 0; #X connect 4 0 10 0; #X connect 5 0 6 0; #X connect 7 0 8 0; #X connect 8 0 9 0; #X connect 11 0 14 0; #X connect 12 0 13 0; #X connect 13 0 14 0; #X connect 14 0 34 0; #X connect 14 0 10 1; #X connect 15 0 16 0; #X connect 17 0 20 0; #X connect 18 0 19 0; #X connect 19 0 20 0; #X connect 20 0 35 0; #X connect 20 0 10 2; #X connect 21 0 22 0; #X connect 23 0 25 0; #X connect 23 0 24 0; #X connect 24 0 25 0; #X connect 25 0 36 0; #X connect 25 0 10 3; #X connect 26 0 27 0; #X connect 28 0 11 0; #X connect 28 0 12 0; #X connect 29 0 17 0; #X connect 29 0 18 0; #X connect 30 0 23 0; #X connect 31 0 26 0; #X connect 32 0 21 0; #X connect 33 0 15 0; #X connect 34 0 6 0; #X connect 35 0 6 0; #X connect 36 0 6 0; #X connect 37 0 71 0; #X connect 39 0 38 0; #X connect 40 0 43 0; #X connect 41 0 43 0; #X connect 42 0 41 0; #X connect 44 0 39 0; #X connect 44 0 54 0; #X connect 45 0 44 0; #X connect 48 0 51 0; #X connect 48 0 54 0; #X connect 49 0 48 0; #X connect 51 0 47 0; #X connect 56 0 10 0; #X connect 57 0 10 1; #X connect 58 0 10 2; #X connect 59 0 10 3; #X connect 60 0 61 0; #X connect 63 0 65 0; #X connect 64 0 44 1; #X connect 64 0 52 0; #X connect 64 0 48 1; #X connect 65 0 72 0; #X connect 67 0 66 0; #X connect 68 0 66 0; #X connect 69 0 62 0; #X connect 70 0 65 0; #X connect 72 0 62 0; #X connect 75 0 69 0; #X restore 1076 740 pd An_EXAMPLE; #X text -18 -12 pbank :; #X text 776 545 OUTLETS; #X text -15 691 "pdjimmies" lib. z. settel 2004; #X text 65 216 Arg4 is optional. If it is not specified \, Pbank's output will be sent out of its outlet. If arg4 is specified \, pbank's outlet will be inactive and output will be directed to a number of receive objects whose names are based on arg4 (receive symbol). For each column \, there is a corresponding receive whose name shitfuck includes the column number -see example below.; #X text 723 363 output edit buffer (share beetween diferents object with same pbank file); #X msg 705 429 interp 0 0.2 0.6 0.2; #X text 620 157 output row 2 (same as recall \, but does not compy to the edit buffer); #X text 712 336 copy edit buffer to row 3; #X text 692 273 recall (output) row 3 and copy it into edit buffer ; #X text 746 401 read value from edit buffer (-1) at column 2; #X msg 696 399 2 -1; #X msg 640 299 recall 2.5; #X text 714 450 interpolation between presets : output = 0 * preset1 + 0.2 * preset2 + 0.6* preset3 + 0.2 * preset4; #X text 721 299 recalls interpolated values between adjacent rows: ; #X text 725 312 output = (row 2 + row 3) * 0.5; #X text -14 708 "interp" method contributed by Cyrille Henry; #X text 1079 722 LOOK IN HERE; #X obj 383 652 pbank 4 12 glen; #X text -10 481 Creates a named pbank whose output is sent to receives based on the symbol "wireless". Since there are 4 columns \, pbank will be sending its output to 4 receives each one corresponding to the column number included in its name. This provides an alterative (and faster) way of getting data from a pbank.; #X msg 680 363 dump; #X msg 555 166 dump 2; #X msg 572 191 dump 2; #X text 625 190 same as above but outputs row as list thru outlet; #X obj -8 361 pbank 4 12 examples/bushmeat.pbank; #X obj -9 461 pbank 4 12 examples/bushmeat.pbank wireless; #X msg 697 505 read examples/bushmeat.pbank; #X msg 697 529 write examples/bushmeat.pbank; #X obj 776 706 pbank 4 12 examples/bushmeat.pbank; #X connect 0 0 32 0; #X connect 1 0 32 0; #X connect 4 0 32 0; #X connect 6 0 32 0; #X connect 8 0 32 0; #X connect 9 0 32 0; #X connect 19 0 32 0; #X connect 20 0 32 0; #X connect 29 0 26 0; #X connect 29 1 27 0; #X connect 29 2 30 0; #X connect 29 3 31 0; #X connect 33 0 90 0; #X connect 37 0 38 0; #X connect 37 1 40 0; #X connect 37 2 42 0; #X connect 37 3 44 0; #X connect 38 0 39 0; #X connect 40 0 41 0; #X connect 42 0 43 0; #X connect 44 0 45 0; #X connect 46 0 80 0; #X connect 47 0 80 0; #X connect 48 0 49 0; #X connect 49 0 32 0; #X connect 50 0 87 0; #X connect 56 0 47 0; #X connect 57 0 51 0; #X connect 58 0 52 0; #X connect 59 0 53 0; #X connect 60 0 54 0; #X connect 68 0 32 0; #X connect 73 0 32 0; #X connect 74 0 32 0; #X connect 80 0 37 0; #X connect 82 0 32 0; #X connect 83 0 32 0; #X connect 84 0 32 0; #X connect 88 0 32 0; #X connect 89 0 32 0; #X connect 90 0 28 0; #X connect 90 0 29 0; nusmuk/utils/pbank.c0000664000175000017500000010561712621334116015244 0ustar zmoelnigzmoelnig/* pbank - zack settel 1994 */ // ported to PD - Zack Settel 2004 using the ISPW sources // note that the generated message receivers are of the format: "name-n" and not "n-name"(the way it was on the ISPW) /* features class-independent data structure see pbank.h */ // Source code for this object derived from the original sources in the IRCAM Jimmies release (1994), with the authorization of IRCAM. This object is part of the nSLAM release, developed by La SAT. nSLAM is also available on the IRCAM Forum site (http://forum.ircam.fr), as an incentive to PD users to join and contribute to Forum IRCAM" // multi row interpolation method provided by cyrille.henry@la-kitchen.fr /* 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 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. Based on PureData by Miller Puckette and others. */ // Zack Maintenance: march 06 // fixed recallf method: index bounded now. // fixed pbank_saveto: fixed bug when full path is specified. #include "m_pd.h" #include #include #include "pbank.h" #include "common.h" #define VERSION "pbank/pd v1.11 z.s. 2006" #define NIL 0L #define MAX_COLUMNS 2048 #define DEFAULT_COLUMNS 10 #define DEFAULT_ROWS 32 #define MAX_ROWS 256 - EDBUFF #define PBANK_ID_STRING "theFucKinGPbanKIdeNtifacATioNStrinGGGG" #define EDBUFF 1 /* edbuffer at rows + 1 */ #define DIRTFLAG 1 /* dirty flag kept at rows + 2 */ #define GETROW(X,R)(((X)->p_data[(R)])) #define GET_EDBUFF(X)(((X)->p_data[((X)->p_rows)])) #define CR 13 #define TAB 9 typedef struct pbank { t_object p_ob; t_atom **p_data; /* param matrix : data[PATCH_COUNT] X *data+PARAMCOUNT */ t_symbol **p_receives; /* used for back door messaging */ t_symbol *p_name; /* pbank data/file name */ t_atom **p_dirty; /* points to extra cell in matrix used for dirty flag */ t_symbol *p_vol; /* default volume */ int p_curpatch; int p_columns; int p_rows; t_canvas *x_canvas; } t_pbank; t_atom pbank_outlist[3]; /* used by list method for output */ void *pbank_new(t_symbol *s, int argc, t_atom *argv); void pbank_bang(t_pbank *x); void pbank_dispose(t_pbank *x); void pbank_list(t_pbank *x, t_symbol *s, int argc, t_atom *argv); void pbank_recall(t_pbank *x,t_float row); void pbank_recallf(t_pbank *x,t_float row); void pbank_dump(t_pbank *x, t_symbol *s, int argc, t_atom *argv); void pbank_store(t_pbank *x,t_float row); void pbank_set(t_pbank *x, t_symbol *s, int argc, t_atom *argv); void pbank_put(t_pbank *x, t_symbol *s, int argc, t_atom *argv); void pbank_interp(t_pbank *x, t_symbol *s, int argc, t_atom *argv); void pbank_write(t_pbank *x, t_symbol *name); void pbank_tobinbuf(t_pbank *x,void *b); void pbank_read(t_pbank *x, t_symbol *fname); void pbank_saveto(t_pbank *x,char *fn); void pbank_db(t_pbank *x,t_float c,t_float r); void pbank_setup(void); int pbank_fromtext(t_pbank *x,void *b); t_atom **pbank_getmem(t_symbol *name,int columns,int rows); t_symbol *z_list, *z_float, *z_symbol, *z_receive; // *z_int, #define EMPTYSTRING "" /* class variables */ t_shared *pbank_banks = NIL; /* linked list of shared data-matrixs */ t_symbol *pbank_ID; t_atom *pbank_clipboard; /* NOT IMPLEMENTED points to edbuff of "copied" pbank */ /* clipboard needed ???? */ /* ************************************************************ */ void pbank_db(t_pbank *x, t_float c_float, t_float r_float) { t_atom *a; long c = (long) c_float; long r = (long) r_float; *x->p_dirty = (c) ? (t_atom *)1:NIL; post("p_dirty at %lx",x->p_dirty); post("plus %ld addr = %lx",r,x->p_data+r); a = GETROW(x,r); } void pbank_bang(t_pbank *x) { t_shared *piss = NIL; post(":DIRTY FLAS = %ld at %lx",*x->p_dirty,x->p_dirty); return; piss = pbank_banks; /* maintain list of instance memories */ while(piss) { post("->%s at %lx",piss->s_sym->s_name,piss); post(" next->%lx",piss->s_next); piss = piss->s_next; } } /* write item to matrix at given column,row address */ /* message: column row thing1......thingN */ void pbank_set(t_pbank *x, t_symbol *s, int ac, t_atom *argv) { t_atom *shit; int column,row; if (ac < 3) { post("ac=%d",ac); error("pbank_set: takes at least 3 arguments: column row item(s)"); return; } if ((argv)->a_type != A_FLOAT || (argv+1)->a_type != A_FLOAT) { error("pbank_set: first arguments must of type float (columnNo. or rowNo.)"); return; } if ((column = (int)(argv)->a_w.w_float) < 0) column = 0; else if (column >= x->p_columns) column = x->p_columns-1; if ((row = (int)(argv+1)->a_w.w_float) < 0) row = 0; else if (row >= x->p_rows) row = x->p_rows-1; shit = GETROW(x,row); ac -=2; /* get data */ argv +=2; while (ac-- && (column < x->p_columns)) { if ((argv)->a_type != A_FLOAT && (argv)->a_type != A_SYMBOL && (argv)->a_type != A_FLOAT) { error("pbank_set: argument no %d must be afloat or symbol",ac+1); return; } *(shit+column++) = *argv++; } *x->p_dirty = (t_atom *)1; /* set dirty flag */ } /* same as set but writes to the edirt buffer: 'put' column thing1......thingN */ void pbank_put(t_pbank *x, t_symbol *s, int ac, t_atom *argv) { t_atom *shit; int column; if (ac < 2) { post("ac=%d",ac); error("pbank_put: takes at least 2 arguments: column item(s)"); return; } if ((argv)->a_type != A_FLOAT) { error("pbank_put: first argument must a number (columnNo.)"); return; } if ((column = (int)(argv)->a_w.w_float) < 0) column = 0; else if (column >= x->p_columns) column = x->p_columns-1; shit = GET_EDBUFF(x); ac --; /* get data */ argv ++; while (ac-- && (column < x->p_columns)) { if ((argv)->a_type != A_FLOAT && (argv)->a_type != A_SYMBOL && (argv)->a_type != A_FLOAT) { error("pbank_put: argument no %d must be a float or symbol",ac); return; } *(shit+column++) = *argv++; } } void pbank_recall(t_pbank *x, t_float row_float) /* dumps (outputs) and copies row to edbuffer */ { int z,ac; t_atom *av,*ebuff; long row = (long) row_float; float indexf = (float) row_float; if (row < 0) row = 0L; else if (row > x->p_rows-1) row = (long)x->p_rows-1; if (indexf < 0) indexf = 0L; else if (indexf > x->p_rows-1) indexf = (float)x->p_rows-1; if (indexf - row) { pbank_recallf(x, (t_float) indexf); return; } av = GETROW(x,row); ebuff = GET_EDBUFF(x); if (x->p_receives) /* back-door sending??? */ { t_symbol *type; ebuff += x->p_columns-1; av += x->p_columns-1; for (z=x->p_columns-1;z>-1;z--,ebuff--,av--) { *ebuff = *av; if (x->p_receives[z]->s_thing) { ac=1; if (ebuff->a_type == A_FLOAT) type = z_float; // else if (ebuff->a_type == A_LONG) type = z_int; else if (ebuff->a_type == A_SYMBOL) type = z_symbol; else { error("pbank_list: 3rd element must be a float or sym."); goto exit; } typedmess(x->p_receives[z]->s_thing, type,ac, ebuff); } } } else /* otherwise use outlet */ for (z=0;zp_columns;z++,av++,ebuff++) { *ebuff = *av; pbank_outlist->a_w.w_float = (float)z; (pbank_outlist+1)->a_type = ebuff->a_type; if (ebuff->a_type == A_SYMBOL) { (pbank_outlist+1)->a_w.w_symbol = z_symbol; (pbank_outlist+2)->a_type = A_SYMBOL; (pbank_outlist+2)->a_w = ebuff->a_w; outlet_list(x->p_ob.ob_outlet,0L,3, pbank_outlist); } else { (pbank_outlist+1)->a_w = ebuff->a_w; outlet_list(x->p_ob.ob_outlet,0L,2, pbank_outlist); } } exit: return; } void pbank_recallf(t_pbank *x, t_float row_float) /* interpol, dumps (outputs) and copies row to edbuffer */ { int u, v, z, ac; t_atom *av,*avplus1, *ebuff; // no need to range check, since that's done by caller method // float indexf = (float) row_float; float interpfac; u=(int)row_float; interpfac = (float) (row_float - u); av = GETROW(x,u); av += x->p_columns-1; avplus1 = GETROW(x,u+1); avplus1 += x->p_columns-1; ebuff = GET_EDBUFF(x); ebuff += x->p_columns-1; // for (v=x->p_columns-1;v>-1;v--,ebuff--) // { // SETFLOAT(ebuff, 0); //clear edit buffer //} ebuff = GET_EDBUFF(x); ebuff += x->p_columns-1; for (v=x->p_columns-1;v>-1;v--,ebuff--,av--,avplus1--) { if (ebuff->a_type == A_FLOAT && av->a_type == A_FLOAT && avplus1->a_type == A_FLOAT) SETFLOAT(ebuff, (t_float)(av->a_w.w_float * (1 - interpfac) + avplus1->a_w.w_float * interpfac)); else if (ebuff->a_type == A_SYMBOL) { if (interpfac <.5) SETSYMBOL(ebuff, av->a_w.w_symbol); else SETSYMBOL(ebuff, avplus1->a_w.w_symbol); } else error("pbank: bug found in recallf method"); } #ifdef why_is_this_here_sheefa if ((int)indexf!=indexf) { u++; av = GETROW(x,u); av += x->p_columns-1; ebuff = GET_EDBUFF(x); ebuff += x->p_columns-1; for (v=x->p_columns-1;v>-1;v--,ebuff--,av--) { if (ebuff->a_type == A_FLOAT && av->a_type == A_FLOAT) SETFLOAT(ebuff, ebuff->a_w.w_float + av->a_w.w_float * (indexf - u +1)); else if (ebuff->a_type == A_SYMBOL) SETSYMBOL(ebuff, av->a_w.w_symbol); else error("pbank: bug found in recallf method"); } } #endif if (x->p_receives) /* back-door sending??? */ { t_symbol *type; ebuff = GET_EDBUFF(x); ebuff += x->p_columns-1; for (z=x->p_columns-1;z>-1;z--,ebuff--,av--) { if (x->p_receives[z]->s_thing) { ac=1; if (ebuff->a_type == A_FLOAT) type = z_float; // else if (ebuff->a_type == A_LONG) type = z_int; else if (ebuff->a_type == A_SYMBOL) type = z_symbol; else { error("pbank_list: 3rd element must be a float or sym."); goto exit; } typedmess(x->p_receives[z]->s_thing, type,ac, ebuff); } } } else /* otherwise use outlet */ { ebuff = GET_EDBUFF(x); for (z=0;zp_columns;z++,ebuff++) { pbank_outlist->a_w.w_float = (float)z; (pbank_outlist+1)->a_type = ebuff->a_type; if (ebuff->a_type == A_SYMBOL) { (pbank_outlist+1)->a_w.w_symbol = z_symbol; (pbank_outlist+2)->a_type = A_SYMBOL; (pbank_outlist+2)->a_w = ebuff->a_w; outlet_list(x->p_ob.ob_outlet,0L,3, pbank_outlist); } else { (pbank_outlist+1)->a_w = ebuff->a_w; outlet_list(x->p_ob.ob_outlet,0L,2, pbank_outlist); } } } exit: return; } void pbank_interp(t_pbank *x, t_symbol *s, int argc, t_atom *argv) /* interpol, dumps (outputs) and copies row to edbuffer */ { int u, v, z, ac; t_atom *av,*ebuff; ebuff = GET_EDBUFF(x); ebuff += x->p_columns-1; for (v=x->p_columns-1;v>-1;v--,ebuff--) { SETFLOAT(ebuff, 0); //clear edit buffer } for (u=argc-1;u>-1;u--) { av = GETROW(x,u); av += x->p_columns-1; ebuff = GET_EDBUFF(x); ebuff += x->p_columns-1; for (v=x->p_columns-1;v>-1;v--,ebuff--,av--) { if (ebuff->a_type == A_FLOAT && av->a_type == A_FLOAT) SETFLOAT(ebuff, ebuff->a_w.w_float + av->a_w.w_float * atom_getfloatarg(u, argc, argv) ); //add value of each columns and row else SETSYMBOL(ebuff, gensym("null")); } } if (x->p_receives) /* back-door sending??? */ { t_symbol *type; ebuff = GET_EDBUFF(x); ebuff += x->p_columns-1; for (z=x->p_columns-1;z>-1;z--,ebuff--,av--) { if (x->p_receives[z]->s_thing) { ac=1; if (ebuff->a_type == A_FLOAT) type = z_float; // else if (ebuff->a_type == A_LONG) type = z_int; else if (ebuff->a_type == A_SYMBOL) type = z_symbol; else { error("pbank_list: 3rd element must be a float or sym."); goto exit; } typedmess(x->p_receives[z]->s_thing, type,ac, ebuff); } } } else /* otherwise use outlet */ { ebuff = GET_EDBUFF(x); for (z=0;zp_columns;z++,ebuff++) { pbank_outlist->a_w.w_float = (float)z; (pbank_outlist+1)->a_type = ebuff->a_type; if (ebuff->a_type == A_SYMBOL) { (pbank_outlist+1)->a_w.w_symbol = z_symbol; (pbank_outlist+2)->a_type = A_SYMBOL; (pbank_outlist+2)->a_w = ebuff->a_w; outlet_list(x->p_ob.ob_outlet,0L,3, pbank_outlist); } else { (pbank_outlist+1)->a_w = ebuff->a_w; outlet_list(x->p_ob.ob_outlet,0L,2, pbank_outlist); } } } exit: return; } // 'dump' dumps edit buff, 'dump n' dumps memory n, 'dump n l' dumps row n as one single list void pbank_dump(t_pbank *x, t_symbol *s, int argc, t_atom *argv) /* dumps (outputs) ediuffer or row */ { int z,ac, row; t_atom *ebuff; if (argc==0) { ebuff = GET_EDBUFF(x); if (x->p_receives) /* back-door sending??? */ { t_symbol *type; ebuff += x->p_columns-1; for (z=x->p_columns-1;z>-1;z--,ebuff--) { if (x->p_receives[z]->s_thing) { ac=1; if (ebuff->a_type == A_FLOAT) type = z_float; // else if (ebuff->a_type == A_LONG) type = z_int; else if (ebuff->a_type == A_SYMBOL) type = z_symbol; else { error("pbank_list: 3rd element must be a float or sym."); goto exit; } typedmess(x->p_receives[z]->s_thing, type,ac, ebuff); } } } else /* otherwise use outlet */ for (z=0;zp_columns;z++,ebuff++) { pbank_outlist->a_w.w_float = (float)z; (pbank_outlist+1)->a_type = ebuff->a_type; if (ebuff->a_type == A_SYMBOL) { (pbank_outlist+1)->a_w.w_symbol = z_symbol; (pbank_outlist+2)->a_type = A_SYMBOL; (pbank_outlist+2)->a_w = ebuff->a_w; outlet_list(x->p_ob.ob_outlet,0L,3, pbank_outlist); } else { (pbank_outlist+1)->a_w = ebuff->a_w; outlet_list(x->p_ob.ob_outlet,0L,2, pbank_outlist); } } } else { if ((row = (int)(argv)->a_w.w_float) < 0) row = 0; else if (row >= x->p_rows) row = x->p_rows-1; ebuff = GETROW(x, row); if (x->p_receives) /* back-door sending??? */ { t_symbol *type; ebuff += x->p_columns-1; for (z=x->p_columns-1;z>-1;z--,ebuff--) { if (x->p_receives[z]->s_thing) { ac=1; if (ebuff->a_type == A_FLOAT) type = z_float; // else if (ebuff->a_type == A_LONG) type = z_int; else if (ebuff->a_type == A_SYMBOL) type = z_symbol; else { error("pbank_list: 3rd element must be a float or sym."); goto exit; } typedmess(x->p_receives[z]->s_thing, type,ac, ebuff); } } } else /* otherwise use outlet */ { if(argc>1) // dump as single list outlet_list(x->p_ob.ob_outlet,0L,x->p_columns, ebuff); else { for (z=0;zp_columns;z++,ebuff++) { pbank_outlist->a_w.w_float = (float)z; (pbank_outlist+1)->a_type = ebuff->a_type; if (ebuff->a_type == A_SYMBOL) { (pbank_outlist+1)->a_w.w_symbol = z_symbol; (pbank_outlist+2)->a_type = A_SYMBOL; (pbank_outlist+2)->a_w = ebuff->a_w; outlet_list(x->p_ob.ob_outlet,0L,3, pbank_outlist); } else { (pbank_outlist+1)->a_w = ebuff->a_w; outlet_list(x->p_ob.ob_outlet,0L,2, pbank_outlist); } } } } } exit: return; } void pbank_store(t_pbank *x, t_float row_float) /* copies edbuffer to row */ { t_atom *av,*ebuff; int z; long row = (long) row_float; if (row < 0) row = 0L; else if (row >= x->p_rows) row = (long)x->p_rows-1; av = GETROW(x,row); ebuff = GET_EDBUFF(x); for (z=0;zp_columns;z++,av++,ebuff++) { *av = *ebuff; } *x->p_dirty = (t_atom *)1; /* set dirty flag */ } /* eg 'list COLUMN ROW VALUE' - argc=2 is read, arg=3 is write */ void pbank_list(t_pbank *x, t_symbol *s, int argc, t_atom *argv) { t_atom *av; int ac,column,row; if ((argc != 2) && (argc != 3)) { error("pbank_list: less than 2, or more than 3 elements in list"); goto exit; } if (((argv)->a_type != A_FLOAT) || ((argv+1)->a_type != A_FLOAT)) { error("pbank_list: first two elements must be numbers"); goto exit; } if ((column = (int)(argv)->a_w.w_float) < 0) column = 0; else if (column >= x->p_columns) column = x->p_columns-1; if ((row = (int)(argv+1)->a_w.w_float) < -1) row = -1; else if (row >= x->p_rows) row = x->p_rows-1; if (row == -1) { av = GET_EDBUFF(x); } else { av = GETROW(x,row); } av += column; ac = 1; if (argc == 2) /* read */ { if (x->p_receives) { if (x->p_receives[column]->s_thing) { t_symbol *type; if (av->a_type == A_FLOAT) type = z_float; // else if (av->a_type == A_LONG) type = z_int; else if (av->a_type == A_SYMBOL) type = z_symbol; else { error("pbank_list: 3rd element must be a float or sym."); goto exit; } typedmess(x->p_receives[column]->s_thing, type,ac, av); } } else { pbank_outlist->a_w.w_float = (t_float)column; (pbank_outlist+1)->a_type = av->a_type; if (av->a_type == A_SYMBOL) { (pbank_outlist+1)->a_w.w_symbol = z_symbol; (pbank_outlist+2)->a_type = A_SYMBOL; (pbank_outlist+2)->a_w = av->a_w; outlet_list(x->p_ob.ob_outlet,0L,3, pbank_outlist); } else { (pbank_outlist+1)->a_w = av->a_w; outlet_list(x->p_ob.ob_outlet,0L,2, pbank_outlist); } } } else /* write */ { switch ((argv+2)->a_type) { case A_FLOAT: SETFLOAT(av,(argv+2)->a_w.w_float); break; /* case A_LONG: SETLONG(av,(argv+2)->a_w.w_long); break; */ case A_SYMBOL: SETSYMBOL(av,(argv+2)->a_w.w_symbol); break; default: error("pbank_list: 3rd element must be a float or sym."); goto exit; } *x->p_dirty = (t_atom *)1; /* set dirty flag */ } exit: return; } int pbank_fromtext(t_pbank *x,void *b) { t_atom *av; int z,atype; int columnpos = 0,columns = 0; int rowpos = 0, rows = 0; long items = 0; int argc = binbuf_getnatom(b),count = 0; t_atom *ap = binbuf_getvec(b); /* get pbank symbol */ if (ap->a_type != A_SYMBOL || ap->a_w.w_symbol != gensym("pbank")) { error("pbank_fromtext: bad file format: item one must be the symbol 'pbank"); goto error; } for (z=0;z<2;z++) { ap++, count++; // binbuf_getatom(b,&p1,&p2,&at); /* get columns and rows */ if (ap->a_type != A_FLOAT) { error("pbank_fromtext: bad file format: item two and three must be COLUMNcount and ROWcount"); goto error; } if (z==0) columns = (int)ap->a_w.w_float; else rows = (int)ap->a_w.w_float; } if (columns < 1 || rows < 1) { error("pbank_fromtext: bad value(s) for item two and/or three (COLUMNcount and/or ROWcount)"); goto error; } if (columns != x->p_columns) { error("pbank_fromtext: bad file format: wrong no. of columns (%d) in file", columns); goto error; } /* get comma */ ap++, count++; if (ap->a_type != A_COMMA) { error("pbank_fromtext: bad file format: comma expected after third item"); goto error; } av = GETROW(x,rowpos); // post("pbank_fromtext: columns %d rows %d",columns,rows); while (count < argc) { if (rowpos > x->p_rows) // safety check- remove later { bug("pbank_fromtext: rowpos=%d x->p_rows=%d items=%d argc=%d",rowpos,x->p_rows,count,argc); error("pbank_fromtext: rowpos greater than x->p_rows: aborting"); goto error; } ap++, count++; // get next atom atype = ap->a_type; if (atype == A_NULL) { if (count == argc) goto done; else { error("pbank_fromtext: unexpected A_NULL type read at position %d: aborting", count); goto error; } } if (columnpos >= x->p_columns) goto skipit; if (atype==A_FLOAT || atype==A_SYMBOL) { av[columnpos] = *ap; /* write atom to matrix */ items++; } else if (atype==A_COMMA) /* new line */ { if (columnpos) post("pbank_fromtext: warning: unexpected comma found in column %d row %d", columnpos,rowpos); goto skipit; } else { // post("ATYPE = %d", atype); post("pbank_fromtext: warning: strange token found in at column %d, row %d of file", columnpos,rowpos); goto ignore; } skipit: /* ignore any data that lies outside of X's dimensions */ if (atype!=A_COMMA) columnpos++; if (columnpos == columns) { columnpos = 0; rowpos++; av = GETROW(x,rowpos); } ignore:; } done: return(items); error: return(0); } void pbank_fromfile(t_pbank *x,char *name, int type, int silentFlag) // filename with or without path { void *b; int errorf, itemcount; char nilbuf[1]; nilbuf[0] = 0; b = binbuf_new(); // errorf = binbuf_read(b, name, vol, type); if (*name != '/' && *name != '~') // file name is not an absolute path errorf = binbuf_read(b, name, canvas_getdir(x->x_canvas)->s_name, type); else errorf = binbuf_read(b, name, nilbuf, type); if (errorf) { if (!silentFlag) post("warning: pbank_fromfile:%s not found",name); // not error, since filename may be used only as symbol for pbanks sharing memory } else { itemcount = pbank_fromtext(x,b); post("pbank_fromfile: %d items read from file %s",itemcount, name); *x->p_dirty = NIL; } binbuf_free(b); } #define TEXT 0 #define BINARY 1 void pbank_read(t_pbank *x, t_symbol *fname) { /* if (!open_dialog(name, &vol, &type, types, 1)) */ pbank_fromfile(x,fname->s_name,TEXT,0); } /* format for file A_COMMA.... */ void pbank_tobinbuf(t_pbank *x,void *b) { t_atom at,*av; t_symbol *s; char shit[256]; int z,i; sprintf(shit,"\n"); s = gensym(""); SETSYMBOL(&at,gensym("pbank")); /* write class name */ binbuf_add(b,1,&at); SETFLOAT(&at,(t_float) x->p_columns); /* write column count */ binbuf_add(b,1,&at); SETFLOAT(&at,(t_float) x->p_rows); /* write row count */ binbuf_add(b,1,&at); SETCOMMA(&at); /* write comma */ binbuf_add(b,1,&at); SETSYMBOL(&at,gensym(shit)); /* write CR */ binbuf_add(b,1,&at); for (z=0;zp_rows;z++) /* write params to binbuf */ { av = GETROW(x,z); for (i=0;ip_columns;i++,av++) { /* if (av->a_type == A_FLOAT) { post("A_FLOAT"); postfloat(av->a_w.w_float); } // else if (av->a_type == A_LONG) post("A_LONG %ld", av->a_w.w_long); else if (av->a_type == A_SYMBOL) post("A_SYMBOL %s", av->a_w.w_symbol->s_name); */ binbuf_add(b,1,av); /* write atom */ } SETCOMMA(&at); /* rows seperated by comma */ binbuf_add(b,1,&at); SETSYMBOL(&at,gensym(shit)); /* write CR */ binbuf_add(b,1,&at); } } void pbank_write(t_pbank *x, t_symbol *name) { char fn[256]; sprintf(fn,"%s", name->s_name); /* def volume shit here */ pbank_saveto(x,fn); } void pbank_saveto(t_pbank *x,char *fn) { int errorf = 0; char nilbuf[1]; void *b = binbuf_new(); pbank_tobinbuf(x,b); nilbuf[0]= 0; // nilbuf[1]= 0; bug fixed: zk-03/06 if (*fn != '/' && *fn != '~') // file name is not an absolute path errorf = binbuf_write(b, fn, canvas_getdir(x->x_canvas)->s_name, TEXT); /* save as TEXT */ else errorf = binbuf_write(b, fn, nilbuf, TEXT); /* save as TEXT */ binbuf_free(b); if (errorf) error("pbank_saveto: couldn't write %s", fn); else { *x->p_dirty = NIL; post("pbank_write:wrote file %s",fn); } } void pbank_dispose(t_pbank *x) { int z; t_shared *prePiss = NIL; t_shared *piss = NIL; if (*x->p_dirty) { /* need a save dialog here */ post("unsaved data"); } prePiss = piss = pbank_banks; /* maintain list of instance memories */ if (x->p_name) { while(piss) { /* post("->%s at %lx",piss->s_sym->s_name,piss); post(" next->%lx",piss->s_next); */ if ((t_symbol *)piss->s_sym == x->p_name) break; prePiss = piss; piss = piss->s_next; } if (!piss) { error("pbank_dispose: bug found- can't find symbol"); goto skip; } /* post("found %s", piss->s_sym->s_name); */ piss->s_refcount--; if (piss->s_refcount) { /* post("%s refcount = %d",piss->s_sym->s_name, piss->s_refcount); */ goto skip; /* things still pointing to data- don't dispose */ } piss->s_sym->s_thing = (void *) 0L; /* clear symbol to no longer point to this class */ if (!piss->s_next) /* last element in list */ { if (piss == pbank_banks) /* first element in list of only one element*/ { /* post(" unique element in list"); */ freebytes(piss, (int)sizeof(t_shared)); pbank_banks = NIL; } else /* last element in list - snip it */ { if (!prePiss) { error("bug found in pbank_dispose (prePiss)"); goto skip; } /* post(" last element in list"); */ prePiss->s_next = NIL; freebytes(piss, (int)sizeof(t_shared)); } } else if (piss == pbank_banks) /* first element in list of at least two elements */ { /* post(" first element in list"); */ pbank_banks = piss->s_next; freebytes(piss, (int)sizeof(t_shared)); } else /* element with adjacent elements */ { if (!prePiss) { error("bug found in pbank_dispose (prePiss)"); goto skip; } /* post(" embedded element in list"); */ prePiss->s_next = piss->s_next; freebytes(piss, (int)sizeof(t_shared)); } } for (z=0;zp_rows+EDBUFF;z++) { freebytes((void *)x->p_data[z], (int)sizeof(t_atom)*x->p_columns); } freebytes((void *)x->p_data,(int)sizeof(t_atom *)*(x->p_rows+EDBUFF+DIRTFLAG)); skip: if (x->p_receives) freebytes((void *)x->p_receives, (int)sizeof(t_symbol *)*x->p_columns); } t_class *pbank_class; void pbank_setup(void) { pbank_class = class_new(gensym("pbank"), (t_newmethod) pbank_new, (t_method) pbank_dispose, sizeof(t_pbank), 0, A_GIMME,0); class_addbang(pbank_class, (t_method) pbank_bang); class_addlist(pbank_class, (t_method) pbank_list); class_addmethod(pbank_class, (t_method) pbank_put, gensym("put"),A_GIMME,0); class_addmethod(pbank_class, (t_method) pbank_db, gensym("db"), A_FLOAT,A_FLOAT, 0); class_addmethod(pbank_class, (t_method) pbank_recall, gensym("recall"), A_FLOAT,0); // class_addmethod(pbank_class, (t_method) pbank_recallf, gensym("recallf"), A_FLOAT,0); class_addmethod(pbank_class, (t_method) pbank_dump, gensym("dump"),A_GIMME,0); class_addmethod(pbank_class, (t_method) pbank_store, gensym("store"), A_FLOAT,0); class_addmethod(pbank_class, (t_method) pbank_write, gensym("write"), A_SYMBOL,0); class_addmethod(pbank_class, (t_method) pbank_read, gensym("read"), A_SYMBOL,0); class_addmethod(pbank_class, (t_method) pbank_interp, gensym("interp"), A_GIMME,0); class_addmethod(pbank_class, (t_method) pbank_set, gensym("set"),A_GIMME,0); pbank_outlist->a_type = A_FLOAT; z_list = gensym("list"); z_float = gensym("float"); // z_int = gensym("int"); z_symbol = gensym("symbol"); z_receive = gensym("receive"); pbank_ID = gensym(PBANK_ID_STRING); pbank_ID->s_thing = (void *)pbank_ID; post("%s", VERSION); } /* columns rows memory-name receiveName */ /* note: memory-name is optional when no receiveName argument is specified */ void *pbank_new(t_symbol *s, int argc, t_atom *argv) { int z=0; char *shit; char piss[256]; t_pbank *x = (t_pbank *)pd_new(pbank_class); x->p_name = NIL; x->p_receives = NIL; x->x_canvas = canvas_getcurrent(); // x->p_vol = getdefvolume(); if (!InRange(argc,2,4)) { error("pbank_new: bad arg count - takes: colums rows fname sendname"); goto err; } if (((argv)->a_type != A_FLOAT) || ((argv+1)->a_type != A_FLOAT)) { error("pbank_new: first two elements must be numbers"); goto err; } // if ((argv)->a_w.w_float < 1 || (argv+1)->a_w.w_float < 1) // { // error("pbank_new: first or second argument less than 1, can't continue"); // goto err; // } if (!InRange((argv)->a_w.w_float, 1,MAX_COLUMNS-1)) { x->p_columns = DEFAULT_COLUMNS; post("pbank_new: warning: columns argument out of range, setting to %d",x->p_columns); } else x->p_columns = (int)(argv)->a_w.w_float; if (!InRange((argv+1)->a_w.w_float, 1,MAX_ROWS-1)) { x->p_rows = DEFAULT_ROWS; post("pbank_new: warning: rows argument out of range, setting to %d",x->p_rows); } else x->p_rows = (int)(argv+1)->a_w.w_float; if (argc == 2) x->p_name = NIL; else { if ((argv+2)->a_type != A_SYMBOL) { error("pbank_new: bad third arg: needs to be a symbol (or empty string %s)",gensym("")->s_name); goto err; } shit = (argv+2)->a_w.w_symbol->s_name; /* is it a crosshatch or un-defined ("") ? */ x->p_name = ((shit[0] == '#') || (shit[0] == '"' && shit[1] == '"')) ? NIL:gensym(shit); } if (argc == 4) /* argc == 4: establish output pointers to receive objects */ { if ((argv+3)->a_type != A_SYMBOL) { if ((argv+3)->a_type == A_FLOAT) { post("pbank_new: warning: 4th arg not symbol: ignoring (%f)", (argv+3)->a_w.w_float); goto nosyms; } else { error("pbank_new: optional fourth arg. needs to be a symbol"); goto err; } } shit = (argv+3)->a_w.w_symbol->s_name; if (shit[0] == '#' || (shit[0] == '"' && shit[1] == '"')) goto nosyms; /* crosshatch here */; x->p_receives = (t_symbol **)getbytes((int)sizeof(t_symbol *)*x->p_columns); for (z=0;zp_columns;z++) { sprintf(piss,"%s-%d",shit,z); // generate symbol of form: "name-columnNo" x->p_receives[z] = gensym(piss); if (x->p_receives[z]->s_thing) { /* sends or receive obj */ // post("found us a %s",class_getname(pd_class(x->p_receives[z]->s_thing))); // if ((void *)pd_class(x->p_receives[z]->s_thing)->c_sym != gensym("through")) /* NO TESTING FOR SHARED SYMBOLS if (strcmp(class_getname(pd_class(x->p_receives[z]->s_thing)), "send") && strcmp(class_getname(pd_class(x->p_receives[z]->s_thing)), "receive") && strcmp(class_getname(pd_class(x->p_receives[z]->s_thing)), "bindlist")) { error("pbank_new: symbol %s already being used, can't use it",shit); post("z=%d found a %s",z,class_getname(pd_class(x->p_receives[z]->s_thing))); goto err; } */ } } } nosyms: if (NIL == (x->p_data = pbank_getmem(x->p_name, x->p_columns,x->p_rows))) goto err; /* can't allocate data matrix */ x->p_dirty = x->p_data+x->p_rows-1+EDBUFF+DIRTFLAG; /* points to extra cell in matrix used for dirty flag */ if (x->p_name) { pbank_fromfile(x,x->p_name->s_name, TEXT,1); } outlet_new((t_object *) x, gensym("list")); return(x); err: if (x->p_receives) freebytes((void *)x->p_receives, (int)sizeof(t_symbol *)*x->p_columns); return(NIL); } /* NOTE: light error checking --- allocates memory and manages allocation list */ /* returns NIL (on error) or pointer to existing or new data matrix */ /* note memory size is columns*(rows+1) + 1 - where the extra row is for the edit buffer */ /* and the extra cell is for the DIRTY flag */ /* class independent allocation - needs class independent dispose method */ t_atom **pbank_getmem(t_symbol *name,int columns,int rows) { int z,i; t_shared *piss = NIL; t_atom **matrix,*av; char crap[256]; if (!InRange(columns, 1,MAX_COLUMNS-1)) columns = DEFAULT_COLUMNS; if (!InRange(rows, 1,MAX_ROWS-1)) rows = DEFAULT_ROWS; if (name) { if (name->s_thing) { if (name->s_thing == pbank_ID->s_thing) /* memory already exists - increment refcount */ { piss = pbank_banks; /* maintain list of instance memories */ while(piss) { if (piss->s_sym == name) /* pbank instances sharing memory */ { if (piss->s_columns != columns || piss->s_rows != rows) { error("pbank_getmem: pbank %s's dimensions must be (%d x %d)",name->s_name, piss->s_columns,piss->s_rows); return(NIL); } piss->s_refcount++; /* post("%s refcount=%d",piss->s_sym->s_name,piss->s_refcount); */ return(piss->s_data); } piss = piss->s_next; } error("pbank_getmem: bug: name %s not found",name->s_name); return(NIL); } else /* bad symbol - already taken - can't do anything */ { error("pbank_getmem: symbol %s already being used by another object",name->s_name); return(NIL); } } else /* allocate entry for given name in shared memory list */ { name->s_thing = pbank_ID->s_thing; /* associate symbol with pbank class */ piss = getbytes(sizeof(t_shared)); /* allocate new entry */ piss->s_sym = name; piss->s_refcount = 1; piss->s_next = (pbank_banks) ? pbank_banks:NIL; pbank_banks = piss; /* link it in at head of list */ /* post("PISS alloc %lx",piss); */ } } /* allocate memory for data matrix */ /* allocate "rows" + 1 (edbuff) + 1 (dirty flag) ROWS */ matrix = (t_atom **)getbytes((int)sizeof(t_atom *)*(rows+EDBUFF+DIRTFLAG)); for (z=0;zs_data = matrix; /* keep pointer to memory with shared */ piss->s_columns = columns; piss->s_rows = rows; } return(matrix); /* no errors - return pointer to data matrix */ } nusmuk/utils/img2cnv.pd0000644000175000017500000000747312333156646015710 0ustar zmoelnigzmoelnig#N canvas 130 268 898 691 10; #X obj 136 77 gemhead; #X obj 136 191 pix_image; #X obj 121 457 pix_data; #X obj 161 123 openpanel; #X obj 161 104 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 -1; #X msg 161 144 open \$1; #X obj 136 217 pix_info --------; #X obj 63 234 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 -1; #N canvas 50 97 450 300 until 0; #X obj 54 82 f; #X obj 54 104 until; #X obj 54 125 f; #X obj 81 166 + 1; #X obj 54 146 t f f; #X obj 54 24 inlet; #X obj 97 24 inlet; #X obj 54 206 outlet; #X obj 54 52 t b b; #X msg 99 79 0; #X connect 0 0 1 0; #X connect 1 0 2 0; #X connect 2 0 4 0; #X connect 3 0 2 1; #X connect 4 0 7 0; #X connect 4 1 3 0; #X connect 5 0 8 0; #X connect 6 0 0 1; #X connect 8 0 0 0; #X connect 8 1 9 0; #X connect 9 0 2 1; #X restore 63 255 pd until; #N canvas 50 87 450 300 until 0; #X obj 54 24 inlet; #X obj 97 24 inlet; #X obj 54 186 outlet; #X obj 54 82 f; #X obj 54 104 until; #X obj 54 125 f; #X obj 81 166 + 1; #X obj 54 146 t f f; #X obj 54 52 t b b; #X msg 99 79 0; #X connect 0 0 8 0; #X connect 1 0 3 1; #X connect 3 0 4 0; #X connect 4 0 5 0; #X connect 5 0 7 0; #X connect 6 0 5 1; #X connect 7 0 2 0; #X connect 7 1 6 0; #X connect 8 0 3 0; #X connect 8 1 9 0; #X connect 9 0 5 1; #X restore 63 301 pd until; #X obj 63 278 t b f; #X obj 151 354 /; #X obj 166 332 - 1; #X obj 63 322 t b f; #X obj 166 392 /; #X obj 181 370 - 1; #N canvas 1176 245 460 479 image 0; #X restore 441 220 pd image; #X obj 218 604 s pd-image; #N canvas 50 257 298 368 rgb2canvas_color 0; #X obj 49 24 inlet; #X obj 49 53 unpack f f f; #X obj 83 181 +; #X obj 49 205 +; #X obj 49 277 outlet; #X obj 49 254 - 1; #X obj 49 128 * 4096; #X obj 83 154 * 64; #X obj 49 229 * -1; #X obj 49 103 i; #X obj 83 104 i; #X obj 118 105 i; #X obj 118 80 * 63; #X obj 83 79 * 63; #X obj 49 78 * 63; #X connect 0 0 1 0; #X connect 1 0 14 0; #X connect 1 1 13 0; #X connect 1 2 12 0; #X connect 2 0 3 1; #X connect 3 0 8 0; #X connect 5 0 4 0; #X connect 6 0 3 0; #X connect 7 0 2 0; #X connect 8 0 5 0; #X connect 9 0 6 0; #X connect 10 0 7 0; #X connect 11 0 2 1; #X connect 12 0 11 0; #X connect 13 0 10 0; #X connect 14 0 9 0; #X restore 143 489 pd rgb2canvas_color; #X obj 218 536 pack f f f; #X msg 317 381 create \, 1; #X obj 300 411 gemwin; #X obj 276 475 * 2; #X obj 276 498 + 10; #X obj 316 475 * 2; #X obj 316 498 + 10; #X obj 166 437 -; #X msg 166 414 1 \$1; #X obj 143 511 route -262144; #X obj 278 88 t b b b; #X obj 278 63 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 -1; #X obj 300 308 delay 50; #X msg 300 354 destroy; #X obj 300 331 delay 50; #X msg 218 559 obj \$2 \$3 cnv 0 0 0 empty empty empty 20 12 0 14 \$1 -66577; #X obj 300 285 t b; #X msg 233 584 vis 1 \, selectall \, cut \, vis 0; #X text 338 64 <- select image; #X text 501 220 <- image will be converted to a patch in this subpatch using 2x2 canvas for all non white pixel of the original image; #X connect 0 0 1 0; #X connect 1 0 6 0; #X connect 2 1 18 0; #X connect 3 0 5 0; #X connect 3 0 35 0; #X connect 4 0 3 0; #X connect 5 0 1 0; #X connect 6 0 2 1; #X connect 6 1 12 0; #X connect 6 1 8 1; #X connect 6 2 15 0; #X connect 6 2 9 1; #X connect 7 0 8 0; #X connect 8 0 10 0; #X connect 9 0 13 0; #X connect 10 0 9 0; #X connect 10 1 11 0; #X connect 10 1 22 0; #X connect 11 0 2 2; #X connect 12 0 11 1; #X connect 13 0 2 0; #X connect 13 1 14 0; #X connect 13 1 24 0; #X connect 14 0 27 0; #X connect 15 0 14 1; #X connect 18 0 28 0; #X connect 19 0 34 0; #X connect 20 0 21 0; #X connect 22 0 23 0; #X connect 23 0 19 1; #X connect 24 0 25 0; #X connect 25 0 19 2; #X connect 26 0 2 3; #X connect 27 0 26 0; #X connect 28 1 19 0; #X connect 29 1 3 0; #X connect 29 2 36 0; #X connect 29 2 20 0; #X connect 30 0 29 0; #X connect 31 0 33 0; #X connect 31 0 8 0; #X connect 32 0 21 0; #X connect 33 0 32 0; #X connect 34 0 17 0; #X connect 35 0 31 0; #X connect 36 0 17 0; nusmuk/utils/lfo.pd0000664000175000017500000000243012047230726015103 0ustar zmoelnigzmoelnig#N canvas 193 96 408 667 10; #X obj 32 44 inlet; #X obj 200 41 loadbang; #X msg 200 95 1; #X obj 200 213 metro; #X obj 230 97 \$2; #X obj 230 125 sel 0; #X msg 230 152 20; #X obj 200 67 t b b; #X obj 200 636 outlet; #X obj 230 185 f; #X obj 58 258 /; #X obj 271 40 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 -1; #X obj 58 284 t b f; #X msg 58 232 1 \$1; #X obj 32 339 *; #X obj 32 317 \$1; #X obj 200 555 -; #X obj 230 532 i; #X obj 32 383 /; #X msg 32 362 1 \$1; #X obj 200 508 t f f; #X obj 276 634 outlet; #X obj 276 589 * 3.14159; #X obj 276 613 sin; #X obj 276 568 * 2; #X obj 200 451 f; #X obj 200 480 +; #X connect 0 0 15 0; #X connect 1 0 7 0; #X connect 2 0 3 0; #X connect 3 0 25 0; #X connect 4 0 5 0; #X connect 5 0 6 0; #X connect 5 1 9 0; #X connect 6 0 9 0; #X connect 7 0 2 0; #X connect 7 1 4 0; #X connect 9 0 3 1; #X connect 9 0 13 0; #X connect 10 0 12 0; #X connect 11 0 7 0; #X connect 12 0 15 0; #X connect 12 1 14 1; #X connect 13 0 10 0; #X connect 14 0 19 0; #X connect 15 0 14 0; #X connect 16 0 8 0; #X connect 16 0 24 0; #X connect 16 0 25 1; #X connect 17 0 16 1; #X connect 18 0 26 1; #X connect 19 0 18 0; #X connect 20 0 16 0; #X connect 20 1 17 0; #X connect 22 0 23 0; #X connect 23 0 21 0; #X connect 24 0 22 0; #X connect 25 0 26 0; #X connect 26 0 20 0; nusmuk/utils/tab_downsample.c0000664000175000017500000000611512603463370017146 0ustar zmoelnigzmoelnig#include "m_pd.h" #define MIN(a,b) (((a)<(b))?(a):(b)) #define MAX(a,b) (((a)>(b))?(a):(b)) static t_class *tab_downsample_class; typedef struct _tab_downsample { t_object x_obj; t_symbol *x_arrayname_src; t_symbol *x_arrayname_dst; int factor, offset; t_outlet *b_out; } t_tab_downsample; void *tab_downsample_new(t_symbol *s_src,t_symbol *s_dst, t_float factor) { t_tab_downsample *x = (t_tab_downsample *)pd_new(tab_downsample_class); x->x_arrayname_src = s_src; x->x_arrayname_dst = s_dst; x->factor = factor; x->factor = MAX(1, factor); x->offset = 0; x->b_out = outlet_new(&x->x_obj, &s_bang); return (void *)x; } void tab_downsample_compute(t_tab_downsample *x) { t_garray *a_src, *a_dst; int npoints_src, npoints_dst; t_word *vec_src, *vec_dst; int nb_max, i, index_src; if (!(a_src = (t_garray *)pd_findbyclass(x->x_arrayname_src, garray_class))) pd_error(x, "%s: no such array", x->x_arrayname_src->s_name); else if (!garray_getfloatwords(a_src, &npoints_src, &vec_src)) pd_error(x, "%s: bad template for tab_downsample", x->x_arrayname_src->s_name); else if (!(a_dst = (t_garray *)pd_findbyclass(x->x_arrayname_dst, garray_class))) pd_error(x, "%s: no such array", x->x_arrayname_dst->s_name); else if (!garray_getfloatwords(a_dst, &npoints_dst, &vec_dst)) pd_error(x, "%s: bad template for tab_downsample", x->x_arrayname_dst->s_name); else { nb_max = MIN((npoints_src - x->offset)/x->factor, npoints_dst); //nb_max = MAX(nb_max, 1); // post("nb_max = %d",nb_max); index_src = x->offset; for (i=0; ifactor; } garray_redraw(a_dst); } outlet_bang(x->b_out); } void tab_downsample_bang(t_tab_downsample *x) { x->offset = 0; tab_downsample_compute(x) ; } void tab_downsample_float(t_tab_downsample *x, t_float offset) { x->offset = offset; tab_downsample_compute(x) ; } void tab_downsample_src(t_tab_downsample *x, t_symbol *s_src) { x->x_arrayname_src = s_src; } void tab_downsample_dst(t_tab_downsample *x, t_symbol *s_dst) { x->x_arrayname_dst = s_dst; } void tab_downsample_factor(t_tab_downsample *x, t_float factor) { x->factor = MAX(1, factor); } void tab_downsample_setup(void) { tab_downsample_class = class_new(gensym("tab_downsample"), (t_newmethod)tab_downsample_new, 0, sizeof(t_tab_downsample), CLASS_DEFAULT, A_DEFSYM, A_DEFSYM, A_DEFFLOAT, 0); class_addbang(tab_downsample_class, tab_downsample_bang); class_addmethod(tab_downsample_class, (t_method)tab_downsample_src, gensym("src"), A_DEFSYM, 0); class_addmethod(tab_downsample_class, (t_method)tab_downsample_dst, gensym("dst"), A_DEFSYM, 0); class_addmethod(tab_downsample_class, (t_method)tab_downsample_factor, gensym("factor"), A_DEFFLOAT, 0); class_addfloat(tab_downsample_class, (t_method)tab_downsample_float); } nusmuk/utils/line3-help.pd0000664000175000017500000000273712621334362016274 0ustar zmoelnigzmoelnig#N canvas 254 177 683 616 10; #X obj 33 279 line3; #X msg 32 44 0 1000; #X msg 43 66 127 1000; #N canvas 0 50 450 300 (subpatch) 0; #X array line3 100 float 2; #X coords 0 1 99 -1 200 140 1; #X restore 306 174 graph; #X obj 33 394 t f b; #X obj 63 440 + 1; #X obj 63 418 f; #X obj 63 466 % 100; #X obj 62 163 random 127; #X obj 62 114 metro 300; #X msg 62 186 \$1 1000; #X obj 62 91 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 1 ; #X obj 149 279 line; #N canvas 0 50 450 300 (subpatch) 0; #X array line 100 float 2; #X coords 0 1 99 -1 200 140 1; #X restore 306 314 graph; #X obj 33 525 tabwrite line3; #X obj 149 526 tabwrite line; #X text 290 7 line3; #X obj 80 139 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X text 168 40 line3 is compatible with line \, but the transition is made with a 3d order polynome. coeficiant of this polynome are adjusted to have the continuity of the output variation speed.; #X obj 33 317 - 63.5; #X obj 149 318 - 63.5; #X obj 149 342 / 63.5; #X obj 33 340 / 63.5; #X obj 33 218 t a; #X connect 0 0 19 0; #X connect 1 0 23 0; #X connect 2 0 23 0; #X connect 4 0 14 0; #X connect 4 1 6 0; #X connect 5 0 7 0; #X connect 6 0 5 0; #X connect 7 0 6 1; #X connect 7 0 14 1; #X connect 7 0 15 1; #X connect 8 0 10 0; #X connect 9 0 8 0; #X connect 10 0 23 0; #X connect 11 0 9 0; #X connect 12 0 20 0; #X connect 17 0 8 0; #X connect 19 0 22 0; #X connect 20 0 21 0; #X connect 21 0 15 0; #X connect 22 0 4 0; #X connect 23 0 0 0; #X connect 23 0 12 0; nusmuk/utils/tab_upsample.c0000664000175000017500000000575312603463274016635 0ustar zmoelnigzmoelnig#include "m_pd.h" #define MIN(a,b) (((a)<(b))?(a):(b)) #define MAX(a,b) (((a)>(b))?(a):(b)) static t_class *tab_upsample_class; typedef struct _tab_upsample { t_object x_obj; t_symbol *x_arrayname_src; t_symbol *x_arrayname_dst; int factor, offset; t_outlet *b_out; } t_tab_upsample; void *tab_upsample_new(t_symbol *s_src,t_symbol *s_dst, t_float factor) { t_tab_upsample *x = (t_tab_upsample *)pd_new(tab_upsample_class); x->x_arrayname_src = s_src; x->x_arrayname_dst = s_dst; x->factor = MAX(1, factor); x->offset = 0; x->b_out = outlet_new(&x->x_obj, &s_bang); return (void *)x; } void tab_upsample_compute(t_tab_upsample *x) { t_garray *a_src, *a_dst; int npoints_src, npoints_dst; t_word *vec_src, *vec_dst; int nb_max, i, index_dst; x->factor = MAX(x->factor, 1); if (!(a_src = (t_garray *)pd_findbyclass(x->x_arrayname_src, garray_class))) pd_error(x, "%s: no such array", x->x_arrayname_src->s_name); else if (!garray_getfloatwords(a_src, &npoints_src, &vec_src)) pd_error(x, "%s: bad template for tab_upsample", x->x_arrayname_src->s_name); else if (!(a_dst = (t_garray *)pd_findbyclass(x->x_arrayname_dst, garray_class))) pd_error(x, "%s: no such array", x->x_arrayname_dst->s_name); else if (!garray_getfloatwords(a_dst, &npoints_dst, &vec_dst)) pd_error(x, "%s: bad template for tab_upsample", x->x_arrayname_dst->s_name); else { nb_max = MIN(npoints_src, 1+(npoints_dst - x->offset - 1)/x->factor); // post("nb_max = %d",nb_max); index_dst = x->offset; for (i=0; ifactor; } garray_redraw(a_dst); } outlet_bang(x->b_out); } void tab_upsample_bang(t_tab_upsample *x) { x->offset = 0; tab_upsample_compute(x) ; } void tab_upsample_float(t_tab_upsample *x, t_float offset) { x->offset = offset; tab_upsample_compute(x) ; } void tab_upsample_src(t_tab_upsample *x, t_symbol *s_src) { x->x_arrayname_src = s_src; } void tab_upsample_dst(t_tab_upsample *x, t_symbol *s_dst) { x->x_arrayname_dst = s_dst; } void tab_upsample_factor(t_tab_upsample *x, t_float factor) { x->factor = MAX(1, factor); } void tab_upsample_setup(void) { tab_upsample_class = class_new(gensym("tab_upsample"), (t_newmethod)tab_upsample_new, 0, sizeof(t_tab_upsample), CLASS_DEFAULT, A_DEFSYM, A_DEFSYM, A_DEFFLOAT, 0); class_addbang(tab_upsample_class, tab_upsample_bang); class_addmethod(tab_upsample_class, (t_method)tab_upsample_src, gensym("src"), A_DEFSYM, 0); class_addmethod(tab_upsample_class, (t_method)tab_upsample_dst, gensym("dst"), A_DEFSYM, 0); class_addmethod(tab_upsample_class, (t_method)tab_upsample_factor, gensym("factor"), A_DEFFLOAT, 0); class_addfloat(tab_upsample_class, (t_method)tab_upsample_float); } nusmuk/utils/fmod-help.pd0000664000175000017500000000037512047230726016204 0ustar zmoelnigzmoelnig#N canvas 1 22 449 300 10; #X obj 58 100 fmod 2.34; #X text 97 13 float version for mod; #X floatatom 58 80 5 0 0 0 - - -; #X floatatom 109 81 5 0 0 0 - - -; #X floatatom 58 123 5 0 0 0 - - -; #X connect 0 0 4 0; #X connect 2 0 0 0; #X connect 3 0 0 1; nusmuk/utils/test.txt0000664000175000017500000000013512446276032015521 0ustar zmoelnigzmoelnigrow 0 0 0 0 0 0 0 0 0 0 0 0 0; row 1 0 0 0 0 0 0 0 0 0 0 0 0; row 2 0 0 0 0 0 0 0 0 0 0 0 0; nusmuk/utils/once.pd0000664000175000017500000000046512047230726015255 0ustar zmoelnigzmoelnig#N canvas 818 139 431 322 10; #X obj 24 26 inlet; #X obj 24 168 outlet; #X msg 92 49 1; #X msg 115 79 0; #X obj 24 86 spigot 1; #X obj 24 119 t a b; #X obj 92 26 inlet; #X connect 0 0 4 0; #X connect 2 0 4 1; #X connect 3 0 4 1; #X connect 4 0 5 0; #X connect 5 0 1 0; #X connect 5 1 3 0; #X connect 6 0 2 0; nusmuk/utils/Makefile0000664000175000017500000002525012570631644015450 0ustar zmoelnigzmoelnig## Pd library template version 1.0.5 # For instructions on how to use this template, see: # http://puredata.info/docs/developer/MakefileTemplate LIBRARY_NAME = nusmuk-utils # add your .c source files, one object per file, to the SOURCES # variable, help files will be included automatically SOURCES = line3.c pbank.c mtx_preset.c tab_downsample_max.c tab_downsample_min.c tab_downsample_average.c tab_downsample.c tab_upsample.c tab_upsample_copy.c tab_max.c tab_min.c tab_integrate.c tab_derivate.c # list all pd objects (i.e. myobject.pd) files here, and their helpfiles will # be included automatically PDOBJECTS = pps.pd between.pd many_bang.pd rand_diff.pd filtered_random.pd randn.pd fmod.pd once.pd rnd_flow.pd lb.pd p.pd rnd_metro.pd lfo.pd # example patches and related files, in the 'examples' subfolder EXAMPLES = bushmeat.pbank # manuals and related files, in the 'manual' subfolder MANUAL = # if you want to include any other files in the source and binary tarballs, # list them here. This can be anything from header files, test patches, # documentation, etc. README.txt and LICENSE.txt are required and therefore # automatically included EXTRA_DIST = common.h pbank.h #------------------------------------------------------------------------------# # # things you might need to edit if you are using other C libraries # #------------------------------------------------------------------------------# CFLAGS = -DPD -I"$(PD_INCLUDE)" -Wall -W -g LDFLAGS = LIBS = #------------------------------------------------------------------------------# # # you shouldn't need to edit anything below here, if we did it right :) # #------------------------------------------------------------------------------# # get library version from meta file LIBRARY_VERSION = $(shell sed -n 's|^\#X text [0-9][0-9]* [0-9][0-9]* VERSION \(.*\);|\1|p' $(LIBRARY_NAME)-meta.pd) CFLAGS += -DVERSION='"$(LIBRARY_VERSION)"' PD_INCLUDE = $(PD_PATH)/include # where to install the library, overridden below depending on platform prefix = /usr/local libdir = $(prefix)/lib pkglibdir = $(libdir)/pd-externals objectsdir = $(pkglibdir) INSTALL = install INSTALL_PROGRAM = $(INSTALL) -p -m 644 INSTALL_DATA = $(INSTALL) -p -m 644 INSTALL_DIR = $(INSTALL) -p -m 755 -d ALLSOURCES := $(SOURCES) $(SOURCES_android) $(SOURCES_cygwin) $(SOURCES_macosx) \ $(SOURCES_iphoneos) $(SOURCES_linux) $(SOURCES_windows) DISTDIR=$(LIBRARY_NAME)-$(LIBRARY_VERSION) ORIGDIR=pd-$(LIBRARY_NAME:~=)_$(LIBRARY_VERSION) UNAME := $(shell uname -s) ifeq ($(UNAME),Darwin) CPU := $(shell uname -p) ifeq ($(CPU),arm) # iPhone/iPod Touch SOURCES += $(SOURCES_iphoneos) EXTENSION = pd_darwin OS = iphoneos PD_PATH = /Applications/Pd-extended.app/Contents/Resources IPHONE_BASE=/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin CC=$(IPHONE_BASE)/gcc CPP=$(IPHONE_BASE)/cpp CXX=$(IPHONE_BASE)/g++ ISYSROOT = -isysroot /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.0.sdk IPHONE_CFLAGS = -miphoneos-version-min=3.0 $(ISYSROOT) -arch armv6 OPT_CFLAGS = -fast -funroll-loops -fomit-frame-pointer CFLAGS := $(IPHONE_CFLAGS) $(OPT_CFLAGS) $(CFLAGS) LDFLAGS += -arch armv6 -bundle -undefined dynamic_lookup $(ISYSROOT) LIBS += -lc STRIP = strip -x DISTBINDIR=$(DISTDIR)-$(OS) else # Mac OS X SOURCES += $(SOURCES_macosx) EXTENSION = pd_darwin OS = macosx PD_PATH = /Applications/Pd-extended.app/Contents/Resources OPT_CFLAGS = -ftree-vectorize -ftree-vectorizer-verbose=2 -fast # build universal 32-bit on 10.4 and 32/64 on newer ifeq ($(shell uname -r | sed 's|\([0-9][0-9]*\)\.[0-9][0-9]*\.[0-9][0-9]*|\1|'), 8) FAT_FLAGS = -arch ppc -arch i386 -mmacosx-version-min=10.4 else FAT_FLAGS = -arch ppc -arch i386 -arch x86_64 -mmacosx-version-min=10.4 SOURCES += $(SOURCES_iphoneos) endif CFLAGS += $(FAT_FLAGS) -fPIC -I/sw/include LDFLAGS += $(FAT_FLAGS) -bundle -undefined dynamic_lookup -L/sw/lib # if the 'pd' binary exists, check the linking against it to aid with stripping LDFLAGS += $(shell test -e $(PD_PATH)/bin/pd && echo -bundle_loader $(PD_PATH)/bin/pd) LIBS += -lc STRIP = strip -x DISTBINDIR=$(DISTDIR)-$(OS) # install into ~/Library/Pd on Mac OS X since /usr/local isn't used much pkglibdir=$(HOME)/Library/Pd endif endif ifeq ($(UNAME),Linux) CPU := $(shell uname -m) SOURCES += $(SOURCES_linux) EXTENSION = pd_linux OS = linux PD_PATH = /usr OPT_CFLAGS = -O6 -funroll-loops -fomit-frame-pointer CFLAGS += -fPIC LDFLAGS += -Wl,--export-dynamic -shared -fPIC LIBS += -lc STRIP = strip --strip-unneeded -R .note -R .comment DISTBINDIR=$(DISTDIR)-$(OS)-$(shell uname -m) endif ifeq (CYGWIN,$(findstring CYGWIN,$(UNAME))) CPU := $(shell uname -m) SOURCES += $(SOURCES_cygwin) EXTENSION = dll OS = cygwin PD_PATH = $(cygpath $(PROGRAMFILES))/pd OPT_CFLAGS = -O6 -funroll-loops -fomit-frame-pointer CFLAGS += LDFLAGS += -Wl,--export-dynamic -shared -L"$(PD_PATH)/src" -L"$(PD_PATH)/bin" LIBS += -lc -lpd STRIP = strip --strip-unneeded -R .note -R .comment DISTBINDIR=$(DISTDIR)-$(OS) endif ifeq (MINGW,$(findstring MINGW,$(UNAME))) CPU := $(shell uname -m) SOURCES += $(SOURCES_windows) EXTENSION = dll OS = windows PD_PATH = $(shell cd "$(PROGRAMFILES)"/pd && pwd) OPT_CFLAGS = -O3 -funroll-loops -fomit-frame-pointer CFLAGS += -mms-bitfields LDFLAGS += -s -shared -Wl,--enable-auto-import LIBS += -L"$(PD_PATH)/src" -L"$(PD_PATH)/bin" -L"$(PD_PATH)/obj" -lpd -lwsock32 -lkernel32 -luser32 -lgdi32 STRIP = strip --strip-unneeded -R .note -R .comment DISTBINDIR=$(DISTDIR)-$(OS) endif # in case somebody manually set the HELPPATCHES above HELPPATCHES ?= $(SOURCES:.c=-help.pd) $(PDOBJECTS:.pd=-help.pd) CFLAGS += $(OPT_CFLAGS) .PHONY = install libdir_install single_install install-doc install-exec install-examples install-manual clean dist etags $(LIBRARY_NAME) all: $(SOURCES:.c=.$(EXTENSION)) %.o: %.c $(CC) $(CFLAGS) -o "$*.o" -c "$*.c" %.$(EXTENSION): %.o $(CC) $(LDFLAGS) -o "$*.$(EXTENSION)" "$*.o" $(LIBS) chmod a-x "$*.$(EXTENSION)" # this links everything into a single binary file $(LIBRARY_NAME): $(SOURCES:.c=.o) $(LIBRARY_NAME).o $(CC) $(LDFLAGS) -o $(LIBRARY_NAME).$(EXTENSION) $(SOURCES:.c=.o) $(LIBRARY_NAME).o $(LIBS) chmod a-x $(LIBRARY_NAME).$(EXTENSION) install: libdir_install # The meta and help files are explicitly installed to make sure they are # actually there. Those files are not optional, then need to be there. libdir_install: $(SOURCES:.c=.$(EXTENSION)) install-doc install-examples install-manual $(INSTALL_DIR) $(DESTDIR)$(objectsdir)/$(LIBRARY_NAME) $(INSTALL_DATA) $(LIBRARY_NAME)-meta.pd \ $(DESTDIR)$(objectsdir)/$(LIBRARY_NAME) test -z "$(strip $(SOURCES))" || (\ $(INSTALL_PROGRAM) $(SOURCES:.c=.$(EXTENSION)) $(DESTDIR)$(objectsdir)/$(LIBRARY_NAME) && \ $(STRIP) $(addprefix $(DESTDIR)$(objectsdir)/$(LIBRARY_NAME)/,$(SOURCES:.c=.$(EXTENSION)))) test -z "$(strip $(PDOBJECTS))" || \ $(INSTALL_DATA) $(PDOBJECTS) \ $(DESTDIR)$(objectsdir)/$(LIBRARY_NAME) # install library linked as single binary single_install: $(LIBRARY_NAME) install-doc install-exec $(INSTALL_DIR) $(DESTDIR)$(objectsdir)/$(LIBRARY_NAME) $(INSTALL_PROGRAM) $(LIBRARY_NAME).$(EXTENSION) $(DESTDIR)$(objectsdir)/$(LIBRARY_NAME) $(STRIP) $(DESTDIR)$(objectsdir)/$(LIBRARY_NAME)/$(LIBRARY_NAME).$(EXTENSION) install-doc: $(INSTALL_DIR) $(DESTDIR)$(objectsdir)/$(LIBRARY_NAME) test -z "$(strip $(SOURCES) $(PDOBJECTS))" || \ $(INSTALL_DATA) $(HELPPATCHES) \ $(DESTDIR)$(objectsdir)/$(LIBRARY_NAME) $(INSTALL_DATA) README.txt $(DESTDIR)$(objectsdir)/$(LIBRARY_NAME)/README.txt $(INSTALL_DATA) LICENSE.txt $(DESTDIR)$(objectsdir)/$(LIBRARY_NAME)/LICENSE.txt install-examples: test -z "$(strip $(EXAMPLES))" || \ $(INSTALL_DIR) $(DESTDIR)$(objectsdir)/$(LIBRARY_NAME)/examples && \ for file in $(EXAMPLES); do \ $(INSTALL_DATA) examples/$$file $(DESTDIR)$(objectsdir)/$(LIBRARY_NAME)/examples; \ done install-manual: test -z "$(strip $(MANUAL))" || \ $(INSTALL_DIR) $(DESTDIR)$(objectsdir)/$(LIBRARY_NAME)/manual && \ for file in $(MANUAL); do \ $(INSTALL_DATA) manual/$$file $(DESTDIR)$(objectsdir)/$(LIBRARY_NAME)/manual; \ done clean: -rm -f -- $(SOURCES:.c=.o) $(SOURCES_LIB:.c=.o) -rm -f -- $(SOURCES:.c=.$(EXTENSION)) -rm -f -- $(LIBRARY_NAME).o -rm -f -- $(LIBRARY_NAME).$(EXTENSION) distclean: clean -rm -f -- $(DISTBINDIR).tar.gz -rm -rf -- $(DISTBINDIR) -rm -f -- $(DISTDIR).tar.gz -rm -rf -- $(DISTDIR) -rm -f -- $(ORIGDIR).tar.gz -rm -rf -- $(ORIGDIR) $(DISTBINDIR): $(INSTALL_DIR) $(DISTBINDIR) libdir: all $(DISTBINDIR) $(INSTALL_DATA) $(LIBRARY_NAME)-meta.pd $(DISTBINDIR) $(INSTALL_DATA) $(SOURCES) $(DISTBINDIR) $(INSTALL_DATA) $(HELPPATCHES) $(DISTBINDIR) test -z "$(strip $(EXTRA_DIST))" || \ $(INSTALL_DATA) $(EXTRA_DIST) $(DISTBINDIR) # tar --exclude-vcs -czpf $(DISTBINDIR).tar.gz $(DISTBINDIR) $(DISTDIR): $(INSTALL_DIR) $(DISTDIR) $(ORIGDIR): $(INSTALL_DIR) $(ORIGDIR) dist: $(DISTDIR) $(INSTALL_DATA) Makefile $(DISTDIR) $(INSTALL_DATA) README.txt $(DISTDIR) $(INSTALL_DATA) LICENSE.txt $(DISTDIR) $(INSTALL_DATA) $(LIBRARY_NAME)-meta.pd $(DISTDIR) test -z "$(strip $(ALLSOURCES))" || \ $(INSTALL_DATA) $(ALLSOURCES) $(DISTDIR) test -z "$(strip $(PDOBJECTS))" || \ $(INSTALL_DATA) $(PDOBJECTS) $(DISTDIR) test -z "$(strip $(HELPPATCHES))" || \ $(INSTALL_DATA) $(HELPPATCHES) $(DISTDIR) test -z "$(strip $(EXTRA_DIST))" || \ $(INSTALL_DATA) $(EXTRA_DIST) $(DISTDIR) test -z "$(strip $(EXAMPLES))" || \ $(INSTALL_DIR) $(DISTDIR)/examples && \ for file in $(EXAMPLES); do \ $(INSTALL_DATA) examples/$$file $(DISTDIR)/examples; \ done test -z "$(strip $(MANUAL))" || \ $(INSTALL_DIR) $(DISTDIR)/manual && \ for file in $(MANUAL); do \ $(INSTALL_DATA) manual/$$file $(DISTDIR)/manual; \ done tar --exclude-vcs -czpf $(DISTDIR).tar.gz $(DISTDIR) # make a Debian source package dpkg-source: debclean make distclean dist mv $(DISTDIR) $(ORIGDIR) tar --exclude-vcs -czpf ../$(ORIGDIR).orig.tar.gz $(ORIGDIR) rm -f -- $(DISTDIR).tar.gz rm -rf -- $(DISTDIR) $(ORIGDIR) cd .. && dpkg-source -b $(LIBRARY_NAME) etags: etags *.h $(SOURCES) ../../pd/src/*.[ch] /usr/include/*.h /usr/include/*/*.h showsetup: @echo "CFLAGS: $(CFLAGS)" @echo "LDFLAGS: $(LDFLAGS)" @echo "LIBS: $(LIBS)" @echo "PD_INCLUDE: $(PD_INCLUDE)" @echo "PD_PATH: $(PD_PATH)" @echo "objectsdir: $(objectsdir)" @echo "LIBRARY_NAME: $(LIBRARY_NAME)" @echo "LIBRARY_VERSION: $(LIBRARY_VERSION)" @echo "SOURCES: $(SOURCES)" @echo "PDOBJECTS: $(PDOBJECTS)" @echo "ALLSOURCES: $(ALLSOURCES)" @echo "UNAME: $(UNAME)" @echo "CPU: $(CPU)" @echo "pkglibdir: $(pkglibdir)" @echo "DISTDIR: $(DISTDIR)" @echo "ORIGDIR: $(ORIGDIR)" nusmuk/utils/tab_downsample_min.c0000664000175000017500000000626712603463350020017 0ustar zmoelnigzmoelnig#include "m_pd.h" #define MIN(a,b) (((a)<(b))?(a):(b)) #define MAX(a,b) (((a)>(b))?(a):(b)) static t_class *tab_downsample_min_class; typedef struct _tab_downsample_min { t_object x_obj; t_symbol *x_arrayname_src; t_symbol *x_arrayname_dst; int factor; t_outlet *b_out; } t_tab_downsample_min; void *tab_downsample_min_new(t_symbol *s_src,t_symbol *s_dst, t_float factor) { t_tab_downsample_min *x = (t_tab_downsample_min *)pd_new(tab_downsample_min_class); x->x_arrayname_src = s_src; x->x_arrayname_dst = s_dst; x->factor = MAX(1, factor); x->b_out = outlet_new(&x->x_obj, &s_bang); return (void *)x; } void tab_downsample_min_bang(t_tab_downsample_min *x) { t_garray *a_src, *a_dst; int npoints_src, npoints_dst; t_word *vec_src, *vec_dst; int nb_max, i, j, index_src; t_float tmp; if (!(a_src = (t_garray *)pd_findbyclass(x->x_arrayname_src, garray_class))) pd_error(x, "%s: no such array", x->x_arrayname_src->s_name); else if (!garray_getfloatwords(a_src, &npoints_src, &vec_src)) pd_error(x, "%s: bad template for tab_downsample", x->x_arrayname_src->s_name); else if (!(a_dst = (t_garray *)pd_findbyclass(x->x_arrayname_dst, garray_class))) pd_error(x, "%s: no such array", x->x_arrayname_dst->s_name); else if (!garray_getfloatwords(a_dst, &npoints_dst, &vec_dst)) pd_error(x, "%s: bad template for tab_downsample", x->x_arrayname_dst->s_name); else { nb_max = MIN(npoints_src/x->factor, npoints_dst); // post("nb_max = %d",nb_max); index_src = 0; for (i=0; ifactor;j++) { tmp = MIN(tmp, vec_src[index_src].w_float); // post("read : %d, %f",index_src, vec_src[index_src].w_float); // post("tmp : %f",tmp); index_src++; } vec_dst[i].w_float = tmp; // post("write : %d, %f",i, tmp); } garray_redraw(a_dst); } outlet_bang(x->b_out); } void tab_downsample_min_src(t_tab_downsample_min *x, t_symbol *s_src) { x->x_arrayname_src = s_src; } void tab_downsample_min_dst(t_tab_downsample_min *x, t_symbol *s_dst) { x->x_arrayname_dst = s_dst; } void tab_downsample_min_factor(t_tab_downsample_min *x, t_float factor) { x->factor = MAX(1, factor); } void tab_downsample_min_setup(void) { tab_downsample_min_class = class_new(gensym("tab_downsample_min"), (t_newmethod)tab_downsample_min_new, 0, sizeof(t_tab_downsample_min), CLASS_DEFAULT, A_DEFSYM, A_DEFSYM, A_DEFFLOAT, 0); class_addbang(tab_downsample_min_class, tab_downsample_min_bang); class_addmethod(tab_downsample_min_class, (t_method)tab_downsample_min_src, gensym("src"), A_DEFSYM, 0); class_addmethod(tab_downsample_min_class, (t_method)tab_downsample_min_dst, gensym("dst"), A_DEFSYM, 0); class_addmethod(tab_downsample_min_class, (t_method)tab_downsample_min_factor, gensym("factor"), A_DEFFLOAT, 0); } nusmuk/utils/tab_min-help.pd0000664000175000017500000000731212457426436016700 0ustar zmoelnigzmoelnig#N canvas 110 107 859 564 10; #N canvas 0 50 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 50 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 50 450 300 (subpatch) 0; #X array src2 100 float 1; #A 0 -0.471423 -0.714277 -0.685706 -0.657135 -0.614278 -0.557136 -0.471423 -0.428566 -0.342853 -0.299996 -0.242854 -0.185712 -0.128569 -0.071427 -0.0499987 -0.0285704 0.0428575 0.0714286 0.357136 0.399993 0.44285 0.457135 0.485706 0.514278 0.542849 0.557134 0.557134 0.542849 0.471421 0.428564 0.385707 0.31428 0.285709 0.257137 0.18571 0.149996 0.114282 0.0571395 -2.74181e-06 -0.0428594 -0.142858 -0.228572 -0.271428 -0.328571 -0.357142 -0.385713 -0.342856 -0.3 -0.242857 -0.214286 -0.185715 -0.128573 -0.0714306 -2.74181e-06 0.042854 0.0999962 0.142853 0.257137 0.31428 0.371422 0.414279 0.514278 0.557134 0.628562 0.657133 0.685704 0.657133 0.599991 0.542849 0.457135 0.371422 0.214281 0.157138 0.0857106 -0.057145 -0.17143 -0.228572 -0.328571 -0.385713 -0.442855 -0.471426 -0.499997 -0.514283 -0.542854 -0.55714 -0.571425 -0.585711 -0.585711 -0.571425 -0.564283 -0.55714 -0.528569 -0.50714 -0.485712 -0.471426 -0.457141 -0.414284 -0.399999 -0.385713 -0.0428594; #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 108 465 IEM KUG; #X text 88 453 musil; #X text 122 453 @; #X text 130 453 iem.at; #X text 91 475 Graz \, Austria; #X text 234 312 initial arguments:; #X text 72 319 output; #X text 306 275 xxx : change destination name; #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 43 442 (c) Thomas Musil 2000 - 2009; #X text 12 3 tab_max; #X text 90 29 max the 2 src-arrays to dst-array; #X text 54 420 ch \, help file based on :; #X obj 61 78 tab_min src1 src2 dst; #X obj 59 301 tab_min src1 src2 dst; #X connect 2 0 34 0; #X connect 5 0 35 0; #X connect 7 0 35 0; #X connect 8 0 35 0; #X connect 9 0 35 0; #X connect 34 0 3 0; #X connect 35 0 4 0; nusmuk/utils/randn-help.pd0000664000175000017500000000122012621334116016343 0ustar zmoelnigzmoelnig#N canvas 460 231 523 310 10; #X text 49 31 _randn - random numbers in gaussian distribution; #X text 111 67 \$2 : mean; #X text 111 49 \$1 : standard deviation; #X msg 73 112 bang; #X floatatom 103 161 0 0 0 0 - - -; #X floatatom 73 242 0 0 0 0 - - -; #X msg 83 136 seed 123; #X text 125 110 bang for output; #X text 165 136 message to set the seed; #X text 136 160 inlet to reset the std; #X text 149 216 argument to initialize the std and mean; #X floatatom 133 189 0 0 0 0 - - -; #X text 163 189 inlet to reset the mean; #X obj 73 217 randn 5 0; #X connect 3 0 13 0; #X connect 4 0 13 1; #X connect 6 0 13 0; #X connect 11 0 13 2; #X connect 13 0 5 0; nusmuk/utils/many_bang-help.pd0000664000175000017500000000241212047230726017204 0ustar zmoelnigzmoelnig#N canvas 0 0 742 777 10; #X obj 40 91 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X obj 112 155 print done; #X obj 40 155 print; #X msg 69 92 stop; #X obj 40 125 many_bang 5; #X text 163 126 output 5 bangs; #X obj 45 236 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X obj 138 299 print done; #X obj 45 300 print; #X msg 74 237 stop; #X text 168 271 output between 2 and 15 bangs; #X obj 47 381 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X obj 161 445 print done; #X obj 47 445 print; #X msg 76 382 stop; #X text 174 416 output between 2 and 3 bangs \, with 500ms delay between bangs; #X obj 48 497 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X obj 204 561 print done; #X obj 48 561 print; #X msg 77 498 stop; #X text 231 532 50 to 1500ms delay between 10 bangs; #X text 288 6 many_bang; #X obj 47 415 many_bang 2 3 500; #X obj 48 531 many_bang 10 10 50 1500; #X obj 45 271 many_bang 2 15; #X connect 0 0 4 0; #X connect 3 0 4 0; #X connect 4 0 2 0; #X connect 4 1 1 0; #X connect 6 0 24 0; #X connect 9 0 24 0; #X connect 11 0 22 0; #X connect 14 0 22 0; #X connect 16 0 23 0; #X connect 19 0 23 0; #X connect 22 0 13 0; #X connect 22 1 12 0; #X connect 23 0 18 0; #X connect 23 1 17 0; #X connect 24 0 8 0; #X connect 24 1 7 0; nusmuk/utils/LICENSE.txt0000664000175000017500000003574512047230726015640 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 nusmuk/utils/rnd_metro.pd0000664000175000017500000000217012047230726016315 0ustar zmoelnigzmoelnig#N canvas 0 0 450 300 10; #X obj 125 10 inlet; #X obj 104 177 spigot 0; #X obj 97 57 sel 1; #X obj 125 34 t f f; #X obj 95 146 delay; #X obj 238 14 inlet; #X obj 297 14 inlet; #X obj 95 85 t b b b; #X obj 139 263 outlet; #N canvas 0 0 450 300 between 0; #X obj 61 29 inlet; #X obj 211 31 inlet; #X obj 350 33 inlet; #X obj 195 172 \$1; #X obj 225 352 / 100000; #X obj 225 281 i; #X obj 195 380 +; #X obj 195 206 t f f; #X obj 195 410 outlet; #X obj 225 230 - \$2; #X obj 225 304 t b f; #X obj 225 328 random 0; #X obj 225 256 * -100000; #X obj 61 67 t b; #X connect 0 0 13 0; #X connect 1 0 3 1; #X connect 2 0 9 1; #X connect 3 0 7 0; #X connect 4 0 6 1; #X connect 5 0 10 0; #X connect 6 0 8 0; #X connect 7 0 6 0; #X connect 7 1 9 0; #X connect 9 0 12 0; #X connect 10 0 11 0; #X connect 10 1 11 1; #X connect 11 0 4 0; #X connect 12 0 5 0; #X connect 13 0 3 0; #X restore 117 113 pd between \$1 \$2; #X connect 0 0 3 0; #X connect 1 0 7 0; #X connect 2 0 7 0; #X connect 3 0 2 0; #X connect 3 1 1 1; #X connect 4 0 1 0; #X connect 5 0 9 1; #X connect 6 0 9 2; #X connect 7 0 4 0; #X connect 7 1 9 0; #X connect 7 2 8 0; #X connect 9 0 4 1; nusmuk/utils/tab_integrate-help.pd0000664000175000017500000000503412576317244020074 0ustar zmoelnigzmoelnig#N canvas 436 345 859 564 10; #N canvas 0 50 450 300 (subpatch) 0; #X array src1 100 float 1; #A 0 0.128572 -0.0714291 -0.0714291 -0.0857149 -0.100001 -0.114286 -0.114286 -0.114286 -0.114286 -0.114286 -0.114286 -0.100001 -0.100001 -0.0857149 -0.0857149 -0.0714291 -0.0571433 -0.0285717 -0.0142859 -0.0142859 0.0142857 0.0142857 0.0857178 0.100004 0.128575 0.142861 0.157147 0.171433 0.185718 0.185718 0.185718 0.185718 0.157147 0.142861 0.128575 0.100004 0.0428572 0.0428572 0.0428572 0.0428572 0.0285714 0.0285714 0.0285714 0.0142856 0.0142856 -1.78814e-07 -1.78814e-07 -0.014286 -0.014286 -0.014286 -0.0285718 -0.0285718 -0.0285718 -0.0428576 -0.0428576 -0.0428576 -0.0428576 -0.0428576 -0.0428576 -0.0428576 -0.0428576 -0.0428576 -0.0428576 -0.0428576 -0.0428576 -0.0285718 -0.014286 -0.014286 -1.78814e-07 -1.78814e-07 0.0142856 0.0285714 0.0285714 0.0428572 0.0428572 0.0428572 0.057143 0.0714288 0.0285715 0.0285715 0.0285715 0.0285715 0.0285715 0.0285715 0.0285715 0.0285715 0.0285715 0.0142857 -0.0142859 -0.0285717 -0.0428575 -0.0571433 -0.0857149 -0.114286 -0.142858 -0.17143 -0.214287 -0.242859 -0.27143 -0.300002; #X coords 0 1 99 -1 200 140 1; #X restore 534 10 graph; #N canvas 0 50 450 300 (subpatch) 0; #X array dst 100 float 0; #X coords 0 1 99 -1 200 140 1; #X restore 540 217 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 60 264 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X msg 78 199 dst dst; #X msg 60 170 src1 src1; #X text 108 465 IEM KUG; #X text 88 453 musil; #X text 122 453 @; #X text 130 453 iem.at; #X text 91 475 Graz \, Austria; #X text 174 269 initial arguments:; #X text 73 243 output; #X text 129 198 xxx : change destination name; #X text 225 86 the minimum of the 3 array lengths); #X text 123 170 xxx : change source name 1; #X text 151 283 1.arg: source-name 1; #X text 212 72 (the number of samples which were added are:; #X text 43 442 (c) Thomas Musil 2000 - 2009; #X text 12 3 tab_max; #X text 90 29 max the 2 src-arrays to dst-array; #X text 54 420 ch \, help file based on :; #X text 152 299 2.arg: destination-name; #X obj 60 225 tab_integrate src1 dst; #X obj 34 156 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 -1; #X obj 61 78 tab_integrate src1 dst; #X msg 89 54 10; #X text 127 53 only the first 10 moints; #X connect 2 0 26 0; #X connect 5 0 24 0; #X connect 6 0 24 0; #X connect 24 0 4 0; #X connect 25 0 24 0; #X connect 26 0 3 0; #X connect 27 0 26 0; nusmuk/utils/tab_downsample_average.c0000664000175000017500000000624612603463364020650 0ustar zmoelnigzmoelnig#include "m_pd.h" #define MIN(a,b) (((a)<(b))?(a):(b)) #define MAX(a,b) (((a)>(b))?(a):(b)) static t_class *tab_downsample_average_class; typedef struct _tab_downsample_average { t_object x_obj; t_symbol *x_arrayname_src; t_symbol *x_arrayname_dst; int factor; t_outlet *b_out; } t_tab_downsample_average; void *tab_downsample_average_new(t_symbol *s_src,t_symbol *s_dst, t_float factor) { t_tab_downsample_average *x = (t_tab_downsample_average *)pd_new(tab_downsample_average_class); x->x_arrayname_src = s_src; x->x_arrayname_dst = s_dst; x->factor = MAX(1, factor); x->b_out = outlet_new(&x->x_obj, &s_bang); return (void *)x; } void tab_downsample_average_bang(t_tab_downsample_average *x) { t_garray *a_src, *a_dst; int npoints_src, npoints_dst; t_word *vec_src, *vec_dst; int nb_max, i, j, index_src; t_float tmp; if (!(a_src = (t_garray *)pd_findbyclass(x->x_arrayname_src, garray_class))) pd_error(x, "%s: no such array", x->x_arrayname_src->s_name); else if (!garray_getfloatwords(a_src, &npoints_src, &vec_src)) pd_error(x, "%s: bad template for tab_downsample", x->x_arrayname_src->s_name); else if (!(a_dst = (t_garray *)pd_findbyclass(x->x_arrayname_dst, garray_class))) pd_error(x, "%s: no such array", x->x_arrayname_dst->s_name); else if (!garray_getfloatwords(a_dst, &npoints_dst, &vec_dst)) pd_error(x, "%s: bad template for tab_downsample", x->x_arrayname_dst->s_name); else { nb_max = MIN(npoints_src/x->factor, npoints_dst); // post("nb_max = %d",nb_max); index_src = 0; for (i=0; ifactor;j++) { tmp += vec_src[index_src].w_float; // post("read : %d, %f",index_src, vec_src[index_src].w_float); // post("tmp : %f",tmp); index_src++; } vec_dst[i].w_float = tmp / x->factor; // post("write : %d, %f",i, tmp); } garray_redraw(a_dst); } outlet_bang(x->b_out); } void tab_downsample_average_src(t_tab_downsample_average *x, t_symbol *s_src) { x->x_arrayname_src = s_src; } void tab_downsample_average_dst(t_tab_downsample_average *x, t_symbol *s_dst) { x->x_arrayname_dst = s_dst; } void tab_downsample_average_factor(t_tab_downsample_average *x, t_float factor) { x->factor = MAX(1, factor); } void tab_downsample_average_setup(void) { tab_downsample_average_class = class_new(gensym("tab_downsample_average"), (t_newmethod)tab_downsample_average_new, 0, sizeof(t_tab_downsample_average), CLASS_DEFAULT, A_DEFSYM, A_DEFSYM, A_DEFFLOAT, 0); class_addbang(tab_downsample_average_class, tab_downsample_average_bang); class_addmethod(tab_downsample_average_class, (t_method)tab_downsample_average_src, gensym("src"), A_DEFSYM, 0); class_addmethod(tab_downsample_average_class, (t_method)tab_downsample_average_dst, gensym("dst"), A_DEFSYM, 0); class_addmethod(tab_downsample_average_class, (t_method)tab_downsample_average_factor, gensym("factor"), A_DEFFLOAT, 0); } nusmuk/utils/rnd_metro-help.pd0000664000175000017500000000100412047230726017236 0ustar zmoelnigzmoelnig#N canvas 398 162 633 352 10; #X obj 27 112 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 1 1 ; #X obj 27 178 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X obj 27 146 rnd_metro 100 2000; #X text 163 9 metronome with random delay between bang; #X text 162 197 2 : maximum time between 2 bang; #X text 127 175 args 1 : minimum time between 2 bang; #X floatatom 87 123 5 0 0 0 - - -; #X floatatom 148 123 5 0 0 0 - - -; #X connect 0 0 2 0; #X connect 2 0 1 0; #X connect 6 0 2 1; #X connect 7 0 2 2; nusmuk/utils/lb.pd0000664000175000017500000000032412621334116014714 0ustar zmoelnigzmoelnig#N canvas 583 629 201 161 10; #X obj 36 86 loadbang; #X obj 18 17 inlet; #X obj 18 108 outlet; #X obj 33 41 r lb; #X obj 18 63 t b; #X connect 0 0 2 0; #X connect 1 0 4 0; #X connect 3 0 4 0; #X connect 4 0 2 0; nusmuk/utils/between.pd0000664000175000017500000000117512047230726015761 0ustar zmoelnigzmoelnig#N canvas 0 0 757 565 10; #X obj 61 29 inlet; #X obj 211 31 inlet; #X obj 350 33 inlet; #X obj 195 172 \$1; #X obj 225 352 / 100000; #X obj 225 281 i; #X obj 195 380 +; #X obj 195 206 t f f; #X obj 195 410 outlet; #X obj 225 230 - \$2; #X obj 225 304 t b f; #X obj 225 328 random 0; #X obj 225 256 * -100000; #X obj 61 67 t b; #X connect 0 0 13 0; #X connect 1 0 3 1; #X connect 2 0 9 1; #X connect 3 0 7 0; #X connect 4 0 6 1; #X connect 5 0 10 0; #X connect 6 0 8 0; #X connect 7 0 6 0; #X connect 7 1 9 0; #X connect 9 0 12 0; #X connect 10 0 11 0; #X connect 10 1 11 1; #X connect 11 0 4 0; #X connect 12 0 5 0; #X connect 13 0 3 0; nusmuk/utils/nusmuk-utils-meta.pd0000664000175000017500000000044412621401616017726 0ustar zmoelnigzmoelnig#N canvas 270 93 496 221 10; #X text 12 116 LICENSE GNU GPL; #X text 10 39 AUTHOR Cyrille Henry; #X text 10 19 NAME nusmuk-utils; #X text 10 58 DESCRIPTION This objects' collection is based on abstractions and externals. they provide usfull stuff for pd.; #X text 11 136 VERSION 2.01511e+07; nusmuk/utils/pps-help.pd0000664000175000017500000000046712047230726016063 0ustar zmoelnigzmoelnig#N canvas 0 0 450 300 10; #X obj 40 28 pps; #X text 85 27 shortcut for :; #X obj 209 29 list prepend set; #X obj 209 50 list trim; #X obj 45 163 pps; #X msg 45 190 41 0; #X obj 45 137 pack f foo; #X floatatom 45 118 5 0 0 0 - - -; #X connect 2 0 3 0; #X connect 4 0 5 0; #X connect 6 0 4 0; #X connect 7 0 6 0; nusmuk/utils/tab_max.c0000664000175000017500000000763112570333446015571 0ustar zmoelnigzmoelnig#include "m_pd.h" #define MIN(a,b) (((a)<(b))?(a):(b)) #define MAX(a,b) (((a)>(b))?(a):(b)) static t_class *tab_max_class; typedef struct _tab_max { t_object x_obj; t_symbol *x_arrayname_src1; t_symbol *x_arrayname_src2; t_symbol *x_arrayname_dst; int offset_src1, offset_src2, offset_dst, nb_max; t_outlet *b_out; } t_tab_max; void *tab_max_new(t_symbol *s_src1, t_symbol *s_src2, t_symbol *s_dst) { t_tab_max *x = (t_tab_max *)pd_new(tab_max_class); x->x_arrayname_src1 = s_src1; x->x_arrayname_src2 = s_src2; x->x_arrayname_dst = s_dst; x->offset_src1 = 0; x->offset_src2 = 0; x->offset_dst = 0; x->b_out = outlet_new(&x->x_obj, &s_bang); return (void *)x; } void tab_max_compute(t_tab_max *x) { t_garray *a_src1, *a_src2, *a_dst; int npoints_src1, npoints_src2, npoints_dst; t_word *vec_src1, *vec_src2, *vec_dst; int nb_max, i; if (!(a_src1 = (t_garray *)pd_findbyclass(x->x_arrayname_src1, garray_class))) pd_error(x, "%s: no such array", x->x_arrayname_src1->s_name); else if (!garray_getfloatwords(a_src1, &npoints_src1, &vec_src1)) pd_error(x, "%s: bad template for tab_max", x->x_arrayname_src1->s_name); else if (!(a_src2 = (t_garray *)pd_findbyclass(x->x_arrayname_src2, garray_class))) pd_error(x, "%s: no such array", x->x_arrayname_src2->s_name); else if (!garray_getfloatwords(a_src2, &npoints_src2, &vec_src2)) pd_error(x, "%s: bad template for tab_max", x->x_arrayname_src2->s_name); else if (!(a_dst = (t_garray *)pd_findbyclass(x->x_arrayname_dst, garray_class))) pd_error(x, "%s: no such array", x->x_arrayname_dst->s_name); else if (!garray_getfloatwords(a_dst, &npoints_dst, &vec_dst)) pd_error(x, "%s: bad template for tab_max", x->x_arrayname_dst->s_name); else { nb_max = MIN(npoints_src1 - x->offset_src1, npoints_src2 - x->offset_src2); nb_max = MIN(npoints_dst, nb_max); if (x->nb_max >0) nb_max = MIN(nb_max, x->nb_max); // post("nb_max = %d",nb_max); for (i=0; ioffset_dst].w_float = MAX(vec_src1[i + x->offset_src1].w_float, vec_src2[i + x->offset_src2].w_float); } garray_redraw(a_dst); } outlet_bang(x->b_out); } void tab_max_bang(t_tab_max *x) { x->offset_src1 = 0; x->offset_src2 = 0; x->offset_dst = 0; x->nb_max = -1; tab_max_compute(x) ; } void tab_max_list(t_tab_max *x, t_symbol *s, int argc, t_atom *argv) { x->offset_src1 = 0; x->offset_src2 = 0; x->offset_dst = 0; x->nb_max = -1; if ((argc>=1) && (argv[0].a_type == A_FLOAT)) x->offset_src1 = atom_getfloatarg(0, argc, argv); if ((argc>=2) && (argv[1].a_type == A_FLOAT)) x->offset_src2 = atom_getfloatarg(1, argc, argv); if ((argc>=3) && (argv[2].a_type == A_FLOAT)) x->offset_dst = atom_getfloatarg(2, argc, argv); if ((argc>=4) && (argv[3].a_type == A_FLOAT)) x->nb_max = atom_getfloatarg(3, argc, argv); tab_max_compute(x) ; } void tab_max_src1(t_tab_max *x, t_symbol *s_src) { x->x_arrayname_src1 = s_src; }void tab_max_src2(t_tab_max *x, t_symbol *s_src) { x->x_arrayname_src2 = s_src; } void tab_max_dst(t_tab_max *x, t_symbol *s_dst) { x->x_arrayname_dst = s_dst; } void tab_max_setup(void) { tab_max_class = class_new(gensym("tab_max"), (t_newmethod)tab_max_new, 0, sizeof(t_tab_max), CLASS_DEFAULT, A_DEFSYM, A_DEFSYM, A_DEFSYM, 0); class_addbang(tab_max_class, tab_max_bang); class_addlist(tab_max_class, (t_method)tab_max_list); class_addmethod(tab_max_class, (t_method)tab_max_src1, gensym("src1"), A_DEFSYM, 0); class_addmethod(tab_max_class, (t_method)tab_max_src2, gensym("src2"), A_DEFSYM, 0); class_addmethod(tab_max_class, (t_method)tab_max_dst, gensym("dst"), A_DEFSYM, 0); } nusmuk/utils/tab_downsample_max-help.pd0000664000175000017500000000100212457207164021114 0ustar zmoelnigzmoelnig#N canvas 108 621 777 410 10; #X obj 87 206 tab_downsample_max src dst 3; #X obj 97 73 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 -1; #X obj 411 85 table dst 300; #X obj 410 33 table src 1000; #X obj 411 55 table src2 1000; #X msg 139 91 src src2; #X msg 152 140 dst dst2; #X msg 182 177 factor 2; #X obj 85 248 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 -1; #X obj 411 105 table dst2 300; #X connect 0 0 8 0; #X connect 1 0 0 0; #X connect 5 0 0 0; #X connect 6 0 0 0; #X connect 7 0 0 0; nusmuk/utils/mtx_preset-help.pd0000664000175000017500000001357512456213726017464 0ustar zmoelnigzmoelnig#N canvas 316 279 1260 717 10; #X msg 116 142 matrix 10 3 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29; #X msg 124 175 matrix 9 2 0 1 2 3 4 5 6 7 8 10 11 12 13 14 15 16 17 18; #X msg 102 106 matrix 10 3 0 0 0 0 0 0 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 msg 138 198 matrix 11 4 0 1 2 3 4 5 6 7 8 9 111 10 11 12 13 14 15 16 17 18 19 199 20 21 22 23 24 25 26 27 28 29 299 30 31 32 33 34 35 36 37 38 39 333; #X msg 171 270 row 2 0 1 2 3 4 5 6 7 8 9 10 11 12; #X msg 608 122 getMatrix; #X msg 232 364 element 0 2 200; #X msg 632 182 getRow 1; #X obj 102 481 mtx_preset 10 3; #X obj 102 508 print; #X msg 200 318 col 8 4 5 6; #X obj 608 438 t a; #X text 180 18 preset interpolation object; #X text 113 79 set values; #X text 608 98 get values; #X msg 187 293 setRow 2 10; #X msg 215 339 setCol 9 11; #X msg 153 249 matrix 10; #X msg 620 151 getRows; #X msg 646 217 getRow 1.5; #X msg 664 267 getElements 1; #X msg 673 291 getElements 1.5; #X text 681 121 get matrix in one line (selector: matrix sizex sizey ); #X text 679 151 get matrix row by row (selector: rows y); #X text 697 182 get row 1 in one line (selector: row); #X text 717 215 get interpolation between row 1 and 2 in one line (selector: row), f 66; #N canvas 246 179 710 447 simple_example 0; #X obj 34 203 route row; #X obj 34 272 vsl 15 128 0 127 0 0 empty empty empty 0 -9 0 10 -262144 -1 -1 3000 1; #X msg 255 124 getRow \$1; #X floatatom 255 104 5 0 4 0 - - -, f 5; #X obj 34 229 unpack f f f f f f f f f f; #X obj 54 272 vsl 15 128 0 127 0 0 empty empty empty 0 -9 0 10 -262144 -1 -1 2700 1; #X obj 74 272 vsl 15 128 0 127 0 0 empty empty empty 0 -9 0 10 -262144 -1 -1 2400 1; #X obj 94 272 vsl 15 128 0 127 0 0 empty empty empty 0 -9 0 10 -262144 -1 -1 2100 1; #X obj 114 272 vsl 15 128 0 127 0 0 empty empty empty 0 -9 0 10 -262144 -1 -1 1800 1; #X obj 134 272 vsl 15 128 0 127 0 0 empty empty empty 0 -9 0 10 -262144 -1 -1 1500 1; #X obj 154 272 vsl 15 128 0 127 0 0 empty empty empty 0 -9 0 10 -262144 -1 -1 1200 1; #X obj 174 272 vsl 15 128 0 127 0 0 empty empty empty 0 -9 0 10 -262144 -1 -1 900 1; #X obj 194 272 vsl 15 128 0 127 0 0 empty empty empty 0 -9 0 10 -262144 -1 -1 600 1; #X obj 214 272 vsl 15 128 0 127 0 0 empty empty empty 0 -9 0 10 -262144 -1 -1 300 1; #X obj 34 27 loadbang; #X msg 34 55 matrix 10 4 0 0 0 0 0 0 0 0 0 0 10 20 30 40 50 60 70 80 90 100 100 90 80 70 60 50 40 30 20 10 0 0 0 0 0 0 0 0 0 0; #X obj 34 170 mtx_preset 10 4; #X connect 0 0 4 0; #X connect 2 0 16 0; #X connect 3 0 2 0; #X connect 4 0 1 0; #X connect 4 1 5 0; #X connect 4 2 6 0; #X connect 4 3 7 0; #X connect 4 4 8 0; #X connect 4 5 9 0; #X connect 4 6 10 0; #X connect 4 7 11 0; #X connect 4 8 12 0; #X connect 4 9 13 0; #X connect 14 0 15 0; #X connect 15 0 16 0; #X connect 16 0 0 0; #X restore 98 554 pd simple_example; #N canvas 408 247 795 409 complex_example 0; #X obj 53 165 mtx_preset 100 10; #X floatatom 319 119 5 0 0 0 - - -, f 5; #X obj 53 94 r to_mtx_preset; #X floatatom 319 139 5 0 0 0 - - -, f 5; #X floatatom 319 159 5 0 0 0 - - -, f 5; #X floatatom 319 179 5 0 0 0 - - -, f 5; #X floatatom 319 198 5 0 0 0 - - -, f 5; #X floatatom 319 99 5 0 0 0 - - -, f 5; #X obj 574 105 vradio 15 1 0 10 save_parameters empty empty 0 -8 0 10 -258113 -1 -1 2; #X text 487 164 save_presets; #X obj 599 105 vsl 15 150 10 0 0 0 getElement empty empty 0 -9 0 10 -4034 -1 -1 0 1; #X text 630 167 load / interpol presets; #X obj 70 118 r getElement; #X msg 70 142 getElements \$1; #X floatatom 51 358 5 0 0 0 - - -, f 5; #X floatatom 147 358 5 0 0 0 - - -, f 5; #X obj 53 187 route elements; #X obj 53 276 send; #X obj 53 231 unpack f f; #X msg 110 252 symbol from_mtx_preset_\$1; #X obj 371 98 preset_param 0; #X floatatom 319 242 5 0 0 0 - - -, f 5; #X text 159 20 using mtx_preset for a complex preset system management ; #X obj 371 197 preset_param 5; #X obj 371 118 preset_param 1; #X obj 371 138 preset_param 2; #X obj 371 158 preset_param 3; #X obj 371 178 preset_param 4; #X obj 371 241 preset_param 99; #X obj 51 330 r parametre_0; #X obj 147 330 r parametre_1; #X text 322 336 use _mtx_preset if you want to save and read presets in a text file; #X text 374 219 ...; #X msg 53 209 \$2 \$1; #X connect 0 0 16 0; #X connect 1 0 24 0; #X connect 2 0 0 0; #X connect 3 0 25 0; #X connect 4 0 26 0; #X connect 5 0 27 0; #X connect 6 0 23 0; #X connect 7 0 20 0; #X connect 12 0 13 0; #X connect 13 0 0 0; #X connect 16 0 33 0; #X connect 18 0 17 0; #X connect 18 1 19 0; #X connect 19 0 17 1; #X connect 20 0 7 0; #X connect 21 0 28 0; #X connect 23 0 6 0; #X connect 24 0 1 0; #X connect 25 0 3 0; #X connect 26 0 4 0; #X connect 27 0 5 0; #X connect 28 0 21 0; #X connect 29 0 14 0; #X connect 30 0 15 0; #X connect 33 0 18 0; #X restore 97 580 pd complex_example; #X text 774 292 get interpolation between line 1 and 2 element by element ; #X msg 252 393 resize 5 4; #X msg 267 419 copyRow 1 2; #X text 348 419 copy row 1 value to row 2; #X msg 700 354 mixRows 1 1 1.5; #X msg 710 398 mixElements 1 1 1.5; #X text 213 481 10 col and 3 row; #X msg 686 318 getElement 3 1.5; #X text 794 318 get interpolation between element colum 3 \, row 1 \, and element column 3 \, row 2(selector element); #X text 834 398 mix row together \, output a row elements by element line (selector mixElements x); #X text 765 267 get row 1 element by element (selector: elements x) ; #X text 335 394 change matrix size; #X text 803 355 mix row together (1 * row1 + 1* row2 + 1.5 * row3) \, output a row in 1 line (selector mixRows); #X connect 0 0 8 0; #X connect 1 0 8 0; #X connect 2 0 8 0; #X connect 3 0 8 0; #X connect 4 0 8 0; #X connect 5 0 11 0; #X connect 6 0 8 0; #X connect 7 0 11 0; #X connect 8 0 9 0; #X connect 10 0 8 0; #X connect 11 0 8 0; #X connect 15 0 8 0; #X connect 16 0 8 0; #X connect 17 0 8 0; #X connect 18 0 11 0; #X connect 19 0 11 0; #X connect 20 0 11 0; #X connect 21 0 11 0; #X connect 29 0 8 0; #X connect 30 0 8 0; #X connect 32 0 11 0; #X connect 33 0 11 0; #X connect 35 0 11 0; nusmuk/utils/once-help.pd0000664000175000017500000000060612047230726016200 0ustar zmoelnigzmoelnig#N canvas 153 103 450 300 10; #X obj 84 130 once; #X obj 84 61 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 -1; #X obj 109 100 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 -1; #X obj 84 166 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 -1; #X text 129 100 reset; #X text 120 15 once pass only 1 bang; #X connect 0 0 3 0; #X connect 1 0 0 0; #X connect 2 0 0 1; nusmuk/utils/p.pd0000664000175000017500000000013012621334120014544 0ustar zmoelnigzmoelnig#N canvas 0 0 108 111 12; #X obj 9 10 inlet; #X obj 9 38 print \$1; #X connect 0 0 1 0; nusmuk/utils/rnd_flow-help.pd0000664000175000017500000000143212047230726017064 0ustar zmoelnigzmoelnig#N canvas 579 67 428 392 10; #X obj 27 70 metro 20; #X obj 27 53 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 1 1 ; #X floatatom 68 92 5 0 0 0 - - -; #X floatatom 109 108 5 0 0 0 - - -; #X floatatom 150 124 5 0 0 0 - - -; #X obj 27 211 vsl 15 128 0 127 0 0 empty empty empty 0 -9 0 10 -262144 -1 -1 6171 1; #X obj 27 171 + 1; #X obj 27 190 * 64; #X obj 27 33 loadbang; #X obj 242 308 filtered_random; #X text 241 287 related to :; #X text 113 90 amplitude max of each step; #X text 155 107 low pass filter of the output; #X text 195 124 high pass filter of the output; #X obj 27 152 rnd_flow 0.1 20 20; #X connect 0 0 14 0; #X connect 1 0 0 0; #X connect 2 0 14 1; #X connect 3 0 14 2; #X connect 4 0 14 3; #X connect 6 0 7 0; #X connect 7 0 5 0; #X connect 8 0 1 0; #X connect 14 0 6 0; nusmuk/utils/tab_downsample_max.c0000664000175000017500000000626712603463356020027 0ustar zmoelnigzmoelnig#include "m_pd.h" #define MIN(a,b) (((a)<(b))?(a):(b)) #define MAX(a,b) (((a)>(b))?(a):(b)) static t_class *tab_downsample_max_class; typedef struct _tab_downsample_max { t_object x_obj; t_symbol *x_arrayname_src; t_symbol *x_arrayname_dst; int factor; t_outlet *b_out; } t_tab_downsample_max; void *tab_downsample_max_new(t_symbol *s_src,t_symbol *s_dst, t_float factor) { t_tab_downsample_max *x = (t_tab_downsample_max *)pd_new(tab_downsample_max_class); x->x_arrayname_src = s_src; x->x_arrayname_dst = s_dst; x->factor = MAX(1, factor); x->b_out = outlet_new(&x->x_obj, &s_bang); return (void *)x; } void tab_downsample_max_bang(t_tab_downsample_max *x) { t_garray *a_src, *a_dst; int npoints_src, npoints_dst; t_word *vec_src, *vec_dst; int nb_max, i, j, index_src; t_float tmp; if (!(a_src = (t_garray *)pd_findbyclass(x->x_arrayname_src, garray_class))) pd_error(x, "%s: no such array", x->x_arrayname_src->s_name); else if (!garray_getfloatwords(a_src, &npoints_src, &vec_src)) pd_error(x, "%s: bad template for tab_downsample", x->x_arrayname_src->s_name); else if (!(a_dst = (t_garray *)pd_findbyclass(x->x_arrayname_dst, garray_class))) pd_error(x, "%s: no such array", x->x_arrayname_dst->s_name); else if (!garray_getfloatwords(a_dst, &npoints_dst, &vec_dst)) pd_error(x, "%s: bad template for tab_downsample", x->x_arrayname_dst->s_name); else { nb_max = MIN(npoints_src/x->factor, npoints_dst); // post("nb_max = %d",nb_max); index_src = 0; for (i=0; ifactor;j++) { tmp = MAX(tmp, vec_src[index_src].w_float); // post("read : %d, %f",index_src, vec_src[index_src].w_float); // post("tmp : %f",tmp); index_src++; } vec_dst[i].w_float = tmp; // post("write : %d, %f",i, tmp); } garray_redraw(a_dst); } outlet_bang(x->b_out); } void tab_downsample_max_src(t_tab_downsample_max *x, t_symbol *s_src) { x->x_arrayname_src = s_src; } void tab_downsample_max_dst(t_tab_downsample_max *x, t_symbol *s_dst) { x->x_arrayname_dst = s_dst; } void tab_downsample_max_factor(t_tab_downsample_max *x, t_float factor) { x->factor = MAX(1, factor); } void tab_downsample_max_setup(void) { tab_downsample_max_class = class_new(gensym("tab_downsample_max"), (t_newmethod)tab_downsample_max_new, 0, sizeof(t_tab_downsample_max), CLASS_DEFAULT, A_DEFSYM, A_DEFSYM, A_DEFFLOAT, 0); class_addbang(tab_downsample_max_class, tab_downsample_max_bang); class_addmethod(tab_downsample_max_class, (t_method)tab_downsample_max_src, gensym("src"), A_DEFSYM, 0); class_addmethod(tab_downsample_max_class, (t_method)tab_downsample_max_dst, gensym("dst"), A_DEFSYM, 0); class_addmethod(tab_downsample_max_class, (t_method)tab_downsample_max_factor, gensym("factor"), A_DEFFLOAT, 0); } nusmuk/utils/tab_derivate-help.pd0000664000175000017500000000474012576317424017720 0ustar zmoelnigzmoelnig#N canvas 432 355 859 564 10; #N canvas 0 50 450 300 (subpatch) 0; #X array src1 100 float 1; #A 0 0.328571 0.307143 0.285714 0.257143 0.235714 0.214286 0.171429 0.157143 0.157143 0.128572 0.0714288 3.57628e-07 -0.0428567 -0.0857137 -0.199999 -0.257142 -0.314285 -0.42857 -0.485713 -0.542856 -0.657141 -0.707141 -0.757141 -0.799998 -0.842855 -0.928569 -0.971426 -1.01428 -1.07143 -0.714284 -0.257142 0.285714 3.57628e-07 -0.257142 -0.371427 -0.457142 -0.571427 -0.62857 -0.642855 -0.585713 -0.499999 -0.385713 -0.321428 -0.257142 -0.199999 -0.142856 -0.0857137 -0.028571 0.0714288 0.121429 0.242857 0.314285 0.114286 -0.128571 -0.342856 -0.471427 -0.485713 -0.228571 -0.0714281 0.0571431 0.2 0.257143 0.314285 0.414285 0.528571 0.457142 0.364285 0.271428 0.0714288 -0.0214282 -0.114285 -0.199999 -0.285713 -0.364285 -0.442856 -0.492856 -0.542856 -0.62857 -0.671427 -0.685712 -0.685712 -0.62857 -0.542856 -0.492856 -0.442856 -0.404761 -0.366666 -0.32857 -0.264285 -0.199999 -0.15238 -0.104761 -0.0571424 -0.00952343 0.0380955 0.0857145 0.128572 0.171429 0.214286 0.614285 ; #X coords 0 1 99 -1 200 140 1; #X restore 537 27 graph; #N canvas 0 50 450 300 (subpatch) 0; #X array dst 100 float 0; #X coords 0 1 99 -1 200 140 1; #X restore 540 217 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 60 264 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X msg 78 199 dst dst; #X msg 60 170 src1 src1; #X text 108 465 IEM KUG; #X text 88 453 musil; #X text 122 453 @; #X text 130 453 iem.at; #X text 91 475 Graz \, Austria; #X text 174 269 initial arguments:; #X text 73 243 output; #X text 129 198 xxx : change destination name; #X text 225 86 the minimum of the 3 array lengths); #X text 123 170 xxx : change source name 1; #X text 151 283 1.arg: source-name 1; #X text 212 72 (the number of samples which were added are:; #X text 43 442 (c) Thomas Musil 2000 - 2009; #X text 12 3 tab_max; #X text 90 29 max the 2 src-arrays to dst-array; #X text 54 420 ch \, help file based on :; #X text 152 299 2.arg: destination-name; #X obj 34 156 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 -1; #X obj 60 225 tab_derivate dst dst; #X obj 61 78 tab_derivate src1 dst; #X msg 89 53 20; #X text 123 54 only first 20 points; #X connect 2 0 26 0; #X connect 5 0 25 0; #X connect 6 0 25 0; #X connect 24 0 25 0; #X connect 25 0 4 0; #X connect 26 0 3 0; #X connect 27 0 26 0; nusmuk/utils/filtered_random.pd0000664000175000017500000000261512047230726017466 0ustar zmoelnigzmoelnig#N canvas 144 268 750 421 10; #X obj 58 279 outlet; #X obj 58 259 line; #X obj 58 79 loadbang; #X msg 58 99 1; #X text 86 -52 amplitude (0-100); #X text 220 -51 offset (0-100); #X text 467 -54 metro (20-5000); #X obj 83 -71 inlet; #X obj 220 -71 inlet; #X obj 339 -71 inlet; #X obj 464 -71 inlet; #X obj 590 -71 inlet; #X obj 58 199 * \$1; #X obj 58 219 + \$2; #X obj 58 179 pow \$3; #X obj 58 239 pack f \$5; #X obj 464 19 moses 0; #X msg 464 40 20; #X obj 58 139 random 100000; #X obj 58 159 / 100000; #X obj 58 119 metro 20; #X obj 472 -21 loadbang; #X obj 464 -2 \$4; #X obj 339 112 exp; #X msg 371 55 2; #X obj 371 74 log; #X obj 339 93 *; #X obj 346 -21 loadbang; #X obj 339 36 t f b; #X obj 339 -2 \$3; #X text 342 -52 courbe (-1 1); #X text 587 -52 line (0-5000); #X obj 339 17 * 10; #X connect 1 0 0 0; #X connect 2 0 3 0; #X connect 3 0 20 0; #X connect 7 0 12 1; #X connect 8 0 13 1; #X connect 9 0 29 0; #X connect 10 0 22 0; #X connect 11 0 15 1; #X connect 12 0 13 0; #X connect 13 0 15 0; #X connect 14 0 12 0; #X connect 15 0 1 0; #X connect 16 0 17 0; #X connect 16 1 20 1; #X connect 17 0 20 1; #X connect 18 0 19 0; #X connect 19 0 14 0; #X connect 20 0 18 0; #X connect 21 0 22 0; #X connect 22 0 16 0; #X connect 23 0 14 1; #X connect 24 0 25 0; #X connect 25 0 26 1; #X connect 26 0 23 0; #X connect 27 0 29 0; #X connect 28 0 26 0; #X connect 28 1 24 0; #X connect 29 0 32 0; #X connect 32 0 28 0; nusmuk/utils/tab_integrate.c0000664000175000017500000000526612576317170016772 0ustar zmoelnigzmoelnig#include "m_pd.h" #define MIN(a,b) (((a)<(b))?(a):(b)) static t_class *tab_integrate_class; typedef struct _tab_integrate { t_object x_obj; t_symbol *x_arrayname_src1; t_symbol *x_arrayname_dst; t_outlet *b_out; } t_tab_integrate; void *tab_integrate_new(t_symbol *s_src1, t_symbol *s_dst) { t_tab_integrate *x = (t_tab_integrate *)pd_new(tab_integrate_class); x->x_arrayname_src1 = s_src1; x->x_arrayname_dst = s_dst; x->b_out = outlet_new(&x->x_obj, &s_bang); return (void *)x; } void tab_integrate_compute(t_tab_integrate *x, t_float nb) { t_garray *a_src1, *a_dst; int npoints_src1, npoints_dst; t_word *vec_src1, *vec_dst; t_float integral; int nb_integrate, i; integral = 0; if (!(a_src1 = (t_garray *)pd_findbyclass(x->x_arrayname_src1, garray_class))) pd_error(x, "%s: no such array", x->x_arrayname_src1->s_name); else if (!garray_getfloatwords(a_src1, &npoints_src1, &vec_src1)) pd_error(x, "%s: bad template for tab_integrate", x->x_arrayname_src1->s_name); else if (!(a_dst = (t_garray *)pd_findbyclass(x->x_arrayname_dst, garray_class))) pd_error(x, "%s: no such array", x->x_arrayname_dst->s_name); else if (!garray_getfloatwords(a_dst, &npoints_dst, &vec_dst)) pd_error(x, "%s: bad template for tab_integrate", x->x_arrayname_dst->s_name); else { nb_integrate = MIN(npoints_src1, npoints_dst); // post("nb_integrate = %d",nb_integrate); if (nb > 0) nb_integrate = MIN(nb_integrate, nb); for (i=0; ib_out); } void tab_integrate_bang(t_tab_integrate *x) { tab_integrate_compute(x, -1) ; } void tab_integrate_float(t_tab_integrate *x, t_float nb) { tab_integrate_compute(x, nb) ; } void tab_integrate_src1(t_tab_integrate *x, t_symbol *s_src) { x->x_arrayname_src1 = s_src; } void tab_integrate_dst(t_tab_integrate *x, t_symbol *s_dst) { x->x_arrayname_dst = s_dst; } void tab_integrate_setup(void) { tab_integrate_class = class_new(gensym("tab_integrate"), (t_newmethod)tab_integrate_new, 0, sizeof(t_tab_integrate), CLASS_DEFAULT, A_DEFSYM, A_DEFSYM, A_DEFSYM, 0); class_addbang(tab_integrate_class, tab_integrate_bang); class_addfloat(tab_integrate_class, tab_integrate_float); class_addmethod(tab_integrate_class, (t_method)tab_integrate_src1, gensym("src1"), A_DEFSYM, 0); class_addmethod(tab_integrate_class, (t_method)tab_integrate_dst, gensym("dst"), A_DEFSYM, 0); } nusmuk/utils/tab_derivate.c0000664000175000017500000000533512603446654016611 0ustar zmoelnigzmoelnig#include "m_pd.h" #define MIN(a,b) (((a)<(b))?(a):(b)) static t_class *tab_derivate_class; typedef struct _tab_derivate { t_object x_obj; t_symbol *x_arrayname_src1; t_symbol *x_arrayname_dst; t_outlet *b_out; } t_tab_derivate; void *tab_derivate_new(t_symbol *s_src1, t_symbol *s_dst) { t_tab_derivate *x = (t_tab_derivate *)pd_new(tab_derivate_class); x->x_arrayname_src1 = s_src1; x->x_arrayname_dst = s_dst; x->b_out = outlet_new(&x->x_obj, &s_bang); return (void *)x; } void tab_derivate_compute(t_tab_derivate *x, t_float nb) { t_garray *a_src1, *a_dst; int npoints_src1, npoints_dst; t_word *vec_src1, *vec_dst; t_float tmp2, tmp1; int nb_derivate, i; if (!(a_src1 = (t_garray *)pd_findbyclass(x->x_arrayname_src1, garray_class))) pd_error(x, "%s: no such array", x->x_arrayname_src1->s_name); else if (!garray_getfloatwords(a_src1, &npoints_src1, &vec_src1)) pd_error(x, "%s: bad template for tab_derivate", x->x_arrayname_src1->s_name); else if (!(a_dst = (t_garray *)pd_findbyclass(x->x_arrayname_dst, garray_class))) pd_error(x, "%s: no such array", x->x_arrayname_dst->s_name); else if (!garray_getfloatwords(a_dst, &npoints_dst, &vec_dst)) pd_error(x, "%s: bad template for tab_derivate", x->x_arrayname_dst->s_name); else { nb_derivate = MIN(npoints_src1, npoints_dst); //nb_derivate = MAX(1, x->factor); // post("nb_derivate = %d",nb_derivate); if (nb > 0) nb_derivate = MIN(nb_derivate, nb); tmp1 = 0; for (i=0; ib_out); } void tab_derivate_bang(t_tab_derivate *x) { tab_derivate_compute(x, -1) ; } void tab_derivate_float(t_tab_derivate *x, t_float nb) { tab_derivate_compute(x, nb) ; } void tab_derivate_src1(t_tab_derivate *x, t_symbol *s_src) { x->x_arrayname_src1 = s_src; } void tab_derivate_dst(t_tab_derivate *x, t_symbol *s_dst) { x->x_arrayname_dst = s_dst; } void tab_derivate_setup(void) { tab_derivate_class = class_new(gensym("tab_derivate"), (t_newmethod)tab_derivate_new, 0, sizeof(t_tab_derivate), CLASS_DEFAULT, A_DEFSYM, A_DEFSYM, A_DEFSYM, 0); class_addbang(tab_derivate_class, tab_derivate_bang); class_addfloat(tab_derivate_class, tab_derivate_float); class_addmethod(tab_derivate_class, (t_method)tab_derivate_src1, gensym("src1"), A_DEFSYM, 0); class_addmethod(tab_derivate_class, (t_method)tab_derivate_dst, gensym("dst"), A_DEFSYM, 0); } nusmuk/audio/0000775000175000017500000000000012621400564013735 5ustar zmoelnigzmoelnignusmuk/audio/bq~.c0000664000175000017500000000655412047230730014711 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. */ // modification of this code by cyrille henry in order to change the biquad topology and add audio inlet for filter coefs #include "m_pd.h" #include /* ---------------- bq~ - raw bq filter ----------------- */ typedef struct bqctl { t_sample c_x1; t_sample c_x2; t_sample c_y1; t_sample c_y2; } t_bqctl; typedef struct bq_tilde { t_object x_obj; t_float x_f; t_bqctl x_cspace; t_bqctl *x_ctl; } t_bq_tilde; t_class *bq_tilde_class; static void *bq_tilde_new(t_symbol *s, int argc, t_atom *argv) { t_bq_tilde *x = (t_bq_tilde *)pd_new(bq_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); 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_ctl = &x->x_cspace; x->x_cspace.c_x1 = x->x_cspace.c_x2 = 0; x->x_cspace.c_y1 = x->x_cspace.c_y2 = 0; x->x_f = 0; return (x); } static t_int *bq_tilde_perform(t_int *w) { t_sample *in = (t_sample *)(w[1]); t_sample *ina1 = (t_sample *)(w[2]); t_sample *ina2 = (t_sample *)(w[3]); t_sample *inb1 = (t_sample *)(w[4]); t_sample *inb2 = (t_sample *)(w[5]); t_sample *inb3 = (t_sample *)(w[6]); t_sample *out = (t_sample *)(w[7]); t_bqctl *c = (t_bqctl *)(w[8]); int n = (t_int)(w[9]); int i; t_sample last_in = c->c_x1; t_sample prev_in = c->c_x2; t_sample last_out = c->c_y1; t_sample prev_out = c->c_y2; for (i = 0; i < n; i++) { t_sample output = *inb1++ * *in + *inb2++ * last_in + *inb3++ * prev_in - *ina1++ * last_out - *ina2++ * prev_out; // if (PD_BIGORSMALL(output)) // output = 0; i don't understnd why it did not compile with this 2 lines. // should be fixed latter if denormal is a problem *out++ = output; prev_in = last_in; prev_out = last_out; last_out = output; last_in = *in++; } c->c_x1 = last_in; c->c_x2 = prev_in; c->c_y1 = last_out; c->c_y2 = prev_out; return (w+10); } static void bq_tilde_set(t_bq_tilde *x, t_symbol *s, int argc, t_atom *argv) { t_bqctl *c = x->x_ctl; c->c_x1 = atom_getfloatarg(0, argc, argv); c->c_x2 = atom_getfloatarg(1, argc, argv); c->c_y1 = atom_getfloatarg(2, argc, argv); c->c_y2 = atom_getfloatarg(3, argc, argv); } static void bq_tilde_dsp(t_bq_tilde *x, t_signal **sp) { dsp_add(bq_tilde_perform, 9, sp[0]->s_vec, sp[1]->s_vec, sp[2]->s_vec, sp[3]->s_vec, sp[4]->s_vec, sp[5]->s_vec, sp[6]->s_vec, x->x_ctl, sp[0]->s_n); } void bq_tilde_setup(void) { bq_tilde_class = class_new(gensym("bq~"), (t_newmethod)bq_tilde_new, 0, sizeof(t_bq_tilde), 0, A_GIMME, 0); CLASS_MAINSIGNALIN(bq_tilde_class, t_bq_tilde, x_f); class_addmethod(bq_tilde_class, (t_method)bq_tilde_dsp, gensym("dsp"), 0); class_addmethod(bq_tilde_class, (t_method)bq_tilde_set, gensym("set"), A_GIMME, 0); class_addmethod(bq_tilde_class, (t_method)bq_tilde_set, gensym("clear"), A_GIMME, 0); } nusmuk/audio/bq_coef_peak.pd0000664000175000017500000000457512047230734016675 0ustar zmoelnigzmoelnig#N canvas 1 81 433 621 10; #X obj 50 32 inlet; #X obj 206 31 inlet; #X text 92 34 f; #X text 251 31 Q; #X obj 119 148 samplerate~; #X obj 119 125 loadbang; #X obj 176 126 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 -1; #X obj 50 180 /; #X obj 50 349 cos; #X obj 200 276 sin; #X obj 206 126 * 2; #X obj 50 574 outlet; #X obj 283 485 + 1; #X obj 50 467 * -2; #X obj 50 249 t f f; #X obj 50 519 /; #X obj 94 520 /; #X obj 139 520 /; #X obj 229 520 /; #X obj 139 574 outlet; #X obj 94 574 outlet; #X obj 184 574 outlet; #X obj 229 574 outlet; #X obj 50 226 f; #X obj 206 195 t b f; #X msg 94 458 1 \$1; #X obj 206 74 max 0; #X obj 50 73 max 0; #X obj 50 128 * 3.14159; #X msg 206 148 1 \$1; #X obj 206 170 /; #X obj 50 148 * 2; #X obj 50 548 t f f; #X obj 206 104 + 0.1; #X obj 302 32 inlet; #X text 344 198 A; #X obj 302 117 pow; #X msg 302 96 10; #X obj 302 77 t b f; #X obj 302 54 / 40; #X msg 140 460 1 \$1; #X msg 230 460 1 \$1; #X obj 230 485 -; #X obj 200 356 t f f; #X obj 302 202 t b f; #X obj 140 485 +; #X obj 94 483 -; #X obj 50 99 min 21000; #X obj 200 406 / 1; #X obj 230 407 * 1; #X obj 283 407 / 1; #X obj 200 303 * 74.2; #X obj 233 226 _sinh; #X connect 0 0 27 0; #X connect 1 0 26 0; #X connect 4 0 7 1; #X connect 5 0 4 0; #X connect 6 0 4 0; #X connect 7 0 23 0; #X connect 8 0 13 0; #X connect 9 0 51 0; #X connect 10 0 29 0; #X connect 12 0 15 1; #X connect 12 0 16 1; #X connect 12 0 17 1; #X connect 12 0 18 1; #X connect 13 0 15 0; #X connect 14 0 8 0; #X connect 14 1 9 0; #X connect 15 0 32 0; #X connect 16 0 20 0; #X connect 17 0 19 0; #X connect 18 0 22 0; #X connect 23 0 14 0; #X connect 24 0 23 0; #X connect 24 1 52 0; #X connect 25 0 46 0; #X connect 26 0 33 0; #X connect 27 0 47 0; #X connect 28 0 31 0; #X connect 29 0 30 0; #X connect 30 0 24 0; #X connect 31 0 7 0; #X connect 32 0 11 0; #X connect 32 1 21 0; #X connect 33 0 10 0; #X connect 34 0 39 0; #X connect 36 0 44 0; #X connect 37 0 36 0; #X connect 38 0 37 0; #X connect 38 1 36 1; #X connect 39 0 38 0; #X connect 40 0 45 0; #X connect 41 0 42 0; #X connect 42 0 18 0; #X connect 43 0 48 0; #X connect 43 0 49 0; #X connect 43 1 50 0; #X connect 44 0 23 0; #X connect 44 1 48 1; #X connect 44 1 49 1; #X connect 44 1 50 1; #X connect 45 0 17 0; #X connect 46 0 16 0; #X connect 47 0 28 0; #X connect 48 0 25 0; #X connect 49 0 41 0; #X connect 49 0 40 0; #X connect 50 0 12 0; #X connect 51 0 43 0; #X connect 52 0 51 1; nusmuk/audio/isinc.wav0000664000175000017500000002005412621345464015571 0ustar zmoelnigzmoelnigRIFF$ WAVEfmt wdata u~|a{yMxv:us)rpom lji|gevdbra_s^\x[YXWUTR-QOINLjKIH(GEZDBA2@>v=<:k986r5#421E0/-|,=+*('\&*%#"!} X6{xx|  !ChPDji#S- 2Y*pp!EI|O&~eN:(  /AUj:`4d2iSSd<iSB70,++,-,+&zqdS<iC[#d!^G S C o  < a ' D _ z   - ; H S ] f n t y }  | x s l e \ R G ; .   q Y @ & w W 6  ` :  sIpC\-m< vD|ILPV%a1tEb6 a7rL&vT3}aF,s`M;) |zyyyz|.>Oat3Ld};Xv.Nn5Wz(Ko"EiAe;^ -Oq5Ut )Fc7Ph+>Pbt",5=DKRX]aeilnopqqpomjgc_ZUOIB:2)  ziYH6$q[E/qX?% mS7w[?#|`D( hL1y`F-mV@*q^L:)vi^SH=4*!   )2;EOZeq}'7HYj|&:Ncw "8Ne{0G^u+BXn3I^r&8K]o$2@N\iv"(-37<@CFILNOQQRRQQPNLJGDA=94/*$ vj]PC6( q`O>- yfTA.n[G4! ubO=*xgWF6%sfYL@4(}xrmhd_\XURPNLJIIHHHIJKMOQSVY]aejnty#/:FR^kw->???>>=;:8630-*&" vlbXMB7,  }obTF8*}n_PB3$ufXJ<. wk_SG<1&zslf`ZTOJEA<841-*(%#! "$'),/37;?CHMRW]ciou|"-7BMXcoz &3@MZgt,9FS`mz&1=HS^it~  '.5<BHNTY_dimrvz~}yuqlhc^YSNHB<5/(! |rh]SH>3(|pdYMA5)xlaUJ?4)~ulc[SJB;3,$  !(/6>EMU]emv !,6AKV`kv$/9DOZdoy"+4<ENV^fov~ !#%&'()******))('%$"   woh`XPH?7.& }si_UKA7-#{qh^ULB90' |uoic]XRMHC>951,(%!  !%)-159>CHMRW]bhntz'08AJS\dmw &/8BKT]fox #*18?ELRY_ekqv|~ytnhb\VPJD=60)" ~ume\SKB:1( ~vnf^VNF>7/'  {wsolheb_\YVTQOMLJHGFEDCBBBBBBBCCDEFHIKLNPRUWZ]`cfimqtx|$+3:AIPX`gow'/7?GOW_gnv~ !&,16<AFKOTX]aeimqtx{~~{xtqmiea]YUPKGB=83-(" wpiaZRKC<4-%zrke^WPIC<6/)# ~|{zyxwwvvvvvvwwxyz{|} #)/670)#}wpjd^XRMGA<61+&!  #).38>CIOTZ`fkqw}"(/5;BHNT[agmsy  "%(*-02579;=?ABDEFGHIJKKLLLLLLLLKJJIHGEDCA@><:8631.,)&#  ztoic]WQKE?93-'!zuoje_ZUPKFA<73.*%!  !%).27;@EJOSX^chmrx} #).4:@EKPV\aglqw|  !#$&'()*+,,--......--,,+*)('&$#!   {vqkfa\VQKF@;50*% }xtojea\XSOJFB>:62.*&#   $'+/26:>BGKOSX\aejosx} $).38>CHMRW\afkpuy~     }yuqmieb^ZWSOLHEB>;852/,)&$! nusmuk/audio/bq_coef_peak-help.pd0000664000175000017500000000532312047230734017613 0ustar zmoelnigzmoelnig#N canvas 143 113 484 505 10; #X obj 29 160 hip~ 2; #X msg 43 188 clear; #X obj 156 140 pack f f f f f; #X obj 156 94 mtof; #X floatatom 156 77 5 0 0 0 - - -; #X floatatom 190 98 5 0 0 0 - - -; #X obj 29 132 noise~; #N canvas 0 0 450 300 5_line~ 0; #X obj 80 123 line~; #X obj 79 147 outlet~; #X obj 80 73 inlet; #X obj 136 123 line~; #X obj 135 147 outlet~; #X obj 136 73 inlet; #X obj 193 123 line~; #X obj 192 147 outlet~; #X obj 193 73 inlet; #X obj 247 123 line~; #X obj 246 147 outlet~; #X obj 247 73 inlet; #X obj 304 123 line~; #X obj 303 147 outlet~; #X obj 304 73 inlet; #X msg 80 96 \$1 133; #X msg 136 96 \$1 133; #X msg 193 96 \$1 133; #X msg 247 96 \$1 133; #X msg 304 96 \$1 133; #X connect 0 0 1 0; #X connect 2 0 15 0; #X connect 3 0 4 0; #X connect 5 0 16 0; #X connect 6 0 7 0; #X connect 8 0 17 0; #X connect 9 0 10 0; #X connect 11 0 18 0; #X connect 12 0 13 0; #X connect 14 0 19 0; #X connect 15 0 0 0; #X connect 16 0 3 0; #X connect 17 0 6 0; #X connect 18 0 9 0; #X connect 19 0 12 0; #X restore 45 258 pd 5_line~; #X obj 45 231 unpack f f f f f; #X obj 43 328 dac~; #X obj 156 166 t a; #X obj 44 301 *~ 0.1; #N canvas 0 0 444 301 oscillo 0; #X obj 41 25 loadbang; #X obj 26 223 metro 100; #X obj 8 -9 inlet~; #X msg 41 47 1; #X obj 42 81 tgl 20 0 empty empty Stop 0 -6 0 8 -258699 -1 -1 1 1; #X obj 118 -3 inlet; #X msg 147 48 1; #X msg 115 48 0; #X obj 118 21 moses 10; #X obj 19 263 tabwrite~ \$0-oscillo; #X obj 100 140 cnv 1 300 1 empty empty empty 20 12 0 14 -195568 -66577 0; #N canvas 0 0 767 419 (subpatch) 0; #X array \$0-oscillo 300 float 0; #X coords 0 1 299 -1 300 80 1; #X restore 100 100 graph; #X obj 110 75 change; #X obj 234 62 block~ 640 1 0.25; #X connect 0 0 3 0; #X connect 1 0 9 0; #X connect 2 0 9 0; #X connect 3 0 4 0; #X connect 4 0 1 0; #X connect 5 0 8 0; #X connect 6 0 12 0; #X connect 7 0 12 0; #X connect 8 0 7 0; #X connect 8 1 6 0; #X connect 8 1 1 1; #X connect 12 0 1 0; #X coords 0 -1 1 1 300 80 1 100 100; #X restore 29 372 pd oscillo; #X text 192 77 cutoff; #X text 155 12 notch filter coeficient for a biquad; #X text 228 96 Q; #X obj 156 116 bq_coef_peak; #X floatatom 244 98 5 0 0 0 - - -; #X text 282 96 Gain; #X obj 29 280 bq~ --------; #X connect 0 0 19 0; #X connect 1 0 19 0; #X connect 2 0 10 0; #X connect 3 0 16 0; #X connect 4 0 3 0; #X connect 5 0 16 1; #X connect 6 0 0 0; #X connect 7 0 19 1; #X connect 7 1 19 2; #X connect 7 2 19 3; #X connect 7 3 19 4; #X connect 7 4 19 5; #X connect 8 0 7 0; #X connect 8 1 7 1; #X connect 8 2 7 2; #X connect 8 3 7 3; #X connect 8 4 7 4; #X connect 10 0 8 0; #X connect 11 0 9 0; #X connect 16 0 2 0; #X connect 16 1 2 1; #X connect 16 2 2 2; #X connect 16 3 2 3; #X connect 16 4 2 4; #X connect 17 0 16 2; #X connect 19 0 11 0; #X connect 19 0 12 0; nusmuk/audio/tabosci~-help.pd0000664000175000017500000001460012047230734017035 0ustar zmoelnigzmoelnig#N canvas 72 25 1011 661 12; #X floatatom 46 55 9 0 0 0 - - -; #N canvas 0 0 450 300 (subpatch) 0; #X array array99 11 float 0; #X coords 0 1 10 -1 250 200 1; #X restore 603 153 graph; #X obj 600 27 loadbang; #X floatatom 46 12 5 0 135 0 - - -; #X obj 46 32 mtof; #X floatatom 80 380 0 0 0 0 - - -; #N canvas 159 26 706 447 output 0; #X obj 414 196 t b; #X obj 414 134 f; #X obj 414 73 inlet; #X text 421 36 mute; #X obj 414 227 f; #X msg 521 218 0; #X msg 414 104 bang; #X obj 414 166 moses 1; #X obj 521 187 t b f; #X obj 486 143 moses 1; #X obj 102 181 dbtorms; #X obj 486 113 r master-lvl; #X obj 102 52 r master-lvl; #X obj 414 257 s master-lvl; #X obj 26 222 inlet~; #X obj 244 50 inlet; #X text 244 22 level; #X obj 244 122 s master-lvl; #X msg 118 80 set \$1; #X obj 118 109 outlet; #X msg 262 78 \; pd dsp 1; #X obj 102 238 line~; #X obj 26 259 *~; #X obj 26 295 dac~; #X obj 102 210 pack 0 50; #X text 24 195 audio; #X text 114 135 show level; #X connect 0 0 4 0; #X connect 1 0 7 0; #X connect 2 0 6 0; #X connect 4 0 13 0; #X connect 5 0 13 0; #X connect 6 0 1 0; #X connect 7 0 0 0; #X connect 7 1 8 0; #X connect 8 0 5 0; #X connect 9 1 4 1; #X connect 10 0 24 0; #X connect 11 0 1 1; #X connect 11 0 9 0; #X connect 12 0 10 0; #X connect 12 0 18 0; #X connect 14 0 22 0; #X connect 15 0 17 0; #X connect 15 0 20 0; #X connect 18 0 19 0; #X connect 21 0 22 1; #X connect 22 0 23 0; #X connect 22 0 23 1; #X connect 24 0 21 0; #X restore 46 406 pd output; #X msg 116 380 MUTE; #X obj 200 293 *~; #X msg 433 193 \$1 30; #X obj 436 170 hsl 128 15 0 1 0 0 empty empty empty -2 -8 0 10 -262144 -1 -1 0 1; #X obj 434 240 -~ 1; #X obj 433 264 *~ -1; #X obj 433 217 line~; #X obj 46 294 *~; #X msg 341 214 0; #X msg 600 54 \; array99 resize 11 \; array99 0 0 0 -0.5 -0.5 1 -1 0.5 -1 0 0 0 \; pd dsp 1 \;; #X obj 200 255 tabosc4~ array99; #X text 501 149 tabosc4~; #N canvas 371 25 645 661 osc~ 0; #X obj 12 133 pack~; #X obj 14 7 inlet~; #X text 230 14 change block size; #X msg 77 379 0; #X obj 47 403 f; #X obj 63 428 + 1; #X obj 17 379 t a b; #X obj 16 245 gemhead; #X text 72 7 audio input; #X obj 13 29 rfft~; #X obj 13 51 *~; #X obj 53 53 *~; #X obj 171 72 block~ 4096 4; #X obj 12 75 /~ 4096; #X obj 12 95 log~; #X obj 12 114 *~ 0.05; #X obj 12 152 list prepend 0; #X obj 12 173 s \$0-fft; #X obj 273 189 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 -1; #X obj 273 207 t b b; #X obj 272 251 until; #X msg 272 228 2048; #X msg 331 251 0; #X obj 272 276 f; #X obj 287 299 + 1; #X obj 272 349 tabread \$0-fft; #X obj 408 348 tabread \$0-fft-lop; #X obj 272 399 +; #X obj 272 443 tabwrite \$0-fft-lop; #X obj 272 324 t f f f; #X obj 296 183 bang~; #X obj 272 421 / 8; #X obj 409 376 * 7; #X obj 77 494 tabread \$0-fft-lop; #X obj 26 611 loadbang; #X obj 47 451 t f f; #X obj 72 578 l; #X obj 22 224 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 1; #X obj 71 547 t l b; #X obj 18 659 curve 2; #X obj 46 519 pack f f f; #X floatatom 36 296 5 0 0 0 - - -; #X floatatom 78 297 5 0 0 0 - - -; #X obj 17 334 t a b; #X floatatom 72 250 5 0 0 0 - - -; #X floatatom 114 251 5 0 0 0 - - -; #X obj 17 358 repeat 2048; #X obj 14 277 translateXYZ -4 0 0; #X obj 47 471 log; #X obj 17 314 scaleXYZ 1.04 6 0; #X msg 26 633 res 2; #X obj 170 92 table \$0-fft 2048; #X obj 170 112 table \$0-fft-lop 2048; #X connect 0 0 16 0; #X connect 1 0 9 0; #X connect 3 0 4 0; #X connect 4 0 5 0; #X connect 4 0 35 0; #X connect 5 0 4 1; #X connect 6 0 39 0; #X connect 6 1 4 0; #X connect 7 0 47 0; #X connect 9 0 10 0; #X connect 9 0 10 1; #X connect 9 1 11 0; #X connect 9 1 11 1; #X connect 10 0 13 0; #X connect 11 0 13 0; #X connect 13 0 14 0; #X connect 14 0 15 0; #X connect 15 0 0 0; #X connect 16 0 17 0; #X connect 18 0 19 0; #X connect 19 0 21 0; #X connect 19 1 22 0; #X connect 20 0 23 0; #X connect 21 0 20 0; #X connect 22 0 23 1; #X connect 23 0 24 0; #X connect 23 0 29 0; #X connect 24 0 23 1; #X connect 25 0 27 0; #X connect 26 0 32 0; #X connect 27 0 31 0; #X connect 29 0 25 0; #X connect 29 1 26 0; #X connect 29 2 28 1; #X connect 30 0 19 0; #X connect 31 0 28 0; #X connect 32 0 27 1; #X connect 33 0 40 1; #X connect 34 0 50 0; #X connect 35 0 48 0; #X connect 35 1 33 0; #X connect 36 0 39 2; #X connect 37 0 7 0; #X connect 38 0 36 1; #X connect 38 1 36 0; #X connect 40 0 38 0; #X connect 40 0 39 1; #X connect 41 0 49 1; #X connect 42 0 49 2; #X connect 43 0 46 0; #X connect 43 1 3 0; #X connect 44 0 47 1; #X connect 45 0 47 2; #X connect 46 0 6 0; #X connect 47 0 49 0; #X connect 48 0 40 0; #X connect 49 0 43 0; #X connect 50 0 39 0; #X restore 55 356 pd osc~; #X msg 605 385 reset \, create \, 1; #X msg 611 407 0 \, destroy; #X msg 46 73 \$1 100; #X obj 46 96 line~; #X obj 605 429 gemwin 20; #X msg 172 77 cutoff \$1; #X floatatom 172 14 5 0 0 0 - - -; #X obj 172 34 mtof; #X floatatom 185 58 9 0 0 0 - - -; #X text 396 149 tabosc4i~; #X obj 45 333 +~; #X floatatom 286 52 5 0 0 0 - - -; #X msg 286 75 upsample \$1; #X msg 325 23 4; #X msg 286 23 2; #X obj 47 254 tabosci~ array99; #X obj 214 353 oscillo~; #X msg 364 23 8; #X text 41 458 tabosc4c~ is a drop in remplacement for tabosc4~ \, but offer an other 4 points interpolation. So \, in some case \, quality is better than the standart interpolation. Moreover \, it can use table size 2^n (and not 2^n+3) \, so you dan't have to copy the 1st 3 point of the table at the end.; #X text 764 387 <- draw spectrum with Gem; #X text 43 543 You can also adjust an upsamplig factor \, and a cutoff freq of the internal biquad. Upsample by 4 is ok most of the time. To remove "all" spectrom folding \, main sampling rate should be 96000Hz \, but it already gives good result at 44.1 or 48KHz...; #X msg 171 110 cutoff 0; #X text 255 110 no filter; #X connect 0 0 22 0; #X connect 2 0 16 0; #X connect 3 0 4 0; #X connect 4 0 0 0; #X connect 5 0 6 1; #X connect 6 0 5 0; #X connect 7 0 6 2; #X connect 8 0 30 0; #X connect 9 0 13 0; #X connect 10 0 9 0; #X connect 11 0 12 0; #X connect 12 0 14 1; #X connect 13 0 11 0; #X connect 13 0 8 1; #X connect 14 0 30 0; #X connect 15 0 17 1; #X connect 15 0 35 1; #X connect 17 0 8 0; #X connect 20 0 24 0; #X connect 21 0 24 0; #X connect 22 0 23 0; #X connect 23 0 17 0; #X connect 23 0 35 0; #X connect 25 0 35 0; #X connect 26 0 27 0; #X connect 27 0 28 0; #X connect 27 0 25 0; #X connect 30 0 6 0; #X connect 30 0 19 0; #X connect 30 0 36 0; #X connect 31 0 32 0; #X connect 32 0 35 0; #X connect 33 0 31 0; #X connect 34 0 31 0; #X connect 35 0 14 0; #X connect 37 0 31 0; #X connect 41 0 35 0; nusmuk/audio/compress_limit_sidechain~.pd0000664000175000017500000000311012456772230021523 0ustar zmoelnigzmoelnig#N canvas 514 427 571 550 10; #X declare -path ../puremapping; #X obj 23 14 inlet~; #X obj 24 373 /~; #X obj 24 442 outlet~; #X obj 323 279 dbtorms; #X obj 323 258 + 3; #X obj 323 303 + 0.1; #X obj 323 350 moses 1; #X obj 323 420 f; #X obj 323 396 + 0.5; #X obj 323 373 * 0.5; #X obj 234 82 env~ 128 64; #X obj 323 325 env+ 11; #X obj 323 467 line~; #X obj 335 83 env~ 1024 128; #X obj 234 102 max; #X msg 323 444 \$1 4; #X obj 24 324 / 44100; #X msg 24 296 128; #X obj 23 79 delwrite~ \$0-delay 3; #X text 370 422 change this curve if you wish; #X obj 282 37 declare -path ../puremapping; #X obj 361 171 bang~; #X msg 361 193 0; #X obj 323 215 max; #X obj 323 237 f; #X obj 24 232 samplerate~; #X obj 234 123 t f f; #X obj 24 167 r pd; #X obj 24 189 route dsp; #X obj 24 211 sel 1; #X obj 24 254 t b f; #X obj 24 347 delread~ \$0-delay; #X obj 234 143 outlet; #X obj 323 193 inlet; #X connect 0 0 10 0; #X connect 0 0 13 0; #X connect 0 0 18 0; #X connect 1 0 2 0; #X connect 3 0 5 0; #X connect 4 0 3 0; #X connect 5 0 11 0; #X connect 6 0 9 0; #X connect 6 1 7 0; #X connect 7 0 15 0; #X connect 8 0 7 0; #X connect 9 0 8 0; #X connect 10 0 14 0; #X connect 11 0 6 0; #X connect 12 0 1 1; #X connect 13 0 14 1; #X connect 14 0 26 0; #X connect 15 0 12 0; #X connect 16 0 31 0; #X connect 17 0 16 0; #X connect 21 0 22 0; #X connect 22 0 23 1; #X connect 23 0 24 0; #X connect 24 0 23 1; #X connect 24 0 4 0; #X connect 25 0 30 0; #X connect 26 0 32 0; #X connect 27 0 28 0; #X connect 28 0 29 0; #X connect 29 0 25 0; #X connect 30 0 17 0; #X connect 30 1 16 1; #X connect 31 0 1 0; #X connect 33 0 23 0; nusmuk/audio/bq_coef_bp-help.pd0000664000175000017500000000520512047230734017273 0ustar zmoelnigzmoelnig#N canvas 544 74 484 505 10; #X obj 29 160 hip~ 2; #X msg 39 187 clear; #X obj 156 140 pack f f f f f; #X obj 156 94 mtof; #X floatatom 156 77 5 0 0 0 - - -; #X floatatom 219 98 5 0 0 0 - - -; #X obj 29 132 noise~; #N canvas 0 0 450 300 5_line~ 0; #X obj 80 123 line~; #X obj 79 147 outlet~; #X obj 80 73 inlet; #X obj 136 123 line~; #X obj 135 147 outlet~; #X obj 136 73 inlet; #X obj 193 123 line~; #X obj 192 147 outlet~; #X obj 193 73 inlet; #X obj 247 123 line~; #X obj 246 147 outlet~; #X obj 247 73 inlet; #X obj 304 123 line~; #X obj 303 147 outlet~; #X obj 304 73 inlet; #X msg 80 96 \$1 133; #X msg 136 96 \$1 133; #X msg 193 96 \$1 133; #X msg 247 96 \$1 133; #X msg 304 96 \$1 133; #X connect 0 0 1 0; #X connect 2 0 15 0; #X connect 3 0 4 0; #X connect 5 0 16 0; #X connect 6 0 7 0; #X connect 8 0 17 0; #X connect 9 0 10 0; #X connect 11 0 18 0; #X connect 12 0 13 0; #X connect 14 0 19 0; #X connect 15 0 0 0; #X connect 16 0 3 0; #X connect 17 0 6 0; #X connect 18 0 9 0; #X connect 19 0 12 0; #X restore 45 258 pd 5_line~; #X obj 45 231 unpack f f f f f; #X obj 43 328 dac~; #X obj 156 166 t a; #X obj 44 301 *~ 0.1; #N canvas 0 0 444 301 oscillo 0; #X obj 41 25 loadbang; #X obj 26 223 metro 100; #X obj 8 -9 inlet~; #X msg 41 47 1; #X obj 42 81 tgl 20 0 empty empty Stop 0 -6 0 8 -258699 -1 -1 1 1; #X obj 118 -3 inlet; #X msg 147 48 1; #X msg 115 48 0; #X obj 118 21 moses 10; #X obj 19 263 tabwrite~ \$0-oscillo; #X obj 100 140 cnv 1 300 1 empty empty empty 20 12 0 14 -195568 -66577 0; #N canvas 0 0 767 419 (subpatch) 0; #X array \$0-oscillo 300 float 0; #X coords 0 1 299 -1 300 80 1; #X restore 100 100 graph; #X obj 110 75 change; #X obj 234 62 block~ 640 1 0.25; #X connect 0 0 3 0; #X connect 1 0 9 0; #X connect 2 0 9 0; #X connect 3 0 4 0; #X connect 4 0 1 0; #X connect 5 0 8 0; #X connect 6 0 12 0; #X connect 7 0 12 0; #X connect 8 0 7 0; #X connect 8 1 6 0; #X connect 8 1 1 1; #X connect 12 0 1 0; #X coords 0 -1 1 1 300 80 1 100 100; #X restore 29 372 pd oscillo; #X text 260 95 Q; #X text 192 77 cutoff; #X obj 156 116 bq_coef_bp; #X text 153 8 band pass filter coeficient for a biquad; #X obj 29 280 bq~ --------; #X connect 0 0 17 0; #X connect 1 0 17 0; #X connect 2 0 10 0; #X connect 3 0 15 0; #X connect 4 0 3 0; #X connect 5 0 15 1; #X connect 6 0 0 0; #X connect 7 0 17 1; #X connect 7 1 17 2; #X connect 7 2 17 3; #X connect 7 3 17 4; #X connect 7 4 17 5; #X connect 8 0 7 0; #X connect 8 1 7 1; #X connect 8 2 7 2; #X connect 8 3 7 3; #X connect 8 4 7 4; #X connect 10 0 8 0; #X connect 11 0 9 0; #X connect 15 0 2 0; #X connect 15 1 2 1; #X connect 15 2 2 2; #X connect 15 3 2 3; #X connect 15 4 2 4; #X connect 17 0 11 0; #X connect 17 0 12 0; nusmuk/audio/granulator~-help.pd0000664000175000017500000001136512047230734017574 0ustar zmoelnigzmoelnig#N canvas 122 22 1000 667 10; #X obj 115 575 soundfiler; #X msg 34 171 open \$1 \$2; #X obj 85 91 hradio 15 1 0 8 empty empty empty 0 -6 0 8 -262144 -1 -1 0; #X obj 34 67 openpanel; #X obj 34 47 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X obj 34 147 pack s f; #X obj 530 48 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 1 ; #X floatatom 581 50 5 0 0 0 - - -; #X obj 530 118 f; #X floatatom 596 176 5 0 0 0 - - -; #X floatatom 607 195 5 0 0 0 - - -; #X floatatom 654 216 5 0 0 0 - - -; #X floatatom 668 236 5 0 0 0 - - -; #X floatatom 717 255 5 0 0 0 - - -; #X floatatom 728 272 5 0 0 0 - - -; #X obj 33 576 *~ 0.1; #X obj 34 614 dac~; #X obj 596 150 line; #X obj 546 96 hradio 15 1 0 8 empty empty empty 0 -6 0 8 -262144 -1 -1 0; #X obj 530 363 pack f 0 0 50 0 69 0 1 0; #X floatatom 749 312 5 0 0 0 - - -; #X floatatom 760 329 5 0 0 0 - - -; #X text 286 24 ch 2005_04_10; #X msg 90 353 window cos; #X msg 65 199 table foo 44100; #X text 74 216 use a specific table for the audio source; #X msg 84 257 table reset; #X obj 530 71 metro 25; #X msg 596 127 0 \, 1 1000; #N canvas 148 50 1061 709 help 0; #X obj 216 107 table realtime 441000; #X obj 49 161 tabwrite~ realtime; #X obj 49 131 adc~; #X obj 29 102 metro 10000; #X obj 29 51 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 1 ; #X text 54 51 loop recording on a table; #X obj 29 75 t f f; #X msg 29 190 0 \, 1 10000; #X text 122 193 position of the recording in the table; #X obj 29 386 f; #X text 195 161 record something in a table; #X msg 43 500 table realtime 441000; #X obj 43 478 loadbang; #X obj 29 423 t b f; #X obj 29 449 pack 0 0 0.1 300 0 69 0 1 0; #X obj 29 271 line 0 150; #X text 42 293 change the line time grain to adjust to played grain size; #X text 60 388 center of the reding position (0.1 * 10s after writing in the table); #X obj 569 383 f; #X msg 583 497 table realtime 441000; #X obj 583 475 loadbang; #X obj 569 420 t b f; #X obj 569 247 spigot 0; #X obj 620 209 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 1; #X text 398 208 add an other granulator latter; #X obj 569 446 pack 0 0 0.5 60 0 69 5 1 0; #X obj 569 272 line 0 30; #X obj 29 315 - 0.1; #X obj 29 339 moses 0; #X obj 29 361 + 1; #X text 88 315 10% before the position of the writing index; #X text 93 342 to keep the number from 0 to 1; #X obj 569 312 - 0.5; #X obj 569 337 moses 0; #X obj 569 360 + 1; #X text 631 360 float modulo; #X obj 29 523 granulator~; #X obj 569 523 granulator~; #X connect 2 0 1 0; #X connect 2 1 1 0; #X connect 3 0 1 0; #X connect 3 0 7 0; #X connect 4 0 6 0; #X connect 6 0 3 0; #X connect 7 0 15 0; #X connect 7 0 22 0; #X connect 9 0 13 0; #X connect 11 0 36 0; #X connect 12 0 11 0; #X connect 13 0 14 0; #X connect 13 1 14 1; #X connect 14 0 36 0; #X connect 15 0 27 0; #X connect 18 0 21 0; #X connect 19 0 37 0; #X connect 20 0 19 0; #X connect 21 0 25 0; #X connect 21 1 25 1; #X connect 22 0 26 0; #X connect 23 0 22 1; #X connect 25 0 37 0; #X connect 26 0 32 0; #X connect 27 0 28 0; #X connect 28 0 29 0; #X connect 28 1 9 0; #X connect 29 0 9 0; #X connect 32 0 33 0; #X connect 33 0 34 0; #X connect 33 1 18 0; #X connect 34 0 18 0; #X restore 34 664 pd help RealTime Granulator; #X text 260 7 granular synthesys with pd; #X text 65 46 open a sound file; #X text 8 111 table number (8 diferents files can be open in the same time); #X text 689 95 table to read; #X text 722 236 Random; #X text 776 272 Random; #X text 810 330 Random; #X text 645 175 grain position in the sound file (0 - 1); #X text 655 196 Random on this position; #X text 704 215 grain size (ms); #X text 766 254 pich (midi); #X text 798 311 amplitude (0 - 1); #X text 539 383 Table number \, position \, Random \, size \, random \, frequency \, random \, ampitude \, random; #X text 224 353 default windowing for the grain; #X text 210 399 load a soundfile for the windowing; #X text 196 572 always connect a soundfiler here : it help locating the sound relatively to the patch folder \, and not to the abstraction folder; #X text 95 279 to get back to the internal tables; #X text 74 232 (user has to fill it manually : used for live granulation) ; #X msg 102 374 window examples/hanning.wav; #X obj 34 552 granulator~; #X connect 0 0 49 1; #X connect 1 0 49 0; #X connect 2 0 5 1; #X connect 3 0 5 0; #X connect 4 0 3 0; #X connect 5 0 1 0; #X connect 6 0 27 0; #X connect 7 0 27 1; #X connect 8 0 19 0; #X connect 9 0 19 1; #X connect 10 0 19 2; #X connect 11 0 19 3; #X connect 12 0 19 4; #X connect 13 0 19 5; #X connect 14 0 19 6; #X connect 15 0 16 0; #X connect 15 0 16 1; #X connect 17 0 9 0; #X connect 18 0 8 1; #X connect 19 0 49 0; #X connect 20 0 19 7; #X connect 21 0 19 8; #X connect 23 0 49 0; #X connect 24 0 49 0; #X connect 26 0 49 0; #X connect 27 0 8 0; #X connect 28 0 17 0; #X connect 48 0 49 0; #X connect 49 0 15 0; #X connect 49 1 0 0; nusmuk/audio/tabread4c~-help.pd0000664000175000017500000000250012047230730017232 0ustar zmoelnigzmoelnig#N canvas 252 101 743 661 10; #N canvas 0 0 450 300 (subpatch) 0; #X array array99 11 float 0; #X coords 0 1 10 -1 250 200 1; #X restore 461 80 graph; #X obj 69 195 line~; #X obj 36 139 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 -1; #X msg 69 172 0 \, 10 1000; #X obj 70 219 tabread4c~ array99; #X obj 36 32 loadbang; #X obj 296 195 line~; #X msg 296 172 0 \, 10 1000; #X obj 297 219 tabread4~ array99; #X obj 298 241 tabwrite~ test_miller; #X obj 70 241 tabwrite~ test_cubic; #X obj 36 55 t b b; #N canvas 0 0 450 300 (subpatch) 0; #X array test_miller 44100 float 0; #X coords 0 1 44099 -1 250 200 1; #X restore 295 312 graph; #N canvas 0 0 450 300 (subpatch) 0; #X array test_cubic 44100 float 0; #X coords 0 1 44099 -1 250 200 1; #X restore 34 312 graph; #X msg 63 77 \; array99 resize 10 \; array99 0 -0.5 -0.5 -0.5 0.5 0.5 0.5 -0.5 0 0 \; pd dsp 1 \;; #X text 43 531 tabread4c~ is a drop in remplacement for tabrad4~ \, but offer a 4 points cubic interpolation with tengent continuity. So \, in some case \, quality is better than the standart interpolation ; #X connect 1 0 4 0; #X connect 2 0 3 0; #X connect 2 0 7 0; #X connect 2 0 9 0; #X connect 2 0 10 0; #X connect 3 0 1 0; #X connect 4 0 10 0; #X connect 5 0 11 0; #X connect 6 0 8 0; #X connect 7 0 6 0; #X connect 8 0 9 0; #X connect 11 0 2 0; #X connect 11 1 14 0; nusmuk/audio/tabosc4c~.c0000664000175000017500000001624112212565666016020 0ustar zmoelnigzmoelnig// tabosc4c~ // can replace with tabosc4~ // most of this code comes from pd. just the interpolation shematic is diferent. /* This 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. */ // Cyrille Henry 06 2008 #include "m_pd.h" /******************** tabosc4c~ ***********************/ /* this is all copied from d_osc.c... what include file could this go in? */ #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 _WIN32 /* little-endian; most significant byte is at highest address */ #define HIOFFSET 1 #define LOWOFFSET 0 #define int32 long #endif #if defined(__FreeBSD__) || defined(__APPLE__) #include #endif #ifdef __linux__ #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 { double tf_d; int32 tf_i[2]; }; static t_class *tabosc4c_tilde_class; typedef struct _tabosc4c_tilde { t_object x_obj; t_float x_fnpoints; t_float x_finvnpoints; t_word *x_vec; t_symbol *x_arrayname; t_float x_f; double x_phase; t_float x_conv; } t_tabosc4c_tilde; static void *tabosc4c_tilde_new(t_symbol *s) { t_tabosc4c_tilde *x = (t_tabosc4c_tilde *)pd_new(tabosc4c_tilde_class); x->x_arrayname = s; x->x_vec = 0; x->x_fnpoints = 512.; x->x_finvnpoints = (1./512.); outlet_new(&x->x_obj, gensym("signal")); inlet_new(&x->x_obj, &x->x_obj.ob_pd, &s_float, gensym("ft1")); x->x_f = 0; return (x); } static t_int *tabosc4c_tilde_perform(t_int *w) { t_tabosc4c_tilde *x = (t_tabosc4c_tilde *)(w[1]); t_sample *in = (t_sample *)(w[2]); t_sample *out = (t_sample *)(w[3]); int n = (int)(w[4]); int normhipart; union tabfudge tf; double a3,a1,a2; // CH : for the interpolation t_float fnpoints = x->x_fnpoints; int mask = fnpoints - 1; t_float conv = fnpoints * x->x_conv; int maxindex; t_word *tab = x->x_vec, *addr; int i; double dphase = fnpoints * x->x_phase + UNITBIT32; if (!tab) goto zero; tf.tf_d = UNITBIT32; normhipart = tf.tf_i[HIOFFSET]; while (n--) { t_sample frac, a, b, c, d, cminusb; tf.tf_d = dphase; dphase += *in++ * conv; addr = tab + (tf.tf_i[HIOFFSET] & mask); tf.tf_i[HIOFFSET] = normhipart; frac = tf.tf_d - UNITBIT32; a = addr[0].w_float; b = addr[1].w_float; c = addr[2].w_float; d = addr[3].w_float; // cminusb = c-b; // *out++ = b + frac * ( // cminusb - 0.1666667f * (1.-frac) * ( // (d - a - 3.0f * cminusb) * frac + (d + 2.0f*a - 3.0f*b) ) ); // CH // a0 = d - c - a + b; // a1 = a - b - a0; // a2 = c - a; // *out++ = ((a0*frac+a1)*frac+a2)*frac+b; // 4-point, 3rd-order Hermite (x-form) a1 = 0.5f * (c - a); a2 = a - 2.5 * b + 2.f * c - 0.5f * d; a3 = 0.5f * (d - a) + 1.5f * (b - c); *out++ = ((a3 * frac + a2) * frac + a1) * frac + b; } tf.tf_d = UNITBIT32 * fnpoints; normhipart = tf.tf_i[HIOFFSET]; tf.tf_d = dphase + (UNITBIT32 * fnpoints - UNITBIT32); tf.tf_i[HIOFFSET] = normhipart; x->x_phase = (tf.tf_d - UNITBIT32 * fnpoints) * x->x_finvnpoints; return (w+5); zero: while (n--) *out++ = 0; return (w+5); } void tabosc4c_tilde_set(t_tabosc4c_tilde *x, t_symbol *s) { t_garray *a; int npoints, pointsinarray; x->x_arrayname = s; if (!(a = (t_garray *)pd_findbyclass(x->x_arrayname, garray_class))) { if (*s->s_name) pd_error(x, "tabosc4c~: %s: no such array", x->x_arrayname->s_name); x->x_vec = 0; } else if (!garray_getfloatwords(a, &pointsinarray, &x->x_vec)) { pd_error(x, "%s: bad template for tabosc4c~", x->x_arrayname->s_name); x->x_vec = 0; } else if ((npoints = pointsinarray - 3) != (1 << ilog2(pointsinarray - 3))) { pd_error(x, "%s: number of points (%d) not a power of 2 plus three", x->x_arrayname->s_name, pointsinarray); x->x_vec = 0; garray_usedindsp(a); } else { x->x_fnpoints = npoints; x->x_finvnpoints = 1./npoints; garray_usedindsp(a); } } static void tabosc4c_tilde_ft1(t_tabosc4c_tilde *x, t_float f) { x->x_phase = f; } static void tabosc4c_tilde_dsp(t_tabosc4c_tilde *x, t_signal **sp) { x->x_conv = 1. / sp[0]->s_sr; tabosc4c_tilde_set(x, x->x_arrayname); dsp_add(tabosc4c_tilde_perform, 4, x, sp[0]->s_vec, sp[1]->s_vec, sp[0]->s_n); } void tabosc4c_tilde_setup(void) { tabosc4c_tilde_class = class_new(gensym("tabosc4c~"), (t_newmethod)tabosc4c_tilde_new, 0, sizeof(t_tabosc4c_tilde), 0, A_DEFSYM, 0); CLASS_MAINSIGNALIN(tabosc4c_tilde_class, t_tabosc4c_tilde, x_f); class_addmethod(tabosc4c_tilde_class, (t_method)tabosc4c_tilde_dsp, gensym("dsp"), 0); class_addmethod(tabosc4c_tilde_class, (t_method)tabosc4c_tilde_set, gensym("set"), A_SYMBOL, 0); class_addmethod(tabosc4c_tilde_class, (t_method)tabosc4c_tilde_ft1, gensym("ft1"), A_FLOAT, 0); } nusmuk/audio/oscillo~.pd0000664000175000017500000000144112047230734016126 0ustar zmoelnigzmoelnig#N canvas 346 400 732 348 10; #X obj 41 25 loadbang; #X obj 26 223 metro 100; #X obj 8 -9 inlet~; #X msg 41 47 1; #X obj 42 81 tgl 20 0 empty empty Stop 0 -6 0 8 -258699 -1 -1 1 1; #X obj 118 -3 inlet; #X msg 147 48 1; #X msg 115 48 0; #X obj 118 21 moses 10; #X obj 19 263 tabwrite~ \$0-oscillo; #X obj 111 151 cnv 1 300 1 empty empty empty 20 12 0 14 -195568 -66577 0; #N canvas 0 0 767 419 (subpatch) 0; #X array \$0-oscillo 3000 float 0; #X coords 0 1 2999 -1 300 80 1; #X restore 111 111 graph; #X obj 110 75 change; #X connect 0 0 3 0; #X connect 1 0 9 0; #X connect 2 0 9 0; #X connect 3 0 4 0; #X connect 4 0 1 0; #X connect 5 0 8 0; #X connect 6 0 12 0; #X connect 7 0 12 0; #X connect 8 0 7 0; #X connect 8 1 6 0; #X connect 8 1 1 1; #X connect 12 0 1 0; #X coords 0 0 1 1 300 80 2 111 111; nusmuk/audio/saw2~-help.pd0000664000175000017500000000076412621346374016301 0ustar zmoelnigzmoelnig#N canvas 722 690 522 320 10; #X obj 43 110 sig~ 333; #X obj 43 194 dac~; #X floatatom 43 63 5 0 0 0 - - -, f 5; #X obj 137 197 oscillo~; #X obj 43 162 *~ 0.1; #X text 30 16 saw2~ is a band-limited sawtooth oscillator. similar algorythm than saw~ \, but using difernt optimisations; #X obj 43 86 mtof; #X obj 42 137 saw2~; #X obj 287 69 saw2_table_generation; #X connect 0 0 7 0; #X connect 2 0 6 0; #X connect 4 0 1 0; #X connect 4 0 1 1; #X connect 6 0 0 0; #X connect 7 0 4 0; #X connect 7 0 3 0; nusmuk/audio/compress_limit~.pd0000664000175000017500000000232212306106510017502 0ustar zmoelnigzmoelnig#N canvas 223 107 586 521 10; #X obj 23 14 inlet~; #X obj 24 373 /~; #X obj 24 402 outlet~; #X obj 234 151 dbtorms; #X obj 234 130 + 3; #X obj 234 175 + 0.1; #X obj 234 222 moses 1; #X obj 234 292 f; #X obj 234 268 + 0.5; #X obj 234 245 * 0.5; #X obj 234 58 env~ 128 64; #X obj 234 197 env+ 11; #X obj 234 339 line~; #X obj 335 59 env~ 1024 128; #X obj 234 102 max; #X msg 234 316 \$1 4; #X obj 24 294 / 44100; #X obj 24 192 loadbang; #X text 298 262 change this curve if you wish; #X obj 63 242 samplerate~; #X obj 24 218 t b b; #X obj 24 316 * 1000; #X obj 24 337 delread~ \$0-delay; #X obj 63 263 sel 0; #X msg 24 242 256; #X obj 23 79 delwrite~ \$0-delay 20; #X connect 0 0 10 0; #X connect 0 0 13 0; #X connect 0 0 25 0; #X connect 1 0 2 0; #X connect 3 0 5 0; #X connect 4 0 3 0; #X connect 5 0 11 0; #X connect 6 0 9 0; #X connect 6 1 7 0; #X connect 7 0 15 0; #X connect 8 0 7 0; #X connect 9 0 8 0; #X connect 10 0 14 0; #X connect 11 0 6 0; #X connect 12 0 1 1; #X connect 13 0 14 1; #X connect 14 0 4 0; #X connect 15 0 12 0; #X connect 16 0 21 0; #X connect 17 0 20 0; #X connect 19 0 23 0; #X connect 20 0 24 0; #X connect 20 1 19 0; #X connect 21 0 22 0; #X connect 22 0 1 0; #X connect 23 1 16 1; #X connect 24 0 16 0; nusmuk/audio/bq_coef_lowshelf.pd0000664000175000017500000000463312047230734017573 0ustar zmoelnigzmoelnig#N canvas 0 0 551 580 10; #X obj 50 32 inlet; #X text 92 34 f; #X obj 50 185 * 6.283; #X obj 106 208 samplerate~; #X obj 106 186 loadbang; #X obj 164 187 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 -1; #X obj 50 240 /; #X obj 96 292 cos; #X obj 69 291 sin; #X obj 319 36 inlet; #X text 387 176 A; #X obj 319 121 pow; #X msg 319 100 10; #X obj 319 81 t b f; #X obj 319 58 / 40; #X obj 319 212 t f f; #X obj 319 234 *; #X obj 319 254 + 1; #X obj 360 213 - 1; #X obj 360 234 t f f; #X obj 360 256 *; #X obj 319 284 -; #X text 360 309 beta; #X obj 319 308 sqrt; #X obj 319 173 t f f f; #X obj 50 263 t b f f; #X obj 50 493 /; #X obj 50 391 expr -2 * ( ($f2-1) + ($f2+1)*$f4 ) \; ($f2+1) + ($f2-1)*$f4 - $f1*$f3 \; $f2 * ( ($f2+1) - ($f2-1)*$f4 + $f1*$f3 ) \; 2 * $f2 * ( ($f2-1) - ($f2+1)*$f4 ) \; $f2 * ( ($f2+1) - ($f2-1)*$f4 - $f1*$f3 ) \; ($f2+1) + ($f2-1)*$f4 + $f1*$f3 \;; #X obj 50 525 outlet; #X obj 99 527 outlet; #X obj 149 528 outlet; #X obj 199 528 outlet; #X obj 249 529 outlet; #X obj 99 493 /; #X obj 149 496 /; #X obj 199 494 /; #X obj 249 497 /; #X obj 50 73 max 0; #X obj 50 99 min 21000; #X obj 319 149 1; #X obj 353 125 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 -1; #X obj 50 357 f; #X msg 135 281 1; #X obj 135 302 sqrt; #X obj 135 257 loadbang; #X connect 0 0 37 0; #X connect 2 0 6 0; #X connect 3 0 6 1; #X connect 4 0 3 0; #X connect 5 0 3 0; #X connect 6 0 25 0; #X connect 7 0 27 3; #X connect 8 0 27 2; #X connect 9 0 14 0; #X connect 11 0 39 0; #X connect 12 0 11 0; #X connect 13 0 12 0; #X connect 13 1 11 1; #X connect 14 0 13 0; #X connect 15 0 16 0; #X connect 15 1 16 1; #X connect 16 0 17 0; #X connect 17 0 21 0; #X connect 18 0 19 0; #X connect 19 0 20 0; #X connect 19 1 20 1; #X connect 20 0 21 1; #X connect 21 0 23 0; #X connect 23 0 27 0; #X connect 24 0 15 0; #X connect 24 1 18 0; #X connect 24 2 27 1; #X connect 25 0 41 0; #X connect 25 1 8 0; #X connect 25 2 7 0; #X connect 26 0 28 0; #X connect 27 0 26 0; #X connect 27 1 33 0; #X connect 27 2 34 0; #X connect 27 3 35 0; #X connect 27 4 36 0; #X connect 27 5 26 1; #X connect 27 5 33 1; #X connect 27 5 34 1; #X connect 27 5 35 1; #X connect 27 5 36 1; #X connect 33 0 29 0; #X connect 34 0 30 0; #X connect 35 0 31 0; #X connect 36 0 32 0; #X connect 37 0 38 0; #X connect 38 0 2 0; #X connect 39 0 24 0; #X connect 40 0 39 0; #X connect 41 0 27 0; #X connect 42 0 43 0; #X connect 42 0 27 1; #X connect 43 0 41 1; #X connect 44 0 42 0; nusmuk/audio/bq~-help.pd0000664000175000017500000001326212276363650016026 0ustar zmoelnigzmoelnig#N canvas 127 203 746 628 10; #X obj 342 172 mtof; #X floatatom 342 156 5 0 127 0 - - -, f 5; #X floatatom 477 170 5 0 0 0 - - -, f 5; #X obj 28 425 hip~ 2; #X msg 81 425 clear; #X obj 135 137 pack f f f f f; #X obj 135 91 mtof; #X floatatom 135 74 5 0 0 0 - - -, f 5; #X floatatom 240 92 5 0 0 0 - - -, f 5; #X obj 147 225 pack f f f f f; #X obj 147 180 mtof; #X floatatom 147 162 5 0 0 0 - - -, f 5; #X floatatom 252 180 5 0 0 0 - - -, f 5; #X obj 158 315 pack f f f f f; #X obj 158 270 mtof; #X floatatom 158 250 5 0 0 0 - - -, f 5; #X floatatom 263 270 5 0 0 0 - - -, f 5; #X obj 555 135 pack f f f f f; #X obj 555 90 mtof; #X floatatom 555 72 5 0 0 0 - - -, f 5; #X floatatom 673 92 5 0 0 0 - - -, f 5; #X obj 28 397 noise~; #X obj 27 520 dac~; #X obj 135 383 t a; #X obj 325 135 pack f f f f f; #X obj 325 90 mtof; #X floatatom 325 72 5 0 0 0 - - -, f 5; #X floatatom 386 90 5 0 0 0 - - -, f 5; #X obj 325 350 t a; #X floatatom 447 93 5 0 0 0 - - -, f 5; #X obj 28 493 *~ 0.1; #X obj 342 215 pack f f f f f; #X obj 358 277 mtof; #X floatatom 358 261 5 0 127 0 - - -, f 5; #X floatatom 493 275 5 0 0 0 - - -, f 5; #X obj 358 320 pack f f f f f; #X text 45 34 y(n) = b0 x(n) + b1 x(n-1) + b2 x(n-2) -a1 y(n-1) -a2 y(n-2); #N canvas 0 50 450 300 5_line~ 0; #X obj 80 123 line~; #X obj 79 147 outlet~; #X obj 80 73 inlet; #X obj 136 123 line~; #X obj 135 147 outlet~; #X obj 136 73 inlet; #X obj 193 123 line~; #X obj 192 147 outlet~; #X obj 193 73 inlet; #X obj 247 123 line~; #X obj 246 147 outlet~; #X obj 247 73 inlet; #X obj 304 123 line~; #X obj 303 147 outlet~; #X obj 304 73 inlet; #X msg 80 96 \$1 133; #X msg 136 96 \$1 133; #X msg 193 96 \$1 133; #X msg 247 96 \$1 133; #X msg 304 96 \$1 133; #X connect 0 0 1 0; #X connect 2 0 15 0; #X connect 3 0 4 0; #X connect 5 0 16 0; #X connect 6 0 7 0; #X connect 8 0 17 0; #X connect 9 0 10 0; #X connect 11 0 18 0; #X connect 12 0 13 0; #X connect 14 0 19 0; #X connect 15 0 0 0; #X connect 16 0 3 0; #X connect 17 0 6 0; #X connect 18 0 9 0; #X connect 19 0 12 0; #X restore 135 424 pd 5_line~; #X obj 135 403 unpack f f f f f; #N canvas 0 50 444 301 oscillo 0; #X obj 41 25 loadbang; #X obj 26 223 metro 100; #X obj 8 -9 inlet~; #X msg 41 47 1; #X obj 42 81 tgl 20 0 empty empty Stop 0 -6 0 8 -258699 -1 -1 1 1; #X obj 118 -3 inlet; #X msg 147 48 1; #X msg 115 48 0; #X obj 118 21 moses 10; #X obj 19 263 tabwrite~ \$0-oscillo; #X obj 100 140 cnv 1 300 1 empty empty empty 20 12 0 14 -195568 -66577 0; #N canvas 0 50 767 419 (subpatch) 0; #X array \$0-oscillo 300 float 0; #X coords 0 1 299 -1 300 80 1; #X restore 100 100 graph; #X obj 110 75 change; #X obj 234 62 block~ 640 1 0.25; #X connect 0 0 3 0; #X connect 1 0 9 0; #X connect 2 0 9 0; #X connect 3 0 4 0; #X connect 4 0 1 0; #X connect 5 0 8 0; #X connect 6 0 12 0; #X connect 7 0 12 0; #X connect 8 0 7 0; #X connect 8 1 6 0; #X connect 8 1 1 1; #X connect 12 0 1 0; #X coords 0 -1 1 1 300 80 1 100 100; #X restore 83 497 pd oscillo; #X obj 29 466 bq~ ---------; #X text 27 6 bq~ is a biquad \, but with audio input for the coeficients. Out out is :; #X text 43 52 (it's not the same structure than biquad~ ! ); #N canvas 0 98 595 201 bq~ 0; #X obj 56 60 inlet~; #X obj 192 58 inlet~; #X obj 239 58 inlet~; #X obj 319 59 inlet~; #X obj 366 59 inlet~; #X obj 412 58 inlet~; #X text 323 37 b0; #X obj 56 156 outlet~; #X msg 67 84 clear; #X text 188 34 a1; #X obj 57 113 fexpr~ $x4[0]*$x1[0] + $x5[0]*$x1[-1] + $x6[0]*$x1[-2] - $x2[0]*$y1[-1] - $x3[0]*$y1[-2]; #X connect 0 0 10 0; #X connect 1 0 10 1; #X connect 2 0 10 2; #X connect 3 0 10 3; #X connect 4 0 10 4; #X connect 5 0 10 5; #X connect 8 0 10 0; #X connect 10 0 7 0; #X restore 19 597 pd bq~ ---; #X text 101 597 <- drop in remplacement for bq~ \, using fexpr~ (lot's slower); #X obj 555 313 t a; #X obj 135 113 bq_coef_lop; #X obj 148 201 bq_coef_hip; #X obj 158 294 bq_coef_bp; #X obj 325 113 bq_coef_peak; #X obj 342 192 bq_coef_highshelf; #X obj 358 297 bq_coef_lowshelf; #X obj 555 113 bq_coef_notch; #X connect 0 0 50 0; #X connect 1 0 0 0; #X connect 2 0 50 1; #X connect 3 0 40 0; #X connect 4 0 40 0; #X connect 5 0 23 0; #X connect 6 0 46 0; #X connect 7 0 6 0; #X connect 8 0 46 1; #X connect 9 0 23 0; #X connect 10 0 47 0; #X connect 11 0 10 0; #X connect 12 0 47 1; #X connect 13 0 23 0; #X connect 14 0 48 0; #X connect 15 0 14 0; #X connect 16 0 48 1; #X connect 17 0 45 0; #X connect 18 0 52 0; #X connect 19 0 18 0; #X connect 20 0 52 1; #X connect 21 0 3 0; #X connect 23 0 38 0; #X connect 24 0 28 0; #X connect 25 0 49 0; #X connect 26 0 25 0; #X connect 27 0 49 1; #X connect 28 0 23 0; #X connect 29 0 49 2; #X connect 30 0 22 0; #X connect 30 0 22 1; #X connect 31 0 28 0; #X connect 32 0 51 0; #X connect 33 0 32 0; #X connect 34 0 51 1; #X connect 35 0 28 0; #X connect 37 0 40 1; #X connect 37 1 40 2; #X connect 37 2 40 3; #X connect 37 3 40 4; #X connect 37 4 40 5; #X connect 38 0 37 0; #X connect 38 1 37 1; #X connect 38 2 37 2; #X connect 38 3 37 3; #X connect 38 4 37 4; #X connect 40 0 39 0; #X connect 40 0 30 0; #X connect 45 0 28 0; #X connect 46 0 5 0; #X connect 46 1 5 1; #X connect 46 2 5 2; #X connect 46 3 5 3; #X connect 46 4 5 4; #X connect 47 0 9 0; #X connect 47 1 9 1; #X connect 47 2 9 2; #X connect 47 3 9 3; #X connect 47 4 9 4; #X connect 48 0 13 0; #X connect 48 1 13 1; #X connect 48 2 13 2; #X connect 48 3 13 3; #X connect 48 4 13 4; #X connect 49 0 24 0; #X connect 49 1 24 1; #X connect 49 2 24 2; #X connect 49 3 24 3; #X connect 49 4 24 4; #X connect 50 0 31 0; #X connect 50 1 31 1; #X connect 50 2 31 2; #X connect 50 3 31 3; #X connect 50 4 31 4; #X connect 51 0 35 0; #X connect 51 1 35 1; #X connect 51 2 35 2; #X connect 51 3 35 3; #X connect 51 4 35 4; #X connect 52 0 17 0; #X connect 52 1 17 1; #X connect 52 2 17 2; #X connect 52 3 17 3; #X connect 52 4 17 4; nusmuk/audio/bq_coef_bp.pd0000664000175000017500000000343112047230730016340 0ustar zmoelnigzmoelnig#N canvas 1 81 417 599 10; #X obj 50 32 inlet; #X obj 211 31 inlet; #X text 92 34 f; #X text 256 31 Q; #X obj 119 148 samplerate~; #X obj 119 125 loadbang; #X obj 176 126 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 -1; #X obj 50 180 /; #X obj 50 349 cos; #X obj 199 276 sin; #X obj 211 126 * 2; #X obj 50 544 outlet; #X obj 288 484 + 1; #X obj 50 467 * -2; #X obj 50 249 t f f; #X obj 50 519 /; #X obj 94 520 /; #X obj 139 520 /; #X obj 229 520 /; #X obj 139 544 outlet; #X obj 94 544 outlet; #X obj 184 544 outlet; #X obj 229 544 outlet; #X obj 50 226 f; #X obj 211 195 t b f; #X msg 94 438 1 \$1; #X obj 94 483 -; #X obj 229 481 * -1; #X msg 184 520 0; #X obj 199 330 t f b f; #X obj 211 74 max 0; #X obj 50 73 max 0; #X obj 50 122 * 3.14159; #X obj 211 105 + 0.7; #X msg 211 148 1 \$1; #X obj 211 170 /; #X obj 50 148 * 2; #X obj 50 99 min 21000; #X obj 199 303 * 0.767; #X obj 238 242 _sinh; #X connect 0 0 31 0; #X connect 1 0 30 0; #X connect 4 0 7 1; #X connect 5 0 4 0; #X connect 6 0 4 0; #X connect 7 0 23 0; #X connect 8 0 13 0; #X connect 9 0 38 0; #X connect 10 0 34 0; #X connect 12 0 15 1; #X connect 12 0 16 1; #X connect 12 0 17 1; #X connect 12 0 18 1; #X connect 13 0 15 0; #X connect 14 0 8 0; #X connect 14 1 9 0; #X connect 15 0 11 0; #X connect 16 0 20 0; #X connect 17 0 19 0; #X connect 18 0 22 0; #X connect 23 0 14 0; #X connect 24 0 23 0; #X connect 24 1 39 0; #X connect 25 0 26 0; #X connect 26 0 16 0; #X connect 27 0 18 0; #X connect 28 0 21 0; #X connect 29 0 25 0; #X connect 29 0 17 0; #X connect 29 0 27 0; #X connect 29 1 28 0; #X connect 29 2 12 0; #X connect 30 0 33 0; #X connect 31 0 37 0; #X connect 32 0 36 0; #X connect 33 0 10 0; #X connect 34 0 35 0; #X connect 35 0 24 0; #X connect 36 0 7 0; #X connect 37 0 32 0; #X connect 38 0 29 0; #X connect 39 0 38 1; nusmuk/audio/bq_list~-help.pd0000664000175000017500000000053512047230734017050 0ustar zmoelnigzmoelnig#N canvas 597 154 528 273 10; #X obj 77 143 dac~; #X obj 77 53 osc~ 444; #X obj 78 118 bq_list~ 5; #X text 152 25 same than bq~ \, but with list input for the coef; #X msg 135 96 0 0 1 0 0; #X obj 135 74 loadbang; #X text 129 162 arg1 : parametters interpolation time; #X connect 1 0 2 0; #X connect 2 0 0 0; #X connect 4 0 2 1; #X connect 5 0 4 0; nusmuk/audio/distortion2~.pd0000664000175000017500000000076212621343100016735 0ustar zmoelnigzmoelnig#N canvas 265 493 302 376 10; #X obj 174 38 inlet~; #X obj 47 146 *~; #X obj 159 126 *~; #X obj 49 270 outlet~; #X obj 48 38 inlet~; #X obj 159 102 abs~; #X obj 161 149 +~ 1; #X obj 64 121 +~ 1; #X obj 106 178 /~; #X obj 107 149 sig~ 1; #X obj 48 219 *~; #X connect 0 0 2 1; #X connect 0 0 7 0; #X connect 1 0 10 0; #X connect 2 0 6 0; #X connect 4 0 1 0; #X connect 4 0 5 0; #X connect 5 0 2 0; #X connect 6 0 8 1; #X connect 7 0 1 1; #X connect 8 0 10 1; #X connect 9 0 8 0; #X connect 10 0 3 0; nusmuk/audio/tabosc4c~-help.pd0000664000175000017500000000504112047230734017112 0ustar zmoelnigzmoelnig#N canvas 298 40 774 479 12; #X floatatom 41 42 9 0 0 0 - - -; #X obj 41 63 sig~ 100; #N canvas 0 0 450 300 (subpatch) 0; #X array array99 11 float 0; #X coords 0 1 10 -1 250 200 1; #X restore 436 180 graph; #X obj 437 48 loadbang; #X floatatom 41 -1 5 0 0 0 - - -; #X obj 41 19 mtof; #X floatatom 77 307 0 0 0 0 - - -; #N canvas 159 26 706 447 output 0; #X obj 414 196 t b; #X obj 414 134 f; #X obj 414 73 inlet; #X text 421 36 mute; #X obj 414 227 f; #X msg 521 218 0; #X msg 414 104 bang; #X obj 414 166 moses 1; #X obj 521 187 t b f; #X obj 486 143 moses 1; #X obj 102 181 dbtorms; #X obj 486 113 r master-lvl; #X obj 102 52 r master-lvl; #X obj 414 257 s master-lvl; #X obj 26 222 inlet~; #X obj 244 50 inlet; #X text 244 22 level; #X obj 244 122 s master-lvl; #X msg 118 80 set \$1; #X obj 118 109 outlet; #X msg 262 78 \; pd dsp 1; #X obj 102 238 line~; #X obj 26 259 *~; #X obj 26 295 dac~; #X obj 102 210 pack 0 50; #X text 24 195 audio; #X text 114 135 show level; #X connect 0 0 4 0; #X connect 1 0 7 0; #X connect 2 0 6 0; #X connect 4 0 13 0; #X connect 5 0 13 0; #X connect 6 0 1 0; #X connect 7 0 0 0; #X connect 7 1 8 0; #X connect 8 0 5 0; #X connect 9 1 4 1; #X connect 10 0 24 0; #X connect 11 0 1 1; #X connect 11 0 9 0; #X connect 12 0 10 0; #X connect 12 0 18 0; #X connect 14 0 22 0; #X connect 15 0 17 0; #X connect 15 0 20 0; #X connect 18 0 19 0; #X connect 21 0 22 1; #X connect 22 0 23 0; #X connect 22 0 23 1; #X connect 24 0 21 0; #X restore 43 333 pd output; #X msg 113 307 MUTE; #X obj 42 123 tabosc4~ array99; #X obj 179 230 *~; #X msg 356 42 \$1 30; #X obj 359 19 hsl 128 15 0 1 0 0 empty empty empty -2 -8 0 10 -262144 -1 -1 0 1; #X obj 357 89 -~ 1; #X obj 356 113 *~ -1; #X obj 356 66 line~; #X obj 43 231 *~; #X text 498 18 tabosc4~; #X text 279 17 tabosc4c~; #X msg 294 67 0; #X obj 178 123 tabosc4c~ array99; #X msg 437 75 \; array99 resize 11 \; array99 0 0 0 -0.5 -0.5 1 -1 0.5 -1 0 0 0 \; pd dsp 1 \;; #X text 40 395 tabosc4c~ is a drop in remplacement for tabosc4~ \, but offer a 4 points cubic interpolation with tengent continuity. So \, in some case \, quality is better than the standart interpolation ; #X connect 0 0 1 0; #X connect 1 0 9 0; #X connect 1 0 20 0; #X connect 3 0 21 0; #X connect 4 0 5 0; #X connect 5 0 0 0; #X connect 6 0 7 1; #X connect 7 0 6 0; #X connect 8 0 7 2; #X connect 9 0 16 0; #X connect 10 0 7 0; #X connect 11 0 15 0; #X connect 12 0 11 0; #X connect 13 0 14 0; #X connect 14 0 10 1; #X connect 15 0 13 0; #X connect 15 0 16 1; #X connect 16 0 7 0; #X connect 19 0 9 1; #X connect 19 0 20 1; #X connect 20 0 10 0; nusmuk/audio/nusmuk-audio-meta.pd0000664000175000017500000000077012621401574017635 0ustar zmoelnigzmoelnig#N canvas 8 85 496 221 10; #X text 10 157 LICENSE GNU GPL; #X text 10 39 AUTHOR Cyrille Henry; #X text 10 19 NAME nusmuk_audio; #X text 10 58 DESCRIPTION This objects' collection is based on abstractions and externals. They aim at improving audio synthesis quality within Pure Data. This collection enholds band limited oscillator and objects that read tables in a more flexible way than the Pure Data native ones. Some filters and various objects are also available.; #X text 9 177 VERSION 2.01511e+07; nusmuk/audio/_sinh.pd0000664000175000017500000000053012047230734015362 0ustar zmoelnigzmoelnig#N canvas 844 348 450 360 10; #X obj 39 100 exp; #X obj 66 78 * -1; #X obj 39 58 t f f; #X obj 66 99 exp; #X obj 39 124 -; #X obj 39 145 / 2; #X obj 39 35 inlet; #X obj 39 171 outlet; #X connect 0 0 4 0; #X connect 1 0 3 0; #X connect 2 0 0 0; #X connect 2 1 1 0; #X connect 3 0 4 1; #X connect 4 0 5 0; #X connect 5 0 7 0; #X connect 6 0 2 0; nusmuk/audio/bq_coef_lop-help.pd0000664000175000017500000000520512047230734017464 0ustar zmoelnigzmoelnig#N canvas 544 74 484 505 10; #X obj 29 160 hip~ 2; #X msg 42 190 clear; #X obj 156 140 pack f f f f f; #X obj 156 94 mtof; #X floatatom 156 77 5 0 0 0 - - -; #X floatatom 219 98 5 0 0 0 - - -; #X obj 29 132 noise~; #N canvas 0 0 450 300 5_line~ 0; #X obj 80 123 line~; #X obj 79 147 outlet~; #X obj 80 73 inlet; #X obj 136 123 line~; #X obj 135 147 outlet~; #X obj 136 73 inlet; #X obj 193 123 line~; #X obj 192 147 outlet~; #X obj 193 73 inlet; #X obj 247 123 line~; #X obj 246 147 outlet~; #X obj 247 73 inlet; #X obj 304 123 line~; #X obj 303 147 outlet~; #X obj 304 73 inlet; #X msg 80 96 \$1 133; #X msg 136 96 \$1 133; #X msg 193 96 \$1 133; #X msg 247 96 \$1 133; #X msg 304 96 \$1 133; #X connect 0 0 1 0; #X connect 2 0 15 0; #X connect 3 0 4 0; #X connect 5 0 16 0; #X connect 6 0 7 0; #X connect 8 0 17 0; #X connect 9 0 10 0; #X connect 11 0 18 0; #X connect 12 0 13 0; #X connect 14 0 19 0; #X connect 15 0 0 0; #X connect 16 0 3 0; #X connect 17 0 6 0; #X connect 18 0 9 0; #X connect 19 0 12 0; #X restore 45 258 pd 5_line~; #X obj 45 231 unpack f f f f f; #X obj 43 328 dac~; #X obj 156 166 t a; #X obj 44 301 *~ 0.1; #X obj 156 116 bq_coef_lop; #N canvas 0 0 444 301 oscillo 0; #X obj 41 25 loadbang; #X obj 26 223 metro 100; #X obj 8 -9 inlet~; #X msg 41 47 1; #X obj 42 81 tgl 20 0 empty empty Stop 0 -6 0 8 -258699 -1 -1 1 1; #X obj 118 -3 inlet; #X msg 147 48 1; #X msg 115 48 0; #X obj 118 21 moses 10; #X obj 19 263 tabwrite~ \$0-oscillo; #X obj 100 140 cnv 1 300 1 empty empty empty 20 12 0 14 -195568 -66577 0; #N canvas 0 0 767 419 (subpatch) 0; #X array \$0-oscillo 300 float 0; #X coords 0 1 299 -1 300 80 1; #X restore 100 100 graph; #X obj 110 75 change; #X obj 234 62 block~ 640 1 0.25; #X connect 0 0 3 0; #X connect 1 0 9 0; #X connect 2 0 9 0; #X connect 3 0 4 0; #X connect 4 0 1 0; #X connect 5 0 8 0; #X connect 6 0 12 0; #X connect 7 0 12 0; #X connect 8 0 7 0; #X connect 8 1 6 0; #X connect 8 1 1 1; #X connect 12 0 1 0; #X coords 0 -1 1 1 300 80 1 100 100; #X restore 29 372 pd oscillo; #X text 153 8 low pass filter coeficient for a biquad; #X text 260 95 Q; #X text 192 77 cutoff; #X obj 29 280 bq~ --------; #X connect 0 0 17 0; #X connect 1 0 17 0; #X connect 2 0 10 0; #X connect 3 0 12 0; #X connect 4 0 3 0; #X connect 5 0 12 1; #X connect 6 0 0 0; #X connect 7 0 17 1; #X connect 7 1 17 2; #X connect 7 2 17 3; #X connect 7 3 17 4; #X connect 7 4 17 5; #X connect 8 0 7 0; #X connect 8 1 7 1; #X connect 8 2 7 2; #X connect 8 3 7 3; #X connect 8 4 7 4; #X connect 10 0 8 0; #X connect 11 0 9 0; #X connect 12 0 2 0; #X connect 12 1 2 1; #X connect 12 2 2 2; #X connect 12 3 2 3; #X connect 12 4 2 4; #X connect 17 0 11 0; #X connect 17 0 13 0; nusmuk/audio/examples/0000775000175000017500000000000012047230734015555 5ustar zmoelnigzmoelnignusmuk/audio/examples/hanning.wav0000664000175000017500000000405412047230734017721 0ustar zmoelnigzmoelnigRIFF$WAVEfmt DXdata %,4<ENYco{':Ncx6Ql:Z{%In-U}%P|0_P N # Z  9 s ! \  N GHP`1wM'qO2~fP?0%xqmmo t #!|!!-"""9###H$$$Y%%&l&&%'''<(((U))*p**.+++L,, -k--,...O//0s006111\22!333I445r558666c77*888V99:::J;;m>>6??@d@@-AAA[BB#CCCQDDE}EEEFF GqGG9HHIdII*JJJTKKL|LLAMMNgNN+OOOOPPQrQQ3RRRTSSTrTT0UUULVVWfWW X}XX7YYYKZZ[][[\l\\ ]y]]+^^^4___9```=aaa=bbb:ccc4ddd,e}eefpffg_gggKhhh4iiijejjjEkkk!ljlllAmmmnZnnn(okooo4pvppp8qyqqq6rtrrr+sgssstStttt6unuuuvGv|vvvwKw}wwwxAxqxxxx*yWyyyyz/zYzzzzz {G{l{{{{{ |B|c|||||}!}>}[}w}}}}}}~-~D~[~q~~~~~~~~/?N]jxxj]N?/~~~~~~~q~[~D~-~~}}}}}w}[}>}!}}||||c|B| |{{{{l{G{ {zzzzYz/zzyyyWy*yxxxqxAxxww}wKwwvv|vGvvuunu6utttSttssgs+srrtr6rqqyq8qppvp4pooko(onnZnnmmAmlljl!lkkEkjjejjii4ihhKhgg_ggfpffe}e,edd4dcc:cbb=baa=a``9`__4_^^+^]y] ]\l\\[][[ZKZYY7YX}X XWfWWVLVUU0UTrTTSTSRR3RQrQQPOPOO+ONgNNMAML|LLKTKJJ*JIdIIH9HGqG GFEFE}EEDQDCC#CB[BAA-A@d@@?6?>m> >=@== 1; #X msg 193 139 1.05; #X obj 286 54 pow 3; #X obj 367 57 pow 3; #X obj 525 58 pow 2; #X obj 524 27 / 6; #X obj 367 29 / 6; #X obj 286 29 / 6; #X obj 119 219 r \$0-rampe_time; #X connect 0 0 10 0; #X connect 1 0 0 0; #X connect 2 0 1 0; #X connect 3 0 0 0; #X connect 4 0 20 0; #X connect 5 0 6 0; #X connect 6 0 18 0; #X connect 7 0 0 0; #X connect 8 0 4 0; #X connect 8 1 9 0; #X connect 9 0 3 0; #X connect 10 0 12 0; #X connect 10 0 19 0; #X connect 11 0 2 0; #X connect 13 0 8 0; #X connect 14 0 26 0; #X connect 15 0 25 0; #X connect 16 0 7 1; #X connect 17 0 24 0; #X connect 18 0 7 0; #X connect 19 0 5 0; #X connect 20 0 0 0; #X connect 21 0 4 1; #X connect 22 0 18 1; #X connect 23 0 9 1; #X connect 24 0 23 0; #X connect 25 0 22 0; #X connect 26 0 21 0; #X connect 27 0 10 1; nusmuk/audio/bq_coef_highshelf-help.pd0000664000175000017500000000522112047230734020631 0ustar zmoelnigzmoelnig#N canvas 143 113 484 505 10; #X obj 29 160 hip~ 2; #X msg 39 189 clear; #X obj 156 140 pack f f f f f; #X obj 156 94 mtof; #X floatatom 156 77 5 0 0 0 - - -; #X floatatom 219 98 5 0 0 0 - - -; #X obj 29 132 noise~; #N canvas 0 0 450 300 5_line~ 0; #X obj 80 123 line~; #X obj 79 147 outlet~; #X obj 80 73 inlet; #X obj 136 123 line~; #X obj 135 147 outlet~; #X obj 136 73 inlet; #X obj 193 123 line~; #X obj 192 147 outlet~; #X obj 193 73 inlet; #X obj 247 123 line~; #X obj 246 147 outlet~; #X obj 247 73 inlet; #X obj 304 123 line~; #X obj 303 147 outlet~; #X obj 304 73 inlet; #X msg 80 96 \$1 133; #X msg 136 96 \$1 133; #X msg 193 96 \$1 133; #X msg 247 96 \$1 133; #X msg 304 96 \$1 133; #X connect 0 0 1 0; #X connect 2 0 15 0; #X connect 3 0 4 0; #X connect 5 0 16 0; #X connect 6 0 7 0; #X connect 8 0 17 0; #X connect 9 0 10 0; #X connect 11 0 18 0; #X connect 12 0 13 0; #X connect 14 0 19 0; #X connect 15 0 0 0; #X connect 16 0 3 0; #X connect 17 0 6 0; #X connect 18 0 9 0; #X connect 19 0 12 0; #X restore 45 258 pd 5_line~; #X obj 45 231 unpack f f f f f; #X obj 43 328 dac~; #X obj 156 166 t a; #X obj 44 301 *~ 0.1; #N canvas 0 0 444 301 oscillo 0; #X obj 41 25 loadbang; #X obj 26 223 metro 100; #X obj 8 -9 inlet~; #X msg 41 47 1; #X obj 42 81 tgl 20 0 empty empty Stop 0 -6 0 8 -258699 -1 -1 1 1; #X obj 118 -3 inlet; #X msg 147 48 1; #X msg 115 48 0; #X obj 118 21 moses 10; #X obj 19 263 tabwrite~ \$0-oscillo; #X obj 100 140 cnv 1 300 1 empty empty empty 20 12 0 14 -195568 -66577 0; #N canvas 0 0 767 419 (subpatch) 0; #X array \$0-oscillo 300 float 0; #X coords 0 1 299 -1 300 80 1; #X restore 100 100 graph; #X obj 110 75 change; #X obj 234 62 block~ 640 1 0.25; #X connect 0 0 3 0; #X connect 1 0 9 0; #X connect 2 0 9 0; #X connect 3 0 4 0; #X connect 4 0 1 0; #X connect 5 0 8 0; #X connect 6 0 12 0; #X connect 7 0 12 0; #X connect 8 0 7 0; #X connect 8 1 6 0; #X connect 8 1 1 1; #X connect 12 0 1 0; #X coords 0 -1 1 1 300 80 1 100 100; #X restore 29 372 pd oscillo; #X text 192 77 cutoff; #X text 153 8 high shelf filter coeficient for a biquad; #X obj 156 116 bq_coef_highshelf; #X text 260 95 gain; #X obj 29 280 bq~ --------; #X connect 0 0 17 0; #X connect 1 0 17 0; #X connect 2 0 10 0; #X connect 3 0 15 0; #X connect 4 0 3 0; #X connect 5 0 15 1; #X connect 6 0 0 0; #X connect 7 0 17 1; #X connect 7 1 17 2; #X connect 7 2 17 3; #X connect 7 3 17 4; #X connect 7 4 17 5; #X connect 8 0 7 0; #X connect 8 1 7 1; #X connect 8 2 7 2; #X connect 8 3 7 3; #X connect 8 4 7 4; #X connect 10 0 8 0; #X connect 11 0 9 0; #X connect 15 0 2 0; #X connect 15 1 2 1; #X connect 15 2 2 2; #X connect 15 3 2 3; #X connect 15 4 2 4; #X connect 17 0 11 0; #X connect 17 0 12 0; nusmuk/audio/spatialisation~.pd0000664000175000017500000000727312413711732017516 0ustar zmoelnigzmoelnig#N canvas 796 577 724 341 10; #X obj 30 10 inlet~; #X obj 157 9 inlet~; #X obj 284 7 inlet~; #X text 47 28 audio; #N canvas 50 92 722 382 modulo 0; #X obj 46 17 inlet~; #X obj 281 17 inlet~; #X obj 45 245 outlet~; #X obj 281 247 outlet~; #X obj 45 42 abs~; #X connect 0 0 4 0; #X connect 1 0 3 0; #X connect 4 0 2 0; #X restore 156 69 pd modulo _________; #X obj 30 278 outlet~; #X obj 285 277 outlet~; #N canvas 103 635 718 372 pan 0; #X obj 30 35 inlet~; #X obj 28 266 outlet~; #X obj 256 40 inlet~; #X obj 257 182 cos~; #X obj 319 183 cos~; #X obj 97 266 outlet~; #X obj 97 36 inlet~; #X obj 186 36 inlet~; #X obj 98 227 *~; #X obj 29 225 *~; #X text 312 43 pan; #X obj 256 74 *~ \$4; #X obj 257 97 /~ 3.14159; #X obj 257 130 *~ 0.5; #X obj 318 205 +~ 1; #X obj 318 229 *~ 0.5; #X obj 256 205 +~ 1; #X obj 256 229 *~ 0.5; #X obj 256 157 +~ 0.25; #X obj 319 159 -~ 0.25; #X obj 247 273 _snapshot~; #X obj 355 273 _snapshot~; #X connect 0 0 9 0; #X connect 2 0 11 0; #X connect 3 0 16 0; #X connect 4 0 14 0; #X connect 6 0 8 0; #X connect 8 0 5 0; #X connect 9 0 1 0; #X connect 11 0 12 0; #X connect 12 0 13 0; #X connect 13 0 18 0; #X connect 13 0 19 0; #X connect 14 0 15 0; #X connect 15 0 8 1; #X connect 15 0 21 0; #X connect 16 0 17 0; #X connect 17 0 9 1; #X connect 17 0 20 0; #X connect 18 0 3 0; #X connect 19 0 4 0; #X restore 30 230 pd pan ______________________________; #X text 307 28 theta (radian); #N canvas 860 561 478 334 volume_distance 0; #X obj 26 15 inlet~; #X obj 193 13 inlet~; #X obj 256 13 inlet~; #X obj 26 250 outlet~; #X obj 194 250 outlet~; #X obj 255 249 outlet~; #X obj 25 208 /~; #X obj 42 165 +~ 1; #X obj 43 139 *~ \$1; #X connect 0 0 6 0; #X connect 1 0 4 0; #X connect 1 0 8 0; #X connect 2 0 5 0; #X connect 6 0 3 0; #X connect 7 0 6 1; #X connect 8 0 7 0; #X restore 29 115 pd volume_distance __________________; #N canvas 50 92 853 406 doppler 0; #X obj 47 233 vd~ \$0-doepler; #X obj 46 41 inlet~; #X obj 48 262 outlet~; #X obj 46 83 delwrite~ \$0-doepler 1000; #X obj 324 45 inlet~; #X obj 505 46 inlet~; #X obj 324 266 outlet~; #X obj 505 262 outlet~; #X obj 48 207 *~ 0.34; #X text 112 208 convertion mettre -> ms; #X obj 49 186 *~ \$2; #X connect 0 0 2 0; #X connect 1 0 3 0; #X connect 4 0 6 0; #X connect 4 0 10 0; #X connect 5 0 7 0; #X connect 8 0 0 0; #X connect 10 0 8 0; #X restore 30 152 pd doppler __________________________; #N canvas 60 220 779 732 decalage_temporel 0; #X obj 29 44 inlet~; #X obj 131 357 outlet~; #X obj 496 49 inlet~; #X obj 32 355 outlet~; #X obj 29 85 delwrite~ \$0-delay 100; #X obj 131 330 vd~ \$0-delay; #X obj 32 330 vd~ \$0-delay; #X obj 278 49 inlet~; #X obj 278 352 outlet~; #X obj 495 353 outlet~; #X obj 33 251 cos~; #X obj 133 248 cos~; #X obj 33 222 -~ 0.25; #X obj 30 144 /~ 6.28; #X obj 132 222 +~ 0.25; #X obj 32 273 *~ \$3; #X obj 132 271 *~ \$3; #X connect 0 0 4 0; #X connect 2 0 9 0; #X connect 2 0 13 0; #X connect 5 0 1 0; #X connect 6 0 3 0; #X connect 7 0 8 0; #X connect 10 0 15 0; #X connect 11 0 16 0; #X connect 12 0 10 0; #X connect 13 0 12 0; #X connect 13 0 14 0; #X connect 14 0 11 0; #X connect 15 0 6 0; #X connect 16 0 5 0; #X restore 30 190 pd decalage_temporel ________________; #X text 309 117 \$1 : amplitude atenuation regarding the distance; #X text 309 152 \$2 : doepler effect; #X text 310 190 \$3 : distance beetween 2 speeker; #X text 310 230 \$4 : panoramic effect; #X text 171 30 r (metter); #X connect 0 0 9 0; #X connect 1 0 4 0; #X connect 2 0 4 1; #X connect 4 0 9 1; #X connect 4 1 9 2; #X connect 7 0 5 0; #X connect 7 1 6 0; #X connect 9 0 10 0; #X connect 9 1 10 1; #X connect 9 2 10 2; #X connect 10 0 11 0; #X connect 10 1 11 1; #X connect 10 2 11 2; #X connect 11 0 7 0; #X connect 11 1 7 1; #X connect 11 2 7 2; #X connect 11 3 7 3; nusmuk/audio/granulator~.pd0000664000175000017500000047077412047230734016663 0ustar zmoelnigzmoelnig#N canvas 51 92 1066 445 10; #X obj 223 392 outlet; #X obj 44 388 outlet~; #X obj 220 14 inlet; #X obj 513 25 inlet; #X msg 514 351 \; \$1 \$2 \;; #X obj 513 239 t b f; #X obj 514 284 f; #X obj 514 328 pack s f; #N canvas 0 0 1139 604 choix_table 0; #X obj 26 18 inlet; #X obj 26 526 outlet; #X obj 26 196 t f f; #X obj 123 527 outlet; #X obj 134 286 r \$0-table0; #X msg 134 312 set \$1; #X obj 123 258 sel 0 1 2 3 4 5 6 7; #X msg 123 338 1024; #X msg 226 313 set \$1; #X msg 215 339 0; #X msg 314 315 set \$1; #X msg 303 341 0; #X msg 406 316 set \$1; #X msg 395 342 0; #X msg 493 318 set \$1; #X msg 482 344 0; #X msg 585 319 set \$1; #X msg 574 345 0; #X msg 673 321 set \$1; #X msg 662 347 0; #X msg 765 322 set \$1; #X msg 754 348 0; #X obj 227 287 r \$0-table1; #X obj 314 289 r \$0-table2; #X obj 406 290 r \$0-table3; #X obj 493 292 r \$0-table4; #X obj 585 293 r \$0-table5; #X obj 673 295 r \$0-table6; #X obj 765 296 r \$0-table7; #X obj 26 222 makefilename \$0-table%d; #X obj 133 17 inlet; #X obj 133 158 unpack s f; #X obj 96 183 symbol; #X obj 96 155 t b; #X obj 26 131 spigot 1; #X obj 96 132 spigot 0; #X obj 133 42 route reset; #X msg 77 89 1; #X msg 88 111 0; #X msg 205 89 1; #X msg 147 90 0; #X obj 205 65 t b a; #X connect 0 0 34 0; #X connect 0 0 35 0; #X connect 2 0 29 0; #X connect 2 1 6 0; #X connect 4 0 5 0; #X connect 5 0 7 0; #X connect 6 0 7 0; #X connect 6 1 9 0; #X connect 6 2 11 0; #X connect 6 3 13 0; #X connect 6 4 15 0; #X connect 6 5 17 0; #X connect 6 6 19 0; #X connect 6 7 21 0; #X connect 7 0 3 0; #X connect 8 0 9 0; #X connect 9 0 3 0; #X connect 10 0 11 0; #X connect 11 0 3 0; #X connect 12 0 13 0; #X connect 13 0 3 0; #X connect 14 0 15 0; #X connect 15 0 3 0; #X connect 16 0 17 0; #X connect 17 0 3 0; #X connect 18 0 19 0; #X connect 19 0 3 0; #X connect 20 0 21 0; #X connect 21 0 3 0; #X connect 22 0 8 0; #X connect 23 0 10 0; #X connect 24 0 12 0; #X connect 25 0 14 0; #X connect 26 0 16 0; #X connect 27 0 18 0; #X connect 28 0 20 0; #X connect 29 0 1 0; #X connect 30 0 36 0; #X connect 31 0 32 1; #X connect 31 1 3 0; #X connect 32 0 1 0; #X connect 33 0 32 0; #X connect 34 0 2 0; #X connect 35 0 33 0; #X connect 36 0 37 0; #X connect 36 0 40 0; #X connect 36 1 41 0; #X connect 37 0 34 1; #X connect 38 0 34 1; #X connect 39 0 35 1; #X connect 40 0 35 1; #X connect 41 0 39 0; #X connect 41 0 38 0; #X connect 41 1 31 0; #X restore 44 225 pd choix_table; #X obj 706 141 loadbang; #X obj 722 300 table \$0-env 1024; #X obj 689 173 \$0; #X msg 689 234 \; \$1-env cosinesum 1024 0.5 -0.5 \;; #X text 680 265 chargement de la table d'envelope des grains; #N canvas 222 29 855 936 multit_grains 0; #X obj 49 23 inlet; #X obj 51 837 outlet~; #X text 228 42 table \, taille de la table \, position (0 \, 1) \, aleat \, taille du grain \, aleat \, freq relative \, aleat; #X obj 411 820 print granulator; #X msg 411 797 buffer overflow : please add some more grain!; #N canvas 0 0 450 300 ch_grain 0; #X obj 160 657 line~; #X msg 64 415 set \$1; #X obj 160 686 tabread4~; #X obj 297 749 *~; #X obj 297 781 outlet~; #X obj 28 8 inlet; #N canvas 0 0 1015 762 start_envelope 0; #X obj 16 10 inlet; #X obj 17 122 outlet~; #X msg 16 39 0 \, 1024 \$1; #X obj 16 66 line~; #X obj 16 92 tabread4~ \$0-env; #X connect 0 0 2 0; #X connect 2 0 3 0; #X connect 3 0 4 0; #X connect 4 0 1 0; #X restore 321 695 pd start_envelope; #X obj 186 323 * 44.1; #X obj 161 352 -; #X text 202 352 taille exploitable de la table; #X obj 161 413 *; #X text 202 416 debut du sample (echantillon); #X obj 159 576 pack f f f; #X msg 159 601 \$1 \, \$2 \$3; #X obj 161 451 t f f; #X obj 209 481 +; #X text 285 477 fin du sample; #X obj 611 792 outlet; #N canvas 0 0 450 300 rnd127 0; #X obj 40 18 inlet; #X obj 203 19 inlet; #X obj 103 257 outlet; #X obj 40 57 t f b; #X obj 127 96 random 0; #X obj 103 189 +; #X obj 203 46 * 10000; #X obj 127 124 / 10000; #X obj 128 155 - 0; #X obj 241 83 / 2; #X connect 0 0 3 0; #X connect 1 0 6 0; #X connect 1 0 9 0; #X connect 3 0 5 0; #X connect 3 1 4 0; #X connect 4 0 7 0; #X connect 5 0 2 0; #X connect 6 0 4 1; #X connect 7 0 8 0; #X connect 8 0 5 1; #X connect 9 0 8 1; #X restore 87 151 pd rnd127; #N canvas 0 0 450 300 rnd127 0; #X obj 40 18 inlet; #X obj 203 19 inlet; #X obj 103 257 outlet; #X obj 40 57 t f b; #X obj 127 96 random 0; #X obj 103 210 +; #X obj 203 41 * 10000; #X obj 127 122 / 10000; #X obj 128 155 - 0; #X obj 241 83 / 2; #X connect 0 0 3 0; #X connect 1 0 6 0; #X connect 1 0 9 0; #X connect 3 0 5 0; #X connect 3 1 4 0; #X connect 4 0 7 0; #X connect 5 0 2 0; #X connect 6 0 4 1; #X connect 7 0 8 0; #X connect 8 0 5 1; #X connect 9 0 8 1; #X restore 147 180 pd rnd127; #N canvas 0 0 450 300 rnd127 0; #X obj 40 18 inlet; #X obj 203 19 inlet; #X obj 103 257 outlet; #X obj 40 57 t f b; #X obj 127 96 random 0; #X obj 102 198 +; #X obj 203 41 * 10000; #X obj 127 124 / 10000; #X obj 128 155 - 0; #X obj 241 83 / 2; #X connect 0 0 3 0; #X connect 1 0 6 0; #X connect 1 0 9 0; #X connect 3 0 5 0; #X connect 3 1 4 0; #X connect 4 0 7 0; #X connect 5 0 2 0; #X connect 6 0 4 1; #X connect 7 0 8 0; #X connect 8 0 5 1; #X connect 9 0 8 1; #X restore 211 205 pd rnd127; #X text 189 150 position; #X text 257 183 taille; #X text 271 257 freq relative; #X obj 321 665 f; #X obj 188 51 delay; #X msg 272 79 0; #X msg 628 46 1; #X obj 272 113 switch~; #X obj 28 62 spigot; #X obj 609 85 spigot; #X msg 122 48 1; #X msg 115 74 0; #X obj 122 6 loadbang; #X obj 28 88 t a b; #X msg 679 45 0; #X msg 319 80 1; #X obj 19 388 t b s b; #X obj 28 32 t a a; #X obj 186 290 *; #X text 273 323 taille en echantillon de lecture; #X obj 213 229 mtof; #X obj 213 256 / 440; #X text 323 202 freq (midi); #X obj 28 120 unpack s f f f f f f f f f; #X text 365 115 table \, taille de la table \, position (0 \, 1) \, aleat \, taille du grain \, aleat \, freq relative \, aleat \, amplitude \, rand; #N canvas 0 0 450 300 rnd127 0; #X obj 40 18 inlet; #X obj 203 19 inlet; #X obj 103 257 outlet; #X obj 40 57 t f b; #X obj 127 96 random 0; #X obj 103 210 +; #X obj 203 41 * 10000; #X obj 127 122 / 10000; #X obj 128 155 - 0; #X obj 241 83 / 2; #X connect 0 0 3 0; #X connect 1 0 6 0; #X connect 1 0 9 0; #X connect 3 0 5 0; #X connect 3 1 4 0; #X connect 4 0 7 0; #X connect 5 0 2 0; #X connect 6 0 4 1; #X connect 7 0 8 0; #X connect 8 0 5 1; #X connect 9 0 8 1; #X restore 347 290 pd rnd127; #X text 453 288 amplitude; #X obj 321 724 *~; #X connect 0 0 2 0; #X connect 1 0 2 0; #X connect 2 0 3 0; #X connect 3 0 4 0; #X connect 5 0 38 0; #X connect 6 0 48 0; #X connect 7 0 8 1; #X connect 7 0 15 1; #X connect 8 0 10 0; #X connect 10 0 14 0; #X connect 12 0 13 0; #X connect 13 0 0 0; #X connect 14 0 12 0; #X connect 14 1 15 0; #X connect 15 0 12 1; #X connect 18 0 10 1; #X connect 19 0 12 2; #X connect 19 0 24 1; #X connect 19 0 39 0; #X connect 19 0 25 1; #X connect 20 0 41 0; #X connect 24 0 6 0; #X connect 25 0 26 0; #X connect 25 0 31 0; #X connect 25 0 35 0; #X connect 26 0 28 0; #X connect 27 0 30 1; #X connect 29 0 34 0; #X connect 30 0 17 0; #X connect 31 0 29 1; #X connect 32 0 29 1; #X connect 33 0 31 0; #X connect 33 0 26 0; #X connect 33 0 35 0; #X connect 34 0 44 0; #X connect 34 1 32 0; #X connect 34 1 36 0; #X connect 34 1 27 0; #X connect 35 0 30 1; #X connect 36 0 28 0; #X connect 37 0 24 0; #X connect 37 1 1 0; #X connect 37 2 25 0; #X connect 38 0 29 0; #X connect 38 1 30 0; #X connect 39 0 7 0; #X connect 41 0 42 0; #X connect 42 0 39 1; #X connect 44 0 37 0; #X connect 44 1 8 0; #X connect 44 2 18 0; #X connect 44 3 18 1; #X connect 44 4 19 0; #X connect 44 5 19 1; #X connect 44 6 20 0; #X connect 44 7 20 1; #X connect 44 8 46 0; #X connect 44 9 46 1; #X connect 46 0 48 1; #X connect 48 0 3 1; #X restore 59 73 pd ch_grain; #N canvas 0 0 450 300 ch_grain 0; #X obj 160 657 line~; #X msg 64 415 set \$1; #X obj 160 686 tabread4~; #X obj 297 749 *~; #X obj 297 781 outlet~; #X obj 28 8 inlet; #N canvas 0 0 1015 762 start_envelope 0; #X obj 16 10 inlet; #X obj 17 122 outlet~; #X msg 16 39 0 \, 1024 \$1; #X obj 16 66 line~; #X obj 16 92 tabread4~ \$0-env; #X connect 0 0 2 0; #X connect 2 0 3 0; #X connect 3 0 4 0; #X connect 4 0 1 0; #X restore 321 695 pd start_envelope; #X obj 186 323 * 44.1; #X obj 161 352 -; #X text 202 352 taille exploitable de la table; #X obj 161 413 *; #X text 202 416 debut du sample (echantillon); #X obj 159 576 pack f f f; #X msg 159 601 \$1 \, \$2 \$3; #X obj 161 451 t f f; #X obj 209 481 +; #X text 285 477 fin du sample; #X obj 611 792 outlet; #N canvas 0 0 450 300 rnd127 0; #X obj 40 18 inlet; #X obj 203 19 inlet; #X obj 103 257 outlet; #X obj 40 57 t f b; #X obj 127 96 random 0; #X obj 103 189 +; #X obj 203 46 * 10000; #X obj 127 124 / 10000; #X obj 128 155 - 0; #X obj 241 83 / 2; #X connect 0 0 3 0; #X connect 1 0 6 0; #X connect 1 0 9 0; #X connect 3 0 5 0; #X connect 3 1 4 0; #X connect 4 0 7 0; #X connect 5 0 2 0; #X connect 6 0 4 1; #X connect 7 0 8 0; #X connect 8 0 5 1; #X connect 9 0 8 1; #X restore 87 151 pd rnd127; #N canvas 0 0 450 300 rnd127 0; #X obj 40 18 inlet; #X obj 203 19 inlet; #X obj 103 257 outlet; #X obj 40 57 t f b; #X obj 127 96 random 0; #X obj 103 210 +; #X obj 203 41 * 10000; #X obj 127 122 / 10000; #X obj 128 155 - 0; #X obj 241 83 / 2; #X connect 0 0 3 0; #X connect 1 0 6 0; #X connect 1 0 9 0; #X connect 3 0 5 0; #X connect 3 1 4 0; #X connect 4 0 7 0; #X connect 5 0 2 0; #X connect 6 0 4 1; #X connect 7 0 8 0; #X connect 8 0 5 1; #X connect 9 0 8 1; #X restore 147 180 pd rnd127; #N canvas 0 0 450 300 rnd127 0; #X obj 40 18 inlet; #X obj 203 19 inlet; #X obj 103 257 outlet; #X obj 40 57 t f b; #X obj 127 96 random 0; #X obj 102 198 +; #X obj 203 41 * 10000; #X obj 127 124 / 10000; #X obj 128 155 - 0; #X obj 241 83 / 2; #X connect 0 0 3 0; #X connect 1 0 6 0; #X connect 1 0 9 0; #X connect 3 0 5 0; #X connect 3 1 4 0; #X connect 4 0 7 0; #X connect 5 0 2 0; #X connect 6 0 4 1; #X connect 7 0 8 0; #X connect 8 0 5 1; #X connect 9 0 8 1; #X restore 211 205 pd rnd127; #X text 189 150 position; #X text 257 183 taille; #X text 271 257 freq relative; #X obj 321 665 f; #X obj 188 51 delay; #X msg 272 79 0; #X msg 628 46 1; #X obj 272 113 switch~; #X obj 28 62 spigot; #X obj 609 85 spigot; #X msg 122 48 1; #X msg 115 74 0; #X obj 122 6 loadbang; #X obj 28 88 t a b; #X msg 679 45 0; #X msg 319 80 1; #X obj 19 388 t b s b; #X obj 28 32 t a a; #X obj 186 290 *; #X text 273 323 taille en echantillon de lecture; #X obj 213 229 mtof; #X obj 213 256 / 440; #X text 323 202 freq (midi); #X obj 28 120 unpack s f f f f f f f f f; #X text 365 115 table \, taille de la table \, position (0 \, 1) \, aleat \, taille du grain \, aleat \, freq relative \, aleat \, amplitude \, rand; #N canvas 0 0 450 300 rnd127 0; #X obj 40 18 inlet; #X obj 203 19 inlet; #X obj 103 257 outlet; #X obj 40 57 t f b; #X obj 127 96 random 0; #X obj 103 210 +; #X obj 203 41 * 10000; #X obj 127 122 / 10000; #X obj 128 155 - 0; #X obj 241 83 / 2; #X connect 0 0 3 0; #X connect 1 0 6 0; #X connect 1 0 9 0; #X connect 3 0 5 0; #X connect 3 1 4 0; #X connect 4 0 7 0; #X connect 5 0 2 0; #X connect 6 0 4 1; #X connect 7 0 8 0; #X connect 8 0 5 1; #X connect 9 0 8 1; #X restore 347 290 pd rnd127; #X text 453 288 amplitude; #X obj 321 724 *~; #X connect 0 0 2 0; #X connect 1 0 2 0; #X connect 2 0 3 0; #X connect 3 0 4 0; #X connect 5 0 38 0; #X connect 6 0 48 0; #X connect 7 0 8 1; #X connect 7 0 15 1; #X connect 8 0 10 0; #X connect 10 0 14 0; #X connect 12 0 13 0; #X connect 13 0 0 0; #X connect 14 0 12 0; #X connect 14 1 15 0; #X connect 15 0 12 1; #X connect 18 0 10 1; #X connect 19 0 12 2; #X connect 19 0 24 1; #X connect 19 0 39 0; #X connect 19 0 25 1; #X connect 20 0 41 0; #X connect 24 0 6 0; #X connect 25 0 26 0; #X connect 25 0 31 0; #X connect 25 0 35 0; #X connect 26 0 28 0; #X connect 27 0 30 1; #X connect 29 0 34 0; #X connect 30 0 17 0; #X connect 31 0 29 1; #X connect 32 0 29 1; #X connect 33 0 31 0; #X connect 33 0 26 0; #X connect 33 0 35 0; #X connect 34 0 44 0; #X connect 34 1 32 0; #X connect 34 1 36 0; #X connect 34 1 27 0; #X connect 35 0 30 1; #X connect 36 0 28 0; #X connect 37 0 24 0; #X connect 37 1 1 0; #X connect 37 2 25 0; #X connect 38 0 29 0; #X connect 38 1 30 0; #X connect 39 0 7 0; #X connect 41 0 42 0; #X connect 42 0 39 1; #X connect 44 0 37 0; #X connect 44 1 8 0; #X connect 44 2 18 0; #X connect 44 3 18 1; #X connect 44 4 19 0; #X connect 44 5 19 1; #X connect 44 6 20 0; #X connect 44 7 20 1; #X connect 44 8 46 0; #X connect 44 9 46 1; #X connect 46 0 48 1; #X connect 48 0 3 1; #X restore 72 95 pd ch_grain; #N canvas 0 0 450 300 ch_grain 0; #X obj 160 657 line~; #X msg 64 415 set \$1; #X obj 160 686 tabread4~; #X obj 297 749 *~; #X obj 297 781 outlet~; #X obj 28 8 inlet; #N canvas 0 0 1015 762 start_envelope 0; #X obj 16 10 inlet; #X obj 17 122 outlet~; #X msg 16 39 0 \, 1024 \$1; #X obj 16 66 line~; #X obj 16 92 tabread4~ \$0-env; #X connect 0 0 2 0; #X connect 2 0 3 0; #X connect 3 0 4 0; #X connect 4 0 1 0; #X restore 321 695 pd start_envelope; #X obj 186 323 * 44.1; #X obj 161 352 -; #X text 202 352 taille exploitable de la table; #X obj 161 413 *; #X text 202 416 debut du sample (echantillon); #X obj 159 576 pack f f f; #X msg 159 601 \$1 \, \$2 \$3; #X obj 161 451 t f f; #X obj 209 481 +; #X text 285 477 fin du sample; #X obj 611 792 outlet; #N canvas 0 0 450 300 rnd127 0; #X obj 40 18 inlet; #X obj 203 19 inlet; #X obj 103 257 outlet; #X obj 40 57 t f b; #X obj 127 96 random 0; #X obj 103 189 +; #X obj 203 46 * 10000; #X obj 127 124 / 10000; #X obj 128 155 - 0; #X obj 241 83 / 2; #X connect 0 0 3 0; #X connect 1 0 6 0; #X connect 1 0 9 0; #X connect 3 0 5 0; #X connect 3 1 4 0; #X connect 4 0 7 0; #X connect 5 0 2 0; #X connect 6 0 4 1; #X connect 7 0 8 0; #X connect 8 0 5 1; #X connect 9 0 8 1; #X restore 87 151 pd rnd127; #N canvas 0 0 450 300 rnd127 0; #X obj 40 18 inlet; #X obj 203 19 inlet; #X obj 103 257 outlet; #X obj 40 57 t f b; #X obj 127 96 random 0; #X obj 103 210 +; #X obj 203 41 * 10000; #X obj 127 122 / 10000; #X obj 128 155 - 0; #X obj 241 83 / 2; #X connect 0 0 3 0; #X connect 1 0 6 0; #X connect 1 0 9 0; #X connect 3 0 5 0; #X connect 3 1 4 0; #X connect 4 0 7 0; #X connect 5 0 2 0; #X connect 6 0 4 1; #X connect 7 0 8 0; #X connect 8 0 5 1; #X connect 9 0 8 1; #X restore 147 180 pd rnd127; #N canvas 0 0 450 300 rnd127 0; #X obj 40 18 inlet; #X obj 203 19 inlet; #X obj 103 257 outlet; #X obj 40 57 t f b; #X obj 127 96 random 0; #X obj 102 198 +; #X obj 203 41 * 10000; #X obj 127 124 / 10000; #X obj 128 155 - 0; #X obj 241 83 / 2; #X connect 0 0 3 0; #X connect 1 0 6 0; #X connect 1 0 9 0; #X connect 3 0 5 0; #X connect 3 1 4 0; #X connect 4 0 7 0; #X connect 5 0 2 0; #X connect 6 0 4 1; #X connect 7 0 8 0; #X connect 8 0 5 1; #X connect 9 0 8 1; #X restore 211 205 pd rnd127; #X text 189 150 position; #X text 257 183 taille; #X text 271 257 freq relative; #X obj 321 665 f; #X obj 188 51 delay; #X msg 272 79 0; #X msg 628 46 1; #X obj 272 113 switch~; #X obj 28 62 spigot; #X obj 609 85 spigot; #X msg 122 48 1; #X msg 115 74 0; #X obj 122 6 loadbang; #X obj 28 88 t a b; #X msg 679 45 0; #X msg 319 80 1; #X obj 19 388 t b s b; #X obj 28 32 t a a; #X obj 186 290 *; #X text 273 323 taille en echantillon de lecture; #X obj 213 229 mtof; #X obj 213 256 / 440; #X text 323 202 freq (midi); #X obj 28 120 unpack s f f f f f f f f f; #X text 365 115 table \, taille de la table \, position (0 \, 1) \, aleat \, taille du grain \, aleat \, freq relative \, aleat \, amplitude \, rand; #N canvas 0 0 450 300 rnd127 0; #X obj 40 18 inlet; #X obj 203 19 inlet; #X obj 103 257 outlet; #X obj 40 57 t f b; #X obj 127 96 random 0; #X obj 103 210 +; #X obj 203 41 * 10000; #X obj 127 122 / 10000; #X obj 128 155 - 0; #X obj 241 83 / 2; #X connect 0 0 3 0; #X connect 1 0 6 0; #X connect 1 0 9 0; #X connect 3 0 5 0; #X connect 3 1 4 0; #X connect 4 0 7 0; #X connect 5 0 2 0; #X connect 6 0 4 1; #X connect 7 0 8 0; #X connect 8 0 5 1; #X connect 9 0 8 1; #X restore 347 290 pd rnd127; #X text 453 288 amplitude; #X obj 321 724 *~; #X connect 0 0 2 0; #X connect 1 0 2 0; #X connect 2 0 3 0; #X connect 3 0 4 0; #X connect 5 0 38 0; #X connect 6 0 48 0; #X connect 7 0 8 1; #X connect 7 0 15 1; #X connect 8 0 10 0; #X connect 10 0 14 0; #X connect 12 0 13 0; #X connect 13 0 0 0; #X connect 14 0 12 0; #X connect 14 1 15 0; #X connect 15 0 12 1; #X connect 18 0 10 1; #X connect 19 0 12 2; #X connect 19 0 24 1; #X connect 19 0 39 0; #X connect 19 0 25 1; #X connect 20 0 41 0; #X connect 24 0 6 0; #X connect 25 0 26 0; #X connect 25 0 31 0; #X connect 25 0 35 0; #X connect 26 0 28 0; #X connect 27 0 30 1; #X connect 29 0 34 0; #X connect 30 0 17 0; #X connect 31 0 29 1; #X connect 32 0 29 1; #X connect 33 0 31 0; #X connect 33 0 26 0; #X connect 33 0 35 0; #X connect 34 0 44 0; #X connect 34 1 32 0; #X connect 34 1 36 0; #X connect 34 1 27 0; #X connect 35 0 30 1; #X connect 36 0 28 0; #X connect 37 0 24 0; #X connect 37 1 1 0; #X connect 37 2 25 0; #X connect 38 0 29 0; #X connect 38 1 30 0; #X connect 39 0 7 0; #X connect 41 0 42 0; #X connect 42 0 39 1; #X connect 44 0 37 0; #X connect 44 1 8 0; #X connect 44 2 18 0; #X connect 44 3 18 1; #X connect 44 4 19 0; #X connect 44 5 19 1; #X connect 44 6 20 0; #X connect 44 7 20 1; #X connect 44 8 46 0; #X connect 44 9 46 1; #X connect 46 0 48 1; #X connect 48 0 3 1; #X restore 82 119 pd ch_grain; #N canvas 0 0 450 300 ch_grain 0; #X obj 160 657 line~; #X msg 64 415 set \$1; #X obj 160 686 tabread4~; #X obj 297 749 *~; #X obj 297 781 outlet~; #X obj 28 8 inlet; #N canvas 0 0 1015 762 start_envelope 0; #X obj 16 10 inlet; #X obj 17 122 outlet~; #X msg 16 39 0 \, 1024 \$1; #X obj 16 66 line~; #X obj 16 92 tabread4~ \$0-env; #X connect 0 0 2 0; #X connect 2 0 3 0; #X connect 3 0 4 0; #X connect 4 0 1 0; #X restore 321 695 pd start_envelope; #X obj 186 323 * 44.1; #X obj 161 352 -; #X text 202 352 taille exploitable de la table; #X obj 161 413 *; #X text 202 416 debut du sample (echantillon); #X obj 159 576 pack f f f; #X msg 159 601 \$1 \, \$2 \$3; #X obj 161 451 t f f; #X obj 209 481 +; #X text 285 477 fin du sample; #X obj 611 792 outlet; #N canvas 0 0 450 300 rnd127 0; #X obj 40 18 inlet; #X obj 203 19 inlet; #X obj 103 257 outlet; #X obj 40 57 t f b; #X obj 127 96 random 0; #X obj 103 189 +; #X obj 203 46 * 10000; #X obj 127 124 / 10000; #X obj 128 155 - 0; #X obj 241 83 / 2; #X connect 0 0 3 0; #X connect 1 0 6 0; #X connect 1 0 9 0; #X connect 3 0 5 0; #X connect 3 1 4 0; #X connect 4 0 7 0; #X connect 5 0 2 0; #X connect 6 0 4 1; #X connect 7 0 8 0; #X connect 8 0 5 1; #X connect 9 0 8 1; #X restore 87 151 pd rnd127; #N canvas 0 0 450 300 rnd127 0; #X obj 40 18 inlet; #X obj 203 19 inlet; #X obj 103 257 outlet; #X obj 40 57 t f b; #X obj 127 96 random 0; #X obj 103 210 +; #X obj 203 41 * 10000; #X obj 127 122 / 10000; #X obj 128 155 - 0; #X obj 241 83 / 2; #X connect 0 0 3 0; #X connect 1 0 6 0; #X connect 1 0 9 0; #X connect 3 0 5 0; #X connect 3 1 4 0; #X connect 4 0 7 0; #X connect 5 0 2 0; #X connect 6 0 4 1; #X connect 7 0 8 0; #X connect 8 0 5 1; #X connect 9 0 8 1; #X restore 147 180 pd rnd127; #N canvas 0 0 450 300 rnd127 0; #X obj 40 18 inlet; #X obj 203 19 inlet; #X obj 103 257 outlet; #X obj 40 57 t f b; #X obj 127 96 random 0; #X obj 102 198 +; #X obj 203 41 * 10000; #X obj 127 124 / 10000; #X obj 128 155 - 0; #X obj 241 83 / 2; #X connect 0 0 3 0; #X connect 1 0 6 0; #X connect 1 0 9 0; #X connect 3 0 5 0; #X connect 3 1 4 0; #X connect 4 0 7 0; #X connect 5 0 2 0; #X connect 6 0 4 1; #X connect 7 0 8 0; #X connect 8 0 5 1; #X connect 9 0 8 1; #X restore 211 205 pd rnd127; #X text 189 150 position; #X text 257 183 taille; #X text 271 257 freq relative; #X obj 321 665 f; #X obj 188 51 delay; #X msg 272 79 0; #X msg 628 46 1; #X obj 272 113 switch~; #X obj 28 62 spigot; #X obj 609 85 spigot; #X msg 122 48 1; #X msg 115 74 0; #X obj 122 6 loadbang; #X obj 28 88 t a b; #X msg 679 45 0; #X msg 319 80 1; #X obj 19 388 t b s b; #X obj 28 32 t a a; #X obj 186 290 *; #X text 273 323 taille en echantillon de lecture; #X obj 213 229 mtof; #X obj 213 256 / 440; #X text 323 202 freq (midi); #X obj 28 120 unpack s f f f f f f f f f; #X text 365 115 table \, taille de la table \, position (0 \, 1) \, aleat \, taille du grain \, aleat \, freq relative \, aleat \, amplitude \, rand; #N canvas 0 0 450 300 rnd127 0; #X obj 40 18 inlet; #X obj 203 19 inlet; #X obj 103 257 outlet; #X obj 40 57 t f b; #X obj 127 96 random 0; #X obj 103 210 +; #X obj 203 41 * 10000; #X obj 127 122 / 10000; #X obj 128 155 - 0; #X obj 241 83 / 2; #X connect 0 0 3 0; #X connect 1 0 6 0; #X connect 1 0 9 0; #X connect 3 0 5 0; #X connect 3 1 4 0; #X connect 4 0 7 0; #X connect 5 0 2 0; #X connect 6 0 4 1; #X connect 7 0 8 0; #X connect 8 0 5 1; #X connect 9 0 8 1; #X restore 347 290 pd rnd127; #X text 453 288 amplitude; #X obj 321 724 *~; #X connect 0 0 2 0; #X connect 1 0 2 0; #X connect 2 0 3 0; #X connect 3 0 4 0; #X connect 5 0 38 0; #X connect 6 0 48 0; #X connect 7 0 8 1; #X connect 7 0 15 1; #X connect 8 0 10 0; #X connect 10 0 14 0; #X connect 12 0 13 0; #X connect 13 0 0 0; #X connect 14 0 12 0; #X connect 14 1 15 0; #X connect 15 0 12 1; #X connect 18 0 10 1; #X connect 19 0 12 2; #X connect 19 0 24 1; #X connect 19 0 39 0; #X connect 19 0 25 1; #X connect 20 0 41 0; #X connect 24 0 6 0; #X connect 25 0 26 0; #X connect 25 0 31 0; #X connect 25 0 35 0; #X connect 26 0 28 0; #X connect 27 0 30 1; #X connect 29 0 34 0; #X connect 30 0 17 0; #X connect 31 0 29 1; #X connect 32 0 29 1; #X connect 33 0 31 0; #X connect 33 0 26 0; #X connect 33 0 35 0; #X connect 34 0 44 0; #X connect 34 1 32 0; #X connect 34 1 36 0; #X connect 34 1 27 0; #X connect 35 0 30 1; #X connect 36 0 28 0; #X connect 37 0 24 0; #X connect 37 1 1 0; #X connect 37 2 25 0; #X connect 38 0 29 0; #X connect 38 1 30 0; #X connect 39 0 7 0; #X connect 41 0 42 0; #X connect 42 0 39 1; #X connect 44 0 37 0; #X connect 44 1 8 0; #X connect 44 2 18 0; #X connect 44 3 18 1; #X connect 44 4 19 0; #X connect 44 5 19 1; #X connect 44 6 20 0; #X connect 44 7 20 1; #X connect 44 8 46 0; #X connect 44 9 46 1; #X connect 46 0 48 1; #X connect 48 0 3 1; #X restore 95 143 pd ch_grain; #N canvas 0 0 450 300 ch_grain 0; #X obj 160 657 line~; #X msg 64 415 set \$1; #X obj 160 686 tabread4~; #X obj 297 749 *~; #X obj 297 781 outlet~; #X obj 28 8 inlet; #N canvas 0 0 1015 762 start_envelope 0; #X obj 16 10 inlet; #X obj 17 122 outlet~; #X msg 16 39 0 \, 1024 \$1; #X obj 16 66 line~; #X obj 16 92 tabread4~ \$0-env; #X connect 0 0 2 0; #X connect 2 0 3 0; #X connect 3 0 4 0; #X connect 4 0 1 0; #X restore 321 695 pd start_envelope; #X obj 186 323 * 44.1; #X obj 161 352 -; #X text 202 352 taille exploitable de la table; #X obj 161 413 *; #X text 202 416 debut du sample (echantillon); #X obj 159 576 pack f f f; #X msg 159 601 \$1 \, \$2 \$3; #X obj 161 451 t f f; #X obj 209 481 +; #X text 285 477 fin du sample; #X obj 611 792 outlet; #N canvas 0 0 450 300 rnd127 0; #X obj 40 18 inlet; #X obj 203 19 inlet; #X obj 103 257 outlet; #X obj 40 57 t f b; #X obj 127 96 random 0; #X obj 103 189 +; #X obj 203 46 * 10000; #X obj 127 124 / 10000; #X obj 128 155 - 0; #X obj 241 83 / 2; #X connect 0 0 3 0; #X connect 1 0 6 0; #X connect 1 0 9 0; #X connect 3 0 5 0; #X connect 3 1 4 0; #X connect 4 0 7 0; #X connect 5 0 2 0; #X connect 6 0 4 1; #X connect 7 0 8 0; #X connect 8 0 5 1; #X connect 9 0 8 1; #X restore 87 151 pd rnd127; #N canvas 0 0 450 300 rnd127 0; #X obj 40 18 inlet; #X obj 203 19 inlet; #X obj 103 257 outlet; #X obj 40 57 t f b; #X obj 127 96 random 0; #X obj 103 210 +; #X obj 203 41 * 10000; #X obj 127 122 / 10000; #X obj 128 155 - 0; #X obj 241 83 / 2; #X connect 0 0 3 0; #X connect 1 0 6 0; #X connect 1 0 9 0; #X connect 3 0 5 0; #X connect 3 1 4 0; #X connect 4 0 7 0; #X connect 5 0 2 0; #X connect 6 0 4 1; #X connect 7 0 8 0; #X connect 8 0 5 1; #X connect 9 0 8 1; #X restore 147 180 pd rnd127; #N canvas 0 0 450 300 rnd127 0; #X obj 40 18 inlet; #X obj 203 19 inlet; #X obj 103 257 outlet; #X obj 40 57 t f b; #X obj 127 96 random 0; #X obj 102 198 +; #X obj 203 41 * 10000; #X obj 127 124 / 10000; #X obj 128 155 - 0; #X obj 241 83 / 2; #X connect 0 0 3 0; #X connect 1 0 6 0; #X connect 1 0 9 0; #X connect 3 0 5 0; #X connect 3 1 4 0; #X connect 4 0 7 0; #X connect 5 0 2 0; #X connect 6 0 4 1; #X connect 7 0 8 0; #X connect 8 0 5 1; #X connect 9 0 8 1; #X restore 211 205 pd rnd127; #X text 189 150 position; #X text 257 183 taille; #X text 271 257 freq relative; #X obj 321 665 f; #X obj 188 51 delay; #X msg 272 79 0; #X msg 628 46 1; #X obj 272 113 switch~; #X obj 28 62 spigot; #X obj 609 85 spigot; #X msg 122 48 1; #X msg 115 74 0; #X obj 122 6 loadbang; #X obj 28 88 t a b; #X msg 679 45 0; #X msg 319 80 1; #X obj 19 388 t b s b; #X obj 28 32 t a a; #X obj 186 290 *; #X text 273 323 taille en echantillon de lecture; #X obj 213 229 mtof; #X obj 213 256 / 440; #X text 323 202 freq (midi); #X obj 28 120 unpack s f f f f f f f f f; #X text 365 115 table \, taille de la table \, position (0 \, 1) \, aleat \, taille du grain \, aleat \, freq relative \, aleat \, amplitude \, rand; #N canvas 0 0 450 300 rnd127 0; #X obj 40 18 inlet; #X obj 203 19 inlet; #X obj 103 257 outlet; #X obj 40 57 t f b; #X obj 127 96 random 0; #X obj 103 210 +; #X obj 203 41 * 10000; #X obj 127 122 / 10000; #X obj 128 155 - 0; #X obj 241 83 / 2; #X connect 0 0 3 0; #X connect 1 0 6 0; #X connect 1 0 9 0; #X connect 3 0 5 0; #X connect 3 1 4 0; #X connect 4 0 7 0; #X connect 5 0 2 0; #X connect 6 0 4 1; #X connect 7 0 8 0; #X connect 8 0 5 1; #X connect 9 0 8 1; #X restore 347 290 pd rnd127; #X text 453 288 amplitude; #X obj 321 724 *~; #X connect 0 0 2 0; #X connect 1 0 2 0; #X connect 2 0 3 0; #X connect 3 0 4 0; #X connect 5 0 38 0; #X connect 6 0 48 0; #X connect 7 0 8 1; #X connect 7 0 15 1; #X connect 8 0 10 0; #X connect 10 0 14 0; #X connect 12 0 13 0; #X connect 13 0 0 0; #X connect 14 0 12 0; #X connect 14 1 15 0; #X connect 15 0 12 1; #X connect 18 0 10 1; #X connect 19 0 12 2; #X connect 19 0 24 1; #X connect 19 0 39 0; #X connect 19 0 25 1; #X connect 20 0 41 0; #X connect 24 0 6 0; #X connect 25 0 26 0; #X connect 25 0 31 0; #X connect 25 0 35 0; #X connect 26 0 28 0; #X connect 27 0 30 1; #X connect 29 0 34 0; #X connect 30 0 17 0; #X connect 31 0 29 1; #X connect 32 0 29 1; #X connect 33 0 31 0; #X connect 33 0 26 0; #X connect 33 0 35 0; #X connect 34 0 44 0; #X connect 34 1 32 0; #X connect 34 1 36 0; #X connect 34 1 27 0; #X connect 35 0 30 1; #X connect 36 0 28 0; #X connect 37 0 24 0; #X connect 37 1 1 0; #X connect 37 2 25 0; #X connect 38 0 29 0; #X connect 38 1 30 0; #X connect 39 0 7 0; #X connect 41 0 42 0; #X connect 42 0 39 1; #X connect 44 0 37 0; #X connect 44 1 8 0; #X connect 44 2 18 0; #X connect 44 3 18 1; #X connect 44 4 19 0; #X connect 44 5 19 1; #X connect 44 6 20 0; #X connect 44 7 20 1; #X connect 44 8 46 0; #X connect 44 9 46 1; #X connect 46 0 48 1; #X connect 48 0 3 1; #X restore 105 167 pd ch_grain; #N canvas 0 0 450 300 ch_grain 0; #X obj 160 657 line~; #X msg 64 415 set \$1; #X obj 160 686 tabread4~; #X obj 297 749 *~; #X obj 297 781 outlet~; #X obj 28 8 inlet; #N canvas 0 0 1015 762 start_envelope 0; #X obj 16 10 inlet; #X obj 17 122 outlet~; #X msg 16 39 0 \, 1024 \$1; #X obj 16 66 line~; #X obj 16 92 tabread4~ \$0-env; #X connect 0 0 2 0; #X connect 2 0 3 0; #X connect 3 0 4 0; #X connect 4 0 1 0; #X restore 321 695 pd start_envelope; #X obj 186 323 * 44.1; #X obj 161 352 -; #X text 202 352 taille exploitable de la table; #X obj 161 413 *; #X text 202 416 debut du sample (echantillon); #X obj 159 576 pack f f f; #X msg 159 601 \$1 \, \$2 \$3; #X obj 161 451 t f f; #X obj 209 481 +; #X text 285 477 fin du sample; #X obj 611 792 outlet; #N canvas 0 0 450 300 rnd127 0; #X obj 40 18 inlet; #X obj 203 19 inlet; #X obj 103 257 outlet; #X obj 40 57 t f b; #X obj 127 96 random 0; #X obj 103 189 +; #X obj 203 46 * 10000; #X obj 127 124 / 10000; #X obj 128 155 - 0; #X obj 241 83 / 2; #X connect 0 0 3 0; #X connect 1 0 6 0; #X connect 1 0 9 0; #X connect 3 0 5 0; #X connect 3 1 4 0; #X connect 4 0 7 0; #X connect 5 0 2 0; #X connect 6 0 4 1; #X connect 7 0 8 0; #X connect 8 0 5 1; #X connect 9 0 8 1; #X restore 87 151 pd rnd127; #N canvas 0 0 450 300 rnd127 0; #X obj 40 18 inlet; #X obj 203 19 inlet; #X obj 103 257 outlet; #X obj 40 57 t f b; #X obj 127 96 random 0; #X obj 103 210 +; #X obj 203 41 * 10000; #X obj 127 122 / 10000; #X obj 128 155 - 0; #X obj 241 83 / 2; #X connect 0 0 3 0; #X connect 1 0 6 0; #X connect 1 0 9 0; #X connect 3 0 5 0; #X connect 3 1 4 0; #X connect 4 0 7 0; #X connect 5 0 2 0; #X connect 6 0 4 1; #X connect 7 0 8 0; #X connect 8 0 5 1; #X connect 9 0 8 1; #X restore 147 180 pd rnd127; #N canvas 0 0 450 300 rnd127 0; #X obj 40 18 inlet; #X obj 203 19 inlet; #X obj 103 257 outlet; #X obj 40 57 t f b; #X obj 127 96 random 0; #X obj 102 198 +; #X obj 203 41 * 10000; #X obj 127 124 / 10000; #X obj 128 155 - 0; #X obj 241 83 / 2; #X connect 0 0 3 0; #X connect 1 0 6 0; #X connect 1 0 9 0; #X connect 3 0 5 0; #X connect 3 1 4 0; #X connect 4 0 7 0; #X connect 5 0 2 0; #X connect 6 0 4 1; #X connect 7 0 8 0; #X connect 8 0 5 1; #X connect 9 0 8 1; #X restore 211 205 pd rnd127; #X text 189 150 position; #X text 257 183 taille; #X text 271 257 freq relative; #X obj 321 665 f; #X obj 188 51 delay; #X msg 272 79 0; #X msg 628 46 1; #X obj 272 113 switch~; #X obj 28 62 spigot; #X obj 609 85 spigot; #X msg 122 48 1; #X msg 115 74 0; #X obj 122 6 loadbang; #X obj 28 88 t a b; #X msg 679 45 0; #X msg 319 80 1; #X obj 19 388 t b s b; #X obj 28 32 t a a; #X obj 186 290 *; #X text 273 323 taille en echantillon de lecture; #X obj 213 229 mtof; #X obj 213 256 / 440; #X text 323 202 freq (midi); #X obj 28 120 unpack s f f f f f f f f f; #X text 365 115 table \, taille de la table \, position (0 \, 1) \, aleat \, taille du grain \, aleat \, freq relative \, aleat \, amplitude \, rand; #N canvas 0 0 450 300 rnd127 0; #X obj 40 18 inlet; #X obj 203 19 inlet; #X obj 103 257 outlet; #X obj 40 57 t f b; #X obj 127 96 random 0; #X obj 103 210 +; #X obj 203 41 * 10000; #X obj 127 122 / 10000; #X obj 128 155 - 0; #X obj 241 83 / 2; #X connect 0 0 3 0; #X connect 1 0 6 0; #X connect 1 0 9 0; #X connect 3 0 5 0; #X connect 3 1 4 0; #X connect 4 0 7 0; #X connect 5 0 2 0; #X connect 6 0 4 1; #X connect 7 0 8 0; #X connect 8 0 5 1; #X connect 9 0 8 1; #X restore 347 290 pd rnd127; #X text 453 288 amplitude; #X obj 321 724 *~; #X connect 0 0 2 0; #X connect 1 0 2 0; #X connect 2 0 3 0; #X connect 3 0 4 0; #X connect 5 0 38 0; #X connect 6 0 48 0; #X connect 7 0 8 1; #X connect 7 0 15 1; #X connect 8 0 10 0; #X connect 10 0 14 0; #X connect 12 0 13 0; #X connect 13 0 0 0; #X connect 14 0 12 0; #X connect 14 1 15 0; #X connect 15 0 12 1; #X connect 18 0 10 1; #X connect 19 0 12 2; #X connect 19 0 24 1; #X connect 19 0 39 0; #X connect 19 0 25 1; #X connect 20 0 41 0; #X connect 24 0 6 0; #X connect 25 0 26 0; #X connect 25 0 31 0; #X connect 25 0 35 0; #X connect 26 0 28 0; #X connect 27 0 30 1; #X connect 29 0 34 0; #X connect 30 0 17 0; #X connect 31 0 29 1; #X connect 32 0 29 1; #X connect 33 0 31 0; #X connect 33 0 26 0; #X connect 33 0 35 0; #X connect 34 0 44 0; #X connect 34 1 32 0; #X connect 34 1 36 0; #X connect 34 1 27 0; #X connect 35 0 30 1; #X connect 36 0 28 0; #X connect 37 0 24 0; #X connect 37 1 1 0; #X connect 37 2 25 0; #X connect 38 0 29 0; #X connect 38 1 30 0; #X connect 39 0 7 0; #X connect 41 0 42 0; #X connect 42 0 39 1; #X connect 44 0 37 0; #X connect 44 1 8 0; #X connect 44 2 18 0; #X connect 44 3 18 1; #X connect 44 4 19 0; #X connect 44 5 19 1; #X connect 44 6 20 0; #X connect 44 7 20 1; #X connect 44 8 46 0; #X connect 44 9 46 1; #X connect 46 0 48 1; #X connect 48 0 3 1; #X restore 117 190 pd ch_grain; #N canvas 0 0 450 300 ch_grain 0; #X obj 160 657 line~; #X msg 64 415 set \$1; #X obj 160 686 tabread4~; #X obj 297 749 *~; #X obj 297 781 outlet~; #X obj 28 8 inlet; #N canvas 0 0 1015 762 start_envelope 0; #X obj 16 10 inlet; #X obj 17 122 outlet~; #X msg 16 39 0 \, 1024 \$1; #X obj 16 66 line~; #X obj 16 92 tabread4~ \$0-env; #X connect 0 0 2 0; #X connect 2 0 3 0; #X connect 3 0 4 0; #X connect 4 0 1 0; #X restore 321 695 pd start_envelope; #X obj 186 323 * 44.1; #X obj 161 352 -; #X text 202 352 taille exploitable de la table; #X obj 161 413 *; #X text 202 416 debut du sample (echantillon); #X obj 159 576 pack f f f; #X msg 159 601 \$1 \, \$2 \$3; #X obj 161 451 t f f; #X obj 209 481 +; #X text 285 477 fin du sample; #X obj 611 792 outlet; #N canvas 0 0 450 300 rnd127 0; #X obj 40 18 inlet; #X obj 203 19 inlet; #X obj 103 257 outlet; #X obj 40 57 t f b; #X obj 127 96 random 0; #X obj 103 189 +; #X obj 203 46 * 10000; #X obj 127 124 / 10000; #X obj 128 155 - 0; #X obj 241 83 / 2; #X connect 0 0 3 0; #X connect 1 0 6 0; #X connect 1 0 9 0; #X connect 3 0 5 0; #X connect 3 1 4 0; #X connect 4 0 7 0; #X connect 5 0 2 0; #X connect 6 0 4 1; #X connect 7 0 8 0; #X connect 8 0 5 1; #X connect 9 0 8 1; #X restore 87 151 pd rnd127; #N canvas 0 0 450 300 rnd127 0; #X obj 40 18 inlet; #X obj 203 19 inlet; #X obj 103 257 outlet; #X obj 40 57 t f b; #X obj 127 96 random 0; #X obj 103 210 +; #X obj 203 41 * 10000; #X obj 127 122 / 10000; #X obj 128 155 - 0; #X obj 241 83 / 2; #X connect 0 0 3 0; #X connect 1 0 6 0; #X connect 1 0 9 0; #X connect 3 0 5 0; #X connect 3 1 4 0; #X connect 4 0 7 0; #X connect 5 0 2 0; #X connect 6 0 4 1; #X connect 7 0 8 0; #X connect 8 0 5 1; #X connect 9 0 8 1; #X restore 147 180 pd rnd127; #N canvas 0 0 450 300 rnd127 0; #X obj 40 18 inlet; #X obj 203 19 inlet; #X obj 103 257 outlet; #X obj 40 57 t f b; #X obj 127 96 random 0; #X obj 102 198 +; #X obj 203 41 * 10000; #X obj 127 124 / 10000; #X obj 128 155 - 0; #X obj 241 83 / 2; #X connect 0 0 3 0; #X connect 1 0 6 0; #X connect 1 0 9 0; #X connect 3 0 5 0; #X connect 3 1 4 0; #X connect 4 0 7 0; #X connect 5 0 2 0; #X connect 6 0 4 1; #X connect 7 0 8 0; #X connect 8 0 5 1; #X connect 9 0 8 1; #X restore 211 205 pd rnd127; #X text 189 150 position; #X text 257 183 taille; #X text 271 257 freq relative; #X obj 321 665 f; #X obj 188 51 delay; #X msg 272 79 0; #X msg 628 46 1; #X obj 272 113 switch~; #X obj 28 62 spigot; #X obj 609 85 spigot; #X msg 122 48 1; #X msg 115 74 0; #X obj 122 6 loadbang; #X obj 28 88 t a b; #X msg 679 45 0; #X msg 319 80 1; #X obj 19 388 t b s b; #X obj 28 32 t a a; #X obj 186 290 *; #X text 273 323 taille en echantillon de lecture; #X obj 213 229 mtof; #X obj 213 256 / 440; #X text 323 202 freq (midi); #X obj 28 120 unpack s f f f f f f f f f; #X text 365 115 table \, taille de la table \, position (0 \, 1) \, aleat \, taille du grain \, aleat \, freq relative \, aleat \, amplitude \, rand; #N canvas 0 0 450 300 rnd127 0; #X obj 40 18 inlet; #X obj 203 19 inlet; #X obj 103 257 outlet; #X obj 40 57 t f b; #X obj 127 96 random 0; #X obj 103 210 +; #X obj 203 41 * 10000; #X obj 127 122 / 10000; #X obj 128 155 - 0; #X obj 241 83 / 2; #X connect 0 0 3 0; #X connect 1 0 6 0; #X connect 1 0 9 0; #X connect 3 0 5 0; #X connect 3 1 4 0; #X connect 4 0 7 0; #X connect 5 0 2 0; #X connect 6 0 4 1; #X connect 7 0 8 0; #X connect 8 0 5 1; #X connect 9 0 8 1; #X restore 347 290 pd rnd127; #X text 453 288 amplitude; #X obj 321 724 *~; #X connect 0 0 2 0; #X connect 1 0 2 0; #X connect 2 0 3 0; #X connect 3 0 4 0; #X connect 5 0 38 0; #X connect 6 0 48 0; #X connect 7 0 8 1; #X connect 7 0 15 1; #X connect 8 0 10 0; #X connect 10 0 14 0; #X connect 12 0 13 0; #X connect 13 0 0 0; #X connect 14 0 12 0; #X connect 14 1 15 0; #X connect 15 0 12 1; #X connect 18 0 10 1; #X connect 19 0 12 2; #X connect 19 0 24 1; #X connect 19 0 39 0; #X connect 19 0 25 1; #X connect 20 0 41 0; #X connect 24 0 6 0; #X connect 25 0 26 0; #X connect 25 0 31 0; #X connect 25 0 35 0; #X connect 26 0 28 0; #X connect 27 0 30 1; #X connect 29 0 34 0; #X connect 30 0 17 0; #X connect 31 0 29 1; #X connect 32 0 29 1; #X connect 33 0 31 0; #X connect 33 0 26 0; #X connect 33 0 35 0; #X connect 34 0 44 0; #X connect 34 1 32 0; #X connect 34 1 36 0; #X connect 34 1 27 0; #X connect 35 0 30 1; #X connect 36 0 28 0; #X connect 37 0 24 0; #X connect 37 1 1 0; #X connect 37 2 25 0; #X connect 38 0 29 0; #X connect 38 1 30 0; #X connect 39 0 7 0; #X connect 41 0 42 0; #X connect 42 0 39 1; #X connect 44 0 37 0; #X connect 44 1 8 0; #X connect 44 2 18 0; #X connect 44 3 18 1; #X connect 44 4 19 0; #X connect 44 5 19 1; #X connect 44 6 20 0; #X connect 44 7 20 1; #X connect 44 8 46 0; #X connect 44 9 46 1; #X connect 46 0 48 1; #X connect 48 0 3 1; #X restore 128 213 pd ch_grain; #N canvas 0 0 450 300 ch_grain 0; #X obj 160 657 line~; #X msg 64 415 set \$1; #X obj 160 686 tabread4~; #X obj 297 749 *~; #X obj 297 781 outlet~; #X obj 28 8 inlet; #N canvas 0 0 1015 762 start_envelope 0; #X obj 16 10 inlet; #X obj 17 122 outlet~; #X msg 16 39 0 \, 1024 \$1; #X obj 16 66 line~; #X obj 16 92 tabread4~ \$0-env; #X connect 0 0 2 0; #X connect 2 0 3 0; #X connect 3 0 4 0; #X connect 4 0 1 0; #X restore 321 695 pd start_envelope; #X obj 186 323 * 44.1; #X obj 161 352 -; #X text 202 352 taille exploitable de la table; #X obj 161 413 *; #X text 202 416 debut du sample (echantillon); #X obj 159 576 pack f f f; #X msg 159 601 \$1 \, \$2 \$3; #X obj 161 451 t f f; #X obj 209 481 +; #X text 285 477 fin du sample; #X obj 611 792 outlet; #N canvas 0 0 450 300 rnd127 0; #X obj 40 18 inlet; #X obj 203 19 inlet; #X obj 103 257 outlet; #X obj 40 57 t f b; #X obj 127 96 random 0; #X obj 103 189 +; #X obj 203 46 * 10000; #X obj 127 124 / 10000; #X obj 128 155 - 0; #X obj 241 83 / 2; #X connect 0 0 3 0; #X connect 1 0 6 0; #X connect 1 0 9 0; #X connect 3 0 5 0; #X connect 3 1 4 0; #X connect 4 0 7 0; #X connect 5 0 2 0; #X connect 6 0 4 1; #X connect 7 0 8 0; #X connect 8 0 5 1; #X connect 9 0 8 1; #X restore 87 151 pd rnd127; #N canvas 0 0 450 300 rnd127 0; #X obj 40 18 inlet; #X obj 203 19 inlet; #X obj 103 257 outlet; #X obj 40 57 t f b; #X obj 127 96 random 0; #X obj 103 210 +; #X obj 203 41 * 10000; #X obj 127 122 / 10000; #X obj 128 155 - 0; #X obj 241 83 / 2; #X connect 0 0 3 0; #X connect 1 0 6 0; #X connect 1 0 9 0; #X connect 3 0 5 0; #X connect 3 1 4 0; #X connect 4 0 7 0; #X connect 5 0 2 0; #X connect 6 0 4 1; #X connect 7 0 8 0; #X connect 8 0 5 1; #X connect 9 0 8 1; #X restore 147 180 pd rnd127; #N canvas 0 0 450 300 rnd127 0; #X obj 40 18 inlet; #X obj 203 19 inlet; #X obj 103 257 outlet; #X obj 40 57 t f b; #X obj 127 96 random 0; #X obj 102 198 +; #X obj 203 41 * 10000; #X obj 127 124 / 10000; #X obj 128 155 - 0; #X obj 241 83 / 2; #X connect 0 0 3 0; #X connect 1 0 6 0; #X connect 1 0 9 0; #X connect 3 0 5 0; #X connect 3 1 4 0; #X connect 4 0 7 0; #X connect 5 0 2 0; #X connect 6 0 4 1; #X connect 7 0 8 0; #X connect 8 0 5 1; #X connect 9 0 8 1; #X restore 211 205 pd rnd127; #X text 189 150 position; #X text 257 183 taille; #X text 271 257 freq relative; #X obj 321 665 f; #X obj 188 51 delay; #X msg 272 79 0; #X msg 628 46 1; #X obj 272 113 switch~; #X obj 28 62 spigot; #X obj 609 85 spigot; #X msg 122 48 1; #X msg 115 74 0; #X obj 122 6 loadbang; #X obj 28 88 t a b; #X msg 679 45 0; #X msg 319 80 1; #X obj 19 388 t b s b; #X obj 28 32 t a a; #X obj 186 290 *; #X text 273 323 taille en echantillon de lecture; #X obj 213 229 mtof; #X obj 213 256 / 440; #X text 323 202 freq (midi); #X obj 28 120 unpack s f f f f f f f f f; #X text 365 115 table \, taille de la table \, position (0 \, 1) \, aleat \, taille du grain \, aleat \, freq relative \, aleat \, amplitude \, rand; #N canvas 0 0 450 300 rnd127 0; #X obj 40 18 inlet; #X obj 203 19 inlet; #X obj 103 257 outlet; #X obj 40 57 t f b; #X obj 127 96 random 0; #X obj 103 210 +; #X obj 203 41 * 10000; #X obj 127 122 / 10000; #X obj 128 155 - 0; #X obj 241 83 / 2; #X connect 0 0 3 0; #X connect 1 0 6 0; #X connect 1 0 9 0; #X connect 3 0 5 0; #X connect 3 1 4 0; #X connect 4 0 7 0; #X connect 5 0 2 0; #X connect 6 0 4 1; #X connect 7 0 8 0; #X connect 8 0 5 1; #X connect 9 0 8 1; #X restore 347 290 pd rnd127; #X text 453 288 amplitude; #X obj 321 724 *~; #X connect 0 0 2 0; #X connect 1 0 2 0; #X connect 2 0 3 0; #X connect 3 0 4 0; #X connect 5 0 38 0; #X connect 6 0 48 0; #X connect 7 0 8 1; #X connect 7 0 15 1; #X connect 8 0 10 0; #X connect 10 0 14 0; #X connect 12 0 13 0; #X connect 13 0 0 0; #X connect 14 0 12 0; #X connect 14 1 15 0; #X connect 15 0 12 1; #X connect 18 0 10 1; #X connect 19 0 12 2; #X connect 19 0 24 1; #X connect 19 0 39 0; #X connect 19 0 25 1; #X connect 20 0 41 0; #X connect 24 0 6 0; #X connect 25 0 26 0; #X connect 25 0 31 0; #X connect 25 0 35 0; #X connect 26 0 28 0; #X connect 27 0 30 1; #X connect 29 0 34 0; #X connect 30 0 17 0; #X connect 31 0 29 1; #X connect 32 0 29 1; #X connect 33 0 31 0; #X connect 33 0 26 0; #X connect 33 0 35 0; #X connect 34 0 44 0; #X connect 34 1 32 0; #X connect 34 1 36 0; #X connect 34 1 27 0; #X connect 35 0 30 1; #X connect 36 0 28 0; #X connect 37 0 24 0; #X connect 37 1 1 0; #X connect 37 2 25 0; #X connect 38 0 29 0; #X connect 38 1 30 0; #X connect 39 0 7 0; #X connect 41 0 42 0; #X connect 42 0 39 1; #X connect 44 0 37 0; #X connect 44 1 8 0; #X connect 44 2 18 0; #X connect 44 3 18 1; #X connect 44 4 19 0; #X connect 44 5 19 1; #X connect 44 6 20 0; #X connect 44 7 20 1; #X connect 44 8 46 0; #X connect 44 9 46 1; #X connect 46 0 48 1; #X connect 48 0 3 1; #X restore 49 49 pd ch_grain; #N canvas 0 0 450 300 ch_grain 0; #X obj 160 657 line~; #X msg 64 415 set \$1; #X obj 160 686 tabread4~; #X obj 297 749 *~; #X obj 297 781 outlet~; #X obj 28 8 inlet; #N canvas 0 0 1015 762 start_envelope 0; #X obj 16 10 inlet; #X obj 17 122 outlet~; #X msg 16 39 0 \, 1024 \$1; #X obj 16 66 line~; #X obj 16 92 tabread4~ \$0-env; #X connect 0 0 2 0; #X connect 2 0 3 0; #X connect 3 0 4 0; #X connect 4 0 1 0; #X restore 321 695 pd start_envelope; #X obj 186 323 * 44.1; #X obj 161 352 -; #X text 202 352 taille exploitable de la table; #X obj 161 413 *; #X text 202 416 debut du sample (echantillon); #X obj 159 576 pack f f f; #X msg 159 601 \$1 \, \$2 \$3; #X obj 161 451 t f f; #X obj 209 481 +; #X text 285 477 fin du sample; #X obj 611 792 outlet; #N canvas 0 0 450 300 rnd127 0; #X obj 40 18 inlet; #X obj 203 19 inlet; #X obj 103 257 outlet; #X obj 40 57 t f b; #X obj 127 96 random 0; #X obj 103 189 +; #X obj 203 46 * 10000; #X obj 127 124 / 10000; #X obj 128 155 - 0; #X obj 241 83 / 2; #X connect 0 0 3 0; #X connect 1 0 6 0; #X connect 1 0 9 0; #X connect 3 0 5 0; #X connect 3 1 4 0; #X connect 4 0 7 0; #X connect 5 0 2 0; #X connect 6 0 4 1; #X connect 7 0 8 0; #X connect 8 0 5 1; #X connect 9 0 8 1; #X restore 87 151 pd rnd127; #N canvas 0 0 450 300 rnd127 0; #X obj 40 18 inlet; #X obj 203 19 inlet; #X obj 103 257 outlet; #X obj 40 57 t f b; #X obj 127 96 random 0; #X obj 103 210 +; #X obj 203 41 * 10000; #X obj 127 122 / 10000; #X obj 128 155 - 0; #X obj 241 83 / 2; #X connect 0 0 3 0; #X connect 1 0 6 0; #X connect 1 0 9 0; #X connect 3 0 5 0; #X connect 3 1 4 0; #X connect 4 0 7 0; #X connect 5 0 2 0; #X connect 6 0 4 1; #X connect 7 0 8 0; #X connect 8 0 5 1; #X connect 9 0 8 1; #X restore 147 180 pd rnd127; #N canvas 0 0 450 300 rnd127 0; #X obj 40 18 inlet; #X obj 203 19 inlet; #X obj 103 257 outlet; #X obj 40 57 t f b; #X obj 127 96 random 0; #X obj 102 198 +; #X obj 203 41 * 10000; #X obj 127 124 / 10000; #X obj 128 155 - 0; #X obj 241 83 / 2; #X connect 0 0 3 0; #X connect 1 0 6 0; #X connect 1 0 9 0; #X connect 3 0 5 0; #X connect 3 1 4 0; #X connect 4 0 7 0; #X connect 5 0 2 0; #X connect 6 0 4 1; #X connect 7 0 8 0; #X connect 8 0 5 1; #X connect 9 0 8 1; #X restore 211 205 pd rnd127; #X text 189 150 position; #X text 257 183 taille; #X text 271 257 freq relative; #X obj 321 665 f; #X obj 188 51 delay; #X msg 272 79 0; #X msg 628 46 1; #X obj 272 113 switch~; #X obj 28 62 spigot; #X obj 609 85 spigot; #X msg 122 48 1; #X msg 115 74 0; #X obj 122 6 loadbang; #X obj 28 88 t a b; #X msg 679 45 0; #X msg 319 80 1; #X obj 19 388 t b s b; #X obj 28 32 t a a; #X obj 186 290 *; #X text 273 323 taille en echantillon de lecture; #X obj 213 229 mtof; #X obj 213 256 / 440; #X text 323 202 freq (midi); #X obj 28 120 unpack s f f f f f f f f f; #X text 365 115 table \, taille de la table \, position (0 \, 1) \, aleat \, taille du grain \, aleat \, freq relative \, aleat \, amplitude \, rand; #N canvas 0 0 450 300 rnd127 0; #X obj 40 18 inlet; #X obj 203 19 inlet; #X obj 103 257 outlet; #X obj 40 57 t f b; #X obj 127 96 random 0; #X obj 103 210 +; #X obj 203 41 * 10000; #X obj 127 122 / 10000; #X obj 128 155 - 0; #X obj 241 83 / 2; #X connect 0 0 3 0; #X connect 1 0 6 0; #X connect 1 0 9 0; #X connect 3 0 5 0; #X connect 3 1 4 0; #X connect 4 0 7 0; #X connect 5 0 2 0; #X connect 6 0 4 1; #X connect 7 0 8 0; #X connect 8 0 5 1; #X connect 9 0 8 1; #X restore 347 290 pd rnd127; #X text 453 288 amplitude; #X obj 321 724 *~; #X connect 0 0 2 0; #X connect 1 0 2 0; #X connect 2 0 3 0; #X connect 3 0 4 0; #X connect 5 0 38 0; #X connect 6 0 48 0; #X connect 7 0 8 1; #X connect 7 0 15 1; #X connect 8 0 10 0; #X connect 10 0 14 0; #X connect 12 0 13 0; #X connect 13 0 0 0; #X connect 14 0 12 0; #X connect 14 1 15 0; #X connect 15 0 12 1; #X connect 18 0 10 1; #X connect 19 0 12 2; #X connect 19 0 24 1; #X connect 19 0 39 0; #X connect 19 0 25 1; #X connect 20 0 41 0; #X connect 24 0 6 0; #X connect 25 0 26 0; #X connect 25 0 31 0; #X connect 25 0 35 0; #X connect 26 0 28 0; #X connect 27 0 30 1; #X connect 29 0 34 0; #X connect 30 0 17 0; #X connect 31 0 29 1; #X connect 32 0 29 1; #X connect 33 0 31 0; #X connect 33 0 26 0; #X connect 33 0 35 0; #X connect 34 0 44 0; #X connect 34 1 32 0; #X connect 34 1 36 0; #X connect 34 1 27 0; #X connect 35 0 30 1; #X connect 36 0 28 0; #X connect 37 0 24 0; #X connect 37 1 1 0; #X connect 37 2 25 0; #X connect 38 0 29 0; #X connect 38 1 30 0; #X connect 39 0 7 0; #X connect 41 0 42 0; #X connect 42 0 39 1; #X connect 44 0 37 0; #X connect 44 1 8 0; #X connect 44 2 18 0; #X connect 44 3 18 1; #X connect 44 4 19 0; #X connect 44 5 19 1; #X connect 44 6 20 0; #X connect 44 7 20 1; #X connect 44 8 46 0; #X connect 44 9 46 1; #X connect 46 0 48 1; #X connect 48 0 3 1; #X restore 151 258 pd ch_grain; #N canvas 0 0 450 300 ch_grain 0; #X obj 160 657 line~; #X msg 64 415 set \$1; #X obj 160 686 tabread4~; #X obj 297 749 *~; #X obj 297 781 outlet~; #X obj 28 8 inlet; #N canvas 0 0 1015 762 start_envelope 0; #X obj 16 10 inlet; #X obj 17 122 outlet~; #X msg 16 39 0 \, 1024 \$1; #X obj 16 66 line~; #X obj 16 92 tabread4~ \$0-env; #X connect 0 0 2 0; #X connect 2 0 3 0; #X connect 3 0 4 0; #X connect 4 0 1 0; #X restore 321 695 pd start_envelope; #X obj 186 323 * 44.1; #X obj 161 352 -; #X text 202 352 taille exploitable de la table; #X obj 161 413 *; #X text 202 416 debut du sample (echantillon); #X obj 159 576 pack f f f; #X msg 159 601 \$1 \, \$2 \$3; #X obj 161 451 t f f; #X obj 209 481 +; #X text 285 477 fin du sample; #X obj 611 792 outlet; #N canvas 0 0 450 300 rnd127 0; #X obj 40 18 inlet; #X obj 203 19 inlet; #X obj 103 257 outlet; #X obj 40 57 t f b; #X obj 127 96 random 0; #X obj 103 189 +; #X obj 203 46 * 10000; #X obj 127 124 / 10000; #X obj 128 155 - 0; #X obj 241 83 / 2; #X connect 0 0 3 0; #X connect 1 0 6 0; #X connect 1 0 9 0; #X connect 3 0 5 0; #X connect 3 1 4 0; #X connect 4 0 7 0; #X connect 5 0 2 0; #X connect 6 0 4 1; #X connect 7 0 8 0; #X connect 8 0 5 1; #X connect 9 0 8 1; #X restore 87 151 pd rnd127; #N canvas 0 0 450 300 rnd127 0; #X obj 40 18 inlet; #X obj 203 19 inlet; #X obj 103 257 outlet; #X obj 40 57 t f b; #X obj 127 96 random 0; #X obj 103 210 +; #X obj 203 41 * 10000; #X obj 127 122 / 10000; #X obj 128 155 - 0; #X obj 241 83 / 2; #X connect 0 0 3 0; #X connect 1 0 6 0; #X connect 1 0 9 0; #X connect 3 0 5 0; #X connect 3 1 4 0; #X connect 4 0 7 0; #X connect 5 0 2 0; #X connect 6 0 4 1; #X connect 7 0 8 0; #X connect 8 0 5 1; #X connect 9 0 8 1; #X restore 147 180 pd rnd127; #N canvas 0 0 450 300 rnd127 0; #X obj 40 18 inlet; #X obj 203 19 inlet; #X obj 103 257 outlet; #X obj 40 57 t f b; #X obj 127 96 random 0; #X obj 102 198 +; #X obj 203 41 * 10000; #X obj 127 124 / 10000; #X obj 128 155 - 0; #X obj 241 83 / 2; #X connect 0 0 3 0; #X connect 1 0 6 0; #X connect 1 0 9 0; #X connect 3 0 5 0; #X connect 3 1 4 0; #X connect 4 0 7 0; #X connect 5 0 2 0; #X connect 6 0 4 1; #X connect 7 0 8 0; #X connect 8 0 5 1; #X connect 9 0 8 1; #X restore 211 205 pd rnd127; #X text 189 150 position; #X text 257 183 taille; #X text 271 257 freq relative; #X obj 321 665 f; #X obj 188 51 delay; #X msg 272 79 0; #X msg 628 46 1; #X obj 272 113 switch~; #X obj 28 62 spigot; #X obj 609 85 spigot; #X msg 122 48 1; #X msg 115 74 0; #X obj 122 6 loadbang; #X obj 28 88 t a b; #X msg 679 45 0; #X msg 319 80 1; #X obj 19 388 t b s b; #X obj 28 32 t a a; #X obj 186 290 *; #X text 273 323 taille en echantillon de lecture; #X obj 213 229 mtof; #X obj 213 256 / 440; #X text 323 202 freq (midi); #X obj 28 120 unpack s f f f f f f f f f; #X text 365 115 table \, taille de la table \, position (0 \, 1) \, aleat \, taille du grain \, aleat \, freq relative \, aleat \, amplitude \, rand; #N canvas 0 0 450 300 rnd127 0; #X obj 40 18 inlet; #X obj 203 19 inlet; #X obj 103 257 outlet; #X obj 40 57 t f b; #X obj 127 96 random 0; #X obj 103 210 +; #X obj 203 41 * 10000; #X obj 127 122 / 10000; #X obj 128 155 - 0; #X obj 241 83 / 2; #X connect 0 0 3 0; #X connect 1 0 6 0; #X connect 1 0 9 0; #X connect 3 0 5 0; #X connect 3 1 4 0; #X connect 4 0 7 0; #X connect 5 0 2 0; #X connect 6 0 4 1; #X connect 7 0 8 0; #X connect 8 0 5 1; #X connect 9 0 8 1; #X restore 347 290 pd rnd127; #X text 453 288 amplitude; #X obj 321 724 *~; #X connect 0 0 2 0; #X connect 1 0 2 0; #X connect 2 0 3 0; #X connect 3 0 4 0; #X connect 5 0 38 0; #X connect 6 0 48 0; #X connect 7 0 8 1; #X connect 7 0 15 1; #X connect 8 0 10 0; #X connect 10 0 14 0; #X connect 12 0 13 0; #X connect 13 0 0 0; #X connect 14 0 12 0; #X connect 14 1 15 0; #X connect 15 0 12 1; #X connect 18 0 10 1; #X connect 19 0 12 2; #X connect 19 0 24 1; #X connect 19 0 39 0; #X connect 19 0 25 1; #X connect 20 0 41 0; #X connect 24 0 6 0; #X connect 25 0 26 0; #X connect 25 0 31 0; #X connect 25 0 35 0; #X connect 26 0 28 0; #X connect 27 0 30 1; #X connect 29 0 34 0; #X connect 30 0 17 0; #X connect 31 0 29 1; #X connect 32 0 29 1; #X connect 33 0 31 0; #X connect 33 0 26 0; #X connect 33 0 35 0; #X connect 34 0 44 0; #X connect 34 1 32 0; #X connect 34 1 36 0; #X connect 34 1 27 0; #X connect 35 0 30 1; #X connect 36 0 28 0; #X connect 37 0 24 0; #X connect 37 1 1 0; #X connect 37 2 25 0; #X connect 38 0 29 0; #X connect 38 1 30 0; #X connect 39 0 7 0; #X connect 41 0 42 0; #X connect 42 0 39 1; #X connect 44 0 37 0; #X connect 44 1 8 0; #X connect 44 2 18 0; #X connect 44 3 18 1; #X connect 44 4 19 0; #X connect 44 5 19 1; #X connect 44 6 20 0; #X connect 44 7 20 1; #X connect 44 8 46 0; #X connect 44 9 46 1; #X connect 46 0 48 1; #X connect 48 0 3 1; #X restore 164 280 pd ch_grain; #N canvas 0 0 450 300 ch_grain 0; #X obj 160 657 line~; #X msg 64 415 set \$1; #X obj 160 686 tabread4~; #X obj 297 749 *~; #X obj 297 781 outlet~; #X obj 28 8 inlet; #N canvas 0 0 1015 762 start_envelope 0; #X obj 16 10 inlet; #X obj 17 122 outlet~; #X msg 16 39 0 \, 1024 \$1; #X obj 16 66 line~; #X obj 16 92 tabread4~ \$0-env; #X connect 0 0 2 0; #X connect 2 0 3 0; #X connect 3 0 4 0; #X connect 4 0 1 0; #X restore 321 695 pd start_envelope; #X obj 186 323 * 44.1; #X obj 161 352 -; #X text 202 352 taille exploitable de la table; #X obj 161 413 *; #X text 202 416 debut du sample (echantillon); #X obj 159 576 pack f f f; #X msg 159 601 \$1 \, \$2 \$3; #X obj 161 451 t f f; #X obj 209 481 +; #X text 285 477 fin du sample; #X obj 611 792 outlet; #N canvas 0 0 450 300 rnd127 0; #X obj 40 18 inlet; #X obj 203 19 inlet; #X obj 103 257 outlet; #X obj 40 57 t f b; #X obj 127 96 random 0; #X obj 103 189 +; #X obj 203 46 * 10000; #X obj 127 124 / 10000; #X obj 128 155 - 0; #X obj 241 83 / 2; #X connect 0 0 3 0; #X connect 1 0 6 0; #X connect 1 0 9 0; #X connect 3 0 5 0; #X connect 3 1 4 0; #X connect 4 0 7 0; #X connect 5 0 2 0; #X connect 6 0 4 1; #X connect 7 0 8 0; #X connect 8 0 5 1; #X connect 9 0 8 1; #X restore 87 151 pd rnd127; #N canvas 0 0 450 300 rnd127 0; #X obj 40 18 inlet; #X obj 203 19 inlet; #X obj 103 257 outlet; #X obj 40 57 t f b; #X obj 127 96 random 0; #X obj 103 210 +; #X obj 203 41 * 10000; #X obj 127 122 / 10000; #X obj 128 155 - 0; #X obj 241 83 / 2; #X connect 0 0 3 0; #X connect 1 0 6 0; #X connect 1 0 9 0; #X connect 3 0 5 0; #X connect 3 1 4 0; #X connect 4 0 7 0; #X connect 5 0 2 0; #X connect 6 0 4 1; #X connect 7 0 8 0; #X connect 8 0 5 1; #X connect 9 0 8 1; #X restore 147 180 pd rnd127; #N canvas 0 0 450 300 rnd127 0; #X obj 40 18 inlet; #X obj 203 19 inlet; #X obj 103 257 outlet; #X obj 40 57 t f b; #X obj 127 96 random 0; #X obj 102 198 +; #X obj 203 41 * 10000; #X obj 127 124 / 10000; #X obj 128 155 - 0; #X obj 241 83 / 2; #X connect 0 0 3 0; #X connect 1 0 6 0; #X connect 1 0 9 0; #X connect 3 0 5 0; #X connect 3 1 4 0; #X connect 4 0 7 0; #X connect 5 0 2 0; #X connect 6 0 4 1; #X connect 7 0 8 0; #X connect 8 0 5 1; #X connect 9 0 8 1; #X restore 211 205 pd rnd127; #X text 189 150 position; #X text 257 183 taille; #X text 271 257 freq relative; #X obj 321 665 f; #X obj 188 51 delay; #X msg 272 79 0; #X msg 628 46 1; #X obj 272 113 switch~; #X obj 28 62 spigot; #X obj 609 85 spigot; #X msg 122 48 1; #X msg 115 74 0; #X obj 122 6 loadbang; #X obj 28 88 t a b; #X msg 679 45 0; #X msg 319 80 1; #X obj 19 388 t b s b; #X obj 28 32 t a a; #X obj 186 290 *; #X text 273 323 taille en echantillon de lecture; #X obj 213 229 mtof; #X obj 213 256 / 440; #X text 323 202 freq (midi); #X obj 28 120 unpack s f f f f f f f f f; #X text 365 115 table \, taille de la table \, position (0 \, 1) \, aleat \, taille du grain \, aleat \, freq relative \, aleat \, amplitude \, rand; #N canvas 0 0 450 300 rnd127 0; #X obj 40 18 inlet; #X obj 203 19 inlet; #X obj 103 257 outlet; #X obj 40 57 t f b; #X obj 127 96 random 0; #X obj 103 210 +; #X obj 203 41 * 10000; #X obj 127 122 / 10000; #X obj 128 155 - 0; #X obj 241 83 / 2; #X connect 0 0 3 0; #X connect 1 0 6 0; #X connect 1 0 9 0; #X connect 3 0 5 0; #X connect 3 1 4 0; #X connect 4 0 7 0; #X connect 5 0 2 0; #X connect 6 0 4 1; #X connect 7 0 8 0; #X connect 8 0 5 1; #X connect 9 0 8 1; #X restore 347 290 pd rnd127; #X text 453 288 amplitude; #X obj 321 724 *~; #X connect 0 0 2 0; #X connect 1 0 2 0; #X connect 2 0 3 0; #X connect 3 0 4 0; #X connect 5 0 38 0; #X connect 6 0 48 0; #X connect 7 0 8 1; #X connect 7 0 15 1; #X connect 8 0 10 0; #X connect 10 0 14 0; #X connect 12 0 13 0; #X connect 13 0 0 0; #X connect 14 0 12 0; #X connect 14 1 15 0; #X connect 15 0 12 1; #X connect 18 0 10 1; #X connect 19 0 12 2; #X connect 19 0 24 1; #X connect 19 0 39 0; #X connect 19 0 25 1; #X connect 20 0 41 0; #X connect 24 0 6 0; #X connect 25 0 26 0; #X connect 25 0 31 0; #X connect 25 0 35 0; #X connect 26 0 28 0; #X connect 27 0 30 1; #X connect 29 0 34 0; #X connect 30 0 17 0; #X connect 31 0 29 1; #X connect 32 0 29 1; #X connect 33 0 31 0; #X connect 33 0 26 0; #X connect 33 0 35 0; #X connect 34 0 44 0; #X connect 34 1 32 0; #X connect 34 1 36 0; #X connect 34 1 27 0; #X connect 35 0 30 1; #X connect 36 0 28 0; #X connect 37 0 24 0; #X connect 37 1 1 0; #X connect 37 2 25 0; #X connect 38 0 29 0; #X connect 38 1 30 0; #X connect 39 0 7 0; #X connect 41 0 42 0; #X connect 42 0 39 1; #X connect 44 0 37 0; #X connect 44 1 8 0; #X connect 44 2 18 0; #X connect 44 3 18 1; #X connect 44 4 19 0; #X connect 44 5 19 1; #X connect 44 6 20 0; #X connect 44 7 20 1; #X connect 44 8 46 0; #X connect 44 9 46 1; #X connect 46 0 48 1; #X connect 48 0 3 1; #X restore 174 304 pd ch_grain; #N canvas 0 0 450 300 ch_grain 0; #X obj 160 657 line~; #X msg 64 415 set \$1; #X obj 160 686 tabread4~; #X obj 297 749 *~; #X obj 297 781 outlet~; #X obj 28 8 inlet; #N canvas 0 0 1015 762 start_envelope 0; #X obj 16 10 inlet; #X obj 17 122 outlet~; #X msg 16 39 0 \, 1024 \$1; #X obj 16 66 line~; #X obj 16 92 tabread4~ \$0-env; #X connect 0 0 2 0; #X connect 2 0 3 0; #X connect 3 0 4 0; #X connect 4 0 1 0; #X restore 321 695 pd start_envelope; #X obj 186 323 * 44.1; #X obj 161 352 -; #X text 202 352 taille exploitable de la table; #X obj 161 413 *; #X text 202 416 debut du sample (echantillon); #X obj 159 576 pack f f f; #X msg 159 601 \$1 \, \$2 \$3; #X obj 161 451 t f f; #X obj 209 481 +; #X text 285 477 fin du sample; #X obj 611 792 outlet; #N canvas 0 0 450 300 rnd127 0; #X obj 40 18 inlet; #X obj 203 19 inlet; #X obj 103 257 outlet; #X obj 40 57 t f b; #X obj 127 96 random 0; #X obj 103 189 +; #X obj 203 46 * 10000; #X obj 127 124 / 10000; #X obj 128 155 - 0; #X obj 241 83 / 2; #X connect 0 0 3 0; #X connect 1 0 6 0; #X connect 1 0 9 0; #X connect 3 0 5 0; #X connect 3 1 4 0; #X connect 4 0 7 0; #X connect 5 0 2 0; #X connect 6 0 4 1; #X connect 7 0 8 0; #X connect 8 0 5 1; #X connect 9 0 8 1; #X restore 87 151 pd rnd127; #N canvas 0 0 450 300 rnd127 0; #X obj 40 18 inlet; #X obj 203 19 inlet; #X obj 103 257 outlet; #X obj 40 57 t f b; #X obj 127 96 random 0; #X obj 103 210 +; #X obj 203 41 * 10000; #X obj 127 122 / 10000; #X obj 128 155 - 0; #X obj 241 83 / 2; #X connect 0 0 3 0; #X connect 1 0 6 0; #X connect 1 0 9 0; #X connect 3 0 5 0; #X connect 3 1 4 0; #X connect 4 0 7 0; #X connect 5 0 2 0; #X connect 6 0 4 1; #X connect 7 0 8 0; #X connect 8 0 5 1; #X connect 9 0 8 1; #X restore 147 180 pd rnd127; #N canvas 0 0 450 300 rnd127 0; #X obj 40 18 inlet; #X obj 203 19 inlet; #X obj 103 257 outlet; #X obj 40 57 t f b; #X obj 127 96 random 0; #X obj 102 198 +; #X obj 203 41 * 10000; #X obj 127 124 / 10000; #X obj 128 155 - 0; #X obj 241 83 / 2; #X connect 0 0 3 0; #X connect 1 0 6 0; #X connect 1 0 9 0; #X connect 3 0 5 0; #X connect 3 1 4 0; #X connect 4 0 7 0; #X connect 5 0 2 0; #X connect 6 0 4 1; #X connect 7 0 8 0; #X connect 8 0 5 1; #X connect 9 0 8 1; #X restore 211 205 pd rnd127; #X text 189 150 position; #X text 257 183 taille; #X text 271 257 freq relative; #X obj 321 665 f; #X obj 188 51 delay; #X msg 272 79 0; #X msg 628 46 1; #X obj 272 113 switch~; #X obj 28 62 spigot; #X obj 609 85 spigot; #X msg 122 48 1; #X msg 115 74 0; #X obj 122 6 loadbang; #X obj 28 88 t a b; #X msg 679 45 0; #X msg 319 80 1; #X obj 19 388 t b s b; #X obj 28 32 t a a; #X obj 186 290 *; #X text 273 323 taille en echantillon de lecture; #X obj 213 229 mtof; #X obj 213 256 / 440; #X text 323 202 freq (midi); #X obj 28 120 unpack s f f f f f f f f f; #X text 365 115 table \, taille de la table \, position (0 \, 1) \, aleat \, taille du grain \, aleat \, freq relative \, aleat \, amplitude \, rand; #N canvas 0 0 450 300 rnd127 0; #X obj 40 18 inlet; #X obj 203 19 inlet; #X obj 103 257 outlet; #X obj 40 57 t f b; #X obj 127 96 random 0; #X obj 103 210 +; #X obj 203 41 * 10000; #X obj 127 122 / 10000; #X obj 128 155 - 0; #X obj 241 83 / 2; #X connect 0 0 3 0; #X connect 1 0 6 0; #X connect 1 0 9 0; #X connect 3 0 5 0; #X connect 3 1 4 0; #X connect 4 0 7 0; #X connect 5 0 2 0; #X connect 6 0 4 1; #X connect 7 0 8 0; #X connect 8 0 5 1; #X connect 9 0 8 1; #X restore 347 290 pd rnd127; #X text 453 288 amplitude; #X obj 321 724 *~; #X connect 0 0 2 0; #X connect 1 0 2 0; #X connect 2 0 3 0; #X connect 3 0 4 0; #X connect 5 0 38 0; #X connect 6 0 48 0; #X connect 7 0 8 1; #X connect 7 0 15 1; #X connect 8 0 10 0; #X connect 10 0 14 0; #X connect 12 0 13 0; #X connect 13 0 0 0; #X connect 14 0 12 0; #X connect 14 1 15 0; #X connect 15 0 12 1; #X connect 18 0 10 1; #X connect 19 0 12 2; #X connect 19 0 24 1; #X connect 19 0 39 0; #X connect 19 0 25 1; #X connect 20 0 41 0; #X connect 24 0 6 0; #X connect 25 0 26 0; #X connect 25 0 31 0; #X connect 25 0 35 0; #X connect 26 0 28 0; #X connect 27 0 30 1; #X connect 29 0 34 0; #X connect 30 0 17 0; #X connect 31 0 29 1; #X connect 32 0 29 1; #X connect 33 0 31 0; #X connect 33 0 26 0; #X connect 33 0 35 0; #X connect 34 0 44 0; #X connect 34 1 32 0; #X connect 34 1 36 0; #X connect 34 1 27 0; #X connect 35 0 30 1; #X connect 36 0 28 0; #X connect 37 0 24 0; #X connect 37 1 1 0; #X connect 37 2 25 0; #X connect 38 0 29 0; #X connect 38 1 30 0; #X connect 39 0 7 0; #X connect 41 0 42 0; #X connect 42 0 39 1; #X connect 44 0 37 0; #X connect 44 1 8 0; #X connect 44 2 18 0; #X connect 44 3 18 1; #X connect 44 4 19 0; #X connect 44 5 19 1; #X connect 44 6 20 0; #X connect 44 7 20 1; #X connect 44 8 46 0; #X connect 44 9 46 1; #X connect 46 0 48 1; #X connect 48 0 3 1; #X restore 187 328 pd ch_grain; #N canvas 0 0 450 300 ch_grain 0; #X obj 160 657 line~; #X msg 64 415 set \$1; #X obj 160 686 tabread4~; #X obj 297 749 *~; #X obj 297 781 outlet~; #X obj 28 8 inlet; #N canvas 0 0 1015 762 start_envelope 0; #X obj 16 10 inlet; #X obj 17 122 outlet~; #X msg 16 39 0 \, 1024 \$1; #X obj 16 66 line~; #X obj 16 92 tabread4~ \$0-env; #X connect 0 0 2 0; #X connect 2 0 3 0; #X connect 3 0 4 0; #X connect 4 0 1 0; #X restore 321 695 pd start_envelope; #X obj 186 323 * 44.1; #X obj 161 352 -; #X text 202 352 taille exploitable de la table; #X obj 161 413 *; #X text 202 416 debut du sample (echantillon); #X obj 159 576 pack f f f; #X msg 159 601 \$1 \, \$2 \$3; #X obj 161 451 t f f; #X obj 209 481 +; #X text 285 477 fin du sample; #X obj 611 792 outlet; #N canvas 0 0 450 300 rnd127 0; #X obj 40 18 inlet; #X obj 203 19 inlet; #X obj 103 257 outlet; #X obj 40 57 t f b; #X obj 127 96 random 0; #X obj 103 189 +; #X obj 203 46 * 10000; #X obj 127 124 / 10000; #X obj 128 155 - 0; #X obj 241 83 / 2; #X connect 0 0 3 0; #X connect 1 0 6 0; #X connect 1 0 9 0; #X connect 3 0 5 0; #X connect 3 1 4 0; #X connect 4 0 7 0; #X connect 5 0 2 0; #X connect 6 0 4 1; #X connect 7 0 8 0; #X connect 8 0 5 1; #X connect 9 0 8 1; #X restore 87 151 pd rnd127; #N canvas 0 0 450 300 rnd127 0; #X obj 40 18 inlet; #X obj 203 19 inlet; #X obj 103 257 outlet; #X obj 40 57 t f b; #X obj 127 96 random 0; #X obj 103 210 +; #X obj 203 41 * 10000; #X obj 127 122 / 10000; #X obj 128 155 - 0; #X obj 241 83 / 2; #X connect 0 0 3 0; #X connect 1 0 6 0; #X connect 1 0 9 0; #X connect 3 0 5 0; #X connect 3 1 4 0; #X connect 4 0 7 0; #X connect 5 0 2 0; #X connect 6 0 4 1; #X connect 7 0 8 0; #X connect 8 0 5 1; #X connect 9 0 8 1; #X restore 147 180 pd rnd127; #N canvas 0 0 450 300 rnd127 0; #X obj 40 18 inlet; #X obj 203 19 inlet; #X obj 103 257 outlet; #X obj 40 57 t f b; #X obj 127 96 random 0; #X obj 102 198 +; #X obj 203 41 * 10000; #X obj 127 124 / 10000; #X obj 128 155 - 0; #X obj 241 83 / 2; #X connect 0 0 3 0; #X connect 1 0 6 0; #X connect 1 0 9 0; #X connect 3 0 5 0; #X connect 3 1 4 0; #X connect 4 0 7 0; #X connect 5 0 2 0; #X connect 6 0 4 1; #X connect 7 0 8 0; #X connect 8 0 5 1; #X connect 9 0 8 1; #X restore 211 205 pd rnd127; #X text 189 150 position; #X text 257 183 taille; #X text 271 257 freq relative; #X obj 321 665 f; #X obj 188 51 delay; #X msg 272 79 0; #X msg 628 46 1; #X obj 272 113 switch~; #X obj 28 62 spigot; #X obj 609 85 spigot; #X msg 122 48 1; #X msg 115 74 0; #X obj 122 6 loadbang; #X obj 28 88 t a b; #X msg 679 45 0; #X msg 319 80 1; #X obj 19 388 t b s b; #X obj 28 32 t a a; #X obj 186 290 *; #X text 273 323 taille en echantillon de lecture; #X obj 213 229 mtof; #X obj 213 256 / 440; #X text 323 202 freq (midi); #X obj 28 120 unpack s f f f f f f f f f; #X text 365 115 table \, taille de la table \, position (0 \, 1) \, aleat \, taille du grain \, aleat \, freq relative \, aleat \, amplitude \, rand; #N canvas 0 0 450 300 rnd127 0; #X obj 40 18 inlet; #X obj 203 19 inlet; #X obj 103 257 outlet; #X obj 40 57 t f b; #X obj 127 96 random 0; #X obj 103 210 +; #X obj 203 41 * 10000; #X obj 127 122 / 10000; #X obj 128 155 - 0; #X obj 241 83 / 2; #X connect 0 0 3 0; #X connect 1 0 6 0; #X connect 1 0 9 0; #X connect 3 0 5 0; #X connect 3 1 4 0; #X connect 4 0 7 0; #X connect 5 0 2 0; #X connect 6 0 4 1; #X connect 7 0 8 0; #X connect 8 0 5 1; #X connect 9 0 8 1; #X restore 347 290 pd rnd127; #X text 453 288 amplitude; #X obj 321 724 *~; #X connect 0 0 2 0; #X connect 1 0 2 0; #X connect 2 0 3 0; #X connect 3 0 4 0; #X connect 5 0 38 0; #X connect 6 0 48 0; #X connect 7 0 8 1; #X connect 7 0 15 1; #X connect 8 0 10 0; #X connect 10 0 14 0; #X connect 12 0 13 0; #X connect 13 0 0 0; #X connect 14 0 12 0; #X connect 14 1 15 0; #X connect 15 0 12 1; #X connect 18 0 10 1; #X connect 19 0 12 2; #X connect 19 0 24 1; #X connect 19 0 39 0; #X connect 19 0 25 1; #X connect 20 0 41 0; #X connect 24 0 6 0; #X connect 25 0 26 0; #X connect 25 0 31 0; #X connect 25 0 35 0; #X connect 26 0 28 0; #X connect 27 0 30 1; #X connect 29 0 34 0; #X connect 30 0 17 0; #X connect 31 0 29 1; #X connect 32 0 29 1; #X connect 33 0 31 0; #X connect 33 0 26 0; #X connect 33 0 35 0; #X connect 34 0 44 0; #X connect 34 1 32 0; #X connect 34 1 36 0; #X connect 34 1 27 0; #X connect 35 0 30 1; #X connect 36 0 28 0; #X connect 37 0 24 0; #X connect 37 1 1 0; #X connect 37 2 25 0; #X connect 38 0 29 0; #X connect 38 1 30 0; #X connect 39 0 7 0; #X connect 41 0 42 0; #X connect 42 0 39 1; #X connect 44 0 37 0; #X connect 44 1 8 0; #X connect 44 2 18 0; #X connect 44 3 18 1; #X connect 44 4 19 0; #X connect 44 5 19 1; #X connect 44 6 20 0; #X connect 44 7 20 1; #X connect 44 8 46 0; #X connect 44 9 46 1; #X connect 46 0 48 1; #X connect 48 0 3 1; #X restore 197 352 pd ch_grain; #N canvas 0 0 450 300 ch_grain 0; #X obj 160 657 line~; #X msg 64 415 set \$1; #X obj 160 686 tabread4~; #X obj 297 749 *~; #X obj 297 781 outlet~; #X obj 28 8 inlet; #N canvas 0 0 1015 762 start_envelope 0; #X obj 16 10 inlet; #X obj 17 122 outlet~; #X msg 16 39 0 \, 1024 \$1; #X obj 16 66 line~; #X obj 16 92 tabread4~ \$0-env; #X connect 0 0 2 0; #X connect 2 0 3 0; #X connect 3 0 4 0; #X connect 4 0 1 0; #X restore 321 695 pd start_envelope; #X obj 186 323 * 44.1; #X obj 161 352 -; #X text 202 352 taille exploitable de la table; #X obj 161 413 *; #X text 202 416 debut du sample (echantillon); #X obj 159 576 pack f f f; #X msg 159 601 \$1 \, \$2 \$3; #X obj 161 451 t f f; #X obj 209 481 +; #X text 285 477 fin du sample; #X obj 611 792 outlet; #N canvas 0 0 450 300 rnd127 0; #X obj 40 18 inlet; #X obj 203 19 inlet; #X obj 103 257 outlet; #X obj 40 57 t f b; #X obj 127 96 random 0; #X obj 103 189 +; #X obj 203 46 * 10000; #X obj 127 124 / 10000; #X obj 128 155 - 0; #X obj 241 83 / 2; #X connect 0 0 3 0; #X connect 1 0 6 0; #X connect 1 0 9 0; #X connect 3 0 5 0; #X connect 3 1 4 0; #X connect 4 0 7 0; #X connect 5 0 2 0; #X connect 6 0 4 1; #X connect 7 0 8 0; #X connect 8 0 5 1; #X connect 9 0 8 1; #X restore 87 151 pd rnd127; #N canvas 0 0 450 300 rnd127 0; #X obj 40 18 inlet; #X obj 203 19 inlet; #X obj 103 257 outlet; #X obj 40 57 t f b; #X obj 127 96 random 0; #X obj 103 210 +; #X obj 203 41 * 10000; #X obj 127 122 / 10000; #X obj 128 155 - 0; #X obj 241 83 / 2; #X connect 0 0 3 0; #X connect 1 0 6 0; #X connect 1 0 9 0; #X connect 3 0 5 0; #X connect 3 1 4 0; #X connect 4 0 7 0; #X connect 5 0 2 0; #X connect 6 0 4 1; #X connect 7 0 8 0; #X connect 8 0 5 1; #X connect 9 0 8 1; #X restore 147 180 pd rnd127; #N canvas 0 0 450 300 rnd127 0; #X obj 40 18 inlet; #X obj 203 19 inlet; #X obj 103 257 outlet; #X obj 40 57 t f b; #X obj 127 96 random 0; #X obj 102 198 +; #X obj 203 41 * 10000; #X obj 127 124 / 10000; #X obj 128 155 - 0; #X obj 241 83 / 2; #X connect 0 0 3 0; #X connect 1 0 6 0; #X connect 1 0 9 0; #X connect 3 0 5 0; #X connect 3 1 4 0; #X connect 4 0 7 0; #X connect 5 0 2 0; #X connect 6 0 4 1; #X connect 7 0 8 0; #X connect 8 0 5 1; #X connect 9 0 8 1; #X restore 211 205 pd rnd127; #X text 189 150 position; #X text 257 183 taille; #X text 271 257 freq relative; #X obj 321 665 f; #X obj 188 51 delay; #X msg 272 79 0; #X msg 628 46 1; #X obj 272 113 switch~; #X obj 28 62 spigot; #X obj 609 85 spigot; #X msg 122 48 1; #X msg 115 74 0; #X obj 122 6 loadbang; #X obj 28 88 t a b; #X msg 679 45 0; #X msg 319 80 1; #X obj 19 388 t b s b; #X obj 28 32 t a a; #X obj 186 290 *; #X text 273 323 taille en echantillon de lecture; #X obj 213 229 mtof; #X obj 213 256 / 440; #X text 323 202 freq (midi); #X obj 28 120 unpack s f f f f f f f f f; #X text 365 115 table \, taille de la table \, position (0 \, 1) \, aleat \, taille du grain \, aleat \, freq relative \, aleat \, amplitude \, rand; #N canvas 0 0 450 300 rnd127 0; #X obj 40 18 inlet; #X obj 203 19 inlet; #X obj 103 257 outlet; #X obj 40 57 t f b; #X obj 127 96 random 0; #X obj 103 210 +; #X obj 203 41 * 10000; #X obj 127 122 / 10000; #X obj 128 155 - 0; #X obj 241 83 / 2; #X connect 0 0 3 0; #X connect 1 0 6 0; #X connect 1 0 9 0; #X connect 3 0 5 0; #X connect 3 1 4 0; #X connect 4 0 7 0; #X connect 5 0 2 0; #X connect 6 0 4 1; #X connect 7 0 8 0; #X connect 8 0 5 1; #X connect 9 0 8 1; #X restore 347 290 pd rnd127; #X text 453 288 amplitude; #X obj 321 724 *~; #X connect 0 0 2 0; #X connect 1 0 2 0; #X connect 2 0 3 0; #X connect 3 0 4 0; #X connect 5 0 38 0; #X connect 6 0 48 0; #X connect 7 0 8 1; #X connect 7 0 15 1; #X connect 8 0 10 0; #X connect 10 0 14 0; #X connect 12 0 13 0; #X connect 13 0 0 0; #X connect 14 0 12 0; #X connect 14 1 15 0; #X connect 15 0 12 1; #X connect 18 0 10 1; #X connect 19 0 12 2; #X connect 19 0 24 1; #X connect 19 0 39 0; #X connect 19 0 25 1; #X connect 20 0 41 0; #X connect 24 0 6 0; #X connect 25 0 26 0; #X connect 25 0 31 0; #X connect 25 0 35 0; #X connect 26 0 28 0; #X connect 27 0 30 1; #X connect 29 0 34 0; #X connect 30 0 17 0; #X connect 31 0 29 1; #X connect 32 0 29 1; #X connect 33 0 31 0; #X connect 33 0 26 0; #X connect 33 0 35 0; #X connect 34 0 44 0; #X connect 34 1 32 0; #X connect 34 1 36 0; #X connect 34 1 27 0; #X connect 35 0 30 1; #X connect 36 0 28 0; #X connect 37 0 24 0; #X connect 37 1 1 0; #X connect 37 2 25 0; #X connect 38 0 29 0; #X connect 38 1 30 0; #X connect 39 0 7 0; #X connect 41 0 42 0; #X connect 42 0 39 1; #X connect 44 0 37 0; #X connect 44 1 8 0; #X connect 44 2 18 0; #X connect 44 3 18 1; #X connect 44 4 19 0; #X connect 44 5 19 1; #X connect 44 6 20 0; #X connect 44 7 20 1; #X connect 44 8 46 0; #X connect 44 9 46 1; #X connect 46 0 48 1; #X connect 48 0 3 1; #X restore 210 374 pd ch_grain; #N canvas 0 0 450 300 ch_grain 0; #X obj 160 657 line~; #X msg 64 415 set \$1; #X obj 160 686 tabread4~; #X obj 297 749 *~; #X obj 297 781 outlet~; #X obj 28 8 inlet; #N canvas 0 0 1015 762 start_envelope 0; #X obj 16 10 inlet; #X obj 17 122 outlet~; #X msg 16 39 0 \, 1024 \$1; #X obj 16 66 line~; #X obj 16 92 tabread4~ \$0-env; #X connect 0 0 2 0; #X connect 2 0 3 0; #X connect 3 0 4 0; #X connect 4 0 1 0; #X restore 321 695 pd start_envelope; #X obj 186 323 * 44.1; #X obj 161 352 -; #X text 202 352 taille exploitable de la table; #X obj 161 413 *; #X text 202 416 debut du sample (echantillon); #X obj 159 576 pack f f f; #X msg 159 601 \$1 \, \$2 \$3; #X obj 161 451 t f f; #X obj 209 481 +; #X text 285 477 fin du sample; #X obj 611 792 outlet; #N canvas 0 0 450 300 rnd127 0; #X obj 40 18 inlet; #X obj 203 19 inlet; #X obj 103 257 outlet; #X obj 40 57 t f b; #X obj 127 96 random 0; #X obj 103 189 +; #X obj 203 46 * 10000; #X obj 127 124 / 10000; #X obj 128 155 - 0; #X obj 241 83 / 2; #X connect 0 0 3 0; #X connect 1 0 6 0; #X connect 1 0 9 0; #X connect 3 0 5 0; #X connect 3 1 4 0; #X connect 4 0 7 0; #X connect 5 0 2 0; #X connect 6 0 4 1; #X connect 7 0 8 0; #X connect 8 0 5 1; #X connect 9 0 8 1; #X restore 87 151 pd rnd127; #N canvas 0 0 450 300 rnd127 0; #X obj 40 18 inlet; #X obj 203 19 inlet; #X obj 103 257 outlet; #X obj 40 57 t f b; #X obj 127 96 random 0; #X obj 103 210 +; #X obj 203 41 * 10000; #X obj 127 122 / 10000; #X obj 128 155 - 0; #X obj 241 83 / 2; #X connect 0 0 3 0; #X connect 1 0 6 0; #X connect 1 0 9 0; #X connect 3 0 5 0; #X connect 3 1 4 0; #X connect 4 0 7 0; #X connect 5 0 2 0; #X connect 6 0 4 1; #X connect 7 0 8 0; #X connect 8 0 5 1; #X connect 9 0 8 1; #X restore 147 180 pd rnd127; #N canvas 0 0 450 300 rnd127 0; #X obj 40 18 inlet; #X obj 203 19 inlet; #X obj 103 257 outlet; #X obj 40 57 t f b; #X obj 127 96 random 0; #X obj 102 198 +; #X obj 203 41 * 10000; #X obj 127 124 / 10000; #X obj 128 155 - 0; #X obj 241 83 / 2; #X connect 0 0 3 0; #X connect 1 0 6 0; #X connect 1 0 9 0; #X connect 3 0 5 0; #X connect 3 1 4 0; #X connect 4 0 7 0; #X connect 5 0 2 0; #X connect 6 0 4 1; #X connect 7 0 8 0; #X connect 8 0 5 1; #X connect 9 0 8 1; #X restore 211 205 pd rnd127; #X text 189 150 position; #X text 257 183 taille; #X text 271 257 freq relative; #X obj 321 665 f; #X obj 188 51 delay; #X msg 272 79 0; #X msg 628 46 1; #X obj 272 113 switch~; #X obj 28 62 spigot; #X obj 609 85 spigot; #X msg 122 48 1; #X msg 115 74 0; #X obj 122 6 loadbang; #X obj 28 88 t a b; #X msg 679 45 0; #X msg 319 80 1; #X obj 19 388 t b s b; #X obj 28 32 t a a; #X obj 186 290 *; #X text 273 323 taille en echantillon de lecture; #X obj 213 229 mtof; #X obj 213 256 / 440; #X text 323 202 freq (midi); #X obj 28 120 unpack s f f f f f f f f f; #X text 365 115 table \, taille de la table \, position (0 \, 1) \, aleat \, taille du grain \, aleat \, freq relative \, aleat \, amplitude \, rand; #N canvas 0 0 450 300 rnd127 0; #X obj 40 18 inlet; #X obj 203 19 inlet; #X obj 103 257 outlet; #X obj 40 57 t f b; #X obj 127 96 random 0; #X obj 103 210 +; #X obj 203 41 * 10000; #X obj 127 122 / 10000; #X obj 128 155 - 0; #X obj 241 83 / 2; #X connect 0 0 3 0; #X connect 1 0 6 0; #X connect 1 0 9 0; #X connect 3 0 5 0; #X connect 3 1 4 0; #X connect 4 0 7 0; #X connect 5 0 2 0; #X connect 6 0 4 1; #X connect 7 0 8 0; #X connect 8 0 5 1; #X connect 9 0 8 1; #X restore 347 290 pd rnd127; #X text 453 288 amplitude; #X obj 321 724 *~; #X connect 0 0 2 0; #X connect 1 0 2 0; #X connect 2 0 3 0; #X connect 3 0 4 0; #X connect 5 0 38 0; #X connect 6 0 48 0; #X connect 7 0 8 1; #X connect 7 0 15 1; #X connect 8 0 10 0; #X connect 10 0 14 0; #X connect 12 0 13 0; #X connect 13 0 0 0; #X connect 14 0 12 0; #X connect 14 1 15 0; #X connect 15 0 12 1; #X connect 18 0 10 1; #X connect 19 0 12 2; #X connect 19 0 24 1; #X connect 19 0 39 0; #X connect 19 0 25 1; #X connect 20 0 41 0; #X connect 24 0 6 0; #X connect 25 0 26 0; #X connect 25 0 31 0; #X connect 25 0 35 0; #X connect 26 0 28 0; #X connect 27 0 30 1; #X connect 29 0 34 0; #X connect 30 0 17 0; #X connect 31 0 29 1; #X connect 32 0 29 1; #X connect 33 0 31 0; #X connect 33 0 26 0; #X connect 33 0 35 0; #X connect 34 0 44 0; #X connect 34 1 32 0; #X connect 34 1 36 0; #X connect 34 1 27 0; #X connect 35 0 30 1; #X connect 36 0 28 0; #X connect 37 0 24 0; #X connect 37 1 1 0; #X connect 37 2 25 0; #X connect 38 0 29 0; #X connect 38 1 30 0; #X connect 39 0 7 0; #X connect 41 0 42 0; #X connect 42 0 39 1; #X connect 44 0 37 0; #X connect 44 1 8 0; #X connect 44 2 18 0; #X connect 44 3 18 1; #X connect 44 4 19 0; #X connect 44 5 19 1; #X connect 44 6 20 0; #X connect 44 7 20 1; #X connect 44 8 46 0; #X connect 44 9 46 1; #X connect 46 0 48 1; #X connect 48 0 3 1; #X restore 220 398 pd ch_grain; #N canvas 0 0 450 300 ch_grain 0; #X obj 160 657 line~; #X msg 64 415 set \$1; #X obj 160 686 tabread4~; #X obj 297 749 *~; #X obj 297 781 outlet~; #X obj 28 8 inlet; #N canvas 0 0 1015 762 start_envelope 0; #X obj 16 10 inlet; #X obj 17 122 outlet~; #X msg 16 39 0 \, 1024 \$1; #X obj 16 66 line~; #X obj 16 92 tabread4~ \$0-env; #X connect 0 0 2 0; #X connect 2 0 3 0; #X connect 3 0 4 0; #X connect 4 0 1 0; #X restore 321 695 pd start_envelope; #X obj 186 323 * 44.1; #X obj 161 352 -; #X text 202 352 taille exploitable de la table; #X obj 161 413 *; #X text 202 416 debut du sample (echantillon); #X obj 159 576 pack f f f; #X msg 159 601 \$1 \, \$2 \$3; #X obj 161 451 t f f; #X obj 209 481 +; #X text 285 477 fin du sample; #X obj 611 792 outlet; #N canvas 0 0 450 300 rnd127 0; #X obj 40 18 inlet; #X obj 203 19 inlet; #X obj 103 257 outlet; #X obj 40 57 t f b; #X obj 127 96 random 0; #X obj 103 189 +; #X obj 203 46 * 10000; #X obj 127 124 / 10000; #X obj 128 155 - 0; #X obj 241 83 / 2; #X connect 0 0 3 0; #X connect 1 0 6 0; #X connect 1 0 9 0; #X connect 3 0 5 0; #X connect 3 1 4 0; #X connect 4 0 7 0; #X connect 5 0 2 0; #X connect 6 0 4 1; #X connect 7 0 8 0; #X connect 8 0 5 1; #X connect 9 0 8 1; #X restore 87 151 pd rnd127; #N canvas 0 0 450 300 rnd127 0; #X obj 40 18 inlet; #X obj 203 19 inlet; #X obj 103 257 outlet; #X obj 40 57 t f b; #X obj 127 96 random 0; #X obj 103 210 +; #X obj 203 41 * 10000; #X obj 127 122 / 10000; #X obj 128 155 - 0; #X obj 241 83 / 2; #X connect 0 0 3 0; #X connect 1 0 6 0; #X connect 1 0 9 0; #X connect 3 0 5 0; #X connect 3 1 4 0; #X connect 4 0 7 0; #X connect 5 0 2 0; #X connect 6 0 4 1; #X connect 7 0 8 0; #X connect 8 0 5 1; #X connect 9 0 8 1; #X restore 147 180 pd rnd127; #N canvas 0 0 450 300 rnd127 0; #X obj 40 18 inlet; #X obj 203 19 inlet; #X obj 103 257 outlet; #X obj 40 57 t f b; #X obj 127 96 random 0; #X obj 102 198 +; #X obj 203 41 * 10000; #X obj 127 124 / 10000; #X obj 128 155 - 0; #X obj 241 83 / 2; #X connect 0 0 3 0; #X connect 1 0 6 0; #X connect 1 0 9 0; #X connect 3 0 5 0; #X connect 3 1 4 0; #X connect 4 0 7 0; #X connect 5 0 2 0; #X connect 6 0 4 1; #X connect 7 0 8 0; #X connect 8 0 5 1; #X connect 9 0 8 1; #X restore 211 205 pd rnd127; #X text 189 150 position; #X text 257 183 taille; #X text 271 257 freq relative; #X obj 321 665 f; #X obj 188 51 delay; #X msg 272 79 0; #X msg 628 46 1; #X obj 272 113 switch~; #X obj 28 62 spigot; #X obj 609 85 spigot; #X msg 122 48 1; #X msg 115 74 0; #X obj 122 6 loadbang; #X obj 28 88 t a b; #X msg 679 45 0; #X msg 319 80 1; #X obj 19 388 t b s b; #X obj 28 32 t a a; #X obj 186 290 *; #X text 273 323 taille en echantillon de lecture; #X obj 213 229 mtof; #X obj 213 256 / 440; #X text 323 202 freq (midi); #X obj 28 120 unpack s f f f f f f f f f; #X text 365 115 table \, taille de la table \, position (0 \, 1) \, aleat \, taille du grain \, aleat \, freq relative \, aleat \, amplitude \, rand; #N canvas 0 0 450 300 rnd127 0; #X obj 40 18 inlet; #X obj 203 19 inlet; #X obj 103 257 outlet; #X obj 40 57 t f b; #X obj 127 96 random 0; #X obj 103 210 +; #X obj 203 41 * 10000; #X obj 127 122 / 10000; #X obj 128 155 - 0; #X obj 241 83 / 2; #X connect 0 0 3 0; #X connect 1 0 6 0; #X connect 1 0 9 0; #X connect 3 0 5 0; #X connect 3 1 4 0; #X connect 4 0 7 0; #X connect 5 0 2 0; #X connect 6 0 4 1; #X connect 7 0 8 0; #X connect 8 0 5 1; #X connect 9 0 8 1; #X restore 347 290 pd rnd127; #X text 453 288 amplitude; #X obj 321 724 *~; #X connect 0 0 2 0; #X connect 1 0 2 0; #X connect 2 0 3 0; #X connect 3 0 4 0; #X connect 5 0 38 0; #X connect 6 0 48 0; #X connect 7 0 8 1; #X connect 7 0 15 1; #X connect 8 0 10 0; #X connect 10 0 14 0; #X connect 12 0 13 0; #X connect 13 0 0 0; #X connect 14 0 12 0; #X connect 14 1 15 0; #X connect 15 0 12 1; #X connect 18 0 10 1; #X connect 19 0 12 2; #X connect 19 0 24 1; #X connect 19 0 39 0; #X connect 19 0 25 1; #X connect 20 0 41 0; #X connect 24 0 6 0; #X connect 25 0 26 0; #X connect 25 0 31 0; #X connect 25 0 35 0; #X connect 26 0 28 0; #X connect 27 0 30 1; #X connect 29 0 34 0; #X connect 30 0 17 0; #X connect 31 0 29 1; #X connect 32 0 29 1; #X connect 33 0 31 0; #X connect 33 0 26 0; #X connect 33 0 35 0; #X connect 34 0 44 0; #X connect 34 1 32 0; #X connect 34 1 36 0; #X connect 34 1 27 0; #X connect 35 0 30 1; #X connect 36 0 28 0; #X connect 37 0 24 0; #X connect 37 1 1 0; #X connect 37 2 25 0; #X connect 38 0 29 0; #X connect 38 1 30 0; #X connect 39 0 7 0; #X connect 41 0 42 0; #X connect 42 0 39 1; #X connect 44 0 37 0; #X connect 44 1 8 0; #X connect 44 2 18 0; #X connect 44 3 18 1; #X connect 44 4 19 0; #X connect 44 5 19 1; #X connect 44 6 20 0; #X connect 44 7 20 1; #X connect 44 8 46 0; #X connect 44 9 46 1; #X connect 46 0 48 1; #X connect 48 0 3 1; #X restore 141 234 pd ch_grain; #N canvas 0 0 450 300 ch_grain 0; #X obj 160 657 line~; #X msg 64 415 set \$1; #X obj 160 686 tabread4~; #X obj 297 749 *~; #X obj 297 781 outlet~; #X obj 28 8 inlet; #N canvas 0 0 1015 762 start_envelope 0; #X obj 16 10 inlet; #X obj 17 122 outlet~; #X msg 16 39 0 \, 1024 \$1; #X obj 16 66 line~; #X obj 16 92 tabread4~ \$0-env; #X connect 0 0 2 0; #X connect 2 0 3 0; #X connect 3 0 4 0; #X connect 4 0 1 0; #X restore 321 695 pd start_envelope; #X obj 186 323 * 44.1; #X obj 161 352 -; #X text 202 352 taille exploitable de la table; #X obj 161 413 *; #X text 202 416 debut du sample (echantillon); #X obj 159 576 pack f f f; #X msg 159 601 \$1 \, \$2 \$3; #X obj 161 451 t f f; #X obj 209 481 +; #X text 285 477 fin du sample; #X obj 611 792 outlet; #N canvas 0 0 450 300 rnd127 0; #X obj 40 18 inlet; #X obj 203 19 inlet; #X obj 103 257 outlet; #X obj 40 57 t f b; #X obj 127 96 random 0; #X obj 103 189 +; #X obj 203 46 * 10000; #X obj 127 124 / 10000; #X obj 128 155 - 0; #X obj 241 83 / 2; #X connect 0 0 3 0; #X connect 1 0 6 0; #X connect 1 0 9 0; #X connect 3 0 5 0; #X connect 3 1 4 0; #X connect 4 0 7 0; #X connect 5 0 2 0; #X connect 6 0 4 1; #X connect 7 0 8 0; #X connect 8 0 5 1; #X connect 9 0 8 1; #X restore 87 151 pd rnd127; #N canvas 0 0 450 300 rnd127 0; #X obj 40 18 inlet; #X obj 203 19 inlet; #X obj 103 257 outlet; #X obj 40 57 t f b; #X obj 127 96 random 0; #X obj 103 210 +; #X obj 203 41 * 10000; #X obj 127 122 / 10000; #X obj 128 155 - 0; #X obj 241 83 / 2; #X connect 0 0 3 0; #X connect 1 0 6 0; #X connect 1 0 9 0; #X connect 3 0 5 0; #X connect 3 1 4 0; #X connect 4 0 7 0; #X connect 5 0 2 0; #X connect 6 0 4 1; #X connect 7 0 8 0; #X connect 8 0 5 1; #X connect 9 0 8 1; #X restore 147 180 pd rnd127; #N canvas 0 0 450 300 rnd127 0; #X obj 40 18 inlet; #X obj 203 19 inlet; #X obj 103 257 outlet; #X obj 40 57 t f b; #X obj 127 96 random 0; #X obj 102 198 +; #X obj 203 41 * 10000; #X obj 127 124 / 10000; #X obj 128 155 - 0; #X obj 241 83 / 2; #X connect 0 0 3 0; #X connect 1 0 6 0; #X connect 1 0 9 0; #X connect 3 0 5 0; #X connect 3 1 4 0; #X connect 4 0 7 0; #X connect 5 0 2 0; #X connect 6 0 4 1; #X connect 7 0 8 0; #X connect 8 0 5 1; #X connect 9 0 8 1; #X restore 211 205 pd rnd127; #X text 189 150 position; #X text 257 183 taille; #X text 271 257 freq relative; #X obj 321 665 f; #X obj 188 51 delay; #X msg 272 79 0; #X msg 628 46 1; #X obj 272 113 switch~; #X obj 28 62 spigot; #X obj 609 85 spigot; #X msg 122 48 1; #X msg 115 74 0; #X obj 122 6 loadbang; #X obj 28 88 t a b; #X msg 679 45 0; #X msg 319 80 1; #X obj 19 388 t b s b; #X obj 28 32 t a a; #X obj 186 290 *; #X text 273 323 taille en echantillon de lecture; #X obj 213 229 mtof; #X obj 213 256 / 440; #X text 323 202 freq (midi); #X obj 28 120 unpack s f f f f f f f f f; #X text 365 115 table \, taille de la table \, position (0 \, 1) \, aleat \, taille du grain \, aleat \, freq relative \, aleat \, amplitude \, rand; #N canvas 0 0 450 300 rnd127 0; #X obj 40 18 inlet; #X obj 203 19 inlet; #X obj 103 257 outlet; #X obj 40 57 t f b; #X obj 127 96 random 0; #X obj 103 210 +; #X obj 203 41 * 10000; #X obj 127 122 / 10000; #X obj 128 155 - 0; #X obj 241 83 / 2; #X connect 0 0 3 0; #X connect 1 0 6 0; #X connect 1 0 9 0; #X connect 3 0 5 0; #X connect 3 1 4 0; #X connect 4 0 7 0; #X connect 5 0 2 0; #X connect 6 0 4 1; #X connect 7 0 8 0; #X connect 8 0 5 1; #X connect 9 0 8 1; #X restore 347 290 pd rnd127; #X text 453 288 amplitude; #X obj 321 724 *~; #X connect 0 0 2 0; #X connect 1 0 2 0; #X connect 2 0 3 0; #X connect 3 0 4 0; #X connect 5 0 38 0; #X connect 6 0 48 0; #X connect 7 0 8 1; #X connect 7 0 15 1; #X connect 8 0 10 0; #X connect 10 0 14 0; #X connect 12 0 13 0; #X connect 13 0 0 0; #X connect 14 0 12 0; #X connect 14 1 15 0; #X connect 15 0 12 1; #X connect 18 0 10 1; #X connect 19 0 12 2; #X connect 19 0 24 1; #X connect 19 0 39 0; #X connect 19 0 25 1; #X connect 20 0 41 0; #X connect 24 0 6 0; #X connect 25 0 26 0; #X connect 25 0 31 0; #X connect 25 0 35 0; #X connect 26 0 28 0; #X connect 27 0 30 1; #X connect 29 0 34 0; #X connect 30 0 17 0; #X connect 31 0 29 1; #X connect 32 0 29 1; #X connect 33 0 31 0; #X connect 33 0 26 0; #X connect 33 0 35 0; #X connect 34 0 44 0; #X connect 34 1 32 0; #X connect 34 1 36 0; #X connect 34 1 27 0; #X connect 35 0 30 1; #X connect 36 0 28 0; #X connect 37 0 24 0; #X connect 37 1 1 0; #X connect 37 2 25 0; #X connect 38 0 29 0; #X connect 38 1 30 0; #X connect 39 0 7 0; #X connect 41 0 42 0; #X connect 42 0 39 1; #X connect 44 0 37 0; #X connect 44 1 8 0; #X connect 44 2 18 0; #X connect 44 3 18 1; #X connect 44 4 19 0; #X connect 44 5 19 1; #X connect 44 6 20 0; #X connect 44 7 20 1; #X connect 44 8 46 0; #X connect 44 9 46 1; #X connect 46 0 48 1; #X connect 48 0 3 1; #X restore 239 443 pd ch_grain; #N canvas 0 0 450 300 ch_grain 0; #X obj 160 657 line~; #X msg 64 415 set \$1; #X obj 160 686 tabread4~; #X obj 297 749 *~; #X obj 297 781 outlet~; #X obj 28 8 inlet; #N canvas 0 0 1015 762 start_envelope 0; #X obj 16 10 inlet; #X obj 17 122 outlet~; #X msg 16 39 0 \, 1024 \$1; #X obj 16 66 line~; #X obj 16 92 tabread4~ \$0-env; #X connect 0 0 2 0; #X connect 2 0 3 0; #X connect 3 0 4 0; #X connect 4 0 1 0; #X restore 321 695 pd start_envelope; #X obj 186 323 * 44.1; #X obj 161 352 -; #X text 202 352 taille exploitable de la table; #X obj 161 413 *; #X text 202 416 debut du sample (echantillon); #X obj 159 576 pack f f f; #X msg 159 601 \$1 \, \$2 \$3; #X obj 161 451 t f f; #X obj 209 481 +; #X text 285 477 fin du sample; #X obj 611 792 outlet; #N canvas 0 0 450 300 rnd127 0; #X obj 40 18 inlet; #X obj 203 19 inlet; #X obj 103 257 outlet; #X obj 40 57 t f b; #X obj 127 96 random 0; #X obj 103 189 +; #X obj 203 46 * 10000; #X obj 127 124 / 10000; #X obj 128 155 - 0; #X obj 241 83 / 2; #X connect 0 0 3 0; #X connect 1 0 6 0; #X connect 1 0 9 0; #X connect 3 0 5 0; #X connect 3 1 4 0; #X connect 4 0 7 0; #X connect 5 0 2 0; #X connect 6 0 4 1; #X connect 7 0 8 0; #X connect 8 0 5 1; #X connect 9 0 8 1; #X restore 87 151 pd rnd127; #N canvas 0 0 450 300 rnd127 0; #X obj 40 18 inlet; #X obj 203 19 inlet; #X obj 103 257 outlet; #X obj 40 57 t f b; #X obj 127 96 random 0; #X obj 103 210 +; #X obj 203 41 * 10000; #X obj 127 122 / 10000; #X obj 128 155 - 0; #X obj 241 83 / 2; #X connect 0 0 3 0; #X connect 1 0 6 0; #X connect 1 0 9 0; #X connect 3 0 5 0; #X connect 3 1 4 0; #X connect 4 0 7 0; #X connect 5 0 2 0; #X connect 6 0 4 1; #X connect 7 0 8 0; #X connect 8 0 5 1; #X connect 9 0 8 1; #X restore 147 180 pd rnd127; #N canvas 0 0 450 300 rnd127 0; #X obj 40 18 inlet; #X obj 203 19 inlet; #X obj 103 257 outlet; #X obj 40 57 t f b; #X obj 127 96 random 0; #X obj 102 198 +; #X obj 203 41 * 10000; #X obj 127 124 / 10000; #X obj 128 155 - 0; #X obj 241 83 / 2; #X connect 0 0 3 0; #X connect 1 0 6 0; #X connect 1 0 9 0; #X connect 3 0 5 0; #X connect 3 1 4 0; #X connect 4 0 7 0; #X connect 5 0 2 0; #X connect 6 0 4 1; #X connect 7 0 8 0; #X connect 8 0 5 1; #X connect 9 0 8 1; #X restore 211 205 pd rnd127; #X text 189 150 position; #X text 257 183 taille; #X text 271 257 freq relative; #X obj 321 665 f; #X obj 188 51 delay; #X msg 272 79 0; #X msg 628 46 1; #X obj 272 113 switch~; #X obj 28 62 spigot; #X obj 609 85 spigot; #X msg 122 48 1; #X msg 115 74 0; #X obj 122 6 loadbang; #X obj 28 88 t a b; #X msg 679 45 0; #X msg 319 80 1; #X obj 19 388 t b s b; #X obj 28 32 t a a; #X obj 186 290 *; #X text 273 323 taille en echantillon de lecture; #X obj 213 229 mtof; #X obj 213 256 / 440; #X text 323 202 freq (midi); #X obj 28 120 unpack s f f f f f f f f f; #X text 365 115 table \, taille de la table \, position (0 \, 1) \, aleat \, taille du grain \, aleat \, freq relative \, aleat \, amplitude \, rand; #N canvas 0 0 450 300 rnd127 0; #X obj 40 18 inlet; #X obj 203 19 inlet; #X obj 103 257 outlet; #X obj 40 57 t f b; #X obj 127 96 random 0; #X obj 103 210 +; #X obj 203 41 * 10000; #X obj 127 122 / 10000; #X obj 128 155 - 0; #X obj 241 83 / 2; #X connect 0 0 3 0; #X connect 1 0 6 0; #X connect 1 0 9 0; #X connect 3 0 5 0; #X connect 3 1 4 0; #X connect 4 0 7 0; #X connect 5 0 2 0; #X connect 6 0 4 1; #X connect 7 0 8 0; #X connect 8 0 5 1; #X connect 9 0 8 1; #X restore 347 290 pd rnd127; #X text 453 288 amplitude; #X obj 321 724 *~; #X connect 0 0 2 0; #X connect 1 0 2 0; #X connect 2 0 3 0; #X connect 3 0 4 0; #X connect 5 0 38 0; #X connect 6 0 48 0; #X connect 7 0 8 1; #X connect 7 0 15 1; #X connect 8 0 10 0; #X connect 10 0 14 0; #X connect 12 0 13 0; #X connect 13 0 0 0; #X connect 14 0 12 0; #X connect 14 1 15 0; #X connect 15 0 12 1; #X connect 18 0 10 1; #X connect 19 0 12 2; #X connect 19 0 24 1; #X connect 19 0 39 0; #X connect 19 0 25 1; #X connect 20 0 41 0; #X connect 24 0 6 0; #X connect 25 0 26 0; #X connect 25 0 31 0; #X connect 25 0 35 0; #X connect 26 0 28 0; #X connect 27 0 30 1; #X connect 29 0 34 0; #X connect 30 0 17 0; #X connect 31 0 29 1; #X connect 32 0 29 1; #X connect 33 0 31 0; #X connect 33 0 26 0; #X connect 33 0 35 0; #X connect 34 0 44 0; #X connect 34 1 32 0; #X connect 34 1 36 0; #X connect 34 1 27 0; #X connect 35 0 30 1; #X connect 36 0 28 0; #X connect 37 0 24 0; #X connect 37 1 1 0; #X connect 37 2 25 0; #X connect 38 0 29 0; #X connect 38 1 30 0; #X connect 39 0 7 0; #X connect 41 0 42 0; #X connect 42 0 39 1; #X connect 44 0 37 0; #X connect 44 1 8 0; #X connect 44 2 18 0; #X connect 44 3 18 1; #X connect 44 4 19 0; #X connect 44 5 19 1; #X connect 44 6 20 0; #X connect 44 7 20 1; #X connect 44 8 46 0; #X connect 44 9 46 1; #X connect 46 0 48 1; #X connect 48 0 3 1; #X restore 252 465 pd ch_grain; #N canvas 0 0 450 300 ch_grain 0; #X obj 160 657 line~; #X msg 64 415 set \$1; #X obj 160 686 tabread4~; #X obj 297 749 *~; #X obj 297 781 outlet~; #X obj 28 8 inlet; #N canvas 0 0 1015 762 start_envelope 0; #X obj 16 10 inlet; #X obj 17 122 outlet~; #X msg 16 39 0 \, 1024 \$1; #X obj 16 66 line~; #X obj 16 92 tabread4~ \$0-env; #X connect 0 0 2 0; #X connect 2 0 3 0; #X connect 3 0 4 0; #X connect 4 0 1 0; #X restore 321 695 pd start_envelope; #X obj 186 323 * 44.1; #X obj 161 352 -; #X text 202 352 taille exploitable de la table; #X obj 161 413 *; #X text 202 416 debut du sample (echantillon); #X obj 159 576 pack f f f; #X msg 159 601 \$1 \, \$2 \$3; #X obj 161 451 t f f; #X obj 209 481 +; #X text 285 477 fin du sample; #X obj 611 792 outlet; #N canvas 0 0 450 300 rnd127 0; #X obj 40 18 inlet; #X obj 203 19 inlet; #X obj 103 257 outlet; #X obj 40 57 t f b; #X obj 127 96 random 0; #X obj 103 189 +; #X obj 203 46 * 10000; #X obj 127 124 / 10000; #X obj 128 155 - 0; #X obj 241 83 / 2; #X connect 0 0 3 0; #X connect 1 0 6 0; #X connect 1 0 9 0; #X connect 3 0 5 0; #X connect 3 1 4 0; #X connect 4 0 7 0; #X connect 5 0 2 0; #X connect 6 0 4 1; #X connect 7 0 8 0; #X connect 8 0 5 1; #X connect 9 0 8 1; #X restore 87 151 pd rnd127; #N canvas 0 0 450 300 rnd127 0; #X obj 40 18 inlet; #X obj 203 19 inlet; #X obj 103 257 outlet; #X obj 40 57 t f b; #X obj 127 96 random 0; #X obj 103 210 +; #X obj 203 41 * 10000; #X obj 127 122 / 10000; #X obj 128 155 - 0; #X obj 241 83 / 2; #X connect 0 0 3 0; #X connect 1 0 6 0; #X connect 1 0 9 0; #X connect 3 0 5 0; #X connect 3 1 4 0; #X connect 4 0 7 0; #X connect 5 0 2 0; #X connect 6 0 4 1; #X connect 7 0 8 0; #X connect 8 0 5 1; #X connect 9 0 8 1; #X restore 147 180 pd rnd127; #N canvas 0 0 450 300 rnd127 0; #X obj 40 18 inlet; #X obj 203 19 inlet; #X obj 103 257 outlet; #X obj 40 57 t f b; #X obj 127 96 random 0; #X obj 102 198 +; #X obj 203 41 * 10000; #X obj 127 124 / 10000; #X obj 128 155 - 0; #X obj 241 83 / 2; #X connect 0 0 3 0; #X connect 1 0 6 0; #X connect 1 0 9 0; #X connect 3 0 5 0; #X connect 3 1 4 0; #X connect 4 0 7 0; #X connect 5 0 2 0; #X connect 6 0 4 1; #X connect 7 0 8 0; #X connect 8 0 5 1; #X connect 9 0 8 1; #X restore 211 205 pd rnd127; #X text 189 150 position; #X text 257 183 taille; #X text 271 257 freq relative; #X obj 321 665 f; #X obj 188 51 delay; #X msg 272 79 0; #X msg 628 46 1; #X obj 272 113 switch~; #X obj 28 62 spigot; #X obj 609 85 spigot; #X msg 122 48 1; #X msg 115 74 0; #X obj 122 6 loadbang; #X obj 28 88 t a b; #X msg 679 45 0; #X msg 319 80 1; #X obj 19 388 t b s b; #X obj 28 32 t a a; #X obj 186 290 *; #X text 273 323 taille en echantillon de lecture; #X obj 213 229 mtof; #X obj 213 256 / 440; #X text 323 202 freq (midi); #X obj 28 120 unpack s f f f f f f f f f; #X text 365 115 table \, taille de la table \, position (0 \, 1) \, aleat \, taille du grain \, aleat \, freq relative \, aleat \, amplitude \, rand; #N canvas 0 0 450 300 rnd127 0; #X obj 40 18 inlet; #X obj 203 19 inlet; #X obj 103 257 outlet; #X obj 40 57 t f b; #X obj 127 96 random 0; #X obj 103 210 +; #X obj 203 41 * 10000; #X obj 127 122 / 10000; #X obj 128 155 - 0; #X obj 241 83 / 2; #X connect 0 0 3 0; #X connect 1 0 6 0; #X connect 1 0 9 0; #X connect 3 0 5 0; #X connect 3 1 4 0; #X connect 4 0 7 0; #X connect 5 0 2 0; #X connect 6 0 4 1; #X connect 7 0 8 0; #X connect 8 0 5 1; #X connect 9 0 8 1; #X restore 347 290 pd rnd127; #X text 453 288 amplitude; #X obj 321 724 *~; #X connect 0 0 2 0; #X connect 1 0 2 0; #X connect 2 0 3 0; #X connect 3 0 4 0; #X connect 5 0 38 0; #X connect 6 0 48 0; #X connect 7 0 8 1; #X connect 7 0 15 1; #X connect 8 0 10 0; #X connect 10 0 14 0; #X connect 12 0 13 0; #X connect 13 0 0 0; #X connect 14 0 12 0; #X connect 14 1 15 0; #X connect 15 0 12 1; #X connect 18 0 10 1; #X connect 19 0 12 2; #X connect 19 0 24 1; #X connect 19 0 39 0; #X connect 19 0 25 1; #X connect 20 0 41 0; #X connect 24 0 6 0; #X connect 25 0 26 0; #X connect 25 0 31 0; #X connect 25 0 35 0; #X connect 26 0 28 0; #X connect 27 0 30 1; #X connect 29 0 34 0; #X connect 30 0 17 0; #X connect 31 0 29 1; #X connect 32 0 29 1; #X connect 33 0 31 0; #X connect 33 0 26 0; #X connect 33 0 35 0; #X connect 34 0 44 0; #X connect 34 1 32 0; #X connect 34 1 36 0; #X connect 34 1 27 0; #X connect 35 0 30 1; #X connect 36 0 28 0; #X connect 37 0 24 0; #X connect 37 1 1 0; #X connect 37 2 25 0; #X connect 38 0 29 0; #X connect 38 1 30 0; #X connect 39 0 7 0; #X connect 41 0 42 0; #X connect 42 0 39 1; #X connect 44 0 37 0; #X connect 44 1 8 0; #X connect 44 2 18 0; #X connect 44 3 18 1; #X connect 44 4 19 0; #X connect 44 5 19 1; #X connect 44 6 20 0; #X connect 44 7 20 1; #X connect 44 8 46 0; #X connect 44 9 46 1; #X connect 46 0 48 1; #X connect 48 0 3 1; #X restore 262 489 pd ch_grain; #N canvas 0 0 450 300 ch_grain 0; #X obj 160 657 line~; #X msg 64 415 set \$1; #X obj 160 686 tabread4~; #X obj 297 749 *~; #X obj 297 781 outlet~; #X obj 28 8 inlet; #N canvas 0 0 1015 762 start_envelope 0; #X obj 16 10 inlet; #X obj 17 122 outlet~; #X msg 16 39 0 \, 1024 \$1; #X obj 16 66 line~; #X obj 16 92 tabread4~ \$0-env; #X connect 0 0 2 0; #X connect 2 0 3 0; #X connect 3 0 4 0; #X connect 4 0 1 0; #X restore 321 695 pd start_envelope; #X obj 186 323 * 44.1; #X obj 161 352 -; #X text 202 352 taille exploitable de la table; #X obj 161 413 *; #X text 202 416 debut du sample (echantillon); #X obj 159 576 pack f f f; #X msg 159 601 \$1 \, \$2 \$3; #X obj 161 451 t f f; #X obj 209 481 +; #X text 285 477 fin du sample; #X obj 611 792 outlet; #N canvas 0 0 450 300 rnd127 0; #X obj 40 18 inlet; #X obj 203 19 inlet; #X obj 103 257 outlet; #X obj 40 57 t f b; #X obj 127 96 random 0; #X obj 103 189 +; #X obj 203 46 * 10000; #X obj 127 124 / 10000; #X obj 128 155 - 0; #X obj 241 83 / 2; #X connect 0 0 3 0; #X connect 1 0 6 0; #X connect 1 0 9 0; #X connect 3 0 5 0; #X connect 3 1 4 0; #X connect 4 0 7 0; #X connect 5 0 2 0; #X connect 6 0 4 1; #X connect 7 0 8 0; #X connect 8 0 5 1; #X connect 9 0 8 1; #X restore 87 151 pd rnd127; #N canvas 0 0 450 300 rnd127 0; #X obj 40 18 inlet; #X obj 203 19 inlet; #X obj 103 257 outlet; #X obj 40 57 t f b; #X obj 127 96 random 0; #X obj 103 210 +; #X obj 203 41 * 10000; #X obj 127 122 / 10000; #X obj 128 155 - 0; #X obj 241 83 / 2; #X connect 0 0 3 0; #X connect 1 0 6 0; #X connect 1 0 9 0; #X connect 3 0 5 0; #X connect 3 1 4 0; #X connect 4 0 7 0; #X connect 5 0 2 0; #X connect 6 0 4 1; #X connect 7 0 8 0; #X connect 8 0 5 1; #X connect 9 0 8 1; #X restore 147 180 pd rnd127; #N canvas 0 0 450 300 rnd127 0; #X obj 40 18 inlet; #X obj 203 19 inlet; #X obj 103 257 outlet; #X obj 40 57 t f b; #X obj 127 96 random 0; #X obj 102 198 +; #X obj 203 41 * 10000; #X obj 127 124 / 10000; #X obj 128 155 - 0; #X obj 241 83 / 2; #X connect 0 0 3 0; #X connect 1 0 6 0; #X connect 1 0 9 0; #X connect 3 0 5 0; #X connect 3 1 4 0; #X connect 4 0 7 0; #X connect 5 0 2 0; #X connect 6 0 4 1; #X connect 7 0 8 0; #X connect 8 0 5 1; #X connect 9 0 8 1; #X restore 211 205 pd rnd127; #X text 189 150 position; #X text 257 183 taille; #X text 271 257 freq relative; #X obj 321 665 f; #X obj 188 51 delay; #X msg 272 79 0; #X msg 628 46 1; #X obj 272 113 switch~; #X obj 28 62 spigot; #X obj 609 85 spigot; #X msg 122 48 1; #X msg 115 74 0; #X obj 122 6 loadbang; #X obj 28 88 t a b; #X msg 679 45 0; #X msg 319 80 1; #X obj 19 388 t b s b; #X obj 28 32 t a a; #X obj 186 290 *; #X text 273 323 taille en echantillon de lecture; #X obj 213 229 mtof; #X obj 213 256 / 440; #X text 323 202 freq (midi); #X obj 28 120 unpack s f f f f f f f f f; #X text 365 115 table \, taille de la table \, position (0 \, 1) \, aleat \, taille du grain \, aleat \, freq relative \, aleat \, amplitude \, rand; #N canvas 0 0 450 300 rnd127 0; #X obj 40 18 inlet; #X obj 203 19 inlet; #X obj 103 257 outlet; #X obj 40 57 t f b; #X obj 127 96 random 0; #X obj 103 210 +; #X obj 203 41 * 10000; #X obj 127 122 / 10000; #X obj 128 155 - 0; #X obj 241 83 / 2; #X connect 0 0 3 0; #X connect 1 0 6 0; #X connect 1 0 9 0; #X connect 3 0 5 0; #X connect 3 1 4 0; #X connect 4 0 7 0; #X connect 5 0 2 0; #X connect 6 0 4 1; #X connect 7 0 8 0; #X connect 8 0 5 1; #X connect 9 0 8 1; #X restore 347 290 pd rnd127; #X text 453 288 amplitude; #X obj 321 724 *~; #X connect 0 0 2 0; #X connect 1 0 2 0; #X connect 2 0 3 0; #X connect 3 0 4 0; #X connect 5 0 38 0; #X connect 6 0 48 0; #X connect 7 0 8 1; #X connect 7 0 15 1; #X connect 8 0 10 0; #X connect 10 0 14 0; #X connect 12 0 13 0; #X connect 13 0 0 0; #X connect 14 0 12 0; #X connect 14 1 15 0; #X connect 15 0 12 1; #X connect 18 0 10 1; #X connect 19 0 12 2; #X connect 19 0 24 1; #X connect 19 0 39 0; #X connect 19 0 25 1; #X connect 20 0 41 0; #X connect 24 0 6 0; #X connect 25 0 26 0; #X connect 25 0 31 0; #X connect 25 0 35 0; #X connect 26 0 28 0; #X connect 27 0 30 1; #X connect 29 0 34 0; #X connect 30 0 17 0; #X connect 31 0 29 1; #X connect 32 0 29 1; #X connect 33 0 31 0; #X connect 33 0 26 0; #X connect 33 0 35 0; #X connect 34 0 44 0; #X connect 34 1 32 0; #X connect 34 1 36 0; #X connect 34 1 27 0; #X connect 35 0 30 1; #X connect 36 0 28 0; #X connect 37 0 24 0; #X connect 37 1 1 0; #X connect 37 2 25 0; #X connect 38 0 29 0; #X connect 38 1 30 0; #X connect 39 0 7 0; #X connect 41 0 42 0; #X connect 42 0 39 1; #X connect 44 0 37 0; #X connect 44 1 8 0; #X connect 44 2 18 0; #X connect 44 3 18 1; #X connect 44 4 19 0; #X connect 44 5 19 1; #X connect 44 6 20 0; #X connect 44 7 20 1; #X connect 44 8 46 0; #X connect 44 9 46 1; #X connect 46 0 48 1; #X connect 48 0 3 1; #X restore 275 513 pd ch_grain; #N canvas 0 0 450 300 ch_grain 0; #X obj 160 657 line~; #X msg 64 415 set \$1; #X obj 160 686 tabread4~; #X obj 297 749 *~; #X obj 297 781 outlet~; #X obj 28 8 inlet; #N canvas 0 0 1015 762 start_envelope 0; #X obj 16 10 inlet; #X obj 17 122 outlet~; #X msg 16 39 0 \, 1024 \$1; #X obj 16 66 line~; #X obj 16 92 tabread4~ \$0-env; #X connect 0 0 2 0; #X connect 2 0 3 0; #X connect 3 0 4 0; #X connect 4 0 1 0; #X restore 321 695 pd start_envelope; #X obj 186 323 * 44.1; #X obj 161 352 -; #X text 202 352 taille exploitable de la table; #X obj 161 413 *; #X text 202 416 debut du sample (echantillon); #X obj 159 576 pack f f f; #X msg 159 601 \$1 \, \$2 \$3; #X obj 161 451 t f f; #X obj 209 481 +; #X text 285 477 fin du sample; #X obj 611 792 outlet; #N canvas 0 0 450 300 rnd127 0; #X obj 40 18 inlet; #X obj 203 19 inlet; #X obj 103 257 outlet; #X obj 40 57 t f b; #X obj 127 96 random 0; #X obj 103 189 +; #X obj 203 46 * 10000; #X obj 127 124 / 10000; #X obj 128 155 - 0; #X obj 241 83 / 2; #X connect 0 0 3 0; #X connect 1 0 6 0; #X connect 1 0 9 0; #X connect 3 0 5 0; #X connect 3 1 4 0; #X connect 4 0 7 0; #X connect 5 0 2 0; #X connect 6 0 4 1; #X connect 7 0 8 0; #X connect 8 0 5 1; #X connect 9 0 8 1; #X restore 87 151 pd rnd127; #N canvas 0 0 450 300 rnd127 0; #X obj 40 18 inlet; #X obj 203 19 inlet; #X obj 103 257 outlet; #X obj 40 57 t f b; #X obj 127 96 random 0; #X obj 103 210 +; #X obj 203 41 * 10000; #X obj 127 122 / 10000; #X obj 128 155 - 0; #X obj 241 83 / 2; #X connect 0 0 3 0; #X connect 1 0 6 0; #X connect 1 0 9 0; #X connect 3 0 5 0; #X connect 3 1 4 0; #X connect 4 0 7 0; #X connect 5 0 2 0; #X connect 6 0 4 1; #X connect 7 0 8 0; #X connect 8 0 5 1; #X connect 9 0 8 1; #X restore 147 180 pd rnd127; #N canvas 0 0 450 300 rnd127 0; #X obj 40 18 inlet; #X obj 203 19 inlet; #X obj 103 257 outlet; #X obj 40 57 t f b; #X obj 127 96 random 0; #X obj 102 198 +; #X obj 203 41 * 10000; #X obj 127 124 / 10000; #X obj 128 155 - 0; #X obj 241 83 / 2; #X connect 0 0 3 0; #X connect 1 0 6 0; #X connect 1 0 9 0; #X connect 3 0 5 0; #X connect 3 1 4 0; #X connect 4 0 7 0; #X connect 5 0 2 0; #X connect 6 0 4 1; #X connect 7 0 8 0; #X connect 8 0 5 1; #X connect 9 0 8 1; #X restore 211 205 pd rnd127; #X text 189 150 position; #X text 257 183 taille; #X text 271 257 freq relative; #X obj 321 665 f; #X obj 188 51 delay; #X msg 272 79 0; #X msg 628 46 1; #X obj 272 113 switch~; #X obj 28 62 spigot; #X obj 609 85 spigot; #X msg 122 48 1; #X msg 115 74 0; #X obj 122 6 loadbang; #X obj 28 88 t a b; #X msg 679 45 0; #X msg 319 80 1; #X obj 19 388 t b s b; #X obj 28 32 t a a; #X obj 186 290 *; #X text 273 323 taille en echantillon de lecture; #X obj 213 229 mtof; #X obj 213 256 / 440; #X text 323 202 freq (midi); #X obj 28 120 unpack s f f f f f f f f f; #X text 365 115 table \, taille de la table \, position (0 \, 1) \, aleat \, taille du grain \, aleat \, freq relative \, aleat \, amplitude \, rand; #N canvas 0 0 450 300 rnd127 0; #X obj 40 18 inlet; #X obj 203 19 inlet; #X obj 103 257 outlet; #X obj 40 57 t f b; #X obj 127 96 random 0; #X obj 103 210 +; #X obj 203 41 * 10000; #X obj 127 122 / 10000; #X obj 128 155 - 0; #X obj 241 83 / 2; #X connect 0 0 3 0; #X connect 1 0 6 0; #X connect 1 0 9 0; #X connect 3 0 5 0; #X connect 3 1 4 0; #X connect 4 0 7 0; #X connect 5 0 2 0; #X connect 6 0 4 1; #X connect 7 0 8 0; #X connect 8 0 5 1; #X connect 9 0 8 1; #X restore 347 290 pd rnd127; #X text 453 288 amplitude; #X obj 321 724 *~; #X connect 0 0 2 0; #X connect 1 0 2 0; #X connect 2 0 3 0; #X connect 3 0 4 0; #X connect 5 0 38 0; #X connect 6 0 48 0; #X connect 7 0 8 1; #X connect 7 0 15 1; #X connect 8 0 10 0; #X connect 10 0 14 0; #X connect 12 0 13 0; #X connect 13 0 0 0; #X connect 14 0 12 0; #X connect 14 1 15 0; #X connect 15 0 12 1; #X connect 18 0 10 1; #X connect 19 0 12 2; #X connect 19 0 24 1; #X connect 19 0 39 0; #X connect 19 0 25 1; #X connect 20 0 41 0; #X connect 24 0 6 0; #X connect 25 0 26 0; #X connect 25 0 31 0; #X connect 25 0 35 0; #X connect 26 0 28 0; #X connect 27 0 30 1; #X connect 29 0 34 0; #X connect 30 0 17 0; #X connect 31 0 29 1; #X connect 32 0 29 1; #X connect 33 0 31 0; #X connect 33 0 26 0; #X connect 33 0 35 0; #X connect 34 0 44 0; #X connect 34 1 32 0; #X connect 34 1 36 0; #X connect 34 1 27 0; #X connect 35 0 30 1; #X connect 36 0 28 0; #X connect 37 0 24 0; #X connect 37 1 1 0; #X connect 37 2 25 0; #X connect 38 0 29 0; #X connect 38 1 30 0; #X connect 39 0 7 0; #X connect 41 0 42 0; #X connect 42 0 39 1; #X connect 44 0 37 0; #X connect 44 1 8 0; #X connect 44 2 18 0; #X connect 44 3 18 1; #X connect 44 4 19 0; #X connect 44 5 19 1; #X connect 44 6 20 0; #X connect 44 7 20 1; #X connect 44 8 46 0; #X connect 44 9 46 1; #X connect 46 0 48 1; #X connect 48 0 3 1; #X restore 285 537 pd ch_grain; #N canvas 0 0 450 300 ch_grain 0; #X obj 160 657 line~; #X msg 64 415 set \$1; #X obj 160 686 tabread4~; #X obj 297 749 *~; #X obj 297 781 outlet~; #X obj 28 8 inlet; #N canvas 0 0 1015 762 start_envelope 0; #X obj 16 10 inlet; #X obj 17 122 outlet~; #X msg 16 39 0 \, 1024 \$1; #X obj 16 66 line~; #X obj 16 92 tabread4~ \$0-env; #X connect 0 0 2 0; #X connect 2 0 3 0; #X connect 3 0 4 0; #X connect 4 0 1 0; #X restore 321 695 pd start_envelope; #X obj 186 323 * 44.1; #X obj 161 352 -; #X text 202 352 taille exploitable de la table; #X obj 161 413 *; #X text 202 416 debut du sample (echantillon); #X obj 159 576 pack f f f; #X msg 159 601 \$1 \, \$2 \$3; #X obj 161 451 t f f; #X obj 209 481 +; #X text 285 477 fin du sample; #X obj 611 792 outlet; #N canvas 0 0 450 300 rnd127 0; #X obj 40 18 inlet; #X obj 203 19 inlet; #X obj 103 257 outlet; #X obj 40 57 t f b; #X obj 127 96 random 0; #X obj 103 189 +; #X obj 203 46 * 10000; #X obj 127 124 / 10000; #X obj 128 155 - 0; #X obj 241 83 / 2; #X connect 0 0 3 0; #X connect 1 0 6 0; #X connect 1 0 9 0; #X connect 3 0 5 0; #X connect 3 1 4 0; #X connect 4 0 7 0; #X connect 5 0 2 0; #X connect 6 0 4 1; #X connect 7 0 8 0; #X connect 8 0 5 1; #X connect 9 0 8 1; #X restore 87 151 pd rnd127; #N canvas 0 0 450 300 rnd127 0; #X obj 40 18 inlet; #X obj 203 19 inlet; #X obj 103 257 outlet; #X obj 40 57 t f b; #X obj 127 96 random 0; #X obj 103 210 +; #X obj 203 41 * 10000; #X obj 127 122 / 10000; #X obj 128 155 - 0; #X obj 241 83 / 2; #X connect 0 0 3 0; #X connect 1 0 6 0; #X connect 1 0 9 0; #X connect 3 0 5 0; #X connect 3 1 4 0; #X connect 4 0 7 0; #X connect 5 0 2 0; #X connect 6 0 4 1; #X connect 7 0 8 0; #X connect 8 0 5 1; #X connect 9 0 8 1; #X restore 147 180 pd rnd127; #N canvas 0 0 450 300 rnd127 0; #X obj 40 18 inlet; #X obj 203 19 inlet; #X obj 103 257 outlet; #X obj 40 57 t f b; #X obj 127 96 random 0; #X obj 102 198 +; #X obj 203 41 * 10000; #X obj 127 124 / 10000; #X obj 128 155 - 0; #X obj 241 83 / 2; #X connect 0 0 3 0; #X connect 1 0 6 0; #X connect 1 0 9 0; #X connect 3 0 5 0; #X connect 3 1 4 0; #X connect 4 0 7 0; #X connect 5 0 2 0; #X connect 6 0 4 1; #X connect 7 0 8 0; #X connect 8 0 5 1; #X connect 9 0 8 1; #X restore 211 205 pd rnd127; #X text 189 150 position; #X text 257 183 taille; #X text 271 257 freq relative; #X obj 321 665 f; #X obj 188 51 delay; #X msg 272 79 0; #X msg 628 46 1; #X obj 272 113 switch~; #X obj 28 62 spigot; #X obj 609 85 spigot; #X msg 122 48 1; #X msg 115 74 0; #X obj 122 6 loadbang; #X obj 28 88 t a b; #X msg 679 45 0; #X msg 319 80 1; #X obj 19 388 t b s b; #X obj 28 32 t a a; #X obj 186 290 *; #X text 273 323 taille en echantillon de lecture; #X obj 213 229 mtof; #X obj 213 256 / 440; #X text 323 202 freq (midi); #X obj 28 120 unpack s f f f f f f f f f; #X text 365 115 table \, taille de la table \, position (0 \, 1) \, aleat \, taille du grain \, aleat \, freq relative \, aleat \, amplitude \, rand; #N canvas 0 0 450 300 rnd127 0; #X obj 40 18 inlet; #X obj 203 19 inlet; #X obj 103 257 outlet; #X obj 40 57 t f b; #X obj 127 96 random 0; #X obj 103 210 +; #X obj 203 41 * 10000; #X obj 127 122 / 10000; #X obj 128 155 - 0; #X obj 241 83 / 2; #X connect 0 0 3 0; #X connect 1 0 6 0; #X connect 1 0 9 0; #X connect 3 0 5 0; #X connect 3 1 4 0; #X connect 4 0 7 0; #X connect 5 0 2 0; #X connect 6 0 4 1; #X connect 7 0 8 0; #X connect 8 0 5 1; #X connect 9 0 8 1; #X restore 347 290 pd rnd127; #X text 453 288 amplitude; #X obj 321 724 *~; #X connect 0 0 2 0; #X connect 1 0 2 0; #X connect 2 0 3 0; #X connect 3 0 4 0; #X connect 5 0 38 0; #X connect 6 0 48 0; #X connect 7 0 8 1; #X connect 7 0 15 1; #X connect 8 0 10 0; #X connect 10 0 14 0; #X connect 12 0 13 0; #X connect 13 0 0 0; #X connect 14 0 12 0; #X connect 14 1 15 0; #X connect 15 0 12 1; #X connect 18 0 10 1; #X connect 19 0 12 2; #X connect 19 0 24 1; #X connect 19 0 39 0; #X connect 19 0 25 1; #X connect 20 0 41 0; #X connect 24 0 6 0; #X connect 25 0 26 0; #X connect 25 0 31 0; #X connect 25 0 35 0; #X connect 26 0 28 0; #X connect 27 0 30 1; #X connect 29 0 34 0; #X connect 30 0 17 0; #X connect 31 0 29 1; #X connect 32 0 29 1; #X connect 33 0 31 0; #X connect 33 0 26 0; #X connect 33 0 35 0; #X connect 34 0 44 0; #X connect 34 1 32 0; #X connect 34 1 36 0; #X connect 34 1 27 0; #X connect 35 0 30 1; #X connect 36 0 28 0; #X connect 37 0 24 0; #X connect 37 1 1 0; #X connect 37 2 25 0; #X connect 38 0 29 0; #X connect 38 1 30 0; #X connect 39 0 7 0; #X connect 41 0 42 0; #X connect 42 0 39 1; #X connect 44 0 37 0; #X connect 44 1 8 0; #X connect 44 2 18 0; #X connect 44 3 18 1; #X connect 44 4 19 0; #X connect 44 5 19 1; #X connect 44 6 20 0; #X connect 44 7 20 1; #X connect 44 8 46 0; #X connect 44 9 46 1; #X connect 46 0 48 1; #X connect 48 0 3 1; #X restore 298 559 pd ch_grain; #N canvas 0 0 450 300 ch_grain 0; #X obj 160 657 line~; #X msg 64 415 set \$1; #X obj 160 686 tabread4~; #X obj 297 749 *~; #X obj 297 781 outlet~; #X obj 28 8 inlet; #N canvas 0 0 1015 762 start_envelope 0; #X obj 16 10 inlet; #X obj 17 122 outlet~; #X msg 16 39 0 \, 1024 \$1; #X obj 16 66 line~; #X obj 16 92 tabread4~ \$0-env; #X connect 0 0 2 0; #X connect 2 0 3 0; #X connect 3 0 4 0; #X connect 4 0 1 0; #X restore 321 695 pd start_envelope; #X obj 186 323 * 44.1; #X obj 161 352 -; #X text 202 352 taille exploitable de la table; #X obj 161 413 *; #X text 202 416 debut du sample (echantillon); #X obj 159 576 pack f f f; #X msg 159 601 \$1 \, \$2 \$3; #X obj 161 451 t f f; #X obj 209 481 +; #X text 285 477 fin du sample; #X obj 611 792 outlet; #N canvas 0 0 450 300 rnd127 0; #X obj 40 18 inlet; #X obj 203 19 inlet; #X obj 103 257 outlet; #X obj 40 57 t f b; #X obj 127 96 random 0; #X obj 103 189 +; #X obj 203 46 * 10000; #X obj 127 124 / 10000; #X obj 128 155 - 0; #X obj 241 83 / 2; #X connect 0 0 3 0; #X connect 1 0 6 0; #X connect 1 0 9 0; #X connect 3 0 5 0; #X connect 3 1 4 0; #X connect 4 0 7 0; #X connect 5 0 2 0; #X connect 6 0 4 1; #X connect 7 0 8 0; #X connect 8 0 5 1; #X connect 9 0 8 1; #X restore 87 151 pd rnd127; #N canvas 0 0 450 300 rnd127 0; #X obj 40 18 inlet; #X obj 203 19 inlet; #X obj 103 257 outlet; #X obj 40 57 t f b; #X obj 127 96 random 0; #X obj 103 210 +; #X obj 203 41 * 10000; #X obj 127 122 / 10000; #X obj 128 155 - 0; #X obj 241 83 / 2; #X connect 0 0 3 0; #X connect 1 0 6 0; #X connect 1 0 9 0; #X connect 3 0 5 0; #X connect 3 1 4 0; #X connect 4 0 7 0; #X connect 5 0 2 0; #X connect 6 0 4 1; #X connect 7 0 8 0; #X connect 8 0 5 1; #X connect 9 0 8 1; #X restore 147 180 pd rnd127; #N canvas 0 0 450 300 rnd127 0; #X obj 40 18 inlet; #X obj 203 19 inlet; #X obj 103 257 outlet; #X obj 40 57 t f b; #X obj 127 96 random 0; #X obj 102 198 +; #X obj 203 41 * 10000; #X obj 127 124 / 10000; #X obj 128 155 - 0; #X obj 241 83 / 2; #X connect 0 0 3 0; #X connect 1 0 6 0; #X connect 1 0 9 0; #X connect 3 0 5 0; #X connect 3 1 4 0; #X connect 4 0 7 0; #X connect 5 0 2 0; #X connect 6 0 4 1; #X connect 7 0 8 0; #X connect 8 0 5 1; #X connect 9 0 8 1; #X restore 211 205 pd rnd127; #X text 189 150 position; #X text 257 183 taille; #X text 271 257 freq relative; #X obj 321 665 f; #X obj 188 51 delay; #X msg 272 79 0; #X msg 628 46 1; #X obj 272 113 switch~; #X obj 28 62 spigot; #X obj 609 85 spigot; #X msg 122 48 1; #X msg 115 74 0; #X obj 122 6 loadbang; #X obj 28 88 t a b; #X msg 679 45 0; #X msg 319 80 1; #X obj 19 388 t b s b; #X obj 28 32 t a a; #X obj 186 290 *; #X text 273 323 taille en echantillon de lecture; #X obj 213 229 mtof; #X obj 213 256 / 440; #X text 323 202 freq (midi); #X obj 28 120 unpack s f f f f f f f f f; #X text 365 115 table \, taille de la table \, position (0 \, 1) \, aleat \, taille du grain \, aleat \, freq relative \, aleat \, amplitude \, rand; #N canvas 0 0 450 300 rnd127 0; #X obj 40 18 inlet; #X obj 203 19 inlet; #X obj 103 257 outlet; #X obj 40 57 t f b; #X obj 127 96 random 0; #X obj 103 210 +; #X obj 203 41 * 10000; #X obj 127 122 / 10000; #X obj 128 155 - 0; #X obj 241 83 / 2; #X connect 0 0 3 0; #X connect 1 0 6 0; #X connect 1 0 9 0; #X connect 3 0 5 0; #X connect 3 1 4 0; #X connect 4 0 7 0; #X connect 5 0 2 0; #X connect 6 0 4 1; #X connect 7 0 8 0; #X connect 8 0 5 1; #X connect 9 0 8 1; #X restore 347 290 pd rnd127; #X text 453 288 amplitude; #X obj 321 724 *~; #X connect 0 0 2 0; #X connect 1 0 2 0; #X connect 2 0 3 0; #X connect 3 0 4 0; #X connect 5 0 38 0; #X connect 6 0 48 0; #X connect 7 0 8 1; #X connect 7 0 15 1; #X connect 8 0 10 0; #X connect 10 0 14 0; #X connect 12 0 13 0; #X connect 13 0 0 0; #X connect 14 0 12 0; #X connect 14 1 15 0; #X connect 15 0 12 1; #X connect 18 0 10 1; #X connect 19 0 12 2; #X connect 19 0 24 1; #X connect 19 0 39 0; #X connect 19 0 25 1; #X connect 20 0 41 0; #X connect 24 0 6 0; #X connect 25 0 26 0; #X connect 25 0 31 0; #X connect 25 0 35 0; #X connect 26 0 28 0; #X connect 27 0 30 1; #X connect 29 0 34 0; #X connect 30 0 17 0; #X connect 31 0 29 1; #X connect 32 0 29 1; #X connect 33 0 31 0; #X connect 33 0 26 0; #X connect 33 0 35 0; #X connect 34 0 44 0; #X connect 34 1 32 0; #X connect 34 1 36 0; #X connect 34 1 27 0; #X connect 35 0 30 1; #X connect 36 0 28 0; #X connect 37 0 24 0; #X connect 37 1 1 0; #X connect 37 2 25 0; #X connect 38 0 29 0; #X connect 38 1 30 0; #X connect 39 0 7 0; #X connect 41 0 42 0; #X connect 42 0 39 1; #X connect 44 0 37 0; #X connect 44 1 8 0; #X connect 44 2 18 0; #X connect 44 3 18 1; #X connect 44 4 19 0; #X connect 44 5 19 1; #X connect 44 6 20 0; #X connect 44 7 20 1; #X connect 44 8 46 0; #X connect 44 9 46 1; #X connect 46 0 48 1; #X connect 48 0 3 1; #X restore 308 583 pd ch_grain; #N canvas 0 0 450 300 ch_grain 0; #X obj 160 657 line~; #X msg 64 415 set \$1; #X obj 160 686 tabread4~; #X obj 297 749 *~; #X obj 297 781 outlet~; #X obj 28 8 inlet; #N canvas 0 0 1015 762 start_envelope 0; #X obj 16 10 inlet; #X obj 17 122 outlet~; #X msg 16 39 0 \, 1024 \$1; #X obj 16 66 line~; #X obj 16 92 tabread4~ \$0-env; #X connect 0 0 2 0; #X connect 2 0 3 0; #X connect 3 0 4 0; #X connect 4 0 1 0; #X restore 321 695 pd start_envelope; #X obj 186 323 * 44.1; #X obj 161 352 -; #X text 202 352 taille exploitable de la table; #X obj 161 413 *; #X text 202 416 debut du sample (echantillon); #X obj 159 576 pack f f f; #X msg 159 601 \$1 \, \$2 \$3; #X obj 161 451 t f f; #X obj 209 481 +; #X text 285 477 fin du sample; #X obj 611 792 outlet; #N canvas 0 0 450 300 rnd127 0; #X obj 40 18 inlet; #X obj 203 19 inlet; #X obj 103 257 outlet; #X obj 40 57 t f b; #X obj 127 96 random 0; #X obj 103 189 +; #X obj 203 46 * 10000; #X obj 127 124 / 10000; #X obj 128 155 - 0; #X obj 241 83 / 2; #X connect 0 0 3 0; #X connect 1 0 6 0; #X connect 1 0 9 0; #X connect 3 0 5 0; #X connect 3 1 4 0; #X connect 4 0 7 0; #X connect 5 0 2 0; #X connect 6 0 4 1; #X connect 7 0 8 0; #X connect 8 0 5 1; #X connect 9 0 8 1; #X restore 87 151 pd rnd127; #N canvas 0 0 450 300 rnd127 0; #X obj 40 18 inlet; #X obj 203 19 inlet; #X obj 103 257 outlet; #X obj 40 57 t f b; #X obj 127 96 random 0; #X obj 103 210 +; #X obj 203 41 * 10000; #X obj 127 122 / 10000; #X obj 128 155 - 0; #X obj 241 83 / 2; #X connect 0 0 3 0; #X connect 1 0 6 0; #X connect 1 0 9 0; #X connect 3 0 5 0; #X connect 3 1 4 0; #X connect 4 0 7 0; #X connect 5 0 2 0; #X connect 6 0 4 1; #X connect 7 0 8 0; #X connect 8 0 5 1; #X connect 9 0 8 1; #X restore 147 180 pd rnd127; #N canvas 0 0 450 300 rnd127 0; #X obj 40 18 inlet; #X obj 203 19 inlet; #X obj 103 257 outlet; #X obj 40 57 t f b; #X obj 127 96 random 0; #X obj 102 198 +; #X obj 203 41 * 10000; #X obj 127 124 / 10000; #X obj 128 155 - 0; #X obj 241 83 / 2; #X connect 0 0 3 0; #X connect 1 0 6 0; #X connect 1 0 9 0; #X connect 3 0 5 0; #X connect 3 1 4 0; #X connect 4 0 7 0; #X connect 5 0 2 0; #X connect 6 0 4 1; #X connect 7 0 8 0; #X connect 8 0 5 1; #X connect 9 0 8 1; #X restore 211 205 pd rnd127; #X text 189 150 position; #X text 257 183 taille; #X text 271 257 freq relative; #X obj 321 665 f; #X obj 188 51 delay; #X msg 272 79 0; #X msg 628 46 1; #X obj 272 113 switch~; #X obj 28 62 spigot; #X obj 609 85 spigot; #X msg 122 48 1; #X msg 115 74 0; #X obj 122 6 loadbang; #X obj 28 88 t a b; #X msg 679 45 0; #X msg 319 80 1; #X obj 19 388 t b s b; #X obj 28 32 t a a; #X obj 186 290 *; #X text 273 323 taille en echantillon de lecture; #X obj 213 229 mtof; #X obj 213 256 / 440; #X text 323 202 freq (midi); #X obj 28 120 unpack s f f f f f f f f f; #X text 365 115 table \, taille de la table \, position (0 \, 1) \, aleat \, taille du grain \, aleat \, freq relative \, aleat \, amplitude \, rand; #N canvas 0 0 450 300 rnd127 0; #X obj 40 18 inlet; #X obj 203 19 inlet; #X obj 103 257 outlet; #X obj 40 57 t f b; #X obj 127 96 random 0; #X obj 103 210 +; #X obj 203 41 * 10000; #X obj 127 122 / 10000; #X obj 128 155 - 0; #X obj 241 83 / 2; #X connect 0 0 3 0; #X connect 1 0 6 0; #X connect 1 0 9 0; #X connect 3 0 5 0; #X connect 3 1 4 0; #X connect 4 0 7 0; #X connect 5 0 2 0; #X connect 6 0 4 1; #X connect 7 0 8 0; #X connect 8 0 5 1; #X connect 9 0 8 1; #X restore 347 290 pd rnd127; #X text 453 288 amplitude; #X obj 321 724 *~; #X connect 0 0 2 0; #X connect 1 0 2 0; #X connect 2 0 3 0; #X connect 3 0 4 0; #X connect 5 0 38 0; #X connect 6 0 48 0; #X connect 7 0 8 1; #X connect 7 0 15 1; #X connect 8 0 10 0; #X connect 10 0 14 0; #X connect 12 0 13 0; #X connect 13 0 0 0; #X connect 14 0 12 0; #X connect 14 1 15 0; #X connect 15 0 12 1; #X connect 18 0 10 1; #X connect 19 0 12 2; #X connect 19 0 24 1; #X connect 19 0 39 0; #X connect 19 0 25 1; #X connect 20 0 41 0; #X connect 24 0 6 0; #X connect 25 0 26 0; #X connect 25 0 31 0; #X connect 25 0 35 0; #X connect 26 0 28 0; #X connect 27 0 30 1; #X connect 29 0 34 0; #X connect 30 0 17 0; #X connect 31 0 29 1; #X connect 32 0 29 1; #X connect 33 0 31 0; #X connect 33 0 26 0; #X connect 33 0 35 0; #X connect 34 0 44 0; #X connect 34 1 32 0; #X connect 34 1 36 0; #X connect 34 1 27 0; #X connect 35 0 30 1; #X connect 36 0 28 0; #X connect 37 0 24 0; #X connect 37 1 1 0; #X connect 37 2 25 0; #X connect 38 0 29 0; #X connect 38 1 30 0; #X connect 39 0 7 0; #X connect 41 0 42 0; #X connect 42 0 39 1; #X connect 44 0 37 0; #X connect 44 1 8 0; #X connect 44 2 18 0; #X connect 44 3 18 1; #X connect 44 4 19 0; #X connect 44 5 19 1; #X connect 44 6 20 0; #X connect 44 7 20 1; #X connect 44 8 46 0; #X connect 44 9 46 1; #X connect 46 0 48 1; #X connect 48 0 3 1; #X restore 229 419 pd ch_grain; #N canvas 0 0 450 300 ch_grain 0; #X obj 160 657 line~; #X msg 64 415 set \$1; #X obj 160 686 tabread4~; #X obj 297 749 *~; #X obj 297 781 outlet~; #X obj 28 8 inlet; #N canvas 0 0 1015 762 start_envelope 0; #X obj 16 10 inlet; #X obj 17 122 outlet~; #X msg 16 39 0 \, 1024 \$1; #X obj 16 66 line~; #X obj 16 92 tabread4~ \$0-env; #X connect 0 0 2 0; #X connect 2 0 3 0; #X connect 3 0 4 0; #X connect 4 0 1 0; #X restore 321 695 pd start_envelope; #X obj 186 323 * 44.1; #X obj 161 352 -; #X text 202 352 taille exploitable de la table; #X obj 161 413 *; #X text 202 416 debut du sample (echantillon); #X obj 159 576 pack f f f; #X msg 159 601 \$1 \, \$2 \$3; #X obj 161 451 t f f; #X obj 209 481 +; #X text 285 477 fin du sample; #X obj 611 792 outlet; #N canvas 0 0 450 300 rnd127 0; #X obj 40 18 inlet; #X obj 203 19 inlet; #X obj 103 257 outlet; #X obj 40 57 t f b; #X obj 127 96 random 0; #X obj 103 189 +; #X obj 203 46 * 10000; #X obj 127 124 / 10000; #X obj 128 155 - 0; #X obj 241 83 / 2; #X connect 0 0 3 0; #X connect 1 0 6 0; #X connect 1 0 9 0; #X connect 3 0 5 0; #X connect 3 1 4 0; #X connect 4 0 7 0; #X connect 5 0 2 0; #X connect 6 0 4 1; #X connect 7 0 8 0; #X connect 8 0 5 1; #X connect 9 0 8 1; #X restore 87 151 pd rnd127; #N canvas 0 0 450 300 rnd127 0; #X obj 40 18 inlet; #X obj 203 19 inlet; #X obj 103 257 outlet; #X obj 40 57 t f b; #X obj 127 96 random 0; #X obj 103 210 +; #X obj 203 41 * 10000; #X obj 127 122 / 10000; #X obj 128 155 - 0; #X obj 241 83 / 2; #X connect 0 0 3 0; #X connect 1 0 6 0; #X connect 1 0 9 0; #X connect 3 0 5 0; #X connect 3 1 4 0; #X connect 4 0 7 0; #X connect 5 0 2 0; #X connect 6 0 4 1; #X connect 7 0 8 0; #X connect 8 0 5 1; #X connect 9 0 8 1; #X restore 147 180 pd rnd127; #N canvas 0 0 450 300 rnd127 0; #X obj 40 18 inlet; #X obj 203 19 inlet; #X obj 103 257 outlet; #X obj 40 57 t f b; #X obj 127 96 random 0; #X obj 102 198 +; #X obj 203 41 * 10000; #X obj 127 124 / 10000; #X obj 128 155 - 0; #X obj 241 83 / 2; #X connect 0 0 3 0; #X connect 1 0 6 0; #X connect 1 0 9 0; #X connect 3 0 5 0; #X connect 3 1 4 0; #X connect 4 0 7 0; #X connect 5 0 2 0; #X connect 6 0 4 1; #X connect 7 0 8 0; #X connect 8 0 5 1; #X connect 9 0 8 1; #X restore 211 205 pd rnd127; #X text 189 150 position; #X text 257 183 taille; #X text 271 257 freq relative; #X obj 321 665 f; #X obj 188 51 delay; #X msg 272 79 0; #X msg 628 46 1; #X obj 272 113 switch~; #X obj 28 62 spigot; #X obj 609 85 spigot; #X msg 122 48 1; #X msg 115 74 0; #X obj 122 6 loadbang; #X obj 28 88 t a b; #X msg 679 45 0; #X msg 319 80 1; #X obj 19 388 t b s b; #X obj 28 32 t a a; #X obj 186 290 *; #X text 273 323 taille en echantillon de lecture; #X obj 213 229 mtof; #X obj 213 256 / 440; #X text 323 202 freq (midi); #X obj 28 120 unpack s f f f f f f f f f; #X text 365 115 table \, taille de la table \, position (0 \, 1) \, aleat \, taille du grain \, aleat \, freq relative \, aleat \, amplitude \, rand; #N canvas 0 0 450 300 rnd127 0; #X obj 40 18 inlet; #X obj 203 19 inlet; #X obj 103 257 outlet; #X obj 40 57 t f b; #X obj 127 96 random 0; #X obj 103 210 +; #X obj 203 41 * 10000; #X obj 127 122 / 10000; #X obj 128 155 - 0; #X obj 241 83 / 2; #X connect 0 0 3 0; #X connect 1 0 6 0; #X connect 1 0 9 0; #X connect 3 0 5 0; #X connect 3 1 4 0; #X connect 4 0 7 0; #X connect 5 0 2 0; #X connect 6 0 4 1; #X connect 7 0 8 0; #X connect 8 0 5 1; #X connect 9 0 8 1; #X restore 347 290 pd rnd127; #X text 453 288 amplitude; #X obj 321 724 *~; #X connect 0 0 2 0; #X connect 1 0 2 0; #X connect 2 0 3 0; #X connect 3 0 4 0; #X connect 5 0 38 0; #X connect 6 0 48 0; #X connect 7 0 8 1; #X connect 7 0 15 1; #X connect 8 0 10 0; #X connect 10 0 14 0; #X connect 12 0 13 0; #X connect 13 0 0 0; #X connect 14 0 12 0; #X connect 14 1 15 0; #X connect 15 0 12 1; #X connect 18 0 10 1; #X connect 19 0 12 2; #X connect 19 0 24 1; #X connect 19 0 39 0; #X connect 19 0 25 1; #X connect 20 0 41 0; #X connect 24 0 6 0; #X connect 25 0 26 0; #X connect 25 0 31 0; #X connect 25 0 35 0; #X connect 26 0 28 0; #X connect 27 0 30 1; #X connect 29 0 34 0; #X connect 30 0 17 0; #X connect 31 0 29 1; #X connect 32 0 29 1; #X connect 33 0 31 0; #X connect 33 0 26 0; #X connect 33 0 35 0; #X connect 34 0 44 0; #X connect 34 1 32 0; #X connect 34 1 36 0; #X connect 34 1 27 0; #X connect 35 0 30 1; #X connect 36 0 28 0; #X connect 37 0 24 0; #X connect 37 1 1 0; #X connect 37 2 25 0; #X connect 38 0 29 0; #X connect 38 1 30 0; #X connect 39 0 7 0; #X connect 41 0 42 0; #X connect 42 0 39 1; #X connect 44 0 37 0; #X connect 44 1 8 0; #X connect 44 2 18 0; #X connect 44 3 18 1; #X connect 44 4 19 0; #X connect 44 5 19 1; #X connect 44 6 20 0; #X connect 44 7 20 1; #X connect 44 8 46 0; #X connect 44 9 46 1; #X connect 46 0 48 1; #X connect 48 0 3 1; #X restore 331 628 pd ch_grain; #N canvas 0 0 450 300 ch_grain 0; #X obj 160 657 line~; #X msg 64 415 set \$1; #X obj 160 686 tabread4~; #X obj 297 749 *~; #X obj 297 781 outlet~; #X obj 28 8 inlet; #N canvas 0 0 1015 762 start_envelope 0; #X obj 16 10 inlet; #X obj 17 122 outlet~; #X msg 16 39 0 \, 1024 \$1; #X obj 16 66 line~; #X obj 16 92 tabread4~ \$0-env; #X connect 0 0 2 0; #X connect 2 0 3 0; #X connect 3 0 4 0; #X connect 4 0 1 0; #X restore 321 695 pd start_envelope; #X obj 186 323 * 44.1; #X obj 161 352 -; #X text 202 352 taille exploitable de la table; #X obj 161 413 *; #X text 202 416 debut du sample (echantillon); #X obj 159 576 pack f f f; #X msg 159 601 \$1 \, \$2 \$3; #X obj 161 451 t f f; #X obj 209 481 +; #X text 285 477 fin du sample; #X obj 611 792 outlet; #N canvas 0 0 450 300 rnd127 0; #X obj 40 18 inlet; #X obj 203 19 inlet; #X obj 103 257 outlet; #X obj 40 57 t f b; #X obj 127 96 random 0; #X obj 103 189 +; #X obj 203 46 * 10000; #X obj 127 124 / 10000; #X obj 128 155 - 0; #X obj 241 83 / 2; #X connect 0 0 3 0; #X connect 1 0 6 0; #X connect 1 0 9 0; #X connect 3 0 5 0; #X connect 3 1 4 0; #X connect 4 0 7 0; #X connect 5 0 2 0; #X connect 6 0 4 1; #X connect 7 0 8 0; #X connect 8 0 5 1; #X connect 9 0 8 1; #X restore 87 151 pd rnd127; #N canvas 0 0 450 300 rnd127 0; #X obj 40 18 inlet; #X obj 203 19 inlet; #X obj 103 257 outlet; #X obj 40 57 t f b; #X obj 127 96 random 0; #X obj 103 210 +; #X obj 203 41 * 10000; #X obj 127 122 / 10000; #X obj 128 155 - 0; #X obj 241 83 / 2; #X connect 0 0 3 0; #X connect 1 0 6 0; #X connect 1 0 9 0; #X connect 3 0 5 0; #X connect 3 1 4 0; #X connect 4 0 7 0; #X connect 5 0 2 0; #X connect 6 0 4 1; #X connect 7 0 8 0; #X connect 8 0 5 1; #X connect 9 0 8 1; #X restore 147 180 pd rnd127; #N canvas 0 0 450 300 rnd127 0; #X obj 40 18 inlet; #X obj 203 19 inlet; #X obj 103 257 outlet; #X obj 40 57 t f b; #X obj 127 96 random 0; #X obj 102 198 +; #X obj 203 41 * 10000; #X obj 127 124 / 10000; #X obj 128 155 - 0; #X obj 241 83 / 2; #X connect 0 0 3 0; #X connect 1 0 6 0; #X connect 1 0 9 0; #X connect 3 0 5 0; #X connect 3 1 4 0; #X connect 4 0 7 0; #X connect 5 0 2 0; #X connect 6 0 4 1; #X connect 7 0 8 0; #X connect 8 0 5 1; #X connect 9 0 8 1; #X restore 211 205 pd rnd127; #X text 189 150 position; #X text 257 183 taille; #X text 271 257 freq relative; #X obj 321 665 f; #X obj 188 51 delay; #X msg 272 79 0; #X msg 628 46 1; #X obj 272 113 switch~; #X obj 28 62 spigot; #X obj 609 85 spigot; #X msg 122 48 1; #X msg 115 74 0; #X obj 122 6 loadbang; #X obj 28 88 t a b; #X msg 679 45 0; #X msg 319 80 1; #X obj 19 388 t b s b; #X obj 28 32 t a a; #X obj 186 290 *; #X text 273 323 taille en echantillon de lecture; #X obj 213 229 mtof; #X obj 213 256 / 440; #X text 323 202 freq (midi); #X obj 28 120 unpack s f f f f f f f f f; #X text 365 115 table \, taille de la table \, position (0 \, 1) \, aleat \, taille du grain \, aleat \, freq relative \, aleat \, amplitude \, rand; #N canvas 0 0 450 300 rnd127 0; #X obj 40 18 inlet; #X obj 203 19 inlet; #X obj 103 257 outlet; #X obj 40 57 t f b; #X obj 127 96 random 0; #X obj 103 210 +; #X obj 203 41 * 10000; #X obj 127 122 / 10000; #X obj 128 155 - 0; #X obj 241 83 / 2; #X connect 0 0 3 0; #X connect 1 0 6 0; #X connect 1 0 9 0; #X connect 3 0 5 0; #X connect 3 1 4 0; #X connect 4 0 7 0; #X connect 5 0 2 0; #X connect 6 0 4 1; #X connect 7 0 8 0; #X connect 8 0 5 1; #X connect 9 0 8 1; #X restore 347 290 pd rnd127; #X text 453 288 amplitude; #X obj 321 724 *~; #X connect 0 0 2 0; #X connect 1 0 2 0; #X connect 2 0 3 0; #X connect 3 0 4 0; #X connect 5 0 38 0; #X connect 6 0 48 0; #X connect 7 0 8 1; #X connect 7 0 15 1; #X connect 8 0 10 0; #X connect 10 0 14 0; #X connect 12 0 13 0; #X connect 13 0 0 0; #X connect 14 0 12 0; #X connect 14 1 15 0; #X connect 15 0 12 1; #X connect 18 0 10 1; #X connect 19 0 12 2; #X connect 19 0 24 1; #X connect 19 0 39 0; #X connect 19 0 25 1; #X connect 20 0 41 0; #X connect 24 0 6 0; #X connect 25 0 26 0; #X connect 25 0 31 0; #X connect 25 0 35 0; #X connect 26 0 28 0; #X connect 27 0 30 1; #X connect 29 0 34 0; #X connect 30 0 17 0; #X connect 31 0 29 1; #X connect 32 0 29 1; #X connect 33 0 31 0; #X connect 33 0 26 0; #X connect 33 0 35 0; #X connect 34 0 44 0; #X connect 34 1 32 0; #X connect 34 1 36 0; #X connect 34 1 27 0; #X connect 35 0 30 1; #X connect 36 0 28 0; #X connect 37 0 24 0; #X connect 37 1 1 0; #X connect 37 2 25 0; #X connect 38 0 29 0; #X connect 38 1 30 0; #X connect 39 0 7 0; #X connect 41 0 42 0; #X connect 42 0 39 1; #X connect 44 0 37 0; #X connect 44 1 8 0; #X connect 44 2 18 0; #X connect 44 3 18 1; #X connect 44 4 19 0; #X connect 44 5 19 1; #X connect 44 6 20 0; #X connect 44 7 20 1; #X connect 44 8 46 0; #X connect 44 9 46 1; #X connect 46 0 48 1; #X connect 48 0 3 1; #X restore 344 650 pd ch_grain; #N canvas 0 0 450 300 ch_grain 0; #X obj 160 657 line~; #X msg 64 415 set \$1; #X obj 160 686 tabread4~; #X obj 297 749 *~; #X obj 297 781 outlet~; #X obj 28 8 inlet; #N canvas 0 0 1015 762 start_envelope 0; #X obj 16 10 inlet; #X obj 17 122 outlet~; #X msg 16 39 0 \, 1024 \$1; #X obj 16 66 line~; #X obj 16 92 tabread4~ \$0-env; #X connect 0 0 2 0; #X connect 2 0 3 0; #X connect 3 0 4 0; #X connect 4 0 1 0; #X restore 321 695 pd start_envelope; #X obj 186 323 * 44.1; #X obj 161 352 -; #X text 202 352 taille exploitable de la table; #X obj 161 413 *; #X text 202 416 debut du sample (echantillon); #X obj 159 576 pack f f f; #X msg 159 601 \$1 \, \$2 \$3; #X obj 161 451 t f f; #X obj 209 481 +; #X text 285 477 fin du sample; #X obj 611 792 outlet; #N canvas 0 0 450 300 rnd127 0; #X obj 40 18 inlet; #X obj 203 19 inlet; #X obj 103 257 outlet; #X obj 40 57 t f b; #X obj 127 96 random 0; #X obj 103 189 +; #X obj 203 46 * 10000; #X obj 127 124 / 10000; #X obj 128 155 - 0; #X obj 241 83 / 2; #X connect 0 0 3 0; #X connect 1 0 6 0; #X connect 1 0 9 0; #X connect 3 0 5 0; #X connect 3 1 4 0; #X connect 4 0 7 0; #X connect 5 0 2 0; #X connect 6 0 4 1; #X connect 7 0 8 0; #X connect 8 0 5 1; #X connect 9 0 8 1; #X restore 87 151 pd rnd127; #N canvas 0 0 450 300 rnd127 0; #X obj 40 18 inlet; #X obj 203 19 inlet; #X obj 103 257 outlet; #X obj 40 57 t f b; #X obj 127 96 random 0; #X obj 103 210 +; #X obj 203 41 * 10000; #X obj 127 122 / 10000; #X obj 128 155 - 0; #X obj 241 83 / 2; #X connect 0 0 3 0; #X connect 1 0 6 0; #X connect 1 0 9 0; #X connect 3 0 5 0; #X connect 3 1 4 0; #X connect 4 0 7 0; #X connect 5 0 2 0; #X connect 6 0 4 1; #X connect 7 0 8 0; #X connect 8 0 5 1; #X connect 9 0 8 1; #X restore 147 180 pd rnd127; #N canvas 0 0 450 300 rnd127 0; #X obj 40 18 inlet; #X obj 203 19 inlet; #X obj 103 257 outlet; #X obj 40 57 t f b; #X obj 127 96 random 0; #X obj 102 198 +; #X obj 203 41 * 10000; #X obj 127 124 / 10000; #X obj 128 155 - 0; #X obj 241 83 / 2; #X connect 0 0 3 0; #X connect 1 0 6 0; #X connect 1 0 9 0; #X connect 3 0 5 0; #X connect 3 1 4 0; #X connect 4 0 7 0; #X connect 5 0 2 0; #X connect 6 0 4 1; #X connect 7 0 8 0; #X connect 8 0 5 1; #X connect 9 0 8 1; #X restore 211 205 pd rnd127; #X text 189 150 position; #X text 257 183 taille; #X text 271 257 freq relative; #X obj 321 665 f; #X obj 188 51 delay; #X msg 272 79 0; #X msg 628 46 1; #X obj 272 113 switch~; #X obj 28 62 spigot; #X obj 609 85 spigot; #X msg 122 48 1; #X msg 115 74 0; #X obj 122 6 loadbang; #X obj 28 88 t a b; #X msg 679 45 0; #X msg 319 80 1; #X obj 19 388 t b s b; #X obj 28 32 t a a; #X obj 186 290 *; #X text 273 323 taille en echantillon de lecture; #X obj 213 229 mtof; #X obj 213 256 / 440; #X text 323 202 freq (midi); #X obj 28 120 unpack s f f f f f f f f f; #X text 365 115 table \, taille de la table \, position (0 \, 1) \, aleat \, taille du grain \, aleat \, freq relative \, aleat \, amplitude \, rand; #N canvas 0 0 450 300 rnd127 0; #X obj 40 18 inlet; #X obj 203 19 inlet; #X obj 103 257 outlet; #X obj 40 57 t f b; #X obj 127 96 random 0; #X obj 103 210 +; #X obj 203 41 * 10000; #X obj 127 122 / 10000; #X obj 128 155 - 0; #X obj 241 83 / 2; #X connect 0 0 3 0; #X connect 1 0 6 0; #X connect 1 0 9 0; #X connect 3 0 5 0; #X connect 3 1 4 0; #X connect 4 0 7 0; #X connect 5 0 2 0; #X connect 6 0 4 1; #X connect 7 0 8 0; #X connect 8 0 5 1; #X connect 9 0 8 1; #X restore 347 290 pd rnd127; #X text 453 288 amplitude; #X obj 321 724 *~; #X connect 0 0 2 0; #X connect 1 0 2 0; #X connect 2 0 3 0; #X connect 3 0 4 0; #X connect 5 0 38 0; #X connect 6 0 48 0; #X connect 7 0 8 1; #X connect 7 0 15 1; #X connect 8 0 10 0; #X connect 10 0 14 0; #X connect 12 0 13 0; #X connect 13 0 0 0; #X connect 14 0 12 0; #X connect 14 1 15 0; #X connect 15 0 12 1; #X connect 18 0 10 1; #X connect 19 0 12 2; #X connect 19 0 24 1; #X connect 19 0 39 0; #X connect 19 0 25 1; #X connect 20 0 41 0; #X connect 24 0 6 0; #X connect 25 0 26 0; #X connect 25 0 31 0; #X connect 25 0 35 0; #X connect 26 0 28 0; #X connect 27 0 30 1; #X connect 29 0 34 0; #X connect 30 0 17 0; #X connect 31 0 29 1; #X connect 32 0 29 1; #X connect 33 0 31 0; #X connect 33 0 26 0; #X connect 33 0 35 0; #X connect 34 0 44 0; #X connect 34 1 32 0; #X connect 34 1 36 0; #X connect 34 1 27 0; #X connect 35 0 30 1; #X connect 36 0 28 0; #X connect 37 0 24 0; #X connect 37 1 1 0; #X connect 37 2 25 0; #X connect 38 0 29 0; #X connect 38 1 30 0; #X connect 39 0 7 0; #X connect 41 0 42 0; #X connect 42 0 39 1; #X connect 44 0 37 0; #X connect 44 1 8 0; #X connect 44 2 18 0; #X connect 44 3 18 1; #X connect 44 4 19 0; #X connect 44 5 19 1; #X connect 44 6 20 0; #X connect 44 7 20 1; #X connect 44 8 46 0; #X connect 44 9 46 1; #X connect 46 0 48 1; #X connect 48 0 3 1; #X restore 354 674 pd ch_grain; #N canvas 0 0 450 300 ch_grain 0; #X obj 160 657 line~; #X msg 64 415 set \$1; #X obj 160 686 tabread4~; #X obj 297 749 *~; #X obj 297 781 outlet~; #X obj 28 8 inlet; #N canvas 0 0 1015 762 start_envelope 0; #X obj 16 10 inlet; #X obj 17 122 outlet~; #X msg 16 39 0 \, 1024 \$1; #X obj 16 66 line~; #X obj 16 92 tabread4~ \$0-env; #X connect 0 0 2 0; #X connect 2 0 3 0; #X connect 3 0 4 0; #X connect 4 0 1 0; #X restore 321 695 pd start_envelope; #X obj 186 323 * 44.1; #X obj 161 352 -; #X text 202 352 taille exploitable de la table; #X obj 161 413 *; #X text 202 416 debut du sample (echantillon); #X obj 159 576 pack f f f; #X msg 159 601 \$1 \, \$2 \$3; #X obj 161 451 t f f; #X obj 209 481 +; #X text 285 477 fin du sample; #X obj 611 792 outlet; #N canvas 0 0 450 300 rnd127 0; #X obj 40 18 inlet; #X obj 203 19 inlet; #X obj 103 257 outlet; #X obj 40 57 t f b; #X obj 127 96 random 0; #X obj 103 189 +; #X obj 203 46 * 10000; #X obj 127 124 / 10000; #X obj 128 155 - 0; #X obj 241 83 / 2; #X connect 0 0 3 0; #X connect 1 0 6 0; #X connect 1 0 9 0; #X connect 3 0 5 0; #X connect 3 1 4 0; #X connect 4 0 7 0; #X connect 5 0 2 0; #X connect 6 0 4 1; #X connect 7 0 8 0; #X connect 8 0 5 1; #X connect 9 0 8 1; #X restore 87 151 pd rnd127; #N canvas 0 0 450 300 rnd127 0; #X obj 40 18 inlet; #X obj 203 19 inlet; #X obj 103 257 outlet; #X obj 40 57 t f b; #X obj 127 96 random 0; #X obj 103 210 +; #X obj 203 41 * 10000; #X obj 127 122 / 10000; #X obj 128 155 - 0; #X obj 241 83 / 2; #X connect 0 0 3 0; #X connect 1 0 6 0; #X connect 1 0 9 0; #X connect 3 0 5 0; #X connect 3 1 4 0; #X connect 4 0 7 0; #X connect 5 0 2 0; #X connect 6 0 4 1; #X connect 7 0 8 0; #X connect 8 0 5 1; #X connect 9 0 8 1; #X restore 147 180 pd rnd127; #N canvas 0 0 450 300 rnd127 0; #X obj 40 18 inlet; #X obj 203 19 inlet; #X obj 103 257 outlet; #X obj 40 57 t f b; #X obj 127 96 random 0; #X obj 102 198 +; #X obj 203 41 * 10000; #X obj 127 124 / 10000; #X obj 128 155 - 0; #X obj 241 83 / 2; #X connect 0 0 3 0; #X connect 1 0 6 0; #X connect 1 0 9 0; #X connect 3 0 5 0; #X connect 3 1 4 0; #X connect 4 0 7 0; #X connect 5 0 2 0; #X connect 6 0 4 1; #X connect 7 0 8 0; #X connect 8 0 5 1; #X connect 9 0 8 1; #X restore 211 205 pd rnd127; #X text 189 150 position; #X text 257 183 taille; #X text 271 257 freq relative; #X obj 321 665 f; #X obj 188 51 delay; #X msg 272 79 0; #X msg 628 46 1; #X obj 272 113 switch~; #X obj 28 62 spigot; #X obj 609 85 spigot; #X msg 122 48 1; #X msg 115 74 0; #X obj 122 6 loadbang; #X obj 28 88 t a b; #X msg 679 45 0; #X msg 319 80 1; #X obj 19 388 t b s b; #X obj 28 32 t a a; #X obj 186 290 *; #X text 273 323 taille en echantillon de lecture; #X obj 213 229 mtof; #X obj 213 256 / 440; #X text 323 202 freq (midi); #X obj 28 120 unpack s f f f f f f f f f; #X text 365 115 table \, taille de la table \, position (0 \, 1) \, aleat \, taille du grain \, aleat \, freq relative \, aleat \, amplitude \, rand; #N canvas 0 0 450 300 rnd127 0; #X obj 40 18 inlet; #X obj 203 19 inlet; #X obj 103 257 outlet; #X obj 40 57 t f b; #X obj 127 96 random 0; #X obj 103 210 +; #X obj 203 41 * 10000; #X obj 127 122 / 10000; #X obj 128 155 - 0; #X obj 241 83 / 2; #X connect 0 0 3 0; #X connect 1 0 6 0; #X connect 1 0 9 0; #X connect 3 0 5 0; #X connect 3 1 4 0; #X connect 4 0 7 0; #X connect 5 0 2 0; #X connect 6 0 4 1; #X connect 7 0 8 0; #X connect 8 0 5 1; #X connect 9 0 8 1; #X restore 347 290 pd rnd127; #X text 453 288 amplitude; #X obj 321 724 *~; #X connect 0 0 2 0; #X connect 1 0 2 0; #X connect 2 0 3 0; #X connect 3 0 4 0; #X connect 5 0 38 0; #X connect 6 0 48 0; #X connect 7 0 8 1; #X connect 7 0 15 1; #X connect 8 0 10 0; #X connect 10 0 14 0; #X connect 12 0 13 0; #X connect 13 0 0 0; #X connect 14 0 12 0; #X connect 14 1 15 0; #X connect 15 0 12 1; #X connect 18 0 10 1; #X connect 19 0 12 2; #X connect 19 0 24 1; #X connect 19 0 39 0; #X connect 19 0 25 1; #X connect 20 0 41 0; #X connect 24 0 6 0; #X connect 25 0 26 0; #X connect 25 0 31 0; #X connect 25 0 35 0; #X connect 26 0 28 0; #X connect 27 0 30 1; #X connect 29 0 34 0; #X connect 30 0 17 0; #X connect 31 0 29 1; #X connect 32 0 29 1; #X connect 33 0 31 0; #X connect 33 0 26 0; #X connect 33 0 35 0; #X connect 34 0 44 0; #X connect 34 1 32 0; #X connect 34 1 36 0; #X connect 34 1 27 0; #X connect 35 0 30 1; #X connect 36 0 28 0; #X connect 37 0 24 0; #X connect 37 1 1 0; #X connect 37 2 25 0; #X connect 38 0 29 0; #X connect 38 1 30 0; #X connect 39 0 7 0; #X connect 41 0 42 0; #X connect 42 0 39 1; #X connect 44 0 37 0; #X connect 44 1 8 0; #X connect 44 2 18 0; #X connect 44 3 18 1; #X connect 44 4 19 0; #X connect 44 5 19 1; #X connect 44 6 20 0; #X connect 44 7 20 1; #X connect 44 8 46 0; #X connect 44 9 46 1; #X connect 46 0 48 1; #X connect 48 0 3 1; #X restore 367 698 pd ch_grain; #N canvas 0 0 450 300 ch_grain 0; #X obj 160 657 line~; #X msg 64 415 set \$1; #X obj 160 686 tabread4~; #X obj 297 749 *~; #X obj 297 781 outlet~; #X obj 28 8 inlet; #N canvas 0 0 1015 762 start_envelope 0; #X obj 16 10 inlet; #X obj 17 122 outlet~; #X msg 16 39 0 \, 1024 \$1; #X obj 16 66 line~; #X obj 16 92 tabread4~ \$0-env; #X connect 0 0 2 0; #X connect 2 0 3 0; #X connect 3 0 4 0; #X connect 4 0 1 0; #X restore 321 695 pd start_envelope; #X obj 186 323 * 44.1; #X obj 161 352 -; #X text 202 352 taille exploitable de la table; #X obj 161 413 *; #X text 202 416 debut du sample (echantillon); #X obj 159 576 pack f f f; #X msg 159 601 \$1 \, \$2 \$3; #X obj 161 451 t f f; #X obj 209 481 +; #X text 285 477 fin du sample; #X obj 611 792 outlet; #N canvas 0 0 450 300 rnd127 0; #X obj 40 18 inlet; #X obj 203 19 inlet; #X obj 103 257 outlet; #X obj 40 57 t f b; #X obj 127 96 random 0; #X obj 103 189 +; #X obj 203 46 * 10000; #X obj 127 124 / 10000; #X obj 128 155 - 0; #X obj 241 83 / 2; #X connect 0 0 3 0; #X connect 1 0 6 0; #X connect 1 0 9 0; #X connect 3 0 5 0; #X connect 3 1 4 0; #X connect 4 0 7 0; #X connect 5 0 2 0; #X connect 6 0 4 1; #X connect 7 0 8 0; #X connect 8 0 5 1; #X connect 9 0 8 1; #X restore 87 151 pd rnd127; #N canvas 0 0 450 300 rnd127 0; #X obj 40 18 inlet; #X obj 203 19 inlet; #X obj 103 257 outlet; #X obj 40 57 t f b; #X obj 127 96 random 0; #X obj 103 210 +; #X obj 203 41 * 10000; #X obj 127 122 / 10000; #X obj 128 155 - 0; #X obj 241 83 / 2; #X connect 0 0 3 0; #X connect 1 0 6 0; #X connect 1 0 9 0; #X connect 3 0 5 0; #X connect 3 1 4 0; #X connect 4 0 7 0; #X connect 5 0 2 0; #X connect 6 0 4 1; #X connect 7 0 8 0; #X connect 8 0 5 1; #X connect 9 0 8 1; #X restore 147 180 pd rnd127; #N canvas 0 0 450 300 rnd127 0; #X obj 40 18 inlet; #X obj 203 19 inlet; #X obj 103 257 outlet; #X obj 40 57 t f b; #X obj 127 96 random 0; #X obj 102 198 +; #X obj 203 41 * 10000; #X obj 127 124 / 10000; #X obj 128 155 - 0; #X obj 241 83 / 2; #X connect 0 0 3 0; #X connect 1 0 6 0; #X connect 1 0 9 0; #X connect 3 0 5 0; #X connect 3 1 4 0; #X connect 4 0 7 0; #X connect 5 0 2 0; #X connect 6 0 4 1; #X connect 7 0 8 0; #X connect 8 0 5 1; #X connect 9 0 8 1; #X restore 211 205 pd rnd127; #X text 189 150 position; #X text 257 183 taille; #X text 271 257 freq relative; #X obj 321 665 f; #X obj 188 51 delay; #X msg 272 79 0; #X msg 628 46 1; #X obj 272 113 switch~; #X obj 28 62 spigot; #X obj 609 85 spigot; #X msg 122 48 1; #X msg 115 74 0; #X obj 122 6 loadbang; #X obj 28 88 t a b; #X msg 679 45 0; #X msg 319 80 1; #X obj 19 388 t b s b; #X obj 28 32 t a a; #X obj 186 290 *; #X text 273 323 taille en echantillon de lecture; #X obj 213 229 mtof; #X obj 213 256 / 440; #X text 323 202 freq (midi); #X obj 28 120 unpack s f f f f f f f f f; #X text 365 115 table \, taille de la table \, position (0 \, 1) \, aleat \, taille du grain \, aleat \, freq relative \, aleat \, amplitude \, rand; #N canvas 0 0 450 300 rnd127 0; #X obj 40 18 inlet; #X obj 203 19 inlet; #X obj 103 257 outlet; #X obj 40 57 t f b; #X obj 127 96 random 0; #X obj 103 210 +; #X obj 203 41 * 10000; #X obj 127 122 / 10000; #X obj 128 155 - 0; #X obj 241 83 / 2; #X connect 0 0 3 0; #X connect 1 0 6 0; #X connect 1 0 9 0; #X connect 3 0 5 0; #X connect 3 1 4 0; #X connect 4 0 7 0; #X connect 5 0 2 0; #X connect 6 0 4 1; #X connect 7 0 8 0; #X connect 8 0 5 1; #X connect 9 0 8 1; #X restore 347 290 pd rnd127; #X text 453 288 amplitude; #X obj 321 724 *~; #X connect 0 0 2 0; #X connect 1 0 2 0; #X connect 2 0 3 0; #X connect 3 0 4 0; #X connect 5 0 38 0; #X connect 6 0 48 0; #X connect 7 0 8 1; #X connect 7 0 15 1; #X connect 8 0 10 0; #X connect 10 0 14 0; #X connect 12 0 13 0; #X connect 13 0 0 0; #X connect 14 0 12 0; #X connect 14 1 15 0; #X connect 15 0 12 1; #X connect 18 0 10 1; #X connect 19 0 12 2; #X connect 19 0 24 1; #X connect 19 0 39 0; #X connect 19 0 25 1; #X connect 20 0 41 0; #X connect 24 0 6 0; #X connect 25 0 26 0; #X connect 25 0 31 0; #X connect 25 0 35 0; #X connect 26 0 28 0; #X connect 27 0 30 1; #X connect 29 0 34 0; #X connect 30 0 17 0; #X connect 31 0 29 1; #X connect 32 0 29 1; #X connect 33 0 31 0; #X connect 33 0 26 0; #X connect 33 0 35 0; #X connect 34 0 44 0; #X connect 34 1 32 0; #X connect 34 1 36 0; #X connect 34 1 27 0; #X connect 35 0 30 1; #X connect 36 0 28 0; #X connect 37 0 24 0; #X connect 37 1 1 0; #X connect 37 2 25 0; #X connect 38 0 29 0; #X connect 38 1 30 0; #X connect 39 0 7 0; #X connect 41 0 42 0; #X connect 42 0 39 1; #X connect 44 0 37 0; #X connect 44 1 8 0; #X connect 44 2 18 0; #X connect 44 3 18 1; #X connect 44 4 19 0; #X connect 44 5 19 1; #X connect 44 6 20 0; #X connect 44 7 20 1; #X connect 44 8 46 0; #X connect 44 9 46 1; #X connect 46 0 48 1; #X connect 48 0 3 1; #X restore 377 722 pd ch_grain; #N canvas 0 0 450 300 ch_grain 0; #X obj 160 657 line~; #X msg 64 415 set \$1; #X obj 160 686 tabread4~; #X obj 297 749 *~; #X obj 297 781 outlet~; #X obj 28 8 inlet; #N canvas 0 0 1015 762 start_envelope 0; #X obj 16 10 inlet; #X obj 17 122 outlet~; #X msg 16 39 0 \, 1024 \$1; #X obj 16 66 line~; #X obj 16 92 tabread4~ \$0-env; #X connect 0 0 2 0; #X connect 2 0 3 0; #X connect 3 0 4 0; #X connect 4 0 1 0; #X restore 321 695 pd start_envelope; #X obj 186 323 * 44.1; #X obj 161 352 -; #X text 202 352 taille exploitable de la table; #X obj 161 413 *; #X text 202 416 debut du sample (echantillon); #X obj 159 576 pack f f f; #X msg 159 601 \$1 \, \$2 \$3; #X obj 161 451 t f f; #X obj 209 481 +; #X text 285 477 fin du sample; #X obj 611 792 outlet; #N canvas 0 0 450 300 rnd127 0; #X obj 40 18 inlet; #X obj 203 19 inlet; #X obj 103 257 outlet; #X obj 40 57 t f b; #X obj 127 96 random 0; #X obj 103 189 +; #X obj 203 46 * 10000; #X obj 127 124 / 10000; #X obj 128 155 - 0; #X obj 241 83 / 2; #X connect 0 0 3 0; #X connect 1 0 6 0; #X connect 1 0 9 0; #X connect 3 0 5 0; #X connect 3 1 4 0; #X connect 4 0 7 0; #X connect 5 0 2 0; #X connect 6 0 4 1; #X connect 7 0 8 0; #X connect 8 0 5 1; #X connect 9 0 8 1; #X restore 87 151 pd rnd127; #N canvas 0 0 450 300 rnd127 0; #X obj 40 18 inlet; #X obj 203 19 inlet; #X obj 103 257 outlet; #X obj 40 57 t f b; #X obj 127 96 random 0; #X obj 103 210 +; #X obj 203 41 * 10000; #X obj 127 122 / 10000; #X obj 128 155 - 0; #X obj 241 83 / 2; #X connect 0 0 3 0; #X connect 1 0 6 0; #X connect 1 0 9 0; #X connect 3 0 5 0; #X connect 3 1 4 0; #X connect 4 0 7 0; #X connect 5 0 2 0; #X connect 6 0 4 1; #X connect 7 0 8 0; #X connect 8 0 5 1; #X connect 9 0 8 1; #X restore 147 180 pd rnd127; #N canvas 0 0 450 300 rnd127 0; #X obj 40 18 inlet; #X obj 203 19 inlet; #X obj 103 257 outlet; #X obj 40 57 t f b; #X obj 127 96 random 0; #X obj 102 198 +; #X obj 203 41 * 10000; #X obj 127 124 / 10000; #X obj 128 155 - 0; #X obj 241 83 / 2; #X connect 0 0 3 0; #X connect 1 0 6 0; #X connect 1 0 9 0; #X connect 3 0 5 0; #X connect 3 1 4 0; #X connect 4 0 7 0; #X connect 5 0 2 0; #X connect 6 0 4 1; #X connect 7 0 8 0; #X connect 8 0 5 1; #X connect 9 0 8 1; #X restore 211 205 pd rnd127; #X text 189 150 position; #X text 257 183 taille; #X text 271 257 freq relative; #X obj 321 665 f; #X obj 188 51 delay; #X msg 272 79 0; #X msg 628 46 1; #X obj 272 113 switch~; #X obj 28 62 spigot; #X obj 609 85 spigot; #X msg 122 48 1; #X msg 115 74 0; #X obj 122 6 loadbang; #X obj 28 88 t a b; #X msg 679 45 0; #X msg 319 80 1; #X obj 19 388 t b s b; #X obj 28 32 t a a; #X obj 186 290 *; #X text 273 323 taille en echantillon de lecture; #X obj 213 229 mtof; #X obj 213 256 / 440; #X text 323 202 freq (midi); #X obj 28 120 unpack s f f f f f f f f f; #X text 365 115 table \, taille de la table \, position (0 \, 1) \, aleat \, taille du grain \, aleat \, freq relative \, aleat \, amplitude \, rand; #N canvas 0 0 450 300 rnd127 0; #X obj 40 18 inlet; #X obj 203 19 inlet; #X obj 103 257 outlet; #X obj 40 57 t f b; #X obj 127 96 random 0; #X obj 103 210 +; #X obj 203 41 * 10000; #X obj 127 122 / 10000; #X obj 128 155 - 0; #X obj 241 83 / 2; #X connect 0 0 3 0; #X connect 1 0 6 0; #X connect 1 0 9 0; #X connect 3 0 5 0; #X connect 3 1 4 0; #X connect 4 0 7 0; #X connect 5 0 2 0; #X connect 6 0 4 1; #X connect 7 0 8 0; #X connect 8 0 5 1; #X connect 9 0 8 1; #X restore 347 290 pd rnd127; #X text 453 288 amplitude; #X obj 321 724 *~; #X connect 0 0 2 0; #X connect 1 0 2 0; #X connect 2 0 3 0; #X connect 3 0 4 0; #X connect 5 0 38 0; #X connect 6 0 48 0; #X connect 7 0 8 1; #X connect 7 0 15 1; #X connect 8 0 10 0; #X connect 10 0 14 0; #X connect 12 0 13 0; #X connect 13 0 0 0; #X connect 14 0 12 0; #X connect 14 1 15 0; #X connect 15 0 12 1; #X connect 18 0 10 1; #X connect 19 0 12 2; #X connect 19 0 24 1; #X connect 19 0 39 0; #X connect 19 0 25 1; #X connect 20 0 41 0; #X connect 24 0 6 0; #X connect 25 0 26 0; #X connect 25 0 31 0; #X connect 25 0 35 0; #X connect 26 0 28 0; #X connect 27 0 30 1; #X connect 29 0 34 0; #X connect 30 0 17 0; #X connect 31 0 29 1; #X connect 32 0 29 1; #X connect 33 0 31 0; #X connect 33 0 26 0; #X connect 33 0 35 0; #X connect 34 0 44 0; #X connect 34 1 32 0; #X connect 34 1 36 0; #X connect 34 1 27 0; #X connect 35 0 30 1; #X connect 36 0 28 0; #X connect 37 0 24 0; #X connect 37 1 1 0; #X connect 37 2 25 0; #X connect 38 0 29 0; #X connect 38 1 30 0; #X connect 39 0 7 0; #X connect 41 0 42 0; #X connect 42 0 39 1; #X connect 44 0 37 0; #X connect 44 1 8 0; #X connect 44 2 18 0; #X connect 44 3 18 1; #X connect 44 4 19 0; #X connect 44 5 19 1; #X connect 44 6 20 0; #X connect 44 7 20 1; #X connect 44 8 46 0; #X connect 44 9 46 1; #X connect 46 0 48 1; #X connect 48 0 3 1; #X restore 390 744 pd ch_grain; #N canvas 0 0 450 300 ch_grain 0; #X obj 160 657 line~; #X msg 64 415 set \$1; #X obj 160 686 tabread4~; #X obj 297 749 *~; #X obj 297 781 outlet~; #X obj 28 8 inlet; #N canvas 0 0 1015 762 start_envelope 0; #X obj 16 10 inlet; #X obj 17 122 outlet~; #X msg 16 39 0 \, 1024 \$1; #X obj 16 66 line~; #X obj 16 92 tabread4~ \$0-env; #X connect 0 0 2 0; #X connect 2 0 3 0; #X connect 3 0 4 0; #X connect 4 0 1 0; #X restore 321 695 pd start_envelope; #X obj 186 323 * 44.1; #X obj 161 352 -; #X text 202 352 taille exploitable de la table; #X obj 161 413 *; #X text 202 416 debut du sample (echantillon); #X obj 159 576 pack f f f; #X msg 159 601 \$1 \, \$2 \$3; #X obj 161 451 t f f; #X obj 209 481 +; #X text 285 477 fin du sample; #X obj 611 792 outlet; #N canvas 0 0 450 300 rnd127 0; #X obj 40 18 inlet; #X obj 203 19 inlet; #X obj 103 257 outlet; #X obj 40 57 t f b; #X obj 127 96 random 0; #X obj 103 189 +; #X obj 203 46 * 10000; #X obj 127 124 / 10000; #X obj 128 155 - 0; #X obj 241 83 / 2; #X connect 0 0 3 0; #X connect 1 0 6 0; #X connect 1 0 9 0; #X connect 3 0 5 0; #X connect 3 1 4 0; #X connect 4 0 7 0; #X connect 5 0 2 0; #X connect 6 0 4 1; #X connect 7 0 8 0; #X connect 8 0 5 1; #X connect 9 0 8 1; #X restore 87 151 pd rnd127; #N canvas 0 0 450 300 rnd127 0; #X obj 40 18 inlet; #X obj 203 19 inlet; #X obj 103 257 outlet; #X obj 40 57 t f b; #X obj 127 96 random 0; #X obj 103 210 +; #X obj 203 41 * 10000; #X obj 127 122 / 10000; #X obj 128 155 - 0; #X obj 241 83 / 2; #X connect 0 0 3 0; #X connect 1 0 6 0; #X connect 1 0 9 0; #X connect 3 0 5 0; #X connect 3 1 4 0; #X connect 4 0 7 0; #X connect 5 0 2 0; #X connect 6 0 4 1; #X connect 7 0 8 0; #X connect 8 0 5 1; #X connect 9 0 8 1; #X restore 147 180 pd rnd127; #N canvas 0 0 450 300 rnd127 0; #X obj 40 18 inlet; #X obj 203 19 inlet; #X obj 103 257 outlet; #X obj 40 57 t f b; #X obj 127 96 random 0; #X obj 102 198 +; #X obj 203 41 * 10000; #X obj 127 124 / 10000; #X obj 128 155 - 0; #X obj 241 83 / 2; #X connect 0 0 3 0; #X connect 1 0 6 0; #X connect 1 0 9 0; #X connect 3 0 5 0; #X connect 3 1 4 0; #X connect 4 0 7 0; #X connect 5 0 2 0; #X connect 6 0 4 1; #X connect 7 0 8 0; #X connect 8 0 5 1; #X connect 9 0 8 1; #X restore 211 205 pd rnd127; #X text 189 150 position; #X text 257 183 taille; #X text 271 257 freq relative; #X obj 321 665 f; #X obj 188 51 delay; #X msg 272 79 0; #X msg 628 46 1; #X obj 272 113 switch~; #X obj 28 62 spigot; #X obj 609 85 spigot; #X msg 122 48 1; #X msg 115 74 0; #X obj 122 6 loadbang; #X obj 28 88 t a b; #X msg 679 45 0; #X msg 319 80 1; #X obj 19 388 t b s b; #X obj 28 32 t a a; #X obj 186 290 *; #X text 273 323 taille en echantillon de lecture; #X obj 213 229 mtof; #X obj 213 256 / 440; #X text 323 202 freq (midi); #X obj 28 120 unpack s f f f f f f f f f; #X text 365 115 table \, taille de la table \, position (0 \, 1) \, aleat \, taille du grain \, aleat \, freq relative \, aleat \, amplitude \, rand; #N canvas 0 0 450 300 rnd127 0; #X obj 40 18 inlet; #X obj 203 19 inlet; #X obj 103 257 outlet; #X obj 40 57 t f b; #X obj 127 96 random 0; #X obj 103 210 +; #X obj 203 41 * 10000; #X obj 127 122 / 10000; #X obj 128 155 - 0; #X obj 241 83 / 2; #X connect 0 0 3 0; #X connect 1 0 6 0; #X connect 1 0 9 0; #X connect 3 0 5 0; #X connect 3 1 4 0; #X connect 4 0 7 0; #X connect 5 0 2 0; #X connect 6 0 4 1; #X connect 7 0 8 0; #X connect 8 0 5 1; #X connect 9 0 8 1; #X restore 347 290 pd rnd127; #X text 453 288 amplitude; #X obj 321 724 *~; #X connect 0 0 2 0; #X connect 1 0 2 0; #X connect 2 0 3 0; #X connect 3 0 4 0; #X connect 5 0 38 0; #X connect 6 0 48 0; #X connect 7 0 8 1; #X connect 7 0 15 1; #X connect 8 0 10 0; #X connect 10 0 14 0; #X connect 12 0 13 0; #X connect 13 0 0 0; #X connect 14 0 12 0; #X connect 14 1 15 0; #X connect 15 0 12 1; #X connect 18 0 10 1; #X connect 19 0 12 2; #X connect 19 0 24 1; #X connect 19 0 39 0; #X connect 19 0 25 1; #X connect 20 0 41 0; #X connect 24 0 6 0; #X connect 25 0 26 0; #X connect 25 0 31 0; #X connect 25 0 35 0; #X connect 26 0 28 0; #X connect 27 0 30 1; #X connect 29 0 34 0; #X connect 30 0 17 0; #X connect 31 0 29 1; #X connect 32 0 29 1; #X connect 33 0 31 0; #X connect 33 0 26 0; #X connect 33 0 35 0; #X connect 34 0 44 0; #X connect 34 1 32 0; #X connect 34 1 36 0; #X connect 34 1 27 0; #X connect 35 0 30 1; #X connect 36 0 28 0; #X connect 37 0 24 0; #X connect 37 1 1 0; #X connect 37 2 25 0; #X connect 38 0 29 0; #X connect 38 1 30 0; #X connect 39 0 7 0; #X connect 41 0 42 0; #X connect 42 0 39 1; #X connect 44 0 37 0; #X connect 44 1 8 0; #X connect 44 2 18 0; #X connect 44 3 18 1; #X connect 44 4 19 0; #X connect 44 5 19 1; #X connect 44 6 20 0; #X connect 44 7 20 1; #X connect 44 8 46 0; #X connect 44 9 46 1; #X connect 46 0 48 1; #X connect 48 0 3 1; #X restore 400 768 pd ch_grain; #N canvas 0 0 450 300 ch_grain 0; #X obj 160 657 line~; #X msg 64 415 set \$1; #X obj 160 686 tabread4~; #X obj 297 749 *~; #X obj 297 781 outlet~; #X obj 28 8 inlet; #N canvas 0 0 1015 762 start_envelope 0; #X obj 16 10 inlet; #X obj 17 122 outlet~; #X msg 16 39 0 \, 1024 \$1; #X obj 16 66 line~; #X obj 16 92 tabread4~ \$0-env; #X connect 0 0 2 0; #X connect 2 0 3 0; #X connect 3 0 4 0; #X connect 4 0 1 0; #X restore 321 695 pd start_envelope; #X obj 186 323 * 44.1; #X obj 161 352 -; #X text 202 352 taille exploitable de la table; #X obj 161 413 *; #X text 202 416 debut du sample (echantillon); #X obj 159 576 pack f f f; #X msg 159 601 \$1 \, \$2 \$3; #X obj 161 451 t f f; #X obj 209 481 +; #X text 285 477 fin du sample; #X obj 611 792 outlet; #N canvas 0 0 450 300 rnd127 0; #X obj 40 18 inlet; #X obj 203 19 inlet; #X obj 103 257 outlet; #X obj 40 57 t f b; #X obj 127 96 random 0; #X obj 103 189 +; #X obj 203 46 * 10000; #X obj 127 124 / 10000; #X obj 128 155 - 0; #X obj 241 83 / 2; #X connect 0 0 3 0; #X connect 1 0 6 0; #X connect 1 0 9 0; #X connect 3 0 5 0; #X connect 3 1 4 0; #X connect 4 0 7 0; #X connect 5 0 2 0; #X connect 6 0 4 1; #X connect 7 0 8 0; #X connect 8 0 5 1; #X connect 9 0 8 1; #X restore 87 151 pd rnd127; #N canvas 0 0 450 300 rnd127 0; #X obj 40 18 inlet; #X obj 203 19 inlet; #X obj 103 257 outlet; #X obj 40 57 t f b; #X obj 127 96 random 0; #X obj 103 210 +; #X obj 203 41 * 10000; #X obj 127 122 / 10000; #X obj 128 155 - 0; #X obj 241 83 / 2; #X connect 0 0 3 0; #X connect 1 0 6 0; #X connect 1 0 9 0; #X connect 3 0 5 0; #X connect 3 1 4 0; #X connect 4 0 7 0; #X connect 5 0 2 0; #X connect 6 0 4 1; #X connect 7 0 8 0; #X connect 8 0 5 1; #X connect 9 0 8 1; #X restore 147 180 pd rnd127; #N canvas 0 0 450 300 rnd127 0; #X obj 40 18 inlet; #X obj 203 19 inlet; #X obj 103 257 outlet; #X obj 40 57 t f b; #X obj 127 96 random 0; #X obj 102 198 +; #X obj 203 41 * 10000; #X obj 127 124 / 10000; #X obj 128 155 - 0; #X obj 241 83 / 2; #X connect 0 0 3 0; #X connect 1 0 6 0; #X connect 1 0 9 0; #X connect 3 0 5 0; #X connect 3 1 4 0; #X connect 4 0 7 0; #X connect 5 0 2 0; #X connect 6 0 4 1; #X connect 7 0 8 0; #X connect 8 0 5 1; #X connect 9 0 8 1; #X restore 211 205 pd rnd127; #X text 189 150 position; #X text 257 183 taille; #X text 271 257 freq relative; #X obj 321 665 f; #X obj 188 51 delay; #X msg 272 79 0; #X msg 628 46 1; #X obj 272 113 switch~; #X obj 28 62 spigot; #X obj 609 85 spigot; #X msg 122 48 1; #X msg 115 74 0; #X obj 122 6 loadbang; #X obj 28 88 t a b; #X msg 679 45 0; #X msg 319 80 1; #X obj 19 388 t b s b; #X obj 28 32 t a a; #X obj 186 290 *; #X text 273 323 taille en echantillon de lecture; #X obj 213 229 mtof; #X obj 213 256 / 440; #X text 323 202 freq (midi); #X obj 28 120 unpack s f f f f f f f f f; #X text 365 115 table \, taille de la table \, position (0 \, 1) \, aleat \, taille du grain \, aleat \, freq relative \, aleat \, amplitude \, rand; #N canvas 0 0 450 300 rnd127 0; #X obj 40 18 inlet; #X obj 203 19 inlet; #X obj 103 257 outlet; #X obj 40 57 t f b; #X obj 127 96 random 0; #X obj 103 210 +; #X obj 203 41 * 10000; #X obj 127 122 / 10000; #X obj 128 155 - 0; #X obj 241 83 / 2; #X connect 0 0 3 0; #X connect 1 0 6 0; #X connect 1 0 9 0; #X connect 3 0 5 0; #X connect 3 1 4 0; #X connect 4 0 7 0; #X connect 5 0 2 0; #X connect 6 0 4 1; #X connect 7 0 8 0; #X connect 8 0 5 1; #X connect 9 0 8 1; #X restore 347 290 pd rnd127; #X text 453 288 amplitude; #X obj 321 724 *~; #X connect 0 0 2 0; #X connect 1 0 2 0; #X connect 2 0 3 0; #X connect 3 0 4 0; #X connect 5 0 38 0; #X connect 6 0 48 0; #X connect 7 0 8 1; #X connect 7 0 15 1; #X connect 8 0 10 0; #X connect 10 0 14 0; #X connect 12 0 13 0; #X connect 13 0 0 0; #X connect 14 0 12 0; #X connect 14 1 15 0; #X connect 15 0 12 1; #X connect 18 0 10 1; #X connect 19 0 12 2; #X connect 19 0 24 1; #X connect 19 0 39 0; #X connect 19 0 25 1; #X connect 20 0 41 0; #X connect 24 0 6 0; #X connect 25 0 26 0; #X connect 25 0 31 0; #X connect 25 0 35 0; #X connect 26 0 28 0; #X connect 27 0 30 1; #X connect 29 0 34 0; #X connect 30 0 17 0; #X connect 31 0 29 1; #X connect 32 0 29 1; #X connect 33 0 31 0; #X connect 33 0 26 0; #X connect 33 0 35 0; #X connect 34 0 44 0; #X connect 34 1 32 0; #X connect 34 1 36 0; #X connect 34 1 27 0; #X connect 35 0 30 1; #X connect 36 0 28 0; #X connect 37 0 24 0; #X connect 37 1 1 0; #X connect 37 2 25 0; #X connect 38 0 29 0; #X connect 38 1 30 0; #X connect 39 0 7 0; #X connect 41 0 42 0; #X connect 42 0 39 1; #X connect 44 0 37 0; #X connect 44 1 8 0; #X connect 44 2 18 0; #X connect 44 3 18 1; #X connect 44 4 19 0; #X connect 44 5 19 1; #X connect 44 6 20 0; #X connect 44 7 20 1; #X connect 44 8 46 0; #X connect 44 9 46 1; #X connect 46 0 48 1; #X connect 48 0 3 1; #X restore 321 604 pd ch_grain; #X connect 0 0 12 0; #X connect 4 0 3 0; #X connect 5 0 1 0; #X connect 5 1 6 0; #X connect 6 0 1 0; #X connect 6 1 7 0; #X connect 7 0 1 0; #X connect 7 1 8 0; #X connect 8 0 1 0; #X connect 8 1 9 0; #X connect 9 0 1 0; #X connect 9 1 10 0; #X connect 10 0 1 0; #X connect 10 1 11 0; #X connect 11 0 1 0; #X connect 11 1 20 0; #X connect 12 0 1 0; #X connect 12 1 5 0; #X connect 13 0 1 0; #X connect 13 1 14 0; #X connect 14 0 1 0; #X connect 14 1 15 0; #X connect 15 0 1 0; #X connect 15 1 16 0; #X connect 16 0 1 0; #X connect 16 1 17 0; #X connect 17 0 1 0; #X connect 17 1 18 0; #X connect 18 0 1 0; #X connect 18 1 19 0; #X connect 19 0 1 0; #X connect 19 1 28 0; #X connect 20 0 1 0; #X connect 20 1 13 0; #X connect 21 0 1 0; #X connect 21 1 22 0; #X connect 22 0 1 0; #X connect 22 1 23 0; #X connect 23 0 1 0; #X connect 23 1 24 0; #X connect 24 0 1 0; #X connect 24 1 25 0; #X connect 25 0 1 0; #X connect 25 1 26 0; #X connect 26 0 1 0; #X connect 26 1 27 0; #X connect 27 0 1 0; #X connect 27 1 36 0; #X connect 28 0 1 0; #X connect 28 1 21 0; #X connect 29 0 1 0; #X connect 29 1 30 0; #X connect 30 0 1 0; #X connect 30 1 31 0; #X connect 31 0 1 0; #X connect 31 1 32 0; #X connect 32 0 1 0; #X connect 32 1 33 0; #X connect 33 0 1 0; #X connect 33 1 34 0; #X connect 34 0 1 0; #X connect 34 1 35 0; #X connect 35 0 1 0; #X connect 35 1 4 0; #X connect 36 0 1 0; #X connect 36 1 29 0; #X restore 44 352 pd multit_grains; #X text 278 393 doit rentrer ds un soundfiler; #X text 527 47 doit etre connect a l'entre du soundfiller pour avoir la taille du sample; #X text 667 405 table d'onde des fichiers audio + de l'envelope; #X obj 44 188 unpack f f f f f f f f f; #X obj 44 262 pack s f 0 0 50 0 1 0 0.1 0; #X text 66 294 table \, taille de la table \, position (0 \, 1) \, aleat \, taille du grain \, aleat \, freq relative \, aleat \, amplitude \, aleat; #X obj 514 307 makefilename \$0-table%d; #X obj 689 118 route cos; #X obj 220 76 unpack s f; #X obj 747 164 pack s \$0; #X obj 747 209 soundfiler; #X obj 845 319 table \$0-table4 5; #X obj 845 338 table \$0-table5 5; #X obj 845 357 table \$0-table6 5; #X obj 845 376 table \$0-table7 5; #X obj 722 319 table \$0-table0 5; #X obj 722 338 table \$0-table1 5; #X obj 722 357 table \$0-table2 5; #X obj 722 376 table \$0-table3 5; #X obj 220 38 route open window table; #X msg 747 188 read -resize \$1 \$2-env; #X msg 225 372 read -resize \$1 \$2; #X obj 225 349 pack s s; #X obj 276 326 makefilename \$0-table%d; #X connect 2 0 34 0; #X connect 3 0 5 0; #X connect 5 0 6 0; #X connect 5 1 7 1; #X connect 6 0 21 0; #X connect 7 0 4 0; #X connect 8 0 19 0; #X connect 8 1 19 1; #X connect 9 0 11 0; #X connect 11 0 12 0; #X connect 14 0 1 0; #X connect 18 0 8 0; #X connect 18 1 19 2; #X connect 18 2 19 3; #X connect 18 3 19 4; #X connect 18 4 19 5; #X connect 18 5 19 6; #X connect 18 6 19 7; #X connect 18 7 19 8; #X connect 18 8 19 9; #X connect 19 0 14 0; #X connect 21 0 7 0; #X connect 22 0 11 0; #X connect 22 1 24 0; #X connect 23 0 37 0; #X connect 23 1 6 1; #X connect 23 1 38 0; #X connect 24 0 35 0; #X connect 34 0 23 0; #X connect 34 1 22 0; #X connect 34 2 8 1; #X connect 34 3 18 0; #X connect 35 0 25 0; #X connect 36 0 0 0; #X connect 37 0 36 0; #X connect 38 0 37 1; nusmuk/audio/pwm~.pd0000664000175000017500000000756212047230734015277 0ustar zmoelnigzmoelnig#N canvas 268 49 728 663 10; #X obj 65 122 phasor~; #X obj 66 59 inlet~; #X obj 238 172 +~; #X obj 255 64 inlet~; #X obj 237 198 wrap~; #X obj 334 327 sig~ 22050; #X obj 334 284 samplerate~; #X obj 334 232 loadbang; #X obj 334 307 * 0.5; #X obj 67 475 -~; #X obj 67 503 outlet~; #X obj 475 432 loadbang; #X obj 475 495 table \$0-lookup 2; #X obj 475 474 s \$0-lookup; #X msg 475 453 0 0 1; #X msg 344 257 bang; #N canvas 315 401 852 607 sinc-phasor 0; #X obj 173 131 -~ 0.5; #X obj 421 192 *~ 2; #X obj 459 191 /~; #X obj 421 219 *~; #X obj 422 241 abs~; #X obj 421 263 +~ 1.8955; #X obj 174 427 +~; #N canvas 104 42 701 480 sin(x)/x 0; #X obj 220 229 cos~; #X obj 221 204 -~ 0.25; #X msg 288 90 1; #X floatatom 288 162 5 0 0 0 - - -; #X obj 288 116 atan; #X obj 288 137 * 8; #X obj 220 181 /~ 6.238; #X obj 288 67 loadbang; #X obj 221 148 inlet~; #X obj 219 291 outlet~; #X obj 220 255 /~; #X connect 0 0 10 0; #X connect 1 0 0 0; #X connect 2 0 4 0; #X connect 3 0 6 1; #X connect 4 0 5 0; #X connect 5 0 3 0; #X connect 6 0 1 0; #X connect 7 0 2 0; #X connect 8 0 6 0; #X connect 8 0 10 1; #X connect 10 0 9 0; #X restore 421 293 pd sin(x)/x; #X text 208 426 + v3; #X obj 175 333 tabread~ \$0-lookup; #X obj 174 311 +~ 1; #X obj 127 78 inlet~; #X text 123 53 phasor~; #X obj 433 71 inlet~; #X obj 510 72 inlet~; #X text 506 47 SR; #X text 429 46 freq; #X obj 109 486 outlet~; #X obj 328 217 wrap~; #X obj 329 243 *~ 2; #X obj 329 268 -~ 1; #X obj 330 392 *~; #X text 357 387 v2*sin(v4)/v4; #X obj 110 460 -~; #X connect 0 0 1 0; #X connect 0 0 10 0; #X connect 0 0 18 0; #X connect 1 0 3 0; #X connect 2 0 3 1; #X connect 3 0 4 0; #X connect 4 0 5 0; #X connect 5 0 7 0; #X connect 6 0 23 0; #X connect 7 0 21 1; #X connect 9 0 6 0; #X connect 10 0 9 0; #X connect 11 0 0 0; #X connect 11 0 23 1; #X connect 13 0 2 1; #X connect 14 0 2 0; #X connect 18 0 19 0; #X connect 19 0 20 0; #X connect 20 0 21 0; #X connect 21 0 6 1; #X connect 23 0 17 0; #X restore 238 442 pd sinc-phasor; #N canvas 315 401 852 607 sinc-phasor 0; #X obj 173 131 -~ 0.5; #X obj 421 192 *~ 2; #X obj 459 191 /~; #X obj 421 219 *~; #X obj 422 241 abs~; #X obj 421 263 +~ 1.8955; #X obj 174 427 +~; #N canvas 104 42 701 480 sin(x)/x 0; #X obj 220 229 cos~; #X obj 221 204 -~ 0.25; #X msg 288 90 1; #X floatatom 288 162 5 0 0 0 - - -; #X obj 288 116 atan; #X obj 288 137 * 8; #X obj 220 181 /~ 6.238; #X obj 288 67 loadbang; #X obj 221 148 inlet~; #X obj 219 291 outlet~; #X obj 220 255 /~; #X connect 0 0 10 0; #X connect 1 0 0 0; #X connect 2 0 4 0; #X connect 3 0 6 1; #X connect 4 0 5 0; #X connect 5 0 3 0; #X connect 6 0 1 0; #X connect 7 0 2 0; #X connect 8 0 6 0; #X connect 8 0 10 1; #X connect 10 0 9 0; #X restore 421 293 pd sin(x)/x; #X text 208 426 + v3; #X obj 175 333 tabread~ \$0-lookup; #X obj 174 311 +~ 1; #X obj 127 78 inlet~; #X text 123 53 phasor~; #X obj 433 71 inlet~; #X obj 510 72 inlet~; #X text 506 47 SR; #X text 429 46 freq; #X obj 109 486 outlet~; #X obj 328 217 wrap~; #X obj 329 243 *~ 2; #X obj 329 268 -~ 1; #X obj 330 392 *~; #X text 357 387 v2*sin(v4)/v4; #X obj 110 460 -~; #X connect 0 0 1 0; #X connect 0 0 10 0; #X connect 0 0 18 0; #X connect 1 0 3 0; #X connect 2 0 3 1; #X connect 3 0 4 0; #X connect 4 0 5 0; #X connect 5 0 7 0; #X connect 6 0 23 0; #X connect 7 0 21 1; #X connect 9 0 6 0; #X connect 10 0 9 0; #X connect 11 0 0 0; #X connect 11 0 23 1; #X connect 13 0 2 1; #X connect 14 0 2 0; #X connect 18 0 19 0; #X connect 19 0 20 0; #X connect 20 0 21 0; #X connect 21 0 6 1; #X connect 23 0 17 0; #X restore 66 443 pd sinc-phasor; #X connect 0 0 2 0; #X connect 0 0 17 0; #X connect 1 0 0 0; #X connect 1 0 16 1; #X connect 1 0 17 1; #X connect 2 0 4 0; #X connect 3 0 2 1; #X connect 4 0 16 0; #X connect 5 0 16 2; #X connect 5 0 17 2; #X connect 6 0 8 0; #X connect 7 0 6 0; #X connect 8 0 5 0; #X connect 9 0 10 0; #X connect 11 0 14 0; #X connect 14 0 13 0; #X connect 15 0 6 0; #X connect 16 0 9 1; #X connect 17 0 9 0; nusmuk/audio/Makefile0000664000175000017500000004224512621400564015404 0ustar zmoelnigzmoelnig## Pd library template version 1.0.14 # For instructions on how to use this template, see: # http://puredata.info/docs/developer/MakefileTemplate LIBRARY_NAME = nusmuk-audio # add your .c source files, one object per file, to the SOURCES # variable, help files will be included automatically, and for GUI # objects, the matching .tcl file too SOURCES = bq~.c tabosc4c~.c tabosci~.c tabread4c~.c # list all pd objects (i.e. myobject.pd) files here, and their helpfiles will # be included automatically PDOBJECTS = ADSR.pd bq_coef_notch.pd oscillo~.pd bq_coef_peak.pd bq_coef_bp.pd pwm~.pd bq_coef_highshelf.pd compress_limit~.pd compress_limit_sidechain~.pd saw~.pd bq_coef_hip.pd distortion~.pd spatialisation~.pd bq_coef_lop.pd echo~.pd bq_coef_lowshelf.pd granulator~.pd distortion2~.pd saw2~.pd bq_list~.pd triangle~.pd # example patches and related files, in the 'examples' subfolder EXAMPLES = analog_synth_emulation.pd hanning.wav # manuals and related files, in the 'manual' subfolder MANUAL = # if you want to include any other files in the source and binary tarballs, # list them here. This can be anything from header files, test patches, # documentation, etc. README.txt and LICENSE.txt are required and therefore # automatically included EXTRA_DIST = _sinh.pd isinc.wav sinc.wav triangle_table_generation.pd saw2_table_generation.pd # unit tests and related files here, in the 'unittests' subfolder UNITTESTS = #------------------------------------------------------------------------------# # # things you might need to edit if you are using other C libraries # #------------------------------------------------------------------------------# ALL_CFLAGS = -I"$(PD_INCLUDE)" ALL_LDFLAGS = SHARED_LDFLAGS = ALL_LIBS = #------------------------------------------------------------------------------# # # you shouldn't need to edit anything below here, if we did it right :) # #------------------------------------------------------------------------------# # these can be set from outside without (usually) breaking the build CFLAGS = -Wall -W -g LDFLAGS = LIBS = # get library version from meta file LIBRARY_VERSION = $(shell sed -n 's|^\#X text [0-9][0-9]* [0-9][0-9]* VERSION \(.*\);|\1|p' $(LIBRARY_NAME)-meta.pd) ALL_CFLAGS += -DPD -DVERSION='"$(LIBRARY_VERSION)"' PD_INCLUDE = $(PD_PATH)/include/pd # where to install the library, overridden below depending on platform prefix = /usr/local libdir = $(prefix)/lib pkglibdir = $(libdir)/pd-externals objectsdir = $(pkglibdir) INSTALL = install INSTALL_PROGRAM = $(INSTALL) -p -m 644 INSTALL_DATA = $(INSTALL) -p -m 644 INSTALL_DIR = $(INSTALL) -p -m 755 -d ALLSOURCES := $(SOURCES) $(SOURCES_android) $(SOURCES_cygwin) $(SOURCES_macosx) \ $(SOURCES_iphoneos) $(SOURCES_linux) $(SOURCES_windows) DISTDIR=$(LIBRARY_NAME)-$(LIBRARY_VERSION) ORIGDIR=pd-$(LIBRARY_NAME:~=)_$(LIBRARY_VERSION) UNAME := $(shell uname -s) ifeq ($(UNAME),Darwin) CPU := $(shell uname -p) ifeq ($(CPU),arm) # iPhone/iPod Touch SOURCES += $(SOURCES_iphoneos) EXTENSION = pd_darwin SHARED_EXTENSION = dylib OS = iphoneos PD_PATH = /Applications/Pd-extended.app/Contents/Resources IPHONE_BASE=/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin CC=$(IPHONE_BASE)/gcc CPP=$(IPHONE_BASE)/cpp CXX=$(IPHONE_BASE)/g++ ISYSROOT = -isysroot /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.0.sdk IPHONE_CFLAGS = -miphoneos-version-min=3.0 $(ISYSROOT) -arch armv6 OPT_CFLAGS = -fast -funroll-loops -fomit-frame-pointer ALL_CFLAGS := $(IPHONE_CFLAGS) $(ALL_CFLAGS) ALL_LDFLAGS += -arch armv6 -bundle -undefined dynamic_lookup $(ISYSROOT) SHARED_LDFLAGS += -arch armv6 -dynamiclib -undefined dynamic_lookup $(ISYSROOT) ALL_LIBS += -lc $(LIBS_iphoneos) STRIP = strip -x DISTBINDIR=$(DISTDIR)-$(OS) else # Mac OS X SOURCES += $(SOURCES_macosx) EXTENSION = pd_darwin SHARED_EXTENSION = dylib OS = macosx PD_PATH = /Applications/Pd-extended.app/Contents/Resources OPT_CFLAGS = -ftree-vectorize -ftree-vectorizer-verbose=2 -fast # build universal 32-bit on 10.4 and 32/64 on newer ifeq ($(shell uname -r | sed 's|\([0-9][0-9]*\)\.[0-9][0-9]*\.[0-9][0-9]*|\1|'), 8) FAT_FLAGS = -arch ppc -arch i386 -mmacosx-version-min=10.4 else SOURCES += $(SOURCES_iphoneos) # Starting with Xcode 4.0, the PowerPC compiler is not installed by default ifeq ($(wildcard /usr/llvm-gcc-4.2/libexec/gcc/powerpc*), ) FAT_FLAGS = -arch i386 -arch x86_64 -mmacosx-version-min=10.5 else FAT_FLAGS = -arch ppc -arch i386 -arch x86_64 -mmacosx-version-min=10.4 endif endif ALL_CFLAGS += $(FAT_FLAGS) -fPIC -I/sw/include # if the 'pd' binary exists, check the linking against it to aid with stripping BUNDLE_LOADER = $(shell test ! -e $(PD_PATH)/bin/pd || echo -bundle_loader $(PD_PATH)/bin/pd) ALL_LDFLAGS += $(FAT_FLAGS) -headerpad_max_install_names -bundle $(BUNDLE_LOADER) \ -undefined dynamic_lookup -L/sw/lib SHARED_LDFLAGS += $(FAT_FLAGS) -dynamiclib -undefined dynamic_lookup \ -install_name @loader_path/$(SHARED_LIB) -compatibility_version 1 -current_version 1.0 ALL_LIBS += -lc $(LIBS_macosx) STRIP = strip -x DISTBINDIR=$(DISTDIR)-$(OS) # install into ~/Library/Pd on Mac OS X since /usr/local isn't used much pkglibdir=$(HOME)/Library/Pd endif endif # Tho Android uses Linux, we use this fake uname to provide an easy way to # setup all this things needed to cross-compile for Android using the NDK ifeq ($(UNAME),ANDROID) CPU := arm SOURCES += $(SOURCES_android) EXTENSION = so SHARED_EXTENSION = so OS = android PD_PATH = /usr NDK_BASE := /opt/android-ndk NDK_PLATFORM_LEVEL ?= 5 NDK_ABI=arm NDK_COMPILER_VERSION = 4.6 NDK_SYSROOT=$(NDK_BASE)/platforms/android-$(NDK_PLATFORM_LEVEL)/arch-$(NDK_ABI) NDK_UNAME:=$(shell uname -s | tr '[A-Z]' '[a-z]') ifeq ($(NDK_ABI),x86) HOST = i686-linux-android NDK_TOOLCHAIN = $(NDK_ABI)-$(NDK_COMPILER_VERSION) else HOST = $(NDK_ABI)-linux-androideabi NDK_TOOLCHAIN = $(HOST)-$(NDK_COMPILER_VERSION) endif NDK_TOOLCHAIN_BASE=$(NDK_BASE)/toolchains/$(NDK_TOOLCHAIN)/prebuilt/$(NDK_UNAME)-$(NDK_PROCESSOR) CC := $(NDK_TOOLCHAIN_BASE)/bin/$(HOST)-gcc --sysroot=$(NDK_SYSROOT) LD := $(NDK_TOOLCHAIN_BASE)/bin/$(HOST)-ld OPT_CFLAGS = -O6 -funroll-loops -fomit-frame-pointer CFLAGS += LDFLAGS += -rdynamic -shared SHARED_LDFLAGS += -Wl,-soname,$(SHARED_LIB) -shared LIBS += -lc $(LIBS_android) STRIP := $(NDK_TOOLCHAIN_BASE)/bin/$(HOST)-strip) \ --strip-unneeded -R .note -R .comment DISTBINDIR=$(DISTDIR)-$(OS)-$(shell uname -m) endif ifeq ($(UNAME),Linux) CPU := $(shell uname -m) SOURCES += $(SOURCES_linux) EXTENSION = pd_linux SHARED_EXTENSION = so OS = linux PD_PATH = /usr OPT_CFLAGS = -O6 -funroll-loops -fomit-frame-pointer ALL_CFLAGS += -fPIC ALL_LDFLAGS += -rdynamic -shared -fPIC -Wl,-rpath,"\$$ORIGIN",--enable-new-dtags SHARED_LDFLAGS += -Wl,-soname,$(SHARED_LIB) -shared ALL_LIBS += -lc $(LIBS_linux) STRIP = strip --strip-unneeded -R .note -R .comment DISTBINDIR=$(DISTDIR)-$(OS)-$(shell uname -m) endif ifeq ($(UNAME),GNU) # GNU/Hurd, should work like GNU/Linux for basically all externals CPU := $(shell uname -m) SOURCES += $(SOURCES_linux) EXTENSION = pd_linux SHARED_EXTENSION = so OS = linux PD_PATH = /usr OPT_CFLAGS = -O6 -funroll-loops -fomit-frame-pointer ALL_CFLAGS += -fPIC ALL_LDFLAGS += -rdynamic -shared -fPIC -Wl,-rpath,"\$$ORIGIN",--enable-new-dtags SHARED_LDFLAGS += -shared -Wl,-soname,$(SHARED_LIB) ALL_LIBS += -lc $(LIBS_linux) STRIP = strip --strip-unneeded -R .note -R .comment DISTBINDIR=$(DISTDIR)-$(OS)-$(shell uname -m) endif ifeq ($(UNAME),GNU/kFreeBSD) # Debian GNU/kFreeBSD, should work like GNU/Linux for basically all externals CPU := $(shell uname -m) SOURCES += $(SOURCES_linux) EXTENSION = pd_linux SHARED_EXTENSION = so OS = linux PD_PATH = /usr OPT_CFLAGS = -O6 -funroll-loops -fomit-frame-pointer ALL_CFLAGS += -fPIC ALL_LDFLAGS += -rdynamic -shared -fPIC -Wl,-rpath,"\$$ORIGIN",--enable-new-dtags SHARED_LDFLAGS += -shared -Wl,-soname,$(SHARED_LIB) ALL_LIBS += -lc $(LIBS_linux) STRIP = strip --strip-unneeded -R .note -R .comment DISTBINDIR=$(DISTDIR)-$(OS)-$(shell uname -m) endif ifeq (CYGWIN,$(findstring CYGWIN,$(UNAME))) CPU := $(shell uname -m) SOURCES += $(SOURCES_cygwin) EXTENSION = dll SHARED_EXTENSION = dll OS = cygwin PD_PATH = $(shell cygpath $$PROGRAMFILES)/pd OPT_CFLAGS = -O6 -funroll-loops -fomit-frame-pointer ALL_CFLAGS += ALL_LDFLAGS += -rdynamic -shared -L"$(PD_PATH)/src" -L"$(PD_PATH)/bin" SHARED_LDFLAGS += -shared -Wl,-soname,$(SHARED_LIB) ALL_LIBS += -lc -lpd $(LIBS_cygwin) STRIP = strip --strip-unneeded -R .note -R .comment DISTBINDIR=$(DISTDIR)-$(OS) endif ifeq (MINGW,$(findstring MINGW,$(UNAME))) CPU := $(shell uname -m) SOURCES += $(SOURCES_windows) EXTENSION = dll SHARED_EXTENSION = dll OS = windows PD_PATH = $(shell cd "$$PROGRAMFILES/pd" && pwd) # MinGW doesn't seem to include cc so force gcc CC=gcc OPT_CFLAGS = -O3 -funroll-loops -fomit-frame-pointer ALL_CFLAGS += -mms-bitfields ALL_LDFLAGS += -s -shared -Wl,--enable-auto-import SHARED_LDFLAGS += -shared ALL_LIBS += -L"$(PD_PATH)/src" -L"$(PD_PATH)/bin" -L"$(PD_PATH)/obj" \ -lpd -lwsock32 -lkernel32 -luser32 -lgdi32 -liberty $(LIBS_windows) STRIP = strip --strip-unneeded -R .note -R .comment DISTBINDIR=$(DISTDIR)-$(OS) endif # in case somebody manually set the HELPPATCHES above HELPPATCHES ?= $(SOURCES:.c=-help.pd) $(PDOBJECTS:.pd=-help.pd) ALL_CFLAGS := $(ALL_CFLAGS) $(CFLAGS) $(OPT_CFLAGS) ALL_LDFLAGS := $(LDFLAGS) $(ALL_LDFLAGS) ALL_LIBS := $(LIBS) $(ALL_LIBS) SHARED_SOURCE ?= $(wildcard lib$(LIBRARY_NAME).c) SHARED_HEADER ?= $(shell test ! -e $(LIBRARY_NAME).h || echo $(LIBRARY_NAME).h) SHARED_LIB ?= $(SHARED_SOURCE:.c=.$(SHARED_EXTENSION)) SHARED_TCL_LIB = $(wildcard lib$(LIBRARY_NAME).tcl) .PHONY = install libdir_install single_install install-doc install-examples install-manual install-unittests clean distclean dist etags $(LIBRARY_NAME) all: $(SOURCES:.c=.$(EXTENSION)) $(SHARED_LIB) %.o: %.c $(CC) $(ALL_CFLAGS) -o "$*.o" -c "$*.c" %.$(EXTENSION): %.o $(SHARED_LIB) $(CC) $(ALL_LDFLAGS) -o "$*.$(EXTENSION)" "$*.o" $(ALL_LIBS) $(SHARED_LIB) chmod a-x "$*.$(EXTENSION)" # this links everything into a single binary file $(LIBRARY_NAME): $(SOURCES:.c=.o) $(LIBRARY_NAME).o lib$(LIBRARY_NAME).o $(CC) $(ALL_LDFLAGS) -o $(LIBRARY_NAME).$(EXTENSION) $(SOURCES:.c=.o) \ $(LIBRARY_NAME).o lib$(LIBRARY_NAME).o $(ALL_LIBS) chmod a-x $(LIBRARY_NAME).$(EXTENSION) $(SHARED_LIB): $(SHARED_SOURCE:.c=.o) $(CC) $(SHARED_LDFLAGS) -o $(SHARED_LIB) $(SHARED_SOURCE:.c=.o) $(ALL_LIBS) install: libdir_install # The meta and help files are explicitly installed to make sure they are # actually there. Those files are not optional, then need to be there. libdir_install: $(SOURCES:.c=.$(EXTENSION)) $(SHARED_LIB) install-doc install-examples install-manual install-unittests $(INSTALL_DIR) $(DESTDIR)$(objectsdir)/$(LIBRARY_NAME) $(INSTALL_DATA) $(LIBRARY_NAME)-meta.pd \ $(DESTDIR)$(objectsdir)/$(LIBRARY_NAME) test -z "$(strip $(SOURCES))" || (\ $(INSTALL_PROGRAM) $(SOURCES:.c=.$(EXTENSION)) $(DESTDIR)$(objectsdir)/$(LIBRARY_NAME) && \ $(STRIP) $(addprefix $(DESTDIR)$(objectsdir)/$(LIBRARY_NAME)/,$(SOURCES:.c=.$(EXTENSION)))) test -z "$(strip $(SHARED_LIB))" || \ $(INSTALL_DATA) $(SHARED_LIB) \ $(DESTDIR)$(objectsdir)/$(LIBRARY_NAME) test -z "$(strip $(wildcard $(SOURCES:.c=.tcl)))" || \ $(INSTALL_DATA) $(wildcard $(SOURCES:.c=.tcl)) \ $(DESTDIR)$(objectsdir)/$(LIBRARY_NAME) test -z "$(strip $(PDOBJECTS))" || \ $(INSTALL_DATA) $(PDOBJECTS) \ $(DESTDIR)$(objectsdir)/$(LIBRARY_NAME) test -z "$(strip $(EXTRA_DIST))" || \ $(INSTALL_DATA) $(EXTRA_DIST) \ $(DESTDIR)$(objectsdir)/$(LIBRARY_NAME) test -z "$(strip $(SHARED_TCL_LIB))" || \ $(INSTALL_DATA) $(SHARED_TCL_LIB) \ $(DESTDIR)$(objectsdir)/$(LIBRARY_NAME) # install library linked as single binary single_install: $(LIBRARY_NAME) install-doc install-examples install-manual install-unittests $(INSTALL_DIR) $(DESTDIR)$(objectsdir)/$(LIBRARY_NAME) $(INSTALL_PROGRAM) $(LIBRARY_NAME).$(EXTENSION) $(DESTDIR)$(objectsdir)/$(LIBRARY_NAME) $(STRIP) $(DESTDIR)$(objectsdir)/$(LIBRARY_NAME)/$(LIBRARY_NAME).$(EXTENSION) install-doc: $(INSTALL_DIR) $(DESTDIR)$(objectsdir)/$(LIBRARY_NAME) test -z "$(strip $(SOURCES) $(PDOBJECTS))" || \ $(INSTALL_DATA) $(HELPPATCHES) \ $(DESTDIR)$(objectsdir)/$(LIBRARY_NAME) $(INSTALL_DATA) README.txt $(DESTDIR)$(objectsdir)/$(LIBRARY_NAME)/README.txt $(INSTALL_DATA) LICENSE.txt $(DESTDIR)$(objectsdir)/$(LIBRARY_NAME)/LICENSE.txt install-examples: test -z "$(strip $(EXAMPLES))" || \ $(INSTALL_DIR) $(DESTDIR)$(objectsdir)/$(LIBRARY_NAME)/examples && \ for file in $(EXAMPLES); do \ $(INSTALL_DATA) examples/$$file $(DESTDIR)$(objectsdir)/$(LIBRARY_NAME)/examples; \ done install-manual: test -z "$(strip $(MANUAL))" || \ $(INSTALL_DIR) $(DESTDIR)$(objectsdir)/$(LIBRARY_NAME)/manual && \ for file in $(MANUAL); do \ $(INSTALL_DATA) manual/$$file $(DESTDIR)$(objectsdir)/$(LIBRARY_NAME)/manual; \ done install-unittests: test -z "$(strip $(UNITTESTS))" || \ $(INSTALL_DIR) $(DESTDIR)$(objectsdir)/$(LIBRARY_NAME)/unittests && \ for file in $(UNITTESTS); do \ $(INSTALL_DATA) unittests/$$file $(DESTDIR)$(objectsdir)/$(LIBRARY_NAME)/unittests; \ done clean: -rm -f -- $(SOURCES:.c=.o) $(SOURCES_LIB:.c=.o) $(SHARED_SOURCE:.c=.o) -rm -f -- $(SOURCES:.c=.$(EXTENSION)) -rm -f -- $(LIBRARY_NAME).o -rm -f -- $(LIBRARY_NAME).$(EXTENSION) -rm -f -- $(SHARED_LIB) distclean: clean -rm -f -- $(DISTBINDIR).tar.gz -rm -rf -- $(DISTBINDIR) -rm -f -- $(DISTDIR).tar.gz -rm -rf -- $(DISTDIR) -rm -f -- $(ORIGDIR).tar.gz -rm -rf -- $(ORIGDIR) $(DISTBINDIR): $(INSTALL_DIR) $(DISTBINDIR) libdir: all $(DISTBINDIR) $(INSTALL_DATA) $(LIBRARY_NAME)-meta.pd $(DISTBINDIR) $(INSTALL_DATA) $(SOURCES) $(SHARED_SOURCE) $(SHARED_HEADER) $(DISTBINDIR) $(INSTALL_DATA) $(HELPPATCHES) $(DISTBINDIR) test -z "$(strip $(EXTRA_DIST))" || \ $(INSTALL_DATA) $(EXTRA_DIST) $(DISTBINDIR) # tar --exclude-vcs -czpf $(DISTBINDIR).tar.gz $(DISTBINDIR) $(DISTDIR): $(INSTALL_DIR) $(DISTDIR) $(ORIGDIR): $(INSTALL_DIR) $(ORIGDIR) dist: $(DISTDIR) $(INSTALL_DATA) Makefile $(DISTDIR) $(INSTALL_DATA) README.txt $(DISTDIR) $(INSTALL_DATA) LICENSE.txt $(DISTDIR) $(INSTALL_DATA) $(LIBRARY_NAME)-meta.pd $(DISTDIR) test -z "$(strip $(ALLSOURCES))" || \ $(INSTALL_DATA) $(ALLSOURCES) $(DISTDIR) test -z "$(strip $(wildcard $(ALLSOURCES:.c=.tcl)))" || \ $(INSTALL_DATA) $(wildcard $(ALLSOURCES:.c=.tcl)) $(DISTDIR) test -z "$(strip $(wildcard $(LIBRARY_NAME).c))" || \ $(INSTALL_DATA) $(LIBRARY_NAME).c $(DISTDIR) test -z "$(strip $(SHARED_HEADER))" || \ $(INSTALL_DATA) $(SHARED_HEADER) $(DISTDIR) test -z "$(strip $(SHARED_SOURCE))" || \ $(INSTALL_DATA) $(SHARED_SOURCE) $(DISTDIR) test -z "$(strip $(SHARED_TCL_LIB))" || \ $(INSTALL_DATA) $(SHARED_TCL_LIB) $(DISTDIR) test -z "$(strip $(PDOBJECTS))" || \ $(INSTALL_DATA) $(PDOBJECTS) $(DISTDIR) test -z "$(strip $(HELPPATCHES))" || \ $(INSTALL_DATA) $(HELPPATCHES) $(DISTDIR) test -z "$(strip $(EXTRA_DIST))" || \ $(INSTALL_DATA) $(EXTRA_DIST) $(DISTDIR) test -z "$(strip $(EXAMPLES))" || \ $(INSTALL_DIR) $(DISTDIR)/examples && \ for file in $(EXAMPLES); do \ $(INSTALL_DATA) examples/$$file $(DISTDIR)/examples; \ done test -z "$(strip $(MANUAL))" || \ $(INSTALL_DIR) $(DISTDIR)/manual && \ for file in $(MANUAL); do \ $(INSTALL_DATA) manual/$$file $(DISTDIR)/manual; \ done test -z "$(strip $(UNITTESTS))" || \ $(INSTALL_DIR) $(DISTDIR)/unittests && \ for file in $(UNITTESTS); do \ $(INSTALL_DATA) unittests/$$file $(DISTDIR)/unittests; \ done tar --exclude-vcs -czpf $(DISTDIR).tar.gz $(DISTDIR) # make a Debian source package dpkg-source: debclean make distclean dist mv $(DISTDIR) $(ORIGDIR) tar --exclude-vcs -czpf ../$(ORIGDIR).orig.tar.gz $(ORIGDIR) rm -f -- $(DISTDIR).tar.gz rm -rf -- $(DISTDIR) $(ORIGDIR) cd .. && dpkg-source -b $(LIBRARY_NAME) etags: TAGS TAGS: $(wildcard $(PD_INCLUDE)/*.h) $(SOURCES) $(SHARED_SOURCE) $(SHARED_HEADER) etags $(wildcard $(PD_INCLUDE)/*.h) etags -a *.h $(SOURCES) $(SHARED_SOURCE) $(SHARED_HEADER) etags -a --language=none --regex="/proc[ \t]+\([^ \t]+\)/\1/" *.tcl showsetup: @echo "CC: $(CC)" @echo "CFLAGS: $(CFLAGS)" @echo "LDFLAGS: $(LDFLAGS)" @echo "LIBS: $(LIBS)" @echo "ALL_CFLAGS: $(ALL_CFLAGS)" @echo "ALL_LDFLAGS: $(ALL_LDFLAGS)" @echo "ALL_LIBS: $(ALL_LIBS)" @echo "PD_INCLUDE: $(PD_INCLUDE)" @echo "PD_PATH: $(PD_PATH)" @echo "objectsdir: $(objectsdir)" @echo "LIBRARY_NAME: $(LIBRARY_NAME)" @echo "LIBRARY_VERSION: $(LIBRARY_VERSION)" @echo "SOURCES: $(SOURCES)" @echo "SHARED_HEADER: $(SHARED_HEADER)" @echo "SHARED_SOURCE: $(SHARED_SOURCE)" @echo "SHARED_LIB: $(SHARED_LIB)" @echo "SHARED_TCL_LIB: $(SHARED_TCL_LIB)" @echo "PDOBJECTS: $(PDOBJECTS)" @echo "ALLSOURCES: $(ALLSOURCES)" @echo "ALLSOURCES TCL: $(wildcard $(ALLSOURCES:.c=.tcl))" @echo "UNAME: $(UNAME)" @echo "CPU: $(CPU)" @echo "pkglibdir: $(pkglibdir)" @echo "DISTDIR: $(DISTDIR)" @echo "ORIGDIR: $(ORIGDIR)" @echo "NDK_TOOLCHAIN: $(NDK_TOOLCHAIN)" @echo "NDK_BASE: $(NDK_BASE)" @echo "NDK_SYSROOT: $(NDK_SYSROOT)" nusmuk/audio/bq_coef_hip-help.pd0000664000175000017500000000520612047230734017453 0ustar zmoelnigzmoelnig#N canvas 544 74 484 505 10; #X obj 29 160 hip~ 2; #X msg 40 187 clear; #X obj 156 140 pack f f f f f; #X obj 156 94 mtof; #X floatatom 156 77 5 0 0 0 - - -; #X floatatom 219 98 5 0 0 0 - - -; #X obj 29 132 noise~; #N canvas 0 0 450 300 5_line~ 0; #X obj 80 123 line~; #X obj 79 147 outlet~; #X obj 80 73 inlet; #X obj 136 123 line~; #X obj 135 147 outlet~; #X obj 136 73 inlet; #X obj 193 123 line~; #X obj 192 147 outlet~; #X obj 193 73 inlet; #X obj 247 123 line~; #X obj 246 147 outlet~; #X obj 247 73 inlet; #X obj 304 123 line~; #X obj 303 147 outlet~; #X obj 304 73 inlet; #X msg 80 96 \$1 133; #X msg 136 96 \$1 133; #X msg 193 96 \$1 133; #X msg 247 96 \$1 133; #X msg 304 96 \$1 133; #X connect 0 0 1 0; #X connect 2 0 15 0; #X connect 3 0 4 0; #X connect 5 0 16 0; #X connect 6 0 7 0; #X connect 8 0 17 0; #X connect 9 0 10 0; #X connect 11 0 18 0; #X connect 12 0 13 0; #X connect 14 0 19 0; #X connect 15 0 0 0; #X connect 16 0 3 0; #X connect 17 0 6 0; #X connect 18 0 9 0; #X connect 19 0 12 0; #X restore 45 258 pd 5_line~; #X obj 45 231 unpack f f f f f; #X obj 43 328 dac~; #X obj 156 166 t a; #X obj 44 301 *~ 0.1; #N canvas 0 0 444 301 oscillo 0; #X obj 41 25 loadbang; #X obj 26 223 metro 100; #X obj 8 -9 inlet~; #X msg 41 47 1; #X obj 42 81 tgl 20 0 empty empty Stop 0 -6 0 8 -258699 -1 -1 1 1; #X obj 118 -3 inlet; #X msg 147 48 1; #X msg 115 48 0; #X obj 118 21 moses 10; #X obj 19 263 tabwrite~ \$0-oscillo; #X obj 100 140 cnv 1 300 1 empty empty empty 20 12 0 14 -195568 -66577 0; #N canvas 0 0 767 419 (subpatch) 0; #X array \$0-oscillo 300 float 0; #X coords 0 1 299 -1 300 80 1; #X restore 100 100 graph; #X obj 110 75 change; #X obj 234 62 block~ 640 1 0.25; #X connect 0 0 3 0; #X connect 1 0 9 0; #X connect 2 0 9 0; #X connect 3 0 4 0; #X connect 4 0 1 0; #X connect 5 0 8 0; #X connect 6 0 12 0; #X connect 7 0 12 0; #X connect 8 0 7 0; #X connect 8 1 6 0; #X connect 8 1 1 1; #X connect 12 0 1 0; #X coords 0 -1 1 1 300 80 1 100 100; #X restore 29 372 pd oscillo; #X text 260 95 Q; #X text 192 77 cutoff; #X obj 156 116 bq_coef_hip; #X text 153 8 high pass filter coeficient for a biquad; #X obj 29 280 bq~ --------; #X connect 0 0 17 0; #X connect 1 0 17 0; #X connect 2 0 10 0; #X connect 3 0 15 0; #X connect 4 0 3 0; #X connect 5 0 15 1; #X connect 6 0 0 0; #X connect 7 0 17 1; #X connect 7 1 17 2; #X connect 7 2 17 3; #X connect 7 3 17 4; #X connect 7 4 17 5; #X connect 8 0 7 0; #X connect 8 1 7 1; #X connect 8 2 7 2; #X connect 8 3 7 3; #X connect 8 4 7 4; #X connect 10 0 8 0; #X connect 11 0 9 0; #X connect 15 0 2 0; #X connect 15 1 2 1; #X connect 15 2 2 2; #X connect 15 3 2 3; #X connect 15 4 2 4; #X connect 17 0 11 0; #X connect 17 0 12 0; nusmuk/audio/triangle~-help.pd0000664000175000017500000000062412621400362017211 0ustar zmoelnigzmoelnig#N canvas 326 691 473 279 10; #X obj 43 110 sig~ 333; #X obj 43 194 dac~; #X floatatom 43 63 5 0 0 0 - - -, f 5; #X obj 43 162 *~ 0.1; #X obj 43 86 mtof; #X obj 42 137 triangle~; #X obj 231 62 triangle_table_generation; #X text 30 16 triangle~ is a band-limited triangle oscillator.; #X connect 0 0 5 0; #X connect 2 0 4 0; #X connect 3 0 1 0; #X connect 3 0 1 1; #X connect 4 0 0 0; #X connect 5 0 3 0; nusmuk/audio/ADSR-help.pd0000664000175000017500000000201512047230730015735 0ustar zmoelnigzmoelnig#N canvas 745 272 838 561 12; #X obj 49 377 vsl 15 128 0 127 0 0 empty empty empty 0 -9 0 10 -262144 -1 -1 7366 1; #X obj 49 46 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 1 1 ; #X obj 49 344 * 127; #X obj 49 315 ADSR -------; #X obj 72 78 vsl 15 128 0 127 0 0 empty empty empty 0 -9 0 10 -262144 -1 -1 0 1; #X obj 95 98 vsl 15 128 0 127 0 0 empty empty empty 0 -9 0 10 -262144 -1 -1 0 1; #X obj 118 123 vsl 15 128 0 127 0 0 empty empty empty 0 -9 0 10 -262144 -1 -1 0 1; #X obj 142 149 vsl 15 128 0 127 0 0 empty empty empty 0 -9 0 10 -262144 -1 -1 0 1; #X text 280 37 Standard analog style ADSR; #X text 92 74 Attack; #X text 118 94 Decay; #X text 138 116 Sustain; #X text 159 140 Release; #X text 72 43 On / Off; #X obj 118 288 / 127; #X text 281 73 A \, D \, R are from 0 to 127 \, using arbitrary unit ; #X text 280 102 S is from 0 to 1 \, output is from 0 to 1; #X connect 1 0 3 0; #X connect 2 0 0 0; #X connect 3 0 2 0; #X connect 4 0 3 1; #X connect 5 0 3 2; #X connect 6 0 14 0; #X connect 7 0 3 4; #X connect 14 0 3 3; nusmuk/audio/bq_coef_lop.pd0000664000175000017500000000430412047230734016535 0ustar zmoelnigzmoelnig#N canvas 1 81 454 630 10; #X obj 50 32 inlet; #X obj 211 31 inlet; #X text 92 34 f; #X text 256 31 Q; #X obj 117 137 samplerate~; #X obj 117 114 loadbang; #X obj 174 115 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 -1; #X obj 50 170 /; #X obj 50 369 cos; #X obj 199 296 sin; #X obj 211 116 * 2; #X obj 50 564 outlet; #X obj 288 504 + 1; #X obj 139 501 / 2; #X obj 94 505 -; #X msg 99 463 1 \$1; #X msg 139 458 1 \$1; #X obj 184 480 -; #X obj 229 501 / 2; #X msg 229 460 1 \$1; #X obj 50 487 * -2; #X obj 139 480 -; #X msg 184 458 1 \$1; #X obj 229 481 -; #X obj 199 350 t f f; #X obj 50 269 t f f; #X obj 50 539 /; #X obj 94 540 /; #X obj 139 540 /; #X obj 184 539 /; #X obj 229 540 /; #X obj 139 564 outlet; #X obj 94 564 outlet; #X obj 184 564 outlet; #X obj 229 564 outlet; #X obj 50 246 f; #X obj 211 185 t b f; #X obj 211 95 + 0.707; #X obj 211 74 max 0; #X obj 50 73 max 0; #X obj 50 394 t f f b; #X obj 50 115 * 3.14159; #X obj 67 206 min 3.14; #X obj 199 325 * 0.767; #X msg 211 140 1 \$1; #X obj 211 162 /; #X obj 50 143 * 2; #X obj 50 95 min 21000; #X obj 238 295 _sinh; #X connect 0 0 39 0; #X connect 1 0 38 0; #X connect 4 0 7 1; #X connect 5 0 4 0; #X connect 6 0 4 0; #X connect 7 0 35 0; #X connect 8 0 40 0; #X connect 9 0 43 0; #X connect 10 0 44 0; #X connect 12 0 26 1; #X connect 12 0 27 1; #X connect 12 0 28 1; #X connect 12 0 29 1; #X connect 12 0 30 1; #X connect 13 0 28 0; #X connect 14 0 27 0; #X connect 15 0 14 0; #X connect 16 0 21 0; #X connect 17 0 29 0; #X connect 18 0 30 0; #X connect 19 0 23 0; #X connect 20 0 26 0; #X connect 21 0 13 0; #X connect 22 0 17 0; #X connect 23 0 18 0; #X connect 24 0 15 0; #X connect 24 1 12 0; #X connect 25 0 8 0; #X connect 25 1 9 0; #X connect 26 0 11 0; #X connect 27 0 32 0; #X connect 28 0 31 0; #X connect 29 0 33 0; #X connect 30 0 34 0; #X connect 35 0 25 0; #X connect 36 0 35 0; #X connect 36 1 48 0; #X connect 37 0 10 0; #X connect 38 0 37 0; #X connect 39 0 47 0; #X connect 40 0 20 0; #X connect 40 1 16 0; #X connect 40 1 22 0; #X connect 40 1 19 0; #X connect 40 2 14 0; #X connect 41 0 46 0; #X connect 42 0 35 0; #X connect 43 0 24 0; #X connect 44 0 45 0; #X connect 45 0 36 0; #X connect 46 0 7 0; #X connect 47 0 41 0; #X connect 48 0 43 1; nusmuk/audio/bq_coef_lowshelf-help.pd0000664000175000017500000000521712047230734020520 0ustar zmoelnigzmoelnig#N canvas 143 113 484 505 10; #X obj 29 160 hip~ 2; #X msg 45 191 clear; #X obj 156 140 pack f f f f f; #X obj 156 94 mtof; #X floatatom 156 77 5 0 0 0 - - -; #X floatatom 219 98 5 0 0 0 - - -; #X obj 29 132 noise~; #N canvas 0 0 450 300 5_line~ 0; #X obj 80 123 line~; #X obj 79 147 outlet~; #X obj 80 73 inlet; #X obj 136 123 line~; #X obj 135 147 outlet~; #X obj 136 73 inlet; #X obj 193 123 line~; #X obj 192 147 outlet~; #X obj 193 73 inlet; #X obj 247 123 line~; #X obj 246 147 outlet~; #X obj 247 73 inlet; #X obj 304 123 line~; #X obj 303 147 outlet~; #X obj 304 73 inlet; #X msg 80 96 \$1 133; #X msg 136 96 \$1 133; #X msg 193 96 \$1 133; #X msg 247 96 \$1 133; #X msg 304 96 \$1 133; #X connect 0 0 1 0; #X connect 2 0 15 0; #X connect 3 0 4 0; #X connect 5 0 16 0; #X connect 6 0 7 0; #X connect 8 0 17 0; #X connect 9 0 10 0; #X connect 11 0 18 0; #X connect 12 0 13 0; #X connect 14 0 19 0; #X connect 15 0 0 0; #X connect 16 0 3 0; #X connect 17 0 6 0; #X connect 18 0 9 0; #X connect 19 0 12 0; #X restore 45 258 pd 5_line~; #X obj 45 231 unpack f f f f f; #X obj 43 328 dac~; #X obj 156 166 t a; #X obj 44 301 *~ 0.1; #N canvas 0 0 444 301 oscillo 0; #X obj 41 25 loadbang; #X obj 26 223 metro 100; #X obj 8 -9 inlet~; #X msg 41 47 1; #X obj 42 81 tgl 20 0 empty empty Stop 0 -6 0 8 -258699 -1 -1 1 1; #X obj 118 -3 inlet; #X msg 147 48 1; #X msg 115 48 0; #X obj 118 21 moses 10; #X obj 19 263 tabwrite~ \$0-oscillo; #X obj 100 140 cnv 1 300 1 empty empty empty 20 12 0 14 -195568 -66577 0; #N canvas 0 0 767 419 (subpatch) 0; #X array \$0-oscillo 300 float 0; #X coords 0 1 299 -1 300 80 1; #X restore 100 100 graph; #X obj 110 75 change; #X obj 234 62 block~ 640 1 0.25; #X connect 0 0 3 0; #X connect 1 0 9 0; #X connect 2 0 9 0; #X connect 3 0 4 0; #X connect 4 0 1 0; #X connect 5 0 8 0; #X connect 6 0 12 0; #X connect 7 0 12 0; #X connect 8 0 7 0; #X connect 8 1 6 0; #X connect 8 1 1 1; #X connect 12 0 1 0; #X coords 0 -1 1 1 300 80 1 100 100; #X restore 29 372 pd oscillo; #X text 192 77 cutoff; #X text 260 95 gain; #X obj 156 116 bq_coef_lowshelf; #X text 153 8 low shelf filter coeficient for a biquad; #X obj 29 280 bq~ --------; #X connect 0 0 17 0; #X connect 1 0 17 0; #X connect 2 0 10 0; #X connect 3 0 15 0; #X connect 4 0 3 0; #X connect 5 0 15 1; #X connect 6 0 0 0; #X connect 7 0 17 1; #X connect 7 1 17 2; #X connect 7 2 17 3; #X connect 7 3 17 4; #X connect 7 4 17 5; #X connect 8 0 7 0; #X connect 8 1 7 1; #X connect 8 2 7 2; #X connect 8 3 7 3; #X connect 8 4 7 4; #X connect 10 0 8 0; #X connect 11 0 9 0; #X connect 15 0 2 0; #X connect 15 1 2 1; #X connect 15 2 2 2; #X connect 15 3 2 3; #X connect 15 4 2 4; #X connect 17 0 11 0; #X connect 17 0 12 0; nusmuk/audio/LICENSE.txt0000664000175000017500000003574512047230734015600 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 nusmuk/audio/triangle~.pd0000664000175000017500000000352512621400356016271 0ustar zmoelnigzmoelnig#N canvas 931 328 692 626 10; #X obj 407 189 soundfiler; #X obj 397 55 table \$0-sinc 4096; #X msg 406 162 read sinc.wav \$1-sinc; #X obj 398 116 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 -1; #X obj 406 140 f \$0; #X obj 398 90 loadbang; #X obj 41 150 *~ 2; #X obj 41 175 -~ 1; #X obj 41 201 abs~; #X obj 64 378 *~; #X obj 63 403 tabread~ \$0-sinc; #X obj 42 423 *~; #X obj 63 250 *~ -1; #X obj 63 229 -~ 1; #X obj 40 67 phasor~; #X obj 42 117 wrap~; #X obj 41 92 *~ 2; #X obj 152 163 -~ 0.5; #X obj 153 138 wrap~; #X obj 150 117 +~ 0.25; #X obj 398 271 table \$0-sign; #X msg 401 220 0 -1 1; #X obj 399 241 s \$0-sign; #X obj 152 208 tabread~ \$0-sign; #X obj 150 187 +~ 1; #X obj 41 451 *~; #X obj 267 124 -~ 0.5; #X obj 269 143 abs~; #X obj 271 166 *~ 4; #X obj 40 477 +~; #X obj 39 22 inlet~; #X obj 80 357 *~ 14; #X obj 80 335 *~ 48000; #X obj 138 313 moses 1; #X obj 138 273 loadbang; #X obj 138 293 samplerate~; #X obj 78 283 sig~ 1; #X obj 79 311 /~; #X obj 41 545 outlet~; #X obj 40 518 +~ -1; #X connect 2 0 0 0; #X connect 3 0 4 0; #X connect 3 0 21 0; #X connect 4 0 2 0; #X connect 5 0 3 0; #X connect 6 0 7 0; #X connect 7 0 8 0; #X connect 8 0 11 0; #X connect 8 0 13 0; #X connect 9 0 10 0; #X connect 10 0 11 1; #X connect 11 0 25 0; #X connect 12 0 9 0; #X connect 13 0 12 0; #X connect 14 0 16 0; #X connect 14 0 19 0; #X connect 14 0 26 0; #X connect 15 0 6 0; #X connect 16 0 15 0; #X connect 17 0 24 0; #X connect 18 0 17 0; #X connect 19 0 18 0; #X connect 21 0 22 0; #X connect 23 0 25 1; #X connect 24 0 23 0; #X connect 25 0 29 0; #X connect 26 0 27 0; #X connect 27 0 28 0; #X connect 28 0 29 1; #X connect 29 0 39 0; #X connect 30 0 14 0; #X connect 30 0 37 1; #X connect 31 0 9 1; #X connect 32 0 31 0; #X connect 33 1 32 1; #X connect 34 0 35 0; #X connect 35 0 33 0; #X connect 36 0 37 0; #X connect 37 0 32 0; #X connect 39 0 38 0; nusmuk/audio/bq_coef_hip.pd0000664000175000017500000000430512047230734016524 0ustar zmoelnigzmoelnig#N canvas 1 81 360 583 10; #X obj 50 32 inlet; #X obj 211 31 inlet; #X text 92 34 f; #X text 256 31 Q; #X obj 116 138 samplerate~; #X obj 116 115 loadbang; #X obj 173 116 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 -1; #X obj 50 170 /; #X obj 50 339 cos; #X obj 199 266 sin; #X obj 211 116 * 2; #X obj 50 534 outlet; #X obj 288 474 + 1; #X obj 139 471 / 2; #X msg 139 428 1 \$1; #X obj 184 450 -; #X obj 229 471 / 2; #X msg 229 428 1 \$1; #X obj 50 457 * -2; #X obj 50 239 t f f; #X obj 50 509 /; #X obj 94 510 /; #X obj 139 510 /; #X obj 184 509 /; #X obj 229 510 /; #X obj 139 534 outlet; #X obj 94 534 outlet; #X obj 184 534 outlet; #X obj 229 534 outlet; #X obj 50 216 f; #X obj 211 185 t b f; #X obj 211 95 + 0.707; #X msg 94 428 1 \$1; #X obj 94 473 -; #X obj 199 320 t f f; #X obj 139 450 +; #X obj 229 451 +; #X msg 184 428 -1 \$1; #X obj 211 74 max 0; #X obj 50 73 max 0; #X obj 50 364 t f f b; #X obj 50 115 * 3.14159; #X obj 60 193 min 3.14; #X obj 199 294 * 0.767; #X msg 211 140 1 \$1; #X obj 211 162 /; #X obj 50 144 * 2; #X obj 50 95 min 21000; #X obj 238 254 _sinh; #X connect 0 0 39 0; #X connect 1 0 38 0; #X connect 4 0 7 1; #X connect 5 0 4 0; #X connect 6 0 4 0; #X connect 7 0 29 0; #X connect 8 0 40 0; #X connect 9 0 43 0; #X connect 10 0 44 0; #X connect 12 0 20 1; #X connect 12 0 21 1; #X connect 12 0 22 1; #X connect 12 0 23 1; #X connect 12 0 24 1; #X connect 13 0 22 0; #X connect 14 0 35 0; #X connect 15 0 23 0; #X connect 16 0 24 0; #X connect 17 0 36 0; #X connect 18 0 20 0; #X connect 19 0 8 0; #X connect 19 1 9 0; #X connect 20 0 11 0; #X connect 21 0 26 0; #X connect 22 0 25 0; #X connect 23 0 27 0; #X connect 24 0 28 0; #X connect 29 0 19 0; #X connect 30 0 29 0; #X connect 30 1 48 0; #X connect 31 0 10 0; #X connect 32 0 33 0; #X connect 33 0 21 0; #X connect 34 0 32 0; #X connect 34 1 12 0; #X connect 35 0 13 0; #X connect 36 0 16 0; #X connect 37 0 15 0; #X connect 38 0 31 0; #X connect 39 0 47 0; #X connect 40 0 18 0; #X connect 40 1 14 0; #X connect 40 1 37 0; #X connect 40 1 17 0; #X connect 40 2 33 0; #X connect 41 0 46 0; #X connect 42 0 29 0; #X connect 43 0 34 0; #X connect 44 0 45 0; #X connect 45 0 30 0; #X connect 46 0 7 0; #X connect 47 0 41 0; #X connect 48 0 43 1; nusmuk/audio/saw2_table_generation.pd0000664000175000017500000000324612621345474020535 0ustar zmoelnigzmoelnig#N canvas 1166 417 461 575 10; #X obj 83 263 tabwrite sinc; #X obj 83 111 _until; #X obj 83 130 t f f; #X obj 56 282 tab_integrate sinc Isinc; #X obj 56 265 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 -1; #X obj 56 339 tab_mul_scalar Isinc; #X obj 56 73 t b b; #X obj 29 30 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 -1; #X obj 29 387 _until; #X obj 29 406 t f f; #X obj 29 514 tabwrite Isinc2; #X obj 76 472 tabread Isinc; #X obj 29 49 t b b; #X msg 83 92 8192; #X obj 83 149 - 4096; #X obj 76 451 f; #X obj 56 320 /; #X msg 29 368 4096; #X obj 83 168 / 4096; #X obj 83 187 * 76.969; #X msg 56 301 1 83.0894; #X obj 116 451 -; #X msg 116 429 4095 \$1; #X obj 29 430 t f f; #X obj 29 472 / 96; #X obj 29 451 min 96; #X obj 29 493 *; #X obj 83 244 /; #X obj 83 225 sin; #X obj 83 206 t f f; #X obj 275 39 table sinc 8192; #X obj 275 58 table Isinc 8192; #X obj 275 77 table Isinc2 4096; #X obj 281 228 soundfiler; #X msg 281 205 write isinc.wav Isinc2; #X connect 1 0 2 0; #X connect 2 0 14 0; #X connect 2 1 0 1; #X connect 3 0 20 0; #X connect 4 0 3 0; #X connect 6 0 4 0; #X connect 6 1 13 0; #X connect 7 0 12 0; #X connect 8 0 9 0; #X connect 9 0 23 0; #X connect 9 1 22 0; #X connect 11 0 26 1; #X connect 12 0 17 0; #X connect 12 1 6 0; #X connect 13 0 1 0; #X connect 14 0 18 0; #X connect 15 0 11 0; #X connect 16 0 5 0; #X connect 17 0 8 0; #X connect 18 0 19 0; #X connect 19 0 29 0; #X connect 20 0 16 0; #X connect 21 0 10 1; #X connect 22 0 21 0; #X connect 23 0 25 0; #X connect 23 1 15 0; #X connect 24 0 26 0; #X connect 25 0 24 0; #X connect 26 0 10 0; #X connect 27 0 0 0; #X connect 28 0 27 0; #X connect 29 0 28 0; #X connect 29 1 27 1; #X connect 34 0 33 0; nusmuk/audio/distortion~.pd0000664000175000017500000001264212047230734016665 0ustar zmoelnigzmoelnig#N canvas 182 95 622 419 10; #X obj 30 129 +~ 5000; #X obj 29 27 inlet~; #X obj 31 153 tabread4~ \$0-disto; #X obj 160 29 inlet~; #X obj 29 102 *~; #X obj 160 49 *~ 5000; #X obj 160 129 +~ 5000; #X obj 160 153 tabread4~ \$0-disto; #X obj 30 229 outlet~; #X obj 294 337 table \$0-disto 10000; #X obj 31 197 /~; #X obj 160 71 +~ 100; #N canvas 25 446 450 300 sqrt 0; #X obj 20 63 t b b; #X obj 20 159 f; #X obj 63 159 + 1; #X msg 47 136 0; #X obj 20 104 until; #X obj 20 44 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X obj 20 219 - 0.5; #X obj 20 259 t f f f; #X obj 39 280 *; #X obj 39 300 + 1; #X obj 39 320 sqrt; #X obj 20 340 /; #X obj 20 239 * 20; #X obj 20 199 / 9999; #X msg 20 83 10000; #X obj 20 179 t f f; #X obj 20 360 tabwrite \$0-disto; #X obj 20 18 inlet; #X connect 0 0 14 0; #X connect 0 1 3 0; #X connect 1 0 2 0; #X connect 1 0 15 0; #X connect 2 0 1 1; #X connect 3 0 1 1; #X connect 4 0 1 0; #X connect 5 0 0 0; #X connect 6 0 12 0; #X connect 7 0 11 0; #X connect 7 1 8 0; #X connect 7 2 8 1; #X connect 8 0 9 0; #X connect 9 0 10 0; #X connect 10 0 11 1; #X connect 11 0 16 0; #X connect 12 0 7 0; #X connect 13 0 6 0; #X connect 14 0 4 0; #X connect 15 0 13 0; #X connect 15 1 16 1; #X connect 17 0 5 0; #X restore 313 169 pd sqrt; #X obj 313 151 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 -1; #N canvas 1 83 640 460 sigmoid 0; #X obj 23 59 t b b; #X obj 23 148 f; #X obj 61 148 + 1; #X msg 50 125 0; #X obj 23 102 until; #X obj 23 40 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X obj 23 213 - 0.5; #X obj 23 276 - 0.5; #X obj 23 298 * 2; #X obj 23 319 tabwrite \$0-disto; #X msg 23 81 10000; #X obj 23 192 / 9999; #X obj 23 234 * 30; #X obj 23 171 t f f; #X obj 23 255 expr ( exp($f1)) / ( 1 + exp($f1)); #X obj 23 15 inlet; #X connect 0 0 10 0; #X connect 0 1 3 0; #X connect 1 0 2 0; #X connect 1 0 13 0; #X connect 2 0 1 1; #X connect 3 0 1 1; #X connect 4 0 1 0; #X connect 5 0 0 0; #X connect 6 0 12 0; #X connect 7 0 8 0; #X connect 8 0 9 0; #X connect 10 0 4 0; #X connect 11 0 6 0; #X connect 12 0 14 0; #X connect 13 0 11 0; #X connect 13 1 9 1; #X connect 14 0 7 0; #X connect 15 0 5 0; #X restore 298 131 pd sigmoid; #X obj 298 112 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 -1; #N canvas 0 0 739 509 x_over_xplus 0; #X obj 17 58 t b b; #X obj 17 141 f; #X obj 55 141 + 1; #X msg 44 118 0; #X obj 17 96 until; #X obj 17 39 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X obj 17 315 /; #X obj 44 269 abs; #X obj 44 248 * 2; #X obj 17 208 - 0.5; #X obj 44 290 + 0.1; #X msg 17 77 10000; #X obj 17 189 / 9999; #X obj 17 359 tabwrite \$0-disto; #X obj 17 337 * 2; #X obj 17 228 t f f; #X obj 17 167 t f f; #X obj 17 16 inlet; #X connect 0 0 11 0; #X connect 0 1 3 0; #X connect 1 0 2 0; #X connect 1 0 16 0; #X connect 2 0 1 1; #X connect 3 0 1 1; #X connect 4 0 1 0; #X connect 5 0 0 0; #X connect 6 0 14 0; #X connect 7 0 10 0; #X connect 8 0 7 0; #X connect 9 0 15 0; #X connect 10 0 6 1; #X connect 11 0 4 0; #X connect 12 0 9 0; #X connect 14 0 13 0; #X connect 15 0 6 0; #X connect 15 1 8 0; #X connect 16 0 12 0; #X connect 16 1 13 1; #X connect 17 0 5 0; #X restore 328 214 pd x_over_xplus; #X obj 328 194 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 -1; #N canvas 0 0 588 371 poly 0; #X obj 16 14 inlet; #X obj 16 55 t b b; #X obj 16 140 f; #X obj 54 140 + 1; #X msg 43 117 0; #X obj 16 98 until; #X obj 16 36 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X obj 16 209 - 0.5; #X obj 16 253 expr exp(-$f1*$f1)*($f1+pow($f1 \, 3)*2/3 + pow($f1 \, 5)*4/15); #X obj 16 275 tabwrite \$0-disto; #X obj 16 188 / 9999; #X msg 16 76 10000; #X obj 16 165 t f f; #X obj 16 231 * 2; #X connect 0 0 6 0; #X connect 1 0 11 0; #X connect 1 1 4 0; #X connect 2 0 3 0; #X connect 2 0 12 0; #X connect 3 0 2 1; #X connect 4 0 2 1; #X connect 5 0 2 0; #X connect 6 0 1 0; #X connect 7 0 13 0; #X connect 8 0 9 0; #X connect 10 0 7 0; #X connect 11 0 5 0; #X connect 12 0 10 0; #X connect 12 1 9 1; #X connect 13 0 8 0; #X restore 345 258 pd poly; #X obj 345 238 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 -1; #X obj 298 32 inlet; #X obj 337 32 loadbang; #X obj 298 84 sel 0 1 2 3 4; #X obj 359 283 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 -1; #N canvas 615 471 640 460 cos 0; #X obj 23 59 t b b; #X obj 23 148 f; #X obj 61 148 + 1; #X msg 50 125 0; #X obj 23 102 until; #X obj 23 40 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X obj 23 319 tabwrite \$0-disto; #X msg 23 81 10000; #X obj 23 192 / 9999; #X obj 23 171 t f f; #X obj 23 15 inlet; #X obj 23 255 cos; #X obj 23 234 * 3.14; #X obj 23 280 * -1; #X connect 0 0 7 0; #X connect 0 1 3 0; #X connect 1 0 2 0; #X connect 1 0 9 0; #X connect 2 0 1 1; #X connect 3 0 1 1; #X connect 4 0 1 0; #X connect 5 0 0 0; #X connect 7 0 4 0; #X connect 8 0 12 0; #X connect 9 0 8 0; #X connect 9 1 6 1; #X connect 10 0 5 0; #X connect 11 0 13 0; #X connect 12 0 11 0; #X connect 13 0 6 0; #X restore 359 301 pd cos; #X obj 298 60 f; #X connect 0 0 2 0; #X connect 1 0 4 0; #X connect 2 0 10 0; #X connect 3 0 5 0; #X connect 4 0 0 0; #X connect 5 0 11 0; #X connect 6 0 7 0; #X connect 7 0 10 1; #X connect 10 0 8 0; #X connect 11 0 4 1; #X connect 11 0 6 0; #X connect 13 0 12 0; #X connect 15 0 14 0; #X connect 17 0 16 0; #X connect 19 0 18 0; #X connect 20 0 25 0; #X connect 21 0 25 0; #X connect 22 0 15 0; #X connect 22 1 13 0; #X connect 22 2 17 0; #X connect 22 3 19 0; #X connect 22 4 23 0; #X connect 23 0 24 0; #X connect 25 0 22 0; nusmuk/audio/saw2~.pd0000664000175000017500000000254312621346352015344 0ustar zmoelnigzmoelnig#N canvas 47 675 618 354 10; #X obj 37 107 phasor~; #X obj 37 129 -~ 0.5; #X obj 51 255 *~; #X obj 37 169 wrap~; #X obj 52 199 -~ 0.5; #X obj 36 278 -~; #X obj 99 169 abs~; #X obj 145 146 /~; #X obj 146 119 sig~ 1; #X obj 153 22 inlet; #X obj 37 300 outlet~; #X obj 37 21 inlet~; #X obj 100 197 *~; #X obj 430 140 soundfiler; #X msg 430 121 read isinc.wav \$1-Isinc; #X obj 429 171 table \$0-Isinc 4096; #X obj 100 222 tabread~ \$0-Isinc; #X obj 430 101 f \$0; #X obj 430 83 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 -1; #X obj 430 62 loadbang; #X obj 161 96 /~ 48000; #X text 188 167 <- adjust the cutoff frequency here; #X obj 146 168 *~ 80; #X obj 206 57 samplerate~; #X obj 206 77 moses 1; #X obj 206 36 loadbang; #X text 84 259 <- table envelope (we don't unse sinc integration table from -inf to inf \, only on 1 periode of the saw); #X connect 0 0 1 0; #X connect 1 0 3 0; #X connect 1 0 6 0; #X connect 2 0 5 1; #X connect 3 0 4 0; #X connect 3 0 5 0; #X connect 4 0 2 0; #X connect 5 0 10 0; #X connect 6 0 12 0; #X connect 7 0 22 0; #X connect 8 0 7 0; #X connect 9 0 0 1; #X connect 11 0 0 0; #X connect 11 0 20 0; #X connect 12 0 16 0; #X connect 14 0 13 0; #X connect 16 0 2 1; #X connect 17 0 14 0; #X connect 18 0 17 0; #X connect 19 0 18 0; #X connect 20 0 7 1; #X connect 22 0 12 1; #X connect 23 0 24 0; #X connect 24 0 20 1; #X connect 25 0 23 0; nusmuk/audio/triangle_table_generation.pd0000664000175000017500000000136612621374116021462 0ustar zmoelnigzmoelnig#N canvas 1162 696 486 306 10; #X obj 78 212 tabwrite sinc; #X obj 78 77 _until; #X obj 78 96 t f f; #X obj 78 117 / 4096; #X obj 78 136 * 76.969; #X obj 78 193 /; #X obj 78 174 sin; #X obj 78 155 t f f; #X obj 210 168 soundfiler; #X msg 78 58 4096; #X obj 188 39 table sinc 4096; #X msg 51 240 0 1; #X obj 51 261 s sinc; #X obj 51 18 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 -1; #X obj 51 37 t b b; #X msg 210 145 write sinc.wav sinc; #X connect 1 0 2 0; #X connect 2 0 3 0; #X connect 2 1 0 1; #X connect 3 0 4 0; #X connect 4 0 7 0; #X connect 5 0 0 0; #X connect 6 0 5 0; #X connect 7 0 6 0; #X connect 7 1 5 1; #X connect 9 0 1 0; #X connect 11 0 12 0; #X connect 13 0 14 0; #X connect 14 0 11 0; #X connect 14 1 9 0; #X connect 15 0 8 0; nusmuk/audio/echo~-help.pd0000664000175000017500000000070212047230734016325 0ustar zmoelnigzmoelnig#N canvas 231 293 450 300 10; #X obj 43 53 osc~ 333; #X obj 118 55 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 1; #X obj 42 87 *~; #X obj 42 150 *~ 0.1; #X obj 41 182 dac~; #X obj 58 117 echo~ 555 0.8; #X text 113 141 parametter 1: echo time (ms); #X text 113 160 parameter 2 : amplitude attenuation; #X connect 0 0 2 0; #X connect 1 0 2 1; #X connect 2 0 3 0; #X connect 2 0 5 0; #X connect 3 0 4 0; #X connect 3 0 4 1; #X connect 5 0 3 0; nusmuk/audio/distortion~-help.pd0000664000175000017500000000121412047230734017604 0ustar zmoelnigzmoelnig#N canvas 633 111 450 300 10; #X obj 38 206 oscillo~; #X obj 39 24 osc~ 222; #X obj 60 172 dac~; #X obj 60 148 *~ 0.1; #X floatatom 151 28 5 0 1 0 - - -; #X obj 151 64 line~; #X msg 151 44 \$1 100; #X obj 38 79 +~; #X floatatom 53 61 5 0 0 0 - - -; #X obj 151 96 hradio 15 1 0 5 empty empty empty 0 -8 0 10 -262144 -1 -1 0; #X text 224 97 disto mode; #X text 199 28 distortion %; #X text 91 61 asym; #X obj 38 121 distortion~; #X connect 1 0 7 0; #X connect 3 0 2 1; #X connect 3 0 2 0; #X connect 4 0 6 0; #X connect 5 0 13 1; #X connect 6 0 5 0; #X connect 7 0 13 0; #X connect 8 0 7 1; #X connect 9 0 13 2; #X connect 13 0 3 0; #X connect 13 0 0 0; nusmuk/audio/echo~.pd0000664000175000017500000000052112047230734015376 0ustar zmoelnigzmoelnig#N canvas 712 336 450 300 10; #X obj 82 46 inlet~; #X obj 80 183 delwrite~ \$0-delay 10000; #X obj 47 115 delread~ \$0-delay \$1; #X obj 46 215 outlet~; #X obj 62 151 *~ \$2; #X obj 248 44 inlet; #X obj 154 48 inlet; #X connect 0 0 1 0; #X connect 2 0 3 0; #X connect 2 0 4 0; #X connect 4 0 1 0; #X connect 5 0 4 1; #X connect 6 0 2 0; nusmuk/audio/tabread4c~.c0000664000175000017500000001262112047230734016134 0ustar zmoelnigzmoelnig// tabread4c~ // can replace tabread4c~ // most of this code comes from pd. just the interpolation shematic is diferent. /* This 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. */ // Cyrille Henry 06 2008 #include "m_pd.h" /******************** tabread4c~ ***********************/ static t_class *tabread4c_tilde_class; typedef struct _tabread4c_tilde { t_object x_obj; int x_npoints; t_word *x_vec; t_symbol *x_arrayname; t_float x_f; } t_tabread4c_tilde; static void *tabread4c_tilde_new(t_symbol *s) { t_tabread4c_tilde *x = (t_tabread4c_tilde *)pd_new(tabread4c_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 *tabread4c_tilde_perform(t_int *w) { t_tabread4c_tilde *x = (t_tabread4c_tilde *)(w[1]); t_sample *in = (t_sample *)(w[2]); t_sample *out = (t_sample *)(w[3]); int n = (int)(w[4]); int maxindex; t_word *buf = x->x_vec, *wp; int i; double a3,a1,a2; // CH maxindex = x->x_npoints - 3; if (!buf) goto zero; #if 0 /* test for spam -- I'm not ready to deal with this */ for (i = 0, xmax = 0, xmin = maxindex, fp = in1; i < n; i++, fp++) { t_sample f = *in1; if (f < xmin) xmin = f; else if (f > xmax) xmax = f; } if (xmax < xmin + x->c_maxextent) xmax = xmin + x->c_maxextent; for (i = 0, splitlo = xmin+ x->c_maxextent, splithi = xmax - x->c_maxextent, fp = in1; i < n; i++, fp++) { t_sample f = *in1; if (f > splitlo && f < splithi) goto zero; } #endif for (i = 0; i < n; i++) { t_sample findex = *in++; int index = findex; t_sample frac, a, b, c, d, cminusb; static int count; if (index < 1) index = 1, frac = 0; else if (index > maxindex) index = maxindex, frac = 1; else frac = findex - index; wp = buf + index; a = wp[-1].w_float; b = wp[0].w_float; c = wp[1].w_float; d = wp[2].w_float; /* if (!i && !(count++ & 1023)) post("fp = %lx, shit = %lx, b = %f", fp, buf->b_shit, b); */ // cminusb = c-b; // *out++ = b + frac * ( // cminusb - 0.1666667f * (1.-frac) * ( // (d - a - 3.0f * cminusb) * frac + (d + 2.0f*a - 3.0f*b) // CH // 4-point, 3rd-order Hermite (x-form) a1 = 0.5f * (c - a); a2 = a - 2.5 * b + 2.f * c - 0.5f * d; a3 = 0.5f * (d - a) + 1.5f * (b - c); *out++ = ((a3 * frac + a2) * frac + a1) * frac + b; } return (w+5); zero: while (n--) *out++ = 0; return (w+5); } void tabread4c_tilde_set(t_tabread4c_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, "tabread4c~: %s: no such array", x->x_arrayname->s_name); x->x_vec = 0; } else if (!garray_getfloatwords(a, &x->x_npoints, &x->x_vec)) { pd_error(x, "%s: bad template for tabread4c~", x->x_arrayname->s_name); x->x_vec = 0; } else garray_usedindsp(a); } static void tabread4c_tilde_dsp(t_tabread4c_tilde *x, t_signal **sp) { tabread4c_tilde_set(x, x->x_arrayname); dsp_add(tabread4c_tilde_perform, 4, x, sp[0]->s_vec, sp[1]->s_vec, sp[0]->s_n); } static void tabread4c_tilde_free(t_tabread4c_tilde *x) { } void tabread4c_tilde_setup(void) { tabread4c_tilde_class = class_new(gensym("tabread4c~"), (t_newmethod)tabread4c_tilde_new, (t_method)tabread4c_tilde_free, sizeof(t_tabread4c_tilde), 0, A_DEFSYM, 0); CLASS_MAINSIGNALIN(tabread4c_tilde_class, t_tabread4c_tilde, x_f); class_addmethod(tabread4c_tilde_class, (t_method)tabread4c_tilde_dsp, gensym("dsp"), 0); class_addmethod(tabread4c_tilde_class, (t_method)tabread4c_tilde_set, gensym("set"), A_SYMBOL, 0); } nusmuk/audio/distortion2~-help.pd0000664000175000017500000000064612621343304017672 0ustar zmoelnigzmoelnig#N canvas 327 481 450 300 10; #X obj 38 206 oscillo~; #X obj 39 24 osc~ 222; #X obj 60 172 dac~; #X obj 60 148 *~ 0.1; #X floatatom 151 28 5 0 100 0 - - -, f 5; #X obj 151 64 line~; #X msg 151 44 \$1 100; #X text 199 28 distortion %; #X obj 38 121 distortion2~; #X connect 1 0 8 0; #X connect 3 0 2 1; #X connect 3 0 2 0; #X connect 4 0 6 0; #X connect 5 0 8 1; #X connect 6 0 5 0; #X connect 8 0 3 0; #X connect 8 0 0 0; nusmuk/audio/bq_coef_notch.pd0000664000175000017500000000347312047230734017064 0ustar zmoelnigzmoelnig#N canvas 1 81 387 638 10; #X obj 50 32 inlet; #X obj 205 31 inlet; #X text 92 34 f; #X text 250 31 Q; #X obj 119 148 samplerate~; #X obj 119 125 loadbang; #X obj 176 126 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 -1; #X obj 50 180 /; #X obj 50 349 cos; #X obj 199 276 sin; #X obj 205 126 * 2; #X obj 50 574 outlet; #X obj 288 484 + 1; #X obj 50 467 * -2; #X obj 50 249 t f f; #X obj 50 519 /; #X obj 94 520 /; #X obj 139 520 /; #X obj 229 520 /; #X obj 139 574 outlet; #X obj 94 574 outlet; #X obj 184 574 outlet; #X obj 229 574 outlet; #X obj 50 226 f; #X obj 205 195 t b f; #X msg 94 438 1 \$1; #X obj 94 483 -; #X obj 199 330 t f b f; #X obj 205 74 max 0; #X obj 50 73 max 0; #X obj 50 122 * 3.14159; #X msg 205 148 1 \$1; #X obj 205 170 /; #X obj 199 303 *; #X obj 50 148 * 2; #X msg 139 487 1; #X msg 231 481 1; #X obj 50 548 t f f; #X obj 205 104 + 0.1; #X obj 50 99 min 21000; #X obj 232 242 _sinh; #X connect 0 0 29 0; #X connect 1 0 28 0; #X connect 4 0 7 1; #X connect 5 0 4 0; #X connect 6 0 4 0; #X connect 7 0 23 0; #X connect 8 0 13 0; #X connect 9 0 33 0; #X connect 10 0 31 0; #X connect 12 0 15 1; #X connect 12 0 16 1; #X connect 12 0 17 1; #X connect 12 0 18 1; #X connect 13 0 15 0; #X connect 14 0 8 0; #X connect 14 1 9 0; #X connect 15 0 37 0; #X connect 16 0 20 0; #X connect 17 0 19 0; #X connect 18 0 22 0; #X connect 23 0 14 0; #X connect 24 0 23 0; #X connect 24 1 40 0; #X connect 25 0 26 0; #X connect 26 0 16 0; #X connect 27 0 25 0; #X connect 27 1 35 0; #X connect 27 1 36 0; #X connect 27 2 12 0; #X connect 28 0 38 0; #X connect 29 0 39 0; #X connect 30 0 34 0; #X connect 31 0 32 0; #X connect 32 0 24 0; #X connect 33 0 27 0; #X connect 34 0 7 0; #X connect 35 0 17 0; #X connect 36 0 18 0; #X connect 37 0 11 0; #X connect 37 1 21 0; #X connect 38 0 10 0; #X connect 39 0 30 0; #X connect 40 0 33 1; nusmuk/audio/saw~.pd0000664000175000017500000000360012047230734015253 0ustar zmoelnigzmoelnig#N canvas 232 120 725 608 10; #X obj 105 96 phasor~; #X obj 173 131 -~ 0.5; #X obj 421 192 *~ 2; #X obj 328 217 wrap~; #X obj 329 243 *~ 2; #X obj 329 268 -~ 1; #X obj 459 191 /~; #X obj 458 146 sig~ 22050; #X obj 421 219 *~; #X obj 422 241 abs~; #X obj 421 263 +~ 1.8955; #X obj 106 49 inlet~; #X obj 87 542 outlet~; #X obj 458 97 samplerate~; #X obj 458 74 loadbang; #X obj 174 427 +~; #N canvas 104 42 701 480 sin(x)/x 0; #X obj 220 229 cos~; #X obj 221 204 -~ 0.25; #X msg 288 90 1; #X floatatom 288 162 5 0 0 0 - - -; #X obj 288 116 atan; #X obj 288 137 * 8; #X obj 220 181 /~ 6.238; #X obj 288 67 loadbang; #X obj 221 148 inlet~; #X obj 219 291 outlet~; #X obj 220 255 /~; #X connect 0 0 10 0; #X connect 1 0 0 0; #X connect 2 0 4 0; #X connect 3 0 6 1; #X connect 4 0 5 0; #X connect 5 0 3 0; #X connect 6 0 1 0; #X connect 7 0 2 0; #X connect 8 0 6 0; #X connect 8 0 10 1; #X connect 10 0 9 0; #X restore 421 293 pd sin(x)/x; #X obj 330 392 *~; #X text 357 387 v2*sin(v4)/v4; #X text 208 426 + v3; #X obj 87 482 -~; #X obj 557 476 loadbang; #X obj 557 539 table \$0-lookup 2; #X obj 175 333 tabread~ \$0-lookup; #X obj 174 311 +~ 1; #X obj 557 518 s \$0-lookup; #X msg 557 497 0 0 1; #X obj 209 48 inlet; #X obj 552 73 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 -1; #X obj 458 122 * 0.5; #X connect 0 0 1 0; #X connect 0 0 20 1; #X connect 1 0 2 0; #X connect 1 0 3 0; #X connect 1 0 24 0; #X connect 2 0 8 0; #X connect 3 0 4 0; #X connect 4 0 5 0; #X connect 5 0 17 0; #X connect 6 0 8 1; #X connect 7 0 6 0; #X connect 8 0 9 0; #X connect 9 0 10 0; #X connect 10 0 16 0; #X connect 11 0 0 0; #X connect 11 0 6 1; #X connect 13 0 29 0; #X connect 14 0 13 0; #X connect 15 0 20 0; #X connect 16 0 17 1; #X connect 17 0 15 1; #X connect 20 0 12 0; #X connect 21 0 26 0; #X connect 23 0 15 0; #X connect 24 0 23 0; #X connect 26 0 25 0; #X connect 27 0 0 1; #X connect 28 0 13 0; #X connect 29 0 7 0; nusmuk/audio/bq_coef_notch-help.pd0000664000175000017500000000520612047230734020006 0ustar zmoelnigzmoelnig#N canvas 143 113 484 505 10; #X obj 29 160 hip~ 2; #X msg 48 185 clear; #X obj 156 140 pack f f f f f; #X obj 156 94 mtof; #X floatatom 156 77 5 0 0 0 - - -; #X floatatom 231 98 5 0 0 0 - - -; #X obj 29 132 noise~; #N canvas 0 0 450 300 5_line~ 0; #X obj 80 123 line~; #X obj 79 147 outlet~; #X obj 80 73 inlet; #X obj 136 123 line~; #X obj 135 147 outlet~; #X obj 136 73 inlet; #X obj 193 123 line~; #X obj 192 147 outlet~; #X obj 193 73 inlet; #X obj 247 123 line~; #X obj 246 147 outlet~; #X obj 247 73 inlet; #X obj 304 123 line~; #X obj 303 147 outlet~; #X obj 304 73 inlet; #X msg 80 96 \$1 133; #X msg 136 96 \$1 133; #X msg 193 96 \$1 133; #X msg 247 96 \$1 133; #X msg 304 96 \$1 133; #X connect 0 0 1 0; #X connect 2 0 15 0; #X connect 3 0 4 0; #X connect 5 0 16 0; #X connect 6 0 7 0; #X connect 8 0 17 0; #X connect 9 0 10 0; #X connect 11 0 18 0; #X connect 12 0 13 0; #X connect 14 0 19 0; #X connect 15 0 0 0; #X connect 16 0 3 0; #X connect 17 0 6 0; #X connect 18 0 9 0; #X connect 19 0 12 0; #X restore 45 258 pd 5_line~; #X obj 45 231 unpack f f f f f; #X obj 43 328 dac~; #X obj 156 166 t a; #X obj 44 301 *~ 0.1; #N canvas 0 0 444 301 oscillo 0; #X obj 41 25 loadbang; #X obj 26 223 metro 100; #X obj 8 -9 inlet~; #X msg 41 47 1; #X obj 42 81 tgl 20 0 empty empty Stop 0 -6 0 8 -258699 -1 -1 1 1; #X obj 118 -3 inlet; #X msg 147 48 1; #X msg 115 48 0; #X obj 118 21 moses 10; #X obj 19 263 tabwrite~ \$0-oscillo; #X obj 100 140 cnv 1 300 1 empty empty empty 20 12 0 14 -195568 -66577 0; #N canvas 0 0 767 419 (subpatch) 0; #X array \$0-oscillo 300 float 0; #X coords 0 1 299 -1 300 80 1; #X restore 100 100 graph; #X obj 110 75 change; #X obj 234 62 block~ 640 1 0.25; #X connect 0 0 3 0; #X connect 1 0 9 0; #X connect 2 0 9 0; #X connect 3 0 4 0; #X connect 4 0 1 0; #X connect 5 0 8 0; #X connect 6 0 12 0; #X connect 7 0 12 0; #X connect 8 0 7 0; #X connect 8 1 6 0; #X connect 8 1 1 1; #X connect 12 0 1 0; #X coords 0 -1 1 1 300 80 1 100 100; #X restore 29 372 pd oscillo; #X text 192 77 cutoff; #X text 155 12 notch filter coeficient for a biquad; #X obj 156 116 bq_coef_notch; #X text 269 96 Q; #X obj 28 280 bq~ --------; #X connect 0 0 17 0; #X connect 1 0 17 0; #X connect 2 0 10 0; #X connect 3 0 15 0; #X connect 4 0 3 0; #X connect 5 0 15 1; #X connect 6 0 0 0; #X connect 7 0 17 1; #X connect 7 1 17 2; #X connect 7 2 17 3; #X connect 7 3 17 4; #X connect 7 4 17 5; #X connect 8 0 7 0; #X connect 8 1 7 1; #X connect 8 2 7 2; #X connect 8 3 7 3; #X connect 8 4 7 4; #X connect 10 0 8 0; #X connect 11 0 9 0; #X connect 15 0 2 0; #X connect 15 1 2 1; #X connect 15 2 2 2; #X connect 15 3 2 3; #X connect 15 4 2 4; #X connect 17 0 11 0; #X connect 17 0 12 0; nusmuk/audio/tabosci~.c0000664000175000017500000002225612212565666015745 0ustar zmoelnigzmoelnig// tabosci~ // tabosc interpolation // can replace tabosc4~ // most of this code comes from pd. but with somes modifications /* This 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. */ // Cyrille Henry 02 2009 #include "m_pd.h" #include #define max(a,b) ( ((a) > (b)) ? (a) : (b) ) #define min(a,b) ( ((a) < (b)) ? (a) : (b) ) /******************** tabosci~ ***********************/ /* this is all copied from d_osc.c... what include file could this go in? */ #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 _WIN32 /* little-endian; most significant byte is at highest address */ #define HIOFFSET 1 #define LOWOFFSET 0 #define int32 long #endif #if defined(__FreeBSD__) || defined(__APPLE__) #include #endif #ifdef __linux__ #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 { double tf_d; int32 tf_i[2]; }; static t_class *tabosci_tilde_class; typedef struct _tabosci_tilde { t_object x_obj; t_float x_fnpoints; t_float x_finvnpoints; t_word *x_vec; t_symbol *x_arrayname; t_float x_f; double x_phase; t_float x_conv; t_sample x_prev_in, x_last_in, x_prev_out, x_last_out; t_float x_fa1, x_fa2, x_fb1, x_fb2, x_fb3; t_float cutoff; t_int upsample; t_float x_sr; } t_tabosci_tilde; void tabosci_tilde_cutoff(t_tabosci_tilde *x, t_float cut) { x->cutoff = cut; if (x->cutoff == 0) { x->x_fb1 = 1; x->x_fb2 = 0; x->x_fb3 = 0; x->x_fa1 = 0; x->x_fa2 = 0; x->x_prev_in = 0; x->x_last_in = 0; x->x_prev_out = 0; // reset filter memory } else { // filter coef to cut all high freq. t_float tmp1, tmp2; tmp1 = sqrt(2)/2; tmp1 = sinh(tmp1); tmp2 = x->cutoff * 2 * 3.1415926 / (x->upsample * x->x_sr); tmp2 = min(6.28,tmp2); tmp1 *= sin(tmp2); tmp2 = cos(tmp2); x->x_fb1 = (1-tmp2 ) /2; x->x_fb2 = (1-tmp2 ); x->x_fb3 = (1-tmp2 ) /2; x->x_fa1 = -2 * tmp2; x->x_fa2 = 1 - tmp1; tmp1 +=1; x->x_fb1 /= tmp1; x->x_fb2 /= tmp1; x->x_fb3 /= tmp1; x->x_fa1 /= tmp1; x->x_fa2 /= tmp1; } } static void *tabosci_tilde_new(t_symbol *s) { t_tabosci_tilde *x = (t_tabosci_tilde *)pd_new(tabosci_tilde_class); x->x_arrayname = s; x->x_vec = 0; x->x_fnpoints = 512.; x->x_finvnpoints = (1./512.); outlet_new(&x->x_obj, gensym("signal")); inlet_new(&x->x_obj, &x->x_obj.ob_pd, &s_float, gensym("ft1")); x->x_f = 0; x->cutoff = 0; x->upsample = 1; x->x_sr = 0; tabosci_tilde_cutoff(x,0); // comput filter coef return (x); } static t_int *tabosci_tilde_perform(t_int *w) { t_tabosci_tilde *x = (t_tabosci_tilde *)(w[1]); t_sample *in = (t_sample *)(w[2]); t_sample *out = (t_sample *)(w[3]); int n = (int)(w[4]); int normhipart; union tabfudge tf; double a1,a2,a3; // CH : for the interpolation t_float fnpoints = x->x_fnpoints; int mask = fnpoints - 1; t_float conv = fnpoints * x->x_conv; int maxindex; t_word *tab = x->x_vec, *addr; int i; double dphase = fnpoints * x->x_phase + UNITBIT32; if (!tab) goto zero; tf.tf_d = UNITBIT32; normhipart = tf.tf_i[HIOFFSET]; while (n--) { t_sample frac, a, b, c, d, cminusb, temp, filter_out; for (i=0;iupsample;i++) { tf.tf_d = dphase; dphase += *in/x->upsample * conv; addr = tab + (tf.tf_i[HIOFFSET] & mask); a = addr[0].w_float; addr = tab + ((1+tf.tf_i[HIOFFSET]) & mask); b = addr[0].w_float; addr = tab + ((2+tf.tf_i[HIOFFSET]) & mask); c = addr[0].w_float; addr = tab + ((3+tf.tf_i[HIOFFSET]) & mask); d = addr[0].w_float; tf.tf_i[HIOFFSET] = normhipart; frac = tf.tf_d - UNITBIT32; // 4-point, 3rd-order Hermite (x-form) a1 = 0.5f * (c - a); a2 = a - 2.5 * b + 2.f * c - 0.5f * d; a3 = 0.5f * (d - a) + 1.5f * (b - c); temp = ((a3 * frac + a2) * frac + a1) * frac + b; filter_out = x->x_fb1* temp + x->x_fb2 * x->x_last_in + x->x_fb3 * x->x_prev_in - x->x_fa1 * x->x_last_out - x->x_fa2 * x->x_prev_out; // low pass x->x_prev_in = x->x_last_in; x->x_last_in = temp; x->x_prev_out = x->x_last_out; x->x_last_out = filter_out; } *out++ = x->x_last_out; *in++; } tf.tf_d = UNITBIT32 * fnpoints; normhipart = tf.tf_i[HIOFFSET]; tf.tf_d = dphase + (UNITBIT32 * fnpoints - UNITBIT32); tf.tf_i[HIOFFSET] = normhipart; x->x_phase = (tf.tf_d - UNITBIT32 * fnpoints) * x->x_finvnpoints; return (w+5); zero: while (n--) *out++ = 0; return (w+5); } void tabosci_tilde_set(t_tabosci_tilde *x, t_symbol *s) { t_garray *a; int npoints, pointsinarray; x->x_arrayname = s; if (!(a = (t_garray *)pd_findbyclass(x->x_arrayname, garray_class))) { if (*s->s_name) pd_error(x, "tabosci~: %s: no such array", x->x_arrayname->s_name); x->x_vec = 0; } else if (!garray_getfloatwords(a, &pointsinarray, &x->x_vec)) { pd_error(x, "%s: bad template for tabosci~", x->x_arrayname->s_name); x->x_vec = 0; } else { npoints = 1 << ilog2(pointsinarray); // if ( npoints != pointsinarray) post("warning, tabosci~ is using only the first %d points of array %s",npoints, x->x_arrayname->s_name); x->x_fnpoints = npoints; x->x_finvnpoints = 1./npoints; garray_usedindsp(a); } } void tabosci_tilde_upsample(t_tabosci_tilde *x, t_float up) { x->upsample = max(1,up); tabosci_tilde_cutoff(x,x->cutoff); } static void tabosci_tilde_ft1(t_tabosci_tilde *x, t_float f) { x->x_phase = f; } static void tabosci_tilde_dsp(t_tabosci_tilde *x, t_signal **sp) { if (x->x_sr != sp[0]->s_sr) { x->x_sr = sp[0]->s_sr; tabosci_tilde_cutoff(x,x->cutoff); x->x_conv = 1. / sp[0]->s_sr; } tabosci_tilde_set(x, x->x_arrayname); dsp_add(tabosci_tilde_perform, 4, x, sp[0]->s_vec, sp[1]->s_vec, sp[0]->s_n); } void tabosci_tilde_setup(void) { tabosci_tilde_class = class_new(gensym("tabosci~"), (t_newmethod)tabosci_tilde_new, 0, sizeof(t_tabosci_tilde), 0, A_DEFSYM, 0); CLASS_MAINSIGNALIN(tabosci_tilde_class, t_tabosci_tilde, x_f); class_addmethod(tabosci_tilde_class, (t_method)tabosci_tilde_dsp, gensym("dsp"), 0); class_addmethod(tabosci_tilde_class, (t_method)tabosci_tilde_set, gensym("set"), A_SYMBOL, 0); class_addmethod(tabosci_tilde_class, (t_method)tabosci_tilde_cutoff, gensym("cutoff"), A_FLOAT, 0); class_addmethod(tabosci_tilde_class, (t_method)tabosci_tilde_upsample, gensym("upsample"), A_FLOAT, 0); class_addmethod(tabosci_tilde_class, (t_method)tabosci_tilde_ft1, gensym("ft1"), A_FLOAT, 0); } nusmuk/audio/sinc.wav0000664000175000017500000002005412621374110015406 0ustar zmoelnigzmoelnigRIFF$ WAVEfmt wdata d?~~~O~~}}L}}|b| |{W{zz,zySyxlxwwwvuvueutHtssrqHqpoVonmImlk#kfjihhWgfed dLcvba`__'^D]^\w[ZYXWVUTSSRQPO"N#M$L#K!JIHGFEDBA@?>=<;:987t6g5[4N3B261*0/.-+*)('&%$#"! (;Qh  @gH{$`%kMFV~Q/ ,MzSFRx6~G[5raSG>73126]|3Qn3Ni/F]s%7GXhw#)/48<?ACEFFFEDB?<940*%rcSC3"ydO9# iQ8iN4tX< x\@$|aE*nT: rZC+|hT@-seWJ<0$ )5AN[iw);Nat-BXn&>Vm0Hay %=Vn-D[r$9Ncw$6GXiy ".9DOYblt}wof\SI>3(xhXH7'q]J6"}hS>({eO9$vaK6! }iUA.xgVE5%~rf[PF;2( '09CMXcny (8GWgw#5GZl+?Rfy*=Qdx"4GYk}&5ETdr(3=HR[env}umd[QG=3)zl]O@1"q`O>, }kYG5$raP>- xhXI:+ znbVK@5+  |zxwvutttuuwxz|~$.8CMXdo{ %3BP_n} )9IYiy -=N^n~ )8GVds ,8CNZdoz $(+/258:<>?@ABBBBA@?><:752/+'# }si^SI=2'tfYK<. ~o`QB3$paSD6' wj]QE9-! yqib[TMGA;5/*%!  #(-27=CIPV]dls{ +6BMYeq~ '5BP^lz!/=KYgu!-:FR_jv &/8@HPW_fmtz{unhaYRJB:2*!ui^RF;/# reXK>1$ {nbUI<0$ yndZPF=3*!~zwspmkigecba`__^^__`abdfgjlorux|!*3JVbnz %1=IVbnz%/:DNYcmv %*06;@EINRVY]`cfiknpqstuvwxxxxwvvtsrpnlifda]ZVRNJE@;61+&  |si`VLB8.#ti]RF;/$ xmbWLA7,! }tlc[SLD<5.'   "(/6>ELT\dlt}&1;EPZeoz(2=HS]hs} &/8AJS[clt|  #%')+-/0123333332210/-+)'%#  wog_WOF=5,#vkaWMB8.$vlcYOE<2)  {tngaZTNHC=82-($  !&+/4:?EJPV\biov} &09BKU^gqz  *4=GQZdmw&.6=ELT[biov|}wqjc]VOG@91)" wnd[RI?6-$~ulcZRI@80'~ysnid_[VRNJFB?;852/-*(&$"! "#%'),.147:=ADHLPTY]bglqv{'/7@HPYajr{#,4=FOW`iqz %,39?FLRX^cinty~~ytnid^XRLF@:3-&  xog_VNE=5,$ |tld\TLD=5.& |xtqmifc`]ZXUSQOMLJIHGFEDDDDDDDEEFGHJKMOQSUWZ\_beilosw{ !(/7>EMT\dks{ %-5=EMU]emu} #).4:?DINSX]afjnrvz}