Skip to content

Commit 0e171a6

Browse files
committed
Merge branch 'develop'
2 parents 6393a91 + c332d7a commit 0e171a6

File tree

16 files changed

+256
-41
lines changed

16 files changed

+256
-41
lines changed

.github/CODEOWNERS

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# AudioKit Code Owners File
2+
# https://help.github.com/en/github/creating-cloning-and-archiving-repositories/about-code-owners
3+
4+
# Primary Owners
5+
* @aure @wtholliday @eljeff

.github/CODE_OF_CONDUCT.md

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# Contributor Covenant Code of Conduct
2+
3+
## Our Pledge
4+
5+
In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.
6+
7+
## Our Standards
8+
9+
Examples of behavior that contributes to creating a positive environment include:
10+
11+
* Using welcoming and inclusive language
12+
* Being respectful of differing viewpoints and experiences
13+
* Gracefully accepting constructive criticism
14+
* Focusing on what is best for the community
15+
* Showing empathy towards other community members
16+
17+
Examples of unacceptable behavior by participants include:
18+
19+
* The use of sexualized language or imagery and unwelcome sexual attention or advances
20+
* Trolling, insulting/derogatory comments, and personal or political attacks
21+
* Public or private harassment
22+
* Publishing others' private information, such as a physical or electronic address, without explicit permission
23+
* Other conduct which could reasonably be considered inappropriate in a professional setting
24+
25+
## Our Responsibilities
26+
27+
Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.
28+
29+
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.
30+
31+
## Scope
32+
33+
This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.
34+
35+
## Enforcement
36+
37+
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at [email protected]. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
38+
39+
Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.
40+
41+
## Attribution
42+
43+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version]
44+
45+
[homepage]: http://contributor-covenant.org
46+
[version]: http://contributor-covenant.org/version/1/4/

.github/FUNDING.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# These are supported funding model platforms
2+
3+
github: [aure, eljeff, megastep]
4+
open_collective: audiokit

