Skip to main content

Tag: WebMIDI

A geometric, stylized letter T in varying shades of blue, composed of triangles and parallelograms, centered on a light gray circular background with a thin white border.

Telemidi – Creating music over The Internet in real-time

What is Telemidi?

A system of connecting two DAW environments over the internet, to achieve real-time musical `jamming’.
The product of Masters research by Matt Bray.


“…a musician’s behaviour at one location will be occurring at the other location in a near synchronous manner, and vice versa, thus allowing for a `jam’ like atmosphere to be mutually shared.”

Matt Bray (Telemidi creator)

Telemidi is an approach to Networked Music Performance (NMP) that enables musicians to co-create music in real-time by simultaneously exchanging MIDI data over The Internet.  Computer networking brings with it the factor of latency (a delay of data transfer), the prevalent obstacle within NMP‘s, especially when attempting to match the interaction of traditional performance ensembles.  Telemidi accommodates for latency via the use of numerous Latency Accepting Solutions (LAS – identified below) embedded within two linked DAW environments, to equip performers with the ability to interact in a dynamic, interactive and ongoing musical process (jamming).  This is achieved in part by employing RTP (Real Time Protocol) MIDI data transfer systems to deliver performance and control information over The Internet from one IP address to another in a direct P2P (peer to peer) fashion.  Once arriving at a given IP address, MIDI data is then routed into the complex DAW environment to control any number of devices, surfaces, commands and performance mechanisms.  Essentially, a musician’s behaviour at one location will be occurring at the other location in a near synchronous manner, and vice versa, thus allowing for a `jam’ like atmosphere to be mutually shared.  As seen in the video listed below, this infrastructure can be applied to generate all manner of musical actions and genres, whereby participants readily build and exchange musical ideas to support improvising and composing (`Comprovising’).  Telemidi is a true Telematic performance system. 


What is Telematic Performance?

Telematic music performance is a branch of Network Music Performance (NMP) and is a rapidly evolving, exciting field that brings multiple musicians and technologies into the same virtual space. Telematic Performance is the transfer of data and performance information over significant distances, achieved by the explicit use of technology. The more effective the transfer the greater the sense of Telepresence, the ability of a performer to “be” in the space of another performer.  Telematic performances first appeared when Wide Area Networking (WAN) options presented themselves for networked music ensembles via technologies such ISDN telephony, and options increased alongside the explosion of computer processing and networking developments that gave rise to The Internet.  Unfortunately in this global WAN environment, latency has stubbornly remained as a constant and seemingly unavoidable obstruction to real-time ensemble performance.

Telematic performance has been thoroughly explored by countless academic, commercial and hobby entities over the last four decades with limited successes. The musical performances have taken many forms throughout the exponential development of computing technologies, yet have been more-or-less restricted by latency at every turn.  For example, there is the inherent latency of a CPU within any given DAW, the additional processing loads of soft/hardware devices, the size and number of data packages generated in a performance, and the delivery of this data over The Internet which in turn presents issues regarding available bandwidth, data queuing, WiFi strength etc.. This is but one side of the engagement as we also have the DAW requirements of the reciprocating location, and of course the need for synchronous interplay between the two. Real-time NMPs suffer at the whim of network jitter, data delays and DAW operations.


How Telemidi Works

Telemidi works by exchanging MIDI data in a duplex fashion between the IP addresses of two performers, each of whom are running near-identical soft/hardware DAW environments.  A dovetailed MIDI channel allocation caters for their respective actions while avoiding feedback loops, in a system with the potential to deliver performance information to and from each location in near real-time (10-30ms).

To achieve this musical performance over The Internet, the Telemidi process employed:

1 – Hardware – a combination of control devices

2 – Softwaretwo near-identical Ableton Live sets

3Latency Accepting Solutions (LAS) – ten examples

4 – RTP MIDI facilitating the delivery of MIDI data to a WAN.  

Click on the tabs below for a summary of items used at each node location during the research stage of the Telemidi research (for more information and to download the Masters thesis go to www.telemidi.org): 

 Below is a list of hardware used at each location in the Telemidi research:

Lap-top Computers:  + Mac and Windows computers used, demonstrating Telemidi accessibility.


Novation SL Mk II

Novation SL Mk II MIDI controller keyboard


+ High capacity for customised MIDI routing (both control and performance data)

+ Traditional musical interface (keyboard)


Novation LaunchPad Pro

Novation LaunchPad Pro


+ Native integration with Ableton Live

+ Contemporary `Grid-based’ composition process 

 Software

 LAS

Ableton Live 

Near-identical Live sets (duplex architecture)
7 pre-composed songs (each split into four sections, A, B, C & D)
54 additional percussion loop patterns
12 x Synth Instruments (Native and 3rdparty)
Synths: 4 each of Bass/Harmony/Lead
16 DSP effects processers (with 2 or more mapped parameters)
286 interleaved MIDI mappings within each Live set
13 of 16 MIDI Channels used for shared performance and control data
Tempo variation control
Volume & start/stop control for each voice (Bass, Harmony & Melody)
Record and Loop capacity for each voice (Bass, Harmony & Melody)

LATENCY ACCEPTING SOLUTIONS (LAS):

The following processes adapt to and overcoming (cumulatively) the obstacle of latency.  They are ranked in order of efficiency from 1 (most efficient) to 10 (least efficient).

LATENCY ACCEPTING SOLUTION JUSTIFICATION
1 – One Bar Quantisation All pre-composed, percussive and recorded loops are set to trigger upon a one bar quantization routine, allowing time (2000ms @ 120bpm) to accommodate for network latency between song structure changes (most commonly occurring on a 4 to 8 bar basis).
2 – P2P (Peer ) Network Connection: Direct delivery of MIDI data from one IP address to the other. A simple direct delivery. No third party `browser-based’ servers used to calibrate message timing.
3 – Master Slave Relationship:  One node (Alpha) was allocated the role of Master and the other (Beta) the role of slave, allowing for consistent, shared tempo and a self-correcting tempo alignment following any network interference.
4 – Pulse-based music (EDM) as chosen genre for performance:

A genre without reliance on a strict scored format, rather a simple and repetitive pulse.
5 – Floating Progression (manner of Comprovising ideas) Each performer initiates an idea or motif, the other responds accordingly and vice-versa (jamming), any artefacts of latency only play into this process.
6 – 16thNote Record Quantize

Inbuilt Ableton function ensuring any recorded notes quantized to the grid.
7 – MIDI Quantize

3rdparty Max4Live device (16th note) puts incoming WAN MIDI onto the grid of the receiving DAW.
8 – Manual Incremental Tempo Decrease In the event of critical latency interference, tempo can be reduced incrementally, thus extending the time between each new bar and granting time for the clearance of latency issues.
9 – Kick drum (bar length loops) During a period of critical latency interference, a single bar loop of ¼ note kick drum events is triggered to maintain the “genre”.
10 – Stop Buttons During any period of critical latency interference, each voice (beats, percussion, bass, harmony or melody) can be stopped individually to reduce the musical texture, or to stop harmonic dissonance and stuck notes.

RTP MIDI

