audiokit

Long notes after stop AKSequencer

若如初见. 提交于 2019-12-06 09:53:57
Sometimes I need some long notes to keep playing after the sequencer stops. akSequencer.stop() // Need to put some code to ask the question Is there any way to keep the sound of a long note when AKSequencer stops? Instead of connecting your AKMusicTrack's MIDI output directly to your sampler (or oscillator bank or whatever), send it to an AKCallbackInstrument . In the callback function, you can check the status of the sequencer's MIDI messages, and send your the noteOn and noteOff messages to your sampler from there. In the callback you can add conditional logic, for example, you could use

AudioKit ios AKSequencer Not Restarting Playback Accurately

强颜欢笑 提交于 2019-12-06 09:30:15
I'm trying to use AudioKit to playback a sound on each beat of a measure(s). Although I've implemented the code from this similar question regarding callbacks via AudioKit, I can't seem to get the sequencer to update changes and playback properly. It will play once accurately, however after rewinding and changing the values it will only use the initial values (or not playback at all). My intent is to create a struct of measures with beat values for each measure, then use MIDI and the callback to play different sounds dependent on how many measures/beats there are. Thanks! import UIKit import

How can I get AudioKit to stream an audio file from a remote URL?

元气小坏坏 提交于 2019-12-06 07:38:11
I'm trying to play audio files from URLs in an iOS app (Swift 4). I'd like them to buffer and play while downloading. And I quite like AudioKit, but for the life of me and I can't figure out how to make it read remote files. Any suggestions? You can't find it because its not there. We've never implemented any streaming functionality. It could be added though, and a number of people like yourself would be quite pleased. Consider contributing some code if you manage to work it out. We can offer you membership to AudioKit's Slack group during development if you wish. If you only need to stream

Recording midi with Audiokit

落爺英雄遲暮 提交于 2019-12-06 04:38:47
I want to record midi audio using AudioKit. I managed to do it but when I replay the recorded notes, there are delays and the timing of the notes is not always the good one, especially when I play fast during the recording. Here is how i did it : I have three buttons, one for Do (Midi number 60), one for Re (midi number 62), one for Mi (64). When a button is pushed down i send a noteOn, and I save the time in a 88 table of Floats. When the button is pushed up, I send a noteOff event, and I save the note in the midi file. I can deduce the length of the note to save, by doing (timeNoteOff

AKRhodesPiano error (crush) on AudioKit v4.2

淺唱寂寞╮ 提交于 2019-12-06 04:04:31
问题 I'm using AudioKit version 4.2 and I receive this error (see attached image) after installing my app on my phone (iPhone X) - Xcode error when using AKRhodesPiano The error is thrown after the app is compiled and installed (after the app is being opened on the device). This is the line that I'm using: let pianoNote = AKRhodesPiano() // error When I change this line to a different instrument, for example - let pianoNote = AKPluckedString() // works good! Can someone help me figure it out? 回答1:

How to save audio file with AudioKit?

牧云@^-^@ 提交于 2019-12-06 00:03:44
问题 I have audio file. I made some effects on it let pitchshifter = AKPitchShifter(self.audioPlayer) pitchshifter.shift = 10 AudioKit.output = pitchshifter It works if I play it in app, but I want to save it as a new file to use it as avasset later. How it can be implemented? I tried using AKNodeRecorder but this produces empty audio track: let url = FileManager.default.urls(for: .documentDirectory, in: .userDomainMask).first!.appendingPathComponent("recorded") let format = AVAudioFormat

AudioKit - Issues getting specific frequencies (above 20kHz)

浪尽此生 提交于 2019-12-05 19:18:00
I got a small problem using the AudioKit framework: ----> I can't get the AudioKit framework to pick up special frequencies above and below a specific amount. ( frequency below 100Hz & above 20kHz ) Edit: I've tested some frequency-tracker apps on my iOS device combined with some online-tonegenerator tools to check if my iPhone microphone is able to pick up those frequency above 20000Hz... And it is. But using the default frequency tracker code snippets: Frequency above 20000Hz can not be picked up by AudioKit. mic = AKMicrophone() tracker = AKFrequencyTracker(mic) silence = AKBooster(tracker,

Issues with extra MIDI track being created in AKsequencer, using audiokit

纵然是瞬间 提交于 2019-12-05 13:31:06
I've been trying to solve a mystery sinewave issue with little success. I'm starting a new question here as I think I have dug into the specifics of this problem. When setting up an AKSequencer, and feeding it a MIDI file, I'm seeing some strange results. For a 4 track song (with a corresponding 4 track midi file, duration matching all stems of the song), I'm seeing that the sequencer is actually generated with 5 tracks. What is the extra track? Also, I'm getting an error in the console: [seq] 1026: Invalid beat range which I believe happens when the track is empty. So this looks like the

AudioKit iOS - receivedMIDINoteOn function

会有一股神秘感。 提交于 2019-12-05 05:43:47
问题 I'm trying to use the receivedMIDINoteOn function to flash a UILabel when the sequencer is playing a note. I have tried using the AKMIDIListener protocol with no success. Also I have made a sub class of AKMIDISampler and send midi to it from the sequencer. It plays the midi but the receivedMIDINoteOn is not called. This is what I have in the init() of the conductor: init() { [ahSampler, beeSampler, gooSampler,flasher] >>> samplerMixer AudioKit.output = samplerMixer AudioKit.start() let midi =

AudioKit - How to get Real Time floatChannelData from Microphone?

冷暖自知 提交于 2019-12-05 04:49:29
问题 I'm new to Audiokit and I'm trying to do some real-time digital signal processing on input audio from the microphone. I know the data I want is in AKAudioFile's FloatChannelData, but what if I want to obtain this in real-time? I'm currently using AKMicrophone, AKFrequencyTracker, AKNodeOutputPlot, AKBooster and I'm plotting the tracker's amplitude data. However, that data is not the same as the audio signal (as you know, it's the RMS). Is there any way I can obtain the signal's Float data