Q - Equational Programming Language




Add-On Modules

These modules are distributed as separate source tarballs.

Module: GQBuilder
Synopsis: gqbuilder
import gnocl;
Description: This package provides an interface and GUI builder (screenshot) for Peter G. Baum's Gnocl, which allows you to create GNOME/GTK+ applications with Tcl.
Requires: Tcl/Tk and Gnocl.

Module: QCalc
Synopsis: qcalc
import calclib;
Description: QCalc is a spreadsheet-like frontend to the Q interpreter. The package also includes the calclib module which allows you to extend QCalc's functionality using Q scripts. Please see the QCalc manual for more information and screenshots.
Requires: Qt/Q (see below), Qt (currently requires Qt version 3).

Module: Q+Q
Synopsis: import ratutils;
Description: Q+Q is Rob Hubbard's rational number library for the Q programming language. This package contains ratutils.q, a collection of utility functions for rational numbers, and rat_interval.q, a module for doing interval arithmetic needed by ratutils.q. These modules are designed to work with the rational.q module (now part of the standard Q library), which contains the definition of the Rational type and implements the basic rational arithmetic. Further documentation of Q+Q can be found on the Documentation page.

Module: Q[i][X]
Synopsis: import polynomial;
Description: Q[i][X] (pronounced "quicks") is Rob Hubbard's comprehensive library for computing with univariate polynomials over the rational and complex rational numbers. It provides functions such as polynomial arithmetic and polynomial factorisation. Detailed documentation for this package can be found on the Documentation page.

Module: Q-CSV
Synopsis: import csv;
Description: Q-CSV is Eddie Rucker's module for reading and writing CSV-formatted data, which is loosely based on Python's CSV module. CSV a.k.a. comma separated values is a textual data exchange format commonly used by spreadsheet programs; see RFC 4180 for details. The module provides functions to read/write CSV data from/to strings and files. It supports different variations of the CSV format so that you can easily handle, e.g., different quoting conventions and field delimiters.

Module: Q-Graph
Synopsis: import graph;
import graphed;
Description: Q-Graph is an add-on library to deal with combinatorial graphs, a data structure consisting of nodes and edges connecting the nodes. Graph theory and algorithms play a major role in countless applications such as network design and optimisation, traffic planning, routing, scheduling and visualization, and so graphs have become one of the cornerstones of applied discrete mathematics and computer science. The package implements a graph data type and the usual operations on graphs. It also contains "graphed", a full-featured graph editor. A sample implementation of Dijkstra's shortest path algorithm is also included. The entire package is written in Q, and thus it also provides an example of a substantial Q application.
Requires: Tcl/Tk >=8.4 (for the graph editor).

Module: Q-NCurses
Synopsis: import curses;
Description: This package provides an interface to the GNU version of the curses library, which lets you create text-based user interfaces in a device-independent way. The module also includes support for the panel, menu and form libraries.
Requires: ncurses.

Module: Q-SQLite3
Synopsis: import sqlite3;
Description: This is an interface to the SQLite library version 3. SQLite is a lightweight, zero-config relational database engine which stores databases in single files and supports most of the SQL92 standard. This module allows you to easily create and manage SQL databases with the Q programming language. In difference to the odbc module in the core package, this module does not require a host DBMS or ODBC interface to be installed and configured, you only need to have the SQLite library on your system.
Requires: SQLite version 3.

Module: Qt/Q
Synopsis: import smokeqt;
Description: This package provides an interface to Trolltech's GUI toolkit, using the SmokeQt library from the PerlQt project. It provides the necessary operations to program Qt GUIs in Q, and allows you to create widgets from Qt Designer XML code (.ui files) so that Qt Designer can be used as a GUI builder. Support for the Qt assistant html help system is also included.
Requires: Qt and SmokeQt. The current version of this module requires Qt3; a Qt4 version is being worked on.

Module: Q Yacc/Lex
Synopsis: qyacc [options] filename
qlex [options] filename
Description: Q versions of the Yacc and Lex compiler generator tools. Written (mostly) in Q, these programs produce parsers and lexical analyzers in the Q language from context-free and regular expression grammars.

Multimedia Library

Module: Pd/Q
Synopsis: import pd;
Description: Pd/Q is a plugin for Miller Puckette's visual computer music environment Pure Data (Pd). The plugin allows you to implement Pd control objects in Q. A supporting Q module with various operations to create stateful or stream-based Pd objects and to perform asynchronous message processing in Q threads is also included. Please note that this module is still experimental and work in progress. More information can be found on the Examples page.
Requires: Pure Data.

