Musicity × Fora Soft

Virtual music classroom with server-side recording

Published: Nov 24, 2026
Musicity virtual classroom on a laptop: guitar lesson with camera tiles
Shared guitar score with a piano keyboard aid and camera tiles in the Musicity classroom
Guitar teacher on a video call in the Musicity classroom
Musicity is a music learning platform: a marketplace where students pick a teacher, and a remote learning environment where they hold music lessons through 1-on-1 video calls. Fora Soft built the platform's virtual music classroom, where lessons, free introductory interviews and solo practice take place, together with the servers that run it and record it. The marketplace itself (profiles, search, booking and payments) was built by the client's own development partner, and our classroom plugs into it.
The platform targets students aged 12 and up in the Gulf states. Teachers set their own prices and publish their schedules; students book and prepay lessons in bundles. The first meeting between a student and a teacher is a free interview, available once per pair.
How the classroom works: participants' browsers, the real-time server, the WebRTC call and the recording server

How the classroom works

The system works like this. Video and sound go directly between the participants' browsers, or through our relay server when a network blocks direct connections. A real-time server keeps both sides on the same file and page and closes sessions on time. A separate cloud server, launched for each session, records takes on request.

The hardest part of the classroom is making a music lesson work in an ordinary browser. Two people have to look at the same bar of a score or the same second of a video, a phone has to work as a second camera, and a recording has to show the lesson the way the participants saw it without loading their devices.

Who uses the platform

  • Teachers give paid 1-on-1 lessons and free interviews, and practise alone in a room called My Studio.
  • Students take lessons and interviews with a teacher, and practise alone in a room called Practice.

Two terms are used below. A session is any visit to the classroom: a lesson, an interview or a practice room, and the people in it are its participants. The controller is the participant who chooses what both sides see and starts recordings: the teacher by default, or the person practising in a practice room.

Teacher and student cards with their roles in the classroom
Lesson in the classroom: teacher, student and instrument camera tiles

Highlights

  • Server-side recording that shows the classroom as the participants saw it: score, documents and camera tiles in their real layout.
  • A recording server per session, launched when the session starts and removed after it ends, so the client pays for recording capacity only while sessions run.
  • A phone as a second camera aimed at the instrument, added by scanning a QR code.
  • Interactive sheet music that both participants follow together, with a piano keyboard or guitar fretboard lighting up the notes.
  • One controller per session who drives the shared view of scores, documents, audio and video, and can hand control over.

Recording takes during a session

Musicians record short takes to review later. The classroom records them on a server, so the participants' computers and phones stay free for the call.

The controller chooses what to record for each participant: the camera on the person, the camera on the instrument, or just the sound. The metronome, the whole classroom screen and the sound of the whole session can be added as well. Both participants see a 4-second countdown before the take begins. One recording lasts up to 5 minutes, and the classroom sets no limit on the number of recordings in a session.

A recording goes through these steps:

  • a hidden browser on the recording server joins the session as an invisible viewer, admitted by a random access key issued for that session, and records the page with its real layout, starting during the countdown;
  • recording stops when the controller presses stop or leaves the session, or when the 5-minute limit is reached;
  • the controller names and saves the recording, or discards it;
  • the recording server cuts the countdown from the start of the file, uploads video to Vimeo, and converts a sound-only recording to MP3 and stores it in Amazon S3;
  • when the upload finishes, the recording appears in the file library.

If the controller cancels during the countdown, the recording is stopped and nothing is uploaded.

Recording options in the classroom
Recording server card: session started, server launched on Amazon EC2, 90-second test recording

A recording server for each session, started on demand

Recording a browser page takes a lot of computing power, so each session gets its own recording server, and none runs between sessions.

When the first participant enters a session, the system launches a dedicated server with 8 virtual CPUs on Amazon EC2 from a prepared image. The call and the shared materials start right away. Only the record button waits: the new server first makes a 90-second test recording, and until it reports that it is ready, the button is disabled and says that the server is starting. The classroom's servers and each recording server exchange commands through message queues.

When the session ends, the server is stopped and then deleted within 5 to 10 minutes. The server image is rebuilt automatically as part of each deployment. If a server fails to launch, the team gets a message in Telegram.

A second camera for the instrument

Teachers need to see the keys, strings or frets, and a single webcam shows only the face. Each participant can connect up to two cameras with one audio input.

The second camera can be another camera on the same computer or the participant's phone. To add a phone, the participant scans a QR code that opens the session link, signs in to the same account and chooses to connect the phone as a camera. The phone joins muted, as an extra camera of the same person.

Each camera is marked as showing the person or the instrument, and the marks can be swapped. The recording options use these marks to tell the two cameras apart. The phone has its own buttons to disconnect, mirror the picture and switch between the front and back cameras; mirroring and HD can also be set from the computer.

Second camera on the instrument next to the participant's camera
Interactive sheet music shared by the teacher and the student

Interactive sheet music shared in real time

A teacher and a student read and play one score together. The score is shown and played by the Flat.io engine, which we integrated into the classroom.

The controller opens a score, and both participants see the same sheet. Play, pause and stop, the cursor position, zoom, the volume of each instrument part and the choice of visible parts are sent from the controller to the other side, and each browser plays the sound itself. The library accepts common notation formats, including MusicXML, MIDI, Guitar Pro, MuseScore, TuxGuitar and PowerTab files; our real-time server uploads them to Flat.io.

