forked from AudioKit/AudioKit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsmoothDelayTests.swift
59 lines (50 loc) · 1.58 KB
/
smoothDelayTests.swift
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
//
// smoothDelayTests.swift
// AudioKit
//
// Created by Aurelius Prochazka, revision history on GitHub.
// Copyright © 2018 AudioKit. All rights reserved.
//
import AudioKit
import XCTest
class SmoothDelayTests: AKTestCase {
override func setUp() {
super.setUp()
duration = 4.0
}
func testDefault() {
output = AKOperationEffect(input) { input, _ in
return input.smoothDelay()
}
AKTestMD5("7e376e052ae31ea9f1e4648e88899dc5")
}
func testFeedback() {
output = AKOperationEffect(input) { input, _ in
return input.smoothDelay(feedback: 0.66)
}
AKTestMD5("7e376e052ae31ea9f1e4648e88899dc5")
}
func testParameters() {
output = AKOperationEffect(input) { input, _ in
return input.smoothDelay(time: 0.05, feedback: 0.66, samples: 256)
}
AKTestMD5("b02fdc5cc0707ffd25a5233a1426ba1f")
}
func testParameterSweep() {
output = AKOperationEffect(input) { input, _ in
let ramp = AKOperation.lineSegment(
trigger: AKOperation.metronome(frequency: 1.0 / self.duration),
start: 0,
end: 0.1,
duration: self.duration)
return input.smoothDelay(time: 0.01 + ramp, feedback: 0.99 - ramp, samples: 512)
}
AKTestMD5("4005d6952ee19edf5c9786d622ab9dc8")
}
func testTime() {
output = AKOperationEffect(input) { input, _ in
return input.smoothDelay(time: 0.05)
}
AKTestMD5("deb547191eb922406984bcc5cff3fa87")
}
}