Garry's Mod

Garry's Mod

617 ratings
Music player
   
Award
Favorite
Favorited
Unfavorite
Content Type: Addon
Addon Type: Tool
Addon Tags: Fun, Scenic
File Size
Posted
Updated
17.819 KB
24 Jul, 2014 @ 12:29pm
19 Dec, 2014 @ 3:09pm
11 Change Notes ( view )

Subscribe to download
Music player

Description
Before complaining about this not working/being broken read Issues&Solutions AND the comments!

THIS DOES NOT WORK WITH YOUTUBE!


A simple yet powerful and elegant music player which allows you to play your favorite music with the press of a button. The music player can be operated through a derma menu, chat commands or even console commands, meaning you can bind keys to control the player! The player has a simple and pretty design, even including an FFT equalizer.

The player has the functionality to play music from both URLs and local files on your computer! In addition, you can save your favorite playlists and they'll be loaded right away for the next use. There's a whole lot more commands to play around with.

Features
  • Easy to use
  • Pretty design & colors
  • FFT equalizer
  • Shuffling!
  • The ability to control the player through chat commands
  • Usable whereever clientside Lua is allowed!

The easiest way to operate the music player is through the derma menu. To access this, use the console command music_menu. To make it even easier, you can bind the command to a key by entering this in the console:

bind keyhere "music_menu"

Chat commands can be used to operate the player just as well as you can use console commands. All commands are prefixed with !musicplayer, followed by the command.

Example: !musicplayer start
This will start playing music.

Chat commands
start - Starts playing music.
stop - Stops playing music.
pause - Pauses the music.
unpause - Unpauses the music.
next - Plays the next song, or starts the playlist again if you're at the playlist's last song.
back - Plays the previous song, or starts the playlist again if you're at the playlist's first song.
toggleplaymode - Toggles the playmode between from URL and from file.
clearplaylist - Stops the music and clears the playlist.
saveplaylist - Saves the playlist (automatically loaded when the player initializes).
deleteplaylist - Deletes a saved playlist.
getplaymode - Adds a chat message saying the current playmode (URL/File).
add "name of song" link_or_path/to/song.mp3 - Adds a song to the playlist, it's important the song name is in quotes!
remove name of song - Removes a song from the playlist, it'll be gone by the next time the playlist starts.

Alternatively, you can use console commands. These are useful if you want to bind a music player control to a key.

Example: bind p "music_start"
This is ran in the console. Now, when p is pressed, the music will start playing!

Console commands
music_start
music_stop
music_togglepause
music_next
music_back
music_add
music_remove
music_clearplaylist
music_toggleplaymode
music_getplaymode
music_saveplaylist
music_deleteplaylist
music_showplaylist

Issues&Solutions

I can't make the player appear or anything, it doesn't work at all!
- Chances are the server you play on (if you do) doesn't allow clientside Lua, therefore the player doesn't load. Try using it in Sandbox and you'll see it works. If it still doesn't work, read the description of the addon once more to see if you didn't misunderstand or miss anything, then make a comment.

But I know the server allows clientside Lua, why didn't it load?
- If this is the case, you can manually load the player. Go into your console and execute the following command: lua_run_cl include("autorun/client/musicplayer.lua")

I added music, but then it doesn't play and just removes itself from the playlist!
- You've either put in an invalid link/file path (double-check, links should be DIRECT, meaning if you open it in your browser the file downloads), or the playmode is wrong. It's also possible you didn't add the music correctly, remember to use quotes around the music's name!

How do I open a saved playlist?
- Your saved playlist is automatically opened when you get in the game, just hit play!

I got an error!
- Post a comment here and I'll look into it!
133 Comments
use a youtube to mp3 converter they're free
MissingTexture 26 Jul @ 8:37pm 
Y'know what would be cool? If you actually told us what URLs it DOES work with!
And apparently downloading videos on Youtube requires your account to be PREMIUM.

I ain't gonna give Youtube money just to play music in GMod.
Bigsad2bigmad 15 Jul @ 1:39pm 
yea this still dosen't do jack shit i just spent like 20 minutes of my time over here picking songs one by one just for it to not work..... it just skips over every song in a quick manner and says that the playlist is empty.
Clipity_Clip 12 Aug, 2023 @ 7:23pm 
Dosen't work with Spotify
(From what ive tried)
JELIMINATOR1000 17 Jun, 2023 @ 7:23pm 
No thanks! I'll just use the player on my PC. :steammocking:
MASTERCHIEF_357 14 Apr, 2023 @ 9:36am 
THIS THING IS GARBAGE NONE OF YOUR "fixes" WORK :steamthumbsdown: :steamthumbsdown:
McFattyPatty 20 Feb, 2023 @ 11:21am 
for people trying to use YouTube, just use media player, if it's not working go on Garry's Mod x36(I believe) and if you don't know how just search it up on youtube ironically.
Tqbrock11 gaming 11 Dec, 2022 @ 11:10am 
bro lol so trash, just pull up youtube in the background lol
Thefoxtrot99 11 Nov, 2022 @ 7:01pm 
idk how to work this
Veles~ 4 Sep, 2022 @ 5:16am 
how to add music to playlist???