Skip to content

v0.1.0

Choose a tag to compare

@github-actions github-actions released this 21 Oct 03:24
· 99 commits to main since this release

The first version.

Simulated decks

  • Pro DJ Link decks with discovery, status, beats, tempo master, sync and hand-off, loops, and the database server for track titles.
  • --profile makes the decks stand in for a CDJ-2000 (nexus), CDJ-2000NXS2, XDJ-1000MK2 or CDJ-3000, with its name, status length and nexus byte.
  • A deck can load a track from another deck's database and slot.
  • --claim makes a deck do what a real player does when it comes online. A deck that is on defends its number against another device.
  • Strict decks behave as a CDJ-2000NXS2 does.
  • A simulated DJM mixer (--mixer) announces itself as device 33, reports which channels are on air, and starts and stops players with fader start.
  • Each deck has sound.
  • Network faults can be simulated, for example 30 % packet loss.

The page and the API

  • A card for each deck: switches, beat squares, tempo display and slider, loops, cable, and a track from any deck's database.
  • Tabs for events (filter, pause, export), scenarios (editor, examples, saved), the network and the settings. Works in light and dark.
  • An HTTP API and a command line drive the same things.
  • Some settings change while it runs (/api/settings): strict decks, database refusal and the model name.

Scenarios

  • Scenarios script the decks and check what the device under test did.
  • expect_unit checks its master role, sync, tempo and lamps. expect_deck checks the decks.
  • unit presses its controls, when acts only in a given state, and require says what the scenario needs. A scenario that needs a unit or adapter that is missing is skipped, not failed.
  • Matchers: near, min, max, in, not.
  • --scenario takes several files or a folder and ends with a summary.
  • Examples are in deckbench/examples.

Testing a DJS-1000

  • --adapter djs1000-emu reads the emulator's lamps and presses its SYNC and MASTER. The Network tab shows the unit's state with buttons.
  • A library of scenarios in deckbench/examples/unit: the unit follows a master deck and its tempo, the master role passes between deck and unit, and it keeps following after a cable pull and with 30 % packet loss. 40-on-air.json checks that the unit says it is on air when the mixer's channel 1 is open.
  • More of the unit is heard: synced, playing, on air and the beat, with unit_sync and unit_play events.

Running it

  • --port-shift moves every port of the decks. The bench names the port it cannot have when it starts.
  • --ready-file, GET /api/ready and deckbench.testing.Bench start a bench from a test without guessing a delay.
  • Runs on Linux and Windows with Python 3.8 and later. The tests use ports of their own, so a running bench or rekordbox does not matter.
  • Not supported on macOS: the loopback carries no broadcasts, so decks on 127.0.0.n are not heard. Use --bind there.

Fixes

  • A title with a percent sign is no longer decoded twice.