ShadeyGuy
New Member
This might be a bit out there, but I figured I'd ask here.
I use Youtube Music to play music during my live streams, and I use Amuse to display the current song being played at that time. It also displays the total song length and how far along the current song is as well. YT Music doesn't support crossfade and so I thought I could sort of simulate the fading in/out of music by just increasing/decreasing the volume of the actual music Source in OBS itself.
After attempting various ideas I determined that I could use OCR to "read" the total length of the song, store it as a variable, and then subtract say 10 or 10 seconds to determine when i want the fade out to start and then store that as a separate variable. Since say "4:17" isn't something that can't be subtracted, I'd remove the colon and then get an actual integer. It seemingly worked until I realized that anything that's say 3 minutes long or 3:00 would become 300 and then 290, which doesn't really work when it comes to length of time. I also realized I had no idea how I could reinsert the colon without it being on the far left or right of said number.
I kept chipping at it trying to figure out if i could split the length of time into separate minutes and seconds variables specifically and then try some kind of math to convert the seconds and then somehow combine the numbers back together but it was late and something like this is just a bit out of my expertise.
I'm basically just asking am I over complicating things or is what I'm trying to do even possible? Thanks.
I use Youtube Music to play music during my live streams, and I use Amuse to display the current song being played at that time. It also displays the total song length and how far along the current song is as well. YT Music doesn't support crossfade and so I thought I could sort of simulate the fading in/out of music by just increasing/decreasing the volume of the actual music Source in OBS itself.
After attempting various ideas I determined that I could use OCR to "read" the total length of the song, store it as a variable, and then subtract say 10 or 10 seconds to determine when i want the fade out to start and then store that as a separate variable. Since say "4:17" isn't something that can't be subtracted, I'd remove the colon and then get an actual integer. It seemingly worked until I realized that anything that's say 3 minutes long or 3:00 would become 300 and then 290, which doesn't really work when it comes to length of time. I also realized I had no idea how I could reinsert the colon without it being on the far left or right of said number.
I kept chipping at it trying to figure out if i could split the length of time into separate minutes and seconds variables specifically and then try some kind of math to convert the seconds and then somehow combine the numbers back together but it was late and something like this is just a bit out of my expertise.
I'm basically just asking am I over complicating things or is what I'm trying to do even possible? Thanks.