Skip to content

A visually aesthetic lyric viewer that looks like a macOS code window, where lyrics appear one by one with a typing animation.

License

Notifications You must be signed in to change notification settings

abdipr/lyrscript

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

7 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

LyrScript Logo

LyrScript

A visually aesthetic lyric viewer that looks like a macOS code window

License: MIT Live Demo Built with React Styled with TailwindCSS

Transform your favorite song lyrics into a beautiful, animated coding experience. LyrScript displays lyrics one line at a time with smooth typing animations in a macOS-inspired code window interface.

Live Demo β€’ Report Bug β€’ Request Feature


✨ Features

🎨 Beautiful Themes

  • 10+ Pre-designed Themes including:
    • Midnight Slate (default)
    • Monochrome Dark
    • Cyberpunk Neon
    • Forest Whisper
    • Lavender Dream
    • Amber Glow
    • Northern Lights
    • Rose Mist
    • Desert Mirage
    • Aqua Sunset
    • And more!

⌨️ Realistic Typing Animation

  • Character-by-character typing effect with customizable speed
  • Blinking cursor animation for authentic code editor feel
  • Smooth line transitions and animations
  • Maximum 8 lines visible at once for optimal readability

🎡 LRC Format Support

  • Standard LRC (Lyric) file format with timestamp synchronization
  • Automatic lyric fetching from lrclib.net API
  • Manual LRC content input
  • Precise millisecond timing for perfect sync

πŸ’Ύ Import/Export Settings

  • Save your lyric configurations as JSON
  • Export and share your favorite setups
  • Import previously saved configurations
  • Preserve song metadata and preferences

πŸ–₯️ macOS-Inspired UI

  • Authentic window controls (red, yellow, green buttons)
  • Sleek borderless design
  • Line numbers like a real code editor
  • Responsive layout for all screen sizes
  • Smooth gradient animated backgrounds

πŸ” Smart Lyric Search

  • Search lyrics by song title and artist
  • Powered by lrclib.net database
  • Automatic synced lyrics retrieval
  • One-click populate your player

πŸš€ Getting Started

Prerequisites

Before you begin, ensure you have the following installed:

  • Node.js (version 16 or higher)
  • npm or yarn package manager

Installation

  1. Clone the repository

    git clone https://github.com/abdipr/lyrscript.git
    cd lyrscript
  2. Install dependencies

    npm install
  3. Start the development server

    npm run dev
  4. Open your browser

    Navigate to http://localhost:3000 to see LyrScript in action!

Building for Production

To create an optimized production build:

npm run build

The compiled files will be in the dist/ directory, ready to be deployed.

Preview Production Build

To preview the production build locally:

npm run preview

πŸ“– Usage Guide

Basic Setup

  1. Open Settings Panel

    Click the settings icon (βš™οΈ) in the bottom-right corner of the screen.

  2. Enter Song Information

    Fill in the following fields:

    • Song Title: The name of the song
    • Artist: The artist or band name
  3. Get Lyrics

    You have two options:

    Option A: Search Automatically

    • Click the "Search for Lyrics" button
    • LyrScript will fetch synced lyrics from lrclib.net
    • Lyrics will auto-populate if found

    Option B: Manual Input

    • Paste your LRC content directly into the text area
    • LRC format example:
      [00:12.34] First line of lyrics
      [00:15.67] Second line of lyrics
      [00:18.90] Third line of lyrics
      
  4. Customize Appearance

    • Theme: Choose from 10+ beautiful themes
    • Typing Speed: Adjust the typing animation speed (default: 50ms per character)
  5. Start Playback

    Click "Save & Start" to begin the lyric animation!

LRC Format

LyrScript uses the standard LRC format for synced lyrics:

[mm:ss.xx] Lyric text

Where:

  • mm = minutes (2 digits)
  • ss = seconds (2 digits)
  • xx = centiseconds (2-3 digits)

Example:

[00:12.00] Hello darkness, my old friend
[00:17.20] I've come to talk with you again
[00:21.80] Because a vision softly creeping
[00:26.50] Left its seeds while I was sleeping

Keyboard Shortcuts

Action Shortcut
Open Settings Click βš™οΈ icon
Close Settings Click Γ— icon or outside modal
Save & Start Click "Save & Start" button

πŸ› οΈ Technology Stack

LyrScript is built with modern web technologies:


πŸ“ Project Structure

lyrscript/
β”œβ”€β”€ public/              # Static assets
β”‚   β”œβ”€β”€ favicon icons    # App icons
β”‚   └── site.webmanifest # PWA manifest
β”œβ”€β”€ components/          # React components
β”‚   β”œβ”€β”€ Icons.tsx        # SVG icon components
β”‚   β”œβ”€β”€ LyricWindow.tsx  # Main lyric display window
β”‚   └── SettingsPanel.tsx # Settings modal component
β”œβ”€β”€ App.tsx              # Main application component
β”œβ”€β”€ index.tsx            # Application entry point
β”œβ”€β”€ index.html           # HTML template
β”œβ”€β”€ constants.ts         # Theme definitions and defaults
β”œβ”€β”€ types.ts             # TypeScript type definitions
β”œβ”€β”€ vite.config.ts       # Vite configuration
β”œβ”€β”€ tsconfig.json        # TypeScript configuration
└── package.json         # Project dependencies

🎨 Customization

Adding New Themes

Themes are defined in constants.ts. To add a new theme:

export const THEME_CLASSES = {
  // ... existing themes
  'your-theme-name': {
    window: 'bg-slate-900/60 border-slate-700',
    header: 'bg-slate-800/80 border-slate-700',
    body: 'text-slate-200',
    accent: 'text-slate-500',
    background: 'from-indigo-900 via-slate-900 to-purple-900'
  }
};

Modifying Typing Speed

Adjust the default typing speed in constants.ts:

export const DEFAULT_SETTINGS: AppSettings = {
  // ... other settings
  typingSpeed: 50, // milliseconds per character
};

Changing Max Visible Lines

Modify the constant in App.tsx:

const MAX_VISIBLE_LINES = 8; // Change to your preferred number

🌐 API Integration

LyrScript uses the lrclib.net API to fetch synced lyrics.

API Endpoint

GET https://lrclib.net/api/search?track_name={trackName}&artist_name={artistName}

Response Format

{
  "id": 123,
  "name": "Song Name",
  "trackName": "Song Name",
  "artistName": "Artist Name",
  "albumName": "Album Name",
  "duration": 240,
  "instrumental": false,
  "plainLyrics": "...",
  "syncedLyrics": "[00:12.34] Lyric line..."
}

🀝 Contributing

Contributions are what make the open-source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated!

How to Contribute

  1. Fork the Project
  2. Create your Feature Branch
    git checkout -b feature/AmazingFeature
  3. Commit your Changes
    git commit -m 'Add some AmazingFeature'
  4. Push to the Branch
    git push origin feature/AmazingFeature
  5. Open a Pull Request

Development Guidelines

  • Follow the existing code style
  • Write clear commit messages
  • Add comments for complex logic
  • Test your changes thoroughly
  • Update documentation as needed

πŸ“ License

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


πŸ‘₯ Authors

  • LyrScript Team - Initial work - abdipr

πŸ™ Acknowledgments

  • lrclib.net - For providing the lyric database API
  • Vercel - For hosting and deployment
  • JetBrains Mono - For the beautiful monospace font
  • All contributors who help improve LyrScript

πŸ“§ Support

If you encounter any issues or have questions:


🌟 Show Your Support

If you like LyrScript, please consider:

  • ⭐ Starring this repository
  • πŸ› Reporting bugs
  • πŸ’‘ Suggesting new features
  • πŸ”€ Contributing to the code

Made with ❀️ by the LyrScript Team

Website β€’ GitHub

About

A visually aesthetic lyric viewer that looks like a macOS code window, where lyrics appear one by one with a typing animation.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •