Page 1 of 2 12 LastLast
Results 1 to 20 of 36

Thread: SM Plugin: Karaoke

  1. #1
    Windows Only MacNetron's Avatar
    Join Date
    Dec 2008
    Posts
    6,539
    Cookies Given
    4,444
    Cookies Received
    4,017
    Blog Entries
    2

    SM Plugin: Karaoke

    It is time for the Karaoke to get its own dev thread!

    Current version: 0.7.0 (source available by SVN)
    Deployed on: none...
    Download: playstuff.net-karaoke-0.7.0.zip

    Changelog:
    Version 0.7.0:
    * Resolved 0000028: End of song detection not robust. Empty lines trigger end of song clean up.
    * Resolved 0000027: Add karaoke menu to admin menu

    Usage:
    An option "Karaoke song" will be added to the Admin->Server Menu for admins with "z" flag.
    This flag is configurable by "sm_karaoke_flag" in the "cfg\sourcemod\karaoke.cfg" that will be created if it doesn't exist.

    Config:
    - The Karaoke plugin requires 2 files: one mp3 and one txt with identical names (except for the extension of course). They need to be put in different directories. Example:
    ..\tf\addons\sourcemod\configs\karaoke\Bobby Helms - Jingle Bell Rock.txt
    ..\tf\sound\music\Bobby Helms - Jingle Bell Rock.mp3
    If the filenames don't match, then it will NOT show up in the karaoke_menu!
    - The txt-file needs it lyrics in a specific format. Example:
    Code:
    [2:25.090] So here it is Merry Christmas
    [2:29.070] Everybody's having fun
    [2:32.070] Look to the future now
    [2:36.082] It's only just begun
    [2:42.014]
    and / or
    Code:
    [2:25] So here it is Merry Christmas
    [2:29] Everybody's having fun
    [2:32] Look to the future now
    [2:36] It's only just begun
    [2:42]
    First one milliseconds, second seconds example.
    Note: You have to end with an empty line so the plugin can determine when to end the song, so the plugin can reset the sv_alltalk and optional disco lights.

    Known limitations:
    It is depended on plugin SM File/Folder Downloader and Precacher to be able to push the music to the clients.
    Optional is Light Colors. But I have slighty adapted the code to make sure the Karaoke Plugin can call Light Color commands. Light color version should be 0.3b on the servers.

    To do:


    TO DO COMMUNITY:
    - create lyric files and convert mp3 down to (for example) 80 kbps to get the mp3's as small as possible
    Last edited by MacNetron; 05-04-2010 at 15:02. Reason: 0.7.0 available
    4 People have given a Cookie to MacNetron: grom.ps, Jakob_Pavlov.ps, Logan.ps, Spudd

  2. #2
    ლ(ಠ益ಠლ) Logan's Avatar
    Join Date
    Nov 2008
    Posts
    6,351
    Cookies Given
    4,727
    Cookies Received
    3,341
    Blog Entries
    15

    Re: SM Plugin: Karaoke

    /me sings

  3. #3
    Badministrator grom's Avatar
    Join Date
    Nov 2008
    Posts
    4,256
    Cookies Given
    2,297
    Cookies Received
    4,806

    Re: SM Plugin: Karaoke

    /me grunts
    ---
    (aka JennyCide.ps)
    putting the Rage in Average
    gromblog (inactive at present)
    Twitter

  4. #4
    AdminiBob almightybob's Avatar
    Join Date
    Nov 2008
    Posts
    3,447
    Cookies Given
    2,869
    Cookies Received
    2,947
    Blog Entries
    1

    Re: SM Plugin: Karaoke

    I'm happy to sort the lyrics files, just let me know what songs you want.
    Not so sure about the mp3s though.

  5. #5
    Windows Only MacNetron's Avatar
    Join Date
    Dec 2008
    Posts
    6,539
    Cookies Given
    4,444
    Cookies Received
    4,017
    Blog Entries
    2

    Re: SM Plugin: Karaoke

    We want Christmas songs!

    mp3 and txt are a combo though. How else can you know when (as in seconds) to put a certain line on the screen?
    If you are unable to convert it yourself, then just give the mp3 to let somebody do it or get foobar2000 and lame-encoder to be able to do it yourself

    Note, already done:
    Bobby Helms - Jingle Bell Rock

    --------------

    sssssttt.... I've (as in v.0.5.2) enabled disco lights by hacking lightcolors.smx plugin, but looks like there is no mp3 playing now...

  6. #6
    Has a beard now
    Join Date
    Nov 2008
    Posts
    2,159
    Cookies Given
    230
    Cookies Received
    732
    Blog Entries
    5
    Cookie given from: MacNetron.ps

  7. #7
    Windows Only MacNetron's Avatar
    Join Date
    Dec 2008
    Posts
    6,539
    Cookies Given
    4,444
    Cookies Received
    4,017
    Blog Entries
    2

    Re: SM Plugin: Karaoke



    Told you the music was not pushed to the clients at that moment

  8. #8
    Playstuff Member .ps
    Join Date
    Sep 2009
    Posts
    9
    Cookies Given
    1
    Cookies Received
    14

    Re: SM Plugin: Karaoke

    Right, I've "karaoke'd" the song Christmas is all around, from Love Actually, and hope it works out fine.

  9. #9
    Windows Only MacNetron's Avatar
    Join Date
    Dec 2008
    Posts
    6,539
    Cookies Given
    4,444
    Cookies Received
    4,017
    Blog Entries
    2

    Re: SM Plugin: Karaoke

    <mac is working at Wham!'s epic Last Christmas />

  10. #10
    Windows Only MacNetron's Avatar
    Join Date
    Dec 2008
    Posts
    6,539
    Cookies Given
    4,444
    Cookies Received
    4,017
    Blog Entries
    2

    Re: SM Plugin: Karaoke

    0.5.3:
    - Enlarged var which holds the filename in the menu so long filenames are correctly passed. Means bubbles' song should play nicely now.
    - Correct detectment of LightColors plugin, means lights will go disco on karaoke start. Does need a slightly hacked/adapted version of LightColors though...

  11. #11
    Badministrator grom's Avatar
    Join Date
    Nov 2008
    Posts
    4,256
    Cookies Given
    2,297
    Cookies Received
    4,806

    Re: SM Plugin: Karaoke

    Any mileage in using a system like this - lyrics embedded in mp3s with timing tags? I'm still trying to find a really easy way of grabbing already made lyrics and timings - means if this mod ever goes public, anyone can simply do it themselves for any song.
    Cookie given from: Logan.ps
    ---
    (aka JennyCide.ps)
    putting the Rage in Average
    gromblog (inactive at present)
    Twitter

  12. #12
    Windows Only MacNetron's Avatar
    Join Date
    Dec 2008
    Posts
    6,539
    Cookies Given
    4,444
    Cookies Received
    4,017
    Blog Entries
    2

    Re: SM Plugin: Karaoke

    five songs up and running on teamplay and maplab:

    Bobby Helms - Jingle bells rock
    Dean Martin - Rudolph the red-nosed reindeer
    Ray Connif - Jingle Bells
    Slade - Merry Xmas everybody
    Wham - Last Christmas

    Grom, I will have a look at given format...

  13. #13
    ლ(ಠ益ಠლ) Logan's Avatar
    Join Date
    Nov 2008
    Posts
    6,351
    Cookies Given
    4,727
    Cookies Received
    3,341
    Blog Entries
    15

    Re: SM Plugin: Karaoke

    Nice work A thought - on the Teamplay we may have to add something to the tags for Christmas as this is a heavy download burden -5 songs - to surprise someone with. Kick me if i'm wrong.

    Loving the idea of incorportating Lyrics protocol - good suggestion Grom - that would be exceptionally shiney

    an iframe of it for the lasy browers amongst you.....
    Last edited by Logan; 21-12-2009 at 21:59.

  14. #14
    Badministrator grom's Avatar
    Join Date
    Nov 2008
    Posts
    4,256
    Cookies Given
    2,297
    Cookies Received
    4,806

    Re: SM Plugin: Karaoke

    When does the client download the songs? Does it grab all the files when you first connect to the server if the mod is running or is there any way of having some control over it? Ideally you'd want to have the ability to push the files to the clients at the start of a round but you wouldn't want to send more than 10Mb to each client at a time - that would soon add up.
    ---
    (aka JennyCide.ps)
    putting the Rage in Average
    gromblog (inactive at present)
    Twitter

  15. #15
    ლ(ಠ益ಠლ) Logan's Avatar
    Join Date
    Nov 2008
    Posts
    6,351
    Cookies Given
    4,727
    Cookies Received
    3,341
    Blog Entries
    15

    Re: SM Plugin: Karaoke

    all at once on connection Grom - that's my concern.

  16. #16
    Windows Only MacNetron's Avatar
    Join Date
    Dec 2008
    Posts
    6,539
    Cookies Given
    4,444
    Cookies Received
    4,017
    Blog Entries
    2

    Re: SM Plugin: Karaoke

    The "SM File/Folder Downloader and Precacher" plugin is pushing all mp3's in sound/music to the connecting client. It will only push those files which are not on the clients computer yet. So it is an once-only-download.
    I have converted my mp3's back to <80 kbps. Gives us mp3's with file size around 1MB-1.5MB. We don't need very high quality as we are supposed to frag and sing.

    Looking at the lyrics in lrcdb, this is the format, right?

    [0:00]
    [0:08.002] Are you hanging up a stocking on your wall
    [0:14.042] Is the time that every Santa has a ball
    [0:20.050] Does he ride red-nosed reindeer
    [0:24.038] Does he turn upon his sleigh
    [0:27.070] Do the fairies keep his soul but for a day
    [0:33.034] So here it is Merry Christmas
    [0:37.018] Everybody's having fun
    [0:40.058] Look to the future now
    [0:44.035] It's only just begun
    [0:49.063] Are you waiting for the family to arrive
    [0:56.095] Are you sure you've got the room to spare inside
    [1:03.027] Does your granny always tell you that the old songs are the best
    [1:10.075] Then she's up and rockin' rollin' with the best
    [1:16.039] So here it is Merry Christmas
    [1:20.023] Everybody's having fun
    [1:23.043] Look to the future now
    [1:27.035] It's only just begun
    [1:34.031] What will your daddy do when he sees your Mama kissing Santa Claus
    [1:40.052] Ah ha
    [1:42.070] Are you hanging up your stockings on your wall
    [1:49.066] Are you hoping that the snow will start to fall
    [1:56.018] Do you ride on down the hillside in a buggy you have made
    [2:03.058] When you land upon your head then you'll be slayed
    [2:09.042] So here it is Merry Christmas
    [2:13.018] Everybody's having fun
    [2:16.050] Look to the future now
    [2:20.018] It's only just begun
    [2:25.090] So here it is Merry Christmas
    [2:29.070] Everybody's having fun
    [2:32.070] Look to the future now
    [2:36.082] It's only just begun
    [2:42.014]
    That will not be too difficult to rewrite the plugin on parsing lines...
    Having not to create the lyrics-files myself will probably pay back spend time on the 2nd or 3rd song

  17. #17
    ლ(ಠ益ಠლ) Logan's Avatar
    Join Date
    Nov 2008
    Posts
    6,351
    Cookies Given
    4,727
    Cookies Received
    3,341
    Blog Entries
    15

    Re: SM Plugin: Karaoke

    at that size, it's not an issue - make sure the songs are on the fast download server though.

  18. #18
    Badministrator grom's Avatar
    Join Date
    Nov 2008
    Posts
    4,256
    Cookies Given
    2,297
    Cookies Received
    4,806

    Re: SM Plugin: Karaoke

    ok, one more question - does it push to clients only when the mod is started and is it started by default on the server or do you have to load it (if so does it only take effect on map change?)
    Sorry for the n00b quetions, don't have a lot of experience with TF2 mods.
    ---
    (aka JennyCide.ps)
    putting the Rage in Average
    gromblog (inactive at present)
    Twitter

  19. #19
    Windows Only MacNetron's Avatar
    Join Date
    Dec 2008
    Posts
    6,539
    Cookies Given
    4,444
    Cookies Received
    4,017
    Blog Entries
    2

    Re: SM Plugin: Karaoke

    No problem mate, crash course mods + plugins:

    On the TF2 servers we run (MetaMod +) SourceMod. Mod which enables us to write (sourcemod) plugins, using their API on top of the default HL-Server.
    The plugins are put in sourcemod's plugins folder. The plugins there are run, mostly on MapStart. There is no need to manually start plugins (normally). "Start" means: get them loaded, ready for action.

    The Karaoke plugin has two plugin dependencies, written by other people.
    Required is SM File/Folder Downloader and Precacher. This plugin pushes all configured files/folders once to all connecting clients. Meaning, when you connect to the server, it uploads all mp3's you do not have already.
    Optional is Light Colors. But I have slighty adapted the code to make sure the Karaoke Plugin can call Light Color commands. Light color version should be 0.3b on the servers.

    Karaoke plugin is started/loaded automatically. You can get the (admin/selection) menu by typing in console: sm_karaoke_menu (and leave console).
    It will read all lyrics-files in /configs/karaoke and assumes the same named mp3's are pushed to the client.

    If you add lyrics and mp3, then it will be available on mapchange, as then all plugins get restarted.

    Last question/remark: Karaoke plugin really needs a seperate lyric file. Those files are are put in a folder that Sourcemod can access. The mp3's are default outside sourcemod's view!
    Also, embedding lyrics in a ID3v tag might be nice but writing mp3 parsers in SourcePawn...

    All questions answered?

  20. #20
    Badministrator grom's Avatar
    Join Date
    Nov 2008
    Posts
    4,256
    Cookies Given
    2,297
    Cookies Received
    4,806

    Re: SM Plugin: Karaoke

    Mac - you rock.
    I'll get my thinking hat on...
    ---
    (aka JennyCide.ps)
    putting the Rage in Average
    gromblog (inactive at present)
    Twitter

Page 1 of 2 12 LastLast

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •