AudioKit / Cookbook

Canonical Examples for Using the AudioKit Framework
MIT License
606 stars 97 forks source link

Piano doesn't sound as before #157

Closed diegogarciar closed 1 month ago

diegogarciar commented 1 month ago

macOS Version(s) Used to Build

macOS 14 Sonoma

Xcode Version(s)

Xcode 15.4

Description

I was looking at your video, and I noticed that the Instrument EXS example doesn't sound as in that video. I don't think its the file that changed, so not sure what could be the issue, I also tried to replace the Apple sampler with the MIDISampler, but no luck.

https://audiokitpro.com/tag/exs/

Crash Logs, Screenshots or Other Attachments (if applicable)

No response

NickCulbertson commented 1 month ago

Hey Diego! You are correct. The EXS file in the Cookbook is a different instrument, but the same implementation. My AUv3-Instrument example uses the instrument from the video: https://github.com/NickCulbertson/AUv3-Instrument

diegogarciar commented 4 weeks ago

Thanks @NickCulbertson! I tried running the example you provided but it also sounded distorted, I know it's kinda out of scope of the repo so thank you either way!

I was hoping to use your EXS samples because they're very light!

NickCulbertson commented 4 weeks ago

Hmmm, that's interesting. I'm not hearing any distortion on device or the simulator using Xcode 15.3. I'll update and see if it sounds different on 15.4.

NickCulbertson commented 4 weeks ago

I just downloaded the latest version of Xcode, ran the app on my iPhone 12 Pro and Simulator, and didn't notice any distortion. The instrument is just a square wave repeating so maybe that just sounded distorted? If you are testing on an older device the buffer might need to be changed in the InstrumentApp.swift file. Also bluetooth headphones might be an issue. Did the Cookbook sound distorted too? If you move the instrument into the Cookbook's Sound folder and load it in that app does it sound the same?