adding midi

This commit is contained in:
Clément Le Bihan
2021-12-14 14:21:39 +01:00
parent f5e1985e27
commit 737c204ab9
2 changed files with 5 additions and 1 deletions
-1
View File
@@ -18,7 +18,6 @@ class Partition:
self.__name = name
self.__notes = notes
async def play(self, output_lambda:Callable[[object], None]):
now = datetime.datetime.now()
+5
View File
@@ -2,6 +2,7 @@ from chroma_case.Partition import Partition
from chroma_case.Note import Note
import asyncio
import sys
from mido import MidiFile
import board, neopixel
@@ -69,6 +70,10 @@ async def main():
default_duration = 900
default_color = (255, 0, 0)
for msg in MidiFile('new_song_1.mid'):
print(msg)
p = Partition("test",
[
Note(000, {"duration": default_duration, "color": default_color, "key": "sol"}),