back to list

MIDI Note Numbers, Middle C on synths, Scala questions

🔗paolovalladolid <phv40@hotmail.com>

4/4/2007 9:18:08 PM

In my testing process, I came across a confusing detail - MIDI Note
Number 0. If synths typically map Note Number 60 to Middle C, then
MIDI Note Number 0 maps to 5 octaves below middle C, which is pretty
darn low at around 8 Hz!

The synth that I'm testing goes up to 4 octaves below middle C, so the
lowest playable note would be MIDI Note Number 12. Is this typical of
synths?

If I wanted to load a 96TET Scala file, do you typically expect to see
the lowest pitch of the file (1/1) mapped to MIDI Note Number 0? If
not, to which Note Number would you normally expect to see this mapped?

If the 96TET tuning was mapped to MIDI Note Number 0, and all the
successive pitches were mapped so that 2/1 of that tuning is mapped to
MIDI Note Number 95, do you expect to see the tuning continue into the
next octave(s) until all 127 MIDI Note Numbers are exhausted?

🔗Graham Breed <gbreed@gmail.com>

4/4/2007 9:50:20 PM

paolovalladolid wrote:
> In my testing process, I came across a confusing detail - MIDI Note
> Number 0. If synths typically map Note Number 60 to Middle C, then
> MIDI Note Number 0 maps to 5 octaves below middle C, which is pretty
> darn low at around 8 Hz!
> > The synth that I'm testing goes up to 4 octaves below middle C, so the
> lowest playable note would be MIDI Note Number 12. Is this typical of
> synths?
> > If I wanted to load a 96TET Scala file, do you typically expect to see
> the lowest pitch of the file (1/1) mapped to MIDI Note Number 0? If
> not, to which Note Number would you normally expect to see this mapped?

I'd expect it to map correctly. Low *pitches* may not work but low *note* numbers should be responsive.

> If the 96TET tuning was mapped to MIDI Note Number 0, and all the
> successive pitches were mapped so that 2/1 of that tuning is mapped to
> MIDI Note Number 95, do you expect to see the tuning continue into the
> next octave(s) until all 127 MIDI Note Numbers are exhausted?

All 128 note numbers.

Graham

🔗paolovalladolid <phv40@hotmail.com>

4/5/2007 5:04:41 AM

--- In tuning@yahoogroups.com, Graham Breed <gbreed@...> wrote:
>
> paolovalladolid wrote:
> > In my testing process, I came across a confusing detail - MIDI Note
> > Number 0. If synths typically map Note Number 60 to Middle C, then
> > MIDI Note Number 0 maps to 5 octaves below middle C, which is pretty
> > darn low at around 8 Hz!
> >
> > The synth that I'm testing goes up to 4 octaves below middle C, so the
> > lowest playable note would be MIDI Note Number 12. Is this typical of
> > synths?
> >
> > If I wanted to load a 96TET Scala file, do you typically expect to see
> > the lowest pitch of the file (1/1) mapped to MIDI Note Number 0? If
> > not, to which Note Number would you normally expect to see this
mapped?
>
> I'd expect it to map correctly. Low *pitches* may not work
> but low *note* numbers should be responsive.

What does "map correctly" mean, though? MIDI Note Number 0 = 1/1,
MIDI Note Number 1 = 1st specified ratio or Hz offset from 1/1, and so on?

I read the Scala format spec several times and couldn't find a
reference to a mapping of the 1st degree of the scale to MIDI Note
Number 0.

> > If the 96TET tuning was mapped to MIDI Note Number 0, and all the
> > successive pitches were mapped so that 2/1 of that tuning is mapped to
> > MIDI Note Number 95, do you expect to see the tuning continue into the
> > next octave(s) until all 127 MIDI Note Numbers are exhausted?
>
> All 128 note numbers.

This helps. Thanks.

Paolo

🔗Manuel Op de Coul <manuel.op.de.coul@eon-benelux.com>

4/5/2007 5:10:44 AM

--- In tuning@yahoogroups.com, "paolovalladolid" <phv40@...> wrote:

> If I wanted to load a 96TET Scala file, do you typically expect to see
> the lowest pitch of the file (1/1) mapped to MIDI Note Number 0? If
> not, to which Note Number would you normally expect to see this mapped?

You can map it to any note number you want, see under "Mappings".
There is no automagical adaption of it. This mapping applies to all
functions of Scala where MIDI note numbers are involved.

> If the 96TET tuning was mapped to MIDI Note Number 0, and all the
> successive pitches were mapped so that 2/1 of that tuning is mapped to
> MIDI Note Number 95, do you expect to see the tuning continue into the
> next octave(s) until all 127 MIDI Note Numbers are exhausted?

You can specify this too with the mapping, so you needn't wonder what
to expect.

>It's because of the remapping of the MIDI Note Number values - under
> the Fokker tuning, up to 5 octaves of a standard piano/organ style
>keyboard map to a single octave.

I remember Audio Compositor had this bug too, it was never fixed. I've
never used it since. Timidity got it right.

>Or do people just send bug reports on their Scala-loading synth if it
>doesn't sound right wither their chosen tuning?

That's the best thing to do!

Manuel

🔗Graham Breed <gbreed@gmail.com>

4/5/2007 5:10:47 AM

paolovalladolid wrote:

> What does "map correctly" mean, though? MIDI Note Number 0 = 1/1,
> MIDI Note Number 1 = 1st specified ratio or Hz offset from 1/1, and so on?
> > I read the Scala format spec several times and couldn't find a
> reference to a mapping of the 1st degree of the scale to MIDI Note
> Number 0.

It's specified in Scala by mapping files, not the scale files.

Graham

🔗paolovalladolid <phv40@hotmail.com>

4/5/2007 5:34:05 AM

--- In tuning@yahoogroups.com, Graham Breed <gbreed@...> wrote:
>
> paolovalladolid wrote:
>
> > What does "map correctly" mean, though? MIDI Note Number 0 = 1/1,
> > MIDI Note Number 1 = 1st specified ratio or Hz offset from 1/1,
and so on?
> >
> > I read the Scala format spec several times and couldn't find a
> > reference to a mapping of the 1st degree of the scale to MIDI Note
> > Number 0.
>
> It's specified in Scala by mapping files, not the scale files.
>
> Graham

I see. I don't have Mac OS 10.4 on my PowerMac, so I'm not using
Scala (the app) itself at the moment.

Looks like the mapping issue I'm encountering is specific to the synth
I'm testing.

🔗paolovalladolid <phv40@hotmail.com>

4/5/2007 8:37:08 AM

--- In tuning@yahoogroups.com, "Manuel Op de Coul"
<manuel.op.de.coul@...> wrote:
>
> --- In tuning@yahoogroups.com, "paolovalladolid" <phv40@> wrote:
>
> > If I wanted to load a 96TET Scala file, do you typically expect to see
> > the lowest pitch of the file (1/1) mapped to MIDI Note Number 0? If
> > not, to which Note Number would you normally expect to see this
mapped?
>
> You can map it to any note number you want, see under "Mappings".
> There is no automagical adaption of it. This mapping applies to all
> functions of Scala where MIDI note numbers are involved.

This makes sense, though I'm not actually using the Scala application
itself. I'm actually testing software that loads .scl files and
generates patches for a specific synth.

The mapping issue is probably within the generated synth patch.

> >It's because of the remapping of the MIDI Note Number values - under
> > the Fokker tuning, up to 5 octaves of a standard piano/organ style
> >keyboard map to a single octave.
>
> I remember Audio Compositor had this bug too, it was never fixed. I've
> never used it since. Timidity got it right.

I think the bugs in the software I'm testing are related to whether it
continues to tune MIDI Note Numbers past a certain value, as well as
the mapping.

