Javascript and the future of ultrasound communication

Current data transfer technologies include wifi, Bluetooth and NFC, and they’re used by millions of people across the globe. Ultrasound, on the other hand, is not currently mentioned as a competitor in the data transfer space. But should it be? After all, it is possible to transfer data via ultrasound. Data transfer technologies that are currently in use can be grouped together in that they all use radio waves in electromagnetic communication, however ultrasound simply uses sound waves to transfer data.

The advantages of ultrasound

Wifi, Bluetooth and NFC all require some kind of hardware. Take Bluetooth, for example. Users will need some hardware inside a phone to be able to connect to Bluetooth, and even then it doesn’t work every time and not all devices are compatible with one another. Investments in this hardware can also be expensive, in particular when employing it on a larger scale, beyond just two phones / connected devices. In comparison, Ultrasound is relatively simple and only requires microphone speakers. There is no issue with compatibility, and in addition, it’s relatively cheap compared to other technologies.

Areas with potential for ultrasound communication

Whilst ultrasound communication is still relatively new and niche in its development, there remain a number of scenarios where it could be used. Indeed, several companies are investing in it as a future competitor to existing data transfer technologies.

One principle area that’s being investigated is espionage, given that ultrasound is a basically invisible form of communication. Researchers have found a way of tracking movement in another apartment via ultrasound (using a mobile phone speaker), without physically being able to see the person who is being tracked.

A more conventional area of focus for researchers is banking, an area which presents the largest profit opportunities. There are suggestions that ultrasound could compete with NFC and other technologies already established in the banking sector. However, it might be difficult for ultrasound to become a viable alternative to NFC given how well established it is.

In addition, ultrasound has a long history in medicine, and people within this industry are now looking at different ways to use it to transfer data. For example, the University of Illinois carried out some research and found a way to transmit data through human tissue.

Marketing is another area for researchers to explore the potential of ultrasound communication. There is currently ongoing research into receiving ads from the TV directly onto your phone via ultrasound. Indeed, a startup called CopSonic has embraced ultrasound for marketing communications. They use ultrasound to transfer data between televisions and mobile phones, without the need for additional hardware.

Finally, another option is Javascript. Currently, one of the best ways to try ultrasound with Javascript is Ultrasound chat. This works by splitting frequency into ranges and mapping those ranges to alphabet characters. That way any character can be mapped. The chat is fairly simple at present, so the data that is transferred is not very large.

How could we use ultrasound and Web Audio API?

In general, successfully using ultrasound ultimately relies on understanding ultrasound and soundwaves more comprehensively. That is, that sound wave properties refer to three things - frequency (pitch), amplitude (loudness), and complexity (quality).

Web Audio API is a high-level Javascript API for processing and synthesizing audio. The way that the API works is that there are nodes which are interconnected to form an audio routing. Browser support for the API is currently pretty extensive. There are support and tools available within Firefox, whilst a plugin can be downloaded for Google Chrome. One thing to bear in mind, however, is that there’s a difference between how ultrasound can be used with different devices. Though there are no issues with speakers, which are designed with a maximum frequency of 22KHz, microphones are primarily designed for human speech, and so may be less effective at picking up ultrasound.

When working with Web Audio API, it is first important to create the context that you’re going to work with, within the API. Then you’ll have different nodes which are connected: the source is a node, and the destination is also a node. These nodes could take the form of either a microphone or some speakers, but they must be connected. Once this is set up, you’ll have the capacity to create your own music using the API.

Conclusion: Javascript one of many future possibilities for ultrasound

Web Audio API highlights how Javascript could be the perfect testing ground for ultrasound. As long as the nodes are properly connected, it is fairly straightforward to transfer data and produce sounds. Despite this, challenges arise due to ultrasound competing with more established data transfer technologies such as wifi, Bluetooth and NFC. This is particularly relevant in sectors such as banking, where it might be difficult to dislodge NFC. However, there are some evident advantages that ultrasound has to offer over other data transfer technologies: not only is it less expensive, but it’s also less reliant on additional hardware.

Every day, we carry around mobile devices with the capacity to track sounds. This means that, in several years time, Javascript experiments with ultrasound communication may well be viewed as the beginning of a new era in communication.