-
Notifications
You must be signed in to change notification settings - Fork 16
Description
Hey @evanpurkhiser!
All your new Prolink typescript stuff looks really neat - kudos to you! It seems like you pulled it together incredibly quick since you first mentioned it in the Beatlink chat :)
I'm not a dev by trade but have was playing around with prolink-connect because I've always been keen on some kind of CDJ playlisting utility (that posts to an online endpoint/DB), and more familiar with JS/TS.
I've managed to get the basics working based on the sample code in the repo - e.g. network initialised and device events for connection/disconnection, but struggling to get the MixstatusProcessor + event emitter working.
Should something like the following vaguely work or am I overlooking something else critical?
const MixStatusConfig = {
allowedInterruptBeats: 1,
beatsUntilReported: 1,
hasOnAirCapabilities: false,
timeBetweenSets: 10
}
const mixstatus = new MixstatusProcessor(MixStatusConfig);
network.statusEmitter.on('status', s => mixstatus.handleState(s));
mixstatus.on(
'nowPlaying',
state => console.log("nowPlaying")
);
mixstatus.on(
'stopped',
state => console.log("stopped")
);
Also, I'm using straight CDJ2000s (i.e. not nexus) and noticed that the electron app recognises the devices but doesn't seem to react to much else. Is it likely that these two things are related - i.e. the triggering of these events is critically linked to nexus-only elements?
Thanks for even taking the time to even read this far