place = 0.0;
}
ICR3 = (int)(((double)F_CPU) / (frequencies[voice_place] * CPU_PRESCALER)); // Set max to the period
- OCR3A = (int)((((double)F_CPU) /(frequencies[voice_place] * CPU_PRESCALER)) * note_timbre); // Set compare to half the period
+ OCR3A = (int)((((double)F_CPU) / (frequencies[voice_place] * CPU_PRESCALER)) * note_timbre); // Set compare to half the period
//OCR3A = (int)(((double)F_CPU) / (frequencies[voice_place] * CPU_PRESCALER)) >> 1 * duty_place; // Set compare to half the period
place++;
// if (duty_counter > (frequencies[voice_place] / 500)) {
// Cancel note if a note is playing
if (note)
stop_all_notes();
+ notes = true;
notes_pointer = np;
notes_count = n_count;
TCCR3A |= _BV(COM3A1);
#endif
- notes = true;
}
}
// Cancel notes if notes are playing
if (notes)
stop_all_notes();
+ note = true;
#ifdef PWM_AUDIO
freq = freq / SAMPLE_RATE;
#endif
TCCR3A |= _BV(COM3A1);
#endif
- note = true;
}
}