Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support KBM files #1041

Closed
baconpaul opened this issue Aug 18, 2019 · 6 comments · Fixed by #1484
Closed

Support KBM files #1041

baconpaul opened this issue Aug 18, 2019 · 6 comments · Fixed by #1484
Labels
Tuning Non-standard tuning extensions

Comments

@baconpaul
Copy link
Collaborator

Right now we only support .scl files for tuning, not .scl and .kbm.

http://www.huygens-fokker.org/scala/help.htm#mappings

We should probably support KBM also

But as mentioned in #828 I want to ship SCL first and then add features based on usage and comments so tagging this 1.6.3

@baconpaul baconpaul added the Tuning Non-standard tuning extensions label Aug 18, 2019
@baconpaul baconpaul added this to the 1.6.3 milestone Aug 18, 2019
@ghost
Copy link

ghost commented Dec 24, 2019

KBM Concert Pitch.zip

Hi Paul. Cross-posting from the Slack workspace for when they might be of use.

This archive contains a collection of basic linear keyboard mapping files (KBM) that may be used in virtual-instruments that support loading both the Scala SCL and KBM microtuning format files, such as Pianoteq, as well as for creating custom microtuning mappings within the Scala application itself for exporting to other popular formats, such as TUN, MTS and KSP.

This small linear KBM collection may be used for mapping the starting 1/1 MIDI Note, as well as the Reference Frequency MIDI Note, to the standard concert-pitch chromatic notes.

The file naming convention indicates:

The 1/1 starting MIDI Note for the mapping.

The rounded Reference Frequency.

The mapping for the Reference Frequency MIDI Note.

The standard letter format concert-pitch chromatic scale degree.

For example: 60-262-60 Concert C, indicates at a glance that:

The 1/1 of the microtuning will be mapped to MIDI Note 60.

The Reference Frequency is 262 Hz.

The MIDI Note on which the Reference Frequency is mapped is 60.

*** Please note here that the KBM format is flexible enough that the above parameters can be arbitrarily and independently mapped, such that for instance, a microtuning could have its diapason mapped to the standard concert-pitch of MIDI Note A.69 @ 440 Hz, while the 1/1 starting note could be mapped on 60.C, or any other MIDI Note required of the musical scenario at hand. Such a mapping would look like this:

60-440-69.kbm
|
Range : 0.C .. 127.G
Middle : 60.C
Reference : 440.000000 Hertz at note 69.A
Octave degree : 0 (highest degree of scale)
Mapping : linear

This potential for arbitrary mapping of pitches to MIDI Notes, is the very nature and definition of what's referred to as 'full keyboard microtuning'.

Thanks,

Jacky Ligon

@baconpaul baconpaul modified the milestones: Currently Unscheduled, 1.6.5 Dec 24, 2019
baconpaul added a commit to baconpaul/surge that referenced this issue Jan 6, 2020
Display the full tuning frequency table in the HTML

Part of surge-synthesizer#1041
baconpaul added a commit that referenced this issue Jan 6, 2020
Display the full tuning frequency table in the HTML

Part of #1041
baconpaul added a commit to baconpaul/surge that referenced this issue Jan 9, 2020
Addresses surge-synthesizer#1041

This larger diff supports KBM files inside the surge engine
but doesn't include the workflow to load them in the UI or display
them at tuning time yet. Rather it sets up the ability to parse
KBM files and push them onto the storage and note architecture
and uses the Unit Test frameowrk to show that the synth is properly
retuned and remapped.
baconpaul added a commit to baconpaul/surge that referenced this issue Jan 9, 2020
Addresses surge-synthesizer#1041

This larger diff supports KBM files inside the surge engine
but doesn't include the workflow to load them in the UI or display
them at tuning time yet. Rather it sets up the ability to parse
KBM files and push them onto the storage and note architecture
and uses the Unit Test frameowrk to show that the synth is properly
retuned and remapped.

- Unit tests confirm we parse valid KBM files properly
- Add SurgeStorage hooks for a current mapping
- Confirm tuning and mapping for full-keyboard mappings works
baconpaul added a commit to baconpaul/surge that referenced this issue Jan 9, 2020
Addresses surge-synthesizer#1041

This larger diff supports KBM files inside the surge engine
but doesn't include the workflow to load them in the UI or display
them at tuning time yet. Rather it sets up the ability to parse
KBM files and push them onto the storage and note architecture
and uses the Unit Test frameowrk to show that the synth is properly
retuned and remapped.

- Unit tests confirm we parse valid KBM files properly
- Add SurgeStorage hooks for a current mapping
- Confirm tuning and mapping for full-keyboard mappings works
- Allow users to pick a KBM file

Still work to do on persisting and showing.
baconpaul added a commit that referenced this issue Jan 9, 2020
Addresses #1041

This larger diff supports KBM files inside the surge engine
but doesn't include the workflow to load them in the UI or display
them at tuning time yet. Rather it sets up the ability to parse
KBM files and push them onto the storage and note architecture
and uses the Unit Test frameowrk to show that the synth is properly
retuned and remapped.

- Unit tests confirm we parse valid KBM files properly
- Add SurgeStorage hooks for a current mapping
- Confirm tuning and mapping for full-keyboard mappings works
- Allow users to pick a KBM file

Still work to do on persisting and showing.
@baconpaul
Copy link
Collaborator Author

