<commit_before>//
//  DIYSeq.swift
//  AudioKit
//
//  Created by <NAME> on 5/8/19.
//  Copyright © 2019 AudioKit. All rights reserved.
//

open class DIYSeq {

    open var tracks = [DIYSeqTrack]()
    open var tempo: BPM {
        get { return tracks.first?.tempo ?? 0 }
        set { for track in tracks { track.tempo = newValue } }
    }

    open var length: Double {
        get { return tracks.max(by: { $0.length > $1.length })?.length ?? 0 }
        set { for track in tracks { track.length = newValue } }
    }

    open var loopEnabled: Bool {
        get { return tracks.first?.loopEnabled ?? false }
        set { for track in tracks { track.loopEnabled = newValue } }
    }

    open func play() {
        for track in tracks { track.play() }
    }<commit_msg>Added stop and isPlaying<commit_after>//
//  DIYSeq.swift
//  AudioKit
//
//  Created by <NAME> on 5/8/19.
//  Copyright © 2019 AudioKit. All rights reserved.
//

open class DIYSeq {

    open var tracks = [DIYSeqTrack]()
    open var tempo: BPM {
        get { return tracks.first?.tempo ?? 0 }
        set { for track in tracks { track.tempo = newValue } }
    }

    open var length: Double {
        get { return tracks.max(by: { $0.length > $1.length })?.length ?? 0 }
        set { for track in tracks { track.length = newValue } }
    }

    open var loopEnabled: Bool {
        get { return tracks.first?.loopEnabled ?? false }
        set { for track in tracks { track.loopEnabled = newValue } }
    }


    open var isPlaying: Bool {
        return tracks.first?.isPlaying ?? false
    }

    open func play() {
        for track in tracks { track.play() }
    }

    open func stop() {
        for track in tracks { track.stop() }
    }
{'fraction_non_alphanumeric': 0.12492736780941313, 'fraction_numerical': 0.013945380592678676, 'mean_word_length': 2.0104895104895104, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, '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': '3220083', 'n_tokens_mistral': 565, 'n_tokens_neox': 530, 'n_words': 174}