Giter Club home page Giter Club logo

Comments (5)

mtytel avatar mtytel commented on June 14, 2024

Hi Johann,

I'm assuming the amplitude envelope is causing the clicks, though I'm not sure under what settings you are getting this behavior. It would be really helpful if you could save a patch from the standalone app (download at tytel.org/helm) and send it to me at [email protected]. Then I could give you some better information or fix the problem.

Here are some thoughts though:
This may not be the cause of your clicks, but you can have a 0 time attack. Many times I have a amplitude attack value of 0.01 secs when I don't want the click. When I play C2 the arpeggiator on the default settings at 120bpm, I don't get clicks.

Also, when engine runs out of voices and is not in legato mode, it will kill the oldest voice really quickly (not immediately) and then retrigger the envelopes. I need to test this 'kill time' on different sample rates, so that might be the cause of the clicks.

from helm.

yoyz avatar yoyz commented on June 14, 2024

Hi Matt,

Here is the kind of patch used : http://ibin.co/26MP3PdWM5Nm ( amp attack at 0 )

I have try to reproduce the behaviour in "helm" and putting an attack of 0.03 resolve near all kind of problem I get, and it doesn't change "too much" the character of the sound, so it's great but I have to find why it works on the GUI and not in my case ( my tracker ). So you can close this issue because it doesn't really exist I will reopen it if I am able to produce it with midi gears.

I need to understand digging the code why for me, I fall into the "kill oldest voice" problem.
And I get click really easily which is not what I want obviously.
Because what I try to produce whith my apps is some kind of arpegiattor which will trig the note at 120bpm at 1/16th.
In the end it kill voice really aggressively the amplitude of the sound change and I get clicky enveloppe. raising the attack doesn't solve the problem in my case in the tracker. Raising the polyphony change the character of the sound I try to produce.
I though it was helm engine, but I think you have workaround the problem with the arpegiator, I will try to reproduce it with a midi which will trig fast helm, to see if this issue really exist.
So I think, you have done some black magic in the "arpegiator" and I need to understand what and how this is done :)

I call noteOn(note,velocity) and noteOff(note), getControls().at and in a thread 1.
I call process(), in a thread 2.
No really complicated stuff, so I have to dig mopo :)

Thank you

from helm.

mtytel avatar mtytel commented on June 14, 2024

Ah ok cool. If you're using the HelmEngine class, you shouldn't have to worry about killing the voices, should automatically be handled, but you can tweak how long it takes for a voice to be killed by setting the VOICE_KILL_TIME value in mopo/src/common.h. I don't think that's your problem though.

Another thing you might run into is that the internal values for envelope time (e.g attack, decay, release) are squared before they are used. So setting attack to a value of 0.1 gives a time of 0.01 secs. That said, if you set the attack to 0.01 directly it will give you an attack time of 0.0001 secs which will definitely click. I know some synths have a 0.01 sec minimum on their attack, but some people want the clicks in their patches so I left a 0 sec minimum.
I'm not sure how you are setting all the values, but you may try setting a longer attack.

I'm aware this is a little confusing, but these controls need to have linear internal values so we can modulate them with an LFO/Envelope. Then after adding the internal value to all modulations we do whatever scaling/skewing we want. For the attack/decay/release we want more resolution on the smaller time values and less resolution when they're longer. Quadratic scaling works well for this.

from helm.

yoyz avatar yoyz commented on June 14, 2024

Yes I'm using the HelmEngine because it's the most easy way to plug to.
I juste rename it to avoid namespace clash with cursynth ( and maybe the issue is hidden somewhere here ).
But I think someway I have to worry about the voice and I don't understand why because when I build your gui it work.
I have try midi and I can't reproduce it in your code.
When I play sound with helm and there is a lot of space between note it play really nice sound no problem, but when two trig are too close it click.
And in my specific case it's clicky when I trig noteOn and there is already a sound play on a voice.
The attack reduce the problem but it does not fix it.
So I miss an obvious point somewhere.

Here is the waveform produce from my code when I do a fast arpegiator on sine wave : http://imagebin.ca/v/26OHKeXkS8sH
And you can see the sound reduce fast then change fast and this fast change make a click.
And here is the wrapper I use above your code : https://gist.github.com/yoyz/5d40afe16d6a908ef494
So I don't think I do too much tricky stuff.

void init() put the system in a default state
int tick() produce a 16bit sample,
setI(int what,int val), setF(int what,float val) modify your engine, with value sent between 0 and 127 and mapped according to helm_common.cpp.

So if you see an obvious misunderstanding or misconfiguration from this part on how to use helm engine just tell me.
I have work ten hours this week to track down this issue and I think I will need ten hours more to fix it and I really think I miss a concept on the engine.
Anyway a big thank you to share it, it's a great software.

from helm.

yoyz avatar yoyz commented on June 14, 2024

I've found my issue.
I reset a variable when I call .reset() in my code. And it is called before I trig a noteOn. So when multiple note are played it click.
It is in anyway related to your code.
So thanks a lot for your tips and your hints, it help me a lot to speedup the resolution.

from helm.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.