# how can you use your own sample 

**URL:** <https://in-thread.sonic-pi.net/t/how-can-you-use-your-own-sample/6111>\
**Category:** Support, Help & Resources\
**Created:** [November 2, 2021, 8:07pm UTC](https://in-thread.sonic-pi.net/t/how-can-you-use-your-own-sample/6111 "2021-11-02T20:07:13Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Morris](https://avatars.discourse-cdn.com/v4/letter/m/d2c977/32.png) [@Morris](https://in-thread.sonic-pi.net/u/Morris)\
**Post date:** [November 2, 2021, 8:07pm UTC](https://in-thread.sonic-pi.net/t/how-can-you-use-your-own-sample/6111/1 "2021-11-02T20:07:13Z")

</div>

I’m new here. i have a question how can i use my sample. I like done in tutorial but it doesn’t work

---

<div class="post-metadata">

**Author:** ![ethancrawford](https://avatars.discourse-cdn.com/v4/letter/e/a88e4f/32.png) [@ethancrawford](https://in-thread.sonic-pi.net/u/ethancrawford)\
**Post date:** [November 2, 2021, 8:12pm UTC](https://in-thread.sonic-pi.net/t/how-can-you-use-your-own-sample/6111/2 "2021-11-02T20:12:47Z")

</div>

@Morris - in order to understand exactly what’s going on for you, it would be super helpful to have a few more details. Such as: when you say ‘it doesn’t work’ - how?  
what does it say/do instead? a small example of the code you have tried to run might also be useful 🙂

---

<div class="post-metadata">

**Author:** ![Morris](https://avatars.discourse-cdn.com/v4/letter/m/d2c977/32.png) [@Morris](https://in-thread.sonic-pi.net/u/Morris)\
**Post date:** [November 3, 2021, 9:19am UTC](https://in-thread.sonic-pi.net/t/how-can-you-use-your-own-sample/6111/3 "2021-11-03T09:19:54Z")

</div>

![Sonic Pi 03.11.2021 09_43_53](https://europe1.discourse-cdn.com/flex017/uploads/sonic_pi/original/2X/5/5256c39a9da523eef0d0923e256a2e248a30de36.png)

---

<div class="post-metadata">

**Author:** ![ethancrawford](https://avatars.discourse-cdn.com/v4/letter/e/a88e4f/32.png) [@ethancrawford](https://in-thread.sonic-pi.net/u/ethancrawford)\
**Post date:** [November 3, 2021, 10:06am UTC](https://in-thread.sonic-pi.net/t/how-can-you-use-your-own-sample/6111/4 "2021-11-03T10:06:35Z")

</div>

I see, thanks!

Have a peek at the tutorial (in [chapter 3.6](https://sonic-pi.net/tutorial.html#section-3-6), it describes how to load local samples). The syntax for path separators is the same across macOS, Windows and Linux, instead of using forward slashes for one, and backwards slashes for another 🙂  
After editing your code to match, it should work fine. Another alternative is to drag and drop your samples from somewhere like your file browser into Sonic Pi’s window - the correct path will be inserted into the editor for you 🙂

Hope that helps! 👍

---

<div class="post-metadata">

**Author:** ![robin.newman](https://avatars.discourse-cdn.com/v4/letter/r/76d3ee/32.png) [@robin.newman](https://in-thread.sonic-pi.net/u/robin.newman)\
**Post date:** [November 3, 2021, 10:46am UTC](https://in-thread.sonic-pi.net/t/how-can-you-use-your-own-sample/6111/5 "2021-11-03T10:46:53Z")

</div>

As an addition to Ethan’s answer, an easy way to get the sample path into Sonic Pi is to drag and drop the icon of the sample from your folder onto the Sonic Pi editor window. It will then automatically add the string you want, and you can add the command `sample` before it.
