示例#1
0
bool Event_channel_autowah_speed_process(
        Channel* ch,
        Device_states* dstates,
        const Value* value)
{
    assert(ch != NULL);
    assert(dstates != NULL);
    (void)dstates;
    assert(value != NULL);
    assert(value->type == VALUE_TYPE_FLOAT);

    ch->autowah_speed = value->value.float_type;
    LFO_set_speed(&ch->autowah, value->value.float_type);

    for (int i = 0; i < KQT_GENERATORS_MAX; ++i)
    {
        Event_check_voice(ch, i);
        Voice_state* vs = ch->fg[i]->state;
        LFO_set_speed(&vs->autowah, value->value.float_type);

        if (ch->autowah_depth > 0)
            LFO_set_depth(&vs->autowah, ch->autowah_depth);

        LFO_turn_on(&vs->autowah);
    }

    return true;
}
示例#2
0
void Linear_controls_osc_speed_value(Linear_controls* lc, double speed)
{
    rassert(lc != NULL);
    rassert(speed >= 0);

    LFO_set_speed(&lc->lfo, speed);

    //if (lc->osc_depth > 0)
    //    LFO_set_depth(&lc->lfo, lc->osc_depth);

    LFO_turn_on(&lc->lfo);

    return;
}