SynthMaker

signal types and ranges

Archive · 2005 13 old posts

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

lg ·

What are the normal ranges of the various types of float and integer signals in SynthMaker?

• audio signals (are they -1 to +1 like in VST plugins? ) • frequencies (Hz? a fraction of the Nyquist frequency?) • pitches (MIDI note numbers?) • ADSR inputs and other times

unkargherth ·

lg wrote: What are the normal ranges of the various types of float and integer signals in SynthMaker?

• audio signals (are they -1 to +1 like in VST plugins? ) • frequencies (Hz? a fraction of the Nyquist frequency?) • pitches (MIDI note numbers?) • ADSR inputs and other times

• audio signals : as VST -1..1 • frequencies: unless noted 0..1 representing 0..Nyquist • pitches : More or less. Float value corresponding to MIDI Notes (0.0..127.0) • ADSR inputs: Atatck, Decay and Release in number of samples ( you'l find a nice expoential conversion from 0..1 inside VCA module in example.osm). Sustain 0..1. Please detail what "other times" you mean

.... and welcome here lq!!

stefan ·

lg wrote: What are the normal ranges of the various types of float and integer signals in SynthMaker?

• audio signals (are they -1 to +1 like in VST plugins? ) • frequencies (Hz? a fraction of the Nyquist frequency?) • pitches (MIDI note numbers?) • ADSR inputs and other times

Audio signals are in whatever range you want, but -1 to +1 is a good target range.

Frequencies are from 0 to 1, basicly it's normalized frequency, where 1 equals nyquist frequency. (If this seems incorrect, freq 0.5 is nyquist, but I'm quite sure 1.0 is 🙂)

Pitches are supposed to be equal to midi pitches, which means that pitch 60.0 equals middle C, or C-4, which equals approx 261.6Hz.

ADSR Inputs are in number of samples, so one second would equal 44100 samples, if 44100 is the current sample rate. The sustain input however is an ordinary float between 0.0 and 1.0.

I hope this answers your questions. Cheers!

edit: wtf unkargherth 🙂

bones ·

What is Nyquist Frequency? Didn't he write Signal To Noise and A Signal Shattered? [Good books, BTW]

skOre ·

Nyquist is half of the sample frequency.

Think of a waveform displayed. Think of the Line in the middle.

The whole thing covers 44.100 hz, so that is 22.050 from the middle to the top and another 22.050 from the middle to the bottom.

If something exceeds this, it will clip.

[dunno if this is correct 😉]

Wikipedias explaination

unkargherth ·

bones wrote: What is Nyquist Frequency? Didn't he write Signal To Noise and A Signal Shattered? [Good books, BTW]

This is Eric S. Nylund, not Nyquist 🙂

grease ·

skOre wrote: Nyquist is half of the sample frequency.

Think of a waveform displayed. Think of the Line in the middle.

The whole thing covers 44.100 hz, so that is 22.050 from the middle to the top and another 22.050 from the middle to the bottom.

If something exceeds this, it will clip.

[dunno if this is correct 😉]

Wikipedias explaination

Seems you're getting bit depth mixed up with sampling frequency - the sampling frequency just represents how many sample points are calculated each second. When the sampling frequency is at 44100 Hz (Hertz means "per second"), then according to Nyquist, the highest frequency that can be represented in the digital audio is at 22050 Hz (which is beyond the range of human hearing). This frequency is called the Nyquist frequency. I guess there's a lot more complexity to the story, with things like aliasing, etc. (I don't know that stuff too well!)

The height of the signal above and below zero is broken up into pieces according to the given bit depth. 16 bit audio has 2^(16) different amplitude levels. Any signal that has an amplitude above that will clip when digitized.

By the way, if frequency values are set with 0..1 representing 0..Nyquist frequency, then this seems to be dependent on what samplerate is being used. Or does the "Nyquist frequency" in SynthMaker always mean 22050 Hz?

unkargherth ·

grease wrote: By the way, if frequency values are set with 0..1 representing 0..Nyquist frequency, then this seems to be dependent on what samplerate is being used. Or does the "Nyquist frequency" in SynthMaker always mean 22050 Hz?

That's what y say 0.. Nyquist and not 0..22050. AFAIK (and tested , using asio at SR 48000 ) if modules are not lazy coded ( not assuming 44100 SR) all should work perfectly on diverse sample rate, becuase std freq spec it's allways correct respect to runnig sample rate

grease ·

unkargherth wrote: grease wrote: By the way, if frequency values are set with 0..1 representing 0..Nyquist frequency, then this seems to be dependent on what samplerate is being used. Or does the "Nyquist frequency" in SynthMaker always mean 22050 Hz?

That's what y say 0.. Nyquist and not 0..22050. AFAIK (and tested , using asio at SR 48000 ) if modules are not lazy coded ( not assuming 44100 SR) all should work perfectly on diverse sample rate, becuase std freq spec it's allways correct respect to runnig sample rate

Ah ha, I see - I just tried my simple synth example at different sample rates, and indeed it was detuned. So Nyquist does change when samplerate changes, as you said. So I guess I need to know how to code properly without assuming 44100 samplerate. Is there a module that reads host samplerate? I'll look into it...

grease ·

And I just tried FM3x at different samplerates, and it seems to only work at 44100, or else it's detuned. Actually...I think I might start a new thread on this, since I'm a newbie and it might be a newbie kind of question that would help other newbies too...

unkargherth ·

Yes. there's a such module: VST>>Timing info

grease ·

unkargherth wrote: Yes. there's a such module: VST>>Timing info

we posted at the same time! OK..I'm going to start a new thread on this if you don't mind...

jorge ·

grease wrote: And I just tried FM3x at different samplerates, and it seems to only work at 44100, or else it's detuned.

I should warn that although the mechanism to support different sample rates is already implemented, it hasnt been high priority at all and it might not work, we never used it or even test it. Whatever you find out will be very useful.

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.