more work on ui, first functionality

This commit is contained in:
2021-09-05 20:36:44 +02:00
parent c9a428c4c2
commit dda58872ad
4 changed files with 278 additions and 23 deletions

View File

@@ -8,7 +8,7 @@ toneGen::toneGen(const int note_length) {
this->note_length = note_length;
this->current_pos = 0;
this->note = 32;
this->note = 34;
this->instrument = CHIPTUNE_INSTRUMENT_NOISE;
this->volume = 15;
this->effect = CHIPTUNE_EFFECT_FADEOUT;
@@ -16,7 +16,7 @@ toneGen::toneGen(const int note_length) {
this->current_volume = this->nominal_volume = 1.0f;
for (int i=0; i<64; ++i) {
const float NOTE_FREQ = 440 * pow(1.059463094359, i-32);
const float NOTE_FREQ = 440 * pow(1.059463094359, i-34);
notes[i] = 65536 / int(SAMPLES_PER_SECOND/NOTE_FREQ);
}