灵符lingfu

ling-station-x

↓ 0 downloads

LingStationX: a DAW in Ling with a piano roll, arranger, performance view, theory-aware score fixing, Qwen instrument choice, Prism / Growl / Synth X / Membrane instruments and Ling-design-system effect windows

Linux · x86-64Web · WASM
Keywords daw, music, midi, synth, sequencer, ling
lingfu install ling-station-x
LicenseApache-2.0 OR MIT
Authorsling-lin
READMECode / FilesVersionsDependency GraphDependentsSecurityBuildsSettings

README

LingStationX

A digital audio workstation written in Ling — the arranger, piano roll, mixer, node editor, performance launcher, file browser, dialogs and every instrument are .ling programs. It is a port of LingStation (same layout, same ROYGBIV palette, same panels) that swaps the egui/VST host for Ling's own runtime and audio crates.

LingStationX/
  ling/            the application (main.ling + modules)          <- the DAW itself
  instruments/     instrument "plugins": plain .ling patch files    <- edit / write your own
  assets/          font, project templates (Ambient Pads, EDM Starter, Hip Hop)
  tools/           patch/template generators, screenshot test harness
  docs/            DEV_NOTES.md (language gotchas, API, testing)

The audio engine is the native ling-daw crate in the Ling repo (../ling/crates/ling-daw), exposed to scripts as daw_* builtins; a handful of px_* / st_* / fs_* / dlg_* builtins give the UI fast pixel drawing, a shared state store, file browsing and native dialogs.

Build & run

Needs a checkout of the Ling repo next to this folder (../ling, branch lingstationx) and Rust.

cd ..\ling
cargo build --release --bin ling      # once (add --bin ling only; ~10 min)
cd ..\LingStationX
.\run.bat                             # or: ../ling/target/release/ling run --interp ling/main.ling

run.bat prefers the release build and falls back to the debug build.

What is in it

  • Arranger — timeline with ruler, loop region, tracks, clips (MIDI note previews, audio waveforms), Draw / Select (marquee) / Move / Slice tools, grid snap, zoom, copy-drag, drag files in from the sidebar, expandable automation lanes (level, pan, any instrument/effect parameter) with point editing and automation recording.
  • Piano roll & Parameters — draw/select/move/resize notes, snap and note-length, velocity / pan / cutoff / resonance lanes per note, quantize / humanize / transpose; the Parameters tab adds the instrument's knobs, presets, patch load/save and (for drums) a 4x4 pad grid.
  • Instruments — Ling Synth X (subtractive + additive + FM in one voice), Ling Membrane (physical-modeling drums), Ling Growl (monophonic dubstep / electro bass and lead: wavetable stack, FM, vowel filter, four drawable 16-point modulation lanes and a 7x10 mod matrix, 8 presets in instruments/Growl/) and Ling Voice (a formant singer driven by IPA lyrics, 7 singers in instruments/Voice/). Patches are text files in instruments/. The instrument panels are drawn in the Ling design system (outline + crosshatch, tile lettering, ROYGBIV meanings; ling/ds.ling).
  • Ling Prism - a 16-voice analog-style synth for big electronic sounds (ling-daw/src/dsp/prism.rs): two morphing wavetable oscillators (sine / tri / saw / square / pulse / organ / bell / spectral) with 1-7 unison voices and phase warp, six ways for A and B to interact (add, ring, phase-mod, hard sync, xor, min), sub, noise, an analog hum drone and voice drift, a stereo multimode filter plus a note-tuned comb, eight multi-point envelopes (draw / drag / add / remove breakpoints) and two LFOs that reach 20 destinations through a 13 x 20 modulation matrix, and a harmonizer, phaser, ensemble chorus, ping-pong delay and reverb. Microtonal: 19 / 22 / 24 / 31 / 17 / 53 EDO, just intonation, Pythagorean, meantone, Bohlen-Pierce, slendro, pelog, harmonic series, whole tone, octave stretch, or twelve hand-tuned notes. The dice randomize the sound, the modulation, the effects or all of it, and mut wanders away from the current patch. 281 presets in instruments/Prism/ (trance, deep house, disco, witch house, hyperpop, microtonal, ambient, plus a bank of sounds named after and imitating FL Studio's Sytrus and Harmor factory presets - pads, hoovers, donk and wobble basses, arps, keys, bells, kicks, FX) from tools/gen_prism.py and tools/gen_prism_fl.py.
  • Electronic GM - instruments/Electronic GM/ is a second 128-patch General MIDI bank (e-pianos, house organs, acid / sub / wobble / reese / neuro basses, supersaw pads and strings, stabs, sync / laser / vowel leads, risers and FX). tools/gen_gm_electronic.py + cargo run --release -p ling-daw --example gm_electronic.
  • Sidechain duck - Edit > Sidechain Duck... (or the Duck button in the arranger toolbar): pick a track, say the drum kit, choose what triggers it (the kick only, the snare, every hit...) and the tracks that should get out of its way. Each gets a Ducker effect (depth, attack, hold, release, curve; the dip is drawn as you set it) triggered from the kick's notes, so only the kick ducks, it is exact to the sample, and it works even with the drums muted. Ducks show in the Node Editor and the effect list.
  • Tracker import - File > Import MIDI / FL Studio / Tracker... reads ProTracker .mod, ScreamTracker .s3m, FastTracker .xm, Impulse Tracker .it and OpenMPT .mptm modules (compressed IT samples too; .mo3 is not supported - save as .it/.xm in OpenMPT). Every module instrument becomes a track playing the module's real samples (written as a SoundFont with loops, panning, fine tune and fade-out), the patterns are played through in song order (jumps and breaks followed) into notes with their volumes, pans, lengths and note cuts, and speed/tempo changes become the tempo map. Vibrato, slides, arpeggios and sample offsets are not modelled.
  • Tracker tab (F4, between Node Editor and Performance) - the arrangement as patterns and pages like OpenMPT: rows down, channels across (a track gets one channel per note that sounds at once, up to 8, so chords read across), an order list of pages, note / instrument / volume cells, hold and note-off marks, the playhead row (Follow keeps it in view), rows per beat 1-8, page size 16-128, hex or decimal row numbers. Click a cell and type notes on the keyboard (Z S X D C V G B H N J M / Q 2 W 3 E R 5 T 6 Y 7 U I), Delete clears, arrows move, [ ] shorten / lengthen the note, Esc leaves the grid. The Font switch draws the grid in the normal English font, Daemon or Chesilin (Chesilin has no - # = so those use the normal font).
  • Sampler (a new plugin; Parameters tab) - zones of audio files with root note, key / velocity range, fine tune, volume, pan, pitch tracking, forward / ping-pong loops (draggable markers, Auto loop), trim, reverse, one-shot; amplitude ADSR or a full multi-point envelope with sustain / loop points and fade-out, plus panning, pitch and filter envelopes, a resonant low-pass (cutoff, resonance) and random variation per note (volume, pan, cutoff, resonance, like OpenMPT's swings); WAV / FLAC / OGG / MP3, WavPack (via ffmpeg) and Ogg-in-WAV files. Saved with the project (samples are copied into <project>/samples).
  • Tracker import now plays the module's own samples through Samplers: arpeggios become notes, pitch slides / portamento / vibrato become pitch-bend lanes, volume slides / tremolo / retrigger become volume lanes and notes, Zxx filter changes become cutoff / resonance lanes, pattern loops and delays are followed, XM / IT volume, panning and pitch / filter envelopes, fade-outs, instrument cutoff / resonance and global volumes come across. Channels that use these effects get their own track with their lanes. Checked against libopenmpt renders: pitch correlation 0.96-0.99, durations within 0.05 %, level within 1.5 dB. In the import dialog each part can use its original samples, go to a shared percussion kit (one Sampler track), or use a drum sample found in your sample folders by name ("Splash Cymbal" -> a splash sample); Ask Qwen gives percussion parts search words and the importer falls back to the module's own sample when nothing is found. Sample folders searched: [LingStation] next to the programs folder, library/samples, assets/samples and Settings > sample_roots.
  • Export Karaoke (File menu) - subtitles .ass (per-syllable karaoke, count-in dots), .srt (lines and a progressive-colour version), .lrc (word level), a self-contained HTML player (cursor: sweep / pop / bouncing ball / underline / block / arrow; pitch ribbon of the melody; every look option live in a panel) and an MP4 through ffmpeg, with the backing audio (instrumental = lyric tracks muted). Look options: font (default, Daemon, Chesilin or any font file), size, text / sung / outline / cursor colours, outline thickness and opacity, text opacity, shadow, background, lines on screen, colour by pitch, resolution.
  • Transcribe Vocals (File menu) - speech to text with faster-whisper running on this computer (GPU when available): picks a model from your Hugging Face cache, writes .srt (cues from the word timings, broken at sentences and pauses) and .txt, and can fit the words to a MIDI clip's notes. ling-lang itself has the same thing as stt_* builtins (stt_start, stt_poll, stt_segments, stt_words, stt_srt ...; see ling/stt/README.md and ling/examples/stt_demo.ling). Setup once with ling/stt/setup_windows.ps1 (an isolated venv, nothing goes into your normal Python).
  • Export Sheet Music (File menu) - the notes as a colour-coded schematic instead of a staff: time on a bar / beat grid, height = pitch (black-key rows shaded), tile colour = pitch class (twelve colours on a circle of fifths), letters in English, Daemon or Chesilin, width = length, brightness = loudness, octave numbers, chord stems, drum symbols, lyrics under the notes, tempo marks, a legend page. SVG pages and a printable HTML (fonts embedded).
  • Vocal to MIDI + Vocal Tuner (Piano Roll > Vocal to MIDI, Edit menu) - an audio clip with a voice becomes a MIDI clip of the notes that were sung, linked to the recording. Edit the notes in the piano roll (move, stretch, quantize), snap them to a scale, then Render: the recording is re-sung through the notes (pitch-synchronous resynthesis, the formants stay) with retune speed, timing fit, vibrato, tremolo, fades and a temperament (equal, just, Pythagorean, meantone, Werckmeister). The tuned voice lands on a paired track and the original is muted.
  • Scripts (Edit > Scripts) - Ling files in scripts/ that the program loads while it runs (save a file and it reloads): note scripts (arp, humanize, reverse, euclid) and custom plugins written in LingDSP, a small sample-by-sample language returned by <name>_dsp(): effects (tubedrive, bitcrush, ringmod, pingecho) and instruments (fmbell, supersaw, karplus) with their own knobs, filters, delays, oscillators and envelopes; every copy of a plugin updates when its script is saved. See scripts/*.ling.
  • Vocoder (effect) - the track's own sound is the carrier; the modulator is another track routed to it (Node Editor kind MODULATOR, or the picker in its window) or the built-in talker (vowels, robot, whisper, gate). 8-32 bands, formant shift, hiss for consonants, 14 presets.
  • Ringstorm (effect) - modular pedals, amps and racks you wire up in a pedalboard window: 20 pedal kinds (gate, compressor, boost, overdrive, distortion, fuzz, amp, cab, EQ, wah, chorus, flanger, phaser, tremolo, vibrato, delay, reverb, octaver, volume, slicer), serial chains, splits and parallel lanes, 20 rig presets.
  • Ling Pluck (instrument) - physical-modelling strings: guitar, harp, koto, shamisen, sitar (jawari buzz and sympathetic strings), oud, banjo, kalimba and more; 26 presets.
  • Prism genre banks - 104 new presets (HyperPop, Deep House, Disco, Dance, EDM, Industrial, Atmos & Space, Synthwave, Lo-Fi) made by tools/gen_prism_genre.py; every instrument's preset chooser has [<] [>] to step, [@] for a random one, and opens a categorized browser that highlights (and remembers) the current preset.
  • AI Mix & Master (Edit menu) - every track is rendered alone and measured (loudness, peaks, dynamics, spectrum, width); a plan names each track's role, sets levels, pans crowded instruments, cuts low-end and mud, compresses what is too dynamic and aims the master at a loudness (-14 LUFS by default), each move with its reason and a tick to leave it out; Qwen can correct roles and pick the style. One Undo.
  • Score view + MusicXML - the piano roll has a Score face: the clip on a staff (grand staff when it spans the keyboard) where you click to add notes, drag to change pitch and place, Delete to remove; Export Sheet Music can also write a MusicXML score for MuseScore, Sibelius, Dorico or Finale.
  • Glue phrases (Arranger button, or Edit > Glue Clips Into Phrases) - the reverse of Slice: clips that touch (or are at most a chosen rest apart) on the same instrument join into one phrase clip, up to a phrase limit of 4 / 8 / 16 bars or none; a run of identical bars folds into one clip that loops its bar. Per instrument or just the selected track, with a preview of every clip count before anything changes, and one Undo.
  • Export Tracker (PDF) (File menu) - the Tracker tab as printed pages, like OpenMPT: one page per pattern (rows down, channels across; a wider song continues on more pages of the same pattern), cells C-5 01 v32 (note, instrument = track number in hex, volume 0-64), | held, === note ends, bar and beat rows tinted. English, Daemon or Chesilin font, 1-8 rows per beat, 16-128 rows per page, hex or decimal row numbers, light or dark page, portrait or landscape, a range of patterns. Writes an HTML and a PDF (printed by Edge / Chrome / Chromium).
  • The Ling Design System now also covers the Mixer, Sidebar, Arranger and Piano Roll through the shared buttons, chips, tabs and checkboxes (line work, brackets, crosshatch for "on"), hatched clip headers and outlined notes.
  • Node Editor is now a round signal table (Reactable style): the master in the middle, every track a puck on the ring with its effects on the spoke toward the centre, master effects orbiting the master; dots travel along the lines faster with the level, each track puck shows its level arc and the notes of the current bar with a hand sweeping at the playhead. Sends / sidechains / ducks are made by dragging from a puck's out port. Performance and both views use the Ling design system (line work, crosshatch, brackets, tile lettering, colour keys).
  • Export stems bundle - File > Render Audio... > tick Bundle for other DAWs: a folder with one WAV stem per track (all starting together, so drop them at bar 1), midi/ (project.mid with the tempo map + one file per track), instruments/ (soundfonts and Ling patches), params.json (levels, pans, instrument state, effect chains and parameters, automation, routing), project.dawproject (the open DAWproject format for Bitwig, Studio One, Cubase 14: stems as audio tracks plus muted note tracks) and a README with steps for FL Studio / Ableton / Bitwig.
  • Match key - Match key in the arranger toolbar (or Edit > Match Tracks To Song Key) finds the song's key from the notes and the audio, then matches the ticked tracks to it: MIDI clips in another key are transposed and stray notes snapped onto the scale; melodic audio (a voice, a lead) is tuned onto the scale with Bezier-eased glides from note to note (strength, glide time and curve are yours); loops and mixes are moved to the key.
  • Fit lyrics - in the Piano Roll's lyrics strip, Fit... takes a song's words (paste them in any language; labels, chords and (x2) are removed), splits them into syllables (Qwen can do it, or the built-in splitter) and spreads them over the notes: syllables land on strong beats and long notes, extra notes sustain, short notes hold the syllable before them, a chord carries one sustained syllable, and the lyrics can loop. Ling Voice follows chords legato.
  • Colour-coded icons for every instrument and effect (Add Effect is now a card picker with a short description of each), and two arranger ticks: Follow playhead and Loop at last clip (the song loops at the end of its last clip).
  • Automate parameters - under a track's automation lanes, Automate... writes lanes for this track's parameters, a random handful, or every parameter of every melodic track, with an optional prompt ("tense build into a drop", "slow ambient drift", "glitchy and wild"). Qwen knows what each parameter does and picks common articulations (wobble, pump, stutter, sweep, riser, per-note plucks and swells ...) that lock to the bars and the notes; without a model the built-in chooser reads your words instead. Lanes you drew yourself are never replaced, and Ctrl+Z undoes it all.
  • Singing - give a Ling Voice track notes, open the Piano Roll and type lyrics into the strip under the grid: [so-fa]-[rei][to][mi-do] ([..] = one note, - inside = several syllables on one note, - between notes = slur / sustain the vowel, [-] = hold). Syllables can be IPA, plain letters read phonetically, pinyin, Hanzi, Hangul, kana or Thai script and are converted to IPA (ling-daw/src/lyrics.rs). Native script is pasted (Ctrl+V / Paste), IPA symbols have a palette.
  • SoundFonts - assets/soundfonts/Ling.sf2 (the Majora's Mask N64 set) is used by MIDI import when present: bank select + program change pick the preset, unmatched parts fall back to the built-in GM sounds. Add a soundfont instrument from the Plugin Picker (browse / audition with a search box); Settings > MIDI chooses the import soundfont. Loops, envelopes, filter, LFOs, layers, velocity/key ranges and exclusive classes are supported; SF2 modulators and effect sends are not.
  • MIDI import extras - tempo changes become a tempo map (the toolbar shows "N changes", click to clear), pitch bend becomes a bend automation lane (RPN 0 sets the range), bank select, volume/expression/pan lanes and the sustain pedal are honoured.
  • Mastering & safety - master limiter (mixer checkbox, on by default), audio test tone + limiter meter in Settings > Audio, stem export (Render > one file per track), A/B compare for instrument settings, left-edge clip trimming, double-click slider reset, and crash/close recovery (an unsaved session is offered back on the next start).
  • Drum kits — Ling Membrane has 16 parameters per piece (tune, decay, tension, hardness, body, click, tone, damp, purity, sweep, drive, gate, analog, swell, pan, level) and every GM key has its own voicing (six tom pitches, side stick, cowbell, congas, ...). Stock kits: Kit_Jazz, Kit_Rock, Kit_Metal, Kit_Funk, Kit_Electro_808, Kit_House_909, Kit_New_Wave, Kit_LoFi (tools/gen_kits.py).
  • GM sounds — instruments/GM/ holds 128 General MIDI patches (tools/gen_gm.py + the gm_normalize example).
  • Mixer — strips with level/pan/mute/solo, meters, per-track FX chains (EQ, Compressor, Drive, Delay, Reverb), master strip with compressor, sends and sidechain routing.
  • Node Editor — graph of tracks → effects → master with draggable send and sidechain routes.
  • Performance — session/clip launcher: scenes × tracks, quantized launch, Song Play / Session Only, auto-slicing the arrangement into scenes, record launched clips back into the arrangement.
  • Audio — import WAV/FLAC/OGG/MP3, warp clips to the project tempo and transpose them independently (WSOLA time-stretch), record audio from an input device, MIDI keyboard input and recording, MIDI export.
  • FL Studio import - File > Import MIDI / FL Studio... (or drop an .flp in the browser) reads the channel rack, pattern notes, playlist arrangement, tempo and audio clips of an FL Studio 20/21 project (ling-daw/src/flp_import.rs, layout verified against real projects). Each channel becomes a part in the same dialog as MIDI import, so any plugin / patch can be chosen per channel; drum channels merge into one Drums part on GM keys, sample channels become audio clips, plugins are matched

← Back to index