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
#------------------------------------------------------------------------------#
......
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
......@@ -15,7 +15,7 @@ software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Library General Public License instead.) You can apply it to
the GNU Lesser General Public License instead.) You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
......@@ -55,7 +55,7 @@ patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
......@@ -110,7 +110,7 @@ above, provided that you also meet all of these conditions:
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
......@@ -168,7 +168,7 @@ access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
......@@ -225,7 +225,7 @@ impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
......@@ -278,3 +278,62 @@ PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:
Gnomovision version 69, Copyright (C) year name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, the commands you use may
be called something other than `show w' and `show c'; they could even be
mouse-clicks or menu items--whatever suits your program.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
`Gnomovision' (which makes passes at compilers) written by James Hacker.
<signature of Ty Coon>, 1 April 1989
Ty Coon, President of Vice
This General Public License does not permit incorporating your program into
proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License.
This diff is collapsed.
unauthorized is a library of GUI objects and a handful of objects for working
with streaming and mp3s. The home page for the GPL version is here:
http://puredata.info/community/projects/software/unauthorized
unauthorized has split into two versions because of a change of
licensing. This version, maintained in the pure-data SVN, remains GPLv2
while the original author Yves Degoyon has split off a version with a
non-free license.
To get the new non-free version, download it from its new CVS repository:
export CVSROOT=:pserver:anonymous at giss.tv:/home/cvs
cvs co pidip
cvs co unauthorized
original sources available from http://ydegoyon.free.fr/software.html
Installing
----------
there is no configure scripts, you need to install :
* pd headers in /usr/include ( m_pd.h and g_canvas.h )
* libmp3lame-dev for the mp3 externals
* libspeex-dev for the speex external
* sources of stk in /usr/src/stk for stk externals ( optional )
have fun!
sevy ( ydegoyon@gmail.com )
Copyright 2002 Yves Degoyon
Included Objects
-------------
audience~ : 2-dimensional audience simulation ( also called 2 dollars spatialization !!! )
beatify~ : modulate amplitude of a sound
the idea was borrowed from musicscript,
an excellent sound generation tool.
( http://musicscript.sourceforge.net, author : David Piott )
blinkenlight : a blinken lights films player ( but also a pixel grid )
This object displays blinken lights movies, and lets you handle a
grid of pixels. It is also a "Telecran" !! There is a movies
archive @ http://www.blinkenlights.de/gallery/index.en.html
compressor~ : a compressor of audio signals
cooled : a micro sound editor
This object displays a sound, lets you play a part of it and do
some cut and paste operations.
disto~ : a kind of effect used in pop music, use it elsewhere
the algorithm was taken from Digital Effects (DISTORT3), a guitar
effects software for DOS which rocks, written by Alexey Smoli
http://st.karelia.ru/~smlalx/
exciter : a bang-events sequencer
the need for it sprung out of a talking with Nicolas Lhommet.
filterbank~ : filterbank outputs frequency response for a range of filters
formant~ is a formant synthesis generator external for pd
grid : 2-dimensional control object, ala "kaospad"
mp3amp~ is a MPEG I Layer III (mp3) icecast/shoutcast client for Pure Data
mp3amp~ has been compiled for Linux using LAME 3.92.
The newest version of LAME can be found at sourceforge.net
PLEASE NOTE: This software may contain patented alogrithm (at
least patented in some countries). It may be not allowed to
sell/use products based on this source code in these
countries. Check this out first!
COPYRIGHT of MP3 music: Please note, that the duplicating of
copyrighted music without explicit permission violates the rights
of the owner.
Using mp3amp~ external for Pure Data
Open the help-mp3amp~.pd to understand how it works. Open the
help-graphic-mp3amp~.pd if you want to see the status of the
incoming stream.
BUGS :
a/ certainly, not all bitrates will work,
that's too tedious to test, 128, 256, 320 are ok.
b/ cannot instantiate more than 10 decoders, if needed change
MAX_DECODERS in the code
mp3cast~ is a MPEG I Layer III (mp3) streaming external for pd (by Miller
Puckette) that connects to a SHOUTcast or IceCast server.
Using mp3cast~ external for Pure Data
Open the help-mp3cast~.pd to understand how it works.
In this patch, you must send the messages to mp3cast~
in the following order :
1/ password *****
2/ icecast | mp3cast
3/ connect host port
4/ pd dsp 1
Parameters sent to mp3cast~ object :
Sampling Rate (Hz): Possible values are 48000, 44100 and 32000. If
Pd runs at a different sampling rate, LAME will resample the
signal. Default value for mp3 sampling rate is Pd's sampling rate.
Bitrate (kbit/s): Possible values are 32, 40, 48, 56, 64, 80, 96,
112, 128, 160, 192, 224, 256 and 320. Default is 224.
Mode: Possible values are 0 (stereo), 1 (joint stereo, the
default), 2 (dual channel) and 3 (mono).
Password: The default is 'pd', can be changed with a message
"passwd yourpassword".
Server: Use message "connect name_of_your_server.com port" to
connect (same as with Pd's netsend). 'port' is the number
specified in the server's config file. Attention (for SHOUTcast
users): The actual port number used is one higher! Standard would
be 8000 resulting in a socket at port 8001!!! Bare this in mind
when configuring proxys or using mp3cast~ in connection with
netsend / netreceive. For IceCast, the port number used is the
same as specified.
Outlet: The outlet outputs an int, 1 if connected to SHOUTcast
server, 0 if not. This could be used to build an automatic
reconnect mechanism.
Other things: mp3cast~ prints the current status (connection,
login, LAME status) to the pd window. To see the current settings,
send it a message "print" and mp3 settings will be displayed.
Note that changing any mp3 settings will require to disconnect and
reconnect again! This has to be done manually.
Known problems: If you turn off audio processing when you are
connected with the server, no data will be sent to it. This will
make the server disconnect after a certain time ('no data' error
in server log). mp3cast~ does not recongnise this and attempts to
keep on streaming. To avoid this set 'AutoDumpSourceTime' in the
servers config file to a fairly high value preventing the server
from closing the socket to fast.
ALLOWED QUALITY FACTOR :
-q <arg> <arg> = 0...9. Default -q 5
-q 0: Highest quality, very slow
-q 9: Poor quality, but fast
-h Same as -q 2. Recommended.
-f Same as -q 7. Fast, ok quality
ALLOWED SAMPLERATE/BITRATES
MPEG-1 layer III sample frequencies (kHz): 32 48 44.1
bitrates (kbps): 32 40 48 56 64 80 96 112 128 160 192 224 256 320
MPEG-2 layer III sample frequencies (kHz): 16 24 22.05
bitrates (kbps): 8 16 24 32 40 48 56 64 80 96 112 128 144 160
MPEG-2.5 layer III sample frequencies (kHz): 8 12 11.025
bitrates (kbps): 8 16 24 32 40 48 56 64 80 96 112 128 144 160
mp3live~ is a peer-to-peer mp3 streamer package consisting of three
objects : mp3streamout~, mp3fileout~ and mp3streamin~.
using mp3live~ external for Pure Data
Open the mp3live~-help.pd to understand how it works.
A note about MPEG encoding :
ALLOWED QUALITY FACTOR :
-q <arg> <arg> = 0...9. Default -q 5
-q 0: Highest quality, very slow
-q 9: Poor quality, but fast
-h Same as -q 2. Recommended.
-f Same as -q 7. Fast, ok quality
ALLOWED BITRATES :
bitrates (kbps): 32 40 48 56 64 80 96 112 128 160 192 224 256 320
BUGS :
1. You cannot create more than MAX_DECODERS mp3streamin~
objects. The actual value is 100.
2. Current version of lame ( 3.92 ) produces a lot of errors for
quality < 5. Blame it on lame !!!!
3. Mono is not supported. Some additional code should be added for
mp3streamin~. Blame it on me !!!
4. Resampling is not supported. Blame it on me !!!
mp3write~ is a MPEG I Layer III (mp3) file writer.
using mp3write~ external for Pure Data
Open the help-mp3write~.pd to understand how it works.
In this patch, you must send the messages to mp3write~
in the following order :
1/ append|truncate if you wish to change file creation options ( default is append )
2/ open /my/file
3/ start
5/ pd dsp 1
4/ stop : the tag is written at this stage
Parameters sent to mp3write~ object :
Sampling Rate (Hz): Possible values are 48000, 44100 and 32000. If
Pd runs at a different sampling rate, LAME will resample the
signal. Default value for mp3 sampling rate is Pd's sampling rate.
Bitrate (kbit/s): Possible values are 32, 40, 48, 56, 64, 80, 96,
112, 128, 160, 192, 224, 256 and 320. Default is 224.
Mode: Possible values are 0 (stereo), 1 (joint stereo, the
default), 2 (dual channel) and 3 (mono).
Outlet: The outlet outputs an int, which the number of bytes
written in this session. this might be different from file size
if you're using append mode.
Known Problems : All combinations of samplerate, bitrate, quality
factor will not be accepted.
ALLOWED QUALITY FACTOR :
-q <arg> <arg> = 0...9. Default -q 5
-q 0: Highest quality, very slow
-q 9: Poor quality, but fast
-h Same as -q 2. Recommended.
-f Same as -q 7. Fast, ok quality
ALLOWED SAMPLERATE/BITRATES
MPEG-1 layer III sample frequencies (kHz): 32 48 44.1
bitrates (kbps): 32 40 48 56 64 80 96 112 128 160 192 224 256 320
MPEG-2 layer III sample frequencies (kHz): 16 24 22.05
bitrates (kbps): 8 16 24 32 40 48 56 64 80 96 112 128 144 160
MPEG-2.5 layer III sample frequencies (kHz): 8 12 11.025
bitrates (kbps): 8 16 24 32 40 48 56 64 80 96 112 128 144 160
Furthermore, it seems that high quality factors will not work with
this release of lame ( 3.92 ). The same errors can be obtained
with the command line : lame -q 1 file.wav outputs errors and
mp3write can't do better.
pianoroll : a graphical sequencer controller
playlist : choose a file in 1 click with space, numeric, characters
you can also send a seek message to select a file automatically.
probalizer : outputs integer values according to a drawn probability curve
samplebox~ : an opaque box to record and playback a sound ( with speed variations )
scratcher~ : records a sound and, then, let's you scratch it with your mouse.
scrolllist : displays and scrolls a text in a patch window
sonogram~ : displays, plays back and lets you modify a recorded sonogram.
The real and imaginery part of an fft~ is stored in a sonogram~
and, then, you can apply modifications to it or do mouse-based
graphic modifications. The set of modifications provided for now
consists of matrix operations but it will be improved soon.
speex~ is a voice quality streamer using Speex library consisting of
two objects : speexin~ and speexout~. A big thanx to Jean-Marc
Valin, author of Speex who helped me fixing encoding/decoding
problems.
PLEASE NOTE: The speex codec is patent free unlike GSM codecs.
that's the main reason why it's been choosen. ( + it allows very
low throughputs like 8kbits/s ).
spigot~ : a signal router.
vocoder~ : vocoder filter for PD inspired by xvox ( http://simon.morlat.free.fr )
i used xvox version 0.2.1, but you don't need to install it,
everything needed is bundled here.
wahwah~ : a kind of effect used in psychedelic music, use it elsewhere
the algorithm was taken from Digital Effects, a guitar effects
software for DOS which rocks, written by Alexey Smoli (
http://st.karelia.ru/~smlalx/ )
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')))
......@@ -42,7 +42,7 @@
#include "audience~.h"
#ifdef NT
#ifdef _WIN32
#include <io.h>
#else
#include <unistd.h>
......@@ -112,12 +112,12 @@ static void audience_draw_update(t_audience_tilde *x, t_glist *glist)
for ( ei=0; ei<x->x_nbinputs; ei++ )