Convert Scaler chordset to Insta-composer2 cords?

Scaler can save a “Chordset”.
Insta-composer can read a “Preset”.
Both are XML.
Although the IC preset contains more than cord info, It seems to me that the Scaler file could be “translated” to a basic Insta-composer “preset”.

Then you could:

  • gen a Scaler cordset
  • save it
  • run through converter
  • open preset in Insta-composer

Any interest??, Comments??

1 Like

Good idea. This is what is seriously missing in InstaComposer - import midi, or xml.
Exporting to Scaler works relatively easy.
Scaler is more powerful in creating progressions, but IC could add a bit more sophistication or variations to melodies or bass lines, for example, to Scaler-generated chords if importing were possible.

2 Likes

I too think it would be a great idea!

I was quite interested in decoding and storing saved state files into a database, so spent a little time on looking into the format thereof.

The Instacomposer files are indeed XML (though tagged as *.txt), but they are quite different in both purpose and structure to the Scaler state file. They are also key and scale specific, which Scaler files are not at a structural level. The Scaler state files are well structured (though not fully valid in format - no ‘schema’ reference, and a nul byte terminator), whereas I find the Instacomposer ones not so, and would be very awkward to work with

Transforming XML file formats can be performed in many cases by something called XSLT, although it is a bit arcane. There are tools which enable you to do this graphically.

I wrote a few things down about the state file format, which can be found here
http://www.scaler-board.uk/the-scaler-state-file/

Happy to share info about XML transformations and more on the state file.

2 Likes

Yes, Panda, I agree the IC files are quite complex…
I took a quick look at the preset file and I’m still attempting to decode how/where they encode their scale & chord info…
My idea was to leave most of the file alone and replace just the scale & chord sections.
If that can be determined, then it’s a matter of replacement in the IC file with the Scaler chords…
So, I’ll be studying a simple IC preset file (probably for a while) :crazy_face:

1 Like

I’m sure it’s possible to figure it out just from the comparison of the file and the screen for that imported set.

IC (in my view) makes it hard is the way they use attributes. Looking at an example of the chord specification in IC you have

This system won’t let you type in XML native as it seeks to interpret it as some formatting structure.)

Here we see the element is 'chords" and everything else is entered as a list of attributes. This is really inflexible IMHO.

Compare with a Scaler chord
image

Here the midi note is an element, with the note number and velocity as attributes.

The mapping from one to the other is maybe more complicated than it might have been. It’s much harder to make attributes in this form generic. There is no real ‘schema’ and it is just a list of data wrapped in XML to possibly use off the shelf parsers. XSLT (the transformation language for XML) is happier if you can map an input element to an output element with a transformation the middle (might be 1:1 ,1:n, n:1 etc.)
here’s an example, done in a graphical tool, which then writes the XSLT for you.

However, I don’t rule out the project as being too difficult, but would more describe it as ‘tedious’ to do, but the attributes make the transformation instance based an tricky.

Good Work Panda!

My Observations:

  • in the “Chord” section, the ChordRoot_BarN_BeatN is actually the pitch (numbered from 0 - 11) for each beat/bar.

  • the octave defined in the “controls” section: “TrackOctave”, so pitch number will not be an issue.

  • it seems like the different Chord_BarN_BeatN combinations determines the scale; this is still not clear and will probably be the most difficult to determine.

  • Snap(0-7) refers to Scenes 1 to 8 and I am only interested in Snap0

Panda,
Don’t get too wrapped up in XML formatting being non-standard; I have no problem treating the files as plain text and actually have accomplished quite a few unformatted file translations (in c#) while just using any XML for markers…
So if it can be determined what on Scaler = what in IC, then the translation would not be an issue.

OK, after looking further, for one chord:

  • Scaler describes each individual note by midi number & velocity
  • IC describes a “root note” and a scale; (Major, Minor, etc…) by a number from 0 to 64

Not being a music major, I really don’t have the skill (or motivation) to go further on this effort…
I have attached the list of IC scales, if anyone is interested in taking this further…

icScales.xml (2.4 KB)