Skip to main content

chaos-stratus

This package provides tools for interacting with (appropriately compiled) Chaos Audio Stratus pedal effects libraries.

By "appropriately compiled" we mean built with the Stratus build tools available with the most recent versions of Faust, or with the Faust IDE.

Effects that are not built with the Faust tools (e.g. those built before those tools became available) are still at least partially compatible with the library - they may not provide the documented class attributes, but they will provide the operational functions that allow you to interact with them.

In all cases, though, the effect must be built for the platform upon which this class is used - that means performing a "local" build with the Faust tools (or by some other means) or installing this package on the Stratus pedal itself.

LATEST NEWS

version 1.1.0

The package now supports effects not built with the Faust tools. The package now requires Python 3.8 as a minimum

Installation

You can install this package using a standard pip invocation

python -m pip install chaos-stratus

Usage/Examples

The main class of these tools is Effect.

You include that into your python script in the standard manner:

from chaos_stratus import Effect

You instantiate the class for a specific effect library as follows:

effect = Effect("path/to/my/effect.so")

See the module documentation for the API available to you.

Examples

Reporting on information concerning the library

import sys
from chaos_stratus import Effect

lib = sys.argv[1]
effect = Effect(lib)
print(f'Stratus effect library {lib}:')
print(f'  Effect name:....... {effect.name}')
print(f'  Effect ID:......... {effect.effectId}')
print(f'  Effect version:.... {effect.version}')
print(f'  Number of knobs:... {effect.knobCount}')
print(f'  Number of switches: {effect.switchCount}')

This is, in fact, what is implemented by the command:

python -m chaos_stratus "path/to/my/effect.so"

Applying the effect on raw sample data

Possibly the most interesting thing you can do with the tools is to apply the effect to test sample data, with different knob and switch values, and check that the output is what you expected.

This is how you can do that with raw sample from stdin, sending output to stdout:

import sys
from chaos_stratus import Effect

lib = sys.argv[1]
effect = Effect(lib)

#
# Set knobs/switches to desired values
#
effect.setKnob(1, 0.5)

#
# Run the effect on stdin
#
BUFFERSIZE=8192
DATA_IN=sys.stdin.buffer
DATA_OUT=sys.stdout.buffer
input_buffer=bytearray(BUFFERSIZE)
while True:
    insize = DATA_IN.readinto(input_buffer)
    if insize == 0:
        break
    DATA_OUT.write(effect.computeBuf(input_buffer[:insize]))

To use that with, say, a wav input file and pump the output to the default output device of your computer (say, your headphones)

  • install sox
  • write a Python script based on the above sample code
  • Find a suitable wav file (or any other format that Sox supports out of the box)
  • Run it all like this from the (shell) command line:
sox your-sounds.wav -b32 -e floating-point -r 44100 -t raw - | \
    python my-effect-script.py path/to/my/effect.so | \
    sox -b32 -e floating-point -r 44100 -t raw - -d

Add more effects to your pipeline at will :).

Metadata

Release files for chaos-stratus 1.1.1

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

Source distribution (sdist)

Source distribution for chaos-stratus 1.1.1
File Size Uploaded
chaos_stratus-1.1.1.tar.gz 7.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for chaos-stratus 1.1.1
File Interpreter ABI Platform
chaos_stratus-1.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 14.4 kB

Release files / chaos_stratus-1.1.1.tar.gz

Download URL chaos_stratus-1.1.1.tar.gz
Size 7.6 kB
Tags Source
SHA-256 checksum
How to use checksums
e4546a7ffedbcd8effabab5f4e85a402ac948850e9e738722c6d15442e5eaf5b
BLAKE2b-256 checksum
How to use checksums
c6e0fda100f74812cac8b53abdcf33741d629d89cb8e8cedf8b823e22815b4ad
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.0 CPython/3.10.12

Release files / chaos_stratus-1.1.1-py3-none-any.whl

Download URL chaos_stratus-1.1.1-py3-none-any.whl
Size 6.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
55e3f318bc75a608318e49c43ad7f39cc35d45f1f2d5f0834edaa374954f41e6
BLAKE2b-256 checksum
How to use checksums
625ceda20ae584bd942149266f5a04d7903728f7582063e945d7a0e12046f350
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.0 CPython/3.10.12

Release history Release notifications | RSS feed

This release

1.1.1 This release

2 release files

1.1.0

2 release files

1.0.1

2 release files

1.0.0

2 release files

0.0.0

2 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