Thank you very much. You helped me a lot!!!
I managed to make it work (More or Less)
I was not expecting something perfect.
The transition (time = 0) help a lot.
I create this function for a 4 bar music sample
function moveIndicator() tempo = (totalTime/16) - (40) transition.to( h, { x = display.contentCenterX - 400, time = 0, delay = tempo\*1 } ) transition.to( h, { x = display.contentCenterX - 300, time = 0, delay = tempo\*2 } ) transition.to( h, { x = display.contentCenterX - 250, time = 0, delay = tempo\*3 } ) transition.to( h, { x = display.contentCenterX - 128, time = 0, delay = tempo\*4 } ) transition.to( h, { x = display.contentCenterX - 100, time = 0, delay = tempo\*5 } ) transition.to( h, { x = display.contentCenterX - 86, time = 0, delay = tempo\*6 } ) transition.to( h, { x = display.contentCenterX - 10, time = 0, delay = tempo\*7 } ) transition.to( h, { x = display.contentCenterX + 10, time = 0, delay = tempo\*8 } ) transition.to( h, { x = display.contentCenterX + 52, time = 0, delay = tempo\*9 } ) transition.to( h, { x = display.contentCenterX + 85, time = 0, delay = tempo\*10 } ) transition.to( h, { x = display.contentCenterX + 150, time = 0, delay = tempo\*11 } ) transition.to( h, { x = display.contentCenterX + 200, time = 0, delay = tempo\*12 } ) transition.to( h, { x = display.contentCenterX + 250, time = 0, delay = tempo\*13 } ) transition.to( h, { x = display.contentCenterX + 328, time = 0, delay = tempo\*14 } ) transition.to( h, { x = display.contentCenterX + 400, time = 0, delay = tempo\*15 } ) transition.to( h, { x = display.contentCenterX + 500, time = 0, delay = tempo\*16 } ) end
I can change the “tempo” to make it go faster or slower
the - (40) is a little adjustment
And each of the transitions will give me 1 beat
I have 16 beats = 4 measures.
And I can adjust the CenterX - 300 or centerX - 317
until it looks more or less okay on top of the note.
Like this I can make the song look nice!!!
The only problem is if I have 100 songs…
imagine all the time it would take me to do this…
Is there a way I can optimize this function?
Like a formula to tell the program…
The image for the note is
image = 875 pixeles longX
divide that image into 4 so 875/4 = variableA
so variableA = 1 measure
divide 1 measure/4 = beat1
now CenterX = beat1
=beat1 = beat1 + 1
or something like that I get so confuse
Can you help me please…
or should I use this function 100 times?
Victor