auric 0.0.4-alpha copy "auric: ^0.0.4-alpha" to clipboard
auric: ^0.0.4-alpha copied to clipboard

Lavalink v4 client for Dart with multi-source music support (YouTube, Spotify, Apple Music, SoundCloud). Built from scratch with audio filters and queue management.

example/README.md

Auric Examples #

Practical, ready-to-run examples showing everything Auric can do. Each example is self-contained with clear explanations.

Quick Start #

Before running any example:

  1. Start your Lavalink server:

    cd ../lavalink
    java -jar Lavalink.jar
    
  2. Run any example:

    dart run example/basic_usage.dart
    dart run example/queue_management.dart
    dart run example/audio_filters.dart
    dart run example/multi_source_search.dart
    dart run example/super_easy_bot.dart
    dart run example/discord_bot_example.dart
    

Examples Guide #

🎵 basic_usage.dart #

Perfect for beginners - Start here!

Learn the fundamentals in under 2 minutes:

  • Connect to Lavalink
  • Search and play music
  • Control playback (pause, resume, seek)
  • Adjust volume
  • Apply simple filters
dart run example/basic_usage.dart

What you'll learn: Core Auric concepts and basic music playback


📋 queue_management.dart #

Master playlists and queues

Build Spotify-like playlist features:

  • Add multiple tracks to queue
  • Auto-play through tracks
  • Shuffle and reorder
  • Remove specific tracks
  • Jump to any position
  • Real-time queue updates
dart run example/queue_management.dart

What you'll learn: Everything about managing music queues


🎛️ audio_filters.dart #

Transform your music

Explore professional audio effects:

  • Nightcore - Faster, higher pitch (anime style)
  • Vaporwave - Slower, lower pitch (retro aesthetic)
  • Bass Boost - Enhanced low frequencies
  • 8D Audio - Spatial surround sound
  • Karaoke - Remove vocals for sing-along
  • Combined Filters - Stack multiple effects
dart run example/audio_filters.dart

What you'll learn: All available audio filters and how to combine them
Pro tip: Use headphones for the best 8D audio experience


🔍 multi_source_search.dart #

Stream from anywhere

Search across 10+ music platforms:

Prefix Platform Example
am Apple Music am taylor swift
sp Spotify sp imagine dragons
yt YouTube yt never gonna give you up
ytm YouTube Music ytm pop hits
sc SoundCloud sc lofi beats
dz Deezer dz top 40

Plus: Yandex Music, Bandcamp, Twitch, Vimeo

dart run example/multi_source_search.dart

What you'll learn: How to search every supported platform
Note: Spotify and Apple Music need API keys in Lavalink config


🤖 super_easy_bot.dart #

Create a full bot in minutes

The easiest way to build a music bot:

  • 30+ built-in commands (play, pause, skip, queue, etc.)
  • Multi-source support (YouTube, Spotify, Apple Music, etc.)
  • Audio filters (nightcore, bass boost, 8D audio, etc.)
  • DJ mode with role permissions
  • Smart features (auto-queue, duplicate detection)
dart run example/super_easy_bot.dart

What you'll learn: How to use the EasyMusicBot framework
Perfect for: Discord bots, Telegram bots, any chat platform


🎮 discord_bot_example.dart #

Full Discord integration

Production-ready Discord bot template:

  • Complete command handlers
  • Voice channel integration
  • Event management
  • Multi-guild support
  • Error handling
  • All Auric features demonstrated
dart run example/discord_bot_example.dart

What you'll learn: How to build a professional Discord music bot
Note: For a complete implementation, see ../../discord_bot/


Learning Path #

New to Auric? Follow this order:

  1. basic_usage.dart → Learn core concepts (2 min)
  2. queue_management.dart → Understand playlists (2 min)
  3. audio_filters.dart → Explore effects (2 min)
  4. multi_source_search.dart → Master platforms (1 min)
  5. super_easy_bot.dart → Build a complete bot (5 min)
  6. discord_bot_example.dart → Advanced integration (10 min)

Total time: ~20 minutes to learn everything!


Configuration #

All examples use these defaults:

LavalinkClient(
  host: 'localhost',
  port: 2333,
  password: 'youshallnotpass',
  userId: 'demo-user',
)

Using your own Lavalink server? Just change these values in the example files.


Platform Support #

Auric supports 10+ music platforms. Some require API credentials:

No Setup Required ✅ #

  • YouTube
  • SoundCloud
  • Bandcamp
  • Twitch
  • Vimeo

Requires API Keys 🔑 #

Add credentials to your Lavalink application.yml:

plugins:
  lavasrc:
    spotify:
      clientId: "your-client-id"
      clientSecret: "your-client-secret"
    applemusic:
      mediaAPIToken: "your-token"

Troubleshooting #

Connection refused?

  • Start Lavalink before running examples
  • Check host and port match your Lavalink config
  • Verify firewall isn't blocking the connection

No tracks found?

  • Install LavaSrc plugin in Lavalink
  • Check API credentials for Spotify/Apple Music
  • Try SoundCloud/YouTube (no credentials needed)

Filters not working?

  • Update to latest Lavalink version
  • Some filters require specific Lavalink builds
  • Check Lavalink logs for errors

Track won't play?

  • For Discord bots: Join a voice channel first
  • Check track URL is valid
  • Review Lavalink logs for details

Example Comparison #

Example Duration Difficulty Best For
basic_usage 2 min ⭐ Easy Learning basics
queue_management 2 min ⭐ Easy Playlists
audio_filters 2 min ⭐⭐ Medium Sound effects
multi_source_search 1 min ⭐ Easy Platform search
super_easy_bot 5 min ⭐ Easy Quick bot
discord_bot_example 10 min ⭐⭐⭐ Hard Integration

Need Help? #

  • Documentation: Main README
  • Issues: GitHub Issues
  • Discord: Join our support server

Contributing Examples #

Have a cool example idea? We'd love to see it!

Good example ideas:

  • Platform-specific integrations
  • Advanced use cases
  • Creative filter combinations
  • Error handling patterns

How to contribute:

  1. Fork the repo
  2. Add your example
  3. Include clear comments
  4. Submit a pull request

Built with Auric. Happy coding! 🎵

2
likes
135
points
199
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

Lavalink v4 client for Dart with multi-source music support (YouTube, Spotify, Apple Music, SoundCloud). Built from scratch with audio filters and queue management.

Repository (GitHub)

License

unknown (license)

Dependencies

http, logging, web_socket_channel

More

Packages that depend on auric