maxjoehnk / node-pro-dj-link

A Node.JS Library for interaction with a Pioneer Pro DJ Link Network
20 stars 3 forks source link

How to get this to work #1

Open NijsJonas opened 2 years ago

NijsJonas commented 2 years ago

i installed this module but is there any information as to how to get this to work ? what the functions are i need to call to get the info from the cdj ? what function to call for discovery... ?

maxjoehnk commented 2 years ago

I've only ever used the VirtualCdj interface which allowed me to receive bpm updates. For this the following code should work fine:

const cdj = new VirtualCdj('<your network interface identifier>')
cdj.bpm.subscribe(bpm => {
  console.log('bpm', bpm)
})
cdj.devices.subscribe(devices => {
  console.log('devices', devices)
})

I don't have access to cdjs right now so I can't check what was working last time, I've only ever really used the bpm code before. The search method should also work though it won't return anything useful and is more of a debugging tool if you set the DEBUG env variable.