I found how to create Sound wave From FDWaveformView Pods , but I can't modify to create a this type of wave screenshot below:
Here is what I am trying to do:-
The screenshot is taken from iPhone:-
This code creates sine wave but I need to create pulse waves:-
soundWaveView.delegate = self
soundWaveView.alpha = 0.0
soundWaveView.audioURL = mainTrackURL
soundWaveView.zoomSamples = 0 ..< soundWaveView.totalSamples / 3
soundWaveView.doesAllowScrubbing = false
soundWaveView.doesAllowStretch = false
soundWaveView.doesAllowScroll = false
soundWaveView.wavesColor = UIColor(red: 46/255, green: 188/255, blue: 191/255, alpha: 1)
soundWaveView.progressColor = UIColor(red: 251/255, green: 237/255, blue: 101/255, alpha: 1)
do {
try AVAudioSession.sharedInstance().setActive(true)
playerSoundWave = try AVAudioPlayer(contentsOf: mainTrackURL!, fileTypeHint: AVFileType.mp4.rawValue)
songTotalTime = Double((playerSoundWave?.duration)!)
}
catch let error {
print(error.localizedDescription)
}
Question: How to modify or create sound wave?
Can someone please explain to me how to create and modify sound wave, i've tried to modify but no results yet. Any help would be greatly appreciated.
Thanks in advance.