> >Or do people just send bug reports on their Scala-loading synth if it
> >doesn't sound right wither their chosen tuning?
>
> That's the best thing to do!

I'll definitely keep working with the software's author to get these
bugs fixed. I may even learn some Python myself, as that is the
development language for this software.

Thanks, Manuel.

Paolo

🔗Manuel Op de Coul <manuel.op.de.coul@eon-benelux.com>

4/5/2007 9:28:55 AM

--- In tuning@yahoogroups.com, "paolovalladolid" <phv40@...> wrote:
> I'm actually testing software that loads .scl files and
> generates patches for a specific synth.

O, I see. Then it makes sense to also support .kbm files, like some
softsynths do. Or perhaps only its header, and assume a linear
mapping. You could also drop scl file support altogether and use .tun
files instead, which simply contain a list of pitches for each midi key.

About how big are these patches, in number of bytes?

> I'll definitely keep working with the software's author to get these
> bugs fixed. I may even learn some Python myself, as that is the
> development language for this software.

Ok, good luck.

Manuel

🔗paolovalladolid <phv40@hotmail.com>

4/5/2007 10:32:55 AM

--- In tuning@yahoogroups.com, "Manuel Op de Coul"
<manuel.op.de.coul@...> wrote:
>
> --- In tuning@yahoogroups.com, "paolovalladolid" <phv40@> wrote:
> > I'm actually testing software that loads .scl files and
> > generates patches for a specific synth.
>
> O, I see. Then it makes sense to also support .kbm files, like some
> softsynths do. Or perhaps only its header, and assume a linear
> mapping. You could also drop scl file support altogether and use .tun
> files instead, which simply contain a list of pitches for each midi key.

Oh! I wasn't aware of the existence of .kbm files. I didn't see any
in the scale archive .zip file. We should definitely consider
incorporating these into the software, which is a Python script that
generates the patch file.

I take it the .kbm format is given at the bottom of this page?
http://www.xs4all.nl/~huygensf/scala/help.htm

What is the difference between Middle Note and Reference Note?

> About how big are these patches, in number of bytes?

