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

Enhanced sound effects #95

Closed
jakubg1 opened this issue Feb 12, 2023 · 2 comments
Closed

Enhanced sound effects #95

jakubg1 opened this issue Feb 12, 2023 · 2 comments
Assignees
Labels
A: Modding Issue which will impact modders if worked on. Potentially a breaking change. D: Change/Suggestion A change to an existing feature. D: Feature Request A feature that may be implemented in a future version. D: Organization A change that will not impact the end-user, but may be helpful for simplifying/documenting the code. R: Implemented A suggestion has been added into the code.

Comments

@jakubg1
Copy link
Owner

jakubg1 commented Feb 12, 2023

Split sound effects into actual sound effect files and sound definitions (number of samples, stream/load etc.).

The sound effects should be able to have a few different sounds defined and play an appropriate one depending on variables (for example, changing the pitch or actual sample using Expressions).

Example (collapse.json):

{
  "sounds": [
    {
      "sound": "collapse_1",
      "pitch": "$expr{1 + 0.05 * ([combo] - 1)}",
      "conditions": [
        "$expr{[length] == 3}"
      ]
    },
    {
      "sound": "collapse_2",
      "pitch": "$expr{1 + 0.05 * ([combo] - 1)}",
      "conditions": [
        "$expr{[length] == 4}"
      ]
    },
    {
      "sound": "collapse_3",
      "pitch": "$expr{1 + 0.05 * ([combo] - 1)}",
      "conditions": [
        "$expr{[length] == 5}"
      ]
    },
    {
      "sound": "collapse_4",
      "pitch": "$expr{1 + 0.05 * ([combo] - 1)}",
      "conditions": [
        "$expr{[length] == 6}"
      ]
    },
    {
      "sound": "collapse_5",
      "pitch": "$expr{1 + 0.05 * ([combo] - 1)}",
      "conditions": [
        "$expr{[length] >= 7}"
      ]
    }
  ]
}
@jakubg1 jakubg1 added D: Feature Request A feature that may be implemented in a future version. D: Change/Suggestion A change to an existing feature. D: Organization A change that will not impact the end-user, but may be helpful for simplifying/documenting the code. A: Modding Issue which will impact modders if worked on. Potentially a breaking change. labels Feb 12, 2023
@jakubg1 jakubg1 added this to the Full 1.0 release milestone Feb 12, 2023
@jakubg1
Copy link
Owner Author

jakubg1 commented Jul 10, 2023

Possible sound event fields:

  • sound - The path to the sound file.
  • volume - The sound's volume, defaults to 1.
  • pitch - The sound's pitch, defaults to 1.
  • instances - The amount of copies of the sound that can be playing at once, defaults to 8.
  • condition - A list of conditions which must be satisfied in order for the sound to be played.

@jakubg1
Copy link
Owner Author

jakubg1 commented May 18, 2024

Implemented in 162031c

@jakubg1 jakubg1 closed this as completed May 18, 2024
@jakubg1 jakubg1 added the R: Implemented A suggestion has been added into the code. label May 18, 2024
@jakubg1 jakubg1 self-assigned this May 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A: Modding Issue which will impact modders if worked on. Potentially a breaking change. D: Change/Suggestion A change to an existing feature. D: Feature Request A feature that may be implemented in a future version. D: Organization A change that will not impact the end-user, but may be helpful for simplifying/documenting the code. R: Implemented A suggestion has been added into the code.
Projects
None yet
Development

No branches or pull requests

1 participant