Re: Karaoke like algorithm
Re: Karaoke like algorithm
- Subject: Re: Karaoke like algorithm
- From: Eric Gorr <email@hidden>
- Date: Thu, 12 Mar 2009 10:00:16 -0400
It also seems possible that Quartz Composer might be able to help you
out here as well, but I am less familiar with that.
On Mar 12, 2009, at 9:58 AM, Eric Gorr wrote:
Have you considered creating a Quicktime movie in code which
displays the words in the way you want?
On Mar 11, 2009, at 6:52 PM, Ariel Rodriguez wrote:
I'm working on a Karaoke-like application. I need to print out to
the screen text lines at a given time, and then, paint each word at
a given time. I keep thinking on an elegant way to do such that,
and, i hace to tell, i am afraid, i have not get it right :(.
Here's what i am doing (in pseudocode to keep things simple)
First, i store the time the line is supposed to show on the screen,
the time it is supposed to disappear from the screen, and an array
with the words and the time each word is supposed to be painted.
All times are stored as seconds.
When the application boot, i set and NSTimer to the amount of time
i need to wait for the first line to appear on screen. When time
elapsed, NStimer calls a function where i build UILabels for each
word, insert them in the main UIView. Once the UIView is packed
with all the UILabels, i fire a new loop to walk the UILabels array
and paint the words when needed.
Specifically, i am wondering if there is a better way to write
words to a UIView (and keep a handle to paint them at a given
time). Does anyone get a better algorithm?
best regards
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
@ericgorr.net
This email sent to email@hidden
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden