mirror of
https://github.com/Zeal-Operating-System/ZealOS.git
synced 2024-12-25 23:10:32 +00:00
input
This commit is contained in:
parent
ed4f56bca5
commit
53ed2bbc2e
1 changed files with 30 additions and 3 deletions
|
@ -95,9 +95,36 @@ U0 EnterPattern(Pattern *pattern) {
|
|||
cell->velocity = KeyGet(&sc);
|
||||
"%d\n", cell->velocity;
|
||||
if (cell->velocity) {
|
||||
Print("Enter instrument for note (0-4): ");
|
||||
cell->instrument = KeyGet(&sc);
|
||||
"%d\n", cell->instrument;
|
||||
Print("Enter instrument for note (1-5): ");
|
||||
switch (KeyGet(&sc)) {
|
||||
case '1':
|
||||
cell->instrument = PULSE1;
|
||||
"PULSE1\n";
|
||||
break;
|
||||
case '2':
|
||||
cell->instrument = PULSE2;
|
||||
"PULSE2\n";
|
||||
break;
|
||||
case '3':
|
||||
cell->instrument = TRIANGLE;
|
||||
"TRIANGLE\n";
|
||||
break;
|
||||
case '4':
|
||||
cell->instrument = NOISE;
|
||||
"NOISE\n";
|
||||
break;
|
||||
case '5':
|
||||
cell->instrument = SAMPLE;
|
||||
"SAMPLE\n";
|
||||
break;
|
||||
default:
|
||||
Print("Invalid choice.\n");
|
||||
cell->instrument = INSTRUMENT_NONE;
|
||||
"SINE\n";
|
||||
break;
|
||||
// return;
|
||||
}
|
||||
|
||||
AudioPlayNote(cell->note, cell->velocity, cell->instrument);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue