Author Topic: What tuning does the synthesizer use?  (Read 585 times)

PiotrGrochowski

  • Posts: 6
What tuning does the synthesizer use?
« on: 29 Apr '19 - 11:52 »
I came here from https://coolsoft.altervista.org/en/forum/post/4317#post4317

Does it use equal temperament, well temperament or meantone?

Ian @ un4seen

  • Administrator
  • Posts: 21861
Re: What tuning does the synthesizer use?
« Reply #1 on: 29 Apr '19 - 14:36 »
Equal temperament is used by default. That can be changed via the MIDI_EVENT_SCALETUNING event or GM2/GS/XG tuning sysex messages.

PiotrGrochowski

  • Posts: 6
Re: What tuning does the synthesizer use?
« Reply #2 on: 29 Apr '19 - 15:34 »
Equal temperament is used by default. That can be changed via the MIDI_EVENT_SCALETUNING event or GM2/GS/XG tuning sysex messages.

But https://coolsoft.altervista.org/en/forum/post/4317#post4317 says it cannot be changed?

Ian @ un4seen

  • Administrator
  • Posts: 21861
Re: What tuning does the synthesizer use?
« Reply #3 on: 30 Apr '19 - 15:57 »
The tuning can be changed using the mentioned events/messages but there are no presets, eg. a "well temperament" setting.

Falcosoft

  • Posts: 37
Re: What tuning does the synthesizer use?
« Reply #4 on: 1 May '19 - 16:36 »
These SysEx presets seem to work pretty well with Bassmidi:
http://www.microtonal-synthesis.com/GS_XG.html

Ian @ un4seen

  • Administrator
  • Posts: 21861
Re: What tuning does the synthesizer use?
« Reply #5 on: 1 May '19 - 17:50 »
These SysEx presets seem to work pretty well with Bassmidi:
http://www.microtonal-synthesis.com/GS_XG.html

Nice find.

PiotrGrochowski

  • Posts: 6
Re: What tuning does the synthesizer use?
« Reply #6 on: 3 May '19 - 14:24 »
These SysEx presets seem to work pretty well with Bassmidi:
http://www.microtonal-synthesis.com/GS_XG.html
What is the tuning precision of that thing?

Ian @ un4seen

  • Administrator
  • Posts: 21861
Re: What tuning does the synthesizer use?
« Reply #7 on: 3 May '19 - 16:47 »
The precision/granularity of the tuning sysex messages is 1 cent.

PiotrGrochowski

  • Posts: 6
Re: What tuning does the synthesizer use?
« Reply #8 on: 3 May '19 - 18:37 »
The precision/granularity of the tuning sysex messages is 1 cent.
That's worse than the precision provided by changing the PCM frequency of the samples in the soundfont (1 cent up from 33792Hz is 33812Hz, that's about 20 times more precise locally) and the lack of precision can be problematic. While some intervals do happen to be somewhat accurately approximated by integer cents (702 cents is approximately a perfect fifth, 698 cents is approximately a fifth tempered by 1/6 Pythagorean comma) making it somewhat possible to use tunings that use those intervals, with more precision it's possible to describe tunings more precisely.

Falcosoft

  • Posts: 37
Re: What tuning does the synthesizer use?
« Reply #9 on: 4 May '19 - 06:19 »
Quote
That's worse than the precision provided by changing the PCM frequency of the samples in the soundfont
The above referenced SysEx presets can be used to set predefined scales. For these scales to work there is no need for finer precision than cent. But if you need finer precision you can use MIDI_EVENT_SCALETUNING events mentioned by Ian or GM/GS standard RPN (0,1) Channel Fine Tuning messages. Both have the granularity of 200/16384 cents.
Unlike MIDI_EVENT_SCALETUNING Channel Fine Tuning RPN affects all notes on a given Midi channel (but you can already use them without modifying anything in VMS).
Maybe MIDI_EVENT_SCALETUNING also has a SysEx equivalent in Bassmidi so you can also use it without modifying VMS. Ian has the answer. 
Also another option is to use Pitch Bend messages. These also affect all notes on a channel. In GM/GS by default it has a granularity of 400/16384 cents (range is +/- 2 semitones) but you can get 200/16384 by setting RPN (0,0) Pitch Bend Sensitivity to 1 semitone.
« Last Edit: 4 May '19 - 06:49 by Falcosoft »

PiotrGrochowski

  • Posts: 6
Re: What tuning does the synthesizer use?
« Reply #10 on: 6 May '19 - 19:54 »
I wonder if it would be possible to add the ability to change tuning in VirtualMidiSynth by a possible method. Soundfonts that use anything other than equal temperament would have to have a warning that the tunings selected in the MIDI synthesizer will be incorrect. If there would be tuning presets, the fixed note (the note all others are tempered relative to it) should be configurable (C, C#, D, Eb, E, F, F#, G, G#, A, Bb, B).

There are many tunings out there. The standard nowadays is equal temperament, but there are also many well temperaments and meantones out there. Examples of well temperaments include: Kirnberger II, Kirnberger III, Valotti, Young, Werckmeister. Examples of meantones include: 1/4 comma meantone from Eb to G#, 1/4 comma meantone from Bb to D#, 1/4 comma meantone from Ab to C#, 1/6 comma meantone, 1/3 comma meantone, etc.

And then hardcore MIDI fans will argue not only about the soundfont, but what tuning is the best!

Falcosoft

  • Posts: 37
Re: What tuning does the synthesizer use?
« Reply #11 on: 6 May '19 - 22:29 »
Maybe it is not clear enough for you but all the above written possibilities (except MIDI_EVENT_SCALETUNING) are already available for you without modifying anything in VMS (VMS = VirtualMidiSynth). That's why I have written something like this:
Quote
Unlike MIDI_EVENT_SCALETUNING Channel Fine Tuning RPN affects all notes on a given Midi channel (but you can already use them without modifying anything in VMS).
Maybe even MIDI_EVENT_SCALETUNING is also already available if it has a SysEx counterpart (this should be confirmed by Ian).
VMS uses Bassmidi so you can send it SySex and RPN and also Pitch Bend messages. What Bassmidi understands VMS also understands.
You can use any DAW or midi player that supports SysEx/RPN/Pitch bend messages.
So e.g.  for Werckmeister scales you send the following SysEx messages (link can be found above):

68 Werckmeister 1 - 1/4 Comma
69 Werckmeister 4 - 1/4 Comma
70 Werckmeister 2 - 1/3rd Comma
71 Werckmeister - 1/7th Comma
72 Werckmeister 3
Code: [Select]
68 F0 41 10 42 12 40 11 40 40 36 38 38 36 3E 34 3C 38 34 3C 38 45 F7
69 F0 41 10 42 12 40 11 40 40 3C 44 40 3C 44 40 42 38 40 42 3E 75 F7
70 F0 41 10 42 12 40 11 40 40 2E 3C 3A 38 3E 34 3A 32 36 44 32 49 F7
71 F0 41 10 42 12 40 11 40 40 37 32 3E 3B 3E 3B 3E 39 39 40 3D 27 F7
72 F0 41 10 42 12 40 11 40 40 3A 38 2A 36 27 34 3C 36 34 27 38 7D F7

Others you mentioned:

23 Kirnberger - 1/2 Comma:
Code: [Select]
23 F0 41 10 42 12 40 11 40 40 36 44 3A 32 3E 36 42 38 3B 3C 34 30 F7
65 Valotti & Young :
Code: [Select]
65 F0 41 10 42 12 40 11 40 40 3A 3C 2A 38 27 34 3C 36 3A 27 36 73 F7

@Edit:
I have made a demonstration video for you with my Midi Player application:
http://falcosoft.hu/softwares.html#midiplayer
It has its own Bassmidi based soft synth engine but it can be also used with VMS.
https://youtu.be/65JIB0Tkw7o
« Last Edit: 6 May '19 - 23:12 by Falcosoft »

PiotrGrochowski

  • Posts: 6
Re: What tuning does the synthesizer use?
« Reply #12 on: 7 May '19 - 06:21 »
Those tunings are distorted when they are rounded to cents. That's not how tuning is done. For instance, I analyzed quarter comma meantone (supposed to use fifths of 696.5784284662085 cents) and it appears to alternate between fifths of 696 and 697 cents. This obviously doesn't make sense. Also, I don't see a setting of tuning anywhere in VirtualMIDISynth, so I don't get why this is already available.

Ian @ un4seen

  • Administrator
  • Posts: 21861
Re: What tuning does the synthesizer use?
« Reply #13 on: 7 May '19 - 17:57 »
Maybe even MIDI_EVENT_SCALETUNING is also already available if it has a SysEx counterpart (this should be confirmed by Ian).

Unfortunately, there isn't a corresponding sysex message with the greater precision, so the only way to access the greater precision is via BASS_MIDI_StreamEvent(s) and the MIDI_EVENT_SCALETUNING event.

Ian @ un4seen

  • Administrator
  • Posts: 21861
Re: What tuning does the synthesizer use?
« Reply #14 on: 9 May '19 - 16:33 »
Ignore that. I forgot that there is actually a "scale/octave tuning 2-byte form" sysex message with the same 100/8192 (0.012207) cents precision as the MIDI_EVENT_SCALETUNING event. It looks like this:

Code: [Select]
F0 7F <device ID> 08 09 ff gg hh [ss tt] ... F7

F0 7F Universal Real-Time SysEx header
<device ID> ID of target device (7F = all devices)
08 sub-ID#1 = "MIDI Tuning Standard"
09 sub-ID#2 = "scale/octave tuning 2-byte form (Real-Time)"
ff channel/options byte 1 - bits 0 to 1 = channel 15 to 16, bit 2 to 6 = reserved for future expansion
gg channel byte 2 - bits 0 to 6 = channel 8 to 14
hh channel byte 3 - bits 0 to 6 = channel 1 to 7
[ss tt] 24 byte tuning offset of 2 bytes per semitone from C to B
00H 00H means -100 cents (8,192 steps of .012207 cents)
40H 00H means 0 cents (equal temperament)
7FH 7FH means +100 cents (8,191 steps of .012207 cents)
F7 EOX