Is my hearing wrong but, all synths notes are evenly spaced.

Discuss music production with Ableton Live.
Paul G Griffiths
Posts: 137
Joined: Fri Oct 28, 2016 6:11 pm
Location: Outside the Universe

Is my hearing wrong but, all synths notes are evenly spaced.

Post by Paul G Griffiths » Thu May 25, 2017 12:37 pm

Black notes are supposed to be half a note up from a white note.
But Abletons, Massive, ABSynth & Synthmaster all sound like 12 evenly spaced notes.

I started making my own synth and found equations on the net like:

Code: Select all

x = (440. * exp(.057762265 * (x - 69.)));
Seems everywhere people use this equation.
But that only produces 12 evenly spaced notes, so is wrong.

I came up with:

Code: Select all

void CreateNoteTable(SAMPLE_TYPE *table)
{
	int no = 0;
	long double f = (long double)261.626; //C3
	f /= (long double)2.0; //C2
	f /= (long double)2.0; //C1
	f /= (long double)2.0; //C0
	f /= (long double)2.0; //C-1
	f /= (long double)2.0; //C-2

	for (int i = 0; i < NUM_FREQ; i++)	// 128 midi notes
	{
		no++;

		switch (no)
		{
		case 1:
			{
				table[i] = f + ((f / (long double)7.0) * (long double)0.0);
			}
			break;
		case 2:
			{
				table[i] = f + ((f / (long double)7.0) * (long double)0.5);
			}
			break;
		case 3:
			{
				table[i] = f + ((f / (long double)7.0) * (long double)1.0);
			}
			break;
		case 4:
			{
				table[i] = f + ((f / (long double)7.0) * (long double)1.5);
			}
			break;
		case 5:
			{
				table[i] = f + ((f / (long double)7.0) * (long double)2.0);
			}
			break;
		case 6:
			{
				table[i] = f + ((f / (long double)7.0) * (long double)3.0);
			}
			break;
		case 7:
			{
				table[i] = f + ((f / (long double)7.0) * (long double)3.5);
			}
			break;
		case 8:
			{
				table[i] = f + ((f / (long double)7.0) * (long double)4.0);
			}
			break;
		case 9:
			{
				table[i] = f + ((f / (long double)7.0) * (long double)4.5);
			}
			break;
		case 10:
			{
				table[i] = f + ((f / (long double)7.0) * (long double)5.0);
			}
			break;
		case 11:
			{
				table[i] = f + ((f / (long double)7.0) * (long double)5.5);
			}
			break;
		case 12:
			{
				table[i] = f + ((f / (long double)7.0) * (long double)6.0);
				f *= 2.0;
				no = 0;
			}
			break;

table[i] *= 128.0;
		}
	}
}
At least my synth sounded like a proper piano keyboard notes, black were half note above white.
Seems I'm a cleverer than the rest so Ill probably create a full synth and find out.
Probably shouldn't post my code as I seem to believe everyone else is totally stupid. lol :mrgreen:
Edit: just found a mistake in my code so must be my old code, never mind hehe,

Thing is though if you investigate tuning some people use C3 as the start and some pro orchestra's use A3 as the start. Horses for courses I guess.
Griffiths Engines: http://griffithsengines.com - ArcturusDrive©

Angstrom
Posts: 14923
Joined: Mon Oct 04, 2004 2:22 pm
Contact:

Re: Is my hearing wrong but, all synths notes are evenly spaced.

Post by Angstrom » Thu May 25, 2017 1:03 pm

Perhaps I'm misunderstanding you but
Black notes are supposed to be half a note up from a white note.
is incorrect and strangely phrased.
<socrates>
Is there a black note which is one half note up from the white note E?
Is there a black note which is one half note up from the white note B?
</socrates>

An octave (in 12 tone equal temperament) really is just 12 evenly spaced notes.
you can name these notes a number of different ways.
B flat, is a black note, but F flat is a white note.
G double sharp is the same pitch as A natural.

If you are planning on including different temperaments and custom tunings such as Just Intonation into your synth you could go for a tuning table.

but if you are only making a basic "Equal temperament 12 tone" synth to be in tune with most western music - you might as well stick with the basic way everyone else does it.

Paul G Griffiths
Posts: 137
Joined: Fri Oct 28, 2016 6:11 pm
Location: Outside the Universe

Re: Is my hearing wrong but, all synths notes are evenly spaced.

Post by Paul G Griffiths » Thu May 25, 2017 1:12 pm

Angstrom wrote:Perhaps I'm misunderstanding you but
Black notes are supposed to be half a note up from a white note.
is incorrect and strangely phrased.
<socrates>
Is there a black note which is one half note up from the white note E?
Is there a black note which is one half note up from the white note B?
</socrates>

An octave (in 12 tone equal temperament) really is just 12 evenly spaced notes.
you can name these notes a number of different ways.
B flat, is a black note, but F flat is a white note.
G double sharp is the same pitch as A natural.

If you are planning on including different temperaments and custom tunings such as Just Intonation into your synth you could go for a tuning table.

but if you are only making a basic "Equal temperament 12 tone" synth to be in tune with most western music - you might as well stick with the basic way everyone else does it.
What can I say, I have not played a real piano since school days, but defiantly remember a black note is halfway between the two white notes either side of it and the 7 white notes are evenly spaced.
Thought that was the norm for a piano.
That's why black notes are called half steps.

Just because everyone is using 12 evenly spaced notes does not mean their correct? That's how a guitar is, and believe that's not like a piano.
Griffiths Engines: http://griffithsengines.com - ArcturusDrive©

Angstrom
Posts: 14923
Joined: Mon Oct 04, 2004 2:22 pm
Contact:

Re: Is my hearing wrong but, all synths notes are evenly spaced.

Post by Angstrom » Thu May 25, 2017 1:28 pm

Um, yes 12 evenly spaced semitones is correct.
a black note is halfway between the two white notes either side of it
look at this image
Image

each consecutive note is one semitone up from its predecessor. regardless of colour. Colour means nothing. it's a decoration, an accident of history.
whiteness and blackness of notes is only relevant as a visual aid, and not related intrinsically to pitch.
it doesn't matter about white notes, black notes, or what colour is "between" what other colour. The colours are immaterial. What's important is : each consecutive note is a semitone up from its predecessor and an octave contains 12 of those semitones.
So A to A# is one semitone, A# to B is one semitone, B to C is one semitone, etc.

musical pitch is of course roughly logarithmic, not linear - so those 12 semitone per octave divisions are not linear but log. hence the formula.

musical frequencies up the octaves
Image

Paul G Griffiths
Posts: 137
Joined: Fri Oct 28, 2016 6:11 pm
Location: Outside the Universe

Re: Is my hearing wrong but, all synths notes are evenly spaced.

Post by Paul G Griffiths » Thu May 25, 2017 1:36 pm

Angstrom wrote:Um, yes 12 evenly spaced semitones is correct.
a black note is halfway between the two white notes either side of it
look at this image, and ignore the colour of the notes.
Image

each consecutive note is one semitone up from its predecessor.
whiteness and blackness of notes is only relevant as a visual aide, and not related intrinsically to pitch.
it doesn't matter about white notes, black notes, or what colour is "between" what other colour. The colours are immaterial. What's important is : each consecutive note is a semitone up from its predecessor and an octave contains 12 of those semitones.
So A to A# is one semitone, A# to B is one semitone, B to C is one semitone, etc.

musical pitch is of course logarithmic, not linear - so those divisions are log. hence the formula.

musical frequencies up the octaves
Image
Your saying it yourself there though:
tone, semi-tone, tone, semi-tone, tone, tone... is every note.
C major is all the tones. Equally spaced I believe. Is why C# is a half tone above C and half a tone below D.
That means there not evenly spaced.
I believe I'm traditionally correct here.

If you check here: https://en.wikipedia.org/wiki/Pitch_(music)
the equation that I said is wrong in my first post is a MIDI standard, not a piano standard.

I have just checked youtube for piano tuning videos and they start at A3 at 440hz but MIDI starts at C3 at 261.626hz.
This does tell me the MIDI way of doing things is not traditional.

To be honest I liked the way my synth sounded, I even added harmonics like when playing C3, add double the freq, then double again going all the way up to 22,000 hz. Adding in a phaser effect and I made the wildest phased alien sound I have ever heard and sounded as good as any analogue synth I have ever heard. My synth sounded very much like Dracula playing in a cathedral.
Last edited by Paul G Griffiths on Thu May 25, 2017 1:47 pm, edited 1 time in total.
Griffiths Engines: http://griffithsengines.com - ArcturusDrive©

Angstrom
Posts: 14923
Joined: Mon Oct 04, 2004 2:22 pm
Contact:

Re: Is my hearing wrong but, all synths notes are evenly spaced.

Post by Angstrom » Thu May 25, 2017 1:47 pm

