...
 
Commits (133)
......@@ -32,3 +32,4 @@ packages/linux_make/build/
pd/src/makefile
l2ork_addons/cwiid/defs.mak
CVS
.DS_Store
......@@ -87,6 +87,18 @@ ifneq ($(prefix),)
env = inst_dir="$(prefix)"
endif
install_vars = DESTDIR=$(firstword $(wildcard $(CURDIR)/packages/*/build)) prefix=$(prefix)
# You can set CFLAGS to whatever special compile options are needed. E.g., to
# build the double precision version: CFLAGS = -DPD_FLOATSIZE=64
CFLAGS =
export CFLAGS
# You can also set this variable to specify externals NOT to be built. E.g.,
# to prevent building Gem (which takes an eternity to build): blacklist = gem
blacklist =
export blacklist
all:
cd l2ork_addons && $(env) ./tar_em_up.sh -Tk
......@@ -96,11 +108,28 @@ incremental:
light:
cd l2ork_addons && $(env) ./tar_em_up.sh -tkl
# Convenience targets to build the double precision version.
# Blacklist of externals which don't work with double precision yet.
double_blacklist = autotune smlib
# These are dubious, passing float* for t_float* pointers, and so are most
# likely broken, even though they compile with double precision.
double_blacklist += cyclone lyonpotpourri
all-double:
cd l2ork_addons && $(env) CFLAGS=-DPD_FLOATSIZE=64 blacklist="$(double_blacklist)" ./tar_em_up.sh -Tk
incremental-double:
cd l2ork_addons && $(env) CFLAGS=-DPD_FLOATSIZE=64 blacklist="$(double_blacklist)" ./tar_em_up.sh -tk
light-double:
cd l2ork_addons && $(env) CFLAGS=-DPD_FLOATSIZE=64 blacklist="$(double_blacklist)" ./tar_em_up.sh -tkl
%_abs:
make -C abstractions $(@:%_abs=%_install) DESTDIR=$(firstword $(wildcard $(CURDIR)/packages/*/build)) prefix=$(prefix)
make -C abstractions $(@:%_abs=%) $(@:%_abs=%_install) $(install_vars)
%_ext:
make -C externals $(@:%_ext=%_install) DESTDIR=$(firstword $(wildcard $(CURDIR)/packages/*/build)) prefix=$(prefix)
make -C externals $(@:%_ext=%) $(@:%_ext=%_install) $(install_vars)
checkout:
git submodule update --init
......
......@@ -110,7 +110,7 @@ at the beginning of the Makefile for more information.
#### Linux
Time to build: *40 minutes to 1.5 hours*
Time to build: *10 minutes light install, 45 minutes to 1.5 hours full install*
Hard drive space required: *roughly 2.5 GB*
1. Install the dependencies
......@@ -129,26 +129,23 @@ Hard drive space required: *roughly 2.5 GB*
flite1-dev libgsm1-dev libgtk2.0-dev git libstk0-dev \
libsndobj-dev libfluidsynth-dev fluid-soundfont-gm byacc
2. Clone the Purr-Data repository *(10 minutes)*
2. The gui toolkit may require installing the following extra dependencies
sudo apt-get install gconf2 libnss3
git clone https://git.purrdata.net/jwilkes/purr-data.git
4. Change to the directory
cd purr-data/l2ork_addons
5. Run the installer *(15 minutes)*
Choose one of the following options:
* to build a deb installer, type `./tar_em_up.sh -B`
* to build an rpi deb installer, type `./tar_em_up.sh -R`
* for a generic tar installer type `./tar_em_up.sh -F`
3. Clone the Purr-Data repository *(2 to 10 minutes)*
6. When the installer finishes, type
git clone https://git.purrdata.net/jwilkes/purr-data.git
cd ..
4. Compile the code *(5 minutes to 1.5 hours)* full
7. There should now be a .deb file in your current directory
* to build only the core: `make light` *(5 minutes)*
* to build core and all externals: `make all` *(20 minutes to 1.5 hours)*
* to build everything *except* Gem: `make incremental` *(10 to 20 minutes)*
5. There should now be an installer file in the main directory of the repo.
If you're using an apt-based Linux distribution it will be an apt package.
Otherwise, it will be a tarball which you can unzip, enter, and run
`make install` (as well as `make uninstall` to remove it).
To install using a pre-compiled binary, follow these instructions:
http://l2ork.music.vt.edu/main/?page_id=56
......@@ -231,7 +228,16 @@ that case, but I haven't tested doing it like that. Sorry. Get a better OS...)
4. Install the dependencies *(5-10 minutes)*
Once the shell opens, we need to install the dependencies for building
Purr Data. Issue the following command:
Purr Data. First we need to update all the packages:
pacman -Syu
After closing and reopening the shell as prompted, you may need to do it
again:
pacman -Syu
Now everything should be up-to-date. Issue the following command:
pacman -S autoconf automake git libtool \
make mingw-w64-i686-dlfcn mingw-w64-i686-fftw \
......@@ -339,6 +345,18 @@ Here are some of the current tasks:
And Mathieu Bouchard's "pure unity" (not sure if this is the most
recent link...):
http://sourceforge.net/p/pure-data/svn/HEAD/tree/tags/externals/pureunity/pureunity-0.0/
* adding support for double precision to the external libraries that ship with purr-data
* skills needed: knowledge about data types in C language(specially float and double)
* status: the core classes of purr data and the freeverb~ external library
have been changed to support both float and double but still the remaining
external libraries only have support for single precision.
The task ahead is to add double precision support to these external libraries.
As per the current resources we have the merge requests that have been used to add double
precision support to the core libraries:
https://git.purrdata.net/jwilkes/purr-data/merge_requests?scope=all&utf8=%E2%9C%93&state=merged&author_username=pranay_36
And Katja Vetter's double precision patches to the pd-double project which were
actually used for adding double precision support to the core libraries of purr-data.
https://github.com/pd-projects/pd-double/commit/982ad1aa1a82b9bcd29c5b6a6e6b597675d5f300
### Human Interface Guidelines
......
......@@ -44,7 +44,7 @@ DEST_PATHS = BUILDLAYOUT_DIR=$(BUILDLAYOUT_DIR) \
BUILDSRC_OS_NAME = $(OS_NAME)
WARN_FLAGS = -Wall -W -Wno-unused-parameter
CFLAGS = -DPD -I$(pd_src)/src $(WARN_FLAGS) $(DEBUG_CFLAGS) -I$(gem_src)/src
CFLAGS = -DPD -I$(pd_src)/src $(WARN_FLAGS) $(DEBUG_CFLAGS) $(CFLAGS_ADD) -I$(gem_src)/src
LDFLAGS =
LIBS = -lm
......@@ -131,41 +131,42 @@ CXXFLAGS = $(CFLAGS)
# building scripts rely on it being that way.
ifeq ($(LIGHT),yes)
# minimal set of extensions for the "light" build
LIB_TARGETS = loaders-libdir pddp
lib_targets = loaders-libdir pddp
INCREMENTAL = yes
else
LIB_TARGETS = adaptive arraysize autotune bassemu boids bsaylor comport creb cxc cyclone disis earplug ekext ext13 fftease fluid freeverb ggee hcs iem_ambi iem_bin_ambi iemlib iemgui iemguts iem_adaptfilt iemmatrix iemxmlrpc iem_delay iem_roomsim iem_spec2 iem_tab jasch_lib loaders-libdir lyonpotpourri mapping markex maxlib mjlib moocow moonlib motex mrpeach oscx pan pdcontainer pddp pdlua pdogg plugin pmpd rjlib sigpack smlib tof unauthorized vbap windowing zexy
lib_targets = adaptive arraysize autotune bassemu boids bsaylor comport creb cxc cyclone disis earplug ekext ext13 fftease flatgui fluid freeverb ggee hcs iem_ambi iem_bin_ambi iemlib iemgui iemguts iem_adaptfilt iemmatrix iemxmlrpc iem_delay iem_roomsim iem_spec2 iem_tab jasch_lib loaders-libdir lyonpotpourri mapping markex maxlib mjlib moocow moonlib motex mrpeach oscx pan pdcontainer pddp pdlua pdogg plugin pmpd rjlib sigpack smlib tof unauthorized vbap windowing zexy
endif
# DISABLED: flatgui
# NEW (IN-PROGRESS): flext
# this is for libraries that don't compile (yet) on all platforms
ifneq ($(LIGHT),yes)
ifeq ($(OS_NAME),windows)
ifneq ($(INCREMENTAL),yes)
LIB_TARGETS += gem
lib_targets += gem
endif
else
ifeq ($(OS_NAME),darwin)
# on Mac OS X 10.6/Snow Leopard don't build hid since it needs Carbon
LIB_TARGETS += pdp iem16 apple
lib_targets += pdp iem16 apple
ifneq ($(shell uname -r | sed 's|10\.[0-9][0-9]*\.[0-9][0-9]*|10|'),10)
LIB_TARGETS +=
lib_targets +=
endif
else ifneq ($(LIGHT),yes)
# GNU/Linux, BSD, IRIX, etc. (we use exported variable INCREMENTAL to
# avoid rebuilding entire Gem lib that takes a long time to compile)
ifeq ($(INCREMENTAL),yes)
LIB_TARGETS += hid pdp iem16
lib_targets += hid pdp iem16
else
LIB_TARGETS += gem pdp hid iem16
lib_targets += gem pdp hid iem16
endif
endif
endif
endif # ifneq ($(LIGHT),yes)
# filter out blacklist of all targets NOT to be built
LIB_TARGETS = $(filter-out $(blacklist),$(lib_targets))
#------------------------------------------------------------------------------#
all: $(LIB_TARGETS)
......@@ -441,9 +442,12 @@ cxc_clean:
#------------------------------------------------------------------------------#
# CYCLONE
# AG: this external provides no sane way to pass custom CFLAGS, so we abuse
# WARN_CFLAGS for that purpose.
cyclone:
make -C $(externals_src)/miXed/cyclone -f Makefile.libdir \
PD_PATH=$(pd_src) PD_INCLUDE=$(DESTDIR)$(includedir)
PD_PATH=$(pd_src) PD_INCLUDE=$(DESTDIR)$(includedir) WARN_CFLAGS="-Wall -W -Wstrict-prototypes -Wno-unused -Wno-parentheses -Wno-switch $(CFLAGS_ADD)"
cyclone_install:
make -C $(externals_src)/miXed/cyclone -f Makefile.libdir \
......@@ -463,7 +467,7 @@ ifneq ($(OS_NAME),darwin)
./configure --with-python=python2 && make
endif
endif
make -C $(externals_src)/disis PD_PATH=$(pd_src) pdbinpath=$(pd_src)/src
make -C $(externals_src)/disis PD_PATH=$(pd_src) pdbinpath=$(pd_src)/src CFLAGS="$(CFLAGS_ADD)"
disis_install:
make -C $(externals_src)/disis \
......@@ -506,7 +510,7 @@ ext13_clean:
FFTEASE_NAME=fftease
fftease:
make -C $(externals_src)/$(FFTEASE_NAME) PD_PATH=$(pd_src)
make -C $(externals_src)/$(FFTEASE_NAME) PD_PATH=$(pd_src) CFLAGS="$(CFLAGS_ADD)"
fftease_install:
#make -C $(externals_src)/$(FFTEASE_NAME) DESTDIR="$(DESTDIR)" \
......@@ -532,16 +536,21 @@ fftease_clean:
#------------------------------------------------------------------------------#
# FLATGUI
#
# Right now we're just building footils/knob and throwing it in the flatgui
# external directory for compatibility
#
flatgui:
make -C $(externals_src)/flatgui CFLAGS="$(CFLAGS)" \
PD_PATH=$(pd_src) PD_INCLUDE=$(pd_src)/src
make -C $(externals_src)/footils/knob CFLAGS="$(CFLAGS)" \
PD_PATH=$(pd_src) pdbinpath=$(pd_src)/src \
PD_INCLUDE=$(pd_src)/src
flatgui_install:
make -C $(externals_src)/flatgui STRIP="$(STRIP)" \
make -C $(externals_src)/footils/knob STRIP="$(STRIP)" \
DESTDIR="$(DESTDIR)" objectsdir="$(objectsdir)" install
flatgui_clean:
make -C $(externals_src)/flatgui clean
make -C $(externals_src)/footils/knob clean
#------------------------------------------------------------------------------#
# FLEXT and FLEXT externals
......@@ -621,7 +630,7 @@ flib_clean:
fluid:
make -C $(externals_src)/fluid~ PD_PATH=$(pd_src) \
pdbinpath=$(pd_src)/src
pdbinpath=$(pd_src)/src CFLAGS="$(CFLAGS_ADD)"
fluid_install:
make -C $(externals_src)/fluid~ DESTDIR="$(DESTDIR)" \
......@@ -650,7 +659,7 @@ $(gem_src)/configure:
$(gem_src)/Gem.dll: $(gem_src)/configure
cd $(gem_src) && ./configure \
CXXFLAGS="-DHAVE_S_STUFF_H" \
CXXFLAGS="-DHAVE_S_STUFF_H $(CFLAGS_ADD)" \
--host=i686-w64-mingw32 \
--without-ALL \
--with-jpeg \
......@@ -668,7 +677,7 @@ $(gem_src)/Gem.dll: $(gem_src)/configure
$(gem_src)/Gem.pd_linux: $(gem_src)/configure
test -s $(gem_src)/Gem.pd_linux || \
cd $(gem_src) && ./configure \
CXXFLAGS="-DHAVE_S_STUFF_H" \
CXXFLAGS="-DHAVE_S_STUFF_H $(CFLAGS_ADD)" \
--prefix=$(prefix) \
--with-video=plugins \
--with-film=plugins \
......@@ -677,7 +686,7 @@ $(gem_src)/Gem.pd_linux: $(gem_src)/configure
$(gem_src)/Gem.pd_darwin: $(gem_src)/configure
cd $(gem_src) && ./configure \
CXXFLAGS="-DHAVE_S_STUFF_H" \
CXXFLAGS="-DHAVE_S_STUFF_H $(CFLAGS_ADD)" \
PKG_FTGL_CFLAGS="-I/sw/include -I/sw/include/freetype2 -I/sw/include/FTGL" \
--prefix=$(prefix) \
--libdir=$(objectsdir) \
......@@ -1141,7 +1150,7 @@ LYON_SRC=lyonpotpourri
LYON_DEST=lyonpotpourri
lyonpotpourri:
make -C $(externals_src)/$(LYON_SRC) PD_PATH=$(pd_src)
make -C $(externals_src)/$(LYON_SRC) PD_PATH=$(pd_src) CFLAGS="$(CFLAGS_ADD)"
lyonpotpourri_install:
#make -C $(externals_src)/$(LYON_SRC) DESTDIR="$(DESTDIR)" \
......
......@@ -21,7 +21,7 @@ LIBS = -L../../../pd/bin -lc -lm
LIBOSC = ../libOSC/libOSC.a
CFLAGS = -g -O2 -DUNIX -Wall -Wimplicit -Wunused -Wmissing-prototypes -O1 -fPIC -I../libOSC -I../../pd/src -I../../../pd/src -I../src
INCLUDES = -I../libOSC -I../../pd/src -I../../../pd/src -I../src
INCLUDES = -I../libOSC -I../../pd/src -I../../../pd/src -I../src -I/usr/include/tirpc
LDFLAGS = -Wl,--export-dynamic -shared
prefix=/usr/local
......
......@@ -21,7 +21,7 @@ LIBS = @LIBS@
LIBOSC = ../libOSC/@LIBOSC@
CFLAGS = @CFLAGS@
INCLUDES = @INCLUDES@
INCLUDES = @INCLUDES@ -I/usr/include/tirpc
LDFLAGS = @LDFLAGS@
prefix=@prefix@
......
This diff is collapsed.
This diff is collapsed.
NAME=knob
CSYM=knob
# !!!
# change these two
PD_DIR=../../../pd
#current: pd_nt pd_linux
current: pd_linux
# ----------------------- NT -----------------------
pd_nt: $(NAME).dll
.SUFFIXES: .dll
PDNTCFLAGS = /W3 /WX /O2 /G6 /DNT /DPD /nologo
# where is VC++ ???
VC="C:\Programme\Microsoft Visual Studio\VC98"
# where is your m_pd.h ???
PDNTINCLUDE = /I. /Ic:\pd\tcl\include /Ic:\pd\src /I$(VC)\include /Iinclude
PDNTLDIR = $(VC)\Lib
PDNTLIB = $(PDNTLDIR)\libc.lib \
$(PDNTLDIR)\oldnames.lib \
$(PDNTLDIR)\kernel32.lib \
$(PDNTLDIR)\user32.lib \
$(PDNTLDIR)\uuid.lib \
$(PDNTLDIR)\ws2_32.lib \
c:\pd\bin\pd.lib
.c.dll:
cl $(PDNTCFLAGS) $(PDNTINCLUDE) /c $*.c
link /dll /export:$(CSYM)_setup $*.obj $(PDNTLIB)
# ----------------------- IRIX 5.x -----------------------
pd_irix5: $(NAME).pd_irix5
.SUFFIXES: .pd_irix5
SGICFLAGS5 = -o32 -DPD -DUNIX -DIRIX -O2
SGIINCLUDE = -I../../src
.c.pd_irix5:
cc $(SGICFLAGS5) $(SGIINCLUDE) -o $*.o -c $*.c
ld -elf -shared -rdata_shared -o $*.pd_irix5 $*.o
rm $*.o
# ----------------------- IRIX 6.x -----------------------
pd_irix6: $(NAME).pd_irix6
.SUFFIXES: .pd_irix6
SGICFLAGS6 = -n32 -DPD -DUNIX -DIRIX -DN32 -woff 1080,1064,1185 \
-OPT:roundoff=3 -OPT:IEEE_arithmetic=3 -OPT:cray_ivdep=true \
-Ofast=ip32
.c.pd_irix6:
cc $(SGICFLAGS6) $(SGIINCLUDE) -o $*.o -c $*.c
ld -n32 -IPA -shared -rdata_shared -o $*.pd_irix6 $*.o
rm $*.o
# ----------------------- LINUX i386 -----------------------
pd_linux: $(NAME).pd_linux
.SUFFIXES: .pd_linux
LINUXCFLAGS = -DPD -DUNIX -O2 -funroll-loops -fomit-frame-pointer \
-Wall -W -Wshadow -Wstrict-prototypes -Werror \
-Wno-unused -Wno-parentheses -Wno-switch
# where is your m_pd.h ???
LINUXINCLUDE = -I../../src -I$(PD_DIR)/src
.c.pd_linux:
cc -O2 -Wall -DPD -fPIC $(LINUXINCLUDE) -c $*.c
ld --export-dynamic -shared -o $*.pd_linux $*.o -lc
strip $*.pd_linux
# ----------------------------------------------------------
install:
cp help-*.pd ../../doc/5.reference
clean:
rm -f *.o *.pd_* so_locations
# Makefile for mylib
lib.name = flatgui
class.sources = knob.c
# ldlibs = -lfluidsynth
datafiles = knob-help.pd clock.pd README
externalsdir = ../../
include Makefile.pdlibbuilder.revised
......@@ -143,26 +143,13 @@ typedef struct _freeverb
//#define FIX_DENORM_NAN_FLOAT(v);
//#endif
typedef union ulf
{
unsigned long ul;
float f;
} ulf;
static inline float fix_denorm_nan_float(float v);
static inline float fix_denorm_nan_float(t_float v);
static inline float fix_denorm_nan_float(float v)
static inline float fix_denorm_nan_float(t_float v)
{
#ifndef IRIX
ulf u;
u.f = v;
if ((((u.ul & 0x7f800000) == 0L) && (u.f != 0.f)) || ((u.ul & 0x7f800000) == 0x7f800000))
/* if the float is denormal or NaN, return 0.0 */
v = 0.0f;
//return 0.0f;
#endif //IRIX
return v;
if (PD_BADFLOAT(v))
v = 0.0f;
return v;
}
/* we need prototypes for Mac for everything */
......
This diff is collapsed.
This diff is collapsed.
......@@ -106,9 +106,8 @@ typedef struct _scope
int x_frozen;
t_clock *x_clock;
t_pd *x_handle;
int scale_offset_x;
int scale_offset_y;
int scale_offset_x;
int scale_offset_y;
} t_scope;
typedef struct _scopehandle
......@@ -118,6 +117,9 @@ typedef struct _scopehandle
t_symbol *h_bindsym;
char h_pathname[64];
char h_outlinetag[64];
int h_adjust_x;
int h_adjust_y;
int h_constrain;
int h_dragon;
int h_dragx;
int h_dragy;
......@@ -992,49 +994,16 @@ static void scope_tick(t_scope *x)
scope_clear(x, 1);
}
static void scopehandle__clickhook(t_scopehandle *sh, t_floatarg f, t_floatarg xxx, t_floatarg yyy)
extern void canvas_apply_setundo(t_canvas *x, t_gobj *y);
static void scopehandle__clickhook(t_scopehandle *sh, t_floatarg f,
t_floatarg xxx, t_floatarg yyy)
{
t_scope *x = sh->h_master;
//if (xxx) x->scale_offset_x = xxx;
//if (yyy) x->scale_offset_y = yyy;
//int newstate = (int)f;
//if (sh->h_dragon && newstate == 0)
//{
// /* done dragging */
// t_canvas *cv;
// if (sh->h_dragx || sh->h_dragy)
// {
// x->x_width = x->x_width + sh->h_dragx - x->scale_offset_x;
// x->x_height = x->x_height + sh->h_dragy - x->scale_offset_y;
// }
// if (cv = scope_isvisible(x))
// {
// sys_vgui(".x%x.c delete %s\n", cv, sh->h_outlinetag);
// scope_revis(x, cv);
// sys_vgui("destroy %s\n", sh->h_pathname);
// scope_select((t_gobj *)x, x->x_glist, 1);
// canvas_fixlinesfor(x->x_glist, (t_text *)x); /* 2nd inlet */
// }
//}
//else if (!sh->h_dragon && newstate)
//{
// /* dragging */
// t_canvas *cv;
// if (cv = scope_isvisible(x))
// {
// int x1, y1, x2, y2;
// scope_getrect((t_gobj *)x, x->x_glist, &x1, &y1, &x2, &y2);
// sys_vgui("lower %s\n", sh->h_pathname);
// sys_vgui(".x%x.c create rectangle %d %d %d %d\
// -outline $select_color -width %f -tags %s\n",
// cv, x1, y1, x2, y2, SCOPE_SELBDWIDTH, sh->h_outlinetag);
// }
// sh->h_dragx = 0;
// sh->h_dragy = 0;
//}
/* Use constrained dragging. See g_canvas.c clickhook */
sh->h_constrain = (int)f;
sh->h_adjust_x = xxx - (((t_object *)x)->te_xpix + x->x_width);
sh->h_adjust_y = yyy - (((t_object *)x)->te_ypix + x->x_height);
canvas_apply_setundo(x->x_glist, (t_gobj *)x);
sh->h_dragon = f;
}
......@@ -1042,10 +1011,13 @@ static void scopehandle__motionhook(t_scopehandle *sh,
t_floatarg mouse_x, t_floatarg mouse_y)
{
t_scope *x = (t_scope *)(sh->h_master);
int x1, y1, x2, y2, width, height;
scope_getrect((t_gobj *)x, x->x_glist, &x1, &y1, &x2, &y2);
width = mouse_x - x1;
height = mouse_y - y1;
int width = (sh->h_constrain == CURSOR_EDITMODE_RESIZE_Y) ?
x->x_width :
(int)mouse_x - text_xpix((t_text *)x, x->x_glist) - sh->h_adjust_x;
int height = (sh->h_constrain == CURSOR_EDITMODE_RESIZE_X) ?
x->x_height :
(int)mouse_y - text_ypix((t_text *)x, x->x_glist) - sh->h_adjust_y;
x->x_width = width < SCOPE_MINWIDTH ? SCOPE_MINWIDTH : width;
x->x_height = height < SCOPE_MINHEIGHT ? SCOPE_MINHEIGHT : height;
......@@ -1058,25 +1030,6 @@ static void scopehandle__motionhook(t_scopehandle *sh,
scope_vis((t_gobj *)x, x->x_glist, 0);
scope_vis((t_gobj *)x, x->x_glist, 1);
}
//if (sh->h_dragon)
//{
// t_scope *x = sh->h_master;
// int dx = (int)f1, dy = (int)f2;
// int x1, y1, x2, y2, newx, newy;
// scope_getrect((t_gobj *)x, x->x_glist, &x1, &y1, &x2, &y2);
// newx = x2 - x->scale_offset_x + dx;
// newy = y2 - x->scale_offset_y + dy;
// if (newx > x1 + SCOPE_MINWIDTH && newy > y1 + SCOPE_MINHEIGHT)
// {
// t_canvas *cv;
// if (cv = scope_isvisible(x))
// sys_vgui(".x%x.c coords %s %d %d %d %d\n",
// cv, sh->h_outlinetag, x1, y1, newx, newy);
// sh->h_dragx = dx;
// sh->h_dragy = dy;
// }
//}
}
/* wrapper method for forwarding "scopehandle" data */
......@@ -1157,8 +1110,8 @@ static void *scope_new(t_symbol *s, int ac, t_atom *av)
sprintf(sh->h_outlinetag, "h%x", (int)sh);
sh->h_dragon = 0;
x->scale_offset_x = 0;
x->scale_offset_y = 0;
x->scale_offset_x = 0;
x->scale_offset_y = 0;
return (x);
}
......
......@@ -744,7 +744,7 @@ static void *mknob_new(t_symbol *s, int argc, t_atom *argv)
x->x_thick = 0;
iemgui_verify_snd_ne_rcv(&x->x_gui);
outlet_new(&x->x_gui.x_obj, &s_float);
x->x_gui.x_obj.te_iemgui = 1;
x->x_gui.x_obj.te_iemgui = 1;
x->x_gui.x_handle = scalehandle_new((t_object *)x,
x->x_gui.x_glist, 1, mknob__clickhook, mknob__motionhook);
......
......@@ -35,7 +35,7 @@
#define HAVE_PDP_QT 1
/* build pdp_sdl */
/* #undef HAVE_PDP_SDL */
#define HAVE_PDP_SDL 1
/* build pdp_v4l */
#define HAVE_PDP_V4L 1
......
......@@ -696,39 +696,43 @@ static void grid_bang(t_grid *x) {
static void grid__clickhook(t_scalehandle *sh, int newstate)
{
t_grid *x = (t_grid *)(sh->h_master);
if (newstate)
{
canvas_apply_setundo(x->x_glist, (t_gobj *)x);
}
/* Use constrained dragging-- see g_canvas.c clickhook */
sh->h_constrain = newstate;
sh->h_adjust_x = sh->h_offset_x -
(((t_object *)x)->te_xpix + x->x_width);
sh->h_adjust_y = sh->h_offset_y -
(((t_object *)x)->te_ypix + x->x_height);
canvas_apply_setundo(x->x_glist, (t_gobj *)x);
sh->h_dragon = newstate;
}
static void grid__motionhook(t_scalehandle *sh,
t_floatarg mouse_x, t_floatarg mouse_y)
{
if (sh->h_scale)
t_grid *x = (t_grid *)(sh->h_master);
int width = (sh->h_constrain == CURSOR_EDITMODE_RESIZE_Y) ?
x->x_width :
(int)mouse_x - text_xpix(&x->x_obj, x->x_glist) - sh->h_adjust_x;
int height = (sh->h_constrain == CURSOR_EDITMODE_RESIZE_X) ?
x->x_height :
(int)mouse_y - text_ypix(&x->x_obj, x->x_glist) - sh->h_adjust_y;
int minw = MIN_GRID_WIDTH,
minh = MIN_GRID_HEIGHT;
x->x_width = width < minw ? minw : width;
x->x_height = height < minh ? minh : height;
if (glist_isvisible(x->x_glist))
{
t_grid *x = (t_grid *)(sh->h_master);
int width = mouse_x - text_xpix(&x->x_obj, x->x_glist),
height = mouse_y - text_ypix(&x->x_obj, x->x_glist),
minw = MIN_GRID_WIDTH,
minh = MIN_GRID_HEIGHT;
x->x_width = width < minw ? minw : width;
x->x_height = height < minh ? minh : height;
if (glist_isvisible(x->x_glist))
{
grid_draw_configure(x, x->x_glist);
//scalehandle_unclick_scale(sh);
}
grid_draw_configure(x, x->x_glist);
//scalehandle_unclick_scale(sh);
}
int properties = gfxstub_haveproperties((void *)x);
if (properties)
{
int new_w = x->x_width + sh->h_dragx;
int new_h = x->x_height + sh->h_dragy;
properties_set_field_int(properties,"width",new_w);
properties_set_field_int(properties,"height",new_h);
}
int properties = gfxstub_haveproperties((void *)x);
if (properties)
{
int new_w = x->x_width + sh->h_dragx;
int new_h = x->x_height + sh->h_dragy;
properties_set_field_int(properties,"width",new_w);
properties_set_field_int(properties,"height",new_h);
}
}
......@@ -737,8 +741,9 @@ static void grid_click_for_resizing(t_grid *x, t_floatarg f,
t_floatarg xxx, t_floatarg yyy)
{
t_scalehandle *sh = (t_scalehandle *)x->x_handle;
sh->h_offset_x = (int)xxx;
sh->h_offset_y = (int)yyy;
grid__clickhook(sh, f);
// grid__clickhook(sh, f, xxx, yyy);
}
/* another wrapper for forwarding "scalehandle" motion data */
......
......@@ -206,7 +206,7 @@ extensions_install:
#------------------------------------------------------------------------------
# externals_install
externals_install:
$(MAKE) -C $(externals_src) $(DEST_PATHS) install INCREMENTAL=$(INCREMENTAL) LIGHT=$(LIGHT)
$(MAKE) -C $(externals_src) $(DEST_PATHS) install INCREMENTAL=$(INCREMENTAL) LIGHT=$(LIGHT) CFLAGS_ADD="$(CFLAGS)"
#------------------------------------------------------------------------------
......
......@@ -5,7 +5,7 @@
<key>defeatrt</key>
<string>0</string>
<key>flags</key>
<string>-helppath ~/Library/Pd-l2ork -helppath /Library/Pd-l2ork</string>
<string>-font-size 12 -helppath ~/Library/Pd-l2ork -helppath /Library/Pd-l2ork</string>
<key>loadlib1</key>
<string>libdir</string>
<key>loadlib2</key>
......
......@@ -5,7 +5,7 @@
<key>defeatrt</key>
<string>0</string>
<key>flags</key>
<string>-helppath ~/Library/Pd-l2ork -helppath /Library/Pd-l2ork</string>
<string>-font-size 12 -helppath ~/Library/Pd-l2ork -helppath /Library/Pd-l2ork</string>
<key>loadlib1</key>
<string>libdir</string>
<key>loadlib2</key>
......
standardpath: 1
verbose: 0
defeatrt: 0
flags: -font-size 12
loadlib1: libdir
loadlib2: Gem
loadlib3: cyclone
......
......@@ -7,3 +7,4 @@ nloadlib: 2
path1: ~/pd-l2ork-externals
path2: /usr/lib/pd-l2ork/extra/pddp
npath: 2
flags: -font-size 12
......@@ -108,7 +108,7 @@ ifneq ($(LIGHT),yes)
install -p $(bin_src)/libsystre-0.dll $(DESTDIR)$(bindir)/
install -p $(bin_src)/libtre-5.dll $(DESTDIR)$(bindir)/
# For fluid~
install -p $(bin_src)/libfluidsynth-1.dll $(DESTDIR)$(bindir)/
install -p $(bin_src)/libfluidsynth-2.dll $(DESTDIR)$(bindir)/
# For other external libs
install -p $(bin_src)/lua53.dll $(DESTDIR)$(bindir)/
#install -p $(bin_src)/pthreadGC2.dll $(DESTDIR)$(bindir)/
......
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Pd-extended]
"flags"=""
"flags"="-font-size 12"
"loadlib1"="libdir"
"loadlib2"="pddp"
"nloadlib"=2
......
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Pd-extended]
"flags"=""
"flags"="-font-size 12"
"loadlib1"="libdir"
"loadlib2"="Gem"
"loadlib3"="cyclone"
......
This diff is collapsed.
#N canvas 430 62 555 619 10;
#X obj 0 585 cnv 15 552 21 empty \$0-pddp.cnv.footer empty 20 12 0
14 -228856 -66577 0;
#X obj 0 0 cnv 15 552 40 empty \$0-pddp.cnv.header unpost 3 12 0 18
-204280 -1 0;
#X obj 0 279 cnv 3 550 3 empty \$0-pddp.cnv.inlets inlets 8 12 0 13
-228856 -1 0;
#N canvas 497 325 482 332 META 0;
#X text 12 145 LIBRARY internal;
#X text 12 185 WEBSITE http://crca.ucsd.edu/~msp/;
#X text 12 45 LICENSE SIBSD;
#X text 12 165 AUTHOR Miller Puckette;
#X text 12 225 HELP_PATCH_AUTHORS Jonathan Wilkes revised the patch
to conform to the PDDP template for Pd version 0.42.;
#X text 12 25 KEYWORDS control storage;
#X text 12 205 RELEASE_DATE 1997;
#X text 12 65 DESCRIPTION reroute console messages to an outlet;
#X text 12 85 INLET_0 anything;
#X text 12 125 OUTLET_1 anything;
#X text 12 105 OUTLET_0 symbol;
#X restore 500 587 pd META;
#X obj 0 336 cnv 3 550 3 empty \$0-pddp.cnv.outlets outlets 8 12 0
13 -228856 -1 0;
#X obj 0 503 cnv 3 550 3 empty \$0-pddp.cnv.argument arguments 8 12
0 13 -228856 -1 0;
#X obj 0 553 cnv 3 550 3 empty \$0-pddp.cnv.more_info more_info 8 12
0 13 -228856 -1 0;
#X obj 78 352 cnv 17 3 17 empty \$0-pddp.cnv.let.0 0 5 9 0 16 -228856
-162280 0;
#N canvas 215 545 428 131 Related_objects 0;
#X obj 1 1 cnv 15 425 20 empty \$0-pddp.cnv.subheading empty 3 12 0
14 -204280 -1 0;
#X text 7 1 [unpost] Related Objects;
#X obj 22 36 print;
#X restore 101 587 pd Related_objects;
#X obj 78 295 cnv 17 3 17 empty \$0-pddp.cnv.let.0 0 5 9 0 16 -228856
-162280 0;
#X obj 4 587 pddp/pddplink all_about_help_patches.pd -text Usage Guide
;
#X text 11 20 reroute console messages to an outlet;
#X obj 502 12 unpost;
#X msg 58 60 bad_method;
#X obj 58 112 unpost;
#X symbolatom 58 194 0 0 0 0 - - -;
#X text 98 351 symbol;
#X text 168 351 - outputs the console messages. The messages triggered
by the right outlet are split at newlines. Then each resulting line
is converted to a symbol and output in sequence. (This means a single
message to the inlet of [unpost] may trigger multiple messages to this
outlet.;
#X text 99 295 anything;
#X text 169 295 - then input is sent to the right outlet;
#X obj 78 432 cnv 17 3 17 empty \$0-pddp.cnv.let.1 1 5 9 0 16 -228856
-162280 0;
#X text 98 431 anything;
#X obj 91 163 print redirected;
#X msg 81 85 1;
#X obj 91 141 + 41;
#X msg 238 60 bad_method;
#X symbolatom 238 194 0 0 0 0 - - -;
#X obj 271 163 print redirected;
#X msg 261 85 1;
#X obj 271 141 + 41;
#X obj 238 112 unpost error;
#X text 319 112 <- only reroute errors;
#X text 168 431 - the message sent to the inlet is received to this
outlet. Any console messages which are triggered from the rest of object
chain connected below it will get forwarded to the left outlet. If
the "error" argument was given \, then only error messages will be
redirected to the left outlet.;
#X text 81 520 1) symbol;
#X text 171 520 - the symbol "error" will only redirect error messages.
All other console messages will get printed as usual.;
#X connect 13 0 14 0;
#X connect 14 0 15 0;
#X connect 14 1 24 0;
#X connect 23 0 14 0;
#X connect 24 0 22 0;
#X connect 25 0 30 0;
#X connect 28 0 30 0;
#X connect 29 0 27 0;
#X connect 30 0 26 0;
#X connect 30 1 29 0;
#N struct cat float x float y;
#N canvas 323 210 525 457 12;
#N canvas 367 202 450 346 version 0;
#N canvas 337 210 527 457 12;
#N canvas 634 205 452 371 version 0;
#X msg 61 51 l2ork_version;
#X obj 61 76 pdinfo;
#X obj 61 26 loadbang;
......@@ -14,6 +14,12 @@
#X msg 250 152 label \$1;
#X obj 250 127 makefilename Pd-%s;
#X obj 250 177 s \$0-vanilla_text;
#X obj 61 236 pdinfo;
#X obj 61 186 loadbang;
#X msg 61 286 label \$1;
#X msg 61 211 floatsize;
#X obj 61 261 makefilename %d;
#X obj 61 311 s \$0-precision_text;
#X connect 0 0 1 0;
#X connect 1 0 3 0;
#X connect 2 0 0 0;
......@@ -24,6 +30,11 @@
#X connect 8 0 6 0;
#X connect 10 0 12 0;
#X connect 11 0 10 0;
#X connect 13 0 17 0;
#X connect 14 0 16 0;
#X connect 15 0 18 0;
#X connect 16 0 13 0;
#X connect 17 0 15 0;
#X restore 18 416 pd version;
#X text 18 76 A real-time graphical programming environment for live
interactive computer music \, Pd-l2ork works on Linux \, Macintosh
......@@ -45,8 +56,8 @@ version of Pd-l2ork. An introduction to Purr Data can be found at:
#X text 18 360 Reference documentation for Pd lives in:;
#X obj 18 378 pddp/pddplink @pd_help/../1.manual/index.htm -text doc/1.manual/index.htm
;
#X obj 36 21 cnv 15 432 33 empty \$0-about_text Pd-l2ork 20 12 0 18
-261139 -1 0;
#X obj 36 21 cnv 15 432 33 empty \$0-about_text Pd-l2ork-2.7.0\ 20181225-rev.8f8acb4
20 12 0 18 -261139 -1 0;
#N canvas 430 372 450 323 cat 0;
#X obj 16 180 draw sprite ./cat;
#X obj 16 21 struct cat float x float y;
......@@ -65,6 +76,9 @@ version of Pd-l2ork. An introduction to Purr Data can be found at:
#X connect 6 0 0 0;
#X connect 7 0 4 0;
#X restore 454 416 pd cat;
#X scalar cat 383 82 \;;
#X scalar cat 391 64 \;;
#X obj 375 47 cnv 15 93 20 empty \$0-vanilla_text Pd-0.48.0 10 6 0
14 -216373 -1 0;
#X obj 393 378 cnv 15 31 20 empty \$0-precision_text 32 10 6 0 14 -262144
-1 0;
#X text 427 376 bit floats;
......@@ -67,6 +67,7 @@ decay and other times in msec
#include "ext_obex.h"
typedef double t_floatarg; /* from m_pd.h */
typedef float t_float; /* from m_pd.h */
#define flog log
#define fexp exp
#define fsqrt sqrt
......@@ -99,12 +100,12 @@ static t_class *bonk_class;
#define DEFOVERLAP 1
#define DEFFIRSTBIN 1
#define DEFMINBANDWIDTH 1.5
#define DEFHITHRESH 5
#define DEFHITHRESH 5.
#define DEFLOTHRESH 2.5
#define DEFMASKTIME 4
#define DEFMASKDECAY 0.7
#define DEFDEBOUNCEDECAY 0
#define DEFMINVEL 7
#define DEFMINVEL 7.
#define DEFATTACKBINS 1
#define MAXATTACKWAIT 4
......
......@@ -17,7 +17,7 @@ static t_class *choice_class;
typedef struct _elem
{
float e_age;
t_float e_age;
t_float e_weight[DIMENSION];
} t_elem;
......@@ -63,7 +63,7 @@ static void choice_add(t_choice *x, t_symbol *s, int argc, t_atom *argv)
{
int oldn = x->x_n, newn = oldn + 1, i;
t_elem *e;
float sum, normal;
t_float sum, normal;
x->x_vec = (t_elem *)resizebytes(x->x_vec, oldn * sizeof(t_elem),
newn * sizeof(t_elem));
x->x_n = newn;
......@@ -72,11 +72,11 @@ static void choice_add(t_choice *x, t_symbol *s, int argc, t_atom *argv)
for (i = 0, sum = 0; i < DIMENSION; i++)
{
float f = atom_getfloatarg(i, argc, argv);
t_float f = atom_getfloatarg(i, argc, argv);
e->e_weight[i] = f;
sum += f*f;
}
normal = (float)(sum > 0 ? 1./sqrt(sum) : 1);
normal = (t_float)(sum > 0 ? 1./sqrt(sum) : 1);
for (i = 0; i < DIMENSION; i++)
e->e_weight[i] *= normal;
}
......@@ -84,7 +84,7 @@ static void choice_add(t_choice *x, t_symbol *s, int argc, t_atom *argv)
static void choice_list(t_choice *x, t_symbol *s, int argc, t_atom *argv)
{
int i, j;
float bestsum = 0;
t_float bestsum = 0;
int bestindex = -1;
t_float invec[DIMENSION];
for (i = 0; i < DIMENSION; i++)
......@@ -92,10 +92,10 @@ static void choice_list(t_choice *x, t_symbol *s, int argc, t_atom *argv)
for (j = 0; j < x->x_n; j++)
{
t_elem *e = x->x_vec + j;
float sum;
t_float sum;
for (i = 0, sum = 0; i < DIMENSION; i++)
sum += e->e_weight[i] * invec[i];
if (x->x_nonrepeat) sum *= (float)(log(e->e_age));
if (x->x_nonrepeat) sum *= (t_float)(log(e->e_age));
if (sum > bestsum)
{
bestsum = sum;
......@@ -109,7 +109,7 @@ static void choice_list(t_choice *x, t_symbol *s, int argc, t_atom *argv)
x->x_vec[j].e_age += 1.;
x->x_vec[bestindex].e_age = 1;
}
outlet_float(x->x_obj.ob_outlet, (float)bestindex);
outlet_float(x->x_obj.ob_outlet, (t_float)bestindex);
}
static void choice_free(t_choice *x)
......
This diff is collapsed.
......@@ -14,7 +14,8 @@ This file is downloadable from http://www.crca.ucsd.edu/~msp .
#ifdef PD
#include "m_pd.h"
#else
#define t_sample float
typedef float t_float;
typedef float t_sample;
#endif
......@@ -96,7 +97,7 @@ static void loopctl_init(t_loopctl *x)
x->l_phase = 0;
}
static void loopctl_set(t_loopctl *x, float val)
static void loopctl_set(t_loopctl *x, t_float val)
{
if (val < 0 || val > 1)
val = 0;
......
......@@ -8,7 +8,7 @@ typedef struct _lrshift_tilde
{
t_object x_obj;
int x_n;
float x_f;
t_float x_f;
} t_lrshift_tilde;
static t_int *leftshift_perform(t_int *w)
......
......@@ -39,6 +39,7 @@ typedef int socklen_t;
#include "ext_proto.h"
#include "ext_obex.h"
typedef float t_float;
typedef double t_floatarg;
#define w_symbol w_sym
#define A_SYMBOL A_SYM
......
This diff is collapsed.
This diff is collapsed.
......@@ -619,6 +619,11 @@ div.y2 {
color: #a49aea;
}
/* Sample rate input */
input[name="rate"] {
width: 4em;
}
#prefs_buttons {
display: table;
height: 10vh;
......
......@@ -193,7 +193,7 @@ mark.console_find_highlighted {
width: 100%;
height: 1em;
padding: 0.2em;
padding-left:8px;
padding-left: 8px;
background: silver;
position: fixed;
bottom: 0;
......@@ -556,11 +556,11 @@ legend {
/* Iemgui dialog */
input[type="text"]{
width:3em;
width: 3em;
}
input[type="number"]{
width:3em;
width: 3em;
}
label {
......@@ -744,6 +744,11 @@ div.y2 {
padding-top: 8px;
}
/* Sample rate input */
input[name="rate"] {
width: 4em;
}
#prefs_buttons {
display: table;
height: 10vh;
......
......@@ -593,6 +593,11 @@ div.y2 {
padding-top: 8px;
}
/* Sample rate input */
input[name="rate"] {
width: 4em;
}
#prefs_buttons {
display: table;
height: 10vh;
......
This diff is collapsed.
......@@ -632,6 +632,11 @@ div.y2 {
padding-top: 8px;
}
/* Sample rate input */
input[name="rate"] {
width: 4em;
}
#prefs_buttons {
display: table;
height: 10vh;
......
......@@ -623,6 +623,11 @@ div.y2 {
padding-top: 8px;
}
/* Sample rate input */
input[name="rate"] {
width: 4em;
}
#prefs_buttons {
display: table;
height: 10vh;
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
#N canvas 34 75 582 396 12;
#N canvas 37 104 582 396 12;
#X obj 36 25 inlet;
#X msg 152 97 click 0 0 0 0 0;
#X msg 152 122 \$1;
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.