How can I make an event that increases the pitch of an audio cue, while also increasing the playback loop time to match the new speed of the audio clip

I am trying to make an event that keeps replaying a 30 second song, while also increasing the pitch of the song. This part is working fine, however the part that I am having trouble with is getting the “time” that this event is called to match the new speed so it plays seamlessly.

Here is what I have so far, the only issue is that there is a gap between when the song finishes and when the the “song” begins.::

any help would be greatly appreciated.