A Python implementation of the Velato programming language, where code is inscribed as music. Each program is a MIDI file; the sequence of music notes determine the program's commands and logic.
This interpreter is based on the reference Velato compiler written in C# (2009).
Usage:
python velato.py <midi_file.mid> [-v]Options:
-v, --verbose: Print notes as they are processed
Example:
python velato.py Programs/Programs_print_hello_world.mid
# Output: Hello, World!A tool to convert pseudocode commands into Velato MIDI note sequences.
Usage:
from velato_note_suggestion_tool import VelatoNoteSuggestionTool
converter = VelatoNoteSuggestionTool(root_note='C4')
# Get note suggestions for a command
notes = converter.suggest_notes('Print ["H"]')
print(notes) # e.g., "C4 E4 A4 D5 E5 B5"
# Generate a complete MIDI file
commands = [
'Print ["H"]',
'Print ["i"]',
'While ["!"]'
]
converter.convert_to_midi(commands, 'output.mid')1. Generate Example Program from PseudoCode and Generate MIDI file (Scripts/generate_from_converter.py)
Demonstrates how to use velato_note_suggestion_tool to create a complete "Hello, World!" program.
Uses music21 to create both MIDI files and sheet music (PDF) from Velato programs.
This proj uses pytest. There is the beginning of a suite of tests for both the interpreter and the converter.
- Velato site
- Velato on Esolangs Wiki
- Original C# Implementation
- Velato Hands-Free site (a whistling interface for Velato)
- Velato Hands-Free