From the original SynthMaker forum (2004–2014), with its members’ names and dates.
SBMastering ·
I am trying to set up a delay that occurs every time I play audio.
Every time I hit play there should be a delay of 80, 120, 200, 1000 or 2000 milliseconds of silence.
I'm a mastering engineer and I'm doing this for a plugin I want to make that will help me do my track offsets -- the gap between the track marker and the start of the music.
I made something I thought would do this, by using a delay. It only works the first time when you insert the VST and hit play. Afterwards, there is no gap. Even if you turn the plugin off and back on -- there still is no gap. I must delete the plugin and reload it.
It's a feature within a plug-in I'm working on that has many other features. I exported the module and created an OSM with it only, to make things more simple -- it's attached.
Any ideas? I've only been using Synthmaker for a little over a week, so one is a real toughy for me. I'm figuring out alot on my own, even more now that I have a week experience, but I don't understand what's going on here.
Xtinct ·
Hi when you turn the effect off make sure it is the input to it that you are disconnecting.
I connected it that way and it works fine. 🙂
SBMastering ·
Well, it needs to reset every time audio is stopped and played again. It would be terribly inconvenient for someone using the plugin to have to reset the effect.
This is a terribly confusing one. To test it in Synthmaker with the waveplayer, I would delete the connections to the module and then remake the connections -- that's how I started with the idea. That made me think it would work.
When I got it over to the host DAW (Samplitude), it does the delay the first time, but if I hit stop and then play again, it doesn't do the delay. The delay happens the first time, but then it apparently is ongoing, even when the effect is stopped. I have to totally remove the plugin (which would be like disconnecting waveplayer for testing) and reinsert it to have it work again.
It's a mess... This is my favorite feature about the plugin I'm working on.
Tzarls ·
I´m not sure if I understand what you want to achieve..... You say you need this module to act as a delay (with some selectable delay times) but this delay should be effective only when in play mode, right? When not in play mode, the delay should be bypassed, so if you monitor your interface´s input for that track there should be no delay. Am I right?
If that is what you want to achieve, then you need to use a primitive called "Is playing" in order to check if the host is in play mode or not. Then, whenever the host is in play mode, change the delay time to the desired value. When not in play mode, turn the delay time to zero (0). BTW, you don´t need the selector, just change the value going to the delay effect based on the GUI selection.
And just in case, don´t use the Delay Compensation primitive, because it will counteract the effect of the delay!
Xtinct ·
Hi try this
Hope it helps
SBMastering ·
I think your understanding is precisely what I was intending to convey.
I tried the "Is Playing" primitive and re-did the design without the selector -- seems much cleaner. Also, I would not have understood things well enough to do it this way even 5 days ago. You guys are such a tremendous help.
This probably would have worked, but in Samplitude, apparently the "Is Playing" primitive doesn't work. I made a label that just displays the "Is Playing" output -- true or false. It just always shows false, even when the VST is open, receiving a signal and even manipulating the signal.
A vast number of mastering engineers use Samplitude/Sequoia and this VST would save us all some serious time. Can anyone help figure this one out?
Here's how it looks now:
Of course, if the "Is Playing" primitive worked in Samplitude, it's output would be 1, which would then multiply times the milliseconds. Otherwise, while not playing it would multiply by 0, setting everything to 0. I wish "Is Playing" worked!
Is there any work around?
I'm attaching the OSM also.
Also, thanks Tzarls and Xtinct -- if "Is Playing" worked within the Samplitude/Sequioa DAWs, it would be solved now. A slight complication. This seems like the final bug in my plugin, so if this one get's fixed, I can post my very first project!
trogluddite ·
I'm not familiar with Samplitude, but if that's the problem, it wouldn't be the only software that doesn't adhere fully to the VST spec - very annoying!
There are several other primitives that read back values from the host - e.g. Sample Position, PPQ Pos - and they each come in 'Green' and Stream flavours. A toolbox search for 'VST' will find them quickly.
So I would suggest doing what you have already done with 'Is Playing', and do a few small exports with readouts (mono readout in the case of stream versions), to see if there is any other data available to use.
For example, if Samplitude is sending data for the cursor position, it would be possible to rig up a little logic to test whether the cursor is moving or not.
Dell ·
Hi.
What you are trying to do will not work. Once you press play on Samplitude, the initial delay is the delay Samplitude reads. This is based on the delay you used as a default setting upon the vst plug-in loading in Samplitude’s effect rack.
Samplitude offers an automatic delay compensation mechanism. This is why you do not encounter a glitch every time you press play when the effect is loaded in effect chain.
There is no need for a VST plug-in to offer an offset since the DAW is capable of doing it on it’s own. What you are trying to do falls under off-line effect, which is based on the DAW's capability, not a third-party-plug-in.
If you are not familiar on how it works in Samplitude, pose your question on the Samplitude forum.
SBMastering ·
I knew it is possible to insert the delay as you describe, with the offline delay. I just thought this would be a little more convenient and time saving.
Are you saying that Samplitude will always detect if I am attempting to insert such a delay? The idea does work as I intended the first time I hit play on an object. If I select different times, it delays those selected times.
If I understand you correctly, you're saying the first time I play it reads the delay and works as intended. Every other time, the automatic delay compensation kicks in.
Is there really no way around this? Is there a way to delay that isn't a delay -- like play a sample of silence that corresponds to the offset length? Is there a way to trick the automatic delay compensation?
Tzarls ·
AFAIK (and I do know my way around the VST spec) the host should only compensate for any delay if the plugin reports it, but if the plugin tells the host that there´s no delay, the host shouldn´t do anything. Doing smart things like guessing how much delay is introduced in a certain track doesn´t sound like what a host should do, at least not if the user doesn´t want it to do so.
Some things to try: when rendering your vst, make sure that the "none" option is selected for delay time, so if Samplitude is somehow really finding how much delay your plugin introduces upon loading, it will detect the delay to be "0" samples.
Also, you could try this: find a white noise generator (there are a couple of those in the forum) and patch it parallel to the delay in your schematic. Have it working at all times (yes, it might drive you crazy, so keep its level down). Test your plugin to see if the delays now work. If Samplitude is calculating delay based on silence in front of the actual audio data, it now shouldn´t be able to do so since there will be always white noise.
And while you are at it, check if the PPQpos primitive works in Samplitude - that could be used as a workaround.
Dell ·
SBMastering wrote: I knew it is possible to insert the delay as you describe, with the offline delay. I just thought this would be a little more convenient and time saving.
Are you saying that Samplitude will always detect if I am attempting to insert such a delay? The idea does work as I intended the first time I hit play on an object. If I select different times, it delays those selected times.
Once you have a delay compensation residing inside your VST, Samplitude will detect it. The method is just like using hardware components.
If you have a hardware limiter between your mixer and amplifier, you have the option to bypass the limiter providing the hardware processor offers a bypass. However, if you plug out the limiter from the A.C. receptacle you will lose the sound.
Why?
The mixer is still passing signal in the limiter’s circuitry.
The same thing applies to a VST plug-in in Samplitude. You cannot bypass the circuitry in the VST when the signal is passing through the circuitry and expect it to get sound at the master output. You have to literally hard bypass using the host’s bypass method.
If I understand you correctly, you're saying the first time I play it reads the delay and works as intended. Every other time, the automatic delay compensation kicks in.
Yes.
Is there really no way around this? Is there a way to delay that isn't a delay -- like play a sample of silence that corresponds to the offset length? Is there a way to trick the automatic delay compensation?
Maybe you can explain why you need an offset when you are mastering music. Having a delay is a good thing in mastering for the host has more time to process the work with fewer errors.
SBMastering ·
Well, the reason I would like to do this is time saving. If I'm using a plugin that will be used for several other tasks and it includes a selectable offset, its just one less step than doing it the DAW's way.
It's not that bad really to do it in the DAW. I've been doing that for 10 years. I just thought it would be nice to have it in a plug.
trogluddite ·
Sorry, but I'm with Dell on this one.
In the VST spec, delay compensation is applied only if the plugin communicates a delay value to the host - if it does not, then the host cannot know how long the delay should be, and will assume that nothing should be done. That's why SM has a special primitive for this function, and if you don't include it in your plugin, the host will simply take the data with whatever timing is natural to the plugin.
Latency of a hardware effect and a VST effect are not comparable, as hardware has an extra 'round-trip' via the soundcard drivers and hardware that a VST effect does not. It is this extra hardware latency that 'round trip timer' type auto-latency compensation is designed to combat - as purely hardware delays cannot be read any other way (BTW, be cautious about trusting the figures quoted by your host/soundcard software - they generally calculate latency based only on driver size, but don't include ADC/DAC conversion time etc.) Maybe some hosts allow this kind of compensation as a special option for misbehaving plugins, but I have never seen it, and it makes no sense, as the default method.
Using this kind of auto-calculation for VST effects would make the use of many effects in an 'all wet' configuration almost impossible (e.g. Echo FX, reverbs with pre-delay). I cannot beleive that a company with the experience of Magix would do anything so silly.
Tzarls ·
Ok, I´m confused.
@SBMastering: Do you have a Delay Compensation primitive in your schematic? If you do, then that could be the reason for the problem. It you don´t then I can´t see a reason why this shouldn´t work.
SBMastering ·
I'm pretty much totally confused.
I may be misunderstanding Trogluddite's comment that he's with Dell on this one, because what follows seems to contradict Dell. There may be something there that I'm not getting. Maybe just a typo?
I'm confused too because there surely is no delay compensation primitive in my schematic, unless it is WITHIN the delay primitive that I can't see.
It adds to the confusion because while Dell seems very sure of his assertion here, everyone else seems quite sure he is incorrect. Ultimately though -- it actually is not working.
I want it to work -- I think it's a REALLY cool feature. This plug I'm working on does a bunch of little tasks like that which would really help streamline the final processes in mastering. This is the last and final bug!
Ohh, also I want to clarify a little about the purpose. Before every song, professional mastering engineers often insert a very small gap -- usually 80Ms (6 CD Frames), although different engineers have different preferences. The reason is that some CD players will skip a few frames when skipping to different tracks. This offset gives the CD player a few milliseconds to do it's thing before the first oscillation of the track. This way, the CD player won't cut off any of the beginning of the song. Of course if there is a crossfade between songs, there will be no gap.
Perhaps a major DAW's non-adherence to the VST standard has drove us all a little crazy. If that is even the problem. Did someone divide by zero? Where are we?
I'm attaching the OSM.
Dell ·
Trogluddite's explaination is just worded differently than mine and use different examples.
A quick skim indicates you are missing a module. Search for the module entitled "Delay Compensation." Delay Compensation tells the host the amount of delay the effect offers in which will show in Samplitude's effect rack.
This is why Tzarls asked you if you have the “Delay Compensation” module in your OSM. Without "Delay Compensation" you will encounter a glitch in the sound when using the delay module.
You will not be able to manually adjust the delay settings once it is exported to VST in Samplitude for Samplitude chooses the default latency settings. So, select a latency based on your requirements. Think of it as Samplitude's "buffer Settings." The "buffer settings" in Samplitude cannot be adjusted once an audio signal is passing through.
Bear in mind the "Delay Compensation" settings will increase times two if you up sample the audio file (48 kHz to 96 kHz). And of course divide by two if you are down sampling from 96 kHz to 48 kHz.
SBMastering ·
Ok, but still it's not going to work anyway, the way I intend, right?
Dell ·
Sorry.
What you are asking for would require a plug-in embedded in the DAW's design architecture like an offline effect ( Samplituude's sMax 11 for example). Real time effects are not given that type of control in Samplitude.
Tzarls ·
I still think we are talking about different things here.... what the OP wants has nothing to do with latency (in the sense of hardware/driver latency). He doesn´t want to alter the delay compensation either - in fact, I think he wants NO delay compensation at all. All he needs is a processor that gets samples and outputs samples. No special magic. In the case of his processor, Internally it has a circular buffer with some fixed length, and some controls to alter that length. By definition, that processor is called delay, but since from the host´s POV a plugin is just a blackbox, what the processor is doing internally is actually of no importance.
Now that I think of it, even if he had a Delay Compensation primitive, he could still get the audio to be delayed by certain amount - for example, if he sets the PDC to 10 ms and the delay time to 100ms, he should get 90ms of delay.
And since his plugin (apparently) works fine with other hosts, I suspect the problem is Samplitude not following the standard - Occam´s razor.
Dell ·
If SBMastering doesn’t want a delay, he merely uses his effect plug-in without the need of the “New Track Offset Test” device in Samplitude.
Unless SBMastering made an error in his design which is very possible since he is new to designing plug-ins, all he needs to do is export his plug-in(s) into Samplitude's vst folder as he would with Synthmaker’s stock plug-ins and it will work without any delays.
It appears SBMastering is trying to make his “New Track Offset Test” device insert a silence by a few milliseconds on the actual waveform before the music starts, which can be accomplished in Samplitude using the off-line effects.
Mastering does not require the lowest latency as if someone is playing a live instrument. Only those who are playing live instruments requires the lowest denominator to prevent an offset between plucking/pressing a string/key on the instrument and how fast it is heard through the loudspeaker.
In Mastering, whether the buffer settings are configured to 209 ms or 3 ms it will not make the any difference when you are playing back a pre-recorded audio file. However, when you are using 10, 20, 30 vst plug-ins you want the buffer settings high to prevent CPU overload due to excessive processing power.
trogluddite ·
Tzarls wrote: I suspect the problem is Samplitude not following the standard
Yes, I would say that is the case too.
Tzarls wrote: I still think we are talking about different things here....
He he, quite so 🙂
I should have made clearer in my post that I wasn't suggesting PDC as a cause of the problem. I was just making a bad job of explaining why I thought it was a 'red herring'!
Apart from plugins that need to 'look ahead' in the audio, PDC is rarely an issue for most plugins and can be safely ignored.
So I would return to my earlier suggestion of testing Samplitude more thoroughly to see exactly what VST data (if any) it is communicating. If PPQ or Sample Position are working, then there is a good chance of a workaround.
SBMastering ·
Again, I apologize for my lack of experience -- but I tried to do the PPQ / Sample Position test, but both output a stream. I don't know how I can display a stream to test. How would one do such a test?
Mo ·
SBMastering wrote: I don't know how I can display a stream to test. How would one do such a test?
Search your toolbox for "readout".
SBMastering ·
Hi,
I tried the Sample Pos and PPQ primitives with Samplitude. No luck there. Both just show zero. I'm not sure if I possibly did something wrong so I am posting screen caps.
Does this spell the end of my offset idea?
Mo ·
Hi,
Better use blue mono for the readout (use mono readout).
treacherousumbrella ·
the problem there may be that you are using a poly readout rather than a mono readout
edit: beaten to it 🙂
Tzarls ·
Hey, SBMastering, any news on this? Did you try using mono instead of poly?
Wrote something here? To have a post removed or your name hidden, write to [email protected].