OSX Mavericks
Re: OSX Mavericks
i'm going to make it an official command in kj2 (not a script)
Re: OSX Mavericks
AWESOME! THANK YOU!dave wrote:i'm going to make it an official command in kj2 (not a script)
Thanks!
Scott
Scott
-
- Posts: 1293
- Joined: Sun Apr 20, 2008 9:57 am
- Location: Pittsburgh, PA
- Contact:
Re: OSX Mavericks
Done. New code posted. Note: if you were using the script as an Automator service, just follow the instructions as written. I had not pasted the code correctly to conform to the instructions as written (though the correct procedure was easy enough to figure out, which I assume you did, since you got it working!). It now works as written.
Be careful though: in testing the new script, it exposed a kJams bug that causes improper singer file behavior. If you delete a singer in a venue that is an alias from another venue, the original is deleted, NOT the alias, leaving a missing singer in the original venue, and an orphaned folder alias in the current one. Hopefully that will be fixed before you even read this!
Be careful though: in testing the new script, it exposed a kJams bug that causes improper singer file behavior. If you delete a singer in a venue that is an alias from another venue, the original is deleted, NOT the alias, leaving a missing singer in the original venue, and an orphaned folder alias in the current one. Hopefully that will be fixed before you even read this!
Re: OSX Mavericks
thanks...code is updated here? https://karaoke.kjams.com/wiki/Code/new_Copy_Singers I wonder if that delete problem is how I lost singers' info before...hmmm...
Thanks!
Scott
Scott
Re: OSX Mavericks
Ok, so I have it running on my backup machine. This machine STILL has kJams Pro 1.x on it. No problems running the service from either App (1 or 2).
My main DJ machine, with ONLY 2.0 on it...WILL NOT RUN the same exact script, implemented the SAME exact way. The error is "The Action RunAppleScript encountered an error." Show Workflow or OK. I go into automator and check it...it's EXACTLY the same script as the other laptop with the exception of "Service receives no input in KJams 2 vs the one that works is kJams Pro.
HUGE karaoke night tonight I would REALLY like to be able to use this. Gonna make for a long night adding everyone manually...
Thanks Guys...
My main DJ machine, with ONLY 2.0 on it...WILL NOT RUN the same exact script, implemented the SAME exact way. The error is "The Action RunAppleScript encountered an error." Show Workflow or OK. I go into automator and check it...it's EXACTLY the same script as the other laptop with the exception of "Service receives no input in KJams 2 vs the one that works is kJams Pro.
HUGE karaoke night tonight I would REALLY like to be able to use this. Gonna make for a long night adding everyone manually...
Thanks Guys...
Thanks!
Scott
Scott
Re: OSX Mavericks
Dave, I just saw you added the Python script! Awesome, but how do I edit it to change to my custom path? I run everything off an external drive. My kJams library is on there. I tried both "/Volumes" and "Volumes without the slash..."
Thank you!
Code: Select all
def copy_singer():
cmds = kjams.enum_cmds()
set kJamsPath to “/Volumes/DJ Drive/kJams/kJams Library/" -- You need to edit this line to the path to YOUR kJams Library folder
Thanks!
Scott
Scott
-
- Posts: 1293
- Joined: Sun Apr 20, 2008 9:57 am
- Location: Pittsburgh, PA
- Contact:
Re: OSX Mavericks
Ugh. It's a Mavericks issue. I spent about four or five hours hammering at it, trying to figure out what was wrong, watching it thrash around randomly picking volumes, and other than finding a few lines I could remove to optimize things a bit, I was completely unable to figure out what was wrong.
Until…
I just let it run. It was then that I realized that the script WAS working. It just keeps getting stuck, hung up momentarily during the fade. So it LOOKS as if it is fading to some random value. But if you just let it go, half a minute later, it will fade up iTunes a bit more. And if you keep on waiting, eventually it fades it up all the way to where it belongs.
Since it does NOT do this in SL/L/ML, I have to assume that there is something going on in the script handling in Mavericks that is causing it to play too "nice" <-(UNIX term) and give way too many processor cycles to other processes.
Not much that can be done about it, I'm afraid, unless Apple fixes it.
Well, maybe I can imbed a Nice -20 terminal command in the script somewhere….
UPDATE:
Okay, further testing seems to imply that if you paste this script into Automator, as described in the code section, and run it, it will actually work as it should (though it will also take up more system resources that way, so you'll need a newer machine to guarantee it works well).
Until…
I just let it run. It was then that I realized that the script WAS working. It just keeps getting stuck, hung up momentarily during the fade. So it LOOKS as if it is fading to some random value. But if you just let it go, half a minute later, it will fade up iTunes a bit more. And if you keep on waiting, eventually it fades it up all the way to where it belongs.
Since it does NOT do this in SL/L/ML, I have to assume that there is something going on in the script handling in Mavericks that is causing it to play too "nice" <-(UNIX term) and give way too many processor cycles to other processes.
Not much that can be done about it, I'm afraid, unless Apple fixes it.
Well, maybe I can imbed a Nice -20 terminal command in the script somewhere….
UPDATE:
Okay, further testing seems to imply that if you paste this script into Automator, as described in the code section, and run it, it will actually work as it should (though it will also take up more system resources that way, so you'll need a newer machine to guarantee it works well).
Last edited by DeusExMachina on Thu Oct 31, 2013 7:55 am, edited 2 times in total.
-
- Posts: 1293
- Joined: Sun Apr 20, 2008 9:57 am
- Location: Pittsburgh, PA
- Contact:
Re: OSX Mavericks
The issue with kJ2 is that AppleScript is Application specific. So to make it work in kJ2 you have to change every line where is says something like -> tell Application "kJams Pro"
to -> tell Application "kJams 2".
Oh, and if you are using Automator, likewise change the "Service receives" input app to kJams 2.
For this any other reasons, I would petition Dave to reconsider changing the name like this.
to -> tell Application "kJams 2".
Oh, and if you are using Automator, likewise change the "Service receives" input app to kJams 2.
For this any other reasons, I would petition Dave to reconsider changing the name like this.
-
- Posts: 1293
- Joined: Sun Apr 20, 2008 9:57 am
- Location: Pittsburgh, PA
- Contact:
Re: OSX Mavericks
Why would you need to add everyone manually? You really should only need this script on instances where people from one venue show up to a new one. Once done for any given singe, it should never have to be done again for that venue.
P.S. And yes, that is exactly what happened to your singers, IMHO (that's why I mentioned it)!
P.S. And yes, that is exactly what happened to your singers, IMHO (that's why I mentioned it)!
Re: OSX Mavericks
New venue tonight...I will more than likely have 20 or so of my regulars showing up...hence, adding them all manually...DeusExMachina wrote:Why would you need to add everyone manually? You really should only need this script on instances where people from one venue show up to a new one. Once done for any given singe, it should never have to be done again for that venue.
P.S. And yes, that is exactly what happened to your singers, IMHO (that's why I mentioned it)!
Thanks!
Scott
Scott
Re: OSX Mavericks
Negative on my machine Ghostrider.DeusExMachina wrote: UPDATE:
Okay, further testing seems to imply that if you paste this script into Automator, as described in the code section, and run it, it will actually work as it should (though it will also take up more system resources that way, so you'll need a newer machine to guarantee it works well).
Thanks!
Scott
Scott
-
- Posts: 1293
- Joined: Sun Apr 20, 2008 9:57 am
- Location: Pittsburgh, PA
- Contact:
Re: OSX Mavericks
Well, good it is small since, even with the script, it takes a while to reload the venue if you have a lot of singers.
That said, once Dave shows up, I have a suggestion that will save everyone a lot of work. If he can add code to just have kJams define a variable that has the current venue, that will remove the need for the entire first half of the script, which I wrote to parse the Library.xml file line by line looking for the current venue, as well as the need for the end user to hand edit the path to their home folder.
That'll fix everything up for you nicely.
That said, once Dave shows up, I have a suggestion that will save everyone a lot of work. If he can add code to just have kJams define a variable that has the current venue, that will remove the need for the entire first half of the script, which I wrote to parse the Library.xml file line by line looking for the current venue, as well as the need for the end user to hand edit the path to their home folder.
That'll fix everything up for you nicely.
-
- Posts: 1293
- Joined: Sun Apr 20, 2008 9:57 am
- Location: Pittsburgh, PA
- Contact:
Re: OSX Mavericks
<nt>
Last edited by DeusExMachina on Thu Oct 31, 2013 8:07 am, edited 1 time in total.
-
- Posts: 1293
- Joined: Sun Apr 20, 2008 9:57 am
- Location: Pittsburgh, PA
- Contact:
Re: OSX Mavericks
You need to make sure you only have one copy of the script/service running, or it will become spastic. Go to Activity Monitor and quit any other instances, kill running versions in Automator, if you have that running, and quit any copies running in the background with the gear icon for Automator in the menu bar.