-
offtandiscord
I think i've sorted the issue!
A lot had to do with my python script constantly opening another connection, so I learnt what the hell multi-threading is all about and sorted that part of the issue. My next step was to have PD run a sequence 8 times then stop and wait until the value received from netreceive was different, which I've just managed.
If people are interested, this project takes data from my twitter stream and converts it into midi-sends for a DADAmachines automat kit, which essentially turns it into a twitter-controlled drumkit. This is I think the 5th variation of this instrument i've come up with!
-
offtandiscord
So in your netreceive example you have it as a UDP (datagram) connection and not TCP (stream). would that prevent multiple connections being opened?
If so I think I also need to tweek the python script.
-
offtandiscord
I have pure data and a python script running on my raspberry pi. I'm using Socket and a TCP connection to send a value from python every 10 seconds into Pure data via a netreceive object. (the value changes every now and then)
The issue i'm having is that each time the script repeats (in a thread) it opens a new connection in Pure data and doesn't seem to close the old one. When it gets to a certain number of open connections it no longer receives the right value.
I'm a bit of a beginner/copy+paster on Python (and pure data) so am struggling to figure out which side of this equation needs sorting out.