wip animation for beat and pressed jog
This commit is contained in:
parent
a510963a3c
commit
e565b86c19
3 changed files with 150 additions and 9 deletions
10
node_2d.gd
10
node_2d.gd
|
|
@ -54,13 +54,21 @@ func _unhandled_input(input_event):
|
|||
if input_event is InputEventMIDI:
|
||||
if debug > 0:
|
||||
_print_midi_info(input_event)
|
||||
if input_event.channel == beat_channel and ((input_event.pitch == beat_note and input_event.velocity == 127) or input_event.controller_number == 10):
|
||||
if !midi_beat and input_event.channel == beat_channel and ((input_event.pitch == beat_note and input_event.velocity == 127) or input_event.controller_number == 10):
|
||||
if !midi_beat:
|
||||
$beat/AnimationPlayer.play("beat")
|
||||
midi_beat = true
|
||||
if input_event.channel == beat_channel and ((input_event.pitch == beat_note and input_event.velocity == 0) or input_event.controller_number == 9):
|
||||
if midi_beat:
|
||||
$beat/AnimationPlayer.play_backwards("beat")
|
||||
midi_beat = false
|
||||
if input_event.channel == jog_channel and ((input_event.pitch == jog_note and input_event.velocity == 127) or input_event.controller_number == spin_note_1):
|
||||
if !midi_jog:
|
||||
$jog/AnimationPlayer.play("jog")
|
||||
midi_jog = true
|
||||
if input_event.channel == jog_channel and ((input_event.pitch == jog_note and input_event.velocity == 0) or input_event.controller_number == spin_note_2):
|
||||
if midi_jog:
|
||||
$jog/AnimationPlayer.play_backwards("jog")
|
||||
midi_jog = false
|
||||
if (input_event.channel == spin_channel_1 or input_event.channel == spin_channel_2) and input_event.controller_value == left:
|
||||
midi_turnleft = true
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue