Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
16 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions sdk/drafts/cassettebox/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
MIT License

Copyright (c) 2026 jrs1717

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

---

This licence covers this module's own source code and documentation only. It
does not extend to any Elektron Music Machines firmware, which is not
distributed here and remains the property of its copyright holder. Nothing in
this module is endorsed by, supported by, or affiliated with Elektron.
Octatrack and Elektron are trademarks of Elektron Music Machines MAV AB, used
only to identify the hardware this module targets.
74 changes: 74 additions & 0 deletions sdk/drafts/cassettebox/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
# Cassettebox

Version 0.1.0-experimental · by @jrs1717 · the test procedure passed on the author's MKII (package 534be9f6, steps 1-11); the author kept it, played it and power-cycled: "everything survived".

## Overview

Cassettebox is an '80s cassette deck, or an aged VHS tape's sound, for an audio track's FX1 or FX2 slot. It puts the track on a short tape and plays it back through a moving head:
- **The speed wanders:** DRFT sways and wanders slowly, FLUT adds the fast shimmering wobble.
- **The tape colours it:** DRIV saturates it, and the playback rolls off the top and lifts a bump in the lows.
- **The tape is imperfect:** HISS and DUST (crackle) ride on it, GAPS brings dropouts, and GLCH brings speed hiccups and lost head contact.

DECK picks the machine: HIFI, a good deck; HOME, a home stereo; POCKT, a pocket recorder; or VHS, the sound of an old videotape. WIDE parts the left and right channels, and TONE darkens the top. AGE wears the tape while it plays, as a loop recorded over again and again: the top fades, the hiss and crackle grow, dropouts come more often and the speed grows less steady. MIX blends the tape with the dry track.

## Controls

| Page | Knob | Name | Range | Default | What it does |
|---|---|---|---|---|---|
| Main | A | DRFT | 0-127 | 32 | Drift: the tape speed's slow sway and wander. 0 is steady. |
| Main | B | FLUT | 0-127 | 24 | Flutter: the fast shimmering wobble, and a worn pinch roller's faint thump in speed and level about once a second. |
| Main | C | DRIV | 0-127 | 32 | Drive: saturation and compression, the tape pushed harder (and louder). Loud, bright passages dull out more, as real tape does. |
| Main | D | HISS | 0-127 | 16 | Tape hiss, shaped by the deck. It breathes with the track: full under loud passages, down to about a third in the gaps. |
| Main | E | GAPS | 0-127 | 0 | Dropouts: how often the level dips and muffles, as on creased or worn tape. Each one muffles before it dips and comes back bright last. Now and then a crease crosses the head too: a tenth of a second of crinkly wobble and flickering muffle. Rare at low settings, frequent near 127. |
| Main | F | MIX | 0-127 | 127 | Dry/tape blend. 127 is the tape alone, 0 the dry track. |
| Setup | A | DECK | HIFI, HOME, POCKT, VHS | HOME | The machine: its tone, head bump, saturation, hiss and how steady it runs. HIFI is clean and steady, HOME duller with more hiss and a little warble, POCKT narrow, hissy, fluttery and crunchy, VHS an aged videotape: thin lows, a muffled top and a slow, deep warble. |
| Setup | B | WIDE | 0-127 | 32 | Stereo: left and right drift and flutter apart, and the right head sits slightly misaligned. |
| Setup | C | DUST | 0-127 | 0 | Crackle: soft pops, an occasional tick at low settings and a steady crackle near 127. |
| Setup | D | GLCH | 0-127 | 0 | Glitches: now and then a speed swoop, or a moment of lost head contact that drops the sound nearly out. Rare at low settings. |
| Setup | E | TONE | 0-127 | 0 | Darkens the top end, as worn heads or a cheap copy do. 0 is the deck's own. |
| Setup | F | AGE | 0-127 | 0 | Wear over time. At 0 the knobs apply at once. From 11 up the tape starts clean and wears as it plays, and drift, flutter, hiss, dropouts, crackle, glitches and TONE grow toward their knob positions, reaching them at half wear and going on to about twice them when worn out. As it wears the top fades, the tape gets grainier, quieter (about 3 dB when worn out) and thinner in the lows, the pinch roller thumps harder, the two heads wear unevenly (the right one slowly drifts duller and a little quieter), and a worn tape gains some hiss, dropouts, crackle and glitches of its own, even with those knobs at 0. Half wear takes about 43 s at 127, 1.3 minutes at 64, 2 minutes at 32 and 3.8 minutes at 11. 1 to 10 hold the tape as worn as it is: let it wear to a sound you like, then turn AGE down into 1-10 to keep it there. The tape starts fresh when the effect is picked, the Part reloads or AGE goes back to 0. |

