node-caspar-cg
node-caspar-cg copied to clipboard
OSC Status Updates
#23
@7immy I haven't started using this in a real project yet but it should work. If you have a chance to give it a try I would appreciate feedback.
@respectTheCode This is great news! I'll be sure to check this out soon and give you some feedback!
Hey @respectTheCode, I had a chance to checkout the osc feature today. I had fun testing it but I'm not 100% sure how to use it. Is this the best way to get the paused status for example:
ccg.on("status", status => {
console.log(status["1"].layers["1"].paused);
});
Is there a way to get hold of the MASTERVOLUME? I think its at the OSC address: /channel/[0-9]/mixer/audio/ but I can't quite work out how to filter it out.
Also "not channel" is being plastered all over my console. What does it mean?
Cheers :)
The channel audio meters are in audioChannels under the channel. For example status["1"].audioChannels["2"].dBFS would give you audio channel 2 on caspar channel 1.
What version of CasparCG are you running? The not channel message means that it is getting a packet that is not associated with a channel. I haven't seen that with 2.0.6.
This code was all based on my fork of node-osc. I had to fork node-osc to get it to work. I want to try osc-min and see if it supports caspar any better.
Hmm I'm not sure thats the MASTERVOLUME status. I'm getting a value of -192.65921020507812 from status["1"].audioChannels["2"].dBF however if I type MIXER 1 MASTERVOLUME into casparCG console I get the value 1.
The "not channel" seems to appear on version 2.1.0. I tried it on 2.0.7 and "not channel" disappears. Below are the messages I'm getting on 2.1.0:
not channel [ 'diag', '10', 'value', 'video-buffer' ]
not channel [ 'diag', '10', 'text' ]
not channel [ 'diag', '10', 'value', 'frame-time' ]
not channel [ 'diag', '10', 'value', 'video-buffer' ]
not channel [ 'diag', '1', 'value', 'produce-time' ]
not channel [ 'diag', '1', 'value', 'volume' ]
not channel [ 'diag', '1', 'value', 'mix-time' ]
not channel [ 'diag', '2', 'value', 'frame-time' ]
{"1":{"layers":{"1":{"paused":false,"file":{"frame":28,"totalFrames":268,"fps":25,"path":"AMB.mp4"},"profiler":{"actual":0,"expected":0.03999999910593033},"loop":false}},"audioChannels":{"1":{"pFS":0,"dBFS":-192.65921020507812},"2":{"pFS":0,"dBFS":-192.65921020507812}},"nbChannels":2}}
not channel [ 'diag', '2', 'value', 'tick-time' ]
not channel [ 'diag', '1', 'value', 'consume-time' ]
not channel [ 'diag', '3', 'value', 'tick-time' ]
not channel [ 'diag', '1', 'value', 'tick-time' ]
not channel [ 'diag', '10', 'value', 'video-buffer' ]
not channel [ 'diag', '10', 'text' ]
not channel [ 'diag', '10', 'value', 'frame-time' ]
not channel [ 'diag', '10', 'value', 'video-buffer' ]
not channel [ 'diag', '1', 'value', 'produce-time' ]
not channel [ 'diag', '1', 'value', 'volume' ]
not channel [ 'diag', '1', 'value', 'mix-time' ]
not channel [ 'diag', '2', 'value', 'frame-time' ]
not channel [ 'diag', '2', 'value', 'tick-time' ]
not channel [ 'diag', '1', 'value', 'consume-time' ]
not channel [ 'diag', '3', 'value', 'tick-time' ]
not channel [ 'diag', '1', 'value', 'tick-time' ]
not channel [ 'diag', '10', 'value', 'video-buffer' ]
not channel [ 'diag', '10', 'text' ]
not channel [ 'diag', '10', 'value', 'frame-time' ]
not channel [ 'diag', '10', 'value', 'video-buffer' ]
Perhaps its something new thats not documented in the wiki. diag sounds like it could mean diagnostics?!