Merge branch 'master' of gitlab.com:hugvey/hugvey

This commit is contained in:
Ruben van de Ven 2019-05-10 15:14:28 +02:00
commit 627e0ffbe9
3 changed files with 66 additions and 0 deletions

34
pd/loopaudio.pd Normal file
View File

@ -0,0 +1,34 @@
#N canvas 223 291 679 478 10;
#X obj 155 392 dac~;
#X obj 155 342 readsf~;
#X msg 81 297 0;
#X obj 233 324 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144
-1 -1;
#X text 252 322 (re-)start loop;
#X obj 239 60 oscparse;
#X obj 239 85 list trim;
#X obj 239 38 netreceive -u -b 5555;
#X obj 339 163 route 1;
#X obj 425 162 route 0;
#X obj 339 119 route trigger;
#X text 69 276 stop loop;
#X obj 469 216 print "starting loop";
#X obj 470 239 print "stopping loop";
#X msg 155 244 open testaudio.wav \, 1;
#X text 237 17 listen to osc at port 5555;
#X text 155 219 change audiofile HERE;
#X connect 1 0 0 0;
#X connect 1 0 0 1;
#X connect 1 1 3 0;
#X connect 2 0 1 0;
#X connect 3 0 14 0;
#X connect 5 0 6 0;
#X connect 6 0 10 0;
#X connect 7 0 5 0;
#X connect 8 0 3 0;
#X connect 8 0 12 0;
#X connect 9 0 2 0;
#X connect 9 0 13 0;
#X connect 10 0 8 0;
#X connect 10 0 9 0;
#X connect 14 0 1 0;

32
pd/sendOSCMsg.py Normal file
View File

@ -0,0 +1,32 @@
"""Small example OSC client
This program sends 10 random values between 0.0 and 1.0 to the /filter address,
waiting for 1 seconds between each value.
"""
import argparse
import random
import time
from pythonosc import osc_message_builder
from pythonosc import udp_client
if __name__ == "__main__":
parser = argparse.ArgumentParser()
parser.add_argument("--ip", default="127.0.0.1",
help="The ip of the OSC server")
parser.add_argument("--port", type=int, default=5555,
help="The port the OSC server is listening on")
args = parser.parse_args()
client = udp_client.SimpleUDPClient(args.ip, args.port)
while(1):
print("sending start to {0} on port {1}".format(args.ip, args.port))
client.send_message("/trigger", 1)
time.sleep(2)
print("sending stop to {0} on port {1}".format(args.ip, args.port))
client.send_message("/trigger", 0)
time.sleep(2)

BIN
pd/testaudio.wav Normal file

Binary file not shown.