+ MacOS – AppleMIDI accessed through `Audio MIDI Setup’

+ Windows – rtpMIDI software used (created by Tobias Erichsen)

Success of Performance

Two performances were undertaken in the Telemidi research, the first with each performer 7.5km (4.6 mi) apart, and the second 2,730km (1,696 mi) apart.  Both were recorded and then analysed in detail (see video below), whereby aspects of performance parameters and methods were identified alongside several fundamental principles of Telematic performance.  A stream of audio is generated from each node and each has been analysed in the video to identify the interplay between the two musicians, highlighting any variations in the music created and to recognize artefacts of network performance.  It was noted that the music generated at each node was strikingly similar, although subtle variations in the rhythmic phrasing of bass, harmony and melody were common.

The Telemidi system ably accommodates all but the most obtrusive latency yet provides each musician with the capacity to co-create and Comprovise music in real-time across significant geographic distances.  These performances showed constant interplay and the exchange of musical ideas, as can be seen in the 16 minute analysis video below, leaving the door open for many exciting possibilities in the future.


16min Video Analysis


Future Plans

The principles of Telemidi were the focus of Matt Bray in his 2017 Masters research.  Now the Telemidi process has been proven to function, the landscape is open to allow for musicians to create and interact with each other in real-time scenarios regardless of their geographic locations.

The next steps are to:

+ Recruit keen MIDI-philes from around the globe to share and exchange knowledge in regards to the potentials of the Telemidi process (if this is you, please visit www.telemidi.org and leave a message)

+ Identify the most stable, low latency connections to The Internet available, to begin test performances across greater geographic regions

+ Refine and curate the infrastructure to suit various genres (from EDM to contemporary, also including live vocalists/musicians at each location)

+ Produce and promote simultaneous live performance events in capital cities, first nationally (Australia) and then internationally.

If you are at all interested in contributing to, or participating in the Telemidi process, please contact me, Matt Bray at www.telemidi.org, I’d love to hear from you and see what possibilities are achievable. 

Thanks for checking out Telemidi!!

Matt Bray


Close-up of a persons hands holding drumsticks, wearing multiple leather, beaded, and metal bracelets on their wrists. The background is blurred, with part of a drum set visible.

A Web Developer’s Tale of the Octapad Revival

Two months ago, I was tasked with presenting a talk on the Web MIDI API to an amazing crowd of music-loving web developers. Obviously, I wanted the presentation to be exciting, so my first idea was to find a cool MIDI controller that I could use to demo the API with. What kind of controller could fit the bill? What about an old… keytar? Yes, that would be awesome! Nobody’s using those anymore so they will be dirt cheap, right? So I hit eBay and here’s what I found…

Screenshot of an eBay listing for a used Yamaha KX-5 keytar with a hard case. The main image shows the black and white keytar, with its case open. Price and shipping details are visible on the right.

An original Yamaha KX-5 carefully laid out on purple velvet. It couldn’t get any more perfect than that, could it? But wait, are they really asking 350$ for it? Plus 130$ for shipping! That’s 500$ US dollars… which means about 630$ in Canadian dollars! Whoaaa, there is no way I’m spending that kind of money on a 45-minute presentation.

What then? Hmmmm.

This is when I remembered the era before I became a web developer when drumming was my whole life. More importantly, I remembered that I already had a cool MIDI controller in my possession: my good old Roland Octapad II. The Octapad is an eight pad percussion controller made by Roland starting in the 80s. How about using that for the demo? That would be cool. But where on Earth did I put this thing? After a few hours of searching, I finally found it hidden in the garage. I plugged it in and it powered up. Oh yeah! I started playing it and then I realized that time had taken its toll. No matter how hard I stroked the pads, the hits barely registered. Damn, this thing is busted. Should I be surprised? After all, this device is at least 25 years old and has been sitting in a damp garage for over 10 years.

But still, it would be so cool to use it for the conference demo. So I started digging around on the Internet to see if this thing could be revived somehow. After an hour or so of reading outdated forum posts and barely-related blog articles, I stumbled upon a post from this guy who said the problem is easy to fix. The piezos are dead he said. Just get new ones and you will be good to go. What have I got to lose, right?

A bit of Googling tells me that piezos are simple vibration-sensitive sensors, precisely the kind you would expect in a percussion controller. Because I had no idea what kind or size of piezos I should buy, I decided to open the unit up. Surprisingly, this was very simple. All it took was a Phillips screwdriver and I was in.

An open arcade controller reveals its internal components, including circuit boards, wiring, and eight round button mechanisms arranged in two rows.

I soon realized that it was a good idea to first check inside. Being an 8-pad controller, I was expecting to buy 8 piezos. However, as you can see on the picture above, 10 piezos are needed. I’m guessing the extra 2 are used to counter any crossover that could happen between the pads through the casing. Furthermore, opening it allowed me to measure the size of the piezos. In the end, I ordered twelve 35mm piezos from Digikey. I bought an extra 2 to be on the safe side.

While getting inside the unit wasn’t hard, getting to the piezos was a little bit harder. As you can see, two of the piezos are hidden under a board which needs to be removed in order to gain access to them. As a matter of fact, the whole unit pretty much needs to be dismantled to be able to extract the old piezos and put in the new ones. If you are attempting this operation, I urge you to do as I did and take pictures all the way through the operation. This way you will know which screws (there are various types and lengths), connectors and daughterboards go where. I’m soooo glad I did!

A 16-step photo collage shows the process of disassembling an electronic device, including unscrewing, removing the back cover, exposing the circuit board, and revealing internal components and wiring in each step.

The dismantling operation wasn’t hard but I was extra careful in the way I handled all the various pieces. I didn’t want to lose anything or forget where something was going. Then, at one point, I realized that the only way to go further was to actually desolder the piezos from the central board strip (a.k.a. Pad-8 Sensor Board). This was the point of no return. As you can see in the picture below, in order to remove the sensor board and get to the pads, you must desolder the piezos, there’s no way around it. So I did. 

Note that all the white wires are connected to the board’s center strip while the black wires have their own strip leading to separate cables on the left side. This makes sense: one common ground for all and separate signal wires for each pads.

Close-up of an electronic circuit board with green traces, wires, and connectors, surrounded by four circular components with visible wiring, mounted on a gray surface.

Once the sensor board is removed, you can unglue the piezos from the pads. This can be quite scary. Especially when all you are left with is a pile of dead piezos and the conviction that you are never going to be able to put all this back together…

A split image: on the left, several round electronic components with wires lay on a textured surface; on the right, a man stands next to a workbench covered with tools and small electronic parts.

As you can see above, the piezos are affixed to the pads using some sort of double-sided tape. I had no idea which kind of tape was appropriate so I bought Scotch-Brand 3M 1″ Permanent Mounting Squares (cat. 111C). If you use them, you will want to trim the corners of the squares so they fit snuggly inside the center circle of the piezo. The idea is for the outer ring to vibrate freely.

Obviously, you also need to solder the new piezos to the sensor board. The piezos I bought came with short and flimsy wires which I did not trust. So I opted to use sturdier wiring. I had some speaker wires on hand so I used that. Just be sure to make the right connections. The inside ring of all piezos should be connected to the shared central strip on the sensor board while the outer rings of each piezos should be connected to their own individual strip. In the end, my soldering job was a bit messy but I made sure the connections were solid and not touching other conductive strips (this is very important!).

I then put the Octapad back together, plugged it in and crossed my fingers… Guess what? It worked. In fact, it might now be working better than ever before. Nice.

A person smiles and gives a thumbs up while posing with a Roland OCTAPAD II electronic percussion pad.

Obviously, I used it during my talk and I had a blast. Attendees also had a great time witnessing how a 25 y/o piece of hardware (brought to this world before the Internet was even invented) could trigger sounds and visuals inside a web page running in Google Chrome.

The moral of the story, I guess, is that well-designed and proven technologies can, and often do, withstand the test of time. They might need a little love along the way but don’t we all?

If you are musician paying the bills doing web development work, I urge you to dust off your old MIDI devices and hook them up to your browser. You will be amazed at what can be done with the Web MIDI API. If you are curious to know how this is possible, check out the library I created that makes it very easy to use the Web MIDI API. You can also take a look at the slides from my presentation.