Skip to main content

Vita

Vita is a Python module for interacting with the Vital Synthesizer. It is not an official product related to Vital. Vita uses Effort-based versioning.

Installation

Vita is supported on Linux, macOS, and Windows. Install with pip:

pip install vita

Example

from scipy.io import wavfile
import vita

sample_rate = 44100
bpm = 120.0
note_dur = 1.0
render_dur = 3.0
pitch = 36  # integer
velocity = 0.7  # [0.0 to 1.0]

synth = vita.Synth()
# The initial preset is loaded by default.

synth.set_sample_rate(sample_rate)
synth.set_bpm(bpm)

# Let's make a custom modulation using
# the available modulation sources and destinations.
# These lists are constant.
print("potential sources:", vita.get_modulation_sources())
print("potential destinations:", vita.get_modulation_destinations())

# "lfo_1" is a potential source,
# and "filter_1_cutoff" is a potential destination.
assert synth.connect_modulation("lfo_1", "filter_1_cutoff")

controls = synth.get_controls()
controls["modulation_1_amount"].set(1.0)
controls["filter_1_on"].set(1.0)
val = controls["filter_1_on"].value()
controls["lfo_1_tempo"].set(vita.constants.SyncedFrequency.k1_16)

# Use normalized parameter control (0-1 range, VST-style)
controls["filter_1_cutoff"].set_normalized(0.5)  # Set knob to 50%
print(controls["filter_1_cutoff"].get_normalized())  # Get normalized value

# Get parameter details and display text
info = synth.get_control_details("delay_style")
print(f"Options: {info.options}")  # ["Mono", "Stereo", "Ping Pong", "Mid Ping Pong"]
print(f"Current: {synth.get_control_text('delay_style')}")  # e.g., "Stereo"

# Render audio to numpy array shaped (2, NUM_SAMPLES)
audio = synth.render(pitch, velocity, note_dur, render_dur)

wavfile.write("generated_preset.wav", sample_rate, audio.T)

# Dump current state to JSON text
preset_path = "generated_preset.vital"

json_text = synth.to_json()

with open(preset_path, "w") as f:    
    f.write(json_text)

# Load JSON text
with open(preset_path, "r") as f:
    json_text = f.read()

assert synth.load_json(json_text)

# Or load directly from file
assert synth.load_preset(preset_path)

# Load the initial preset, which also clears modulations
synth.load_init_preset()
# Or just clear modulations.
synth.clear_modulations()

Parallel rendering with threads

Vita releases the Python GIL during the DSP-heavy work of render, render_file, load_preset, load_json, and to_json. This means you can render many presets in true parallel with a ThreadPoolExecutor instead of multiprocessing -- no process-spawn or pickling overhead, shared memory, and (importantly) no fork(), so it works even after importing thread-spawning libraries like JAX where a fork()-based pool would crash.

Give each thread its own vita.Synth. Sharing one Synth across threads is safe -- its critical section serializes concurrent calls -- but you get no parallelism from it, since only one thread renders at a time. See examples/multithreading_presets.

from concurrent.futures import ThreadPoolExecutor
import threading, vita

_local = threading.local()

def render_preset(path):
    synth = getattr(_local, "synth", None)
    if synth is None:
        synth = _local.synth = vita.Synth()  # one Synth per worker thread
    synth.load_preset(path)
    return synth.render(60, 0.7, 1.0, 2.0)

with ThreadPoolExecutor(max_workers=8) as pool:
    audios = list(pool.map(render_preset, preset_paths))

Building from source

setup.py compiles the extension, so an ordinary pip install is enough:

git clone --recursive https://github.com/DBraun/Vita.git
cd Vita
pip install .

You need a C++17 toolchain and CMake. The compile itself is driven by the Projucer-generated project for your platform -- make on Linux, xcodebuild on macOS, msbuild on Windows -- which the build invokes for you against the Python interpreter running the install. Type stubs (vita.pyi) are generated as part of the build.

Documentation

Full documentation is at dbraun.github.io/Vita, including the API reference and the changelog. To build the docs locally:

pip install -r docs/requirements.txt
sphinx-build -b html docs docs/_build/html

Issues

If you find any issues with the code, report them at https://github.com/DBraun/Vita.

