Skip to main content

SCAMP (Suite for Computer-Assisted Music in Python)

SCAMP is an computer-assisted composition framework in Python designed to act as a hub, flexibly connecting the composer-programmer to a wide variety of resources for playback and notation. SCAMP allows the user to manage the flow of musical time, play notes either using FluidSynth or via MIDI or OSC messages to an external synthesizer, and ultimately quantize and export the result to music notation in the form of MusicXML or Lilypond. Overall, the framework aims to address pervasive technical challenges while imposing as little as possible on the aesthetic choices of the composer-programmer.

Features

  • Flexible and extensible playback: Although SCAMP comes with a basic general MIDI soundfont, any .sf2 or .sf3 soundfont can be used, and playback can also include MIDI or OSC messages to external programs or synthesizers, which effectively offers limitless sonic possibilities.

  • Note-based, but in a broad sense: Although SCAMP conceives of music in terms of notes, notes in SCAMP are extremely flexible sound-objects that can include the continuous evolution of arbitrary playback parameters.

  • Effortless microtonality: to play the G above middle C 30 cents sharp, the user has only to use the MIDI pitch 67.3. Behind the scenes, SCAMP manages all the MIDI pitchbend messages, placing notes on separate channels where necessary so that these messages do not conflict.

  • Effortless playback of glissandi and dynamic envelopes. Both pitch and volume can follow arbitrary curves defined using the expenvelope package.

  • Flexible and precise polyphonic tempo control using clockblocks. In SCAMP, different layers of music moving at different tempi can be interwoven with one another while remaining coordinated. Smooth accelerandi and ritardandi are possible, and the resulting music can be quantized according to the tempo of any layer.

  • Sensible and flexible quantization. The user has a fine degree of control over how rhythms are quantized and over the degree of complexity in the resulting notation.

Philosophy

Compositional tools always feature some degree of trade-off between functionality and freedom; every feature that is made available to the user steers them in a certain direction. For instance, if a framework provides abstractions for manipulating harmonies, the user may find themselves (perhaps unconsciously) pushed in the direction of a particular harmonic language. While this may be a worthwhile trade-off in many cases, it is not the goal of SCAMP. Here, the goal is to provide general purpose tools, to remove the drudgery of implementing practical functionality that is needed again and again. Beyond this scope, users are encouraged to write and share their own extensions to suit their own compositional inclinations. (Several such extensions are available in the scamp_extensions package.)

Other key values underlying this framework are:

  • Playback first, notation second: SCAMP has been designed so that the user interacts with an ensemble, not a score. This way, ideas can be quickly auditioned and iterated over based on the sonic result. Once the result is deemed satisfactory, the user can then export it as music notation.
  • Compact and expressive code: Efforts have been made to make user code simple, yet powerful. One of the ways this is accomplished is through sensible defaults; although there is a lot of functionality under the hood, it shouldn't be encountered by the user until it is needed.
  • Modularity and adherence as much as possible to the Unix Philosophy. SCAMP bundles a number of tools together for convenience, but it may be more than a given user needs. For this reason, the MusicXML export capability is available separately as pymusicxml, the flexible musical Envelope class is available separately as expenvelope, and the system for managing musical time is available separately as clockblocks.

Installation & Requirements

SCAMP requires Python 3.12 or greater. With Python installed, opening a terminal and running:

pip install scamp

is usually all you need. Prebuilt wheels on PyPI bundle the FluidSynth library for Linux, macOS (both Intel and Apple Silicon), and Windows, so soundfont playback works out of the box on all three platforms with no separate install step.

To pull in the optional extras (LilyPond export, MIDI input/output, keyboard/mouse input) in one go:

pip install "scamp[all]"

This installs abjad==3.31 (pinned for compatibility), python-rtmidi, and pynput.

Test the installation by:

  1. Opening a terminal and typing python to start an interactive python session.
  2. Typing in from scamp import test_run; test_run.play() and pressing return.

If you hear a piano gesture sweeping inward towards middle C, SCAMP has installed correctly!

Optional dependencies, individually

You don't need any of these for a basic install — they only matter if you want the corresponding feature.

python-rtmidi — needed for MIDI input and for generating an outgoing MIDI stream (e.g. into a DAW). On Linux, if pip install python-rtmidi fails, you may first need the Python development headers: sudo apt install python3-dev. See the python-rtmidi installation instructions for details.

abjad + LilyPond — needed for LilyPond output. SCAMP pins to abjad==3.31; newer abjad releases sometimes break compatibility, so prefer pip install "scamp[all]" (which uses the pinned version) over pip install abjad. After installing abjad, also download and install LilyPond, which abjad calls out to.

pynput — needed for the keyboard/mouse input helpers in scamp.utilities.

Building FluidSynth from source (Linux, advanced)

Linux wheels include a bundled FluidSynth, but if you have FluidSynth installed system-wide (e.g. sudo apt install fluidsynth), SCAMP will prefer that copy. This is useful if you want SCAMP to share a FluidSynth build with the rest of your system, or you're running on a distro the wheels weren't built for.

Installing scamp_extensions

The scamp_extensions package is the place for models of music-theoretical concepts (e.g. scales, pitch-class sets), additional conveniences for interacting with various types of input and output, and in general anything that builds upon SCAMP but is outside the scope of the main framework.

pip install scamp_extensions

To install the latest development version directly from GitHub:

pip install git+https://github.com/MarcTheSpark/scamp_extensions

Cloning the repository (contributors)

Most users should just pip install scamp (above). However, if you do clone this repo, note that it uses Git LFS for its binary/media assets, and that some of these are necessary for basic functionality. Install Git LFS before cloning (git lfs install), or run git lfs pull afterward, so those files are fetched in full. Without LFS you get small text pointer files instead; in particular the bundled soundfont won't load, so playback will fail.

Release files for scamp 0.13.0

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

Source distribution (sdist)

Source distribution for scamp 0.13.0
File Size Uploaded
scamp-0.13.0.tar.gz 10.7 MB Details

Built distributions (wheels)

Table of built distributions (wheels) for scamp 0.13.0
File
scamp-0.13.0-py3-none-win_amd64.whl Python 3 none Windows x86-64 Details
scamp-0.13.0-py3-none-manylinux_2_34_x86_64.whl Python 3 none Linux glibc 2.34+ x86-64 Details
scamp-0.13.0-py3-none-manylinux_2_34_aarch64.whl Python 3 none Linux glibc 2.34+ ARM64 Details
scamp-0.13.0-py3-none-macosx_14_0_arm64.whl Python 3 none macOS 14.0+ ARM64 Details
scamp-0.13.0-py3-none-macosx_12_0_x86_64.whl Python 3 none macOS 12.0+ x86-64 Details

Total release size: 78.4 MB

Release files / scamp-0.13.0.tar.gz

Download URL scamp-0.13.0.tar.gz
Size 10.7 MB
Tags Source
SHA-256 checksum
How to use checksums
dd7a13ab25731ebc7d96766f5623064385406a21b82e53ef0edc3c94b45a09e8
BLAKE2b-256 checksum
How to use checksums
c347f9a9d92c1ad2fa1a7a2af38759f8a5153d3cdf6b80f22eb33e4fa27fe7c1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.3

Release files / scamp-0.13.0-py3-none-win_amd64.whl

Download URL scamp-0.13.0-py3-none-win_amd64.whl
Size 10.7 MB
Tags Python 3 Windows x86-64
SHA-256 checksum
How to use checksums
8156c28b4905fd0b992f71c550bd91062079e96afd8967a13638ebfbb34b7e54
BLAKE2b-256 checksum
How to use checksums
9f673a1a51ea3c26ccb83be8a3509184e328179e8e8bae162198f128ffc502ef
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.3

Release files / scamp-0.13.0-py3-none-manylinux_2_34_x86_64.whl

Download URL scamp-0.13.0-py3-none-manylinux_2_34_x86_64.whl
Size 15.3 MB
Tags Linux glibc 2.34+ x86-64 Python 3
SHA-256 checksum
How to use checksums
91278104864aab1d817ac95c24ef5c9ae17378bdda865fbb72b0a83fe8eaf146
BLAKE2b-256 checksum
How to use checksums
e0b5b9468758a86524953f86e108b9df6bccfe0a9dc2a017096289c609e6b99e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.3

Release files / scamp-0.13.0-py3-none-manylinux_2_34_aarch64.whl

Download URL scamp-0.13.0-py3-none-manylinux_2_34_aarch64.whl
Size 15.1 MB
Tags Linux glibc 2.34+ ARM64 Python 3
SHA-256 checksum
How to use checksums
0c44b3959eaf37c21cbc4a9dcbae95257a623801f0819976d84d4a36c14c0f84
BLAKE2b-256 checksum
How to use checksums
2bd981945ba17c046035c2eb64d554ef3ac77b4dbf813fbf573d34190365465a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.3

Release files / scamp-0.13.0-py3-none-macosx_14_0_arm64.whl

Download URL scamp-0.13.0-py3-none-macosx_14_0_arm64.whl
Size 12.5 MB
Tags Python 3 macOS 14.0+ ARM64
SHA-256 checksum
How to use checksums
d93b8039dc69f34ff8ce844e1dfb9a4f054470b4dac8b2b49418d68e98feb418
BLAKE2b-256 checksum
How to use checksums
62d1ee4a9d826074367f0b2c3f1072ad9a259a4dc299a27e92cebba3d2d1d9b3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.3

Release files / scamp-0.13.0-py3-none-macosx_12_0_x86_64.whl

Download URL scamp-0.13.0-py3-none-macosx_12_0_x86_64.whl
Size 14.2 MB
Tags Python 3 macOS 12.0+ x86-64
SHA-256 checksum
How to use checksums
9d062396962f022ed2b6f512749355709a8557208c3e3112854dc432183e9c6a
BLAKE2b-256 checksum
How to use checksums
c10647790684a2ce841b9b1b654285351d347f39aa401c90b5317e86e51a7060
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.3

Release history Release notifications | RSS feed

This release

0.13.0 This release

6 release files

0.11.0

6 release files

0.10.0

6 release files

0.9.6

6 release files

0.9.5

6 release files

0.9.4

6 release files

0.9.2

1 release file

0.9.1

1 release file

0.9.0

1 release file

0.8.9

1 release file

0.8.8

1 release file

0.8.7

1 release file

0.8.6

1 release file

0.8.5

1 release file

0.8.3

1 release file

0.8.2

1 release file

0.8.1

1 release file

0.8.0

1 release file

0.7.9

1 release file

0.7.5

1 release file

0.7.3

1 release file

0.7.2

1 release file

0.7.1.5

1 release file

0.7.1

1 release file

0.7.0

1 release file

0.6.9

1 release file

0.6.8

1 release file

0.6.7

1 release file

0.6.6

1 release file

0.6.5

1 release file

0.5.8

1 release file

0.5.7

1 release file

0.5.6

1 release file

0.5.5

1 release file

0.5.4

1 release file

0.5.3

1 release file

0.5.2

1 release file

0.5.1

1 release file

0.5

1 release file

0.3.1

1 release file

0.3

1 release file

0.2.3

1 release file

0.2.2

1 release file

0.2.1

1 release file

0.2.0

1 release file

0.1.1

1 release file

0.1.0

1 release file

0.0.9

1 release file

0.0.8

1 release file

0.0.7

1 release file

0.0.6

2 release files

0.0.5

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