pmms icon indicating copy to clipboard operation
pmms copied to clipboard

Changing Range for players does not increase range of sounds.

Open Duderocktv opened this issue 4 years ago β€’ 5 comments

Sorry for another comment!

The range variable does not project the sound further. I will see in the resmon that the script is still running at further distance, but the sound is no longer there. This is inside a big, one roomed interior!

The old phonograph version seems to work well with range!

Duderocktv avatar Oct 21 '21 20:10 Duderocktv

Range is the distance you can get from the entity you're playing something on before it cuts off entirely. It's mostly to make the resource more efficient, once you get outside of the range of a media player the script can temporarily stop rendering any video/sound until you get close to it again.

It doesn't affect the rate at which the volume fades as you get further away, however. That is controlled by the attenuation. There are two kinds of attenuation: "same room" attenuation, which determines how quickly the volume fades when you're in the same interior/room as the entity, and "different room" attenuation, which determines how quickly the volume fades when you're in a different interior/room from the entity.

The higher the value for either attenuation, the faster the volume fades out. A value of 0.0 for attenuation means it will never fade, only cut out when you go outside the range. The "different room" attenuation is typically higher than the "same room" attenuation so that the volume fades faster when you're in a different room.

So, based on what you said:

This is inside a big, one roomed interior!

you'll want to increase the range, which will keep the media player active further away, but also decrease the same room attenuation, which will make the audio fade out slower.

kibook avatar Oct 21 '21 21:10 kibook

Based on this information, is it possible to have a prop in one location, and then possibly like, speaker props or something further away, and have the sound streamed to them too? I'm not entirely sure how it would work but say like, you have a screen in one location, and then two speaker props further away.

I did notice that if you were to have a screen in one location, and then hide another screen under the map and select the screen under the map, set up the attenuation, range, etc etc, it somewhat works but I think if it would be possible to select one prop and stream/sync to multiple, it could potentially help πŸ€”

TayMcKenzieNZ avatar Feb 23 '22 13:02 TayMcKenzieNZ

Based on this information, is it possible to have a prop in one location, and then possibly like, speaker props or something further away, and have the sound streamed to them too? I'm not entirely sure how it would work but say like, you have a screen in one location, and then two speaker props further away.

It's not possible with pmms currently, but definitely possible to do in general. The sound isn't coming from any prop, pmms is just tricking you by raising/lowering the volume as you get closer/farther from certain coordinates in-game, so nothing inherently ties the sound to the same prop that is displaying the video aside from it being easier to code and design an interface for that way.

This should be pretty much solved in the future when I implement a solution for #27, allowing multiple objects to share the same media. One object can be a screen, another can be one or more speakers in different locations. Possibly, there could even be an option to "mute" certain objects, like the screen, so that the sound only comes from the speakers.

I have a basic idea of how to implement this in pmms (e.g., additional objects get stored in the mediaPlayers table as "links" back to a primary media player), the biggest hurdle I think will be the interface.

kibook avatar Feb 24 '22 12:02 kibook

Awesome ☺️ looking forward to it, though hopefully this is able to be toggled, as some people probably don't want all media to be played over all props, they can use hypnonema for that πŸ˜› but yeah I was thinking about screen and speakers as a way to "expand" the attenuation and "range" πŸ˜›

TayMcKenzieNZ avatar Feb 24 '22 15:02 TayMcKenzieNZ

It's still very different from what Hypnonema does. At this time I don't intend to add an option to play something on all props of the same type (which is the only option in Hypnonema), instead you will be able to link specific props together to play the same stream. They could be the same type of prop or completely different ones.

You'll start playing something on a prop, let's say a TV. Then you'll be able to select another prop, like a speaker, and choose to link it to the TV so that it plays the same exact stream. Since it has no render target, you'll only get the audio from the speaker (unless you create a scaleform screen for it). You can link any number of additional props to the first, and they'll all play the same stream, which is only actually loaded once, as opposed to if you play the same URL on multiple props now, where the stream is loaded again for every prop.

kibook avatar Feb 24 '22 16:02 kibook