Skip to content

Navigation Menu

Sign in
Sign up

Repository files navigation

MIDI Tape app icon

MIDI Tape

CI macOS 14+ Swift 6 License: MIT

MIDI Tape is an open-source native macOS menu-bar WAV recorder that starts and stops with MIDI transport. It is built with SwiftUI, CoreMIDI, and Core Audio for hardware sequencers, grooveboxes, drum machines, and other MIDI-driven music-production setups.

I built it because I wanted the immediacy of a tape recorder in a hardware sequencer setup: press play, capture the stereo output, press stop, and have a WAV file waiting. It is deliberately not a DAW. There is no timeline, mixer, editing environment, plug-in host, or cloud service.

The project is usable today, but it is still early software. I have tested the core workflow with physical MIDI and USB audio devices on Apple Silicon. Different interfaces and aggregate-device configurations may expose behavior I have not seen yet.

What It Does

  • Listens to MIDI Start, Stop, and Continue messages from a selected source.
  • Records a selected Core Audio input, mono channel, or stereo channel pair.
  • Writes standard WAV files as 24-bit PCM or 32-bit float.
  • Supports 44.1, 48, 88.2, and 96 kHz when the selected device supports them.
  • Keeps an optional pre-roll buffer and configurable stop tail.
  • Recovers interrupted recordings after a crash, sleep, device loss, or quit.
  • Remembers MIDI and audio devices by persistent identifiers.
  • Tracks moved recording folders and takes using macOS security-scoped bookmarks.
  • Provides recording history with Play and Reveal in Finder actions.
  • Reports missing signal, clipping, dropped frames, write failures, and low disk space.
  • Can launch at login from the packaged application.

Requirements

  • macOS 14 Sonoma or newer
  • Apple Silicon Mac for the current packaging script
  • Swift 6 toolchain
  • Xcode or Xcode Command Line Tools
  • A MIDI source that sends MIDI 1.0 transport messages
  • A Core Audio input device

MIDI Tape needs microphone permission because macOS treats audio-interface inputs as microphone capture.

Build and Run

Clone the repository, then:

swift build
swift run MIDITape

To build the menu-bar application bundle:

Scripts/package-app.sh
open dist/MIDITape.app

The local package is ad-hoc signed. It is not notarized or distributed through the Mac App Store.

Launch-at-login uses SMAppService.mainApp, so test that feature from the packaged application rather than swift run.

Set Up a Recording

  1. Connect the MIDI and audio devices before opening MIDI Tape.
  2. Launch the packaged app and allow microphone access when prompted.
  3. Open Settings.
  4. In Input, choose the MIDI source, audio input, channel mode, and channel or stereo pair.
  5. In Recording, choose the destination folder, sample rate, bit depth, pre-roll, stop tail, filename template, and MIDI Continue behavior.
  6. Arm the input and confirm that the meter shows signal.
  7. Start the sequencer. MIDI Start begins a take and MIDI Stop finalizes it.

Use a short manual test recording before relying on a new device or aggregate configuration. For 24-bit capture, peaks around -12 to -6 dBFS leave useful headroom. MIDI Tape currently records at unity gain and does not normalize or apply automatic gain control.

MIDI Behavior

  • Start while armed starts a new recording.
  • Duplicate Start while recording is ignored.
  • Stop while armed is ignored.
  • Continue can be ignored, treated as Start when stopped, or used to create a new segment.
  • Device disappearance finalizes the current file as incomplete and waits for the saved device to return.

File Safety

Active recordings are written inside a hidden .MIDITape staging directory within the selected destination. A completed take is moved to its final WAV name only after the file closes successfully.

Interrupted files are recovered as visible files with _Incomplete in the name. A zero-frame recording is never reported as complete.

MIDI Tape does not upload recordings or telemetry. Preferences and history stay on the Mac. Rotating diagnostic logs are stored under:

~/Library/Application Support/MIDITape/Logs

Test

Run the unit suite with:

swift test -Xswiftc -warnings-as-errors

Run the complete local validation:

Scripts/validate.sh

That script builds with warnings treated as errors, runs XCTest when full Xcode is available, compiles the hardware test utilities, packages the app, verifies the signature and bundle metadata, and writes a local report under ValidationReports/.

Hardware acceptance must still be performed on a Mac with the intended MIDI and audio devices connected.

Project Layout

Sources/MIDITape/ App, MIDI transport, audio capture, and persistence
Tests/MIDITapeTests/ Parser and recording-policy tests
Tools/ Virtual MIDI and audio-disconnect test utilities
BuildSupport/ Info.plist and app icon source
Scripts/ Packaging and validation
docs/ Design and contributor documentation

The implementation uses SwiftUI, CoreMIDI, AVFAudio, Core Audio device APIs, ServiceManagement, and OSLog. There are no third-party runtime dependencies.

Current Limitations

  • One mono or stereo recording at a time
  • No multitrack capture
  • No waveform editor or playback transport
  • No plug-ins, mixing, or mastering
  • No automatic input trim, normalization, or limiter
  • No signed and notarized public release yet
  • Hardware behavior can vary between Core Audio drivers and aggregate devices

Roadmap

The next practical improvements are:

  • Per-device and channel-pair input trim
  • Peak hold and a visible target recording range
  • Short automatic level calibration
  • Broader hardware compatibility reports
  • Developer ID signing, notarization, and release automation

See CONTRIBUTING.md before sending a pull request. Bugs and hardware compatibility reports are useful, especially when they include the macOS version, device model, driver version, channel configuration, and reproduction steps without exposing private recording paths or audio.

License

MIDI Tape is available under the MIT License.

About

Open-source macOS menu-bar WAV recorder triggered by MIDI transport, built with SwiftUI, CoreMIDI, and Core Audio.

Topics

Resources

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages

AltStyle によって変換されたページ (->オリジナル) /