Transpiler between .flutmax text and Max/MSP .maxpat patches
Project description
flutmax
Python bindings for the flutmax transpiler — convert between .flutmax text and Max/MSP .maxpat patches.
Install
pip install flutmax
A prebuilt wheel is currently available for macOS (arm64). On other
platforms (Linux, Windows, macOS x86_64), pip falls back to building
from source — see Building from source below.
Usage
File-based (compile / decompile files directly)
import flutmax_py
# Compile .flutmax → .maxpat
flutmax_py.compile_file("synth.flutmax", "synth.maxpat")
# Decompile .maxpat → .flutmax
flutmax_py.decompile_file("patch.maxpat", "patch.flutmax")
String-based (for programmatic use)
import flutmax_py
import json
# Compile source string to .maxpat JSON
maxpat = flutmax_py.compile("wire osc = cycle~(440);\nout audio: signal = osc;")
# Decompile .maxpat JSON to .flutmax source
source = flutmax_py.decompile(maxpat)
# Parse to AST JSON
ast = json.loads(flutmax_py.parse("wire osc = cycle~(440);"))
Building from source
When no prebuilt wheel is available for your platform, pip install flutmax
will attempt to compile from the source distribution. This requires:
| Dependency | How to install |
|---|---|
| Rust toolchain (stable) | curl https://sh.rustup.rs -sSf | sh |
| C compiler | Linux: apt install build-essential / dnf install gcc · Windows: Install Visual Studio Build Tools with the "C++ build tools" workload · macOS: xcode-select --install |
| Python development headers | Linux: apt install python3-dev / dnf install python3-devel · macOS/Windows: included with the standard Python installer |
Once the prerequisites are in place, pip install flutmax should succeed
automatically (maturin is pulled in as the build backend).
To build a wheel manually:
git clone https://github.com/nordsound/flutmax.git
cd flutmax/bindings/python
pip install maturin
maturin build --release # wheel is written to target/wheels/
pip install target/wheels/*.whl
Development build (editable install)
cd flutmax/bindings/python
pip install maturin
maturin develop --release # builds and installs in the current venv
python -c "import flutmax_py; print(flutmax_py.__version__)"
License
MIT — see LICENSE
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file flutmax-0.1.2.tar.gz.
File metadata
- Download URL: flutmax-0.1.2.tar.gz
- Upload date:
- Size: 177.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.12.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
24fd28386d4ed63737b2e96193007e8b0a426868641f0d5c694288e57e6bd2c4
|
|
| MD5 |
6f0030e7379afd4cff611fac4f072478
|
|
| BLAKE2b-256 |
ab1deae786fa33d0241741cabec71c933c942eebebcf95454fd32ffffbd2f340
|
File details
Details for the file flutmax-0.1.2-cp310-cp310-macosx_11_0_arm64.whl.
File metadata
- Download URL: flutmax-0.1.2-cp310-cp310-macosx_11_0_arm64.whl
- Upload date:
- Size: 518.5 kB
- Tags: CPython 3.10, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.12.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e4a11ef5b8434a35d04c2c6152c8e0f03fff85532c3a396304c3dff62cec8db2
|
|
| MD5 |
cb88921bec57abfcdc02af3e602968a0
|
|
| BLAKE2b-256 |
fd087be38f5f61e5bc1b63dac713209fbe721f94a5507624095d8e01e48542ef
|