TowerFM

Heyo!

I’ve been working hard to create an idea I had.
Introducing,!

TowerFM is a radio station that I will broadcast that deals music that is noncopywritten and will hopefully serve more stuff as it develops!

Right now we have 3000+ Songs from OCRemix and possibly will get more from more non copywritten resources!

The station works in Tower Unite Media players and actual web browsers!

Keep in mind that now I can only host the station when I am on Tower since I do this on a laptop and sometimes I need to take this laptop places. May look into making this permanent through VPS or something. Idk. I will only broadcast when in my condo that will be named “TowerFM Station” or if I say I’m broadcasting in the Tower Discord (If I decide to not be in game, or if I decide to not sit in my condo and actually play the game Tower Unite)

How can I tune in?

Tower Media Supported links (Must Be condo owner to play or have host enter link)
TowerFM Audio & Song Info Thanks to @The_Sink_God for basically making both audio and visuals work through iFrame! Dude, you are awsome, I didnt think of that lol

Other Browser Only (If in game, use steam web browser :wink: )
Tower FM Song Requests

Future Improvements

The plan for the future is to make the station more radio like; add advertisements, or even jingles, but for now, all we got is music.

I hope maybe with help from the community we can improve the station more, maybe have community involvement for advertisements (like official tower lobby shop adverts), or even more!

Enjoy!

25 Likes

I will Definitely use this, I like this idea
I don’t know how i feel about advertisements though

@DENMarkus its to make it feel like an actual station. It wouldnt be IRL adverts. but like adverts for Robs imports, etc

8 Likes

This is a really neat idea. Even with Tower aside I’d probably have this up in my browser from time to time to listen to some music in the background. Nice job! Although one thing, I mentioned iframes to you on the Discord and you said you didn’t really know how to set that up so here’s an example:

Allows you to have the audio stream and currently playing screen on one page while still using your refresh method. Of course there are better/more efficient ways to make it auto update but to make it easier that’s the best way I know of to merge the two into one screen with what you’re doing.

Also - I’m not sure if that’s the public IP address of your home network or a service provider but if it’s your home network that the audio stream is coming from, I’d suggest moving the audio stream to your gamenerdz.ca website (if that’s on a hosted service like DigitalOcean or etc). It’s not generally dangerous (although it can be in some cases), but if you don’t have a very good connection many users streaming audio from your home network will cause some big slowdowns on both sides. I’m also not sure how you have it set up so I might be very wrong on this, just an observation :slight_smile:

2 Likes

ah! i like that a bit better, i thought it was like advertisements for other people or something

i thought about this a few years ago as something i wanted in the game because i liked being the dj role in dark rp servers because it was fun, good to see somebody do it!

This is awesome! I love seeing creative projects like this, best of luck with it and I hope it gains popularity.

9 Likes

Happy to see that you’ve expanded the song display system for use in all condos, this is awesome! I’m excited to see where this goes from here and I see a lot of potential for community collaboration on this (like people creating their own ‘adverts’ for community condos or plaza stores).

Great work :smiley:

1 Like

Album artwork triggers me. Cant get it to work

AAAAAAAAAAAAAAAAAAAAAAAA

if albumart != correctalbumart {
   makeitcorrect();
}
5 Likes

mmm me like

Nice! I will use it for sure here and there :slight_smile:

Right now Im kinda taking a break from tower so TowerFM may be offline for a while, but hopefully will bring it on some time eventually.

So, College is coming up for me soon. I may not be able to host TowerFM as much, as I want to. So TowerFM may not Go live much anymore. Ill keep doing it when I have the will to tower, free time to spare, and energy, but for now, it may be on hiatus, or at least, a few times a month. depends.

So why not you guys create stations, etc for tower?
I would love to see others create Stations in tower and let listeners have variety!
While I don’t think I could create a competent guide on how it works, I can at least give a general idea and give you guys the resources I used to get started!

The important tools you need are VLC for its Transcoding server feature!
Virtual Audio Cables or some program that allows you to have audio played on your PC be sent to VLC as a Microphone input.
And an Audio Player to actually play the music.

