ok no suggestions

ok no suggestions

Discuss the source code and development of Spring Engine in general from a technical point of view. Patches go here too.

Moderator: Moderators

Post Reply
monohouse

ok no suggestions

Post by monohouse »

but how do you define a suggestion ?
anyhow, I suggested many things but they were not welcome
so now im thinking fixing bugs kind of suggestions, but that would obviously depend on how you define bugs too.......

there is a problem with the sound system in spring, lots of distortion lack of effects and many mods use old ta sounds with 11,025 hz sampling rates (final frontier ?) but we should probably solve one problem at a time, and here is the first solution.......

the distortion problem, most of the distortion comes when queuing units with shift+drag keft click, to add a line of units to build, the engine as far as I have noticed is using the sound of the constructing unit * the number of units queued then mixed all those same sounds with themselves (obviously causing not only distortion but also phasing in the same place, which contributes to it's horrible sound), therefore after a little thinking I came up with a solution :

you can do something else as follows :
play the sound of the constructing unit as you leave the mouse left key, use the distance between the construction unit and the first to-be-constructed unit queued as the predeleay for reverb (the predelay should be calculated against the size of the map and then divide the distance from the unit to the future to be constructed units substracted from the distance between the constructing unit and it's to-be-contructed units), then use 10% of the total number of the queued units as early reflections, the diffusion of which should be calculated against the sound of the constructing unit (use - instead of + when combining samples as the diffusion result) then for the RT60 use a gain reduction based on the size of the map so that the size of the map will define the diffusion+feedback of the RT60 remaining after early reflections. use panning effect based on the position of the screen, the amplitude of the channel from which the sound is coming should be based on the current position of the view of the played against the map he's currently viewing, the amplitude of every reflection should be calculated based on the position of the unit and the position of the player's current map view, every unit queued and it's order should be re-calculated based on the current position of the player's map view against the current unit's reflection, the total number of reflections (RT60) should probably be the number of units queued for construction.........

this is a very cool sound effect that will make spring very fun to play, and the sound will be very good, instead of suffering and waiting until the distortion is over, you will be like happy to queue more units just to hear the sound calculated against the unit that is building it, btw you may also add a reflection calculation per-unit-built and calculated each time based on the position of the player's current map distance as well as the building unit's distance, they can all be used for phase determination as well as panning and also for diffusion and refraction calculations, I this this is going to be really chool thing to do.

just one thing I thought it would be a good thing to add, VST plugin support, there are many people with sound cards that have processors in them, with this ability it might be a good idea to give those a run for their mhz, the easiest way to do so is to use the VST API, the above suggestion can be easily calculated, it's hardly any "load" for the cpu, 1 or 2 simple equations, but still it might be better to use VST and insert the VST plugin of each effect into spring, which means mod developers will have the ability to use sound effects without the need for creating effects inside the wave files, which means not only the sound engine in spring will be improved, but it will also improve the sound engine for all of it's mods, the mod file will only need to specify for each sound in it's files which effect should that sound use, also give the parameters necessary for the effect VST (gain, frequency, reverbs, phasing, panning etc....)
Tobi
Spring Developer
Posts: 4598
Joined: 01 Jun 2005, 11:36

Re: ok no suggestions

Post by Tobi »

monohouse wrote: [...]

the distortion problem, most of the distortion comes when queuing units with shift+drag keft click, to add a line of units to build, the engine as far as I have noticed is using the sound of the constructing unit * the number of units queued then mixed all those same sounds with themselves (obviously causing not only distortion but also phasing in the same place, which contributes to it's horrible sound), therefore after a little thinking I came up with a solution :

[...]

just one thing I thought it would be a good thing to add, VST plugin support, there are many people with sound cards that have processors in them, with this ability it might be a good idea to give those a run for their mhz, the easiest way to do so is to use the VST API, the above suggestion can be easily calculated, it's hardly any "load" for the cpu, 1 or 2 simple equations, but still it might be better to use VST and insert the VST plugin of each effect into spring, which means mod developers will have the ability to use sound effects without the need for creating effects inside the wave files, which means not only the sound engine in spring will be improved, but it will also improve the sound engine for all of it's mods, the mod file will only need to specify for each sound in it's files which effect should that sound use, also give the parameters necessary for the effect VST (gain, frequency, reverbs, phasing, panning etc....)
The first is already fixed by Kevin Rudat. A few days ago I saw a commit message which made it so that with a large queue not N sounds are played but just one. It's a much more simple fix of course, but it will reduce the distortion anyway.

The last seems quite somewhat harder and I don't know if we have any devs with the necessary knowledge and time to make that.
monohouse

Post by monohouse »

that's chool duuude, so how are we going to make sound effects in spring ? and I mean except panning ehehe, what about some reverb ? one or 2 equations, without even diffusion maybe ? in software ?

anyway, how do we solve the low resolution problem ? dithering will get us nowhere I think, resampling ? (FFSomgFftwLOL...), maybe both and get a few teraflops cpu ? cause the processing time will require the better part of it if not all of it and then want some more.

I think if there were effects in spring, we could use that as a partial solution to the second problem ...

there is one other thing, when playing multiple sounds there is also distortion, how do you fix that ? as a simple suggestion I would recommend reduce amplitude by the number of waves played at the same time.
Post Reply

Return to “Engine”