OK @JackyLigon I just pushed a functionally complete version of keyboard mapping with a few things left to do. Will take about 45 minutes to get the nightly out. But I wrote extensive unit tests and have tested a variety of keyboard tuning combos.

Here's what I know works

1: Tuning center shifts (so a440 with an arbitrary scale)
2: Keyboard mappings with skipped notes
3: Load that from the UI and reset it
4: In theory the HTML will be correct but not complete

here's what I have left to do still

[ ] Save the KBM in the DAW state along with the tuning
[ ] Show the KBM in the HTML

Would appreciate any tests you may have.

baconpaul added a commit to baconpaul/surge that referenced this issue Jan 10, 2020
I didn't even know Size 0 KBM maps were a thing! But they
are. They mean exactly what you'd expect (note-for-note).
So add them here with regtests to show they work rather than
crash.

Addresses surge-synthesizer#1041
baconpaul added a commit that referenced this issue Jan 10, 2020
I didn't even know Size 0 KBM maps were a thing! But they
are. They mean exactly what you'd expect (note-for-note).
So add them here with regtests to show they work rather than
crash.

Addresses #1041
@ghost
Copy link

ghost commented Jan 10, 2020

I'm attaching here a ZIP archive with four simple just-intonation tunings: octave sections of the harmonic series, 6-12, 8-16, 10-20 and 12-24. These are good for checking the intonation, since under modal rotation, they are 'sum free' - in other words - there is a different collection of intervals on every starting degree of the scale.

In this ZIP archive, I've also included a directory: VI Intonation Test KBM Files, which contains some KBM that can be used to check the tuning of concert C and A, 1/4-tone -/+. If we can get it to pass this slightly more rigorous check, we'll know it's really close.

Also, in the other directory (the same one I've already shared before) there are KBM for shifting the base MIDI notes and frequencies to all of the chromatic pitches. Any of these will be useful for verifying that it's working as it should.

Surge SCL-KBM Test.zip

@ghost
Copy link

ghost commented Jan 10, 2020

Attached here is an archive of 148 basic SCL-KBM files that I compiled as a learning device some years ago. Included are a range of equal temperaments, some just-intonation, BP and microtunings by Wendy Carlos. Playing through this small selection of tunings will give newcomers to microtonal tuning a good introduction to the vast potential of this kind of music making.

Surge SCL-KBM Microtuning Library.zip

@baconpaul
Copy link
Collaborator Author

baconpaul commented Jan 15, 2020

I’m keeping this open just so we can

  1. put @JackyLigon’s scales in the “resources/data” directory and install it in the Application Support; and add a “open example tunings folder” menu item to the tuning menu.

  2. support drag n drop for KBM just like we do for SCL

  3. daw stream the kbm

  4. ~show the kbm in the html ~

Then this one is all wrapped. Easy as pie

baconpaul added a commit to baconpaul/surge that referenced this issue Jan 15, 2020
Stream both the KBM and the mpePitchBend into the "DAW Extra" chunk which
we persist away from parameters. Test streaming both directions in the unit
tests. MPE needs some menu item fixing to be fully done but is streamed internally.

Along the way, refactor the unit tests into separate files so as not to
be as unwieldy

Addresses surge-synthesizer#1355
Addresses surge-synthesizer#1041
baconpaul added a commit to baconpaul/surge that referenced this issue Jan 15, 2020
Stream both the KBM and the mpePitchBend into the "DAW Extra" chunk which
we persist away from parameters. Test streaming both directions in the unit
tests. MPE needs some menu item fixing to be fully done but is streamed internally.

Along the way, refactor the unit tests into separate files so as not to
be as unwieldy

Addresses surge-synthesizer#1355
Addresses surge-synthesizer#1041
baconpaul added a commit to baconpaul/surge that referenced this issue Jan 15, 2020
Stream both the KBM and the mpePitchBend into the "DAW Extra" chunk which
we persist away from parameters. Test streaming both directions in the unit
tests. MPE needs some menu item fixing to be fully done but is streamed internally.

Along the way, refactor the unit tests into separate files so as not to
be as unwieldy

Addresses surge-synthesizer#1355
Addresses surge-synthesizer#1041
baconpaul added a commit that referenced this issue Jan 15, 2020
Stream both the KBM and the mpePitchBend into the "DAW Extra" chunk which
we persist away from parameters. Test streaming both directions in the unit
tests. MPE needs some menu item fixing to be fully done but is streamed internally.

Along the way, refactor the unit tests into separate files so as not to
be as unwieldy

Addresses #1355
Addresses #1041
baconpaul added a commit to baconpaul/surge that referenced this issue Jan 16, 2020
1. Add the Jacky Ligon scales as a library and make it openable
2. Clean up the HTML
3. Drag and Drop a .kbm

WIth this diff, KBM support is copmlete, so this
CLoses surge-synthesizer#1041
@baconpaul
Copy link
Collaborator Author

@JackyLigon I am pushing a change this evening which completes the KBM support (streams to DAW, shows in HTML, etc...). If once the next nightly builds you could do some more testing, that would be great, since this is the version I would otherwise ship to 1.6.5 without feedback.

Thank you!

baconpaul added a commit that referenced this issue Jan 16, 2020
1. Add the Jacky Ligon scales as a library and make it openable
2. Clean up the HTML
3. Drag and Drop a .kbm

WIth this diff, KBM support is copmlete, so this
CLoses #1041
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Tuning Non-standard tuning extensions
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant