AudioKit / Cookbook

Canonical Examples for Using the AudioKit Framework
MIT License
639 stars 103 forks source link

Changing Drums sound samples #66

Closed NickCulbertson closed 2 years ago

NickCulbertson commented 2 years ago

Hello,

When adding a wav file then changing the "file" string of a DrumSample in Drums.swift (line 38) the sound doesn't play properly. When played the note is tuned way down. The file is also played anytime another note is pressed.

Steps to reproduce:

Do the DrumSample file string names need to follow a particular naming convention? i.e. "Samples/open_hi_hat_A#1.wav"

Let me know if you need any additional details.

Thanks, Nick

NickCulbertson commented 2 years ago

Solved! I just saw this comment on AppleSampler.swift:

/// If a file name ends with a note name (ex: "violinC3.wav") /// The file will be set to this note /// Handy to set multi-sampled instruments or a drum kit...