# Path: camp/tracker/instrument.py
# class Instrument(object):
# 
#     def __init__(self, channel=None, notation='roman'):
# 
#         self.channel = channel
#         self.notation = notation
# 
#         if type(self.channel) != int:
#             raise Exception("channel must be set, as an integer, got: %s" % self.channel)
#         if notation not in VALID_NOTATIONS:
#             raise Exception("invalid notation type: %s" % notation)
# 
#     def to_data(self):
#         return dict(cls="camp.band.tracker.instrument.Instrument", data=dict(channel=self.channel, notation=self.notation))


from camp.tracker.instrument import Instrument
http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
"""


class Instruments(object):

    __slots__ = [ "_instruments", "_factory" ]

    def __init__(self, song, **instruments):

        self._factory = song
        self._instruments = dict()

        for (instrument_name, instrument) in instruments.items():

            print("CREATING INSTRUMENT: %s" % instrument)

            instrument._factory = song
            
            print(instrument.channel)
            if instrument.channel is None:
                raise Exception("DEBUG: channel is None")



# Path: camp/tracker/instrument.py
# class Instrument(object):
# 
#     def __init__(self, channel=None, notation='roman'):
# 
#         self.channel = channel
#         self.notation = notation
# 
#         if type(self.channel) != int:
#             raise Exception("channel must be set, as an integer, got: %s" % self.channel)
#         if notation not in VALID_NOTATIONS:
#             raise Exception("invalid notation type: %s" % notation)
# 
#     def to_data(self):
#         return dict(cls="camp.band.tracker.instrument.Instrument", data=dict(channel=self.channel, notation=self.notation))


# Path: camp/tracker/instruments.py
from camp.tracker.instrument import Instrument

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
"""


class Instruments(object):

    __slots__ = [ "_instruments", "_factory" ]

    def __init__(self, song, **instruments):

        self._factory = song
        self._instruments = dict()

        for (instrument_name, instrument) in instruments.items():

            print("CREATING INSTRUMENT: %s" % instrument)

            instrument._factory = song
            
            print(instrument.channel)
            if instrument.channel is None:
                raise Exception("DEBUG: channel is None")



            if type(instrument) != Instrument: