Beispiel #1
0
void radio_output(t_radio *x)
{
    int i;
    t_atom av[256];
    if(x->f_mode)
    {
        for(i = 0; i < x->f_nitems; i++)
            atom_setfloat(av+i, (float)x->f_items[i]);
        outlet_list(x->f_out, &s_list, x->f_nitems, av);
        if(ebox_getsender((t_ebox *) x))
            pd_list(ebox_getsender((t_ebox *) x), &s_list, x->f_nitems, av);
    }
    else
    {
        for(i = 0; i < x->f_nitems; i++)
        {
            if(x->f_items[i] != 0)
            {
                outlet_float(x->f_out, (float)i);
                if(ebox_getsender((t_ebox *) x))
                    pd_float(ebox_getsender((t_ebox *) x), (float)i);
            }
        }
    }
}
Beispiel #2
0
void toggle_output(t_toggle *x)
{
    ebox_invalidate_layer((t_ebox *)x, gensym("background_layer"));
    ebox_redraw((t_ebox *)x);
    outlet_float((t_outlet*)x->f_out, (float)x->f_active);
    if(ebox_getsender((t_ebox *) x))
        pd_float(ebox_getsender((t_ebox *) x), (float)x->f_active);
}
Beispiel #3
0
void bang_mousedown(t_bang *x, t_object *patcherview, t_pt pt, long modifiers)
{
    x->f_active = 1;
    ebox_invalidate_layer((t_ebox *)x, gensym("background_layer"));
    ebox_redraw((t_ebox *)x);
    outlet_bang(x->f_out);
    if(ebox_getsender((t_ebox *) x))
        pd_bang(ebox_getsender((t_ebox *) x));
}
Beispiel #4
0
void bang_output(t_bang *x, t_symbol* s, long argc, t_atom* argv)
{
    x->f_active = 1;
    ebox_invalidate_layer((t_ebox *)x, gensym("background_layer"));
    ebox_redraw((t_ebox *)x);
    outlet_bang(x->f_out);
    if(ebox_getsender((t_ebox *) x))
        pd_bang(ebox_getsender((t_ebox *) x));
    
    clock_delay(x->f_clock, 100);
}
Beispiel #5
0
void matrixctrl_output(t_matrixctrl *x, int i, int j)
{
    t_atom av[3];
    if(i < x->f_size.x && j < x->f_size.y)
    {
        atom_setfloat(av, i);
        atom_setfloat(av+1, j);
        atom_setfloat(av+2,  x->f_values[j * (long)x->f_size.x + i]);
    }
    outlet_list(x->f_out_cell, &s_list, 3, av);
    if(ebox_getsender((t_ebox *) x))
        pd_list(ebox_getsender((t_ebox *) x), &s_list, 3, av);}
Beispiel #6
0
void hoa_space_output(t_hoa_space *x)
{
    for(int i = 0; i < x->f_number_of_microphones; i++)
        atom_setfloat(x->f_tempory_values+i, x->f_microphonesValues[i]);
    
    outlet_list(x->f_out, 0L, x->f_number_of_microphones, x->f_tempory_values);
    ebox_invalidate_layer((t_ebox *)x, gensym("harmonics_layer"));
    ebox_invalidate_layer((t_ebox *)x, gensym("microphones_layer"));
    ebox_invalidate_layer((t_ebox *)x, gensym("center_layer"));
    ebox_redraw((t_ebox *)x);
    if(ebox_getsender((t_ebox *) x))
        pd_list(ebox_getsender((t_ebox *) x), &s_list, x->f_number_of_microphones, x->f_tempory_values);
}
Beispiel #7
0
void plane_output(t_plane *x)
{
    t_atom argv[2];
    if(ebox_isdrawable((t_ebox *)x))
    {
        outlet_float(x->f_out_x, x->f_position.x);
        outlet_float(x->f_out_y, x->f_position.y);
        if(ebox_getsender((t_ebox *) x))
        {
            atom_setfloat(argv, x->f_position.x);
            atom_setfloat(argv+1, x->f_position.y);
            pd_list(ebox_getsender((t_ebox *) x), &s_list, 2, argv);
        }
    }
}
Beispiel #8
0
static void incdec_output(t_incdec *x)
{
    t_pd* send = ebox_getsender((t_ebox *) x);
    outlet_float(x->f_out, (float)x->f_value);
    if(send)
    {
        pd_float(send, (float)x->f_value);
    }
}
Beispiel #9
0
static void knob_output(t_knob *x)
{
    t_pd* send = ebox_getsender((t_ebox *) x);
    const float val = ebox_parameter_getvalue((t_ebox *)x, 1);
    outlet_float(x->f_outlet, val);
    if(send)
    {
        pd_float(send, val);
    }
}
Beispiel #10
0
static void tab_output(t_tab *x)
{
    t_pd* send = ebox_getsender((t_ebox *) x);
    const float index = ebox_parameter_getvalue((t_ebox *)x, 1);
    outlet_float(x->f_out_index, index);
    outlet_symbol(x->f_out_item, x->f_items[(int)index]);
    if(send)
    {
        pd_float(send, index);
    }
}
Beispiel #11
0
static void plane_output(t_plane *x)
{
    t_atom argv[2];
    t_pd* send = ebox_getsender((t_ebox *) x);
    const float xval = ebox_parameter_getvalue((t_ebox *)x, 1);
    const float yval = ebox_parameter_getvalue((t_ebox *)x, 2);
    atom_setfloat(argv, xval);
    atom_setfloat(argv+1, yval);
    outlet_list(x->f_out_x, &s_list, 2, argv);
    outlet_float(x->f_out_y, yval);
    if(send)
    {
        pd_list(send, &s_list, 2, argv);
    }
}
void number_tilde_output(t_number_tilde *x)
{
    outlet_float((t_outlet*)x->f_peaks_outlet, (float)x->f_peak_value);
    if(ebox_getsender((t_ebox *) x))
        pd_float(ebox_getsender((t_ebox *) x), (float)x->f_peak_value);
}
Beispiel #13
0
void gain_output(t_gain *x)
{
    outlet_float((t_outlet*)x->f_out, (float)x->f_value);
    if(ebox_getsender((t_ebox *) x))
        pd_float(ebox_getsender((t_ebox *) x), (float)x->f_value);
}
Beispiel #14
0
void meter_output(t_meter *x)
{
    outlet_float((t_outlet*)x->f_peaks_outlet, (float)x->f_peak_value);
    if(ebox_getsender((t_ebox *) x))
        pd_float(ebox_getsender((t_ebox *) x), (float)x->f_peak_value);
}