Selim – a real-time musical score follower toolkit

Overview

Selim – a real-time musical score follower toolkit

You can provide Selim with

  • a MIDI file (or text input with millisecond timestamps and integers for MIDI note-on numbers), and
  • a human performance of the same music (on a real-time MIDI device, or as text input via a Unix socket, TCP socket, websocket or standard input)

The software will then do its best to figure out where the player is going in the given MIDI file.

It will be able to output in real time, based on user choices, e.g.:

  • a time index in the MIDI file
  • events from the original MIDI file, synchronized to the performance
  • events from a second MIDI file, synchronized to the performance
  • MIDI events from the human performer as pass-through
  • ...whatever exciting we'll come up with

The software should be usable as

  • a Rust library
  • a Python extension
  • a command line utility communicating via MIDI devices, Unix sockets, websockets, TCP sockets or standard I/O

Examples

$ cargo run --bin selim-mid-info piece.mid
   Compiling selim v0.1.0 (/home/kaiant/prg/selim)
    Finished dev [unoptimized + debuginfo] target(s) in 0.33s
     Running `target/debug/selim-mid-info 'piece.mid'
midi file has 1 tracks!
first track has 16430 events!
first track has 446 'note on' events on channel 1!

Status and roadmap

  • choose MIDI parser library
  • ensure we can get data from MIDI files using the chosen MIDI parser (midly)
  • function to turn a MIDI file into an in-memory reference score (ms+pitch)
    • use only the first track which contains meaningful MIDI data
    • use only the first channel which contains meaningful MIDI data
    • use only "note on" events
    • ignore velocity
    • convert time offsets to milliseconds (disregarding tempo for now)
    • tool to output reference score on stdout
  • first naïve stateless score follower algorithm selim-0.1.0
    • inputs:
      • complete reference score (ms+pitch)
      • reference time index at last previous input note (ms)
      • reference time warp factor at last previous input note
      • previous input notes (ms+pitch)
      • new input notes (ms+pitch)
    • outputs:
      • reference time index at last new input note (ms)
      • reference time warp factor at last new input note
      • list of ignored new input notes (ms+pitch)
    • support only monophony (order of events matters)
    • ignore unexpected (wrong/extra) notes
    • keep waiting for next correct note
  • unit tests for selim-0.1.0
  • choose MIDI input library
  • real-time tool to convert MIDI input into ms+pitch events on stdout
  • real-time tool to test out selim-0.1.x
    • inputs:
      • reference MIDI file
      • real-time ms+pitch events on stdin
    • outputs on stdout:
      • reference time index at last new input note (ms)
      • reference time warp factor at last new input note
      • ignored input notes
  • wrong/missed/extra note tolerant score follower algorithm selim-0.1.1
    • match new input notes with future reference notes within a time window
    • jump directly to first matching note
  • time warp factor adjustment limit in selim-0.1.2
  • refine MIDI file interpretation (ms+pitch+vel+dur)
    • take tempo changes into account when converting to milliseconds
    • include velocity
    • convert "note off" events to durations
You might also like...
Materialize simplifies application development with streaming data. Incrementally-updated materialized views - in PostgreSQL and in real time. Materialize is powered by Timely Dataflow.
Materialize simplifies application development with streaming data. Incrementally-updated materialized views - in PostgreSQL and in real time. Materialize is powered by Timely Dataflow.

Materialize is a streaming database for real-time applications. Get started Check out our getting started guide. About Materialize lets you ask questi

Skybase is an extremely fast, secure and reliable real-time NoSQL database with automated snapshots and SSL
Skybase is an extremely fast, secure and reliable real-time NoSQL database with automated snapshots and SSL

Skybase The next-generation NoSQL database What is Skybase? Skybase (or SkybaseDB/SDB) is an effort to provide the best of key/value stores, document

A version of `sort | uniq -c` with output that updates in real-time as each line is parsed

uniqtoo A version of sort | uniq -c with output that updates in real-time as each line is parsed. Usage Pipe something line-based into uniqtoo the sam

A collection of filters for real-time audio processing

Audio Filters A collection of filters for real-time audio processing Feature Progress #![no_std] (via libm) f32 & f64 capable (via num-traits) SIMD Do

Dark Forest, the world's first decentralized real-time strategy game.

darkforest-rs Dark Forest, the world's first decentralized real-time strategy game.

A real-time implementation of
A real-time implementation of "Ray Tracing in One Weekend" using nannou and rust-gpu.

Real-time Ray Tracing with nannou & rust-gpu An attempt at a real-time implementation of "Ray Tracing in One Weekend" by Peter Shirley. This was a per

A Modern Real-Time Data Processing & Analytics DBMS with Cloud-Native Architecture, written in Rust

Datafuse Modern Real-Time Data Processing & Analytics DBMS with Cloud-Native Architecture Datafuse is a Real-Time Data Processing & Analytics DBMS wit

A Modern Real-Time Data Processing & Analytics DBMS with Cloud-Native Architecture, built to make the Data Cloud easy
A Modern Real-Time Data Processing & Analytics DBMS with Cloud-Native Architecture, built to make the Data Cloud easy

A Modern Real-Time Data Processing & Analytics DBMS with Cloud-Native Architecture, built to make the Data Cloud easy

A Modern Real-Time Data Processing & Analytics DBMS with Cloud-Native Architecture, built to make the Data Cloud easy
A Modern Real-Time Data Processing & Analytics DBMS with Cloud-Native Architecture, built to make the Data Cloud easy

A Modern Real-Time Data Processing & Analytics DBMS with Cloud-Native Architecture, built to make the Data Cloud easy

Skytable is an extremely fast, secure and reliable real-time NoSQL database with automated snapshots and TLS
Skytable is an extremely fast, secure and reliable real-time NoSQL database with automated snapshots and TLS

Skytable is an effort to provide the best of key/value stores, document stores and columnar databases, that is, simplicity, flexibility and queryability at scale. The name 'Skytable' exemplifies our vision to create a database that has limitless possibilities. Skytable was previously known as TerrabaseDB (and then Skybase) and is also nicknamed "STable", "Sky" and "SDB" by the community.

System Tools with real-time Web UI
System Tools with real-time Web UI

HeroicToys The remake of useful CLI tools, but with Web UI. The project uses RillRate - Dynamic UI for bots, microservices, and IoT.

Display ZFS datasets' I/O in real time
Display ZFS datasets' I/O in real time

ztop Display ZFS datasets' I/O in real time Overview ztop is like top, but for ZFS datasets. It displays the real-time activity for datasets. The buil

System Tools with real-time Web UI
System Tools with real-time Web UI

MultiTool System Tools with real-time Web UI. The project uses RillRate - Dynamic UI for bots, microservices, and IoT. Included Implemented: System Mo

Real-time UI for bots, microservices, and IoT
Real-time UI for bots, microservices, and IoT

Real-time UI for bots, microservices, and IoT

Real-time CLI level meter built in Rust.
Real-time CLI level meter built in Rust.

Meter This is a very simple command line utility written in Rust for measuring the gain of a microphone. It displays the values in dBFS. This is usefu

Rust SDK for working with RIS-Live real-time BGP data stream.
Rust SDK for working with RIS-Live real-time BGP data stream.

ris-live-rs Provides parsing functions for RIS-Live real-time BGP message stream JSON data. The main parsing function, parse_ris_live_message converts

A real-time mixer

Pagana Pagana is a real-time mixer. This project is still in early stages of development and is not ready for any kind of production use or testing. D

A real-time event-oriented data-hub

Redcar A real-time event-oriented data-hub, inspired by the data hub. It is: Universal: the front end uses gRPC to provide services. Fast: benchmarked

💡 Experimental real-time global illumination renderer 🦀
💡 Experimental real-time global illumination renderer 🦀

💡 kajiya Experimental real-time global illumination renderer made with Rust and Vulkan Its general goal is to get as close as possible to path-traced

Comments
  • Naive algorithm 0.1.0

    Naive algorithm 0.1.0

    • [x] inputs:
      • [x] complete reference score (ms+pitch)
      • [x] complete live input so far (ms+pitch)
      • [x] position of last matching previous input note in the score
      • [x] position of last matching previous input note in the live input
      • [x] position of first new note in the live input
      • [x] time stretch factor at matching note
    • [x] outputs:
      • [x] reference time index at last new input note (ms)
      • [x] time stretch factor at last new matching note
      • [x] list of ignored new input notes (ms+pitch)
    • [x] support only monophony (order of events matters)
    • [x] ignore unexpected (wrong/extra) notes
    • [x] keep waiting for next correct note
    • [x] unit tests for selim-0.1.0
    enhancement 
    opened by akaihola 0
Owner
Antti Kaihola
Python developer and Teal organization coach at Wärtsilä in Helsinki, Finland
Antti Kaihola
A collection of filters for real-time audio processing

Audio Filters A collection of filters for real-time audio processing Feature Progress #![no_std] (via libm) f32 & f64 capable (via num-traits) SIMD Do

null 42 Nov 5, 2022
DSP real time audio synthesis, effect algorithms and utilities for Rust

synfx-dsp synfx-dsp DSP real time audio synthesis, effect algorithms and utilities for Rust Most of the algorithms and implementations in this library

Weird Constructor 8 Nov 23, 2022
GStreamer plugin for speech to text using the Vosk Toolkit.

This project has moved upstream to the GStreamer Rust Plugins: https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/729 Vosk Speec

Rafael Carício 7 Apr 12, 2022
A simple GUI rust application that keeps track of how much time you spend on each application.

TimeSpent A simple GUI rust application that keeps track of how much time you spend on each application. Installation Click here to download the Setup

Slacked Lime 4 Sep 23, 2022
Your musical pokedex, Plex for music

Musidex Your musical pokedex, Plex for music. Add songs from youtube videos or youtube playlist to your library, or import them from your local files.

Pâris DOUADY 35 Oct 5, 2022
A versatile and dynamic music bot designed to elevate the musical experience within Discord servers.

Masayoshi Masayoshi is a discord music bot written in Rust for making a great experience within Discord servers with support to Youtube, SoundCloud, S

null 6 Dec 26, 2023
Automatically assess and score software repositories for supply chain risk.

Hipcheck Hipcheck scores risks for software projects; yours and your dependencies. It analyzes repositories to assess risks, review development practi

The MITRE Corporation 6 Jan 26, 2023
First project in rust which will be to make an accounts system & Leaderboard/Score system

rust-backend this is my first project in rust which will be to make a backend for compsci project it will include: Accounts, Player Achievements (if I

NaughtyDog6000 2 Jul 13, 2023
Scalable and fast data store optimised for time series data such as financial data, events, metrics for real time analysis

OnTimeDB Scalable and fast data store optimised for time series data such as financial data, events, metrics for real time analysis OnTimeDB is a time

Stuart 2 Apr 5, 2022
🧰 The Rust SQL Toolkit. An async, pure Rust SQL crate featuring compile-time checked queries without a DSL. Supports PostgreSQL, MySQL, SQLite, and MSSQL.

SQLx ?? The Rust SQL Toolkit Install | Usage | Docs Built with ❤️ by The LaunchBadge team SQLx is an async, pure Rust† SQL crate featuring compile-tim

launchbadge 7.6k Dec 31, 2022