Q ON THE EEE
= == === ===

This is a collection of Debian packages which enable you to run an (almost)
complete Q installation on the ASUS eee PC (http://eeepc.asus.com/). The
packages are ready to be installed with 'dpkg -i'. The following packages are
provided:

- q_*_i386.deb: Q interpreter and assorted modules (see below for details).

- q-swig_*_i386.deb: A SWIG 1.3.22 version with Q support. Installs into
  /usr/local so that it can be used along with other SWIG versions provided in
  the Debian repositories.

In addition, the following packages for third-party software are available:

- faust_*_i386.deb: A recent release of Faust, Grame's functional DSP
  programming language, which can be used with the Q-Faust interface and the
  faust2pd script. (The Debian repositories also have a Faust package, but
  it is a fairly old version.)

- gnuplot_4.3-1_i386.deb: Gnuplot from 2007-12-04 CVS sources. This version
  can be used to plot diagrams in the QCalc program (see below).

- libgii_0.9.2-1_i386.deb, libggi_2.1.2-1_i386.deb: This is an older release
  of the GGI (General Graphics Interface) library, which is needed to make the
  -inwin option of X11 visuals work (the Debian repositories have a newer GGI
  version where this option appears to be broken).

Q and Faust are both distributed under the GPL, see the accompanying COPYING
file for details. Sources are available on http://q-lang.sf.net/ and
http://faust.grame.fr/, respectively. GGI (http://www.ggi-project.org/) is
distributed under a BSD-style license. Gnuplot has its own freeware license,
see http://www.gnuplot.info.

NOTE: These packages have been created for the eee pc, so they might or might
not work on other i386 Debian systems. In any case make sure to back up your
precious data before trying this stuff. The packages work fine on my eee 4G,
but are provided WITHOUT ANY WARRANTY, so if they screw up your system I don't
want to hear about it. You have been warned. ;-)

CONTENTS OF THE Q PACKAGE
-------- -- --- - -------

The Q version provided here is 7.11. We hope to eventually provide a complete
"all-in-one" package for the eee, but as things stand now, the dxl and xine
modules are still missing due to compilation quirks, and the midi module is
not included because it requires Grame's Midishare, and noone has made a
Debian package for that yet.

The only mandatory dependencies are libgmp3 and libreadline5, which should be
readily available on the eee. For most of the modules, additional libraries
are needed which are all available either in the ASUS or the general Debian
repositories. Given the limited amount of harddisk space on the eee, these
will not be pulled in automatically, so you should decide for yourself which
libraries to install depending on the modules you actually want to use (see
the list of modules and dependencies below). Instructions on how to install
Debian packages on the eee using apt-get or synaptic, as well as links to
additional repositories can be found in the wiki at http://wiki.eeeuser.com/.

Here's the list of modules along with their dependencies (use 'apt-cache
search' to find available packages for the listed libraries):

Module		Dependencies
-------------	--------------------------------------------------------
audio		libportaudio2 (works best with Jack, see notes below)
curl		libcurl3
curses		libncurses5
(dxl)		(missing)
gdbm		libgdbm3
ggi		libgii1, libggi2 (-inwin not working, see notes below)
magick		libmagick9
(midi)		(missing)
odbc		unixodbc (or compatible replacement)
openal		libopenal0a, libalut0
opengl		libgl1, freeglut3
pd		puredata
smokeqt		libqt3-mt, libsmokeqt1 (optionally: qt3-assistant)
sndfile		libsndfile1
sqlite3		libsqlite3
tk		tcl8.4, tk8.4
wave		fftw3, libsamplerate0 (+ ggi module)
(xine)		(missing)
xml		libxml2, libxslt1

NOTES
=====

