11 seq_instant(EV_NOTEON
, 0, note
, 0);
15 seq_instant(EV_NOTEOFF
, 0, note
, 0);
18 void bend(int amount
){
19 seq_instant(EV_PITCHBEND
, 0, 0, amount
);
22 int bend_amount
= 8192;
25 static void press(input in
){
26 if(in
.button
== ESCAPE_KEY
){
30 console_printf("%s", input_str(in
));
33 case LEFT_BUTTON
: play(0); break;
34 case RIGHT_BUTTON
: play(4); break;
35 case DOWN_BUTTON
: play(2); break;
36 case FIRE_BUTTON
: play(5); break;
37 case JUMP_BUTTON
: play(7); break;
38 case SPECIAL_BUTTON
: play(9); break;
39 case L_BUTTON
: bend_v
= -1; break;
40 case R_BUTTON
: bend_v
= 1; break;
45 static void release(input in
){
47 case LEFT_BUTTON
: stop(0); break;
48 case RIGHT_BUTTON
: stop(4); break;
49 case DOWN_BUTTON
: stop(2); break;
50 case FIRE_BUTTON
: stop(5); break;
51 case JUMP_BUTTON
: stop(7); break;
52 case SPECIAL_BUTTON
: stop(9); break;
53 case L_BUTTON
: bend_v
= 0; break;
54 case R_BUTTON
: bend_v
= 0; break;
62 bend_amount
+= bend_v
;
63 if(bend_amount
> 0x7f) bend_amount
= 0x7f;
64 if(bend_amount
< 0x00) bend_amount
= 0x00;
75 set_handler(update
, draw
, press
, release
);