• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: iTunes BPM playlist
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: iTunes BPM playlist


  • Subject: Re: iTunes BPM playlist
  • From: "J. Stewart" <email@hidden>
  • Date: Sun, 05 May 2013 06:59:31 -0400

On 5/4/13 at 9:44 PM, Robert Cuilla <email@hidden> spake thusly:

I would like an script the run through my itunes library and reads the BPM value from the metadata and then puts that song into on of several smart playlists such as "BPM 0-50", "BPM 51-100" etc.
Can anyone push me in the correct direction or provide a little guidance ?

This does what you asked but really isn't necessary to accomplish the task, a smart playlist has a number of advantages. A smart playlist is easier to make too. :)
--> Script <--
set myLocs to {}
set LL to 0 -- lower limit, change as required
set UL to 50 -- upper limit, change as required
set plname to (LL as text) & "/" & UL as text
tell application "iTunes"
	try
		set pl to a reference to playlist 1
		set foo to (tracks of pl whose (bpm ≥ LL) and (bpm ≤ UL))
		set nt to make new playlist with properties {name:plname}
		repeat with x from 1 to count of foo
			set end of myLocs to location of item x of foo
		end repeat
		set bar to add myLocs to nt
	end try
end tell
--> /Script <--

JBS
--
Never try to outstubborn a cat.  -Lazarus Long (Robert Heinlein)


_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden


References: 
 >iTunes BPM playlist (From: Robert Cuilla <email@hidden>)

  • Prev by Date: iTunes BPM playlist
  • Next by Date: excel editing
  • Previous by thread: iTunes BPM playlist
  • Next by thread: excel editing
  • Index(es):
    • Date
    • Thread