A utility library to help handling lyrics with chords
val lyric = "C G# G\n" +
"Smoke on the water, and fire in the sky\n" +
"C G# E G A E G B A E G A G E 2x\n" +
"Smoke on the water"
val chordsList = Khord.find(lyric)
println(chordsList.map { it.chord }.distinct()) // [C, G#, G, E, A, B]
val lyric = "C G#\n" +
"Smoke on the water\n"
val chordsList = Khord.find(lyric)
println(chordsList) // [Chord(chord=C, startIndex=0, endIndex=1), Chord(chord=G#, startIndex=13, endIndex=15)]
val lyric = "C G#\n" +
"Smoke on the water\n"
val chordsList = Khord.transposeText(lyric, ChordRoot.Bb, ChordRoot.C)
println(chordsList)
// D Bb
//Smoke on the water
1 - Add it in your root build.gradle at the end of repositories:
allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
...
}
}
2 - Add the dependency:
dependencies {
...
implementation "com.github.Tgo1014:Khord:${lastRelease}"
...
}