mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-03-16 08:36:07 +09:00
musicplayer: working stop and next button, button pos on transition
This commit is contained in:
31
assets/mods/musicplayer/README_for_the_best_audio_quality.md
Normal file
31
assets/mods/musicplayer/README_for_the_best_audio_quality.md
Normal file
@@ -0,0 +1,31 @@
|
||||
## Sampling Rate
|
||||
|
||||
The basegame is build assuming the sampling rate of 48000 Hz.
|
||||
|
||||
Any audio files with lower sampling rate will be resampled on-the-fly by the game's audio engine,
|
||||
but doing so may introduce artefacts, most notably fast periodic clicks, which may be audible in certain
|
||||
circumstances. For the best results, please resample your audio files to 48000 Hz beforehand.
|
||||
|
||||
|
||||
## Mono Incompatibility
|
||||
|
||||
The audio engine does not support monaural audio. Please convert your mono audio file to stereo beforehand.
|
||||
|
||||
|
||||
## Gapless Playback
|
||||
|
||||
The basegame (and by the extension this music player) does support the Gapless Playback.
|
||||
|
||||
However, because of the inherent limitation of the MP3 format, the Gapless Playback is not achievable
|
||||
without extensive hacks. If you do care, please convert your MP3 files into WAV or OGG format.
|
||||
|
||||
|
||||
## SACD-Quality WAV File Incompatibility
|
||||
|
||||
The audio engine cannot resample an audio file with sampling rate greater than 48000 Hz, nor is capable
|
||||
of reading anything that is not in 16-bit bit-depth.
|
||||
|
||||
|
||||
## tl;dr
|
||||
|
||||
Stereo, 48 kHz, 16 bit, WAV or OGG.
|
||||
Binary file not shown.
27
assets/mods/musicplayer/writing_playlist.md
Normal file
27
assets/mods/musicplayer/writing_playlist.md
Normal file
@@ -0,0 +1,27 @@
|
||||
The playlists (or albums) are stored under (userdata)/Custom/Music/(album name)
|
||||
|
||||
The name of the directory is used as the album title, and the lexicographic sorting of the files is used
|
||||
as the playing order, so it is advised to name your files as 01.ogg, 02.ogg, 03.ogg, etc.
|
||||
|
||||
To actually give titles to the files, you must write `playlist.json` with following format:
|
||||
|
||||
```json
|
||||
{
|
||||
"diskJockeyingMode": "continuous", /* "continuous" allows the Gapless Playback, "intermittent" will put random length of pause (in a range of 30 to 60 seconds) between tracks */
|
||||
"shuffled": false, /* self-explanatory, often used with "diskJockeyingMode": "intermittent" */
|
||||
"titles": {
|
||||
"01.ogg": "Lorem Ipsum",
|
||||
"02.ogg": "Dolor Sit Amet",
|
||||
"03.ogg": "Consectetur Adipiscing",
|
||||
"04.ogg": "Sed Do Tempor"
|
||||
/* these are the filename-to-song-title lookup table the music player actually looks for */
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
### Limitations
|
||||
|
||||
On certain filesystem and platform combination, you cannot use non-ASCII character on the album title
|
||||
due to an incompatibility with the Java's File implementation. Song titles on `playlist.json` has no
|
||||
such limitation.
|
||||
Reference in New Issue
Block a user