I'm guessing what you are confused about is the difference between the physical keyboard and the frequencies.
frequency is not linear, the keyboard means nothing with regard to the frequency dispersal. Lets look at the frequencies between notes,

A4 is 440hz,
A#4 is 466.16hz
B4 is 493.88hz

Compare the numbers:
A4 to A#4 = 26.16 hz
A#4 to B4 = 27.72 hz

So, is the black note of A#4 exactly in between A4 and B4 ?
You can see that the frequency differences are increasing and the A#4 to B4 gap is larger. So what does this mean ... aren't the notes meant to be 12 equal divisions of an octave?
yes, but not on a linear scale, they are 12 equal divisions on a log curve. And frequency is closer to log. that's why we use that formula with the exp in it.
Last edited by Angstrom on Thu May 25, 2017 1:55 pm, edited 1 time in total.

Paul G Griffiths
Posts: 137
Joined: Fri Oct 28, 2016 6:11 pm
Location: Outside the Universe

Re: Is my hearing wrong but, all synths notes are evenly spaced.

Post by Paul G Griffiths » Thu May 25, 2017 1:53 pm

Well disagree all day on this one so ill watch some youtube vids to find out which youtubers are pro.
C# is a half tone above C. All tones are equally spaced. And each A is double the freq as one before it.
That's what I currently believe.

I'm pretty sure as you go up the white keys its a 7 "la la la la la la la", then another 7 "la la la la la la la" and so on...
It's not a "la la la la la la la la la la la la la la la"...

My synth although was only 1 oscillator and an envelope sounded good when going up all the whites, had this 7 notes at a time pattern.
Last edited by Paul G Griffiths on Thu May 25, 2017 2:02 pm, edited 1 time in total.
Griffiths Engines: http://griffithsengines.com - ArcturusDrive©

stringtapper
Posts: 6302
Joined: Sat Aug 28, 2004 6:21 pm

Re: Is my hearing wrong but, all synths notes are evenly spaced.

Post by stringtapper » Thu May 25, 2017 1:59 pm

Paul G Griffiths wrote:Your saying it yourself there though:
tone, semi-tone, tone, semi-tone, tone, tone... is every note.
C major is all the tones. Equally spaced I believe. Is why C# is a half tone above C and half a tone below D.
That means there not evenly spaced.
I believe I'm traditionally correct here.
You're neither traditionally correct nor untraditionally correct. Just confused.

C major is not "all the tones." C major is a key. Keys are based on limited sets of pitches (or scales) from the pool of 12 pitches that comprise the chromatic scale. Every key contains a diatonic set of 7 pitches from the larger set of 12, and the other 5 pitches are considered chromatic (or "foreign") to that key.

As far as the piano is concerned, forget all of the weird stuff you've been thinking previously and just know this: each key is a half step away from the key next to it, regardless of the color. Full stop.
Unsound Designer

Paul G Griffiths
Posts: 137
Joined: Fri Oct 28, 2016 6:11 pm
Location: Outside the Universe

Re: Is my hearing wrong but, all synths notes are evenly spaced.

Post by Paul G Griffiths » Thu May 25, 2017 2:06 pm

stringtapper wrote:
Paul G Griffiths wrote:Your saying it yourself there though:
tone, semi-tone, tone, semi-tone, tone, tone... is every note.
C major is all the tones. Equally spaced I believe. Is why C# is a half tone above C and half a tone below D.
That means there not evenly spaced.
I believe I'm traditionally correct here.
You're neither traditionally correct nor untraditionally correct. Just confused.

C major is not "all the tones." C major is a key. Keys are based on limited sets of pitches (or scales) from the pool of 12 pitches that comprise the chromatic scale. Every key contains a diatonic set of 7 pitches from the larger set of 12, and the other 5 pitches are considered chromatic (or "foreign") to that key.

As far as the piano is concerned, forget all of the weird stuff you've been thinking previously and just know this: each key is a half step away from the key next to it, regardless of the color. Full stop.
Well, when I played the piano at school the white notes go up sounding equally whatever the frequancies are and the black notes are a half up.

As I said ill check the pro tuners on youtube.
Is why there called semi-tones.
Griffiths Engines: http://griffithsengines.com - ArcturusDrive©

Paul G Griffiths
Posts: 137
Joined: Fri Oct 28, 2016 6:11 pm
Location: Outside the Universe

Re: Is my hearing wrong but, all synths notes are evenly spaced.

Post by Paul G Griffiths » Thu May 25, 2017 2:15 pm

