note::note(int num){ on = true; first = true; ticks = 0; rel_ticks = 0; note_num = num; frequency = num_to_freq(num); velocity = 100; note_length = 44100; //SETS NOTE LENGTH TO 1 SECOND PENDING MIDI IMPLEMENTATION ndata = new float[synth::get_ksmps()]; }
int char_to_freq(char c, unsigned int *f) { unsigned int n; if (f != NULL && char_to_num(c, &n) == 0) { unsigned int ff; if (num_to_freq(n, &ff) == 0) { *f = ff; return 0; } } return -1; }