Skip to content

Native macOS app: turn a window into a reactive sound instrument. Open source.

License

Notifications You must be signed in to change notification settings

tonioloz/Sound-Window

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sound Window

A minimal native macOS app that turns a single window into a reactive sound surface.
No buttons, no sliders — the window and your input (keyboard, mouse, scroll, resize) are the instrument.

Open source. Feel free to use, fork, and contribute.


What it is

Sound Window is a small experiment: one window that behaves like an instrument. Everything you do in the window affects sound and visuals in real time. The design mixes macOS native glass (frosted vibrancy) with a Teenage Engineering–inspired look: orange, yellow, coral, teal accents and subtle geometric feedback.

  • Sound: Percussive hits (keys), sustained tone (key held / idle), and light texture (scroll). Delay and reverb for atmosphere. Tempo comes from window size.
  • Visual: Each action has its own feedback — key ripples, mouse glow, scroll waves, resize pulse — so the screen responds to every interaction.

How to run

  1. Clone the repo (or download and unzip).
  2. Open Xcode (full Xcode; Command Line Tools alone are not enough).
  3. Open the project: Sound Window.xcodeproj (double-click or File → Open).
  4. Select the Sound Window scheme and My Mac as destination.
  5. Press ⌘R (Run).

The app opens a single window. Interact with it to hear and see the response.


What it does

Inputs → sound & visuals

Input Sound Visual feedback
Keyboard Key down = short percussive note (pitch from key code). Key held = sustained tone. Colourful expanding ripple (orange / yellow / coral / teal).
Mouse movement Velocity affects filter/amplitude (tone and texture). Warm orange/yellow glow in the centre; stronger when you move faster.
Scroll Controls texture density (noise level). Horizontal wavy lines (teal/coral) that react to scroll intensity.
Resize window Larger window → slower tempo; smaller → faster. Tempo is always derived from window size. Orange border pulse and corner markers when you resize.
Window visibility In front = full sound; background/minimised = gentle decay.

Design principles

  • One window — The window frame is an active input (resize = tempo).
  • No extra UI — No toolbars, sidebars, or custom menus; system window chrome only.
  • Continuous mapping — All inputs map to sound and visuals in a smooth, continuous way.
  • Idle behaviour — When you stop interacting, tempo stabilises and sound/visuals decay slowly but never fully stop.

Project structure

File Role
SoundWindowApp.swift App entry point; creates the single window and injects AppState.
AppState.swift Central state: window size, visibility, mouse velocity, scroll, key state, tempo (BPM), and visual feedback triggers.
SoundEngine.swift Audio graph: AVAudioEngine, source node (percussive + sustained + noise), delay, reverb. Stereo, no external deps.
ContentView.swift Main view: wires AppState and SoundEngine, captures inputs via InputCaptureView, passes all feedback props to SoundVisualView.
SoundVisualView.swift Visual layer: frosted glass, dot grid, geometric accents, key ripples, mouse glow, scroll waves, resize pulse, corner markers.
InputCaptureView.swift AppKit-based capture of key down/up, mouse move, scroll (no clicks required).

The product spec is in PRD.md (Minimal Interactive Sound Window — macOS Native).


Requirements

  • macOS 14.0+
  • Xcode 15+ (Swift 5, SwiftUI)
  • No external dependencies — only AVFoundation, AppKit, SwiftUI

Open source & contributing

Sound Window is open source. You can use it, learn from it, fork it, and adapt it. Contributions are welcome — whether it’s a bug report, an idea, or code, your help improves the project.

How you can contribute

  • Bug reports & ideas — Open an Issue for bugs, crashes, or feature ideas.
  • Code & design — Open a Pull Request for fixes, new mappings, or visual/sound tweaks. Keep changes focused and aligned with the “one window, no extra UI” idea.
  • Docs & README — Improvements to this README or to code comments are welcome.

Before contributing

  • Run the app in Xcode and confirm it builds and runs on your Mac.
  • For PRs: one logical change per PR; short description of what and why.

No formal CLA or contributor agreement — by opening a PR you’re okay with your code being used under the same license as the project.


License

This project is licensed under the MIT License — see LICENSE for details.


Credits

  • Concept and implementation: @tonioloz

About

Native macOS app: turn a window into a reactive sound instrument. Open source.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages