#Copyright 2017 The Snail Authors. All Rights Reserved.
#
#This Source Code Form is subject to the terms of the Mozilla Public
#License, v. 2.0. If a copy of the MPL was not distributed with this
#file, You can obtain one at http://mozilla.org/MPL/2.0/.
#Exhibit B is not attached; this software is compatible with the
#licenses expressed under Section 1.12 of the MPL v2.
# ==================================================================

import logging as log

from .StreamProcessor import StreamProcessor


class KeyChangerSP(StreamProcessor):
    """ KeyChangerSP is a StreamProcessor which transposes of a given key_offset 
	each note of a stream"""

    key_offset = 0

    def __init__(self, key_offset):
        self.key_offset = key_offset

    def process(self, input_stream):
        return input_stream.transpose(self.key_offset)