Code Licensing

If you are making a proprietary or closed source app and would like to use Vital's source code, contact licensing@vital.audio for non GPLv3 licensing options.

What can you do with the source

The source code is licensed under the GPLv3. If you download the source or create builds you must comply with that license.

Things you can't do with this source

  • Do not create an app and distribute it on the iOS app store. The app store is not comptabile with GPLv3 and you'll only get an exception for this if you're paying for a GPLv3 exception for Vital's source (see Code Licensing above).
  • Do not use the name "Vital", "Vital Audio", "Tytel" or "Matt Tytel" for marketing or to name any distribution of binaries built with this source. This source code does not give you rights to infringe on trademarks.
  • Do not connect to any web service at https://vital.audio, https://account.vital.audio or https://store.vital.audio from your own builds. This is against the terms of using those sites.
  • Do not distribute the presets that come with the free version of Vital. They're under a separate license that does not allow redistribution.

Metadata

Release files for vita 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distributions (wheels)

Table of built distributions (wheels) for vita 0.1.0
File
vita-0.1.0-cp314-cp314-win_amd64.whl CPython 3.14 CPython 3.14 Windows x86-64 Details
vita-0.1.0-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl CPython 3.14 CPython 3.14 Linux glibc 2.28+ x86-64, Linux glibc 2.27+ x86-64 Details
vita-0.1.0-cp314-cp314-macosx_11_0_arm64.whl CPython 3.14 CPython 3.14 macOS 11.0+ ARM64 Details
vita-0.1.0-cp313-cp313-win_amd64.whl CPython 3.13 CPython 3.13 Windows x86-64 Details
vita-0.1.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl CPython 3.13 CPython 3.13 Linux glibc 2.27+ x86-64, Linux glibc 2.28+ x86-64 Details
vita-0.1.0-cp313-cp313-macosx_11_0_arm64.whl CPython 3.13 CPython 3.13 macOS 11.0+ ARM64 Details
vita-0.1.0-cp312-cp312-win_amd64.whl CPython 3.12 CPython 3.12 Windows x86-64 Details
vita-0.1.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl CPython 3.12 CPython 3.12 Linux glibc 2.28+ x86-64, Linux glibc 2.27+ x86-64 Details
vita-0.1.0-cp312-cp312-macosx_11_0_arm64.whl CPython 3.12 CPython 3.12 macOS 11.0+ ARM64 Details
vita-0.1.0-cp311-cp311-win_amd64.whl CPython 3.11 CPython 3.11 Windows x86-64 Details
vita-0.1.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl CPython 3.11 CPython 3.11 Linux glibc 2.27+ x86-64, Linux glibc 2.28+ x86-64 Details
vita-0.1.0-cp311-cp311-macosx_11_0_arm64.whl CPython 3.11 CPython 3.11 macOS 11.0+ ARM64 Details
vita-0.1.0-cp310-cp310-win_amd64.whl CPython 3.10 CPython 3.10 Windows x86-64 Details
vita-0.1.0-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl CPython 3.10 CPython 3.10 Linux glibc 2.28+ x86-64, Linux glibc 2.27+ x86-64 Details
vita-0.1.0-cp310-cp310-macosx_11_0_arm64.whl CPython 3.10 CPython 3.10 macOS 11.0+ ARM64 Details
vita-0.1.0-cp39-cp39-win_amd64.whl CPython 3.9 CPython 3.9 Windows x86-64 Details
vita-0.1.0-cp39-cp39-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl CPython 3.9 CPython 3.9 Linux glibc 2.28+ x86-64, Linux glibc 2.27+ x86-64 Details
vita-0.1.0-cp39-cp39-macosx_11_0_arm64.whl CPython 3.9 CPython 3.9 macOS 11.0+ ARM64 Details

Total release size: 20.6 MB

Release files / vita-0.1.0-cp314-cp314-win_amd64.whl

Download URL vita-0.1.0-cp314-cp314-win_amd64.whl
Size 1.2 MB
Tags CPython 3.14 Windows x86-64
SHA-256 checksum
How to use checksums
97809cf4bc61d008f50036520a0292b81862d9b93fd8c679fd0b464aa8926e82
BLAKE2b-256 checksum
How to use checksums
4b1883791f27fee76812fe4b1e61bffb45354d0423f5dcb3e73ebcbbf66e83eb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.14

