sigc::mem_fun(*this, &AutomationController::run_note_select_dialog)));
}
if (is_low) {
- for (double beats = 1.0; beats <= 16; ++beats) {
+ for (int beats = 1; beats <= 16; ++beats) {
items.push_back(MenuElem(string_compose(_("Set to %1 beat(s)"), (int)beats),
sigc::bind(sigc::mem_fun(*this, &AutomationController::set_freq_beats),
- beats)));
+ (double)beats)));
}
}
menu->popup(1, ev->time);
const double b = log (f_max / f_min) / g_p2;
const double a = f_min / (b * samplerate);
#endif
+ const uint32_t g_p2i = rint(g_p2);
_wavetable = (Sample*) malloc (_gen_period * sizeof(Sample));
- for (uint32_t i = 0 ; i < g_p2; ++i) {
+ for (uint32_t i = 0 ; i < g_p2i; ++i) {
#ifdef LINEAR_SWEEP
const double phase = i * (a + b * i);
#else
#endif
_wavetable[i] = (float)sin (2. * M_PI * (phase - floor (phase)));
}
- for (uint32_t i = g_p2; i < _gen_period; ++i) {
+ for (uint32_t i = g_p2i; i < _gen_period; ++i) {
const uint32_t j = _gen_period - i;
#ifdef LINEAR_SWEEP
const double phase = j * (a + b * j);