From 92664befbe5c28dc128553ab0b7b589d27840725 Mon Sep 17 00:00:00 2001 From: Rob Canning Date: Thu, 30 Nov 2023 18:48:15 +0100 Subject: [PATCH] initial commit of the antena radio show scripts --- create_archive.sh | 8 +++++ create_show.py | 49 ++++++++++++++++++++++++++++ jingles_bumps_stings/README.md | 0 logs/antena.log | 0 music/README.md | 0 nonstop_web_stream.liq | 42 ++++++++++++++++++++++++ shows/antena_playlist_2023-11-30.pls | 15 +++++++++ shows/antena_showinfo_2023-11-30.md | 18 ++++++++++ 8 files changed, 132 insertions(+) create mode 100755 create_archive.sh create mode 100755 create_show.py create mode 100644 jingles_bumps_stings/README.md create mode 100644 logs/antena.log create mode 100644 music/README.md create mode 100644 nonstop_web_stream.liq create mode 100644 shows/antena_playlist_2023-11-30.pls create mode 100644 shows/antena_showinfo_2023-11-30.md diff --git a/create_archive.sh b/create_archive.sh new file mode 100755 index 0000000..46ec122 --- /dev/null +++ b/create_archive.sh @@ -0,0 +1,8 @@ + +# reminders of some useful oneliners + +find /home/rizoma/kamizdat_archive/kamizdat.si -iname "*FLAC*.zip" -exec unzip "{}" \; + +for i in *.zip; do unzip "$i" ; done; + +find ~+ -type f -name "*.flac" diff --git a/create_show.py b/create_show.py new file mode 100755 index 0000000..6be9480 --- /dev/null +++ b/create_show.py @@ -0,0 +1,49 @@ +#!/usr/bin/python3 + +import os, random +from tinytag import TinyTag +import datetime + +DATE = datetime.datetime.now().strftime("%Y-%m-%d") + +playlist_array = [] +show_array = [] +show_info = [] + +# open master playlist +with open('music/kam/kamizdat_flac.pls') as playlist_file: + for line in playlist_file: + playlist_array.append(line) + +# ///////////////////////////////////////////////// + +# randomly select a number of tracks +for i in range(15): + show_array.append(random.choice(playlist_array).rstrip()) +# remove any duplicates +show_array = list(set(show_array)) +# write the selection as a playlist file +with open("antena_playlist_" + DATE + ".pls","w") as file: + file.writelines("\n".join(show_array)) + +# ///////////////////////////////////////////////// +# create a markdown file containing show information + +total_show_duration = 0 + +for i in show_array: + track = TinyTag.get(i) + detail = track.artist + " : " + track.title + \ + " : " + track.album + " : " + str(track.year) + " : " + str(track.duration) + show_info.append("! " + detail) + total_show_duration = total_show_duration + track.duration + +total_show_duration = total_show_duration/60 + +with open("antena_showinfo_" + DATE + ".md","w") as file: + file.writelines("# SHOW INFO FOR ANTENA " + DATE + "\n") + file.writelines("Total Playtime excluding fills " + str(total_show_duration) + "\n\n") + file.writelines("\n".join(show_info)) + +# ///////////////////////////////////////////////// + diff --git a/jingles_bumps_stings/README.md b/jingles_bumps_stings/README.md new file mode 100644 index 0000000..e69de29 diff --git a/logs/antena.log b/logs/antena.log new file mode 100644 index 0000000..e69de29 diff --git a/music/README.md b/music/README.md new file mode 100644 index 0000000..e69de29 diff --git a/nonstop_web_stream.liq b/nonstop_web_stream.liq new file mode 100644 index 0000000..4790858 --- /dev/null +++ b/nonstop_web_stream.liq @@ -0,0 +1,42 @@ +#!/usr/bin/liquidsoap + +# log dir +log.file.path.set("~/antena/logs/antena-radio_stream.log") + +# music +kamizdat = playlist("~/antena/music/kam/kamizdat_flac.pls") + +# bumps stings and jingles +jingles = playlist("~/antena/jingles_bumps_stings/placeholder.pls") + +# fallback / security +security = single("/home/rizoma/sketchbook/libraries/minim/examples/Analysis/FFT/Windows/data/jingle.mp3") + +# Start building the feed with music +radio = kamizdat + +# jingles +radio = random(weights = [0, 4],[jingles, radio]) + +# security +radio = fallback(track_sensitive = false, [radio, security]) + +# dump to a file +timestamp = '%d-%m-%Y' +show_title = 'ANTENA' +output.file(%mp3(bitrate=320, id3v2=true), reopen_on_metadata=false, +"recorded_shows/#{show_title} Recorded On #{timestamp}.mp3", radio, fallible=true) + +# stream it out +output.icecast(%vorbis, + host = "rizom.si", port = 8000, + password = "hackmeheklab", mount = "antena-rizoma", + genre= "Experimental", + url= "http://rizom.si/antena" , + description = "Slovenian new and experimental music and sounds curated and produced by Zavod Rizoma", + id="MARS", + name="Antena/Rizoma : Radio MARŠ ", + radio) + + + diff --git a/shows/antena_playlist_2023-11-30.pls b/shows/antena_playlist_2023-11-30.pls new file mode 100644 index 0000000..796f957 --- /dev/null +++ b/shows/antena_playlist_2023-11-30.pls @@ -0,0 +1,15 @@ +/home/rizoma/antena/music/kam/Warrego_Valles_-_Botox_(2018_Kamizdat)_[FLAC]/6. Warrego Valles - Madmen.flac +/home/rizoma/antena/music/kam/Dodecahedragraph - Mixtures and Leftovers (2018, Kamizdat, FLAC)/20 - annihilation_var. 0.flac +/home/rizoma/antena/music/kam/Shekuza - De Sica (2019, Kamizdat) [FLAC]/05 Shekuza - Nost.flac +/home/rizoma/antena/music/kam/Shekuza - De Sica (2019, Kamizdat) [FLAC]/04 Shekuza - Nebulae Tree.flac +/home/rizoma/antena/music/kam/Access Frame - Equity (Kamizdat, 2020) [FLAC]/Kamizdat - Access Frame- Equity - 16 Luka Prinčič- Tomorrow is Non Sequitur (For 3 Tape Players and More Bodies).flac +/home/rizoma/antena/music/kam/Warrego Valles - save as (Kamizdat, 2019) [FLAC]/3. Warrego Valles - make this title easy to remember.flac +/home/rizoma/antena/music/kam/Luka_Prinčič_-_Antigone_Child_(2018, Kamizdat).[FLAC]/12 The Mother (Act VII).flac +/home/rizoma/antena/music/kam/Shekuza - Coriolis Effect (Kamizdat, 2020) [FLAC]/02 Shekuza - Sand Mantis.flac +/home/rizoma/antena/music/kam/Warrego Valles - save as (Kamizdat, 2019) [FLAC]/5. Warrego Valles - mansplainer rehab.flac +/home/rizoma/antena/music/kam/Access Frame - Equity (Kamizdat, 2020) [FLAC]/Kamizdat - Access Frame- Equity - 11 #DUF- YuWrong.flac +/home/rizoma/antena/music/kam/Luka_Prinčič_-_Antigone_Child_(2018, Kamizdat).[FLAC]/06 Scena Bass Alto Soli (Outtake).flac +/home/rizoma/antena/music/kam/The Feminalz - Technoburlesque: Image Snatchers 3 (2022, Kamizdat) [FLAC]/The Feminalz - Technoburlesque Image Snatchers 3 - 4 Gucci Guči (feat GlitterAid).flac +/home/rizoma/antena/music/kam/Access Frame - Collectivity (Kamizdat, 2018) [FLAC]/09 Gašper Torkar - Inchoate Crimes.flac +/home/rizoma/antena/music/kam/Dodecahedragraph - Mixtures and Leftovers (2018, Kamizdat, FLAC)/04 - chan debris_var.2.flac +/home/rizoma/antena/music/kam/beepblip - Noise for Strings vol.2 (Kamizdat, 2020) [FLAC]/beepblip - Noise for Strings vol.2 - 04. Time travel.flac \ No newline at end of file diff --git a/shows/antena_showinfo_2023-11-30.md b/shows/antena_showinfo_2023-11-30.md new file mode 100644 index 0000000..42d57e1 --- /dev/null +++ b/shows/antena_showinfo_2023-11-30.md @@ -0,0 +1,18 @@ +# SHOW INFO FOR ANTENA 2023-11-30 +Total Playtime excluding fills 70.71117262849586 + +! Warrego Valles : Madmen : Botox : 2018 : 253.5 +! Dodecahedragraph : annihilation_var. 0 : Mixtures and Leftovers : 2018 : 219.48065759637188 +! Shekuza : Nost : De Sica : 2019 : 205.7599319727891 +! Shekuza : Nebulae Tree : De Sica : 2019 : 234.95630385487527 +! Luka Prinčič : Tomorrow is Non Sequitur (For 3 Tape Players and More Bodies) : Access Frame: Equity : 2020 : 326.2944217687075 +! Warrego Valles : make this title easy to remember : save as : None : 351.2195238095238 +! Luka Prinčič : The Mother (Act VII) : Antigone/Child : 2018 : 492.161201814059 +! Shekuza : Sand Mantis : Coriolis Effect : 2020 : 241.11192743764173 +! Warrego Valles : mansplainer rehab : save as : None : 301.3138775510204 +! #DUF : YuWrong : Access Frame: Equity : 2020 : 230.13029478458049 +! Luka Prinčič : Scena Bass Alto Soli (Outtake) : Antigone/Child : 2018 : 213.713537414966 +! The Feminalz : Gucci Guči (feat GlitterAid) : Technoburlesque: Image Snatchers 3 : 2022 : 242.68108333333333 +! Gašper Torkar : Inchoate Crimes : Access Frame - Collectivity : 2018 : 498.36061224489794 +! Dodecahedragraph : chan debris_var.2 : Mixtures and Leftovers : 2018 : 116.98700680272108 +! beepblip : Time travel : Noise for Strings vol.2 : 2020 : 314.99997732426306 \ No newline at end of file