Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mimium-org/mimium
mimium (MInimal Musical medIUM) a programming language as an infrastructure for sound and music.
https://github.com/mimium-org/mimium
audio compiler dsl dsp music programming-language sound
Last synced: 5 days ago
JSON representation
mimium (MInimal Musical medIUM) a programming language as an infrastructure for sound and music.
- Host: GitHub
- URL: https://github.com/mimium-org/mimium
- Owner: mimium-org
- License: mpl-2.0
- Created: 2020-02-05T09:39:37.000Z (almost 5 years ago)
- Default Branch: dev
- Last Pushed: 2023-02-20T03:02:36.000Z (over 1 year ago)
- Last Synced: 2024-10-29T13:17:24.274Z (18 days ago)
- Topics: audio, compiler, dsl, dsp, music, programming-language, sound
- Language: C++
- Homepage: https://mimium.org
- Size: 1.63 MB
- Stars: 273
- Watchers: 9
- Forks: 9
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Funding: .github/FUNDING.yml
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# mimium
a programming language as an infrastructure for sound and music
stable: [![build status(master)](https://github.com/mimium-org/mimium/workflows/build%20&%20test/badge.svg?branch=master)](https://github.com/mimium-org/mimium/actions) dev: [![build status(dev)](https://github.com/mimium-org/mimium/workflows/build%20&%20test/badge.svg?branch=dev)](https://github.com/mimium-org/mimium/actions) [![Codacy Badge](https://app.codacy.com/project/badge/Grade/a7171f079d2b4439971513b6358c5a35)](https://www.codacy.com/gh/mimium-org/mimium/dashboard?utm_source=github.com&utm_medium=referral&utm_content=mimium-org/mimium&utm_campaign=Badge_Grade)
[![website badge](https://img.shields.io/badge/mimium.org-Website-d6eff7)](https://mimium.org) [![Gitter](https://badges.gitter.im/mimium-dev/community.svg)](https://gitter.im/mimium-dev/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) [![License Badge-MPL2.0](https://img.shields.io/badge/LICENSE-MPLv2.0-blue)](./LICENSE.md)
![mimium_logo_slanted](./mimium_logo_slant.svg)
mimium(*MInimal-Musical-medIUM*) is a programming language for sound and music.
mimium is made to be an infrastructure for distributing music in a form of a source code, not only a tool for musicians and programmers.
Its syntax and semantics are technically inspired from several modern programming languages for sound such as *[Faust](https://faust.grame.fr)* and *[Extempore](https://extemporelang.github.io/)*.
You can write various expression from low-level signal processing to note-level processing with a simple syntax and high-performance.
Since all the code is executed with JIT compilation using LLVM which has an equivalent performance as the dsp code written in general purpose languages such as C++.A minimal example below generates a sinewave of 440Hz.
```rust
// minimal.mmm
twopi = 3.141595*2
sr = 48000
fn dsp(){
out = sin(now * 440 * twopi / sr)
return (out,out)
}
```To run the code, type `mimium path/minimal.mmm` on your terminal application.
A special keyword `self` can be used in function, which is a last return value of the function.
This enables an easy and clean expression of feedback connection of signal chain.```rust
fn lpf(input:float,fb:float){
return (1-fb)*input + fb*self
}
```You can also write a note-level processing by using `@` operator which specifies the time when the function will be executed. Another special keyword `now` can be used for getting current logical time.
An event scheduling is sample-accurate because the scheduler is driven by an audio driver.```rust
freq = 440
fn noteloop()->void{
freq = (freq+1200)%4000
noteloop()@(now + 48000)
}
```More specific infos about the language are on [mimium Website](https://mimium.org).
## Installation
mimium can be run on macOS(x86), Linux(ALSA backend), Windows(WASAPI backend). WebAssemby backend will be supported for future.
An easiest way to getting started is to use [Visual Studio Code extension](https://marketplace.visualstudio.com/items?itemName=mimium-org.mimium-language). Search "mimium" in extension tab and install it. When you create & open the file with the file extension `.mmm`, you will be asked to install the latest binary. The extension also contains syntax highlights for `.mmm` files.
On macOS and Linux, installation via [Homebrew](https://brew.sh/) is recommended.
You can install mimium with a command as follows.
```sh
brew install mimium-org/mimium/mimium
```Also, you can get a built binary from [release](https://github.com/mimium-org/mimium/releases) section.
## Build from SourceTo build on Windows, you need to use MSYS2. For details, check [GitHub Action Workflow](https://github.com/mimium-org/mimium/blob/dev/.github/workflows/build_and_test.yml) and documentations on official website ([Installation](https://mimium.org/en/docs/users-guide/getting-started/installation/) and [Setting up development environment](https://mimium.org/en/docs/developers-guide/setup-development-environments/)).
### Installing Dependencies- cmake
- bison >= 3.3
- flex
- llvm >= 11
- Libsndfile
- RtAudio(cmake will automatically download)#### macOS
Install [homebrew](https://brew.sh) and XCode Commandline Tools beforehand.
```sh
brew install cmake flex bison libsndfile llvm ninja
```#### Linux(Ubuntu)
*On Linux(Ubuntu), we recommend to install llvm using an automatic installation script in https://apt.llvm.org/ because `llvm` package in apt does not contain some libs required by `llvm-config --libs`*
```sh
pushd /tmp && wget https://apt.llvm.org/llvm.sh && chmod +x llvm.sh && sudo ./llvm.sh && popd
sudo apt-get install libalsa-ocaml-dev libfl-dev libbison-dev libz-dev libvorbis-dev libsndfile-dev libopus-dev gcc-9 ninja-build
```#### Windows(MSYS2,mingw64)
Install [msys2](https://www.msys2.org/) by following instruction on the website. Launch Mingw64 terminal.
```sh
pacman -Syu git flex bison mingw-w64-x86_64-cmake mingw-w64-x86_64-gcc mingw64/mingw-w64-x86_64-libsndfile mingw64/mingw-w64-x86_64-opus mingw-w64-x86_64-ninja mingw-w64-x86_64-llvm
```### Clone Repository, build and install
```sh
git clone --recursive https://github.com/mimium-org/mimium
cd mimium
# configure. if you want to install to specific directory, add -DCMAKE_INSTALL_PREFIX=/your/directory
cmake -Bbuild
# build
cmake --build build -j
# install
cmake --build build --target install
```
## AuthorTomoya Matsuura/ζΎζ΅¦η₯δΉ
## [License](LICENSE.md)
The source code is lisenced under [Mozilla Puclic License 2.0](LICENSE.md).
The source code contains third party libraries with BSD-like lincenses, see [COPYRIGHT](./COPYRIGHT).
## Acknowledgements
This project is supported by all the contributers, [Sponsors](https://github.com/sponsors/tomoyanonymous), grants and scholarships as follows.
- 2019 Exploratory IT Human Resources Project ([The MITOU Program](https://www.ipa.go.jp/jinzai/mitou/portal_index.html)) by IPA: INFORMATION-TECHNOLOGY PROMOTION AGENCY, Japan.
- Kakehashi Foundation### Contributors
[![All Contributors](https://img.shields.io/badge/all_contributors-8-orange.svg?style=flat-square)](#contributors-)
Shinichi Tanaka
π π»
kyo
π
Baku ιΊ¦
π΅
Yuichi Yogo
π΅
Ayumu Nagamatsu
π΅
zigen
π΅
Hitoshi Takeuchi
π΅
Inqb8tr-jp
π΅ π