# Help with calling the parent file

**URL:** <https://discourse.processing.org/t/help-with-calling-the-parent-file/1202>\
**Category:** Coding Questions\
**Created:** [June 24, 2018, 9:22am UTC](https://discourse.processing.org/t/help-with-calling-the-parent-file/1202 "2018-06-24T09:22:43Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![helplouis](https://avatars.discourse-cdn.com/v4/letter/h/9dc877/32.png) [@helplouis](https://discourse.processing.org/u/helplouis)\
**Post date:** [June 24, 2018, 9:22am UTC](https://discourse.processing.org/t/help-with-calling-the-parent-file/1202/1 "2018-06-24T09:22:43Z")

</div>

Hi, currently trying to make meme soundboard, and I’m trying to create a array of the sound classes whilst using the processing sound library. So my question for any good samaritan willing to plead for my cause is how can I call the main file as a parent  
the sketch is called : memes

```auto
class sounds {
  SoundFile meme;

  void find(String name) {
meme = new SoundFile(this, name + ".mp3");
  }
}

```

so this gives me an error because of the “this” which would mean the parent is the class which is impossible looking for an mp3 inside of a class. So how can I call the main file (sketch named memes).

Might be a silly question but I please do answer 😃

**EDIT** : NP I FOUND THE ANSWER WOOHOO, the syntax for the mainfile was : memes.this or NameOfYourSketch.this  
lets get it

---

<div class="post-metadata">

**Author:** ![Kevin](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/kevin/32/2297_2.png) [@Kevin](https://discourse.processing.org/u/Kevin)\
**Post date:** [June 27, 2018, 12:02am UTC](https://discourse.processing.org/t/help-with-calling-the-parent-file/1202/2 "2018-06-27T00:02:18Z")

</div>

You can also pass your sketch into the `find()` function:

```auto
class Sounds {
  SoundFile meme;

  void find(PApplet sketch, String name) {
    meme = new SoundFile(sketch, name + ".mp3");
  }
}

```

Or you could pass it into the `Sounds` constructor and store it as a reference.
