added more verbose logging for dev
This commit is contained in:
@@ -48,6 +48,7 @@ class Scorometer():
|
|||||||
key = None
|
key = None
|
||||||
if status == "note_on" and not is_down:
|
if status == "note_on" and not is_down:
|
||||||
self.keys_down.append((_key, timestamp))
|
self.keys_down.append((_key, timestamp))
|
||||||
|
print(json.dumps({"note": _key}), flush=True)
|
||||||
# print(f"Midi: {status} - {key} - {intensity} - {data3} at {timestamp}")
|
# print(f"Midi: {status} - {key} - {intensity} - {data3} at {timestamp}")
|
||||||
elif status == "note_off" or is_down:
|
elif status == "note_off" or is_down:
|
||||||
down_since = next(since for (h_key, since) in self.keys_down if h_key == _key)
|
down_since = next(since for (h_key, since) in self.keys_down if h_key == _key)
|
||||||
@@ -121,6 +122,7 @@ def main():
|
|||||||
exit()
|
exit()
|
||||||
song_name = start_message["name"]
|
song_name = start_message["name"]
|
||||||
logging.info(f"started {song_name}")
|
logging.info(f"started {song_name}")
|
||||||
|
print(json.dumps({"song_launched": song_name}), flush=True)
|
||||||
sc = Scorometer(f"partitions/{song_name}.midi")
|
sc = Scorometer(f"partitions/{song_name}.midi")
|
||||||
sc.gameLoop()
|
sc.gameLoop()
|
||||||
#except Exception as error:
|
#except Exception as error:
|
||||||
|
|||||||
Reference in New Issue
Block a user