aboutsummaryrefslogtreecommitdiff
path: root/doc/emms.texinfo
blob: d3e30cfe143bc1c83ebcc1b6681fafbe53dc5e15 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
\input texinfo   @c -*-texinfo-*-
@c %**start of header
@setfilename emms.info
@settitle The Emms Manual
@c %**end of header

@c History: The Emms manual was almost entirely rewritten for the
@c release of Emms version 2.


@dircategory Emacs
@direntry
* Emms: (emms).           The Emacs Multimedia System
@end direntry

@copying
 @copyright{} 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2014,
   2015, 2016, 2020, 2021  Free Software Foundation, Inc.
@quotation
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.1 or
any later version published by the Free Software Foundation; with no
Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A
copy of the license is included in the section entitled "GNU Free
Documentation License".
@end quotation
@end copying

@c For printed material
@titlepage
@title The Emms Manual

@page
@vskip 0pt plus 1filll
@insertcopying
@end titlepage

@contents
@c END For printed material

@ifnottex
@node Top, Introduction, (dir), (dir)
@top Emms Manual

This is the Manual for the Emacs Multimedia System.

@insertcopying

@menu
Starting out
* Introduction::        Introduction to Emms.
* Quickstart Guide::    First steps with Emms for new users.
* Installation::        How to install Emms on your System.
* Setup::               How to setup Emms.
* Configuration::       More detailed setup and configuration.
* Getting Help::        Where to get help with Emms and make suggestions.
* Formats and Freedom:: File formats without restrictions.

Emms basics
* Basic Commands::      How to control Emms with ease.
* The Core File::       The inner core of Emms.
* Sources::             Sources for playlists-creation.
* Simple Players::      Some simple players.
* Playlists::           How Emms organizes media.

Advanced Features
* Track Information::        More narrative track descriptions.
* Interactive Playlists::    Interactive Playlists.
* Markable Playlists::       Allow tracks to be marked.
* Extending Emms::       How to define new players and modules.

Modules and Extensions
* The Browser::          Advanced metadata browsing.
* Sorting Playlists::    Sorting the order of the tracks.
* Persistent Playlists:: Restoring playlists on emacs startup.
* Editing Tracks::       Editing track information from within Emms.
* Emms Mode Line::       Emms information on the mode line.
* Limiting::             Derive a new playlist from the current.
* Music Player Daemon::  Interface to Music Player Daemon.
* Lyrics::               Displaying lyrics synchronously.
* Volume::               Changing the volume.
* Streaming Audio::      Interface to streaming audio.
* APE / FLAC Commands::  How to play next or previous track in these files.
* Bookmarks::            Saving a place in a media file.
* Managing Playlists::   Managing multiple playlists.
* GNU FM::               Connect to music community websites.

Copying and license
* Copying::             The GNU General Public License gives you permission to
                            redistribute Emms on certain terms; it also explains
                            that there is no warranty.
* The GNU FDL::         The license for this documentation.

Indices
* Concept Index::
* Function Index::
* Variable Index::
* Keybinding Index::

@detailmenu
--- The Detailed Node Listing ---

Here are some other nodes which are really inferiors of the ones
already listed, mentioned here so you can get to them in one step:

Installation
* Compiling Emms::      Compiling Emms into Byte-Code.

The Core File
* User Variables::     Variables for the user to tweak.
* Hooks::              Hooks for important Emms functions.
* Core Functions::     Providing the basic functionality of Emms.

Track Information
* Metadata Utilities:: Supported external metadata utilities.
* Defining Info Methods::    Defining new info methods.

Extending Emms
* New Player::               How to define a new player.
* Simple Player for `play':: Example player using @command{play}.
* More Complex Player::      Example of a complex player using @command{mpg321}.
@end detailmenu
@end menu

@end ifnottex

@c -------------------------------------------------------------------
@node Introduction
@chapter Introduction

@cindex introduction

Emms is the Emacs Multi-Media System. Emms organizes playlists, allows
browsing through track and album metadata, and plays files by calling
external players.

This manual tries to be the definitive source of information about
Emms, an online version of the manual is available at:
@uref{http://www.gnu.org/software/emms/manual/}.

The basic functionality of Emms consists of three parts: The core, the
sources, and the players.

The core resides in @file{emms.el}, provides a simple playlist, and
the basic functionality to use all the other features of Emms. It
provides the common user commands and interfaces for other parts. It
thinks in tracks, where a track is the combination of a type and a
name - e.g.  the track type 'file has a name that is the file
name. Other track types are possible.

To get to tracks, the core needs sources. The file @file{emms-source-file.el}
provides simple sources to interact with the file system.

When Emms finally has the sources in the playlist, it needs a player
to play them. @file{emms-player-simple.el} defines a few useful
players and provides a straightforward way of providing your own.

The Emms comes with many additional features to extend the
functionality beyond the core.

The way Emms works is easy to customize with your own code or by using
`M-x customize' or by changing the variables directly.


@c -------------------------------------------------------------------
@node Quickstart Guide
@chapter Quickstart Guide

This chapter demonstrates how to setup Emms so that you can start
listening to your music without having to read all of the
documentation first. This is the tl;dr version of the manual.

The first thing you do is to load Emms via GNU ELPA. But if you are
installing manually, then start by telling Emacs where Emms is
located. Let's say you have it in @file{~/elisp/emms/}. So add this
line to your @file{.emacs}:

@lisp
(add-to-list 'load-path "~/elisp/emms/lisp/")
@end lisp

More detailed information about installing Emms can be found in the
installation chapter, @xref{Installation}.

You'll then want to load Emms into Emacs. To achieve this you invoke
the @code{emms-all} setup function by adding the following three lines
to your Emacs initialization file.

@lisp
(require 'emms-setup)
(emms-all)
(emms-default-players)
@end lisp

The function @code{emms-default-players} in the last line sets up the
list of default players. The list contains lightweight specialized
players like ogg123 or mpg321 and we-play-everything-players such as
mplayer, mpv, vlc, etc.. To be sure that emms can play all your music
you should check that your preferred players are installed on the
machine.

More detail about setting up Emms can be found in the setup chapter,
@xref{Setup}.

Emms tries to display the tags (the name of the song, as opposed to
the name of the file) of the music you listen to. Emms can use a
number of pieces of software and libraries as sources for track info,
see @xref{Track Information} for more.

The last thing to do is to tell Emms where is your music; the root
directory of our music collection. Let's say all your music is in
@file{~/Music} or in subdirectories thereof:

@lisp
(setq emms-source-file-default-directory "~/Music/")
@end lisp

OK, now we've set up Emms. Reload your Emacs initialization file or
restart Emacs to let the changes have an effect.

Now we will add all our music to a playlist by invoking @kbd{M-x
emms-add-directory-tree RET ~/Music/ RET}. We do this because then
Emms will read the tags of all your music files and caches them (the
cache is also required for the Emms browser, @xref{The Browser}.)

To switch to the playlist buffer, invoke @kbd{M-x
emms-playlist-mode-go} or simply @kbd{M-x emms}. You may see that some
tracks are displayed with their file name, but as Emms asynchronously
populates its tag cache, track by track, the filenames get replaced
with the artist and track name of the file's tag.

Go ahead and navigate to a track and hit @kbd{RET} on it to start
playback.

Now you can start exploring Emms. It's probably best to begin with the
basic commands (@pxref{Basic Commands}), the interactive playlists
(@pxref{Interactive Playlists}), and the browser (@pxref{The Browser}).


@c -------------------------------------------------------------------
@node Installation
@chapter Installation

@cindex installation

Emms is available via GNU ELPA, which takes care of all of the
following steps automatically.

If you are installing Emms manually, you need to put all the .el files
of emms in a directory in your load-path. For example, if you put all
those files into ~/elisp/emms/, then in your ~/.emacs, you should add:

@lisp
(add-to-list 'load-path "~/elisp/emms/lisp/")
@end lisp
@noindent

@menu
* Compiling Emms::      Compiling Emms into Byte-Code.
@end menu



@node Compiling Emms
@section Compiling Emms

@cindex compiling

If you are using XEmacs, you will need to edit @file{Makefile} as
follows before continuing.

@example
EMACS=xemacs
SITEFLAG=-no-site-file
@end example

You can byte-compile Emms by first entering the directory containing the
Emms source code, followed by invoking:

@command{make}

Which will byte compile Emms. You can then invoke:

@command{make install}

Which will install Emms into your Emacs directories (provided you have
the appropriate permissions to do so on your system).

Note that Emms is a light-weight and agile program, you can therefore
run Emms just fine without byte compiling it.


@c -------------------------------------------------------------------
@node Setup
@chapter Setup

@cindex setup
@cindex setting up Emms
@cindex quick setup

The `emms-setup' feature is provided by the file
@file{emms-setup.el}. It is essentially a collection of shortcuts for
loading different Emms features quickly, but everything you can do
with `emms-setup' can also be done manually.

We use `emms-setup' by calling one of the setup functions.

@defun emms-minimalistic
An Emms setup script.
Playlists and all the basics for playing media, but nothing else.
@end defun

@defun emms-all
An Emms setup script.
Loads all the stable features which come with the Emms distribution.
@end defun

`emms-setup' also comes with a convenience function to set a default
list of media players.

@defun emms-default-players
Set @var{emms-player-list} to @var{emms-setup-default-player-list}.
@end defun

You can of course write your own Emms setup functions like the above
by looking at the existing function definitions in
@file{emms-setup.el}.


@c -------------------------------------------------------------------
@node Configuration
@chapter Configuration

@cindex Configuration

This chapter discusses the configuration of Emms in more detail.

The following code fragment provides a minimal Emms setup without
using the layer of `emms-setup'. It can maybe be used to better
understand the internals of Emms. You can see how Emms needs to know
about players (these are defined in `emms-player-simple') and about
sources for tracks (trivial file system based sources, such as this
`emms-directory-tree', are defined in `emms-source-file').

@lisp
(require 'emms-player-simple)
(require 'emms-source-file)
(require 'emms-source-playlist)
(setq emms-player-list '(emms-player-mpg321
                         emms-player-ogg123
                         emms-player-mplayer))
@end lisp

For a discussion on how to define additional players, see @xref{Simple
Players}.

Much of the behaviour of Emms can be changed by setting
variables. For example:

@lisp
(setq emms-info-asynchronously nil)
(setq emms-playlist-buffer-name "*Music*")
@end lisp

The first @code{setq} turns off the asynchronous updating of info tags. The
second sets the default name of the Emms playlist buffer.

Another way to change Emms variables is to use the M-x
@command{customize} mechanism provided by Emacs.

@menu
* Finding files and speed::     Finding files quickly or portably.
* Setup Examples::              Examples of ways to setup Emms.
@end menu



@node Finding files and speed
@section Finding files and speed

@cindex files
@cindex speed

Emms needs to traverse directories in order to find playable
media. The default method Emms uses to achive this is
@code{emms-source-file-directory-tree-internal} as defined in
@file{emms-source-file.el}.  The above method is written portably and
will always work, but might be too slow if we want to load several
hundred tracks (or more).

@file{emms-source-file.el} defines another method for finding files,
@code{emms-source-file-directory-tree-find} which uses
GNU/find. @code{emms-source-file-directory-tree-find} is usually an
order of magnitude faster, but of course will not work if you do not
have GNU/find installed.

The method Emms will use is defined in the customisable variable
@var{emms-source-file-directory-tree-function}.


@node Setup Examples
@section Setup Examples

@cindex example
@cindex configuration

What follow are samples from real-world Emms configurations which show
some of the variety and breadth of modifications people make to the
default Emms setup.

The following excerpt includes dbus integration, defining a "recent"
filter for the @xref{The Browser}, persistent playlist via
@file{emms-history.el}, and enabling sending track information with
@file{emms-librefm-stream.el}:

@lisp
  ;; notifications
  (require 'emms-dbus)
  (emms-dbus-enable)
  ;; covers
  (setq emms-browser-covers #'emms-browser-cache-thumbnail-async)
  (setq emms-browser-thumbnail-small-size 64)
  (setq emms-browser-thumbnail-medium-size 128)
  ;; filters
  (emms-browser-make-filter "all" #'ignore)
  (emms-browser-make-filter "recent"
     (lambda (track) (< 30
        (time-to-number-of-days
  (time-subtract (current-time)
        (emms-info-track-file-mtime track))))))
  (emms-browser-set-filter (assoc "all" emms-browser-filters))
  ;; history
  (emms-history-load)
  ;; libre-fm
  (emms-librefm-scrobbler-enable)
@end lisp


In the following it is possible to see how some of defaults are set
regarding saving playlists, playlist interaction, as well as adding
special arguments to a specific player backend.

@lisp
  (setq-default
   emms-source-file-default-directory "/mnt/db/mediaCore/sound_music/"

   emms-source-playlist-default-format 'm3u
   emms-playlist-mode-center-when-go t
   emms-playlist-default-major-mode 'emms-playlist-mode
   emms-show-format "NP: %s"

   emms-player-list '(emms-player-mpv)
   emms-player-mpv-environment '("PULSE_PROP_media.role=music")
   emms-player-mpv-parameters '("--quiet" "--really-quiet" "--no-audio-display" "--force-window=no" "--vo=null"))
@end lisp


@c -------------------------------------------------------------------
@node Getting Help
@chapter Getting Help

@cindex mailing list
@cindex website

If you have a bug to report, need help, or wish to suggest a feature,
please feel free to use the Emms mailing list.  The address of the list
is emms-help@@gnu.org.  To subscribe to it, visit
@url{http://lists.gnu.org/mailman/listinfo/emms-help}.

If you are familiar with the Gmane service, there is a Gmane newsgroup
which mirrors this mailing address at gmane.emacs.emms.user.

Emms also has a website at @url{http://www.gnu.org/software/emms/}.


@c -------------------------------------------------------------------
@node Formats and Freedom
@chapter Formats and Freedom

@cindex freedom
@cindex format

Emms is free software, but some of the file formats it can play carry
restrictions, they are proprietary file formats. Proprietary software
companies are pushing out audio and video formats which restrict when,
where and how you can play them, and restrict developers from writing
free software which interacts with them.

Restrictive file formats put the corporate bottom-line before the
public interest.

Fortunately there are alternatives like Ogg. Ogg is a professional
grade multimedia format. Ogg Vorbis is the compressed audio format
(like MP3), and Ogg Theora is the video format. For more information,
go to @url{http://www.xiph.org/}.

If you want to transcode audio into a lossless format, you can try
FLAC (Free Lossless Audio Codec). FLAC stands out as the fastest and
most widely supported lossless audio codec, and the only one that at
once is non-proprietary, is unencumbered by patents and has the source
code for a reference implementation freely available. For more
information about FLAC, go to @url{http://flac.sourceforge.net/}.


@c -------------------------------------------------------------------
@node Basic Commands
@chapter Basic Commands

@cindex basic commands
@cindex commands, basic

Before you can use the interface commands, you need a playlist to
start with. The following commands allow you to add to the current
playlist from different sources:

Note that the commands with the ``emms-add-'' prefix add the source to
the playlist but do not start playing it immediately. Conversely, the
commands with the ``emms-play-'' prefix begin playing the track
immediately.

@defun emms-play-file file
A source for a single file - either @var{file}, or queried from the
user. If called with a prefix the file will be added like
@command{emms-add-file}.
@end defun
@defun emms-add-file file
A source for a single file - either @var{file}, or queried from
the user. If called with a prefix the file will be played like
@command{emms-play-file}.
@end defun
@defun emms-play-directory dir
A source for a whole directory tree - either @var{dir}, or queried
from the user.
@end defun
@defun emms-add-directory dir
A source for a whole directory tree - either @var{dir}, or queried
from the user.
@end defun
@defun emms-play-directory-tree dir
A source for multiple directory trees - either @var{dir}, or the
value of @var{emms-source-file-default-directory}.
@end defun
@defun emms-add-directory-tree dir
A source for multiple directory trees - either @var{dir}, or the
value of @var{emms-source-file-default-directory}.
@end defun
@defun emms-play-url url
A source for an @var{url} - for example, for streaming over http,
playing over sftp, or playing local files (with the ``file://''
scheme).
@end defun
@defun emms-add-url url
A source for an @var{url} - for example, for streaming over http,
playing over sftp, or playing local files (with the ``file://''
scheme).
@end defun
@defun emms-play-playlist playlist
A source for the M3u or PLS playlist format from the file @var{playlist}.
@end defun
@defun emms-add-playlist playlist
A source for the M3u or PLS playlist format from the file @var{playlist}.
@end defun
@defun emms-play-find dir regexp
A source that will find files in @var{dir} or
@var{emms-source-file-default-directory} which match @var{regexp}.
@end defun
@defun emms-add-find dir regexp
A source that will find files in @var{dir} or
@var{emms-source-file-default-directory} which match @var{regexp}.
@end defun

The basic functionality of Emms is just to play music without being
noticed. It provides a few commands to skip the current track and
such, but other than that it doesn't show up. Emms provides the
following basic user commands (which you might want to bind to
keystrokes):

@defun emms-start
Start playing the current playlist
@end defun
@defun emms-stop
Stop playing
@end defun
@defun emms-next
Start playing the next track in the playlist
@end defun
@defun emms-previous
Start playing previous track in the playlist
@end defun
@defun emms-shuffle
Shuffle the current playlist. This uses
@var{emms-playlist-shuffle-function}.
@end defun
@defun emms-sort
Sort the current playlist. This uses
@var{emms-playlist-sort-function}.
@end defun
@defun emms-show &optional insertp
Describe the current Emms track in the minibuffer. If @var{insertp} is
non-nil, insert the description into the current buffer instead. This
function uses @var{emms-show-format} to format the current track.
@end defun

The command @command{emms-show-all} will pop up a window with the
complete information about the track being
played. @command{emms-show-all} is provided by
@file{emms-show-all.el}, which is included in the `emms-all' setup
level. See @xref{Setup}.


@c -------------------------------------------------------------------
@node The Core File
@chapter The Core File

@cindex core file
@cindex heart of Emms
@cindex primitive functions

The core file @file{emms.el} provides the all basic functions for
playing music, generating playlists and defining players.

@menu
* User Variables::     Variables for the user to tweak.
* Hooks::              Hooks for important Emms functions.
* Core Functions::     Providing the basic functionality of Emms.
@end menu



@node User Variables
@section User Variables

@cindex user variables
@cindex options

The core file defines a number of user variables.

@defopt emms-player-list
A list of players Emms can use. You need to set this in order to use
Emms to play media.
@end defopt
@defopt emms-show-format
The format to use for @command{emms-show}. Any "%s" is replaced by
what @var{emms-track-description-function} returns for the currently
playing track.
@end defopt
@defopt emms-repeat-playlist
Non-nil if the Emms playlist should automatically repeat the playlist.
If nil, playback will stop when the last track finishes playing.
@end defopt
@defopt emms-track-description-function
Function for describing an Emms track in a user-friendly way.
@end defopt
@defopt emms-sort-lessp-function
A function that compares two tracks, and returns non-nil if the first
track should be sorted before the second (see also @code{sort}).
@end defopt



@node Hooks
@section Hooks

@cindex hooks
@cindex adding functionality

The core file provides hook variables for the basic functionality of
Emms.

@defopt emms-player-started-hook
A hook run when an Emms player started playing.
@end defopt
@defopt emms-player-stopped-hook
A hook run when an Emms player stopped playing. See also
@var{emms-player-finished-hook}.
@end defopt
@defopt emms-playlist-source-inserted-hook
Hook run when a source got inserted into the playlist. The buffer is
narrowed to the new tracks.
@end defopt
@defopt emms-playlist-selection-changed-hook
Hook run after another track is selected in the Emms playlist.
@end defopt
@defopt emms-playlist-cleared-hook
Hook run after the current Emms playlist is cleared. This happens both
when the playlist is cleared and when a new buffer is created for it.
@end defopt
@defopt emms-player-finished-hook
Hook run when an Emms player finishes playing a track. Please pay
attention to the differences between @var{emms-player-finished-hook}
and @var{emms-player-stopped-hook}. The former is called only when the
player is stopped interactively; the latter, only when the player
actually finishes playing a track.
@end defopt
@defopt emms-player-paused-hook
Hook run when a player is paused or resumed. Use
@var{emms-player-paused-p} to find the current state.
@end defopt



@node Core Functions
@section Core Functions

@cindex core functions
@cindex basic functions

The core file also defines all the functions important to the basic
use of Emms.

There are functions which deal with movement in the playlist.

@defun emms-next-noerror
Start playing the next track in the Emms playlist. Unlike
@code{emms-next}, this function doesn't signal an error when called at
the end of the playlist. This function should only be called when no
player is playing. This is a good function to put in
@code{emms-player-finished-hook}.
@end defun
@defun emms-playlist-next
Move to the previous track in the current buffer.
@end defun
@defun emms-playlist-previous
Move to the previous track in the current buffer.
@end defun
@defun emms-random
Jump to a random track.
@end defun
@defun emms-toggle-repeat-playlist
Toggle whether emms repeats the playlist after it is done. See
@var{emms-repeat-playlist}.
@end defun
@defun emms-toggle-repeat-track
Toggle whether emms repeats the current track. See
@var{emms-repeat-track}.
@end defun
@defun emms-toggle-random-playlist
Toggle whether emms plays the tracks randomly or sequentially. See
@end defun
@var{emms-random-playlist}.

Some functions deal with the getting and setting track information.

@defun emms-track type name
Create a track with type @var{type} and name @var{name}.
@end defun
@defun emms-track-type track
Return the type of @var{track}.
@end defun
@defun emms-track-name track
Return the name of @var{track}.
@end defun
@defun emms-track-get name track &optional inexistent
Return the value of @var{name} for @var{track}. If there is no value,
return @var{default} (or nil, if not given).
@end defun
@defun emms-track-set track name value
Set the value of @var{name} for @var{track} to @var{value}.
@end defun
@defun emms-track-description track
Return a description of @var{track}. This function uses
@var{emms-track-description-function}.
@end defun
@defun emms-player-for track
Return an Emms player capable of playing @var{track}. This will be the
first player whose PLAYABLEP function returns non-nil, or nil if no
such player exists.
@end defun
@defun emms-playlist-current-selected-track
Return the currently selected track in the current playlist.
@end defun

There are also functions which deal with the playing itself.

@defun emms-player-start track
Start playing @var{track}.
@end defun
@defun emms-player-stop
Stop the currently playing player.
@end defun
@defun emms-player-stopped
Declare that the current Emms player is finished.
This should only be done by the current player itself.
@end defun
@defun emms-seek seconds
Seek the current player @var{seconds} seconds. This can be a floating
point number for sub-second fractions. It can also be negative to
seek backwards.
@end defun
@defun emms-seek-forward
Seek ten seconds forward.
@end defun
@defun emms-seek-backward
Seek ten seconds backward.
@end defun

For more basic commands defined in the core file see @xref{Basic
Commands}.


@c -------------------------------------------------------------------
@node Sources
@chapter Sources

@cindex Sources

Sources allow Emms to add and play tracks. Emms comes with a number of
sources of its own. Sources are designed so that creating new ones
will be easy.

For examples of Emms sources for files and directories see
@file{emms-source-file.el}.

@defopt emms-source-file-default-directory
The default directory to look for media files.
@end defopt
@defun emms-play-find
Play all files in @var{emms-source-file-default-directory} that match
a specific regular expression.
@end defun
@defun emms-source-file &optional file
An Emms source for a single file - either @var{file}, or queried from the
user.
@end defun
@defun emms-source-files files
An Emms source for a list of @var{files}.
@end defun
@defun emms-source-directory &optional dir
An Emms source for a whole directory tree - either @var{dir}, or queried
from the user
@end defun
@defun emms-source-directory-tree & optional dir
An Emms source for multiple directory trees - either @var{dir}, or the
value of @var{emms-source-file-default-directory}.
@end defun
@defun emms-source-playlist file
An Emms source for playlists.  See @var{emms-source-playlist-formats}
for a list of supported formats.
@end defun
@defun emms-source-playlist-native file
An Emms source for a native Emms playlist file.
@end defun
@defun emms-source-playlist-m3u file
An Emms source for an m3u playlist file.
@end defun
@defun emms-source-playlist-pls file
An Emms source for a pls playlist file.
@end defun
@defun emms-source-find &optional dir regex
An Emms source that will find files in @var{dir} or
@var{emms-source-file-default-directory} that match @var{regexp}.
@end defun
@defun emms-source-file-directory-tree &optional dir
Return a list of all files under @var{dir} which match @var{regex}.
@end defun
@defun emms-source-dired
Play all marked files of a dired buffer
@end defun
@defun emms-source-file-regex
Return a regexp that matches everything any player (that supports
files) can play.
@end defun
@defun emms-locate regexp
Search for @var{regexp} and display the results in a locate buffer
@end defun


@c -------------------------------------------------------------------
@node Simple Players
@chapter Simple Players

@cindex players, simple

@defmac define-emms-simple-player name types regex command &rest args
Define a simple player.
@var{name} is used to construct the name of the function like
emms-player-@var{name}. @var{types} is a list of track types
understood by this player. @var{regex} must be a regexp that matches
the filenames the player can play. @var{command} specifies the command
line argument to call the player and @var{args} are the command line
arguments.
@end defmac

For a discussion on how to define new players see @xref{New Player}.

@defun emms-player-simple-stop
Stop the currently playing process, if indeed there is one.
@end defun
@defun emms-player-simple-start filename cmdname params
Starts a process playing @var{filename} using the specified @var{cmdname} with
the specified @var{params}.
@end defun
@defun emms-player-simple-sentinel proc str
Sentinel for determining the end of process for the process @var{proc}
and the sentinel string @var{str}.
@end defun


@c -------------------------------------------------------------------
@node Playlists
@chapter Playlists

@cindex organizing tracks and media

Emms uses Emacs buffers to store the media tracks for playing. We call
one such buffer a ``playlist buffer'' or an ``Emms playlist
buffer''. Emms then proceeds to play the media tracks in the buffer
from top to bottom until the end of the playlist.

The name of the playlist buffer is defined in the variable
@var{emms-playlist-buffer-name} and is set to be an invisible Emacs
buffer by default. You can change to any name you want. For an example
configuration see @xref{Configuration}.

You can create any number of playlist buffers you wish. At any time
Emms has a single ``current'' buffer through which it proceeds track
by track.

@defun emms-playlist-new &optional name
Create a new playlist buffer.
The buffer is named @var{name}, but made unique. @var{name} defaults
to `emms-playlist-buffer-name'. If called interactively, the new
buffer is also selected.
@end defun

@defun emms-playlist-save &optional format file
Store the current playlist to FILE as the type FORMAT.  The default
format is specified by @var{emms-source-playlist-default-format}.
@end defun

The current Emms playlist buffer is stored in the variable
@var{emms-playlist-buffer}.


@c -------------------------------------------------------------------
@node Track Information
@chapter Track Information

@cindex track information
@cindex info tags

By default Emms will only list tracks as file names or URLs in
playlists (@pxref{Playlists}) and the browser (@pxref{The Browser}).
However, Emms can be configured to utilize so-called @dfn{info
methods} to augment tracks with metadata information, such as artist
name, track name, album title, and the like.  We describe these
methods and their use in this chapter.

Fundamentally, info methods are Emacs Lisp functions that are called
for each track to provide information for that track.  Current info
methods in Emms are restricted to tracks that are files; they do not
work with stream URLs (@pxref{Streaming Audio}).  Some of the methods
require installation of some additional software that Emms can then
call to read metadata from disk (@pxref{Metadata Utilities}).
Finally, some methods work only with a limited set of media file
formats such as Ogg or MP3, while some methods support a wide variety
of formats.

If caching is enabled (it is by default) then the metadata for each
track will be stored in the cache for faster retrieval. That means if
you change info method and want updated tracks, you will have to reset
the cache @kbd{M-x emms-cache-reset} and then repopulate with @kbd{M-x
emms-add-directory-tree RET ~/Music/ RET} or similar.

Automatic track information retrieval is enabled by default in the
@code{emms-all} setup level (@pxref{Setup}).  That setup level
configures Emms to use @code{emms-info-native} and
@code{emms-info-cueinfo} methods, as they are the only methods that do
not rely on additional software.

Here is a list of all info methods distributed with Emms and their
software requirements:

@table @code

@item emms-info-native
This method is implemented completely in Emacs Lisp and hence does not
require any external software.  It supports Ogg Vorbis, Opus, FLAC and
MP3 files.

@item emms-info-tinytag
This method utilizes a small Python library @code{tinytag}.  It
supports MP3, Ogg Vorbis, Opus, MP4, M4A, FLAC, WMA and WAV formats.

@item emms-info-exiftool
This method calls @command{exiftool} utility written in Perl.  It
supports dozens of media file formats, far too many to list here.

@item emms-info-libtag
This method calls a small ``shim'' executable
@command{emms-print-metadata} built around TagLib library.  It
supports MP3, Ogg Vorbis, Opus, FLAC, MPC, Speex, WavPack, TrueAudio,
WAV, AIFF, MP4 and ASF formats.

@item emms-info-metaflac
This method calls @command{metaflac} utility.  It works only with FLAC
files.

@item emms-info-mp3info
This method calls @command{mp3info} utility.  It works only with MP3
files that have older id3v1 tags.

@item emms-info-ogginfo
This method calls @command{ogginfo} utility.  It supports Ogg Vorbis
and Theora formats.

@item emms-info-opusinfo
This method calls @command{opusinfo} utility.  It works only with Opus
files.

@item emms-info-cueinfo
This is a special method that parses track information from an
accompanying cue file for FLAC and APE files (@pxref{APE / FLAC
Commands}).  It does not require any additional software.

@end table

To use any of the methods, add the method to
@code{emms-info-functions} list.  For example:

@lisp
(require 'emms-info-native)
(add-to-list 'emms-info-functions 'emms-info-native)
@end lisp

@noindent
You can also use a combination of format-specific tools if needed:

@lisp
(require 'emms-info-mp3info)
(require 'emms-info-ogginfo)
(add-to-list 'emms-info-functions 'emms-info-mp3info 'emms-info-ogginfo)
@end lisp

@noindent
In this case both @code{emms-info-mp3info} and
@code{emms-info-ogginfo} will be called for each track.

There are a number of user variables which control the behavior of
@code{emms-info}:

@defopt emms-info-auto-update
Non-nil when Emms should update track information if the file changes.
This will cause hard drive activity on track loading. If this is too
annoying for you, set this variable to nil.
@end defopt

@defopt emms-info-asynchronously
Non-nil when track information should be loaded asynchronously. This
requires the feature @code{later-do} which is provided by the file
@file{later-do.el}, which comes with Emms.  See variable
@code{emms-later-do-batch} for performance tweaking.
@end defopt

@defopt emms-info-functions
A list of functions (info methods) which add information to tracks.
Each function is called with a track as argument.  If two info methods
produce the same information (for example album name), the latter one
takes precedence.
@end defopt

@menu
* Metadata Utilities::       Supported external metadata utilities.
* Defining Info Methods::    How to define new info methods.
@end menu



@node Metadata Utilities
@section Metadata Utilities

With the exception of @code{emms-info-native} and
@code{emms-info-cueinfo}, Emms info methods require external metadata
utilities to read metadata from media files.  If you plan to use a
certain info method, make sure you have the corresponding utility
installed.  All of these utilities are free software, and most of them
are included in free GNU/Linux distributions.

@subsubheading tinytag

tinytag is a Python library for reading metadata from music files.  It
is available at @url{https://pypi.org/project/tinytag/}.  Naturally a
working Python interpreter is also required.  The corresponding Emms
info method is @code{emms-info-tinytag}.

It is best to configure @code{emms-info-tinytag} as the sole info
method for Emms, because competing and overlapping methods can cause
confusion.  To use it, add the following into your Emacs initialization file:

@lisp
(require 'emms-info-tinytag)
(setq emms-info-functions '(emms-info-tinytag))
@end lisp

@subsubheading ExifTool

ExifTool is a platform-independent Perl library and a command-line
application for reading, writing and editing meta information in a
wide variety of files.  It is available at
@uref{https://exiftool.org/}.  Naturally a working Perl interpreter is
also required.  The corresponding Emms info method is
@code{emms-info-exiftool}.

It is best to configure @code{emms-info-exiftool} as the sole info
method for Emms, because competing and overlapping methods can cause
confusion.  To use it, add the following into your Emacs
initialization file:

@lisp
(require 'emms-info-exiftool)
(setq emms-info-functions '(emms-info-exiftool))
@end lisp

@subsubheading TagLib

TagLib is a library for reading and editing metadata of several
popular audio formats.  It is available at
@url{http://taglib.github.io/}.  Because TagLib is a C++ library
instead of an executable program, you have to build and install a
small ``shim'' executable @command{emms-print-metadata} around it.
@code{emms-info-libtag} will then call this executable to read
metadata from media files.

To compile @command{emms-print-metadata} invoke

@command{make emms-print-metadata}

@noindent
in Emms directory.  For this to succeed you need to have a working C++
compiler and TagLib development libraries installed on your system.
The resultant binary executable will be installed when you invoke

@command{make install} as in @xref{Compiling Emms}.

@noindent
It is of course also possible to install only the
@file{emms-print-metadata} binary where your system can find and
execute it without installing all of Emms via the make command.

Once @command{emms-print-metadata} is available, it is best to
configure @code{emms-info-libtag} as the sole info method for Emms,
because competing and overlapping methods can cause confusion.  To use
it, add the following into your Emacs initialization file:

@lisp
(require 'emms-info-libtag)
(setq emms-info-functions '(emms-info-libtag))
@end lisp

@subsubheading metaflac

@command{metaflac} is the command-line FLAC file metadata editor.  It
is included in FLAC source distribution available at
@url{https://github.com/xiph/flac}.  The corresponding info method is
@code{emms-info-metaflac}.  To use it, add the following into your
Emacs initialization file:

@lisp
(require 'emms-info-metaflac)
(add-to-list 'emms-info-functions 'emms-info-libtag)
@end lisp

@subsubheading MP3info

MP3info is a small utility for reading and modifying id3v1 tags from
MP3 files.  Note that more recent id3v2 tags are not supported; for
those you need to use another info method, for example
@code{emms-info-native}.  MP3info is available at
@url{https://ibiblio.org/mp3info/}.

The corresponding info method is @code{emms-info-mp3info}.  To use it,
add the following into your Emacs initialization file:

@lisp
(require 'emms-info-mp3info)
(add-to-list 'emms-info-functions 'emms-info-mp3info)
@end lisp

@subsubheading ogginfo

@command{ogginfo} is a small utility for extracting information about
Ogg Vorbis and Theora files.  It is part of Vorbis Tools source
distribution available at @url{https://github.com/xiph/vorbis-tools}.
The corresponding info method is @code{emms-info-ogginfo}.  To use it,
add the following into your Emacs initialization file:

@lisp
(require 'emms-info-ogginfo)
(add-to-list 'emms-info-functions 'emms-info-ogginfo)
@end lisp

@subsubheading opusinfo

@command{opusinfo} is a small utility for extracting information about
Opus files.  It is part of Opus Tools source distribution available at
@url{https://github.com/xiph/opus-tools}.  The corresponding info
method is @code{emms-info-opusinfo}.  To use it, add the following
into your Emacs initialization file:

@lisp
(require 'emms-info-opusinfo)
(add-to-list 'emms-info-functions 'emms-info-opusinfo)
@end lisp

@node Defining Info Methods
@section Defining Info Methods

@cindex defining info methods

An info method essentially consists of a function which, given an Emms
track, sets the appropriate @dfn{info-symbols} for that track.  Info
symbols are keys that have an associated value stored in the
@dfn{metadata cache}.  While info symbols can have arbitrary names,
the following symbols are recognized by Emms:

@table @code
@item info-album
Album title.

@item info-albumsort
Album title for collation.

@item info-artist
Artist name.

@item info-artistsort
Artist name for collation.

@item info-albumartist
Album artist name.

@item info-albumartistsort
Album artist name for collation.

@item info-composer
Composer name.

@item info-composersort
Composer name for collation.

@item info-date
Release date.

@item info-originaldate
Original release date.

@item info-performer
Performer name.

@item info-title
Track title.

@item info-titlesort
Track title for collation.

@item info-tracknumber
Track number.

@item info-discnumber
Disc number.

@item info-year
Release year.

@item info-originalyear
Original release year.

@item info-note
Free-form note.

@item info-genre
Genre.

@item info-label
Record label.

@item info-playing-time
Playing time in seconds.

@end table

@noindent
An info method does not need to add all of these symbols into the
given track.  It can also add other symbols, but those extra symbols
won't be used by Emms.

We can for example look at the predefined method for retrieving
information about audio tracks in the Ogg format.  The function
@code{emms-info-ogginfo} provided by @file{emms-info-ogginfo.el}
accepts an Emms track @var{track} as a single argument.  It uses
@command{ogginfo} utility to extract a list of key-value metadata
pairs from the file represented by @var{track}.  Next, it sets the
appropriate info symbols for @var{track} by calling
@code{emms-track-set}.  Info symbols are interned from the extracted
keys.  Those keys can be arbitrary strings, but they typically
coincide with the keys listed above; for example ``album'' and
``artist'' form info symbols @code{info-album} and @code{info-artist}.

@c -------------------------------------------------------------------
@node Interactive Playlists
@chapter Interactive Playlists

@cindex Interactive Playlists

Emms provides a visual, interactive playlist mode as well as the
ability to use playlists without ever looking at then. This visual,
interactive mode is called the `emms-playlist-mode' and is defined in
@file{emms-playlist-mode.el}.

The interactive playlist mode is enabled by default in the `emms-all'
setup level. For more information about Emms setup levels see
@xref{Setup}.

@defun emms-playlist-mode-go
Switch to the current emms-playlist buffer and use emms-playlist-mode.
@end defun

If you wish to make this the default Emms playlist mode, add the
following to your @file{.emacs}.

@lisp
(setq emms-playlist-default-major-mode 'emms-playlist-mode)
@end lisp

The interactive playlist buffer shows the tracks in the current Emms
playlist in the order in which they will be played. The current track
will be highlighted.

When in the interactive playlist mode we can perform different actions
on the current playlist.

@table @kbd
@item a
@findex emms-playlist-mode-add-contents
Add files in the playlist at point to the current playlist buffer.
If we are in the current playlist, make a new playlist buffer and
set it as current.
@item b
@findex emms-playlist-set-playlist-buffer
Set the current playlist buffer.
@item n
@findex emms-next
Start playing the next track in the playlist.
@item p
@findex emms-next
Start playing the previous track in the playlist.
@item s
@findex emms-stop
Stop playing.
@item P
@findex emms-pause
Pause.
@item >
@findex emms-seek-forward
Seek ten seconds forward.
@item <
@findex emms-seek-backward
Seek ten seconds backward.
@item f
@findex emms-show
Describe the currently playing track in the minibuffer.
@item c
@findex emms-playlist-mode-center-current
Display the current track in the center of the screen.
@item RET
@findex emms-playlist-mode-play-current-track
Start playing the track under point. Note that this is also available
with @kbd{<mouse-2>}.
@item SPC
@findex scroll-up
Scroll up a near full page.
@item M-<
@findex emms-playlist-mode-first
Go to the first track in the playlist.
@item M->
@findex emms-playlist-mode-last
Go to the last track in the playlist.
@item r
@findex emms-random
Go to a randomly selected track in the playlist.
@item q
@findex bury-buffer
Put the interactive playlist buffer at the end of the list of all
buffers.
@item C-x C-s
@findex emms-playlist-save
Save the current playlist buffer to a file. By default, Emms will ask
you for confirmation before overwriting an existing playlist. You can
silently overwrite existing playlist by setting
@var{emms-source-playlist-ask-before-overwrite} to nil.
@item ?
@findex describe-mode
Describe the mode.
@end table

We can also edit the playlist using familiar GNU/Emacs commands:

@table @kbd
@item C-k
@findex emms-playlist-mode-kill-track
Remove the track under point from the playlist buffer. Also available
using the @kbd{d} key.
@item C-y
@findex emms-playlist-mode-yank
See the command @command{yank}
@item C-w
@findex emms-playlist-mode-kill
See the command @command{kill-region}
@item M-y
@findex emms-playlist-mode-yank-pop
See the command @command{yank-pop}.
@item C-j
@findex emms-playlist-mode-insert-newline
Insert a newline at point.
@end table

We can use the regular GNU/Emacs killing and yanking commands to move
and copy tracks in between playlist buffers. We can use the same
commands to insert arbitrary text into the playlist buffers together
with the playlist tracks. Text which is not a track is ignored by the
program and can therefore be used to include titles and annotations
within the playlist.


@c -------------------------------------------------------------------
@node Markable Playlists
@chapter Markable Playlists

@cindex Markable Playlists

The Markable Playlists provided by the file @file{emms-mark.el} are an
alternative to the default interactive playlists, @xref{Interactive
Playlists}. They allow marking tracks with keybindings familiar to users
of dired.

To enable the Markable Playlists you have to add

@lisp
(require 'emms-mark)
@end lisp

to your @file{.emacs}. Then you can activate @command{emms-mark-mode} by
executing @command{M-x emms-mark-mode} in a playlist buffer. You can
return to the default interactive playlist mode with @command{M-x
emms-mark-mode-disable}.

If you wish to make this the default Emms playlist mode, add the
following to your @file{.emacs}.

@lisp
(setq emms-playlist-default-major-mode 'emms-mark-mode)
@end lisp

@table @kbd
@item m
@findex emms-mark-forward
Marks the current track and sets point one line forward. If a prefix
argument ARG is given, it will mark the next ARG tracks and set point
accordingly. A negative argument marks backward.
@item U
@findex emms-mark-unmark-all
Unmarks all tracks in the playlist.
@item t
@findex emms-mark-toggle
Toggles mark on the current track.
@item u
@findex emms-mark-unmark-forward
Unmarks same way as @command{emms-mark-forward} marks.
@item % m
@findex emms-mark-regexp
Marks all tracks in the playlist matching the given regular
expression. A prefix argument means to unmark them instead.
@end table

When tracks are marked you can operate on them:

@table @kbd
@item D
@findex emms-mark-delete-marked-tracks
Deletes the marked tracks from the playlist.
@item K
@findex  emms-mark-kill-marked-tracks
Deletes the marked tracks from the playlist and places them in the
kill-ring, so that you can @command{yank} in into another playlist.
@item W
@findex emms-mark-copy-marked-tracks
Adds the marked tracks to the kill-ring, so that you can @command{yank}
them into another playlist.
@end table

emms-mark is also intent to provide a way for user to select tracks
for other command to operate on them. Currently,
@file{emms-tag-editor.el} uses the emms-mark to edit the tags of
selected tracks. Two functions are useful for the elisp programer to
handle marked tracks.

@defun emms-mark-do-with-marked-track
This function take a function to perform on all marked tracks. A
optional argument `move-flag' to tell the function to move forward
line after calling given function. If the given function didn't change
position, the second argument should set to non-nil.
@end defun

@defun emms-mark-mapcar-marked-track
This function is very similar to `emms-mark-do-with-marked-track'
except it collects result of given function (that's why named with
`mapcar').
@end defun



@c -------------------------------------------------------------------
@node Extending Emms
@chapter Extending Emms

@cindex new players
@cindex defining players
@cindex new players, defining

Emms introduces a high abstraction layer for playing music so you can
customise it to your needs.

@menu
* New Player::               How to define a new player.
* Simple Player for `play':: An example player using @command{play}.
* More Complex Player::      Example of a complex player using @command{mpg321}.
@end menu



@node New Player
@section New Player

@cindex new player
@cindex defining new players

The file @file{emms-player-simple.el} defines some easy players to
start with, but it shouldn't be hard to provide a function for your
favourite player. We will start with an easy example that shows how
we can use the @command{play} command under Unix to play our WAV files.



@node Simple Player for `play'
@section Simple Player for `play'

@cindex simple player
@cindex primitive player
@cindex basic player

Play is a very easy command line player for various format. If you
want your emms to play WAV files just put the following lines in you
@file{.emacs}:

@lisp
(require 'emms-player-simple)
(define-emms-simple-player play '(file) "\\.wav$" "play")
@end lisp
@noindent

Huh! Wasn't that easy?

The macro function @command{define-emms-simple-player} takes a minimum
of three arguments. The first argument (@emph{play} in our example)
defines the name of the player. It's used to name the player
functions. The second is a regexp, that defines which files to play
with our player. @emph{\\.wav$} matches any filename ending with a dot
and the string wav. The last argument is the actual command line
command we use to play our files. You can also add the path but we
just assume that the command is in your path. All arguments you add to
these three are optional. They define the command line arguments you
want to add to your argument. If you want to hear the wav file of your
favourite artist in the most possible volume use the following line:

@lisp
(require 'emms-player-simple)

(define-emms-simple-player play
                           '(file)
                           "\\artist-*.wav$"
                           "play"
                           "--volume=100")
@end lisp
@noindent

Please notice that you have to add the arguments as strings!

The command line tool you use for @command{define-emms-simple-player}
has to take one song as argument and stop after playing that
particular song. For any other concept you will need to customise
emms a bit more...



@node More Complex Player
@section More Complex Player

@cindex complex player
@cindex advanced player

The most players you use will be simple players so you don't need to
read this chapter. But if you are curious how you can use (almost) every
player in emms read further...

In this chapter we will use mpg321 to construct a player that
actually can pause a track, restart it and show rest time. We won't
implement all of that, but after that chapter you will know how to
define it.

The command @command{define-emms-simple-player} is just a abstraction
layer for @command{define-emms-player}, which is a little bit more
complicated but much more powerful!

@lisp
(define-emms-player "emms-mpg321-remote"
  :start 'emms-mpg321-remote-start
  :stop 'emms-mpg321-remote-stop
  :playablep 'emms-mpg321-remote-playable-p)
@end lisp
@noindent

So, that is almost all! @command{define-emms-player} takes a minimum
of three arguments. The first is the name of the player. The rest are
methods with functions to call. Three methods are required: start,
stop and playable. Start says Emms how to start a track (sic!), stop
how to stop a player and playablep should return non-nil if the player
can play the track.

So we just need these three functions to get our mpg321-remote:

First we code the start function. We will check if there's a open
process and start one otherwise. Then we send a string to the process
with the filename and set a filter.

@lisp
(defun emms-mpg321-remote-start ()
  (unless (get-process ``mpg321-remote'')
    (setq emms-mpg321-remote-process
          (start-process "mpg321-remote-process"
                         "*mpg321*" "mpg321" "-R" "abc"))
  (process-send-string "mpg321-remote-process"
                       (concat "l " (emms-track-name track)))
  (set-process-filter emms-mpg321-remote-process 'emms-mpg321-remote-filter)))
@end lisp
@noindent

We need the filter, as mpg321-remote won't quit after playing the
track as the simple player do. We wait until the process sends the
output ``(at-sign)P 0'' (the signal of mpg321 that the song ended) to the
filter and call emms-mpg321-remote-stop.

@lisp
(defun emms-mpg321-remote-filter (process output)
  (when (string-match "(at-sign)P 0" output)
    (emms-mpg321-remote-stop)))
@end lisp
@noindent

@command{emms-mpg321-remote-stop} won't do anything interesting. It
just test if there are other files to play and close the process otherwise.

@lisp
(defun emms-mpg321-remote-stop ()
  (unless emms-playlist
    (process-send-string "mpg321-remote-process" "Q\n"))
@end lisp
@noindent

And to make that a playable example I also added
@command{emms-mpg321-remote-playablep}, which I really just steal
from @file{emms-player-simple.el}

@lisp
(defun emms-mpg321-remote-playablep (track)
       "Return non-nil when we can play this track."
       (and (emms-track-file-p track)
@end lisp
@noindent

Now we have a ready player and we could add commands like
@command{emms-mpg321-remote-pause} for example.



@c -------------------------------------------------------------------
@node The Browser
@chapter The Browser

The Browser allows you to browse the metadata cache and add tracks to
your playlist. It includes a powerful interactive mode.

The Browser is defined in @file{emms-browser.el} and is included in
the @command{emms-all} setup level. For more information about Emms
setup levels see @xref{Setup}.

You can also manually add the Browser to your Emms setup by loading it
explicitly with:

@lisp
(require 'emms-browser)
@end lisp

To be properly useful, you should do M-x
@command{emms-add-directory-tree} to all the files you own at least
once so that the cache is fully populated.

@menu
* Browser Interface::     The interactive browser interface.
* Filtering Tracks::      Displaying a subset of the tracks.
* Displaying Covers::     Displaying album covers in the browser interface.
* Changing Looks::        Changing the tree structure, display format and faces.
@end menu



@node Browser Interface
@section Browser Interface

The browser interface allows you to display and interact with your
tracks in many different ways. There are a number of ways to start the
browser.

@defun emms-smart-browse
Display browser and playlist. Toggle between selecting browser,
playlist or hiding both. Tries to behave sanely if the user has
manually changed the window configuration.
@end defun

@defun emms-browse-by-artist
Display the browser and order the tracks by artist.
@end defun

@defun emms-browse-by-album
Display the browser and order the tracks by album.
@end defun

@defun emms-browse-by-genre
Display the browser and order the tracks by genre.
@end defun

@defun emms-browse-by-year
Display the browser and order the tracks by year.
@end defun

Once the Browser is displayed you can use it to managed your track
collection and playlists. The Browser is interactive and has its own
keybindings.

@table @kbd

@item C-j
@kindex C-j (emms-browser)
@findex emms-browser-add-tracks-and-play
Add all tracks at point, and play the first added track.

@item RET
@kindex RET (emms-browser)
@findex emms-browser-add-tracks
Add all tracks at point.

@item SPC
@kindex SPC (emms-browser)
@findex emms-browser-toggle-subitems
Show or hide (kill) subitems under the current line.

@item 1
@kindex 1 (emms-browser)
@findex emms-browser-collapse-all
Collapse everything.

@item 2
@kindex 2 (emms-browser)
@findex emms-browser-expand-to-level-2
Expand all top level items one level.

@item 3
@kindex 3 (emms-browser)
@findex emms-browser-expand-to-level-3
Expand all top level items two levels.

@item 4
@kindex 4 (emms-browser)
@findex emms-browser-expand-to-level-4
Expand all top level items three levels.

@item C
@kindex C (emms-browser)
@findex emms-browser-clear-playlist
Clear the playlist.

@item E
@kindex E (emms-browser)
@findex emms-browser-expand-all
Expand everything.

@item d
@kindex d (emms-browser)
@findex emms-browser-view-in-dired
View the current directory in dired.

@item q
@kindex q (emms-browser)
@findex emms-browser-bury-buffer
Bury the browser buffer.

@item r
@kindex r (emms-browser)
@findex emms-browser-goto-random
Jump to a random track.

@item /
@kindex / (emms-browser)
@findex emms-isearch-buffer
Isearch through the buffer.

@item <
@kindex < (emms-browser)
@findex emms-browser-previous-filter
Redisplay with the previous filter.

@item >
@kindex > (emms-browser)
@findex emms-browser-next-filter
Redisplay with the next filter.

@item ?
@kindex ? (emms-browser)
@findex describe-mode
See the Emacs documentation for the function.

@item C-/
@kindex C-/ (emms-browser)
@findex emms-playlist-mode-undo
Undo the previous playlist action.

@item <C-return>
@kindex <C-return> (emms-browser)
@findex emms-browser-add-tracks-and-play
Add all tracks at point, and play the first added track.

@item <backtab>
@kindex <backtab> (emms-browser)
@findex emms-browser-prev-non-track
Jump to the previous non-track element.

@item <tab>
@kindex <tab> (emms-browser)
@findex emms-browser-next-non-track
Jump to the next non-track element.

@item s A
@kindex s A (emms-browser)
@findex emms-browser-search-by-album
Search the collection by album.

@item s a
@kindex s a (emms-browser)
@findex emms-browser-search-by-artist
Search the collection by artist.

@item s s
@kindex s s (emms-browser)
@findex emms-browser-search-by-names
Search the collection by names.

@item s t
@kindex s t (emms-browser)
@findex emms-browser-search-by-title
Search the collection by title.

@item b 1
@kindex b 1 (emms-browser)
@findex emms-browse-by-artist
Browse the collection by artist.

@item b 2
@kindex b 2 (emms-browser)
@findex emms-browse-by-album
Browse the collection by album.

@item b 3
@kindex b 3 (emms-browser)
@findex emms-browse-by-genre
Browse the collection by genre.

@item b 4
@kindex b 4 (emms-browser)
@findex emms-browse-by-year
Browse the collection by year.

@item W a p
@kindex W a p (emms-browser)
@findex emms-browser-lookup-album-on-pitchfork
Lookup the album using Pitchfork.

@item W a w
@kindex W a w (emms-browser)
@findex emms-browser-lookup-album-on-wikipedia
Lookup the album using Wikipedia.
@end table



@node Filtering Tracks
@section Filtering Tracks

If you want to display a subset of your collection (such as a
directory of 80s music, only avi files, etc.) then you can extend the
Browser by defining ``filters''.

Show everything:

@lisp
(emms-browser-make-filter "all" 'ignore)
@end lisp

Set "all" as the default filter:

@lisp
(emms-browser-set-filter (assoc "all" emms-browser-filters))
@end lisp

Show all files (no streamlists, etc):

@lisp
(emms-browser-make-filter
 "all-files" (emms-browser-filter-only-type 'file))
@end lisp

Show only tracks in one folder:

@lisp
(emms-browser-make-filter
 "80s" (emms-browser-filter-only-dir "~/Mp3s/80s"))
@end lisp

Show all tracks played in the last month:

@lisp
(emms-browser-make-filter
 "last-month" (emms-browser-filter-only-recent 30))
@end lisp

After executing the above commands, you can use M-x
emms-browser-show-all, emms-browser-show-80s, etc to toggle between
different collections. Alternatively you can use '<' and '>' to cycle
through the available filters.

The second argument to make-filter is a function which returns t if a
single track should be filtered. You can write your own filter
functions to check the type of a file, etc.

Show only tracks not played in the last year:

@lisp
(emms-browser-make-filter "not-played"
 (lambda (track)
  (not (funcall (emms-browser-filter-only-recent 365) track))))
@end lisp

Show all files that are not in the pending directory:

@lisp
(emms-browser-make-filter
 "all"
 (lambda (track)
   (or
    (funcall (emms-browser-filter-only-type 'file) track)
    (not (funcall
          (emms-browser-filter-only-dir "~/Media/pending") track)))))
@end lisp



@node Displaying Covers
@section Displaying Covers

The browser will attempt to display cover images if they're
available.

Customize @var{emms-browser-covers} to configure how EMMS should retrieve the
covers.

By default it looks for images @file{cover_small.jpg}, @file{cover_med.jpg},
etc. Note that you'll probably want to resize your existing covers to particular
sizes. Suggested sizes are 100x100 for small, and 200x200 for medium.

The above behaviour demands manual processing on behalf of the user.  Instead,
you might prefer to automate the process by setting @var{emms-browser-covers} to
'emms-browser-cache-thumbnail': covers matching 'emms-browser-thumbnail-filter'
will be automatically resized if necessary and cached to
@var{emms-browser-thumbnail-directory}.  The cache gets automatically updated
upon change in the source folder.

Customize @var{emms-browser-covers-file-extensions} to include or exclude
specific extensions.

'emms-browser-cache-thumbnail' might be everytime a cover is queried, so
to help with performance you can also set @var{emms-browser-covers} to
'emms-browser-cache-thumbnail-async'.  The latter is like the former
except that it caches queries: every subsequent query will be much
faster.  The drawback is that it won't see changes made to covers after
the first query.  To force-refresh the thumbnail cache, you can run
'emms-browser-clear-cache-hash'.

Also, Emacs by default will jump around a lot when scrolling a buffer
with images. In order to prevent that, you can set
@var{scroll-up-aggressively} and @var{scroll-down-aggressively} to the
number ``0.0''.

To show a 'no cover' image for albums which don't have a cover, add
the following code to your .emacs:

@lisp
(setq emms-browser-default-covers
  (list "/path/to/cover_small.jpg" nil nil)
@end lisp

The medium and large images can be set as well.

You can download an example @uref{http://repose.cx/cover_small.jpg,
`no cover' image}.



@node Changing Looks
@section Changing Looks

The Browser's look can be customised. You can change the way the tree
structure looks, the display format and display faces.

@subheading Changing Tree Structure

You can change the way the tree is displayed by modifying the function
@command{emms-browser-next-mapping-type}.

The following code displays artist->track instead of
artist->album->track when you switch to the 'singles' filter:

@lisp
(defadvice emms-browser-next-mapping-type
                                (after no-album (current-mapping))
  (when (eq ad-return-value 'info-album)
    (setq ad-return-value 'info-title)))
@end lisp

@lisp
(defun toggle-album-display ()
  (if (string= emms-browser-current-filter-name "singles")
      (ad-activate 'emms-browser-next-mapping-type)
    (ad-deactivate 'emms-browser-next-mapping-type)))

(add-hook 'emms-browser-filter-changed-hook 'toggle-album-display)
@end lisp

Furthermore, you can customize
@var{emms-browser-get-track-field-function} to choose which the metadata
fields used for the different tree nodes (@code{'info-artist},
@code{info-year}, etc.).  For instance, you can choose whether to
organize the tree by artist, album artist or performer.

@subheading Changing Display Format

Format strings govern the way items are displayed in the browser and
playlist. You can customize these if you wish.

@var{emms-browser-default-format} controls the format to use when no
other format has been explicitly defined. By default, only track and
albums deviate from the default.

To customise the format of a particular type, find the name of the
field you want to use (eg `info-artist', `info-title', etc), and
insert that into emms-browser-<type>-format or
emms-browser-playlist-<type>-format. For example, if you wanted to
remove track numbers from tracks in both the browser and playlist, you
could do:

@lisp
(defvar emms-browser-info-title-format "%i%n")
(defvar emms-browser-playlist-info-title-format
  emms-browser-info-title-format)
@end lisp

The format specifiers available include:

@itemize @w{}
@item
%i    indent relative to the current level
@item
%n    the value of the item - eg -info-artist might be ``pink floyd''
@item
%y    the album year
@item
%A    the album name
@item
%a    the artist name of the track
@item
%t    the title of the track
@item
%T    the track number
@item
%cS   a small album cover
@item
%cM   a medium album cover
@item
%cL   a big album cover
@end itemize

Note that if you use track-related items like %t, it will take the
data from the first track.

@subheading Changing Display Faces

The faces used to display the various fields are also customizable.
They are in the format emms-browser-<type>-face, where type is one of
"year/genre", "artist", "album" or "track". Note that faces lack the
initial "info-" part. For example, to change the artist face, type M-x
@command{customize-face} @command{emms-browser-artist-face}.


@c -------------------------------------------------------------------
@node Sorting Playlists
@chapter Sorting Playlists

@cindex sort
@cindex track order

The `emms-playlist-sort' module, defined in the
@file{emms-playlist-sort.el} package provides functions for sorting
Emms playlists, as well as keyboard shortcuts for invoking the
functions in the playlist buffer. Most of the functions will sort in
reverse order if the command is preceded by a
prefix. `emms-playlist-sort' can be loaded by invoking:

@lisp
(require 'emms-playlist-sort)
@end lisp

@defun emms-playlist-sort-by-info-artist
Sort by artist name.
@end defun

@defun emms-playlist-sort-by-play-count
Sort by number of times the track has been played.
@end defun

@defun emms-playlist-sort-by-info-album
Sort by album name.
@end defun

@defun emms-playlist-sort-by-last-played
Sort by time the track was played last.
@end defun

@defun emms-playlist-sort-by-info-title
Sort by track title.
@end defun

@defun emms-playlist-sort-by-file-extension
Sort by filename extension.
@end defun

@defun emms-playlist-sort-by-info-performer
Sort by performer name.
@end defun

@defun emms-playlist-sort-by-info-year
Sort by year.
@end defun

@defun emms-playlist-sort-by-info-note
Sort by track notes.
@end defun

@defun emms-playlist-sort-by-info-composer
Sort by composer.
@end defun

@defun emms-playlist-sort-by-name
Sort by track name.
@end defun

@defun emms-playlist-sort-by-file-mtime
Sort by file mtime.
@end defun


@c -------------------------------------------------------------------
@node Persistent Playlists
@chapter Persistent Playlists

The Emms module @file{emms-history.el} makes playlists persistent over
emacs sessions.  To make use of this feature put this into your
~/.emacs.

@lisp
(require 'emms-history)
@end lisp

When you kill emacs all playlists will be saved in the file given by the
variable:

@defopt emms-history-file
The file to save playlists in.  It defaults to
"~/.emacs.d/emms-history".
@end defopt

After you started up emacs again, you can restore all saved playlists
with this function.

@defun emms-history-load
Restore all playlists in `emms-history-file'.
@end defun

If that should be done automatically on each startup, put these lines
into your ~/.emacs.

@lisp
(require 'emms-history)
(emms-history-load)
@end lisp

Normally @code{emms-history} only restores playlists.  If you want it to
start playback afterwards, you can tweak this variable.

@defopt emms-history-start-playing
If non-nil emms starts playing the current track after
`emms-history-load' was invoked.  The default value is nil.
@end defopt


@c -------------------------------------------------------------------
@node Editing Tracks
@chapter Editing Tracks

@cindex track editor

Using @file{emms-tag-editor.el}, emms can set tag informations of tracks
and write them back to the file with the help of external programs, such
as `mid3v2' and `vorbiscomment'.

Use the keybinding @kbd{E} to edit the tags of track under point in the
playlist or all marked tracks (@pxref{Markable Playlists} for how to
mark tracks).  The track's tag informations are listed in a special
buffer `*Emms-TAGS*' in text format.  Field names are marked in bold
face and are not editable.  Any tag information is placed behind an
equal sign and is changable.  A special field `name' is the track's file
name.  If any change is made in this field, the track's file will be
renamed to the new name.  When you finished editing the tag infos use
@kbd{C-c C-c} (which calls @code{emms-tag-editor-submit-and-exit}) to
submit the changes and close the `*Emms-TAGS*' buffer.

There are a few commands to perform changes on all tracks.

@defun emms-tag-editor-set-all tag value
Set TAG to VALUE in all tracks.

If transient-mark-mode is turned on, you can apply the command to a
selected region.

If `transient-mark-mode' is on and the mark is active, the changes will
only take effect on the tracks in the region.
@end defun

@defun emms-tag-editor-replace-in-tag tag from to
Query and replace text in selected TAG.

For example, if the info-title tag is selected, then only perform
replacement in title tags.

If `transient-mark-mode' is on and the mark is active, the changes will
only take effect on the tracks in the region.
@end defun

@defun emms-tag-editor-transpose-tag tag1 tag2
Transpose value of TAG1 and TAG2.

If `transient-mark-mode' is on and the mark is active, the changes will
only take effect on the tracks in the region.
@end defun

@defun emms-tag-editor-submit arg
Make modified tags take affect.

With prefix argument, bury the tag edit buffer.
@end defun

If you want to extend the tag editor to work with file formats other
than `mp3' and `ogg', have a look at these variables.

@defvr {Variable} emms-tag-editor-formats
This variable determine how to insert track fields to
`emms-tag-editor-edit-buffer'.  Emms tag info editable fields is usually
determined by the extension of track name.  The variable
`emms-tag-editor-tags' contains all tags that emms track may have.  A
single charactar is assigned to the tag to make the
`emms-tag-editor-formats' easier to generate.
@end defvr

@defvr {Variable} emms-tag-editor-tagfile-functions
To write tags to track file, an extern program should specified in this
variable.
@end defvr

@heading Renaming Files

The tag editor is also capable to rename the file of the track at point
or all files of the marked tracks according to the value this variable.

@defopt emms-tag-editor-rename-format
When `emms-tag-editor-rename' is invoked the track's file will be
renamed according this format specification.  The file extension will be
added automatically.

It uses the format specs defined in @code{emms-tag-editor-tags}.

The default value is "%a - %l - %n - %t", so that files are named

  <Artist> - <Album> - <Tracknumber> - <Title>.<extension>

after renaming.
@end defopt

To perform the renaming put point on the track you want to rename or
mark some tracks.  Then hit @kbd{R} which calls this function:

@defun emms-tag-editor-rename
Rename the file corresponding to track at point or all marked tracks
according to the value of @code{emms-tag-editor-rename-format}.
@end defun


@c -------------------------------------------------------------------
@node Emms Mode Line
@chapter Emms Mode Line

@cindex mode line
@cindex display emms information

We can display information about the currenty playing track on the
Emacs mode line using the package `emms-mode-line' which is provided
by the file @file{emms-mode-line.el}.

To activate this feature invoke:

@lisp
(require 'emms-mode-line)
(emms-mode-line 1)
@end lisp

It is also possible to display the amount of time a track has been
playing. This feature is defined in the `emms-playing-time' package
which is provided by the file @file{emms-playing-time.el}.

To use this feature invoke:

@lisp
(require 'emms-playing-time)
(emms-playing-time 1)
@end lisp

A graphical icon can be displayed in the modeline when Emms is
playing. This feature is provided by @file{emms-mode-line-icon.el}. To
enable invoke the following and make sure that
@var{emms-mode-line-icon-enabled-p} is set to a non-nil value:

@lisp
(require emms-mode-line-icon)
@end lisp

Note: `(emms-playing-time -1)' will disable emms-playing-time module
completely, and is not recommended. (since some other emms modules may
rely on it)

Instead, to toggle displaying playing time on mode line, one could call
`emms-playing-time-enable-display' and
`emms-playing-time-disable-display'."

@defun emms-playing-time-enable-display
Display playing time on mode line.
@end defun

@defun emms-playing-time-disable-display
Remove playing time from mode line.
@end defun


@c -------------------------------------------------------------------
@node Limiting
@chapter Limiting

@cindex limiting
@cindex playlist

The package `emms-playlist-limit', provided by
@file{emms-playlist-limit.el}, allows creating a new
playlist derived from the playlist in the current
buffer. For instance, it is possible to create a new
playlist containing only a certain artist or genre from the
playlist in the current buffer.

If the playlist in the current buffer is the emms current
playlist then the derived playlist becomes current.

@table @kbd
@item / a
@kindex / a
@findex emms-playlist-limit-to-info-artist
Create a new playlist buffer and populate it with tracks
whose artist info field matches the given regular
expression (default: the artist info field of the
track at point).

@item / b
@kindex / b
@findex emms-playlist-limit-to-info-album
Create a new playlist buffer and populate it with tracks
whose album info field matches the given regular
expression (default: the album info field of the
track at point).

@item / c
@kindex / c
@findex emms-playlist-limit-to-info-composer
Create a new playlist buffer and populate it with tracks
whose composer info field matches the given regular
expression (default: the composer info field of the
track at point).

@item / d
@kindex / d
@findex emms-playlist-limit-to-description
Create a new playlist buffer and populate it with tracks
whose track description matches the given regular
expression (default: the track description of the
track at point).

@item / g
@kindex / g
@findex emms-playlist-limit-to-info-genre
Create a new playlist buffer and populate it with tracks
whose genre info field matches the given regular
expression (default: the genre info field of the
track at point).

@item / n
@kindex / n
@findex emms-playlist-limit-to-name
Create a new playlist buffer and populate it with tracks
whose name matches the given regular expression (default:
the name of the track at point).

@item / p
@kindex / p
@findex emms-playlist-limit-to-info-performer
Create a new playlist buffer and populate it with tracks
whose performer info field matches the given regular
expression (default: the performer info field of the
track at point).

@item / t
@kindex / t
@findex emms-playlist-limit-to-info-title
Create a new playlist buffer and populate it with tracks
whose title info field matches the given regular
expression (default: the title info field of the
track at point).

@item / y
@kindex / y
@findex emms-playlist-limit-to-info-year
Create a new playlist buffer and populate it with tracks
whose year info field matches the given regular
expression (default: the year info field of the
track at point).

@item / /
@kindex / /
@findex emms-playlist-limit-to-all
Switch to the original playlist buffer (if it still exists).
@end table


@c -------------------------------------------------------------------
@node Music Player Daemon
@chapter Music Player Daemon

@cindex music player daemon
@cindex remote interface
@cindex mpd

Emms provides an interface to the @uref{http://www.musicpd.org/, Music
Player Daemon}(MusicPD) software. The package is called `emms-player-mpd' and
is provided by the file @file{emms-player-mpd.el}.

The advantages of using MusicPD as an Emms backend include the
following.

@itemize @bullet
@item minimal CPU usage
@item fast access of track information
@item optional crossfade
@end itemize

@subheading Setup

To load `emms-player-mpd' invoke:

@lisp
(require 'emms-player-mpd)
@end lisp

Set the variables @var{emms-player-mpd-server-name} and
@var{emms-player-mpd-server-port} to the location and port
(respectively) of your MusicPD server. For example:

@lisp
(setq emms-player-mpd-server-name "localhost")
(setq emms-player-mpd-server-port "6600")
@end lisp

If your MusicPD setup requires a password, you will to set
@var{emms-player-mpd-server-password} as follows.

@lisp
(setq emms-player-mpd-server-password "mypassword")
@end lisp

To get track information from MusicPD, invoke the following:

@lisp
(add-to-list 'emms-info-functions 'emms-info-mpd)
@end lisp

Adding `emms-player-mpd' to your Emms player list is accomplished by
invoking:

@lisp
(add-to-list 'emms-player-list 'emms-player-mpd)
@end lisp

Unless your MusicPD is configured to use absolute file names, you must
set the emms-player-mpd-music-directory variable to the value of
'music_directory' in your MusicPD configuration.  There are
additional options available as well, but the defaults should be
sufficient for most uses.

Once you've done the above, run the @kbd{M-x
emms-cache-set-from-mpd-all} command to fill the Emms cache with the
contents of your MusicPD database. The music in your MusicPD database
should then be accessible via the Emms browser.

You can set @var{emms-player-mpd-sync-playlist} to nil if your master
Emms playlist contains only stored playlists.

@subheading Commands provided

@defun emms-player-mpd-connect
Connect to MusicPD and retrieve its current playlist. Afterward, the
status of MusicPD will be tracked.
@end defun

@defun emms-player-mpd-disconnect
Terminate the MusicPD client process and disconnect from MusicPD.
@end defun

@defun emms-player-mpd-show &optional insertp
Describe the current Emms track in the minibuffer. If INSERTP is
non-nil, insert the description into the current buffer instead. This
function uses @var{emms-show-format} to format the current track. It
differs from @command{emms-show} in that it asks MusicPD for the
current track, rather than Emms.
@end defun

@subsubheading Updating the MusicPD database

@defun emms-player-mpd-update-directory dir
Cause the tracks in DIR to be updated in the MusicPD database.
@end defun

@defun emms-player-mpd-update-all
Cause all tracks in the MusicPD music directory to be updated in
the MusicPD database.
@end defun

@subsubheading emms-cache.el integration

@defun emms-cache-set-from-mpd-directory dir
Dump all MusicPD data from DIR into the Emms cache.
This is useful to do when you have recently acquired new music.
@end defun

@defun emms-cache-set-from-mpd-all
Dump all MusicPD data into the Emms cache.
This is useful to do once, just before using emms-browser.el, in
order to prime the cache.
@end defun

@subsubheading emms-volume.el integration

To activate this, add the following to your .emacs.

@lisp
(require 'emms-volume)
(setq emms-volume-change-function 'emms-volume-mpd-change)
@end lisp


@c -------------------------------------------------------------------
@node Lyrics
@chapter Lyrics

@cindex lyrics

We can display the lyrics of a song in time with the music using the
`emms-lyrics' package provided by the file @file{emms-lyrics.el}.

The lyrics files should have the extention ``.lrc'', and can be placed
under either the same directory as the music files or
@var{emms-lyrics-dir}.

To add this feature we invoke:

@lisp
(require 'emms-lyrics)
(emms-lyrics 1)
@end lisp

There are a number of variables we can set to define the way that
`emms-lyrics' behaves, we can set these directly or by using the
Customize feature in Emacs.

@defvr {User Option} emms-lyrics-display-on-minibuffer
If non-nil, display lyrics on minibuffer.
@end defvr

@defvr {User Option} emms-lyrics-display-on-modeline
If non-nil, display lyrics on modeline.
@end defvr

@defvr {User Option} emms-lyrics-dir
Local lyrics repository.
@command{emms-lyrics-find-lyric} will look for lyrics in current
directory(i.e., same as the music file) and this directory.
@end defvr

@defvr {User Option} emms-lyrics-display-format
Format for displaying lyrics. "%s" will be replaced by the lyrics
string.
@end defvr

@defvr {User Option} emms-lyrics-coding-system
Coding system used in the output of lyrics.
@end defvr

@defvr {User Option} emms-lyrics-scroll-p
Non-nil value will enable lyrics scrolling.
@end defvr

@defvr {User Option} emms-lyrics-scroll-timer-interval
Interval between scroller timers. The shorter, the faster.
@end defvr

We can control `emms-lyrics' with the help of the following functions:

@defun emms-lyrics-start
Start displaying lyrics.
@end defun

@defun emms-lyrics-stop
Stop displaying lyrics.
@end defun

@defun emms-lyrics-toggle-display-on-minibuffer
Toggle display lyrics on minibufer.
@end defun

@defun emms-lyrics-toggle-display-on-modeline
Toggle display lyrics on mode line.
@end defun

@defun emms-lyrics-enable
Enable displaying Emms lyrics.
@end defun

@defun emms-lyrics-disable
Disable displaying Emms lyrics.
@end defun

@defun emms-lyrics-toggle
Toggle displaying Emms lyrics.
@end defun


@c -------------------------------------------------------------------
@node Volume
@chapter Volume

@cindex volume

We can use the `emms-volume' package, as provided by the
@file{emms-volume.el} file, to manipulate the volume.

@defopt emms-volume-change-amount
The amount to use when raising or lowering the volume using the
emms-volume interface.

This should be a positive integer.
@end defopt

@defun emms-volume-raise
Increase the volume.
@end defun

@defun emms-volume-lower
Decrease the volume.
@end defun

If you feel like binding those two functions to global keys --- don't do
it or you'll miss the convenience of `emms-volume-minor-mode'. Instead,
bind the following two commands to some keys that you like.

@defun emms-volume-mode-plus
Raise volume and enable or extend the `emms-volume-minor-mode' timeout.
@end defun

@defun emms-volume-mode-minus
Lower volume and enable or extend the `emms-volume-minor-mode' timeout.
@end defun

Example:

@lisp
(global-set-key (kbd "C-c +") 'emms-volume-mode-plus)
(global-set-key (kbd "C-c -") 'emms-volume-mode-minus)
@end lisp

Whenever you use one of these keys or call these functions with
@kbd{M-x}, Emms will be put into `emms-volume-minor-mode' for a short
period defined by `emms-volume-mode-timeout'.

@defopt emms-volume-mode-timeout
The timeout in amount of seconds used by `emms-volume-minor-mode'.
@end defopt

In this interval you can raise/lower the volume simply by pressing
@kbd{+} or @kbd{-}, which will also reset the timer to its initial
value. So instead of pressing @kbd{C-c +} six times to increase volume
by six steps of @code{emms-volume-change-amount}, you would simply type
@kbd{C-c + + + + + +}.

Emms can change volume with amixer, mpd, PulseAudio and mixerctl out
of the box, see @var{emms-volume-change-function}.


@c -------------------------------------------------------------------
@node Streaming Audio
@chapter Streaming Audio

@cindex streaming audio
@cindex internet radio

Emms is a great way to play streaming audio and internet radio. It is
possible to add streaming playlists and URLs to any playlist, but Emms
also comes with a built-in, eclectic list of streaming audio
stations. @footnote{Emms has no affiliation of any kind with the
streaming audio stations included, nor is their inclusion an
endorsement of these stations. Instead, this is a collection of
stations submitted to the project over the years by people who enjoy
Emms. We hope you will enjoy them too, and invite you to send in your
suggestions to add to the list.}

The @file{emms-streams.el} package provides the command
@command{emms-streams}.

Invoking @command{emms-streams} will pull up an Emms playlist buffer
and populate it with the built-in list of streaming audio sources.

If you are using the mpv player, defined by @file{emms-player-mpv.el},
then you can display the currently streaming track title (if the
station provides that information) by configuring:

@lisp
  (customize-set-variable 'emms-player-mpv-update-metadata t)
@end lisp


@c -------------------------------------------------------------------
@node APE / FLAC Commands
@chapter APE / FLAC Commands

Often, a single APE or FLAC file contains a complete album.  We can
still play next or previous track in the album with the help of
@file{emms-cue.el} package, provided there is a corresponding cue
sheet file.  This package also defines @code{emms-info-cueinfo} for
retreiving the track information for APE / FLAC itself.

To load @file{emms-cue.el}:

@lisp
(require 'emms-cue)
(add-to-list 'emms-info-functions 'emms-info-cueinfo)
@end lisp

@defun emms-cue-next
Play next track from .cue file
@end defun
@defun emms-cue-previous
Play previous track from .cue file
@end defun



@c -------------------------------------------------------------------
@node Bookmarks
@chapter Bookmarks

Emms can save a ``temporal bookmark'' in a media file via
emms-bookmarks. The file @file{emms-bookmarks.el} provides the package
emms-bookmarks.

While some media is playing, invoking @kbd{M-x emms-bookmarks-add}
will first pause the playback and then prompt for a name describing
the bookmark. Tracks can have multiple bookmarks associated with them.

To jump to the next and previous bookmarks in the current track invoke
@kbd{M-x emms-bookmarks-next} and @kbd{M-x emms-bookmarks-prev}
respectively.

To clear all of the bookmarks for the current track invoke @kbd{M-x
emms-bookmarks-clear}.


@c -------------------------------------------------------------------
@node Managing Playlists
@chapter Managing Playlists

Emms can have multiple playlists, since a playlist is just another
buffer with a list of tracks. You can manage multiple playlists using
`emms-metaplaylist-mode', provided by the file
@file{emms-metaplaylist-mode}.

Start the playlist manager with @kbd{M-x
emms-metaplaylist-mode-go}. The playlist manager will list the
playlists and mark the current one. The following commands are
available:

@table @kbd

@item RET
@kindex RET
@findex emms-metaplaylist-mode-goto-current
Make the buffer at point the Emms playlist buffer and switch to it.

@item SPC
@kindex SPC
@findex emms-metaplaylist-mode-set-active
Make the buffer at point the Emms playlist buffer (but do not switch
to it).

@item n
@kindex n
@findex next-line
Move point to the next playlist.

@item p
@kindex p
@findex previous-line
Move point to the previous playlist.

@item g
@kindex g
@findex emms-metaplaylist-mode-update
Update the playlist manager buffer.

@item C
@kindex C
@findex emms-metaplaylist-mode-new-buffer
Create a new Emms playlist buffer.

@item C-k
@kindex C-k
@findex emms-metaplaylist-mode-kill-buffer
Kill the Emms playlist buffer at point.

@item c
@kindex c
@findex emms-metaplaylist-mode-center-current
Move point to the current playlist buffer.

@item q
@kindex q
@findex kill-this-buffer
Kill the playlist manager.

@end table


@c -------------------------------------------------------------------
@node GNU FM
@chapter GNU FM

@cindex GNU FM

@url{https://www.gnu.org/software/gnufm/, GNU FM} is free software for
running music community websites. It was created for the music
community site, @url{http://libre.fm/, Libre.fm}.

Emms can send track information, and stream music from GNU FM servers
using @file{emms-librefm-scrobbler.el} and
@file{emms-librefm-stream.el}, respectively.

Emms is configured by default to use @url{http://libre.fm/, Libre.fm},
but can work with any GNU FM server by configuring the variable
@var{emms-librefm-scrobbler-handshake-url} to the URL of the GNU FM
server.

The recommended way of providing your credentials to the GNU FM server
is by using an authinfo file.  Add authentication to your auth-info
file, typically @file{~/.authinfo.gpg}, as:
@smallexample
machine libre.fm login USERNAME password PASSWORD
@end smallexample
If you are using some other server than libre.fm, change
``@samp{libre.fm}'' to match
@var{emms-librefm-scrobbler-handshake-url}.

Alternatively, you can save the password in plaintext in your init-file
by setting these variables:

@lisp
(setq emms-librefm-scrobbler-username "USERNAME"
      emms-librefm-scrobbler-password "PASSWORD")
@end lisp

@menu
* Uploading Track Information:: How to submit listened track information.
* GNU FM Streaming:: Streaming music from a GNU FM server.
@end menu



@node Uploading Track Information
@section Uploading Track Information

GNU FM servers, such as Libre.fm can optionally store a user's
listening habits using information sent to the website's server from
the Emms. By utilizing the records of users' listening habits, the
website aims to be able to recommend music to users by analyzing their
musical taste.

Load the feature into Emms with:

@lisp
(require 'emms-librefm-scrobbler)
@end lisp

This feature can also be enabled via @xref{Setup}, in the `emms-all'
setup level.

Enable uploading the details of the tracks Emms plays to the GNU FM
server with @kbd{emms-librefm-scrobbler-enable}. The track's details
will be uploaded to the server when the track's playback ends. You can
disable this behavior with @kbd{emms-librefm-scrobbler-disable}.




@node GNU FM Streaming
@section GNU FM Streaming

If the GNU FM server provides a streaming music service you can take
advantage of it by loading:

@lisp
(require 'emms-librefm-stream)
@end lisp

This feature can also be enabled via @xref{Setup}, in the `emms-all'
setup level.

Then invoke @kbd{emms-librefm-stream} and enter the URL of the station
you wish to listen to, for example ``librefm://globaltags/Classical''.



@c including the relevant licenses
@include gpl.texi
@include fdl.texi



@node Concept Index
@unnumbered Concept Index
@printindex cp



@node Function Index
@unnumbered Function Index
@printindex fn



@node Variable Index
@unnumbered Variable Index
@printindex vr



@node Keybinding Index
@unnumbered Keybinding Index
@printindex ky

@bye