Skip to content

Support for Fairlight CMI 3 voices#132

Open
PythonBlue wants to merge 14 commits intogit-moss:mainfrom
PythonBlue:cmi3
Open

Support for Fairlight CMI 3 voices#132
PythonBlue wants to merge 14 commits intogit-moss:mainfrom
PythonBlue:cmi3

Conversation

@PythonBlue
Copy link
Copy Markdown

Attempted to work with the codebase enough to implement support for Fairlight CMI Series III voices as a source format! Resources I don't currently have will likely be required to make it available as a destination format, but in the meantime, hopefully any retro sample enthusiasts with the appropriate files can try out.

Notes:

-tuning may be severely off when converted, and my experience is that that depends on the destination format, so that would need looking into as well. This version of the code should have correct tuning for SFZ conversion, though.

-filter cutoff and many other bells-and-whistles parameters of the time are currently unsupported. Silver lining is that the original sampler used no interpolation, thus the filter in it was normally intended to only control the imaging frequencies and aliasing anyway.

-CMI IIx files and earlier are unsupported despite their using the same VC extension.

PythonBlue and others added 14 commits July 11, 2025 17:24
Experimental support for converting from Fairlight CMI 3 voices. Only basic mapping parameters and loop information are supported for now.
Fixed tuning issues with read voices
Tuning issues finally fixed for good
Support for CMI 3 voices now includes approximation of amplitude and envelope parameters. With that, support for all universal sample format parameters may be close to complete (filters would be a hassle due to their being unconditionally keytracked to the pitch of the original sample, among other issues).
Fixes for channel count, sample naming, and pitch detection for atypical sample rates.
Disable extra debug logging for CMI voice reading
Minor fine tune fix
Updates for main repo commit compatibility
Compilation fix for the tuning functions
Reorganized for CMI 3 voices to be in right place
Update documentation at last to mention the CMI format
@git-moss
Copy link
Copy Markdown
Owner

Thanks for the contribution. Please provide or point me to some test files. Is there a specification available for the format?

Also please improve the code a bit:

  • VCDetectorUI can be removed completely since it does not add any settings (simply use MetadataSettingsUI instead)
  • Instead of using several Lists (like List subvoiceID = new ArrayList();) create a class for these parameters and then use a list with instances of this class
  • Instead of several times using things like "Byte.toUnsignedInt(subFuncBuff[4]) * 16777216 + Byte.toUnsignedInt(subFuncBuff[5]) * 65536 + Byte.toUnsignedInt(subFuncBuff[6]) * 256 + Byte.toUnsignedInt(subFuncBuff[7]));" use the StreamUtils helper class it provides several methods for reading little- and big endian numbers. E.g. look at readUnsigned32

@PythonBlue
Copy link
Copy Markdown
Author

Thanks for the response, first of all.

The first request is a valid one to ask about. It seems most of the community is more restrictive than necessary over sharing the mere way the sample format works, let alone 40 year old recordings for its factory library, but while I hesitate to put my foot in the sand by sharing such samples myself, I did find this upload to their Facebook group that should help with verifying conversion integrity.

https://www.facebook.com/groups/4943488865/permalink/10160569942663866/

As for the code formatting, fair critiques: I fully admit I only started learning Java when I began working on my fork: beforehand, most of my knowledge was in Python instead. If you think the results are promising as it is with the test files linked above, let me know, and I'll try to find the time to reformat the code to be better up to spec.

@git-moss
Copy link
Copy Markdown
Owner

Thanks for the files. I am bit unsure of how useful this format is since the library is already available in several other formats but if you improve the code I will integrate it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants