# Introduction

Sattern is a [JavaScript](https://developer.mozilla.org/en-US/docs/Web/JavaScript) environment for creating musical patterns. It can be used to generate sequences and trigger various targets inside an audio graph. An audio graph is a collection of targets or "audio units" and these can be [MIDI](https://en.wikipedia.org/wiki/MIDI) ports, [OSC](https://en.wikipedia.org/wiki/Open_Sound_Control) ports, or internal [Samplers](https://en.wikipedia.org/wiki/Sampler_\(musical_instrument\)) and or [SOUL](https://soul.dev/) patches. Sattern can run as a standalone application or as an AU/VST3 plugin on macOS.

![Sattern.app](https://4154459719-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MBl1xAat6IKX6uyp_w0%2F-MCxei_MDgHSzRtbsNK5%2F-MCxf4UelPGAlDJaQq42%2FScreen%20Shot%202020-07-23%20at%202.54.13%20PM.png?alt=media\&token=37bb69b2-5489-4e8a-bb10-e4a7367d3496)

The primary goal of Sattern is to provide a way to approach musical ideas through programming. This is not a new concept and there are lots of amazing tools and environments available that do this sort of thing already, like [Sonic Pi](https://sonic-pi.net/), [TidalCycles](https://tidalcycles.org/index.php/Welcome), [Overtone](http://overtone.github.io/), [Extempore](https://extemporelang.github.io/), and [many more](https://github.com/pjagielski/awesome-live-coding-music). Sattern is intended to provide a self contained [IDE](https://en.wikipedia.org/wiki/Integrated_development_environment) (Integrated development environment) without the need to install any external dependancies and to allow this environment to run as a standalone application or to be hosted inside a DAW (Digital Audio Workstation) as an AU/VST3 plugin to enhance an already established workflow.

{% hint style="info" %}
Sattern was never designed to be a "live" coding environment like the above mentioned platforms (they do this extremely well), but you can whip up your own "live" coding system using `eval();`
{% endhint %}

Sattern makes use of JavaScript for its main programming language. We ❤️ all programming languages and went through a couple iterations before landing on JavaScript. I personally come from a background of C style languages and JavaScript supports much of the structure programming syntax from [C](https://en.wikipedia.org/wiki/C_\(computer_language\)) (e.g., `if` statements, `while` loops, `switch` statements, `do while` loops, etc.), so it was a natural choice for me. Another reason for choosing JavaScript was accessibility, it's everywhere and you're more likely to find examples and bits of useful code written in JavaScript than other languages.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.sattern.dev/master.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
