Skip to content

Commit 1a6eee7

Browse files
committed
Change indentation to 4 spaces
1 parent 16fa904 commit 1a6eee7

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

Cookbook/CookbookCommon/Sources/CookbookCommon/Recipes/MiniApps/Arpeggiator.swift

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -47,19 +47,19 @@ class ArpeggiatorConductor: ObservableObject, HasAudioEngine {
4747
}
4848

4949
if !isArpDescending {
50-
if heldNotes.max() != currentNote {
51-
currentNote = heldNotes.filter { $0 > currentNote }.min() ?? heldNotes.min()!
52-
} else {
53-
isArpDescending = true
54-
currentNote = heldNotes.filter { $0 < currentNote }.max() ?? heldNotes.max()!
55-
}
50+
if heldNotes.max() != currentNote {
51+
currentNote = heldNotes.filter { $0 > currentNote }.min() ?? heldNotes.min()!
52+
} else {
53+
isArpDescending = true
54+
currentNote = heldNotes.filter { $0 < currentNote }.max() ?? heldNotes.max()!
55+
}
5656
} else {
57-
if heldNotes.min() != currentNote {
58-
currentNote = heldNotes.filter { $0 < currentNote }.max() ?? heldNotes.max()!
59-
} else {
60-
isArpDescending = false
61-
currentNote = heldNotes.filter { $0 > currentNote }.min() ?? heldNotes.min()!
62-
}
57+
if heldNotes.min() != currentNote {
58+
currentNote = heldNotes.filter { $0 < currentNote }.max() ?? heldNotes.max()!
59+
} else {
60+
isArpDescending = false
61+
currentNote = heldNotes.filter { $0 > currentNote }.min() ?? heldNotes.min()!
62+
}
6363
}
6464

6565
instrument.play(noteNumber: MIDINoteNumber(currentNote), velocity: 120, channel: 0)

0 commit comments

Comments
 (0)