File tree Expand file tree Collapse file tree 1 file changed +12
-12
lines changed
Cookbook/CookbookCommon/Sources/CookbookCommon/Recipes/MiniApps Expand file tree Collapse file tree 1 file changed +12
-12
lines changed Original file line number Diff line number Diff 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 )
You can’t perform that action at this time.
0 commit comments