Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Guitar chord retrieval and display #83

Closed
Taiko2k opened this issue Mar 30, 2019 · 25 comments
Closed

Guitar chord retrieval and display #83

Taiko2k opened this issue Mar 30, 2019 · 25 comments
Labels
enhancement Accepted functionality to be added

Comments

@Taiko2k
Copy link
Owner

Taiko2k commented Mar 30, 2019

@legion1978 Guitar chords... interesting. Though I think that might be something better off as its own application maybe? It could connect via MPRIS2 to synchronize with the player, and then it could be used with any music player.

not exactly-- i often jump to the player, grab the guitar and then crank it up.. so it implies the use of a media player.
thing is, [i think all of them] players support lyrics, not chords (meaning retrieve them from some place).

consider this, but scrolling slowly up:

2019-03-30_09-39

image

so it doesnt have to be a .lrc file ;) in fact, i very often paste chords and not lyrics in Taoun.
it would be an interesting addition.

Originally posted by @legion1978 in #81 (comment)

@Taiko2k Taiko2k added the enhancement Accepted functionality to be added label Mar 30, 2019
@Taiko2k
Copy link
Owner Author

Taiko2k commented Mar 31, 2019

I'm not sure if it should have automatic scrolling, or how that would work, but I got a concept here:

Screenshot from 2019-03-31 12-59-57

@legion1978
Copy link
Contributor

so cool.
and sure it should scroll (on/off state, maybe). so you can keep up with the song till it ends. believe me its very annoying scrolling manually and strumming at the same time :v

@Taiko2k
Copy link
Owner Author

Taiko2k commented Mar 31, 2019

How this feature works:

  • Theres a new option in the settings, when enabled:
    • Prefers showing lyrics with guitar chords in place of normal lyrics
    • Shows button to search and retrieve guitar chord lyrics of current song
  • Theres button to enable auto-scrolling (Auto deactivates if you attempt to scroll manually)

The site I'm using for this is http://www.guitarparty.com/en/. Hopefully they have songs you're interested in there, they seems to have a decently large collection from my quick observation.

@legion1978
Copy link
Contributor

ill test and report back-- man, youre the best.

@Taiko2k
Copy link
Owner Author

Taiko2k commented Mar 31, 2019

Just a few things I need to clean up before I do I git push

@legion1978
Copy link
Contributor

:3

@Taiko2k
Copy link
Owner Author

Taiko2k commented Mar 31, 2019

OK pushed, hopefully it works. I assume you're familiar with running a git/dev version

@legion1978
Copy link
Contributor

its been a while. lets see how that goes heh

@legion1978
Copy link
Contributor

Running in portable mode
Install directory: /home/downloads/TauonMusicBox-master
Dev mode, ignoring single instancing
Traceback (most recent call last):
File "./tauon.py", line 302, in
from PyLyrics import *
ModuleNotFoundError: No module named 'PyLyrics'

@Taiko2k
Copy link
Owner Author

Taiko2k commented Mar 31, 2019

I thought that might happen, if you have the aur version installed, just copy the folder "PyLyrics" in from /opt/tauon-music-box, or copy it out of https://github.com/Taiko2k/TauonMusicBox/releases/download/v4.0.0/Tauon.Music.Box.v4.0.0.Linux.Bass.64bit.zip or you could do sudo pip install pylyrics

@legion1978
Copy link
Contributor

ill get to it

@legion1978
Copy link
Contributor

legion1978 commented Mar 31, 2019

ok. i had to copy couple of other folders. (then i replaced the executable the other way around) then it broke when didnt find guitar-chords, so i created it.
then it worked! :)
is there a way to scroll already pasted chords? meaning when they dont have the special guitarparty format? though it is better with the colored chords, guitarparty catalogue doesn't seem that extense :v

great work

@Taiko2k
Copy link
Owner Author

Taiko2k commented Mar 31, 2019

I could add a function to attempt to parse it from the format you have in that screen shot. Do you know if the chord positions are just a rough estimate... or it is accurate and using relative monospacing to give the positions?

