Permalink
Browse files

small change in README

  • Loading branch information...
Macario
Macario committed Aug 31, 2009
1 parent bb621b2 commit e82decb83e50506c1b19704adcd522088733ddf0
Showing with 20 additions and 21 deletions.
  1. +8 −9 README.rdoc
  2. +1 −1 lib/scruby.rb
  3. +1 −1 scruby.gemspec
  4. +10 −10 test.live.rb
View
@@ -17,16 +17,15 @@ thrugh *nix pipes. Similar functionality shouldn't be too dificult to implement
SynthDef.new :fm do |freq, amp, dur|
- gate = EnvGen.kr Env.perc(0, 0.2)
- mod_env = EnvGen.kr Env.new([600, 200, 100], d(0.7,0.3) * dur), gate
- mod = SinOsc.ar freq * 1.4, :mul => mod_env
- sig = SinOsc.ar freq + mod
- env = EnvGen.kr Env.new( [0, 1, 0.6, 0.2, 0.1, 0 ], d(0.001, 0.005, 0.3, 0.5, 0.7) * dur ), gate, :doneAction => 2
- sig = sig * amp * env
- Out.ar [sig, sig]
+ mod_env = EnvGen.kr Env.new( d(600, 200, 100), d(0.7,0.3) ), 1, :timeScale => dur
+ mod = SinOsc.ar freq * 1.4, :mul => mod_env
+ sig = SinOsc.ar freq + mod
+ env = EnvGen.kr Env.new( d(0, 1, 0.6, 0.2, 0.1, 0), d(0.001, 0.005, 0.3, 0.5, 0.7) ), 1, :timeScale => dur, :doneAction => 2
+ sig = sig * amp * env
+ Out.ar 0, [sig, sig]
end.send
-
- Synth.new :fm, :freq => 200, :amp => 0.8, :dur => 5
+
+ Synth.new :fm, :freq => 220, :amp => 0.4, :dur => 1
To start a live coding session:
View
@@ -25,7 +25,7 @@
$:.unshift(File.dirname(__FILE__)) unless $:.include?(File.dirname(__FILE__)) || $:.include?(File.expand_path(File.dirname(__FILE__)))
module Scruby
- VERSION = '0.2.6.8'
+ VERSION = '0.2.6.9'
end
require "scruby/core_ext/object"
View
@@ -2,7 +2,7 @@
Gem::Specification.new do |s|
s.name = %q{scruby}
- s.version = "0.2.6.8"
+ s.version = "0.2.6.9"
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
s.authors = ["Macario Ortega"]
View
@@ -139,16 +139,16 @@
# Síntesis por FM
-SynthDef.new :fm do |freq, amp, dur|
- mod_env = EnvGen.kr Env.new( d(600, 200, 100), d(0.7,0.3) ), 1, :timeScale => dur
- mod = SinOsc.ar freq * 1.4, :mul => mod_env
- sig = SinOsc.ar freq + mod
- env = EnvGen.kr Env.new( d(0, 1, 0.6, 0.2, 0.1, 0), d(0.001, 0.005, 0.3, 0.5, 0.7) ), 1, :timeScale => dur, :doneAction => 2
- sig = sig * amp * env
- Out.ar 0, [sig, sig]
-end.send
-
-camp = Synth.new :fm, :freq => 220, :amp => 0.4, :dur => 1
+ SynthDef.new :fm do |freq, amp, dur|
+ mod_env = EnvGen.kr Env.new( d(600, 200, 100), d(0.7,0.3) ), 1, :timeScale => dur
+ mod = SinOsc.ar freq * 1.4, :mul => mod_env
+ sig = SinOsc.ar freq + mod
+ env = EnvGen.kr Env.new( d(0, 1, 0.6, 0.2, 0.1, 0), d(0.001, 0.005, 0.3, 0.5, 0.7) ), 1, :timeScale => dur, :doneAction => 2
+ sig = sig * amp * env
+ Out.ar 0, [sig, sig]
+ end.send
+
+ camp = Synth.new :fm, :freq => 220, :amp => 0.4, :dur => 1
ticker = Ticker.new :tempo => 120*2

0 comments on commit e82decb

Please sign in to comment.