LofiBeats.Cli
0.1.0
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet tool install --global LofiBeats.Cli --version 0.1.0
This package contains a .NET tool you can call from the shell/command line.
dotnet new tool-manifest # if you are setting up this repo dotnet tool install --local LofiBeats.Cli --version 0.1.0
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=LofiBeats.Cli&version=0.1.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
nuke :add-package LofiBeats.Cli --version 0.1.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
LofiBeats
A cross-platform command-line tool and service for generating and playing lofi beats with real-time effects.
Features
- Generate lofi beats with different styles (basic, jazzy, chillhop, hiphop)
- Real-time audio effects:
- Tape Stop (gradually slow down the audio like a tape machine powering off)
- Tape Flutter (adds wow/flutter pitch drift and tape hiss for vintage vibes)
- Vinyl (adds vinyl record crackle and noise for that authentic feel)
- Reverb (adds space and atmosphere to create depth)
- Low Pass Filter (reduces high frequencies for that warm, mellow sound)
- Interactive mode for live control
- RESTful API service for remote control
- Cross-platform support (Windows, macOS, Linux)
- Telemetry support with local file and Seq logging
- Plugin system for custom effects
- Scheduled playback and stop commands
Quick Start
# Install the tool
dotnet tool install --global LofiBeats.Cli
# Start playing some beats
lofi play --style jazzy
# Play with custom BPM
lofi play --style chillhop --bpm 82
# Schedule playback to start later
lofi play --style hiphop --after 5m
lofi play --style chillhop --bpm 85 --after 30s
# Generate a pattern with specific BPM
lofi generate --style hiphop --bpm 95
# Add some effects
lofi effect --name reverb
lofi effect --name tapeflutter
lofi effect --name vinyl
# Control volume
lofi volume 0.8
# Stop playback
lofi stop
# Stop with tapestop effect
lofi stop --tapestop
# Schedule playback to stop later
lofi stop --after 10m
lofi stop --tapestop --after 30s
Architecture
LofiBeats consists of three main components:
- LofiBeats.Cli: Command-line interface tool
- LofiBeats.Service: Background service with REST API
- LofiBeats.Core: Core audio processing and effect implementation
Build Requirements
- .NET 9.0 SDK
- PowerShell 7+ (Windows) or Terminal (macOS/Linux)
- Audio output device with working drivers
Platform-Specific Requirements
Windows
- NAudio native dependencies (included)
- System.Management package for process management
macOS
- CoreAudio drivers
ps
command available for process management
Linux
- ALSA audio system
pkill
command available for process management
Building from Source
# Clone the repository
git clone https://github.com/willibrandon/LofiBeats.git
cd LofiBeats
# Build the solution
dotnet build
# Run tests (platform-specific tests will be skipped on non-Windows platforms)
dotnet test
# Create platform-specific releases
./scripts/publish.sh --runtime linux-x64 --version 1.0.0
./scripts/publish.sh --runtime osx-x64 --version 1.0.0
./scripts/publish.sh --runtime win-x64 --version 1.0.0
Configuration
The application uses two configuration files:
cli.appsettings.json
- CLI configurationservice.appsettings.json
- Service configuration
Key configuration options:
{
"Telemetry": {
"IsEnabled": true,
"EnableSeq": false,
"SeqServerUrl": "http://localhost:5341",
"EnableLocalFile": true
}
}
API Endpoints
The service exposes the following REST API endpoints:
POST /api/lofi/generate
- Generate a new beat patternPOST /api/lofi/play
- Start playbackPOST /api/lofi/stop
- Stop playbackPOST /api/lofi/pause
- Pause playbackPOST /api/lofi/resume
- Resume playbackPOST /api/lofi/volume
- Set volume levelPOST /api/lofi/effect
- Add/remove effectsGET /healthz
- Health check endpoint
Development
Running Tests
# Run all tests
dotnet test
# Run specific test categories
dotnet test --filter "Category!=Platform_Specific"
dotnet test --filter "Category=AI_Generated"
Adding New Effects
- Create a new effect class in
src/LofiBeats.Core/Effects
- Implement the
IAudioEffect
interface - Register the effect in
EffectFactory.cs
Test Container
For running tests in CI or containerized environments, we provide a Docker container with a pre-configured audio testing environment. See CONTAINER.md for details.
Contributing
- Fork the repository
- Create a feature branch
- Commit your changes
- Push to the branch
- Create a Pull Request
Telemetry
The application collects anonymous usage telemetry to improve the user experience. Data is stored in:
- Windows:
%LOCALAPPDATA%\LofiBeats\Telemetry
- macOS:
~/Library/Application Support/LofiBeats/Telemetry
- Linux:
~/.local/share/LofiBeats/Telemetry
Telemetry can be disabled in the configuration file.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
This package has no dependencies.