<commit_before>//
//  main.swift
//  AudioKit
//
//  Created by <NAME> and <NAME> on 11/30/14.
//  Copyright (c) 2014 <NAME>. All rights reserved.
//

import Foundation

let testDuration: Float = 10.0

class Instrument : AKInstrument {

    override init() {
        super.init()

        let note = Note()
        let marimba = AKMarimba()
        marimba.frequency = note.frequency
        setAudioOutput(marimba)

        enableParameterLog(
            "Frequency = ",
            parameter: marimba.frequency,
            timeInterval:2
        )
    }
}

class Note: AKNote {
    var frequency = AKNoteProperty(value: 220, minimum: 110, maximum: 880)
    override init() {
        super.init()
        addProperty(frequency)
    }
    convenience init(frequency: Float) {
        self.init()
        self.frequency.setValue(frequency)
    }
}

AKOrchestra.testForDuration(testDuration)

let instrument = Instrument()
AKOrchestra.addInstrument(instrument)

let note1 = Note(frequency: 440)
note1.duration.setValue(2.0)
let note2 = Note(frequency: 550)
note2.duration.setValue(2.0)
let note3 = Note(frequency: 660)
note3.duration.setValue(2.0)

let phrase = AKPhrase()
phrase.addNote(note1, atTime:0.5)
phrase.addNote(note2, atTime:1.0)<commit_msg>Using .value= instead of setValue<commit_after>//
//  main.swift
//  AudioKit
//
//  Created by <NAME> and <NAME> on 11/30/14.
//  Copyright (c) 2014 <NAME>. All rights reserved.
//

import Foundation

let testDuration: Float = 10.0

class Instrument : AKInstrument {

    override init() {
        super.init()

        let note = Note()
        let marimba = AKMarimba()
        marimba.frequency = note.frequency
        setAudioOutput(marimba)

        enableParameterLog(
            "Frequency = ",
            parameter: marimba.frequency,
            timeInterval:2
        )
    }
}

class Note: AKNote {
    var frequency = AKNoteProperty(value: 220, minimum: 110, maximum: 880)
    override init() {
        super.init()
        addProperty(frequency)
    }
    convenience init(frequency: Float) {
        self.init()
        self.frequency.value = frequency
    }
}

AKOrchestra.testForDuration(testDuration)

let instrument = Instrument()
AKOrchestra.addInstrument(instrument)

let note1 = Note(frequency: 440)
note1.duration.value = 2.0
let note2 = Note(frequency: 550)
note2.duration.value = 2.0
let note3 = Note(frequency: 660)
note3.duration.value = 2.0

let phrase = AKPhrase()
phrase.addNote(note1, atTime:0.5)
phrase.addNote(note2, atTime:1.0)
{'fraction_non_alphanumeric': 0.11685214626391097, 'fraction_numerical': 0.0397456279809221, 'mean_word_length': 2.734421364985163, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4091827', 'n_tokens_mistral': 879, 'n_tokens_neox': 806, 'n_words': 187}