SynthMaker

dB

Archive · 2006 8 old posts

From the original SynthMaker forum (2004–2014), with its members’ names and dates.

tecknoize ·

Quick question... How do you calculate dB from a -1 to 1 magnitude range? 😕

stefan ·

tecknoize wrote: Quick question... How do you calculate dB from a -1 to 1 magnitude range? 😕

First you need to find the amplitude of the signal, so take the absolute value of it. Then to convert a linear amplitude to a logarithmic (dB) one do: dB = 20 * log10(linearAmplitude)

tecknoize ·

Thanks (I think) it works! But how does software like FL or Cubase get a steady dB display when playing a sine wave for exemple? Do they analyse a small part to get the max dB of this part? I think I'm missing something... might be too tired 😮

stefan ·

tecknoize wrote: Thanks (I think) it works! But how does software like FL or Cubase get a steady dB display when playing a sine wave for exemple? Do they analyse a small part to get the max dB of this part? I think I'm missing something... might be too tired 😮

Analyse a small part would give you something similar to a RMS value. However, I'd recommend hooking the envelope follower up at the input signal, very short attack and long release (1-2 seconds) and then calculate the dB value from the output of the envelope follower.

Tom7777 ·

I recently had the need to do this myself, im guessing the same applys for 0-1 values right? can you do calculations like that with green data or would it have to be done in the code component? I don't do maths stuff much 😀

sambean ·

You'd want to do as little as possible with the steams/code to save cpu..

So what to do is take the signal you wan't to measure, attatch a mono to float, then do the rest in 'greens':

Signal->mono2float->abs module->x20->log10->dB

This has no smoothing though, to do this have a look in the 'Level meter' control in the toolbox, there's a green smoothie there... 😉

BTW devs, the level meter still hangs if it gets a #inf or #NAN value, and it's quite difficult to remedy if you don't know where the smooth module is.. Try feeding it a 1/0 signal to see..

Cheers

Sam

Tom7777 ·

Thanks Sambean 😀

stefan ·

Thanks sambean! Needs to be looked into!

Wrote something here? To have a post removed or your name hidden, write to [email protected].

Before your first post

A few rules keep this a friendly place. You agree to them once.

Shown next to what you post, here and in the app. It doesn’t have to be your real name: 3–24 lower-case letters, digits or _ (capitals become lower case, spaces become _).

    Then your post goes up straight away.

    Delete this reply?

    Open it in SynthMaker?

    It goes on the track you’re editing there, in place of that track’s sound, and into My sounds. Your other tracks stay as they are.

    Want to keep that track’s sound? Start a new song in SynthMaker first (Song › New song), then open this.

    Report this reply?

    Only the developer reads reports. The person isn’t told who reported them.

    What’s wrong with it?

    Block this person?

    You won’t see their posts and replies here any more. They aren’t told, and you can unblock them at any time.

    People you’ve blocked

    Their posts and replies are hidden from you. Unblock someone to see them again.

    The community rules

    A few rules keep this a friendly place. Everyone agrees to them once, before their first post.