Giter VIP home page Giter VIP logo

soundklaus.el's Introduction

soundklaus.el

https://travis-ci.org/r0man/soundklaus.el.svg https://melpa.org/packages/soundklaus-badge.svg

Play music on SoundCloud with Emacs via EMMS.

http://imgs.xkcd.com/comics/techno.png

Prerequisites

This mode requires Emacs 24, curl to stream tracks, mp3info to tag them, and a music player that is supported by EMMS. Music Player Daemon, MPlayer and VLC Media Player are known to work with soundklaus.el.

Installation

soundklaus.el is available on MELPA. Instructions on how to configure MELPA can be found here. After configuring MELPA you can install soundklaus.el with the following command:

M-x package-install [RET] soundklaus [RET]

If you are using use-package to manage your Emacs packages, you can install and autoload soundklaus.el with the following code:

(use-package soundklaus
  :ensure t
  :commands
  (soundklaus-activities
   soundklaus-connect
   soundklaus-my-favorites
   soundklaus-my-playlists
   soundklaus-my-tracks
   soundklaus-playlists
   soundklaus-tracks))

Configuration

This mode requires a working EMMS setup for Emacs. The following code from the EMMS Quick-Start Guide should get you started.

(require 'emms-setup)
(emms-standard)
(emms-default-players)

Usage

You can search songs with M-x soundklaus-tracks and playlists with M-x soundklaus-playlists. Your own tracks and playlists are available with M-x soundklaus-my-tracks and M-x soundklaus-my-playlists. You can list your favorite tracks with soundklaus-my-favorites. In the *soundklaus* buffer you can move to the next song with C-n or n, and to the previous one with C-p or p. Pressing RET plays the current song, and a adds the current song at point to the EMMS playlist. All other available key bindings can be seen with M-x describe-minor-mode [RET] soundklaus-mode.

Authentication

Some commands like M-x soundklaus-activities or M-x soundklaus-my-tracks need access to your SoundCloud account. Your web browser should open Emacs via emacsclient for the OAuth2 callback URL soundklaus://oauth/callback.

On a Linux system you can configure this by running M-x soundklaus-desktop-entry-save. This will write the following content to the ~/.local/share/applications/soundklaus.desktop file in your home directory.

[Desktop Entry]
Name=SoundKlaus
Exec=emacsclient %u
Icon=emacs-icon
Type=Application
Terminal=false
MimeType=x-scheme-handler/soundklaus;

Next, make sure your Emacs runs as a server. You can do this by adding this to your Emacs configuration.

(unless (server-running-p)
  (add-hook 'after-init-hook 'server-start t)))

Now you can start the OAuth2 authentication dance with M-x soundklaus-connect. You should get redirected to SoundCloud and allow soundklaus.el to access your account. After pressing the Connect button on the SoundCloud page, the browser should open Emacs and set the soundklaus-access-token customization variable.

To setup this functionality on other operating systems take a look at the system setup section in org-protocol.el and adapt it for soundklaus.el.

Screenshot

https://raw.githubusercontent.com/r0man/soundklaus.el/master/screenshot.jpg

License

Copyright © 2014-2019 r0man

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, or (at your option) any later version.

soundklaus.el's People

Contributors

r0man avatar unhammer avatar cestdiego avatar syohex avatar

Watchers

Ben Simms avatar

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.