Release files / vita-0.1.0-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL vita-0.1.0-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 1.4 MB
Tags CPython 3.14 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
7b2e847ad13b8ca5d726d921f0e498cbeba65bf8f86d2f84852a9c09ca68523d
BLAKE2b-256 checksum
How to use checksums
b681675be01303e0a47879a75027320f8155b4d189ccc6ac4c580f8b948d421b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.14

Release files / vita-0.1.0-cp314-cp314-macosx_11_0_arm64.whl

Download URL vita-0.1.0-cp314-cp314-macosx_11_0_arm64.whl
Size 886.0 kB
Tags CPython 3.14 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
a2a280983f7f9e88265cb417733b6946c6a1c69c2cfd6b9ea56485b7d0377c1a
BLAKE2b-256 checksum
How to use checksums
560927047510b7c64fa1e91cb51fb07d9867fcd98d33efd370367834955adf31
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.14

Release files / vita-0.1.0-cp313-cp313-win_amd64.whl

Download URL vita-0.1.0-cp313-cp313-win_amd64.whl
Size 1.2 MB
Tags CPython 3.13 Windows x86-64
SHA-256 checksum
How to use checksums
60ee6c30d8505ff9ab65b2e149f6a29ceea60f96b27a5aa2e53a923c3ebc2dcd
BLAKE2b-256 checksum
How to use checksums
5108439d40ad04e98bdc0a28a352e7084b8d2ffcc56a5988f027874eadeeabb0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.14

Release files / vita-0.1.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL vita-0.1.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 1.4 MB
Tags CPython 3.13 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
b9a475457939bb6e3f5176a3d3b071acb52ddc2f2df6f8e0c21b20760e6f2c7e
BLAKE2b-256 checksum
How to use checksums
2acfba9d1f3b41ad8dcadc4ded1b68fd2abdccd63153f862bf7543cbc4d7b243
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.14

Release files / vita-0.1.0-cp313-cp313-macosx_11_0_arm64.whl

Download URL vita-0.1.0-cp313-cp313-macosx_11_0_arm64.whl
Size 886.2 kB
Tags CPython 3.13 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
c66564ce3292bb3d01b25a7454a8320ed168f16987e8d202a75f564320429850
BLAKE2b-256 checksum
How to use checksums
cb702f033735070c8b3541e140ec9410ff1679695411b382ba88603e42b679a8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.14

Release files / vita-0.1.0-cp312-cp312-win_amd64.whl

Download URL vita-0.1.0-cp312-cp312-win_amd64.whl
Size 1.2 MB
Tags CPython 3.12 Windows x86-64
SHA-256 checksum
How to use checksums
c973a9cdb0d085b5b2d26768d74bfbd51d5d0c32e23f126f7ba5534699246130
BLAKE2b-256 checksum
How to use checksums
09d091797f51d7743f759b04c993839f9dff9870dc66f593b1adc49b6492c9c2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.14

Release files / vita-0.1.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL vita-0.1.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 1.4 MB
Tags CPython 3.12 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
ccf2d9eac98c2f97ce0ae38d7d427cd2f0f51a38aa8603a4e8b6765f5e4eda02
BLAKE2b-256 checksum
How to use checksums
d1eb935e7cc6ad5882090c8be0ede856cc47c9c675df5119591867a04cb401b6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.14

Release files / vita-0.1.0-cp312-cp312-macosx_11_0_arm64.whl

Download URL vita-0.1.0-cp312-cp312-macosx_11_0_arm64.whl
Size 886.2 kB
Tags CPython 3.12 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
577a641879e1fdb3f4c1f9190e871c8ab8e49c8c347207ca2f957cddb0375167
BLAKE2b-256 checksum
How to use checksums
4acd6bbf81416ecb56771baec66912d2c2a3264355c65d3599f03cdf3d2ba408
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.14

Release files / vita-0.1.0-cp311-cp311-win_amd64.whl