Here are some links to the programs I use to do TowerFM!
VLC (Server)* : https://www.videolan.org/vlc/
Audio Cables Program (Elgato Sound Capture that Comes with Game Capture): https://www.elgato.com/en/gaming/downloads
Audio Program (RadioDJ - USE THE BETA VERSION, STABLE IS BUGGY KINDA): https://www.radiodj.ro/
Audio Router (Windows 8 and under, AND Older Versions of Windows 10): https://github.com/audiorouterdev/audio-router

Keep in mind you will have to portforward in this guide so if your not comfortable with the risks
or do not know the risks of portforwarding, turn back now!

Programs with * are required!

So while I wont be explaining RadioDJ since there are MANY tutorials on the internet and Im still LEARNING how to use RadioDJ. As for the other programs, your on your own for that stuff, also because I really dont want to make an in depth tutorial right now (Lazy). I can at least give you the Basics on how to get online. Song Request and Song info how-tos are easily found on google! This mini half assed guide is going to be how I set it up, depending on your program you may have to translate it yourself to get it to work for your Programs (for example, I use Elgato for Audio cables, while you use VB Audio Cables, etc)

So basically the idea is that that the Audio Cables are whats going to “pipe” the audio to vlc, and vlc is going to capture the audio and send it to the internet as a OGG format, Audio Only.

First, Open your Audio player (And Elgato Sound Capture if using it. I am so Ill include the setup for it, If not, Ignore Elgato Sound capture steps)

Now Open Elgato Sound Capture and change the mode to “Music”
If you want to listen to the music as its playing from the music player, change the “Where you want to hear the music” to your preferred sound card/source. If you want to listen at the same time as everyone else, just tune in when live.

Make sure to change your Playback Device to your normal Audio Device! Elgato likes to change the audio playback to itself and that means when broadcasting if not set to something other then the Elgato Sound capture device, and you boot up Tower or any other programs that use audio, said audio will be broadcasted too along with your music!

FOR THOSE NOT USING RADIODJ

Since I’m on the latest version of Windows 10, I will show how to route audio to the virtual audio cable (Elgato for me) so only the sound of the music player is sent to VLC and no Tower Audio is captured too.

