Monitor the project cursor position of Cubase with OSC

The HUI protocol seems to be a bit different regarding timecode, based on this, here is a module draft, I can't test it but it should help.

var huiTimecode = Array(8).fill('0 ')

module.exports = {

    oscInFilter: (data)=>{

        if (data.address === '/sysex' && data.args[0].value.includes('f0 00 00 66 05 00 11')) { // hui sysex timecode

            var digits = data.args[0].value.split(" ").slice(7).map(x=>{
                if (x[0] === '0') return x[1] + ' '
                else x[1] + '.'
            })

            digits.pop() // drop sysex closing byte

            var i = 7
            for (var d of digits) {
                huiTimecode[i] = d
                i--
            }

            receive('/hui_timecode', huiTimecode.join('')) // send timecode as single string for example
            return

        }

    return data
        
    }
    
}
1 Like