Quick Sign In:  

Forum: VirtualDJ Technical Support

Topic: motorised platter speed matching pitch
I'm building a motorised platter. When I increase the pitch, I'd expect to increase the velocity of the platter but it seems vdj expects a constant speed from the platter no matter the pitch.

I this something I can enable/implement or is this not supported?

edit: think I can do it by speeding up the platter but adjusting the position counter to keep it constant.. but that doesn't seem like the cleanest solution
 

Posted Wed 02 Aug 23 @ 10:34 pm
AdionPRO InfinityCTOMember since 2006
You can use get_ns7_platter speed 1000 0.5 1.5 to return the current pitch and let vdj know that the current pitch will be the platter speed, and update your controller's speed using this script.
1000 are the number of steps between stopped and turning at regular speed (since it will probably be sent over midi or hid, it will be rounded to a discrete number of steps, so you can use this value to take that into account)
0.5 is the minimum speed and 1.5 the maximum speed of your platter (so that if you increase/decrease the speed further within vdj, vdj will take care of the remaining speed
 

Posted Thu 03 Aug 23 @ 5:26 am
Thanks for the support!

It seems the '1000' parameter doesn't work. I'm always getting values around 100 instead of 1000, i.e. -50% gives me 50. So speed/pitch resolution is only 1%.. even though I'm using 2 bytes in the report. I'm using dotbit2 for this in the HID report. Without, I just get 1, so there seem to be no scaling done by the function. I guess I'd want a 'dotbit3' or more for this.

Min max values outside of 0.5 1.5 also cause issues. If I put it to 0 2 it limits the output to the range 18-152.

I tried using get_pitch as well to get a more precise value and used that to set the platter speed.

That works partially. I don't get the double speed increase from the platter + vdjay, but only for speed increase, positive pitch.

Any ideas what could be wrong?
 

Posted Thu 03 Aug 23 @ 2:04 pm
djdadPRO InfinityDevelopment ManagerMember since 2005
So how your device is controlling the motor speed ?
Assuming it has 2 HID bytes, an example would be ..
00 00 = motor is still (similar to pitch 0%)
00 FF = motor at its nominal 33RPM speed.
FF FF = motor at twice the speed of the nominal
Or some other ?
 

Posted Thu 03 Aug 23 @ 2:13 pm
AdionPRO InfinityCTOMember since 2006
Note that get_ns7_platter speed always returns a value with 0.0 indicating stopped and 1.0 indicating regular speed.
It is depending on the definition how this is translated into values.
 

Posted Thu 03 Aug 23 @ 2:42 pm
ok, yeah, that makes more sense. I was using digit instead of bar.

I got <bar byte="6" size="word" name="SPEED_OUT" endian="little" deck="1" min="0" max="32768"/> now in the definition. imho, bar is a rather confusing name for that.

and in the mapping I use get_ns7_platter speed 32768 0.0 2.0

It works but it sounds glitchy when I move the pitch more than a couple percent. The glitching is much worse on the negative side.
 

Posted Fri 04 Aug 23 @ 1:59 pm
AdionPRO InfinityCTOMember since 2006
Not sure how you got it to work like that, since bar will scale values between 0 and 1 to min and max, so when get_ns7_platter returns 1 (normal speed), it would already be at the 32768 limit. (and a word, 2 bytes only fits values between 0 and 32767, so even that wouldn't fit correctly)
You could change max to max="16384", then change the mapping to
get_ns7_platter speed 16384 0.0 2.0 & param_multiply 0.5
That way you would get 16384 when the speed is normal, and higher and lower values when the speed changes.
 

Posted Sat 05 Aug 23 @ 5:56 am
I took it as an unsigned int which is max 65535. The values I get look correct like that. I guess on vdj side they are signed and the value overflows and becomes negative when converting >1 but then when I take it as an unsigned it's the correct value.

I'll try your suggestion, but don't think that's causing the problem here.

 

Posted Sat 05 Aug 23 @ 8:55 am
I tried it, but the result is the same. Not sure why you add the multiply 0.5 though. That makes normal speed 0.5*max_value which is 8192 instead of 16384. Either way, getting the correct speed value from vdj works.

It just seems that when slowing down, I have to slow down less than what it should be to get it to sound correctly.

I'm using motorwheel3 to send the platter position and time delta. Which works fine without the get_ns7_platter speed and keeping the platter at constant 0 pitch speed.
 

Posted Sat 05 Aug 23 @ 11:46 am
Could you explain me what input ns7_platter and ns7_platter 'timestamp' require?

Currently I have this for the motorwheel3. Definition:
    
<jog byte="1" size="word" full="102400" name="POSDELTA" deck="1"/>
<jog byte="3" size="word" full="16384" name="TIMEDELTA" deck="1"/>


Mapping:

<map value="POSDELTA" action="motorwheel3 posdelta" />
<map value="TIMEDELTA" action="motorwheel3 timedelta 1000" />


I don't really understand the full="16384" because what I'm writing is microseconds... but that value works.

ns7_platter and ns7_platter 'timestamp' seem to be similar to motorwheel3 but clearly not the same. How should I adjust this to use those functions instead? Not sure I need it, but seems that the controllers that use get_ns7_platter speed also use those two function to report the position/time.







 

Posted Sat 05 Aug 23 @ 2:12 pm
*bump*

I'm a bit blocked on this issue.. can you please explain ns7_platter 'timestamp' in more detail?
 

Posted Fri 18 Aug 23 @ 4:27 pm
AdionPRO InfinityCTOMember since 2006
ns7_platter just has some specific values for time/position deltas for numark motorized platters.
debug 'scratchlog' opens a window that might give some more insights.
it will show the speed vdj thinks it got, as well as the set motor speed.
 

Posted Sat 19 Aug 23 @ 7:31 am
PANOSVPRO InfinityMember since 2007
out of curiosity, you are building a controller with mot. platters from scratch or you are adding motorize function in an existing controller??
 

Posted Tue 22 Aug 23 @ 10:06 pm