Project

frausto

0.0
The project is in a healthy, maintained state
Build faust-executable DSP graphs in Ruby DSL with ruby2faust; or convert Faust to Ruby with faust2ruby.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies

Development

~> 5.0
~> 13.0
~> 0.9
 Project Readme

Frausto

Gem Version CI License: MIT Ruby

A Ruby toolkit for Faust DSP: generate Faust code from Ruby, or convert Faust to Ruby.

Installation

gem install frausto

Or add to your Gemfile:

gem 'frausto'

Tools

  • ruby2faust - Ruby DSL that generates Faust DSP code
  • faust2ruby - Convert Faust DSP code to Ruby DSL

Quick Examples

require 'ruby2faust'

code = Ruby2Faust.generate do
  freq = hslider("freq", init: 48, min: 20, max: 100, step: 1) >> midi2hz >> smoo
  amp = hslider("amp", init: -12, min: -60, max: 0, step: 1) >> db2linear >> smoo
  osc(freq) >> lp(2000) >> gain(amp)
end

puts code
# import("stdfaust.lib");
#
# process =
#   os.osc(hslider("freq", 48, 20, 100, 1) : ba.midikey2hz : si.smoo)
#   : fi.lowpass(1, 2000)
#   : *(hslider("amp", -12, -60, 0, 1) : ba.db2linear : si.smoo);
require 'faust2ruby'

ruby_code = Faust2Ruby.to_ruby('process = os.osc(440) : *(0.5);')
# => "0.5 * osc(440)"

License

MIT