You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Objective: Understand the structure of MIDI data in a Python environment without an external DAW, and directly create, edit, and play the song [School Bell] using bidirectional JSON and ABC notation formats.
Target Audience: Developers and music data processing beginners who want to learn the principles of converting binary music data into human-readable text formats through programming.
Binary to JSON Conversion: Parse existing MIDI files (.mid) containing metadata and events (note_on, note_off, tempo, etc.) into structured JSON text.
JSON to Binary Compilation: Modify note values (velocity, delta times, etc.) within the JSON structure programmatically and recompile them back into standard MIDI binary files.
2.2. ABC Notation-based Text Editor (ABC Pipeline)
Text Score Loading: Load ABC text format files (.abc) containing aligned melodies and lyrics for [School Bell].
Parsing & Validation: Parse the 1:1 matching structure between musical notes and lyric syllables, including validation checks for note-to-syllable consistency.
MIDI Conversion: Convert the parsed ABC data into MIDI byte streams using specialized processing libraries.
2.3. Built-in Audio Playback Engine
Real-time Rendering & Playback: Utilize Python's internal sound engines or virtual synthesizers (e.g., pygame.mixer) to instantly output the generated MIDI file as audio without an external DAW.
Playback Controls: Support basic controls such as start (play), stop (stop), and loop playback.
3. Tech Stack
Language: Python 3.x
MIDI Processing:mido (Binary and message manipulation), music21 (ABC notation parsing and MIDI conversion)
Audio Playback:pygame (MIDI sound output and synthesizer execution)
1. Overview
2. Core Features
2.1. JSON-based MIDI Parser & Builder (JSON Pipeline)
.mid) containing metadata and events (note_on,note_off, tempo, etc.) into structured JSON text.2.2. ABC Notation-based Text Editor (ABC Pipeline)
.abc) containing aligned melodies and lyrics for [School Bell].2.3. Built-in Audio Playback Engine
pygame.mixer) to instantly output the generated MIDI file as audio without an external DAW.play), stop (stop), and loop playback.3. Tech Stack
mido(Binary and message manipulation),music21(ABC notation parsing and MIDI conversion)pygame(MIDI sound output and synthesizer execution).json,.abc,.mid4. Implementation Milestones
mido,pygame,music21)..abctext files for [School Bell].midoobjects, and play them viapygame.w:) and notes, followed by MIDI file generation.