Tranponse lyrics with chords using PHP. It's been used at Collideborate
Note: Under Development :)
You can install the package via composer:
composer require ljfreelancer88/transpose
php composer.phar require ljfreelancer88/transpose
# 1. Import the package
use Ljfreelancer88\Transpose\Transpose;
# 2. Somewhere in your Controller
$key = 'C'; // C, C#, Db, D
$transposer = new Transpose($model->content);
$transposer->setKey($key);
$transposer->loadSong();
$transposedSong = $transposer->transpose($model->key, $key);
# OR
$transposer = new Transpose();
$transposer->setKey($key);
$transposer->loadSong($model->content);
$transposedSong = $transposer->transpose($model->key, $key);
# 3. Somewhere in your View
echo "<pre>$transposedSong</pre>";
composer test
composer psalm
php vendor/bin/phpunit tests
php vendor/bin/psalm
Please see CHANGELOG for more information what has changed recently.
Please see CONTRIBUTING for details.
If you discover any security related issues, please email [email protected] instead of using the issue tracker.
The MIT License (MIT). Please see License File for more information.