Style Master: bulk style corrections

Styles are the automatic accompaniments available on digital keyboard from Yamaha and other manufacturers. They function like a backup band to spice up performances. The Yamaha-style format has become the de facto standard for style exchange. There are more than a hundred-thousand style files available for download or purchase in all musical genres. Unfortunately, the style file as defined by Yamaha is a poor format for information exchange for the following reasons:

  • Because the format evolved over several decades in a closed environment, a considerable amount of non-musical information has been tacked on.
  • There is no official documentation of the standard.
  • Many styles are designed to function only on specific keyboard models, leading to a multiplicity of redundant files.
  • Some features are incompatible with computer MIDI output through soundfonts.

My interest in standardizing the style format derives from my development of the Accompaniment Machine (link) program. When users run across a style, play it on their keyboard through the Accompaniment Machine and it sounds weird, they tend to blame the program rather than the file format. Accordingly, I created a style-exchange format called PureStyle. PureStyle files have the following advantages:

  • The format contains nothing but standard MIDI messages. Consequently, the files are easy to understand and accessible to many existing MIDI editors.
  • The format is open and well documented.
  • A PureStyle file generates high-quality sounds with any keyboard, synthesizer or computer soundfont.
  • The file name includes the tempo and time-signature of the style to make selection easier.
  • PureStyle files are more compact, ensuring that advanced styles don’t exceed byte limitations on keyboards.
  • Most important, the format is back-compatible with all existing style performance keyboards and programs.

We distribute only PureStyle files with our software. At this point in its evolution, I feel that the advantages of PureStyle make the format of general interest to the keyboard community. This article begins a series describing problems of legacy Yamaha files and documenting PureStyle as an open format.

In this article, I will describe new features of our Style Master program. Figure 1 shows the interface. The new controls are circled in red. They occupy a small portion of the interface, but serve an important function. The first step is click on the button Set working folder and then to navigate to folder that contains any number of style files (with suffixes STY, BCS, PRS, SST and PCS). The second step is to click the Correct all files in folder button. Here, Style Master builds a new PureStyle file using the musical and organization information of each original style and then deletes the old file. The bar above the button shows the progress of operations. Note that Style Master can handle original files designed for any Yamaha keyboard in either SFF1 or SFF2 format.

Style Customizer interface

Figure 1. Style Customizer interface.

I’ll summarizes the sequence of tasks performed by Style Master for each original style. Future articles detailing the PureStyle format will clarify the operations.

1) Loop through all files in the folder than have style suffixes.

2) Read the style information, including the mysterious CASM section, including channel redirections and alternate sections. Delete any corrupted files detected.

3) Use the MIDI and CASM information to build a PureStyle model in memory that contains only a MIDI section with standard MIDI messages and follows the two ideal-style rules: 1) all channels and sections are in the key of C and 2) harmonic channels suggest the CMaj7 chord.

4) Use the original style name and information to construct a PureStyle name of the form DescriptiveText_Tempo_TimeSignature_ps.sty. (Note that all PureStyle files have the suffix STY because there is no need to differentiate.)

5) Write a PureStyle file with content that depends on the current state of the Style Master checkboxes:

a) GM compliant: Remove XG voice settings so that the style produces a good sound on any General MIDI device. The standard features of Style Master can then be used to optimize voices (i.e., add XG voice information) for specific keyboards.

b) Percussion channel compress: Some styles use the style Chan 08h to store additional percussion information. This convention is totally unnecessary and is not recognized by all devices (e.g., CoolSoft VirtualMIDISynth). If this box is checked and the original style uses Chan 08h for percussion, Style Master transfers musical information from Chan 08h to Chan 09h and eliminates Chan 08h.

c) Percussion filter: The technical name for this feature is the Xavier Cugat Filter. Tyros styles often use a drum set that produces strange sounds (e.g., bird tweets, rachets, police whistles,…) when played on a GM drum set. This option removes offending sounds that would occur only in the strangest of styles.

d) Keyboard compatible: In principle, a PureStyle file should contain only a MIDI section. Some Yamaha keyboards will not load a style without a CASM section. This option adds a dummy CASM section with no information to the output file. The dummy section has no effect on the style performance in software.

6) Delete the original files.

In other words, Style Master provides a quick path to move an entire style library to a device-independent form.

I can extol the virtues of PureStyle, but the proof is in the sound. The following short audio selection shows the advantages. Using a style I picked at random from an archive purchased from the PSR Tutorial site, I recorded MainB using Coolsoft VirtualMIDISynth as the output device with the Arachno soundfont. The first half of the clip is the raw style, clearly unusable. The second half is the PureStyle equivalent produced by Style Master. The byte length of the PureStyle file is only 58% of the original length.



Comments are closed.