Kronos Compiler Suite
University of Arts
All the source code in this repository is licensed under GPL3. This includes the runtime library, and by proxy, automatically imposes GPL3 on any of your custom software that uses the supplied library. Please contact the repository owner if you are interested in a different licensing model.
Welcome to Kronos
Kronos is a programming language and a compiler for musical signal processing. This is the initial release of source code and binaries. As of yet, there is very little documentation. The distribution comes with a test suite with some example programs. The stable capabilities of the compiler are those covered by the test suite.
Installing from binary
You can install one of the prebuilt packages targeted to Windows 7+, macOS, or Debian. Windows and Mac installers are componentized so you may choose whether to install developer headers and the test suite, for example.
See the next section for details about the runtime library placement.
A good way to get started is to run the test suite via ktests. It runs a set of Kronos programs via krepl. The former generally produce a textual result, while the latter produce an audio signal. The tests are installed along with a set of reference result files, and ktests will compare the output to each reference.
If you want to see the command lines ktests uses, run it with the --verbose switch.
I'm working on adding introductory material to the Wiki.
Compiling from Source
The dependencies for compiling Kronos are:
You may need run Powershell as admin. First, install the Chocolatey provider if you haven't yet done so:
Windows may prompt you about installing
nuget and trusting
ChocolateyGet and downloading 'Choco'.
Install-Package VisualStudio2017Community,cmake,hg,svn Install-Package python -RequiredVersion 2.7.11
Prior to Windows 10, you can install chocolatey and install the above packages via
Get Xcode from the app store. Then you can install the dependencies via Homebrew.
brew install cmake mercurial subversion
sudo apt-get install g++ python cmake mercurial subversion libsndfile-dev libtinyxml-dev libreadline6-dev
The easiest way to get Kronos configured is to use the buildbot script. You can skip the continuous integration script by using:
cd <workspace> hg clone https://bitbucket.org/vnorilo/k3bot cmake k3bot -DUSE_BUCKETBOT=False -DCMAKE_BUILD_TYPE=Release cmake --build .
This will download, configure and compile LLVM and Kronos. Alternatively you can install a precompiled LLVM 3.7 and add the configuration option -DUSE_SYSTEM_LLVM=True
You can build the install target to put the resulting binaries in your system path. On Unix-like systems the binaries are put in either /usr or /usr/local, split into bin and lib. The runtime library is put in /share/kronos/Lib under the prefix. On Windows, the prefix will be an user-specified location in Program Files. The compiler will look for the runtime library in the following places, in this order:
- environment variable KRONOS_RUNTIME_LIBRARY
- /usr/local/share/kronos/Lib in Unix
- /All Users/kronos/Lib in Windows
- ../share/kronos/Lib relative to the process path on Unix
- ../runtime/Lib relative to the process path on Windows
- ./Lib (relative to working directory)
If the runtime library is not found, it may be easiest to set the environment variable or copy the library under your home directory. If you want to run Kronos without installing, you should point KRONOS_RUNTIME_LIBRARY to /runtime/Lib under your work tree.
The test suite includes a bunch of statically compiled binaries via kc. To run them, use make test or the related IDE build target.