In the 'status' query I can get the track and album replaygain values for a track. But, is there anyway to detect which is currently active? i.e. which value is being using for playback? I know I could probably just look at the player setting, but it gets more complex if smartgain is being used.
Announcement
Collapse
No announcement yet.
Replaygain value for current track?
Collapse
X
-
Replaygain value for current track?
Material debug: 1. Launch via http: //SERVER:9000/material/?debug=json (Use http: //SERVER:9000/material/?debug=json,cometd to also see update messages, e.g. play queue) 2. Open browser's developer tools 3. Open console tab in developer tools 4. REQ/RESP messages sent to/from LMS will be logged here.Tags: None -
I donโt think there is a way to get that information. Without looking at the code Iโd say itโs only ever evaluated before playback starts.Michael
"It doesn't work - what shall I do?" - "Please check your server.log and/or scanner.log file!"
(LMS: Settings/Information) -
Ah, that's what I was afraid of. Only asking as I had a request to show replaygain in Material's now-playing. But that only makes sense if I know the value being used. But not a massive issue. Thanks as always.Material debug: 1. Launch via http: //SERVER:9000/material/?debug=json (Use http: //SERVER:9000/material/?debug=json,cometd to also see update messages, e.g. play queue) 2. Open browser's developer tools 3. Open console tab in developer tools 4. REQ/RESP messages sent to/from LMS will be logged here.Comment
-
If you wanted to poke around to implementing something: I believe Slim::Player::ReplayGain->fetchGainMode($self->master(), $song) is what is being used to figure out what gain to use. Would you expect this to be available for any track in the queue or only the currently playing? That shouldn't be too hard to add to the status query. Except that there are hardly any "tag" characters left any more ๐.Michael
"It doesn't work - what shall I do?" - "Please check your server.log and/or scanner.log file!"
(LMS: Settings/Information)Comment
-
What about this:
Code:[B]diff --git a/Slim/Control/Queries.pm b/Slim/Control/Queries.pm[/B] [B]index 307ba4c8d..7f9687015 100644[/B] [B]--- a/Slim/Control/Queries.pm[/B] [B]+++ b/Slim/Control/Queries.pm[/B] @@ -3625,6 +3625,8 @@ sub statusQuery { if ($canSeek) { $request->addResult('can_seek', 1); } + + $request->addResult('replay_gain', Slim::Player::ReplayGain->fetchGainMode($client, $song) || 0) } if ($client->currentSleepTime()) { โ
(I'm sorry, pasting to vBulleting still sucks...)Michael
"It doesn't work - what shall I do?" - "Please check your server.log and/or scanner.log file!"
(LMS: Settings/Information)Comment
-
Yeah, that'd work. I only want it for the current track - I don't show tech info for items in the queue, so not an issue there. (When I say I, I really mean the requester of this feature...)Material debug: 1. Launch via http: //SERVER:9000/material/?debug=json (Use http: //SERVER:9000/material/?debug=json,cometd to also see update messages, e.g. play queue) 2. Open browser's developer tools 3. Open console tab in developer tools 4. REQ/RESP messages sent to/from LMS will be logged here.Comment
-
Michael
"It doesn't work - what shall I do?" - "Please check your server.log and/or scanner.log file!"
(LMS: Settings/Information)Comment
-
If you do add the feature will it be selectable? I can imagine people who don't use replaygain complaining ๐Living Room: Touch or Squeezelite (Pi3B) > Topping E30 > Audiolab 8000A > Monitor Audio S5 + BK200-XLS DF
Bedroom: Radio
Bathroom: RadioComment
-
Material debug: 1. Launch via http: //SERVER:9000/material/?debug=json (Use http: //SERVER:9000/material/?debug=json,cometd to also see update messages, e.g. play queue) 2. Open browser's developer tools 3. Open console tab in developer tools 4. REQ/RESP messages sent to/from LMS will be logged here.👍 1Comment
-
Material debug: 1. Launch via http: //SERVER:9000/material/?debug=json (Use http: //SERVER:9000/material/?debug=json,cometd to also see update messages, e.g. play queue) 2. Open browser's developer tools 3. Open console tab in developer tools 4. REQ/RESP messages sent to/from LMS will be logged here.👍 2Comment
-
I've never looked at the tags ... but perhaps time to use one of the remaining as an escape character so that you can expand to 2 character tags - only used if requester says that they can handle them.
Paul Webster
Author of "Now Playing" plugins covering Radio France (FIP etc), PlanetRadio (Bauer - Kiss, Absolute, Scala, JazzFM etc), KCRW, ABC Australia and CBC/Radio-Canada
and, via the extra "Radio Now Playing" plugin lots more - see https://forums.slimdevices.com/showt...Playing-pluginComment
-
Comment
-
cpd73 I thought I'd piggy back onto this thread since it's somewhat related. There is a situation in the Qobuz plugin where the stream can be switched just before playback from the one stored in the library to a lower quality one, based on what the current player can handle without downsampling. While the bitrate of the alternate stream can be determined in advance based on the length and duration of the track, the new sample rate and sample size are not known until playback has started. What happens is that the technical info in the Now Playing view shows the recalculated (lower) bitrate but shows the sample rate/size of the original stream, as stored in the library. I am currently testing a change to LMS that adds the 'samplerate' and 'samplesize' attributes of the currently playing track to the status query response for remote tracks only, in hopes that Material would pick them up and update the display, as is done for the new 'replaygain' attribute. However, the new values are, perhaps unsurprisingly, not being displayed. Would it be possible to make this happen?SamComment
-
If the new values are in the status message then Material should pick them up and show them. Have you confirmed the status message details are updated?Material debug: 1. Launch via http: //SERVER:9000/material/?debug=json (Use http: //SERVER:9000/material/?debug=json,cometd to also see update messages, e.g. play queue) 2. Open browser's developer tools 3. Open console tab in developer tools 4. REQ/RESP messages sent to/from LMS will be logged here.Comment
-
Code:โ{ "playlist_cur_index": "0", "replay_gain": -3.79, "remoteMeta": { "id": 20086, "title": "Interlude 2 (Live)", "coverid": "5f63669a", "duration": "383", "album_id": "1660", "genre": "Jazz", "disc": "1", "album": "A Love Supreme: Live In Seattle", "type": "flc", "disccount": "1", "bitrate": "875kbps", "artist_id": "3348", "tracknum": "4", "url": "qobuz://135238668.flac", "year": "2021", "artist": "John Coltrane", "genres": "Jazz", "samplesize": "24", "artwork_url": "/imageproxy/https%3A%2F%2Fstatic.qobuz.com%2Fimages%2Fcovers%2Fpa%2Foq%2Fjgj3exmfroqpa_600.jpg/image.jpg", "artist_ids": "3348", "composer_ids": "3348", "trackartist_ids": "3348", "samplerate": "192000" }, "rate": 1, "mixer volume": 24, "time": 96.2414371070862, "playlist_loop": [ { "title": "Interlude 2 (Live)", "genre": "Jazz", "artist": "John Coltrane", "duration": "383", "type": "flc", "artwork_url": "/imageproxy/https%3A%2F%2Fstatic.qobuz.com%2Fimages%2Fcovers%2Fpa%2Foq%2Fjgj3exmfroqpa_600.jpg/image.jpg", "disc": "1", "artist_ids": "3348", "coverid": "5f63669a", "trackartist_ids": "3348", "album_id": "1660", "playlist index": 0, "samplesize": "24", "genres": "Jazz", "disccount": "1", "tracknum": "4", "samplerate": "192000", "bitrate": "875kbps", "composer_ids": "3348", "year": "2021", "url": "qobuz://135238668.flac", "album": "A Love Supreme: Live In Seattle", "id": 20086, "artist_id": "3348" } ], "player_name": "Bedroom pair", "power": 1, "mode": "play", "playlist mode": "off", "player_ip": "192.168.1.28:34704", "playlist repeat": 0, "digital_volume_control": 1, "current_title": "", "duration": 383, "samplerate": "44100", "signalstrength": 0, "playlist shuffle": 0, "player_connected": 1, "can_seek": 1, "playlist_tracks": 1, "playlist_timestamp": 1695830928.06144, "seq_no": 0, "remote": 1, "samplesize": "16" }โ
SamComment
Comment