Crossfading from kJams Pro to iTunes (and Back)

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!

Crossfading from kJams Pro to iTunes (and Back)

Postby oss » Mon Nov 12, 2007 8:20 pm

Well, thanks to Dave and his leet programming skills, I have hacked together an apple script that will let you cross fade between kJams Pro and iTunes..

Please have iTunes and kJams running before launching this script and have a playlist selected in iTunes.

The simple logic of the script assumes that if iTunes is playing and this script is run, you want to cross fade over to kJams..

Alternately, if iTunes is not playing a track, it assumes you want to cross fade over to iTunes. When you are ready to cross fade to kJams, make sure your next song is highlighted/selected. It will NOT automatically go to the next track in your kJams playlist.

Cut and paste this code into a new script in Script Editor (comes standard on OSX) and save to wherever you'd like. Make sure you change the file format to "Application" and uncheck the "Startup Screen" check box in the Save As dialog!

I'd recommend you just make an icon for this script on your dock and click on it.. It won't bring up any dialog.

Although I have tested this code, I make no guarantees with this code, use at your own risk!!

Dave, my upgrade license to kJams Pro will be coming through this week, thanks :).

And this is my first attempt at Applescript, so don't laugh! Any fixes/cleanups are welcomed.. I'm a Python guy :).


Code: Select all

-- Please have iTunes and kJams running before launching this script and
-- have a playlist selected in iTunes
-- The simple logic of the script assumes that if iTunes is playing and this script is run,
--  you want to cross fade over to kJams.. Alternately, if iTunes is not playing a track,
--  it assumes you want to cross fade over to iTunes.
-- when you are ready to cross fade to kJams, make sure your next song is
-- highlighted/selected.  It will NOT automatically go to the next track in
-- your kJams playlist.
-- Although I have tested this code, I make no guarantees with this code,
-- any disasters that occur are not my fault.  Use at your own risk!!


tell application "kJams Pro" to set kSpeakers to 0

--sets how much in percentage the volume is decreased per step
set fadeStep to 5
--sets how long in seconds between each step in the fade
set fadeDelay to 0.1
set kScriptCommand_PLAY_PAUSE to 1
set kScriptCommand_STOP to 2
--this is the max volume settings.. iTunes and kJams must share this for proper mixing.. Change to whatever you like.
set MaxVolume to 80
--this is the minimum volume setting
set MinVolume to 0

tell application "iTunes"
   if (player state is playing) then
      set kJamsVolume to MinVolume
      set iTunesVolume to MaxVolume
      set the sound volume to MaxVolume
      tell application "kJams Pro" to set volume kSpeakers level MinVolume
      tell application "kJams Pro" to docommand kScriptCommand_PLAY_PAUSE
      
      repeat until iTunesVolume ≤ 0
         set iTunesVolume to (iTunesVolume - fadeStep)
         set kJamsVolume to (kJamsVolume + fadeStep)
         tell application "iTunes" to set the sound volume to iTunesVolume
         tell application "kJams Pro" to set volume kSpeakers level kJamsVolume
         delay fadeDelay
      end repeat
      
      tell application "iTunes" to pause
      
   else
      set iTunesVolume to MinVolume
      set kJamsVolume to MaxVolume
      tell application "kJams Pro" to set volume kSpeakers level MaxVolume
      tell application "iTunes" to set the sound volume to MinVolume
      tell application "iTunes" to play
      repeat until kJamsVolume ≤ 0
         set iTunesVolume to (iTunesVolume + fadeStep)
         set kJamsVolume to (kJamsVolume - fadeStep)
         tell application "iTunes" to set the sound volume to iTunesVolume
         tell application "kJams Pro" to set volume kSpeakers level kJamsVolume
         delay fadeDelay
      end repeat
      tell application "kJams Pro" to docommand kScriptCommand_STOP
   end if
end tell
oss
 
Posts: 9
Joined: Sat Apr 15, 2006 4:41 am

:)

Postby dave » Tue Nov 13, 2007 10:54 am

8)

dude that rocks!

Here's a direct download link.
User avatar
dave
Site Admin
 
Posts: 2744
Joined: Sun Sep 18, 2005 7:02 am
Location: Seattle

Postby cosmik » Fri Jul 25, 2008 11:20 am

C-c-c-c-cool!

Test=OK!

But I don't know yet how to use it...Will mix with mixer for now...
An autofade after each Kjams song to Itunes would be cool.
And a autofade from Itunes to Kjams, if you start the next karaoke song.
That way you just make a playlist in Itunes, never have to switch, and everything happens in Kjams.
No inbetween dock-icon pressing..like crossfading.app is doing now..
So I can drink my beer and let the Imac do it all :-))) HAhahahaha

