2017 © Pedro Peláez
 

library transposer

Plain text song parser and chord transposer

image

geekality/transposer

Plain text song parser and chord transposer

  • Thursday, June 20, 2013
  • by Svish
  • Repository
  • 2 Watchers
  • 10 Stars
  • 50 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 3 Forks
  • 0 Open issues
  • 11 Versions
  • 0 % Grown

The README.md

Introduction

For transposing simple songs written as plain text with chords above the lyrics., (*1)

Install

If you're using Composer, which you really should, simply require the package geekality/transposer in your composer.json. Otherwise download and include as per usual :), (*2)

"require":
{
    "geekality/transposer": "1.*",
},

Example usage

// song.php
$text = <<<SONG
D                      G          D
Be thou my vision, oh Lord of my heart
A                          G              A
Naught be all else to me, save that thou art
G             D/F♯       Bm         G  A
Thou my best thought, by day or by night
Bm          F♯m            G     A    D
Waking or sleeping, thy presence my light

D                        G       D
High King of heaven, my victory won
A                          G              A
May I reach heaven's joys, O bright heaven's sun
G             D/F♯      Bm       G   A
Heart of my own heart, whatever befall
Bm          F♯m        G    A   D
Still be my vision, O ruler of all
SONG;

$song = Transposer::parse($text, 'D');
if(isset($_GET['key']))
    $song->transpose($_GET['key']);

echo $song->get_key_selector('song.php?key=');
echo $song;

For an example with chorus and simple css styling, see sample.php., (*3)

License

This work is licensed under the Creative Commons Attribution 3.0 Unported License. To view a copy of this license, visit Creative Commons Attribution 3.0 Unported License., (*4)

Creative Commons License, (*5)

The Versions

20/06 2013

v1.6

1.6.0.0 https://github.com/Svish/Transposer

Plain text song parser and chord transposer

  Sources   Download

CC-BY

The Requires

  • php >=5.3.0

 

key music transpose chords

15/05 2013

v1.5

1.5.0.0 https://github.com/Svish/Transposer

Plain text song parser and chord transposer

  Sources   Download

CC-BY

The Requires

  • php >=5.3.0

 

key music transpose chords

01/05 2013

dev-master

9999999-dev https://github.com/Svish/Transposer

Plain text song parser and chord transposer

  Sources   Download

CC-BY

The Requires

  • php >=5.3.0

 

key music transpose chords

01/05 2013

v1.4.2

1.4.2.0 https://github.com/Svish/Transposer

Plain text song parser and chord transposer

  Sources   Download

CC-BY

The Requires

  • php >=5.3.0

 

key music transpose chords

28/04 2013

v1.4.1

1.4.1.0 https://github.com/Svish/Transposer

Plain text song parser and chord transposer

  Sources   Download

CC-BY

The Requires

  • php >=5.3.0

 

key music transpose chords

28/04 2013

v1.4.0

1.4.0.0 https://github.com/Svish/Transposer

Plain text song parser and chord transposer

  Sources   Download

CC-BY

The Requires

  • php >=5.3.0

 

key music transpose chords

10/04 2013

v1.3.0

1.3.0.0 https://github.com/Svish/Transposer

Plain text song parser and chord transposer

  Sources   Download

CC-BY

The Requires

  • php >=5.3.0

 

key music transpose chords

10/04 2013

v1.2.0

1.2.0.0 https://github.com/Svish/Transposer

Plain text song parser and chord transposer

  Sources   Download

CC-BY

The Requires

  • php >=5.3.0

 

key music transpose chords

07/04 2013

v1.1.0

1.1.0.0 https://github.com/Svish/Transposer

Plain text song parser and chord transposer

  Sources   Download

CC-BY

The Requires

  • php >=5.3.0

 

key music transpose chords

07/03 2013

v1.0.1

1.0.1.0 https://github.com/Svish/Transposer

Plain text song parser and chord transposer

  Sources   Download

CC-BY

The Requires

  • php >=5.3.0

 

key music transpose chords

06/03 2013

v1.0.0

1.0.0.0 https://github.com/Svish/Transposer

Plain text song parser and chord transposer

  Sources   Download

CC-BY

The Requires

  • php >=5.3.0

 

key music transpose chords