Update of /cvsroot/pure-data/externals/miXed/cyclone/hammer
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23957/cyclone/hammer
Modified Files:
Append.c Decode.c Makefile.objects Table.c bangbang.c coll.c
comment.c counter.c cycle.c funbuff.c gate.c hammer.c
maximum.c minimum.c mtr.c past.c prepend.c prob.c pv.c seq.c
sprintf.c switch.c tosymbol.c urn.c zl.c
Log Message:
svf~: args parsing; prepend/Append: bang handling; seq: pause, continue, goto; many maxmode changes
Index: funbuff.c
===================================================================
RCS file: /cvsroot/pure-data/externals/miXed/cyclone/hammer/funbuff.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** funbuff.c 8 Dec 2004 15:40:11 -0000 1.4
--- funbuff.c 11 Jan 2005 10:33:19 -0000 1.5
***************
*** 350,354 ****
if (frac < 0 || frac >= delta)
{
! bug("funbuff_dointerp");
return;
}
--- 350,354 ----
if (frac < 0 || frac >= delta)
{
! loudbug_bug("funbuff_dointerp");
return;
}
***************
*** 362,366 ****
if (vndx < 0 || vndx >= vsz - 1)
{
! bug("funbuff_dointerp redundant test...");
return;
}
--- 362,366 ----
if (vndx < 0 || vndx >= vsz - 1)
{
! loudbug_bug("funbuff_dointerp redundant test...");
return;
}
Index: sprintf.c
===================================================================
RCS file: /cvsroot/pure-data/externals/miXed/cyclone/hammer/sprintf.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** sprintf.c 10 Dec 2004 20:47:02 -0000 1.3
--- sprintf.c 11 Jan 2005 10:33:19 -0000 1.4
***************
*** 122,130 ****
*pattend = tmp;
}
! else bug("sprintf_proxy_checkit");
if (x->p_valid = valid)
{
#ifdef SPRINTF_DEBUG
! if (checkin) post("[%d in \"%s\"]", result, buf);
#endif
x->p_size = result;
--- 122,130 ----
*pattend = tmp;
}
! else loudbug_bug("sprintf_proxy_checkit");
if (x->p_valid = valid)
{
#ifdef SPRINTF_DEBUG
! if (checkin) loudbug_post("[%d in \"%s\"]", result, buf);
#endif
x->p_size = result;
***************
*** 133,137 ****
{
#ifdef SPRINTF_DEBUG
! if (checkin) post("checkit failed");
#endif
x->p_size = 0;
--- 133,137 ----
{
#ifdef SPRINTF_DEBUG
! if (checkin) loudbug_post("checkit failed");
#endif
x->p_size = 0;
***************
*** 554,558 ****
}
#ifdef SPRINTF_DEBUG
! post("%d slots:", nproxies);
#endif
/* CHECKED: max creates as many inlets, as there are %-signs, no matter
--- 554,558 ----
}
#ifdef SPRINTF_DEBUG
! loudbug_post("%d slots:", nproxies);
#endif
/* CHECKED: max creates as many inlets, as there are %-signs, no matter
***************
*** 590,595 ****
char tmp = *p1;
*p1 = 0;
! poststring(p2);
! endpost();
*p1 = tmp;
#endif
--- 590,595 ----
char tmp = *p1;
*p1 = 0;
! loudbug_poststring(p2);
! loudbug_endpost();
*p1 = tmp;
#endif
***************
*** 616,620 ****
}
#ifdef SPRINTF_DEBUG
! post("printf(\"%s\", ...)", fstring);
#endif
outlet_new((t_object *)x, &s_anything);
--- 616,620 ----
}
#ifdef SPRINTF_DEBUG
! loudbug_post("printf(\"%s\", ...)", fstring);
#endif
outlet_new((t_object *)x, &s_anything);
Index: bangbang.c
===================================================================
RCS file: /cvsroot/pure-data/externals/miXed/cyclone/hammer/bangbang.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** bangbang.c 8 Dec 2004 15:40:11 -0000 1.3
--- bangbang.c 11 Jan 2005 10:33:19 -0000 1.4
***************
*** 1,3 ****
! /* Copyright (c) 2002-2003 krzYszcz and others.
* For information on usage and redistribution, and for a DISCLAIMER OF ALL
* WARRANTIES, see the file, "LICENSE.txt," in this distribution. */
--- 1,3 ----
! /* Copyright (c) 2002-2005 krzYszcz and others.
* For information on usage and redistribution, and for a DISCLAIMER OF ALL
* WARRANTIES, see the file, "LICENSE.txt," in this distribution. */
***************
*** 8,11 ****
--- 8,12 ----
#include "m_pd.h"
#include "common/loud.h"
+ #include "common/fitter.h"
#define BANGBANG_MINOUTS 1
***************
*** 48,55 ****
nouts = BANGBANG_DEFOUTS;
if (nouts > BANGBANG_C74MAXOUTS)
! {
! shared_usecompatibility();
! loud_incompatible_max(bangbang_class, BANGBANG_C74MAXOUTS, "outlets");
! }
if (nouts > BANGBANG_DEFOUTS)
{
--- 49,53 ----
nouts = BANGBANG_DEFOUTS;
if (nouts > BANGBANG_C74MAXOUTS)
! fittermax_rangewarning(bangbang_class, BANGBANG_C74MAXOUTS, "outlets");
if (nouts > BANGBANG_DEFOUTS)
{
***************
*** 74,76 ****
--- 72,75 ----
class_addbang(bangbang_class, bangbang_bang);
class_addanything(bangbang_class, bangbang_anything);
+ fitter_setup(bangbang_class, 0, 0);
}
Index: cycle.c
===================================================================
RCS file: /cvsroot/pure-data/externals/miXed/cyclone/hammer/cycle.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** cycle.c 8 Dec 2004 15:40:11 -0000 1.3
--- cycle.c 11 Jan 2005 10:33:19 -0000 1.4
***************
*** 1,3 ****
! /* Copyright (c) 2002-2003 krzYszcz and others.
* For information on usage and redistribution, and for a DISCLAIMER OF ALL
* WARRANTIES, see the file, "LICENSE.txt," in this distribution. */
--- 1,3 ----
! /* Copyright (c) 2002-2005 krzYszcz and others.
* For information on usage and redistribution, and for a DISCLAIMER OF ALL
* WARRANTIES, see the file, "LICENSE.txt," in this distribution. */
***************
*** 8,11 ****
--- 8,12 ----
#include "m_pd.h"
#include "common/loud.h"
+ #include "common/fitter.h"
//#define CYCLE_USEEVENTNO
***************
*** 120,125 ****
if (nouts > CYCLE_C74MAXOUTS)
{
! shared_usecompatibility();
! loud_incompatible_max(cycle_class, CYCLE_C74MAXOUTS, "outlets");
/* CHECKED: max clips with an error:
``perhaps you were trying to make an oscillator?'' */
--- 121,125 ----
if (nouts > CYCLE_C74MAXOUTS)
{
! fittermax_rangewarning(cycle_class, CYCLE_C74MAXOUTS, "outlets");
/* CHECKED: max clips with an error:
``perhaps you were trying to make an oscillator?'' */
***************
*** 152,154 ****
--- 152,155 ----
class_addmethod(cycle_class, (t_method)cycle_thresh,
gensym("thresh"), A_FLOAT, 0);
+ fitter_setup(cycle_class, 0, 0);
}
Index: seq.c
===================================================================
RCS file: /cvsroot/pure-data/externals/miXed/cyclone/hammer/seq.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** seq.c 10 Dec 2004 20:47:02 -0000 1.7
--- seq.c 11 Jan 2005 10:33:19 -0000 1.8
***************
*** 1,3 ****
! /* Copyright (c) 2002-2004 krzYszcz and others.
* For information on usage and redistribution, and for a DISCLAIMER OF ALL
* WARRANTIES, see the file, "LICENSE.txt," in this distribution. */
--- 1,3 ----
! /* Copyright (c) 2002-2005 krzYszcz and others.
* For information on usage and redistribution, and for a DISCLAIMER OF ALL
* WARRANTIES, see the file, "LICENSE.txt," in this distribution. */
***************
*** 12,15 ****
--- 12,16 ----
#include "common/loud.h"
#include "common/grow.h"
+ #include "common/fitter.h"
#include "common/mifi.h"
#include "unstable/forky.h"
***************
*** 102,106 ****
int nrequested = nevents;
#ifdef SEQ_DEBUG
! post("growing for %d events...", nevents);
#endif
x->x_sequence =
--- 103,107 ----
int nrequested = nevents;
#ifdef SEQ_DEBUG
! loudbug_post("growing for %d events...", nevents);
#endif
x->x_sequence =
***************
*** 118,122 ****
int nrequested = ntempi;
#ifdef SEQ_DEBUG
! post("growing for %d tempi...", ntempi);
#endif
x->x_tempomap =
--- 119,123 ----
int nrequested = ntempi;
#ifdef SEQ_DEBUG
! loudbug_post("growing for %d tempi...", ntempi);
#endif
x->x_tempomap =
***************
*** 158,162 ****
int nrequested = x->x_nevents + 1;
#ifdef SEQ_DEBUG
! post("growing...");
#endif
x->x_sequence =
--- 159,163 ----
int nrequested = x->x_nevents + 1;
#ifdef SEQ_DEBUG
! loudbug_post("growing...");
#endif
x->x_sequence =
***************
*** 213,217 ****
{
if (x->x_status != 240)
! bug("seq_addbyte");
/* CHECKED sysex is broken into 4-byte packets marked with
the actual delta time of last byte received in a packet */
--- 214,218 ----
{
if (x->x_status != 240)
! loudbug_bug("seq_addbyte");
/* CHECKED sysex is broken into 4-byte packets marked with
the actual delta time of last byte received in a packet */
***************
*** 324,328 ****
break;
default:
! bug("seq_setmode (old)");
return;
}
--- 325,329 ----
break;
default:
! loudbug_bug("seq_setmode (old)");
return;
}
***************
*** 343,347 ****
break;
default:
! bug("seq_setmode (new)");
}
}
--- 344,348 ----
break;
default:
! loudbug_bug("seq_setmode (new)");
}
}
***************
*** 423,427 ****
clock_delay(x->x_slaveclock, elapsed);
seq_settimescale(x, (float)(elapsed * (SEQ_TICKSPERSEC / 1000.)));
! if (x->x_prevtime > 0)
{
x->x_clockdelay -= clock_gettimesince(x->x_prevtime);
--- 424,428 ----
clock_delay(x->x_slaveclock, elapsed);
seq_settimescale(x, (float)(elapsed * (SEQ_TICKSPERSEC / 1000.)));
! if (x->x_prevtime > 0.)
{
x->x_clockdelay -= clock_gettimesince(x->x_prevtime);
***************
*** 429,433 ****
}
else x->x_clockdelay =
! x->x_sequence[x->x_playhead].e_delta * x->x_newtimescale;
if (x->x_clockdelay < 0.)
x->x_clockdelay = 0.;
--- 430,434 ----
}
else x->x_clockdelay =
! x->x_sequence[x->x_playhead].e_delta * x->x_newtimescale;
if (x->x_clockdelay < 0.)
x->x_clockdelay = 0.;
***************
*** 548,551 ****
--- 549,619 ----
}
+ static void seq_pause(t_seq *x)
+ {
+ static int warned = 0;
+ if (fittermax_get() && !warned)
+ {
+ fittermax_warning(*(t_pd *)x, "'pause' not supported in Max");
+ warned = 1;
+ }
+ if (x->x_mode == SEQ_PLAYMODE && x->x_prevtime > 0.)
+ {
+ x->x_clockdelay -= clock_gettimesince(x->x_prevtime);
+ if (x->x_clockdelay < 0.)
+ x->x_clockdelay = 0.;
+ clock_unset(x->x_clock);
+ x->x_prevtime = 0.;
+ }
+ }
+
+ static void seq_continue(t_seq *x)
+ {
+ static int warned = 0;
+ if (fittermax_get() && !warned)
+ {
+ fittermax_warning(*(t_pd *)x, "'continue' not supported in Max");
+ warned = 1;
+ }
+ if (x->x_mode == SEQ_PLAYMODE)
+ {
+ if (x->x_clockdelay < 0.)
+ x->x_clockdelay = 0.;
+ clock_delay(x->x_clock, x->x_clockdelay);
+ x->x_prevtime = clock_getlogicaltime();
+ }
+ }
+
+ static void seq_goto(t_seq *x, t_floatarg f1, t_floatarg f2)
+ {
+ static int warned = 0;
+ if (fittermax_get() && !warned)
+ {
+ fittermax_warning(*(t_pd *)x, "'goto' not supported in Max");
+ warned = 1;
+ }
+ if (x->x_nevents && x->x_mode == SEQ_PLAYMODE)
+ {
+ t_seqevent *ev;
+ int ndx, nevents = x->x_nevents;
+ double ms = f1 * 1000. + f2, sum;
+ if (ms < SEQ_TICKEPSILON)
+ ms = 0.;
+ for (ndx = 0, ev = x->x_sequence, sum = SEQ_TICKEPSILON; ndx < nevents;
+ ndx++, ev++)
+ {
+ if ((sum += ev->e_delta) >= ms)
+ {
+ x->x_playhead = ndx;
+ x->x_clockdelay = sum - SEQ_TICKEPSILON - ms;
+ if (x->x_clockdelay < 0.)
+ x->x_clockdelay = 0.;
+ clock_delay(x->x_clock, x->x_clockdelay);
+ x->x_prevtime = clock_getlogicaltime();
+ break;
+ }
+ }
+ }
+ }
+
static int seq_eventcomparehook(const void *e1, const void *e2)
{
***************
*** 585,589 ****
else if (x->x_eventreadhead == x->x_nevents)
{
! bug("seq_mrhook 1");
x->x_eventreadhead++;
}
--- 653,657 ----
else if (x->x_eventreadhead == x->x_nevents)
{
! loudbug_bug("seq_mrhook 1");
x->x_eventreadhead++;
}
***************
*** 597,606 ****
stm->t_sr = mifiread_gettempo(mr);
#ifdef SEQ_DEBUG
! post("tempo %g at %g", stm->t_sr, scoretime);
#endif
}
else if (x->x_temporeadhead == x->x_ntempi)
{
! bug("seq_mrhook 2");
x->x_temporeadhead++;
}
--- 665,674 ----
stm->t_sr = mifiread_gettempo(mr);
#ifdef SEQ_DEBUG
! loudbug_post("tempo %g at %g", stm->t_sr, scoretime);
#endif
}
else if (x->x_temporeadhead == x->x_ntempi)
{
! loudbug_bug("seq_mrhook 2");
x->x_temporeadhead++;
}
***************
*** 642,652 ****
goto mfreadfailed;
#ifdef SEQ_DEBUG
! startpost("midifile (format %d): %d tracks, %d ticks",
! mifiread_getformat(mr), mifiread_gethdtracks(mr),
! mifiread_getbeatticks(mr));
if (mifiread_getnframes(mr))
! post(" (%d smpte frames)", mifiread_getnframes(mr));
else
! post(" per beat");
#endif
if (!seq_dogrowing(x, mifiread_getnevents(mr), mifiread_getntempi(mr)))
--- 710,720 ----
goto mfreadfailed;
#ifdef SEQ_DEBUG
! loudbug_startpost("midifile (format %d): %d tracks, %d ticks",
! mifiread_getformat(mr), mifiread_gethdtracks(mr),
! mifiread_getbeatticks(mr));
if (mifiread_getnframes(mr))
! loudbug_post(" (%d smpte frames)", mifiread_getnframes(mr));
else
! loudbug_post(" per beat");
#endif
if (!seq_dogrowing(x, mifiread_getnevents(mr), mifiread_getntempi(mr)))
***************
*** 658,663 ****
if (x->x_eventreadhead < x->x_nevents)
{
! bug("seq_mfread 1");
! post("declared %d events, got %d", x->x_nevents, x->x_eventreadhead);
x->x_nevents = x->x_eventreadhead;
}
--- 726,732 ----
if (x->x_eventreadhead < x->x_nevents)
{
! loudbug_bug("seq_mfread 1");
! loudbug_post("declared %d events, got %d",
! x->x_nevents, x->x_eventreadhead);
x->x_nevents = x->x_eventreadhead;
}
***************
*** 667,672 ****
if (x->x_temporeadhead < x->x_ntempi)
{
! bug("seq_mfread 2");
! post("declared %d tempi, got %d", x->x_ntempi, x->x_temporeadhead);
x->x_ntempi = x->x_temporeadhead;
}
--- 736,742 ----
if (x->x_temporeadhead < x->x_ntempi)
{
! loudbug_bug("seq_mfread 2");
! loudbug_post("declared %d tempi, got %d",
! x->x_ntempi, x->x_temporeadhead);
x->x_ntempi = x->x_temporeadhead;
}
***************
*** 676,680 ****
seq_foldtime(x, mifiread_getdeftempo(mr));
#ifdef SEQ_DEBUG
! post("seq: got %d events from midi file", x->x_nevents);
#endif
result = 1;
--- 746,750 ----
seq_foldtime(x, mifiread_getdeftempo(mr));
#ifdef SEQ_DEBUG
! loudbug_post("seq: got %d events from midi file", x->x_nevents);
#endif
result = 1;
***************
*** 983,987 ****
t_seq *x = (t_seq *)pd_new(seq_class);
static int warned = 0;
! if (!warned)
{
loud_warning((t_pd *)x, 0, "seq is not ready yet");
--- 1053,1057 ----
t_seq *x = (t_seq *)pd_new(seq_class);
static int warned = 0;
! if (fittermax_get() && !warned)
{
loud_warning((t_pd *)x, 0, "seq is not ready yet");
***************
*** 1047,1051 ****
--- 1117,1130 ----
class_addmethod(seq_class, (t_method)seq_print,
gensym("print"), 0);
+
+ class_addmethod(seq_class, (t_method)seq_pause,
+ gensym("pause"), 0);
+ class_addmethod(seq_class, (t_method)seq_continue,
+ gensym("continue"), 0);
+ class_addmethod(seq_class, (t_method)seq_goto,
+ gensym("goto"), A_DEFFLOAT, A_DEFFLOAT, 0);
+
forky_setpropertiesfn(seq_class, seq_properties);
hammerfile_setup(seq_class, 0);
+ fitter_setup(seq_class, 0, 0);
}
Index: Decode.c
===================================================================
RCS file: /cvsroot/pure-data/externals/miXed/cyclone/hammer/Decode.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** Decode.c 8 Dec 2004 15:40:11 -0000 1.3
--- Decode.c 11 Jan 2005 10:33:19 -0000 1.4
***************
*** 1,3 ****
! /* Copyright (c) 2002-2003 krzYszcz and others.
* For information on usage and redistribution, and for a DISCLAIMER OF ALL
* WARRANTIES, see the file, "LICENSE.txt," in this distribution. */
--- 1,3 ----
! /* Copyright (c) 2002-2005 krzYszcz and others.
* For information on usage and redistribution, and for a DISCLAIMER OF ALL
* WARRANTIES, see the file, "LICENSE.txt," in this distribution. */
***************
*** 8,11 ****
--- 8,12 ----
#include "m_pd.h"
#include "common/loud.h"
+ #include "common/fitter.h"
#define DECODE_C74MAXOUTS 8 /* CHECKED (does it make any sense?) */
***************
*** 79,84 ****
if (nouts > DECODE_C74MAXOUTS)
{
! shared_usecompatibility();
! loud_incompatible_max(Decode_class, DECODE_C74MAXOUTS, "outlets");
if (!(outs = (t_outlet **)getbytes(nouts * sizeof(*outs))))
return (0);
--- 80,84 ----
if (nouts > DECODE_C74MAXOUTS)
{
! fittermax_rangewarning(Decode_class, DECODE_C74MAXOUTS, "outlets");
if (!(outs = (t_outlet **)getbytes(nouts * sizeof(*outs))))
return (0);
***************
*** 109,111 ****
--- 109,112 ----
class_addmethod(Decode_class, (t_method)Decode_alloff,
gensym("ft2"), A_FLOAT, 0);
+ fitter_setup(Decode_class, 0, 0);
}
Index: hammer.c
===================================================================
RCS file: /cvsroot/pure-data/externals/miXed/cyclone/hammer/hammer.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** hammer.c 8 Dec 2004 15:40:11 -0000 1.3
--- hammer.c 11 Jan 2005 10:33:19 -0000 1.4
***************
*** 1,7 ****
! /* Copyright (c) 2002-2004 krzYszcz and others.
* For information on usage and redistribution, and for a DISCLAIMER OF ALL
* WARRANTIES, see the file, "LICENSE.txt," in this distribution. */
- #include <stdio.h>
#include "m_pd.h"
#include "unstable/fragile.h"
--- 1,6 ----
! /* Copyright (c) 2002-2005 krzYszcz and others.
* For information on usage and redistribution, and for a DISCLAIMER OF ALL
* WARRANTIES, see the file, "LICENSE.txt," in this distribution. */
#include "m_pd.h"
#include "unstable/fragile.h"
***************
*** 16,19 ****
--- 15,19 ----
t_object x_ob;
t_symbol *x_dir;
+ t_symbol *x_canvasdir;
t_hammerfile *x_filehandle;
} t_hammer;
***************
*** 30,34 ****
static void hammer_doimport(t_hammer *x, t_symbol *fn, t_symbol *dir)
{
! if (!dir || dir == &s_) dir = x->x_dir;
if (fn && fn != &s_)
import_max(fn->s_name, (dir && dir != &s_) ? dir->s_name : "");
--- 30,35 ----
static void hammer_doimport(t_hammer *x, t_symbol *fn, t_symbol *dir)
{
! if (!dir || dir == &s_)
! dir = x->x_dir;
if (fn && fn != &s_)
import_max(fn->s_name, (dir && dir != &s_) ? dir->s_name : "");
***************
*** 48,51 ****
--- 49,63 ----
}
+ static void hammer_cd(t_hammer *x, t_symbol *dir)
+ {
+ /* LATER hammerfile interface for relative jumps, etc. */
+ x->x_dir = (dir && dir != &s_ ? dir : x->x_canvasdir);
+ }
+
+ static void hammer_pwd(t_hammer *x)
+ {
+ outlet_symbol(((t_object *)x)->ob_outlet, x->x_dir);
+ }
+
static void hammer_bang(t_hammer *x)
{
***************
*** 59,67 ****
}
! static void *hammer_new(t_symbol *s)
{
t_hammer *x = (t_hammer *)pd_new(hammer_class);
x->x_filehandle = hammerfile_new((t_pd *)x, 0, hammer_readhook, 0, 0);
! x->x_dir = (s && s != &s_ ? s : canvas_getdir(x->x_filehandle->f_canvas));
return (x);
}
--- 71,81 ----
}
! static void *hammer_new(void)
{
t_hammer *x = (t_hammer *)pd_new(hammer_class);
x->x_filehandle = hammerfile_new((t_pd *)x, 0, hammer_readhook, 0, 0);
! x->x_canvasdir = canvas_getdir(x->x_filehandle->f_canvas);
! x->x_dir = x->x_canvasdir;
! outlet_new((t_object *)x, &s_symbol);
return (x);
}
***************
*** 88,93 ****
(t_newmethod)hammer_new,
(t_method)hammer_free,
! sizeof(t_hammer), 0, A_DEFSYM, 0);
class_addbang(hammer_class, hammer_bang);
class_addmethod(hammer_class, (t_method)hammer_import,
gensym("import"), A_DEFSYM, 0);
--- 102,111 ----
(t_newmethod)hammer_new,
(t_method)hammer_free,
! sizeof(t_hammer), 0, 0);
class_addbang(hammer_class, hammer_bang);
+ class_addmethod(hammer_class, (t_method)hammer_cd,
+ gensym("cd"), A_DEFSYM, 0);
+ class_addmethod(hammer_class, (t_method)hammer_pwd,
+ gensym("pwd"), 0);
class_addmethod(hammer_class, (t_method)hammer_import,
gensym("import"), A_DEFSYM, 0);
Index: tosymbol.c
===================================================================
RCS file: /cvsroot/pure-data/externals/miXed/cyclone/hammer/tosymbol.c,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
*** tosymbol.c 23 May 2003 12:29:48 -0000 1.1.1.1
--- tosymbol.c 11 Jan 2005 10:33:19 -0000 1.2
***************
*** 6,9 ****
--- 6,10 ----
#include <string.h>
#include "m_pd.h"
+ #include "common/loud.h"
#include "common/grow.h"
***************
*** 100,104 ****
if (nleft < 0)
{
! bug("tosymbol_parse");
return (bufsize);
}
--- 101,105 ----
if (nleft < 0)
{
! loudbug_bug("tosymbol_parse");
return (bufsize);
}
***************
*** 112,116 ****
if (tosymbol_bufferlocked)
{
! bug("tosymbol_anything");
tosymbol_parse(s, ac, av, x->x_separator,
x->x_bufsize, x->x_buffer);
--- 113,117 ----
if (tosymbol_bufferlocked)
{
! loudbug_bug("tosymbol_anything");
tosymbol_parse(s, ac, av, x->x_separator,
x->x_bufsize, x->x_buffer);
Index: past.c
===================================================================
RCS file: /cvsroot/pure-data/externals/miXed/cyclone/hammer/past.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** past.c 8 Dec 2004 15:40:11 -0000 1.3
--- past.c 11 Jan 2005 10:33:19 -0000 1.4
***************
*** 1,3 ****
! /* Copyright (c) 2002-2003 krzYszcz and others.
* For information on usage and redistribution, and for a DISCLAIMER OF ALL
* WARRANTIES, see the file, "LICENSE.txt," in this distribution. */
--- 1,3 ----
! /* Copyright (c) 2002-2005 krzYszcz and others.
* For information on usage and redistribution, and for a DISCLAIMER OF ALL
* WARRANTIES, see the file, "LICENSE.txt," in this distribution. */
***************
*** 13,16 ****
--- 13,17 ----
#include "common/loud.h"
#include "common/grow.h"
+ #include "common/fitter.h"
#define PAST_C74MAXSIZE 8 /* CHECKED */
***************
*** 113,118 ****
if (ac > x->x_size)
{
! shared_usecompatibility();
! loud_incompatible_max(past_class, PAST_C74MAXSIZE, "guard points");
x->x_thresh = grow_nodata(&ac, &x->x_size, x->x_thresh,
PAST_C74MAXSIZE, x->x_thrini,
--- 114,118 ----
if (ac > x->x_size)
{
! fittermax_rangewarning(past_class, PAST_C74MAXSIZE, "guard points");
x->x_thresh = grow_nodata(&ac, &x->x_size, x->x_thresh,
PAST_C74MAXSIZE, x->x_thrini,
***************
*** 153,155 ****
--- 153,156 ----
class_addmethod(past_class, (t_method)past_clear, gensym("clear"), 0);
class_addmethod(past_class, (t_method)past_set, gensym("set"), A_GIMME, 0);
+ fitter_setup(past_class, 0, 0);
}
Index: counter.c
===================================================================
RCS file: /cvsroot/pure-data/externals/miXed/cyclone/hammer/counter.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** counter.c 8 Dec 2004 15:40:11 -0000 1.2
--- counter.c 11 Jan 2005 10:33:19 -0000 1.3
***************
*** 1,3 ****
! /* Copyright (c) 2002-2004 krzYszcz and others.
* For information on usage and redistribution, and for a DISCLAIMER OF ALL
* WARRANTIES, see the file, "LICENSE.txt," in this distribution. */
--- 1,3 ----
! /* Copyright (c) 2002-2005 krzYszcz and others.
* For information on usage and redistribution, and for a DISCLAIMER OF ALL
* WARRANTIES, see the file, "LICENSE.txt," in this distribution. */
***************
*** 13,16 ****
--- 13,17 ----
#include "m_pd.h"
#include "common/loud.h"
+ #include "common/fitter.h"
#define COUNTER_UP 0
***************
*** 101,105 ****
{
/* min has changed, which should imply x->x_count == x->x_min */
! bug("counter_dobang (count < min)");
}
else if (x->x_dir == COUNTER_UPDOWN)
--- 102,106 ----
{
/* min has changed, which should imply x->x_count == x->x_min */
! loudbug_bug("counter_dobang (count < min)");
}
else if (x->x_dir == COUNTER_UPDOWN)
***************
*** 317,330 ****
int i3 = (int)f3;
int i;
! shared_usecompatibility();
! if (shared_getmaxcompatibility())
{
! static int warned = 0;
! if (!warned)
! {
! post("warning: counter is not fully compatible,\
please report differences");
! warned = 1;
! }
}
x->x_dir = COUNTER_UP;
--- 318,327 ----
int i3 = (int)f3;
int i;
! static int warned = 0;
! if (fittermax_get() && !warned)
{
! post("warning: counter is not fully compatible,\
please report differences");
! warned = 1;
}
x->x_dir = COUNTER_UP;
***************
*** 402,404 ****
--- 399,402 ----
class_addbang(counter_proxy_class, counter_proxy_bang);
class_addfloat(counter_proxy_class, counter_proxy_float);
+ fitter_setup(counter_class, 0, 0);
}
Index: urn.c
===================================================================
RCS file: /cvsroot/pure-data/externals/miXed/cyclone/hammer/urn.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** urn.c 8 Dec 2004 15:40:11 -0000 1.4
--- urn.c 11 Jan 2005 10:33:19 -0000 1.5
***************
*** 1,3 ****
! /* Copyright (c) 2002-2003 krzYszcz and others.
* For information on usage and redistribution, and for a DISCLAIMER OF ALL
* WARRANTIES, see the file, "LICENSE.txt," in this distribution. */
--- 1,3 ----
! /* Copyright (c) 2002-2005 krzYszcz and others.
* For information on usage and redistribution, and for a DISCLAIMER OF ALL
* WARRANTIES, see the file, "LICENSE.txt," in this distribution. */
***************
*** 10,15 ****
#include "m_pd.h"
#include "common/loud.h"
- #include "common/rand.h"
#include "common/grow.h"
#define URN_INISIZE 128 /* LATER rethink */
--- 10,16 ----
#include "m_pd.h"
#include "common/loud.h"
#include "common/grow.h"
+ #include "common/fitter.h"
+ #include "common/rand.h"
#define URN_INISIZE 128 /* LATER rethink */
***************
*** 57,61 ****
}
if (range > maxmax)
! loud_incompatible_max(urn_class, maxmax, "elements");
x->x_range = range;
if (range > x->x_size)
--- 58,62 ----
}
if (range > maxmax)
! fittermax_rangewarning(urn_class, maxmax, "elements");
x->x_range = range;
if (range > x->x_size)
***************
*** 123,127 ****
urn_resize(x, f1, 1);
urn_seed(x, f2); /* CHECKME */
- shared_usecompatibility();
inlet_new((t_object *)x, (t_pd *)x, &s_float, gensym("ft1"));
outlet_new((t_object *)x, &s_float);
--- 124,127 ----
***************
*** 147,149 ****
--- 147,150 ----
class_addmethod(urn_class, (t_method)urn_clear,
gensym("clear"), 0);
+ fitter_setup(urn_class, 0, 0);
}
Index: maximum.c
===================================================================
RCS file: /cvsroot/pure-data/externals/miXed/cyclone/hammer/maximum.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** maximum.c 8 Dec 2004 15:40:11 -0000 1.3
--- maximum.c 11 Jan 2005 10:33:19 -0000 1.4
***************
*** 1,3 ****
! /* Copyright (c) 2002-2003 krzYszcz and others.
* For information on usage and redistribution, and for a DISCLAIMER OF ALL
* WARRANTIES, see the file, "LICENSE.txt," in this distribution. */
--- 1,3 ----
! /* Copyright (c) 2002-2005 krzYszcz and others.
* For information on usage and redistribution, and for a DISCLAIMER OF ALL
* WARRANTIES, see the file, "LICENSE.txt," in this distribution. */
***************
*** 5,8 ****
--- 5,9 ----
#include "m_pd.h"
#include "common/loud.h"
+ #include "common/fitter.h"
#define MAXIMUM_C74MAXITEMS 256
***************
*** 31,35 ****
{
if (ac > MAXIMUM_C74MAXITEMS)
! loud_incompatible_max(*(t_pd *)x, MAXIMUM_C74MAXITEMS, "items");
while (ac && av->a_type != A_FLOAT) ac--, av++; /* CHECKME (a warning?) */
if (ac)
--- 32,36 ----
{
if (ac > MAXIMUM_C74MAXITEMS)
! fittermax_rangewarning(*(t_pd *)x, MAXIMUM_C74MAXITEMS, "items");
while (ac && av->a_type != A_FLOAT) ac--, av++; /* CHECKME (a warning?) */
if (ac)
***************
*** 76,80 ****
x->x_last = 0; /* CHECKME */
x->x_test = f;
- shared_usecompatibility();
floatinlet_new((t_object *)x, &x->x_test);
outlet_new((t_object *)x, &s_float);
--- 77,80 ----
***************
*** 90,92 ****
--- 90,93 ----
class_addfloat(maximum_class, maximum_float);
class_addlist(maximum_class, maximum_list);
+ fitter_setup(maximum_class, 0, 0);
}
Index: comment.c
===================================================================
RCS file: /cvsroot/pure-data/externals/miXed/cyclone/hammer/comment.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** comment.c 10 Dec 2004 20:47:02 -0000 1.6
--- comment.c 11 Jan 2005 10:33:19 -0000 1.7
***************
*** 82,86 ****
{
#ifdef COMMENT_DEBUG
! post("allocating %d outbuf bytes", reqsize);
#endif
if (!(outbuf = getbytes(reqsize)))
--- 82,86 ----
{
#ifdef COMMENT_DEBUG
! loudbug_post("allocating %d outbuf bytes", reqsize);
#endif
if (!(outbuf = getbytes(reqsize)))
***************
*** 126,130 ****
{
#ifdef COMMENT_DEBUG
! post("allocating %d outbuf bytes", reqsize);
#endif
if (!(outbuf = getbytes(reqsize)))
--- 126,130 ----
{
#ifdef COMMENT_DEBUG
! loudbug_post("allocating %d outbuf bytes", reqsize);
#endif
if (!(outbuf = getbytes(reqsize)))
***************
*** 186,190 ****
x->x_ready = 1;
#ifdef COMMENT_DEBUG
! post("validation done");
#endif
}
--- 186,190 ----
x->x_ready = 1;
#ifdef COMMENT_DEBUG
! loudbug_post("validation done");
#endif
}
***************
*** 193,197 ****
if (glist != x->x_glist)
{
! bug("comment_getcanvas");
x->x_glist = glist;
}
--- 193,197 ----
if (glist != x->x_glist)
{
! loudbug_bug("comment_getcanvas");
x->x_glist = glist;
}
***************
*** 204,208 ****
/* LATER think about replacing #key binding/comment_float() with grabbing */
#ifdef COMMENT_DEBUG
! post("comment_grabbedkey %g", f);
#endif
}
--- 204,208 ----
/* LATER think about replacing #key binding/comment_float() with grabbing */
#ifdef COMMENT_DEBUG
! loudbug_post("comment_grabbedkey %g", f);
#endif
}
***************
*** 222,226 ****
{
#ifdef COMMENT_DEBUG
! post("bbox %g %g %g %g", x1, y1, x2, y2);
#endif
x->x_x1 = x1;
--- 222,226 ----
{
#ifdef COMMENT_DEBUG
! loudbug_post("bbox %g %g %g %g", x1, y1, x2, y2);
#endif
x->x_x1 = x1;
***************
*** 250,254 ****
else
{
! bug("comment__clickhook");
return;
}
--- 250,254 ----
else
{
! loudbug_bug("comment__clickhook");
return;
}
***************
*** 322,326 ****
pd_unbind(x, bindsym); /* if so, no need for this binding anymore */
#ifdef COMMENT_DEBUG
! post("sink: %s unbound", bindsym->s_name);
#endif
}
--- 322,326 ----
pd_unbind(x, bindsym); /* if so, no need for this binding anymore */
#ifdef COMMENT_DEBUG
! loudbug_post("sink: %s unbound", bindsym->s_name);
#endif
}
***************
*** 369,373 ****
y2 = y1 + height - 2; /* LATER revisit */
#ifdef COMMENT_DEBUG
! post("estimated rectangle: %g %g %g %g", x1, y1, x2, y2);
#endif
*xp1 = x1;
--- 369,373 ----
y2 = y1 + height - 2; /* LATER revisit */
#ifdef COMMENT_DEBUG
! loudbug_post("estimated rectangle: %g %g %g %g", x1, y1, x2, y2);
#endif
*xp1 = x1;
***************
*** 466,470 ****
/* FIXME should we test for having a window? */
#ifdef COMMENT_DEBUG
! post("deleting...");
#endif
sys_vgui(".x%x.c delete %s\n", x->x_canvas, x->x_tag);
--- 466,470 ----
/* FIXME should we test for having a window? */
#ifdef COMMENT_DEBUG
! loudbug_post("deleting...");
#endif
sys_vgui(".x%x.c delete %s\n", x->x_canvas, x->x_tag);
***************
*** 541,545 ****
{
#ifdef COMMENT_DEBUG
! post("%d accepted", n);
#endif
newsize = x->x_textbufsize+1;
--- 541,545 ----
{
#ifdef COMMENT_DEBUG
! loudbug_post("%d accepted", n);
#endif
newsize = x->x_textbufsize+1;
***************
*** 553,557 ****
}
#ifdef COMMENT_DEBUG
! else post("%d rejected", n);
#endif
x->x_selend = x->x_selstart;
--- 553,557 ----
}
#ifdef COMMENT_DEBUG
! else loudbug_post("%d rejected", n);
#endif
x->x_selend = x->x_selstart;
***************
*** 561,568 ****
}
}
! else bug("comment_float");
donefloat:;
#ifdef COMMENT_DEBUG
! post("donefloat");
#endif
}
--- 561,568 ----
}
}
! else loudbug_bug("comment_float");
donefloat:;
#ifdef COMMENT_DEBUG
! loudbug_post("donefloat");
#endif
}
***************
*** 571,575 ****
{
if (!x->x_active)
! bug("comment_list");
else if (ac > 1 && av->a_type == A_FLOAT && (int)av->a_w.w_float
&& av[1].a_type == A_SYMBOL)
--- 571,575 ----
{
if (!x->x_active)
! loudbug_bug("comment_list");
else if (ac > 1 && av->a_type == A_FLOAT && (int)av->a_w.w_float
&& av[1].a_type == A_SYMBOL)
***************
*** 657,661 ****
donelist:;
#ifdef COMMENT_DEBUG
! post("donelist");
#endif
}
--- 657,661 ----
donelist:;
#ifdef COMMENT_DEBUG
! loudbug_post("donelist");
#endif
}
***************
*** 665,669 ****
if (x->x_active)
{
! bug("comment_free");
pd_unbind((t_pd *)x, gensym("#key"));
pd_unbind((t_pd *)x, gensym("#keyname"));
--- 665,669 ----
if (x->x_active)
{
! loudbug_bug("comment_free");
pd_unbind((t_pd *)x, gensym("#key"));
pd_unbind((t_pd *)x, gensym("#keyname"));
Index: minimum.c
===================================================================
RCS file: /cvsroot/pure-data/externals/miXed/cyclone/hammer/minimum.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** minimum.c 8 Dec 2004 15:40:11 -0000 1.3
--- minimum.c 11 Jan 2005 10:33:19 -0000 1.4
***************
*** 1,3 ****
! /* Copyright (c) 2002-2003 krzYszcz and others.
* For information on usage and redistribution, and for a DISCLAIMER OF ALL
* WARRANTIES, see the file, "LICENSE.txt," in this distribution. */
--- 1,3 ----
! /* Copyright (c) 2002-2005 krzYszcz and others.
* For information on usage and redistribution, and for a DISCLAIMER OF ALL
* WARRANTIES, see the file, "LICENSE.txt," in this distribution. */
***************
*** 5,8 ****
--- 5,9 ----
#include "m_pd.h"
#include "common/loud.h"
+ #include "common/fitter.h"
#define MINIMUM_C74MAXITEMS 256
***************
*** 31,35 ****
{
if (ac > MINIMUM_C74MAXITEMS)
! loud_incompatible_max(*(t_pd *)x, MINIMUM_C74MAXITEMS, "items");
while (ac && av->a_type != A_FLOAT) ac--, av++; /* CHECKME (a warning?) */
if (ac)
--- 32,36 ----
{
if (ac > MINIMUM_C74MAXITEMS)
! fittermax_rangewarning(*(t_pd *)x, MINIMUM_C74MAXITEMS, "items");
while (ac && av->a_type != A_FLOAT) ac--, av++; /* CHECKME (a warning?) */
if (ac)
***************
*** 76,80 ****
x->x_last = 0; /* CHECKME */
x->x_test = f;
- shared_usecompatibility();
floatinlet_new((t_object *)x, &x->x_test);
outlet_new((t_object *)x, &s_float);
--- 77,80 ----
***************
*** 90,92 ****
--- 90,93 ----
class_addfloat(minimum_class, minimum_float);
class_addlist(minimum_class, minimum_list);
+ fitter_setup(minimum_class, 0, 0);
}
Index: zl.c
===================================================================
RCS file: /cvsroot/pure-data/externals/miXed/cyclone/hammer/zl.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** zl.c 10 Dec 2004 20:47:02 -0000 1.6
--- zl.c 11 Jan 2005 10:33:19 -0000 1.7
***************
*** 14,18 ****
#ifdef KRZYSZCZ
! #define ZL_DEBUG
#endif
--- 14,18 ----
#ifdef KRZYSZCZ
! //#define ZL_DEBUG
#endif
***************
*** 821,824 ****
--- 821,826 ----
{
x->x_mode = i;
+ /* CHECKED incompatible (LATER warn):
+ c74 rejects creation args, if not a single int */
zl_setmodearg(x, 0, ac - 1, av + 1);
}
***************
*** 883,899 ****
static void zl_debug(t_zl *x, t_floatarg f)
{
! startpost("mode %s", zl_modesym[x->x_mode]->s_name);
if (zl_intargfn[x->x_mode])
! post(" %d", x->x_modearg);
else
! endpost();
if ((int)f)
{
! startpost("first:");
! postatom(x->x_inbuf1.d_natoms, x->x_inbuf1.d_buf);
! endpost();
! startpost("second:");
! postatom(x->x_inbuf2.d_natoms, x->x_inbuf2.d_buf);
! endpost();
}
}
--- 885,901 ----
static void zl_debug(t_zl *x, t_floatarg f)
{
! loudbug_startpost("mode %s", zl_modesym[x->x_mode]->s_name);
if (zl_intargfn[x->x_mode])
! loudbug_post(" %d", x->x_modearg);
else
! loudbug_endpost();
if ((int)f)
{
! loudbug_startpost("first:");
! loudbug_postatom(x->x_inbuf1.d_natoms, x->x_inbuf1.d_buf);
! loudbug_endpost();
! loudbug_startpost("second:");
! loudbug_postatom(x->x_inbuf2.d_natoms, x->x_inbuf2.d_buf);
! loudbug_endpost();
}
}
***************
*** 941,945 ****
zl_nmodes++;
}
! else bug("zl_setupmode");
}
--- 943,947 ----
zl_nmodes++;
}
! else loudbug_bug("zl_setupmode");
}
Index: coll.c
===================================================================
RCS file: /cvsroot/pure-data/externals/miXed/cyclone/hammer/coll.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** coll.c 10 Dec 2004 20:47:02 -0000 1.8
--- coll.c 11 Jan 2005 10:33:19 -0000 1.9
***************
*** 144,166 ****
}
- static void collelem_post(t_collelem *ep)
- {
- if (ep->e_hasnumkey && ep->e_symkey)
- startpost("%d %s:", ep->e_numkey, ep->e_symkey->s_name);
- else if (ep->e_hasnumkey)
- startpost("%d:", ep->e_numkey);
- else if (ep->e_symkey)
- startpost("%s:", ep->e_symkey->s_name);
- else bug("collcommon_post");
- postatom(ep->e_size, ep->e_data);
- endpost();
- }
-
- static void collcommon_post(t_collcommon *cc)
- {
- t_collelem *ep;
- for (ep = cc->c_first; ep; ep = ep->e_next) collelem_post(ep);
- }
-
static t_collelem *collcommon_numkey(t_collcommon *cc, int numkey)
{
--- 144,147 ----
***************
*** 295,299 ****
}
else if (cc->c_first || cc->c_last)
! bug("collcommon_putbefore");
else
cc->c_first = cc->c_last = ep;
--- 276,280 ----
}
else if (cc->c_first || cc->c_last)
! loudbug_bug("collcommon_putbefore");
else
cc->c_first = cc->c_last = ep;
***************
*** 314,318 ****
}
else if (cc->c_first || cc->c_last)
! bug("collcommon_putafter");
else
cc->c_first = cc->c_last = ep;
--- 295,299 ----
}
else if (cc->c_first || cc->c_last)
! loudbug_bug("collcommon_putafter");
else
cc->c_first = cc->c_last = ep;
***************
*** 364,368 ****
collcommon_putbefore(cc, ep2, next1);
}
! else bug("collcommon_swaplinks");
}
}
--- 345,349 ----
collcommon_putbefore(cc, ep2, next1);
}
! else loudbug_bug("collcommon_swaplinks");
}
}
***************
*** 781,785 ****
collcommon_class))
{
! bug("coll_checkcommon");
return (0);
}
--- 762,766 ----
collcommon_class))
{
! loudbug_bug("coll_checkcommon");
return (0);
}
***************
*** 1238,1242 ****
coll_dooutput(x, cc->c_head->e_size, cc->c_head->e_data);
else if (!cc->c_selfmodified)
! bug("coll_next"); /* LATER rethink */
}
--- 1219,1223 ----
coll_dooutput(x, cc->c_head->e_size, cc->c_head->e_data);
else if (!cc->c_selfmodified)
! loudbug_bug("coll_next"); /* LATER rethink */
}
***************
*** 1258,1262 ****
coll_dooutput(x, cc->c_head->e_size, cc->c_head->e_data);
else if (!cc->c_selfmodified)
! bug("coll_prev"); /* LATER rethink */
}
--- 1239,1243 ----
coll_dooutput(x, cc->c_head->e_size, cc->c_head->e_data);
else if (!cc->c_selfmodified)
! loudbug_bug("coll_prev"); /* LATER rethink */
}
***************
*** 1489,1492 ****
--- 1470,1492 ----
#ifdef COLL_DEBUG
+ static void collelem_post(t_collelem *ep)
+ {
+ if (ep->e_hasnumkey && ep->e_symkey)
+ loudbug_startpost("%d %s:", ep->e_numkey, ep->e_symkey->s_name);
+ else if (ep->e_hasnumkey)
+ loudbug_startpost("%d:", ep->e_numkey);
+ else if (ep->e_symkey)
+ loudbug_startpost("%s:", ep->e_symkey->s_name);
+ else loudbug_bug("collcommon_post");
+ loudbug_postatom(ep->e_size, ep->e_data);
+ loudbug_endpost();
+ }
+
+ static void collcommon_post(t_collcommon *cc)
+ {
+ t_collelem *ep;
+ for (ep = cc->c_first; ep; ep = ep->e_next) collelem_post(ep);
+ }
+
static void coll_debug(t_coll *x, t_floatarg f)
{
***************
*** 1498,1504 ****
int i = 0;
while (x1) i++, x1 = x1->x_next;
! post("refcount %d", i);
for (ep = cc->c_first, last = 0; ep; ep = ep->e_next) last = ep;
! if (last != cc->c_last) bug("coll_debug: last element");
collcommon_post(cc);
}
--- 1498,1504 ----
int i = 0;
while (x1) i++, x1 = x1->x_next;
! loudbug_post("refcount %d", i);
for (ep = cc->c_first, last = 0; ep; ep = ep->e_next) last = ep;
! if (last != cc->c_last) loudbug_bug("coll_debug: last element");
collcommon_post(cc);
}
Index: prepend.c
===================================================================
RCS file: /cvsroot/pure-data/externals/miXed/cyclone/hammer/prepend.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** prepend.c 8 Dec 2004 15:40:11 -0000 1.3
--- prepend.c 11 Jan 2005 10:33:19 -0000 1.4
***************
*** 1,3 ****
! /* Copyright (c) 2002-2004 krzYszcz and others.
* For information on usage and redistribution, and for a DISCLAIMER OF ALL
* WARRANTIES, see the file, "LICENSE.txt," in this distribution. */
--- 1,3 ----
! /* Copyright (c) 2002-2005 krzYszcz and others.
* For information on usage and redistribution, and for a DISCLAIMER OF ALL
* WARRANTIES, see the file, "LICENSE.txt," in this distribution. */
***************
*** 7,10 ****
--- 7,11 ----
#include "common/loud.h"
#include "common/grow.h"
+ #include "common/fitter.h"
#define PREPEND_INISIZE 32 /* LATER rethink */
***************
*** 34,37 ****
--- 35,41 ----
static t_class *prependxy_class;
+ static t_symbol *prependps_compatibility = 0;
+ static t_symbol *prependps_max;
+
/* Usually a preallocation method is used, except in special cases of:
1) reentrant output request, or 2) an output request which would cause
***************
*** 150,156 ****
if (x->x_selector)
{
! t_atom at;
! SETSYMBOL(&at, &s_bang); /* CHECKED */
! prepend_doanything(x, 0, 1, &at);
}
else outlet_bang(((t_object *)x)->ob_outlet);
--- 154,164 ----
if (x->x_selector)
{
! if (prependps_compatibility == prependps_max)
! {
! t_atom at;
! SETSYMBOL(&at, &s_bang); /* CHECKED */
! prepend_doanything(x, 0, 1, &at);
! }
! else prepend_doanything(x, 0, 0, 0);
}
else outlet_bang(((t_object *)x)->ob_outlet);
***************
*** 253,260 ****
static void prepend_set(t_prepend *x, t_symbol *s, int ac, t_atom *av)
{
! if (shared_getmaxcompatibility())
! prepend_doset(x, 0, ac, av);
! else
prepend_anything(x, s, ac, av);
}
--- 261,269 ----
static void prepend_set(t_prepend *x, t_symbol *s, int ac, t_atom *av)
{
! if (x->x_proxy)
prepend_anything(x, s, ac, av);
+ else
+ /* LATER (when?) controlled by maxmode */
+ prepend_doset(x, 0, ac, av);
}
***************
*** 293,297 ****
if (x->x_auxbuf)
{
! bug("prepend_free"); /* LATER rethink */
freebytes(x->x_auxbuf, x->x_auxsize * sizeof(*x->x_auxbuf));
}
--- 302,306 ----
if (x->x_auxbuf)
{
! loudbug_bug("prepend_free"); /* LATER rethink */
freebytes(x->x_auxbuf, x->x_auxsize * sizeof(*x->x_auxbuf));
}
***************
*** 309,313 ****
x->x_auxbuf = 0;
x->x_entered = 0;
- shared_usecompatibility();
if (ac)
{
--- 318,321 ----
***************
*** 317,325 ****
else
{
! if (shared_getmaxcompatibility())
! /* CHECKED: this is still not compatible -- in max an object
! without an outlet is created, and there is no warning when
! loading from a file. */
! loud_incompatible(prepend_class,
"creating an object without an argument");
x->x_proxy = pd_new(prependxy_class);
--- 325,332 ----
else
{
! if (prependps_compatibility == prependps_max)
! /* CHECKED in max an object without an outlet is created,
! and there is no warning when loading from a file. */
! fittermax_warning(prepend_class,
"creating an object without an argument");
x->x_proxy = pd_new(prependxy_class);
***************
*** 353,355 ****
--- 360,365 ----
class_addlist(prependxy_class, prependxy_list);
class_addanything(prependxy_class, prependxy_anything);
+
+ prependps_max = gensym("max");
+ fitter_setup(prepend_class, &prependps_compatibility, 0);
}
Index: prob.c
===================================================================
RCS file: /cvsroot/pure-data/externals/miXed/cyclone/hammer/prob.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** prob.c 10 Dec 2004 20:47:02 -0000 1.4
--- prob.c 11 Jan 2005 10:33:19 -0000 1.5
***************
*** 1,3 ****
! /* Copyright (c) 2002-2004 krzYszcz and others.
* For information on usage and redistribution, and for a DISCLAIMER OF ALL
* WARRANTIES, see the file, "LICENSE.txt," in this distribution. */
--- 1,3 ----
! /* Copyright (c) 2002-2005 krzYszcz and others.
* For information on usage and redistribution, and for a DISCLAIMER OF ALL
* WARRANTIES, see the file, "LICENSE.txt," in this distribution. */
***************
*** 6,9 ****
--- 6,10 ----
#include "m_pd.h"
#include "common/loud.h"
+ #include "common/fitter.h"
#include "common/rand.h"
#include "hammer/file.h"
***************
*** 145,151 ****
x->x_state = nextstate;
}
! else bug("prob_bang: void suffix");
}
! else bug("prob_bang: search overflow");
}
else
--- 146,152 ----
x->x_state = nextstate;
}
! else loudbug_bug("prob_bang: void suffix");
}
! else loudbug_bug("prob_bang: search overflow");
}
else
***************
*** 239,243 ****
if (!x->x_silent)
{
! loud_incompatible(prob_class, "no '_silent' message in max");
x->x_silent = 1;
}
--- 240,244 ----
if (!x->x_silent)
{
! fittermax_warning(prob_class, "no '_silent' message in max");
x->x_silent = 1;
}
***************
*** 277,281 ****
x->x_silent = 0;
rand_seed(&x->x_seed, 0);
- shared_usecompatibility();
outlet_new((t_object *)x, &s_float);
x->x_bangout = outlet_new((t_object *)x, &s_bang);
--- 278,281 ----
***************
*** 308,310 ****
--- 308,311 ----
A_FLOAT, A_FLOAT, A_FLOAT, A_FLOAT, A_FLOAT, 0);
hammerfile_setup(prob_class, 1);
+ fitter_setup(prob_class, 0, 0);
}
Index: mtr.c
===================================================================
RCS file: /cvsroot/pure-data/externals/miXed/cyclone/hammer/mtr.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** mtr.c 10 Dec 2004 20:47:02 -0000 1.5
--- mtr.c 11 Jan 2005 10:33:19 -0000 1.6
***************
*** 1,3 ****
! /* Copyright (c) 2003 krzYszcz and others.
* For information on usage and redistribution, and for a DISCLAIMER OF ALL
* WARRANTIES, see the file, "LICENSE.txt," in this distribution. */
--- 1,3 ----
! /* Copyright (c) 2003-2005 krzYszcz and others.
* For information on usage and redistribution, and for a DISCLAIMER OF ALL
* WARRANTIES, see the file, "LICENSE.txt," in this distribution. */
***************
*** 11,14 ****
--- 11,15 ----
#include "shared.h"
#include "common/loud.h"
+ #include "common/fitter.h"
#include "hammer/file.h"
***************
*** 182,186 ****
break;
default:
! bug("mtrack_setmode");
}
}
--- 183,187 ----
break;
default:
! loudbug_bug("mtrack_setmode");
}
}
***************
*** 287,291 ****
ap++;
}
! bug("mtrack_getdelay");
}
return (0);
--- 288,292 ----
ap++;
}
! loudbug_bug("mtrack_getdelay");
}
return (0);
***************
*** 339,350 ****
{
float newtempo;
! if (shared_getmaxcompatibility())
{
! static int warned = 0;
! if (!warned)
! {
! loud_incompatible(mtr_class, "no 'tempo' control in Max");
! warned = 1;
! }
}
if (f < 1e-20)
--- 340,348 ----
{
float newtempo;
! static int warned = 0;
! if (fittermax_get() && !warned)
{
! fittermax_warning(mtr_class, "no 'tempo' control in Max");
! warned = 1;
}
if (f < 1e-20)
***************
*** 704,709 ****
while (ntracks--)
{
! post("------- Track %d -------", (*tpp)->tr_id);
! binbuf_print((*tpp++)->tr_binbuf);
}
}
--- 702,707 ----
while (ntracks--)
{
! loudbug_post("------- Track %d -------", (*tpp)->tr_id);
! loudbug_postbinbuf((*tpp++)->tr_binbuf);
}
}
***************
*** 763,769 ****
x->x_filehandle = hammerfile_new((t_pd *)x, 0,
mtr_readhook, mtr_writehook, 0);
- shared_usecompatibility();
if (ntracks > MTR_C74MAXTRACKS)
! loud_incompatible_max(mtr_class, MTR_C74MAXTRACKS, "tracks");
x->x_ntracks = ntracks;
x->x_tracks = tracks;
--- 761,766 ----
x->x_filehandle = hammerfile_new((t_pd *)x, 0,
mtr_readhook, mtr_writehook, 0);
if (ntracks > MTR_C74MAXTRACKS)
! fittermax_rangewarning(mtr_class, MTR_C74MAXTRACKS, "tracks");
x->x_ntracks = ntracks;
x->x_tracks = tracks;
***************
*** 864,866 ****
--- 861,864 ----
#endif
hammerfile_setup(mtr_class, 0);
+ fitter_setup(mtr_class, 0, 0);
}
Index: gate.c
===================================================================
RCS file: /cvsroot/pure-data/externals/miXed/cyclone/hammer/gate.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** gate.c 8 Dec 2004 15:40:11 -0000 1.3
--- gate.c 11 Jan 2005 10:33:19 -0000 1.4
***************
*** 1,3 ****
! /* Copyright (c) 2002-2003 krzYszcz and others.
* For information on usage and redistribution, and for a DISCLAIMER OF ALL
* WARRANTIES, see the file, "LICENSE.txt," in this distribution. */
--- 1,3 ----
! /* Copyright (c) 2002-2005 krzYszcz and others.
* For information on usage and redistribution, and for a DISCLAIMER OF ALL
* WARRANTIES, see the file, "LICENSE.txt," in this distribution. */
***************
*** 5,8 ****
--- 5,9 ----
#include "m_pd.h"
#include "common/loud.h"
+ #include "common/fitter.h"
#define GATE_MINOUTS 1
***************
*** 101,108 ****
nouts = GATE_DEFOUTS;
if (nouts > GATE_C74MAXOUTS)
! {
! shared_usecompatibility();
! loud_incompatible_max(gate_class, GATE_C74MAXOUTS, "outlets");
! }
nouts++; /* for convenience (the cost is one pointer) */
if (!(outs = (t_outlet **)getbytes(nouts * sizeof(*outs))))
--- 102,106 ----
nouts = GATE_DEFOUTS;
if (nouts > GATE_C74MAXOUTS)
! fittermax_rangewarning(gate_class, GATE_C74MAXOUTS, "outlets");
nouts++; /* for convenience (the cost is one pointer) */
if (!(outs = (t_outlet **)getbytes(nouts * sizeof(*outs))))
***************
*** 148,150 ****
--- 146,149 ----
class_addlist(gate_proxy_class, gate_proxy_list);
class_addanything(gate_proxy_class, gate_proxy_anything);
+ fitter_setup(gate_class, 0, 0);
}
Index: switch.c
===================================================================
RCS file: /cvsroot/pure-data/externals/miXed/cyclone/hammer/switch.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** switch.c 8 Dec 2004 15:40:11 -0000 1.3
--- switch.c 11 Jan 2005 10:33:19 -0000 1.4
***************
*** 1,3 ****
! /* Copyright (c) 2002-2003 krzYszcz and others.
* For information on usage and redistribution, and for a DISCLAIMER OF ALL
* WARRANTIES, see the file, "LICENSE.txt," in this distribution. */
--- 1,3 ----
! /* Copyright (c) 2002-2005 krzYszcz and others.
* For information on usage and redistribution, and for a DISCLAIMER OF ALL
* WARRANTIES, see the file, "LICENSE.txt," in this distribution. */
***************
*** 5,8 ****
--- 5,9 ----
#include "m_pd.h"
#include "common/loud.h"
+ #include "common/fitter.h"
#define SWITCH_MININLETS 2 /* LATER consider using 1 (with a warning) */
***************
*** 104,111 ****
nproxies = SWITCH_DEFINLETS;
if (nproxies > SWITCH_C74MAXINLETS)
! {
! shared_usecompatibility();
! loud_incompatible_max(switch_class, SWITCH_C74MAXINLETS, "inlets");
! }
if (!(proxies = (t_pd **)getbytes(nproxies * sizeof(*proxies))))
return (0);
--- 105,109 ----
nproxies = SWITCH_DEFINLETS;
if (nproxies > SWITCH_C74MAXINLETS)
! fittermax_rangewarning(switch_class, SWITCH_C74MAXINLETS, "inlets");
if (!(proxies = (t_pd **)getbytes(nproxies * sizeof(*proxies))))
return (0);
***************
*** 153,155 ****
--- 151,154 ----
class_addlist(switch_proxy_class, switch_proxy_list);
class_addanything(switch_proxy_class, switch_proxy_anything);
+ fitter_setup(switch_class, 0, 0);
}
Index: pv.c
===================================================================
RCS file: /cvsroot/pure-data/externals/miXed/cyclone/hammer/pv.c,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
*** pv.c 23 May 2003 12:29:48 -0000 1.1.1.1
--- pv.c 11 Jan 2005 10:33:19 -0000 1.2
***************
*** 76,80 ****
pd_bind(&pl->l_pd, s);
}
! else bug("pv_getlist");
}
return (pl);
--- 76,80 ----
pd_bind(&pl->l_pd, s);
}
! else loudbug_bug("pv_getlist");
}
return (pl);
***************
*** 194,200 ****
{
if (mypf)
! bug("pv_getfamily 1: %s in %s",
! mypf->f_name->s_name,
! mypf->f_glist->gl_name->s_name);
else
return (0);
--- 194,200 ----
{
if (mypf)
! loudbug_bug("pv_getfamily 1: %s in %s",
! mypf->f_name->s_name,
! mypf->f_glist->gl_name->s_name);
else
return (0);
***************
*** 221,230 ****
}
}
! if (!pf) bug("pv_getfamily 2");
}
pvfamily_free(mypf);
}
}
! else bug("pv_getfamily 3");
pvlist_decrement(pl);
}
--- 221,230 ----
}
}
! if (!pf) loudbug_bug("pv_getfamily 2");
}
pvfamily_free(mypf);
}
}
! else loudbug_bug("pv_getfamily 3");
pvlist_decrement(pl);
}
***************
*** 245,252 ****
return (pf);
}
! else bug("pv_getfamily 4");
}
}
! else bug("pv_getfamily 5");
return (0);
}
--- 245,252 ----
return (pf);
}
! else loudbug_bug("pv_getfamily 4");
}
}
! else loudbug_bug("pv_getfamily 5");
return (0);
}
***************
*** 256,260 ****
if (!x->x_family)
{
! bug("pv_checkfamily");
x->x_family = pv_getfamily(x->x_glist, x->x_name, 0, 0);
}
--- 256,260 ----
if (!x->x_family)
{
! loudbug_bug("pv_checkfamily");
x->x_family = pv_getfamily(x->x_glist, x->x_name, 0, 0);
}
Index: Makefile.objects
===================================================================
RCS file: /cvsroot/pure-data/externals/miXed/cyclone/hammer/Makefile.objects,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** Makefile.objects 8 Dec 2004 15:40:11 -0000 1.3
--- Makefile.objects 11 Jan 2005 10:33:19 -0000 1.4
***************
*** 5,8 ****
--- 5,9 ----
common/loud.o \
common/grow.o \
+ common/fitter.o \
common/rand.o \
common/vefl.o \
Index: Append.c
===================================================================
RCS file: /cvsroot/pure-data/externals/miXed/cyclone/hammer/Append.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** Append.c 8 Dec 2004 15:40:11 -0000 1.3
--- Append.c 11 Jan 2005 10:33:19 -0000 1.4
***************
*** 1,3 ****
! /* Copyright (c) 2002-2004 krzYszcz and others.
* For information on usage and redistribution, and for a DISCLAIMER OF ALL
* WARRANTIES, see the file, "LICENSE.txt," in this distribution. */
--- 1,3 ----
! /* Copyright (c) 2002-2005 krzYszcz and others.
* For information on usage and redistribution, and for a DISCLAIMER OF ALL
* WARRANTIES, see the file, "LICENSE.txt," in this distribution. */
***************
*** 7,10 ****
--- 7,11 ----
#include "common/loud.h"
#include "common/grow.h"
+ #include "common/fitter.h"
#define APPEND_INISIZE 32 /* LATER rethink */
***************
*** 34,37 ****
--- 35,41 ----
static t_class *appendxy_class;
+ static t_symbol *appendps_compatibility = 0;
+ static t_symbol *appendps_max;
+
/* Usually a preallocation method is used, except in special cases of:
1) reentrant output request, or 2) an output request which would cause
***************
*** 43,47 ****
messages are postponed, using an auxiliary buffer. */
! /* Any Append's output goes through outlet_anything() -> typedmess() */
static void append_setnatoms(t_append *x, int natoms)
--- 47,52 ----
messages are postponed, using an auxiliary buffer. */
! /* Any Append's output, except bangout, goes through
! outlet_anything() -> typedmess(), LATER rethink */
static void append_setnatoms(t_append *x, int natoms)
***************
*** 51,54 ****
--- 56,84 ----
}
+ static void append_bangout(t_outlet *outp, int ac, t_atom *av)
+ {
+ if (ac)
+ {
+ if (av->a_type == A_SYMBOL)
+ outlet_anything(outp, av->a_w.w_symbol, ac-1, av+1);
+ else if (av->a_type == A_POINTER)
+ {
+ if (ac == 1)
+ outlet_pointer(outp, av->a_w.w_gpointer);
+ else
+ outlet_list(outp, &s_list, ac, av);
+ }
+ else if (av->a_type == A_FLOAT)
+ {
+ if (ac == 1)
+ outlet_float(outp, av->a_w.w_float);
+ else
+ outlet_list(outp, &s_list, ac, av);
+ }
+ else loudbug_bug("append_bangout");
+ }
+ else outlet_bang(outp);
+ }
+
static void append_anything(t_append *x, t_symbol *s, int ac, t_atom *av)
{
***************
*** 78,82 ****
if (ac)
memcpy(buf, av, ac * sizeof(*buf));
! outlet_anything(((t_object *)x)->ob_outlet, s, ntotal, buf);
}
else
--- 108,115 ----
if (ac)
memcpy(buf, av, ac * sizeof(*buf));
! if (s)
! outlet_anything(((t_object *)x)->ob_outlet, s, ntotal, buf);
! else
! append_bangout(((t_object *)x)->ob_outlet, ntotal, buf);
}
else
***************
*** 89,93 ****
if (x->x_natoms)
memcpy(buf + ac, x->x_message, x->x_natoms * sizeof(*buf));
! outlet_anything(((t_object *)x)->ob_outlet, s, ntotal, buf);
freebytes(buf, ntotal * sizeof(*buf));
}
--- 122,129 ----
if (x->x_natoms)
memcpy(buf + ac, x->x_message, x->x_natoms * sizeof(*buf));
! if (s)
! outlet_anything(((t_object *)x)->ob_outlet, s, ntotal, buf);
! else
! append_bangout(((t_object *)x)->ob_outlet, ntotal, buf);
freebytes(buf, ntotal * sizeof(*buf));
}
***************
*** 120,124 ****
static void append_bang(t_append *x)
{
! /* CHECKED: a nop */
}
--- 156,164 ----
static void append_bang(t_append *x)
{
! if (appendps_compatibility == appendps_max)
! {
! /* CHECKED: a nop */
! }
! else append_anything(x, 0, 0, 0);
}
***************
*** 204,211 ****
static void append_set(t_append *x, t_symbol *s, int ac, t_atom *av)
{
! if (shared_getmaxcompatibility())
! append_doset(x, 0, ac, av);
! else
append_anything(x, s, ac, av);
}
--- 244,252 ----
static void append_set(t_append *x, t_symbol *s, int ac, t_atom *av)
{
! if (x->x_proxy)
append_anything(x, s, ac, av);
+ else
+ /* LATER (when?) controlled by maxmode */
+ append_doset(x, 0, ac, av);
}
***************
*** 254,258 ****
if (x->x_auxbuf)
{
! bug("append_free"); /* LATER rethink */
freebytes(x->x_auxbuf, x->x_auxsize * sizeof(*x->x_auxbuf));
}
--- 295,299 ----
if (x->x_auxbuf)
{
! loudbug_bug("append_free"); /* LATER rethink */
freebytes(x->x_auxbuf, x->x_auxsize * sizeof(*x->x_auxbuf));
}
***************
*** 270,274 ****
x->x_entered = 0;
append_setnatoms(x, 0);
- shared_usecompatibility();
if (ac)
{
--- 311,314 ----
***************
*** 308,310 ****
--- 348,353 ----
class_addlist(appendxy_class, appendxy_list);
class_addanything(appendxy_class, appendxy_anything);
+
+ appendps_max = gensym("max");
+ fitter_setup(append_class, &appendps_compatibility, 0);
}
Index: Table.c
===================================================================
RCS file: /cvsroot/pure-data/externals/miXed/cyclone/hammer/Table.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** Table.c 10 Dec 2004 20:47:02 -0000 1.7
--- Table.c 11 Jan 2005 10:33:19 -0000 1.8
***************
*** 359,363 ****
tablecommon_class))
{
! bug("table_checkcommon");
return (0);
}
--- 359,363 ----
tablecommon_class))
{
! loudbug_bug("table_checkcommon");
return (0);
}
***************
*** 797,801 ****
int i = 0;
while (x1) i++, x1 = x1->x_next;
! post("refcount %d", i);
}
}
--- 797,801 ----
int i = 0;
while (x1) i++, x1 = x1->x_next;
! loudbug_post("refcount %d", i);
}
}