Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SFCF support #7

Open
sylvia-leaf opened this issue Oct 3, 2024 · 5 comments
Open

SFCF support #7

sylvia-leaf opened this issue Oct 3, 2024 · 5 comments
Assignees
Labels
communication Communication with others feature request New features generator enum Generator enums
Milestone

Comments

@sylvia-leaf
Copy link
Contributor

Todo: negotiate with Kenneth Rundt to see if we can get permission to include SFCF in SFe and get a specification for SFCF.

If we can't access the specification, then we may be able to reverse engineer SFCF and implement it in a future version.

@sylvia-leaf sylvia-leaf added feature enhancement Enhancement of existing features help wanted Extra attention is needed labels Oct 3, 2024
@sylvia-leaf sylvia-leaf self-assigned this Oct 3, 2024
@sylvia-leaf sylvia-leaf modified the milestones: 4.02, 4.03 Oct 3, 2024
@stgiga
Copy link
Contributor

stgiga commented Oct 3, 2024

What is SFCF?

@sylvia-leaf
Copy link
Contributor Author

SFCF is SynthFont Custom Features. If you've ever used Viena, you will notice the Custom Features settings that are only for Kenneth Rundt's products. If we can get a specification for that, then any SFe file that incorporates these features will work on SynthFont as expected!

@spessasus
Copy link
Member

Hi,
I've done some work on reverse engineering SFCF. It seems to use the unused generators, not the INFO like i thought it would.

For example, here's what I changed in Viena:
image

This resulted in a new generator, value 18. In the spec, it is called unused2:
image
(The other one is looping mode set to loop)

The value seems to use relative timecents, as it does equal to around 0.003 seconds.
image

@sylvia-leaf
Copy link
Contributor Author

sylvia-leaf commented Nov 18, 2024

That's very interesting. Now, what we need to know are the generator enumerator numbers that are used by SFCF, so we can start adding the features that davy7125 requested (such as round robin/sample switching support).

As we saw, generator 18 (unused2) cannot be used as it is being used by SFCF. If I would guess, I think that generators 19 (unused3) and 20 (unused4) are likely to also be used by the other two DLS features. All we need to know now is where the data for the "always play sample to end" function is stored. This is interesting, as it seems to be a boolean value, unlike a numeric value (there isn't a boolean term defined in section 2.1 of SFSPEC24.PDF). Maybe, SFCF uses generator 59 (unused5)?

Either way, if we can figure out what is being used by SFCF, we can select generator values and avoid clashing with SFCF.


Other experiments to do:

  • What if a generator enumerator beyond 60 (endOper) is found? Will the file be Structurally Unsound, or will it still run?
    • SFSPEC24.PDF suggests that anything above 60 is simply undefined, but some program may not like seeing anything above 60.
    • If 59 is "unused5" rather than some "reserved" value, then surely, it would make more sense for 59 to be endOper instead of 60?
  • If we can set the generator enumerator beyond 60 without causing a Structurally Unsound error, then how high can we set it?
    • It may be an 8-bit value such as a CHAR (max 127) or a BYTE (max 255).
    • It may be a 16-bit value such as a SHORT (max 32767), or a WORD (max 65535).
    • It may even be 32-bit, but considering that many critical SF structures are only 8-bit or 16-bit, this is really unlikely.
  • How do legacy soundcards and their tools react to "unused" or "reserved" generator values?
    • These banks can be tested on the Sound Blaster X-Fi Titanium (implements legacy SF2.04 in hardware).
    • If the behaviour from a legacy soundcard differs from SFCF specifications, then the legacy soundcard prevails.
    • DLS features that SFCF implements can always be moved to a different generator.
    • Software can automatically detect an ISFT sub-chunk value of SynthFont Viena and move SFCF generators to a non-conflicting value.

Stuff to do afterwards:

  • Use the few empty spaces before 60 for features requested by davy7125.
  • We can go beyond 60. Reserve spaces for any DLS features not included in SFCF.
  • Real-time synthesis has been a long-term goal of SFe. Start reserving spaces for appropriate parameters.

@sylvia-leaf sylvia-leaf mentioned this issue Nov 19, 2024
18 tasks
@sylvia-leaf sylvia-leaf added communication Communication with others and removed help wanted Extra attention is needed labels Nov 25, 2024
@sylvia-leaf sylvia-leaf modified the milestones: 4.3, 4.2 Nov 25, 2024
@sylvia-leaf sylvia-leaf added feature request New features and removed feature enhancement Enhancement of existing features labels Nov 26, 2024
@sylvia-leaf
Copy link
Contributor Author

I've found out the rest of the generator enums that are used by SFCF. The precise types of values used by SFCF are not reverse engineered because the SFCF functions are not yet implemented in SFe 4.0.

Reserved SFCF Generator Enums

These generator enums are now reserved for use in 4.2:

  • 0Eh: Vibrato LFO to volume (was unused1 in legacy SF2.04)
  • 12h: Velocity to volume envelope attack (was unused2 in legacy SF2.04)
  • 13h: Velocity to modulation envelope attack (was unused3 in legacy SF2.04)
  • 14h: Always play sample to end (was unused4 in legacy SF2.04)

This leaves 2Ah (reserved1), 31h (reserved2), 37h (reserved3) and 3Bh (unused5) as the remaining enums below 3Ch (endOper) that we can use for SFe features.

How does software respond to higher enums?

Polyphone, Viena and even the Creative SoundFont Bank Manager "allow" any value that fits into the sfGenOper field for a generator enum. This means that any value between 0 and 65535 is theoretically usable by SFe. However, to ensure that we efficiently use the generator enum space allocated, we should fill up the previously "reserved and unused" values first.

@sylvia-leaf sylvia-leaf added the generator enum Generator enums label Dec 5, 2024
@sylvia-leaf sylvia-leaf added this to SFe 4 Dec 9, 2024
@sylvia-leaf sylvia-leaf moved this to Ready (future version) in SFe 4 Dec 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
communication Communication with others feature request New features generator enum Generator enums
Projects
Status: Ready (future version)
Development

No branches or pull requests

3 participants