{"id":15061164,"url":"https://github.com/vult-dsp/vult","last_synced_at":"2025-05-15T18:08:19.062Z","repository":{"id":22642049,"uuid":"25984949","full_name":"vult-dsp/vult","owner":"vult-dsp","description":"Vult is a transcompiler well suited to write high-performance DSP code","archived":false,"fork":false,"pushed_at":"2025-03-21T11:00:06.000Z","size":17606,"stargazers_count":503,"open_issues_count":9,"forks_count":25,"subscribers_count":26,"default_branch":"master","last_synced_at":"2025-03-31T22:19:42.558Z","etag":null,"topics":["audio-effect","compiler","dsp","microcontroller","ocaml","puredata","synthesizer","vult","webaudio"],"latest_commit_sha":null,"homepage":"https://vult-dsp.github.io/vult","language":"OCaml","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vult-dsp.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2014-10-30T18:46:49.000Z","updated_at":"2025-03-19T09:45:27.000Z","dependencies_parsed_at":"2023-11-18T16:24:34.788Z","dependency_job_id":"feb76d59-05a8-40c4-a4d5-6af1f94bff29","html_url":"https://github.com/vult-dsp/vult","commit_stats":null,"previous_names":[],"tags_count":42,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vult-dsp%2Fvult","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vult-dsp%2Fvult/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vult-dsp%2Fvult/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vult-dsp%2Fvult/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vult-dsp","download_url":"https://codeload.github.com/vult-dsp/vult/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247744333,"owners_count":20988783,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["audio-effect","compiler","dsp","microcontroller","ocaml","puredata","synthesizer","vult","webaudio"],"created_at":"2024-09-24T23:10:37.120Z","updated_at":"2025-04-07T23:08:31.594Z","avatar_url":"https://github.com/vult-dsp.png","language":"OCaml","funding_links":[],"categories":[],"sub_categories":[],"readme":"![Vult](/other/Images/Vult.png?raw=true \"Vult\")\n\n[![Build Status](https://travis-ci.org/modlfo/vult.svg?branch=master)](https://travis-ci.org/modlfo/vult) [![Build status](https://ci.appveyor.com/api/projects/status/07x9yqby88bh3q8j?svg=true)](https://ci.appveyor.com/project/modlfo/vult) [![Coverage Status](https://coveralls.io/repos/github/modlfo/vult/badge.svg?branch=master)](https://coveralls.io/github/modlfo/vult?branch=master)\n\nVult 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.\n\nThe Vult compiler is a transcompiler, which takes Vult code and produces plain C/C++ code that can be compiled in any platform with a C/C++ compiler, for example: Arduino or Teensy boards (using fixed-point arithmetics). Vult can also generate JavaScript that can be run directly in the browser or C/C++ that can be compiled as Pure Data externals. Code written in Vult has freedom.\n\nCheck out the documentation and tutorial in http://vult-dsp.github.io/vult/ or take a look at the [Wiki](https://github.com/vult-dsp/vult/wiki).\n\n### Basics\n\nTo generate C/C++ code with floating point arithmetic you have to execute vult as follows:\n\n```\n$ vultc -ccode infile.vult -o outfile\n```\n\nThis will produce the files `outfile.h` and `outfile.cpp`. In order to compile and link these files you need to include in your project the files `runtime/vultin.h` and `runtime/vultin.cpp`.\n\nTo generate code with fixed point arithmetics you need to execute:\n```\n$ vultc -ccode -real fixed infile.vult -o outfile\n```\n\nFixed point arithmetics are performed in q16 format; 16 bits for the integer part and 16 for the decimal.\n\nVult provides a few templates; for example to generate objects compatible with the Teensy Audio Library or Pure Data externals.\n\nYou can check these repositories for examples:\n\n- PicoADK (Raspberry Pi Pico) https://github.com/DatanoiseTV/PicoADK-Firmware-Template\n- WebAudio https://github.com/modlfo/vult-webaudio\n- PureData https://github.com/vult-dsp/vult/tree/master/examples\n- Teensy Audio https://github.com/modlfo/teensy-vult-example\n\nIn the Wiki\n\n- [Language Reference](https://github.com/vult-dsp/vult/wiki/Language-Reference)\n- [Command Line Options](https://github.com/vult-dsp/vult/wiki/Command-Line-Options)\n- [Videos and Examples](https://github.com/vult-dsp/vult/wiki/Videos-and-Examples)\n\nThe DSP code for all [Vult VCV Rack](https://modlfo.github.io/VultModules/) and [Vult Eurorack](https://www.vult-dsp.com/hardware) modules is written in the Vult language.\n\n## Credits\n\nVult is maintained by: Leonardo Laguna Ruiz with the help of Carl Jönsson and Johan Rhodin\n\nLogo design by: John Klimt https://www.facebook.com/JohnKlimt\n\nThe Vult logo is property of Leonardo Laguna Ruiz, all rights reserved.\n\n## Installing\n\nThere are three flavors the Vult compiler:\n- command line ([native executables](https://github.com/vult-dsp/vult/releases) and [node.js version](https://www.npmjs.com/package/vult))\n- [node.js library](https://www.npmjs.com/package/vultlib)\n- [web browser library](https://github.com/vult-dsp/vult/releases)\n\n### Installing with npm\n\nYou need to have `node.js` and `npm` installed. This version of the compiler is 4x slower than the native version. If you have a large project it is recommended to install the native compiler. To install the Js version with npm run:\n\n```\n$ npm install vult -g\n```\n\nThis will install provide `vultc` command in your path. Vult is updated frequently, you can use the same command to update Vult.\n\n### Installing the native executable\n\nThe native executables can be downloaded from the [releases page](https://github.com/vult-dsp/vult/releases). Pick the executable corresponding to your operating system and place it in a location pointed by your PATH variable.\n\n### Installing the compiler as a JavaScript library\n\nTo install the node.js library use:\n```\n$ npm install vultlib\n```\n\n### Embedding in a Web page\n\nThe compiler can be embedded in a web page providing and it provides all the functionality.\n```\n\u003cscript src=\"https://modlfo.github.io/vult/javascripts/vultweb.js\"\u003e\u003c/script\u003e\n```\n\nFor an example check:\n\nhttps://github.com/modlfo/vult-webaudio\n\n## A glipse of Vult\n\nVult is based on the idea that a single function can be a full processing unit. Think of it as being a block or a box in your favorite graphical audio environment e.g. a box in PureData. Functions can store information. Consider the following code for a digital biquad filter:\n\n```\nfun biquad(x0, b0, b1, b2 ,a1 ,a2) : real {\n    mem w1, w2;\n    val w0 = x0 - a1 * w1 - a2 * w2;\n    val y0 = b0 * w0 + b1 * w1 + b2 * w2;\n    w2, w1 = w1, w0;\n    return y0;\n}\n```\n\nThat function declares two memory (`mem`) variables `w1` and `w2` which will remember the state of every instance of this filter.\n\nEvery time we need a new `biquad` instance, we just need to call the function. For example:\n\n```\nfun process(i1, i2) {\n   val o1 = biquad(i1, ....);\n   val o2 = biquad(i2, ....);\n}\n\n```\nThe filter that process the signal `i1` is completely independent of the one that process `i2`.\n\nVult also has a bunch of useful features, like the possibility of creating compile-time lookup tables and embedding wav files (with and without interpolation). For example, the following function is replaced by a lookup table which would be more efficient than executing the body of the function.\n\n```\nfun pitchToRate(d) @[table(size=127,min=0.0,max=127.0)] {\n   return 0.00018539226566085504 * exp(0.057762265046662105 * d);\n}\n```\n\nThe Vult compiler can generate C++ code that performs all the calculations using fixed-point arithmetics. Fixed-point arithmetics executes faster than floating-point arithmetics in processors that do no have a dedicated FPU. For example AVR Arduinos, Teensy 3.2 and Raspberry Pi Pico.\n\n\n## Text editor support\n\n### SublimeText\n\nPut the [syntax file](https://github.com/vult-dsp/vult/raw/master/other/SublimeTextSyntax/vult.sublime-syntax) in the corresponding Sublime Text `User` packages.\n\nIn Mac, the path is the following `$HOME/Library/Application Support/Sublime Text 3/Packages/User/vult.sublime-syntax`.\n\n### Visual Studio Code\n\nInstall the extension `vult` available in the [marketplace](https://marketplace.visualstudio.com/items?itemName=modlfo.vult).\n\n## Compile from source\n\nIf you want to compile the Vult source, it is recommended to use a Linux or Mac computer. It is possible to compile on Windows but the process is more difficult.\n\nFirst you need to install Opam. Check the alternatives on https://opam.ocaml.org/\n\nOpam can be installed on Linux using your package manager. If you use a Debian/Ubuntu based distro you can use:\n\n```\n$ sudo apt install opam\n```\n\nIn Mac you can install Opam using brew\n\n```\n$ brew install opam\n```\n\n### Installing the compiler and dependencies\n\n The simplest way to install all requirements is with Opam.\n\n```\n$ opam switch 4.14.0\n$ opam install ocamlbuild containers ppx_deriving pla result ounit js_of_ocaml js_of_ocaml-ppx\n```\n### Compiling Vult\n\nTo compile the native executable:\n```\n$ make\n```\n\nCompile the node.js code:\n```\n$ make jscompiler\n```\n\nRunning tests (Linux and macOS):\n```\n$ make test\n```\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvult-dsp%2Fvult","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvult-dsp%2Fvult","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvult-dsp%2Fvult/lists"}