Beyla: Difference between revisions

From Noisebridge
Jump to navigation Jump to search
Refocus on hardware: hexagonal mini PC, location, how to turn on, audio distribution, MC Escher; link to KNOB for radio station info
Add Radio Control API documentation (port 8081, genre/queue/skip/search endpoints)
 
(5 intermediate revisions by the same user not shown)
Line 1: Line 1:
= Beyla =
= Beyla =


'''Beyla''' is the music server that powers [[KNOB]], Noisebridge's 24/7 internet radio station. It's a small hexagonal 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).
'''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).


== Finding and Turning On Beyla ==
== Finding and Turning On Beyla ==
Line 7: Line 7:
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 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.


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.
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 ==
== Physical Audio Distribution ==
Line 34: Line 36:


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.
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 ==
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.
An OpenAPI 3.0 spec is available at <code>/api/spec</code>.
=== Genre Endpoints ===
{| class="wikitable"
! Method !! Endpoint !! Description
|-
| <code>GET</code> || <code>/api/genres</code> || List all genres with track counts and subgenres
|-
| <code>GET</code> || <code>/api/genre</code> || Get current genre override status
|-
| <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.
|-
| <code>DELETE</code> || <code>/api/genre</code> || Clear genre override, returning to the normal schedule
|}
'''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>
=== Queue & Playback Endpoints ===
{| class="wikitable"
! Method !! Endpoint !! Description
|-
| <code>GET</code> || <code>/api/queue</code> || Show queued tracks and current genre feed status
|-
| <code>POST</code> || <code>/api/queue</code> || Queue a specific track (by <code>track_id</code> or <code>search</code> string)
|-
| <code>DELETE</code> || <code>/api/queue</code> || Clear all queued tracks
|-
| <code>POST</code> || <code>/api/skip</code> || Skip the currently playing track immediately
|}
=== Search & Status Endpoints ===
{| class="wikitable"
! Method !! Endpoint !! Description
|-
| <code>GET</code> || <code>/api/search?q=TEXT&genre=GENRE&limit=N</code> || Search the music library by artist, title, or filename
|-
| <code>GET</code> || <code>/api/now-playing</code> || Current track, time remaining, listener count, genre override, and queue depth
|-
| <code>GET</code> || <code>/api/spec</code> || OpenAPI 3.0 spec for this API
|}
=== Examples ===
<pre>
# 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
</pre>
'''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.
== Getting Involved ==
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 ==


* [[KNOB]] -- the radio station Beyla powers
* [[KNOB]] -- the radio station Beyla powers
* [[Beyla/Genre_Statistics]] -- music library genre breakdown
* [[Audio]] -- sound systems around Noisebridge
* [[Audio]] -- sound systems around Noisebridge
* [[Rubber Ducky Guild]] -- MC Escher's people
* [[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]]
[[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.