Giter Site home page Giter Site logo

dvx / lofi Goto Github PK

View Code? Open in Web Editor NEW
1.1K 21.0 67.0 14.66 MB

๐ŸŽต๐Ÿ”‰ A mini Spotify player with WebGL visualizations.

Home Page: http://lofi.rocks

License: MIT License

TypeScript 79.08% HTML 0.12% CSS 4.14% JavaScript 3.12% Python 1.61% C++ 1.72% Objective-C++ 0.59% Makefile 0.15% C 6.59% Objective-C 2.84% Shell 0.04%
spotify webgl spotify-desktop mini-spotify-player audio-player tiny-spotify-player media

lofi's Introduction

Lofi: a tiny Spotify player

Website โ€ข FAQ โ€ข Discord

Lofi is a mini Spotify player with visualizations. It is not a replacement for the Spotify Desktop app, nor does it play music independently of the Spotify app; instead, Lofi works alongside it to provide a more intuitive and pleasant access to common features. Lofi also displays cover art and track info stylishly and it facilitates WebGL-powered audio visualizations for both Windows, MacOS and Linux. In other words, it's a "tiny Spotify player" or a "mini mode" to enhance the Spotify desktop app.

Design goals

  • A small, 1:1 aspect ratio player depicting album art
  • An always-on-top "widget-like" app
  • Minimalist (no extraneous controls)
  • Multiple-screen capable
  • Windows, MacOS and Linux compatible
  • Visualization-ready (WebGL)
  • โ‰ค 100MB memory footprint

Building

To build, you'll need node-gyp, a compatible Python version (2.x), and your operating system's SDK (Microsoft Build Tools or Xcode).

First, you'll need to run:

$ yarn install

If you have more than one Python installation on your system, you can prevent the build from failing by editing the package.json file in the root directory.

Append the following on the "build": ... line:

--python path/to/python27

Now you can run yarn install again.

Distribution

To create a setup file, run yarn run dist. The output will be located in ./dist.

$ yarn run dist

Development

To develop, open up a Terminal and type:

$ yarn run development
$ yarn run start

Bugs, issues, and contributing

Found a ๐Ÿ›? Have a feature request? Feel free to open an issue or contribute.

As always, you are more than welcome join our Discord ๐ŸŽค server. The more the merrier! ๐ŸŽ‰

Don't forget to โญ and/or fork this repo.

License

MIT

lofi's People

Contributors

davidbradbury avatar dependabot[bot] avatar devilmoon avatar dvx avatar eralpsahin avatar filiptrplan avatar marriaga158 avatar nilesr avatar roman-balzer avatar stamoun avatar yayroos avatar zaffypuck avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

lofi's Issues

Switch over to npm from yarn

Yarn doesn't support a few key security features (like yarn audit fix) so a switch to npm might be warranted, especially because Github is flagging some packages as potentially insecure.

Feature request: progress bar

It would be cool to have a progress bar, maybe 1px high at the bottom, to see where you are in the song. It could appear only when hovering too.

Visualizations not working?

Hi, I'm on OSX 10.14.2 (Mojave). It doesn't appear that the visualizations do anything in either the separate window or in the main window. They just seem to be static and do not change with the music.

If there's any other detail I can provide, please let me know.

Disappears when ads play

Just found and really like the mini player. I'm on Windows 10 and whenever an ad plays, the mini player disappears, only returning if I close and re-open.

Automate / Guide Users through Mac install process

The process to get the visualisation working on Mac is a bit convoluted and hidden within a FAQ. It might be worth trying to detect the users current environment and either run a configuration wizard or just guide them through the steps in a more intuitive way.

node-gyp doesn't target the right python install [Windows 10]

When trying to build from source, node-gyp won't target the Python 2.7 installation by default if there's more than one Python installation on the machine.

One can solve this by editing the package.json file and adding --python path/to/python27 to the build argument.

This should either be mentioned in the README, or another option would be to look into calling node-gyp through NPM so that the user can configure it to target python 2.7 automatically.

Visualizations not working on W10

Greetings!

The visualizations in every song are practically static, staying the same through the entire song. Is this intended? Do I have to set up anything else besides the player?

I am already running it as administrator.

lofi.rocks has lapsed

This is a known issue and logins will be affected, my apologies. GoDaddy has locked my account and I'm dealing with their customer service to renew the domain.

Question regarding visualizations and FFT

is the data from volume equivalent to the raw audio data from the audio capture device?
if it is, then it might be possible to run a FFT on it and create visualizations based on the frequencies present in the music, not simply on the volume.

Mac(High Sierra): Lofi Opens but will not display anything

I have an early 2011 Macbook Pro 17 inch running High Sierra. When I try to open Lofi, it will flash open and then anything that displays will suddenly disappear. This all happens very quickly. The computer will act like I have the app open, but nothing will display.

