Proximity Sounds

I’ve had this idea for a while now and I didn’t know if it is possible in flowlab. But I was wondering if there was a way to make proximity sounds in flowlab. Although this does sound very simple, I’m talking about the volume of the sound depending on how far away you are from the source. So lets say if you are making a horror game and need a heartbeat effect. But it sounds cheesy when the monster is near you and the heartbeat starts up at full volume instead of gradually rising as the creature approaches you.
Now I’m sure this possibly could be done, but I never really attempted it since I have no clue where to begin. So does anyone have any sort of ideas on this design.
Of course I need something like this for many games so I’ll give credit for the design.

Yeah, it is… I think.
If you get a proximity behavior you can make it so that if it is over a certain distance it changes the volume of the sound behavior.
I’m going to go try to make one so that if I am wrong I’m not a complete dumb dumb talking out of my non-existent mouth.

1 Like

Yeah, I’m trying to make one using extractors ad expression. I think I’m on to something, lol.
Probably using proximities would have probably worked a lot better, but I’m trying a different approach. I hope this idea is possible.

1 Like

Okay, I have an idea.
@grazer needs to make it so filters can take a range of numbers instead of just less or greater than a select number.
Since of this, I’m going to need to place 100 filters to reverse the extractor since I can’t think of an expression to do it. So I’ll be back in a few hours.

1 Like

Actually you can with text lists.
Specifically number lists.
If you have an auto listing system you can have a wider range of a filter and make it much easier.

1 Like

Oh okay, thanks. I actually didn’t know that, lol.

1 Like

Okay, I did it. But there has to be an easier way cause I’m using 100 filters and that fries my iPad, lol.
Is there an expression that can make 100 (and high) = 0 and 0=100 and everything between that equal to a counter part that adds to 100?

1 Like

Well I made one.
Just use a number list to make a mass filter, I can’t explain it right now but here’s a link.

1 Like

Here is what I came up with. It’s starting to run a bit smoother now and it works great on my computer.

Also this game is kind of complex testing game, lol. I just took a bunch of tests and then add them to this and its starting to look like a game.
Anyway the sound comes from the radio.
1 Like

I did this in NYCTOPHOBIA,
I have a bundle that outputs distance in the Bundle Library.

1 Like

HOO GEEZ, that is a lot of filters, like waaay too many filters.
Okay, so I guess I should probably start explaining how a mass filter using number lists work.

I have a TL;DR at the end if you don’t want to read this essay.

There are two main components of a mass filter, the number list and the auto list system.

The number list is just another behavior, the only things you need to use is the Find node and Push node.

The Find node will find a number on a the, list which is basically a big ol’ file cabinet that stores a value in a line, or file in the filing cabinet metaphor. When we set a value to the Find input node it will look through each Line to see if it matches the value given. When it does it will look at the total amount of Lines and see which one the Lines it matches is placed. If it doesn’t match it send a value of 0.

  • Basically if there are ten Lines with the vales of their place (first=1, second=2, etc.) and you send it the value of 3 it finds the third line since the third line has the value 3. it will output the value 3 because it is the third Line on the list.

The Push node, when given a value, will make a new Line and add it to the list making its own value the one it was given, pretty easy.

  • Example: If the value 9018874 is given it will add another line with the value 9018874.

Not the auto listing system.
When broken down it is just a repeater with in a number that goes from the a single value to another value then its stopped by a filter.

You know I just realized this could be a lot shorter but I made the very first thing I explained extremely long… sigh…

You find a value in a List of lines that contain individual values. Those Lines are given by the auto filter witch sits on repeat till a filter says its time to stop, like the bartender. Those values are put into a Push node in the number list behavior which makes a new Line. Then the number list pops out a number based on which file matched up with the number it was given. this number is the place in which the Line was, like First Second or Last, aka me. If it doesn’t find a match a value its says nope and drops a 0 as an output, I was tempted to make a tinder joke but what do I know about love.

I think this was it, bad explanation but who really read any of that anyway.
If you just want a bundle with a basic 1-100 mass filter then I’ll do it since this explanation went over the sky.

1 Like

What are you trying to make?..

1 Like

A bad explanation on making a mass filter.

Why are you making mass filter?

To find the distance between the sound source and player, knowing you you probably made a way that was ten times easier so all of this might seam very unnecessary, and it probably is…

I had the proximity working for the sound, but I needed to make it so when the player is within or father than a 100 pixels (technically 200 or 300, but I divided it down) it will set the volume of the music to 0. And when you are 0 pixels from the source it will be 100 volume. I didn’t know how to reverse or invert this so I had to make 100 separate filters inverting each number. My dumb brain couldn’t think of an expression to use and I didn’t know that you could use text stuff as a mass filter.

Sound Source and the player is basically saying the distance between 2 objects.
You just want to convert distance into volume (again I did this in Nyctophobia).


1 Like

Yeah, looking back I probably could have figured out a batter way to do that, I’ll go check out Nyctophobia to see how you did it.

1 Like

I used something like the bundle above, just something like 200 pixels away made 0 volume and 0 pixels was 100 volume. Not too sure, but it has been a long while. I probably could get a bit more complicated with my progress Bar example used to convert into correct percentage.

Also btw, I started working on 3D sounds:

ps. I know I need to update Nycto, I just wont be able to for a while longer.

1 Like