快速登录:  

Forum: General Discussion

话题: change the pitch of a song smoothly - Page: 1

由于该帖子的部分内容已年深日久,可能包含陈旧过时或描述错误的信息。

gbdj99Home userMember since 2019
See title. Can't compete with Traktor and the like who all have this basic feature. Imagine not being able to shift a songs pitch smoothly in cents.
 

发表时间 Fri 02 Aug 19 @ 1:39 pm
AdionPRO InfinityCTOMember since 2006
You can use the key_smooth action for this
You can assign it to buttons or to a slider
 

发表时间 Fri 02 Aug 19 @ 2:00 pm
gbdj99Home userMember since 2019
And how would you go about adding that slider or knob?
 

发表时间 Fri 02 Aug 19 @ 2:13 pm
djdadPRO InfinityDevelopment ManagerMember since 2005
Use the 2-Decks default skin. From the top LAYOUT menu, enable "Show some empty buttons"
Then right-click on the knob that will appear next to the jogwheels and assign as .. key_smooth



BTW, you meant smooth Key or smooth Tempo ? because by Pitch some mean one and some the other.
 

发表时间 Fri 02 Aug 19 @ 2:18 pm
gbdj99Home userMember since 2019
Thanks, is there anyway to change the range of this knob? It's currently -6 to +6, it would be nicer as +2 to -2, maybe even using the buttons to smoothly change the key up or down a semitone over a half a second period?
 

发表时间 Fri 02 Aug 19 @ 2:35 pm
djdadPRO InfinityDevelopment ManagerMember since 2005
For an endless encoder on a controller, the range could be adjusted, but with the skin knobs, havent found a way.

"Smooth" Buttons can be ..
key_smooth +0.02
key_smooth -0.02
Change the 0.02 to other value for less/greater accuracy
 

发表时间 Fri 02 Aug 19 @ 2:43 pm
gbdj99Home userMember since 2019
for a range of -2 to +2, I've ended up with this for the knob: param_add 1.43 & param_multiply 26% & key_smooth
 

发表时间 Fri 02 Aug 19 @ 2:50 pm
gbdj99Home userMember since 2019
Also those buttons dont seem to change the key in any way
 

发表时间 Fri 02 Aug 19 @ 2:51 pm
djdadPRO InfinityDevelopment ManagerMember since 2005
Buttons work here. Make sure you copy/paste the above action. You use Custom buttons for them, not the custom knob, right ?

for the knob, this one works for me..
param_add -0.5 & param_multiply 0.26 & param_add 0.5 & key_smooth
 

发表时间 Fri 02 Aug 19 @ 2:55 pm
gbdj99Home userMember since 2019
Nah the buttons straight up don't have any effect when using "key_smooth +0.02" pressing the button repeatedly or holding still has no effect.

Thanks for that for the knob - could you explain exactly how what you've put in the script works? Does subtracting the adding back the 0.5 after multiplication centre the original key of the track directly upward on the knob?
 

发表时间 Fri 02 Aug 19 @ 3:40 pm
gbdj99Home userMember since 2019
And seemingly at random - testing out the buttons again. It's somewhat started working. How bizarre. The units of "key_smooth" escape me though. Using "key_smooth +0.5":

First press: Key +1
Second press: Key +2
Third press: Key +4


Using "key_smooth +1.0" always sets the key to +6 - is this just bugged
 

发表时间 Fri 02 Aug 19 @ 5:45 pm
locoDogPRO InfinityModeratorMember since 2013
Please don't swear on the forum, while it might be no big deal for you [nor me for that matter] We like to keep to professional discourse on the forum.
You might be seeing a rounding error with respect to the key displayed, if say you're bang on Cm and you key smooth +0.8 semitones you're neither on Cm nor C#m but it has to show something so it rounds to the nearest whole semi-tone [there's an argument to actually use a decimalised key scale for accurate reporting, since we can. But that maybe too forward thinking for most, we've used the whole semitone scale for hundreds of years and the "we've always done it that way" attitude is hard to change]

I figured this out a few years back [documented here

Key Smooth (from -1 to +1) (dial)
param_multiply 0.16 & param_add 0.44 & key_smooth

I can't remember exactly the maths and it might not even be bang on but as I said key is rounded so it's up to your ears and a bit of extended range is no bother.
I think for scaling a dial to be centred on 0 it's
1 - scaling factor = correction, multiply the dial by the scaling factor and then add the correction.

Would you like to change this thread's title?
 

发表时间 Fri 02 Aug 19 @ 6:19 pm
gbdj99Home userMember since 2019
Sure, I'd love to change the thread's title. It was a bit of Cunningham's law as I'd posted pretty much the same thread to no response, and I'm kind of sad to see it worked.

Regardless, thank you for your help. Is there any explanation for key_smooth +1 always setting itself to the same value of +6 semitones?

 

发表时间 Fri 02 Aug 19 @ 8:17 pm
locoDogPRO InfinityModeratorMember since 2013
Yep, it's pretty simple, key_smooth works with zero as it's reference, vdj script can increment your value. Give me a day and I'll bodge a script that will give the results you want with a button.
 

发表时间 Fri 02 Aug 19 @ 8:56 pm
gbdj99Home userMember since 2019
Thank you greatly - a button to change the key by a semitone in a smooth way would be a fantastic addition to VDJ anyway. Much appreciated!
 

发表时间 Fri 02 Aug 19 @ 9:11 pm
locoDogPRO InfinityModeratorMember since 2013
Ok for clarity; you don't want to move key "while_pressed" [completely manual] you want to press a button and move up/down a key over a predefined duration, what duration?
*edit* are you aware of the "pitch" addon? [bad name IMO, pitch is speed (or angle) it's actually Key to my engineering brain]
 

发表时间 Fri 02 Aug 19 @ 9:29 pm
gbdj99Home userMember since 2019
let's say the duration should be half a second, or a beat if that makes it easier. Also I've not heard of the pitch addon - I'll see what I can find out about it now.
 

发表时间 Sat 03 Aug 19 @ 3:16 am
gbdj99Home userMember since 2019
Can I just say the knob is fantastic but I'm just trying to emulate what I'd do with a knob using buttons - pitching a song smoothly up or down. It's just my controller doesn't have many knobs, and certainly none I could rebind to this.
 

发表时间 Sat 03 Aug 19 @ 3:19 am
locoDogPRO InfinityModeratorMember since 2013
repeat_start_instant 'rsiKeySmooth' 50ms 10 & key_smooth +0.008333333

or
repeat 50ms & key_smooth +0.008333333

for clarity key_smooth is -1.0 to 1.0 which translates to -6 to +6 key therefore your script key_smooth +1.0 would always result in +6 key
 

发表时间 Sat 03 Aug 19 @ 11:20 pm
gbdj99Home userMember since 2019
Thank you greatly for all your help, can I ask what the "rsiKeySmooth" refers to? trying to get my head around the scripting.
 

发表时间 Sun 04 Aug 19 @ 8:17 am
74%