TouchDesigner_Shared icon indicating copy to clipboard operation
TouchDesigner_Shared copied to clipboard

How to add audio in Starters/optical_flow_particles_compute/optical_flow_particles_compute.toe

Open shahanbutt opened this issue 1 year ago • 2 comments

I have modified the program to work with an intel realsense and using the depth mode.

Screenshot 2025-01-07 at 11 41 19 AM

I also modified the optical_flow_particles_compute node in a way that i can use custom images in the particles.

Screenshot 2025-01-07 at 11 40 56 AM

How can i add audio to the particle generation? I am only creating 10-100 images per frame and want to play audio when they are created and when they destroy, how can i do that ?

Screenshot 2025-01-07 at 11 40 45 AM

shahanbutt avatar Jan 07 '25 07:01 shahanbutt

@DBraun could you assist ?

shahanhyperspace avatar Jan 13 '25 09:01 shahanhyperspace

I would suggest using a replicator where the main base is something with an Audio Play CHOP. You could have 100 replicants. Then use TOP processing to figure out how many particles are being spawned on the current frame. Then you need logic to determine which of the Audio Play CHOPs to trigger. Perhaps a simple index integer stored in a constant CHOP that loops between 0 and 99.

DBraun avatar Jan 13 '25 14:01 DBraun