PHPackages                             intelektron/chordpro-php - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. intelektron/chordpro-php

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

intelektron/chordpro-php
========================

Parse, transpose and format (html, json, plaintext) ChordPro format for songs lyrics with chords.

1.1.1(2y ago)01.6k↓16.7%LGPL-3.0-or-laterPHPPHP &gt;=8.1

Since Jan 15Pushed 3mo agoCompare

[ Source](https://github.com/intelektron/chordpro-php)[ Packagist](https://packagist.org/packages/intelektron/chordpro-php)[ RSS](/packages/intelektron-chordpro-php/feed)WikiDiscussions develop Synced 1mo ago

READMEChangelog (3)Dependencies (10)Versions (5)Used By (0)

The chordpro-php library 🎸
==========================

[](#the-chordpro-php-library-)

[![Workflow status](https://github.com/intelektron/chordpro-php/actions/workflows/codequality.yml/badge.svg)](https://github.com/intelektron/chordpro-php/actions/workflows/codequality.yml/badge.svg)

A simple tool to parse, transpose &amp; format [ChordPro](https://www.chordpro.org) songs with lyrics &amp; chords. Compatible with PHP 8.1 and above.

*Forked from  by [Nicolaz Wurtz](https://github.com/nicolaswurtz), on LGPL-3 license.*

The following output formats are currently supported:

- **HTML** (verses contain blocks with embedded `span` for aligning chords with lyrics).
- **JSON** (verses are arrays of chords and lyrics for alignment purposes).
- **Plain text** (chords are aligned with monospace text thanks to whitespace).

The library provides some extra functionality:

- Tranpose chords by semitones or to the target key.
- Parse and display various chord notations:
    - French (`Do`, `Ré`, `Mi`).
    - German (`Fis`, `a`).
    - With UTF characters (`A♭`, `F♯`).
- Guess the key of a song.

Installation
------------

[](#installation)

Via composer:

```
composer require intelektron/chordpro-php
```

Usage
-----

[](#usage)

See [web/example.php](web/example.php) for demo with CSS styling.

```
