clicking because of bugged polystream init/shutdown?
Archive · 200862 old posts
From the original SynthMaker forum (2004–2014), with its members’ names and dates.
MichaelBenjamin ·
this envelope clicking drives me mad. i have come to the conclusion its a bug.
every second note works, every other clicks. i tried all the envelope modules, even with long attack time you still get that click.
sometimes its gone and stays gone for a while. then it suddenly is back.
there seems to be no real reason for this. someone else mentioned it could be a bug in the voice module poly stream initialisation whatever.
any news if this is an acknowledged bug?
oddson ·
Just because the clicks occur with a new note, this does not necessarily mean it's due to the envelope's attack phase.
If it's not with happening on every note and seems to show a pattern of how many notes between the problem then it sounds more like something that's happening with voice stealing, especially if you've limited the number of voices to a very low setting. It could be this or any number of other possible causes.
I don't think it's a universal problem with the envelope as I'm pretty sure we'd all have heard about it repeatedly.
Maybe you can post an example?
MichaelBenjamin ·
that is the click, when i just repeatedly hit a sine wave. smooth attack decay and release. the clicks occur randomly on note on, no matter how many max voices there are. i think its down to the buffer size of the asio stream.
because in the screenshot, the lenght between the "cutnpaste" sinewave between the clicks is exactly my asio buffer size.
i just tried to rebuild a simple sinus from scratch and it did not click.
seems the click status / buffer / whatever / error gets saved with the schematik...
MichaelBenjamin ·
i investigated further concerning asio buffersize, and the problem occurs only on low buffersizes, eg i have asio latency at 7 ms and 512 buffersize.
clicks occur randomly on midi note on.
but at 1024 it works.
the strange thing is, these clicks only occur on e new midi note, so my cpu is certainly fast enough, with the schematik at ~9% cpu max. and smooth playback otherwise.
and there i think lies a bug in SM - the asio playback, small buffers, voice initialisation on midi note on.
MichaelBenjamin ·
oddson wrote: Just because the clicks occur with a new note, this does not necessarily mean it's due to the envelope's attack phase.
If it's not with happening on every note and seems to show a pattern of how many notes between the problem then it sounds more like something that's happening with voice stealing, especially if you've limited the number of voices to a very low setting. It could be this or any number of other possible causes.
I don't think it's a universal problem with the envelope as I'm pretty sure we'd all have heard about it repeatedly.
Maybe you can post an example?
i think you are right, i changed the topic title
oddson ·
MichaelBenjamin wrote: ...the strange thing is, these clicks only occur on e new midi note...
and there i think lies a bug in SM - the asio playback, small buffers, voice initialisation on midi note on.
I'm out of my depth here... but that rarely stops me from speculating 😉
I think the fact that the clicks happen on a new note is consistent with and increased demand on the CPU to calculate the data required for a new voice. And whether the clicks occur or not would be influenced by how many other notes are active in the poly stream... that could be why it presents a little like a voice stealing problem.
MichaelBenjamin ·
yes it seems to depend on the max poly too. with 4 poly i get clicks with a 1024 buffer, which was fine in mono.
there is a big cpu spike too when this happens.
no clicks finally with my other soundcard after i doubled the latency.
(buffer gets automatically adjusted there).
i wonder if this can be fixed, since the sound is really fine, and only clicks at a new voice generation.
oddson ·
MichaelBenjamin wrote: ...I wonder if this can be fixed, since the sound is really fine, and only clicks at a new voice generation.
A faster computer or a bigger buffer... 1024 is usually plenty though. What are you computer's specs?
Nu Audio Science ·
No i have experienced these same clicks on a quad core with 2 gig and various ASIO devices all of which are top of the range and well thought of
The schematic can be saved as VST and the clicks will be in the VST and then i can reload the schematic and resvae as VST and they will be gone
I have informed Malc about this but unless it happens for you it is gonna be a bugger to track down
I even exchanged a few emails with Zynewave at one stage because i thought it was his ADSR doing it but it is just totally random and i thank Zynewave (Fritz) for spending a little time looking into it to no evail
It's gonna be a seriously hard bug to track down and that is why i havent reported it here before now
NAS
MichaelBenjamin ·
a3800x2, 2gb ram, tuned nlite winxp installation, emu0404 & sapphire le.
but my computer is fine and plays other plugins without any problem like this even at much higher cpu and poly.
no i meant how it can be fixed inside SMs buffer/voice init part
Nu Audio Science ·
MB try deleting the envelope
Then save the OSM
Now reload and put the envelope back in
5/10 times that works for me
NAS
MichaelBenjamin ·
hello nas, do the clicks get away when you increase the asio buffer sizes?
i had the impression that the clicks dont occur with the ds out module, but latency here is much higher too.
so do you have any assumptions besides asio / buffer / voice init?
Nu Audio Science ·
I've stopped using ASIO in SM so it cant be that
Not the clicks i experience anyway
And they are definatly caused by the envelope
I have spent hour after hour after hour strimming every possible things out of schematics to round it down to the envelopes
NAS
MichaelBenjamin ·
maybe its the envelope stage init together with a voice init and audio buffer size problem.
the clicks are away atm, works as it should with the firewire asio.
if the clicks come again, ill try your envelope cut/save/paste/reload, then to change the buffer sizes back and fourth
btw, can you post a screenshot of your clicks? as seen in mine its actually two clicks and a cut inbetween sine part with wrong phase
Acrobat ·
"the trickiest thing on SM", a classic mathematical situation where there are SO many variables in the problem that the problem is et the edge of chaos! - even simplifying (as I did, starting a new, very basic synthesizer and following carefully the path of the signal form MIDI In till Audio Outs), still have some problems me too, from time to time, especially when, as Oddson said, the number of voices setted in MIDI 2 Poly is very low and new retriggering happens before the voices have finished the release period.
That is complicated by the old de-zipper that could let some values not exactly at zero or one, but now there's the new one I still have to check.
In short, also for me, it's the release period we always must concetrate our attention..
Anyway also oustide the SM world, it's a very common issue for every virtual synthesizer, infact, most developers recommend to shorten release when the CPU is high, that's pretty logical..but does not implies clicking to occur in SE or C++ synths, that's a fact.
Clciking is more often heard on a too short attack time, even in pseudo hardware like Waldorf Q but for me it's NOT an issue in SM, where you can well set at SR/1024 (nearly 43 samples at 44-1K) the minimum attack time and get approx 1 millisecond of attack that NEVER clicks - sample rate independent (apart from the smoothing algo which is not SR indipendent) AND if the MIDI 2 Poly settings are appropriate, because if you go mono it requires a certain kind of retriggering, if you go poly, slightly others.
MichaelBenjamin ·
now its the same clicking but this time at the release stage...
i dont get it
meanwhile some envelope inverted itself, and i had to connect a 0-1 to 1-0 to make it work correctly.. strange is that the poly readout showed the correct numbers. buffer size change and envelope /cut save paste did not work. this problem comes and goes with a very random nature... very annoying.
another source of the problem may be a change of maximum polyphony, so maybe there something gets screwed up when a voice is still playing and it gets changed...
MichaelBenjamin ·
the envelope inversion was my fault.. still the release clicks now.. the attack clicks are gone.. what is it?
MichaelBenjamin ·
its seems i got rid of the fucking envelope clicking, by converting it to mono, then tick100 to float dividing that with the voice trigger to be able to play poly and finally multiplying it with the cutoff knob in green data. this works without clicks.
it seems as soon as i put more then one poly envelope directly to the audiopolystream to control something besides volume, it tends to get quickly fucked up by clicks, no matter which envelope, no matter which setting.
seems to have to do with polyphony and voices...
malc ·
Would you be able to send me a simple example schematic that illustrates this?
Thanks.
MichaelBenjamin ·
yes, sorry for the cursing.. the clicks got on my nerves, and while i am an idiot, im not too retarded to understand that this is a very diffuse problem which probably only occurs at a certain state of processing ie complexity in a schematik. maybe it has to do with unoptimized custom code modules, maybe with the poly voice stage auto init, maybe with the asio buffer size, maybe with selectors. and i thought i was at the point where i could build something polished.
i will try to find out and save a schematik.
greetings
michael
Acrobat ·
hi micheal,
again here to suggest you to give a look at Myco's Analogue collection, there's an interesting MIDI 2 Poly module which uses a curious way of changing polyphony settings on the fly, you could check that and see if it can help, I was quite surprised by the way it works, still have to try it but could lead to some new ideas on the argument... 🙂
MichaelBenjamin ·
hello acrobat, thanks for the tip! 🙂
to the clicking problem:
another idea where it could come from is when selectors/or multiplexer with polystreams connected get changed and the code initialisation goes somehow wrong with the playbuffer or another polyinit bug with polystream selectors.
i have to investigate further if the clicking really depends on polystreamselectors.
matti ·
Are you using a "per sample" envelope or a "reduced accuracy one" that triggers only every 4 samples?
MichaelBenjamin ·
its the adsr4 i use with smooth settings for attack and release (64 samples).
but this problem does not depend on the envelope you use, its the same with all stock & custom ones i have tried. so the clicking probably has its origin elsewhere.
MichaelBenjamin ·
btw since version 1.1 the clicking on attack has completely gone.
now its the release time which clicks under some circumstances even with safe settings. sounds like an abrupt voice shutoff. happened after polyselector changes and together with a filter. should not happen, all release times are safe and the filter worked good before. dont know.
electrogear ·
I'm getting this problem too. When the Midi 2 Poly is in Mono, there is no clicking, but when I switch it over to poly... clickety click (on pressing a note), and I get 60 - 80% CPU spikes. I don't get any of this in SM however - only after exporting as a VST. Trying to track it down but not getting anywhere...
EDIT:
This only happens in Cubase SX3, and not in Ableton Live 6...
Also, the CPU doesn't spike in Ableton Live 6.
malc ·
If you get any more info do send it my way. A simple schematic that I can use to replicate the problem would be a big help.
Thanks
aliasant ·
This is incredibly annoying.
Has anyone fixed the clicks?
Is this because SM isnt sample accurate in it self?
SM should follow the active samplerate and only do its cycle on a new sample. Not sure im am right or even understandable but it sounds ok in my poor ears.
I have tried every darn envelope there is and its always the same.
It is not so audible with sharp waveforms but as soon as a Sine or similar is used it is really annoying.
Malc. I can give you a schem if that helps.
electrogear ·
aliasant wrote: I have tried every darn envelope there is and its always the same.
It is not so audible with sharp waveforms but as soon as a Sine or similar is used it is really annoying.
Malc. I can give you a schem if that helps.
I had this problem too. I thought it was just me as lots of other people were reporting it to be working fine. I had built a nice string pad preset for a recent synth and it just kept glitching during the attack phase - not sexy. Glad it's not just me...
aliasant ·
I have given Malc some schematics that clicks and also an audiofile with a clicking synth and a picture showing the click in an audio editor. It destroys my entire synth. It doesnt matter how good and cool the synth is if it clicks like this.
One of the schematics I sent to Malc is with the standard VSTi from the toolbox.
I hope he can figure something out.
kirkagur ·
hope too!
i think that what we really need is a small overlap bitween the voices like 32 samples that we will able to close the
volume of the voice before SM colse it
Acrobat ·
kirkagur wrote: hope too!
i think that what we really need is a small overlap bitween the voices like 32 samples that we will able to close the
volume of the voice before SM colse it
interesting theory. I think I'm not able to make the proper change,... 😕
oddson ·
I think there is a problem with retriggering envelopes... I haven't investigated throughly but it seems to me that there stolen notes do not retrigger properly.
kirkagur ·
Acrobat wrote:
kirkagur wrote: hope too!
i think that what we really need is a small overlap bitween the voices like 32 samples that we will able to close the
volume of the voice before SM colse it
interesting theory. I think I'm not able to make the proper change,... 😕
the problem may be inside the midi to poly+the env modul
in a 1 voice mode ,it will open secend voice to the retriggered note ,and not kill the exist voice at once.
the killed note will have a short release (something like stage 5 from the env modul )
and we cant really do anything!!
i dont release anything (synth like) until every thing works perfect... 😇
and i really dont know how people release synths like that 😮 😈 😝
and right now this is a major problem that needs a special attention !
(even before the osc`s problems)
aliasant ·
Here are some images I took of an audiofile that clicks.
I recorded my synth in Reaper and used Soundbooth to look at the audio.
As you can see in the spectral display the problems surrounds the actual click in a weird way.
It looks like the clicking starts before the gap and ends after. Maybe this can be a clue to someone smart?
On this second image you can see many clicks. They are easy to spot if you look at the spectrum display.
This image shows clearly how it looks. Its a sudden raise of the signal. But again you can see on the spectral display that the problems started before the actual click and ends after it.
malc ·
It's been really hard to pin this one down mainly because it's been so difficult to reproduce.
Thanks for posting all your observations as they really do help. As a result of talking via email with aliasant I think I may be getting somewhere. Will keep you posted.
MichaelBenjamin ·
aliasants screenshots look exactly like my clicks.
further observations:
clicking seems to occur only with stolen voices
sometimes, if hops are used somewhere(?) in the schematic, the hops may reflect themselves as small saw rips fading in/out around the actual click. i.e a hop 32 lfo gave me 32 sample wide saw rips after the actual big click for about 256 samples. but thats maybe just a wierd side effect.
oddson ·
malc wrote: It's been really hard to pin this one down mainly because it's been so difficult to reproduce.
It seems not to be stable with a given OSM 😕
When I wrote above that it appeared to be re-triggering was not always happening, that was because I was finding notes would not follow the slow attack if they were a stolen note. Today I try the same setup and the envelope is now following the attack phase but the clicking is apparent.
This is with the most basic of setups... midi->M2P(mod)->MultiOSC->ADSR->Combiner->Out (direct or ASIO)
With or without gating the ADSR... it's most noticeable when the number of voices if very low.
kirkagur ·
theory..once.....
i took all the green float/int moduls and put after them de-zipper and the clicks disappear
(so there is no green to poly conection only thru the de-dipper)
also there is anther theory
when you press one note 4 voices are open and all the osc that connect to the M to P are active in a very low speed.
and when comes the retrigger it needs to reset to anther value so maybe there is a "selector click"
or not 😀
good day!
MichaelBenjamin ·
i have another example schematic, that gives these clicks with wave files.
seems, compared with the original wave, that when the click occurs the first 64-80 samples of the wave file are forgotten.
MichaelBenjamin ·
about the selector click - maybe its related, because i get clicking too, when shutdown code parts are activated/deactivated by a selector - and its no value jump in the actual audio stream, it clicks even when the selector output is multiplied by 0.
aliasant ·
MichaelBenjamin wrote: about the selector click - maybe its related, because i get clicking too, when shutdown code parts are activated/deactivated by a selector - and its no value jump in the actual audio stream, it clicks even when the selector output is multiplied by 0.
I have that too and its very annoying. Thied to mute the signal during the selector switch phase but it didnt really help.
Malc IS working on this but it seems harder then he first thought.
Acrobat ·
MichaelBenjamin wrote: about the selector click - maybe its related, because i get clicking too, when shutdown code parts are activated/deactivated by a selector - and its no value jump in the actual audio stream, it clicks even when the selector output is multiplied by 0.
I think it does so because the poly stream carries also voice-triggering information that are re-initialized in that case. Just arguing though.
MichaelBenjamin ·
yes, it also happens with mono and mono4 streamselectors when polyparts are used (i did not test with a complete blue setup), so i guess this kind of clicking seems to have its root in a general code/voice/whatever initialisation hiccup.
malc, any news about a fix?
Acrobat ·
MichaelBenjamin wrote: yes, it also happens with mono and mono4 streamselectors when polyparts are used (i did not test with a complete blue setup), so i guess this kind of clicking seems to have its root in a general code/voice/whatever initialisation hiccup.
malc, any news about a fix?
First times on SM I always wondering why envelopes could work without their proper triggers (streambools).. that's quite confusing, IMO..
MichaelBenjamin ·
hey aliasant, can you try your clicking schematic in a host that lets you manually set the buffer size of the asio driver?
energy xt lets you do this for example. try 2048 samples or higher. and also can you try your clicking schematic with the ds output, if you are using asio, and tell if the clicking is still there?
so far my impression is, that, somehow depending on the complexity of the schematic you need a certain buffersize for it to work smoothly.
maybe some internal hardwired buffer inside the exported vst can be made as an exporting option. i dont know if this is doable. or is it, finally so, that the open architecture that sm allows, just can be played back smoothly under otherwise unnecessary high buffer sizes? thats because synthedit and handcoded plugins run clickless at my machine even with 512 buffersize or lower.
infuzion ·
MichaelBenjamin wrote: So far my impression is, that, somehow depending on the complexity of the schematic you need a certain [soundcard driver] buffersize for it to work smoothly.
What a insight! I guess one can test this to see if the clicks disappear by gutting their problematic VST & re-export that also...
MichaelBenjamin ·
these schematics that click are not overbloated.
they range from 4-10% cpu load and only click on stolen voice initialisation and streamselector switching.
otherwise they run perfectly fine.
other plugins do not click like that, even at much smaller buffersizes.
Eska ·
I noticed this too (in Reaper,XT).
MichaelBenjamin ·
some testing results:
the clicking waves schematic stops clicking on stolen notes when the asio buffer size is a power of 2, so it works at 256, 512, 1024...
the only host that lets me force a buffersize is energyxt for the emu0404.
the saffire le always sets its own buffersize, depending on the control panel settings, which results in odd buffersizes, eg 440, even 881 and so on. while these settings work for other plugins, synthmaker plugins do not seem to like it, if the asio buffer is not a power of 2.
the selector click does not depend on a power of 2 asio buffer, it depends on a certain minimum size.
it stopped clicking around 1240 with still some cpu spikes, and ran fine without cpu spikes at about 1800 buffersize.
malc ·
Thanks for the extra info Michael (thanks for your email too)
There's nothing in the SM code that requires the buffer size to be a power of 2. However, it's an interesting observation. One aspect of SM that immediately springs to mind is that all hops in the code component must be powers of 2. Maybe that's a clue as to where the problem may lie.
I'll do some digging.
Acrobat ·
malc wrote: Maybe that's a clue as to where the problem may lie.
I'll do some digging.
..maybe that's why I always prophetize "SR/powers of 2" for minimum attack & release times...
MichaelBenjamin ·
i deleted all the hops in the adsr, and tested again.
the no hop version clicked too on non pow2 buffersizes, but clicks were a bit lower in volume and sounded sharper.
malc ·
There may be hops inside some of the primitives. I'll check.
MichaelBenjamin ·
are there hops in the voice2poly?
malc ·
No. And I've checked now and there aren't any in the other primitives you're using in that schematic. Only in the ADSR.
MichaelBenjamin ·
correction: the asio buffer size needs to be a multiple of 32, not a power of 2
Nu Audio Science ·
Cool other people have been getting the clicks
Maybes i can stop sounding and feeling insane now
NAS
Acrobat ·
MichaelBenjamin wrote: correction: the asio buffer size needs to be a multiple of 32, not a power of 2
Sorry I meant 2ˆn
infuzion ·
Nu Audio Science wrote: Cool other people have been getting the clicks. Maybe I can stop sounding and feeling insane now.
I thought your icon was your webcam:
Efo ·
Proberbly every body who is developing a little above average size synt with syntmaker has these clicks. My opinion is that it is caused by high processor peaks during initialising and releasing voices. In the HV-Formant synth I developed i solved this problem by a hold feature. With this feature the voices are never released.
In the new version I am working on this moment, I redeveloped this feature. If the synth is loaded or a new preset is selected and the hold feature is on I block my gate signal to the envelopes, send a sequence of note on and note off signals corresponding the number of voices and never release these voices. After the note on note off sequence I unblock the gate signal an can start playing without click's. Ok, this feature increases average CPU usage but it completely removes the click's. It even works upto 95% CPU usage(a massive 4unison 8poly patch). After almost a year of investigation it was the best solution I could find.
infuzion ·
I think many of the clicks discussed in this thread is caused by poor hop() management, which the devs have a fix for in the next coming version:
Multi stage modulation envelope MOVED TO PROJECTS
Wrote something here? To have a post removed or your name hidden, write to [email protected].