A new way to configure the MC6Pro

Hi y’all,

The Morningstar Editor (and related tools) is great, but didn’t fit the way I like to work. So I wrote a tool that let me keep the config in a file (still JSON, but human readable) and use that instead. This is the first version. I’ve pasted the README.md below. If you are interested in trying it, drop me a message and I will send you a link to the repo.

It is written in Python, so you should be comfortable with running python scripts, and looking at JSON files.

John

MC6ProIntuitive

Configuring the Morningstar MC6Pro via an intuitive config file

  • Human editable configuration file
  • Named messages allow easy reuse
  • Named banks
  • Navigator mode: Bank 1 is a roadmap/index bank, and navigating is easy
  • Navigator mode allows more than 32 presets per bank

Overview

The Morningstar Editor is great software, but presents a brittle experience. Instead, this package defines a JSON based configuation file. The configuration file is converted to a MC6Pro backup format, and can be restored to the device.

Instead of editing directly through the editor, you edit the configuration file via any editor capable of handling JSON.

You start by backing up your config and converting that into into an Intuitive config.

Human editable Configuration file

The MC6Pro backup files are JSON, but are not human editable. They are large (over 11MB) and all fields and elements are present, even if empty or not used.

The Intuitive format only requires values for non-empty fields and elements. Banks, for example, would only have banks actually in use instead of all banks.

In addition, the format is more intuitive: the top level includes device configuration, messages (which appear deeply nested in the backup format), MIDI channels, and banks.

Messages, MIDI channels, and banks are referred to by name, instead of relying on position or a number.

Named messages allow easy reuse

Named messages deserve special mention: messages are named and defined at top level.

