5 Replies - 690 Views - Last Post: 22 December 2014 - 04:16 AM Rate Topic: -----

#1 Trones   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 21-December 14

Alternating itunes(any player) playlists... need direction

Posted 21 December 2014 - 01:01 AM

Ok so I took a programming 101 class years ago and I recently started learning C#. C# may not be the right language for this idea, but this is just a fun thing I want to do myself to learn, not something I want to outsource.

Project Objective:
I would like to be able to alternate playlists but still keep the order for each playlist random

Example:
I have 3 playlists: pop, punk, house

I want to be able to listen to music in this order:

random pop song
random punk song
random house song
random pop song
random punk song
random house song
random pop song

so essentially it would be

playlist A
playlist B
playlist C
playlist A
playlist B
etc.

but the choice from each playlist would be completely random

The user should be able to choose the playlists they want to include in the rotation.

The Point:
Shuffle feature is great, but often times I like to alterenate genre every other song. Unfortunately the only way i know to do this is to manually create playlists, and after some time the playlist will become stale.


It should be a relatively simple project, I just need some direction in what I should do to begin working on this project? Is this even possible in itunes, or will I need to use something like media monkey?

Thanks :)

Is This A Good Question/Topic? 0
  • +

Replies To: Alternating itunes(any player) playlists... need direction

#2 tlhIn`toq   User is offline

  • Xamarin Cert. Dev.
  • member icon

Reputation: 6537
  • View blog
  • Posts: 14,450
  • Joined: 02-June 10

Re: Alternating itunes(any player) playlists... need direction

Posted 21 December 2014 - 06:06 AM

If you tell iTunes to switch between playlists the randomizer will start over. Which means a song already played will get played again, and neither playlist will ever reach an end.

You could do something along these lines:

A - Ask user for a list of two or more playlist names.
B - Programmatically add them to a new playlist
C - When the new (merged) playlist is done, delete it.

So in your research of the iTunes API you'll need to find how to (at minimum):
  • Read a playlist
  • Add a new playlist
  • Delete a playlist
  • Add songs to a new playlist
  • Detect with a playlist has completed (versus stopped by user)


Where to start? Well that depends on your skill level. One of the first things new programmers want to do is make a program. The problem is they generally don't know enough about design/architecture to be able to plan how the program works. This is akin to saying "I don't know anything about cars. I'm going to order a bunch of random parts and sheet metal then build a car, as a way to learn about auto mechanicing." They then start with UI because that's easy drag and drop, when in reality UI is the last thing you do after getting all the underlying logic working. So in our car metaphore they build the dashboard before engine. Later they write a question here asking

Quote

"My dashboard is done, but it doesn't work right, the speedometer shows -40mph, none of the lights go on, and is missing gauges I need but I can't figure out how or where to add them. I've Googled 'backwards speedometer' but couldn't find a tutorial I could copy/paste from for my exact situation. I also built the doors, but they are 5 inches taller than the chassis and the hinges don't line up. I don't understand how an internal combustion engine works, but I've cobbled together some parts that I found in a catalog however they're no place for the air filter to go. What should I do now?"


So where would I suggest you start? With this tutorial list. If you breeze through it and there's nothing new to learn in any of them that's great and you'll only have lost an hour or two. If you spend a week on them, that's good too because you will have picked up vital skills you require for this (and most any) project.

Then the list of rookie projects pinned at the head of the C# thread. They are introductory projects that will help you evaluate your skills, and build them up. If you can't fly through self-contained projects then be honest with yourself and realize you're not ready to take on a project that interacts with someone else's software. If you do fly through them and you don't find anything in these tutorials that is new to you, then the next step with this project should seem pretty clear.

Tutorials I recommend:


Was This Post Helpful? 1
  • +
  • -

#3 Skydiver   User is online

  • Code herder
  • member icon

Reputation: 7507
  • View blog
  • Posts: 25,283
  • Joined: 05-May 12

Re: Alternating itunes(any player) playlists... need direction

Posted 21 December 2014 - 09:45 AM

... And the advantage of the Android playlist shuffle shines through... :-) It uses a new seed each time.
Was This Post Helpful? 0
  • +
  • -

#4 tlhIn`toq   User is offline

  • Xamarin Cert. Dev.
  • member icon

Reputation: 6537
  • View blog
  • Posts: 14,450
  • Joined: 02-June 10

Re: Alternating itunes(any player) playlists... need direction

Posted 21 December 2014 - 10:58 AM

How is that any different than when I said iTunes randomizer will reset? In either system if you leave PlaylistAlpha and go to PlaylistBravo and back they will both reseed: Change order, change start point, reset the playlist as 'nothing yet played', etc.
Was This Post Helpful? 0
  • +
  • -

#5 Skydiver   User is online

  • Code herder
  • member icon

Reputation: 7507
  • View blog
  • Posts: 25,283
  • Joined: 05-May 12

Re: Alternating itunes(any player) playlists... need direction

Posted 21 December 2014 - 07:44 PM

Sorry. Misread the previous post to mean that switching to each playlist would make it start over from the beginning with the same order.
Was This Post Helpful? 0
  • +
  • -

#6 tlhIn`toq   User is offline

  • Xamarin Cert. Dev.
  • member icon

Reputation: 6537
  • View blog
  • Posts: 14,450
  • Joined: 02-June 10

Re: Alternating itunes(any player) playlists... need direction

Posted 22 December 2014 - 04:16 AM

No worries mate :cowboy: . If it *did* do that it would solve half the OP's issues.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1