| 1 | This is emms.info, produced by makeinfo version 7.2 from emms.texinfo. |
| 2 | |
| 3 | © 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2014, 2015, 2016, |
| 4 | 2020, 2021, 2022, 2023, 2024, 2025 Free Software Foundation, Inc. |
| 5 | Permission is granted to copy, distribute and/or modify this |
| 6 | document under the terms of the GNU Free Documentation License, |
| 7 | Version 1.1 or any later version published by the Free Software |
| 8 | Foundation; with no Invariant Sections, no Front-Cover Texts, and |
| 9 | no Back-Cover Texts. A copy of the license is included in the |
| 10 | section entitled "GNU Free Documentation License". |
| 11 | INFO-DIR-SECTION Emacs |
| 12 | START-INFO-DIR-ENTRY |
| 13 | * Emms: (emms). The Emacs Multimedia System |
| 14 | END-INFO-DIR-ENTRY |
| 15 | |
| 16 | |
| 17 | File: emms.info, Node: Top, Next: Introduction, Prev: (dir), Up: (dir) |
| 18 | |
| 19 | Emms Manual |
| 20 | *********** |
| 21 | |
| 22 | This is the Manual for the Emacs Multimedia System. |
| 23 | |
| 24 | © 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2014, 2015, 2016, |
| 25 | 2020, 2021, 2022, 2023, 2024, 2025 Free Software Foundation, Inc. |
| 26 | Permission is granted to copy, distribute and/or modify this |
| 27 | document under the terms of the GNU Free Documentation License, |
| 28 | Version 1.1 or any later version published by the Free Software |
| 29 | Foundation; with no Invariant Sections, no Front-Cover Texts, and |
| 30 | no Back-Cover Texts. A copy of the license is included in the |
| 31 | section entitled "GNU Free Documentation License". |
| 32 | |
| 33 | * Menu: |
| 34 | |
| 35 | Starting out |
| 36 | * Introduction:: Introduction to Emms. |
| 37 | * Quickstart Guide:: First steps with Emms for new users. |
| 38 | * Installation:: How to install Emms on your System. |
| 39 | * Setup:: How to setup Emms. |
| 40 | * Configuration:: More detailed setup and configuration. |
| 41 | * Getting Help:: Where to get help with Emms and make suggestions. |
| 42 | * Formats and Freedom:: File formats without restrictions. |
| 43 | |
| 44 | Emms basics |
| 45 | * Basic Commands:: How to control Emms with ease. |
| 46 | * The Core File:: The inner core of Emms. |
| 47 | * Sources:: Sources for playlists-creation. |
| 48 | * Simple Players:: Some simple players. |
| 49 | * Playlists:: How Emms organizes media. |
| 50 | |
| 51 | Advanced Features |
| 52 | * Track Information:: More narrative track descriptions. |
| 53 | * Interactive Playlists:: Interactive Playlists. |
| 54 | * Markable Playlists:: Allow tracks to be marked. |
| 55 | * Extending Emms:: How to define new players and modules. |
| 56 | |
| 57 | Modules and Extensions |
| 58 | * The Browser:: Advanced metadata browsing. |
| 59 | * The Filter System:: Advanced metadata filtering. |
| 60 | * Sorting Playlists:: Sorting the order of the tracks. |
| 61 | * Persistent Playlists:: Restoring playlists on emacs startup. |
| 62 | * Editing Tracks:: Editing track information from within Emms. |
| 63 | * Emms Mode Line:: Emms information on the mode line. |
| 64 | * Limiting:: Derive a new playlist from the current. |
| 65 | * Music Player Daemon:: Interface to Music Player Daemon. |
| 66 | * Lyrics:: Displaying lyrics synchronously. |
| 67 | * Volume:: Changing the volume. |
| 68 | * Streaming Audio:: Interface to streaming audio. |
| 69 | * Radio Browser:: Search for internet radio stations |
| 70 | * APE / FLAC Commands:: How to play next or previous track in these files. |
| 71 | * Bookmarks:: Saving a place in a media file. |
| 72 | * Managing Playlists:: Managing multiple playlists. |
| 73 | * GNU FM:: Connect to music community websites. |
| 74 | * Listenbrainz:: Notify listenbrainz of tracks played. |
| 75 | * D-Bus:: Control Emms over D-Bus. |
| 76 | |
| 77 | Copying and license |
| 78 | * Copying:: The GNU General Public License gives you permission to |
| 79 | redistribute Emms on certain terms; it also explains |
| 80 | that there is no warranty. |
| 81 | * The GNU FDL:: The license for this documentation. |
| 82 | |
| 83 | Indices |
| 84 | * Concept Index:: |
| 85 | * Function Index:: |
| 86 | * Variable Index:: |
| 87 | * Keybinding Index:: |
| 88 | |
| 89 | -- The Detailed Node Listing -- |
| 90 | |
| 91 | Here are some other nodes which are really inferiors of the ones |
| 92 | already listed, mentioned here so you can get to them in one step: |
| 93 | |
| 94 | Installation |
| 95 | * Compiling Emms:: Compiling Emms into Byte-Code. |
| 96 | |
| 97 | The Core File |
| 98 | * User Variables:: Variables for the user to tweak. |
| 99 | * Hooks:: Hooks for important Emms functions. |
| 100 | * Core Functions:: Providing the basic functionality of Emms. |
| 101 | |
| 102 | Track Information |
| 103 | * Metadata Utilities:: Supported external metadata utilities. |
| 104 | * Defining Info Methods:: Defining new info methods. |
| 105 | |
| 106 | Extending Emms |
| 107 | * New Player:: How to define a new player. |
| 108 | * Simple Player for `play':: Example player using ‘play’. |
| 109 | * More Complex Player:: Example of a complex player using ‘mpg321’. |
| 110 | |
| 111 | |
| 112 | File: emms.info, Node: Introduction, Next: Quickstart Guide, Up: Top |
| 113 | |
| 114 | 1 Introduction |
| 115 | ************** |
| 116 | |
| 117 | Emms is the Emacs Multi-Media System. Emms organizes playlists, allows |
| 118 | browsing through track and album metadata, and plays files by calling |
| 119 | external players. |
| 120 | |
| 121 | This manual tries to be the definitive source of information about |
| 122 | Emms, an online version of the manual is available at: |
| 123 | <http://www.gnu.org/software/emms/manual/>. |
| 124 | |
| 125 | The basic functionality of Emms consists of three parts: The core, |
| 126 | the sources, and the players. |
| 127 | |
| 128 | The core resides in ‘emms.el’, provides a simple playlist, and the |
| 129 | basic functionality to use all the other features of Emms. It provides |
| 130 | the common user commands and interfaces for other parts. It thinks in |
| 131 | tracks, where a track is the combination of a type and a name - e.g. |
| 132 | the track type 'file has a name that is the file name. Other track |
| 133 | types are possible. |
| 134 | |
| 135 | To get to tracks, the core needs sources. The file |
| 136 | ‘emms-source-file.el’ provides simple sources to interact with the file |
| 137 | system. |
| 138 | |
| 139 | When Emms finally has the sources in the playlist, it needs a player |
| 140 | to play them. ‘emms-player-simple.el’ defines a few useful players and |
| 141 | provides a straightforward way of providing your own. |
| 142 | |
| 143 | The Emms comes with many additional features to extend the |
| 144 | functionality beyond the core. |
| 145 | |
| 146 | The way Emms works is easy to customize with your own code or by |
| 147 | using 'M-x customize' or by changing the variables directly. |
| 148 | |
| 149 | |
| 150 | File: emms.info, Node: Quickstart Guide, Next: Installation, Prev: Introduction, Up: Top |
| 151 | |
| 152 | 2 Quickstart Guide |
| 153 | ****************** |
| 154 | |
| 155 | This chapter demonstrates how to setup Emms so that you can start |
| 156 | listening to your music without having to read all of the documentation |
| 157 | first. This is the tl;dr version of the manual. |
| 158 | |
| 159 | The first thing to do is to load Emms via GNU ELPA. Invoke ‘M-x |
| 160 | list-packages’ and choose to install Emms. |
| 161 | |
| 162 | If you are installing Emms manually, then start by telling Emacs |
| 163 | where your copy of Emms is located. Let's say you have it in |
| 164 | ‘~/elisp/emms/’. So add this line to your ‘.emacs’: |
| 165 | |
| 166 | (add-to-list 'load-path "~/elisp/emms/lisp/") |
| 167 | (require 'emms-setup) |
| 168 | |
| 169 | (More detailed information about installing Emms can be found in the |
| 170 | installation chapter, *Note Installation::.) |
| 171 | |
| 172 | Either way, you are now ready to configure Emms. Your Emms config |
| 173 | can be as simple as three lines. For example: |
| 174 | |
| 175 | (emms-all) |
| 176 | (setq emms-player-list '(emms-player-vlc) |
| 177 | emms-info-functions '(emms-info-native)) |
| 178 | |
| 179 | The function ‘emms-all’ loads all of the stable features in Emms. |
| 180 | |
| 181 | Emms can automatically generate that 'setq' statement for you based |
| 182 | on which players and metadata readers you have installed on your system. |
| 183 | Just invoke ‘emms-setup-discover’ and answer a few questions. |
| 184 | |
| 185 | The variable EMMS-PLAYER-LIST is a list of players that Emms should |
| 186 | call to play your media. In this example we assume that you have VLC |
| 187 | installed on your system. But if you use mpv or mplayer instead, just |
| 188 | change ‘emms-player-vlc’ to ‘emms-player-mpv’ or ‘emms-player-mplayer’; |
| 189 | you get the idea. |
| 190 | |
| 191 | The variable EMMS-INFO-FUNCTIONS is a list of ways for Emms to read |
| 192 | the metadata in your media files, so that Emms can display the song |
| 193 | title, artist name, etc. ‘emms-info-native’ is a metadata reader |
| 194 | written entirely in Emacs Lisp, but there are also other backends which |
| 195 | call external programs such as TinyTag, Taglib, Exiftool, and etc. |
| 196 | |
| 197 | Reload your Emacs initialization file, or restart Emacs to let the |
| 198 | changes have an effect. |
| 199 | |
| 200 | Add all your music to a playlist by invoking ‘M-x |
| 201 | emms-add-directory-tree RET ~/my_music_directory/ RET’. When you do |
| 202 | this Emms will start reading metadata from the files and populating the |
| 203 | cache. This may take a while. |
| 204 | |
| 205 | When you are done, you can load the browser with ‘M-x emms-browser’, |
| 206 | or view your playlist directly with ‘M-x emms-playlist-mode-go’ (when in |
| 207 | the playlist you can hit ‘RET’ on a track to start playing it.) |
| 208 | |
| 209 | Now you can start exploring Emms. It's probably best to begin with |
| 210 | the basic commands (*note Basic Commands::), the interactive playlists |
| 211 | (*note Interactive Playlists::), and the browser (*note The Browser::). |
| 212 | |
| 213 | More detail about setting up Emms can be found in the setup chapter, |
| 214 | *Note Setup::. |
| 215 | |
| 216 | Need help? There are knowledgeable people on the #emacs channel on |
| 217 | irc (irc.libera.chat), and Emms has a mailing list at emms-help@gnu.org. |
| 218 | |
| 219 | |
| 220 | File: emms.info, Node: Installation, Next: Setup, Prev: Quickstart Guide, Up: Top |
| 221 | |
| 222 | 3 Installation |
| 223 | ************** |
| 224 | |
| 225 | Emms is available via GNU ELPA, which takes care of all of the following |
| 226 | steps automatically. |
| 227 | |
| 228 | If you are installing Emms manually, you need to put all the .el |
| 229 | files of emms in a directory in your load-path. For example, if you put |
| 230 | all those files into ~/elisp/emms/, then in your ~/.emacs, you should |
| 231 | add: |
| 232 | |
| 233 | (add-to-list 'load-path "~/elisp/emms/lisp/") |
| 234 | |
| 235 | * Menu: |
| 236 | |
| 237 | * Compiling Emms:: Compiling Emms into Byte-Code. |
| 238 | |
| 239 | |
| 240 | File: emms.info, Node: Compiling Emms, Up: Installation |
| 241 | |
| 242 | 3.1 Compiling Emms |
| 243 | ================== |
| 244 | |
| 245 | If you are using XEmacs, you will need to edit ‘Makefile’ as follows |
| 246 | before continuing. |
| 247 | |
| 248 | EMACS=xemacs |
| 249 | SITEFLAG=-no-site-file |
| 250 | |
| 251 | You can byte-compile Emms by first entering the directory containing |
| 252 | the Emms source code, followed by invoking: |
| 253 | |
| 254 | ‘make’ |
| 255 | |
| 256 | Which will byte compile Emms. You can then invoke: |
| 257 | |
| 258 | ‘make install’ |
| 259 | |
| 260 | Which will install Emms into your Emacs directories (provided you |
| 261 | have the appropriate permissions to do so on your system). |
| 262 | |
| 263 | Note that Emms is a light-weight and agile program, you can therefore |
| 264 | run Emms just fine without byte compiling it. |
| 265 | |
| 266 | |
| 267 | File: emms.info, Node: Setup, Next: Configuration, Prev: Installation, Up: Top |
| 268 | |
| 269 | 4 Setup |
| 270 | ******* |
| 271 | |
| 272 | The 'emms-setup' feature is provided by the file ‘emms-setup.el’. It is |
| 273 | essentially a collection of shortcuts for loading different Emms |
| 274 | features quickly, but everything you can do with 'emms-setup' can also |
| 275 | be done manually. |
| 276 | |
| 277 | We use 'emms-setup' by calling one of the setup functions. |
| 278 | |
| 279 | -- Function: emms-minimalistic |
| 280 | An Emms setup script. Playlists and all the basics for playing |
| 281 | media, but nothing else. |
| 282 | |
| 283 | -- Function: emms-all |
| 284 | An Emms setup script. Loads all the stable features which come |
| 285 | with the Emms distribution. |
| 286 | |
| 287 | 'emms-setup' also comes with a convenience function to set a default |
| 288 | list of media players. |
| 289 | |
| 290 | -- Function: emms-default-players |
| 291 | Set EMMS-PLAYER-LIST to EMMS-SETUP-DEFAULT-PLAYER-LIST. |
| 292 | |
| 293 | You can of course write your own Emms setup functions like the above |
| 294 | by looking at the existing function definitions in ‘emms-setup.el’. |
| 295 | |
| 296 | |
| 297 | File: emms.info, Node: Configuration, Next: Getting Help, Prev: Setup, Up: Top |
| 298 | |
| 299 | 5 Configuration |
| 300 | *************** |
| 301 | |
| 302 | This chapter discusses the configuration of Emms in more detail. |
| 303 | |
| 304 | The following code fragment provides a minimal Emms setup without |
| 305 | using the layer of 'emms-setup'. It can maybe be used to better |
| 306 | understand the internals of Emms. You can see how Emms needs to know |
| 307 | about players (these are defined in 'emms-player-simple') and about |
| 308 | sources for tracks (trivial file system based sources, such as this |
| 309 | 'emms-directory-tree', are defined in 'emms-source-file'). |
| 310 | |
| 311 | (require 'emms-player-simple) |
| 312 | (require 'emms-source-file) |
| 313 | (require 'emms-source-playlist) |
| 314 | (setq emms-player-list '(emms-player-mpg321 |
| 315 | emms-player-ogg123 |
| 316 | emms-player-mplayer)) |
| 317 | |
| 318 | For a discussion on how to define additional players, see *Note |
| 319 | Simple Players::. |
| 320 | |
| 321 | Much of the behaviour of Emms can be changed by setting variables. |
| 322 | For example: |
| 323 | |
| 324 | (setq emms-info-asynchronously nil) |
| 325 | (setq emms-playlist-buffer-name "*Music*") |
| 326 | |
| 327 | The first ‘setq’ turns off the asynchronous updating of info tags. |
| 328 | The second sets the default name of the Emms playlist buffer. |
| 329 | |
| 330 | Another way to change Emms variables is to use the M-x ‘customize’ |
| 331 | mechanism provided by Emacs. |
| 332 | |
| 333 | * Menu: |
| 334 | |
| 335 | * Finding files and speed:: Finding files quickly or portably. |
| 336 | * Setup Examples:: Examples of ways to setup Emms. |
| 337 | |
| 338 | |
| 339 | File: emms.info, Node: Finding files and speed, Next: Setup Examples, Up: Configuration |
| 340 | |
| 341 | 5.1 Finding files and speed |
| 342 | =========================== |
| 343 | |
| 344 | Emms needs to traverse directories in order to find playable media. The |
| 345 | default method Emms uses to achive this is |
| 346 | ‘emms-source-file-directory-tree-internal’ as defined in |
| 347 | ‘emms-source-file.el’. The above method is written portably and will |
| 348 | always work, but might be too slow if we want to load several hundred |
| 349 | tracks (or more). |
| 350 | |
| 351 | ‘emms-source-file.el’ defines another method for finding files, |
| 352 | ‘emms-source-file-directory-tree-find’ which uses GNU/find. |
| 353 | ‘emms-source-file-directory-tree-find’ is usually an order of magnitude |
| 354 | faster, but of course will not work if you do not have GNU/find |
| 355 | installed. |
| 356 | |
| 357 | The method Emms will use is defined in the customisable variable |
| 358 | EMMS-SOURCE-FILE-DIRECTORY-TREE-FUNCTION. |
| 359 | |
| 360 | |
| 361 | File: emms.info, Node: Setup Examples, Prev: Finding files and speed, Up: Configuration |
| 362 | |
| 363 | 5.2 Setup Examples |
| 364 | ================== |
| 365 | |
| 366 | What follow are samples from real-world Emms configurations which show |
| 367 | some of the variety and breadth of modifications people make to the |
| 368 | default Emms setup. |
| 369 | |
| 370 | The following excerpt includes dbus integration, defining a "recent" |
| 371 | filter for the *Note The Browser::, persistent playlist via |
| 372 | ‘emms-history.el’, and enabling sending track information with |
| 373 | ‘emms-librefm-stream.el’: |
| 374 | |
| 375 | ;; notifications |
| 376 | (require 'emms-dbus) |
| 377 | (emms-dbus-enable) |
| 378 | ;; covers |
| 379 | (setq emms-browser-covers #'emms-browser-cache-thumbnail-async) |
| 380 | (setq emms-browser-thumbnail-small-size 64) |
| 381 | (setq emms-browser-thumbnail-medium-size 128) |
| 382 | ;; filters |
| 383 | (emms-browser-make-filter "all" #'ignore) |
| 384 | (emms-browser-make-filter "recent" |
| 385 | (lambda (track) (< 30 |
| 386 | (time-to-number-of-days |
| 387 | (time-subtract (current-time) |
| 388 | (emms-info-track-file-mtime track)))))) |
| 389 | (emms-browser-set-filter (assoc "all" emms-browser-filters)) |
| 390 | ;; history |
| 391 | (emms-history-load) |
| 392 | ;; libre-fm |
| 393 | (emms-librefm-scrobbler-enable) |
| 394 | |
| 395 | In the following it is possible to see how some of defaults are set |
| 396 | regarding saving playlists, playlist interaction, adding special |
| 397 | arguments to a specific player backend and configuring player-specific |
| 398 | volume control options enabled via ‘emms-volume.el’. |
| 399 | |
| 400 | (setq-default |
| 401 | emms-source-file-default-directory "/mnt/db/mediaCore/sound_music/" |
| 402 | |
| 403 | emms-source-playlist-default-format 'm3u |
| 404 | emms-playlist-mode-center-when-go t |
| 405 | emms-playlist-default-major-mode 'emms-playlist-mode |
| 406 | emms-show-format "NP: %s" |
| 407 | |
| 408 | emms-player-list '(emms-player-mpv) |
| 409 | emms-player-mpv-environment '("PULSE_PROP_media.role=music") |
| 410 | emms-player-mpv-parameters '("--quiet" "--really-quiet" "--no-audio-display" "--force-window=no" "--vo=null") |
| 411 | |
| 412 | emms-volume-change-function 'emms-volume-mpv-change |
| 413 | emms-volume-mpv-method 'smart) |
| 414 | |
| 415 | |
| 416 | File: emms.info, Node: Getting Help, Next: Formats and Freedom, Prev: Configuration, Up: Top |
| 417 | |
| 418 | 6 Getting Help |
| 419 | ************** |
| 420 | |
| 421 | If you have a bug to report, need help, or wish to suggest a feature, |
| 422 | please feel free to use the Emms mailing list. The address of the list |
| 423 | is emms-help@gnu.org. To subscribe to it, visit |
| 424 | <http://lists.gnu.org/mailman/listinfo/emms-help>. |
| 425 | |
| 426 | If you are familiar with the Gmane service, there is a Gmane |
| 427 | newsgroup which mirrors this mailing address at gmane.emacs.emms.user. |
| 428 | |
| 429 | Emms also has a website at <http://www.gnu.org/software/emms/>. |
| 430 | |
| 431 | |
| 432 | File: emms.info, Node: Formats and Freedom, Next: Basic Commands, Prev: Getting Help, Up: Top |
| 433 | |
| 434 | 7 Formats and Freedom |
| 435 | ********************* |
| 436 | |
| 437 | Emms is free software, but some of the file formats it can play carry |
| 438 | restrictions, they are proprietary file formats. Proprietary software |
| 439 | companies are pushing out audio and video formats which restrict when, |
| 440 | where and how you can play them, and restrict developers from writing |
| 441 | free software which interacts with them. |
| 442 | |
| 443 | Restrictive file formats put the corporate bottom-line before the |
| 444 | public interest. |
| 445 | |
| 446 | Fortunately there are alternatives like Ogg. Ogg is a professional |
| 447 | grade multimedia format. Ogg Vorbis is the compressed audio format |
| 448 | (like MP3), and Ogg Theora is the video format. For more information, |
| 449 | go to <http://www.xiph.org/>. |
| 450 | |
| 451 | If you want to transcode audio into a lossless format, you can try |
| 452 | FLAC (Free Lossless Audio Codec). FLAC stands out as the fastest and |
| 453 | most widely supported lossless audio codec, and the only one that at |
| 454 | once is non-proprietary, is unencumbered by patents and has the source |
| 455 | code for a reference implementation freely available. For more |
| 456 | information about FLAC, go to <http://flac.sourceforge.net/>. |
| 457 | |
| 458 | |
| 459 | File: emms.info, Node: Basic Commands, Next: The Core File, Prev: Formats and Freedom, Up: Top |
| 460 | |
| 461 | 8 Basic Commands |
| 462 | **************** |
| 463 | |
| 464 | Before you can use the interface commands, you need a playlist to start |
| 465 | with. The following commands allow you to add to the current playlist |
| 466 | from different sources: |
| 467 | |
| 468 | Note that the commands with the "emms-add-" prefix add the source to |
| 469 | the playlist but do not start playing it immediately. Conversely, the |
| 470 | commands with the "emms-play-" prefix begin playing the track |
| 471 | immediately. |
| 472 | |
| 473 | This creates the active playlist and queue as needed. The active |
| 474 | queue will automatically switch to any playlists that are browsed to |
| 475 | such that the next song played will come from the currently viewed |
| 476 | playlist. |
| 477 | |
| 478 | Locking the active playlist queue to its playlist will prevent it |
| 479 | from changing, allowing for browsing other playlists and sending songs |
| 480 | to the current active playlist from them. |
| 481 | |
| 482 | Locking the queue to its playlist allows for live creation of a |
| 483 | curated playlist by browsing other playlists as well as the music |
| 484 | database and files. |
| 485 | |
| 486 | -- Function: emms-play-file file |
| 487 | A source for a single file - either FILE, or queried from the user. |
| 488 | If called with a prefix the file will be added like |
| 489 | ‘emms-add-file’. |
| 490 | -- Function: emms-add-file file |
| 491 | A source for a single file - either FILE, or queried from the user. |
| 492 | If called with a prefix the file will be played like |
| 493 | ‘emms-play-file’. |
| 494 | -- Function: emms-play-directory dir |
| 495 | A source for a whole directory tree - either DIR, or queried from |
| 496 | the user. |
| 497 | -- Function: emms-add-directory dir |
| 498 | A source for a whole directory tree - either DIR, or queried from |
| 499 | the user. |
| 500 | -- Function: emms-play-directory-tree dir |
| 501 | A source for multiple directory trees - either DIR, or the value of |
| 502 | EMMS-SOURCE-FILE-DEFAULT-DIRECTORY. |
| 503 | -- Function: emms-add-directory-tree dir |
| 504 | A source for multiple directory trees - either DIR, or the value of |
| 505 | EMMS-SOURCE-FILE-DEFAULT-DIRECTORY. |
| 506 | -- Function: emms-play-url url |
| 507 | A source for an URL - for example, for streaming over http, playing |
| 508 | over sftp, or playing local files (with the "file://" scheme). |
| 509 | -- Function: emms-add-url url |
| 510 | A source for an URL - for example, for streaming over http, playing |
| 511 | over sftp, or playing local files (with the "file://" scheme). |
| 512 | -- Function: emms-play-playlist playlist |
| 513 | A source for the M3u or PLS playlist format from the file PLAYLIST. |
| 514 | -- Function: emms-add-playlist playlist |
| 515 | A source for the M3u or PLS playlist format from the file PLAYLIST. |
| 516 | -- Function: emms-play-find dir regexp |
| 517 | A source that will find files in DIR or |
| 518 | EMMS-SOURCE-FILE-DEFAULT-DIRECTORY which match REGEXP. |
| 519 | -- Function: emms-add-find dir regexp |
| 520 | A source that will find files in DIR or |
| 521 | EMMS-SOURCE-FILE-DEFAULT-DIRECTORY which match REGEXP. |
| 522 | |
| 523 | The basic functionality of Emms is just to play music without being |
| 524 | noticed. It provides a few commands to skip the current track and such, |
| 525 | but other than that it doesn't show up. Emms provides the following |
| 526 | basic user commands (which you might want to bind to keystrokes): |
| 527 | |
| 528 | -- Function: emms-start |
| 529 | Start playing the current playlist |
| 530 | -- Function: emms-stop |
| 531 | Stop playing |
| 532 | -- Function: emms-next |
| 533 | Start playing the next track in the playlist |
| 534 | -- Function: emms-previous |
| 535 | Start playing previous track in the playlist |
| 536 | -- Function: emms-shuffle |
| 537 | Shuffle the current playlist. This uses |
| 538 | EMMS-PLAYLIST-SHUFFLE-FUNCTION. |
| 539 | -- Function: emms-sort |
| 540 | Sort the current playlist. This uses EMMS-PLAYLIST-SORT-FUNCTION. |
| 541 | -- Function: emms-lock-queue |
| 542 | Lock the current active playlist queue to its playlist. |
| 543 | EMMS-PLAYLIST-SORT-FUNCTION. |
| 544 | -- Function: emms-unlock-queue |
| 545 | Unlock the current active playlist queue from its playlist. |
| 546 | EMMS-PLAYLIST-SORT-FUNCTION. |
| 547 | -- Function: emms-show &optional insertp |
| 548 | Describe the current Emms track in the minibuffer. If INSERTP is |
| 549 | non-nil, insert the description into the current buffer instead. |
| 550 | This function uses EMMS-SHOW-FORMAT to format the current track. |
| 551 | The command ‘emms-show-all’ will pop up a window with the complete |
| 552 | information about the track being played. ‘emms-show-all’ is provided |
| 553 | by ‘emms-show-all.el’, which is included in the 'emms-all' setup level. |
| 554 | See *Note Setup::. |
| 555 | |
| 556 | |
| 557 | File: emms.info, Node: The Core File, Next: Sources, Prev: Basic Commands, Up: Top |
| 558 | |
| 559 | 9 The Core File |
| 560 | *************** |
| 561 | |
| 562 | The core file ‘emms.el’ provides the all basic functions for playing |
| 563 | music, generating playlists and defining players. |
| 564 | |
| 565 | * Menu: |
| 566 | |
| 567 | * User Variables:: Variables for the user to tweak. |
| 568 | * Hooks:: Hooks for important Emms functions. |
| 569 | * Core Functions:: Providing the basic functionality of Emms. |
| 570 | |
| 571 | |
| 572 | File: emms.info, Node: User Variables, Next: Hooks, Up: The Core File |
| 573 | |
| 574 | 9.1 User Variables |
| 575 | ================== |
| 576 | |
| 577 | The core file defines a number of user variables. |
| 578 | |
| 579 | -- User Option: emms-player-list |
| 580 | A list of players Emms can use. You need to set this in order to |
| 581 | use Emms to play media. |
| 582 | -- User Option: emms-show-format |
| 583 | The format to use for ‘emms-show’. Any "%s" is replaced by what |
| 584 | EMMS-TRACK-DESCRIPTION-FUNCTION returns for the currently playing |
| 585 | track. |
| 586 | -- User Option: emms-repeat-playlist |
| 587 | Non-nil if the Emms playlist should automatically repeat the |
| 588 | playlist. If nil, playback will stop when the last track finishes |
| 589 | playing. |
| 590 | -- User Option: emms-track-description-function |
| 591 | Function for describing an Emms track in a user-friendly way. |
| 592 | -- User Option: emms-sort-lessp-function |
| 593 | A function that compares two tracks, and returns non-nil if the |
| 594 | first track should be sorted before the second (see also ‘sort’). |
| 595 | |
| 596 | |
| 597 | File: emms.info, Node: Hooks, Next: Core Functions, Prev: User Variables, Up: The Core File |
| 598 | |
| 599 | 9.2 Hooks |
| 600 | ========= |
| 601 | |
| 602 | The core file provides hook variables for the basic functionality of |
| 603 | Emms. |
| 604 | |
| 605 | -- User Option: emms-player-started-hook |
| 606 | A hook run when an Emms player started playing. |
| 607 | -- User Option: emms-player-stopped-hook |
| 608 | A hook run when an Emms player stopped playing. See also |
| 609 | EMMS-PLAYER-FINISHED-HOOK. |
| 610 | -- User Option: emms-playlist-source-inserted-hook |
| 611 | Hook run when a source got inserted into the playlist. The buffer |
| 612 | is narrowed to the new tracks. |
| 613 | -- User Option: emms-playlist-selection-changed-hook |
| 614 | Hook run after another track is selected in the Emms playlist. |
| 615 | -- User Option: emms-playlist-cleared-hook |
| 616 | Hook run after the current Emms playlist is cleared. This happens |
| 617 | both when the playlist is cleared and when a new buffer is created |
| 618 | for it. |
| 619 | -- User Option: emms-player-finished-hook |
| 620 | Hook run when an Emms player finishes playing a track. Please pay |
| 621 | attention to the differences between EMMS-PLAYER-FINISHED-HOOK and |
| 622 | EMMS-PLAYER-STOPPED-HOOK. The former is called only when the |
| 623 | player is stopped interactively; the latter, only when the player |
| 624 | actually finishes playing a track. |
| 625 | -- User Option: emms-player-paused-hook |
| 626 | Hook run when a player is paused or resumed. Use |
| 627 | EMMS-PLAYER-PAUSED-P to find the current state. |
| 628 | |
| 629 | |
| 630 | File: emms.info, Node: Core Functions, Prev: Hooks, Up: The Core File |
| 631 | |
| 632 | 9.3 Core Functions |
| 633 | ================== |
| 634 | |
| 635 | The core file also defines all the functions important to the basic use |
| 636 | of Emms. |
| 637 | |
| 638 | There are functions which deal with movement in the playlist. |
| 639 | |
| 640 | -- Function: emms-next-noerror |
| 641 | Start playing the next track in the Emms playlist. Unlike |
| 642 | ‘emms-next’, this function doesn't signal an error when called at |
| 643 | the end of the playlist. This function should only be called when |
| 644 | no player is playing. This is a good function to put in |
| 645 | ‘emms-player-finished-hook’. |
| 646 | -- Function: emms-playlist-next |
| 647 | Move to the next track in the current buffer. |
| 648 | -- Function: emms-playlist-previous |
| 649 | Move to the previous track in the current buffer. |
| 650 | -- Function: emms-random |
| 651 | Jump to a random track. |
| 652 | -- Function: emms-toggle-repeat-playlist |
| 653 | Toggle whether emms repeats the playlist after it is done. See |
| 654 | EMMS-REPEAT-PLAYLIST. |
| 655 | -- Function: emms-toggle-repeat-track |
| 656 | Toggle whether emms repeats the current track. See |
| 657 | EMMS-REPEAT-TRACK. |
| 658 | -- Function: emms-toggle-random-playlist |
| 659 | Toggle whether emms plays the tracks randomly or sequentially. See |
| 660 | EMMS-RANDOM-PLAYLIST. |
| 661 | |
| 662 | Some functions deal with the getting and setting track information. |
| 663 | |
| 664 | -- Function: emms-track type name |
| 665 | Create a track with type TYPE and name NAME. |
| 666 | -- Function: emms-track-type track |
| 667 | Return the type of TRACK. |
| 668 | -- Function: emms-track-name track |
| 669 | Return the name of TRACK. |
| 670 | -- Function: emms-track-get name track &optional inexistent |
| 671 | Return the value of NAME for TRACK. If there is no value, return |
| 672 | DEFAULT (or nil, if not given). |
| 673 | -- Function: emms-track-set track name value |
| 674 | Set the value of NAME for TRACK to VALUE. |
| 675 | -- Function: emms-track-description track |
| 676 | Return a description of TRACK. This function uses |
| 677 | EMMS-TRACK-DESCRIPTION-FUNCTION. |
| 678 | -- Function: emms-player-for track |
| 679 | Return an Emms player capable of playing TRACK. This will be the |
| 680 | first player whose PLAYABLEP function returns non-nil, or nil if no |
| 681 | such player exists. |
| 682 | -- Function: emms-playlist-current-selected-track |
| 683 | Return the currently selected track in the current playlist. |
| 684 | |
| 685 | There are also functions which deal with the playing itself. |
| 686 | |
| 687 | -- Function: emms-player-start track |
| 688 | Start playing TRACK. |
| 689 | -- Function: emms-player-stop |
| 690 | Stop the currently playing player. |
| 691 | -- Function: emms-player-stopped |
| 692 | Declare that the current Emms player is finished. This should only |
| 693 | be done by the current player itself. |
| 694 | |
| 695 | -- Function: emms-seek duration |
| 696 | Seek the current player by DURATION from its current position. The |
| 697 | argument DURATION can be: |
| 698 | |
| 699 | − A single number, in which case it is interpreted as seconds. |
| 700 | |
| 701 | − A string of form [-][HH:]MM:SS.m, where HH is hours, MM is |
| 702 | minutes, and SS is seconds. |
| 703 | |
| 704 | In both forms seconds can be a floating point number. A negative |
| 705 | value seeks backwards. |
| 706 | |
| 707 | -- Function: emms-seek-to timestamp |
| 708 | Seek the current player to TIMESTAMP. Acceptable forms for |
| 709 | TIMESTAMP are the same as time duration in ‘emms-seek’, except that |
| 710 | timestamps cannot be negative. |
| 711 | |
| 712 | -- Function: emms-seek-forward |
| 713 | Seek ten seconds forward. |
| 714 | -- Function: emms-seek-backward |
| 715 | Seek ten seconds backward. |
| 716 | |
| 717 | For more basic commands defined in the core file see *Note Basic |
| 718 | Commands::. |
| 719 | |
| 720 | |
| 721 | File: emms.info, Node: Sources, Next: Simple Players, Prev: The Core File, Up: Top |
| 722 | |
| 723 | 10 Sources |
| 724 | ********** |
| 725 | |
| 726 | Sources allow Emms to add and play tracks. Emms comes with a number of |
| 727 | sources of its own. Sources are designed so that creating new ones will |
| 728 | be easy. |
| 729 | |
| 730 | For examples of Emms sources for files and directories see |
| 731 | ‘emms-source-file.el’. |
| 732 | |
| 733 | -- User Option: emms-source-file-default-directory |
| 734 | The default directory to look for media files. |
| 735 | -- Function: emms-play-find |
| 736 | Play all files in EMMS-SOURCE-FILE-DEFAULT-DIRECTORY that match a |
| 737 | specific regular expression. |
| 738 | -- Function: emms-source-file &optional file |
| 739 | An Emms source for a single file - either FILE, or queried from the |
| 740 | user. |
| 741 | -- Function: emms-source-files files |
| 742 | An Emms source for a list of FILES. |
| 743 | -- Function: emms-source-directory &optional dir |
| 744 | An Emms source for a whole directory tree - either DIR, or queried |
| 745 | from the user |
| 746 | -- Function: emms-source-directory-tree & optional dir |
| 747 | An Emms source for multiple directory trees - either DIR, or the |
| 748 | value of EMMS-SOURCE-FILE-DEFAULT-DIRECTORY. |
| 749 | -- Function: emms-source-playlist file |
| 750 | An Emms source for playlists. See EMMS-SOURCE-PLAYLIST-FORMATS for |
| 751 | a list of supported formats. |
| 752 | -- Function: emms-source-playlist-native file |
| 753 | An Emms source for a native Emms playlist file. |
| 754 | -- Function: emms-source-playlist-m3u file |
| 755 | An Emms source for an m3u playlist file. |
| 756 | -- Function: emms-source-playlist-pls file |
| 757 | An Emms source for a pls playlist file. |
| 758 | -- Function: emms-source-find &optional dir regex |
| 759 | An Emms source that will find files in DIR or |
| 760 | EMMS-SOURCE-FILE-DEFAULT-DIRECTORY that match REGEXP. |
| 761 | -- Function: emms-source-beets database filter sort |
| 762 | An Emms source that will read a ‘beets’ library database (requires |
| 763 | Emacs to be built with SQLite support). With prefix argument |
| 764 | FILTER, interactively filter the database. With a double (or more) |
| 765 | prefix argument, also set SORT interactively; otherwise use |
| 766 | EMMS-SOURCE-BEETS-SORT-COLUMNS. If DATABASE is omitted or nil, |
| 767 | EMMS-SOURCE-BEETS-DATABASE is used. |
| 768 | -- Function: emms-source-file-directory-tree &optional dir |
| 769 | Return a list of all files under DIR which match REGEX. |
| 770 | -- Function: emms-play-dired |
| 771 | Play all marked files of a dired buffer |
| 772 | -- Function: emms-add-dired |
| 773 | Add all marked files of a dired buffer |
| 774 | -- Function: emms-source-file-regex |
| 775 | Return a regexp that matches everything any player (that supports |
| 776 | files) can play. |
| 777 | -- Function: emms-locate regexp |
| 778 | Search for REGEXP and display the results in a locate buffer |
| 779 | |
| 780 | |
| 781 | File: emms.info, Node: Simple Players, Next: Playlists, Prev: Sources, Up: Top |
| 782 | |
| 783 | 11 Simple Players |
| 784 | ***************** |
| 785 | |
| 786 | -- Macro: define-emms-simple-player name types regex command &rest args |
| 787 | Define a simple player. NAME is used to construct the name of the |
| 788 | function like emms-player-NAME. TYPES is a list of track types |
| 789 | understood by this player. REGEX must be a regexp that matches the |
| 790 | filenames the player can play. COMMAND specifies the command line |
| 791 | argument to call the player and ARGS are the command line |
| 792 | arguments. |
| 793 | |
| 794 | For a discussion on how to define new players see *Note New Player::. |
| 795 | |
| 796 | -- Function: emms-player-simple-stop |
| 797 | Stop the currently playing process, if indeed there is one. |
| 798 | -- Function: emms-player-simple-start filename cmdname params |
| 799 | Starts a process playing FILENAME using the specified CMDNAME with |
| 800 | the specified PARAMS. |
| 801 | -- Function: emms-player-simple-sentinel proc str |
| 802 | Sentinel for determining the end of process for the process PROC |
| 803 | and the sentinel string STR. |
| 804 | |
| 805 | |
| 806 | File: emms.info, Node: Playlists, Next: Track Information, Prev: Simple Players, Up: Top |
| 807 | |
| 808 | 12 Playlists |
| 809 | ************ |
| 810 | |
| 811 | Emms uses Emacs buffers to store the media tracks for playing. We call |
| 812 | one such buffer a "playlist buffer" or an "Emms playlist buffer". Emms |
| 813 | then proceeds to play the media tracks in the buffer from top to bottom |
| 814 | until the end of the playlist. |
| 815 | |
| 816 | The name of the playlist buffer is defined in the variable |
| 817 | EMMS-PLAYLIST-BUFFER-NAME and is set to be an invisible Emacs buffer by |
| 818 | default. You can change to any name you want. For an example |
| 819 | configuration see *Note Configuration::. |
| 820 | |
| 821 | You can create any number of playlist buffers you wish. At any time |
| 822 | Emms has a single "current" buffer through which it proceeds track by |
| 823 | track. A saved playlist can be added to the current buffer by calling |
| 824 | ‘M-x emms-add-playlist’ or ‘M-x emms-play-playlist’, which also plays |
| 825 | the tracks immediately. |
| 826 | |
| 827 | The current Emms playlist buffer is stored in the variable |
| 828 | EMMS-PLAYLIST-BUFFER. |
| 829 | |
| 830 | -- Function: emms-playlist-new &optional name |
| 831 | Create a new playlist buffer. The buffer is named NAME, but made |
| 832 | unique. NAME defaults to 'emms-playlist-buffer-name'. If called |
| 833 | interactively, the new buffer is also selected. |
| 834 | |
| 835 | -- Function: emms-playlist-save &optional format file |
| 836 | Store the current playlist to FILE as the type FORMAT. The default |
| 837 | format is specified by EMMS-SOURCE-PLAYLIST-DEFAULT-FORMAT. |
| 838 | |
| 839 | -- Function: emms-playlist-clear |
| 840 | Clears the playlist buffer. |
| 841 | |
| 842 | -- Function: emms-playlist-current-clear |
| 843 | Clear the current playlist. If no current playlist exists, a new |
| 844 | one is generated. |
| 845 | |
| 846 | -- Function: emms-playlist-current-kill |
| 847 | Kill the current EMMS playlist buffer and switch to the next one. |
| 848 | |
| 849 | -- Function: emms-playlist-length |
| 850 | Display the total playing time of the current playlist. |
| 851 | |
| 852 | -- Function: emms-playlist-total-playing-time |
| 853 | Alias for ‘emms-playlist-length’. |
| 854 | |
| 855 | |
| 856 | File: emms.info, Node: Track Information, Next: Interactive Playlists, Prev: Playlists, Up: Top |
| 857 | |
| 858 | 13 Track Information |
| 859 | ******************** |
| 860 | |
| 861 | By default Emms will only list tracks as file names or URLs in playlists |
| 862 | (*note Playlists::) and the browser (*note The Browser::). However, |
| 863 | Emms can be configured to utilize so-called “info methods” to augment |
| 864 | tracks with metadata information, such as artist name, track name, album |
| 865 | title, and the like. We describe these methods and their use in this |
| 866 | chapter. |
| 867 | |
| 868 | Fundamentally, info methods are Emacs Lisp functions that are called |
| 869 | for each track to provide information for that track. Current info |
| 870 | methods in Emms are restricted to tracks that are files; they do not |
| 871 | work with stream URLs (*note Streaming Audio::). Some of the methods |
| 872 | require installation of some additional software that Emms can then call |
| 873 | to read metadata from disk (*note Metadata Utilities::). Finally, some |
| 874 | methods work only with a limited set of media file formats such as Ogg |
| 875 | or MP3, while some methods support a wide variety of formats. |
| 876 | |
| 877 | If caching is enabled (it is by default) then the metadata for each |
| 878 | track will be stored in the cache for faster retrieval. That means if |
| 879 | you change info method and want updated tracks, you will have to reset |
| 880 | the cache ‘M-x emms-cache-reset’ and then repopulate with ‘M-x |
| 881 | emms-add-directory-tree RET ~/Music/ RET’ or similar. |
| 882 | |
| 883 | Automatic track information retrieval is enabled by default in the |
| 884 | ‘emms-all’ setup level (*note Setup::). That setup level configures |
| 885 | Emms to use ‘emms-info-native’ and ‘emms-info-cueinfo’ methods, as they |
| 886 | are the only methods that do not rely on additional software. |
| 887 | |
| 888 | Here is a list of all info methods distributed with Emms and their |
| 889 | software requirements: |
| 890 | |
| 891 | ‘emms-info-native’ |
| 892 | This method is implemented completely in Emacs Lisp and hence does |
| 893 | not require any external software. It supports Ogg Vorbis, Opus, |
| 894 | FLAC and MP3 files. |
| 895 | |
| 896 | ‘emms-info-tinytag’ |
| 897 | This method utilizes a small Python library ‘tinytag’. It supports |
| 898 | MP3, Ogg Vorbis, Opus, MP4, M4A, FLAC, WMA and WAV formats. |
| 899 | |
| 900 | ‘emms-info-exiftool’ |
| 901 | This method calls ‘exiftool’ utility written in Perl. It supports |
| 902 | dozens of media file formats, far too many to list here. |
| 903 | |
| 904 | ‘emms-info-libtag’ |
| 905 | This method calls a small "shim" executable ‘emms-print-metadata’ |
| 906 | built around TagLib library. It supports MP3, Ogg Vorbis, Opus, |
| 907 | FLAC, MPC, Speex, WavPack, TrueAudio, WAV, AIFF, MP4 and ASF |
| 908 | formats. |
| 909 | |
| 910 | ‘emms-info-metaflac’ |
| 911 | This method calls ‘metaflac’ utility. It works only with FLAC |
| 912 | files. |
| 913 | |
| 914 | ‘emms-info-mp3info’ |
| 915 | This method calls ‘mp3info’ utility. It works only with MP3 files |
| 916 | that have older id3v1 tags. |
| 917 | |
| 918 | ‘emms-info-ogginfo’ |
| 919 | This method calls ‘ogginfo’ utility. It supports Ogg Vorbis and |
| 920 | Theora formats. |
| 921 | |
| 922 | ‘emms-info-opusinfo’ |
| 923 | This method calls ‘opusinfo’ utility. It works only with Opus |
| 924 | files. |
| 925 | |
| 926 | ‘emms-info-cueinfo’ |
| 927 | This is a special method that parses track information from an |
| 928 | accompanying cue file for FLAC and APE files (*note APE / FLAC |
| 929 | Commands::). It does not require any additional software. |
| 930 | |
| 931 | To use any of the methods, add the method to ‘emms-info-functions’ |
| 932 | list. For example: |
| 933 | |
| 934 | (require 'emms-info-native) |
| 935 | (add-to-list 'emms-info-functions 'emms-info-native) |
| 936 | |
| 937 | You can also use a combination of format-specific tools if needed: |
| 938 | |
| 939 | (require 'emms-info-mp3info) |
| 940 | (require 'emms-info-ogginfo) |
| 941 | (add-to-list 'emms-info-functions 'emms-info-mp3info 'emms-info-ogginfo) |
| 942 | |
| 943 | In this case both ‘emms-info-mp3info’ and ‘emms-info-ogginfo’ will be |
| 944 | called for each track. |
| 945 | |
| 946 | There are a number of user variables which control the behavior of |
| 947 | ‘emms-info’: |
| 948 | |
| 949 | -- User Option: emms-info-auto-update |
| 950 | Non-nil when Emms should update track information if the file |
| 951 | changes. This will cause hard drive activity on track loading. If |
| 952 | this is too annoying for you, set this variable to nil. |
| 953 | |
| 954 | -- User Option: emms-info-asynchronously |
| 955 | Non-nil when track information should be loaded asynchronously. |
| 956 | This requires the feature ‘later-do’ which is provided by the file |
| 957 | ‘later-do.el’, which comes with Emms. See variable |
| 958 | ‘emms-later-do-batch’ for performance tweaking. |
| 959 | |
| 960 | -- User Option: emms-info-functions |
| 961 | A list of functions (info methods) which add information to tracks. |
| 962 | Each function is called with a track as argument. If two info |
| 963 | methods produce the same information (for example album name), the |
| 964 | latter one takes precedence. |
| 965 | |
| 966 | * Menu: |
| 967 | |
| 968 | * Metadata Utilities:: Supported external metadata utilities. |
| 969 | * Defining Info Methods:: How to define new info methods. |
| 970 | |
| 971 | |
| 972 | File: emms.info, Node: Metadata Utilities, Next: Defining Info Methods, Up: Track Information |
| 973 | |
| 974 | 13.1 Metadata Utilities |
| 975 | ======================= |
| 976 | |
| 977 | With the exception of ‘emms-info-native’ and ‘emms-info-cueinfo’, Emms |
| 978 | info methods require external metadata utilities to read metadata from |
| 979 | media files. If you plan to use a certain info method, make sure you |
| 980 | have the corresponding utility installed. All of these utilities are |
| 981 | free software, and most of them are included in free GNU/Linux |
| 982 | distributions. |
| 983 | |
| 984 | tinytag |
| 985 | ....... |
| 986 | |
| 987 | tinytag is a Python library for reading metadata from music files. It |
| 988 | is available at <https://pypi.org/project/tinytag/>. Naturally a |
| 989 | working Python interpreter is also required. The corresponding Emms |
| 990 | info method is ‘emms-info-tinytag’. |
| 991 | |
| 992 | It is best to configure ‘emms-info-tinytag’ as the sole info method |
| 993 | for Emms, because competing and overlapping methods can cause confusion. |
| 994 | To use it, add the following into your Emacs initialization file: |
| 995 | |
| 996 | (require 'emms-info-tinytag) |
| 997 | (setq emms-info-functions '(emms-info-tinytag)) |
| 998 | |
| 999 | ExifTool |
| 1000 | ........ |
| 1001 | |
| 1002 | ExifTool is a platform-independent Perl library and a command-line |
| 1003 | application for reading, writing and editing meta information in a wide |
| 1004 | variety of files. It is available at <https://exiftool.org/>. |
| 1005 | Naturally a working Perl interpreter is also required. The |
| 1006 | corresponding Emms info method is ‘emms-info-exiftool’. |
| 1007 | |
| 1008 | It is best to configure ‘emms-info-exiftool’ as the sole info method |
| 1009 | for Emms, because competing and overlapping methods can cause confusion. |
| 1010 | To use it, add the following into your Emacs initialization file: |
| 1011 | |
| 1012 | (require 'emms-info-exiftool) |
| 1013 | (setq emms-info-functions '(emms-info-exiftool)) |
| 1014 | |
| 1015 | TagLib |
| 1016 | ...... |
| 1017 | |
| 1018 | TagLib is a library for reading and editing metadata of several popular |
| 1019 | audio formats. It is available at <http://taglib.github.io/>. Because |
| 1020 | TagLib is a C++ library instead of an executable program, you have to |
| 1021 | build and install a small "shim" executable ‘emms-print-metadata’ around |
| 1022 | it. ‘emms-info-libtag’ will then call this executable to read metadata |
| 1023 | from media files. |
| 1024 | |
| 1025 | To compile ‘emms-print-metadata’ invoke |
| 1026 | |
| 1027 | ‘make emms-print-metadata’ |
| 1028 | |
| 1029 | in Emms directory. For this to succeed you need to have a working C++ |
| 1030 | compiler and TagLib development libraries installed on your system. The |
| 1031 | resultant binary executable will be installed when you invoke |
| 1032 | |
| 1033 | ‘make install’ as in *Note Compiling Emms::. |
| 1034 | |
| 1035 | It is of course also possible to install only the ‘emms-print-metadata’ |
| 1036 | binary where your system can find and execute it without installing all |
| 1037 | of Emms via the make command. |
| 1038 | |
| 1039 | Once ‘emms-print-metadata’ is available, it is best to configure |
| 1040 | ‘emms-info-libtag’ as the sole info method for Emms, because competing |
| 1041 | and overlapping methods can cause confusion. To use it, add the |
| 1042 | following into your Emacs initialization file: |
| 1043 | |
| 1044 | (require 'emms-info-libtag) |
| 1045 | (setq emms-info-functions '(emms-info-libtag)) |
| 1046 | |
| 1047 | metaflac |
| 1048 | ........ |
| 1049 | |
| 1050 | ‘metaflac’ is the command-line FLAC file metadata editor. It is |
| 1051 | included in FLAC source distribution available at |
| 1052 | <https://github.com/xiph/flac>. The corresponding info method is |
| 1053 | ‘emms-info-metaflac’. To use it, add the following into your Emacs |
| 1054 | initialization file: |
| 1055 | |
| 1056 | (require 'emms-info-metaflac) |
| 1057 | (add-to-list 'emms-info-functions 'emms-info-metaflac) |
| 1058 | |
| 1059 | MP3info |
| 1060 | ....... |
| 1061 | |
| 1062 | MP3info is a small utility for reading and modifying id3v1 tags from MP3 |
| 1063 | files. Note that more recent id3v2 tags are not supported; for those |
| 1064 | you need to use another info method, for example ‘emms-info-native’. |
| 1065 | MP3info is available at <https://ibiblio.org/mp3info/>. |
| 1066 | |
| 1067 | The corresponding info method is ‘emms-info-mp3info’. To use it, add |
| 1068 | the following into your Emacs initialization file: |
| 1069 | |
| 1070 | (require 'emms-info-mp3info) |
| 1071 | (add-to-list 'emms-info-functions 'emms-info-mp3info) |
| 1072 | |
| 1073 | ogginfo |
| 1074 | ....... |
| 1075 | |
| 1076 | ‘ogginfo’ is a small utility for extracting information about Ogg Vorbis |
| 1077 | and Theora files. It is part of Vorbis Tools source distribution |
| 1078 | available at <https://github.com/xiph/vorbis-tools>. The corresponding |
| 1079 | info method is ‘emms-info-ogginfo’. To use it, add the following into |
| 1080 | your Emacs initialization file: |
| 1081 | |
| 1082 | (require 'emms-info-ogginfo) |
| 1083 | (add-to-list 'emms-info-functions 'emms-info-ogginfo) |
| 1084 | |
| 1085 | opusinfo |
| 1086 | ........ |
| 1087 | |
| 1088 | ‘opusinfo’ is a small utility for extracting information about Opus |
| 1089 | files. It is part of Opus Tools source distribution available at |
| 1090 | <https://github.com/xiph/opus-tools>. The corresponding info method is |
| 1091 | ‘emms-info-opusinfo’. To use it, add the following into your Emacs |
| 1092 | initialization file: |
| 1093 | |
| 1094 | (require 'emms-info-opusinfo) |
| 1095 | (add-to-list 'emms-info-functions 'emms-info-opusinfo) |
| 1096 | |
| 1097 | |
| 1098 | File: emms.info, Node: Defining Info Methods, Prev: Metadata Utilities, Up: Track Information |
| 1099 | |
| 1100 | 13.2 Defining Info Methods |
| 1101 | ========================== |
| 1102 | |
| 1103 | An info method essentially consists of a function which, given an Emms |
| 1104 | track, sets the appropriate “info-symbols” for that track. Info symbols |
| 1105 | are keys that have an associated value stored in the “metadata cache”. |
| 1106 | While info symbols can have arbitrary names, the following symbols are |
| 1107 | recognized by Emms: |
| 1108 | |
| 1109 | ‘info-album’ |
| 1110 | Album title. |
| 1111 | |
| 1112 | ‘info-albumsort’ |
| 1113 | Album title for collation. |
| 1114 | |
| 1115 | ‘info-artist’ |
| 1116 | Artist name. |
| 1117 | |
| 1118 | ‘info-artistsort’ |
| 1119 | Artist name for collation. |
| 1120 | |
| 1121 | ‘info-albumartist’ |
| 1122 | Album artist name. |
| 1123 | |
| 1124 | ‘info-albumartistsort’ |
| 1125 | Album artist name for collation. |
| 1126 | |
| 1127 | ‘info-composer’ |
| 1128 | Composer name. |
| 1129 | |
| 1130 | ‘info-composersort’ |
| 1131 | Composer name for collation. |
| 1132 | |
| 1133 | ‘info-date’ |
| 1134 | Release date. |
| 1135 | |
| 1136 | ‘info-originaldate’ |
| 1137 | Original release date. |
| 1138 | |
| 1139 | ‘info-performer’ |
| 1140 | Performer name. |
| 1141 | |
| 1142 | ‘info-title’ |
| 1143 | Track title. |
| 1144 | |
| 1145 | ‘info-titlesort’ |
| 1146 | Track title for collation. |
| 1147 | |
| 1148 | ‘info-tracknumber’ |
| 1149 | Track number. |
| 1150 | |
| 1151 | ‘info-discnumber’ |
| 1152 | Disc number. |
| 1153 | |
| 1154 | ‘info-year’ |
| 1155 | Release year. |
| 1156 | |
| 1157 | ‘info-originalyear’ |
| 1158 | Original release year. |
| 1159 | |
| 1160 | ‘info-note’ |
| 1161 | Free-form note. |
| 1162 | |
| 1163 | ‘info-genre’ |
| 1164 | Genre. |
| 1165 | |
| 1166 | ‘info-label’ |
| 1167 | Record label. |
| 1168 | |
| 1169 | ‘info-playing-time’ |
| 1170 | Playing time in seconds. |
| 1171 | |
| 1172 | An info method does not need to add all of these symbols into the given |
| 1173 | track. It can also add other symbols, but those extra symbols won't be |
| 1174 | used by Emms. |
| 1175 | |
| 1176 | We can for example look at the predefined method for retrieving |
| 1177 | information about audio tracks in the Ogg format. The function |
| 1178 | ‘emms-info-ogginfo’ provided by ‘emms-info-ogginfo.el’ accepts an Emms |
| 1179 | track TRACK as a single argument. It uses ‘ogginfo’ utility to extract |
| 1180 | a list of key-value metadata pairs from the file represented by TRACK. |
| 1181 | Next, it sets the appropriate info symbols for TRACK by calling |
| 1182 | ‘emms-track-set’. Info symbols are interned from the extracted keys. |
| 1183 | Those keys can be arbitrary strings, but they typically coincide with |
| 1184 | the keys listed above; for example "album" and "artist" form info |
| 1185 | symbols ‘info-album’ and ‘info-artist’. |
| 1186 | |
| 1187 | |
| 1188 | File: emms.info, Node: Interactive Playlists, Next: Markable Playlists, Prev: Track Information, Up: Top |
| 1189 | |
| 1190 | 14 Interactive Playlists |
| 1191 | ************************ |
| 1192 | |
| 1193 | Emms provides a visual, interactive playlist mode as well as the ability |
| 1194 | to use playlists without ever looking at then. This visual, interactive |
| 1195 | mode is called the 'emms-playlist-mode' and is defined in |
| 1196 | ‘emms-playlist-mode.el’. |
| 1197 | |
| 1198 | The interactive playlist mode is enabled by default in the 'emms-all' |
| 1199 | setup level. For more information about Emms setup levels see *Note |
| 1200 | Setup::. |
| 1201 | |
| 1202 | -- Function: emms-playlist-mode-go |
| 1203 | Switch to the current emms-playlist buffer and use |
| 1204 | emms-playlist-mode. |
| 1205 | |
| 1206 | If you wish to make this the default Emms playlist mode, add the |
| 1207 | following to your ‘.emacs’. |
| 1208 | |
| 1209 | (setq emms-playlist-default-major-mode 'emms-playlist-mode) |
| 1210 | |
| 1211 | The interactive playlist buffer shows the tracks in the current Emms |
| 1212 | playlist in the order in which they will be played. The current track |
| 1213 | will be highlighted. |
| 1214 | |
| 1215 | When in the interactive playlist mode we can perform different |
| 1216 | actions on the current playlist. |
| 1217 | |
| 1218 | ‘a’ |
| 1219 | Add files in the playlist at point to the current playlist buffer. |
| 1220 | If we are in the current playlist, make a new playlist buffer and |
| 1221 | set it as current. |
| 1222 | |
| 1223 | ‘i’ |
| 1224 | Insert track at point into active playlist. |
| 1225 | |
| 1226 | ‘b’ |
| 1227 | Set the current playlist buffer. |
| 1228 | |
| 1229 | ‘n’ |
| 1230 | Start playing the next track in the playlist. |
| 1231 | |
| 1232 | ‘p’ |
| 1233 | Start playing the previous track in the playlist. |
| 1234 | |
| 1235 | ‘s’ |
| 1236 | Stop playing. |
| 1237 | |
| 1238 | ‘P’ |
| 1239 | Pause. |
| 1240 | |
| 1241 | ‘>’ |
| 1242 | Seek ten seconds forward. |
| 1243 | |
| 1244 | ‘<’ |
| 1245 | Seek ten seconds backward. |
| 1246 | |
| 1247 | ‘f’ |
| 1248 | Describe the currently playing track in the minibuffer. |
| 1249 | |
| 1250 | ‘c’ |
| 1251 | Display the current track in the center of the screen. |
| 1252 | |
| 1253 | ‘RET’ |
| 1254 | Start playing the track under point. Note that this is also |
| 1255 | available with ‘<mouse-2>’. |
| 1256 | |
| 1257 | ‘SPC’ |
| 1258 | Scroll up a near full page. |
| 1259 | |
| 1260 | ‘M-<’ |
| 1261 | Go to the first track in the playlist. |
| 1262 | |
| 1263 | ‘M->’ |
| 1264 | Go to the last track in the playlist. |
| 1265 | |
| 1266 | ‘r’ |
| 1267 | Go to a randomly selected track in the playlist. |
| 1268 | |
| 1269 | ‘q’ |
| 1270 | Put the interactive playlist buffer at the end of the list of all |
| 1271 | buffers. |
| 1272 | |
| 1273 | ‘C-x C-s’ |
| 1274 | Save the current playlist buffer to a file. By default, Emms will |
| 1275 | ask you for confirmation before overwriting an existing playlist. |
| 1276 | You can silently overwrite existing playlist by setting |
| 1277 | EMMS-SOURCE-PLAYLIST-ASK-BEFORE-OVERWRITE to nil. |
| 1278 | |
| 1279 | ‘?’ |
| 1280 | Describe the mode. |
| 1281 | |
| 1282 | ‘C-i’ |
| 1283 | Shift the track at point up one line. |
| 1284 | |
| 1285 | ‘C-o’ |
| 1286 | Shift the track at point down one line. |
| 1287 | |
| 1288 | ‘M-n’ |
| 1289 | Switch to the next playlist buffer. |
| 1290 | |
| 1291 | ‘M-p’ |
| 1292 | Switch to the previous playlist buffer. |
| 1293 | |
| 1294 | We can also edit the playlist using familiar GNU/Emacs commands: |
| 1295 | |
| 1296 | ‘C-k’ |
| 1297 | Remove the track under point from the playlist buffer. Also |
| 1298 | available using the ‘d’ key. |
| 1299 | |
| 1300 | ‘C-y’ |
| 1301 | See the command ‘yank’ |
| 1302 | |
| 1303 | ‘M-y’ |
| 1304 | See the command ‘yank-pop’. |
| 1305 | |
| 1306 | ‘C-j’ |
| 1307 | Insert a newline at point. |
| 1308 | |
| 1309 | We can use the regular GNU/Emacs killing and yanking commands to move |
| 1310 | and copy tracks in between playlist buffers. We can use the same |
| 1311 | commands to insert arbitrary text into the playlist buffers together |
| 1312 | with the playlist tracks. Text which is not a track is ignored by the |
| 1313 | program and can therefore be used to include titles and annotations |
| 1314 | within the playlist. |
| 1315 | |
| 1316 | |
| 1317 | File: emms.info, Node: Markable Playlists, Next: Extending Emms, Prev: Interactive Playlists, Up: Top |
| 1318 | |
| 1319 | 15 Markable Playlists |
| 1320 | ********************* |
| 1321 | |
| 1322 | The Markable Playlists provided by the file ‘emms-mark.el’ are an |
| 1323 | alternative to the default interactive playlists, *Note Interactive |
| 1324 | Playlists::. They allow marking tracks with keybindings familiar to |
| 1325 | users of dired. |
| 1326 | |
| 1327 | To enable the Markable Playlists you have to add |
| 1328 | |
| 1329 | (require 'emms-mark) |
| 1330 | |
| 1331 | to your ‘.emacs’. Then you can activate ‘emms-mark-mode’ by |
| 1332 | executing ‘M-x emms-mark-mode’ in a playlist buffer. You can return to |
| 1333 | the default interactive playlist mode with ‘M-x emms-mark-mode-disable’. |
| 1334 | |
| 1335 | If you wish to make this the default Emms playlist mode, add the |
| 1336 | following to your ‘.emacs’. |
| 1337 | |
| 1338 | (setq emms-playlist-default-major-mode 'emms-mark-mode) |
| 1339 | |
| 1340 | ‘m’ |
| 1341 | Marks the current track and sets point one line forward. If a |
| 1342 | prefix argument ARG is given, it will mark the next ARG tracks and |
| 1343 | set point accordingly. A negative argument marks backward. |
| 1344 | |
| 1345 | ‘U’ |
| 1346 | Unmarks all tracks in the playlist. |
| 1347 | |
| 1348 | ‘t’ |
| 1349 | Toggles mark on the current track. |
| 1350 | |
| 1351 | ‘u’ |
| 1352 | Unmarks same way as ‘emms-mark-forward’ marks. |
| 1353 | |
| 1354 | ‘% m’ |
| 1355 | Marks all tracks in the playlist matching the given regular |
| 1356 | expression. A prefix argument means to unmark them instead. |
| 1357 | |
| 1358 | When tracks are marked you can operate on them: |
| 1359 | |
| 1360 | ‘D’ |
| 1361 | Deletes the marked tracks from the playlist. |
| 1362 | |
| 1363 | ‘K’ |
| 1364 | Deletes the marked tracks from the playlist and places them in the |
| 1365 | kill-ring, so that you can ‘yank’ in into another playlist. |
| 1366 | |
| 1367 | ‘W’ |
| 1368 | Adds the marked tracks to the kill-ring, so that you can ‘yank’ |
| 1369 | them into another playlist. |
| 1370 | |
| 1371 | emms-mark is also intent to provide a way for user to select tracks |
| 1372 | for other command to operate on them. Currently, ‘emms-tag-editor.el’ |
| 1373 | uses the emms-mark to edit the tags of selected tracks. Two functions |
| 1374 | are useful for the elisp programer to handle marked tracks. |
| 1375 | |
| 1376 | -- Function: emms-mark-do-with-marked-track |
| 1377 | This function take a function to perform on all marked tracks. A |
| 1378 | optional argument 'move-flag' to tell the function to move forward |
| 1379 | line after calling given function. If the given function didn't |
| 1380 | change position, the second argument should set to non-nil. |
| 1381 | |
| 1382 | -- Function: emms-mark-mapcar-marked-track |
| 1383 | This function is very similar to 'emms-mark-do-with-marked-track' |
| 1384 | except it collects result of given function (that's why named with |
| 1385 | 'mapcar'). |
| 1386 | |
| 1387 | |
| 1388 | File: emms.info, Node: Extending Emms, Next: The Browser, Prev: Markable Playlists, Up: Top |
| 1389 | |
| 1390 | 16 Extending Emms |
| 1391 | ***************** |
| 1392 | |
| 1393 | Emms introduces a high abstraction layer for playing music so you can |
| 1394 | customise it to your needs. |
| 1395 | |
| 1396 | * Menu: |
| 1397 | |
| 1398 | * New Player:: How to define a new player. |
| 1399 | * Simple Player for `play':: An example player using ‘play’. |
| 1400 | * More Complex Player:: Example of a complex player using ‘mpg321’. |
| 1401 | |
| 1402 | |
| 1403 | File: emms.info, Node: New Player, Next: Simple Player for `play', Up: Extending Emms |
| 1404 | |
| 1405 | 16.1 New Player |
| 1406 | =============== |
| 1407 | |
| 1408 | The file ‘emms-player-simple.el’ defines some easy players to start |
| 1409 | with, but it shouldn't be hard to provide a function for your favourite |
| 1410 | player. We will start with an easy example that shows how we can use |
| 1411 | the ‘play’ command under Unix to play our WAV files. |
| 1412 | |
| 1413 | |
| 1414 | File: emms.info, Node: Simple Player for `play', Next: More Complex Player, Prev: New Player, Up: Extending Emms |
| 1415 | |
| 1416 | 16.2 Simple Player for 'play' |
| 1417 | ============================= |
| 1418 | |
| 1419 | Play is a very easy command line player for various format. If you want |
| 1420 | your emms to play WAV files just put the following lines in you |
| 1421 | ‘.emacs’: |
| 1422 | |
| 1423 | (require 'emms-player-simple) |
| 1424 | (define-emms-simple-player play '(file) "\\.wav$" "play") |
| 1425 | |
| 1426 | Huh! Wasn't that easy? |
| 1427 | |
| 1428 | The macro function ‘define-emms-simple-player’ takes a minimum of |
| 1429 | three arguments. The first argument (_play_ in our example) defines the |
| 1430 | name of the player. It's used to name the player functions. The second |
| 1431 | is a regexp, that defines which files to play with our player. |
| 1432 | _\\.wav$_ matches any filename ending with a dot and the string wav. |
| 1433 | The last argument is the actual command line command we use to play our |
| 1434 | files. You can also add the path but we just assume that the command is |
| 1435 | in your path. All arguments you add to these three are optional. They |
| 1436 | define the command line arguments you want to add to your argument. If |
| 1437 | you want to hear the wav file of your favourite artist in the most |
| 1438 | possible volume use the following line: |
| 1439 | |
| 1440 | (require 'emms-player-simple) |
| 1441 | |
| 1442 | (define-emms-simple-player play |
| 1443 | '(file) |
| 1444 | "\\artist-*.wav$" |
| 1445 | "play" |
| 1446 | "--volume=100") |
| 1447 | |
| 1448 | Please notice that you have to add the arguments as strings! |
| 1449 | |
| 1450 | The command line tool you use for ‘define-emms-simple-player’ has to |
| 1451 | take one song as argument and stop after playing that particular song. |
| 1452 | For any other concept you will need to customise emms a bit more... |
| 1453 | |
| 1454 | |
| 1455 | File: emms.info, Node: More Complex Player, Prev: Simple Player for `play', Up: Extending Emms |
| 1456 | |
| 1457 | 16.3 More Complex Player |
| 1458 | ======================== |
| 1459 | |
| 1460 | The most players you use will be simple players so you don't need to |
| 1461 | read this chapter. But if you are curious how you can use (almost) |
| 1462 | every player in emms read further... |
| 1463 | |
| 1464 | In this chapter we will use mpg321 to construct a player that |
| 1465 | actually can pause a track, restart it and show rest time. We won't |
| 1466 | implement all of that, but after that chapter you will know how to |
| 1467 | define it. |
| 1468 | |
| 1469 | The command ‘define-emms-simple-player’ is just a abstraction layer |
| 1470 | for ‘define-emms-player’, which is a little bit more complicated but |
| 1471 | much more powerful! |
| 1472 | |
| 1473 | (define-emms-player "emms-mpg321-remote" |
| 1474 | :start 'emms-mpg321-remote-start |
| 1475 | :stop 'emms-mpg321-remote-stop |
| 1476 | :playablep 'emms-mpg321-remote-playable-p) |
| 1477 | |
| 1478 | So, that is almost all! ‘define-emms-player’ takes a minimum of |
| 1479 | three arguments. The first is the name of the player. The rest are |
| 1480 | methods with functions to call. Three methods are required: start, stop |
| 1481 | and playable. Start says Emms how to start a track (sic!), stop how to |
| 1482 | stop a player and playablep should return non-nil if the player can play |
| 1483 | the track. |
| 1484 | |
| 1485 | So we just need these three functions to get our mpg321-remote: |
| 1486 | |
| 1487 | First we code the start function. We will check if there's a open |
| 1488 | process and start one otherwise. Then we send a string to the process |
| 1489 | with the filename and set a filter. |
| 1490 | |
| 1491 | (defun emms-mpg321-remote-start () |
| 1492 | (unless (get-process ``mpg321-remote'') |
| 1493 | (setq emms-mpg321-remote-process |
| 1494 | (start-process "mpg321-remote-process" |
| 1495 | "*mpg321*" "mpg321" "-R" "abc")) |
| 1496 | (process-send-string "mpg321-remote-process" |
| 1497 | (concat "l " (emms-track-name track))) |
| 1498 | (set-process-filter emms-mpg321-remote-process 'emms-mpg321-remote-filter))) |
| 1499 | |
| 1500 | We need the filter, as mpg321-remote won't quit after playing the |
| 1501 | track as the simple player do. We wait until the process sends the |
| 1502 | output "(at-sign)P 0" (the signal of mpg321 that the song ended) to the |
| 1503 | filter and call emms-mpg321-remote-stop. |
| 1504 | |
| 1505 | (defun emms-mpg321-remote-filter (process output) |
| 1506 | (when (string-match "(at-sign)P 0" output) |
| 1507 | (emms-mpg321-remote-stop))) |
| 1508 | |
| 1509 | ‘emms-mpg321-remote-stop’ won't do anything interesting. It just |
| 1510 | test if there are other files to play and close the process otherwise. |
| 1511 | |
| 1512 | (defun emms-mpg321-remote-stop () |
| 1513 | (unless emms-playlist |
| 1514 | (process-send-string "mpg321-remote-process" "Q\n")) |
| 1515 | |
| 1516 | And to make that a playable example I also added |
| 1517 | ‘emms-mpg321-remote-playablep’, which I really just steal from |
| 1518 | ‘emms-player-simple.el’ |
| 1519 | |
| 1520 | (defun emms-mpg321-remote-playablep (track) |
| 1521 | "Return non-nil when we can play this track." |
| 1522 | (and (emms-track-file-p track) |
| 1523 | |
| 1524 | Now we have a ready player and we could add commands like |
| 1525 | ‘emms-mpg321-remote-pause’ for example. |
| 1526 | |
| 1527 | |
| 1528 | File: emms.info, Node: The Browser, Next: The Filter System, Prev: Extending Emms, Up: Top |
| 1529 | |
| 1530 | 17 The Browser |
| 1531 | ************** |
| 1532 | |
| 1533 | The Browser allows you to browse the metadata cache and add tracks to |
| 1534 | your playlist. It includes a powerful interactive mode. |
| 1535 | |
| 1536 | The Browser is defined in ‘emms-browser.el’ and is included in the |
| 1537 | ‘emms-all’ setup level. For more information about Emms setup levels |
| 1538 | see *Note Setup::. |
| 1539 | |
| 1540 | You can also manually add the Browser to your Emms setup by loading |
| 1541 | it explicitly with: |
| 1542 | |
| 1543 | (require 'emms-browser) |
| 1544 | |
| 1545 | To be properly useful, you should do M-x ‘emms-add-directory-tree’ to |
| 1546 | all the files you own at least once so that the cache is fully |
| 1547 | populated. |
| 1548 | |
| 1549 | * Menu: |
| 1550 | |
| 1551 | * Browser Interface:: The interactive browser interface. |
| 1552 | * Displaying Covers:: Displaying album covers in the browser interface. |
| 1553 | * Changing Looks:: Changing the tree structure, display format and faces. |
| 1554 | * Filtering Tracks - deprecated:: Displaying a subset of the tracks. |
| 1555 | |
| 1556 | |
| 1557 | File: emms.info, Node: Browser Interface, Next: Displaying Covers, Up: The Browser |
| 1558 | |
| 1559 | 17.1 Browser Interface |
| 1560 | ====================== |
| 1561 | |
| 1562 | The browser interface allows you to display and interact with your |
| 1563 | tracks in many different ways. There are a number of ways to start the |
| 1564 | browser. |
| 1565 | |
| 1566 | -- Function: emms-smart-browse |
| 1567 | Display browser and playlist. Toggle between selecting browser, |
| 1568 | playlist or hiding both. Tries to behave sanely if the user has |
| 1569 | manually changed the window configuration. |
| 1570 | |
| 1571 | -- Function: emms-browse-by-artist |
| 1572 | Display the browser and order the tracks by artist. |
| 1573 | |
| 1574 | -- Function: emms-browse-by-album |
| 1575 | Display the browser and order the tracks by album. |
| 1576 | |
| 1577 | -- Function: emms-browse-by-genre |
| 1578 | Display the browser and order the tracks by genre. |
| 1579 | |
| 1580 | -- Function: emms-browse-by-year |
| 1581 | Display the browser and order the tracks by year. |
| 1582 | |
| 1583 | -- Function: emms-browser-show-searches |
| 1584 | Show Search crumbs of the active searches. |
| 1585 | |
| 1586 | -- Function: emms-browser-render-last-search |
| 1587 | Render the results for the last search with current settings. |
| 1588 | |
| 1589 | Once the Browser is displayed you can use it to managed your track |
| 1590 | collection and playlists. The Browser is interactive and has its own |
| 1591 | keybindings. |
| 1592 | |
| 1593 | ‘C-j’ |
| 1594 | Add all tracks at point, and play the first added track. |
| 1595 | |
| 1596 | ‘RET’ |
| 1597 | Add all tracks at point. |
| 1598 | |
| 1599 | ‘SPC’ |
| 1600 | Show or hide (kill) subitems under the current line. |
| 1601 | |
| 1602 | ‘1’ |
| 1603 | Collapse everything. |
| 1604 | |
| 1605 | ‘2’ |
| 1606 | Expand all top level items one level. |
| 1607 | |
| 1608 | ‘3’ |
| 1609 | Expand all top level items two levels. |
| 1610 | |
| 1611 | ‘4’ |
| 1612 | Expand all top level items three levels. |
| 1613 | |
| 1614 | ‘C’ |
| 1615 | Clear the playlist. |
| 1616 | |
| 1617 | ‘E’ |
| 1618 | Expand everything. |
| 1619 | |
| 1620 | ‘d’ |
| 1621 | View the current directory in dired. |
| 1622 | |
| 1623 | ‘q’ |
| 1624 | Bury the browser buffer. |
| 1625 | |
| 1626 | ‘r’ |
| 1627 | Jump to a random track. |
| 1628 | |
| 1629 | ‘/’ |
| 1630 | Isearch through the buffer. |
| 1631 | |
| 1632 | ‘<’ |
| 1633 | Redisplay with the previous filter. |
| 1634 | |
| 1635 | ‘>’ |
| 1636 | Redisplay with the next filter. |
| 1637 | |
| 1638 | ‘?’ |
| 1639 | See the Emacs documentation for the function. |
| 1640 | |
| 1641 | ‘C-/’ |
| 1642 | Undo the previous playlist action. |
| 1643 | |
| 1644 | ‘<C-return>’ |
| 1645 | Add all tracks at point, and play the first added track. |
| 1646 | |
| 1647 | ‘<backtab>’ |
| 1648 | Jump to the previous non-track element. |
| 1649 | |
| 1650 | ‘<tab>’ |
| 1651 | Jump to the next non-track element. |
| 1652 | |
| 1653 | ‘s A’ |
| 1654 | Search the collection by album. |
| 1655 | |
| 1656 | ‘s o’ |
| 1657 | Search the collection by artist. |
| 1658 | |
| 1659 | ‘s a’ |
| 1660 | Search the collection by artist. |
| 1661 | |
| 1662 | ‘s s’ |
| 1663 | Search the collection by names. |
| 1664 | |
| 1665 | ‘s t’ |
| 1666 | Search the collection by title. |
| 1667 | |
| 1668 | ‘s h’ |
| 1669 | Show the currently active searches in the search cache. |
| 1670 | |
| 1671 | ‘b 1’ |
| 1672 | Browse the collection by artist. |
| 1673 | |
| 1674 | ‘b 2’ |
| 1675 | Browse the collection by album. |
| 1676 | |
| 1677 | ‘b 3’ |
| 1678 | Browse the collection by genre. |
| 1679 | |
| 1680 | ‘b 4’ |
| 1681 | Browse the collection by year. |
| 1682 | |
| 1683 | ‘b 5’ |
| 1684 | Browse the collection by composer. |
| 1685 | |
| 1686 | ‘b 6’ |
| 1687 | Browse the collection by performer. |
| 1688 | |
| 1689 | ‘b 7’ |
| 1690 | Browse the collection by albumartist. |
| 1691 | |
| 1692 | ‘W a p’ |
| 1693 | Lookup the album using Pitchfork. |
| 1694 | |
| 1695 | ‘W o w’ |
| 1696 | Lookup the album artist using Wikipedia. |
| 1697 | |
| 1698 | ‘W A w’ |
| 1699 | Lookup the artist using Wikipedia. |
| 1700 | |
| 1701 | ‘W c w’ |
| 1702 | Lookup the composer using Wikipedia. |
| 1703 | |
| 1704 | ‘W p w’ |
| 1705 | Lookup the performer using Wikipedia. |
| 1706 | |
| 1707 | ‘W a w’ |
| 1708 | Lookup the album using Wikipedia. |
| 1709 | |
| 1710 | ‘+’ |
| 1711 | Raise the volume |
| 1712 | |
| 1713 | ‘-’ |
| 1714 | Lower the volume |
| 1715 | |
| 1716 | ‘i s’ |
| 1717 | Print what is known about the filters and cache |
| 1718 | |
| 1719 | ‘i c’ |
| 1720 | Show the current search cache stack. |
| 1721 | |
| 1722 | ‘i S’ |
| 1723 | Show the cache names in the stash. |
| 1724 | |
| 1725 | ‘i f’ |
| 1726 | Show the filters there are. |
| 1727 | |
| 1728 | ‘i m’ |
| 1729 | Show the menu tree of filters as a menu. |
| 1730 | |
| 1731 | ‘i F’ |
| 1732 | Show the filter factories we have. |
| 1733 | |
| 1734 | ‘i r’ |
| 1735 | Show the filters in the filter ring. |
| 1736 | |
| 1737 | ‘f q’ |
| 1738 | Pop the filter stack returning to last filter. |
| 1739 | |
| 1740 | ‘f r’ |
| 1741 | Reverse the last two entries in the filter stack. |
| 1742 | |
| 1743 | ‘f R’ |
| 1744 | Reverse the last two entries in the filter stack, and pop the top |
| 1745 | one. |
| 1746 | |
| 1747 | ‘f S’ |
| 1748 | Squash the filter stack, keep the top entry. |
| 1749 | |
| 1750 | ‘f k’ |
| 1751 | Register the current filter into the list of filters for the |
| 1752 | session. If EMMS-FILTERS-MULTI-FILTER-SAVE-FILE is set, append the |
| 1753 | filter definition there. |
| 1754 | |
| 1755 | ‘f h’ |
| 1756 | Build a cache from the current filter and push it to the cache |
| 1757 | stack. |
| 1758 | |
| 1759 | ‘f c’ |
| 1760 | Clear the meta filter stack and the current filter function. |
| 1761 | |
| 1762 | ‘>’ |
| 1763 | Move to the next filter in the filter ring. |
| 1764 | |
| 1765 | ‘<’ |
| 1766 | Move to the previous filter in the filter ring. |
| 1767 | |
| 1768 | ‘f !’ |
| 1769 | Set the ring filter to no filter. |
| 1770 | |
| 1771 | ‘f p’ |
| 1772 | Push a filter to the meta-filter stack. |
| 1773 | |
| 1774 | ‘f s’ |
| 1775 | Clear the stack and select a filter to push to the stack. |
| 1776 | |
| 1777 | ‘f o’ |
| 1778 | Add a filter to the current/last filter list in the current filter. |
| 1779 | Creates an OR. |
| 1780 | |
| 1781 | ‘f a’ |
| 1782 | Select a filter to start a new list of filters, creates an AND. |
| 1783 | |
| 1784 | ‘f n’ |
| 1785 | Select a filter to start a new list of filters, creates an AND-NOT |
| 1786 | list of filters. |
| 1787 | |
| 1788 | ‘c C’ |
| 1789 | Reset the cache stack, the filter stack and the filter-ring. |
| 1790 | |
| 1791 | ‘c p’ |
| 1792 | Cache/Store a filter and cache to the stack. |
| 1793 | |
| 1794 | ‘c z’ |
| 1795 | Stash the current cache for later, pop it from the stack. |
| 1796 | |
| 1797 | ‘c Z’ |
| 1798 | Stash the current cache for later. |
| 1799 | |
| 1800 | ‘c P’ |
| 1801 | Pop the current cache from the stack. |
| 1802 | |
| 1803 | ‘c h’ |
| 1804 | Create a cache from the current filter and push to the stack. |
| 1805 | |
| 1806 | ‘c r’ |
| 1807 | Swap the top two caches on the stack. |
| 1808 | |
| 1809 | ‘c q’ |
| 1810 | Pop the top cache from the stack. |
| 1811 | |
| 1812 | ‘c R’ |
| 1813 | Swap the top two caches on the stack, then pop the top one. |
| 1814 | |
| 1815 | ‘c S’ |
| 1816 | Squash the cache stack, keep the top entry. |
| 1817 | |
| 1818 | ‘c c’ |
| 1819 | Clear all the caches down to the main cache. |
| 1820 | |
| 1821 | ‘s o’ |
| 1822 | A fields search, quick one-shot for Album artist, push results to |
| 1823 | the cache stack. |
| 1824 | |
| 1825 | ‘s a’ |
| 1826 | A fields search, quick one-shot for Artist, push results to the |
| 1827 | cache stack. |
| 1828 | |
| 1829 | ‘s c’ |
| 1830 | A fields search, quick one-shot for Composer, push results to the |
| 1831 | cache stack. |
| 1832 | |
| 1833 | ‘s p’ |
| 1834 | A fields search, quick one-shot for Permformer, push results to the |
| 1835 | cache stack. |
| 1836 | |
| 1837 | ‘s A’ |
| 1838 | A fields search, quick one-shot for Album title, push results to |
| 1839 | the cache stack. |
| 1840 | |
| 1841 | ‘s t’ |
| 1842 | A fields search, quick one-shot for Song title, push results to the |
| 1843 | cache stack. |
| 1844 | |
| 1845 | ‘s T’ |
| 1846 | A fields search, quick one-shot for Album and song titles, push |
| 1847 | results to the cache stack. |
| 1848 | |
| 1849 | ‘s n’ |
| 1850 | A fields search, quick one-shot for all names, push results to the |
| 1851 | cache stack. |
| 1852 | |
| 1853 | ‘s s’ |
| 1854 | A fields search, quick one-shot for all names and titles, push |
| 1855 | results to the cache stack. |
| 1856 | |
| 1857 | ‘s e’ |
| 1858 | A fields search, quick one-shot in all text fields, push results to |
| 1859 | the cache stack. |
| 1860 | |
| 1861 | |
| 1862 | File: emms.info, Node: Displaying Covers, Next: Changing Looks, Prev: Browser Interface, Up: The Browser |
| 1863 | |
| 1864 | 17.2 Displaying Covers |
| 1865 | ====================== |
| 1866 | |
| 1867 | The browser will attempt to display cover images if they're available. |
| 1868 | |
| 1869 | Customize EMMS-BROWSER-COVERS to configure how EMMS should retrieve |
| 1870 | the covers. |
| 1871 | |
| 1872 | By default it looks for images ‘cover_small.jpg’, ‘cover_med.jpg’, |
| 1873 | etc. Note that you'll probably want to resize your existing covers to |
| 1874 | particular sizes. Suggested sizes are 100x100 for small, and 200x200 |
| 1875 | for medium. |
| 1876 | |
| 1877 | The above behaviour demands manual processing on behalf of the user. |
| 1878 | Instead, you might prefer to automate the process by setting |
| 1879 | EMMS-BROWSER-COVERS to 'emms-browser-cache-thumbnail': covers matching |
| 1880 | 'emms-browser-thumbnail-filter' will be automatically resized if |
| 1881 | necessary and cached to EMMS-BROWSER-THUMBNAIL-DIRECTORY. The cache |
| 1882 | gets automatically updated upon change in the source folder. |
| 1883 | |
| 1884 | Customize EMMS-BROWSER-COVERS-FILE-EXTENSIONS to include or exclude |
| 1885 | specific extensions. |
| 1886 | |
| 1887 | 'emms-browser-cache-thumbnail' might be everytime a cover is queried, |
| 1888 | so to help with performance you can also set EMMS-BROWSER-COVERS to |
| 1889 | 'emms-browser-cache-thumbnail-async'. The latter is like the former |
| 1890 | except that it caches queries: every subsequent query will be much |
| 1891 | faster. The drawback is that it won't see changes made to covers after |
| 1892 | the first query. To force-refresh the thumbnail cache, you can run |
| 1893 | 'emms-browser-clear-cache-hash'. |
| 1894 | |
| 1895 | Also, Emacs by default will jump around a lot when scrolling a buffer |
| 1896 | with images. In order to prevent that, you can set |
| 1897 | SCROLL-UP-AGGRESSIVELY and SCROLL-DOWN-AGGRESSIVELY to the number "0.0". |
| 1898 | |
| 1899 | To show a 'no cover' image for albums which don't have a cover, add |
| 1900 | the following code to your .emacs: |
| 1901 | |
| 1902 | (setq emms-browser-default-covers |
| 1903 | (list "/path/to/cover_small.jpg" nil nil) |
| 1904 | |
| 1905 | The medium and large images can be set as well. |
| 1906 | |
| 1907 | You can download an example 'no cover' image |
| 1908 | (http://repose.cx/cover_small.jpg). |
| 1909 | |
| 1910 | |
| 1911 | File: emms.info, Node: Changing Looks, Next: Filtering Tracks - deprecated, Prev: Displaying Covers, Up: The Browser |
| 1912 | |
| 1913 | 17.3 Changing Looks |
| 1914 | =================== |
| 1915 | |
| 1916 | The Browser's look can be customised. You can change the way the tree |
| 1917 | structure looks, the display format and display faces. |
| 1918 | |
| 1919 | Changing Tree Structure |
| 1920 | ----------------------- |
| 1921 | |
| 1922 | You can change the way the tree is displayed by setting the value of |
| 1923 | EMMS-BROWSER-TREE-NODE-MAP |
| 1924 | |
| 1925 | (setq emms-browser-tree-node-map emms-browser-tree-node-map-default) |
| 1926 | |
| 1927 | The node map specifies the tree as an alist. Follow the chain of |
| 1928 | fields from the starting browse type to see how the browser tree will be |
| 1929 | built. ie. Starting with album artist yields a tree with album artist, |
| 1930 | artist and album as nodes. |
| 1931 | |
| 1932 | (defvar emms-browser-tree-node-map-default |
| 1933 | '((info-albumartist . info-artist) |
| 1934 | (info-artist . info-album) |
| 1935 | (info-composer . info-album) |
| 1936 | (info-performer . info-album) |
| 1937 | (info-album . info-title) |
| 1938 | (info-genre . info-artist) |
| 1939 | (info-year . info-artist))) |
| 1940 | |
| 1941 | The following code displays artist->track instead of |
| 1942 | artist->album->track when you switch to the 'singles' filter: |
| 1943 | |
| 1944 | (defadvice emms-browser-next-mapping-type |
| 1945 | (after no-album (current-mapping)) |
| 1946 | (when (eq ad-return-value 'info-album) |
| 1947 | (setq ad-return-value 'info-title))) |
| 1948 | |
| 1949 | (defun toggle-album-display () |
| 1950 | (if (string= emms-browser-current-filter-name "singles") |
| 1951 | (ad-activate 'emms-browser-next-mapping-type) |
| 1952 | (ad-deactivate 'emms-browser-next-mapping-type))) |
| 1953 | |
| 1954 | ;; Deprecated use the emms-filters hook instead. |
| 1955 | ;; (add-hook 'emms-browser-filter-changed-hook 'toggle-album-display) |
| 1956 | (add-hook 'emms-filters-filter-changed-hook 'toggle-album-display) |
| 1957 | |
| 1958 | Furthermore, you can customize EMMS-BROWSER-GET-TRACK-FIELD-FUNCTION |
| 1959 | to choose which the metadata fields used for the different tree nodes |
| 1960 | (‘'info-artist’, ‘info-year’, etc.). For instance, you can choose |
| 1961 | whether to organize the tree by artist, album artist or performer. |
| 1962 | |
| 1963 | Changing Display Format |
| 1964 | ----------------------- |
| 1965 | |
| 1966 | Format strings govern the way items are displayed in the browser and |
| 1967 | playlist. You can customize these if you wish. |
| 1968 | |
| 1969 | EMMS-BROWSER-DEFAULT-FORMAT controls the format to use when no other |
| 1970 | format has been explicitly defined. By default, only track and albums |
| 1971 | deviate from the default. |
| 1972 | |
| 1973 | To customise the format of a particular type, find the name of the |
| 1974 | field you want to use (eg 'info-artist', 'info-title', etc), and insert |
| 1975 | that into emms-browser-<type>-format or |
| 1976 | emms-browser-playlist-<type>-format. For example, if you wanted to |
| 1977 | remove track numbers from tracks in both the browser and playlist, you |
| 1978 | could do: |
| 1979 | |
| 1980 | (defvar emms-browser-info-title-format "%i%n") |
| 1981 | (defvar emms-browser-playlist-info-title-format |
| 1982 | emms-browser-info-title-format) |
| 1983 | |
| 1984 | The format specifiers available include: |
| 1985 | |
| 1986 | %i indent relative to the current level |
| 1987 | |
| 1988 | %n the value of the item - eg -info-artist might be "pink floyd" |
| 1989 | |
| 1990 | %y the album year |
| 1991 | |
| 1992 | %A the album name |
| 1993 | |
| 1994 | %a the artist name of the track |
| 1995 | |
| 1996 | %o the album artist name |
| 1997 | |
| 1998 | %t the title of the track |
| 1999 | |
| 2000 | %o the genre of the track |
| 2001 | |
| 2002 | %T the track number |
| 2003 | |
| 2004 | %cS a small album cover |
| 2005 | |
| 2006 | %cM a medium album cover |
| 2007 | |
| 2008 | %cL a big album cover |
| 2009 | |
| 2010 | Note that if you use track-related items like %t, it will take the |
| 2011 | data from the first track. |
| 2012 | |
| 2013 | Changing Display Faces |
| 2014 | ---------------------- |
| 2015 | |
| 2016 | The faces used to display the various fields are also customizable. |
| 2017 | They are in the format emms-browser-<type>-face, where type is one of |
| 2018 | "year/genre", "artist", "album" or "track". Note that faces lack the |
| 2019 | initial "info-" part. For example, to change the artist face, type M-x |
| 2020 | ‘customize-face’ ‘emms-browser-artist-face’. |
| 2021 | |
| 2022 | |
| 2023 | File: emms.info, Node: Filtering Tracks - deprecated, Prev: Changing Looks, Up: The Browser |
| 2024 | |
| 2025 | 17.4 Filtering Tracks - deprecated |
| 2026 | ================================== |
| 2027 | |
| 2028 | Note that these are the directions for creating filters from the browser |
| 2029 | API which now works through the Emms-filters system. |
| 2030 | |
| 2031 | The Emms-filter system obsoletes this method of creating filters. |
| 2032 | However, it is still valid, and will work if you have filters defined in |
| 2033 | this way. |
| 2034 | |
| 2035 | It is recommended that the new filter system is used directly rather |
| 2036 | than building filters in this way. |
| 2037 | |
| 2038 | If you want to display a subset of your collection (such as a |
| 2039 | directory of 80s music, only avi files, etc.) then you can extend the |
| 2040 | Browser by defining "filters". |
| 2041 | |
| 2042 | Show everything: |
| 2043 | |
| 2044 | (emms-browser-make-filter "all" 'ignore) |
| 2045 | |
| 2046 | Set "all" as the default filter: |
| 2047 | |
| 2048 | (emms-browser-set-filter (assoc "all" emms-browser-filters)) |
| 2049 | |
| 2050 | Show all files (no streamlists, etc): |
| 2051 | |
| 2052 | (emms-browser-make-filter |
| 2053 | "all-files" (emms-browser-filter-only-type 'file)) |
| 2054 | |
| 2055 | Show only tracks in one folder: |
| 2056 | |
| 2057 | (emms-browser-make-filter |
| 2058 | "80s" (emms-browser-filter-only-dir "~/Mp3s/80s")) |
| 2059 | |
| 2060 | Show all tracks played in the last month: |
| 2061 | |
| 2062 | (emms-browser-make-filter |
| 2063 | "last-month" (emms-browser-filter-only-recent 30)) |
| 2064 | |
| 2065 | After executing the above commands, you can use M-x |
| 2066 | emms-browser-show-all, emms-browser-show-80s, etc to toggle between |
| 2067 | different collections. Alternatively you can use '<' and '>' to cycle |
| 2068 | through the available filters. |
| 2069 | |
| 2070 | The second argument to make-filter is a function which returns t if a |
| 2071 | single track should be filtered. You can write your own filter |
| 2072 | functions to check the type of a file, etc. |
| 2073 | |
| 2074 | Show only tracks not played in the last year: |
| 2075 | |
| 2076 | (emms-browser-make-filter "not-played" |
| 2077 | (lambda (track) |
| 2078 | (not (funcall (emms-browser-filter-only-recent 365) track)))) |
| 2079 | |
| 2080 | Show all files that are not in the pending directory: |
| 2081 | |
| 2082 | (emms-browser-make-filter |
| 2083 | "all" |
| 2084 | (lambda (track) |
| 2085 | (or |
| 2086 | (funcall (emms-browser-filter-only-type 'file) track) |
| 2087 | (not (funcall |
| 2088 | (emms-browser-filter-only-dir "~/Media/pending") track))))) |
| 2089 | |
| 2090 | |
| 2091 | File: emms.info, Node: The Filter System, Next: Sorting Playlists, Prev: The Browser, Up: Top |
| 2092 | |
| 2093 | 18 The Filter System |
| 2094 | ******************** |
| 2095 | |
| 2096 | The filter system allows you to filter the metadata cache in order |
| 2097 | search and narrow your track data. It is based on a very powerful |
| 2098 | interactive system consistenting of filter and cache stacks which allow |
| 2099 | the creation and manipulation of complex filters and results caches. |
| 2100 | |
| 2101 | The Filter system is defined in ‘emms-filters.el’ and is included as |
| 2102 | part of the Emms-Browser. |
| 2103 | |
| 2104 | Emms-Filters allows you to filter and search the metadata cache. |
| 2105 | This manages the search and filter functionalities of emms-browser. |
| 2106 | |
| 2107 | * Menu: |
| 2108 | |
| 2109 | * Filters and Searches:: A simple overview of the filter system. |
| 2110 | * Backward Compatibility:: Backward compatibility with the Emms Browser. |
| 2111 | * Filter Components:: Definitions of basic terminology used by the filter system. |
| 2112 | * Filter Factories:: Defining filter factories. |
| 2113 | * Factory Registration:: Registering Factories and using the prompting system. |
| 2114 | * Defined Factories:: The built-in factories available |
| 2115 | * Defining Filters:: Defining filters. |
| 2116 | * The Filter Stack:: The filter stack, how it works, how to use it. |
| 2117 | * The Cache Stack:: The cache stack, how to use it. |
| 2118 | * Showing State:: Showing the current state of the filter system. |
| 2119 | |
| 2120 | |
| 2121 | File: emms.info, Node: Filters and Searches, Next: Backward Compatibility, Up: The Filter System |
| 2122 | |
| 2123 | 18.1 Filters and Searches |
| 2124 | ========================= |
| 2125 | |
| 2126 | There is little difference between filtering and searching. Searching |
| 2127 | simply results in a data-cache which is smaller than the original. |
| 2128 | |
| 2129 | The filter system has a cache stack where cached results are kept. |
| 2130 | All subsequent filters and searches use the most current cache. |
| 2131 | |
| 2132 | Filtering results in a rendered view for a subset of what is in the |
| 2133 | data-cache. Complex filters are built interactively on a filter stack |
| 2134 | by combining existing filters and interactively created filters. |
| 2135 | |
| 2136 | A small group of filter factories are used to create filter functions |
| 2137 | which are defined entirely as data. Those filters can be combined with |
| 2138 | each other and with interactively created filters on the filter stack |
| 2139 | with OR, AND, as well as AND-NOT. These more complex filters may also be |
| 2140 | saved and coded entirely as data. In addition the filter stack has |
| 2141 | various commands to manipulate it. Pop, swap, swap-pop, squash and |
| 2142 | clear, among others. |
| 2143 | |
| 2144 | For the concept of searches there is a search cache stack which is a |
| 2145 | stack of emms-cache-db hash tables. The emms-cache-db is always present |
| 2146 | at the base of this stack. Any filtered result may be pushed to this |
| 2147 | stack at any time. Filters always operate against the cache at the top |
| 2148 | of the stack. A cache may be stashed for later, and the usual stack |
| 2149 | manipulation functions exist. Pop, swap, swap-pop, squash, clear, |
| 2150 | stash, and push. |
| 2151 | |
| 2152 | Factories define filters from data and interactively. Factories are |
| 2153 | kept in a ring, and each has a ring of its filters. Interactively |
| 2154 | creating a new filter adds it to the ring for the session. Personal |
| 2155 | filter rings can also be easily added to the filter menu ring. |
| 2156 | |
| 2157 | There is another filter ring, which can have any filters you like, |
| 2158 | and is selectable with < and >. The active filter on the ring combines |
| 2159 | with the filter stack to show the rendered results. |
| 2160 | |
| 2161 | |
| 2162 | File: emms.info, Node: Backward Compatibility, Next: Filter Components, Prev: Filters and Searches, Up: The Filter System |
| 2163 | |
| 2164 | 18.2 Backward Compatibility |
| 2165 | =========================== |
| 2166 | |
| 2167 | Maintaining backward compatibily with the Emmms-browser's previous |
| 2168 | functionality was a prime goal in creating the filter system. Very |
| 2169 | little is left in common, but the Browser's search-by and filtering API |
| 2170 | remains intact and continues to behave as before. Anyone who has made |
| 2171 | filter functions will notice no change in behavior other than there is |
| 2172 | more flexibility in using their functions. |
| 2173 | |
| 2174 | The filter system replaces both emms-browser filters and search-by |
| 2175 | functionalities. The Emms-browser API remains in place, however |
| 2176 | underneath the API it uses the filter system for all of its purposes. |
| 2177 | |
| 2178 | Emms-browser-make-filter and emms-browser-search-by use emms-filters |
| 2179 | for their current functionality. The search-by functionality is quite |
| 2180 | simple. Emulating the browser filters was more complicated and has a |
| 2181 | thin compatibility layer in ‘emms-browser.el’. |
| 2182 | |
| 2183 | In all cases, obtaining the same functionalities soley within |
| 2184 | emms-filters is simpler and and more powerful. |
| 2185 | |
| 2186 | Emms-browser-filter functions are specified to return an inverted |
| 2187 | value. the old ‘emms-browser-make-filter’ had a slightly different |
| 2188 | mechanism from the filter system's ‘emms-filters-make-filter’. |
| 2189 | emms-browser-make-filter has been modified to pass its filters to the |
| 2190 | emms-filter system. Those filters will be properly inverted and added |
| 2191 | to the known emms-filters-filters and to the emms-filters-filter-ring |
| 2192 | which emulates the original browser filter ring. This provides a |
| 2193 | seamless experience for previous users of emms-browser filtering. As |
| 2194 | the EMMS-FILTERS-FILTER-RING is functionally equivalent to the browser's |
| 2195 | filter ring. |
| 2196 | |
| 2197 | The browser's 'Search-by' was just one filter factory, which |
| 2198 | corresponds to the filter system's 'fields search' factory, and searches |
| 2199 | are not inverted. The only real difference between the browser's filter |
| 2200 | and a search was that a filter was rendered and a search was saved to a |
| 2201 | hash for subsequent filtering. Filters couldn't filter a search, and |
| 2202 | neither could work against anything but the Emms-cache-db. The |
| 2203 | equivalent to the emms-browser search-by is just a one shot interactive |
| 2204 | 'new fields-search' filter factory that saves a cache and then removes |
| 2205 | itself. |
| 2206 | |
| 2207 | Emms-Filters is agnostic about the renderer. Currently there has |
| 2208 | been a lot of effor to maintain backward compatibity with the |
| 2209 | Emms-browser as its functionality was replaced. There are the following |
| 2210 | hooks that any renderer could use in order to leverage Emms-Filters. |
| 2211 | |
| 2212 | To maintain independence there are three hook variables which allow |
| 2213 | emms-filters to interact with the Emms-Browsers functionality. |
| 2214 | |
| 2215 | The first is a defcustom hook to mirror the browser's deprecated hook |
| 2216 | of the same name. The second hook happens just after, and is for any |
| 2217 | renderer that wishes to re-render when a filter changes. The third hook |
| 2218 | is to tell any renderer to expand its render if there is a filter or |
| 2219 | cache stack entry present. |
| 2220 | |
| 2221 | This a defcustom hook that is run anytime the filters change |
| 2222 | EMMS-FILTERS-FILTER-CHANGED-HOOK |
| 2223 | |
| 2224 | (add-hook 'emms-filters-filter-changed-hook 'my-filters-have-changed-function) |
| 2225 | |
| 2226 | The following two hooks are for the renderers which is currently just |
| 2227 | the Emms-Browser. These hooks are the mechanism used to actually filter |
| 2228 | and render the tracks. |
| 2229 | |
| 2230 | When the filter or cache changes Emms-Filters needs to tell the |
| 2231 | renderer to re-build its hash and display it. For this purpose there is |
| 2232 | another hook, the EMMS-FILTERS-MAKE-AND-RENDER-HASH-HOOK. |
| 2233 | |
| 2234 | The Emms-browser function for this is emms-browse-by. This function |
| 2235 | applies the filters, creates a hash, and then populates and renders a |
| 2236 | tree of data. |
| 2237 | (add-hook 'emms-filters-make-and-render-hash-hook 'emms-browse-by) |
| 2238 | |
| 2239 | The last hook is the EMMS-FILTERS-EXPAND-RENDER-HOOK. This is just |
| 2240 | so that Emms-Filters can tell the renderer to expand its tree when there |
| 2241 | is a filter or cache stack present and something has changed. For |
| 2242 | Emms-Browser this is the function emms-browser-expand-all |
| 2243 | |
| 2244 | ;; (add-hook 'emms-filters-expand-render-hook 'emms-browser-expand-all) |
| 2245 | |
| 2246 | The filter system is much more powerful than the previous system of |
| 2247 | filtering and searching and is much easier to use both in code and |
| 2248 | interactively while searching your tracks. |
| 2249 | |
| 2250 | Here is a summary of differences and features of the filter system. |
| 2251 | |
| 2252 | • Filters, no matter the complexity, are defined entirely as data. |
| 2253 | • Filters can be combined with AND, OR as well as AND-NOT. |
| 2254 | • Filters return true if they match the tracks. |
| 2255 | • Filters are lambda functions created with factories from data. |
| 2256 | • There is no difference between a search function and a filter |
| 2257 | function. |
| 2258 | • The factory should wrap the lambda in a let with lexical-binding t. |
| 2259 | • The factories and the filters must both be registered with |
| 2260 | Emms-filters. |
| 2261 | • Registered factories have a built in interactive prompting system. |
| 2262 | • Any results can be pushed to the cache stack for future filters and |
| 2263 | searches. |
| 2264 | • Complex filters are created interactively on the filter stack. |
| 2265 | • Searches are interactively created filters which leave a cache on |
| 2266 | the stack. |
| 2267 | • Interactively created filters can be saved as data for later use. |
| 2268 | • Interactively created filters remain in the filter selection menu |
| 2269 | for the session. |
| 2270 | |
| 2271 | |
| 2272 | File: emms.info, Node: Filter Components, Next: Filter Factories, Prev: Backward Compatibility, Up: The Filter System |
| 2273 | |
| 2274 | 18.3 Filter Components |
| 2275 | ====================== |
| 2276 | |
| 2277 | --------------------------------------------- The filter system consists |
| 2278 | of a few different mechanisms. There are factories to make filters. |
| 2279 | There is the filter stack to manage the creation and use of filters. |
| 2280 | Filters can be made of filters. |
| 2281 | |
| 2282 | There is the cache stack to handle the saving of a set of filtered |
| 2283 | results into a reduced database cache for subsequent filters. |
| 2284 | |
| 2285 | There is the filter ring for quickly switching between commonly used |
| 2286 | filters. This filter is combined with the current filter stack to |
| 2287 | render results. |
| 2288 | |
| 2289 | • Filter Factories - To make filter functions. |
| 2290 | • Filters - Defined as data. Dynamically created lambda functions. |
| 2291 | • Filter menu - A customizable ring of factories and their rings of |
| 2292 | filters. |
| 2293 | • Multi-filter - A filter factory to create filters made of filters. |
| 2294 | • Meta-filter - A multi-filter data definition. |
| 2295 | • The filter stack - A meta-filter manipulator and multi-filter |
| 2296 | creator. |
| 2297 | • The cache stack - A stack of database caches. |
| 2298 | • The filter ring - A subset of convenient to use filters. |
| 2299 | |
| 2300 | |
| 2301 | File: emms.info, Node: Filter Factories, Next: Factory Registration, Prev: Filter Components, Up: The Filter System |
| 2302 | |
| 2303 | 18.4 Filter Factories |
| 2304 | ===================== |
| 2305 | |
| 2306 | --------------------------------------------- Filter factories make |
| 2307 | filters which are simply test functions which take a track and return |
| 2308 | true or false. |
| 2309 | |
| 2310 | Factories are registered with the Emms-filter system so that they |
| 2311 | have names that can be referenced later. Additionally, registration |
| 2312 | includes a prompt and parameter definition. This allows the |
| 2313 | Emms-filters prompting system to provide an interactive interface to any |
| 2314 | filter factory in order to create new filters at any time. |
| 2315 | |
| 2316 | Filter factories depend upon lexical context of their parameters. In |
| 2317 | order to have data values that stick after function creation there is |
| 2318 | let with lexical-binding to ensure the factory behaves as expected. |
| 2319 | This transfers the values to local values and uses them as normal within |
| 2320 | the returned #'(lambda (track)...) anonymous function. |
| 2321 | |
| 2322 | As an example, here is the generic field-compare function. It takes |
| 2323 | an operator function, a field name and the value to compare. This |
| 2324 | single function can be a new factory for any data field using any |
| 2325 | comparison function we would like. |
| 2326 | |
| 2327 | (defun emms-filters-make-filter-field-compare (operator-func field compare-val) |
| 2328 | "Make a filter that compares FIELD to COMPARE-VALUE with OPERATOR-FUNC. |
| 2329 | Works for number fields and string fields provided the appropriate |
| 2330 | type match between values and the comparison function. Partials can |
| 2331 | easily make more specific factory functions from this one." |
| 2332 | (let ((local-operator operator-func) |
| 2333 | (local-field field) |
| 2334 | (local-compare-val compare-val)) |
| 2335 | #'(lambda (track) |
| 2336 | (let ((track-val (emms-track-get track local-field))) |
| 2337 | (and |
| 2338 | track-val |
| 2339 | (funcall local-operator local-compare-val track-val)))))) |
| 2340 | |
| 2341 | |
| 2342 | File: emms.info, Node: Factory Registration, Next: Defined Factories, Prev: Filter Factories, Up: The Filter System |
| 2343 | |
| 2344 | 18.5 Factory Registration |
| 2345 | ========================= |
| 2346 | |
| 2347 | Registering a factory associates a name, a function and a list of prompt |
| 2348 | definitions so that we may create filters interactively by name. The |
| 2349 | prompting system will coerce the values given to the specified type |
| 2350 | providing select lists as indicated. |
| 2351 | |
| 2352 | The factory prompt data is used to interactively create new filters. |
| 2353 | A prompt is (prompt (type . select-list)) if there is no select list we |
| 2354 | read the value and coerce the value to the type as needed. |
| 2355 | |
| 2356 | These are the known coercion types. |
| 2357 | |
| 2358 | • :number |
| 2359 | • :string |
| 2360 | • :list |
| 2361 | • :symbol |
| 2362 | • :function |
| 2363 | |
| 2364 | Here is the Genre Factory which is actually made from the |
| 2365 | field-compare factory. This is a common pattern to create a simpler |
| 2366 | factory from a more complex one. It is simply a partial that is |
| 2367 | registered directly with a different set of prompts. In this case |
| 2368 | 'Genre:' is the prompt and it is expected to be a string. |
| 2369 | |
| 2370 | (emms-filters-register-filter-factory |
| 2371 | "Genre" |
| 2372 | (apply-partially 'emms-filters-make-filter-field-compare |
| 2373 | 'string-equal-ignore-case 'info-genre) |
| 2374 | '(("Genre: " (:string . nil))));; |
| 2375 | |
| 2376 | The registration for the compare field factory is more complex |
| 2377 | because of the prompting for all the parameters. By changing just the |
| 2378 | registration name and the prompts we can create two factories, one for |
| 2379 | numbers and one for strings. Note the use of the ' and , to force the |
| 2380 | select lists to resolve within the lambda. |
| 2381 | |
| 2382 | Here is the registration for the number field compare factory. The |
| 2383 | operator function has a select list of number comparison functions. The |
| 2384 | field name has a select list of known numeric field names and the value |
| 2385 | to compare must be a number and will be coerced as needed. |
| 2386 | |
| 2387 | (emms-filters-register-filter-factory "Number field compare" |
| 2388 | 'emms-filters-make-filter-field-compare |
| 2389 | ;; prompts |
| 2390 | `(("Compare Function: " |
| 2391 | (:function . ,emms-filters-number-compare-functions)) |
| 2392 | ("Field name: " |
| 2393 | (:symbol . ,emms-filters-number-field-names)) |
| 2394 | ("Compare to: " |
| 2395 | (:number . nil)))) |
| 2396 | |
| 2397 | |
| 2398 | File: emms.info, Node: Defined Factories, Next: Defining Filters, Prev: Factory Registration, Up: The Filter System |
| 2399 | |
| 2400 | 18.6 Defined Factories |
| 2401 | ====================== |
| 2402 | |
| 2403 | There are a number of defined factories derived from just a few |
| 2404 | functions. Most common filters can be easily made with these. There |
| 2405 | are a few predifined filters, but that has been kept to a minimum as |
| 2406 | filters can be a very personal thing. There are already filters for |
| 2407 | every track type and there many common genres and year range filters by |
| 2408 | decade. |
| 2409 | |
| 2410 | Filter factories like artist, album artist, composer, Names, etc. |
| 2411 | are all just specialized field compare or the fields search factories. |
| 2412 | |
| 2413 | Filter factories include the following. |
| 2414 | |
| 2415 | • Album |
| 2416 | • Album-artist |
| 2417 | • All text fields |
| 2418 | • Artist |
| 2419 | • Artists |
| 2420 | • Artists and composer |
| 2421 | • Composer |
| 2422 | • Directory |
| 2423 | • Duration less |
| 2424 | • Duration more |
| 2425 | • Fields search |
| 2426 | • Genre |
| 2427 | • Greater than Year |
| 2428 | • Less than Year |
| 2429 | • Multi-filter |
| 2430 | • Names |
| 2431 | • Names and titles |
| 2432 | • Not played since |
| 2433 | • Notes |
| 2434 | • Number field compare |
| 2435 | • Orchestra |
| 2436 | • Performer |
| 2437 | • Played since |
| 2438 | • String field compare |
| 2439 | • Title |
| 2440 | • Titles |
| 2441 | • Track type |
| 2442 | • Year range |
| 2443 | |
| 2444 | |
| 2445 | File: emms.info, Node: Defining Filters, Next: The Filter Stack, Prev: Defined Factories, Up: The Filter System |
| 2446 | |
| 2447 | 18.7 Defining Filters |
| 2448 | ===================== |
| 2449 | |
| 2450 | Making a filter in elisp from a factory is easy. |
| 2451 | |
| 2452 | (emms-filters-make-filter <Factory Name> <Filter Name> <Factory |
| 2453 | Parameters>) |
| 2454 | |
| 2455 | The Genre Factory takes one string argument. |
| 2456 | (emms-filters-make-filter "Genre" "My Genre filter" "Somevalue") |
| 2457 | |
| 2458 | Make a lot of filters at once with emms-filters-make-filters. |
| 2459 | |
| 2460 | (emms-filters-make-filters '(("Genre" "Waltz" "waltz") |
| 2461 | ("Genre" "Salsa" "salsa") |
| 2462 | ("Genre" "Blues" "blues") |
| 2463 | ("Genre" "Jazz" "jazz"))) |
| 2464 | |
| 2465 | Filters can be easily created interactivly. Just push a filter onto |
| 2466 | the stack with ‘emms-filters-push’, ‘emms-filters-and’, |
| 2467 | ‘emms-filters-or’, ‘emms-filters-and-not’, or ‘emms-filters-squash’, |
| 2468 | select 'new filter' then your factory and follow the prompts. |
| 2469 | |
| 2470 | Filters are added by name to their respective factory's filter ring. |
| 2471 | Here are some more complex filter definitions including some |
| 2472 | Multi-filter definitions, or meta-filters which are simply lists of |
| 2473 | filters by name, they are functionally equivalent to what is being built |
| 2474 | by the filter stack. |
| 2475 | |
| 2476 | (setq tango-filters |
| 2477 | '(("Year range" "1900-1929" 1900 1929) |
| 2478 | ("Year range" "1929-1937" 1929 1937) |
| 2479 | |
| 2480 | ("Directory" "tangotunes" "tangotunesflac") |
| 2481 | |
| 2482 | ("Genre" "Vals" "vals") |
| 2483 | ("Genre" "Tango" "tango") |
| 2484 | ("Genre" "Milonga" "milonga") |
| 2485 | |
| 2486 | ("Multi-filter" |
| 2487 | "1900-1937" |
| 2488 | (("1900-1929" "1929-1937"))) |
| 2489 | |
| 2490 | ("Multi-filter" |
| 2491 | "Vals | milonga" |
| 2492 | (("Vals" "Milonga"))) |
| 2493 | |
| 2494 | ("Multi-filter" |
| 2495 | "Vals 1900-1929" |
| 2496 | (("Vals") ("1900-1929"))) |
| 2497 | |
| 2498 | ("Multi-filter" |
| 2499 | "Not vals" |
| 2500 | ((:not "Vals"))) |
| 2501 | |
| 2502 | ("Multi-filter" |
| 2503 | "Vals or milonga 1900-1937" |
| 2504 | (("Vals" "Milonga") |
| 2505 | ("1900-1929" "1929-1937"))) |
| 2506 | )) |
| 2507 | |
| 2508 | (emms-filters-make-filters tango-filters) |
| 2509 | |
| 2510 | A new entry in the Factory ring along with it's filters can also be |
| 2511 | easily added. This function deconstructs the definitions to facilitate |
| 2512 | the ease of addition. It can also be made from a simple list of names |
| 2513 | as well. The filters will appear both under their respective factories, |
| 2514 | and under this new menu item 'Tango'. They are not recreated, but |
| 2515 | simply listed by their names to be chosen. |
| 2516 | |
| 2517 | (emms-filters-add-to-filter-menu-from-filter-list "Tango" tango-filters) |
| 2518 | |
| 2519 | Here is the easiest way to make the filter ring as used by the |
| 2520 | Browser. It is just a list of filter names. |
| 2521 | |
| 2522 | (emms-filters-make-filter-ring '("Tango" "Vals" "Milonga")) |
| 2523 | |
| 2524 | The filter menu is automatically constructed as a ring of factory |
| 2525 | names as 'folders' that have a ring of filters. This filter menu tree |
| 2526 | can be added to in various ways. 'Keeping' a filter on the filter stack |
| 2527 | will temporarily add the multi-filter defined by the filter stack to the |
| 2528 | multi-filter ring. |
| 2529 | |
| 2530 | There are other ways to add to the filter menu tree. |
| 2531 | ‘emms-filters-add-to-filter-menu-from-filter-list’ is used to |
| 2532 | deconstruct a variable holding filter defintions as in the example above |
| 2533 | in order to create a new ring in the menu tree. |
| 2534 | |
| 2535 | In turn that function uses ‘emms-filters-add-to-filter-menu’ which |
| 2536 | takes a folder name and a filter or list of filters to place in the |
| 2537 | ring. The function ‘emms-filters-add-name-to-filter-menu’ will add a |
| 2538 | filter by name to an existing filter folder/factory. |
| 2539 | |
| 2540 | It is also possible to view the filter menu tree as a message with |
| 2541 | ‘emms-filters-show-filter-menu’ |
| 2542 | |
| 2543 | |
| 2544 | File: emms.info, Node: The Filter Stack, Next: The Cache Stack, Prev: Defining Filters, Up: The Filter System |
| 2545 | |
| 2546 | 18.8 The Filter Stack |
| 2547 | ===================== |
| 2548 | |
| 2549 | The filter stack builds more complex filters as you push filters to it. |
| 2550 | Adding to the filter or replacing it with another push creates a new |
| 2551 | meta-filter and it's multi-filter function to the filter stack. To |
| 2552 | return to the previous filter simply pop the stack. Each change to the |
| 2553 | stack, creates a meta-filter and it's corresponding constructed |
| 2554 | meta-filter. Any change results in a new 'current' multi-filter. The |
| 2555 | filters are represesented as are constructed names of the filters that |
| 2556 | created it. |
| 2557 | |
| 2558 | The filter stack uses meta-filters in a cons like this; (name . |
| 2559 | meta-filter). Filter names for meta-filters can be easily constructed |
| 2560 | from the filters they are made from. They aren't short but they work |
| 2561 | well enough. |
| 2562 | |
| 2563 | To use a filter, ‘emms-filters-push’ it to create a new current |
| 2564 | filter on the stack. It will become a meta-filter on the filter stack |
| 2565 | and the current active filter will be a multi-filter version of it. The |
| 2566 | functions required to construct the current multi-filter are resolved at |
| 2567 | this time in a new multi-filter lambda function. |
| 2568 | |
| 2569 | The filter ring works independently of the filter stack. Each |
| 2570 | re-filtering of tracks uses the current ring filter and the current |
| 2571 | filter together. |
| 2572 | |
| 2573 | A filter on the stack can be 'kept'. The function |
| 2574 | ‘emms-filters-keep’ will create and register a multi-filter of the |
| 2575 | current filter, adding it to the multi-filter menu. This only lasts |
| 2576 | until the current Emacs session ends. If |
| 2577 | EMMS-FILTERS-MULTI-FILTER-SAVE-FILE is set, keep will append a usable |
| 2578 | filter definition to the file for reuse as you wish. |
| 2579 | |
| 2580 | Other commands for manipulating the stack are listed here. Most |
| 2581 | should be self explanatory, Squash clears the stack, leaving the topmost |
| 2582 | filter. Smash is a clear followed by a push. |
| 2583 | |
| 2584 | • ‘emms-filters-pop’ |
| 2585 | • ‘emms-filters-squash’ |
| 2586 | • ‘emms-filters-smash’ |
| 2587 | • ‘emms-filters-clear’ |
| 2588 | • ‘emms-filters-swap’ |
| 2589 | • ‘emms-filters-swap-pop’ |
| 2590 | • ‘emms-filters-keep’ |
| 2591 | |
| 2592 | An initial filter can be created with ‘emms-filters-push’ or |
| 2593 | ‘emms-filters-smash’ which is a clear followed by a push. |
| 2594 | |
| 2595 | Adding to the filter stack is done with ‘emms-filters-and’, |
| 2596 | ‘emms-filters-or’, ‘emms-filters-and-not’, |
| 2597 | |
| 2598 | |
| 2599 | File: emms.info, Node: The Cache Stack, Next: Showing State, Prev: The Filter Stack, Up: The Filter System |
| 2600 | |
| 2601 | 18.9 The Cache Stack |
| 2602 | ==================== |
| 2603 | |
| 2604 | The cache stack is a simply a stack of emms-cache-db style hash tables. |
| 2605 | The full emms-cache-db is at the base of the stack and is always there. |
| 2606 | Each entry in the stack is a subset of the cache below it as a result of |
| 2607 | filtering. The stack entry names are constructed from the filters which |
| 2608 | created them. |
| 2609 | |
| 2610 | Filtering and displaying of tracks is done against the top cache on |
| 2611 | the stack. |
| 2612 | |
| 2613 | The function, ‘emms-filters-hard-filter’ is the most common way to |
| 2614 | create an entry on the cache stack. It creates a cache from the current |
| 2615 | filter and cache, and pushes it to the stack. This does render the |
| 2616 | current filter as non-effective, so it can be cleared, or continue to |
| 2617 | grow depending on your desires. It can be useful to just keep going so |
| 2618 | that returning to the previous state is possible. |
| 2619 | |
| 2620 | One of the driving forces with creating cache entries was the way |
| 2621 | that the Emms-browser has always done searching. To this end, |
| 2622 | additional functionality was created to better emulate the browser's way |
| 2623 | of doing things. However the cache stack provides a lot of flexibility |
| 2624 | and power in how you navigate and search your music. Simply being able |
| 2625 | to repeatedly search and narrow the data is quite powerful all by |
| 2626 | itself. |
| 2627 | |
| 2628 | One-Shot filtering allows behavioral backward compatibility with the |
| 2629 | browser. One shots were created to emulate the browser's behavior of |
| 2630 | creating a subset cache from search-by. One shots push a filter, save |
| 2631 | to the cache stack and pop the filter, leaving only the cache. |
| 2632 | |
| 2633 | Using ‘emms-filters-one-shot’ will push a filter, push a cache, then |
| 2634 | pop the filter. It will interactively prompt for a factory, the filter, |
| 2635 | and then the filter parameters to create a filter if none is given. |
| 2636 | ‘emms-filters-quick-one-shot’ takes a factory name, and invokes the |
| 2637 | interactive creation of a new filter with that factory directly. The |
| 2638 | command ‘emms-filters-fields-search-quick-one-shot’ is a one-shot using |
| 2639 | the fields-search filter factory, while adding to the fields-search ring |
| 2640 | in the filter menu-tree. The fields-search factory is the filter |
| 2641 | system's way of emulating browser's search-by functionality. |
| 2642 | |
| 2643 | These functions effectively allow the emulation of the browser's |
| 2644 | search behavior of quickly prompting, filtering and pushing a cache |
| 2645 | followed by a pop of the filter used. By the grace of that, simple |
| 2646 | wrapper functions for each of the browser's search functions were |
| 2647 | created using emms-filters-quick-one-shot. These functions are named |
| 2648 | after their browser equivalents as emms-filters-search-by-<field-names>. |
| 2649 | The browser search functions now call these filter system functions |
| 2650 | directly. |
| 2651 | |
| 2652 | Manipulating the cache stack is similar to manipulating the filter |
| 2653 | stack, The usual stack commands are: |
| 2654 | • ‘emms-filters-pop-cache’ |
| 2655 | • ‘emms-filters-squash-caches’ |
| 2656 | • ‘emms-filters-clear-caches’ |
| 2657 | • ‘emms-filters-swap-cache’ |
| 2658 | • ‘emms-filters-swap-pop-cache’ |
| 2659 | • ‘emms-filters-push-cache’ |
| 2660 | • ‘emms-filters-stash-cache’ |
| 2661 | • ‘emms-filters-stash-pop-cache’ |
| 2662 | |
| 2663 | The functions ‘emms-filters-push-cache’, ‘emms-filters-stash-cache’ |
| 2664 | and ‘emms-filters-stash-pop-cache’ allow for a cache to be stashed and |
| 2665 | then later pushed back to the stack. The current cache on the stack can |
| 2666 | be stashed at anytime. The stashed caches will be a selection ring for |
| 2667 | ‘emms-filters-push-cache’. |
| 2668 | |
| 2669 | |
| 2670 | File: emms.info, Node: Showing State, Prev: The Cache Stack, Up: The Filter System |
| 2671 | |
| 2672 | 18.10 Showing State |
| 2673 | =================== |
| 2674 | |
| 2675 | There are various functions that enable a view of all that is going on |
| 2676 | within the filter system. At the top level these are simply emacs |
| 2677 | messages which can be easily dismissed. Just below them, are equivalent |
| 2678 | functions that give formatted string versions for use as you like. |
| 2679 | |
| 2680 | The registered filter factories can be shown with |
| 2681 | ‘emms-filters-show-filter-factories’, the registered filters can be |
| 2682 | shown with ‘emms-filters-show-filters’. The |
| 2683 | ‘emms-filters-show-filter-menu’ will show the current filter menu tree. |
| 2684 | |
| 2685 | The current filter ring can be shown with |
| 2686 | ‘emms-filters-show-filter-ring’ and the filter stack can be shown with |
| 2687 | ‘emms-filters-current-meta-filter’. |
| 2688 | |
| 2689 | In code, the current filter name can be obtained with the |
| 2690 | ‘emms-filters-current-meta-filter-name’. The current ring filter name |
| 2691 | can be obtained with ‘emms-filters-current-ring-filter-name’ |
| 2692 | |
| 2693 | Showing the cache stack is done with ‘emms-filters-show-cache-stack’. |
| 2694 | Any stashed caches can be seen with ‘emms-filters-show-cache-stash’ |
| 2695 | which will also appear in the menu invoked by ‘emms-filters-push-cache’. |
| 2696 | |
| 2697 | Finally for a more complete report of the system use |
| 2698 | ‘emms-filters-status-print’ which is a message of the formatted string |
| 2699 | given by ‘emms-filters-status’. |
| 2700 | |
| 2701 | In turn, the ‘emms-filters-status’ is simply a format of the |
| 2702 | following four functions that give formatted strings of the moving parts |
| 2703 | of the filter system. |
| 2704 | |
| 2705 | • ‘emms-filters-current-ring-filter’ |
| 2706 | • ‘emms-filters-current-meta-filter’ |
| 2707 | • ‘emms-filters-format-stack’ |
| 2708 | • ‘emms-filters-format-cache-stack’ |
| 2709 | |
| 2710 | |
| 2711 | File: emms.info, Node: Sorting Playlists, Next: Persistent Playlists, Prev: The Filter System, Up: Top |
| 2712 | |
| 2713 | 19 Sorting Playlists |
| 2714 | ******************** |
| 2715 | |
| 2716 | The 'emms-playlist-sort' module, defined in the ‘emms-playlist-sort.el’ |
| 2717 | package provides functions for sorting Emms playlists, as well as |
| 2718 | keyboard shortcuts for invoking the functions in the playlist buffer. |
| 2719 | Most of the functions will sort in reverse order if the command is |
| 2720 | preceded by a prefix. 'emms-playlist-sort' can be loaded by invoking: |
| 2721 | |
| 2722 | (require 'emms-playlist-sort) |
| 2723 | |
| 2724 | -- Function: emms-playlist-sort-by-info-artist |
| 2725 | Sort by artist name. |
| 2726 | |
| 2727 | -- Function: emms-playlist-sort-by-info-albumartist |
| 2728 | Sort by albumartist name. |
| 2729 | |
| 2730 | -- Function: emms-playlist-sort-by-play-count |
| 2731 | Sort by number of times the track has been played. |
| 2732 | |
| 2733 | -- Function: emms-playlist-sort-by-info-album |
| 2734 | Sort by album name. |
| 2735 | |
| 2736 | -- Function: emms-playlist-sort-by-last-played |
| 2737 | Sort by time the track was played last. |
| 2738 | |
| 2739 | -- Function: emms-playlist-sort-by-info-title |
| 2740 | Sort by track title. |
| 2741 | |
| 2742 | -- Function: emms-playlist-sort-by-file-extension |
| 2743 | Sort by filename extension. |
| 2744 | |
| 2745 | -- Function: emms-playlist-sort-by-info-performer |
| 2746 | Sort by performer name. |
| 2747 | |
| 2748 | -- Function: emms-playlist-sort-by-info-year |
| 2749 | Sort by year. |
| 2750 | |
| 2751 | -- Function: emms-playlist-sort-by-info-note |
| 2752 | Sort by track notes. |
| 2753 | |
| 2754 | -- Function: emms-playlist-sort-by-info-composer |
| 2755 | Sort by composer. |
| 2756 | |
| 2757 | -- Function: emms-playlist-sort-by-name |
| 2758 | Sort by track name. |
| 2759 | |
| 2760 | -- Function: emms-playlist-sort-by-file-mtime |
| 2761 | Sort by file mtime. |
| 2762 | |
| 2763 | -- Function: emms-playlist-sort-by-random |
| 2764 | Sort randomly. Alias for 'emms-shuffle'. |
| 2765 | |
| 2766 | -- Function: emms-playlist-shuffle |
| 2767 | Alias for 'emms-playlist-sort-by-random' and 'emms-shuffle'. |
| 2768 | |
| 2769 | |
| 2770 | File: emms.info, Node: Persistent Playlists, Next: Editing Tracks, Prev: Sorting Playlists, Up: Top |
| 2771 | |
| 2772 | 20 Persistent Playlists |
| 2773 | *********************** |
| 2774 | |
| 2775 | The Emms module ‘emms-history.el’ makes playlists persistent over emacs |
| 2776 | sessions. To make use of this feature put this into your ~/.emacs. |
| 2777 | |
| 2778 | (require 'emms-history) |
| 2779 | |
| 2780 | When you kill emacs all playlists will be saved in the file given by |
| 2781 | the variable: |
| 2782 | |
| 2783 | -- User Option: emms-history-file |
| 2784 | The file to save playlists in. It defaults to |
| 2785 | "~/.emacs.d/emms-history". |
| 2786 | |
| 2787 | After you started up emacs again, you can restore all saved playlists |
| 2788 | with this function. |
| 2789 | |
| 2790 | -- Function: emms-history-load |
| 2791 | Restore all playlists in 'emms-history-file'. |
| 2792 | |
| 2793 | If that should be done automatically on each startup, put these lines |
| 2794 | into your ~/.emacs. |
| 2795 | |
| 2796 | (require 'emms-history) |
| 2797 | (emms-history-load) |
| 2798 | |
| 2799 | Normally ‘emms-history’ only restores playlists. If you want it to |
| 2800 | start playback afterwards, you can tweak this variable. |
| 2801 | |
| 2802 | -- User Option: emms-history-start-playing |
| 2803 | If non-nil emms starts playing the current track after |
| 2804 | 'emms-history-load' was invoked. The default value is nil. |
| 2805 | |
| 2806 | |
| 2807 | File: emms.info, Node: Editing Tracks, Next: Emms Mode Line, Prev: Persistent Playlists, Up: Top |
| 2808 | |
| 2809 | 21 Editing Tracks |
| 2810 | ***************** |
| 2811 | |
| 2812 | Using ‘emms-tag-editor.el’, emms can set tag informations of tracks and |
| 2813 | write them back to the file with the help of external programs, such as |
| 2814 | 'mid3v2' and 'vorbiscomment'. |
| 2815 | |
| 2816 | Use the keybinding ‘E’ to edit the tags of track under point in the |
| 2817 | playlist or all marked tracks (*note Markable Playlists:: for how to |
| 2818 | mark tracks). The track's tag informations are listed in a special |
| 2819 | buffer '*Emms-TAGS*' in text format. Field names are marked in bold |
| 2820 | face and are not editable. Any tag information is placed behind an |
| 2821 | equal sign and is changable. A special field 'name' is the track's file |
| 2822 | name. If any change is made in this field, the track's file will be |
| 2823 | renamed to the new name. When you finished editing the tag infos use |
| 2824 | ‘C-c C-c’ (which calls ‘emms-tag-editor-submit-and-exit’) to submit the |
| 2825 | changes and close the '*Emms-TAGS*' buffer. |
| 2826 | |
| 2827 | There are a few commands to perform changes on all tracks. |
| 2828 | |
| 2829 | -- Function: emms-tag-editor-set-all tag value |
| 2830 | Set TAG to VALUE in all tracks. |
| 2831 | |
| 2832 | If transient-mark-mode is turned on, you can apply the command to a |
| 2833 | selected region. |
| 2834 | |
| 2835 | If 'transient-mark-mode' is on and the mark is active, the changes |
| 2836 | will only take effect on the tracks in the region. |
| 2837 | |
| 2838 | -- Function: emms-tag-editor-replace-in-tag tag from to |
| 2839 | Query and replace text in selected TAG. |
| 2840 | |
| 2841 | For example, if the info-title tag is selected, then only perform |
| 2842 | replacement in title tags. |
| 2843 | |
| 2844 | If 'transient-mark-mode' is on and the mark is active, the changes |
| 2845 | will only take effect on the tracks in the region. |
| 2846 | |
| 2847 | -- Function: emms-tag-editor-transpose-tag tag1 tag2 |
| 2848 | Transpose value of TAG1 and TAG2. |
| 2849 | |
| 2850 | If 'transient-mark-mode' is on and the mark is active, the changes |
| 2851 | will only take effect on the tracks in the region. |
| 2852 | |
| 2853 | -- Function: emms-tag-editor-submit arg |
| 2854 | Make modified tags take affect. |
| 2855 | |
| 2856 | With prefix argument, bury the tag edit buffer. |
| 2857 | |
| 2858 | If you want to extend the tag editor to work with file formats other |
| 2859 | than 'mp3' and 'ogg', have a look at these variables. |
| 2860 | |
| 2861 | -- Variable: emms-tag-editor-formats |
| 2862 | This variable determine how to insert track fields to |
| 2863 | 'emms-tag-editor-edit-buffer'. Emms tag info editable fields is |
| 2864 | usually determined by the extension of track name. The variable |
| 2865 | 'emms-tag-editor-tags' contains all tags that emms track may have. |
| 2866 | A single charactar is assigned to the tag to make the |
| 2867 | 'emms-tag-editor-formats' easier to generate. |
| 2868 | |
| 2869 | -- Variable: emms-tag-editor-tagfile-functions |
| 2870 | To write tags to track file, an extern program should specified in |
| 2871 | this variable. |
| 2872 | |
| 2873 | Renaming Files |
| 2874 | ============== |
| 2875 | |
| 2876 | The tag editor is also capable to rename the file of the track at point |
| 2877 | or all files of the marked tracks according to the value this variable. |
| 2878 | |
| 2879 | -- User Option: emms-tag-editor-rename-format |
| 2880 | When 'emms-tag-editor-rename' is invoked the track's file will be |
| 2881 | renamed according this format specification. The file extension |
| 2882 | will be added automatically. |
| 2883 | |
| 2884 | It uses the format specs defined in ‘emms-tag-editor-tags’. |
| 2885 | |
| 2886 | The default value is "%a - %l - %n - %t", so that files are named |
| 2887 | |
| 2888 | <Artist> - <Album> - <Tracknumber> - <Title>.<extension> |
| 2889 | |
| 2890 | after renaming. |
| 2891 | |
| 2892 | -- User Option: emms-tag-editor-file-rename-alist |
| 2893 | For each pair in this alist, the first string will replaced by the |
| 2894 | second. This can be used to replace filename elements, spaces, or |
| 2895 | other unwanted strings or characters automatically whenever |
| 2896 | renaming a file. |
| 2897 | |
| 2898 | To perform the renaming put point on the track you want to rename or |
| 2899 | mark some tracks. Then hit ‘R’ which calls this function: |
| 2900 | |
| 2901 | -- Function: emms-tag-editor-rename |
| 2902 | Rename the file corresponding to track at point or all marked |
| 2903 | tracks according to the value of ‘emms-tag-editor-rename-format’. |
| 2904 | |
| 2905 | |
| 2906 | File: emms.info, Node: Emms Mode Line, Next: Limiting, Prev: Editing Tracks, Up: Top |
| 2907 | |
| 2908 | 22 Emms Mode Line |
| 2909 | ***************** |
| 2910 | |
| 2911 | We can display information about the currenty playing track on the Emacs |
| 2912 | mode line using the package 'emms-mode-line' which is provided by the |
| 2913 | file ‘emms-mode-line.el’. |
| 2914 | |
| 2915 | To activate this feature invoke: |
| 2916 | |
| 2917 | (require 'emms-mode-line) |
| 2918 | (emms-mode-line 1) |
| 2919 | |
| 2920 | It is also possible to display the amount of time a track has been |
| 2921 | playing. This feature is defined in the 'emms-playing-time' package |
| 2922 | which is provided by the file ‘emms-playing-time.el’. |
| 2923 | |
| 2924 | To use this feature invoke: |
| 2925 | |
| 2926 | (require 'emms-playing-time) |
| 2927 | (emms-playing-time 1) |
| 2928 | |
| 2929 | A graphical icon can be displayed in the modeline when Emms is |
| 2930 | playing. This feature is provided by ‘emms-mode-line-icon.el’. To |
| 2931 | enable invoke the following and make sure that |
| 2932 | EMMS-MODE-LINE-ICON-ENABLED-P is set to a non-nil value: |
| 2933 | |
| 2934 | (require emms-mode-line-icon) |
| 2935 | |
| 2936 | Note: '(emms-playing-time -1)' will disable emms-playing-time module |
| 2937 | completely, and is not recommended. (since some other emms modules may |
| 2938 | rely on it) |
| 2939 | |
| 2940 | Instead, to toggle displaying playing time on mode line, one could |
| 2941 | call 'emms-playing-time-enable-display' and |
| 2942 | 'emms-playing-time-disable-display'." |
| 2943 | |
| 2944 | -- Function: emms-playing-time-enable-display |
| 2945 | Display playing time on mode line. |
| 2946 | |
| 2947 | -- Function: emms-playing-time-disable-display |
| 2948 | Remove playing time from mode line. |
| 2949 | |
| 2950 | |
| 2951 | File: emms.info, Node: Limiting, Next: Music Player Daemon, Prev: Emms Mode Line, Up: Top |
| 2952 | |
| 2953 | 23 Limiting |
| 2954 | *********** |
| 2955 | |
| 2956 | The package 'emms-playlist-limit', provided by ‘emms-playlist-limit.el’, |
| 2957 | allows creating a new playlist derived from the playlist in the current |
| 2958 | buffer. For instance, it is possible to create a new playlist |
| 2959 | containing only a certain artist or genre from the playlist in the |
| 2960 | current buffer. |
| 2961 | |
| 2962 | If the playlist in the current buffer is the emms current playlist |
| 2963 | then the derived playlist becomes current. |
| 2964 | |
| 2965 | ‘/ a’ |
| 2966 | Create a new playlist buffer and populate it with tracks whose |
| 2967 | artist info field matches the given regular expression (default: |
| 2968 | the artist info field of the track at point). |
| 2969 | |
| 2970 | ‘/ A’ |
| 2971 | Create a new playlist buffer and populate it with tracks whose |
| 2972 | album artist info field matches the given regular expression |
| 2973 | (default: the album artist info field of the track at point). |
| 2974 | |
| 2975 | ‘/ b’ |
| 2976 | Create a new playlist buffer and populate it with tracks whose |
| 2977 | album info field matches the given regular expression (default: the |
| 2978 | album info field of the track at point). |
| 2979 | |
| 2980 | ‘/ c’ |
| 2981 | Create a new playlist buffer and populate it with tracks whose |
| 2982 | composer info field matches the given regular expression (default: |
| 2983 | the composer info field of the track at point). |
| 2984 | |
| 2985 | ‘/ d’ |
| 2986 | Create a new playlist buffer and populate it with tracks whose |
| 2987 | track description matches the given regular expression (default: |
| 2988 | the track description of the track at point). |
| 2989 | |
| 2990 | ‘/ g’ |
| 2991 | Create a new playlist buffer and populate it with tracks whose |
| 2992 | genre info field matches the given regular expression (default: the |
| 2993 | genre info field of the track at point). |
| 2994 | |
| 2995 | ‘/ n’ |
| 2996 | Create a new playlist buffer and populate it with tracks whose name |
| 2997 | matches the given regular expression (default: the name of the |
| 2998 | track at point). |
| 2999 | |
| 3000 | ‘/ p’ |
| 3001 | Create a new playlist buffer and populate it with tracks whose |
| 3002 | performer info field matches the given regular expression (default: |
| 3003 | the performer info field of the track at point). |
| 3004 | |
| 3005 | ‘/ t’ |
| 3006 | Create a new playlist buffer and populate it with tracks whose |
| 3007 | title info field matches the given regular expression (default: the |
| 3008 | title info field of the track at point). |
| 3009 | |
| 3010 | ‘/ y’ |
| 3011 | Create a new playlist buffer and populate it with tracks whose year |
| 3012 | info field matches the given regular expression (default: the year |
| 3013 | info field of the track at point). |
| 3014 | |
| 3015 | ‘/ /’ |
| 3016 | Switch to the original playlist buffer (if it still exists). |
| 3017 | |
| 3018 | |
| 3019 | File: emms.info, Node: Music Player Daemon, Next: Lyrics, Prev: Limiting, Up: Top |
| 3020 | |
| 3021 | 24 Music Player Daemon |
| 3022 | ********************** |
| 3023 | |
| 3024 | Emms provides an interface to the Music Player Daemon |
| 3025 | (http://www.musicpd.org/)(MusicPD) software. The package is called |
| 3026 | 'emms-player-mpd' and is provided by the file ‘emms-player-mpd.el’. |
| 3027 | |
| 3028 | The advantages of using MusicPD as an Emms backend include the |
| 3029 | following. |
| 3030 | |
| 3031 | • minimal CPU usage |
| 3032 | |
| 3033 | • fast access of track information |
| 3034 | |
| 3035 | • optional crossfade |
| 3036 | |
| 3037 | Setup |
| 3038 | ----- |
| 3039 | |
| 3040 | To load 'emms-player-mpd' invoke: |
| 3041 | |
| 3042 | (require 'emms-player-mpd) |
| 3043 | |
| 3044 | Set the variables EMMS-PLAYER-MPD-SERVER-NAME and |
| 3045 | EMMS-PLAYER-MPD-SERVER-PORT to the location and port (respectively) of |
| 3046 | your MusicPD server. For example: |
| 3047 | |
| 3048 | (setq emms-player-mpd-server-name "localhost") |
| 3049 | (setq emms-player-mpd-server-port "6600") |
| 3050 | |
| 3051 | If your MusicPD setup requires a password, you will to set |
| 3052 | EMMS-PLAYER-MPD-SERVER-PASSWORD as follows. |
| 3053 | |
| 3054 | (setq emms-player-mpd-server-password "mypassword") |
| 3055 | |
| 3056 | To get track information from MusicPD, invoke the following: |
| 3057 | |
| 3058 | (add-to-list 'emms-info-functions 'emms-info-mpd) |
| 3059 | |
| 3060 | Adding 'emms-player-mpd' to your Emms player list is accomplished by |
| 3061 | invoking: |
| 3062 | |
| 3063 | (add-to-list 'emms-player-list 'emms-player-mpd) |
| 3064 | |
| 3065 | Unless your MusicPD is configured to use absolute file names, you |
| 3066 | must set the emms-player-mpd-music-directory variable to the value of |
| 3067 | 'music_directory' in your MusicPD configuration. There are additional |
| 3068 | options available as well, but the defaults should be sufficient for |
| 3069 | most uses. |
| 3070 | |
| 3071 | Once you've done the above, run the ‘M-x emms-cache-set-from-mpd-all’ |
| 3072 | command to fill the Emms cache with the contents of your MusicPD |
| 3073 | database. The music in your MusicPD database should then be accessible |
| 3074 | via the Emms browser. |
| 3075 | |
| 3076 | You can set EMMS-PLAYER-MPD-SYNC-PLAYLIST to nil if your master Emms |
| 3077 | playlist contains only stored playlists. |
| 3078 | |
| 3079 | In order for Emms to synchronize track information correctly with |
| 3080 | MusicPD, you must set the MusicPD server runtime 'consume' option to |
| 3081 | 'off'. This can be accomplished with the mpc command line MusicPD |
| 3082 | client using the command ‘mpc consume off’. |
| 3083 | |
| 3084 | Commands provided |
| 3085 | ----------------- |
| 3086 | |
| 3087 | -- Function: emms-player-mpd-connect |
| 3088 | Connect to MusicPD and retrieve its current playlist. Afterward, |
| 3089 | the status of MusicPD will be tracked. |
| 3090 | |
| 3091 | -- Function: emms-player-mpd-disconnect |
| 3092 | Terminate the MusicPD client process and disconnect from MusicPD. |
| 3093 | |
| 3094 | -- Function: emms-player-mpd-show &optional insertp |
| 3095 | Describe the current Emms track in the minibuffer. If INSERTP is |
| 3096 | non-nil, insert the description into the current buffer instead. |
| 3097 | This function uses EMMS-SHOW-FORMAT to format the current track. |
| 3098 | It differs from ‘emms-show’ in that it asks MusicPD for the current |
| 3099 | track, rather than Emms. |
| 3100 | |
| 3101 | Updating the MusicPD database |
| 3102 | ............................. |
| 3103 | |
| 3104 | -- Function: emms-player-mpd-update-directory dir |
| 3105 | Cause the tracks in DIR to be updated in the MusicPD database. |
| 3106 | |
| 3107 | -- Function: emms-player-mpd-update-all |
| 3108 | Cause all tracks in the MusicPD music directory to be updated in |
| 3109 | the MusicPD database. |
| 3110 | |
| 3111 | emms-cache.el integration |
| 3112 | ......................... |
| 3113 | |
| 3114 | -- Function: emms-cache-set-from-mpd-directory dir |
| 3115 | Dump all MusicPD data from DIR into the Emms cache. This is useful |
| 3116 | to do when you have recently acquired new music. |
| 3117 | |
| 3118 | -- Function: emms-cache-set-from-mpd-all |
| 3119 | Dump all MusicPD data into the Emms cache. This is useful to do |
| 3120 | once, just before using emms-browser.el, in order to prime the |
| 3121 | cache. |
| 3122 | |
| 3123 | emms-volume.el integration |
| 3124 | .......................... |
| 3125 | |
| 3126 | To activate this, add the following to your .emacs. |
| 3127 | |
| 3128 | (require 'emms-volume) |
| 3129 | (setq emms-volume-change-function 'emms-volume-mpd-change) |
| 3130 | |
| 3131 | |
| 3132 | File: emms.info, Node: Lyrics, Next: Volume, Prev: Music Player Daemon, Up: Top |
| 3133 | |
| 3134 | 25 Lyrics |
| 3135 | ********* |
| 3136 | |
| 3137 | We can display the lyrics of a song in time with the music using the |
| 3138 | 'emms-lyrics' package provided by the file ‘emms-lyrics.el’. |
| 3139 | |
| 3140 | The lyrics files should have the extention ".lrc", and can be placed |
| 3141 | under either the same directory as the music files or EMMS-LYRICS-DIR. |
| 3142 | |
| 3143 | To add this feature we invoke: |
| 3144 | |
| 3145 | (require 'emms-lyrics) |
| 3146 | (emms-lyrics 1) |
| 3147 | |
| 3148 | Synchronized lyrics files can be obtained manually from various |
| 3149 | sources, or fetched automatically for new tracks from an LRCLIB server |
| 3150 | (<https://lrclib.net>) by adding the following function to |
| 3151 | EMMS-TRACK-INITIALIZE-FUNCTIONS: |
| 3152 | |
| 3153 | -- Function: emms-lyrics-lrclib-get &optional track force interactive |
| 3154 | Search for synchronized lyrics for TRACK through LRCLIB’s API. If |
| 3155 | TRACK is omitted or nil, use the selected track in the current |
| 3156 | playlist. When used as a track initialization function, TRACK is |
| 3157 | set to the track being initialized. The lyrics are saved in an |
| 3158 | ".lrc" file alongside the track, unless the file already exists (in |
| 3159 | which case the search isn’t performed). When called interactively |
| 3160 | (non-nil INTERACTIVE), display informative messages, and with |
| 3161 | prefix argument FORCE, ask to overwrite existing ".lrc" files. |
| 3162 | |
| 3163 | There are a number of variables we can set to define the way that |
| 3164 | 'emms-lyrics' behaves, we can set these directly or by using the |
| 3165 | Customize feature in Emacs. |
| 3166 | |
| 3167 | -- User Option: emms-lyrics-display-on-minibuffer |
| 3168 | If non-nil, display lyrics on minibuffer. |
| 3169 | |
| 3170 | -- User Option: emms-lyrics-display-on-modeline |
| 3171 | If non-nil, display lyrics on modeline. |
| 3172 | |
| 3173 | -- User Option: emms-lyrics-dir |
| 3174 | Local lyrics repository. ‘emms-lyrics-find-lyric’ will look for |
| 3175 | lyrics in current directory(i.e., same as the music file) and this |
| 3176 | directory. |
| 3177 | |
| 3178 | -- User Option: emms-lyrics-display-format |
| 3179 | Format for displaying lyrics. "%s" will be replaced by the lyrics |
| 3180 | string. |
| 3181 | |
| 3182 | -- User Option: emms-lyrics-coding-system |
| 3183 | Coding system used in the output of lyrics. |
| 3184 | |
| 3185 | -- User Option: emms-lyrics-scroll-p |
| 3186 | Non-nil value will enable lyrics scrolling. |
| 3187 | |
| 3188 | -- User Option: emms-lyrics-scroll-timer-interval |
| 3189 | Interval between scroller timers. The shorter, the faster. |
| 3190 | |
| 3191 | -- User Option: emms-lyrics-lrclib-url |
| 3192 | Base URL for LRCLIB API requests. |
| 3193 | |
| 3194 | We can control 'emms-lyrics' with the help of the following |
| 3195 | functions: |
| 3196 | |
| 3197 | -- Function: emms-lyrics-start |
| 3198 | Start displaying lyrics. |
| 3199 | |
| 3200 | -- Function: emms-lyrics-stop |
| 3201 | Stop displaying lyrics. |
| 3202 | |
| 3203 | -- Function: emms-lyrics-toggle-display-on-minibuffer |
| 3204 | Toggle display lyrics on minibufer. |
| 3205 | |
| 3206 | -- Function: emms-lyrics-toggle-display-on-modeline |
| 3207 | Toggle display lyrics on mode line. |
| 3208 | |
| 3209 | -- Function: emms-lyrics-enable |
| 3210 | Enable displaying Emms lyrics. |
| 3211 | |
| 3212 | -- Function: emms-lyrics-disable |
| 3213 | Disable displaying Emms lyrics. |
| 3214 | |
| 3215 | -- Function: emms-lyrics-toggle |
| 3216 | Toggle displaying Emms lyrics. |
| 3217 | |
| 3218 | |
| 3219 | File: emms.info, Node: Volume, Next: Streaming Audio, Prev: Lyrics, Up: Top |
| 3220 | |
| 3221 | 26 Volume |
| 3222 | ********* |
| 3223 | |
| 3224 | We can use the 'emms-volume' package, as provided by the |
| 3225 | ‘emms-volume.el’ file, to manipulate the volume. |
| 3226 | |
| 3227 | -- User Option: emms-volume-change-amount |
| 3228 | The amount to use when raising or lowering the volume using the |
| 3229 | emms-volume interface. |
| 3230 | |
| 3231 | This should be a positive integer. |
| 3232 | |
| 3233 | -- Function: emms-volume-raise |
| 3234 | Increase the volume. |
| 3235 | |
| 3236 | -- Function: emms-volume-lower |
| 3237 | Decrease the volume. |
| 3238 | |
| 3239 | If you feel like binding those two functions to global keys -- don't |
| 3240 | do it or you'll miss the convenience of 'emms-volume-minor-mode'. |
| 3241 | Instead, bind the following two commands to some keys that you like. |
| 3242 | |
| 3243 | -- Function: emms-volume-mode-plus |
| 3244 | Raise volume and enable or extend the 'emms-volume-minor-mode' |
| 3245 | timeout. |
| 3246 | |
| 3247 | -- Function: emms-volume-mode-minus |
| 3248 | Lower volume and enable or extend the 'emms-volume-minor-mode' |
| 3249 | timeout. |
| 3250 | |
| 3251 | Example: |
| 3252 | |
| 3253 | (global-set-key (kbd "C-c +") 'emms-volume-mode-plus) |
| 3254 | (global-set-key (kbd "C-c -") 'emms-volume-mode-minus) |
| 3255 | |
| 3256 | Whenever you use one of these keys or call these functions with |
| 3257 | ‘M-x’, Emms will be put into 'emms-volume-minor-mode' for a short period |
| 3258 | defined by 'emms-volume-mode-timeout'. |
| 3259 | |
| 3260 | -- User Option: emms-volume-mode-timeout |
| 3261 | The timeout in amount of seconds used by 'emms-volume-minor-mode'. |
| 3262 | |
| 3263 | In this interval you can raise/lower the volume simply by pressing |
| 3264 | ‘+’ or ‘-’, which will also reset the timer to its initial value. So |
| 3265 | instead of pressing ‘C-c +’ six times to increase volume by six steps of |
| 3266 | ‘emms-volume-change-amount’, you would simply type ‘C-c + + + + + +’. |
| 3267 | |
| 3268 | Emms can change volume with amixer, mpd, PulseAudio and mixerctl out |
| 3269 | of the box, see EMMS-VOLUME-CHANGE-FUNCTION. |
| 3270 | |
| 3271 | |
| 3272 | File: emms.info, Node: Streaming Audio, Next: Radio Browser, Prev: Volume, Up: Top |
| 3273 | |
| 3274 | 27 Streaming Audio |
| 3275 | ****************** |
| 3276 | |
| 3277 | Emms is a great way to play streaming audio and internet radio. It is |
| 3278 | possible to add streaming playlists and URLs to any playlist, but Emms |
| 3279 | also comes with a built-in, eclectic list of streaming audio stations. |
| 3280 | (1) |
| 3281 | |
| 3282 | The ‘emms-streams.el’ package provides the command ‘emms-streams’. |
| 3283 | |
| 3284 | Invoking ‘emms-streams’ will pull up an Emms playlist buffer and |
| 3285 | populate it with the built-in list of streaming audio sources. |
| 3286 | |
| 3287 | If you are using the mpv player, defined by ‘emms-player-mpv.el’, |
| 3288 | then you can display the currently streaming track title (if the station |
| 3289 | provides that information) by configuring: |
| 3290 | |
| 3291 | (customize-set-variable 'emms-player-mpv-update-metadata t) |
| 3292 | |
| 3293 | ---------- Footnotes ---------- |
| 3294 | |
| 3295 | (1) Emms has no affiliation of any kind with the streaming audio |
| 3296 | stations included, nor is their inclusion an endorsement of these |
| 3297 | stations. Instead, this is a collection of stations submitted to the |
| 3298 | project over the years by people who enjoy Emms. We hope you will enjoy |
| 3299 | them too, and invite you to send in your suggestions to add to the list. |
| 3300 | |
| 3301 | |
| 3302 | File: emms.info, Node: Radio Browser, Next: APE / FLAC Commands, Prev: Streaming Audio, Up: Top |
| 3303 | |
| 3304 | 28 Radio Browser |
| 3305 | **************** |
| 3306 | |
| 3307 | We can find new internet radio stations to stream by searching the |
| 3308 | database at <https://www.radio-browser.info>. The |
| 3309 | ‘emms-radio-browser.el’ package provides the following commands to do |
| 3310 | this: |
| 3311 | |
| 3312 | -- Function: emms-radio-browser-search-by-name |
| 3313 | Prompts for a station NAME and returns a playlist of matching |
| 3314 | streams. |
| 3315 | |
| 3316 | -- Function: emms-radio-browser-search-by-url |
| 3317 | Prompts for a station URL and returns a playlist of matching |
| 3318 | streams. |
| 3319 | |
| 3320 | -- Function: emms-radio-browser-full-search |
| 3321 | Pops up a form to search by name, tags, country or language. |
| 3322 | Returns a playlist of matching streams. |
| 3323 | |
| 3324 | To activate ‘emms-radio-browser.el’, do |
| 3325 | |
| 3326 | (require 'emms-radio-browser) |
| 3327 | |
| 3328 | You will need the ‘transient.el’ package to be installed (this is |
| 3329 | built-in since emacs v28.1). |
| 3330 | |
| 3331 | |
| 3332 | File: emms.info, Node: APE / FLAC Commands, Next: Bookmarks, Prev: Radio Browser, Up: Top |
| 3333 | |
| 3334 | 29 APE / FLAC Commands |
| 3335 | ********************** |
| 3336 | |
| 3337 | Often, a single APE or FLAC file contains a complete album. We can |
| 3338 | still play next or previous track in the album with the help of |
| 3339 | ‘emms-cue.el’ package, provided there is a corresponding cue sheet file. |
| 3340 | This package also defines ‘emms-info-cueinfo’ for retreiving the track |
| 3341 | information for APE / FLAC itself. |
| 3342 | |
| 3343 | To load ‘emms-cue.el’: |
| 3344 | |
| 3345 | (require 'emms-cue) |
| 3346 | (add-to-list 'emms-info-functions 'emms-info-cueinfo) |
| 3347 | |
| 3348 | -- Function: emms-cue-next |
| 3349 | Play next track from .cue file |
| 3350 | -- Function: emms-cue-previous |
| 3351 | Play previous track from .cue file |
| 3352 | |
| 3353 | |
| 3354 | File: emms.info, Node: Bookmarks, Next: Managing Playlists, Prev: APE / FLAC Commands, Up: Top |
| 3355 | |
| 3356 | 30 Bookmarks |
| 3357 | ************ |
| 3358 | |
| 3359 | Emms can save a "temporal bookmark" in a media file via emms-bookmarks. |
| 3360 | The file ‘emms-bookmarks.el’ provides the package emms-bookmarks. |
| 3361 | |
| 3362 | While some media is playing, invoking ‘M-x emms-bookmarks-add’ will |
| 3363 | first pause the playback and then prompt for a name describing the |
| 3364 | bookmark. Tracks can have multiple bookmarks associated with them. |
| 3365 | |
| 3366 | To jump to the next and previous bookmarks in the current track |
| 3367 | invoke ‘M-x emms-bookmarks-next’ and ‘M-x emms-bookmarks-prev’ |
| 3368 | respectively. |
| 3369 | |
| 3370 | To clear all of the bookmarks for the current track invoke ‘M-x |
| 3371 | emms-bookmarks-clear’. |
| 3372 | |
| 3373 | |
| 3374 | File: emms.info, Node: Managing Playlists, Next: GNU FM, Prev: Bookmarks, Up: Top |
| 3375 | |
| 3376 | 31 Managing Playlists |
| 3377 | ********************* |
| 3378 | |
| 3379 | Emms can have multiple playlists, since a playlist is just another |
| 3380 | buffer with a list of tracks. You can manage multiple playlists using |
| 3381 | 'emms-metaplaylist-mode', provided by the file ‘emms-metaplaylist-mode’. |
| 3382 | |
| 3383 | Start the playlist manager with ‘M-x emms-metaplaylist-mode-go’. The |
| 3384 | playlist manager will list the playlists and mark the current one. The |
| 3385 | following commands are available: |
| 3386 | |
| 3387 | ‘RET’ |
| 3388 | Make the buffer at point the Emms playlist buffer and switch to it. |
| 3389 | |
| 3390 | + |
| 3391 | ‘V’ |
| 3392 | Visit the playlist at point. |
| 3393 | |
| 3394 | ‘SPC’ |
| 3395 | Make the buffer at point the Emms playlist buffer (but do not |
| 3396 | switch to it). |
| 3397 | |
| 3398 | ‘n’ |
| 3399 | Move point to the next playlist. |
| 3400 | |
| 3401 | ‘p’ |
| 3402 | Move point to the previous playlist. |
| 3403 | |
| 3404 | ‘g’ |
| 3405 | Update the playlist manager buffer. |
| 3406 | |
| 3407 | ‘C’ |
| 3408 | Create a new Emms playlist buffer. |
| 3409 | |
| 3410 | ‘C-k’ |
| 3411 | Kill the Emms playlist buffer at point. |
| 3412 | |
| 3413 | ‘c’ |
| 3414 | Move point to the current playlist buffer. |
| 3415 | |
| 3416 | ‘q’ |
| 3417 | Kill the playlist manager. |
| 3418 | |
| 3419 | |
| 3420 | File: emms.info, Node: GNU FM, Next: Listenbrainz, Prev: Managing Playlists, Up: Top |
| 3421 | |
| 3422 | 32 GNU FM |
| 3423 | ********* |
| 3424 | |
| 3425 | GNU FM (https://www.gnu.org/software/gnufm/) is free software for |
| 3426 | running music community websites. It was created for the music |
| 3427 | community site, Libre.fm (http://libre.fm/). |
| 3428 | |
| 3429 | Emms can send track information, and stream music from GNU FM servers |
| 3430 | using ‘emms-librefm-scrobbler.el’ and ‘emms-librefm-stream.el’, |
| 3431 | respectively. |
| 3432 | |
| 3433 | Emms is configured by default to use Libre.fm (http://libre.fm/), but |
| 3434 | can work with any GNU FM server by configuring the variable |
| 3435 | EMMS-LIBREFM-SCROBBLER-HANDSHAKE-URL to the URL of the GNU FM server. |
| 3436 | |
| 3437 | The recommended way of providing your credentials to the GNU FM |
| 3438 | server is by using an authinfo file. Add authentication to your |
| 3439 | auth-info file, typically ‘~/.authinfo.gpg’, as: |
| 3440 | machine libre.fm login USERNAME password PASSWORD |
| 3441 | If you are using some other server than libre.fm, change "‘libre.fm’" |
| 3442 | to match EMMS-LIBREFM-SCROBBLER-HANDSHAKE-URL. |
| 3443 | |
| 3444 | Alternatively, you can save the password in plaintext in your |
| 3445 | init-file by setting these variables: |
| 3446 | |
| 3447 | (setq emms-librefm-scrobbler-username "USERNAME" |
| 3448 | emms-librefm-scrobbler-password "PASSWORD") |
| 3449 | |
| 3450 | * Menu: |
| 3451 | |
| 3452 | * Uploading Track Information:: How to submit listened track information. |
| 3453 | * GNU FM Streaming:: Streaming music from a GNU FM server. |
| 3454 | |
| 3455 | |
| 3456 | File: emms.info, Node: Uploading Track Information, Next: GNU FM Streaming, Up: GNU FM |
| 3457 | |
| 3458 | 32.1 Uploading Track Information |
| 3459 | ================================ |
| 3460 | |
| 3461 | GNU FM servers, such as Libre.fm can optionally store a user's listening |
| 3462 | habits using information sent to the website's server from the Emms. By |
| 3463 | utilizing the records of users' listening habits, the website aims to be |
| 3464 | able to recommend music to users by analyzing their musical taste. |
| 3465 | |
| 3466 | Load the feature into Emms with: |
| 3467 | |
| 3468 | (require 'emms-librefm-scrobbler) |
| 3469 | |
| 3470 | This feature can also be enabled via *Note Setup::, in the 'emms-all' |
| 3471 | setup level. |
| 3472 | |
| 3473 | Enable uploading the details of the tracks Emms plays to the GNU FM |
| 3474 | server with ‘emms-librefm-scrobbler-enable’. The track's details will |
| 3475 | be uploaded to the server when the track's playback ends. You can |
| 3476 | disable this behavior with ‘emms-librefm-scrobbler-disable’. |
| 3477 | |
| 3478 | |
| 3479 | File: emms.info, Node: GNU FM Streaming, Prev: Uploading Track Information, Up: GNU FM |
| 3480 | |
| 3481 | 32.2 GNU FM Streaming |
| 3482 | ===================== |
| 3483 | |
| 3484 | If the GNU FM server provides a streaming music service you can take |
| 3485 | advantage of it by loading: |
| 3486 | |
| 3487 | (require 'emms-librefm-stream) |
| 3488 | |
| 3489 | This feature can also be enabled via *Note Setup::, in the 'emms-all' |
| 3490 | setup level. |
| 3491 | |
| 3492 | Then invoke ‘emms-librefm-stream’ and enter the URL of the station |
| 3493 | you wish to listen to, for example "librefm://globaltags/Classical". |
| 3494 | |
| 3495 | |
| 3496 | File: emms.info, Node: Listenbrainz, Next: D-Bus, Prev: GNU FM, Up: Top |
| 3497 | |
| 3498 | 33 Listenbrainz |
| 3499 | *************** |
| 3500 | |
| 3501 | Listenbrainz offers an alternative store of listening habits using |
| 3502 | information sent by the Emms. |
| 3503 | |
| 3504 | To use this service, you will need to obtain a user token from |
| 3505 | <https://listenbrainz.org/settings/>. You should store this token in ‘ |
| 3506 | ~/.authinfo.gpg’ or an equivalent file understood by auth-source with a |
| 3507 | line like this: |
| 3508 | |
| 3509 | machine api.listenbrainz.org password 0abc1de2-245-67fa-8906b-bc123d4dbdaa |
| 3510 | |
| 3511 | Alternatively, you can store the token in plain-text in your init |
| 3512 | file by setting the variable ‘emms-listenbrainz-scrobbler-token’: |
| 3513 | |
| 3514 | (setq emms-listenbrainz-scrobbler-token "0abc1de2-245-67fa-8906b-bc123d4dbdaa") |
| 3515 | |
| 3516 | Once this is done, you can load the feature with |
| 3517 | |
| 3518 | (require 'emms-listenbrainz-scrobbler) |
| 3519 | |
| 3520 | Enable uploading the details of the tracks Emms plays to the |
| 3521 | listenbrainz server with ‘emms-listenbrainz-scrobbler-enable’. The |
| 3522 | track's details will be uploaded to the server when the track's playback |
| 3523 | ends. You can disable this behavior with |
| 3524 | ‘emms-listenbrainz-scrobbler-disable’. |
| 3525 | |
| 3526 | |
| 3527 | File: emms.info, Node: D-Bus, Next: Copying, Prev: Listenbrainz, Up: Top |
| 3528 | |
| 3529 | 34 D-Bus |
| 3530 | ******** |
| 3531 | |
| 3532 | Emms can provide an MPRIS interface which allows it to be controlled |
| 3533 | over D-Bus. |
| 3534 | |
| 3535 | To enable this, first load the feature: |
| 3536 | |
| 3537 | (require 'emms-mpris) |
| 3538 | |
| 3539 | and then turn it on with ‘emms-mpris-enable’. You can turn it off |
| 3540 | with ‘emms-mpris-disable’. |
| 3541 | |
| 3542 | At present, the Emms implementation of the MPRIS specification |
| 3543 | (https://specifications.freedesktop.org/mpris-spec/latest/index.html) is |
| 3544 | not complete: changing the volume is not currently supported. |
| 3545 | |
| 3546 | |
| 3547 | File: emms.info, Node: Copying, Next: The GNU FDL, Prev: Extending Emms, Up: Top |
| 3548 | |
| 3549 | GNU General Public License |
| 3550 | ************************** |
| 3551 | |
| 3552 | Version 3, 29 June 2007 |
| 3553 | |
| 3554 | Copyright © 2007 Free Software Foundation, Inc. <http://fsf.org/> |
| 3555 | |
| 3556 | Everyone is permitted to copy and distribute verbatim copies of this |
| 3557 | license document, but changing it is not allowed. |
| 3558 | |
| 3559 | Preamble |
| 3560 | ======== |
| 3561 | |
| 3562 | The GNU General Public License is a free, copyleft license for software |
| 3563 | and other kinds of works. |
| 3564 | |
| 3565 | The licenses for most software and other practical works are designed |
| 3566 | to take away your freedom to share and change the works. By contrast, |
| 3567 | the GNU General Public License is intended to guarantee your freedom to |
| 3568 | share and change all versions of a program-to make sure it remains free |
| 3569 | software for all its users. We, the Free Software Foundation, use the |
| 3570 | GNU General Public License for most of our software; it applies also to |
| 3571 | any other work released this way by its authors. You can apply it to |
| 3572 | your programs, too. |
| 3573 | |
| 3574 | When we speak of free software, we are referring to freedom, not |
| 3575 | price. Our General Public Licenses are designed to make sure that you |
| 3576 | have the freedom to distribute copies of free software (and charge for |
| 3577 | them if you wish), that you receive source code or can get it if you |
| 3578 | want it, that you can change the software or use pieces of it in new |
| 3579 | free programs, and that you know you can do these things. |
| 3580 | |
| 3581 | To protect your rights, we need to prevent others from denying you |
| 3582 | these rights or asking you to surrender the rights. Therefore, you have |
| 3583 | certain responsibilities if you distribute copies of the software, or if |
| 3584 | you modify it: responsibilities to respect the freedom of others. |
| 3585 | |
| 3586 | For example, if you distribute copies of such a program, whether |
| 3587 | gratis or for a fee, you must pass on to the recipients the same |
| 3588 | freedoms that you received. You must make sure that they, too, receive |
| 3589 | or can get the source code. And you must show them these terms so they |
| 3590 | know their rights. |
| 3591 | |
| 3592 | Developers that use the GNU GPL protect your rights with two steps: |
| 3593 | (1) assert copyright on the software, and (2) offer you this License |
| 3594 | giving you legal permission to copy, distribute and/or modify it. |
| 3595 | |
| 3596 | For the developers' and authors' protection, the GPL clearly explains |
| 3597 | that there is no warranty for this free software. For both users' and |
| 3598 | authors' sake, the GPL requires that modified versions be marked as |
| 3599 | changed, so that their problems will not be attributed erroneously to |
| 3600 | authors of previous versions. |
| 3601 | |
| 3602 | Some devices are designed to deny users access to install or run |
| 3603 | modified versions of the software inside them, although the manufacturer |
| 3604 | can do so. This is fundamentally incompatible with the aim of |
| 3605 | protecting users' freedom to change the software. The systematic |
| 3606 | pattern of such abuse occurs in the area of products for individuals to |
| 3607 | use, which is precisely where it is most unacceptable. Therefore, we |
| 3608 | have designed this version of the GPL to prohibit the practice for those |
| 3609 | products. If such problems arise substantially in other domains, we |
| 3610 | stand ready to extend this provision to those domains in future versions |
| 3611 | of the GPL, as needed to protect the freedom of users. |
| 3612 | |
| 3613 | Finally, every program is threatened constantly by software patents. |
| 3614 | States should not allow patents to restrict development and use of |
| 3615 | software on general-purpose computers, but in those that do, we wish to |
| 3616 | avoid the special danger that patents applied to a free program could |
| 3617 | make it effectively proprietary. To prevent this, the GPL assures that |
| 3618 | patents cannot be used to render the program non-free. |
| 3619 | |
| 3620 | The precise terms and conditions for copying, distribution and |
| 3621 | modification follow. |
| 3622 | |
| 3623 | TERMS AND CONDITIONS |
| 3624 | |
| 3625 | 0. Definitions. |
| 3626 | |
| 3627 | "This License" refers to version 3 of the GNU General Public |
| 3628 | License. |
| 3629 | |
| 3630 | "Copyright" also means copyright-like laws that apply to other |
| 3631 | kinds of works, such as semiconductor masks. |
| 3632 | |
| 3633 | "The Program" refers to any copyrightable work licensed under this |
| 3634 | License. Each licensee is addressed as "you". "Licensees" and |
| 3635 | "recipients" may be individuals or organizations. |
| 3636 | |
| 3637 | To "modify" a work means to copy from or adapt all or part of the |
| 3638 | work in a fashion requiring copyright permission, other than the |
| 3639 | making of an exact copy. The resulting work is called a "modified |
| 3640 | version" of the earlier work or a work "based on" the earlier work. |
| 3641 | |
| 3642 | A "covered work" means either the unmodified Program or a work |
| 3643 | based on the Program. |
| 3644 | |
| 3645 | To "propagate" a work means to do anything with it that, without |
| 3646 | permission, would make you directly or secondarily liable for |
| 3647 | infringement under applicable copyright law, except executing it on |
| 3648 | a computer or modifying a private copy. Propagation includes |
| 3649 | copying, distribution (with or without modification), making |
| 3650 | available to the public, and in some countries other activities as |
| 3651 | well. |
| 3652 | |
| 3653 | To "convey" a work means any kind of propagation that enables other |
| 3654 | parties to make or receive copies. Mere interaction with a user |
| 3655 | through a computer network, with no transfer of a copy, is not |
| 3656 | conveying. |
| 3657 | |
| 3658 | An interactive user interface displays "Appropriate Legal Notices" |
| 3659 | to the extent that it includes a convenient and prominently visible |
| 3660 | feature that (1) displays an appropriate copyright notice, and (2) |
| 3661 | tells the user that there is no warranty for the work (except to |
| 3662 | the extent that warranties are provided), that licensees may convey |
| 3663 | the work under this License, and how to view a copy of this |
| 3664 | License. If the interface presents a list of user commands or |
| 3665 | options, such as a menu, a prominent item in the list meets this |
| 3666 | criterion. |
| 3667 | |
| 3668 | 1. Source Code. |
| 3669 | |
| 3670 | The "source code" for a work means the preferred form of the work |
| 3671 | for making modifications to it. "Object code" means any non-source |
| 3672 | form of a work. |
| 3673 | |
| 3674 | A "Standard Interface" means an interface that either is an |
| 3675 | official standard defined by a recognized standards body, or, in |
| 3676 | the case of interfaces specified for a particular programming |
| 3677 | language, one that is widely used among developers working in that |
| 3678 | language. |
| 3679 | |
| 3680 | The "System Libraries" of an executable work include anything, |
| 3681 | other than the work as a whole, that (a) is included in the normal |
| 3682 | form of packaging a Major Component, but which is not part of that |
| 3683 | Major Component, and (b) serves only to enable use of the work with |
| 3684 | that Major Component, or to implement a Standard Interface for |
| 3685 | which an implementation is available to the public in source code |
| 3686 | form. A "Major Component", in this context, means a major |
| 3687 | essential component (kernel, window system, and so on) of the |
| 3688 | specific operating system (if any) on which the executable work |
| 3689 | runs, or a compiler used to produce the work, or an object code |
| 3690 | interpreter used to run it. |
| 3691 | |
| 3692 | The "Corresponding Source" for a work in object code form means all |
| 3693 | the source code needed to generate, install, and (for an executable |
| 3694 | work) run the object code and to modify the work, including scripts |
| 3695 | to control those activities. However, it does not include the |
| 3696 | work's System Libraries, or general-purpose tools or generally |
| 3697 | available free programs which are used unmodified in performing |
| 3698 | those activities but which are not part of the work. For example, |
| 3699 | Corresponding Source includes interface definition files associated |
| 3700 | with source files for the work, and the source code for shared |
| 3701 | libraries and dynamically linked subprograms that the work is |
| 3702 | specifically designed to require, such as by intimate data |
| 3703 | communication or control flow between those subprograms and other |
| 3704 | parts of the work. |
| 3705 | |
| 3706 | The Corresponding Source need not include anything that users can |
| 3707 | regenerate automatically from other parts of the Corresponding |
| 3708 | Source. |
| 3709 | |
| 3710 | The Corresponding Source for a work in source code form is that |
| 3711 | same work. |
| 3712 | |
| 3713 | 2. Basic Permissions. |
| 3714 | |
| 3715 | All rights granted under this License are granted for the term of |
| 3716 | copyright on the Program, and are irrevocable provided the stated |
| 3717 | conditions are met. This License explicitly affirms your unlimited |
| 3718 | permission to run the unmodified Program. The output from running |
| 3719 | a covered work is covered by this License only if the output, given |
| 3720 | its content, constitutes a covered work. This License acknowledges |
| 3721 | your rights of fair use or other equivalent, as provided by |
| 3722 | copyright law. |
| 3723 | |
| 3724 | You may make, run and propagate covered works that you do not |
| 3725 | convey, without conditions so long as your license otherwise |
| 3726 | remains in force. You may convey covered works to others for the |
| 3727 | sole purpose of having them make modifications exclusively for you, |
| 3728 | or provide you with facilities for running those works, provided |
| 3729 | that you comply with the terms of this License in conveying all |
| 3730 | material for which you do not control copyright. Those thus making |
| 3731 | or running the covered works for you must do so exclusively on your |
| 3732 | behalf, under your direction and control, on terms that prohibit |
| 3733 | them from making any copies of your copyrighted material outside |
| 3734 | their relationship with you. |
| 3735 | |
| 3736 | Conveying under any other circumstances is permitted solely under |
| 3737 | the conditions stated below. Sublicensing is not allowed; section |
| 3738 | 10 makes it unnecessary. |
| 3739 | |
| 3740 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law. |
| 3741 | |
| 3742 | No covered work shall be deemed part of an effective technological |
| 3743 | measure under any applicable law fulfilling obligations under |
| 3744 | article 11 of the WIPO copyright treaty adopted on 20 December |
| 3745 | 1996, or similar laws prohibiting or restricting circumvention of |
| 3746 | such measures. |
| 3747 | |
| 3748 | When you convey a covered work, you waive any legal power to forbid |
| 3749 | circumvention of technological measures to the extent such |
| 3750 | circumvention is effected by exercising rights under this License |
| 3751 | with respect to the covered work, and you disclaim any intention to |
| 3752 | limit operation or modification of the work as a means of |
| 3753 | enforcing, against the work's users, your or third parties' legal |
| 3754 | rights to forbid circumvention of technological measures. |
| 3755 | |
| 3756 | 4. Conveying Verbatim Copies. |
| 3757 | |
| 3758 | You may convey verbatim copies of the Program's source code as you |
| 3759 | receive it, in any medium, provided that you conspicuously and |
| 3760 | appropriately publish on each copy an appropriate copyright notice; |
| 3761 | keep intact all notices stating that this License and any |
| 3762 | non-permissive terms added in accord with section 7 apply to the |
| 3763 | code; keep intact all notices of the absence of any warranty; and |
| 3764 | give all recipients a copy of this License along with the Program. |
| 3765 | |
| 3766 | You may charge any price or no price for each copy that you convey, |
| 3767 | and you may offer support or warranty protection for a fee. |
| 3768 | |
| 3769 | 5. Conveying Modified Source Versions. |
| 3770 | |
| 3771 | You may convey a work based on the Program, or the modifications to |
| 3772 | produce it from the Program, in the form of source code under the |
| 3773 | terms of section 4, provided that you also meet all of these |
| 3774 | conditions: |
| 3775 | |
| 3776 | a. The work must carry prominent notices stating that you |
| 3777 | modified it, and giving a relevant date. |
| 3778 | |
| 3779 | b. The work must carry prominent notices stating that it is |
| 3780 | released under this License and any conditions added under |
| 3781 | section 7. This requirement modifies the requirement in |
| 3782 | section 4 to "keep intact all notices". |
| 3783 | |
| 3784 | c. You must license the entire work, as a whole, under this |
| 3785 | License to anyone who comes into possession of a copy. This |
| 3786 | License will therefore apply, along with any applicable |
| 3787 | section 7 additional terms, to the whole of the work, and all |
| 3788 | its parts, regardless of how they are packaged. This License |
| 3789 | gives no permission to license the work in any other way, but |
| 3790 | it does not invalidate such permission if you have separately |
| 3791 | received it. |
| 3792 | |
| 3793 | d. If the work has interactive user interfaces, each must display |
| 3794 | Appropriate Legal Notices; however, if the Program has |
| 3795 | interactive interfaces that do not display Appropriate Legal |
| 3796 | Notices, your work need not make them do so. |
| 3797 | |
| 3798 | A compilation of a covered work with other separate and independent |
| 3799 | works, which are not by their nature extensions of the covered |
| 3800 | work, and which are not combined with it such as to form a larger |
| 3801 | program, in or on a volume of a storage or distribution medium, is |
| 3802 | called an "aggregate" if the compilation and its resulting |
| 3803 | copyright are not used to limit the access or legal rights of the |
| 3804 | compilation's users beyond what the individual works permit. |
| 3805 | Inclusion of a covered work in an aggregate does not cause this |
| 3806 | License to apply to the other parts of the aggregate. |
| 3807 | |
| 3808 | 6. Conveying Non-Source Forms. |
| 3809 | |
| 3810 | You may convey a covered work in object code form under the terms |
| 3811 | of sections 4 and 5, provided that you also convey the |
| 3812 | machine-readable Corresponding Source under the terms of this |
| 3813 | License, in one of these ways: |
| 3814 | |
| 3815 | a. Convey the object code in, or embodied in, a physical product |
| 3816 | (including a physical distribution medium), accompanied by the |
| 3817 | Corresponding Source fixed on a durable physical medium |
| 3818 | customarily used for software interchange. |
| 3819 | |
| 3820 | b. Convey the object code in, or embodied in, a physical product |
| 3821 | (including a physical distribution medium), accompanied by a |
| 3822 | written offer, valid for at least three years and valid for as |
| 3823 | long as you offer spare parts or customer support for that |
| 3824 | product model, to give anyone who possesses the object code |
| 3825 | either (1) a copy of the Corresponding Source for all the |
| 3826 | software in the product that is covered by this License, on a |
| 3827 | durable physical medium customarily used for software |
| 3828 | interchange, for a price no more than your reasonable cost of |
| 3829 | physically performing this conveying of source, or (2) access |
| 3830 | to copy the Corresponding Source from a network server at no |
| 3831 | charge. |
| 3832 | |
| 3833 | c. Convey individual copies of the object code with a copy of the |
| 3834 | written offer to provide the Corresponding Source. This |
| 3835 | alternative is allowed only occasionally and noncommercially, |
| 3836 | and only if you received the object code with such an offer, |
| 3837 | in accord with subsection 6b. |
| 3838 | |
| 3839 | d. Convey the object code by offering access from a designated |
| 3840 | place (gratis or for a charge), and offer equivalent access to |
| 3841 | the Corresponding Source in the same way through the same |
| 3842 | place at no further charge. You need not require recipients |
| 3843 | to copy the Corresponding Source along with the object code. |
| 3844 | If the place to copy the object code is a network server, the |
| 3845 | Corresponding Source may be on a different server (operated by |
| 3846 | you or a third party) that supports equivalent copying |
| 3847 | facilities, provided you maintain clear directions next to the |
| 3848 | object code saying where to find the Corresponding Source. |
| 3849 | Regardless of what server hosts the Corresponding Source, you |
| 3850 | remain obligated to ensure that it is available for as long as |
| 3851 | needed to satisfy these requirements. |
| 3852 | |
| 3853 | e. Convey the object code using peer-to-peer transmission, |
| 3854 | provided you inform other peers where the object code and |
| 3855 | Corresponding Source of the work are being offered to the |
| 3856 | general public at no charge under subsection 6d. |
| 3857 | |
| 3858 | A separable portion of the object code, whose source code is |
| 3859 | excluded from the Corresponding Source as a System Library, need |
| 3860 | not be included in conveying the object code work. |
| 3861 | |
| 3862 | A "User Product" is either (1) a "consumer product", which means |
| 3863 | any tangible personal property which is normally used for personal, |
| 3864 | family, or household purposes, or (2) anything designed or sold for |
| 3865 | incorporation into a dwelling. In determining whether a product is |
| 3866 | a consumer product, doubtful cases shall be resolved in favor of |
| 3867 | coverage. For a particular product received by a particular user, |
| 3868 | "normally used" refers to a typical or common use of that class of |
| 3869 | product, regardless of the status of the particular user or of the |
| 3870 | way in which the particular user actually uses, or expects or is |
| 3871 | expected to use, the product. A product is a consumer product |
| 3872 | regardless of whether the product has substantial commercial, |
| 3873 | industrial or non-consumer uses, unless such uses represent the |
| 3874 | only significant mode of use of the product. |
| 3875 | |
| 3876 | "Installation Information" for a User Product means any methods, |
| 3877 | procedures, authorization keys, or other information required to |
| 3878 | install and execute modified versions of a covered work in that |
| 3879 | User Product from a modified version of its Corresponding Source. |
| 3880 | The information must suffice to ensure that the continued |
| 3881 | functioning of the modified object code is in no case prevented or |
| 3882 | interfered with solely because modification has been made. |
| 3883 | |
| 3884 | If you convey an object code work under this section in, or with, |
| 3885 | or specifically for use in, a User Product, and the conveying |
| 3886 | occurs as part of a transaction in which the right of possession |
| 3887 | and use of the User Product is transferred to the recipient in |
| 3888 | perpetuity or for a fixed term (regardless of how the transaction |
| 3889 | is characterized), the Corresponding Source conveyed under this |
| 3890 | section must be accompanied by the Installation Information. But |
| 3891 | this requirement does not apply if neither you nor any third party |
| 3892 | retains the ability to install modified object code on the User |
| 3893 | Product (for example, the work has been installed in ROM). |
| 3894 | |
| 3895 | The requirement to provide Installation Information does not |
| 3896 | include a requirement to continue to provide support service, |
| 3897 | warranty, or updates for a work that has been modified or installed |
| 3898 | by the recipient, or for the User Product in which it has been |
| 3899 | modified or installed. Access to a network may be denied when the |
| 3900 | modification itself materially and adversely affects the operation |
| 3901 | of the network or violates the rules and protocols for |
| 3902 | communication across the network. |
| 3903 | |
| 3904 | Corresponding Source conveyed, and Installation Information |
| 3905 | provided, in accord with this section must be in a format that is |
| 3906 | publicly documented (and with an implementation available to the |
| 3907 | public in source code form), and must require no special password |
| 3908 | or key for unpacking, reading or copying. |
| 3909 | |
| 3910 | 7. Additional Terms. |
| 3911 | |
| 3912 | "Additional permissions" are terms that supplement the terms of |
| 3913 | this License by making exceptions from one or more of its |
| 3914 | conditions. Additional permissions that are applicable to the |
| 3915 | entire Program shall be treated as though they were included in |
| 3916 | this License, to the extent that they are valid under applicable |
| 3917 | law. If additional permissions apply only to part of the Program, |
| 3918 | that part may be used separately under those permissions, but the |
| 3919 | entire Program remains governed by this License without regard to |
| 3920 | the additional permissions. |
| 3921 | |
| 3922 | When you convey a copy of a covered work, you may at your option |
| 3923 | remove any additional permissions from that copy, or from any part |
| 3924 | of it. (Additional permissions may be written to require their own |
| 3925 | removal in certain cases when you modify the work.) You may place |
| 3926 | additional permissions on material, added by you to a covered work, |
| 3927 | for which you have or can give appropriate copyright permission. |
| 3928 | |
| 3929 | Notwithstanding any other provision of this License, for material |
| 3930 | you add to a covered work, you may (if authorized by the copyright |
| 3931 | holders of that material) supplement the terms of this License with |
| 3932 | terms: |
| 3933 | |
| 3934 | a. Disclaiming warranty or limiting liability differently from |
| 3935 | the terms of sections 15 and 16 of this License; or |
| 3936 | |
| 3937 | b. Requiring preservation of specified reasonable legal notices |
| 3938 | or author attributions in that material or in the Appropriate |
| 3939 | Legal Notices displayed by works containing it; or |
| 3940 | |
| 3941 | c. Prohibiting misrepresentation of the origin of that material, |
| 3942 | or requiring that modified versions of such material be marked |
| 3943 | in reasonable ways as different from the original version; or |
| 3944 | |
| 3945 | d. Limiting the use for publicity purposes of names of licensors |
| 3946 | or authors of the material; or |
| 3947 | |
| 3948 | e. Declining to grant rights under trademark law for use of some |
| 3949 | trade names, trademarks, or service marks; or |
| 3950 | |
| 3951 | f. Requiring indemnification of licensors and authors of that |
| 3952 | material by anyone who conveys the material (or modified |
| 3953 | versions of it) with contractual assumptions of liability to |
| 3954 | the recipient, for any liability that these contractual |
| 3955 | assumptions directly impose on those licensors and authors. |
| 3956 | |
| 3957 | All other non-permissive additional terms are considered "further |
| 3958 | restrictions" within the meaning of section 10. If the Program as |
| 3959 | you received it, or any part of it, contains a notice stating that |
| 3960 | it is governed by this License along with a term that is a further |
| 3961 | restriction, you may remove that term. If a license document |
| 3962 | contains a further restriction but permits relicensing or conveying |
| 3963 | under this License, you may add to a covered work material governed |
| 3964 | by the terms of that license document, provided that the further |
| 3965 | restriction does not survive such relicensing or conveying. |
| 3966 | |
| 3967 | If you add terms to a covered work in accord with this section, you |
| 3968 | must place, in the relevant source files, a statement of the |
| 3969 | additional terms that apply to those files, or a notice indicating |
| 3970 | where to find the applicable terms. |
| 3971 | |
| 3972 | Additional terms, permissive or non-permissive, may be stated in |
| 3973 | the form of a separately written license, or stated as exceptions; |
| 3974 | the above requirements apply either way. |
| 3975 | |
| 3976 | 8. Termination. |
| 3977 | |
| 3978 | You may not propagate or modify a covered work except as expressly |
| 3979 | provided under this License. Any attempt otherwise to propagate or |
| 3980 | modify it is void, and will automatically terminate your rights |
| 3981 | under this License (including any patent licenses granted under the |
| 3982 | third paragraph of section 11). |
| 3983 | |
| 3984 | However, if you cease all violation of this License, then your |
| 3985 | license from a particular copyright holder is reinstated (a) |
| 3986 | provisionally, unless and until the copyright holder explicitly and |
| 3987 | finally terminates your license, and (b) permanently, if the |
| 3988 | copyright holder fails to notify you of the violation by some |
| 3989 | reasonable means prior to 60 days after the cessation. |
| 3990 | |
| 3991 | Moreover, your license from a particular copyright holder is |
| 3992 | reinstated permanently if the copyright holder notifies you of the |
| 3993 | violation by some reasonable means, this is the first time you have |
| 3994 | received notice of violation of this License (for any work) from |
| 3995 | that copyright holder, and you cure the violation prior to 30 days |
| 3996 | after your receipt of the notice. |
| 3997 | |
| 3998 | Termination of your rights under this section does not terminate |
| 3999 | the licenses of parties who have received copies or rights from you |
| 4000 | under this License. If your rights have been terminated and not |
| 4001 | permanently reinstated, you do not qualify to receive new licenses |
| 4002 | for the same material under section 10. |
| 4003 | |
| 4004 | 9. Acceptance Not Required for Having Copies. |
| 4005 | |
| 4006 | You are not required to accept this License in order to receive or |
| 4007 | run a copy of the Program. Ancillary propagation of a covered work |
| 4008 | occurring solely as a consequence of using peer-to-peer |
| 4009 | transmission to receive a copy likewise does not require |
| 4010 | acceptance. However, nothing other than this License grants you |
| 4011 | permission to propagate or modify any covered work. These actions |
| 4012 | infringe copyright if you do not accept this License. Therefore, |
| 4013 | by modifying or propagating a covered work, you indicate your |
| 4014 | acceptance of this License to do so. |
| 4015 | |
| 4016 | 10. Automatic Licensing of Downstream Recipients. |
| 4017 | |
| 4018 | Each time you convey a covered work, the recipient automatically |
| 4019 | receives a license from the original licensors, to run, modify and |
| 4020 | propagate that work, subject to this License. You are not |
| 4021 | responsible for enforcing compliance by third parties with this |
| 4022 | License. |
| 4023 | |
| 4024 | An "entity transaction" is a transaction transferring control of an |
| 4025 | organization, or substantially all assets of one, or subdividing an |
| 4026 | organization, or merging organizations. If propagation of a |
| 4027 | covered work results from an entity transaction, each party to that |
| 4028 | transaction who receives a copy of the work also receives whatever |
| 4029 | licenses to the work the party's predecessor in interest had or |
| 4030 | could give under the previous paragraph, plus a right to possession |
| 4031 | of the Corresponding Source of the work from the predecessor in |
| 4032 | interest, if the predecessor has it or can get it with reasonable |
| 4033 | efforts. |
| 4034 | |
| 4035 | You may not impose any further restrictions on the exercise of the |
| 4036 | rights granted or affirmed under this License. For example, you |
| 4037 | may not impose a license fee, royalty, or other charge for exercise |
| 4038 | of rights granted under this License, and you may not initiate |
| 4039 | litigation (including a cross-claim or counterclaim in a lawsuit) |
| 4040 | alleging that any patent claim is infringed by making, using, |
| 4041 | selling, offering for sale, or importing the Program or any portion |
| 4042 | of it. |
| 4043 | |
| 4044 | 11. Patents. |
| 4045 | |
| 4046 | A "contributor" is a copyright holder who authorizes use under this |
| 4047 | License of the Program or a work on which the Program is based. |
| 4048 | The work thus licensed is called the contributor's "contributor |
| 4049 | version". |
| 4050 | |
| 4051 | A contributor's "essential patent claims" are all patent claims |
| 4052 | owned or controlled by the contributor, whether already acquired or |
| 4053 | hereafter acquired, that would be infringed by some manner, |
| 4054 | permitted by this License, of making, using, or selling its |
| 4055 | contributor version, but do not include claims that would be |
| 4056 | infringed only as a consequence of further modification of the |
| 4057 | contributor version. For purposes of this definition, "control" |
| 4058 | includes the right to grant patent sublicenses in a manner |
| 4059 | consistent with the requirements of this License. |
| 4060 | |
| 4061 | Each contributor grants you a non-exclusive, worldwide, |
| 4062 | royalty-free patent license under the contributor's essential |
| 4063 | patent claims, to make, use, sell, offer for sale, import and |
| 4064 | otherwise run, modify and propagate the contents of its contributor |
| 4065 | version. |
| 4066 | |
| 4067 | In the following three paragraphs, a "patent license" is any |
| 4068 | express agreement or commitment, however denominated, not to |
| 4069 | enforce a patent (such as an express permission to practice a |
| 4070 | patent or covenant not to sue for patent infringement). To "grant" |
| 4071 | such a patent license to a party means to make such an agreement or |
| 4072 | commitment not to enforce a patent against the party. |
| 4073 | |
| 4074 | If you convey a covered work, knowingly relying on a patent |
| 4075 | license, and the Corresponding Source of the work is not available |
| 4076 | for anyone to copy, free of charge and under the terms of this |
| 4077 | License, through a publicly available network server or other |
| 4078 | readily accessible means, then you must either (1) cause the |
| 4079 | Corresponding Source to be so available, or (2) arrange to deprive |
| 4080 | yourself of the benefit of the patent license for this particular |
| 4081 | work, or (3) arrange, in a manner consistent with the requirements |
| 4082 | of this License, to extend the patent license to downstream |
| 4083 | recipients. "Knowingly relying" means you have actual knowledge |
| 4084 | that, but for the patent license, your conveying the covered work |
| 4085 | in a country, or your recipient's use of the covered work in a |
| 4086 | country, would infringe one or more identifiable patents in that |
| 4087 | country that you have reason to believe are valid. |
| 4088 | |
| 4089 | If, pursuant to or in connection with a single transaction or |
| 4090 | arrangement, you convey, or propagate by procuring conveyance of, a |
| 4091 | covered work, and grant a patent license to some of the parties |
| 4092 | receiving the covered work authorizing them to use, propagate, |
| 4093 | modify or convey a specific copy of the covered work, then the |
| 4094 | patent license you grant is automatically extended to all |
| 4095 | recipients of the covered work and works based on it. |
| 4096 | |
| 4097 | A patent license is "discriminatory" if it does not include within |
| 4098 | the scope of its coverage, prohibits the exercise of, or is |
| 4099 | conditioned on the non-exercise of one or more of the rights that |
| 4100 | are specifically granted under this License. You may not convey a |
| 4101 | covered work if you are a party to an arrangement with a third |
| 4102 | party that is in the business of distributing software, under which |
| 4103 | you make payment to the third party based on the extent of your |
| 4104 | activity of conveying the work, and under which the third party |
| 4105 | grants, to any of the parties who would receive the covered work |
| 4106 | from you, a discriminatory patent license (a) in connection with |
| 4107 | copies of the covered work conveyed by you (or copies made from |
| 4108 | those copies), or (b) primarily for and in connection with specific |
| 4109 | products or compilations that contain the covered work, unless you |
| 4110 | entered into that arrangement, or that patent license was granted, |
| 4111 | prior to 28 March 2007. |
| 4112 | |
| 4113 | Nothing in this License shall be construed as excluding or limiting |
| 4114 | any implied license or other defenses to infringement that may |
| 4115 | otherwise be available to you under applicable patent law. |
| 4116 | |
| 4117 | 12. No Surrender of Others' Freedom. |
| 4118 | |
| 4119 | If conditions are imposed on you (whether by court order, agreement |
| 4120 | or otherwise) that contradict the conditions of this License, they |
| 4121 | do not excuse you from the conditions of this License. If you |
| 4122 | cannot convey a covered work so as to satisfy simultaneously your |
| 4123 | obligations under this License and any other pertinent obligations, |
| 4124 | then as a consequence you may not convey it at all. For example, |
| 4125 | if you agree to terms that obligate you to collect a royalty for |
| 4126 | further conveying from those to whom you convey the Program, the |
| 4127 | only way you could satisfy both those terms and this License would |
| 4128 | be to refrain entirely from conveying the Program. |
| 4129 | |
| 4130 | 13. Use with the GNU Affero General Public License. |
| 4131 | |
| 4132 | Notwithstanding any other provision of this License, you have |
| 4133 | permission to link or combine any covered work with a work licensed |
| 4134 | under version 3 of the GNU Affero General Public License into a |
| 4135 | single combined work, and to convey the resulting work. The terms |
| 4136 | of this License will continue to apply to the part which is the |
| 4137 | covered work, but the special requirements of the GNU Affero |
| 4138 | General Public License, section 13, concerning interaction through |
| 4139 | a network will apply to the combination as such. |
| 4140 | |
| 4141 | 14. Revised Versions of this License. |
| 4142 | |
| 4143 | The Free Software Foundation may publish revised and/or new |
| 4144 | versions of the GNU General Public License from time to time. Such |
| 4145 | new versions will be similar in spirit to the present version, but |
| 4146 | may differ in detail to address new problems or concerns. |
| 4147 | |
| 4148 | Each version is given a distinguishing version number. If the |
| 4149 | Program specifies that a certain numbered version of the GNU |
| 4150 | General Public License "or any later version" applies to it, you |
| 4151 | have the option of following the terms and conditions either of |
| 4152 | that numbered version or of any later version published by the Free |
| 4153 | Software Foundation. If the Program does not specify a version |
| 4154 | number of the GNU General Public License, you may choose any |
| 4155 | version ever published by the Free Software Foundation. |
| 4156 | |
| 4157 | If the Program specifies that a proxy can decide which future |
| 4158 | versions of the GNU General Public License can be used, that |
| 4159 | proxy's public statement of acceptance of a version permanently |
| 4160 | authorizes you to choose that version for the Program. |
| 4161 | |
| 4162 | Later license versions may give you additional or different |
| 4163 | permissions. However, no additional obligations are imposed on any |
| 4164 | author or copyright holder as a result of your choosing to follow a |
| 4165 | later version. |
| 4166 | |
| 4167 | 15. Disclaimer of Warranty. |
| 4168 | |
| 4169 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY |
| 4170 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE |
| 4171 | COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" |
| 4172 | WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, |
| 4173 | INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF |
| 4174 | MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE |
| 4175 | RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. |
| 4176 | SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL |
| 4177 | NECESSARY SERVICING, REPAIR OR CORRECTION. |
| 4178 | |
| 4179 | 16. Limitation of Liability. |
| 4180 | |
| 4181 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN |
| 4182 | WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES |
| 4183 | AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR |
| 4184 | DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR |
| 4185 | CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE |
| 4186 | THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA |
| 4187 | BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD |
| 4188 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER |
| 4189 | PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF |
| 4190 | THE POSSIBILITY OF SUCH DAMAGES. |
| 4191 | |
| 4192 | 17. Interpretation of Sections 15 and 16. |
| 4193 | |
| 4194 | If the disclaimer of warranty and limitation of liability provided |
| 4195 | above cannot be given local legal effect according to their terms, |
| 4196 | reviewing courts shall apply local law that most closely |
| 4197 | approximates an absolute waiver of all civil liability in |
| 4198 | connection with the Program, unless a warranty or assumption of |
| 4199 | liability accompanies a copy of the Program in return for a fee. |
| 4200 | |
| 4201 | END OF TERMS AND CONDITIONS |
| 4202 | |
| 4203 | How to Apply These Terms to Your New Programs |
| 4204 | ============================================= |
| 4205 | |
| 4206 | If you develop a new program, and you want it to be of the greatest |
| 4207 | possible use to the public, the best way to achieve this is to make it |
| 4208 | free software which everyone can redistribute and change under these |
| 4209 | terms. |
| 4210 | |
| 4211 | To do so, attach the following notices to the program. It is safest |
| 4212 | to attach them to the start of each source file to most effectively |
| 4213 | state the exclusion of warranty; and each file should have at least the |
| 4214 | "copyright" line and a pointer to where the full notice is found. |
| 4215 | ONE LINE TO GIVE THE PROGRAM'S NAME AND A BRIEF IDEA OF WHAT IT DOES. |
| 4216 | Copyright (C) YEAR NAME OF AUTHOR |
| 4217 | |
| 4218 | This program is free software: you can redistribute it and/or modify |
| 4219 | it under the terms of the GNU General Public License as published by |
| 4220 | the Free Software Foundation, either version 3 of the License, or (at |
| 4221 | your option) any later version. |
| 4222 | |
| 4223 | This program is distributed in the hope that it will be useful, but |
| 4224 | WITHOUT ANY WARRANTY; without even the implied warranty of |
| 4225 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 4226 | General Public License for more details. |
| 4227 | |
| 4228 | You should have received a copy of the GNU General Public License |
| 4229 | along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 4230 | |
| 4231 | Also add information on how to contact you by electronic and paper |
| 4232 | mail. |
| 4233 | |
| 4234 | If the program does terminal interaction, make it output a short |
| 4235 | notice like this when it starts in an interactive mode: |
| 4236 | |
| 4237 | PROGRAM Copyright (C) YEAR NAME OF AUTHOR |
| 4238 | This program comes with ABSOLUTELY NO WARRANTY; for details type ‘show w’. |
| 4239 | This is free software, and you are welcome to redistribute it under certain conditions; type ‘show c’ for details. |
| 4240 | |
| 4241 | The hypothetical commands ‘show w’ and ‘show c’ should show the |
| 4242 | appropriate parts of the General Public License. Of course, your |
| 4243 | program's commands might be different; for a GUI interface, you would |
| 4244 | use an "about box". |
| 4245 | |
| 4246 | You should also get your employer (if you work as a programmer) or |
| 4247 | school, if any, to sign a "copyright disclaimer" for the program, if |
| 4248 | necessary. For more information on this, and how to apply and follow |
| 4249 | the GNU GPL, see <http://www.gnu.org/licenses/>. |
| 4250 | |
| 4251 | The GNU General Public License does not permit incorporating your |
| 4252 | program into proprietary programs. If your program is a subroutine |
| 4253 | library, you may consider it more useful to permit linking proprietary |
| 4254 | applications with the library. If this is what you want to do, use the |
| 4255 | GNU Lesser General Public License instead of this License. But first, |
| 4256 | please read <http://www.gnu.org/philosophy/why-not-lgpl.html>. |
| 4257 | |
| 4258 | |
| 4259 | File: emms.info, Node: The GNU FDL, Next: Concept Index, Prev: Copying, Up: Top |
| 4260 | |
| 4261 | 35 GNU Free Documentation License |
| 4262 | ********************************* |
| 4263 | |
| 4264 | Version 1.2, November 2002 |
| 4265 | |
| 4266 | Copyright © 2000,2001,2002 Free Software Foundation, Inc. |
| 4267 | 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA |
| 4268 | |
| 4269 | Everyone is permitted to copy and distribute verbatim copies |
| 4270 | of this license document, but changing it is not allowed. |
| 4271 | |
| 4272 | 0. PREAMBLE |
| 4273 | |
| 4274 | The purpose of this License is to make a manual, textbook, or other |
| 4275 | functional and useful document “free” in the sense of freedom: to |
| 4276 | assure everyone the effective freedom to copy and redistribute it, |
| 4277 | with or without modifying it, either commercially or |
| 4278 | noncommercially. Secondarily, this License preserves for the |
| 4279 | author and publisher a way to get credit for their work, while not |
| 4280 | being considered responsible for modifications made by others. |
| 4281 | |
| 4282 | This License is a kind of "copyleft", which means that derivative |
| 4283 | works of the document must themselves be free in the same sense. |
| 4284 | It complements the GNU General Public License, which is a copyleft |
| 4285 | license designed for free software. |
| 4286 | |
| 4287 | We have designed this License in order to use it for manuals for |
| 4288 | free software, because free software needs free documentation: a |
| 4289 | free program should come with manuals providing the same freedoms |
| 4290 | that the software does. But this License is not limited to |
| 4291 | software manuals; it can be used for any textual work, regardless |
| 4292 | of subject matter or whether it is published as a printed book. We |
| 4293 | recommend this License principally for works whose purpose is |
| 4294 | instruction or reference. |
| 4295 | |
| 4296 | 1. APPLICABILITY AND DEFINITIONS |
| 4297 | |
| 4298 | This License applies to any manual or other work, in any medium, |
| 4299 | that contains a notice placed by the copyright holder saying it can |
| 4300 | be distributed under the terms of this License. Such a notice |
| 4301 | grants a world-wide, royalty-free license, unlimited in duration, |
| 4302 | to use that work under the conditions stated herein. The |
| 4303 | "Document", below, refers to any such manual or work. Any member |
| 4304 | of the public is a licensee, and is addressed as "you". You accept |
| 4305 | the license if you copy, modify or distribute the work in a way |
| 4306 | requiring permission under copyright law. |
| 4307 | |
| 4308 | A "Modified Version" of the Document means any work containing the |
| 4309 | Document or a portion of it, either copied verbatim, or with |
| 4310 | modifications and/or translated into another language. |
| 4311 | |
| 4312 | A "Secondary Section" is a named appendix or a front-matter section |
| 4313 | of the Document that deals exclusively with the relationship of the |
| 4314 | publishers or authors of the Document to the Document's overall |
| 4315 | subject (or to related matters) and contains nothing that could |
| 4316 | fall directly within that overall subject. (Thus, if the Document |
| 4317 | is in part a textbook of mathematics, a Secondary Section may not |
| 4318 | explain any mathematics.) The relationship could be a matter of |
| 4319 | historical connection with the subject or with related matters, or |
| 4320 | of legal, commercial, philosophical, ethical or political position |
| 4321 | regarding them. |
| 4322 | |
| 4323 | The "Invariant Sections" are certain Secondary Sections whose |
| 4324 | titles are designated, as being those of Invariant Sections, in the |
| 4325 | notice that says that the Document is released under this License. |
| 4326 | If a section does not fit the above definition of Secondary then it |
| 4327 | is not allowed to be designated as Invariant. The Document may |
| 4328 | contain zero Invariant Sections. If the Document does not identify |
| 4329 | any Invariant Sections then there are none. |
| 4330 | |
| 4331 | The "Cover Texts" are certain short passages of text that are |
| 4332 | listed, as Front-Cover Texts or Back-Cover Texts, in the notice |
| 4333 | that says that the Document is released under this License. A |
| 4334 | Front-Cover Text may be at most 5 words, and a Back-Cover Text may |
| 4335 | be at most 25 words. |
| 4336 | |
| 4337 | A "Transparent" copy of the Document means a machine-readable copy, |
| 4338 | represented in a format whose specification is available to the |
| 4339 | general public, that is suitable for revising the document |
| 4340 | straightforwardly with generic text editors or (for images composed |
| 4341 | of pixels) generic paint programs or (for drawings) some widely |
| 4342 | available drawing editor, and that is suitable for input to text |
| 4343 | formatters or for automatic translation to a variety of formats |
| 4344 | suitable for input to text formatters. A copy made in an otherwise |
| 4345 | Transparent file format whose markup, or absence of markup, has |
| 4346 | been arranged to thwart or discourage subsequent modification by |
| 4347 | readers is not Transparent. An image format is not Transparent if |
| 4348 | used for any substantial amount of text. A copy that is not |
| 4349 | "Transparent" is called "Opaque". |
| 4350 | |
| 4351 | Examples of suitable formats for Transparent copies include plain |
| 4352 | ASCII without markup, Texinfo input format, LaTeX input format, |
| 4353 | SGML or XML using a publicly available DTD, and standard-conforming |
| 4354 | simple HTML, PostScript or PDF designed for human modification. |
| 4355 | Examples of transparent image formats include PNG, XCF and JPG. |
| 4356 | Opaque formats include proprietary formats that can be read and |
| 4357 | edited only by proprietary word processors, SGML or XML for which |
| 4358 | the DTD and/or processing tools are not generally available, and |
| 4359 | the machine-generated HTML, PostScript or PDF produced by some word |
| 4360 | processors for output purposes only. |
| 4361 | |
| 4362 | The "Title Page" means, for a printed book, the title page itself, |
| 4363 | plus such following pages as are needed to hold, legibly, the |
| 4364 | material this License requires to appear in the title page. For |
| 4365 | works in formats which do not have any title page as such, "Title |
| 4366 | Page" means the text near the most prominent appearance of the |
| 4367 | work's title, preceding the beginning of the body of the text. |
| 4368 | |
| 4369 | A section "Entitled XYZ" means a named subunit of the Document |
| 4370 | whose title either is precisely XYZ or contains XYZ in parentheses |
| 4371 | following text that translates XYZ in another language. (Here XYZ |
| 4372 | stands for a specific section name mentioned below, such as |
| 4373 | "Acknowledgements", "Dedications", "Endorsements", or "History".) |
| 4374 | To "Preserve the Title" of such a section when you modify the |
| 4375 | Document means that it remains a section "Entitled XYZ" according |
| 4376 | to this definition. |
| 4377 | |
| 4378 | The Document may include Warranty Disclaimers next to the notice |
| 4379 | which states that this License applies to the Document. These |
| 4380 | Warranty Disclaimers are considered to be included by reference in |
| 4381 | this License, but only as regards disclaiming warranties: any other |
| 4382 | implication that these Warranty Disclaimers may have is void and |
| 4383 | has no effect on the meaning of this License. |
| 4384 | |
| 4385 | 2. VERBATIM COPYING |
| 4386 | |
| 4387 | You may copy and distribute the Document in any medium, either |
| 4388 | commercially or noncommercially, provided that this License, the |
| 4389 | copyright notices, and the license notice saying this License |
| 4390 | applies to the Document are reproduced in all copies, and that you |
| 4391 | add no other conditions whatsoever to those of this License. You |
| 4392 | may not use technical measures to obstruct or control the reading |
| 4393 | or further copying of the copies you make or distribute. However, |
| 4394 | you may accept compensation in exchange for copies. If you |
| 4395 | distribute a large enough number of copies you must also follow the |
| 4396 | conditions in section 3. |
| 4397 | |
| 4398 | You may also lend copies, under the same conditions stated above, |
| 4399 | and you may publicly display copies. |
| 4400 | |
| 4401 | 3. COPYING IN QUANTITY |
| 4402 | |
| 4403 | If you publish printed copies (or copies in media that commonly |
| 4404 | have printed covers) of the Document, numbering more than 100, and |
| 4405 | the Document's license notice requires Cover Texts, you must |
| 4406 | enclose the copies in covers that carry, clearly and legibly, all |
| 4407 | these Cover Texts: Front-Cover Texts on the front cover, and |
| 4408 | Back-Cover Texts on the back cover. Both covers must also clearly |
| 4409 | and legibly identify you as the publisher of these copies. The |
| 4410 | front cover must present the full title with all words of the title |
| 4411 | equally prominent and visible. You may add other material on the |
| 4412 | covers in addition. Copying with changes limited to the covers, as |
| 4413 | long as they preserve the title of the Document and satisfy these |
| 4414 | conditions, can be treated as verbatim copying in other respects. |
| 4415 | |
| 4416 | If the required texts for either cover are too voluminous to fit |
| 4417 | legibly, you should put the first ones listed (as many as fit |
| 4418 | reasonably) on the actual cover, and continue the rest onto |
| 4419 | adjacent pages. |
| 4420 | |
| 4421 | If you publish or distribute Opaque copies of the Document |
| 4422 | numbering more than 100, you must either include a machine-readable |
| 4423 | Transparent copy along with each Opaque copy, or state in or with |
| 4424 | each Opaque copy a computer-network location from which the general |
| 4425 | network-using public has access to download using public-standard |
| 4426 | network protocols a complete Transparent copy of the Document, free |
| 4427 | of added material. If you use the latter option, you must take |
| 4428 | reasonably prudent steps, when you begin distribution of Opaque |
| 4429 | copies in quantity, to ensure that this Transparent copy will |
| 4430 | remain thus accessible at the stated location until at least one |
| 4431 | year after the last time you distribute an Opaque copy (directly or |
| 4432 | through your agents or retailers) of that edition to the public. |
| 4433 | |
| 4434 | It is requested, but not required, that you contact the authors of |
| 4435 | the Document well before redistributing any large number of copies, |
| 4436 | to give them a chance to provide you with an updated version of the |
| 4437 | Document. |
| 4438 | |
| 4439 | 4. MODIFICATIONS |
| 4440 | |
| 4441 | You may copy and distribute a Modified Version of the Document |
| 4442 | under the conditions of sections 2 and 3 above, provided that you |
| 4443 | release the Modified Version under precisely this License, with the |
| 4444 | Modified Version filling the role of the Document, thus licensing |
| 4445 | distribution and modification of the Modified Version to whoever |
| 4446 | possesses a copy of it. In addition, you must do these things in |
| 4447 | the Modified Version: |
| 4448 | |
| 4449 | A. Use in the Title Page (and on the covers, if any) a title |
| 4450 | distinct from that of the Document, and from those of previous |
| 4451 | versions (which should, if there were any, be listed in the |
| 4452 | History section of the Document). You may use the same title |
| 4453 | as a previous version if the original publisher of that |
| 4454 | version gives permission. |
| 4455 | |
| 4456 | B. List on the Title Page, as authors, one or more persons or |
| 4457 | entities responsible for authorship of the modifications in |
| 4458 | the Modified Version, together with at least five of the |
| 4459 | principal authors of the Document (all of its principal |
| 4460 | authors, if it has fewer than five), unless they release you |
| 4461 | from this requirement. |
| 4462 | |
| 4463 | C. State on the Title page the name of the publisher of the |
| 4464 | Modified Version, as the publisher. |
| 4465 | |
| 4466 | D. Preserve all the copyright notices of the Document. |
| 4467 | |
| 4468 | E. Add an appropriate copyright notice for your modifications |
| 4469 | adjacent to the other copyright notices. |
| 4470 | |
| 4471 | F. Include, immediately after the copyright notices, a license |
| 4472 | notice giving the public permission to use the Modified |
| 4473 | Version under the terms of this License, in the form shown in |
| 4474 | the Addendum below. |
| 4475 | |
| 4476 | G. Preserve in that license notice the full lists of Invariant |
| 4477 | Sections and required Cover Texts given in the Document's |
| 4478 | license notice. |
| 4479 | |
| 4480 | H. Include an unaltered copy of this License. |
| 4481 | |
| 4482 | I. Preserve the section Entitled "History", Preserve its Title, |
| 4483 | and add to it an item stating at least the title, year, new |
| 4484 | authors, and publisher of the Modified Version as given on the |
| 4485 | Title Page. If there is no section Entitled "History" in the |
| 4486 | Document, create one stating the title, year, authors, and |
| 4487 | publisher of the Document as given on its Title Page, then add |
| 4488 | an item describing the Modified Version as stated in the |
| 4489 | previous sentence. |
| 4490 | |
| 4491 | J. Preserve the network location, if any, given in the Document |
| 4492 | for public access to a Transparent copy of the Document, and |
| 4493 | likewise the network locations given in the Document for |
| 4494 | previous versions it was based on. These may be placed in the |
| 4495 | "History" section. You may omit a network location for a work |
| 4496 | that was published at least four years before the Document |
| 4497 | itself, or if the original publisher of the version it refers |
| 4498 | to gives permission. |
| 4499 | |
| 4500 | K. For any section Entitled "Acknowledgements" or "Dedications", |
| 4501 | Preserve the Title of the section, and preserve in the section |
| 4502 | all the substance and tone of each of the contributor |
| 4503 | acknowledgements and/or dedications given therein. |
| 4504 | |
| 4505 | L. Preserve all the Invariant Sections of the Document, unaltered |
| 4506 | in their text and in their titles. Section numbers or the |
| 4507 | equivalent are not considered part of the section titles. |
| 4508 | |
| 4509 | M. Delete any section Entitled "Endorsements". Such a section |
| 4510 | may not be included in the Modified Version. |
| 4511 | |
| 4512 | N. Do not retitle any existing section to be Entitled |
| 4513 | "Endorsements" or to conflict in title with any Invariant |
| 4514 | Section. |
| 4515 | |
| 4516 | O. Preserve any Warranty Disclaimers. |
| 4517 | |
| 4518 | If the Modified Version includes new front-matter sections or |
| 4519 | appendices that qualify as Secondary Sections and contain no |
| 4520 | material copied from the Document, you may at your option designate |
| 4521 | some or all of these sections as invariant. To do this, add their |
| 4522 | titles to the list of Invariant Sections in the Modified Version's |
| 4523 | license notice. These titles must be distinct from any other |
| 4524 | section titles. |
| 4525 | |
| 4526 | You may add a section Entitled "Endorsements", provided it contains |
| 4527 | nothing but endorsements of your Modified Version by various |
| 4528 | parties--for example, statements of peer review or that the text |
| 4529 | has been approved by an organization as the authoritative |
| 4530 | definition of a standard. |
| 4531 | |
| 4532 | You may add a passage of up to five words as a Front-Cover Text, |
| 4533 | and a passage of up to 25 words as a Back-Cover Text, to the end of |
| 4534 | the list of Cover Texts in the Modified Version. Only one passage |
| 4535 | of Front-Cover Text and one of Back-Cover Text may be added by (or |
| 4536 | through arrangements made by) any one entity. If the Document |
| 4537 | already includes a cover text for the same cover, previously added |
| 4538 | by you or by arrangement made by the same entity you are acting on |
| 4539 | behalf of, you may not add another; but you may replace the old |
| 4540 | one, on explicit permission from the previous publisher that added |
| 4541 | the old one. |
| 4542 | |
| 4543 | The author(s) and publisher(s) of the Document do not by this |
| 4544 | License give permission to use their names for publicity for or to |
| 4545 | assert or imply endorsement of any Modified Version. |
| 4546 | |
| 4547 | 5. COMBINING DOCUMENTS |
| 4548 | |
| 4549 | You may combine the Document with other documents released under |
| 4550 | this License, under the terms defined in section 4 above for |
| 4551 | modified versions, provided that you include in the combination all |
| 4552 | of the Invariant Sections of all of the original documents, |
| 4553 | unmodified, and list them all as Invariant Sections of your |
| 4554 | combined work in its license notice, and that you preserve all |
| 4555 | their Warranty Disclaimers. |
| 4556 | |
| 4557 | The combined work need only contain one copy of this License, and |
| 4558 | multiple identical Invariant Sections may be replaced with a single |
| 4559 | copy. If there are multiple Invariant Sections with the same name |
| 4560 | but different contents, make the title of each such section unique |
| 4561 | by adding at the end of it, in parentheses, the name of the |
| 4562 | original author or publisher of that section if known, or else a |
| 4563 | unique number. Make the same adjustment to the section titles in |
| 4564 | the list of Invariant Sections in the license notice of the |
| 4565 | combined work. |
| 4566 | |
| 4567 | In the combination, you must combine any sections Entitled |
| 4568 | "History" in the various original documents, forming one section |
| 4569 | Entitled "History"; likewise combine any sections Entitled |
| 4570 | "Acknowledgements", and any sections Entitled "Dedications". You |
| 4571 | must delete all sections Entitled "Endorsements." |
| 4572 | |
| 4573 | 6. COLLECTIONS OF DOCUMENTS |
| 4574 | |
| 4575 | You may make a collection consisting of the Document and other |
| 4576 | documents released under this License, and replace the individual |
| 4577 | copies of this License in the various documents with a single copy |
| 4578 | that is included in the collection, provided that you follow the |
| 4579 | rules of this License for verbatim copying of each of the documents |
| 4580 | in all other respects. |
| 4581 | |
| 4582 | You may extract a single document from such a collection, and |
| 4583 | distribute it individually under this License, provided you insert |
| 4584 | a copy of this License into the extracted document, and follow this |
| 4585 | License in all other respects regarding verbatim copying of that |
| 4586 | document. |
| 4587 | |
| 4588 | 7. AGGREGATION WITH INDEPENDENT WORKS |
| 4589 | |
| 4590 | A compilation of the Document or its derivatives with other |
| 4591 | separate and independent documents or works, in or on a volume of a |
| 4592 | storage or distribution medium, is called an "aggregate" if the |
| 4593 | copyright resulting from the compilation is not used to limit the |
| 4594 | legal rights of the compilation's users beyond what the individual |
| 4595 | works permit. When the Document is included in an aggregate, this |
| 4596 | License does not apply to the other works in the aggregate which |
| 4597 | are not themselves derivative works of the Document. |
| 4598 | |
| 4599 | If the Cover Text requirement of section 3 is applicable to these |
| 4600 | copies of the Document, then if the Document is less than one half |
| 4601 | of the entire aggregate, the Document's Cover Texts may be placed |
| 4602 | on covers that bracket the Document within the aggregate, or the |
| 4603 | electronic equivalent of covers if the Document is in electronic |
| 4604 | form. Otherwise they must appear on printed covers that bracket |
| 4605 | the whole aggregate. |
| 4606 | |
| 4607 | 8. TRANSLATION |
| 4608 | |
| 4609 | Translation is considered a kind of modification, so you may |
| 4610 | distribute translations of the Document under the terms of section |
| 4611 | 4. Replacing Invariant Sections with translations requires special |
| 4612 | permission from their copyright holders, but you may include |
| 4613 | translations of some or all Invariant Sections in addition to the |
| 4614 | original versions of these Invariant Sections. You may include a |
| 4615 | translation of this License, and all the license notices in the |
| 4616 | Document, and any Warranty Disclaimers, provided that you also |
| 4617 | include the original English version of this License and the |
| 4618 | original versions of those notices and disclaimers. In case of a |
| 4619 | disagreement between the translation and the original version of |
| 4620 | this License or a notice or disclaimer, the original version will |
| 4621 | prevail. |
| 4622 | |
| 4623 | If a section in the Document is Entitled "Acknowledgements", |
| 4624 | "Dedications", or "History", the requirement (section 4) to |
| 4625 | Preserve its Title (section 1) will typically require changing the |
| 4626 | actual title. |
| 4627 | |
| 4628 | 9. TERMINATION |
| 4629 | |
| 4630 | You may not copy, modify, sublicense, or distribute the Document |
| 4631 | except as expressly provided for under this License. Any other |
| 4632 | attempt to copy, modify, sublicense or distribute the Document is |
| 4633 | void, and will automatically terminate your rights under this |
| 4634 | License. However, parties who have received copies, or rights, |
| 4635 | from you under this License will not have their licenses terminated |
| 4636 | so long as such parties remain in full compliance. |
| 4637 | |
| 4638 | 10. FUTURE REVISIONS OF THIS LICENSE |
| 4639 | |
| 4640 | The Free Software Foundation may publish new, revised versions of |
| 4641 | the GNU Free Documentation License from time to time. Such new |
| 4642 | versions will be similar in spirit to the present version, but may |
| 4643 | differ in detail to address new problems or concerns. See |
| 4644 | <http://www.gnu.org/copyleft/>. |
| 4645 | |
| 4646 | Each version of the License is given a distinguishing version |
| 4647 | number. If the Document specifies that a particular numbered |
| 4648 | version of this License "or any later version" applies to it, you |
| 4649 | have the option of following the terms and conditions either of |
| 4650 | that specified version or of any later version that has been |
| 4651 | published (not as a draft) by the Free Software Foundation. If the |
| 4652 | Document does not specify a version number of this License, you may |
| 4653 | choose any version ever published (not as a draft) by the Free |
| 4654 | Software Foundation. |
| 4655 | |
| 4656 | 35.1 ADDENDUM: How to use this License for your documents |
| 4657 | ========================================================= |
| 4658 | |
| 4659 | To use this License in a document you have written, include a copy of |
| 4660 | the License in the document and put the following copyright and license |
| 4661 | notices just after the title page: |
| 4662 | |
| 4663 | Copyright (C) YEAR YOUR NAME. |
| 4664 | Permission is granted to copy, distribute and/or modify this document |
| 4665 | under the terms of the GNU Free Documentation License, Version 1.2 |
| 4666 | or any later version published by the Free Software Foundation; |
| 4667 | with no Invariant Sections, no Front-Cover Texts, and no Back-Cover |
| 4668 | Texts. A copy of the license is included in the section entitled ``GNU |
| 4669 | Free Documentation License''. |
| 4670 | |
| 4671 | If you have Invariant Sections, Front-Cover Texts and Back-Cover |
| 4672 | Texts, replace the "with...Texts." line with this: |
| 4673 | |
| 4674 | with the Invariant Sections being LIST THEIR TITLES, with |
| 4675 | the Front-Cover Texts being LIST, and with the Back-Cover Texts |
| 4676 | being LIST. |
| 4677 | |
| 4678 | If you have Invariant Sections without Cover Texts, or some other |
| 4679 | combination of the three, merge those two alternatives to suit the |
| 4680 | situation. |
| 4681 | |
| 4682 | If your document contains nontrivial examples of program code, we |
| 4683 | recommend releasing these examples in parallel under your choice of free |
| 4684 | software license, such as the GNU General Public License, to permit |
| 4685 | their use in free software. |
| 4686 | |
| 4687 | |
| 4688 | File: emms.info, Node: Concept Index, Next: Function Index, Prev: The GNU FDL, Up: Top |
| 4689 | |
| 4690 | Concept Index |
| 4691 | ************* |
| 4692 | |
| 4693 |