Skip to content

A High Performance piano auto player for Roblox, with advanced transposition capabilities and advanced set of features.

License

Notifications You must be signed in to change notification settings

Zephkek/MIDIPlusPlus

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MIDI++ for Roblox

Advanced MIDI Playback for Roblox Pianos

Release License Stars Issues Download Now


Overview

MIDI++ is a high-performance virtual piano player focused mostly on the Roblox platform that offers top notch features for music enthusiats and players.

Key Features

  • Powerful MIDI Parser: Rapidly processes MIDI files, handling complex structures and corrupted data with ease for reliable playback.
  • Transpose Engine: Intelligent key detection, genre-specific transposition, and advanced harmonic analysis
  • Performance Optimization: C++ architecture, high-capacity data handling, nanosecond precision timing
  • MIDI-to-QWERTY Conversion: Seamless Roblox piano integration with customizable key mappings
  • Tempo Management: Real-time adjustments with smooth transition handling
  • Volume Control: Velocity-sensitive playback and dynamic volume modulation
  • Authenticity Mode: Simulated human-like performance with adjustable realism settings
  • Extended Functionality: Sustain pedal support, 88-key mode, automatic MIDI file error correction
  • Advanced Analysis: Chord and rhythm pattern recognition, harmonic structure analysis
  • System Optimization: Efficient event handling, custom memory pools, lock-free queues, SIMD acceleration using manual vectorization in critical parts of the code to ensure these parts are always optimized.
  • Customization: Flexible configuration options

Technical Superiority

  • Utilizes advanced data structures and algorithms for optimal performance
  • Features custom memory management for reduced overhead
  • Employs lock-free programming techniques for enhanced concurrency
  • Optimizied to the max with branch prediction and PGO

Showcase:

Stress Test N°1 7m Notes Features Showcase
Stress Test N°1 7m Notes (Loud) Transposition Engine Test

Installation

  1. Install Microsoft Visual C++ Redistributable (x64) from here
  2. Download MIDI++ from the Release Page
  3. Extract the package and place MIDI files in the "midi" folder
  4. Launch MIDI++ to begin

System Requirements

  • Windows 10 or later (64-bit)
  • AVX2 supported CPU (Generally any CPU that's not older than 2013)
  • Microsoft Visual C++ Redistributable 2022 (x64)
  • 100MB free disk space

Features Usage Guide:

The following table explains the settings used in the LEGIT_MODE_SETTINGS JSON object:

Setting Type Description
ENABLED Boolean • Activates/deactivates Authenticity Mode
• When true, all other settings become active, and will load the MIDI file in legit mode
TIMING_VARIATION Float
(0.0 to 1.0)
• Introduces timing deviations to each note
• 0.1 means ±10% variation in note timing
• Example: A note at 1.000s might play between 0.900s and 1.100s
NOTE_SKIP_CHANCE Float
(0.0 to 1.0)
• Sets probability of missing a note
• 0.02 means 2% chance to skip any given note
• Simulates human errors in fast or complex passages
EXTRA_DELAY_CHANCE Float
(0.0 to 1.0)
• Likelihood of inserting a pause between notes
• 0.05 means 5% chance of adding delay after a note
• Mimics human hesitation or breaths
EXTRA_DELAY_MIN Float
(seconds)
• Minimum duration for random delays
• Should be ≤ EXTRA_DELAY_MAX
EXTRA_DELAY_MAX Float
(seconds)
• Maximum duration for random delays
• Defines upper limit for added pauses

Example Configuration

{
  "LEGIT_MODE_SETTINGS": {
    "ENABLED": true,
    "TIMING_VARIATION": 0.1,
    "NOTE_SKIP_CHANCE": 0.02,
    "EXTRA_DELAY_CHANCE": 0.05,
    "EXTRA_DELAY_MIN": 0.05,
    "EXTRA_DELAY_MAX": 0.2
  }
}

Volume Settings

Setting Value Description
MIN_VOLUME 10 • Minimum allowed volume level
• Represents 10% of maximum volume
MAX_VOLUME 200 • Maximum allowed volume level in your game
• Represents 200% of normal volume by default
INITIAL_VOLUME 100 • Starting volume level on initialization
• Represents 100% or "normal" volume
VOLUME_STEP 10 • Increment/decrement step for volume adjustments
• Each adjustment changes volume by 10 units by default
ADJUSTMENT_INTERVAL_MS 50 • Minimum time between volume adjustments
• Prevents changes more frequent than every 50 milliseconds by default

JSON Configuration

{
    "VOLUME_SETTINGS": {
        "MIN_VOLUME": 10,
        "MAX_VOLUME": 200,
        "INITIAL_VOLUME": 100,
        "VOLUME_STEP": 10,
        "ADJUSTMENT_INTERVAL_MS": 50
    }
}

Acknowledgements

Special Thanks

Special thanks to these cool individuals for their invaluable contributions and support:

  • Raven
  • Anger
  • Gene

Your dedication and expertise have been crucial to the development of MIDI++.

External Libraries

MIDI++ leverages the power of these outstanding open-source libraries:

Library Description
moodycamel Concurrent Queue A fast multi-producer, multi-consumer lock-free concurrent queue for C++11
nlohmann's JSON for Modern C++ A JSON library for Modern C++

These high-quality libraries have significantly enhanced MIDI++'s functionality and performance, Kudos to their creators.

License

This project is licensed under the GNU General Public License v3.0 (GPLv3).

This license allows you to:

  • Use the software for any purpose
  • Change the software to suit your needs
  • Share the software with your friends and neighbors

This license requires you to:

  • Share the source code when you distribute the software
  • License any modifications under GPLv3
  • Keep intact all copyright, license, and disclaimer notices

This license explicitly forbids:

  • Distributing the software without the source code
  • Using the software as part of a proprietary product

For more details, see the LICENSE file in this repository or visit GNU GPLv3.