Module: Q-Audio
Synopsis: import audio;
import sndfile;
import wave;
Description: Q-Audio is a digital audio interface for Q. The package contains three modules which together provide the basic functionality needed to write digital audio applications in the Q programming language. The audio module implements a (near-)realtime audio interface on top of Phil Burk's PortAudio library (http://www.portaudio.com). The sndfile module allows you to access sound files in various formats using Erik de Castro Lopo's libsndfile library (http://www.mega-nerd.com/libsndfile). The wave module provides basic operations for creating and manipulating wave data, including operations to convert sample rates (using Erik de Castro Lopo's libsamplerate library, see http://www.mega-nerd.com/SRC), to calculate Fourier transforms (using version 3 of the FFTW library, see http://www.fftw.org) and to display wave data in a GGI visual. A sample graphical audio player application is also included. More (Linux) examples can be found on the Examples page. This package has been tested on Linux and Windows. Other UNIX systems supported by PortAudio should work as well, but have not been tested yet.

Note that Q-Audio 2.x is now based on PortAudio v19, which adds support for ALSA and Jack on Linux systems and ASIO on OS X and Windows. Due to changes in the PortAudio API, the new version is not fully compatible with Q-Audio 1.x. However, most existing applications should work with minimal or no changes.

Requires: PortAudio, libsndfile, libsamplerate, libfftw3, Tcl/Tk (for the sample audio player).

Module: Q-Faust
Synopsis: import faust;
Description: This module lets you load and run Faust-generated signal processing modules in Q. Faust (an acronym for Functional audio streams) is a functional programming language for real-time sound processing and synthesis developed at Grame and distributed as GPL'ed software. With Faust you can develop your DSPs in a high-level functional language, but still achieve a performance comparable to carefully handcrafted C routines. A sample software synth application based on this module, QFSynth, can be found on the Examples page.
Requires: Faust.

Module: Q-Midi
Synopsis: import midi;
Description: Yup, Q plays music, too! :) More precisely, it can "talk" to MIDI, the "Musical Instrument Digital Interface". MIDI is the standard protocol for controlling synthesizers and other compatible equipment. Want to learn more about MIDI? Jeff Glatt's MIDI Technical Fanatic's Brainwashing Center is a good place to start.

Q-Midi is Q's MIDI module which allows you to write MIDI applications in the Q programming language. Q-Midi runs on top of MidiShare, Grame's cross-platform MIDI library which is GPL'ed software, too. Q-Midi provides access to most basic MidiShare functionality, including realtime processing of MIDI messages and standard MIDI file access. This release of Q-Midi also includes a sample MIDI player/recorder written using Q-Midi. More (Linux) examples can be found on the Examples page. The currently supported platforms are Linux, OS X and Windows.

Requires: MidiShare, Tcl/Tk (for the MIDI player).

Module: Q-OpenAL
Synopsis: import openal;
Description: Q-OpenAL is Q's interface to OpenAL, the 3D sound toolkit. OpenAL lets you create spatialized audio applications using an API which is similar in style to OpenGL (see below). Together, OpenGL and OpenAL provide you with the necessary operations to create virtual 3D sceneries for games and other advanced multimedia applications.
Requires: OpenAL. The current version requires OpenAL 1.1 or later, for earlier OpenAL versions you can use the 1.3 version of this module.

Module: Q-OpenGL
Synopsis: import opengl;
Description: Q-OpenGL is Q's interface to OpenGL, the popular 3D graphics toolkit. It provides access to most operations of the GL, GLU and GLUT libraries. Please note that this module is still work in progress. Not all functions of the OpenGL interface have been tested yet, and some of the more advanced GL/GLU functions are not fully supported in the current release; these restrictions will hopefully be lifted in the future.
Requires: OpenGL, FreeGlut (or a suitable replacement).

Module: Q-Synth
Synopsis: import osc;
import sc;
Description: Q-Synth is a package for driving software synthesizers via CNMAT's OSC ("Open Sound Control") protocol, a standard interface for controlling synthesizers and other multimedia programs in realtime. The package also includes special support for SuperCollider3, arguably the most advanced software synthesis engine available right now. Please note that this package is still work in progress. However, the basic interfaces to OSC and SuperCollider have been implemented and are fully functional. A sample script is also included, which shows how to implement in Q a monotimbral SuperCollider synth which can be played via MIDI input or other Q-Midi/MidiShare applications. More (Linux) examples can be found on the Examples page.
Requires: SuperCollider (to utilize the SuperCollider interface), Q-Audio and Q-Midi (for the included examples), Tcl/Tk (for the SuperCollider GUI). Note that a Windows port of SuperCollider is available here.

Module: Q-Xine
Synopsis: import xine;
Description: Q-Xine is Q's interface to Xine, the popular media player for Unix systems which handles most common multimedia formats. The module provides a simplified interface to the xine library which offers the necessary operations for playing back multimedia content in Q programs. Xine's OSD (on-screen display) and framegrabber functionality is also supported. The latter feature allows you to grab video frames in a format suitable for further processing with Q's ggi, magick and audio modules.

Please note that this module is not supported under MS Windows at this time, although it might be in the future, when the MinGW port of xine is finished.

Requires: Libxine.

© 2007 by Albert Gräf