File: README

package info (click to toggle)
snack 1.6-3
  • links: PTS
  • area: main
  • in suites: potato
  • size: 1,228 kB
  • ctags: 1,519
  • sloc: ansic: 17,114; sh: 3,987; tcl: 444; makefile: 173
file content (209 lines) | stat: -rw-r--r-- 7,675 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
Snack v1.6

Kre Sjlander <kare@speech.kth.se>

Introduction
-------------------------------------------------------------------

Snack is an extension to the Tcl/Tk scripting language that
adds sound functionality. There are commands to play, record, edit,
and even visualize sound. Snack supports in-memory sound objects, file based
audio, and streaming audio. It handles fileformats such as WAV, AU, AIFF, and MP3.
The visualization canvas item types update in real-time and can output
postscript. The same scripts run on Unix (HP-UX, Linux, Solaris, IRIX) and
Windows95/98/NT. It is also possible to run scripts embedded in web 
pages through the use of the Tcl plug-in.
A sound file viewer/label editor, which is easy to customize, is included in 
the package.

In order to use Snack you must have Tcl and Tk version 8.0 or later (preferred
 8.1.1), which can be downloaded from ftp://ftp.scriptics.com/pub/tcl/. 
You must build these first.

The Snack package has been tested on the following systems:
SunOS 5.5.1 (Sparc and x86)
Linux 2.0.35 (OSS v3.5)
HP-UX B.10.20
IRIX 6.2, 6.3 & 6.4 (even runs under SoftWindows, although slowly)
Windows95/98/NT

Make sure you have the latest version from http://www.speech.kth.se/snack/
before proceeding.

Compilation instructions for Snack
-------------------------------------------------------------------

Change directory to the src directory.
The Tcl 8.1 distribution should be present in the directory "../../tcl8.1.1"
and Tk 8.1 in the directory "../../tk8.1.1". That is, you should have
unpacked the Tcl, Tk, and Snack distributions in the same directory.
If these are located somewhere else (or if you have different versions) 
you can specify their locations using the options --with-tcl and --with-tk ()e.g. --with-tcl=/pkg/tk8.1.1/unix/) to configure. 
Both Tcl and Tk must have been configured with the "--enable-shared" flag at 
build time (this is default for the 8.1 versions). Build them before Snack.

Type "./configure".

Type "make".

IMPORTANT: if you use Tcl/Tk 8.0 up to 8.0.5 you will have to use the new flag
--disable-stubs. This is a change from earlier versions of Snack.

If the make fails you will have to edit the Makefile and possibly also the 
configure script. TCL_INCPATH should be the path to the directory which 
contains the tcl8.1 header file (tcl.h). The same goes for TK_INCPATH (tk.h). 
XINCLUDES should be the path to the directory containing the X11 include files.

Summary in case you download Tcl, Tk, and Snack and build from scratch:
You should place the distributions in the same directory and unpack them. Then 
use the following commands:
cd tcl8.1.1/unix
configure --enable-shared
cd ../../tk8.1.1/unix
configure --enable-shared
cd ../../snack1.6/src
configure
make
setenv TCLLIBPATH "path-to-distribution"/snack1.6/src
cd ../demos
widget.tcl

If you use Tcl/Tk 8.0 up to 8.0.5 you change the last configure to
configure --disable-stubs


Testing
-------------------------------------------------------------------

When you have succesfully compiled Snack it's time to look at the demos.
In order to run these you will have to set the environment variable 
TCLLIBPATH to the directory containing the Snack library files (you don't 
need this step if you install Snack as described below). If you have 
compiled Snack in /u/kare/snack1.6/src, this would be:

setenv TCLLIBPATH /u/kare/snack1.6/src

Change to the demos directory and type ./widget:

cd ../demos
./widget.tcl

this runs the Snack widget demonstration.
If you use Tcl/Tk8.0 on Unix you'll have to modify the scripts to use wish8.0
instead of wish8.1.


