March 6, 2019

コードで感じるHey Joe

Hey Joe


!?!?!?!?!?!?!?

DC/PRGのHey Joe打ち込んでみましたァ〜〜〜

!?!?!?!?!?!?!?!?!?!?!?!?!?!?

やってみましょう。

やる

Sonic Piで以下を実行します。

##|  _   _                  _
##| | | | | ___ _   _      | | ___   ___
##| | |_| |/ _ \ | | |  _  | |/ _ \ / _ \
##| |  _  |  __/ |_| | | |_| | (_) |  __/
##| |_| |_|\___|\__, |  \___/ \___/ \___|
##|             |___/

use_bpm 105

# 17/16の1拍分の音価
BASELINE_NOTE = 4.25 / 17
# 4/4の1拍分の音価
LEADLINE_NOTE = 4.25 / 16
# 4/4の1/2拍分の音価
HALF_LEADLINE_NOTE = 4.25 / 16 / 2

define :baseSleep do |note|
  note = note += 1
  rest = BASELINE_NOTE * note
  sleep rest
end

define :leadSleep do |note|
  note = note += 1
  rest = LEADLINE_NOTE * note
  sleep rest
end

# ベースライン
live_loop :baseLine do
  use_synth :saw
  4.times do
    # 5 * 3 + 2 = 17
    5.times do
      play 62, amp: 1.0
      baseSleep(0)
      play 64, amp: 1.0
      baseSleep(1)
    end
    play 62, amp: 1.0
    baseSleep(0)
    play 59, amp: 1.0
    baseSleep(0)
  end
end

# 主旋律
live_loop :leadLine do
  use_synth :dsaw
  sleep 4.25 * 4
  # 4 * 4
  4.times do |cycle|
    leadFirstMeasure()
    leadSecondMeasure()
    leadThirdMeasure()
    leadFourthMeasure(cycle)
  end
end

# 主旋律 1小節目
define :leadFirstMeasure do
  play 71, amp: 1.0
  leadSleep(1)
  play 69, amp: 1.0
  leadSleep(0)
  play 67, amp: 1.0
  leadSleep(0)
  2.times do
    play 69, amp: 1.0
    leadSleep(0)
    play 67, amp: 1.0
    leadSleep(0)
    play 64, amp: 1.0
    leadSleep(0)
  end
  play 67, amp: 1.0
  leadSleep(1)
  play 64, amp: 1.0
  leadSleep(1)
end

# 主旋律 2小節目
define :leadSecondMeasure do
  play 62, amp: 1.0
  leadSleep(0)
  play 64, amp: 1.0
  leadSleep(0)
  play 67, amp: 1.0
  leadSleep(0)
  play 69, amp: 1.0
  leadSleep(0)
  play 71, amp: 1.0
  leadSleep(0)
  play 74, amp: 1.0
  leadSleep(0)
  play 71, amp: 1.0
  leadSleep(0)
  play 69, amp: 1.0
  leadSleep(0)
  play 64, amp: 1.0
  leadSleep(0)
  play 71, amp: 1.0
  leadSleep(0)
  play 69, amp: 1.0
  leadSleep(1)
  play 67, amp: 1.0
  leadSleep(0)
  play 69, amp: 1.0
  leadSleep(0)
  play 71, amp: 1.0
  leadSleep(1)
end

# 主旋律 3小節目
define :leadThirdMeasure do
  play 67, amp: 1.0
  leadSleep(0)
  play 69, amp: 1.0
  leadSleep(0)
  play 71, amp: 1.0
  leadSleep(0)
  play 76, amp: 1.0
  leadSleep(0)
  play 71, amp: 1.0
  leadSleep(1)
  play 71, amp: 1.0
  leadSleep(1)
  play 71, amp: 1.0
  leadSleep(1)
  play 70, amp: 1.0
  leadSleep(1)
  play 70, amp: 1.0
  leadSleep(1)
  play 69, amp: 1.0
  leadSleep(1)
end

# 主旋律 4小節目
define :leadFourthMeasure do |cycle|
  play 64, amp: 1.0
  leadSleep(0)
  play 64, amp: 1.0
  leadSleep(0)
  play 67, amp: 1.0
  leadSleep(1)
  play 64, amp: 1.0
  leadSleep(0)
  play 69, amp: 1.0
  leadSleep(1)
  if cycle % 2 == 0 then
    play 64, amp: 1.0
    leadSleep(1)
    play 71, amp: 1.0
    leadSleep(1)
    play 74, amp: 1.0
    leadSleep(0)
    play 71, amp: 1.0
    leadSleep(0)
    play 69, amp: 1.0
    leadSleep(4)
  elsif cycle % 2 == 1 then
    play 64, amp: 1.0
    leadSleep(0)
    2.times do
      play 70, amp: 1.0
      sleep HALF_LEADLINE_NOTE
      play 69, amp: 1.0
      sleep HALF_LEADLINE_NOTE
      play 67, amp: 1.0
      sleep HALF_LEADLINE_NOTE
      play 64, amp: 1.0
      sleep HALF_LEADLINE_NOTE
      play 67, amp: 1.0
      leadSleep(1)
    end
    play 64, amp: 1.0
    leadSleep(1)
  end
end

結果

リフと主旋律のみですが、無事17/16と4/4が同居していることが確認できました。
尊い。
しかし、元の動画の8:10以降をよくよく聴くと・・

https://youtu.be/ot0LKGjM9tM?t=490

17/16と6/8と4/4が同居している!?!?!?!?!?!?!?!?!?!?!?!?!?!?!?!?!?!?!?!?!?!?!?!?!?!?!?!?

取材班は南米へ飛んだ・・・(続く)

+----- Share ? -----+

© YK 2023

Powered by Hugo & Kiss.