Beyla: Difference between revisions

From Noisebridge
Jump to navigation Jump to search
New page: Beyla (KNOB radio streaming server) - how to listen and stream
Add Radio Control API documentation (port 8081, genre/queue/skip/search endpoints)
 
(10 intermediate revisions by the same user not shown)
Line 1: Line 1:
= Beyla: Noisebridge Internet Radio (KNOB) =
= Beyla =


'''Beyla''' is the streaming server that powers '''KNOB''' (Noisebridge Radio), a 24/7 internet radio station run by and for the Noisebridge community. It broadcasts a mix of automated programming and live DJ sets, and anyone at the space can take over the airwaves.
'''Beyla''' is the music server that powers [[KNOB]], Noisebridge's 24/7 internet radio station. It's a [https://soayan.com/products/soayan-n6-mini-pc-rgb-hexagon-design-intel-n100-16gb-ram-500gb-ssd-dual-4k-windows-11 SOAYAN-N6] mini PC sitting on top of the primary audio amplifier in the [[RNA Lounge]] -- the one with '''[[Rubber Ducky Guild|MC Escher]]''' on top (little green duck, gold chain, knitted cap).


== Listening ==
== Finding and Turning On Beyla ==
 
Beyla lives in the [[RNA Lounge]], upstairs. Look for the amplifier with the green rubber duck on top -- that's MC Escher, and Beyla is the small hexagonal box sitting on the amp.
 
Beyla has a fancy little LED stripe light that indicates it's on. If Beyla appears to be off, look for a small round button on its side. Press it to power on.
 
Give it a minute to boot and the stream should come back up automatically.
 
== Physical Audio Distribution ==
 
Beyla's 1/8" output jack is split three ways. Each output is converted to balanced audio over ethernet via an '''audio balun''' (RCA → ethernet cable → RCA), allowing the signal to travel cleanly over long cable runs to amplifiers distributed around the space.
 
The three amplifiers:


{| class="wikitable"
{| class="wikitable"
! Method !! URL
! Amp !! Location !! Notes
|-
|-
| '''Web Dashboard''' (with in-browser player) || [https://nthmost.com/nbradio/ nthmost.com/nbradio/]
| '''Primary''' (MC Escher) || [[RNA Lounge]], on this amp's top || Beyla sits directly on top of this one. MC Escher [[Rubber Ducky Guild|(RDG)]] is permanently affixed to the amp.
|-
|-
| '''Direct Stream''' (for media players) || <code>https://nthmost.com/nbradio/stream.ogg</code>
| '''RNA Lounge / Stairs''' || On top of the old NB podium, top of the stairs || The [[KNOB#FM Broadcast|FM transmitter]] lives inside the podium body; the amp sits on top.
|-
|-
| '''LAN Stream''' (at Noisebridge) || <code>http://beyla.local:8000/stream.ogg</code>
| '''Hallway''' || Next to the kitchen, across from the [[Electronics Lab]] door ||
|}
|}


The stream is OGG Vorbis format. You can open the direct stream URL in VLC, mpv, or any media player that supports network streams.
Volume is controlled independently on each amplifier — each area sets its own level.


== How to DJ ==
== Technical Stack ==


Anyone at Noisebridge can go live. Your audio takes priority over the automated programming the moment you connect, and the schedule resumes when you disconnect.
* '''[https://www.liquidsoap.info/ Liquidsoap]''' -- audio routing, scheduling, and mixing engine
* '''[https://icecast.org/ Icecast 2]''' -- streaming media server
* '''Custom web dashboard''' -- zero-dependency Python HTTP server for now-playing info
 
The system uses a priority-based fallback chain: live DJ input always takes precedence, then scheduled programming, then a SomaFM internet radio fallback if all local sources fail.


=== What You Need ===


# A laptop (or phone) connected to the '''Noisebridge network'''
== Radio Control API ==
# DJ/streaming software (see below)
# Something to play -- your own music, a mix, a live set, a poetry reading, whatever


=== Connection Settings ===
Beyla exposes a local HTTP control API on port '''8081''' (<code>http://beyla.local:8081/</code>). It lets you switch genres, queue specific tracks, skip tracks, and see what's playing. The API is available on the Noisebridge LAN only.


Enter these into your streaming software:
An OpenAPI 3.0 spec is available at <code>/api/spec</code>.
 
=== Genre Endpoints ===


{| class="wikitable"
{| class="wikitable"
! Setting !! Value
! Method !! Endpoint !! Description
|-
|-
| '''Host''' || <code>beyla.local</code>
| <code>GET</code> || <code>/api/genres</code> || List all genres with track counts and subgenres
|-
|-
| '''Port''' || <code>8005</code>
| <code>GET</code> || <code>/api/genre</code> || Get current genre override status
|-
|-
| '''Mount''' || <code>/live</code>
| <code>POST</code> || <code>/api/genre</code> || Set genre override — plays shuffled tracks from that genre instead of the normal schedule. Takes effect after the current track finishes.
|-
|-
| '''Username''' || <code>nbradio</code>
| <code>DELETE</code> || <code>/api/genre</code> || Clear genre override, returning to the normal schedule
|-
| '''Password''' || <code>nbradio</code>
|-
| '''Protocol''' || Shoutcast / Icecast
|}
|}


You must be on the Noisebridge local network to connect.
'''POST /api/genre''' request body:
<pre>
{
  "genre": "Bass",      // required — parent genre name (see GET /api/genres for options)
  "subgenre": "Dubstep"  // optional — narrows the track pool
}
</pre>


=== Recommended Software ===
=== Queue & Playback Endpoints ===


{| class="wikitable"
{| class="wikitable"
! Software !! Platform !! Notes
! Method !! Endpoint !! Description
|-
| '''[https://mixxx.org/ Mixxx]''' || Windows, Mac, Linux || Full DJ software with mixing, beatmatching, and effects. Free and open source. '''Recommended.'''
|-
|-
| '''[https://obsproject.com/ OBS Studio]''' || Windows, Mac, Linux || Can stream audio output. Good if you're already using OBS.
| <code>GET</code> || <code>/api/queue</code> || Show queued tracks and current genre feed status
|-
|-
| '''[https://www.virtualdj.com/ VirtualDJ]''' || Windows, Mac || Popular DJ software with streaming support.
| <code>POST</code> || <code>/api/queue</code> || Queue a specific track (by <code>track_id</code> or <code>search</code> string)
|-
|-
| '''IDJC''' (Internet DJ Console) || Linux || Lightweight Linux-native option.
| <code>DELETE</code> || <code>/api/queue</code> || Clear all queued tracks
|-
|-
| '''[https://danielnoethen.de/butt/ BUTT]''' (Broadcast Using This Tool) || Windows, Mac, Linux || Lightweight, but some users have had connectivity issues.
| <code>POST</code> || <code>/api/skip</code> || Skip the currently playing track immediately
|}
|}


=== Quick Start with Mixxx ===
=== Search & Status Endpoints ===
 
# Download and install [https://mixxx.org/ Mixxx]
# Go to '''Preferences''' > '''Live Broadcasting'''
# Set:
#* '''Type''': Icecast 2
#* '''Host''': <code>beyla.local</code>
#* '''Port''': <code>8005</code>
#* '''Mount''': <code>/live</code>
#* '''Login''': <code>nbradio</code>
#* '''Password''': <code>nbradio</code>
# Load up some tracks, start mixing, and enable broadcasting
 
== Programming Schedule ==
 
When no DJ is live, Beyla runs automated programming on a 24-hour cycle:


{| class="wikitable"
{| class="wikitable"
! Time !! Show !! Description
! Method !! Endpoint !! Description
|-
| 2am -- 10am || '''AUTODJ''' || Downtempo, lofi, and eclectic tracks with station IDs
|-
| 10am -- 11am || '''Pandora's Box''' || Mixed-genre surprise hour
|-
| 11am -- 5pm || '''AUTODJ''' || Downtempo, lofi, and eclectic tracks with station IDs
|-
|-
| 5pm -- 6pm || '''Pandora's Box''' || Mixed-genre surprise hour
| <code>GET</code> || <code>/api/search?q=TEXT&genre=GENRE&limit=N</code> || Search the music library by artist, title, or filename
|-
|-
| 6pm -- 10pm || '''AUTODJ''' || Downtempo, lofi, and eclectic tracks with station IDs
| <code>GET</code> || <code>/api/now-playing</code> || Current track, time remaining, listener count, genre override, and queue depth
|-
|-
| 10pm -- 2am || '''Noisefloor''' || Dubstep, bass music, and deep electronic
| <code>GET</code> || <code>/api/spec</code> || OpenAPI 3.0 spec for this API
|}
|}


All automated shows include station callsigns and occasional fake commercials.
=== Examples ===
 
<pre>
# Switch to Chill mode
curl -X POST http://beyla.local:8081/api/genre \
  -H 'Content-Type: application/json' \
  -d '{"genre": "Chill"}'


== Contributing Music ==
# Switch to Bass / Dubstep specifically
curl -X POST http://beyla.local:8081/api/genre \
  -H 'Content-Type: application/json' \
  -d '{"genre": "Bass", "subgenre": "Dubstep"}'


Want to add tracks to the rotation? Contact '''nthmost''' on the [https://discord.gg/noisebridge Noisebridge Discord]. The music library lives on Beyla's local drive, and contributions in MP3, FLAC, OGG, or WAV format are welcome.
# Return to normal schedule
curl -X DELETE http://beyla.local:8081/api/genre


== Technical Details ==
# Search and queue a track
curl 'http://beyla.local:8081/api/search?q=aphex+twin&limit=5'
curl -X POST http://beyla.local:8081/api/queue \
  -H 'Content-Type: application/json' \
  -d '{"track_id": 42}'


Beyla runs on a dedicated machine on the Noisebridge network. The stack:
# Skip current track
curl -X POST http://beyla.local:8081/api/skip
</pre>


* '''[https://www.liquidsoap.info/ Liquidsoap]''' -- audio routing, scheduling, and mixing engine
'''Note:''' Genre names are case-sensitive. Use <code>GET /api/genres</code> to get the exact names. Current genres: Bass, Chill, Electronic, Hip-Hop, Pop/Rock, Blues/Soul, Punk, Dub/Reggae, Metal, Jazz, Classical.
* '''[https://icecast.org/ Icecast 2]''' -- streaming media server
 
* '''Custom web dashboard''' -- zero-dependency Python HTTP server for now-playing info
== Getting Involved ==


The system uses a priority-based fallback chain: live DJ input always takes precedence, then scheduled programming, then a SomaFM internet radio fallback if all local sources fail.
If you'd like to help run or maintain Beyla, contact '''@nthmost''' on the [https://discord.gg/noisebridge Noisebridge Discord] and be prepared to send your SSH public key.


== See Also ==
== See Also ==


* [https://nthmost.com/nbradio/ KNOB Web Dashboard]
* [[KNOB]] -- the radio station Beyla powers
* [[Beyla/Genre_Statistics]] -- music library genre breakdown
* [[Audio]] -- sound systems around Noisebridge
* [[Rubber Ducky Guild]] -- MC Escher's people
 
 
== About the Name ==
 
'''Beyla''' is named after a figure in Norse mythology — one of [https://en.wikipedia.org/wiki/Freyr Freyr]'s servants, whose name is etymologically linked to ''bees'' and who is associated with bees and mead in modern Germanic tradition. The name felt fitting: the [https://soayan.com/products/soayan-n6-mini-pc-rgb-hexagon-design-intel-n100-16gb-ram-500gb-ssd-dual-4k-windows-11 SOAYAN-N6] mini PC has a distinctive '''hexagonal''' form factor, echoing the geometry of a honeycomb.


[[Category:Projects]]
[[Category:Projects]]
[[Category:Radio]]
[[Category:Radio]]
[[Category:Infrastructure]]

Latest revision as of 15:36, 15 March 2026

Beyla

[edit | edit source]

Beyla is the music server that powers KNOB, Noisebridge's 24/7 internet radio station. It's a SOAYAN-N6 mini PC sitting on top of the primary audio amplifier in the RNA Lounge -- the one with MC Escher on top (little green duck, gold chain, knitted cap).

Finding and Turning On Beyla

[edit | edit source]

Beyla lives in the RNA Lounge, upstairs. Look for the amplifier with the green rubber duck on top -- that's MC Escher, and Beyla is the small hexagonal box sitting on the amp.

Beyla has a fancy little LED stripe light that indicates it's on. If Beyla appears to be off, look for a small round button on its side. Press it to power on.

Give it a minute to boot and the stream should come back up automatically.

Physical Audio Distribution

[edit | edit source]

Beyla's 1/8" output jack is split three ways. Each output is converted to balanced audio over ethernet via an audio balun (RCA → ethernet cable → RCA), allowing the signal to travel cleanly over long cable runs to amplifiers distributed around the space.

The three amplifiers:

Amp Location Notes
Primary (MC Escher) RNA Lounge, on this amp's top Beyla sits directly on top of this one. MC Escher (RDG) is permanently affixed to the amp.
RNA Lounge / Stairs On top of the old NB podium, top of the stairs The FM transmitter lives inside the podium body; the amp sits on top.
Hallway Next to the kitchen, across from the Electronics Lab door

Volume is controlled independently on each amplifier — each area sets its own level.

Technical Stack

[edit | edit source]
  • Liquidsoap -- audio routing, scheduling, and mixing engine
  • Icecast 2 -- streaming media server
  • Custom web dashboard -- zero-dependency Python HTTP server for now-playing info

The system uses a priority-based fallback chain: live DJ input always takes precedence, then scheduled programming, then a SomaFM internet radio fallback if all local sources fail.


Radio Control API

[edit | edit source]

Beyla exposes a local HTTP control API on port 8081 (http://beyla.local:8081/). It lets you switch genres, queue specific tracks, skip tracks, and see what's playing. The API is available on the Noisebridge LAN only.

An OpenAPI 3.0 spec is available at /api/spec.

Genre Endpoints

[edit | edit source]
Method Endpoint Description
GET /api/genres List all genres with track counts and subgenres
GET /api/genre Get current genre override status
POST /api/genre Set genre override — plays shuffled tracks from that genre instead of the normal schedule. Takes effect after the current track finishes.
DELETE /api/genre Clear genre override, returning to the normal schedule

POST /api/genre request body:

{
  "genre": "Bass",       // required — parent genre name (see GET /api/genres for options)
  "subgenre": "Dubstep"  // optional — narrows the track pool
}

Queue & Playback Endpoints

[edit | edit source]
Method Endpoint Description
GET /api/queue Show queued tracks and current genre feed status
POST /api/queue Queue a specific track (by track_id or search string)
DELETE /api/queue Clear all queued tracks
POST /api/skip Skip the currently playing track immediately

Search & Status Endpoints

[edit | edit source]
Method Endpoint Description
GET /api/search?q=TEXT&genre=GENRE&limit=N Search the music library by artist, title, or filename
GET /api/now-playing Current track, time remaining, listener count, genre override, and queue depth
GET /api/spec OpenAPI 3.0 spec for this API

Examples

[edit | edit source]
# Switch to Chill mode
curl -X POST http://beyla.local:8081/api/genre \
  -H 'Content-Type: application/json' \
  -d '{"genre": "Chill"}'

# Switch to Bass / Dubstep specifically
curl -X POST http://beyla.local:8081/api/genre \
  -H 'Content-Type: application/json' \
  -d '{"genre": "Bass", "subgenre": "Dubstep"}'

# Return to normal schedule
curl -X DELETE http://beyla.local:8081/api/genre

# Search and queue a track
curl 'http://beyla.local:8081/api/search?q=aphex+twin&limit=5'
curl -X POST http://beyla.local:8081/api/queue \
  -H 'Content-Type: application/json' \
  -d '{"track_id": 42}'

# Skip current track
curl -X POST http://beyla.local:8081/api/skip

Note: Genre names are case-sensitive. Use GET /api/genres to get the exact names. Current genres: Bass, Chill, Electronic, Hip-Hop, Pop/Rock, Blues/Soul, Punk, Dub/Reggae, Metal, Jazz, Classical.

Getting Involved

[edit | edit source]

If you'd like to help run or maintain Beyla, contact @nthmost on the Noisebridge Discord and be prepared to send your SSH public key.

See Also

[edit | edit source]


About the Name

[edit | edit source]

Beyla is named after a figure in Norse mythology — one of Freyr's servants, whose name is etymologically linked to bees and who is associated with bees and mead in modern Germanic tradition. The name felt fitting: the SOAYAN-N6 mini PC has a distinctive hexagonal form factor, echoing the geometry of a honeycomb.