Skip to content

🎚️ Functional audio mixer with hardware control for Linux

License

Notifications You must be signed in to change notification settings

bernardopg/iaruba

Repository files navigation

IarubΓ‘ - Functional Audio Mixer for Linux

License Haskell Platform

A modern, functional reimplementation of hardware-based audio control with a beautiful GUI

Features β€’ Installation β€’ Quick Start β€’ Documentation β€’ Contributing


Overview

IarubΓ‘ is a Linux-native audio control system that bridges physical hardware (Arduino-based sliders) with your system's audio. Inspired by deej, IarubΓ‘ is built from the ground up in Haskell with a focus on:

  • Functional purity - Predictable, testable, maintainable code
  • Modern UI/UX - Clean GTK-based interface with dark/light themes
  • Linux-first - Full PulseAudio and PipeWire support
  • Extensibility - Plugin system, profiles, and rich configuration

Control individual application volumes, master output, microphone input, and more with physical sliders connected to an Arduino.

Features

Core Functionality

  • Hardware Integration - USB serial communication with Arduino-based sliders
  • Granular Audio Control - Per-application volume, master volume, mic input
  • Real-time Visualization - Live audio level meters with smooth animations
  • Profile System - Quick-switch between audio configurations (work, gaming, streaming)

Modern Interface

  • GTK+ 3 GUI - Native Linux look and feel
  • Dark/Light Themes - Automatic or manual theme switching
  • System Tray Integration - Minimize to tray, quick controls
  • Keyboard Shortcuts - Fully customizable hotkeys

Configuration Management

  • YAML-based Config - Human-readable, version-controllable
  • Live Reload - Changes apply immediately without restart
  • Validation - Detailed error messages for invalid configurations
  • Auto-rollback - Automatically reverts to last working config on errors

Productivity Features

  • Integrated Task Manager - Track TODOs with priority and categorization
  • Desktop Notifications - Reminders and audio event alerts
  • Interactive Documentation - Built-in tutorials and help system
  • Calendar Integration - Sync tasks with your calendar

Developer Experience

  • Automatic Documentation - Generated API docs and guides
  • Comprehensive Testing - Property-based and integration tests
  • CI/CD Ready - GitHub Actions workflows included
  • Extensible Architecture - Clean module boundaries for easy contributions

Installation

Prerequisites

System Dependencies:

# Debian/Ubuntu
sudo apt install libpulse-dev libgtk-3-dev libappindicator3-dev

# Fedora
sudo dnf install pulseaudio-libs-devel gtk3-devel libappindicator-gtk3-devel

# Arch Linux
sudo pacman -S libpulse gtk3 libappindicator-gtk3

Haskell Stack:

curl -sSL https://get.haskellstack.org/ | sh

Arduino Setup:

# Add user to dialout group for serial access
sudo usermod -a -G dialout $USER
# Log out and back in for changes to take effect

Build from Source

# Clone the repository
git clone https://github.com/yourusername/iaruba.git
cd iaruba

# Build
stack build

# Install to ~/.local/bin
stack install

# Run
iaruba

Hardware Setup

  1. Build the Arduino Circuit:

    • Connect 5 potentiometers to analog pins A0-A4
    • See docs/guides/hardware-setup.md for detailed wiring diagrams
  2. Upload Arduino Sketch:

    cd arduino/iaruba-mixer
    # Using Arduino IDE: Open and upload
    # OR using PlatformIO:
    pio run --target upload
  3. Configure Serial Port:

    • Edit config/iaruba.yaml
    • Set serial_port to your Arduino device (e.g., /dev/ttyUSB0)

Quick Start

First Run

  1. Launch IarubΓ‘:

    iaruba
  2. Configure Slider Mappings:

    • Click the settings icon or press Ctrl+,
    • Map each slider to applications or system outputs
    • Save configuration
  3. Test Sliders:

    • Move physical sliders
    • Watch volume levels change in the GUI
    • Verify audio output adjusts accordingly

Example Configuration

config/iaruba.yaml:

serial:
  port: /dev/ttyUSB0
  baud_rate: 9600

sliders:
  - id: 0
    name: "Master Volume"
    targets:
      - type: master

  - id: 1
    name: "Music"
    targets:
      - type: application
        name: "Spotify"
      - type: application
        name: "rhythmbox"

  - id: 2
    name: "Browser"
    targets:
      - type: application
        name: "Firefox"
      - type: application
        name: "Chrome"

  - id: 3
    name: "Communications"
    targets:
      - type: application
        name: "Discord"
      - type: application
        name: "Slack"

  - id: 4
    name: "Microphone"
    targets:
      - type: source
        name: "default_microphone"

audio:
  noise_reduction: default
  smooth_transitions: true
  transition_duration_ms: 50

gui:
  theme: dark
  show_visualizers: true
  tray_icon: true

Documentation

Development

Project Structure

iarubΓ‘/
β”œβ”€β”€ src/               # Haskell source code
β”‚   β”œβ”€β”€ Audio/        # PulseAudio/PipeWire integration
β”‚   β”œβ”€β”€ GUI/          # GTK interface components
β”‚   β”œβ”€β”€ Config/       # Configuration management
β”‚   β”œβ”€β”€ Hardware/     # Serial communication
β”‚   β”œβ”€β”€ Tasks/        # Task management system
β”‚   └── Utils/        # Shared utilities
β”œβ”€β”€ app/              # Main application entry point
β”œβ”€β”€ test/             # Test suites
β”œβ”€β”€ arduino/          # Arduino firmware
β”œβ”€β”€ docs/             # Documentation
β”œβ”€β”€ config/           # Example configurations
└── assets/           # Icons, themes, resources

Running Tests

# All tests
stack test

# Specific test suite
stack test :iaruba-test

# With coverage
stack test --coverage

# Watch mode (using ghcid)
ghcid --command "stack ghci iaruba:lib iaruba:test:iaruba-test" --test "main"

Code Style

We use Ormolu for formatting and HLint for linting:

# Format all code
find src -name "*.hs" -exec ormolu -i {} \;

# Run linter
stack exec -- hlint src/

Contributing

Contributions are welcome! Please see CONTRIBUTING.md for guidelines.

Development Workflow

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature/my-feature
  3. Make your changes
  4. Run tests: stack test
  5. Format code: ormolu -i src/**/*.hs
  6. Commit with descriptive message
  7. Push and create a Pull Request

Roadmap

  • Windows support via WASAPI
  • macOS support via CoreAudio
  • Plugin system for custom audio processors
  • Web interface for remote control
  • MIDI controller support
  • Equalizer presets per application
  • Cloud profile sync
  • Mobile app for remote control

Inspiration

This project is inspired by:

  • deej - The original hardware audio mixer
  • PulseAudio - Linux audio server
  • PipeWire - Modern multimedia framework

License

MIT License - see LICENSE for details.

Support


Made with ❀️ using Haskell

⬆ Back to Top

About

🎚️ Functional audio mixer with hardware control for Linux

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •