added puredata patch
This commit is contained in:
parent
0b6963359d
commit
9239aac3d5
3 changed files with 65 additions and 0 deletions
33
pd/loopaudio.pd
Normal file
33
pd/loopaudio.pd
Normal file
|
@ -0,0 +1,33 @@
|
||||||
|
#N canvas 557 181 583 527 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 254 315 (re-)start loop;
|
||||||
|
#X obj 45 64 oscparse;
|
||||||
|
#X obj 45 89 list trim;
|
||||||
|
#X obj 45 42 netreceive -u -b 5555;
|
||||||
|
#X obj 167 171 route 1;
|
||||||
|
#X obj 241 168 route 0;
|
||||||
|
#X obj 145 123 route trigger;
|
||||||
|
#X text 69 276 stop loop;
|
||||||
|
#X text 32 12 listen to osc at port XXXX;
|
||||||
|
#X obj 314 209 print "starting loop";
|
||||||
|
#X obj 315 232 print "stopping loop";
|
||||||
|
#X msg 156 285 open /home/a/projects/pd-play/testaudio.wav \, 1;
|
||||||
|
#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 15 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 13 0;
|
||||||
|
#X connect 9 0 2 0;
|
||||||
|
#X connect 9 0 14 0;
|
||||||
|
#X connect 10 0 8 0;
|
||||||
|
#X connect 10 0 9 0;
|
||||||
|
#X connect 15 0 1 0;
|
32
pd/sendOSCMsg.py
Normal file
32
pd/sendOSCMsg.py
Normal 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 start to {0} on port {1}".format(args.ip, args.port))
|
||||||
|
client.send_message("/trigger", 0)
|
||||||
|
time.sleep(2)
|
||||||
|
|
||||||
|
|
BIN
pd/testaudio.wav
Normal file
BIN
pd/testaudio.wav
Normal file
Binary file not shown.
Loading…
Reference in a new issue