From 7de1ad43fd1c83f8361a08ce0de1fb108a3d0734 Mon Sep 17 00:00:00 2001 From: Migatu Date: Thu, 25 Apr 2024 14:06:23 +0200 Subject: [PATCH] Small fixes --- conjurer_musician/radio_conjurer.liq | 15 +++++++++------ requirements_bot.txt | 3 ++- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/conjurer_musician/radio_conjurer.liq b/conjurer_musician/radio_conjurer.liq index c4c3017..a636554 100644 --- a/conjurer_musician/radio_conjurer.liq +++ b/conjurer_musician/radio_conjurer.liq @@ -58,6 +58,8 @@ s = rotate(id="randomizer", weights=[20, 1], [s4, jingles]) # Set up an interactive harbor for controlling the stream interactive.harbor(port = 9999) +s = crossfade(fade_out=3., fade_in=3., duration=5., fallback(id="switcher", track_sensitive=false, [requests_queue, s])) + # Set up interactive controls for bass boost f = interactive.float("f", description="Frequency", min=0., max=1000., unit="Hz", 200.) g = interactive.float("g", description="Gain", min=0., max=20., unit="dB", 8.) @@ -66,7 +68,7 @@ s = add([s, b]) # Set up interactive control for main volume a = interactive.float("main_volume", min=0., max=20., 1.) -s = compress.multiband.interactive(bands=3, s) +s = compress.multiband.interactive(bands=8, s) # Apply audio processing effects s = nrj(normalize(s)) @@ -75,6 +77,9 @@ s = amplify(a, s) # Skip blank sections in the stream s = blank.skip(max_blank=2., s) +#w = interactive.float("wetness", min=0., max=1., 1.) +#s = dry_wet(w, s, s2) + # Configure logging settings log_to_stdout = true log_to_file = true @@ -89,9 +94,7 @@ set("log.file.path", logpath) # Set up emergency fallback track emergency = single("/home/pi/RetroPie/mp3/Youtube/Dr. Peacock - Trip to Ireland [GvrvQTUbUcA].mp3") - # Create a fallback stream with the main stream and emergency track -cross_s = crossfade(fade_out=3., fade_in=3., duration=5., fallback(id="switcher", track_sensitive=false, [requests_queue, s])) radio = fallback(id="switcher2", track_sensitive=false, [cross_s, emergency]) # Function to process the request queue and skip the current track if requested @@ -107,7 +110,7 @@ end thread.run(every=60., queue_processing) # Set up an interactive control for skipping tracks -p = interactive.bool("r1", false) +p = interactive.bool("Skip track", false) # Run the check_skip function every 5 seconds thread.run(every=5., check_skip) @@ -124,8 +127,8 @@ radio.on_metadata(handle_metadata) interactive.persistent("script.params") # Configure output formats and destinations -output.file.hls("/tmp/hls", [("mp3-low", %mp3(bitrate=96)), ("mp3-hi", %mp3(bitrate=160))], radio) -output.icecast(%mp3, host="retropie", port=8000, password=credentials.password, icy_metadata="true", mount="mp3-stream", radio) +output.file.hls("/tmp/hls", [("mp3-low", %mp3(bitrate=96)), ("mp3-hi", %mp3(bitrate=320))], radio) +output.icecast(%mp3.abr(internal_quality = 0, bitrate=320, min_bitrate=192), host="retropie", port=8000, password=credentials.password, icy_metadata="true", mount="mp3-stream", radio) # Uncomment the following lines to enable additional output formats # output.icecast(%opus, host="retropie", port=8000, password=credentials.password, icy_metadata="true", mount="opus-stream", radio) # output.icecast(%ogg, host="retropie", port=8000, password=credentials.password, icy_metadata="true", mount="ogg-stream", radio) diff --git a/requirements_bot.txt b/requirements_bot.txt index e4d9ba0..7c8fed6 100644 --- a/requirements_bot.txt +++ b/requirements_bot.txt @@ -12,4 +12,5 @@ spotipy tiktoken PyNaCl flask -waitress \ No newline at end of file +waitress +clickupython \ No newline at end of file