Sign In:     


Forum: General Discussion

Topic: Script to match bpm of currently playing while mixing.

This topic is old and might contain outdated or incorrect information.

I was thinking we might be able to make a custom mix button.

Let's make it easy for now til I get the hang of it and music is playing on left deck & right deck is ready with a song.
What would it take to make a custom button that when you press:

Custom button press makes left playing deck go to right playing deck bpm and does this at a slow pace. Maybe I than can create 3 other buttons to select speed later. Slow, Med, Fast

Got what I think might be a cool idea if this pans out.. Won't know til I test some stuff out.
 

Posted Mon 09 Jan 17 @ 9:52 pm
So far tried it a couple ways using this method but didn't work:
repeat_start_instant 'pitchMatch' 10ms 101 & deck left get_bpm & param_smaller deck right get_bpm ? deck left set_bpm +1% : deck left set_bpm -1%

Testing it out I gave it 101 steps to slowly work it's way to the matching bpm. If this did work it would be wasted steps if it did find the matching bpm after the first try it would be 100 wasted steps on the timer. This actually didn't even budge the pitch slider so there is a code problem here.
 

Just wanted to clarify. I wanted it to glide up or down to match beats. Thinking now set_bpm isn't what I thought it was. As soon as I set a bpm to a deck, it doesn't seem to change the pitch which isn't going to help trying to get either side match the other side. Wish there was more examples than on the wiki.
 

repeat_start_instant 'pitchMatch' 10ms 101 & deck left get_bpm & param_smaller deck right get_bpm ? deck left set_bpm +1% : deck left set_bpm -1%

A few things, 33ms is the fastest rsi scripts can run
Your logic is wrong, you only query smaller, meaning the false reply could be greater could be equal, somewhere you have to query equal
You don't directly increase bpm, you increase pitch
Script actions that are to be used as params for stuff like param smaller, if the contain spaces they need to be wrapped in quotes and backticks
Changing the pitch by 1% increments is no guarantee you'll get a bpm match

Why not just use "sync" that what it's there for.
What you're asking isn't impossible just a lot of work for something that I don't think is a good idea. Especially since you can just use sync
 

Sync is instant.

I think he wants something like a transition script.
 

Then it'll sound like a car crash unless the timings are catered to a specific transition.

Too much effort for me with the amount of interest I have in it.

maybe increment the pitch until it passes sync and then actually sync
 

Or just do it by hand :)
 

I agree, I don't think I would use this because it would inevitably put the tracks off-beat and sound bad, but I am enjoying your scripting questions nassausky, I think it's good to just do things for the sake of learning sometimes. VDJscript is quite complex even for someone with coding experience but it's something amazing that sets VDJ apart from others so it's well worth having people in the community who can do complex things with it.
 

Oh sorry no I'd like to see if I can accomplish this whole thing (if it comes out to anything good i'll share it) but until then it's a learning experience. It's though nice to hear the input and help getting a little deeper into the coding.
I start reading the wiki and help and sometimes get sidetracked and forget some things and start working for an hour and post a question like I did yesterday about forgetting to specify the word 'deck' when I am deep in the my own thoughts of how this can be.
Oh and yes @pachN I wanted it to be a transition script. That's why I mentioned different speeds but let me explain. I have a few ideas going through my head. If I can explain this right, this one was to do something like this in the long run.

A deck is playing a song and let's call it the left deck and the right is loaded, not necessarily queued to any position. one button let's call it SMACKIT:

Starts by getting the bpm of the right and adjusts itself to half the difference slowly so it's not an immediate change in bpm for the left live playing deck.
As this is happening the right deck matches the new center point of bpm.(Now the right non-playing deck can change instantly the pitch/bpm since it's not live) But loco you are right at this point i can sync that right deck but that left deck needed the gradual change.

OK so as my SMACKIT button is pressed I will pick out an effect which starts up as it's increasing in decreasing in speed to match the right cued deck (something like the loop drop) and now the right deck is running a similar loop drop with matched timing and then the SMACKIT button is released and the crossfader mixes them and then disables the effects on both decks. Now if it's a mess I can start playing with filters to adjust the type of transition it made.

I got a sample made and will share it later. Thanks again all!
 

Also wanted to add there are still some complications but until I see how it works a bit and how it sounds I'd adjust if I can. For example that right deck which is loaded at the beginning, I'd see if there was also a way to find the first loud beat (preferably a drum beat) and start looping around that but that's further down the road.

 



(Old topics and forums are automatically closed)