belangeo/pyo-plug

Server

JVanBuskirk opened this issue · 4 comments

Hi Olivier,
This is not pressing, but is there a way to interact with the server with embedded Pyo? I'm running trying to run some code that uses feedback like the example you showed me in the Pyo list. If I delete the compensation, everything works.

comp = s.getBufferSize() / s.getSamplingRate()

delay_time = 0.1
feedback = 0.9
shift = 500

sf = Input(mul=0.5)

dd = Delay(sf, delay=delay_time - comp)
ff = FreqShift(dd, shift=shift).out()
dd.input = sf + ff * feedback

Hi,
Which interaction do you want to do with the Server ?
In this particular snippet of code, if you remove the compensation, everything will work but the delay time will be off by the duration of a buffer size (because the output of the Delay is computed before its input).

Based on how you created the PARAM feature, I see how I could easily create SAMPLERATE and BUFFERSIZE.

I have a class based on your EventParser. Passing the server as a parameter does not work - ScoreEvent(s, globals()). I'm not sure how to handles this issue.

Oh, sorry, my mistake... The Server in the embedded interpreter is called _s_, not s (to minimize possible name clashes).

Got it. I've looked at that code many times and it should have registered in my brain, but it didn't. Thank you.