This repository has been archived by the owner on Sep 13, 2024. It is now read-only.
forked from tulskiy/musique
-
Notifications
You must be signed in to change notification settings - Fork 0
/
README
executable file
·214 lines (162 loc) · 8.36 KB
/
README
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
This is a fork of @tulskiy 's musique project. Original repo at
http://tulskiy.github.com/musique/
This fork is intended to support
* (done) auto-detect encoding for CUE sheets
* see https://github.com/gpakosz/UnicodeBOMInputStream
* see https://code.google.com/p/juniversalchardet/
* (done) export and import playlists to JSON format
* (done) import TTPlayer playlists
* (done) save (JSON) and load (all formats) playlists from folder
* (done) auto-detect audio codec if its extension is wrong
* (dev) potential race condition for guessed files; PlayingThread.
openNext() may not go to the correct result given by
BufferingThread
* (dev) perform .lrc lyrics search strategies
* (done) Provide option to disallow reordering the playlist
* set playlists.allowSortByColumn = false
* (done) Provide option to disallow middle click closing tabs
* set playlists.tabs.middleClickRemove = false
* (dev) auto-detect encoding for ID3 tags
* (dev) bug fix: importing cue with multiple file reference may
have incorrect order.
and change
* (done) the default playback control behavior; combined
play and pause to mimic the behavior of (iTunes-like) music
players. (So that key shortcut C and X maps to the same behavior.)
* (dev) change .cue processing strategy
* (dev) if the audio file is selected, then search for .cue and import
that .cue (currently just blindly ignore the audio file if .cue exists)
* (done) if the .cue is selected, then (from its content) determine the
audio file. If the file does not exist, find similar names from
the same folder.
* (dev) if both are selected, it will only be imported once.
and fix
* (done) FLACDecoder.open() returns false on error (instead of blindly)
returns true.
dev = in development; done = just done :)
--------------------Below is the original README---------------------
musique is a 100% Java audio player that supports most popular formats
* MP3
* OGG Vorbis
* FLAC
* WavPack
* Monkey's Audio
* WAV, AU, AIFF
Also, musique can recode these formats into:
* OGG Vorbis
* Monkey's Audio
* WavPack
* WAV
There is a built in support for CUE files, gapless playback,
SHOUTCast/IceCast radio, Last.fm Scrobbling
Building
To compile, run "ant", then run either musique.sh or musique.bat
to start the player
You also can open the project in IDE - there are configurations
for IntelliJ IDEA, NetBeans or Eclipse.
Main class is com.tulskiy.musque.system.Main
Requirements: Sun JDK 1.7, or OpenJDK 1.7
Shortcuts
Z, X, C, V, B - prev, play/pause, play/pause, stop, next
Space - scroll to now playing
Q - add selected tracks to queue
Alt-Enter - tracks info / edit tags
Del - remove selected tracks from playlist
Ctrl T - new playlist
Ctrl S - save playlist
Ctrl F - Search
Ctrl P - properties
Ctrl W - closes window if tray is enabled, else quit program
Ctrl Q - quit program
GUI Tweaks
Tray Icons
On Gnome, tray icon is not transparent, so I have to draw background and gradient
myself to blend in. Here are some colors for standard Gnome/Ubuntu themes that will make the
tray icon seem transparent (written as Red, Green, Blue, can be set in
Properties->Color and Fonts):
Theme | Background 1 | Background 2
---------------------------------------------
Ambiance: 92, 91, 86 | 60, 59, 54
New Wave 58, 58, 58 | 42, 42, 42
Radiance 247, 244, 236 | 225, 215, 188
// other themes don't require gradient, so only one color
Clearlooks 237, 236, 235
Dust 52, 51, 48
Dust Sand 193, 189, 191
High contrast 0, 0, 51
GTK LaF:
On Ubuntu Maverick with GTK LaF and Ambiance theme, slider is too wide,
you can fix it by adding 'gui.thumbWidth: 15' to
$HOME/.musique/config
Tabs are too tall, this is JRE bug, it's been around for 5+ years, and is,
as many GUI bugs are, low priority
Double-click speed on Linux is faster than system settings, it might be
related to http://ubuntuforums.org/showthread.php?t=221642
create ~/.Xresources, and add
*multiClickTime: 400
Log Out and then Log back on
Substitute 400 with your prefered time (in milliseconds).
Mac OSX:
add -Xdock:name="Musique"
to musique.vmoptions to change program name in global menu
Performance Notes
The program should be run in client mode, not server, otherwise memory and CPU
usage will be too high.
I've tested the program in Windows 7 on Core 2 Duo 2.13 GHz, JRE 1.6u20 32-bit
and average CPU load was less than 1. Memory consumption was around 30-40 Mb
When I run the program in Ubuntu 10.04 32-bit and OpenJDK 1.6, memory consumption
is also around 30-40Mb, but the CPU load is ~4%.
However, deadbeef and rhytmbox use same amount of CPU so I guess it's because of
PulseAudio.
If you are running a 64-bit system and 64-bit JDK, it can not be run in client mode,
so it is better to install a 32-bit JRE. Then just change path to jre in musique.sh
Troubleshooting
On Linux, Sun JRE is using oss for sound output and the implementation is known to be
very buggy. Issues include conflicts with PulseAudio and Alsa - player throws LineUnavailableException
when some other program is playing audio, or, when the player is running, other programs can not
play sound.
So if you use PulseAudio, it is best to install OpenJDK, which has good
PulseAudio support (at least on Ubuntu). If you want to use Sun JDK instead of OpenJDK,
you can copy PulseAudio support from OpenJDK to Sun JDK using these instruction:
copy the following files from openjdk folder to java-sun folder
./jre/lib/(i386, amd64)/libpulse-java.so
./jre/ext/pulse-java.jar
Another solution is to use padsp or aoss to redirect sound to pulseaudio or alsa,
in this case, edit musique.sh. Find this line:
# uncomment to use OSS emulation, fixes sound problems with Sun JRE's
# DSP="padsp"
uncomment last line. Change it to aoss if you use alsa (you might need to install
the package first).
Title formatting help:
Everything is pretty much winamp/foobar2000 style:
Currently the following tags are supported:
%artist%, %title%, %album%, %year%, %genre%, %comment%, %length% - Don't need to explain these
%genres% - multi-valued version of %genre%
%albumArtist% - Album Artist (returns %artist% if album artist is not set)
for MP3 I use album artist from TXXX
%fileName% - filename without extension
%file% - full file path
%trackNumber%, %trackTotal% - track number formatted as a two-digit number and total tracks
%track% - convenience method that returns raw track number as it is stored in tags
%disc%, %discTotal% - disc number and total discs
%codec% - returns codec (MPEG-1 Layer 3, FLAC, WavPack, Ogg Vorbis, Monkey's Audio, PCM)
%recordLabels%, %catalogNos% - set of record label and catalog number values
some technical info fields like
%bitrate%, %totalSamples%, %bps%, %channels%, %songIndex%, %sampleRate%,
%channelsAsString% (Mono or Stereo)
$playingTime() - playing time of current song, if any
You can also use some functions, but not many of them are implemented yet:
$if1(arg1, arg2, arg3) - returns arg2 if arg1 is not empty, and arg3 otherwise
$if3(arg1, arg2, ...) - returns first non-empty argument
$strcmp(arg1, arg2) - returns 1 if arg1=arg2, empty string otherwise
$isPlaying() - used to idicate that the song is currently playing, paused or in playback queue
$combine(arg1, arg2) - formatter for multi-valued fields, where arg1 is values and arg2 is format separator
'' - Regular strings are enclosed in single quotation marks
[arg1 arg2] - will return contents only if at least on of the args is not empty
Some sample usages:
$if1($strcmp('MPEG-1 Layer 3', %codec%),'this is mp3','hurray to free formats')
will compare field 'codec' with string 'mp3', and return 'this is mp3' if they are equal
[%artist% - ]%title% - returns 'Artist - Title' if artist field is not empty,
otherwise returns just 'Title'
$if3(%title%, %fileName%) - returns file name without extension if title is empty
$combine(%genres%, ', ') - returns genre list separated by comma (for example, "heavy metal, hard rock")