On Windows 10 Open the Sound Mixer in Settings (Easiest way to open is to search Mixer in the windows 10 search bar! Should be called “Sound Mixer Options”

Once open, Simply look for the Music Program you are using and change the “Output” box to your Virtual Audio cable! Then just play music and It should be sent to the Audio Cable only. You can test if this is working in Elgato sound capture by simply changing the “Where you want to hear the music” to your where “you normally hear things” Sound card source. If not using Elgato, you can still do it by going to the properties for the audio cable and playing it back through the sound card you use (Google how to)

For people using the Audio Router program I linked, Its pretty much the same thing but using that program and “Hard Routing” programs to a sound card of choice (audio cable) but Ill be honest here, depending on the program it may not work. Routing Edge browser for example wont work because Privileges I assume. I think Edge runs as system level and I guess Audio Router as Admin cant touch that process, so It ends up spitting out an error. Some programs may work and some may not and you might have to try to make a workaround, but audio router is the only way to force audio to specific sound cards, since the windows 10 thing I mentioned I have not seen in previous versions of windows (Windows 8 and under) and Older versions of Windows 10 (1803… I think it was introduced in 1903 the Mixer in windows 10)

FOR RADIODJ USERS

You can tell RadioDJ to use a specific sound card (Aka Audio Cable) in the configuration/settings for the program. Just hit the wrench in the bottom right corner and when the window pops up, hit options. Go to the Sound Cards tab and change Main 1 to be the Audio Cable Output. I would also change the Monitoring (CUE) and Sweeper/VO to the same output. As I said before I am a noob when it comes to RadioDJ and technical stuff when it comes to Audio programs such as this, I do not know what Sweeper/VO is but I assume monitoring is where it monitors and displays how loud the audio is in a visualizer kinda way (You can see the monitor as the black bar in the kinda top left corner) but I changed both to be the same output the Audio cable is and have had no issues, so I recommend setting it that was Unless you know what your doing (I clearly dont lol)

I would also recommend setting the Voicetrack setting to the Audio Cable. What this does is it allows you to basically broadcast your voice when clicking a button in the program. So If a song ends and you want to say to the listeners; “Your Listening to FM”, you can. Whatever sound card you set here it will send your voice to that sound card when the option is set to on, so having it set to the audio cable will allow your viewers to hear you when the option is on. Keep in mind it uses the default set mic in windows so make sure your preferred microphone is the default. To talk in your broadcast, click the Input button on the main window and if the button is highlighted green, its on! Simply click again to turn off!

So pretty much set Main 1 and the Monitoring, Sweeper and Voicetrack to the Audio Cable.

Open VLC and Open the Media dropdown menu. Click Stream!

Now In the Stream Window, Click Capture Device tab, Set Capture mode to Direct Show, then set Video Device name to None, and Audio Device name to Your Audio Cable Device name! (For Elgato Sound Capture or for me at least, its listed as “Line (Elgato Sound Capture)”) Now click Stream at the bottom (dont click the dropdown arrow)

4

Ignore this and click next

On the next screen, you should see the destination setup. This is setting up the server part. In the new Destination drop down menu, select HTTP and hit the Add button. A new tab should open in the window.

On this new tab, this is where your going to set the path for where the stream will be and also the port of the stream. Set the port to anything you like (Just has to be something not currently used!) and the path should still include the slash, but should have more to it plus the file type!

Since we are streaming ogg to tower change the path field to whatever you like as long as its this format "/.ogg

Keep in mind is people who want to tune in to the stream will have to enter the /.ogg to tune into the station, so keep it simple and easy to remember!

After that, click next

Next we have the transcoding phase of the server setup, this is how we change the audio format to something tower can read! make sure the “Activate Transcoding” box is checked and that the profile is set to “Audio - Vorbis (OGG)”.

Feel free after selecting it to click the wrench, select the “Audio codec” tab and edit the audio bitrate to something that works for you. Remember, Lower bitrate means more can listen to the stream, but means worse audio quality. Higher bitrate means less can listen to it but audio is higher quality. Know your upload speed and pick a bitrate that works for your upload speed, and that allows the amount of people you think will listen to be able to listen all at once. I personally recommend 64kbps but you can go lower, just do your research on google. You can calculate how many connection you can handle by taking your bandwidth in kbps (Mine is 10Mbps so 10000kbps) and dividing it by your audio bitrate (64kbps). So for me, 10000 / 64 = 156.25. I can possibly handle about ~156 and under connections to my vlc server. Also if you want you could change the sample rate box too, but I wouldnt recommend it unless you know what your doing or if your music would benefit from a higher sample rate. 44100 is CD Quality I think, so might as well leave it.

After your done, Hit the save button and click next


Unfortunately on this screen, this is one of the things I do not know what it changes if “Stream all elementary streams” is on, I’ve never used it and I just ignore it. If you know what it does, use it, just know that I don’t.

Click Stream and then your server is live!

VLC will be now broadcasting to your local network!

To access, you would go on your web browser of choice and enter “http:///.ogg”
Most of you probably know how to get your local ip from your Command prompt, but if you don’t, Google is your friend.

Now to allow people from the internet to load it, you have to port forward the VLC port you set on your modem/router (Depends what you have in your network) and redirect the traffic to your computer to allow those outside the network to open the stream, aka, what you normally do when you portfoward.

I will not guide you how to portforward, Google is your friend. But I will say I do not know the protocol that VLC uses, so Id just portforward the port for both TCP and UDP. Also a tip to stay safe; Make a habit of opening the port WHEN Broadcasting and then disable when done. Usually routers and stuff have checkboxes to enable and disable portfowarding rules for specific ports. I know mine does and I use those checkboxes alot. Helps alot.

After portfowarding you can embed a player into your own website or something to make it easier to access and remember instead of giving out an external IP (Aka what I did). A website also can allow you to use cool scripts such as an song info page or even a song request page! Get creative.

Ill be honest the way I do this may not be as “Secure” since your literally showing your external IP to the web, Website or not. (Seriously, the “Embed” player code that @The_Sink_God posted shows the ip literally, and since Im doing it locally and cannot somehow mask it, its literally a risk in a way. (Please dont hack me yo XD) but In a way I guess its the same risk as hosting a game server on a machine in your house… so Its up to you if you want to risk it.) You could probably set this up on a vps or something and that would be more secure (since its some random buisnesses IP or whatever), but I only know how to do it on a local pc right now, you would be on your own to figure out how to make it work.

Anyways, Cant wait to see what people do with this. If any new stations pop up, I would love to check them out!

7 Likes

My IP is 192.168.I.254, don’t dox me.

This is a really stupid joke

1 Like