X-Git-Url: https://scm.cri.minesparis.psl.eu/git/minwii.git/blobdiff_plain/346a9b8e1fcfe30629f0d1ee4675e9e8f89890cf..4c4732c6ed8cb0aaa70fb2d4c6e5a958868c5349:/src/instruments/Instrument.py diff --git a/src/instruments/Instrument.py b/src/instruments/Instrument.py deleted file mode 100755 index fb54d3a..0000000 --- a/src/instruments/Instrument.py +++ /dev/null @@ -1,46 +0,0 @@ -''' -Created on 15 juil. 2009 - -@author: Samuel Benveniste -''' - -class Instrument: - ''' - Object representing an instrument. - - notes: - The MIDI numbers of the notes played by this instrument (usually a scale) - channel: - The channel corresponding to the instrument in the synthesizer - image: - The image for the instrument - ''' - - def __init__(self, notes, channel, image, octave = 0): - ''' - Constructor - - notes: - The MIDI numbers of the notes played by this instrument (usually a scale) - channel: - The channel corresponding to the instrument in the synthesizer - image: - The image for the instrument - ''' - - self.notes = [loop+12*octave for loop in notes] - self.octave = octave - self.channel = channel - self.image = image - - def getNote(self,noteNumber): - if noteNumber == None : - return(None) - else : - return(self.notes[noteNumber]) - - def getNoteByNoteNumber(self,baseMidiNoteNumber): - if baseMidiNoteNumber == None: - return(None) - else : - return(baseMidiNoteNumber+self.octave*12) \ No newline at end of file