Seems you maybe right, :oops:
major is tone, tone, semi-tone, tone, tone, tone, semi-tone
so in c major, B to C is a semi-tone, which yes does mean 12 evenly spaced notes.

Still think my synth sounded better though.
As had this 7 at a time la la la la la la la.
Then another 7 la la la la la la la.
Each octave was distinctive.

Ill recompile it so people can try it out...
Also upload an audio clip comparing the MIDI way with my way for quick comparison.
Griffiths Engines: http://griffithsengines.com - ArcturusDrive©

stringtapper
Posts: 6302
Joined: Sat Aug 28, 2004 6:21 pm

Re: Is my hearing wrong but, all synths notes are evenly spaced.

Post by stringtapper » Thu May 25, 2017 2:22 pm

Dunning-Kruger Effect: Music Theory Edition
Unsound Designer

Paul G Griffiths
Posts: 137
Joined: Fri Oct 28, 2016 6:11 pm
Location: Outside the Universe

Re: Is my hearing wrong but, all synths notes are evenly spaced.

Post by Paul G Griffiths » Thu May 25, 2017 3:41 pm

I recompiled it and tried it but as it's only 1 oscillator it just sounds "different" than operator using 1 oscillator also.
Both sound terrible.

To be honest using the midi equation does not sound good also. Some notes sound ok, some sound bad to the ear.
Someone who is a pro piano tuner should spend time making a human ear pleasing freq table other than simply using the common midi to freq equation.

OK, my code is wrong: SHOOT ME.

To be honest digital synths mostly sound terrible to me and I'm getting bored again making music.
Also GOT bored programming 3D graphics too.
Too many years learning now without making money.
Used to repair TV's and VHS video players for a living, that was good and interesting, though now a tv contains a couple of chips and a power supply.
But I have found a new interest in currency trading(Forex).
Can double my money each day when practicing so should be rich soon and have a big house, flash car and A HOLIDAY! 8)
Last edited by Paul G Griffiths on Thu May 25, 2017 4:18 pm, edited 1 time in total.
Griffiths Engines: http://griffithsengines.com - ArcturusDrive©

stringtapper
Posts: 6302
Joined: Sat Aug 28, 2004 6:21 pm

Re: Is my hearing wrong but, all synths notes are evenly spaced.

Post by stringtapper » Thu May 25, 2017 4:14 pm

:lol:

Yeah wouldn't it be nice if someone did that?

I'm laughing because what you're experiencing is a dislike of equal temperament.

Equal temperament has been the standard for a long time now, but it certainly wasn't the first tuning scheme, not by a long shot.

Just intonation, which is a tuning that contains pure ratios, is the earliest documented type of tuning and dates back to the Greeks through what is known as "Pythagorean Tuning.".

So yeah, someone has already done it… like 2500 years ago.
Unsound Designer

Paul G Griffiths
Posts: 137
Joined: Fri Oct 28, 2016 6:11 pm
Location: Outside the Universe

Re: Is my hearing wrong but, all synths notes are evenly spaced.

Post by Paul G Griffiths » Thu May 25, 2017 4:24 pm

stringtapper wrote::lol:

Yeah wouldn't it be nice if someone did that?

I'm laughing because what you're experiencing is a dislike of equal temperament.

Equal temperament has been the standard for a long time now, but it certainly wasn't the first tuning scheme, not by a long shot.

Just intonation, which is a tuning that contains pure ratios, is the earliest documented type of tuning and dates back to the Greeks through what is known as "Pythagorean Tuning.".

So yeah, someone has already done it… like 2500 years ago.
Could be, I just know that some notes oscillate nicely and are loud, others oscillate horribly and are quieter.
Could be my speakers though but there pretty good, 15 inches with big horns too and cost me £700.
Acoustic instruments are nice, but not digital.
Griffiths Engines: http://griffithsengines.com - ArcturusDrive©

yur2die4
Posts: 7161
Joined: Sat Oct 03, 2009 3:02 am
Location: Menasha, Wisconsin
Contact:

Re: Is my hearing wrong but, all synths notes are evenly spaced.

Post by yur2die4 » Thu May 25, 2017 9:22 pm

There are a lot of synths that do support unique turnings. I think there is also a format called 'scala'.

If you're. It digging equal temperament, there are no rules that say you can't at least explore your personal interpretations.

Just because your assumption was kind of off from the standard doesn't mean you can't still have a play at it and see what new things you can come up with. Maybe go on a search for vsts that support alternate turnings and make a collection of scalas.

Since you were kind of challenged with the idea, that means it is a good opportunity to develop a full understanding of something new to you.

Post Reply