My MacBook is heat up!

Hi!
I have MacBook Pro 15inch (2017).
When run Sonic Pi(chords as below), my laptop is heat up!(maybe it can fry bacon…)

use_bpm 80
use_debug false

live_loop :tick do
  tick
  sleep 1
end

live_loop :bell, sync: :tick do
  ##| stop
  bell = "mysample1"
  with_fx :reverb, mix: 0.7 do
    4.times do
      sample bell, amp: 0.5, rate: rrand(0.5, 2), sustain: 4, release: 2, pan: rrand(-0.8, 0.8), cutoff: 120
      sleep rrand(2, 4)
    end
  end
end

live_loop :kick, sync: :tick do
  ##| stop
  sample :bd_haus, amp: 1.3, cutoff: 80 if(spread 4, 11).tick
  sleep 0.25
end

live_loop :noi, sync: :tick do
  ##| stop
  use_synth :cnoise
  use_synth_defaults decay: 0.2, sustain: 0, sustain_level: 0.2, release: 0.2
  sleep 1
  play 60
  sleep 1
end

live_loop :hat, sync: :tick do
  ##| stop
  sample :drum_cymbal_closed, rate: 1.5, amp: rrand(0.3, 0.6), sustain: 0, release: rrand(0.3, 0.02), pan: -0.4 if one_in(2)
  sleep 0.25
end

live_loop :break, sync: :tick do
  ##| stop
  with_fx :hpf, cutoff: 50 do
    32.times do
      sample :loop_compus, rate: 2, onset: pick
      sleep 0.125
    end
  end
end

live_loop :monk, sync: :tick do
  ##| stop
  monk = "mysample2"
  sample monk, start: 0.486, sustain: 16, release: 1, amp: 0.7, pan: -0.4
  sleep 16
end

live_loop :kane, sync: :tick do
  ##| stop
  kane = "mysample3"
  sample kane, rate: 1, sustain: 6, release: 2, amp: 0.2
  sleep (4 * 16)
end

It is normal?
Is there a way to prevent the computer from overheating?
thanks.

I don’t think that this is normal. My computer is fine running your code. Also a Macbook, Mojave. Very cool drum section though! Are you using anything else besides Sonic-Pi?

Hi, Bubo.
Thank you for your answer.
You can download “mysample1~3” from this URL.
https://1.bitsend.jp/download/f521f984b497bff8d82c9a63839d2005.html

Sonic Pi and Vivaldi(browser) are running.
Of course, Browser does not open many tabs.

The battery will soon decrease, by the way.
Avg Energy Impact “40”

I can’t try with the samples now, but if you are using very long samples, be sure to kill them if they are overlapping frequently. Sometimes, you can definitely have an impact on your performances if a lot of them are stacked on top of each other. One solution could be to stretch them to fit the sleep number.
Something like this:

sample very_very_long_sample, beat_stretch: 20
sleep 20

My macbook pro gets quite hot sometimes running Sonic Pi if I am taxing it. Especially if I am using it with a visual program such as processing or Visor at the same time.