I am going briefly to summarize my coding.
I made a function to compute the id of knearest
and retrieve data via dataset in order to set a Synth
.
So far so good.
Then inside an OSCDef
when I call this function everything is fine.
Now the idea is to play a routine triggered by the OSC message.
if(msg[1].asInteger == 1)
{
Routine.new(
{
~array_of_durations.do
{
arg i;
~processNearest.(~dataIn);
i.wait;
}
}
).play
}
That’s where it gets complicated.
For short delay times I get one or more of these messages:
File '/Users/yannics/Library/Application Support/SuperCollider/tmp/1099054756' could not be opened: System error : No such file or directory.
ERROR: FluidKDTree - Invalid buffer
ERROR: FluidKDTree - Wrong Point Size
FAILURE IN SERVER /b_getn index out of range
Note that it works fine when I test the function “by hand”, even for a short delay between triggers.
if it can help, here are some traces of incoming OSC messages:
...
OSC Message Received:
time: 9067.076143511
address: a NetAddr(127.0.0.1, 57110)
recvPort: 57120
msg: [ /b_info, 0, 7, 1, 44100.0 ]
OSC Message Received:
time: 9067.076898069
address: a NetAddr(127.0.0.1, 57110)
recvPort: 57120
msg: [ /done, /b_allocRead, 0 ]
File '/Users/yannics/Library/Application Support/SuperCollider/tmp/-755816904' could not be opened: System error : No such file or directory.
OSC Message Received:
time: 9067.077232717
address: a NetAddr(127.0.0.1, 57110)
recvPort: 57120
msg: [ /fail, /b_allocRead, File '/Users/yannics/Library/Application Support/SuperCollider/tmp/-755816904' could not be opened: System error : No such file or directory.
, 0 ]
ERROR: FluidKDTree - Invalid buffer
OSC Message Received:
time: 9067.083886444
address: a NetAddr(127.0.0.1, 57110)
recvPort: 57120
msg: [ /done, /b_free, 0 ]
...
OSC Message Received:
time: 9070.075430399
address: a NetAddr(127.0.0.1, 57110)
recvPort: 57120
msg: [ /b_info, 0, 7, 1, 44100.0 ]
OSC Message Received:
time: 9070.075750689
address: a NetAddr(127.0.0.1, 57110)
recvPort: 57120
msg: [ /done, /b_allocRead, 0 ]
ERROR: FluidKDTree - Wrong Point Size
OSC Message Received:
time: 9070.092449748
address: a NetAddr(127.0.0.1, 57110)
recvPort: 57120
msg: [ /b_info, 0, 10, 1, 44100.0 ]
OSC Message Received:
time: 9070.092672072
address: a NetAddr(127.0.0.1, 57110)
recvPort: 57120
msg: [ /FluidDataSet/getPoint, 0 ]
...