cheers, Mike

I don't no scripts, but maybe I figure something out...
cosmik
 
Posts: 6
Joined: Fri Jul 25, 2008 11:05 am

:)

Postby dave » Sun Jul 27, 2008 10:53 am

the plan is to have kJams let you set up a "filler list" and will auto-crossfade to it if you want

-dave
User avatar
dave
Site Admin
 
Posts: 2744
Joined: Sun Sep 18, 2005 7:02 am
Location: Seattle

Re: :)

Postby aantix » Sun Jul 27, 2008 12:49 pm

dave wrote:the plan is to have kJams let you set up a "filler list" and will auto-crossfade to it if you want

-dave


I seriously cannot wait for this feature...
aantix
 
Posts: 38
Joined: Sat Jun 14, 2008 6:49 pm

Re: :)

Postby aantix » Sun Jul 27, 2008 1:38 pm

dave wrote:the plan is to have kJams let you set up a "filler list" and will auto-crossfade to it if you want

-dave


It also just occurred to me that for the in-between filler music you could do a display similar to FrontRow. You'd have access to the corresponding album artwork, album and artist name, so there's no reason you couldn't display that on the video screen when filler music is being played.
aantix
 
Posts: 38
Joined: Sat Jun 14, 2008 6:49 pm

:)

Postby dave » Sun Jul 27, 2008 4:32 pm

yes i know. i have big plans for all that.
User avatar
dave
Site Admin
 
Posts: 2744
Joined: Sun Sep 18, 2005 7:02 am
Location: Seattle

Re: :)

Postby leo-magic » Thu Sep 18, 2008 9:08 am

aantix wrote:
dave wrote:the plan is to have kJams let you set up a "filler list" and will auto-crossfade to it if you want

-dave


I seriously cannot wait for this feature...


I can't wait for this feature! It will be a great thing!
kjams is almost perfect now!!

Thanks!! Léo
leo-magic
 
Posts: 52
Joined: Sat Sep 06, 2008 6:41 am

:)

Postby dave » Thu Sep 18, 2008 10:51 am

this is my top feature request so it won't be very long i hope.

along with this feature comes also the "iTunes" integration, you'll see all your iTunes songs inside kJams.
User avatar
dave
Site Admin
 
Posts: 2744
Joined: Sun Sep 18, 2005 7:02 am
Location: Seattle

Re: :)

Postby aantix » Mon Sep 22, 2008 10:33 am

dave wrote:this is my top feature request so it won't be very long i hope.

along with this feature comes also the "iTunes" integration, you'll see all your iTunes songs inside kJams.



Very excited for this feature. Constant music at the parties!
aantix
 
Posts: 38
Joined: Sat Jun 14, 2008 6:49 pm

:)

Postby dave » Mon Sep 22, 2008 6:07 pm

8)
User avatar
dave
Site Admin
 
Posts: 2744
Joined: Sun Sep 18, 2005 7:02 am
Location: Seattle

Postby Paul » Tue Sep 23, 2008 1:06 am

I hope that smile means we are getting closer :)
Paul
 
Posts: 71
Joined: Sat May 03, 2008 5:52 am
Location: London, UK

:)

Postby dave » Tue Sep 23, 2008 11:47 am

it's going to take a while. the smiley means "i've read this".
User avatar
dave
Site Admin
 
Posts: 2744
Joined: Sun Sep 18, 2005 7:02 am
Location: Seattle

Postby f_n_cool » Wed Oct 15, 2008 3:24 am

This is my first post I have ever done in the forums, :shock: but I thought this topic most fitting for it. I would love to have the ability to integrate iTunes into kJams and still have video support for it. I would want support for iTunes purchases for music and video. This way I can play all my entire library inbetween singers. Any possibiltiy this can happen or does the fact that it's a iTunes purchase complicate the issue? :?
How cool is that!?
User avatar
f_n_cool
 
Posts: 1
Joined: Fri Sep 19, 2008 7:05 am
Location: Azores, Portugal

:)

Postby dave » Wed Oct 15, 2008 10:41 am

You'll have to take that up with Lord Steve. Apple's FairPlay DRM is not available for me to license and include within kJams. ergo: only your NON-DRM purchases from iTunes will work within kJams.

note that currently you can simply "add to library" and point to your iTunes folder. this will import all your iTunes. (use Tags when importing) But any DRM tracks or videos simply won't play.
User avatar
dave
Site Admin
 
Posts: 2744
Joined: Sun Sep 18, 2005 7:02 am
Location: Seattle

Next

Return to General

Who is online

Users browsing this forum: Yahoo [Bot] and 0 guests