a Basic multitasking development system for experimental real time interactive and algorithmic musical composition under Windows 32bit.

version 9.16


Prof.Dr.Godfried-Willem RAES

Introduction GMT Users Guide Language Library Users Guide


History. This software was originally developed to be a superset of the Microsoft PDS QBX/BC7 professional Basic language. That was the very early nineties. (Earlier versions - since the late seventies, ran on a DOS platform and on a variety of small microprocessors...) Since Microsoft left Basic -or at least raped it with the introduction of its awfull 'Visual' Basic- there have been no updates to this Basic implementation since 1993. Later, PowerBasic Inc. came with its series of great dos compilers and we translated our software into their dialect. Yet, in 1998 PowerBasic came out with its Power Basic Console Compiler version 1.0, a platform that was perfectly suited to our kind of application: a native 32-bit code compiler, flat memory model, unlimited arrays and memory, access to and use of the complete Win32Api....

By may 1999, <GMT> was at version 3.3 and we had merged it completely with our <Harmony Library> . Together they make up a usefull platform for realtime as well as off-line algorithmic composition. Before version 2, <GMT> ran as a very fast console application in a DOX box. By integrating the complete Win32Api and its multimedia interface, we could improve the timing precision of the software at least to the 1ms level. Since we are using all Win32 procedures to access hardware recognized under Windows, the software became very portable. The older, very fast, low level hardware access code (mostly written in assembly language) is still available for users that really want to take profit from their non-standard hardware investments.

Composers and musicians will highly appreciate this choice, since there should be no longer hardware dependencies intrinsic to the code. Also: support for realtime audio (recording/playback and processing) could now be added. Recording and playback functions , as well as processing are already provided. Demo code for software implementations of for example a ringmodulator and some more modulation/effect algorithm are available as well.

Since version 2.5 the complete user interface was changed and ported to the common Windows platform. So, there is no longer a dos-box wherein you monitor real-time activity and input variables and parameters... A consequence of this move is that this software will no longer run under 16-bit operating systems on the PC platform. Its minimum requirements are now Win95. Prefered platforms are Win98, Millennium or Windows 2000/NT5.0 or Windows XP. Since we do not have machines left anymore running older Win versions, we cannot tell whether or not it runs on lower platforms. The strict minimum processor is 80386/80387 (math processor is required, and make sure you have enough memory (8MByte would do marginally) to run Win95. However, it is strongly advised to use a Pentium type processor. If you want to work comfortably with Wave files, real time sound I/O etc... you need at least some 64MByte of memory and plenty of space on your harddisk. With 64MByte you have enough memory for buffering some 5 minutes of 16bit stereo 44.1kS/s. Note that if running under Windows2000, the OS consumes itself about 58MByte of RAM. Thus it should be strongly advised to install at least 128MByte in your PC.

Since version 3.3, the original Harmony Library was put into a DLL file, so that it became a lot easier to use it it different software contexts as well as languages. Later, more separate DLL libaries were created such as g_indep.dll (GMT context independent procedures and functions, including quite some usefull math functions), g_file.dll (file I/O and non time critical functions and procedures), g_nih.dll (support library for digital I/O and data acquisition for National Instruments devices requiring NiDAQ), g_noh.dll (alternative support library for automat control using LPT and or USB ports)... All library filenames start with g_. Their export declarations are always called g_???.bi. The source code for the main modules of the libraries is called g_???.bas.

Version 3.5 brought new controllers in the user interface (set-up window as well as cockpit window), better readible message handling for these etc... Version 3.6 has a wealth of parameter windows that can be created on demand and that are associated with individual tasks. As an extra, we also provide support for National Instruments data acquisition hardware (library g_nih.dll). This however only works if you have the hardware available and properly installed. (You need NiDAQ version 3.5.2)

Version 3.8 brought complete real time and interactive access to the audio CD drive in your PC, using the MCI command set included in Win32. More audio and graphics oriented procedures have been integrated in the DLL.

Version 3.9 brought a new dll library comprising not only all the previous harmony functions, but also most graphing functions as well as a merge with our previously separate math library. From now on, the library provides functionality for handling complex numbers both in cartesian and polar coordinates. The files for the source and library have been renamed. The former dll file gmt_harm.dll does no longer exist, but is replaced with g_lib.dll. The dll declarations for this library can be found in g_lib.bi. This dll can be used in combination with any programming language.

With version 4.22, we started supporting midi sysex reception, audio generation and manipulation, filters... Version 4.13 brings dynamical menus in the setup. Version 4.20 included low level coding for music automats including player pianos. Version 4.22 added new functions to the harmony library (InBetweenHar... etc..). Version 4.25 brought many more wave I/O functions for real time audio processing.

By the spring of 2000, we came out with version 5.00, leaving the legacy construction of the multitasker completely and replacing it with a set of interrupt based precise multimedia timers. Thus GMT became fully preemptive. As a consequence, the platform required to run GMT now dictates a computer with multimedia provisions: precise counters and intervaltimers. Any Pentium MMX machine or equivalent , running the WINMM.DLL should do.

As of 2001, the favorite platform to run GMT has become Windows2000, although Windows Millennium and Windows98 (second release) can also be used. Since version 5.3 we added complete support for email and ftp from within GMT, the aim being to develop fully interactive applications over the internet.

Version 5.4, dated 25 july 2001, brought some innovation in the filenaming convertions. First of all, the metacompilation statements for user application now should be brought together in "_meta.inc" file. Here users can specify the filename for their compiled application. Thus applications do no longer all have to run as gmt.exe... Users can now avoid overwriting previous applications if they forgot to rename the compiled file... The demo compiled file is now called g_demo.exe, gmt.exe no longer exists.

Version 5.5, dated 22.11.2001 introduced support for dynamic cockpit creation and modification.

Version 5.62, dates 01.02.2002 adds support for USB DIO ports via a Elektor driver so that low level port access is now cheap and possible even under Win NT and Win2000. Also we adapted the winapi includes such as to work under Power Basic's new compiler version 6.1 (dated 12/2001).

Version 5.75, dates 16.05.2002 adds support for USB ActiveWire ports. Users have to install the small driver dll's in their Windows system directory. However, this support is only required if users want to use the libraries for controlling the authors automats. Power Basic's compiler version 6.11 is used now.

Version 6.05, since august 2002, uses PowerBasic'c GUI compiler version 7.00. We started implementing real time network I/O as an alternative to using midi for interactive applications. The net support module is in g_net.inc and will be placed in a separate dll.

Version 7.20, since october 2003, using PowerBasic's Windows compiler version 7.02, brings a lot of new features: FromTo object (timed processes) as well as timed events.

Version 7.22, November 1th: improvements in the data acquisition subsystem using National Instruments hardware.

Version 9.10, october 2006: adapted to the newest NiDaq versions and most recent power basic compilers.

Version 9.16, january 2007: split of libraries g_mus and g_har. Some bugs killed in these.

CopyLeft Notice:

Although I hereby put all <GMT>-code and concepts in the public domain, all use of any part of its code -we do publish the complete source code- should be considered a quotation from the author. The use of this code should therefore be mentioned in any publication or distribution of applications or results. It is hereby explicitly forbidden to copyright or patent any application or artistic outcome (compositions) from use of any part of this code.

Relevant article with regard to copyright issues

<GMT> stands for General Multi Tasker or, Godfried's Multitasker or, Gees Max Tasker or, Generic Multipurpose Taskscheduler or, whatever you prefer to let it stand for. The child got to have a name.... For a later version -once we got our act completely together- we consider renaming the package simply 'G', by then we hope it became a complete music programming language.

Intended users / audience:

<GMT> was not made for people/musicians with absolutely no prior knowledge of computing and programming. It is not an 'easy' quick-results kind of software like Max or PD. Its not loaded with idiotographs, graphics, etc... In short, it is software for winners and creators, not for victims. Expectations as to users competence are:

Prof. Dr. Godfried-Willem Raes

Gent, march 1997/january 2007

The <GMT> software package consists of the following files: 

 - specific files for <GMT> software version 1.9 - under Microsoft PDS-BC7 Compiler V7.1 for DOS: arhived - no longer available on our website.

- specific files for <GMT> software version 9.16- under PowerBasic DLL compiler version 8.02

All these files are contained in the zipped source gmt_source.zip. The table below lists and comments some of the most important files contained.

gmt.bas This is the source code for the PowerBasic DLL Compiler Version 7.02 + Win32API
g_kons.bi Include file with integer constants used throughout both <GMT> and all our other dll's
gmt_glob.bi Include file with global variables used throughout the complete software and all its code modules. Most of these globals are accessed through their pointers, in the dll's.
gmt.pbr Include file with compiled resource needed for <GMT> compilation. This file is generated by running PBRES.EXE on the gmt.res c-compiled resource created with Microsoft Visual C++. The gmt.h file contains the required constants in C-code format. Users need only the gmt.pbr file to compile their own <GMT> applications. Users requiring the gmt.res file can get it on demand. It is only required for C++ programmers.
gmt_debu.inc Include file with some specific procedures and functions for debugging or demonstrating <GMT> applications.
g_type.bi Include file for type declarations needed for <HarmLib> as well as for <GMT>
g_file.inc & g_file.bi code module supporting file I/O functions and procedures, used mainly during setup of applications.

g_lib.dll & bi

g_mus.dll & bi

g_har.dll & bi

g_mus.dll & bi

compiled library and declaration file for the Harmony Library and internal GMT callbacks.

Source code resides in the modules: g_hgen.inc, g_main.inc, g_midi.inc, g_wave.inc and g_hgen.bi, etc...

The code container for dll compilation with Power Basic is g_lib.bas. These files can be obtained on demand. Only very experienced programmers should attempt changes in this code. Users have to make sure they always work with the latest version of the compiled library file and the corresponding declaration file.

*_gmt.ini data files in ASCII format:

These are read by the program. If these files are not present in the working directory for <GMT>, the program will generate them in a default format.

 Of course, users should get their copy of the PB/Windows compiler. Visit PowerBasic's website for details. It's not even expensive (less than 200$ for the complete package), and it can be ordered via e-mail from Power Basic! Note that this software requires a 32-bit operating system: Win95, Win98, Win Me, WinXP, Win2000 or Win-NT, Vista, will do. For using the Win32Api, users will need the professional development package provided only by microsoft. (Available as Visual Studio on CD-rom, or from their website. Students and teachers can get a good deal for the whole msdn package from Microsoft). The required declaration files (Win32api.inc, commctrl.inc as well as the *.h files) can be freely distributed and people having no other sources for these files can request them by email from us. They are also available on our website in a ZIP'd form.


For ease of installation and maintenance, keep these files together on a read-only subdirectory or, better even, on a floppy disk or CD. For some of your projects you may need a fresh version of some of these files, as will be explained further. Since this package is constantly under development, you might want to download newer versions very regularly. Subscribe to our website!

We strongly advize you to create directories on your c: drive as follows:

Of course it is possible to organize your directories differently, but the paths to them are hardcoded in the source. (That's because PB's metacompiler directives do not accept declared string constants and concatenation instructions as parameters...). So in that case you would have to change the paths whereever they occur in the source code everytime you get a fresh version to download...

We have uploaded this package to the server of our domain (logosfoundation.org) and you can download it using ftp by selecting the subdirectory http://www.logosfoundation.org/gmt/ You should download all the contents. This manual , an indexed series of HTML documents, is also present in this directory. The full URL is: http://www.logosfoundation.org/gmt/gmt_manual.html. The html manuals are available in zipped format under: http://www.logosfoundation.org/gmt/gmt_manuals.zip. You can see a complete directory of this website section by surfing to: http://www.logosfoundation.org/gmt/index-directory.html. This webpage will always be the most accurate way to surf our sites, since these index-directory pages are created automatically and updated daily, by our software...

If you want to submit code snippets, please feel free to ftp them to: ftp.logosfoundation.org/incoming/gmt. Log in as anonymous and use your name (without spaces) or email adress as password.

Technical requirements for running and developing <GMT>:

Users should be familiar with programming in general and the Basic language particularly, prior to attempting to use any of this GMT-code. If users want to make use of the specific musical composition (harmony) procedures and functions provided, they should thoroughly read through the users manual we provided with our library 'HarmLib'. This software is meant to be used by people with both a good knowledge of music theory as well as a knowledge of music technology, both software and hardware. So, the use will probably be limited to real experimental composers with an academic background, interested in explorations into the potential non-linear architectures of musics.

This software is not suitable for songwriting, popular music, jazz, rock, funk, folk, disco, right wing academic harmony and counterpoint. It has no support for guitars, drums, pomo, groove boxes, standard midi file playing devices... So, be warned, and do not complain to the author if your attempts to use it out-of-context prove unsuccessfull.

Manual for GMT program developers / composers

The GMT-Cockpit : User Interface

Visit Logos' Homepage Visit Godfried-Willem Raes' pages Harmony Library for Basic

Compositions realized using this software: <Shifts '87>, <Fall'95>, <Sincs>, <Counting Down to minus 747>,<Mach'96>,<Winter'97>, <Boxing>, <CoHiBa>, <Gorgonio>, <OboTek>, <Jumpy Variations>, <CelloPi>,<LickStick>, <A Book of Moves>, <Songbook>,<TechnoFaustus>, <FidelC>,<Panatella>,<WoodStock>,<Hidden {c}harms>, <KlungelTango>, <Harm for Harma>, <Fujisan ni nobore>,<Paradiso>,<Vibes>,<TechnoFaustus>,<Dripper>, <Gestrobo>,<SQE-STO-4QR>, <g_tech.611>,<PicRada Studies>...

Other composers and musicians using this real time software: Joachim Brackx, Karin De Fleyt, Marc Maes, Bruno Forment, Luc Brewaeys (<Due Cose... >,<Trajet>>, Champ d'Action, Kristof Lauwers (<Processing #4>,<MachineWall>,<RobotGarden>...), Arne Deforce, Kris De Baerdemacker, Brent Wetters, Jonathon Kirk, Thomas Smetryns, Rene Mogenson...

Note for Students in Godfried-Willem Raes composition class at the Ghent Royal Conservatory:

Meer kommentaar en lesmateriaal wordt aangereikt in de paragrafen 1134 en 1135 van de kursus. Paragraaf 1135 behandelt meer in het bijzonder de behandeling van ritmiek onder multitaskers zoals GMT.

<GMT> wordt in detail behandeld in de kursus algoritmische kompositie en behoort tot de obligate leerstof. Het vervangt grotendeels het eerste hoofdstuk van de kursus.

Last updated: 2007-01-20