Features request

Hello @dvx ! If you still working on improvement of LoFi, i want to ask for these improvements please:

1 Option of manual set size of widget
2 Option to set widget not "always on top"
3 Option to hide widget then Spotify closed or stopped

Hope you still working on LoFi! Becouse this is only one working mini player for Spotify now!

Website: HTTPS redirect

While the website for this project already supports HTTPS, it's not redirecting from HTTP automatically.

And as the site already uses HSTS I see no point in not redirecting to HTTPS. ๐Ÿ˜‰

Visualizations not working for me on Win10

I absolutely love this widget, it harkens back to a time around 2005-2010 when little pixel-perfect minimal music and information widgets were all the shit for Mac OS and some got ported over to Windows. I love having this thing float above my windows while I work!

The issue: on Win10 Home, the visualizations appear to just be floating in their default state with no impact made by the Spotify music - is there anything I can do to troubleshoot why the widget doesn't appear to be getting an audio stream? The controls work perfectly otherwise.

Thanks!

Not python3 compatible

Trying to run the application on windows using python3 fails the build.

$ node-gyp rebuild --target=4.0.1 --arch=x64 --dist-url=https://atom.io/download/electron
gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | win32 | x64
gyp ERR! configure error
gyp ERR! stack Error: Command failed: C:\Users\north\AppData\Local\Programs\Python\Python36\python.EXE -c import sys; print "%s.%s.%s" % sys.version_info[:3];
gyp ERR! stack   File "<string>", line 1
gyp ERR! stack     import sys; print "%s.%s.%s" % sys.version_info[:3];
gyp ERR! stack                                ^
gyp ERR! stack SyntaxError: invalid syntax
gyp ERR! stack
gyp ERR! stack     at ChildProcess.exithandler (child_process.js:294:12)
gyp ERR! stack     at ChildProcess.emit (events.js:182:13)
gyp ERR! stack     at maybeClose (internal/child_process.js:962:16)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:251:5)
gyp ERR! System Windows_NT 10.0.16299
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\north\\git\\lofi\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild" "--target=4.0.1" "--arch=x64" "--dist-url=https://atom.io/download/electron"
gyp ERR! cwd C:\Users\north\git\lofi
gyp ERR! node -v v10.15.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command

This is because the install doesn't support python3.

I've tried looking around where the issue is so I can fix it, but it looks like it's an issue with node-gyp? Is there a workaround for this?

1.5.0 Update

@dvx First of all i wish to thank for your work. Last update have really great functional.

Im notice that "hide mini player then Spotify closed" not always work.

And in addition to this all functinal wish to dont show mini player in taskbar. Maybe you can implement in the future update please! Im alredy see this request before.

Thank you! Im enjoy LoFi, great work man! Spotify Mini Player of my dream :)

MacOS Player Position resets when screen locked

I use two monitors with my MacOS. I have the player in a specific place on the second monitor and when I lock my screen and unlock it the player shoots to the main monitor and i have to drag it back into place each time.

Lofi crashes when switching to particular albums.

Steps to reproduce:

  1. Start playing the first track of this album https://open.spotify.com/album/6Jqu2NBFCrT1lsR6YTWhZw?si=P17yk9frQBmQhaQ6-GIEkg
  2. Open Lofi
  3. Double click the first track again, once the album art displays.

What do I expect to happen?

  • Lofi to stay right where it is.

What actually happens?

  • The lofi window vanishes. It remains in the task manager, and in the task bar, and must be manually closed.

Not every album/song does this.

A zip file containing a video reproduction.

"Hide Lofi window if Spotify is not detected" doesn't work at all

Switched to Spotify a few days ago and got Lofi with it. Lofi seems to work just fine for me aside from this one issue. The Lofi window will stay on screen at all times, even if Spotify is closed. I don't see any other posts about this issue, so I'm not sure if it's an actual bug with Lofi, or if something on my PC is causing the window detection to mess up, but either way I'd like some help fixing it.

Some misc info if it matters:

  • OS is Windows 10 Pro 64bit
  • I'm using a normal Spotify installation, not the Windows 10 store app
  • I have all other settings enabled as well, except for debug mode

Lofi constantly loses connection

Lofi loses seemingly randomly loses connection and I have to press the "Login" button again to reconnect. Unfortunately can't find a way to reproduce it reliably, it happens at different intervals.
macOS 10.14.3

"Actually random" random toggle

This has been asked for a while now, but here's a good rundown of a "random play" feature:

(from https://news.ycombinator.com/item?id=20346406, by @patmcc)

  1. I want it to play in a truly random fashion, with replacement (same song twice in a row is possible).

  2. I want it to play in a truly random fashion, without replacement (each song is removed from the list once played).

  3. I want it to "seem" random (don't play too many songs by the same artist in a row).

  4. I want it to be random, but predictable (same "random" ordering if I start the playlist again).

  5. I want it to play my favourite songs more often than my lower-rated songs.

  6. I want it to play my less-commonly played songs more often than the stuff I listen to all the time.

Consider a drop-down (or pop-up) where you could choose one of the above.

Controls dont work after some time idle

After a while when it played music, or when its paused, the controls dont work anymore. You can click whatever you want but not works.

When you go back to the main spotify player and press play again, the widget reacts again for a while.

Resizing

It would be nice if you could resize the window, as a size of 150pxยฒ might be fine on 1080p (or even 1440p like in my case) but I'm not sure how it would look on a 2160p screen.

[Suggestion] Volume increment setting

One feature I really like about this mini player is that while you're hovering over it, you can use the mouse wheel to adjust the volume. However, scrolling raises/lowers the volume by 10 which I feel is a bit too much.
Suggestion: Add a setting that lets users customize how much the volume gets raised/lowered every time you scroll. Example: My volume is currently at 30, and my volume increment setting is 2, so if I scroll up while hovering over the mini player, my volume increases to 32.
I'm not a coder, so I don't know how difficult and/or time-consuming it would be to add this in, but hopefully this would be a simple addition, I would really like to see this added.

Media metadata taller than player

Metadata fly-out can be taller than the player itself (see attached screenshot). Fix by adding either ellipses or dynamically scaling text.

image

Like/Favourite songs through Lofi

User story

When I am shuffling through random tracks while working, I love how Lofi's minimal UI helps me from being distracted. However, when it comes to saving a track to my library I have no option but to open up the main application, which causes minor distraction. It would be nice to have a save button in there as well.

GUI suggestion

  • Add a save button center aligned below the three main buttons (prev, play/pause, next)
    Lofi-HeartConcept-UI

Note
This will also require Lofi to update Authorization Scopes to the following

user-library-read%20user-library-modify%20user-read-playback-state%20user-modify-playback-state%20user-read-currently-playing

Mainly these two..

  • user-library-read : To check if the current song already exists in user's library.
  • user-library-modify : To add/remove song from user's library.

Player getting stuck behind windows

Occasionally, the Lofi player gets "stuck" behind certain windows (when, for example, we switch desktops). Investigate and fix this. Some key questions:

  • Does this also happen on OSX?
  • Can this be solved without a native solution?

Window becomes invisible when playing local files

(Running Windows 10)

When a local file gets played, the window disappears and lofi requires a restart to function again even after switching to a song belonging to Spotify. The icon remains on the taskbar and the process is still "responding" according to Windows.

Big black box around miniplayer

There is a big black box around the miniplayer that takes up a lot of space. You can't drag it and you can click things through it.
image

Hotkeys

I would be nice to add some hotkey abilities. I use this while I'm streaming and would love to tie it into the Elgato stream deck via hotkeys.

Freezes my PC when trying to run without Spotify open

I have a Win10 v1709 PC with Spotify 1.0.80.474 installed (BlockTheSpot installed, too). It's a Dell Inspiron 7577 with an Intel Core i7-7700HQ and a Nvidia GTX-1060 MaxQ. Plenty of RAM, HDD, etc. I installed Lofi and it promptly froze my PC. I hard reset, then upon restart, with nothing running in the background, tried again. It froze again, requiring another hard reset. Only then did I read the readme, and realise it only works with Spotify open.

Uninstalled, as it did not work, and froze my PC :'(

Audio Visualizations Downloads a Different Titled Device

The provided link to the audio device to download here is the link downloads and is called eqMac2 in Audio MIDI Setup and does not work with Lofi. Also in the FAQs it says "Check out the know bugs or file a new issue." and I think it should say "Check out the known bugs or file a new issue." (change know to known)

Slightly grey-out / blur the mini-player when paused?

Use-case:
headphones with touch control lying on a desk. I know I have to leave the desk for a significant amount of time. I use touch control (not working everytime), get visual on-screen confirmation that the music stopped. Happy to leave :)

Website: Drop the "www"

Imo it would look way better if the domain for the website would be just lofi.rocks instead of www.lofi.rocks. Looks more snappy ๐Ÿ˜‰

Log in to a Different account?

I use two accounts for two different types of listening, one for out and about, and one for home, both of which need to be kept separate. Can I log out of one account and into another?

Dragging the window freezes the GUI

In Windows 10:
The app starts in the center of the screen. The GUI works as expected until the window is dragged to a new position. The GUI then freezes in the "mouse hover" state (play controls showing as well as the song info tooltip to the right of the main window).
All the controls are working but the GUI is not updated at all.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.