Repository navigation
v0.1.0
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.
--profilemakes 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.
--claimmakes 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_unitchecks its master role, sync, tempo and lamps.expect_deckchecks the decks.unitpresses its controls,whenacts only in a given state, andrequiresays 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. --scenariotakes several files or a folder and ends with a summary.- Examples are in
deckbench/examples.
Testing a DJS-1000
--adapter djs1000-emureads 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.jsonchecks 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_syncandunit_playevents.
Running it
--port-shiftmoves every port of the decks. The bench names the port it cannot have when it starts.--ready-file,GET /api/readyanddeckbench.testing.Benchstart 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
--bindthere.
Fixes
- A title with a percent sign is no longer decoded twice.