Style Fixer is a software program for repairing erroneous YAMAHA Keyboard style files.

Help Topics
Introduction
Program Operation
Error Types
Menu Options
UI Settings
Legal Stuff
More information
Contact the Developer
Contents
Introduction

This program is NOT updated for the SFF2 style format used in the newest keyboards. More.
As corrupted style files seems to be a minor problem than some years ago, and a rewrite of this program is quite complicated, I have decided not to update this program.

This program will check erroneous Yamaha keyboard style files and repair a number of common errors. Not repairable style files will be listed and allow the user to delete these files or to move or copy these files to user selected folders.
If the CASM section is missing the program can add a default CASM section (if this default can be successfully used).

The program is a stand alone program which can:
• check and repair a single style file
• check and repair a folder (and its subfolders) of style files
• check and repair style files listed in a CSV file created with the "Export Style Data to CSV File" function in the "PSR Style Database" Application.
• check and repair style files listed in a text file with one file name (incl. full path) per line. E.g.
C:\my_styles\my_style.sty
C:\test_folder\test_style.sty
...etc.

Style Fixer is developed to repair Yamaha keyboard style files. Many of these style files for download at various sites suffer from a number of errors which makes them impossible to load in a keyboard or impossible to edit in a sequencer software. Other styles have errors in some parts only but this makes these styles impossible to use.

Style Fixer will automatically repair more than 95% of style files which have errors (check the "Errors" column in the PSR Style Database application) and will list the remaining less than 5% of style files which may not be style files at all or are so damaged that automatic repair is impossible.

Program Operation

RECOMMENDATION
As errors unknown to this program may occur the program may terminate unexpectedly or may fail to fix the error. This may mean loss or damage of style files. To prevent this always work at a copy of your style file collection.

Step 1: Select Style File(s) to check
• Select one of the four File Open methods:
    1. Single Style File Check: For opening a single style file for check and fix.
    2. Style File Folder Check: For opening a folder with style files for check and fix. By default style files in subfolders will be checked too. This feature can be disabled in the Settings Menu.
    3. Open CSV File: For opening a CSV data file created with the PSR Style Database application written by Peter Wierzba.
    4. Open File List: For opening a text file containing a list of files. One file with full path per line; e.g. C:\my_styles\my_style.sty
• Click the "Go" Button.

Step 2: Confirm processing (Open method 2 and 3 only)
• The program will show the number of style files for processing and the estimated processing time. The user is asked to confirm to continue or to cancel processing. This feature can be used if a wrong folder or CSV file has been selected for repair or if the user wants to cancel for other reasons.
Note: Method 2 will check all style files - including style files without errors. Method 3 will force the program to check style files with errors only. Therefore it is recommended to use method 3 for checking large style file collections. Furthermore the processing time will vary depending upon the hardware configuration. The estimated processing time is based at pc's with a 2 GHz and a 400 MHz processor respectively.

Step 3: Wait while the program processes
• The program will automatically find and try to repair style files.
• The original style files are overwritten with the repaired versions.
• The status line shows the number of style files checked and repaired.
• The list will show all non-repairable style files.

Step 4: Check again (Open method 3 only)
• As some Error Types are related it is recommended to refresh the list of style files and create a new CSV file in the "PSR Style Database" application after one check.
• Then start over from Step 1.

Step 5: Handling non repairable style files
• Select (highlight) which of the non-repairable style files (if any) to delete, to move to or to copy to another folder.
• Click button "Delete" if you wish to delete the selected style files.
• Click button "Move Selected to" or button "Copy Selected to" if you wish to move or copy the selected style files.
• Select a folder to move or to copy non-repairable style files to in the "DirectoryList" window which is opened.
• Click button "OK" in the "DirectoryList" window to let the program automatically move/copy the selected style files to the selected folder.

Error Types

RECOMMENDATION
As errors unknown to this program may occur the program may terminate unexpectedly or may fail to fix the error. This may mean loss or damage of style files. To prevent this always work at a copy of your style file collection.

Definitions
The error type defintions below corresponds to the error types used in the PSR Style Database application written by Peter Wierzba.

Repairable Error Types

