LogicX: Sine Wave on F0, Left Channel

DSP, Plugin and Host development discussion.
Post Reply New Topic
RELATED
PRODUCTS

Post

I'm experiencing the weirdest bug and hopefully, one of you cognoscenti can point me in the right direction.

When Logic first loads my plug-in, any notes played will also include a booming sine wave on F0, just on the left channel. If I arm the track for record, the issue goes away. :? :shrug:

After staring at it in the debugger for a good couple of hours, it's not my note, it's not my plug-in. It's actually Logic generating the sound. The issue started with the latest version of Logic (10.4) and I can find no reason why I'm being singled out here. :idiot: I'm using the Symbiosis wrapper to create the AU, but other plugins that use it don't experience the issue.

I'm assuming that I probably have a setting wrong somewhere, but I have gone over each and every VST method I've overridden and triple-checked them. Question is, why would Logic try and play along? Fishing for clues here--here's my quarter. :hail:

(Sorry for all the emoticons, I'm trying to distract my brain so the answer might bubble up.)
I started on Logic 5 with a PowerBook G4 550Mhz. I now have a MacBook Air M1 and it's ~165x faster! So, why is my music not proportionally better? :(

Post

~stratum~

Post

stratum wrote:Maybe run this? http://macappstore.org/valgrind/
Valgrind is great if you have a system where it's actually useable. Unfortunately at least on my MBP the Intel GL driver triggers errors from memcheck on pretty much everything it does.

Judging by the errors, the driver is doing MMIO that valgrind doesn't understand. Sometimes you get enough of these that valgrind just says "too many errors, go fix your program" and dies.

edit: in theory you can write suppression files.. but in practice valgrind also seems to have trouble figuring out the stack traces for some of these errors, which makes it problematic to suppress them :P

Post

Another alternative is gcc command line options -fsanitize=address and -fsanitize=thread

Unfortunately using these require all related code to be compiled with the same flags. For that reason they were unusable for me.

(If these turn out to be Mac incompatible also I wouldn't be surprized since I don't use a Mac.)
~stratum~

Post

stratum wrote:Maybe run this? http://macappstore.org/valgrind/
I'm not sure why I'd install this when Xcode comes with quite good profiling tools already. Also, I'm not sure how this will help me figure out why Logic's behavior is incorrect or my plugin is signaling to Logic to behave incorrectly.
I started on Logic 5 with a PowerBook G4 550Mhz. I now have a MacBook Air M1 and it's ~165x faster! So, why is my music not proportionally better? :(

Post

syntonica wrote:
stratum wrote:Maybe run this? http://macappstore.org/valgrind/
I'm not sure why I'd install this when Xcode comes with quite good profiling tools already. Also, I'm not sure how this will help me figure out why Logic's behavior is incorrect or my plugin is signaling to Logic to behave incorrectly.
I don't use Xcode so I'm not aware of its capabilities.
As for the weird Logic behavior, since it's truely weird it might have been caused by a memory or threading bug in your plugin. While unlikely, it's strange enough to consider getting a little paranoid about such things.
~stratum~

Post

I'm not currently using any threading--I just have the audio thread and the GUI thread supplied by the host.

Problem is, I can look at values all day long, but I'm not going to see what's missing. I was hopeful that somebody could say, Oh, did you declare X that tells the host Y? It's strange that arming the track corrects the issue. What I'm wondering is if Symbiosis is making the proper declarations about my plugins abilities, but it doesn't bother with the VST isSynth() call at all and I've just cracked open the AU2 SDK, so I'm not familiar with what it wants in this regard.

Symbiosis (AU-based VST host) is starting to get a bit long in the tooth. For example, it automatically assumes 32-bit = Carbon window and 64-bit = Cocoa window. My window is all Cocoa with provisional code to attach to a Carbon parent based on the type of parent class passed down. I've had to do a couple more hacks, but the code is touchy, with lots of #defines intermixed with asserts. It's hard to remove/change something without accidentally breaking something else.

I'd like to maybe do VST and AU wrappers and just make my code plain C calls to just plug in where it's needed, but that's once I understand how AUs work. (This would probably even simplify the Windows side of things, too.) The AU SDK is not exactly forthcoming or complex enough. For example, their note management is similar to mine, but very naive--I have to track multiple envelopes per note. I'd have to do a full override. And I'm still looking for where I pass it my GUI window. (AUs nicely expect the window passed to them rather than trying to make do with what the host passes.)
I started on Logic 5 with a PowerBook G4 550Mhz. I now have a MacBook Air M1 and it's ~165x faster! So, why is my music not proportionally better? :(

Post

syntonica wrote:... but that's once I understand how AUs work.
Once upon a time I used to try to understand MFC. Eventually I even did. But nowadays I use Qt.
~stratum~

Post

Could it be as simple as "you have to clear the buffers before generating your own samples"?

Post

luzifer wrote:Could it be as simple as "you have to clear the buffers before generating your own samples"?
I completely replace the buffers, so it's definitely Logic doing it. Besides, unclear buffers don't give you a sine wave plus I don't have the issue anywhere else, Mac or PC.

I even thought about maybe the latest Logic wants code signing, but that wasn't the case, I don't think. My little test by removing the signature from a plugin didn't prevent it from being scanned and working properly.

I've also checked the Info.plist for anomalies and can find none... This is driving me nuts.
I started on Logic 5 with a PowerBook G4 550Mhz. I now have a MacBook Air M1 and it's ~165x faster! So, why is my music not proportionally better? :(

Post

Poking through the console logs, Logic is complaining about using the CFM and how deprecated it is, so I'm not going to waste anymore time on trying to resurrect Symbiosis. It's too rooted in Carbon and to rewrite it, if have to learn AU anyways, so I'm just going to do a native AU version if I can ever figure out where to feed it my GUI.
I started on Logic 5 with a PowerBook G4 550Mhz. I now have a MacBook Air M1 and it's ~165x faster! So, why is my music not proportionally better? :(

Post Reply

Return to “DSP and Plugin Development”