Skip to main content

duskfm

Endless music from lo-fi to synthwave, made on the spot: one song after another, never the same one twice, all day long.

Every sound is synthesized as it plays, built the way the real instrument makes its sound (no tremolos, no sweeps on every note):

  • a felt piano (the core of the lo-fi end): up to thirty stretched overtones on two or three strings a hair apart, through a wooden soundboard;
  • a guitar, nylon and fingered or electric and picked through a warm valve amp, playing chord shapes a guitarist would actually finger, picked or strummed;
  • a fingered electric bass, heard through its pickup;
  • a mellow organ, pads, a polysynth, arpeggios and a synth lead that start bright and settle warm;
  • a soft choir "ooh" of three voices;
  • a soft drum kit built from the partials a drum head, a wood block or a cymbal rings with;
  • tape wobble, vinyl dust and rain.

It stays low and warm: tunes sit below C5, highs fade first, nothing glassy or shrill, and every hit has a soft edge (hats tick rather than sizzle), even at the bright synthwave end.

It plays songs. Each one runs a few minutes and is its own thing: a key and a tempo, four chords, a drum loop, a bass line that locks to the kick, and a tune that comes back. Each song draws its band from where the style dial is: something to play the chords, two voices to trade the tune, sometimes a choir or an arpeggio. The weather and the record drift on their own too: a rainy stretch comes and goes, the dust thickens and clears. The status line names who's playing. No samples and nothing recorded, so the package is a few files of Python.

pip install duskfm
duskfm                    # lo-fi
duskfm synthwave          # or: lofi, chillhop, chillwave, synthwave, nightdrive, ambient

One dial from lo-fi to synthwave

--style runs from 0 (lo-fi) to 1 (synthwave), and everything blends along it:

lo-fi (0) chillwave (0.5) synthwave (1)
tempo 72–84, swung ~85–97 94–110, straight
harmony jazzy 7ths and 9ths (ii–V–I) dreamy maj9 and sus minor: i–VI–III–VII
keys felt piano, organ felt piano, pads polysynth, arpeggios, a lead
drums dusty boom-bap, lazy soft kick, rim, shaker punchy, 80s gated snare
texture crackle, tape wobble, dark haze, chorus clearer, wide, big reverb
band felt piano, organ, guitar felt piano, guitar, voices, electric guitar polysynth, arps, synth lead, electric guitar

--energy runs from 0 (ambient: no drums, sparse) to 1 (driving). --drift lets both wander slowly on their own, so a long session moves through moods. The presets are points on the two dials (duskfm --help lists them).

A song has a shape: an intro, the groove with its tune, a breakdown where the drums step back, the lift where everything returns, and an outro that often leads into the next song's key. Within a song the beat is a two-bar loop with a small turn at the end of each phrase, and the tune is a four-bar phrase (a statement, an answer, the statement again, an ending) that returns with a different ending, so there is something to recognize. Between songs it changes gently: chords voiced smoothly from one to the next, tempo gliding rather than jumping, newcomers fading in. The band breathes with the kick (the chords, pads and bass dip under each hit), which is where the pulse comes from. Move a dial a long way and the song wraps up early for one that fits. --seed replays a session you liked (the seed is shown when you quit).

Moods: the seasons

--mood spring|summer|fall|winter lays a season over whatever the style is, lo-fi or synthwave alike:

spring summer fall winter
harmony mostly major, open add9 colour major (sunset synthwave too), warm mostly minor, plain 7ths minor, cold sus chords
pace a little quicker quicker, busier drums a little slower slower, sparse, softer kit
band fingerpicked guitar strummed and electric guitar, organ felt piano, nylon guitar, organ felt piano, voices, pads
air spring showers the sea, no rain autumn rain and wind wind, a bigger room, darker

A new mood wraps up the song that's playing and the next is written in it. Leave it off for the plain dials.

While it plays

key
← → style: toward lo-fi, toward synthwave
↑ ↓ energy
m mood: none, spring, summer, fall, winter
+ − volume
] [ boost (3 dB a press)
r rain: off, light, heavy
d drift on or off
n on to the next song
1–6 the presets
space pause
q quit (it fades out)

Loud enough to drown out the room

  • --volume (0–100) is the ordinary level.
  • --boost DB (up to 18) is the maximizer behind it: the music is compressed and driven into a soft limiter, so it gets much louder without ever clipping. Your speakers' own limit still applies; this gets more out of it.
  • --rain adds a soft rain bed shaped to the frequencies speech lives in. Lo-fi is mellow and dark, which is lovely and also poor at covering voices; a little rain covers chatter better than a lot more volume, and spares your ears. A whole day at high volume is hard on hearing: reach for the rain first.

Playing it

On Linux it plays through paplay (PulseAudio, or PipeWire's pulse layer), pw-cat or aplay, whichever is there: nothing else to install. Over remote desktop (xrdp), sound comes through when the session has xrdp's PulseAudio or PipeWire module; if paplay works there, duskfm does. Elsewhere, pip install "duskfm[sounddevice]" uses PortAudio.

No sound where you are? Make a file and play it anywhere:

duskfm chillwave --render 3h -o afternoon.wav

--minutes 90 plays for a while and then fades out.

Development

python3 tests/test_duskfm.py: every preset renders clean audio at a steady level, a seed replays exactly, songs hold together (a beat, a tune, a shape) and none comes round again, the kick has room in the mix, boost gets louder without clipping, and the player and command line work (no sound card needed). A GitHub release vX.Y.Z matching __version__ publishes to PyPI.

Metadata

Release files for duskfm 0.9.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for duskfm 0.9.0
File Size Uploaded Provenance Actions
duskfm-0.9.0.tar.gz 46.9 kB With provenance Details for duskfm-0.9.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for duskfm 0.9.0
File Interpreter ABI Platform Actions
duskfm-0.9.0-py3-none-any.whl Python 3 none any Details for duskfm-0.9.0-py3-none-any.whl

Total release size: 87.0 kB

Release files / duskfm-0.9.0.tar.gz

Download URL duskfm-0.9.0.tar.gz
Size 46.9 kB
Tags Source
SHA-256 checksum
How to use checksums
8e1e39e28cc7cf45e486c3cd1081b42bfb38ecfd7d478256ba6d0a4801c32c07
BLAKE2b-256 checksum
How to use checksums
167103a993477b94159b64a936e765266b0d48419ca95f0683142a805f55b082
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 28, 2026.

Transparency log

Release files / duskfm-0.9.0-py3-none-any.whl

Download URL duskfm-0.9.0-py3-none-any.whl
Size 40.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
da19a15c4f841b2ec4e6b5b5a9d1ae8cc7428f7cc0d3094a20a560d6f243973e
BLAKE2b-256 checksum
How to use checksums
195aff4c19875474274fbf6f8d2da891249d6890b479a473aa346cea536d19d1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 28, 2026.

Transparency log

Security for duskfm 0.9.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for duskfm-0.9.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 28, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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