Error Type Effect Cause Cure
Unexpected bytes The keyboard may refuse to load the style. Most sequecer programs / MIDI players will definitely refuse to open files with this error for editing / playback. • Miscalculated check bytes in the style file
• "Garbage" bytes in the beginning or the end of the style file
• "Garbage" bytes between style file parts
Check bytes will be recalculated and "garbage" byte deleted.
No MIDI File The file will not load. • Misspelled MIDI Header MIDI Header will be corrected.
SFF1 / SInt Error The file will not load. • Missing or misspelled SFF1 Marker
• Missing or misspelled SInt Marker
Correct spelled markers will be added.
MIDI Problems / Errors Style will normally load, but some parts sound strange or will have "hanging" notes for several (maybe hundreds of) measures. • Initial measure in style file corrupt
• One or more style parts are corrupt
Style files with the first error will get a default initial measure.
If the second error is caused by missing end delta time information the style part will be repaired, otherwise the style file will be repaired by deleting the erroneus part.

Possibly Repairable Error Types

Error Type Effect Cause Cure
No Main A part *) The file will not load. • Wrong style file layout The program will try to rename another main part to "Main A". If the style file has no main parts this error can not be corrected and the style file will be listed.
No CASM section **) Style will load, but may sound strange. • Missing CASM section A default CASM section will be added, if this section can be used successfully. If not: Style file will be listed.
*) Current version of the PSR Style Database application does not detect this error type. However these error are detected while checking individual style files or style file folders.
**) No CASM section may be regarded as: Not a "real" error, just something missing.

Not Repairable Error Types

Error Type Effect Cause Cure
No MIDI File The file will not load. • Missing MIDI Header
• Band In a Box style file
• Unknown format
No cure. Style file will be listed.
Empty File The file will not load. • File is empty No cure. The program will automatically delete all files shorter than 100 bytes. Style file will NOT be listed.
MIDI Problems / Errors The file will not load. • More *) / missing MIDI Header / MIDI Track Header / End of File Markers
• Other MIDI errors
No cure. Style file will be listed.
*) The PSR Style Database application does not detect this error type. However these errors are detected while checking individual style files or style file folders.
Menu Options

RECOMMENDATION:
As errors unknown to this program may occur the program may terminate unexpectedly or may fail to fix the error. This may mean loss or damage of style files. To prevent this always work at a copy of your style file collection.

File menu
• Single Style File Check: For opening a single style file for check and fix.
• Style File Folder Check: For opening a folder with style files for check and fix. By default style files in subfolders will be checked too. This feature can be disabled in the Settings Menu.
• Open CSV File: For opening a CSV data file created with the PSR Style Database Application.
• Open File List: For opening a text file containing a list of files.
• Exit: Exits the program.

Help menu
• Help Content, Help Search and About.

UI Settings

RECOMMENDATION:
As errors unknown to this program may occur the program may terminate unexpectedly or may fail to fix the error. This may mean loss or damage of style files. To prevent this always work at a copy of your style file collection.

Settings in the User Interface
• MIDI Initial Measure settings: Selects if the original initial measure will be used if not corrupt, or a default initial measure always will be used.
• CASM, OTS, MDB error settings: The checked sections will be deleted automatically if corrupt. The program will try to repair some simpler errors in the CASM section.
• Missing CASM correction: If checked a default CASM section will be added to style files without a CASM section. The program checks if a default CASM can be used successfully, if not, the default CASM section is not added.

Legal Stuff

Style Fixer ©2003-2010 Jørgen Sørensen. All Rights Reserved.

You should carefully read the following terms and conditions before using this program.

COPYRIGHT
Copyright laws apply to this program, and the copyright holder retains all rights. The program must NOT be altered or decompiled nor included as part of another system or program without permission from the holder of copyright. Uploading to web sites or file servers or inclusion at cd's, copying to other persons etc. is strictly prohibited.

DISCLAIMER
Users of Style Fixer must accept this disclaimer of warranty: Style Fixer and its related documentation is supplied as is. The author disclaims all warranties, expressed or implied, including, without limitation, the warranties of merchantability and fitness for any purpose. The author assumes no liability for damages, direct or consequential, which may result from the use or inability to use Style Fixer.

RECOMMENDATION
As errors unknown to this program may occur the program may terminate unexpectedly or may fail to fix the error. This may mean loss or damage of style files. To prevent this always work at a copy of your style file collection.