Timer for iPhone - iLounge Forums
Become a member of the iLounge Forums. Register Now!
To start viewing messages, select the forum that you want to visit from the selection below.
If this is your first visit, be sure to check out the Forum FAQ and Forum Policy.

Topic: Timer for iPhone

Reply Thread Tools Topic Search
 
Old 09-14-2014, 09:50 AM
#1
 
Freshman Lounger
 
Join Date: Sep 2014
Posts: 2
Timer for iPhone

I know iPhone has a timer that can be used to stop playing music from my library, but are there any apps that have a timer that can be used to start playing music from my library. Looking for something to set a start time and a atop time.
sndlwood is offline  
Reply With Quote
Old 09-14-2014, 12:30 PM
#2
 

 
Join Date: Apr 2006
Location: Arizona
Posts: 8,885

You can set start and stop times on individual songs by right clicking, choosing Get Info, going to the Options tab and setting the start and stop times.

iTunes also has a Javascript interface you can program.

Here is a script that we use for a game, where we listen to the first 30 seconds of a song, and try to guess the Song Name within 5 seconds of the song ending. The code prints out the information after the 5 seconds to see if we were right.

Code:
var 	iTunesApp = WScript.CreateObject("iTunes.Application");
var	source = iTunesApp.LibrarySource;
var	playLists = source.Playlists;

if (playLists != null) {
	var numPlaylists = playLists.Count;
	if (numPlaylists >= 0) {
		/*  Set the Playlist Name here  */
		var	playList = playLists.ItemByName("Game Playlist 25");
		if (playList != null) {
			playList.PlayFirstTrack();
			var numTracks = playList.Tracks.Count;
			var counter = 0;
			while (counter < numTracks) {
				WScript.Sleep(30000); /* 30 sec */
				counter++;
				iTunesApp.playPause();
				WScript.Sleep(5000); /* 5 sec */
				WScript.Echo(counter + " Name: " + playList.Tracks.Item(counter).Name + "  by " + playList.Tracks.Item(counter).Artist + " : " + playList.Tracks.Item(counter).Year);
				WScript.Sleep(2000); /* 2 sec */
				iTunesApp.play();
				iTunesApp.nextTrack();
			}
		}
		else {
			WScript.Echo("Failed to find specified playlist");
		}
	}
	else {
		WScript.Echo("There are no playlists to search");
	}
}
else {
	WScript.Echo("Failed to find playlists in MainLibrary");
}
You can make a batch file to call these scripts for automation or simplicity.
Or just type in the command line.

Code:
@echo off
C:
cd E:\Documents\scripts
cscript E:\Documents\scripts\PlaySongsInPlaylist.js //nologo
There are Start() and Finish() commands that can be executed against a track to set the Start and End times. I would expect that these changes would be permanent in your library, unless you reset them back to their defaults after you finished. ex: playList.Tracks.Item(counter).Start(0) and playList.Tracks.Item(counter).Finish(playList.Trac ks.Item(counter).Time)



Have you backed up your iTunes Library this week? If not, you are risking losing your music and playlists....
cjmnews is online now  
Reply With Quote

Topic: Timer for iPhone

Reply Thread Tools Topic Search

Become a member of the iLounge Forums. Register Now!
To start viewing messages, select the forum that you want to visit from the selection below.
If this is your first visit, be sure to check out the Forum FAQ and Forum Policy.
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Nano Sleep Timer??? Hornzog iPod nano 4 08-10-2009 04:32 PM
looking for itunes sleep timer & alarm with specific requirements bilyth Mac + PC iTunes Tools 2 03-28-2008 06:20 PM
iPod Sleep Timer gameson iPod classic & Legacy iPods 1 04-23-2007 08:47 AM
Sleep Timer Not Turing iPod Off cavemonkey50 iPod classic & Legacy iPods 2 10-07-2005 06:18 PM
Where's the Sleep Timer?? Zerostar13 iPod classic & Legacy iPods 2 07-22-2003 06:57 PM


RSS Feed Widget

iLounge Weekly
News, reviews, articles, giveaways, deals, and more delivered to your inbox.
Sign up for the iLounge Weekly Newsletter

iLounge is an independent resource for all things iPod, iPhone, iPad, and beyond.
iPod, iPhone, iPad, iTunes, Apple TV, Mac, and the Apple logo are trademarks of Apple Inc.
iLounge is © 2001 - 2016 iLounge, Inc. All Rights Reserved. Terms of Use | Privacy Policy