commit b59fa81c09c9cb7c9a31ad9124838cfd825d5bb4 Author: grgr Date: Wed Dec 28 20:05:40 2022 +0100 first commit diff --git a/app.py b/app.py new file mode 100644 index 0000000..ac5c970 --- /dev/null +++ b/app.py @@ -0,0 +1,52 @@ +import csv +import time +from pythonosc.udp_client import SimpleUDPClient + +# OSC client connection + +ip= "192.168.43.216" #"127.0.0.1" +port= 9000 + +client = SimpleUDPClient(ip, port) #create client + + + + + + + + +bpm = 100 +tempo = 1/4 + +def set_bpm(tracker, ): + for row in tracker: + row = row['bpm'] + bpm = row + print(csv.reader(tracker).fieldnames()) + +def update_bpm(bpm, tempo): + s = (60/bpm*tempo) + return s + + +def play_sheet(): + with open('tracker.csv', newline='') as f: + tracker = csv.DictReader(f) + + for row in tracker: + row = row['tum'], row['ts'], row['cha'] + client.send_message("/vvvv", row) + print(' '.join(row)) + time.sleep(update_bpm(bpm, tempo)) + + + + +while True: + play_sheet() + + + + +# connect to pd osc diff --git a/receiver.vl b/receiver.vl new file mode 100644 index 0000000..bdb5a86 --- /dev/null +++ b/receiver.vl @@ -0,0 +1,296 @@ + + + + + + + + + + + + + + + + + + High + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 9 + Comment + + + + + + + + 9 + Comment + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 9 + Comment + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + true + + + 440 + 200 + 1000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/receiverosc.pd b/receiverosc.pd new file mode 100644 index 0000000..d12fd90 --- /dev/null +++ b/receiverosc.pd @@ -0,0 +1 @@ +#N canvas 1341 76 946 682 12; diff --git a/sound.sc b/sound.sc new file mode 100644 index 0000000..501fea1 --- /dev/null +++ b/sound.sc @@ -0,0 +1,6 @@ +n = NetAddr.localAddr; + + +o = OSCFunc({arg msg, time, addr, recvPort; [msg, time, addr, recvPort].postln;}, '/goodbye', n); + +o.free; \ No newline at end of file diff --git a/tracker.csv b/tracker.csv new file mode 100644 index 0000000..b5a2e3c --- /dev/null +++ b/tracker.csv @@ -0,0 +1,18 @@ +tum,ts,cha +440,, +,630, +300,,880 +,, +840,,600 +,, +360,1000,110 +,, +440,,300 +,, +,,880 +,1000, +640,,800 +,700, +,,610 +,, +,1000,