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.11.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.11.0-py3-none-win_amd64.whl (13.2 MB view details)

Uploaded Python 3Windows x86-64

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

Uploaded Python 3manylinux: glibc 2.34+ x86-64

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

Uploaded Python 3manylinux: glibc 2.34+ ARM64

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

Uploaded Python 3macOS 14.0+ ARM64

scamp-0.11.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.11.0.tar.gz.

File metadata

  • Download URL: scamp-0.11.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.11.0.tar.gz
Algorithm Hash digest
SHA256 afcf5e21a3bee4800e2d9a4b31a087fb686d468a5465867f6f8e1e3b3583a3eb
MD5 afa2989f2da7b423c2ed63b8742d25bb
BLAKE2b-256 11c0690497bfc81c68295203c64ca9d87847354d52fda3aad9d255ef84b74504

See more details on using hashes here.

File details

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

File metadata

  • Download URL: scamp-0.11.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.11.0-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 363ef60788368d015446229879d6ef04b351448a147757f409649ee1a2a08062
MD5 679e38c54dc5fcb237c075ff10875639
BLAKE2b-256 2c12a43ffc51e31f0e8faaabf92581fa31ed7583815d282bffebf652e6b6d37f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for scamp-0.11.0-py3-none-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 03cf89cc9656a08afed2d7446438ace90baf61dae58236261f8f7fdef0a2f21a
MD5 f344b34eed497294fc62677981e13be7
BLAKE2b-256 a0024edee9839a8befee2f0a0870450927ec8d58e93b536b6df5dbb735bb875e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for scamp-0.11.0-py3-none-manylinux_2_34_aarch64.whl
Algorithm Hash digest
SHA256 391bc9f71ebef68d9fd4d898c90cec1ccd619797186d5714e898aad712149e65
MD5 2ec0fdc85b862399bd155695110c4ba3
BLAKE2b-256 59e25a4b3987e45934e7bbd383da8e3f3bf3ce3639342a44cbebff058915ca92

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for scamp-0.11.0-py3-none-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 d685d713778cf877de19eb5db5adb02bd21b056816773bc21fedb56607f174e2
MD5 6456875015fc39b4db03ee8ee3602a24
BLAKE2b-256 07ac95b239ef6b31a7b4f08a0983aa631c8cd30532288cd3bb0726499df41372

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for scamp-0.11.0-py3-none-macosx_12_0_x86_64.whl
Algorithm Hash digest
SHA256 6a1d9baee3f6d37b13cfec501bf035c12fdc9b70f7f9738c33a256eba8ab6cc4
MD5 538fd9d67c3468dfd8659a065db3bf94
BLAKE2b-256 d16eb229feb4ed46da1fa94d913c5633f39d5d4dd03baaf66a9b8dd15257b7df

See more details on using hashes here.

Release history Release notifications | RSS feed

0.12.0

6 files

This release

0.11.0 This release

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