What are the best practices for rebuilding the Audio Graph?
How can a program assure that the Audio Graph is valid?
What are the best methods to call? (such as,
After what operations should the Audio Graph always be rebuilt?
Very helpful, as always! Thank you!
Edit::TreeWatcher to see how all the plumbing works.
If I may ask a follow-up question; Are there any practices specifically to avoid in terms of using the audio graph? …edge cases?
It’s a bit difficult to say as there’s literally thousands of things you could do…
Perhaps a better approach would be for you to let us know what you’re doing and we can give more specific advice?
I was really looking for general information—things to know and keep in mind when dealing with the audio graph.
The only specific problem I’m having at the moment is with recording one track while playing back from another. The audio on the second track appears to be phase canceled by the playback track.
So, I have two tracks. Track one is set to input one, and Track two is set to input two.
I arm Track one and record some audio.
Then, I disarm Track one, and arm Track two. And, I “rewind” the playhead back to the start of the Track one clip.
So, now I am hearing Track one as I record track two.
The Track two sound is audibly affected. It shows in the waveform thumbnail. And when the Track two clip is played back, it has been affected by the Track one clip.
This is reproducible in the Recording Demo.
What might cause this? And, how do you properly prepare the audio graph for recording new tracks as you playback existing ones?
That sounds odd. Can I ask a bit more about your setup? What is your input signal? I wouldn’t expect any phase cancellation, even on playback unless your signal was nearly identical during both recording passes…
Are you perhaps using some kind of loop-back on your audio device and the output from your first track is being mixed in to the input of your second track?
Are you calling
TransportControl::stop before doing your rewind? That’s needed to “commit” the clips to the Edit.
I am testing on my development laptop, which is a Windows 10 computer. I simply record through the builtin microphone while coding. I can try it in my studio setup later.
Yes, I am calling
TransportControl::stop. In fact, my Rewind button is disabled unless Stop is pressed first.
Please note, the issue is reproducible in the Recording Demo. And, I have tried a few more things. I have found that if I Mute the first track while recording the second track, the cancellation does not occur.
So, again, if I record Track one and Track two together, everything is fine. But, if I record only Track one, return the playhead to the beginning of the Track one clip, and now record Track two, while listening to Track one, the cancellation occurs. If Track One is Muted, it does not occur.
It will be a few hours until I can test on my studio equipment. But I will do that test so that hardware/driver idiosyncrasies can be ruled out.
And, in the meantime, perhaps someone can try the above procedure with the Recording Demo?
Sorry, I’m not seeing that here:
You can see from the two recorded clip (different takes) that there is no bleed or interference between them.
Perhaps a video of the problem would be easier to see?
Thank you for checking that. It would seem to indicate some strangeness in my development system laptop’s sound hardware (Realtek based).
Give me a few hours to conduct a test on my studio equipment, which is totally different hardware. I will report back on what I find.
Thank you again for your help and patience.
So, on my studio setup, everything works correctly. I tried several combinations, and all worked as expected. So, this definitely points to some odd behavior on my development system.
Perhaps the best we can learn from this is to beware what you are testing on (Acer laptop, Realtek sound). No matter how generic, it may still not work as expected!
Thank you for your patience!