Crossfade: Difference between revisions

From kJams Wiki
Jump to navigation Jump to search
Oss (talk | contribs)
No edit summary
No edit summary
 
(10 intermediate revisions by one other user not shown)
Line 1: Line 1:
'''Update:''' [[Code/new_iTunes_Crossfader|there's a new version here]]


Apologies for the delay.  I wanted to test the script adequately before releasing it.


The new script is written in python, but still uses the applescript stuff Dave has exposed to kJams.  This is done through the appscript module.  Since python is already included on your Mac, we just need to install the appscript module.


I'm putting the finishing touches on the new script and testing it out.


The new script is written in python, but still uses the applescript stuff Dave has exposed to kJams.  This is done through the appscript module.  Since python is already included on your mac, we just need to install the appscript module.
Make sure you have an internet connection before attempting the below steps!


 
Unfortunately you'll need to install the Xcode dev environment on your mac, it's included on your OSX DVD.  You need this because the gcc command is necessary to compile the appscript module.
Make sure you have an internet connection before attempting the below steps!


Perform the following to install the appscript module.
Perform the following to install the appscript module.
Line 13: Line 14:


#Applications -> Utilities -> Terminal.App
#Applications -> Utilities -> Terminal.App
#sudo easy_install -U setuptools    # this is not required if you are running Snow Leopard
#sudo easy_install appscript


sudo easy_install -U setuptools
sudo easy_install appscript


After downloading and extracting [http://kjams.com/downloads/fade.zip the crossfader script], place the script  where you'd like to install it.  It might be handy to have on your dock.  The file name should be Faded.command.


After downloading the crossfader script (not uploaded yet), place the script  where you'd like to install it.  It might be handy to have on your dock.


The first time you run the script, it will create a configuration file in ~/Library/Application Support/Faded/faded.ini


Now if you open that script with a text editor, you can alter anything you'd like, but unless you're looking to break something, I'd only alter the values below:
These are the user configurable parameters, feel free to modify them, and here's how they work:


'''auto = True'''
'''mix = auto'''


This can be set True or False.  If set to True, the script will continuously loop.  It checks for 3 conditions:
This can be set auto or manual.  If set to auto, the script will continuously loop.  It checks for 3 conditions:


If the currently playing kJams song has the number of seconds left as defined in the '''seconds_left''' parameter, it will automatically starting fading out kjams, and fading in iTunes.
If the currently playing kJams song has the number of seconds left as defined in the '''seconds_left''' parameter, it will automatically starting fading out kjams, and fading in iTunes.
Line 33: Line 35:
If the kJams state has changed from playing to stopped, then start fading in iTunes.
If the kJams state has changed from playing to stopped, then start fading in iTunes.


If auto = False, then the script must be manually invoked for each time you want to mix between the apps.  This mimics the function of the old version.


'''seconds_left = 7'''
'''seconds_left = 7'''

Latest revision as of 17:24, 24 June 2010

Update: there's a new version here

Apologies for the delay. I wanted to test the script adequately before releasing it.

The new script is written in python, but still uses the applescript stuff Dave has exposed to kJams. This is done through the appscript module. Since python is already included on your Mac, we just need to install the appscript module.


Make sure you have an internet connection before attempting the below steps!

Unfortunately you'll need to install the Xcode dev environment on your mac, it's included on your OSX DVD. You need this because the gcc command is necessary to compile the appscript module.

Perform the following to install the appscript module.


  1. Applications -> Utilities -> Terminal.App
  2. sudo easy_install -U setuptools # this is not required if you are running Snow Leopard
  3. sudo easy_install appscript


After downloading and extracting the crossfader script, place the script where you'd like to install it. It might be handy to have on your dock. The file name should be Faded.command.


The first time you run the script, it will create a configuration file in ~/Library/Application Support/Faded/faded.ini

These are the user configurable parameters, feel free to modify them, and here's how they work:

mix = auto

This can be set auto or manual. If set to auto, the script will continuously loop. It checks for 3 conditions:

If the currently playing kJams song has the number of seconds left as defined in the seconds_left parameter, it will automatically starting fading out kjams, and fading in iTunes.

If the kJams state has changed from stopped to playing, then start fading out iTunes and start fading in kJams.

If the kJams state has changed from playing to stopped, then start fading in iTunes.

If auto = False, then the script must be manually invoked for each time you want to mix between the apps. This mimics the function of the old version.

seconds_left = 7

This is the number of seconds left in the kJams track before the auto crossfade begins.

fade_step = 5

This is the percentage increment of which the volume is increased or decreased.

fade_delay = .2

This is the number of seconds waited between each fade_step.

max_volume = 80

This is the maximum volume you want set for both kJams and iTunes.

min_volume = 0

This is the minimum volume you want set for both kJams and iTunes.


If you're still looking for the older version:


Try this: Crossfade between kJams and iTunes