Skip to content

EggAllocationService/mathr

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mathr

A command-line time based expression evaluator for libmapper.

Installation

# clone the repository
git clone https://github.com/EggAllocationService/mathr.git
cd mathr

# build the project
cargo build --release

# install to PATH
cargo install --path .

Examples

mathr "sin(t)" # a signal with a sine wave with a period of 3.4 milliseconds
mathr "sin(t/(pi * 1000))" # a signal with a sine wave with a period of 1 second

mathr "sin(t/(pi * 500)) * cos(t/(pi*500))" # Cool wavy thing

You can write any expression using common math functions (basically any operation in the rust standard libary), and the variable t which represents the time since the program started in milliseconds.

You can also use the options -n and -d to change the signal and device names, respectively. The -r option changes the time between evaluations, default is 10 milliseconds.

About

Expression evaluator for libmapper

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages