コード例 #1
0
def surfacereset_handler(unused_addr, args):
    """
    blasts reset to surface
    """

    logger.info("Blasting Reset to the Surface")
    osc_dispatch('/reset-surface', 1, ip='192.168.1.255', num_tries=3)
コード例 #2
0
def cue_handler(unused_addr, args):
    """
    Handles the cues from Editor
    """
    logger.info('send cue {}'.format(args))
    osc_dispatch('/cue', args)
    return None
コード例 #3
0
def broadcast_text(AItext):
    """
    send a fixed piece of text from the AI
    add delay into this OSC as second args
    get text somehow 
    """

    osc_dispatch('/textnoquest', AItext, port=port_client_editor)
    logger.info("Updating State")
    broadcast_state(num_tries=3)
    return None
コード例 #4
0
def surfacestop_handler(unused_addr, args):
    """
    blasts stop to surface
    """

    logger.info("Blasting Stop to the Surface")
    osc_dispatch('/stop-surface', 1, ip='192.168.1.255', num_tries=3)
    if len(surface_data) != 0:
        sentiment = mean([d['sentiment'] for d in surface_data])
        energy = mean([d['energy'] for d in surface_data])
        focus = mean([d['focus'] for d in surface_data])
        send_surface_state_to_ai(sentiment, energy, focus)
    osc_dispatch('/stop-surface', 1, ip='192.168.1.255', num_tries=3)
コード例 #5
0
def surfacestart_handler(unused_addr, args):
    """
    blasts start to the surfaces
    """
    logger.info("Blasting Start to the Surfaces")
    osc_dispatch('/start-surface', 1, ip='192.168.1.255', num_tries=3)