Mathober2023_Skew

Mathober2023_Skew

Skewed All Around

Skewedness

For the 7th Prompt Of Mathober: Skew, Skewedness takes Histograms coded in Python that contain two skewed arrays: red for the right and blue for the left. Then overlays them in various matters to get the outcome that is Skewedness.

Coded With Python & Sonic Pi

Poem

Skewed to the Hue
Skewed to the left
For Some Depth
Skewed to the right
To be Alright
Skewed to the Hue
That it chooses to Groove

Video

Code

Python

from matplotlib import pyplot as plt
import numpy as np

# generate 2 2D arrays of shape (6, 6) with random integers

#Right Skewed
Skewed_R = np.random.randint(12, 23, (8,8))

#Left Skewed
Skewed_L = np.random.randint(3, 18, (6,6))

# Creating histogram

#blues with  the left Skew
plt.hist(Skewed_L,
color = ["skyblue","blue","teal","cadetblue","aliceblue","azure"], 
bins='auto', label = 'skewed left')

#red with the right Skew
plt.hist(Skewed_R,
color = ["salmon","mistyrose","darkred","red","tomato","indianred","orangered",
"maroon"], bins='auto', label = 'skewed Right')  


# Show plot
plt.title("Skewed")
plt.show()

SonicPi


live_loop :breakline do
  use_bpm 120
  sample :loop_breakbeat,beat_stretch: 4
  sleep 2
end

with_fx :ixi_techno, mix: rrand_i(0.1,1) do
  live_loop :breakline1, sync: :breakline do
    use_bpm 120
    sample :loop_breakbeat,beat_stretch: 2
    sleep 2
  end
end

live_loop :breakline2, sync: :breakline do
  use_bpm 120
  sample :loop_breakbeat,beat_stretch: 2
  sleep 2
end

with_fx :whammy,mix: 0.7, transpose: rrand_i(12,16) do
  live_loop :breakline3, sync: :breakline do
    use_bpm 120
    sample :loop_breakbeat,beat_stretch: 4
    sleep 2
  end
end