dB to data conversion?
-
Clearscreen
- Member
- Posts: 482
- Location: Australia
- Contact:
this is probably a really simle question but i'm trying to patch a simple gate for myself that has very long attack time, but i can't figure out how to effectively use the dB info as a threshold trigger. every time i plug it into a math input i get strange numbers that seem unrelated to the audio level... i found a workaround in that the envelope follower converts the dB level (with minimum attack/release time) for use in a data input but i'm interested to work it out as it might come in useful later on. i've also been googling various maths sites trying to work out a formula for the conversion but haven't had any luck yet. so far i know dB are logarithmic and i'm pretty sure log10(x) is involved somewhere... any body able to help me with this?
thanks
C
thanks
C
trigger with db : choose math module " >" , if db is higher ( >) than threshold , the module will output a gate.
You have also a "db to multiplication coeff" converter module (in math folder). This module convert db value to a 0-1 range values.
On the "envelopp follower module" , you have also an "env" output pin. this output values beetween 0 and 1.
The "peak follower" module trigger a gate signal if input is higher than the threshold.
Hope it help/
You have also a "db to multiplication coeff" converter module (in math folder). This module convert db value to a 0-1 range values.
On the "envelopp follower module" , you have also an "env" output pin. this output values beetween 0 and 1.
The "peak follower" module trigger a gate signal if input is higher than the threshold.
Hope it help/
-
Clearscreen
- Member
- Posts: 482
- Location: Australia
- Contact:
thanks for the reply moody33 - i understand what you're saying about the threshold for building a gate, and i've incorporated an hysteresis module to prevent chattering, so far so good. but i have to use the "dB" ouput of the envelope follower to get a meaningful value of the dB - for example, if i take the audio from a sampler module (yellow pin) and plug it into the A (data pin) input on a ">" module the numbers being input to the ">" module are very small, bipolar and differ by small incerments.
this is diificult to set a threshold for as the numbers are so small and the logarithmic dB scale meaning that an tiny difference is a large level change. what i want is a numerical output of the dB value that the wire between them is carrying - and so far the only way i've seen to do that is take the dB data output from the envelope follower... there must be something else i'm either missing or don't understand here
i'm intrigued by what you've said about the "db to multiplication coeff" module, as i assumed that it would do what you've described, but again in practice it doesn't seem to me to be doing that - when i plug an audio source (from a yellow pin) into it i get values around 0.99 constantly coming out of it even though i know there's more variation than that....
on reflection, what i guess i'm trying to do is simply convert the dB (eg -21dB) value in a yellow audio wire into a value readable by a data input (eg still say -21dB but in a different format that the math modules can use)? is there an easy way to do this that i'm too slow to notice?
this is diificult to set a threshold for as the numbers are so small and the logarithmic dB scale meaning that an tiny difference is a large level change. what i want is a numerical output of the dB value that the wire between them is carrying - and so far the only way i've seen to do that is take the dB data output from the envelope follower... there must be something else i'm either missing or don't understand here
i'm intrigued by what you've said about the "db to multiplication coeff" module, as i assumed that it would do what you've described, but again in practice it doesn't seem to me to be doing that - when i plug an audio source (from a yellow pin) into it i get values around 0.99 constantly coming out of it even though i know there's more variation than that....
on reflection, what i guess i'm trying to do is simply convert the dB (eg -21dB) value in a yellow audio wire into a value readable by a data input (eg still say -21dB but in a different format that the math modules can use)? is there an easy way to do this that i'm too slow to notice?
Take a look inside the usine patch call "gate" in Usine->dynamics folder.
After the "env follower " there is a " >= " module link to the db out pin. The db output IS a data value ( blue pin) with a -80db to +12 range. You need to convert yellow pin to blue one and the env follower do the job.
To avoid "chattering" set the release time according to your needs. If you need a long attack time, you can set it up to 3000 sec....
The "gate " patch is a good starting point , don't you think?
About the "db to multi coeff" , it doesn't convert yellow pin in blue one. He converts db values ( blue pin from env follower for example ), into a 0 to 1 value. The multi coeff to db do the same thing in reverse ( 0 to 1 to db value).
After the "env follower " there is a " >= " module link to the db out pin. The db output IS a data value ( blue pin) with a -80db to +12 range. You need to convert yellow pin to blue one and the env follower do the job.
To avoid "chattering" set the release time according to your needs. If you need a long attack time, you can set it up to 3000 sec....
The "gate " patch is a good starting point , don't you think?
About the "db to multi coeff" , it doesn't convert yellow pin in blue one. He converts db values ( blue pin from env follower for example ), into a 0 to 1 value. The multi coeff to db do the same thing in reverse ( 0 to 1 to db value).
-
Clearscreen
- Member
- Posts: 482
- Location: Australia
- Contact:
No worries, i'm doing at the moment - i was wondering if there was another way to do this that didn't involve the 'env follower'... i'm guessing not. also, for future reference, to prevent chattering you can use the 'hysteresis' module in the 'data manipulation' section of the browser, it's been suiting my end purpose better here.moody33 wrote:After the "env follower " there is a " >= " module link to the db out pin. The db output IS a data value ( blue pin) with a -80db to +12 range. You need to convert yellow pin to blue one and the env follower do the job.
and you're right, the gate module was a good starting point, but it's limited in it's attack time - basically i'm trying to build a patch emulating the pigtronix attack sustain pedal, and using the info we've already mentioned i've got it working fine - i just thought there would be a better way to convert the audio dB into data dB for threshold setting in my module than having to use the 'env follower' module and introducing the extra 1ms delay inherent in it's shortest attack/release time setting. whatever... i'll put the patch up in the add-ons when i'm finally satisfied with it.
waoo , great !,basically i'm trying to build a patch emulating the pigtronix attack sustain pedal.
i was on the point to ask if someone can built a kind of sustainer pedal , I've tried to find vst , but no results...
will try your addon with pleasure !
-
Clearscreen
- Member
- Posts: 482
- Location: Australia
- Contact:
it's not so much a sustainer as a loooong attack at the moment... as far as i can tell the sustain part of that pedal is only a heavy compressor and i haven't really tackled that part yet. i've just been putting various compressor vst's or slightly feeding back delays in the signal path, but the best result has been by using a reverb that has a hold function - at the moment it gives a form of infinite sustain and dies when you hit a new note or chord. it's still a work in progress for now, but the attack swell and decay part is pretty much done...
Who is online
Users browsing this forum: No registered users and 27 guests