.github/ISSUE_TEMPLATE.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
If your issue is implementing AudioKit in your own code, post your problem to [StackOverflow](https://stackoverflow.com/search?q=AudioKit) with the #AudioKit hashtag.
2+
3+
If you can make the issue happen on [AudioKit 5's Cookbook app](https://github.com/AudioKit/Cookbook/) then you can create an issue directly on that repository as well.
4+
5+
GitHub Issues should only be used for confirmed problems with AudioKit and
6+
well-defined feature requests.
7+
8+
Sponsors will get more attention: https://github.com/sponsors/aure
9+
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
**Confirm you should be adding the bug here**
11+
If your issue is implementing AudioKit in your own code, post your problem to [StackOverflow](https://stackoverflow.com/search?q=AudioKit) with the #AudioKit hashtag.
12+
13+
If you can make the issue happen on [AudioKit 5's Cookbook app](https://github.com/AudioKit/Cookbook/) then you can create an issue directly on that repository as well.
14+
15+
GitHub Issues should only be used for confirmed problems with AudioKit and
16+
well-defined feature requests.
17+
18+
Sponsors will get more attention: https://github.com/sponsors/aure
19+
20+
21+
**Describe the bug**
22+
A clear and concise description of what the bug is.
23+
24+
**To Reproduce**
25+
Steps to reproduce the behavior:
26+
1. Go to '...'
27+
2. Click on '....'
28+
3. See / hear error
29+
30+
**Expected behavior**
31+
A clear and concise description of what you expected to happen.
32+
33+
**Screenshots**
34+
If applicable, add screenshots to help explain your problem.
35+
36+
**Details (please complete the following information):**
37+
- Type: [e.g. iPhone6, iPad, Mac]
38+
- OS: [e.g. iOS13.1]
39+
- AudioKit Version [e.g. 5.0]
40+
41+
**Additional context**
42+
Add any other context about the problem here.
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
**Is your feature request related to a problem? Please describe.**
11+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
12+
13+
**Describe the solution you'd like**
14+
A clear and concise description of what you want to happen.
15+
16+
**Describe alternatives you've considered**
17+
A clear and concise description of any alternative solutions or features you've considered.
18+
19+
**Assign yourself to this task**
20+
AudioKit maintainers are not here to do your work for you, so if you can assign yourself to the feature request, that would be ideal.
21+
22+
**Additional context**
23+
Add any other context or screenshots about the feature request here.

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
*REPLACE ALL OF THIS TEXT WITH A DESCRIPTION OF YOUR CODE CHANGES*
2+
3+
Try to make sure your changes conform to the [Swift API Design Guidelines](https://swift.org/documentation/api-design-guidelines/). If you have 40 minutes you'd like to have well-spent, watch [Modern Swift API Design](https://developer.apple.com/videos/play/wwdc2019/415/) from WWDC 2019.
4+
5+
Ready to send us a pull request? Please make sure your request is based on the a `develop` branch of the repository since `main` should only hold stable releases.

.github/workflows/build.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# GitHub Actions for AudioKitEX: includes builds, tests and releases
2+
name: CI
3+
4+
on: [push, pull_request]
5+
env:
6+
XCODE_VER: 13.1
7+
8+
jobs:
9+
test:
10+
strategy:
11+
matrix:
12+
xcode_version: ['13.1']
13+
runs-on: macos-11
14+
env:
15+
DEVELOPER_DIR: /Applications/Xcode_${{ matrix.xcode_version }}.app
16+
steps:
17+
- name: Check out AudioKitEX
18+
uses: actions/checkout@v2
19+
- name: Build AudioKitEX
20+
run: |
21+
set -euo pipefail
22+
swift package clean
23+
swift build --sanitize="address"
24+
- name: Run Tests (ASAN)
25+
run: |
26+
set -euo pipefail
27+
xcodebuild -destination 'platform=OS X,arch=x86_64' -scheme AudioKitEX -enableAddressSanitizer YES test
28+
29+
# Generate Wiki docs on release
30+
docs:
31+
needs: test
32+
if: startsWith(github.ref, 'refs/tags/')
33+
runs-on: ubuntu-latest
34+
steps:
35+
- name: Check out AudioKitEX
36+
uses: actions/checkout@v2
37+
- name: Generate Documentation
38+
uses: SwiftDocOrg/swift-doc@master
39+
with:
40+
inputs: "Sources"
41+
module-name: AudioKitEX
42+
output: "Documentation"
43+
- name: Upload Documentation to Wiki
44+
uses: SwiftDocOrg/github-wiki-publish-action@v1
45+
with:
46+
path: "Documentation"
47+
env:
48+
GH_PERSONAL_ACCESS_TOKEN: ${{ secrets.GH_PERSONAL_ACCESS_TOKEN }}
49+

Sources/AudioKitEX/Sequencing/Sequence.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ public struct NoteEventSequence: Equatable {
140140
allEvents.append(contentsOf: events)
141141
/// Get all SequenceEvents from Notes
142142
var noteEvents: [SequenceEvent] = []
143-
notes.forEach { note in
143+
for note in notes {
144144
noteEvents.append(note.noteOn)
145145
noteEvents.append(note.noteOff)
146146
}

Sources/AudioKitEX/Sequencing/Sequencer.swift

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -117,14 +117,15 @@ open class Sequencer {
117117
length = tracks.max(by: { $0.length > $1.length })?.length ?? 0
118118
}
119119

120-
/// Add a MIDI note to the track
120+
/// Add a MIDI noteOn and noteOff to the track
121121
/// - Parameters:
122122
/// - noteNumber: MIDI Note number to add
123123
/// - velocity: Velocity of the note
124124
/// - channel: Channel to place the note on
125125
/// - position: Location in beats of the new note
126126
/// - duration: Duration in beats of the new note
127127
/// - trackIndex: Which track to add the note to
128+
@available(*, deprecated, message: "Access track directly for editing - sequencer.tracks[i].add(...)")
128129
public func add(noteNumber: MIDINoteNumber,
129130
velocity: MIDIVelocity = 127,
130131
channel: MIDIChannel = 0,
@@ -147,6 +148,7 @@ open class Sequencer {
147148
/// - event: Event to add
148149
/// - position: Location in time in beats to add the event at
149150
/// - trackIndex: Which track to add the event
151+
@available(*, deprecated, message: "Access track directly for editing - sequencer.tracks[i].add(...)")
150152
public func add(event: MIDIEvent, position: Double, trackIndex: Int = 0) {
151153
guard tracks.count > trackIndex, trackIndex >= 0 else {
152154
Log("Track index \(trackIndex) out of range (sequencer has \(tracks.count) tracks)")
@@ -157,15 +159,13 @@ open class Sequencer {
157159

158160
/// Remove all notes
159161
public func clear() {
160-
for track in tracks {
161-
track.clear()
162-
}
162+
for track in tracks { track.clear() }
163163
}
164164

165165
/// Move to a new time in the playback
166166
/// - Parameter position: Time to jump to, in beats
167167
public func seek(to position: Double) {
168-
tracks.forEach { $0.seek(to: position) }
168+
for track in tracks { track.seek(to: position) }
169169
}
170170

171171
/// Equivalent to stop
@@ -183,7 +183,7 @@ open class Sequencer {
183183
/// Add track associated with a node
184184
/// - Parameter node: Node to create the track for
185185
/// - Returns: Track associated with the given node
186-
public func addTrack(for node: Node) -> SequencerTrack {
186+
@discardableResult public func addTrack(for node: Node) -> SequencerTrack {
187187
let track = SequencerTrack(targetNode: node)
188188
tracks.append(track)
189189
return track

0 commit comments

Comments
 (0)