Skip to content

Play a virtual piano together with your friends in real time!

Notifications You must be signed in to change notification settings

SkyLionx/nice-piano

Repository files navigation

🎹 NicePiano

NicePiano is an online web application which enables users to play a virtual piano together with other users, in real time. The application can be used via a connected keyboard (or digital piano) which supports the Musical Instrument Digital Interface (MIDI) protocol, which sends messages to the browser according to the standard specification.

room

In the repository, the code for the frontend and backend is available as a separate submodule respectively in nice-piano-frontend and nice-piano-server.

In the file Report.pdf, an in-depth review of the work and challenges encountered during the deployment of this project is presented along with a verification phase to test the limits of the scalability of the system. Moreover, a presentation is also available in the file Presentation.pdf which summarizes the work which has been done and the results obtained from the stress test of the system.

Features

  • 🔒 Creation of virtual rooms to host private sessions
  • 🎹 Physical piano support using the MIDI protocol
  • 🔴 Record a performance that can be played back at a later time
  • 🔄️ Loop a pre-recorded performance
  • 🎵 Waterfall visualization of past played notes
  • 📶 Latency indicator

System Architecture

nice-piano-arch

The majority of the system has been deployed on the AWS cloud computing platform using the following services:

  • Amazon Cognito for authentication
  • DynamoDB to store users piano performances
  • CodePipeline and CodeBuild (and S3) for CI/CD
  • ElasticBeanstalk in order to deploy the web app using the Docker engine
    • 1-3 EC2 t2.micro instances with automatic scaling policy
    • Load balancer

Contributors



Technologies

The whole system is based on the use of WebSockets in order to provide bidrectional real-time connection between the clients and the server. In order to build the front-end, the following JavaScript libraries were used:

  • React.js framework
  • Tone.js and @tonejs/Piano to produce piano sounds
  • aws-amplify for Amazon Cognito to handle user authentication
  • Browser MIDI API (Chrome, Edge, Opera) to handle the PC-Piano communication

For the back-end, instead the following technologies were used:

  • Docker engine with Dockerfile
  • Node.js runtime
  • aws-sdk for communication with DynamoDB to store user piano performances
  • Socket.IO to handle the rooms mechanism
  • Redis for message exchanges among different server instances

About

Play a virtual piano together with your friends in real time!

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published