Web-SDR implementation - possible?

Web-SDR stream and control (JS/HTML5: Websocket, Web Audio API, Node)

Question mark

After stumbling across an .m3u player by… Bidoo I think? I wondered if an implementation of a Web-SDR would be doable in Rack. Streaming this or that…COULD prove same same. Regrettably I am a novice at coding. This is both: a question for general doability and an open call if there is anyone who would participate in making this happen. I would offer to do most conceptual work, research, communication, design, managing the repository and any other odd-jobs.

The mother-ship of WWW-SDRs for reference: http://websdr.ewi.utwente.nl:8901/

Native Functions to call upon:

Their GUI is tailor-made for external control, sequencing, presets and could even be re-sorted into Modes (like Plaits/Braids). The latter based on existing Frequency, Filter & Band databases that categorize Channel types.

Since the GUI already implements a variety of triggerable sized steps, direct frequency inputs, commands for band switches, filter size, noise reduction, autonotch (red noise reduction to filter interferences) and squelch (mute static when no signal is received at current frequency)… it’d be fairly easy to control it with triggers and CV.

It measures and outputs if and when connected to a Signal/Channel and how strong the connection is. This’d allow for setting thresholds:

A) classic “search for next signal” implementation [ yet stopping at weaker signals which are the best source of experimental sound design]
B) combined with the channel database (some channels aren’t available at the SDRs location, some fade in and out over the day) make a reliable channel switcher.

What needs to be done though is:

  • establish a connection with a web-server while VCV is running

  • exchange Data constantly at around 130kBps

  • implement the Web Audio API to run with Racks SDK and route the decoded audio into the module.

  • and compromise in terms of modulation options - limiting the update rates for incoming modulation to roughly fit latency with the server. Smooth inputs would become stepped by design with higher rates translating to greater skips.
    The developer of Web-SDR API doesn’t want third party software implementations. However: he has no legal grounds for prosecuting any implementation or reverse engineerings of his source. He could try and block access to his site and even update the API to attempt a block for every site using his code. - There are others, but most of them don’t seem to feature the vast signal range and functional precision as his community. I only skinny-dipped into researching options so far… and am certain there is a viable source out there.

From the Artists viewpoint

For about 100 years now, Radiowave receivers have provided musicians with a never-ending stream of momentary sounds, fanned out to what is the cheapest, most accessible and colorful audio library there is. its being, its workings, its history as much poetic, as its practical uses are grand. war, trade, religion were the only things ‘global’. until radiowaves indifferently breached borders, class, so called race and wealth. Signals from everywhere towards everywhere with all kinds of reasons and by people and machines and landlines and lampposts. 300 Timezones in one country alone weren’t unusual (each at whim of a priest) - then unified at the sound of one clock. Submerged bells ring to signal frequency markers. Some guy talking about something. U-boats weave their positions into obscuring interference, airports list arrivals and departures. Chinese, Romanian and Senegalese voices emerge from long Storms. A french chanson for Algier. Tidal oscillations. Someone screams ceaselessly at the crossing to a commercial channel, disrupting their adverts. There is at least one sign of life from every country on the earth at all times. There is everything but silence. For musical purposes its uses are evident: global scale voice and music samples, source for any kind of percussion into the drone spectrum, all kinds of noise with all kinds of density, saturation etc., for any sort of ambience backdrop, for odd melodies and odd note sequences, for all industrial style screetches and hits, all glitchy bleeps blobs burps klicks… as trigger and modulation source, as organic clock signal or irrational gate, for any needs in terms of randomness, unlikely filter sweeps and noiseouts and the rare sounds incorporating both organic and electronic character.

What is a Web-SDR? How’s it working?

The first Web-SDR was developed at the University of Twente in Enschede. Its code is the foundation for many other SDR Stations. (Ref.: the aforementioned URL)

