How to Applescript BlitzMax App?

Archives Forums/MacOS X Discussion/How to Applescript BlitzMax App?

Difference(Posted 2009) [#1]
I'd like to receive notifications from Itunes about Current song and song position etc.

It seems this is possible via Applescript, but how do I send the notifications to my Blitzmax App?

An alternative would be polling Itunes directly, but I have no clue how to to that.

Any input appreciated


Brucey(Posted 2009) [#2]
Why on Earth would you want to do that? :-p


Difference(Posted 2009) [#3]
Why on Earth would you want to do that? :-p

Why I want to query Itunes?


Brucey(Posted 2009) [#4]
Indeed :-)


Difference(Posted 2009) [#5]
Will you help me if I tell you?


Brucey(Posted 2009) [#6]
I might :-)


Difference(Posted 2009) [#7]
I could lie and say it was for a karaoke thingy...


Brucey(Posted 2009) [#8]
How do you get the words to match the tune?


Will this help at all?


Difference(Posted 2009) [#9]
I'm planing to write down the time-code for each line, and show them at the appropriate time.

Your Scripting Bridge API Module seems like *exactly* what I'm looking for, and I'm head over heels testing it.

I simply can't thank you enough for your help and BlitzMax dedication.

I'll be reporting progress soon in that other thread.


Brucey(Posted 2009) [#10]
I've added a more integrated example, which might help you get your head around it better.


Brucey(Posted 2009) [#11]
One thing to note about iTunes. It only appears to report second-accuracy track position, which may not be a high enough resolution for what you need.

You may find you'll need to go for something more low-level to get that resolution - like FMOD or BASS, for example. (BASS can also playback unlocked .m4a files).

Just a thought :-)


Difference(Posted 2009) [#12]
Yes, I noticed the second resolution limit, but I think I'll use a "spline" interpolation method for the local app time and that should be ok.