Audio processing... What am I doing wrong?!

Hello, (or, I’m back! If you’ve been here 10+ years)

I’m mucking about with the Synthesizer classes in a plugin, just hooking up STK stuff.

I’m missing something obvious (life story), I had the problem with my initial Synthesizer, testing a 1 note loop (in AL10 & TW9) it just got louder and louder until everything’s flashing red and I’m reaching for the panic button**. Oops, am I adding when I should be replacing? No, doc comments say to add, and I’m adding. Tried all sorts of things. It eventually worked and I’ve no idea what change did it.

So today, I create an MPESynthesizer***, and it’s bloody happening again! So…

Does anyone know, off the top of their head, what’s going wrong when a loop in the DAW causes a juce::Synthesizer in a plugin to feedback steadily to destruction?

** (which, incidentally, does Sweet Fanny Adams in TW9 but at least it didn’t piff paff poof. For once)
*** For some reason a lot easier than the old-school juce::Synthesizer.

A blast from the past! Welcome back!

…I guess you just need to clear the buffer before you render your synth into it, or something simple like that? We have a demo synth plugin you can look at for inspiration

Jules, me old china, how are you?

I was mostly posting because doing so usually makes the answer spring to mind before anyone replies. It worked!

There was some sympathetic vibrational stuff going on in the stk::Guitar I’d forgotten about. I’d split the guitar into 6 one-stringers to implement the voices, but this had obviously bypassed the internal voice management thus giving me tailoff 6 times. Solution was to have single guitar owned by the synth, farm out references to the Voices and do processing in the Synth.

While I’ve got your brief attention, how do you get Waveform (hate the name, ungooglable) to send MPE style midi from clip to plugin? No pitchbend or whatever is being sent. I’m saving up for a seaboard. Does the per-note stuff in clips only work when a seaboard is plugged in? Or is my plug not presenting itself properly? My ‘shitboard’ is a spit n sawdust android app. I can manage it in Reaper where I can set notes to a channel.

It doesn’t need a device plugged in, but did you put the midi clip into MPE mode? And your synth is definitely MPE aware?

The clip has “show note expressions” on and all the squiggles for pitchbend, pressure etc. Is there something else I need to do?

Plugin’s based on MPESynthesizer. So internally it is, at least. I’ve got my processor class implementing VSTCallbackHandler and handleVstPluginCanDo returning 1 if it gets “MPE” but I don’t know when or if this is called or if I’m doing it wrong (likely). Tried breakpoints whilst TW9 was scanning but visual studio was seeing no symbols until loaded on a track and it’s not called then.

But I’ve got a midimonitor plug before it and all I see is noteons and noteoffs.

It works!

I was just trying to get crap working within the DAW and as I say above, getting nothing. So I thought I’d actually fire up the shitboard on my tablet and see what happens if I record. It worked, expressive notes recorded into clip and my plugin doing the MPE thang. And there it was glaring at me from the properties panel: MIDI Channel Mode: MPE. Doh! lol

The android app/screen has no pressure sensitivity. My device doesn’t produce it. And from what I can see, juce ignores it on android, deep in the code there is a MouseInputSource::invalidPressure getting passed about. What platforms do produce it? I may be misunderstanding the code.

What there is though, is a size property in the native android event. A kind of finger squidge amount. A light tap gets me 0.01 whilst a thumbpress gets me 0.05. I was thinking I could use this as a half-arsed pressure.

I can see where the java meets native in juce_android_Windowing.cpp and my projects generated .java file. I don’t want to mess about in there, but theoretically, could I slap an event.getSize() in the parameters of the handleMouseDown call in java end and grab it on the other end in the callback macro and actual function and slap it where MouseInputSource::invalidPressure was?