System wide installation
-------------------------------------------------------------------

The recommended installation directory is the standard Tcl package directory. 
You can determine this by typing:

tclsh
puts $tcl_pkgPath

If you choose this directory you don't have to set the TCLLIBPATH variable.
Edit the Makefile if necessary. SNACK_INSTALL_PATH should be the path to the 
directory where you want to install the Snack package (e.g. /usr/local/lib).

Install using:

make install


Using Snack with the Tcl Netscape plug-in 2.0
-------------------------------------------------------------------
You can optionally install Snack as an extension to the Tcl 
Netscape plug-in. First you should install the Tcl plug-in 2.0, which you 
can get from ftp://ftp.scriptics.com/pub/tcl/plugin/.

To use Snack as an extension you select this at configure time:

./configure --enable-plugin

When you install it using "make install", the appropriate files will be copied 
to "/usr/local/lib/netscape/tclplug/2.0/".
If you have placed the Netscape plug-in somewhere else (e.g. locally in 
$HOME/.netscape/) use:

./configure --enable-plugin --with-mozilla=$SOMEWHERE

You can also simply copy the files yourself to get something similar to this:
/usr/local/lib/netscape/tclplug/2.0/snack1.6/libsnack.sl
/usr/local/lib/netscape/tclplug/2.0/snack1.6/libsound.sl
/usr/local/lib/netscape/tclplug/2.0/snack1.6/pkgIndex.tcl
/usr/local/lib/netscape/tclplug/2.0/snack1.6/snack.tcl

Currently you need to set this environment variable before starting Netscape:
setenv TCL_PLUGIN_WISH 1

In some cases this may also be necessary:
setenv NPX_PLUGIN_PATH $HOME/.netscape/plugins/


Using Snack with the NIST/Sphere distribution 
-------------------------------------------------------------------
It is possible to configure Snack to create an additional package for handling
the NIST/Sphere file formats. Use the configure option --with-nist=DIR to
specify the location of the NIST/Sphere distribution, which can be downloaded
at ftp://jaguar.ncsl.nist.gov/pub/sphere_2.6a.tar.Z. In the Sphere
distribution you will have to modify the file src/scripts/install.sh and add
the compilation flag to create position independent code in some cases. Look
at the Snack Makefile for these.

On HP-UX with HP cc use: -Ae +z

See NistFile.txt for more info.


Dynamic linking problems
-------------------------------------------------------------------

(Sun, Linux, and SGI)
The loader must be able to find the "libsnack.so" shared object. You may have
to set the environment variable LD_LIBRARY_PATH to point the directory where
it is located. This variable is a colon separated list of paths which can be
modified using setenv. If you, for example, have compiled Snack in the
directory /u/kare/snack/src and have the shared objects libtcl8.0.so and
libtk8.0.so in /usr/local/bin you would use the following command at the 
terminal prompt or in your .cshrc file:

setenv LD_LIBRARY_PATH /u/kare/snack/src:/usr/local/bin:$LD_LIBRARY_PATH

(HP)
The corresponding environment variable on HP-UX systems is SHLIB_PATH and 
shared objects use ".sl" as file extension.


Known problems
-------------------------------------------------------------------

Some work remains on SGI audio support. Currently, the audio control panel
must be used to set play volume and record gain.


License
-------------------------------------------------------------------
Snack is currently licensed under GPL, see the file COPYING.
Contact the author if this kind of license is a problem.
(The only reason for GPL is the MPEG decoding code, see SnackMP3amp.c)
With some small modifications it would be possible use a license similar to the
one Tcl/Tk itself uses.


Acknowledgements
-------------------------------------------------------------------
The following people have contributed code, suggestions, and/or other help.

Roger Lindell
Jonas Beskow
Claude Barras
Mel
Alexandre Ferrieux
Daryl Vertigan
David van Leeuwen
Stefan Karnebck
Simon Arnfield
Magnus Lundeberg
Zhibiao Wu
Qiru Zhou