2017-10-12 63 views
1

無法在XCode 9中啓動AK4 AKPeriodic函數。在下面來自「Plucked String」操場的摘錄中,我插入了兩條日誌消息來幫助識別處理事件。我從不在控制檯日誌中看到「定期功能啓動」消息。我所聽到的只是一個很短的咔噠聲。AudioKit 4.0 AKPeriodicFunctions Not Starting

let scale = [0, 2, 4, 5, 7, 9, 11, 12] 
let performance = AKPeriodicFunction(frequency: playRate) { 
print("periodic function startup") 
var note = scale.randomElement() 
let octave = [2, 3, 4, 5].randomElement() * 12 
if random(0, 10) < 1.0 { note += 1 } 
if !scale.contains(note % 12) { print("ACCIDENT!") } 

let frequency = (note + octave).midiNoteToFrequency() 
if random(0, 6) > 1.0 { 
    pluckedString.trigger(frequency: frequency) 
} 
} 

AudioKit.output = reverb 
AudioKit.start(withPeriodicFunctions: performance) 
print("AK startup") 
performance.start() 
+1

工作今天這個上,希望我會盡快發佈與修訂的答案。 –

回答