     func setToneSequence(sequence:Array<Tone>) {
         self.toneSequence = sequence
 
+        self.renderVolumes()
         self.renderFrequencies()
     }
 

    func lengthOfSections(totalLength:UInt32, sequence: Array<UInt32>) -> Array<UInt32> {
        var sectionLength = Array<UInt32>()
        var sectionCount:UInt32 = 0

        for (var i = Int(0); i < sequence.count; i++) {
            sectionCount += sequence[i]

    func setVolumeSequence(sequence:Array<Float>) {
        self.volumeSequence = sequence
        self.renderVolumes()
        self.renderFrequencies()
    }

    func lengthOfSections(totalLength:UInt32, sequence: Array<Tone>) -> Array<UInt32> {
