Facepunch / sbox-issues

162 stars 11 forks source link

Current Audio implementation is not ideal (.sound and C#), I prefer Soundevents system! #597

Open beaumancer opened 2 years ago

beaumancer commented 2 years ago

What can't you do? 1) importing new sounds is a slow workflow 2) the properties available in the Inspector ".sound" format are very limited 3) these entities are unavailable/dysfunctional "point_soundevent" and "env_soundscape" 4) Coding audio interactions with inputs and outputs

Audio implementation with (.sound C#) is not ideal, it forces unnecessary coordination between code/audio disciplines, and importing new sounds has a slow workflow.

Audio implementation in soundevents is really nifty, but thats a big ask, perhaps we could focus on these .vsndevts properties that are greatly desired in .sound implementation: Also, the entities like "point_soundevent" allow the audio designer to have better control of their sounds in the vmap. The use of "env_soundscape" is also a really highly desired audio feature, which is only possible with soundevents.

(workarounds are possible for this "multi" feature, but not workflow friendly) type = "hlvr_start_multi"

(super nifty implementation use; especially for randomized and looped sounds) volume_fade_in = 5 volume_fade_out = 5

(these are somewhat represented in the Inspector with "Distance = 1000", but the minimum distance is really important too) volume_falloff_min = 200.000000 volume_falloff_max = 800.000000

(These properties are incredibly useful for looping sounds, your looped sound could be 5 seconds long but you need it to fade volume in/out over time, these properties accomplish exactly that. There is a workaround involving code fades, but my workaround was very CPU expensive) volume_fade_over_time_loop_start = 40 volume_fade_over_time_loop_end = 60 volume_fade_over_time_curve = [ [ 1.000000, 0.100000, 0.000000, 0.000000, 1.000000, 1.000000, ],
[ 30.00000, 0.800000,
0.000000,
0.000000,
1.000000,
1.000000,
],
[ 40.00000, 0.080000, 0.000000, 0.000000, 1.000000, 1.000000, ], [ 50.00000, 0.110000, 0.000000, 0.000000, 1.000000, 1.000000, ], [ 60.00000, 0.080000, 0.000000, 0.000000, 1.000000, 1.000000, ],
]

(very useful properties to have, they're great for spatializing and controlling a room audio design, or special interactions) occlusion_amount = 1 occlusion_loss = 0
occlusion_source_radius = 400 occlusion_scale = 0.5

(musical beat-sync transitions require these properties. Currently musical transitions are impossible.) track = "main" sync_track = "main" wait_for_track = 0 sync_bpm = 64 sync_bpm_beats = 4 should_pause = "true" mixgroup = "LoudMusic" start_point = 0.0 // used for internal timing mechanics end_point = 0.0 // used for internal timing mechanics

Theres a whole collection of opvar properties I won't bother mentioning here.

How would you like it to work? 1) importing new assets is tedious because every asset is a new window, theres no centralized asset detailer for all audio. You cant drag/drop assets in, every asset requires you to find it in the file explorer. You cant import folders. You can't copy/paste audio asset details into other assets, all assets must be defined individually. 2) more audio inspector properties available would be great! Take inspiration from the soundevents properties. 3) & 4) Implementing audio interactions is now a forced coordination between audio and code disciplines, whereas the input and output system combined with the soundevent system allowed the audio designer to totally code their audio without disturbing other disciplines.

What have you tried? There are workarounds but volume fades, but it becomes a hassle when considering many assets. I've found volume fade workarounds that are inefficient with CPU, not ideal.

Additional context Soundevents were used in s&box months ago! I wish I could be using them now! Thanks!

gabengaGamer commented 2 years ago

and also Steam Audio (rtx sound) broken in the s&box.

justyn0 commented 2 years ago

I agree, .sound and the inspector in general are very limiting and the workflow is so slow. In the inspector you can’t listen to the .sound you just created. You have to use a different tool to listen to the .sound. (Hammer, ModelDoc, or any other tool that can play .sound). In the Sound Event Editor, you can listen to your soundevent right within the tool. You can control the distance and angle of the soundevent to listen to it in multiple directions.

The inspector doesn’t even have basic features like an undo or redo button and a “Save changes?” message when you close the inspector and forget to save.

I would really like it if the inspector got some of the features or properties from the Sound Event Editor.

MoonlyDays commented 2 years ago

Bump. This is still an issue and is still bothering a lot of people.