Sha256: 51a0913c90a51e9b999eb7c9bbdc32713f0d127d294487a97b09628228ce17d4

Contents?: true

Size: 485 Bytes

Versions: 1

Compression:

Stored size: 485 Bytes

Contents

require 'chaussettes'

Chaussettes::Clip.new do |clip|
  clip.show_progress false
  clip.in(device: nil)

  notes = %w(C3 E3 G3 C4)
  20.times do
    clip.chain.synth(0.2, :pluck) do |t|
      t.start_tone notes.sample, bias: 0, shift: rand(100), p1: 2
    end.synth(0.2, :pluck) do |t|
      t.combine :mix
      t.start_tone notes.sample, bias: 0, shift: rand(100), p1: 2
    end
  end

  # show the command that will be run
  puts clip.command('play')

  # play it!
  clip.play
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
chaussettes-1.0.0 examples/synth.rb