有四种标准类型,实际上是AudioKit支持的五种:
- sine- triangle (good sine approximate)- square wave- sawtooth- reverse sawtooth wave
所有这些听起来都不同,但如果我可以通过使用内置的wavetable支持来改变Waveform的类型,那将会非常棒.
http://audiokit.io/docs/Structs/AKTable.html#/s:vV8AudioKit7AKTable6valuesGSaSf_提到AKMorphingOscillator就像一个可以改变振荡器波形的奇迹类.默认设置都有效,但我真的很想填充AKtable字段.
git页面https://github.com/audiokit/AudioKit/blob/master/AudioKit/Common/Internals/AKTable.swift显示:
/// A table of values accessible as a waveform or lookup mechanismpublic struct AKtable { // MARK: - PropertIEs /// Values stored in the table public var values = [float]() /// Number of values stored in the table var size = 4096 /// Type of table var type: AKtableType // MARK: - Initialization /// Initialize and set up the default table /// /// - parameter tableType: AKtableType of teh new table /// - parameter size: Size of the table (multiple of 2) /// public init(_ tableType: AKtableType = .Sine,size tableSize: Int = 4096) { type = tableType size = tableSize ....
所以我的问题是,我可以直接访问values数组并简单地修改它以生成新的波形吗?这样做有明智或惯用的方法吗?
丹科.
解决方法 由于AudioKit支持将Google网上论坛转移到StackOverflow,我在这里回答更老的问题.基本上表可以是你想要的任何东西.它们是类,而不是表格,并且有一个 *** 场,显示如何使用它们并使用AKtableVIEw绘制它们.在这里查看:http://audiokit.io/playgrounds/Basics/Tables/
总结以上是内存溢出为你收集整理的ios – audiokit的波表参数全部内容,希望文章能够帮你解决ios – audiokit的波表参数所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)