fabricskyboxes icon indicating copy to clipboard operation
fabricskyboxes copied to clipboard

Idea for new object: sound

Open UsernameGeri opened this issue 1 year ago • 0 comments

An idea I had, that I think would be a great addition, is being able to play sounds with this mod.

The format could look something like this:

{
	"sound": {
		"file": "fabricskyboxes:sound/example.ogg",
		"clipToFade": true,
		"loop": true,
		"delay": 100
		}
}

"file" is self explanatory, however I'm not sure what file type should or could be used. The vanilla game use .ogg, but .mp3 could be used as well.

"clipToFade" would control whether or not the sound file should be clipped to the fade times of the sky. When true, the sound starts at "startFadeIn" at 0% volume, at becomes 100% at "endFadeIn". Same idea for fading out. When false, the sound starts at "startFadeIn" at 100% volume and plays the entirety of the sound file.

"loop" is self explanatory, it is whether or not the sound should be looped, or only played once.

"delay" would control how much the sound is being delayed before it plays. If "clipToFade" is true, all 4 fade times are delayed.

Edit.: clipToFade would now be controlled by the keyFrames of course. So keyFrames would serve as an audio level controller.

UsernameGeri avatar Jul 24 '23 16:07 UsernameGeri