akoperation

AudioKit: How to operate with AKOperation parameter values as Double?

折月煮酒 提交于 2019-12-13 03:36:32
问题 I want to calculate pow() in the following context: let generator = AKOperationGenerator { parameters in let depth = PitchEnvVCO.freqDecayDepth.times(PitchEnvVCO.freqDecayAmount) let wdth = pow(2.0, depth/12.0) * PitchEnvVCO.frequency // throws error let ptch = AKOperation.exponentialSegment( trigger: PitchEnvVCO.gate, start: wdth, end: PitchEnvVCO.frequency, duration: PitchEnvVCO.freqDecayTime ) let oscillator = AKOperation.squareWave( frequency: ptch, amplitude: PitchEnvVCO.amplitude