'Returns the input vector for the given position in the chord progression.
Indices [0, 36]:
[0]: Whether or not this chord is "no chord".
[1, 12]: A one-hot encoding of the chord root pitch class.
[13, 24]: Whether or not each pitch class is present in the chord.
[25, 36]: A one-hot encoding of the chord bass pitch class.
Args:
events: A magenta.music.ChordProgression object.
position: An integer event position in the chord progression.
Returns:
An input vector, an self.input_size length list of floats.'

def events_to_input(self, events, position):

    chord = events[position]
    input_ = ([0.0] * self.input_size)
    if (chord == NO_CHORD):
        input_[0] = 1.0
        return input_
    root = chord_symbols_lib.chord_symbol_root(chord)
    input_[(1 + root)] = 1.0
    pitches = chord_symbols_lib.chord_symbol_pitches(chord)
    for pitch in pitches:
        input_[((1 + NOTES_PER_OCTAVE) + pitch)] = 1.0
    bass = chord_symbols_lib.chord_symbol_bass(chord)
    input_[((1 + (2 * NOTES_PER_OCTAVE)) + bass)] = 1.0
    return input_
