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

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

scamp-0.12.0.tar.gz (10.7 MB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

scamp-0.12.0-py3-none-win_amd64.whl (13.2 MB view details)

Uploaded Python 3Windows x86-64

scamp-0.12.0-py3-none-manylinux_2_34_x86_64.whl (15.3 MB view details)

Uploaded Python 3manylinux: glibc 2.34+ x86-64

scamp-0.12.0-py3-none-manylinux_2_34_aarch64.whl (15.0 MB view details)

Uploaded Python 3manylinux: glibc 2.34+ ARM64

scamp-0.12.0-py3-none-macosx_14_0_arm64.whl (13.2 MB view details)

Uploaded Python 3macOS 14.0+ ARM64

scamp-0.12.0-py3-none-macosx_12_0_x86_64.whl (14.1 MB view details)

Uploaded Python 3macOS 12.0+ x86-64

File details

Details for the file scamp-0.12.0.tar.gz.

File metadata

  • Download URL: scamp-0.12.0.tar.gz
  • Upload date:
  • Size: 10.7 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for scamp-0.12.0.tar.gz
Algorithm Hash digest
SHA256 8fc00ca69964d4be3bd0bbc08394b3cd4f890030f05c569d1bdeea56413a8688
MD5 6789dfb85199c7f8f723794c61fc9bb7
BLAKE2b-256 383083e4137eec97439a231118fc641d4af3c6909085fc8aa3cf0766d296a41b

See more details on using hashes here.

File details

Details for the file scamp-0.12.0-py3-none-win_amd64.whl.

File metadata

  • Download URL: scamp-0.12.0-py3-none-win_amd64.whl
  • Upload date:
  • Size: 13.2 MB
  • Tags: Python 3, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for scamp-0.12.0-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 280470f515641ce0b97af34cfbf287fb2b38057f06ed69f137cdc61884528d39
MD5 4c8e9b5ca6fbf0abe95edbf8b15ed547
BLAKE2b-256 77042904335bf69409cddef89450f1d490d769f85d73086e305c2206780bfed5

See more details on using hashes here.

File details

Details for the file scamp-0.12.0-py3-none-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for scamp-0.12.0-py3-none-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 ceb9381f207900ac6d8ddee33b30a8c4d6e829afc9d26fad083f32986a1fab5f
MD5 9b71e11b7db51b99f02d8081a368dc28
BLAKE2b-256 42ccc5077ddb69c7618d0598ffe09ae6f17c40fe93ec9e3b8938a2c94726214c

See more details on using hashes here.

File details

Details for the file scamp-0.12.0-py3-none-manylinux_2_34_aarch64.whl.

File metadata

File hashes

Hashes for scamp-0.12.0-py3-none-manylinux_2_34_aarch64.whl
Algorithm Hash digest
SHA256 98988def1191eb5b9d04cfff961849038895899d21aa0da0570854b9f063ba89
MD5 639c951292b5b9d598fde197fc18d88e
BLAKE2b-256 ecb66cf89e602af86b84099438198894a11740716ec3a63200fe8a0aba89abb0

See more details on using hashes here.

File details

Details for the file scamp-0.12.0-py3-none-macosx_14_0_arm64.whl.

File metadata

File hashes

Hashes for scamp-0.12.0-py3-none-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 f664188813a37f7dbcf36d3ad43385623851286db47930a7cc3d95efde8be997
MD5 583f358bf5c652bc0afd03849cad136f
BLAKE2b-256 d16f64ffc1d0eab5c37e785e2879580d7fdbbdd0b417501d1886832675644ed0

See more details on using hashes here.

File details

Details for the file scamp-0.12.0-py3-none-macosx_12_0_x86_64.whl.

File metadata

File hashes

Hashes for scamp-0.12.0-py3-none-macosx_12_0_x86_64.whl
Algorithm Hash digest
SHA256 4061a443803931090611d7357550f32b6dc1466508d30f16df9696aa3c58cdaf
MD5 3876fbb9ceec1eddfb466565d5f46309
BLAKE2b-256 12263a044a24db81117deb7400817268671efdb8ceee4f8bed6a79f55bb34f7d

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.12.0 This release

6 files

0.11.0

6 files

0.10.0

6 files

0.9.6

6 files

0.9.5

6 files

0.9.4

6 files

0.9.3.2

2 files

0.9.3.1

2 files

0.9.2.post3

1 file

0.9.2.post2

1 file

0.9.2.post1

1 file

0.9.2

1 file

0.9.1.post9

1 file

0.9.1.post8

1 file

0.9.1.post7

1 file

0.9.1.post6

1 file

0.9.1.post5

1 file

0.9.1.post4

1 file

0.9.1.post3

1 file

0.9.1.post2

1 file

0.9.1.post1

1 file

0.9.1

1 file

0.9.0

1 file

0.8.9.5

1 file

0.8.9

1 file

0.8.8

1 file

0.8.7

1 file

0.8.6.post6

1 file

0.8.6.post5

1 file

0.8.6.post4

1 file

0.8.6.post2

2 files

0.8.6.post1

1 file

0.8.6

1 file

0.8.5

1 file

0.8.3

1 file

0.8.2

1 file

0.8.1

1 file

0.8.0

1 file

0.7.9

1 file

0.7.5

1 file

0.7.3

1 file

0.7.2

1 file

0.7.1.5

1 file

0.7.1

1 file

0.7.0

1 file

0.6.9

1 file

0.6.8

1 file

0.6.7

1 file

0.6.6

1 file

0.6.5

1 file

0.5.8

1 file

0.5.7

1 file

0.5.6

1 file

0.5.5

1 file

0.5.4

1 file

0.5.3

1 file

0.5.2

1 file

0.5.1

1 file

0.5

1 file

0.3.1

1 file

0.3

1 file

0.2.3

1 file

0.2.2

1 file

0.2.1

1 file

0.2.0

1 file

0.1.1

1 file

0.1.0

1 file

0.0.9

1 file

0.0.8

1 file

0.0.7

1 file

0.0.6

2 files

0.0.5

2 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