Vult is a simple and powerful language to program high-performance algorithms that may run in small microprocessors or microcontrollers. Vult is specially useful when programming Digital Signal Processing (DSP) algorithms like audio effects or synthesizers.
To generate C/C++ code with floating point arithmetic you have to execute vult as follows:
$ vultc -ccode infile.vult -o outfile
This will produce the files
outfile.cpp. In order to compile and link these files you need to include in your project the files
To generate code with fixed point arithmetics you need to execute:
$ vultc -ccode -real fixed infile.vult -o outfile
Fixed point arithmetics are performed in q16 format; 16 bits for the integer part and 16 for the decimal.
Vult provides a few templates; for example to generate objects compatible with the Teensy Audio Library or Pure Data externals.
You can check these repositories for examples:
- WebAudio https://github.com/modlfo/vult-webaudio
- PureData https://github.com/modlfo/vult/tree/master/examples
- Teensy Audio https://github.com/modlfo/teensy-vult-example
In the Wiki
Vult is maintained by: Leonardo Laguna Ruiz with the help of Carl Jönsson and Johan Rhodin
Logo design by: John Klimt https://www.facebook.com/JohnKlimt
If you want to receive notifications for future development of this project you can join to the google group http://groups.google.com/d/forum/vult
There are three flavors the Vult compiler:
Installing with npm
You need to have
$ npm install vult -g
This will install provide
vultc command in your path. Vult is updated frequently, you can use the same command to update Vult.
The native executables can be downloaded from the releases page.
To install the node.js library use:
$ npm install vultlib
Embedding in a Web page
The compiler can be embedded in a web page providing and it provides all the functionality.
For an example check:
Compile from Source
- Ocaml compiler >= 4.03
- containers >= 1.2
- ppx_deriving >= 4.1
- pla >= 1.1
- result >= 0.99
- [Optional] ounit >= 2.0 (to run the tests)
- [Optional] js_of_ocaml >= 3.0 (to build the web functions)
Installing the tools
The simplest way to instal the requirements is with OPAM (https://opam.ocaml.org/)
$ opam switch 4.04.2 $ opam install containers ppx_deriving pla result
Optionally to run the tests and building the web functions:
$ opam install ounit js_of_ocaml js_of_ocaml-ppx
To compile the native executable:
Compile the node.js code:
$ make jscompiler
Running tests (Linux and macOS):
$ make test