Skip to content

takagiy/mozu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mozu

synth

Examples

click to play↓!

#include <mozu>
#include <cmath>
using namespace mozu::prelude;

auto main() -> int {
  hertz(c4()) >> sin >> mul(30000) >> cut(1_s) >> save("sine.wav");
}

click to play↓!

#include <mozu>
#include <cmath>
using namespace mozu::prelude;

auto main() -> int {
  auto lfo = hertz(c4() / 20) >> sin >> mul(100);
  hertz(c4() * 2 + std::move(lfo)) >> sin >> mul(30000) >> cut(3_s) >> save("vibrato.wav");
}

click to play↓!

#include <mozu>
#include <cmath>
using namespace mozu::prelude;

auto main() -> int {
  auto sine = hertz(c4()) >> sin >> mul(30000);
  auto quantize = [](double x) -> double {
    return int(x) / 10000 * 10000;
  };
  std::move(sine) >> quantize >> cut(1_s) >> save("quantize.wav");
}

About

synth (C++20)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published