Commit 2cf1427e authored by Jonathan Wilkes's avatar Jonathan Wilkes

Merge branch 'upate-unauthorized'

parents 37de99d5 36741462
......@@ -1779,65 +1779,16 @@ toxy_clean:
#------------------------------------------------------------------------------#
# UNAUTHORIZED
UNAUTHORIZED_NAME=unauthorized
# these need to be created before compiling the C
UNAUTHORIZED_TKFILES = $(wildcard $(externals_src)/unauthorized/*/*.tk)
%.tk2c: %.tk
bash $(externals_src)/unauthorized/tk2c.bash < $*.tk > $*.tk2c
# a number of objects don't compile under MinGW (yet? they used to, but the
# needed changes were overwritten, so they are in CVS
ifeq ($(OS_NAME),windows)
UNAUTHORIZED_OBJECTS := $(wildcard $(externals_src)/unauthorized/[abdg-oqrw]*/*.c)\
$(wildcard $(externals_src)/unauthorized/c?[a-np-z]*/*.c)
else
ifeq ($(OS_NAME),darwin)
# [cooled~] crashes Pd on Mac OS X, [vocoder~] doesn't compile
UNAUTHORIZED_OBJECTS := $(wildcard $(externals_src)/unauthorized/[abd-uw-z]*/*.c)\
$(wildcard $(externals_src)/unauthorized/c?[a-np-z]*/*.c)
else
# GNU/Linux, BSD, IRIX, etc.
UNAUTHORIZED_OBJECTS := $(wildcard $(externals_src)/unauthorized/*/*.c)
endif
endif
# [vocoder~] is built separately since its made from a number of files
UNAUTHORIZED_VOCODER = $(wildcard $(externals_src)/unauthorized/vocoder*/*.c)
$(externals_src)/unauthorized/vocoder~/vocoder~.$(EXTENSION): $(UNAUTHORIZED_VOCODER:.c=.o)
$(CC) $(LDFLAGS) -o $(externals_src)/unauthorized/vocoder~/vocoder~.$(EXTENSION) \
$(UNAUTHORIZED_VOCODER:.c=.o) $(LIBS)
unauthorized: $(externals_src)/unauthorized/vocoder~/vocoder~.$(EXTENSION) \
$(UNAUTHORIZED_TKFILES:.tk=.tk2c) $(UNAUTHORIZED_OBJECTS:.c=.$(EXTENSION))
unauthorized:
make -C $(externals_src)/unauthorized CFLAGS="$(CFLAGS)" \
PD_PATH=$(pd_src) PD_INCLUDE=$(pd_src)/src
unauthorized_install: unauthorized
install -d $(DESTDIR)$(objectsdir)/$(UNAUTHORIZED_NAME)
$(scripts_src)/generate-libdir-metafile.sh $(DESTDIR)$(objectsdir) $(UNAUTHORIZED_NAME) \
--author "Yves Degoyon" \
--license "GNU GPL" \
--description "GUI and streaming objects"
install -p $(externals_src)/unauthorized/*/*.$(EXTENSION) \
$(DESTDIR)$(objectsdir)/$(UNAUTHORIZED_NAME)
install -p $(externals_src)/unauthorized/*/*.pd \
$(DESTDIR)$(objectsdir)/$(UNAUTHORIZED_NAME)
install -p $(externals_src)/unauthorized/*/*.pls \
$(DESTDIR)$(objectsdir)/$(UNAUTHORIZED_NAME)
install -d $(DESTDIR)$(objectsdir)/$(UNAUTHORIZED_NAME)/blm
install -p $(externals_src)/unauthorized/blinkenlights/blm/*.* \
$(DESTDIR)$(objectsdir)/$(UNAUTHORIZED_NAME)/blm
install -d $(DESTDIR)$(objectsdir)/$(UNAUTHORIZED_NAME)/manual
install -p $(externals_src)/unauthorized/*/*.txt \
$(DESTDIR)$(objectsdir)/$(UNAUTHORIZED_NAME)/manual
unauthorized_install:
make -C $(externals_src)/unauthorized \
DESTDIR="$(DESTDIR)" objectsdir="$(objectsdir)" install
unauthorized_clean:
-rm -f -- $(UNAUTHORIZED_OBJECTS:.c=.$(EXTENSION))
-rm -f -- $(UNAUTHORIZED_OBJECTS:.c=.o)
-rm -f -- $(UNAUTHORIZED_VOCODER:.c=.$(EXTENSION))
-rm -f -- $(UNAUTHORIZED_VOCODER:.c=.o)
-rm -f -- $(externals_src)/unauthorized/*/*.bak
-rm -f -- $(externals_src)/*/*.*~
-rm -f -- $(externals_src)/*.*~
make -C $(externals_src)/unauthorized clean
#------------------------------------------------------------------------------#
......
This diff is collapsed.
This diff is collapsed.
import glob
import os
import re
Import('env prefix')
for tk in glob.glob('*/*.tk'):
(dir, file) = os.path.split(tk)
filename = re.sub("\.tk$","",file)
cmd = "./tk2c.bash < " + dir + "/" + file + " > " + dir + "/" + filename + ".tk2c"
os.popen(cmd)
for extra in glob.glob('*/*.c'):
unauthorized = env.SharedLibrary(target = re.sub("\.c$","",os.path.basename(extra)), source = extra)
env.Alias('install', env.Install(os.path.join(prefix, 'extra'), unauthorized))
Default(unauthorized)
env.Alias('install', env.Install(os.path.join(prefix, 'doc/unauthorized'), glob.glob('*/*.pd')))
......@@ -17,13 +17,13 @@ proc audience_apply {id} {
[eval concat $$var_graph_nboutputs] \
\;]
#puts stderr $cmd
pd $cmd
pdsend $cmd
}
proc audience_cancel {id} {
set cmd [concat $id cancel \;]
#puts stderr $cmd
pd $cmd
pdsend $cmd
}
proc audience_ok {id} {
......@@ -44,7 +44,7 @@ proc pdtk_audience_dialog {id width height nboutputs} {
set $var_graph_height $height
set $var_graph_nboutputs $nboutputs
toplevel $id -class [winfo class .]
toplevel $id
wm title $id {audience}
wm protocol $id WM_DELETE_WINDOW [concat audience_cancel $id]
......
untar in /my/pd/dir/externs
cd /my/pd/dir/externs/audience~
make clean
make
make install
open help-audience~.pd
Thanx for getting here.
Yves/
comments and bugs @ ydegoyon@free.fr
NAME=audience~
CSYM=audience~
current: pd_linux
# ----------------------- NT -----------------------
pd_nt: $(NAME).dll
.SUFFIXES: .dll
PDNTCFLAGS = /W3 /WX /DNT /DPD /nologo
VC="C:\Program Files\Microsoft Visual Studio\Vc98"
PDNTINCLUDE = /I. /I\tcl\include /I\ftp\pd\src /I$(VC)\include
PDNTLDIR = $(VC)\lib
PDNTLIB = $(PDNTLDIR)\libc.lib \
$(PDNTLDIR)\oldnames.lib \
$(PDNTLDIR)\kernel32.lib \
\ftp\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 -DICECAST -O2 -funroll-loops -fomit-frame-pointer \
-Wall -W -Wno-shadow -Wstrict-prototypes -g \
-Wno-unused -Wno-parentheses -Wno-switch
LINUXINCLUDE = -I../../src
.c.pd_linux:
./tk2c.bash < $*.tk > $*.tk2c
cc $(LINUXCFLAGS) $(LINUXINCLUDE) -o $*.o -c $*.c
ld --export-dynamic -shared -o $*.pd_linux $*.o -lc -lm
strip --strip-unneeded $*.pd_linux
rm -f $*.o ../$*.pd_linux
ln -s $*/$*.pd_linux ..
# ----------------------------------------------------------
install:
cp help-*.pd ../../doc/5.reference
ln -sf `pwd`/speaker.gif /tmp
ln -sf `pwd`/wanderer.gif /tmp
clean:
rm -f *.o *.pd_* *.tk2c core
*****************************************************************************
Version 0.01
copyright 2002 Yves Degoyon
tarballs and updates available @ http://ydegoyon.free.fr
audience~ : 2-dimensional audience simulation ( also called 2 dollars spatialization !!! )
To install audience~, follow the steps from INSTALL
This software is published under GPL terms.
This is software with ABSOLUTELY NO WARRANTY.
Use it at your OWN RISK. It's possible to damage e.g. hardware or your hearing
due to a bug or for other reasons.
We do not warrant that the program is free of infringement of any third-party
patents.
*****************************************************************************
// ########### audience procedures -- ydegoyon@free.fr #########
sys_gui("proc audience_apply {id} {\n");
// strip "." from the TK id to make a variable name suffix
sys_gui("set vid [string trimleft $id .]\n");
// for each variable, make a local variable to hold its name...
sys_gui("set var_graph_width [concat graph_width_$vid]\n");
sys_gui("global $var_graph_width\n");
sys_gui("set var_graph_height [concat graph_height_$vid]\n");
sys_gui("global $var_graph_height\n");
sys_gui("set var_graph_nboutputs [concat graph_nboutputs_$vid]\n");
sys_gui("global $var_graph_nboutputs\n");
sys_gui("set cmd [concat $id dialog [eval concat $$var_graph_width] [eval concat $$var_graph_height] [eval concat $$var_graph_nboutputs] \\;]\n");
// puts stderr $cmd
sys_gui("pd $cmd\n");
sys_gui("}\n");
sys_gui("proc audience_cancel {id} {\n");
sys_gui("set cmd [concat $id cancel \\;]\n");
// puts stderr $cmd
sys_gui("pd $cmd\n");
sys_gui("}\n");
sys_gui("proc audience_ok {id} {\n");
sys_gui("audience_apply $id\n");
sys_gui("audience_cancel $id\n");
sys_gui("}\n");
sys_gui("proc pdtk_audience_dialog {id width height nboutputs} {\n");
sys_gui("set vid [string trimleft $id .]\n");
sys_gui("set var_graph_width [concat graph_width_$vid]\n");
sys_gui("global $var_graph_width\n");
sys_gui("set var_graph_height [concat graph_height_$vid]\n");
sys_gui("global $var_graph_height\n");
sys_gui("set var_graph_nboutputs [concat graph_nboutputs_$vid]\n");
sys_gui("global $var_graph_nboutputs\n");
sys_gui("set $var_graph_width $width\n");
sys_gui("set $var_graph_height $height\n");
sys_gui("set $var_graph_nboutputs $nboutputs\n");
sys_gui("toplevel $id -class [winfo class .]\n");
sys_gui("wm title $id {audience}\n");
sys_gui("wm protocol $id WM_DELETE_WINDOW [concat audience_cancel $id]\n");
sys_gui("label $id.label -text {2$ SPACE PROPERTIES}\n");
sys_gui("pack $id.label -side top\n");
sys_gui("frame $id.buttonframe\n");
sys_gui("pack $id.buttonframe -side bottom -fill x -pady 2m\n");
sys_gui("button $id.buttonframe.cancel -text {Cancel} -command \"audience_cancel $id\"\n");
sys_gui("button $id.buttonframe.apply -text {Apply} -command \"audience_apply $id\"\n");
sys_gui("button $id.buttonframe.ok -text {OK} -command \"audience_ok $id\"\n");
sys_gui("pack $id.buttonframe.cancel -side left -expand 1\n");
sys_gui("pack $id.buttonframe.apply -side left -expand 1\n");
sys_gui("pack $id.buttonframe.ok -side left -expand 1\n");
sys_gui("frame $id.1rangef\n");
sys_gui("pack $id.1rangef -side top\n");
sys_gui("label $id.1rangef.lwidth -text \"Width :\"\n");
sys_gui("entry $id.1rangef.width -textvariable $var_graph_width -width 7\n");
sys_gui("pack $id.1rangef.lwidth $id.1rangef.width -side left\n");
sys_gui("frame $id.2rangef\n");
sys_gui("pack $id.2rangef -side top\n");
sys_gui("label $id.2rangef.lheight -text \"Height :\"\n");
sys_gui("entry $id.2rangef.height -textvariable $var_graph_height -width 7\n");
sys_gui("pack $id.2rangef.lheight $id.2rangef.height -side left\n");
sys_gui("frame $id.3rangef\n");
sys_gui("pack $id.3rangef -side top\n");
sys_gui("label $id.3rangef.lnboutputs -text \"Nb Listeners :\"\n");
sys_gui("entry $id.3rangef.nboutputs -textvariable $var_graph_nboutputs -width 7\n");
sys_gui("pack $id.3rangef.lnboutputs $id.3rangef.nboutputs -side left\n");
sys_gui("bind $id.1rangef.width <KeyPress-Return> [concat audience_ok $id]\n");
sys_gui("bind $id.2rangef.height <KeyPress-Return> [concat audience_ok $id]\n");
sys_gui("bind $id.3rangef.nboutputs <KeyPress-Return> [concat audience_ok $id]\n");
sys_gui("focus $id.1rangef.width\n");
sys_gui("}\n");
// ########### audience procedures END -- ydegoyon@free.fr #########
......@@ -54,60 +54,65 @@ static t_class *beatify_class;
static void beatify_attack(t_beatify *x, t_floatarg fattack )
{
if (fattack < 1.0)
if (fattack < 1.0)
{
x->x_attack = 1.0;
x->x_attack = 1.0;
}
else
{
x->x_attack = fattack;
x->x_attack = fattack;
}
}
static void beatify_sustain(t_beatify *x, t_floatarg fsustain )
{
if (fsustain < 0.0)
if (fsustain < 0.0)
{
x->x_sustain = 0.0;
x->x_sustain = 0.0;
}
else
{
x->x_sustain = fsustain;
x->x_sustain = fsustain;
}
}
static void beatify_decay(t_beatify *x, t_floatarg fdecay )
{
if (fdecay < 1.0)
if (fdecay < 1.0)
{
x->x_decay = 1.0;
x->x_decay = 1.0;
}
else
{
x->x_decay = fdecay;
x->x_decay = fdecay;
}
}
static void beatify_size(t_beatify *x, t_floatarg fsize )
{
if (fsize < 100.0)
if (fsize < 100.0)
{
x->x_size = 100.0;
x->x_size = 100.0;
}
else
{
x->x_size = fsize;
x->x_size = fsize;
}
}
static void beatify_gamplitude(t_beatify *x, t_floatarg fgamplitude )
{
if (fgamplitude < 0.0) {
x->x_gamplitude = 0.0;
} else if (fgamplitude > 1.0) {
x->x_gamplitude = 1.0;
} else {
x->x_gamplitude = fgamplitude;
if (fgamplitude < 0.0)
{
x->x_gamplitude = 0.0;
}
else if (fgamplitude > 1.0)
{
x->x_gamplitude = 1.0;
}
else
{
x->x_gamplitude = fgamplitude;
}
}
......@@ -137,22 +142,24 @@ static t_int *beatify_perform(t_int *w)
t_beatify *x = (t_beatify*)(w[4]);
t_float adelta = 0., ddelta = 0.;
while (n--) {
if ( x->x_current>=x->x_size )
{
while (n--)
{
if ( x->x_current>=x->x_size )
{
adelta = (x->x_gamplitude-x->x_vol)/x->x_attack;
ddelta = x->x_gamplitude/x->x_decay;
x->x_current = 0;
}
if ( x->x_current<x->x_attack ) x->x_vol+= adelta;
if ( x->x_current>x->x_attack+x->x_sustain && x->x_current<x->x_attack+x->x_sustain+x->x_decay )
{
x->x_vol-= ddelta;
}
x->x_current++;
}
if ( x->x_current<x->x_attack ) x->x_vol+= adelta;
if ( x->x_current>x->x_attack+x->x_sustain && x->x_current<x->x_attack+x->x_sustain+x->x_decay )
{
x->x_vol-= ddelta;
}
x->x_current++;
*(out) = *(in)*x->x_vol;
out++; in++;
*(out) = *(in)*x->x_vol;
out++;
in++;
}
return (w+5);
}
......@@ -164,9 +171,9 @@ static void beatify_dsp(t_beatify *x, t_signal **sp)
void beatify_tilde_setup(void)
{
post( beatify_version );
logpost(NULL, 4, "%s", beatify_version );
beatify_class = class_new(gensym("beatify~"), (t_newmethod)beatify_new, 0,
sizeof(t_beatify), 0, 0);
sizeof(t_beatify), 0, 0);
CLASS_MAINSIGNALIN( beatify_class, t_beatify, x_f );
class_addmethod(beatify_class, (t_method)beatify_dsp, gensym("dsp"), A_CANT, 0);
class_addmethod(beatify_class, (t_method)beatify_attack, gensym("attack"), A_FLOAT, 0);
......
This diff is collapsed.
untar in /my/pd/dir/externs
cd /my/pd/dir/externs/beatify~
make clean
make
make install
open help-beatify~.pd
Thanx for getting here.
Yves/
comments and bugs @ ydegoyon@free.fr
NAME=beatify~
CSYM=beatify~
current: pd_linux
# ----------------------- NT -----------------------
pd_nt: $(NAME).dll
.SUFFIXES: .dll
PDNTCFLAGS = /W3 /WX /DNT /DPD /nologo
VC="C:\Program Files\Microsoft Visual Studio\Vc98"
PDNTINCLUDE = /I. /I\tcl\include /I\ftp\pd\src /I$(VC)\include
PDNTLDIR = $(VC)\lib
PDNTLIB = $(PDNTLDIR)\libc.lib \
$(PDNTLDIR)\oldnames.lib \
$(PDNTLDIR)\kernel32.lib \
\ftp\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 -DICECAST -O2 -funroll-loops -fomit-frame-pointer \
-Wall -W -Wno-shadow -Wstrict-prototypes \
-Wno-unused -Wno-parentheses -Wno-switch #-Werror
LINUXINCLUDE = -I../../src
.c.pd_linux:
cc $(LINUXCFLAGS) $(LINUXINCLUDE) -o $*.o -c $*.c
ld --export-dynamic -shared -o $*.pd_linux $*.o -lc -lm
strip --strip-unneeded $*.pd_linux
rm -f $*.o ../$*.pd_linux
ln -s $*/$*.pd_linux ..
# ----------------------------------------------------------
install:
cp help-*.pd ../../doc/5.reference
clean:
rm -f *.o *.pd_* so_locations
Version 0.01
copyright 2002 by Yves Degoyon.
tarballs and updates available @ http://ydegoyon.free.fr
beatify~ : modulate amplitude of a sound
the idea was borrowed from musicscript,
an excellent sound generation tool.
( http://musicscript.sourceforge.net, author : David Piott )
To install beatify~, follow the steps from INSTALL
This software is published under GPL terms, see COPYING
for rights restrictions.
This is software with ABSOLUTELY NO WARRANTY.
Use it at your OWN RISK. It's possible to damage e.g. hardware or your hearing
due to a bug or for other reasons.
We do not warrant that the program is free of infringement of any third-party
patents.
*****************************************************************************
untar in /my/pd/dir/externs
cd /my/pd/dir/externs/blinkenlights
make clean
make
make install
open help-blinkenlights.pd
Thanx for getting here.
Yves/
comments and bugs @ ydegoyon@free.fr
NAME=blinkenlights
CSYM=blinkenlights_tilde
current: pd_linux
# ----------------------- NT -----------------------
pd_nt: $(NAME).dll
.SUFFIXES: .dll
PDNTCFLAGS = /W3 /WX /DNT /DPD /nologo
VC="C:\Program Files\Microsoft Visual Studio\Vc98"