This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
live_loop :main do | |
use_synth :fm | |
play 50 + [0, 12].choose, release: 0.15, amp: rrand(0.5, 0.7) | |
sleep 0.125 | |
end | |
live_loop :sec do | |
#sync :main | |
use_synth :mod_fm | |
play 66, release: 0.15, amp: 0.125, mod_range: 24 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use_bpm 120 | |
define :bass_note do |n, s| | |
play n, attack: 0, sustain: s, release: 0.05, amp: 1 | |
end | |
define :two_bass_notes do |n| | |
bass_note n, 0.1 | |
sleep 0.25 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
live_loop :main do | |
sample :drum_bass_hard if one_in 2 | |
sleep rrand(0.25, 0.75) | |
end | |
live_loop :second do | |
sync :main | |
d = rrand_i(1, 2) | |
sample :bass_dnb_f, amp: 0.5, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# dzielenie do 30 | |
def dzielenie | |
loop do | |
n1, n2 = get_numbers | |
question = "#{n1 * n2} / " + n2.to_s + " =" | |
20.times{puts} | |
puts question | |
r = gets.to_i | |
answer r, n1, question |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
with_fx :reverb do | |
live_loop :main do | |
use_synth :fm | |
p = rrand(-0.2, 0.2) | |
play 36, release: 0.1, pan: -p | |
play 48, release: 0.15, pan: p | |
play 60, release: 0.15, pan: -p | |
play 67, release: 0.15, pan: p | |
sleep 0.125 | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# arpeggios | |
g = chord(:g, :major) | |
e = chord(:e, :minor) | |
c = chord(:c, :major) | |
d = chord(:d, :major) | |
chords = [g, e, c, d] | |
live_loop :main do |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
live_loop :r do | |
(spread 3, 8).each do |b| | |
sample b ? :drum_tom_mid_hard : :drum_cymbal_closed | |
sleep 0.125 | |
end | |
end | |
use_synth :fm | |
live_loop :c do |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
live_loop :main do | |
use_synth :mod_fm | |
use_synth_defaults mod_range: 12 | |
play 48, pan: [-1, 0, 1].choose, release: 0.25 | |
play 60, pan: [-1, 0, 1].choose, release: 0.25 | |
play 72, pan: [-1, 0, 1].choose, release: 0.25 | |
sleep 0.125 | |
end | |
live_loop :sec do |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# wlazł kotek na płotek | |
use_bpm 120 | |
live_loop :mel do | |
play_pattern [67, 64, 64, 65, 62, 62] | |
play_pattern_timed [60, 64, 67], [0.75, 0.25, 2] | |
play_pattern [67, 64, 64, 65, 62, 62] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
live_loop :l do | |
use_synth :sine | |
with_fx :wobble, phase_offset: 0.66, wave: 1 do | |
play 60 | |
with_fx :echo, phase: 0.125, decay: 0.5 do | |
play 67, attack: 0.2 | |
play 60, attack: 0.2 | |
end |