GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - holo-q/moo: Sub-3ms audio feedback daemon for the Spaceship

BranchesTags
Open more actions menu

Latest commit

 

History

10 Commits
10 Commits

Folders and files

NameName
Last commit message
Last commit date
assets
assets
 
 
src
src
 
 
.gitignore
.gitignore
 
 
Cargo.toml
Cargo.toml
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
justfile
justfile
 
 

Repository files navigation

moo

Sub-3ms audio feedback daemon for the Spaceship.

Preloads sounds into memory via rodio and listens on a Unix socket. Events trigger mapped sounds based on the active profile. Target latency: sound playback begins within one frame at 180Hz (~5.5ms).

Install

cargo install --path .

Usage

# Daemon (run via systemd)
moo daemon

# Trigger events (<1ms socket send)
moo clipboard_copy
moo switch2_in
moo claude_fire

# Direct sound playback (bypasses profile)
moo raw tick

# Status and control
moo status
moo reload

# Profile management
moo profile              # Show current
moo profile sparse       # Switch profile
moo profile --list       # List events in current profile
moo profiles             # List all profiles

# Sound utilities
moo sounds               # List available sounds
moo preview tick         # Preview a sound (via pw-play)

Architecture

┌─────────────────────────────────────────────────────────┐
│                     moo daemon                          │
│                                                         │
│  ┌─────────────┐    channel    ┌──────────────────┐    │
│  │ Socket Loop │──────────────▶│   Audio Thread   │    │
│  │   (tokio)   │               │   (std::thread)  │    │
│  └─────────────┘               │                  │    │
│         ▲                      │  - SoundBank     │    │
│         │                      │  - AudioEngine   │    │
│  Unix Datagram                 │  - rodio output  │    │
│  $XDG_RUNTIME_DIR/moo.sock     └──────────────────┘    │
└─────────────────────────────────────────────────────────┘
         ▲
         │ <1ms
    ┌────┴────┐
    │ Clients │  moo <event>
    └─────────┘

Audio lives on a dedicated thread because rodio's OutputStream isn't Send. Commands flow through an unbounded channel for immediate processing.

Configuration

Source of truth: ~/Workspace/sfx.toml

[meta]
default_profile = "rhythmic"
sounds_dir = "/path/to/sounds"

[sounds]
tick = "tick.wav"
confirm = "confirm.wav"
pulse_whisper = { file = "pulse-whisper.wav", volume = 0.9, pitch = "0.98~1.02" }

[profiles.rhythmic]
clipboard_copy = "tick"
yank = { sound = "tick_deep", pitch = "0.9~1.1" }  # per-trigger override
claude_fire = "pulse_2"

FloatOrRange

Volume and pitch support constants or random ranges:

volume = 0.9           # constant
pitch = "0.98~1.02"    # random within range each play

Profiles

  • sparse: Ritual punctuation - only major actions chirp
  • rhythmic: Working rhythm - navigation + lifecycle events
  • immersive: Full cockpit - the spaceship hums

Systemd

# ~/.config/systemd/user/moo.service
[Unit]
Description=moo - Sub-3ms audio feedback daemon
After=graphical-session.target pipewire.socket

[Service]
Type=simple
ExecStart=%h/.cargo/bin/moo daemon
Restart=always
RestartSec=1

[Install]
WantedBy=graphical-session.target
systemctl --user enable --now moo
systemctl --user status moo
journalctl --user -t moo -f

SIGHUP

Config reload via signal:

pkill -HUP moo
# or
moo reload

Both sfx config and logging levels (via spaceship-std) reload on SIGHUP.

Logging

Uses spaceship-std for centralized logging. Configure in ~/Workspace/logging.toml:

[levels]
moo = "debug"  # trace, debug, info, warn, error

View logs:

journalctl --user -t moo -f

Dependencies

  • rodio - Audio playback
  • tokio - Async socket handling
  • spaceship-std - Logging infrastructure

About

Sub-3ms audio feedback daemon for the Spaceship

Topics

audioaudio-feedbackdesktop-audiodesktop-environmenthotkeylinuxlinux-desktoplow-latencyrodiorustsound-effectssystem-daemonsystemdunix-socketxfce

Resources

Readme
MIT license
Activity
Custom properties

Stars

0 stars

Watchers

0 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.