When a preset refers to a message, it only refers to the name. This allows easy reuse of a message.

  "presets": [
    {
      "short_name": "Enabled",
      ...
      "messages": [
        {
          "trigger": "Press",
          "toggle": "one",
          "midi_message": "Iridium Disable"
        },
        {
          "trigger": "Press",
          "toggle": "two",
          "midi_message": "Iridium Enable"
        }
      ]
    }, ...

Named banks

With named banks, the bank’s position in the bank list doesn’t matter. It is referred to by name.

This is primarily for Bank Jump messages, and is used in Navigator mode.

Navigator mode

Navigator mode has two aspects:

  • it is easy to navigate between banks
  • it is easy to navigate between pages in a bank

In navigator mode, bank 1 is a roadmap. The presets for bank 1 are named after banks, and pressing the preset takes you to that bank. Preset C on each bank is set to return you to the roadmap.

In addition, all banks (including the roadmap) bank use the two rightmost presets (e.g. C and F on page 1) for page navigation - page up and page down.

If you define a bank (in an Intuitive conf file) that has more than 24 presets, that bank is broken into two MC6Pro banks, and the page up/page down presets navigate between the two banks and pages seamlessly. This may happen even with less than 24 presets, as the page navigation presets inserted by Navigator Mode count against the total.

Use

Everything is done via the python app mc6pro.py and the Controller Backup tab on the Morningstar Editor. You also have the following resources:

Features.json

This contains all implemented features as a backup file. Convert it to an intuitive config to see the syntax:

python3 -b Features.json Features-Intuitive.json

Demo.json

This is a sample Intuitive config file

Initial Use

  1. Create a backup of your current configuration in the Controller Backup tab, using All banks (including Controller Settings), say it is named backup.json
  2. python3 mc6pro.py -b backup.json intuitive.json

The names chosen for the messages are not intuitive, so you should rename them. Also, add the Navigator Mode element if you want:

"navigator": true,

Later use

Now, edit your Intuitive.json file, and make any changes or additions. Then convert it to a backup file:

python3 intuitive.json intuitive-base.json

And load that file via the Controller Backup tab in the editor using Restore your controller presets Note that the MC6Pro will state the file has been modified.

Theory and Development

The heart of the app is a grammar tool. The grammar tool handles JSON grammars. It can parse a grammar into a model (python object representing the meaning), or generate a JSON string from a model.

The backup files (aka base files) have a grammar that is complete. This means all elements must appear, even if they are default values.

The intuitive files have a grammar that is minimal: only non-default values appear.

The backup grammar is defensive: elements that are not yet implemented are coded in the grammar as constants. Getting a value that doesn’t match the constant will cause an error. This happens when someone is using a feature that is not yet supported.

Grammars consist of atoms (int, str, boolean), enums, lists, dictionaries, and switch dictionaries (which allow a little variation in the structure).

There is a pretty comprehensive set of tests. They can be run via:

python3 tests.py

In addition, the tests produce a few base config files, named:

  • tmp\Empty.json
  • tmp\Features.json
  • tmp\Demo.json
  • tmp\NavigatorTest_Base_Script.json
  • These should be loaded and spot-checked after changes.
6 Likes

Very nice.

Have you considered supporting yaml. It’s a superset of json and more human friendly.

Nice idea! I did JSON because that was the backup file format, but I bet it is easy to choose a different loader. Thanks for the suggestion.

I just pushed a new version that supports YAML, and also has better color support (color schemas, instead of ad hoc attaching of colors to banks or presets)

The YAML is very cool, my config file in YAML:

# The MIDI channel assigned to the MC6Pro
midi_channel: 3
# The list of MIDI channels, the position in the list determines the channel number (1 based)
midi_channels:
- name: Iridium
- name: Scarlett
- name: MC6Pro
- name: H9
- name: Timeline
- name: Looper
# Use navigator mode
navigator: true
# Color schemas
colors:
- name: default
  bank_color: black
  bank_background_color: lightyellow
  preset_color: black
  preset_background_color: lightyellow
- name: navigator
  bank_color: red
  bank_background_color: yellow
  preset_color: red
  preset_background_color: yellow
- name: bypass
  preset_color: black
  preset_toggle_color: white
  preset_background_color: darkgreen
  preset_toggle_background_color: red
# The list of MIDI messages, order is not important
messages:
- {channel: Iridium, name: Iridium Disable, type: CC, number: 102, value: 0}
- {channel: Iridium, name: Iridium Enable, type: CC, number: 102, value: 127}
- {channel: Iridium, name: Iridium Bank 0, type: CC, number: 0, value: 0}
- {channel: Iridium, name: Iridium Clean, type: PC, number: 0}
- {channel: Iridium, name: Iridium Burry, type: PC, number: 1}
- {channel: Iridium, name: Iridium Distortion, type: PC, number: 2}
- {channel: Iridium, name: Iridium Max Distortion, type: PC, number: 3}
- {channel: H9, name: H9 Disable, type: CC, number: 1, value: 0}
- {channel: H9, name: H9 Enable, type: CC, number: 0, value: 0}
- {channel: Timeline, name: Timeline Disable, type: CC, number: 102, value: 0}
- {channel: Timeline, name: Timeline Enable, type: CC, number: 102, value: 127}
- {channel: Looper, name: Looper Test, type: CC, number: 34, value: 0}
# Banks - as a list
banks:
- name: Noodling
  description: A selection of cool guitar sounds
  to_display: true
- name: Iridium
  description: Iridium choices
  to_display: true
  presets:
  - short_name: Enabled
    toggle_name: Disabled
    colors: bypass
    to_toggle: true
    messages:
    - {midi_message: Iridium Disable, toggle: one}
    - {midi_message: Iridium Enable, toggle: two}
  - short_name: Clean
    messages:
    - {midi_message: Iridium Bank 0}
    - {midi_message: Iridium Clean}
  - short_name: Burry
    messages:
    - {midi_message: Iridium Bank 0}
    - {midi_message: Iridium Burry}
  - short_name: Distortion
    messages:
    - {midi_message: Iridium Bank 0}
    - {midi_message: Iridium Distortion}
  - short_name: Max Distortion
    messages:
    - {midi_message: Iridium Bank 0}
    - {midi_message: Iridium Max Distortion}
- name: H9
  description: Best of H9 sounds
  to_display: true
  presets:
  - short_name: Enabled
    toggle_name: Disabled
    colors: bypass
    to_toggle: true
    messages:
    - {midi_message: H9 Disable, toggle: one}
    - {midi_message: H9 Enable, toggle: two}
- name: Timeline
  description: Various delay sounds
  to_display: true
  presets:
  - short_name: Enabled
    toggle_name: Disabled
    colors: bypass
    to_toggle: true
    messages:
    - {midi_message: Timeline Disable, toggle: one}
    - {midi_message: Timeline Enable, toggle: two}
- name: For What It's Worth
  description: Crosby, Stills, Nash and Young
  to_display: true
- name: Prelude in C# Minor
  description: Rachmaninoff
  to_display: true

1 Like

I pushed a new version. The repo is here:

The changelog for the latest:

Change Log

[0.1.0] - 2024-03-17

  • Initial version with a change log
  • Bank Messages
  • Implementation.md a matrix describing which features are implemented
  • renamed Bank to_description to display_description
  • renamed Preset to_toggle to toggle_mode
  • major refactor of grammar code: cleaned up tests, grammar nodes are python objects instead of dictionaries
  • Added versioning

New version:

[0.1.1] - 2024-03-29

Added Toggle Group
Improved error messages
Added versions to sample files
Better versioning
Fixed bug: bank messages not being converted to Base

I’m trying to run the python script (python3 -b Features.json Features-Intuitive.json) but keep having the same problem. The terminal fills with text and ends with the following message:

NameError: name ‘false’ is not defined. Did you mean: ‘False’?

What am I doing wrong or configured correctly?

Thanks!

New version with a 1 button variant of the Navigator Mode

[0.1.2] - 2024-04-17

  • Added names to all grammar nodes
  • Added print_grammar program
  • Refactored navigator mode, no functional change
  • Improved error handling
  • Made Jump Bank message have page default to 0
  • Added “One Button” mode to Navigator Mode
  • Added Navigator Mode override to mc6pro.py for testing

It’s been a while! I added support for all MIDI/controller message types (with a couple of small incompletes). It took a lot longer than I thought:

[0.2.0] - 2024-06-16

Added get/set var methods to JsonGrammarModel
Changed dict keys so that on complete models, a key can be marked as not required
    This allows the setlist program output to be parsed
    It doesn't include the controller settings
Added per-key models to switch dicts
add To Message Scroll to the Preset Array schema (MC6Pro Config)
Added shifted name color and to msg scroll to preset
Added Exp Preset Array
Better handling of Intuitive messages, using first class functions
All message types are now handled, more or less
Added better 'required' parameter to dict keys
Added 'per switch' models to switch dicts

I am definitely interested…… personally, I find the online editor to be confusing to my tiny lil :brain: …… I’ve historically worked in the video game industry until we had a mass layoff, recently…… right around that time, I had picked up an MC6 Pro and it was/is my first foray into the world of using MIDI specifically for FX pedals (as opposed to MIDI keyboards and the likes that I’ve used to create songs in DAWs).

That being said , I had decided to look into gaining new skillsets, with coding (Python was what I was originally thinking) being the first language I dipped into (other then HTML, which I learned back when dancing babies were on ever page you visited :laughing: )…. So I was thinking, maybe I could just write my own file to upload, without realizing it (at least from what I’ve gathered here) is a lot more complex than that…… point being, I’d love to take a stab at using your tool to try and program my MC6 Pro MIDI controller the way I’d like!

Hi Peter,

I am currently doing a major rewrite, I’ll DM you as soon as I have something ready, I think about 2 weeks. The repo linked above is still there, and works, if you want to take a look. It’s Python, and it is where I’ll post the new code when ready.

I’m taking everything I learned from that tool, including issues that other people ran into trying to use it, to make something even easier.

John

This looks awesome, thank you for sharing. I think the web editor is fantastic, and really the only way to go from a product standpoint.

However as I get more into trying to build out all my patches, something that I can edit in a text editor in bulk will save me a LOT of time!

1 Like

Hi Andy, I just pushed a new version a few minutes ago, this version includes presets that cycle through several options in both directions (as described here Preset Message Scroll (scroll through messages within a preset) )

This isn’t quite ready for prime time, but it is very close. Check it out if you are interested.

John

I love to have an alternative in anything! :slightly_smiling_face::+1:
It was my initial impression that you guys are creating this new way to configure MC6Pro in order to make the life easier for people who struggle with the sophisticated Morningstar Editor GUI because it is too complicated for them.

But then, I gained grasp of the MS GUI almost intuitively while I got lost very quickly in your tech jargon here. Is it just me?

Your knowledge and effort would benefit so many more of us here if someone translates this Python topic into a non Python, average human readable, non coder folk level.

Do you guys have any intention to create a new type of Morningstar Editor app so we can have an alternative easier way to use our controllers without the need to understanding coding?
That will be interesting!
:hugs:

Hi Zaakkk

That’s a great question!

First, I want to say I am not affiliated with Morningstar in any way, other than being a very happy customer. This project is a hobby project for me, with no official support from Morningstar.

I agree: the GUI is excellent software, they do a fantastic job with this. If you are good with the GUI, that is all you need.

One day this python project will be more simple, available to non-coders, but it is still in its infancy. It will be several months at least.

Thanks for your interest!

John

I have renamed the repo, it is now FootSmart:

1 Like