|
Post by verklagekasper on Jan 27, 2016 22:47:48 GMT 1
Hi Jeff, thank you very much for your elaborate answer! It helps me understand the concepts of SDK3 better. Cheers, Burkhard
|
|
|
Post by verklagekasper on Jan 27, 2016 20:34:23 GMT 1
Hi, after I've spent a day with tracking down a weird crackling noise, I finally found the cause of the problem. So here's a word of warning:
Do not use pin.getBuffer(). Always use getBuffer(pin) instead. They look equivalent, but in fact getBuffer(pin) == pin.getBuffer() + getBlockPosition().
For explanation, assume you had a subprocess like this:
void MyPlugin::subProcess( int sampleFrames ) { float* out = pinOut.getBuffer() // wrong! ... } Now the following can happen: The host requests 100 samples from the subprocess, and there's a pinset event at timestep 3. SDK3 would process this as follows: 1. The SDK executes subProcess(3) to generate the first 3 samples. 2. The SDK calls onSetPins() such that the event can get processed. 3. The SDK executes subProcess(97) to generate the remaining 97 samples.
Now the buffer that subProcess would receive in step 1 would cover the samples 0-2. So in step 3, you'd expect a buffer covering samples 3-99. But you'd receive exactly the same buffer as in step 1! So you'd write samples 0-96 rather than 3-99, overwriting the 3 samples you generated already in step 1, and miss the last 3 samples.
Frankly, use getBuffer(pin). That call adjusts the buffer beginning properly when subProcess isn't executed in one go but gets interrupted by events. Btw I think that pin.getBuffer() should not be public but private to avoid this pitfall (If someone still needs it, it can simply be computed as getBuffer(pin) - getBlockPosition()).
Cheers, Burkhard
|
|
|
Post by verklagekasper on Jan 27, 2016 11:02:31 GMT 1
Well after some analysis and debugging, I think I found at least the answer to 1), and some more: - In SDK3, a non-audio pin being static is equivalent to "!pin.isUpdated()".
- Don't bother calling isUpdated() in your subprocess method. The only time isUpdated() can ever return "true" is during calls of onSetPins().
- The behavior of the Gate pin of the Midi to CV module has changed in SDK3/SE1.2. Even though it's an audio pin, pinGate.isStreaming() will always return false. So don't bother using isStreaming() on a pin connected with Gate, use pinGate.isUpdated() within onSetPins() instead.
|
|
|
Post by verklagekasper on Jan 26, 2016 20:11:47 GMT 1
Thank you!
|
|
|
Post by verklagekasper on Jan 26, 2016 11:26:46 GMT 1
Hi, I have a couple of questions about SDK3 that don't seem addressed by documentation.
1) In SDK2, one could check whether an input pin was static: "pin->getStatus() == ST_STATIC". In SDK3, the equivalent to this appears to be "pin.isStreaming()". However, non-audio pins, eg. integer pins, don't have a "isStreaming()" method. How do I find out whether a non-audio pin is static in SDK3?
2) Does getBlockPosition() in SDK3 have the same meaning as SampleClock() in SDK2? If not, what is the equivalent of SampleClock() in SDK3?
3) For that matter, using SDK3, "pin.getValue()" sometimes causes an assertion error requesting a concrete sample time as argument. Is using "pin.getValue(getBlockPosition())" the proper fix for this?
4) In SDK2, there was only SET_PROCESS_FUNC. But in SDK3, there are two versions, SET_PROCESS and SET_PROCESS2. The former is appears to be for functions receiving buffer_offset + sampletime as arguments, the latter for functions receiving only sampletime as argument. Well, buffer_offset seems no longer needed in SDK3 to me, so why the two versions of SET_PROCESS? Right now I'm using SET_PROCESS2, but maybe I'm missing something and should be using SET_PROCESS?
Cheers, Burkhard
|
|
|
Post by verklagekasper on Jan 22, 2016 3:49:16 GMT 1
Oh, I think I figured out a way to achieve what I want without the Bool Splitter. Takes some reconstruction work though
|
|
|
Post by verklagekasper on Jan 21, 2016 21:24:14 GMT 1
Apart from "Bool Splitter" the missing modules are "ImageJoystick" and "Synthedit Int To List2".
|
|
|
Post by verklagekasper on Jan 20, 2016 10:58:55 GMT 1
After a 7 year break from plugin development, I decided that Sonitarium deserves an update to Synthedit1.1, so here's Sonitarium 1.3. It also has a new skin, 10 more presets, and I raised the maximum amount of DSF-oscillators per voice from 100 to 200. So there can be up to 3200 oscillators playing at a time (provided your PC can handle it ). I'm also trying to update to SE1.2, but missing modules like the Bool Splitter make it difficult. I'll keep trying though since, evidently, Jeff is working on SE1.2, and I believe it won't be long until I get the synth running as a 64 bit VST3. Cheers, Burkhard
|
|
|
Post by verklagekasper on Jan 5, 2016 12:16:43 GMT 1
Thanks!
|
|
|
Post by verklagekasper on Jan 5, 2016 11:05:26 GMT 1
Hi there, I used to make synths with SE1.0 about seven years ago (see here). The synths contain modules I coded myself using the SDK. Now I'm trying to update a synth to SE1.1 and/or SE1.2. I'm wondering, do I have to compile my modules with SDK3, or will SDK2 do? I mean, besides the different looking API, are there actual differences below the surface, like, are SDK3 compiled modules more stable? Cheers, Burkhard
|
|