A Software Defined Radio is an ADC/DAC based hardware sender/receiver with an Antenna. Unlike its analog counterparts, any Sound Processing, Decoding/Interpreting, Sampling and Controls are handled via DSP. Either/both on-board and/or via Software. Web-SDRs utilize HTML5 Web-Sockets and JS Web Audio & Nodes to open SDR content for parallel interactive use. By encoding the Audio into data chunks.and assigning generative IDs to its visitors and converting the current interface state into Queries… specific Instructions are sent to the server and it responds after building the corresponding package. i.e.: GET /~~telem?sdr=7118.37&play=48000.11&resync=0&tl=3,8,8,16,8,12,10,8,13,7,21,13,19,16,14,9,27,41,25,16,17,16,14,13,7,13,22,23,10,10&s=&t=0.125%3Cbr%3E will be requested automatically via script and sent along with a cookie storing menu settings and unique ID to the server. The server then builds a packet consisting of Encoded Audio corresponding to the Request. This packet is sent to “Speaker” (Destination command of the Web Audio API) - then the Browser decodes the Data to Audio and routes it to the Audio out.

Web Audio API (request & response):

{requestId: "28300.2861", timestamp: 31836.793271, response: {opcode: 2, mask: false,…}}
 response: {opcode: 2, mask: false,…} "XAAUCCETq0y+kXEgFk/7ABKUAXKULgFQtgYBCYgmVQl1BBcFCQgliRQviAE9BQVZFQVCApKAlooACAkkBQCBAFheCICAAJgAAUBfoABJCYFASAEwAQC5QFgFq+AAAWygE4AgAAAFBACAL4AAARAAgAAC4ACAiWBcBOAACQX4C9CUAIAQAAFr8AWAEXgABIAL/BYAoAAAKAWgFAJgRZeigAAUCX5aIq4STCScLfASi0AUAA=="

To communicate with the SDRs API properly one would need to reverse calculate the conversion applied to the Request. Namely the variables for sdr, play, resync, tl, s and t. Its all there in the code… for those who can follow it.

Wishful thinking in guise of closing remarks

After prototyping and testing the concept… go independent and set a precedent. There is much open source software to process and stream an own SDR + a variety of hardware solutions with affordable prices. Here one could also add decryption for air-, military-, police/firefighter-, naval communications. Further decode digital radio and oddities like Company broadcasts (like Wall-Mart… depending on SDR location). A modest funding campaign and a communal partnership for hosting and housing the project would have to be organised. Anyone eager to do the diving into the offered software solutions and writing the code for send/receive VCV <-> Websocket? I am confident in terms of raising money and project proposals for the hosting and housing. Its been a while but got a good number of various projects under my belt. (Politics, Techno, Art, Cinema, Music Industry, Fotobook releases etcetc)
You see… I would really love to see a gateway for Radio into contemporary music production. Low-estimate: several hundred people will hear about this for the first time and actively use it, that’d elsewise never know the frequency spectrum exists. an equal amount of people who think of it as 20 channel village discovering its vast range and use.

5 Likes

I had already a contact with fantastic people of WebSDR in 2017 (for a VCV rack module)


I guess you want to directly access an audio stream from a WebSDR server,
without using a web browser?
That's not possible. I do not provide an open API for that.
One reason is that if I would do that, it could easily lead to a large and
uncontrollable load on my server. Therefore, I keep the system web-only.
Of course, your welcome to use e.g. a virtual audio cable to stream audio
from the web browser to your software.

Regards,
 WebSDR```
3 Likes

Hi @JohannAsbjoernson Just for some history, a peculiar SDR module was developed (though it’s based on hardware dongles), here the repo:

The module was ported to Rack v1 API (branch master), but one has to build it from source. My build goes succesfully, but when trying to load it in Rack (I have a working RTL-SDR USB dongle), a segfault cause Rack to crash (possibly due to some thread-related issue).

You can also look at this discussion for more info: Get Radio VST for free (and Neutron Elements)