DEV Community 👩‍💻👨‍💻


Posted on

Make some noise for net-neutrality - Transfer data over Spotify

Under current net-neutrality laws in the Netherlands, telecom providers are allowed to zero-rate music, which means streaming music does not count towards customers' data plans. Although there is much discussion about whether this violation of net-neutrality is desirable, there is a second question: is it possible to zero-rate music?
By streaming a website, a calculator, and a 3D game over Spotify (using this app), and by looking at the nature of both music and the process of transferring data, we can try to find an answer to this question.


In 2017, the Dutch court ruled that, under the current European rules regarding net-neutrality, telecom providers are allowed to implement zero-rating for music services. This means that Dutch telecom providers can continue to offer services in which Internet traffic from music streaming services does not count against customer data-plans, thereby violating net neutrality.

At first glance, this might seem like it would be good for consumers. Who doesn’t like free stuff? In reality, abolishing net neutrality by letting providers prioritize Internet traffic based on its type or source, could lead us down a slippery slope towards tiered services, formation of cartels, and even censorship. Advocates for net neutrality warn of a future where you have to pay additional fees to your provider for seperate game-, video- , or music packages. They warn of unfair competition, where the Spotify’s and Netflixes of the world pay providers for prioritized traffic, thereby making it difficult for new and smaller services to compete. And, they warn of a future where providers can block access to websites which promote views which they themselves do not agree with, or are harmful to their shareholders.

The Dutch court interprets the European law as follows: as long as the offer of zero-rating is extended to all music-streaming services, the consumer’s choice is not limited, and zero-rating is allowed. In reality, this provider only offers zero-rating for a small number of streaming services. Before a music streaming service is included in the offer, they need to sign an agreement with the provider. The provider imposes a number of conditions on streaming services that want to be included in this list, which results in some streaming services not being included due to “technical reasons”. If a streaming service does not respond to the provider's offer, or refuses to sign an agreement with the provider, they are also excluded from the offer. Whatever the reason may be for a service to end up on the “excluded” list, the consumer's choice is still limited by these practices.

This decision of the Dutch court allows providers to abolish net-neutrality by giving special treatment to data of a specific type, based on conditions specified by the provider. Although much of the debate around this decision, and net-neutrality in general, has been focussed on whether this is desirable, there is also a second question that can be asked: is it possible? It requires the provider, in its role as gatekeeper, to answer two difficult questions: 1) What is music?, and 2) Is this music?

What is music?

In order to zero-rate music, one has to know what music is. A definition is required, based on which something can be zero-rated. However, Internet providers are not the first ones to pose this question. Many people have tried to answer this question, but there is as of yet no generally accepted answer, and there is an ongoing debate.

Many definitions of music include the terms “organized sound”. This answer creates new questions, such as “When is sound organized?”. It seems to imply the existence of intention, some organizer who organized these sounds. This would exclude sounds like the wind blowing through some trees, or the babbling of a brook, which some people might still experience as being musical.

An interesting example, which lives on the edge of many definitions of music, is the work 4’33 by American composer John Cage. In this piece the performers are instructed not to make any sounds, but are to perform three movements. As the performers are silent, the audience is able to listen to the sounds of their environments.

A definition of music which possibly includes these examples is the definition from Italian composer Luciano Berio, which says “Music is everything that one listens to with the intention of listening to music”. This definition lacks some organizer, or some kind of intent from a creator, and leaves the classification solely to the listener. This would mean that there is no objective way to classify sound as music. Something that’s music to you, might not be music to me. Anyone can classify anything as music.

We end up with a rather vague definition. It seems sound has something to do with it, both the inclusion and exclusion of it. Other than that, it seems subjective to the listener, and it seems difficult to do this classification for someone else. Who is to tell me this white noise is not music, if I enjoy listening to it?

Is this music?

If a provider has answered the question “What is music?”, it can try to answer the question “Is this music?”. Wielding their definition of music, they can try to classify the ones and zeroes streaming through their wires. To find out how this classification can be done, we need to take a look at the nature of transferring information.

One of the oldest ways of transferring data is via speech and language. An idea, thought, feeling, or notion about the world around us can be encoded into words and sentences, transferred via speech, and decoded again by the receiver. However, this does require an agreement between sender and receiver. Before they start transferring data, they have to agree on which encoding to use for their interaction. In this example, this encoding can be any language they both know, such as English or Dutch. However, if this agreement on encoding has not been made clear, problems can arise.

In Fig.1, an example can be found of problems that arise when the sender and receiver do not use the same encoding for their messages. Yvonne has a beautiful pet duck, which they are showing to their friend Xander. Xander absolutely adores ducks. Xander and Yvonne both speak Dutch, but only ever converse in English. Yvonne has asked their friend Xander “Are you a big fan of ducks? Would you like to pet him?”. Xander, dazed by the cuteness of the duck, forgets their usual way of talking, and replies in crude Dutch “Aai eend!”, which translates to English as “Pet duck!”, with which Xander means to say that he is a big fan of ducks, and would very much like to pet this duck. Unfortunately, Yvonne expects an English response, and “Aai eend!” sounds very much like “I ain’t”. Yvonne interprets this as Xander not being a big fan of ducks, and Xander not wanting to pet it. Yvonne picks up their pet duck, and walks away from the conversation feeling offended, contemplating the moral character of their friend, while Xander remains with tear filled eyes and a broken heart, and the duck remains unpetted.

Fig.1 - Xander answers “Are you a big fan of ducks? Would you like to pet him?”

This example shows that the content of the transferred data relies on the way it is interpreted. The words themselves mean nothing, and are only given meaning by the intention of the sender or the interpretation of the receiver. If Xander had answered in Klingon (Hab SoSlI’ Quch!), these would have been meaningless sounds to Yvonne. Furthermore, the example shows that the same piece of data can be interpreted in multiple ways, in this case as a positive or a negative answer.

Non-music is music?

Streaming music over Spotify can be viewed similar to the exchange between Xander and Yvonne, as can be seen in Fig.2. What is being transferred between sender and receiver is music, encoded into ones and zeroes. This all goes well because your Spotify app knows how to interpret the data sent by the Spotify server. However, without this interpretation, these ones and zeroes can mean anything. These are not some kind of special “music bits”, but just regular ones and zeroes. While they are intended as music, one might interpret them differently. They can be decoded into music, but also into an image or a text.

Fig.2 - Streaming music over Spotify.

Because the same piece of data can be interpreted in different ways, this raises an interesting question: Can we somehow disguise some non-music as music, and transfer it via Spotify? Would it be possible to easily transfer arbitrary data over Spotify, by just labeling a piece of data as music, uploading it to Spotify, and then stream and decode it? Unfortunately, this doesn’t work, as Spotify uses its own compression algorithms on the piece of data we uploaded, thereby not leaving our string of ones and zeroes intact. The goal of this compression algorithm is to change the data, but still letting the receiver interpret the data as intended by the uploader. It reduces the size of the data, but tries to maintain the integrity of the sounds the data represents.

The fact that the sounds a user streams from Spotify are almost identical to the sounds uploaded by the artist, provides an opportunity for transferring arbitrary data over Spotify. We can add a layer around Spotify’s data transfer process, thereby incorporating Spotify’s processes into the encoding of the data, as can be seen in Fig.3. A new sender and receiver appear at the head and tail end of the process. They can hijack the existing process, by adding a step to their encoding/decoding algorithm in which they turn their data into music, and turn the music back into data. This makes it possible to transfer arbitrary data over Spotify.

Fig.3 - Transferring arbitrary data over Spotify.

To demonstrate this, I have created an example app, which takes sound on Spotify, and interprets it as HTML. By first encoding HTML into sound, and publishing this on Spotify, thereafter decoding it into HTML, we can transfer text, web pages, and web applications over Spotify.

The app, which decodes the sound into data, is built around the Quiet library ( The JavaScript version of this library is used for encoding data to sound. This library works in a very similar way as old broadband modems. Such a modem converts (modulates) a digital signal into analog audio, and converts (demodulates) an analog signal into digital data. This way, computers were able to communicate over telephone lines using hisses and crackles.

Using the technology of ancient modems, we are able to transfer a famous poem, a wikipedia article, a working calculator, and a 3D game over Spotify. You can try it yourself, by downloading the app, and, with the app open, play one of the songs from this album. The easiest way to do this is to start playing the song in the Spotify app, immediately pause it, switch to the SoundToData app, and resume playing the song from your notifications. It works best in a quiet environment, and you might have to experiment a bit with the playback volume to get your phone’s microphone to pick up the sound from your phone’s speaker. When it works, you should see HTML appear on your screen, piece by piece. When the song is over, you can click on the three dots, and switch to HTML, to view the HTML rendered as a web page. Screenshots can be found in Fig.4.

Fig.4 - Screenshots of streaming a calculator via Spotify.

Although this is a very slow and impractical way of transferring data, it shows how difficult it is to give special treatment to data of a specific type. Even if the ones and zeroes are at first interpreted as sound, this sound can be interpreted as something else.

A more efficient way to transfer data as music, would be to set up a new service which serves any type of content, and just tell the users they should interpret the data as music, thereby skipping the step of encoding the data into sound. Any type of digital data that’s transferred can be broken down into a string of ones and zeroes. We can think of a simple algorithm which can turn any data string into music, by interpreting each zero as a C note, and each one as a D note. If we follow this thought, a news website like could claim their website is a music streaming service. “Oh, you interpret the data we provide as news articles? You were actually supposed to interpret it as an experimental type of music.”


In conclusion, the current reading of the European laws regarding net neutrality allow providers to discriminate data based on its type, which, in the example case, is music. Because the data’s type is purely based on both the intention of the sender and the interpretation of the receiver, who can disagree, the provider, as man in the middle, has no way to accurately classify this data. Because of the vague definition of music, and the fact any data can be interpreted as sound, there can exist ambiguity between the sender, receiver, and provider. In short, music can be anything, and anything can be music. Therefore, zero-rating music, means zero-rating all Internet traffic.

The SoundToData app is built around the Quiet Modem Project. The JS version is used to convert the data to sound.
The 3D game which can be streamed over Spotify is HueJumper by KilledByAPixel.
The calculator which can be streamed over Spotify is based on this calculator by zxcodes.
The poem which can be streamed over Spotify is The Raven by Edgar Allen Poe.
The webpage which can be streamed over Spotify is the Wikipedia page on music.

Top comments (0)

🌚 Life is too short to browse without dark mode