     @IBAction func recordEnablePressed(_ sender: UIButton) {
         if let recorder = recorder {
             if !recorder.recordingEnabled {
-                // recording was not enabled.
-                print("JAMVC: Record pressed; enabled.")
-                recEnableButton.tintColor = UIColor.red
-                recorder.recordingEnabled = true
+                setRecordingEnabled()
             } else {
-                print("JAMVC: Record pressed; disabled.")
-                recEnableButton.tintColor = UIColor.red.darkerColor
-                recorder.recordingEnabled = false
+                setRecordingDisabled()
             }
         }
     }

                playButton.isEnabled = false
                roboplayButton.isEnabled = false
                jamButton.isEnabled = false
                // and recording is disabled.
                recEnableButton.tintColor = UIColor.red.darkerColor
            }
        }
        removeRoboJam()

            }
            chirpViewContainer.addSubview(recorder.recordingView)
            savePerformanceButton.isEnabled = false // no saving a blank recording
            setRecordingDisabled() // set recording button to be disabled.
        }
    }

    // MARK: - UI Interaction Functions
    
    func setRecordingEnabled() {
        // recording was not enabled.
        print("JAMVC: Recording enabled.")
        recEnableButton.tintColor = UIColor.red
        recorder?.recordingEnabled = true
    }
    
    func setRecordingDisabled() {
        print("JAMVC: Recording disabled.")
        recEnableButton.tintColor = UIColor.red.darkerColor
        recorder?.recordingEnabled = false
    }
    
    /// IBAction for the rewind button
    @IBAction func rewindScreen(_ sender: UIButton) {
