I was just wrapping up my project when i stumbled along a problem! I have created an attempt at a video theremin patch that uses physical objects to change frequencies and volume based on these 2 objects( i no its not how a theremin woks). However when the objects are out of camera view the DAC gets switched off which is good otherwise i’d have droning frequencies constantly playing.
However i still have music to play in the background which is for room ambience as well as accompaniment for the Teremin. So when the video theremin switches off the DAC the music playing onside is switched off! is there anyway i can avoid this?
Obviously you have to avoid switching off the DAC completely, as this will kill the audio – there’s no way to change that. You need to think of other ways to isolate your theremin patch. Consider using poly~ – if you place all of the theremin components inside one instance of poly~, you have the ability to mute that portion of the audio – it’s a useful trick for saving on CPU as well. You’ll have to isolate the components you need, encapsulate them, and save that as a separate patch. Then load it inside a poly with the "mute $1" message and a toggle to control it. Easy!
Its arguably not good practice to turn ~dac off to stop the sound the way you describe it above. I would suggest you devise a method to (quickly) fade out the theremin audio signal(s) when the physical objects are out of range. This will leave the dac~ enabled to reproduce the other audio material in MSP when the theremin is inactive.