hypermodules / hyperamp Goto Github PK
View Code? Open in Web Editor NEW๐ Humble music player
Home Page: https://twitter.com/hyperampapp
License: GNU General Public License v3.0
๐ Humble music player
Home Page: https://twitter.com/hyperampapp
License: GNU General Public License v3.0
The user should be able to control playback via keyboard shortcuts.
Basic defaults:
These can be attached to menu items so that we can use the menu/keyboard shortcut mapping methods provided by electron.
Here are some things that might be useful
We should start thinking about how we want to persist the library to disk so that its ready when you launch.
Here are some points I wanted to hit:
This is obviously a ton of work, but thinking about it should help us understand what we need to develop from the perspective of the UI at least.
Before we implement a media library, we should implement playlist. A playlist is an array of objects that represent playable tracks, that we can render a table that represents the playlist.
Lets start with one playlist for now, and build out from there:
Everything else you would expect from a playlist we can add after we get these items done.
Been eyeing https://github.com/rtsao/csjs and it seems like it would be a better fit for our use case. No required transpiration step! Real template string variables! Looks nice and mature! No unnecessary build steps.
Anyway, sheetify has already shown to have some hairy yacks involved that have taken a lot of my time, so I'm thinking I'll swap the required dependency and move forward with csjs if some initial experiments work out.
After thinking about all the things we are trying to accomplish in this project, and realizing I haven't even ever tried to build a music library/player before, we should probably work on some simpler goals before we reach too high.
Here is what I propose:
Hyperamp will lay the groundwork for a music library app, let us mess around with music metadata and file indexing, familiarize us with choo better, and get us set up to build and distribute a desktop application.
Hypertorrent will be a nice complementary project to things like the dat and webtorrent desktop. I imagine this as a traditional utorrent/transmission style torrent client. In addition to handing torrents via webtorrent as a way to get the application off the ground and back up a user interface, this should also allow for a traditional torrent client style experience with hyperdrive. The important thing here is that we establish how to work with hyperdrive effectively, and experiment with some of its advanced features like signed feeds, self signed feeds, extracting unsigned feeds from signed feeds, feed updates, and feed history.
Once we get these done, we should be pretty well set to start combining the two, and experimenting with synced libraries via hyperdrive.
What do you think @ungoldman ?
There is a super stupid content addressable image cache that was just merged. Probably pull this out into a module, but the goal is to avoid large arrays of image data in state, and instead use hash pointers.
Might be addressed by #118 but maybe not.
Right now next and prev are couple to the play action. What happens when the player is paused and you click next? We need to decouple the play/pause action from some queuing.
we gotta persist it
We now have CI packaging infra set up, next up is:
https://github.com/electron-userland/electron-builder/wiki/Auto-Update
Refer to that page when completing this issue.
Layout in isolation with shadow dom?
Use something like https://www.npmjs.com/package/sheetify ?
I'm going to try to port over button group styles today.
While we focus on Winamp 2.0 features, like an interface, playback, playlists and stuff, maybe it would be more informative to call this hypoamp instead of hyper amp.
We do this stuff manually now. Would be nice to clean it up with:
@ungoldman if you did css for hyperamp all on your own, how would you do the CSS? We kinda talked about this in person. Would it be worth while to change how we do things once again, if it represents your ideals? I'd be open to whatever you want to do here.
Before we can work on syncing library metadata between devices, we need to figure out what the library will look like.
Here is one idea I had:
Your typical bittorrent app smooshed together with iTunes 6. The UI is similar to iTunes, but instead of managing collections of loose music files and cross your fingers, the library manages hyperdrive feed files that represent a collection of related media files and metadata.
A hyperamp library consists of a collection/directory of hyperdrive 'feeds'/archives, probably taking the form of a SLEEP file (these are similar to a .torrent file, however some will be signed feeds which are mutable.
Each feed file will typically represent some kind of media collection, like an album release, EP or single. The feed file contains the cryptographic blueprint for the binary blobs/files and directory/file structure that the feed represents. Like any other archive format (like zip/tar/torrents), you can't guarantee the folder structure inside the feed will be exactly what you want.
A separate folder will hold the binary blobs described in the feeds from the feed library. Some kind of managed folder structure (similar to how iTunes can reorganize its music folder) will likely be needed to keep this storage folder in order. This folder should be routinely scanned for organization and garbage collection.
Since SLEEP files and hyperdrive is an emerging spec, we will need to implement a reliable importing from loose files. Here are the strategies I have in mind:
Using https://github.com/sindresorhus/electron-config, lets try to persist preferences to disk.
Quick thought here: no other electron app uses the OS X style, and instead diverges into something kind of endogenous between all the OSs.
For now, I'm going to try to stick to the photon UI style, but I'm thinking of ways to maybe make things easier in the long run.
As work progresses to re-implement some of the UI elements to meet our needs (e.g. https://github.com/hypermodules/flex-table) maybe we should start considering something less specific to OS X. It might make CSS easier, and buy is a look that works on Linux and Windows.
Examples:
Tha table implementation is an interesting example in BTSync
We need to implement a now playing info panel that shows the currently playing song, scrubber and time etc.
Hyperamp needs an app icon!
Here's an example of how to set it up:
Right now artwork only shows on queue. We should trigger this when the app initializes too.
Out with the old, in with the new. Why use kebab case for css class names just because people in the aughts did it that way. Lets just use camel case property names to keep selector syntax simple.
Damn, this is going to cost about $200 :(
The user should be able to skip to both the next and previous song in the current list (or search context).
for some reason, Choo's router isn't routing. I think it has to do with the fact we are serving from a file. I'll experiment.
We need to do sticky table headers, so you can adjust the sort column and direction when you are at any scroll position.
Ideally, we could just use something like Sticky Positioning, but it doesn't work on thead
elements, and it doesn't work in chrome webkit! ๐ญ
There are a bunch of hacks that you can do to get it to sort of work with the table elements, but they are all pretty gross and don't perform great.
The third options I was thinking of is dropping the table
component all together and using flex'd div's with overflow: auto
set on the table row container. We are going to have to port over/redo table styles, but will ultimately set us to up to do fun/complicated table rows without having to fight the limitations of the archaic table element. e.g.
I just introduced a bug where the audio process tried to pass a message to the player process via main. When player is closes, we get those crappy main process error windows that screw things up real bad.
Easy fix, but I have to go to bed now. Basically, check if the window is open or not though before sending messages.
http://hypermodul.es/hyperamp > http://hypermodul.es?
this is a cool project!!!
I've fooled around with musicmedata and fs-walk a bit but don't have anything concrete yet. @bcomnes let me know if you want to take a crack at this.
Do this https://github.com/yoshuawuyts/tiny-guide-to-non-fancy-node
So, drop ES6: things like const, restructuring and arrow functions for the most part. Too many foot guns and we have the knowledge to not use them. This is a bit of a yak shave but it is labor I would be interested in doing.
@ungoldman thoughts?
like com.hyperamp.config.json
so we don't collide with other random electron configs when developing
https://github.com/electron/electron/blob/master/docs/tutorial/testing-on-headless-ci.md
Lets turn on the app, then turn it off and make sure it exits with a 0.
I think we should work on moving the audio component to a worker process like we discussed a while back. Webtorrent Desktop did this fairly well (even had a keyboard shortcut for exposing the hidden renderer process for debugging I think).
The implementation has grown a somewhat unnecessarily complex (see main/windows/webtorrent.js and renderer/webtorrent.js) and they decided to port the entire project to React for some reason (๐ข) but I think we can draw a lot from the basic parts of the method used there.
Whenever you change the volume, you end up re-rendering everything over and over. This is super wasteful and starts to creak under load.
Components affected by this:
Worse case scenario is that we have to manage large data sets outside of state and use pointers in state. But lets experiment with that first.
We should implement a proper state machine API on the audio process. Eventually we can swap it out with a real audio library, but for now the hidden window thing works, and we experiment with an API.
A few requirements:
It would be cool if we could plan out a state machine design, but if thats too much of a distraction, do whatever.
We need a place to set preferences. Should we make a new browser window? or use something like chop's app.router to make a single window app (like slack or whatever).
Basically, package up http://www.entypo.com as a module with its own prepublish build script. Some labor involved, but everything is laid out, and the npm name is available.
The module should ship the raw svgs, and a sprite sheet with an en-
prefix or something. Model it off https://github.com/Kriesse/dat-icons. I think I love this pattern.
This was another sheet-router bug I was running into. Basically, refreshing the app should work everywhere, but after you navigate around, you lose the base url so subsequent refreshes fail. The gif shows 1 working refresh (initial state) and one failed refresh at the end. I need to open an issue upstream. Going to ๐ goodnight ๐
The user should be able to seek through a song as it's playing.
Once we have real paths to music files (#11) we need to actually play some music.
See discussion 08dfa82
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.