Download URL vita-0.1.0-cp311-cp311-win_amd64.whl
Size 1.2 MB
Tags CPython 3.11 Windows x86-64
SHA-256 checksum
How to use checksums
cdd55b1f07587466456b5ef40b60fe21aa5233abc43662e611bcc678e21f3c9e
BLAKE2b-256 checksum
How to use checksums
ca3faa51cb8c2a2f16b9f6a6818775e682158e210c70d8bbc5befb3de5769da2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.14

Release files / vita-0.1.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL vita-0.1.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 1.4 MB
Tags CPython 3.11 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
3353c73091beda7d9b8246dbcb077bad4713d6b6765be6fd0cfd274cc1ba45c7
BLAKE2b-256 checksum
How to use checksums
d846ec6c5cf83f054cbb38d1a170e99866b73a25a1b3532bfdb521466d557973
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.14

Release files / vita-0.1.0-cp311-cp311-macosx_11_0_arm64.whl

Download URL vita-0.1.0-cp311-cp311-macosx_11_0_arm64.whl
Size 886.9 kB
Tags CPython 3.11 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
f3015dd6768fa40c7398d3f5770fb399a0ce84043eb46cc76aed50ac41ad7dc2
BLAKE2b-256 checksum
How to use checksums
e57ee54f2aea2690c67030a44b39417574806e95727da92c96cf9776f3d7ca54
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.14

Release files / vita-0.1.0-cp310-cp310-win_amd64.whl

Download URL vita-0.1.0-cp310-cp310-win_amd64.whl
Size 1.2 MB
Tags CPython 3.10 Windows x86-64
SHA-256 checksum
How to use checksums
2c1163402be88b6295b32853385c28bb8609a5e397270fe1c7d8440ddc0d4ae1
BLAKE2b-256 checksum
How to use checksums
f0fa8d8c4126b8f399e6248ee4e0809199e2760c25deb8e620138b4eedc87255
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.14

Release files / vita-0.1.0-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL vita-0.1.0-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 1.4 MB
Tags CPython 3.10 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
583ae77c99524f259c8efc9be0f71c23da37e64fc01c3c28dd167b68eb847592
BLAKE2b-256 checksum
How to use checksums
8803be8e4fd14f8741ca308285bbb7a74cb7815a308b9dc1f70daafd580178d7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.14

Release files / vita-0.1.0-cp310-cp310-macosx_11_0_arm64.whl

Download URL vita-0.1.0-cp310-cp310-macosx_11_0_arm64.whl
Size 887.0 kB
Tags CPython 3.10 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
56cda1001e7af9c16b37d1c9770b3072b02390b7e75838ab84171db07e0a6caf
BLAKE2b-256 checksum
How to use checksums
e85adb20fd22abd10d26e1f72a99bec0235fea13b7d1380e588048ba2a5fa2c0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.14

Release files / vita-0.1.0-cp39-cp39-win_amd64.whl

Download URL vita-0.1.0-cp39-cp39-win_amd64.whl
Size 1.2 MB
Tags CPython 3.9 Windows x86-64
SHA-256 checksum
How to use checksums
bb746ee8219d047eb04225ea11fda374e27349158dd89c4b86b61484ebac44e8
BLAKE2b-256 checksum
How to use checksums
829cbe3d99187faf3f3a13a25d839f98767ca8e4e773ec193307b928c2047ca6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.14

Release files / vita-0.1.0-cp39-cp39-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL vita-0.1.0-cp39-cp39-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 1.4 MB
Tags CPython 3.9 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
87b9d390a69be4b37b20fe70dbcc2896993e0e8941f8250a49127b5b9e22d486
BLAKE2b-256 checksum
How to use checksums
af77c01e67afbc241bbd73a616c42aa0513305af41a6434f0c6ac02754edc615
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.14

Release files / vita-0.1.0-cp39-cp39-macosx_11_0_arm64.whl

Download URL vita-0.1.0-cp39-cp39-macosx_11_0_arm64.whl
Size 887.2 kB
Tags CPython 3.9 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
e81dcce7e27d36e2cc8ff26b7d82818a0c0a5b7723b34d052e48babcb597994c
BLAKE2b-256 checksum
How to use checksums
613af1be4ff433eef15006cc57aa8c3a4f480a69c974cffa410e05c02804af13
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.14

Release history Release notifications | RSS feed

This release

0.1.0 This release

18 release files

0.0.4

20 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page