x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Sound Cue radio stations

I am trying to create a radio within UE4. I have created a sound cue which blends between station with a parmenter which I set though a blueprint. Between each of these stations I would like white noise. How would make white noise the default sound when no station is selected. I plan to have many stations so I don't want to manually place the white noise between each clip.

Current Setup alt text

Desired Outcome alt text

Product Version: UE 4.21
Tags:
current.png (87.4 kB)
fade.png (2.5 kB)
more ▼

asked Dec 04 '18 at 08:57 AM in Blueprint Scripting

avatar image

Sam Carey
49 2 4 7

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

Hi! so this is the setup i would use for something like this.

alt text

But it all comes together in blueprints. I'm assuming the player would have "knob" to control the radio.

The knob would control a float value, the radio frequency. From which I would derive 2 more values: a float for "station accuracy" and an integer for "selected station".

Those last 2 are what talk with the Sound Cue. "Station accuracy" handles the crossfade: 0.0 = full white noise, 1.0 = full station. "Selected Station" handles the switch; which chooses which station to play.

To get the station I would just % (modulo) the frequency to 1.0, and then round it, so no matter the value it always returns a valid station ID.

alt text

Then for the accuracy, I would % the frequency by 1, subtract 0.5, and map that to a 0.0-1.0 range. Which would be your accuracy. (you could lower the inRangeB to get a bigger tolerance).

alt text

And that's it really. You could display the Frequency back to the player for show.

How it helps you =)

captura.png (135.3 kB)
captura.png (40.6 kB)
captura.png (65.5 kB)
more ▼

answered Dec 09 '18 at 02:28 AM

avatar image

Evigmae
1.7k 8 4 8

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question