package mkaudio

All checked builds pass
  1. Overview
  2. Docs

Description

Generate noise, basic waveforms and synthesized drum loops with configurable durations, tempos and sample rates.

Added to opam-repository:

README

mkaudio

Build status

CLI program for generating audio files

Supported commands:

  • saw, sine, square, triangle

Generate a waveform with a specified duration and frequency. Duration can be specified in hours, minutes or seconds, or as a number of beats and a tempo in BPM. For example:

Generate 5 seconds of saw wave:

mkaudio saw --frequency 440 --duration 5s sound.wav

Generate a sine wave lasting 4 beats at 120bpm (i.e. 2 seconds):

mkaudio sine --frequency 440 --beats 4 --tempo 120 sound.wav

Generate a square wave lasting half a minute:

mkaudio square --frequency 440 --duration 0.5m sound.wav
  • white-noise

Duration is specified in the same way as for waveforms, e.g. to generate 10 seconds of white noise:

mkaudio white-noise --duration 10s sound.wav
  • beat

Generate a simple beat from kick, snare and hi-hat patterns. Patterns are specified as strings; each character which is 1 or x corresponds to a drum hit; any other character corresponds to a lack of drum hit. Each character represents one sixteenth note at the specified tempo. The --repeats parameter allows generation of longer beats without typing in long repetitive patterns.

8 beats of eighth note hihats:

mkaudio beat --hihat 10 --repeats 16 --tempo 120 sound.wav

A simple syncopated beat lasting 4 beats:

mkaudio beat \
    --kick 1001000100100000 \
    --snare 0000100000001000 \
    --hihat 1111111111111111 \
    --tempo 120 sound.wav

For more information, and all optional parameters, see mkaudio --help and mkaudio <command> --help.

Dependencies (5)

  1. result
  2. mm >= "0.8.0"
  3. cmdliner >= "1.3.0"
  4. dune >= "2.0"
  5. ocaml >= "4.03.0"

Dev Dependencies (1)

  1. ounit with-test

Optional Dependencies

None

Used by

None

Conflicts

None

Build status

Results of building mkaudio with each compiler on check.ci.ocaml.org, run of against opam-repository 8a77e58. All results for this package.

Each result links to its build log. To keep crawlers from overloading the site, build logs require a GitHub sign-in (see ocurrent/opam-health-check). On your first log, GitHub asks you to “Authorize opam-health-check”, the OCurrent app that runs these checks; it sees only your public profile, not your repositories. The sign-in lasts 30 days.

Version OCaml 4.11 OCaml 4.14 OCaml 5.2 OCaml 5.4 OCaml 5.5
1.1.4 (this version) good good good good good
  • good Package successfully built
  • partial One of the dependencies failed to build
  • bad Package failed to build
  • n/a Package is not available in this environment
  • internal Internal failure