The generated DX piano patch in 96-TET is 6.72 KB. Part of it is the
DX piano, and part of it is the virtual modules to set up the tuning
(it's a "virtual modular" type synth).

Paolo

🔗Manuel Op de Coul <manuel.op.de.coul@eon-benelux.com>

4/5/2007 1:20:34 PM

--- In tuning@yahoogroups.com, "paolovalladolid" <phv40@...> wrote:

> Oh! I wasn't aware of the existence of .kbm files. I didn't see any
> in the scale archive .zip file. We should definitely consider
> incorporating these into the software, which is a Python script that
> generates the patch file.

Ok good. The kbm files I have are bundled with Scala, you could
download the zip file with the Windows console version to get them.

>
> I take it the .kbm format is given at the bottom of this page?
> http://www.xs4all.nl/~huygensf/scala/help.htm
>
> What is the difference between Middle Note and Reference Note?

Yes. You don't need to specify the frequency for 1/1 per se, it can be
another note, the reference note. For example if 1/1 is C and A=440.

> > About how big are these patches, in number of bytes?
>
> The generated DX piano patch in 96-TET is 6.72 KB. Part of it is the
> DX piano, and part of it is the virtual modules to set up the tuning
> (it's a "virtual modular" type synth).
>

But if it's not a hardware synth, did you ask the manufacturer to
separate the tuning control messages from the voice or other data?
Some other companies are guilty of putting them together too, like
Korg, and it is an enormous nuisance of course.

Manuel

🔗paolovalladolid <phv40@hotmail.com>

4/5/2007 2:25:49 PM

--- In tuning@yahoogroups.com, "Manuel Op de Coul"
<manuel.op.de.coul@...> wrote:
>
> --- In tuning@yahoogroups.com, "paolovalladolid" <phv40@> wrote:
>
> > Oh! I wasn't aware of the existence of .kbm files. I didn't see any
> > in the scale archive .zip file. We should definitely consider
> > incorporating these into the software, which is a Python script that
> > generates the patch file.
>
> Ok good. The kbm files I have are bundled with Scala, you could
> download the zip file with the Windows console version to get them.

Done. I'll offer to zip up the sample kbm files for the developer if
he needs them. He chose a "hard-coded" 80-note mapping as a
compromise between usability and patch resource usage. The resource
usage for tuning should be more dynamic with the incorporation of .kbm
files into his tool.

> > I take it the .kbm format is given at the bottom of this page?
> > http://www.xs4all.nl/~huygensf/scala/help.htm
> >
> > What is the difference between Middle Note and Reference Note?
>
> Yes. You don't need to specify the frequency for 1/1 per se, it can be
> another note, the reference note. For example if 1/1 is C and A=440.

In the example of a .kbm file (actually, the example.kbm file) with
these settings

Middle Note = 60 (middle C)
Reference Note = 69 (A above middle C)
Reference Pitch = 440 Hz

If I match this file with this .scl file:

! 12-31.scl
!
12 out of 31-tET, meantone Eb-G#
12
!
77.41935
193.54839
309.67742
387.09677
503.22581
580.64516
696.77419
774.19355
890.32258
1006.45161
1083.87097
2/1

does this mean the following will happen on my keyboard controller?

1. Tuning starts at middle C. Notes below that are in 12TET
2. MIDI Note Number 69 is tuned to 440 instead of 890.32258, all other
pitches are offset accordingly (eg Note Number 68 is mapped to pitch =
440 - (890.32258 - 774.19355))

> > > About how big are these patches, in number of bytes?
> >
> > The generated DX piano patch in 96-TET is 6.72 KB. Part of it is the
> > DX piano, and part of it is the virtual modules to set up the tuning
> > (it's a "virtual modular" type synth).
> >
>
> But if it's not a hardware synth, did you ask the manufacturer to
> separate the tuning control messages from the voice or other data?
> Some other companies are guilty of putting them together too, like
> Korg, and it is an enormous nuisance of course.

The synth (Nord Modular G2) doesn't have any inherent tuning control
functionality other than change master tuning from A=440 to something
else, at least as far as I, a new owner of a G2X, can tell. The
developer has been creating tuned patches that include the DX piano so
others can quickly audition tunings on their G2 machines. But
refactoring the tool so that it can produce a tuning block that is
separate from the sound generation block should be done at some point.
If he can't do it, I don't mind taking over, unless someone else in
teh G2 community decides to take it on. I suggested not trying the
physical modeling sounds yet, because those impose a whole new set of
tuning challenges (you have to tune virtual flute holes, pipe lengths,
etc.).

The developer also asked for ideas for incorporating the Variation
functionality, because a G2 patch can have up to 8 sound variations.
I suggested it would be cool to select 8 different tunings using
Variations as an option, but that might sacrifice the ability to
select from 8 timbral variations. We'll have to think about that one...

Paolo

🔗Gene Ward Smith <genewardsmith@sbcglobal.net>

4/5/2007 2:30:07 PM

--- In tuning@yahoogroups.com, "paolovalladolid" <phv40@...> wrote:

> I read the Scala format spec several times and couldn't find a
> reference to a mapping of the 1st degree of the scale to MIDI Note
> Number 0.

The reference note and note for 1/1, unless you change
it, is note number 60.

🔗Manuel Op de Coul <manuel.op.de.coul@eon-benelux.com>

4/6/2007 5:57:11 AM

--- In tuning@yahoogroups.com, "paolovalladolid" <phv40@...> wrote:

> does this mean the following will happen on my keyboard controller?
>
> 1. Tuning starts at middle C. Notes below that are in 12TET

No, tuning does not start at middle C, but on the number "First MIDI
note number to retune". Key numbers below that are not retuned, so
they keep whatever tuning they got before (or not, it's not
specified). Octave extension works above as well as below the scale range.

> 2. MIDI Note Number 69 is tuned to 440 instead of 890.32258, all other

No both. 440 Hertz is the absolute frequency and 890.32258 the
interval in cents relative to 1/1.

> The synth (Nord Modular G2) doesn't have any inherent tuning control
> functionality other than change master tuning from A=440 to something
> else, at least as far as I, a new owner of a G2X, can tell. The
> developer has been creating tuned patches that include the DX piano

Ah, then it shouldn't be a surprise it will sound strange if the
tuning differs much from 12-tET. Don't know if this synth allows a
workaround.

Manuel

🔗paolovalladolid <phv40@hotmail.com>

4/6/2007 8:30:52 AM

--- In tuning@yahoogroups.com, "Manuel Op de Coul"
<manuel.op.de.coul@...> wrote:
>
> --- In tuning@yahoogroups.com, "paolovalladolid" <phv40@> wrote:
>
> > does this mean the following will happen on my keyboard controller?
> >
> > 1. Tuning starts at middle C. Notes below that are in 12TET
>
> No, tuning does not start at middle C, but on the number "First MIDI
> note number to retune". Key numbers below that are not retuned, so
> they keep whatever tuning they got before (or not, it's not
> specified). Octave extension works above as well as below the scale
range.

Ok, I missed this part of the example.kbm file:

! First MIDI note number to retune:
0

Definitely not middle C (60).
>
> > 2. MIDI Note Number 69 is tuned to 440 instead of 890.32258, all other
>
> No both. 440 Hertz is the absolute frequency and 890.32258 the
> interval in cents relative to 1/1.

I'm sorry, Manuel, but I'm struggling to understand the concepts of
Reference Note and Frequency To Tune Reference Note. It could be that
I have been confusing Hz and cent units. Once again, if I match up
the .kbm file below:

! Size of map (greater than or equal to the number of notes in the scale
! to be mapped). The pattern repeats every so many keys:
12
! First MIDI note number to retune:
0
! Last MIDI note number to retune:
127
! Middle note where scale degree 0 is mapped to:
60
! Reference note for which frequency is given:
69
! Frequency to tune the above note to (floating point e.g. 440.0):
440.0
! Scale degree to consider as formal octave (determines difference in
pitch
! between adjacent mapping patterns):
12
! Mapping.
! The numbers represent scale degrees mapped to keys. The first degree
is for
! the given middle note, the next for subsequent higher keys.
! For an unmapped key, put in an "x". At the end, unmapped keys may be
left out.
0
1
2
3
4
5
6
7
8
9
10
11

with this .scl file:

! 12-31.scl
!
12 out of 31-tET, meantone Eb-G#
12
!
77.41935
193.54839
309.67742
387.09677
503.22581
580.64516
696.77419
774.19355
890.32258
1006.45161
1083.87097
2/1

Based on the above, which of the following statements are correct?

The pitch of MIDI Note Number 0 (because tuning starts at Note Number
0) = The pitch of MIDI Note Number 60 minus 5 octaves
The pitch MIDI Note Number 60 = The tuning of MIDI Note Number 69
minus 890.32258 cents
The pitch of MIDI Note Number 69 = 440 Hz.
>
> > The synth (Nord Modular G2) doesn't have any inherent tuning control
> > functionality other than change master tuning from A=440 to something
> > else, at least as far as I, a new owner of a G2X, can tell. The
> > developer has been creating tuned patches that include the DX piano
>
> Ah, then it shouldn't be a surprise it will sound strange if the
> tuning differs much from 12-tET. Don't know if this synth allows a
> workaround.

The G2 has more in common with Max/MSP, Pd, Reaktor, etc. than typical
hardware synths. Ian's tuning method involves multiplexing logic
signals into virtual Control Step Sequencer modules that determine
step order by incoming signal value rather than by clock signal. That
is, if regular sequencer modules are like arrays in that you must step
through them to find a value, this type of Control Sequencer Module is
more like a hashtable. The output of Ian's tuning block then sets the
pitch values of oscillators. The G2 oscillators have fine tuning
settings in terms of cents or Hz.

Tuning on the G2 works fine for 12-note/octave tunings. It should
work for any synth patch that does not do physical modeling or employs
secondary oscillators that are pitch-shifting (eg. the one-finger M7
chord sound used in techno). More extreme tunings do not sound right,
but that's because of some bugs. Ian says he put in a fix for the
96TET bug I discovered, but I have yet to test it.

Paolo

🔗Joe <tamahome02000@yahoo.com>

4/6/2007 11:00:16 AM

I believe that's all correct. I know mapping can be confusing. If
you have the latest scala, the 'show mapping' command is improved.
By default it will now show the main octave, midi note 60-72:

'show mapping'

Range : 0.C .. 127.G
Middle : 60.C
Reference : 440.000000 Hertz at note 69.A
Octave degree : 12
Mapping :
60.C : 0 0: 60.C 1/1
61.C#: 1 1: 61.C# 77.419
62.D : 2 2: 62.D 193.548
63.Eb: 3 3: 63.Eb 309.677
64.E : 4 4: 64.E 387.097
65.F : 5 5: 65.F 503.226
66.F#: 6 6: 66.F# 580.645
67.G : 7 7: 67.G 696.774
68.G#: 8 8: 68.G# 774.194
69.A : 9 9: 69.A 890.323
70.Bb: 10 10: 70.Bb 1006.452
71.B : 11 11: 71.B 1083.871
72.C : 12 12: 72.C 2/1
Frequency for middle key 60 is 263.0921 Hz. (with current scale)

You can also check the first 13 midi note number mappings like this:

'show mapping 0 12'

Range : 0.C .. 127.G
Middle : 60.C
Reference : 440.000000 Hertz at note 69.A
Octave degree : 12
Mapping :
0.C :-60 -60: 0.C 1/32
1.C#:-59 -59: 1.C# -5922.581
2.D :-58 -58: 2.D -5806.452
3.Eb:-57 -57: 3.Eb -5690.323
4.E :-56 -56: 4.E -5612.903
5.F :-55 -55: 5.F -5496.774
6.F#:-54 -54: 6.F# -5419.355
7.G :-53 -53: 7.G -5303.226
8.G#:-52 -52: 8.G# -5225.806
9.A :-51 -51: 9.A -5109.677
10.Bb:-50 -50: 10.Bb -4993.548
11.B :-49 -49: 11.B -4916.129
12.C :-48 -48: 12.C 1/16
Frequency for middle key 60 is 263.0921 Hz. (with current scale)

So midi note 0 is 1/32, or 5 octaves below 1/1. You can also try
playing the scale in the chromatic clavier under the analyse menu.

Joe

--- In tuning@yahoogroups.com, "paolovalladolid" <phv40@...> wrote:

> Based on the above, which of the following statements are correct?
>
> The pitch of MIDI Note Number 0 (because tuning starts at Note
Number
> 0) = The pitch of MIDI Note Number 60 minus 5 octaves
> The pitch MIDI Note Number 60 = The tuning of MIDI Note Number 69
> minus 890.32258 cents
> The pitch of MIDI Note Number 69 = 440 Hz.

🔗paolovalladolid <phv40@hotmail.com>

4/6/2007 12:28:24 PM

--- In tuning@yahoogroups.com, "Joe" <tamahome02000@...> wrote:
>
> I believe that's all correct. I know mapping can be confusing. If

Thanks, Joe. Much appreciated.

I'm actually using LMSO (just started with that) because I haven't
"upgraded" my Powermac G4 to Tiger yet (required for Scala for OSX)
but I'll look further into LMSO's key mapping features as well.