1 year ago
#323041
N0ctrn
Audio Kit UI NodeRollingView, ways to adjust it?
I am pretty new to AudioKit, and I was wondering is there a way to adjust sample rate, color and margins for the NodeRollingView? I am creating the view similarly to the CookBook sample project:
struct LevelView: View {
@StateObject var conductor = TunerConductor()
var body: some View {
VStack {
NodeRollingView(conductor.tappableNodeA).clipped()
}
.navigationBarTitle("Level One")
.onAppear {
conductor.start()
}
.onDisappear {
conductor.stop()
}
}
}
To be more specific: I am trying to use NRV to draw which note a person in singing into the microphone. Something like this tutorial. Since AKFrequencyTracker no longer exist.
EDIT: So basically the output looks like this, but I want to make it much smoother with reduced noise, so that you can actually understand what frequency is being played: How it looks now And this what I want it to look as(see the red line) With the large empty area on the top being filled as well: How it should look like
Looking at the code of the NRV, it has a public init, but I am not sure how to use it:
public init(_ node: Node, color: Color = .gray, bufferSize: Int = 1024) {
metalFragment = FragmentBuilder(foregroundColor: color.cg, isCentered: false, isFilled: false) nodeTap = RawDataTap(node, bufferSize: UInt32(bufferSize)) }
`
swift
avfoundation
viewcontroller
audiokit
0 Answers
Your Answer