Skip to content

Language Documentation

Antiloope edited this page Oct 11, 2020 · 17 revisions

Welcome to ChordScript language documentation

This documentation is a detailed description of the main syntax and characteristics of the language with examples on each section. It's designed for developers and it can be a bit tedious. If you are new with ChordScript, you should start with the tutorial and go back here if you have a specific query.

Index

  1. Intro

  2. Language basics

  3. Data types and methods

  4. Flow control

  5. Functions

  6. Synthesis

Language basics

What CS do?

ChordScript is a dynamic, strongly typed and interpreted language, that executes code to generate sounds. In order to execute sounds on different operative systems, it needs to "connect" with different sound systems and drivers.

To simplify this communication, ChordScript uses Jack Audio Connection Kit. It works as a server mounted over current OS sound diver, and ChordScript connects to it as a client. For this reason, when you install CS you also install Jack. This architecture, does not only makes ChordScript able to run on different OS, but also offers the possibility to work with low latency audio generation.

So, CS allows you to trigger pre-recorded samples, synthesize sounds using basic functions and apply some effects on this sounds, using programming as interface.

For this reasons, ChordScript can be a good alternative for live coding, creative coding, algorithmic composition or for any musician/programmer who wants to use programming as a powerful instrument for composition, giving also the possibility to record and store it as a .wav file.

Demo examples

There are some code examples that you can copy and paste in your ChordScript IDE and then modify or play to understand or take as a base for your compositions. If you want to install the IDE go to the ChordScript Page

Data types and methods

Basic types

Playables

Flow control

FOR statement

IF statement

Functions

Definition

Synthesis

Concepts

Operations

Clone this wiki locally