I found an undocumented isConnectedTo method, which might be useful

chuck_lang.h:

// ugen API
//-----------------------------------------------------------------------------
CK_DLL_CTOR( ugen_ctor );
CK_DLL_DTOR( ugen_dtor );
CK_DLL_MFUN( ugen_op );
CK_DLL_MFUN( ugen_cget_op );
CK_DLL_MFUN( ugen_last );
CK_DLL_MFUN( ugen_cget_last );
CK_DLL_MFUN( ugen_next );
CK_DLL_MFUN( ugen_cget_next );
CK_DLL_MFUN( ugen_gain );
CK_DLL_MFUN( ugen_cget_gain );
CK_DLL_MFUN( ugen_numChannels );
CK_DLL_MFUN( ugen_cget_numChannels );
CK_DLL_MFUN( ugen_chan );
CK_DLL_MFUN( ugen_connected );

chuck_lang.cpp:

    // add isConnectedTo
    func = make_new_mfun( "int", "isConnectedTo", ugen_connected );
    func->add_arg( "UGen", "right" );
    func->doc = "Return true if this ugen's output is connected to the input of the argument. Return false otherwise. ";
    if( !type_engine_import_mfun( env, func ) ) goto error;


and a get_num_src() method which appears not to be exposed via the ChucK API

chuck_ugen.h:

public: // src
    t_CKBOOL add( Chuck_UGen * src, t_CKBOOL isUpChuck );
    t_CKBOOL remove( Chuck_UGen * src );
    t_CKVOID remove_all( );
    t_CKBOOL set_max_src( t_CKUINT num );
    t_CKUINT get_num_src( );
    t_CKBOOL is_connected_from( Chuck_UGen * src );
    t_CKUINT disconnect( t_CKBOOL recursive );
    t_CKUINT system_tick( t_CKTIME now );
    t_CKUINT system_tick_v( t_CKTIME now, t_CKUINT numFrames );
    t_CKBOOL alloc_v( t_CKUINT size );

Is that what I would need?

   michael


On Mon, Dec 7, 2015 at 11:55 AM, Michael Heuer <heuermh@gmail.com> wrote:
Is it possible to query whether a UGen has an input or not?  If anything has been chucked to it, in other words.

Thanks,

   michael