Skip to main content

let's play!

Project description

nbplay

let's play!

Build Status codecov License PyPI Binder

Overview

[!WARNING] This library is in early development and the API is subject to change without deprecation. Feedback and contributions are very welcome!

Music composition widgets in a jupyter notebook

nbplay provides composable Jupyter widgets for a browser-backed DAW: synths, samplers, sequencers, keyboards, pads, transport, timeline recording, and mixer/session routing. Mixer channels and the master bus support Web Audio insert chains with built-in gain, filter, compressor, limiter, delay, and reverb effects, plus custom browser plugin factories. Custom effect descriptors must be JSON-safe; built-in effect names are reserved. Widgets render non-crashing fallback states when Web Audio or Web MIDI is unavailable.

import nbplay as nb

session = nb.Session()
seq = nb.SequencerWidget(num_voices=2)
sampler = nb.SamplerWidget()
track = session.add_track("Drums", seq, sampler)

session.mixer.add_channel_effect(
    track.mixer_channel,
    nb.EffectPlugin("compressor", threshold=-18, ratio=4),
)
session.mixer.add_master_effect(nb.EffectPlugin("limiter", threshold=-1))

session.timeline.length = 64
session.timeline.count_in_bars = 1
session.timeline.auto_extend_recording = True
session.timeline.recording_extend_bars = 16
session.timeline.arm_track(track.mixer_channel, True, exclusive=True)
timeline_tracks = [dict(track) for track in session.timeline.tracks]
timeline_tracks[track.mixer_channel]["monitor"] = True
session.timeline.tracks = timeline_tracks
session.timeline.add_clip("Kick loop", track_index=track.mixer_channel, start=0, duration=4)

[!NOTE] This library was generated using copier from the Base Python Project Template repository.

Project details


Download files

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

Source Distribution

nbplay-0.1.1.tar.gz (498.8 kB view details)

Uploaded Source

Built Distributions

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

nbplay-0.1.1-cp311-abi3-manylinux_2_28_x86_64.whl (1.2 MB view details)

Uploaded CPython 3.11+manylinux: glibc 2.28+ x86-64

nbplay-0.1.1-cp310-abi3-win_amd64.whl (589.2 kB view details)

Uploaded CPython 3.10+Windows x86-64

nbplay-0.1.1-cp310-abi3-macosx_11_0_arm64.whl (669.9 kB view details)

Uploaded CPython 3.10+macOS 11.0+ ARM64

File details

Details for the file nbplay-0.1.1.tar.gz.

File metadata

  • Download URL: nbplay-0.1.1.tar.gz
  • Upload date:
  • Size: 498.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for nbplay-0.1.1.tar.gz
Algorithm Hash digest
SHA256 455956bacf2d48d7bcb457e3f1ae8a9e1b1634feebc3328254ed1950a891e450
MD5 0c96e62e4aa5a22de0dc48df332b1f3b
BLAKE2b-256 c9071343437353a725bb4563ce46086553d9e217a5da29504c07c63d793a1310

See more details on using hashes here.

File details

Details for the file nbplay-0.1.1-cp311-abi3-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for nbplay-0.1.1-cp311-abi3-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 b0384131928570e290c514a2963fc998d4c3d2ca50ead83111c66a323133247f
MD5 db04dfbeadbebefc743c4a184ebbd07f
BLAKE2b-256 3a53fb68a55a49696133533f25db95229da099b7cef0f551b10731ce964b9ffb

See more details on using hashes here.

File details

Details for the file nbplay-0.1.1-cp310-abi3-win_amd64.whl.

File metadata

  • Download URL: nbplay-0.1.1-cp310-abi3-win_amd64.whl
  • Upload date:
  • Size: 589.2 kB
  • Tags: CPython 3.10+, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for nbplay-0.1.1-cp310-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 bc29a45af2dd1a752331ccb19b7e2ab13ef34f2c0ec6b911351405d247294059
MD5 9049d1244184d5f2ced8e5a4e71a899a
BLAKE2b-256 f3999b3f4e521bc0ebacdda62dfd40b4830a95ed3d221344a1141d3eedab2bb9

See more details on using hashes here.

File details

Details for the file nbplay-0.1.1-cp310-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for nbplay-0.1.1-cp310-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 926f9e97d227268099d267eaa2c7d5e7e0e365413b50cb1828b07e774ce5f3b6
MD5 17073879729c6ffcbeb806a647821098
BLAKE2b-256 7f24efd3f97009c523ea989894ab51831cf7b640cf8e578d29c04f4f00ed6b62

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page