As already mentioned the dxl, midi and xine modules are not included in the
current package (dxl fails to compile for some reason, xine cannot be compiled
since the libxine development package is missing from the ASUS repositories,
and the midi module requires Midishare which isn't available on Debian yet).

Further notes about some important and useful components included in this
release follow below.

TCL/TK
------

Q offers the tk module as an interface to the Tcl/Tk command language and GUI
toolkit. Tcl/Tk 8.4 is needed, which is readily available in the Debian
repositories. Some sample scripts can be found in /usr/share/q/examples/tk
after installation. Depending on the application, you might also have to
install additional related packages, like libtk-img (this is needed to make
most of the sample Tcl/Tk applications work, including the audio_player
script), libtktable and bwidget. "Visual Tcl" can be used as a GUI builder,
which apparently isn't in the Debian repositories, but can easily be installed
from source (http://vtcl.sourceforge.net/).

QT/Q AND QCALC
---- --- -----

Qt/Q (implemented by the smokeqt module) provides an interface to the popular
GUI toolkit from Trolltech. It requires the Qt3 and SmokeQt libraries. The
former ships with the eee Xandros system, but you'll probably have to install
the latter. Qt designer (Debian package qt3-designer) can be used as a GUI
builder. I haven't tried whether it is actually usable on the small screen,
though. The smokeqt module provides the necessary operations to construct an
application from a Qt designer interface (.ui) file. Some simple examples can
be found in /usr/share/q/examples/qt after installation, and the qpong and
qcalc applications are also included.

The QCalc spreadsheet works fine (the screen is just big enough so that it can
be used quite comfortably), and makes for a nice frontend to the Q interpreter
on the eee. It provides extensive online documentation including the full Q
language manual (make sure you have the qt3-assistant package installed to
make that work).

Note that switching QCalc to fullscreen mode can be done with Alt-F11. The
unshifted F11 key, which is normally used on the eee for that purpose, is
already bound by QCalc to switch between the spreadsheet and script views.

You'll probably want to create an icon on the desktop to have QCalc at your
fingertips. If you're running the standard "easy" GUI, this can be done quite
conveniently using the "Launcher Tools" available at http://www.3eportal.com/.

GRAPHICS AND MULTIMEDIA
-------- --- ----------

Q provides extensive facilities for graphics and multimedia programming, but
unfortunately not everything is working on the eee yet (see the notes above).
The GGI (General Graphics Interface) and ImageMagick interfaces seem to work
fine, as do the OpenGL and OpenAL modules (the OpenGL module is also useful in
conjunction with Qt/Q to program 3D graphics in Qt applications).

There is one issue with the latest GGI version available in the Debian
repositories (2.2.x), namely that the display-x:-inwin option is broken in
that version, which is bad for applications which want to embed a GGI graphics
window inside a GUI application. This affects, in particular, the audio_player
script from the audio module. To work around this, you should install the
older libggi 2.1.2 and libgii 0.9.2 libraries, which are known to work with
Q's ggi module. Suitable libgii and libggi packages are provided here, see
above.

Q also offers various modules for writing audio applications (audio, sndfile,
wave). The audio module uses PortAudio to provide access to the audio
hardware. Alas, realtime I/O from/to the onboard sound chip of the eee is
rather unusable with PortAudio's OSS and ALSA drivers, so do yourself a favour
and use Jack instead (you do know Jack, don't you?). The Jack daemon is in
package jackd available in the Debian repositories; you might also wish to
install package qjackctl which provides a nice GUI frontend to Jack.

I found that I get the best results with Jack set to 3 audio buffers and a
blocksize of 512, but lower latencies seem possible. The eee's default kernel
doesn't seem to have the low-latency stuff enabled, so some audio applications
may be somewhat shoddy at lower latencies. Also, you probably have to run Jack
and the applications as root so that they enjoy realtime scheduling
priorities.

Note that in order to use Jack with the audio module, you'll have to open the
device using the appropriate "alsa_pcm" PortAudio device. As of Q-Audio 2.6,
which is included in this release, this should now happen automatically with
the examples and the audio_player script, provided that Jack is running when
these programs are started. You can also set the audio input/output devices
explicitly with the Q_AUDIO_IN and Q_AUDIO_OUT environment variables; see
audio.q for details.

For interactive realtime audio and MIDI applications I recommend Miller
Puckette's Pd a.k.a. Pure Data, available in the Debian repositories as
package puredata. The Q package includes the Pd/Q plugin which allows you to
program your Pd control processing objects in Q. If you want to develop custom
signal processing plugins for Pd, you should also have a look at Grame's
functional DSP programming language Faust (available as a separate package,
see above), as well as the faust module and the faust2pd script included in
the Q package. I found that Pd works with both Q and Faust plugins just fine,
provided that it is invoked as root so that it can run with realtime
priorities.

Enjoy! :)

Albert Graef <Dr.Graef@t-online.de>
2008-02-24
