B bijou Member Licensed User Apr 29, 2017 #1 I'd like to test a possibility to make karaoke file, i upload a music file and now i'd like to display text according to the progress of music. an example when mp.position in second is between 10 to 15 seconds display "this text" and so on. my question is how to get the actual position of mp and how to use it in condition loop to display texts ?
I'd like to test a possibility to make karaoke file, i upload a music file and now i'd like to display text according to the progress of music. an example when mp.position in second is between 10 to 15 seconds display "this text" and so on. my question is how to get the actual position of mp and how to use it in condition loop to display texts ?
moster67 Expert Licensed User Longtime User Apr 29, 2017 #2 I don't know how Karaoke-files are structured but my guess is they might be similar to subtitle-files where a time period is specified and also the text (words) to show. I don't think the mediaplayer has an event which shows the current position so I guess you can use a timer and call mediaplayer.position continuously and based on its position you read/analyse the karaoke-file and show the corresponding text related to the current position. Last edited: Apr 29, 2017 Upvote 0
I don't know how Karaoke-files are structured but my guess is they might be similar to subtitle-files where a time period is specified and also the text (words) to show. I don't think the mediaplayer has an event which shows the current position so I guess you can use a timer and call mediaplayer.position continuously and based on its position you read/analyse the karaoke-file and show the corresponding text related to the current position.