Try Live Demo

WebRTC technology is often associated with video calls, live streams, or conference apps, but it can be used for so much more.

It’s a real-time communication tool that can be used for things like playing online games, co-watching videos, and even playing music together.

Thanks to Ant Media Server’s ultra-low latency streaming solution, we can live in a world that feels even more connected.

Let’s talk about playing instruments together in real-time and the DuetMaster application.

What is Duet Master?

DuetMaster is an online space where you can play the piano with other people. You can create duets with your friends and other DuetMaster users.

With its support for the MIDI protocol, you can simply plug in your digital keyboard and start learning to play the piano – no complicated configurations required.

How does it works?

DuetMaster uses several libraries under the hood.  With the help of these library’s, DuetMaster users can play the piano using the virtual keyboard or plug in instruments that support the MIDI Protocol.

To track keystrokes, DuetMaster uses Ant Media Server’s WebRTC Data Channel for real-time communication.

Tone.js

Tone.js is a synthesizer and DuetMaster uses it to generate audio signals.

Web MIDI API

The Web MIDI API is used to connect and interact with the Musical Instrument Digital Interface Devices (MIDI). 

MIDI Message Translator

DuetMaster uses the midi-translator package to translate midi signals into notes.

Installing DuetMaster on Ant Media Server

Step 1 Download the application

To install DuetMaster on your Ant Media Server, you need to Download the application war file from here.

Step 2. Login to your AMS Dashboard

Navigate to your Ant Media Server installation and login to the dashboard

Step 3. Upload the DuetMaster application

On the Dashboard page, click the New Application button then click the Choose File button and browse to the downloaded war file you fetched earlier.  Enter a name for your application (let’s write DuetMaster) and click the Create button.

Step 4. Start using DuetMaster

Once the war file has been uploaded successfully, the application is installed and ready to be used straight away. 

How to use DuetMaster Application?

Step 1. Open the DuetMaster Application page

Navigate to the the application page using the room name parameter:

https://AMS_URL:5443/DuetMaster?room=room1

Step 2. Connect any instruments

Now is the time to connect any MIDI supported instruments. Once connected, DuetMaster automatically detects and connects your instruments.

Step 3. Start making music

After the second person joins the same room, you can start a peer-to-peer video call while playing the piano together.

duetmaster app

Mustafa Boleken

Mustafa is a Software Developer at Ant Media. His passion is developing apps that make life easier. Mustafa is proficient in Java, Angular, AWS and Linux. His technical stack includes WebRTC, Typescript, Python, Kubernetes, Docker, SQL, NoSQL, MongoDB, MapDB, Grafana, Swagger, Open API, AWS S3, AWS Autoscaling, AWS Load Balancing, FFmpeg, HLS, RTMP, Node.js, JSON, Git/Github, Tomcat, Nginx, HAProxy, Firebase Cloud Functions, Test Automation, STUN/TURN Server, Bash scripts, and Active Campaign/Freshdesk integrations, HTML, CSS, JavaScript, JWT.

chatsimple