Skip to main content

Command Palette

Search for a command to run...

CodeJourney_InverseCode

Inversing Code

Updated
1 min read
CodeJourney_InverseCode

CodeInversion

For this Code Journey, I am playing around with LiveCodeLab sketches that are the inverse of each other. With sound design coded in SonicPi.

Video

LiveCodeLab Code

FIrst Duo

ball move box rotate ball
move peg rotate sin(time) rect
scale wave(0.03) rect
rect wave(0.03) scale
rect sin(time) rotate peg move
ball rotate box move ball

Second Duo

ball move box rotate ball
move peg Math.cbrt(time % 12), wave(sin(time)/0.3)  rotate sin(time) rect
scale wave(0.03) rect
rect wave(0.03) scale
rect sin(time) rotate wave(sin(time)/0.3), Math.cbrt(time % 12) peg move
ball rotate box move ball

SonicPi

live_loop :do do
  use_random_seed Time.now.to_i / 2
  with_fx :ixi_techno, mix: [0.15,0.35,0.57,0.74].tick do
    use_bpm 120
    sample [:bd_808,:elec_triangle,:ambi_piano].choose, amp: 5 if spread(5,8).tick
    sleep [0.25,0.5,0.75,1].choose
  end

end



live_loop :do1 do
  use_random_seed Time.now.to_i / 4
  with_fx :ixi_techno, mix: [0.15,0.35,0.57,0.74].choose do
    use_bpm  60
    sample [:bd_gas,:elec_blup,:ambi_piano].choose, amp: 5 if spread(17,24).tick
    sleep [0.25,0.5,0.75,1].choose
  end

end

Video

CodeJourney

Part 4 of 5

Coded Explorations and the outputs derived from them

Up next

CodeJourney_MoreNonnets

Some More Code Poetry