16 seq_instant(EV_NOTEON
, CHANNEL
, note
+main_note
, 0);
20 seq_instant(EV_NOTEOFF
, CHANNEL
, note
+main_note
, 0);
23 void bend(int amount
){
24 seq_instant(EV_PITCHBEND
, CHANNEL
, 0, amount
);
30 static void press(input in
){
31 if(in
.button
== ESCAPE_KEY
){
35 console_printf("%s", input_str(in
));
38 case LEFT_BUTTON
: play(0); break;
39 case RIGHT_BUTTON
: play(4); break;
40 case DOWN_BUTTON
: play(2); break;
41 case FIRE_BUTTON
: play(5); break;
42 case JUMP_BUTTON
: play(7); break;
43 case SPECIAL_BUTTON
: play(9); break;
44 case L_BUTTON
: bend_v
= -1; break;
45 case R_BUTTON
: bend_v
= 1; break;
46 case START_BUTTON
: main_note
-=12; break;
47 case SELECT_BUTTON
: main_note
+=12; break;
52 static void release(input in
){
54 case LEFT_BUTTON
: stop(0); break;
55 case RIGHT_BUTTON
: stop(4); break;
56 case DOWN_BUTTON
: stop(2); break;
57 case FIRE_BUTTON
: stop(5); break;
58 case JUMP_BUTTON
: stop(7); break;
59 case SPECIAL_BUTTON
: stop(9); break;
60 case L_BUTTON
: bend_v
= 0; break;
61 case R_BUTTON
: bend_v
= 0; break;
69 bend_amount
+= bend_v
;
70 if(bend_amount
> 0x7f) bend_amount
= 0x7f;
71 if(bend_amount
< 0x00) bend_amount
= 0x00;
82 set_handler(update
, draw
, press
, release
);