PHPackages                             nicolaswurtz/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. nicolaswurtz/chordpro-php

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

nicolaswurtz/chordpro-php
=========================

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

v0.1(7y ago)173.6k15[1 issues](https://github.com/nicolaswurtz/chordpro-php/issues)[2 PRs](https://github.com/nicolaswurtz/chordpro-php/pulls)LGPL-3.0-or-laterPHPCI passing

Since Feb 17Pushed 3mo ago3 watchersCompare

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

READMEChangelog (1)Dependencies (1)Versions (3)Used By (0)

chordpro-php
============

[](#chordpro-php)

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

It currently supports the following output formats :

- HTML (verses contain blocks with embricated `span` for alignement of chords with lyrics)
- JSON (verses are array of arrays of chords and lyrics for alignement purpose)
- Plain text (chords are aligned with monospace text thanks to whitespaces)

And provides some extra functionnalities :

- Tranpose chords (can be very clever if original key is known)
- Display french chords
- Guess tonality key of a song

*I'm french, so there's probably a lot of mistakes, my english is not always accurate — je fais ce que je peux hein :P*

Install
-------

[](#install)

Via composer :

```
$ composer require nicolaswurtz/chordpro-php
```

Usage
-----

[](#usage)

See `web/example.php` for demo with CSS styling.

```
