| Class | GameListener |
| In: |
lib/bangkok/gamelistener.rb
|
| Parent: | Object |
The pieces and board call methods on an instance of GameListener, which turns those events into MIDI events.
| PIECE_NAMES | = | { :P => "Pawn", :R => "Rook", :N => "Night", :B => "Bishop", :Q => "Queen", :K => "King" | ||
| RANK_TO_NOTE | = | {} | Build notes to play for ranks | |
| PIECE_MIDI_INFO | = | {} |
| seq | [R] |
—
End of listener interface
++
Generate two notes, one at the current start time that is only a 32nd note long. The next follows immediately, and is for the to square. Its length is the remaining time.
Generates a single pan event. move_to calls this multiple times, passing in new delta and value values.
Generates a single volume event. move_to calls this multiple times, passing in new delta and value values.
Returns a value between range_min and range_max inclusive that is proportional to value’s place between value_min and value_max. The returned value may be floating point. If range_min and range_max or value_min and value_max are out of order, they are swapped.
Move piece from one space to another. Generate two notes and sets CC_PORTAMENTO_TIME so there is a glide from the first note to the second. Also output multiple volume and pan values, moving smoothly from the original to the new value.