mirror of
https://github.com/migatu/conjurer.git
synced 2026-07-14 21:38:38 +00:00
Duplication error
This commit is contained in:
@@ -56,7 +56,7 @@ s = crossfade(fade_out=2., fade_in=2., duration=4., fallback(id="switcher", trac
|
||||
|
||||
# Set up an interactive harbor for controlling the stream
|
||||
interactive.harbor(port = 9999)
|
||||
harbor.input(buffer=30.0)
|
||||
#harbor.input(buffer=30.0)
|
||||
# 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.)
|
||||
@@ -68,29 +68,30 @@ a = interactive.float("main_volume", min=0., max=20., 0.4)
|
||||
s = compress.multiband.interactive(bands=7, s)
|
||||
|
||||
mic_gain = interactive.float("mic_volume", min=0., max=120., 6.)
|
||||
|
||||
# Apply audio processing effects
|
||||
tmic = buffer(input.pulseaudio()) # Microphone
|
||||
mic = amplify(mic_gain, tmic)
|
||||
mic = gate(threshold=-80., range=-120., mic)
|
||||
mic = compress(threshold=0., ratio=2.,mic)
|
||||
mic = nrj(normalize(mic))
|
||||
mic = blank.strip(max_blank=10., min_noise=.1, threshold=-20., mic)
|
||||
s = add([s, mic])
|
||||
|
||||
# Apply audio processing effects
|
||||
s = nrj(normalize(s))
|
||||
s = amplify(a, s)
|
||||
# Skip blank sections in the stream
|
||||
s = blank.skip(max_blank=10., s)192
|
||||
s = blank.skip(max_blank=10., s)
|
||||
|
||||
#Manual audition override
|
||||
live_enabled = interactive.bool("Going Live!", true)
|
||||
s = switch(track_sensitive=false,
|
||||
[({!live_enabled}, live),
|
||||
({true}, radio)])
|
||||
|
||||
|
||||
def fading_transition(a,b)
|
||||
sequence([fade.out(a.source),fade.in(b.source)])
|
||||
end
|
||||
s = crossfade(fade_out=10., fade_in=5., duration=15., switch(track_sensitive=false,
|
||||
[(live_enabled, mic),
|
||||
({true}, s)])
|
||||
)
|
||||
|
||||
# Configure logging settings
|
||||
log_to_stdout = true
|
||||
@@ -107,6 +108,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")
|
||||
radio = fallback(id="switcher2", track_sensitive=false, [s, emergency])
|
||||
|
||||
# Set up an interactive control for skipping tracks
|
||||
p = interactive.bool("Skip track", false)
|
||||
def http_skip(~protocol, ~data, ~headers, uri)=
|
||||
@@ -138,6 +140,7 @@ interactive.persistent("script.params")
|
||||
|
||||
# Configure output formats and destinations
|
||||
|
||||
|
||||
output.icecast(%mp3, host="retropie", port=8000, password=credentials.password, icy_metadata="true", mount="mp3-stream", radio)
|
||||
output.pulseaudio(radio)
|
||||
#output.file.hls("/tmp/hls", [("mp3-low", %mp3(bitrate=96)), ("mp3-hi", %mp3(bitrate=160))], radio)
|
||||
|
||||
Reference in New Issue
Block a user