SkillAgentSearch skills...

Midisocket

A real-time music collaboration experiment with the Web MIDI API and WebSockets

Install / Use

/learn @vine77/Midisocket
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

midisocket

This project is an experiment in real-time music collaboration, leveraging the Web MIDI API and Web Audio API.

The stack uses WebSockets via Node.js to stream data from client to client. However, a faster P2P connection via WebRTC may be necessary (and is feasible now that Firefox and Chrome 31+ support SCTP-based reliable DataChannels<sup>[1]</sup>). The goal would be to reach a latency of less than 30ms, the bound of human perception.<sup>[2]</sup> Initial informal tests with WebSockets and Heroku do not meet this requirement due to latency and jitter, so stricter requirements may be necessary, e.g. WebRTC, low latency connections, P2P within a metropolitan area network or Internet2, etc.

  +---------------------------+    +--------------+    +---------------------------+
  |         Client 1          |    |    Server    |    |          Client 2         |
  |---------------------------|    |--------------|    |---------------------------|
  |  +-------------+          |    |              |    |  +--------+    +-------+  |
  |  | Web MIDI IN |------------------------------------->|  Soft  |--->|  DAC  |  |
  |  | Drum machine|   |      |    |              |    |  | synths |    |  OUT  |  |
  |  +-------------+   |      |    |              |    |  +--------+    +------ +  |
  |                    v      |    |  WebSockets  |    |      ^                    |
  |  +-------+    +--------+  |    |              |    |      |   +-------------+  |
  |  |  DAC  |<---|  Soft  |  |    |              |    |      |   | Web MIDI IN |  |
  |  |  OUT  |    | synths |<-------------------------------------|   Keyboard  |  |
  |  +-------+    +--------+  |    |              |    |          +-------------+  |
  +---------------------------+    +--------------+    +---------------------------+

Getting started

  1. Clone repository: git clone https://github.com/vine77/midisocket.git; cd midisocket;
  2. Install dependencies: npm install
  3. Start server: node server
  4. Plug in a MIDI controller
  5. Browse to http://localhost:5000 with Google Chrome
View on GitHub
GitHub Stars15
CategoryDevelopment
Updated1y ago
Forks6

Languages

JavaScript

Security Score

75/100

Audited on Aug 30, 2024

No findings