Piano and guitar visualization of the score

To make the score easier to follow for beginners, we added an instrument aid that shows which keys or frets to press as the score plays.

The classroom reads the score's MIDI data in the browser, including the starting tempo, the measures and time-signature changes, and lights up the notes on a virtual 88-key piano or a 6-string guitar fretboard in step with playback. For Guitar Pro files it reads the tablature and shows the string and fret written by the arranger. For other formats it lights every position on the fretboard where the note can be played. Each participant chooses the instrument view that suits them. The aid works on computers and tablets.

Piano keyboard and guitar fretboard lighting up the notes of the score
Shared view controlled by one participant

Shared view and lesson control

One participant leads and the other follows, so both look at the same material during the lesson.

The controller switches the shared view between the video gallery, the score, a document and a media player, and the other side follows. Control can be handed to the student, and both see who has it. The handover and the shared-view controls are shown only to the controller.

  • PDF pages and images are shown with synchronized page, zoom and scroll.
  • The shared media player keeps play, pause, seeking, speed and volume in sync. If the follower's player drifts more than 0.8 seconds from the controller's, it jumps to the controller's position.
  • A participant who joins late or reconnects gets the current view, the open file and its page from the server.

A virtual classroom for lessons, interviews and practice

All Musicity sessions happen in one classroom. Lessons and interviews open and close on the booked schedule, so nobody has to start or end them by hand, and a practice room opens on demand.

  • Participants can enter 5 minutes before the booked start.
  • A server-side timer counts down the booked time and shows it to both participants.
  • The session stays open for 30 extra minutes after the booked end and is then closed. A session that stays empty for a minute is closed earlier, and a practice room is closed after 4 hours.
  • These closing actions are stored in a database, so they still run after a server restart.

If a participant opens the same session on another device, the classroom offers to move the session there. A second tab in the same browser is refused, so one person does not join the same session twice by accident. After a session, each participant can rate it with up to 5 stars and a written comment.

Practice room with the instrument camera and a prompt to move the session to this device
Call start steps: direct connection, relay server, camera settings, audio only

Video calls that start on everyday hardware

Calls have to start on whatever camera and network a family has at home, so the classroom adapts to the device before giving up on video.

When a network blocks direct connections, the call goes through a relay server that we host ourselves. To get a working picture on a given camera, the classroom steps down through 9 progressively simpler camera and microphone settings and, if none of them works, falls back to audio only. Video starts at 480p, with an HD switch for 720p. Participants can change the camera or microphone (and, in Chrome, the speaker) in the middle of a lesson without dropping the call, and a connection that fails is rebuilt automatically.

The settings window shows a live microphone level, plays a test sound through the speaker, lets participants mirror their video and remembers the chosen devices. A muted participant can hold the space bar to speak.

A shared metronome

Teacher and student practise to the same metronome settings without either of them running a separate app.

The controller sets the tempo from 35 to 250 beats per minute and 2 to 12 beats per bar, with the note value shown in the time signature, and the first beat of each bar has its own sound. Settings and start or stop commands go to both sides, and each browser plays the clicks locally. The timer runs in a background worker, so the beat stays steady even when the browser tab is not in focus.

Shared metronome at 96 BPM in 4/4
Lesson library with a score, a PDF, a sound recording and a video

A lesson file library

Teachers and students keep their lesson materials in one place and open them during a session.

Materials (scores, PDFs, images, audio and video) are kept in folders. Files can be uploaded by drag and drop, filtered by type and moved between folders, and folders can be renamed. A file opened during a lesson is shared with the other participant. Videos are stored on Vimeo. The platform uploads them in resumable parts, so a dropped connection does not restart the upload, and if a video cannot be played yet, the classroom says that it may still be processing.

Integrations

  • Client's marketplace: supplies the participants and the booked times that the classroom uses to open and close sessions, and stores the ratings.
  • Flat.io: shows and plays scores.
  • Vimeo: stores and plays video recordings and lesson videos.
  • Amazon S3: stores sound-only recordings.
  • Amazon EC2: runs the recording servers.
  • Telegram: alerts the team when a recording server fails to launch.
Connected services: client's marketplace, Flat.io, Vimeo, Amazon S3, Amazon EC2, Telegram

Technical Implementation

🖥 Platforms
Web (desktop and mobile browsers: Chrome, Safari, Firefox)
🔮 Frontend
TypeScript, JavaScript, React, Ionic React, Socket.io, pdf.js, alphaTab, Tonal, react-player, Howler.js, tus
⚙️ Backend
Node, Express, Socket.io, MongoDB, Mongoose, node-schedule, Redis, RabbitMQ, PHP, Laravel
🔗 Integrations
Flat.io API, Vimeo API, Telegram Bot API
⚒️ Infrastructure
AWS, Amazon EC2, Amazon S3, Packer, Docker, Docker Compose, GitLab CI
🔁 Delivery
GitLab CI/CD, Helm, Argo CD
📹 Video and recording
WebRTC, LiveKit server, LiveKit recorder, coturn (TURN), headless Chrome, FFmpeg
Musicity: Web