46 releases

Uses new Rust 2024

0.2.41 Aug 26, 2026
0.2.40 Aug 25, 2026
0.2.34 Jun 17, 2026
0.2.29 May 5, 2026
0.1.4 Mar 29, 2026

#924 in Audio

Download history 8/week @ 2026-07-31 28/week @ 2026-08-07 51/week @ 2026-08-14 17/week @ 2026-08-21 51/week @ 2026-08-28 9/week @ 2026-09-04 5/week @ 2026-09-11 51/week @ 2026-09-18 7/week @ 2026-09-25 8/week @ 2026-10-02 4/week @ 2026-10-09 4/week @ 2026-10-16 7/week @ 2026-10-23 4/week @ 2026-10-30 4/week @ 2026-11-06 51/week @ 2026-11-13

67 downloads per month
Used in kaslc

Apache-2.0

490KB
9K SLoC

kasl

kasl is an umbrella crate that includes re-exports of kasl-core and backends (currently there is only Cranelift backend).

About the KASL language

KASL is a programming language designed for audio processing. The KASL language itself is implemented as a simple numerical calculation language with unique input, output and state variables, and can be used for audio processing with my Kadent DAW, which is under development.

How to Run the KASL Programs

You can use Kadent DAW to play audio using the KASL language. Also, you can run KASL code for genuine numerical calculation and there two ways to run it:

  • kaslc — A command-line tool to run KASL programs locally.
  • kasl.hatya.dev — Features online KASL playground where you can run KASL programs without installation.

Characteristics

KASL is specificlly designed for audio synthesis, so there are some points that this language is different from the other languages.

Input, Output and State Variables

KASL natively supports input, output and state variables. input variables are the variables that can receive data from the execution host. For example, when you run KASL program on Kadent and connect an edge to the input in the graph editor, the value will be passed to the variable. output variables pass the calculated data back to the execution host. To illustrate, this can be used for synthesizers to pass the generated samples to the DAW. state variables can preserve the stored value over the samples. This is useful for creating a delay buffer to create effects such as echo, or reverb.

Fixed-Count Loop

KASL supports fix count loop, which can be used by specifying loop keyword as follows:

func main() {
    loop 5 {
        do_something()
    }
}

This is the same as:

func main() {
    do_something()
    do_something()
    do_something()
    do_something()
    do_something()
}

Because KASL compiler can find the definition of the constant, you can also write like this:

func main() {
    let loop_count = 5
    loop loop_count {
        do_something()
    }
}

Dependencies

~4–15MB
~149K SLoC