Dear Alexandros,
Thank you for your attention.
My goal is to record a performance (it could be an improvisation) and extract data from the ongoing recording to create a second sound layer superimposed on the first, using granulation techniques. It will not be a direct use of the Particle class, but a class that will use Particle internally for more varied granulation operations (for example, combining multiple fragments from the Table or mixing grains from different points in the Table). At first, due to errors, I came to think that the NewTable would be blocked for access while the recording was not finished, but I discovered that it is possible to access the Table. The code below shows how I managed to solve this problem. I can move the "pos" slider and access different points in the NewTable as the recording continues.
==================================
from pyo import *
s = Server().boot()
mic = Input(0).out()
buf = NewTable(30)
buf.view()
rec = TableRec(mic, buf, fadetime=0.01).play()
def buff_view():
buf.refreshView()
m = Metro(0.5).play()
tf = TrigFunc(m, buff_view)
grains = Particle(buf, HannTable(), pos=0, dur=0.5, dev=0.02, chnls=2, mul=0.5).out()
grains.ctrl()
s.gui(locals())
==================================
In a second stage of the work, I am implementing an attack detector that saves timepoints in a dictionary, so that I can access these points randomly in order to guide the granulation process.
By the way, your book has been a great help in understanding how to better use the Pyo library.
Best regards,
Rogério