## Usage

Select an audio track, hold FUNC and press FX1 (or FX2), turn LEVEL to CASSETTEBOX at the end of the list and press YES. Press FX1 for the main page (DRFT, FLUT, DRIV, HISS, GAPS, MIX); hold FUNC and press FX1 for the setup page (DECK, WIDE, DUST, GLCH, TONE, AGE).

## Quick tutorial

1. Put Cassettebox on FX1 of a track playing a pad, a drum loop or a whole mix. At the defaults it is a HOME deck with a little warble and hiss.
2. Raise DRFT and FLUT for a seasick warble, and DRIV to push the tape into saturation.
3. Hold FUNC and press FX1, and try DECK on HIFI, POCKT and VHS.
4. Raise GAPS, DUST and GLCH for a worn, dropout-prone tape.
5. Set GAPS, DUST and the others where you'd like the tape to end up, then turn AGE up and let the pattern play. The tape starts clean and degrades toward those settings over a minute or two (up to about 4 minutes at low AGE), then keeps getting worse. When it sounds right, turn AGE down to between 1 and 10 to hold it there.

## Compatibility and limitations

- FX1 or FX2, any audio track. It uses 1,024 words of its slot's buffer.
- The tape sits 5.8 ms (256 samples) behind the track, so the speed can sway both ways. The dry signal is read at the same delay, so MIX blends without combing, and MIX 0 is the dry track 5.8 ms late.
- With HISS, DUST and AGE at 0, silence in gives exact silence out. With HISS or DUST up, or once AGE has worn the tape, it hisses and crackles when the track is quiet, as real tape does.
- Wear isn't saved: the tape starts fresh when the effect is picked or the Part reloads. Moving AGE off 0 starts a clean tape at once, so the knobs' character fades away and then grows back as it wears (half wear in about 4 minutes even at AGE 11). AGE 1 to 10 hold a tape as it is, so a fresh tape held there stays fresh; turning AGE through 0 resets it.
- Dropouts glide in and out over about 10 ms, so short ones are gentler than their full depth. A lost head contact drops out faster (about 1.5 ms) and reaches near silence, then glides back.
- With several Cassettebox instances, each has its own hiss and random events (seeded by its slot), so their dropouts don't line up.
- It prefers effect id 10, as Fuzzbox, Glitchbox, Loopbox, Grainbox and Midiverb do. Over USB the base gives each its own id; in a card set only one of them fits.

## Tests and measurements

See [TESTING.md](TESTING.md).

## Authorship and licences

Original code by @jrs1717 under the MIT licence in LICENSE. Inspired by cassette tape and tape effects in general, with no product's code, tables or names.

## Screens and audio

Captured on the author's Octatrack (flashed base ddb56b72, package 534be9f6), read over USB.

![FX1 SETUP page with an effect list ending in Cassettebox, selected; knobs labelled POCKT (DECK), WIDE, DUST, GLCH, TONE and AGE.](media/ot-location.png)

![FX1 main page titled Cassettebox with knobs DRFT, FLUT, DRIV, HISS, GAPS and MIX.](media/ot-controls.png)

No audio yet.

## Develop

- Hear it: `npm run module:dev -- cassettebox --cycles 340 --cycles-kind executed --state 112 --buffer 1024 --slots both`.
- Check it: `npm run module:doctor -- --draft cassettebox`; `python3 -B verify.py` holds the engine to `reference.py` in `dsp_host`, and `python3 -B test_reference.py` tests the model.
Loading
Loading