No description
Find a file
2024-03-29 14:30:25 +01:00
.github/workflows Install nim via asdf nim on macOS (faster than building from source) 2021-12-26 14:36:51 -06:00
examples update delay example 2021-04-17 11:17:45 +01:00
omni_lang Abort if nim != 1.6.0 2024-03-29 14:30:25 +01:00
tests Fix tests 2021-03-23 11:55:51 +00:00
.gitignore Better gitignore in tests 2020-05-08 17:09:30 +01:00
CHANGELOG.md Abort if nim != 1.6.0 2024-03-29 14:30:25 +01:00
config.nims deadCodeElim switch is deprecated, feature always on 2021-12-25 03:37:04 -06:00
LICENSE Update LICENSE year 2021-02-11 12:56:38 +00:00
omni.nim Abort if nim != 1.6.0 2024-03-29 14:30:25 +01:00
omni.nimble Abort if nim != 1.6.0 2024-03-29 14:30:25 +01:00
omni_logo_text_transparent.png reduce size of omni logo image 2020-05-17 14:48:35 +01:00
README.md Abort if nim != 1.6.0 2024-03-29 14:30:25 +01:00

Omni logo

Build Status (master)

Buy Me A Coffee

Omni is a cross-platform DSL (Domain Specific Language) for low level audio programming. It aims to be a new, expressive and easy to use programming language to code audio algorithms in.

Omni leverages nim and C to compile code to self-contained static or shared libraries that can then be loaded and used anywhere. So far, two wrappers have already been written to compile omni code to SuperCollider UGens (omnicollider), or Max 8 objects (omnimax).

Also, a basic syntax highlighting VSCode plugin is available by simply looking for omni in the Extensions Marketplace.

Requirements

  1. nim
  2. git

Note that omni only supports nim version 1.6.0. It is recommended to install it via choosenim.

Installation

To install omni, simply use the nimble package manager (it comes bundled with the nim installation):

nimble install omni -y

Usage

Once you've installed omni, the omni executable will be placed in your ~/.nimble/bin folder.

Run omni -h to get help on all the available flags.

When running the omni compiler, the output is either a static or shared library (depending on the --lib flag). Along with it, an omni.h file (depending on the --exportHeader flag) containing all the callable functions in the shared/static library will be exported.

omni ~/.nimble/pkgs/omni-0.4.2/examples/OmniSaw.omni -o:./

This command will compile an antialiased sawtooth oscillator (part of the examples) to a shared library (libOmniSaw.so/dylib/dll), together with a header file (omni.h), in the current folder.

Sine oscillator example

Sine.omni

ins:  1
outs: 1

init:
    phase = 0.0

sample:
    incr  = in1 / samplerate
    out1  = sin(phase * TWOPI)
    phase = (phase + incr) % 1.0

To compile it, simply run:

omni Sine.omni

Website / Docs

Check omni's website.