audiokit

AKMIDICallbackInstrument implementation issue

℡╲_俬逩灬. 提交于 2019-12-14 01:01:04
问题 Updating to the latest version of AudioKit left me changing several AKCallbackInstrument instances over to the new AKMIDICallbackInstrument class which now incorporates the former as legacy behavior. When doing so however, I ran into this weird error. Maybe a Swift nuance I am missing? let callback = AKMIDICallbackInstrument() { status, note, velocity in if status == .noteOn { //errors out // do something } } Comparing status to .noteOn errors out with: "Expression type 'Bool' is ambiguous

AudioKit on macOS: get/set system device volume

旧时模样 提交于 2019-12-13 09:45:28
问题 I've used AudioKit.inputDevice, Audiotkit.outputDevice, and friends to get get all input and output devices on my Mac, and to get/set default input and output device. I wish to read the current volume of these devices, and to be able to set it myself, but I can't find the correct AudioKit API for doing so. Does anyone know how to do this? 回答1: You will want to use a library similar to https://github.com/InerziaSoft/ISSoundAdditions Changing sound volume becomes as simple as: [NSSound

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

AudioKit macOS HelloWorld makes no sound with Bluetooth speaker

杀马特。学长 韩版系。学妹 提交于 2019-12-13 01:16:59
问题 I am running the Hello World example from AudioKit-macOS-4.7.2 using macOS Mojave 10.14.5 on a Mac mini (2018). When running the example using the inbuilt speaker, sound is heard, all is well. When running the example with a UE BOOM 2 bluetooth speaker connected, no sound is heard and I get the following output: 2019-07-12 10:09:19.615436+0100 HelloWorld[1874:44088] [AudioHAL_Client] HALC_ProxyIOContext.cpp:958:IOWorkLoop: HALC_ProxyIOContext::IOWorkLoop: the server failed to start, Error:

How to set a loop not at the end of track using AudioKit sequencer?

荒凉一梦 提交于 2019-12-13 00:41:31
问题 Is there a way to set loop in the AKSequencer with arbitrary start and end timestamps. As I see, the method setLoopInfo only allows you set the loop which end is exactly at the end of the track. But I want to set a loop in the middle of a track. I understand that this limitation of the AudioKit Sequencer grows from the limitation in the underlying apple'a MusicalPlayer, but maybe there are some workarounds... 来源: https://stackoverflow.com/questions/55161566/how-to-set-a-loop-not-at-the-end-of

What is the replacement for AKSampler.loadMelodicSoundFont in AudioKit 4.2?

风格不统一 提交于 2019-12-12 19:13:52
问题 I had to upgrade from AudioKit 4.0 to AudioKit 4.2 due to an incompatibility of AudioKit 4.0 with latest swift language and Xcode. However, now my project cannot be compiled because loadMelodicSoundFont is not a member of AKSampler anymore while I'm using this method to load sf2 sound file. I could find a documentation for 4.1 only on http://audiokit.io/docs/ and 4.1 has loadMelodicSoundFont apparently. And no documentation for 4.2 I could find. So what is the replacement for this method in

iOS Library to Play the wav file coming over the socket

╄→尐↘猪︶ㄣ 提交于 2019-12-11 16:23:03
问题 I am connecting to a socket which is transmitting audio wav file in 1024 byte chunks and I am looking for a swift library to play that. Just wondering if there is any. Current state of my code is this. import UIKit import SwiftSocket class ViewController: UIViewController { let port : UInt32 = UInt32(8190) let host = "localhost" let BUFF_SIZE = 1024 let SECRET = "MYSECRET" override func viewDidLoad() { super.viewDidLoad() // Do any additional setup after loading the view. let client =

How to change frequency of AKMorphingOscillatorBank countinuously in Audiokit?

混江龙づ霸主 提交于 2019-12-11 15:29:59
问题 I am new to Audiokit. I want to build a tuneable monophonic wavetable-oscillator with morphable table output that could be synced to an others oscillators frequency. I startet with AKMorphingOscillatorBank but could not find out how to change its frequency countinuously, not stepweise. At the moment I start a note with vco1.play(noteNumber: MIDINoteNumber(Int(noteNumber) + offset1), velocity: velocity, frequency: vco1Freq) but changing the frequency while a note is played is not possible that

Continuous Sine Wave From AKMIDISampler when AKMicrophone is Present

匆匆过客 提交于 2019-12-11 11:01:39
问题 I’m having a problem using AKMIDISampler in my project when there’s an initialized AKMicrophone. Along with correctly playing the woodblock sample when “play” is called on the sampler, the first time “play” is called a constant sine wave starts playing - it never stops. I’ve replicated the problem in the smallest amount of code below. Issue happens when the class is initialized then playTestSample() is called. Note that if the AKMicrophone related code is all muted the AKMIDISampler plays

AudioKit 4.2 from CocoaPods Issue miss file

我怕爱的太早我们不能终老 提交于 2019-12-11 10:48:51
问题 Installing AudioKit using CocoaPods gets an issue missing a file. On file AKModulatedDelayDSP.hpp ... #import "ModulatedDelay.hpp" 'ModulatedDelay.hpp' file not found Tried several times on different projects getting the same issue. Any ideas ? 回答1: It depends on what you're importing from AudioKit. I don't think you'd get this with a vanilla project. But, if what you're doing requires access to core, then you might not want to use Cocoapods anyway. If you shared your project I could give you