# Require\_relative / require in sonic pi

**URL:** <https://in-thread.sonic-pi.net/t/require-relative-require-in-sonic-pi/8863>\
**Category:** Support, Help & Resources\
**Created:** [May 19, 2024, 9:12pm UTC](https://in-thread.sonic-pi.net/t/require-relative-require-in-sonic-pi/8863 "2024-05-19T21:12:07Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![brendanmac](https://dub1.discourse-cdn.com/flex017/user_avatar/in-thread.sonic-pi.net/brendanmac/32/2809_2.png) [@brendanmac](https://in-thread.sonic-pi.net/u/brendanmac)\
**Post date:** [May 20, 2024, 10:12am UTC](https://in-thread.sonic-pi.net/t/require-relative-require-in-sonic-pi/8863/2 "2024-05-20T10:12:21Z")

</div>

Hi  
I too am new to Sonic Pi and Ruby, but certainly _not_ a seasoned programmer. I can say that require does work in Sonic Pi, but cannot say if it is officially supported - require does not appear under Help/Lang. This thread is where I found out how to download and ‘install’ Ziffers, for example:

> [@Ziffers - Numbered musical notation](https://in-thread.sonic-pi.net/t/ziffers-numbered-musical-notation/1557):
>
> Hi all! I wanted to share my new project called “Ziffers”: [https://github.com/amiika/ziffers](https://github.com/amiika/ziffers) It is a new notation and parser for Sonic Pi that can be used to write, parse and play compact melodies. Its inspired by [numbered musical notation](https://en.wikipedia.org/wiki/Numbered_musical_notation). Basic syntax is composed of degree numbers 1 - 7 and lower letters w, h, q meaning w=whole, h=half, q=quarter … etc. For example “Bluebird song” can be played using Ziffers function: zplay q5353 5653 4242 4542 5353 5653 w5 q5432 w1 There is also suppor…

Then I just run

```ruby
require "~/ziffers/ziffers.rb"

zplay "e 0 2 1 3 2 4 35"

```

and it works fine. Sadly I cannot answer your second more specific question re variables scope.  
HTH

PD-Pi

---

_[View the full topic](https://in-thread.sonic-pi.net/t/require-relative-require-in-sonic-pi/8863)._
