Synch Text And Audio Or Display Text With Timer

Hello dear Coromen and Corowomen

I am quite new with programing and I am trying to understand how to display a text or update it on a specific time.

This is for a musical apllication, and I want the text to appear synched with the music, much like a karaoke but more simple. Just to display a sentence of the lyrics, and then replace it with the next at a specific time (no highlight or so).
Also I wish that if the user replay the sound the timer restart to 0 so that the text and music would be still synched

Please advise me if you how to do it. I am really struggling to understand how to do it

Thank you !

Oh yeah I have the same question …

Hoppe someone clever on this forum could give us some help !!

Hi @francoiscoiscois,

This should be simple enough just using timers, which are set to a table (array) of specific times in your music when you want the text to change. Since you can’t have “events” happen in the middle of a streaming musical track, you’ll need to figure out these time-switch periods in advance and program them into your series of timers.

Hope this helps,

Brent Sorrentino

Thank you for your response Brent

Yes this should be quite simple when I understand how to perform the timer.
On the docs and on internet I only see the performWithDelay fonction which call a fonction.
So I should have a different fonction for each time I want to change the text

somethink like

function updatetext1 ( event )
mytext = “sentence1”
end

function updatetext2 ( event )
mytext = “sentence2”
end

timer.performWithDelay(1000, updatetext1 )
timer.performWithDelay(3000, updatetext2 )

… seems too complicated as I have  about 40 sentence by song

I try to find some info about how to set to a timer into a table, as you suggest but havent found anything so far…

Sorry if I still dont get it, as I am a beginner in programation and I use kwick software to do all the code… only this I cannot do it in kwick so I have to learn how to do it myself

PS  It is easy to know how to perform the time-switch with the help of a audio software that tell me the timing.

Thanks again for your repply that spoint me to the righ direction .

Oh yeah I have the same question …

Hoppe someone clever on this forum could give us some help !!

Hi @francoiscoiscois,

This should be simple enough just using timers, which are set to a table (array) of specific times in your music when you want the text to change. Since you can’t have “events” happen in the middle of a streaming musical track, you’ll need to figure out these time-switch periods in advance and program them into your series of timers.

Hope this helps,

Brent Sorrentino

Thank you for your response Brent

Yes this should be quite simple when I understand how to perform the timer.
On the docs and on internet I only see the performWithDelay fonction which call a fonction.
So I should have a different fonction for each time I want to change the text

somethink like

function updatetext1 ( event )
mytext = “sentence1”
end

function updatetext2 ( event )
mytext = “sentence2”
end

timer.performWithDelay(1000, updatetext1 )
timer.performWithDelay(3000, updatetext2 )

… seems too complicated as I have  about 40 sentence by song

I try to find some info about how to set to a timer into a table, as you suggest but havent found anything so far…

Sorry if I still dont get it, as I am a beginner in programation and I use kwick software to do all the code… only this I cannot do it in kwick so I have to learn how to do it myself

PS  It is easy to know how to perform the time-switch with the help of a audio software that tell me the timing.

Thanks again for your repply that spoint me to the righ direction .