1 Introduction
TkScript ("TKS") is a free and open source "glue" script language for C / C++ frameworks.
It is mainly designed for audio / graphics / UI applications and text processing tools.
Features:
- C-like syntax
- classes with multiple-inheritance
- reflection / type introspection
- exception handling
- namespaces
- stream I/O and (de-)serialization
- RAII, no garbage collection
- (true / native) multithreading
- dynamically (un-)loadable script modules and classes
- self contained application and library packages ("pak" files)
- extendable via native C(++) plugin functions / classes / methods
Software written in TkScript includes:
- The Synergy MIDI sequencer and Eureka DAW
- Games
- Text processing tools
- md - a markdown to HTML converter
- org - an org-mode like text processor, mind map converter, and project plan scheduler + report generator
- graph - an ASCII based SVG graph generator (with OpenGL preview)
TkScript is accompanied by a set of add-on plugins / libraries that provide bindings for:
- OpenGL
- Window / Event handling (via SDL)
- Math (linear algebra)
- File I/O
- Zip files
- Networking
- Low latency audio (ASIO, PortAudio, OSS, ALSA)
- MIDI
- XML based user interfaces (
tkui)
TkScript has mainly been tested on the following platforms:
- arm64 / x86_64 macOS 10 / 13 / 14 / 15 / 26
- x86 / x64 Windows (2000 / XP / 7 / 8 / 10 / 11)
- x86 / x64 / ARM Linux (e.g. Debian, Ubuntu, Raspberry Pi OS, Yocto, ..)
2 License
TkScript is distributed under the terms of the GNU General Public License (GPLv2).
The add-on plugins and libraries are distributed under the terms of the GNU Lesser (library) General Public License (LGPLv2), or the MIT / BSD licenses (see plugin / library source for details).
|
Software written in TkScript may use any license (FOSS, closed source, ..). |
| Component | Windows | Linux | macOS |
| tks | Y | Y | Y |
| eqxmms | Y | Y | Y |
| tkanalogrytm | Y | Y | Y |
| tkbluetooth | Y | Y | - |
| tkchipmunk | Y | Y | Y |
| tkclap | Y | y | Y |
| tkfileutils | Y | Y | Y |
| tkfreeglut | Y | Y | Y |
| tkfreetype2 | Y | Y | Y |
| tkfreeverb | Y | Y | Y |
| tkgmp | Y | Y | Y |
| tkmath | Y | Y | Y |
| tkmidi | Y | - | - |
| tkmidi_alsa | - | Y | - |
| tkmidi_portmidi | Y | Y | Y |
| tkmidipipe | Y | Y | Y |
| tkminnie | Y | Y | Y |
| tkoldmath | Y | Y | Y |
| tkopengl | Y | Y | Y |
| tkportaudio | Y | Y | Y |
| tkportaudio_alsa | - | Y | - |
| tkportaudio_oss | - | Y | - |
| tkradiastools | Y | Y | Y |
| tksamplechain | Y | Y | Y |
| tksampleedit | Y | Y | Y |
| tksampler | Y | Y | Y |
| tksdl | Y | Y | - |
| tksdl12-compat | - | Y | Y |
| tksdl2 | Y | Y | Y |
| tksdl_net | Y | Y | Y |
| tksidplay2 | Y | Y | Y |
| tksmdi | Y | - | - |
| tkspeexdsp | Y | Y | Y |
| tksqlite | Y | Y | Y |
| tktriangulate | Y | Y | Y |
| tkui | Y | Y | Y |
| tkvst2 | Y | - | - |
| tkvst2_stub | - | Y | Y |
| tkvst2_nogui | - | Y | Y |
| tkvst2_macos | - | - | Y |
| tkwii | Y | - | - |
| tkzip | Y | Y | Y |
| yingtest | Y | Y | Y |
4 Downloads
4.1 Precompiled Binaries
|
on macOS, copy the extracted the files to /usr/local/ (optional) |
4.2 Source
The latest source-code packages are here:
- tks-source
- tks-build
- yac, yingtest
- tkanalogrytm
- tkchipmunk (v7)
- tkclap
- tkfreetype2
- tkfileutils
- tkmath, tkoldmath, tkgmp
- tkminnie
- tkopengl
- tksdl (Windows, deprecated), tksdl12-compat (deprecated), tksdl2 (Windows, Linux, macOS)
- tksdl_net, tkbluetooth
- tkmidi (Windows), tkmidi_alsa (Linux), tkmidi_portmidi (macOS)
- tkmidipipe
- tkportaudio, tkportaudio_alsa
- tkradiastools
- svg_loader, tktriangulate
- tksampler, tksamplechain, tksampleedit
- tksmdi
- tksqlite
- tkui
- tkunit
- tkvst2 (Windows), tkvst2 (stub), tkvst2 (nogui), tkvst2 (macOS),
- tkzip
|
How to build (via install helper): $ wget http://tkscript.org/tks_install_helper.sh
$ chmod +x tks_install_helper.sh
$ ./tks_install_helper.sh
downloads the source packages and build them $ sudo su
% cd build
% . ./setenv_linux.sh
% m all_install
installs them.
|
tested on macOS 13+14+15+26, Debian GNU/Linux 13, Windows 10+11 |
|
as of September 20th, 2025, tks is also available on GitHub |
How to build (manually):
- The first three packages (source, build, yac) are mandatory for building a command-line version of
tks.
- The remaining packages are optional.
- Edit the toplevel makefile (
makefile.linux, makefile.macos or makefile.msvc) to choose which additional plugins will be built.
- Edit+Run
. setenv_linux.sh, . ./setenv_macos_arm64.sh, . ./setenv_macos_x86_64.sh or . setenv_msvc.sh to set up cross compiling / target platform / include+lib paths.
- It is recommended to set up a shell function for
make invocation, e.g. m(){ make -j20 -f makefile.msvc $* ; } (done by setenv*)
Requirements / Prerequisites:
- The Windows build environment requires MSYS2 and the Microsoft Visual Studio compiler, e.g. the free-as-in-beer Community Edition.
- The Linux build environment requires GCC / G++, GNU make, and GNU Bash.
- optional (recommended) packages:
$ sudo apt-get install build-essential libsdl2-dev libsdl1.2-dev libsdl-net1.2-dev libpng-dev libfreetype-dev libgtk2.0-dev libzip-dev libgnutls28-dev libasound2-dev
- optional packages:
$ sudo apt-get install portaudio19-dev libportmidi-dev sox rubberband-cli
- The macOS build environment requires Clang (xcode toolchain), make, zsh, and the following brew packages:
brew install sdl2 libpng freetype (tested with arm64 and x86_64) (and optionally brew install portaudio portmidi and brew install sdl12-compat sdl2_net meson libzip gnutls).
The plugin bindings use the YaC (Yet another Component object model) interface, and the YInG interface generator.
To rebuild the bindings for a specific module, run $ m yac
in the plugin (or tks-source) directory. |
4.3 Other
4.3.1 emacs
5 Examples
6 Applications
- dog (API documentation generator, from 2009) (docs)
- md (markdown document generator, 2018-2024) (docs)
- org (org-mode-like document processor, 2020) (docs)
- graph (ASCII to SVG diagram / graph generator with OpenGL preview, 2024) (docs)
- minnie (vector graphics API and size-optimized binary stream format. supports conversion from SVG. 2018-2026) (docs)
8 Libraries
- debugtext OpenGL debug overlay. used by some (older) tksdl examples
- libplot Simple function plotter (windowed and PNG export). Useful for
org-mode notebooks.
- libplot-fs Simple GLSL pixel shader renderer (windowed and PNG export). Useful for
org-mode notebooks.
- librs Remote-Script library.
- for executing scripts in the context of another process
- used by
ob-tks-rs.el emacs org-mode extension and Synergy / Eureka MIDI sequencer / DAW applications
- tkui User Interface toolkit (SDL / OpenGL based with XML / SGML interface descriptions (
.xfm XML forms)
- Core widget classes:
BezierEdit, Button, CheckBox, ColorBox, ColorButton, ComboBox, ComboField, Dial, FloatParam, GraphForm, HSVColorPicker, Label, LayerSwitch, PopupMenu, RadioButton, RepeatButton, ScrollPane, Scroller, Slider, Spacer, SplitPane, StatusBar, TabSwitch, (Tree)TableView, TextEdit, TextField, TextView, TitledPanel, ViewPane, WindowDock, XMLForm, XYPad
- Core dialog classes:
ChoiceDialog, InfoDialog, FloatParamDialog, KeyHelpDialog, StringDialog, TextEditDialog, TextInputDialog
- Core layout classes:
BorderLayout, FlowLayout, GridLayout
9 Games
For your amusement, some of the older stuff can be downloaded here:
- retrovaders2 (a Space Invaders like game, from 2001)
- loadmd2 (a loader / viewer for Quake2 models, from 2002)
- equalize_it (a SID player and collection of C64 tunes, from 2003)
- gkraft (2D cave flyer, from 2004)
- racer (3D racing game, from 2008)
- jumpy (2D jump'n'run, from 2010)
- tequila (a classic Amiga500 demo effect ported to OpenGL, from 2010)
10 Documentation
See
here for language reference guide.
See
here for API reference.
For historical purposes,
here are the old changelogs from 2002 - 2015.
Document created in 7ms on 14-May-2026 10:52:05