@legion1978
Copy link
Contributor

the difference in formats is that the usual chord found online has the letter on top of the word it should be played (as in the screenshot), whereas this guitarparty format has them before the word in brackets, like this:

[F] [Gm] [Bb] [Gm] [Bb] [F]
[F] [Gm] [Bb] [Gm] [Bb] [F]

I'd [F]sit alone and watch your light
My [Gm]only friend through teenage nights
And [Bb]everything I had to know
I [Gm]heard it on my [Bb]radi[F]o

so yes its accurate.

for some reason, TMB is not honoring the spaces on those letters at the beginning:

image

@Taiko2k
Copy link
Owner Author

Taiko2k commented Mar 31, 2019

It is actually measuring the spaces, just since the font is not monospace, they're much narrower, I can compensate this by replacing multiple spaces with wider spaces:

Screenshot from 2019-03-31 18-48-11

@Taiko2k
Copy link
Owner Author

Taiko2k commented Mar 31, 2019

I pushed an update.

Now, in the right click menu, there's an option 'Paste Chord Lyrics", which will take that 2 line format and save it. Theres also now a Clear Chord Lyrics option too.

So, to copy your existing lyrics, you'll need do a copy then a paste.

Its not perfect reading separated line format, but it seems to work most of the time.

@legion1978
Copy link
Contributor

man, it works and its awesome!
really, thanks for this.

@Taiko2k Taiko2k closed this as completed Apr 10, 2019
@C0rn3j
Copy link
Collaborator

C0rn3j commented Apr 10, 2019

or you could do sudo pip install pylyrics

That makes the package manager sad. You shouldn't run pip with sudo, either run it with --user or in a virtualenv to not mess with your OS packaging.

Looks like you can add Tauon to the list here -

https://en.wikipedia.org/wiki/LRC_(file_format)#Software

@Taiko2k
Copy link
Owner Author

Taiko2k commented Apr 10, 2019

You're right. Pacman would get angry with me sometimes. I never realised there was a --user flag or I guess I never thought to use it, but I should.

As for editing Wikipedia, I'm not sure I feel that's something I should do myself, seems like conflict of interest on my part.

@C0rn3j
Copy link
Collaborator

C0rn3j commented Apr 10, 2019

Well at least you didn't sudo pip update all packages, that was the only time I was forced to reinstall Arch.

I added Tauon to the Wiki page myself then.

@legion1978
Copy link
Contributor

hello.
did we lose this? :(

@C0rn3j
Copy link
Collaborator

C0rn3j commented Jan 21, 2025

Yep - https://github.com/Taiko2k/Tauon/blob/master/CHANGELOG.md#v790

The old guitarparty.com API is completely dead now, someone would need to port things over to the new API - #1342

It was assumed that nobody was even using the chords feature, it's currently kept commented and the module is separated out (and semi-broken) here - https://github.com/Taiko2k/Tauon/blob/9afde0c4a29b9f6742d94b935ec8c28569dd565b/src/tauon/t_modules/guitar_chords.py

It's not impossible to resurrect the chords feature, but someone would have to fix the API integration with guitarparty.com too to make it complete.

EDIT: I fixed up the unused code (still unused) in #1405, so re-enabling it later should be easy.

@legion1978
Copy link
Contributor

gotcha.
though just the hability to paste/display the chords should suffice. because for instance i rarely got any hit from guitarparty anyway.

thanks

@C0rn3j
Copy link
Collaborator

C0rn3j commented Jan 22, 2025

@legion1978 you can test the build from #1409 as per https://github.com/Taiko2k/Tauon/wiki/Development-builds

@legion1978
Copy link
Contributor

@legion1978 you can test the build from #1409 as per https://github.com/Taiko2k/Tauon/wiki/Development-builds

yes, it works ;) great

Image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Accepted functionality to be added
Projects
None yet
Development

No branches or pull requests

3 participants