No description
Find a file
2024-03-29 14:37:28 +01:00
omnimax_lang Bump version 2024-03-29 14:37:28 +01:00
omnimaxpkg remove print flags 2021-04-11 18:35:37 +01:00
.gitignore Prepare for 0.2.0 release 2020-09-29 14:23:05 +01:00
.gitmodules Added max-api back to deps, but in omnipkg 2020-03-23 12:52:55 +00:00
LICENSE Update LICENSE year 2021-02-11 12:57:28 +00:00
omnimax.nim CLI: use new io txt file name 2021-05-14 11:19:21 +02:00
omnimax.nimble Bump version 2024-03-29 14:37:28 +01:00
README.md Bump version 2024-03-29 14:37:28 +01:00

omnimax

Compile omni code into Max objects.

Requirements

  1. nim
  2. git
  3. cmake
  4. gcc (Windows) / clang (MacOS)

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

Installation

To install omnimax, simply use the nimble package manager (it comes bundled with the nim installation).The command will also take care of installing omni:

nimble install omnimax -y

Usage

omnimax ~/.nimble/pkgs/omni-0.4.2/examples/OmniSaw.omni

Max object interface

  1. ins and outs represent audio inlets / outlets.

  2. params and buffers can be set via messages and attributes. Consider this example:

    MyOmniObject.omni

    params:
        freq
        amp
    
    buffers:
        buf1
        buf2    
    
    ... implementation ...
    

    These params and buffers can be initialized on object instantiation. All numeric values will initialize params, and all symbol values will initialize buffers:

     [ myomniobject~ 440 foo 0.5 bar ]
    

    In the previous example, freq == 440 / amp == 0.5 / buf1 == foo / buf2 == bar.

    Another option is to use the attribute syntax:

     [ myomniobject~ @freq 440 @amp 0.5 @buf1 foo @buf2 bar ]
    

    One can also use name $1 and set name $1 messages to set the values of params and buffers at runtime:

     ( set freq 440 ) == ( freq 440 )
     ( set amp 0.5 )  == ( amp 0.5 )
     ( set buf1 foo ) == ( buf1 foo )
     ( set buf2 bar ) == ( buf1 bar )
    

    Finally, all params and buffers support the attrui object.

Website / Docs

Check omni's website.