More Code!!! Automate transferring singers between venues

Just talk about kJams stuff with each other, describe things you did that worked, talk about your setup, anything that doesn't fit into the other forums!
Post Reply
DeusExMachina
Posts: 1293
Joined: Sun Apr 20, 2008 9:57 am
Location: Pittsburgh, PA
Contact:

More Code!!! Automate transferring singers between venues

Post by DeusExMachina »

So with the advent of "venues" kJams lets you organize your singers by location. This can be very convenient, as it makes your singer lists shorter and more manageable. But at the same time, it creates one glaring problem. One of your regulars from another venue walks into a bar (along with a priest, a rabbi, and the Easter bunny) and wants to see their history list. Crap, they are not in that venue!
So you have to go to Finder, drill down through folders to find their singer file, create an alias(es), drag the alias(es) back out of that venue and back up to venues, and then back down to the current venue, and into "Singers". The you have to remove the word "alias" from each folder name. What a pain!
Then you have to go back to kJams, and switch the venues and then switch them back again, in order to force kJams to reload the singers for the current venue.
While I can't do anything about the kJams part, as that functionality is not exposed in the API (SCRATCH THAT, THIS IS NOW WORKING!) I figured I COULD do something about the first part, and so I did. After way too much toil (since I can't write code to save my life) I created a kJams service that you can use from the kJams menu. You can find it here:
https://karaoke.kjams.com/wiki/Code/new_Copy_Singers

Let me know what you think.

Hope someone finds it useful.

P.S. Some tips to make this run more smoothly
1) create a venue with only one singer. That way switching to it to force a reload of singers is MUCH faster.
2) if you use Server and it goes down (which it almost always will) you can get it up and running faster by going to kJams>Preferences…>Sharing and turning Server off, changing the port number (e.g. from 12345 to 12346) turning it on and off again, and then changing it back again to the original (e.g. 12345 again) and turning Server back on again. This gets around OSX' annoying tendency to fail to give up the port.

Doing these things can save you from 60 seconds to several minutes of downtime, especially if you use kJams server a lot, like I do.
Last edited by DeusExMachina on Wed Jan 05, 2011 12:05 pm, edited 2 times in total.

Karanight
Posts: 532
Joined: Sat Jan 24, 2009 2:30 am
Location: Stockport UK
Contact:

Re: More Code!!! Automate transferring singers between venue

Post by Karanight »

Your right, it is a pain so what I did was to call singer "GreyAlison" if she was from the Greyhound and "WheatAlison" if she was from the Wheatsheaf etc. Doing this means I only have one venue but I have a lot of singers because there all at the same "Venue" I only do this from my flight box, The systems I have set up permanently only have the singers that turn up there.
Having said that I'll look at what you've done
Posted by Len of LensKaraoke fame

Web site at
http://lenskaraoke.com

DeusExMachina
Posts: 1293
Joined: Sun Apr 20, 2008 9:57 am
Location: Pittsburgh, PA
Contact:

Re: More Code!!! Automate transferring singers between venue

Post by DeusExMachina »

Doing it that way also means her history lists are not the same!
Last edited by DeusExMachina on Tue Dec 07, 2010 5:38 pm, edited 2 times in total.

Karanight
Posts: 532
Joined: Sat Jan 24, 2009 2:30 am
Location: Stockport UK
Contact:

Re: More Code!!! Automate transferring singers between venue

Post by Karanight »

I didn't explane proper. I used the same name but it was two different singers. The point is, if GreyAlison comes into the Wheatsheaf I can find her fast because there's only one venue on my system
Posted by Len of LensKaraoke fame

Web site at
http://lenskaraoke.com

DeusExMachina
Posts: 1293
Joined: Sun Apr 20, 2008 9:57 am
Location: Pittsburgh, PA
Contact:

Re: More Code!!! Automate transferring singers between venue

Post by DeusExMachina »

Ah, I see. I was originally planning on doing something similar (placing a code word on each singer to delineate venue) but three things intervened.
1) It dirtied up the rotation screen
2) Dave introduced Venues
3) In private discussion, a rearchitecting of the venue system was discussed that worked similarly, placing all singers in a common repository, and pulling the ones for a specific venue out programatically.

As a result (especially the hit to the rotation screens) I decided to wait for the "official" version. For me the main issues are:

1) Sometimes while switching venues to reload singers, the lyrics screen locks up. The interface always does, so I am locked out of kjams. Bad.
2) 90% of the time, the server fails to come back up, because OSX refuses to release the port back to kJams. Since I rely heavily on server, this causes me a great amount of headaches, including having to walk around to each of the machines and reload the server pages, which will have 404ed in the meantime, if anyone tried to use them.

I suspect the final version of the system will have singers as playlist, with "venue" just another tag. The venues will always just be a playlist populated by a search on that tag.
Last edited by DeusExMachina on Mon Jan 03, 2011 9:57 pm, edited 3 times in total.

dave
Site Admin
Posts: 6688
Joined: Sun Sep 18, 2005 8:02 am
Location: Seattle
Contact:

Re: More Code!!! Automate transferring singers between venue

Post by dave »

:evil: :| :mrgreen: 8)

swainner
Posts: 10
Joined: Wed Nov 17, 2010 6:53 am

Re: More Code!!! Automate transferring singers between venue

Post by swainner »

I looked at the suggestion Dave provided on making Aliases in the Finder directories, copying the aliases to the new venue that I create (noting that you have to create at least one singer in the venue to get the Singers> directory), and then renaming the alias in the Venue. .... Not something I would suggest that my wife or kids do when they're managing our karaoke parties.

I'm a light on the 'Automator' scripting suggestion so I might explore that route.

Regardless, it would sure be nice to have an option to add a singer to a Venue and be given the option to create a new one or add one from the 'master' singers list that is not associated with any venue.

We frequently host karaoke parties with a lot of random guests. We do have some regulars though (my wife, myself, the kids, and our neighbors). We occasionally host parties with hundreds of guests. It would be nice to be able to add ourselves to the venue along with the guests. When the venue is over, we can delete the venue. All the guests are gone too. However, the singers pulled in from the master singer list remain. It was only the alias that was deleted. When we host the next party, we can add in the regular singers to the venue (i.e. kjams makes an alias singer for me) and then add the guests.

The proposed method keeps the master singer list short and concise, it preserves our favorites, and allows us to easily be added to the venue. We're the one usually getting the party rolling anyway and we need a few good 'kick off' songs. Once we've got the party rolling, then the guests come in with their requests.

Scott

DeusExMachina
Posts: 1293
Joined: Sun Apr 20, 2008 9:57 am
Location: Pittsburgh, PA
Contact:

Re: More Code!!! Automate transferring singers between venue

Post by DeusExMachina »

Scott:
Two things:
1) my script code I posted fully automates the process of making the alias, copying it the new venue, and renaming it to match the original.

2) One way you can accomplish that now is to put an invisible character on either your regulars' names, or the disposable ones, that can then be searched for, creating a list that can then be selected en mass and deleted.
I use ⌥⎵ (option space.) This character is invisible, so you can't see it on screen, but it can be sorted and searched for in kJams, allowing you to either delete all singers with the character in their name, or the inverse, sorting by name, and then selecting all names that do not begin with the character, and deleting them.
Last edited by DeusExMachina on Tue Jan 04, 2011 3:12 pm, edited 2 times in total.

dave
Site Admin
Posts: 6688
Joined: Sun Sep 18, 2005 8:02 am
Location: Seattle
Contact:

Re: More Code!!! Automate transferring singers between venue

Post by dave »

*sigh*

DeusExMachina
Posts: 1293
Joined: Sun Apr 20, 2008 9:57 am
Location: Pittsburgh, PA
Contact:

Re: More Code!!! Automate transferring singers between venue

Post by DeusExMachina »

Dave:
You, apparently, are NOT very good at that "vacation" thing!

dave
Site Admin
Posts: 6688
Joined: Sun Sep 18, 2005 8:02 am
Location: Seattle
Contact:

Re: More Code!!! Automate transferring singers between venue

Post by dave »

I did not say this. I am not here.

DeusExMachina
Posts: 1293
Joined: Sun Apr 20, 2008 9:57 am
Location: Pittsburgh, PA
Contact:

Re: More Code!!! Automate transferring singers between venue

Post by DeusExMachina »

Well, I guess this counts as another vote for making venue switching scriptable (and adding the venue rescan/reload command!) :)

dave
Site Admin
Posts: 6688
Joined: Sun Sep 18, 2005 8:02 am
Location: Seattle
Contact:

Re: More Code!!! Automate transferring singers between venue

Post by dave »

:shock:

Post Reply