# Psycho Killer by Talking Heads

**URL:** https://in-thread.sonic-pi.net/t/psycho-killer-by-talking-heads/3998
**Category:** Creations & Ideas
**Created:** [June 5, 2020, 1:41am UTC](https://in-thread.sonic-pi.net/t/psycho-killer-by-talking-heads/3998 "2020-06-05T01:41:31Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![Smoreno](https://avatars.discourse-cdn.com/v4/letter/s/a6a055/32.png) [@Smoreno](https://in-thread.sonic-pi.net/u/Smoreno)
#### Post date: [June 5, 2020, 1:41am UTC](https://in-thread.sonic-pi.net/t/psycho-killer-by-talking-heads/3998/1 "2020-06-05T01:41:31Z")

</div>

Psycho Killer by Talking Heads (Piano Cover)  
#[https://www.youtube.com/watch?v=PZ6m\_bKvbqI](https://www.youtube.com/watch?v=PZ6m_bKvbqI)  
#[https://www.songsterr.com/a/wsa/talking-heads-psycho-killer-drum-tab-s55473t3](https://www.songsterr.com/a/wsa/talking-heads-psycho-killer-drum-tab-s55473t3)

#Coded by Sergio  
use\_bpm 120

in\_thread do  
loop do  
cue :PsK  
sleep 1  
end  
end

##### Metronomo

m = (line 0, 114, steps: 114) # numeración del compás 4 por 4

in\_thread do  
sync :PsK  
114.times do  
puts inc m.tick # valor incremental de la variable “m”  
puts “_A_”  
sleep 1  
puts “_B_”  
sleep 1  
puts “_C_”  
sleep 1  
puts “_D_”  
sleep 1  
end  
end

##### Metronomo

####### Inicio DEFINICIONES TAMBORES#######

define :compás\_5 do  
sync :PsK  
puts “C\_5 TMB C\_5 TMB C\_5 TMB”  
at [1, 2, 3, 4],[{:amp=\>0.2, pan: -1}, {:amp=\> 0.2, pan: 0},{:amp=\>0.2, pan: 1}, {:amp=\> 0.2, pan: 0}] do |p|  
sample :drum\_bass\_soft, p  
end  
sleep 1  
end

define :compás\_12 do  
sync :PsK  
at [3] do  
use\_sample\_defaults amp: 0.1, pan: -0.5  
sample :drum\_cymbal\_hard  
use\_sample\_defaults amp: 0.1, pan: 0.5  
sample :drum\_snare\_hard  
end  
end

define :compás\_13 do  
sync :PsK  
puts “C\_13 TMB C\_13 TMB C\_13 TMB”  
use\_sample\_defaults amp: 0.1, pan: 0.5  
at [0,1,2,3] do  
sample :drum\_cymbal\_closed  
end  
at [1,3] do  
sample :drum\_snare\_hard  
end  
end

define :compás\_21 do  
sync :PsK  
puts “C\_21 TMB Psycho Killer TMB”  
at [0] do  
sample :drum\_cymbal\_hard  
end  
at [1,2,3] do  
sample :drum\_snare\_hard  
sample :drum\_cymbal\_closed  
end  
end

define :compás\_22 do  
sync :PsK  
puts “C\_22 TMB C\_22 TMB C\_22 TMB”  
at [0,1,2,3] do  
sample :drum\_snare\_hard  
sample :drum\_cymbal\_closed  
end  
end

define :compás\_39 do  
sync :PsK  
puts “C\_39 TMB C\_39 TMB C\_39 TMB”  
at [0] do  
sample :drum\_cymbal\_hard  
end  
at [1, 3] do  
sample :drum\_snare\_hard  
end  
at [1,2,3] do  
sample :drum\_cymbal\_closed  
end  
end

define :compás\_112 do  
in\_thread do  
sync :PsK  
puts “C\_112 TMB C\_112 TMB C\_112 TMB”  
at [3] do  
sample :drum\_cymbal\_hard  
end  
at [1,3] do  
sample :drum\_snare\_hard  
end  
at [1,2,3] do  
sample :drum\_cymbal\_closed  
end  
end  
end

###### 

define :compás\_13\_20 do  
8.times do  
compás\_13  
end  
end

###### 

define :compás\_25\_28 do  
3.times do  
compás\_21  
end  
compás\_22  
end

###### 

define :compás\_93 do  
3.times do  
compás\_21  
end  
compás\_22  
end #96  
####### FIN DEFINICIONES TAMBORES#######

####### Inicio TAMBORES#######  
in\_thread do  
sync :PsK  
in\_thread do  
wait 4_4  
114.times do  
compás\_5  
end  
end  
wait (11_4)  
compás\_12  
compás\_13\_20  
2.times do  
compás\_21  
compás\_22  
end  
2.times do #25  
compás\_25\_28  
end #36  
2.times do #37  
compás\_21  
end  
compás\_39  
11.times do  
compás\_13  
end #50  
2.times do #51  
compás\_21  
compás\_22  
end#54  
4.times do  
compás\_25\_28 #55  
end #70  
6.times do #71  
compás\_22  
end #76  
2.times do #77  
compás\_21  
compás\_22  
end #80  
compás\_39 #80  
7.times do  
compás\_13  
end #88  
2.times do  
compás\_21 #89  
compás\_22  
end #92  
3.times do  
compás\_93  
end #104  
2.times do  
compás\_21 #105  
end #106  
compás\_39 #107  
3.times do  
compás\_13  
end #110  
compás\_39 #111  
compás\_112  
3.times do #114  
compás\_22  
end #116  
2.times do #117  
compás\_13  
end  
end  
####### Fin TAMBORES#######

---

<div class="post-metadata">

### Author: ![ethancrawford](https://avatars.discourse-cdn.com/v4/letter/e/a88e4f/32.png) [@ethancrawford](https://in-thread.sonic-pi.net/u/ethancrawford)
#### Post date: [June 5, 2020, 6:34am UTC](https://in-thread.sonic-pi.net/t/psycho-killer-by-talking-heads/3998/2 "2020-06-05T06:34:00Z")

</div>

Looks interesting @Smoreno!  
It seems that there’s a few things that still need doing to get it working, based on just copying and pasting the above code.  
Pasting the above code into Sonic Pi and running as is doesn’t work for me for a few reasons - the quotes around the `puts` strings you print out are ‘fancy quotes’, and Sonic Pi does not interpret them correctly - (if you replace those with `"` then they are).  
Also, I’m _guessing_ that `Metronomo` is possibly just a comment in the code? the forum here interpreted it as a formatted heading, and when pasted into Sonic Pi it’s treated like a variable or function name - so what is needed I think is to stop the forum here from thinking `Metronomo` is a heading. The way to do this is to have an extra line above and below your code snippet, and place three back-ticks on both these lines: ```. This treats anything between those lines strictly as a code snippet, with handy syntax highlighting 🙂

---

<div class="post-metadata">

### Author: ![nlb](https://dub1.discourse-cdn.com/flex017/user_avatar/in-thread.sonic-pi.net/nlb/32/997_2.png) [@nlb](https://in-thread.sonic-pi.net/u/nlb)
#### Post date: [June 5, 2020, 8:23am UTC](https://in-thread.sonic-pi.net/t/psycho-killer-by-talking-heads/3998/3 "2020-06-05T08:23:29Z")

</div>

> [@ethancrawford](#):
>
> The way to do this is to have an extra line above and below your code snippet, and place three back-ticks on both these lines: ```. This treats anything between those lines strictly as a code snippet, with handy syntax highlighting 🙂

hi @ethancrawford,

i think this should be more visible when people get member ; how many times do we write these lines ? So where is the welcome guide ?

---

<div class="post-metadata">

### Author: ![ethancrawford](https://avatars.discourse-cdn.com/v4/letter/e/a88e4f/32.png) [@ethancrawford](https://in-thread.sonic-pi.net/u/ethancrawford)
#### Post date: [June 5, 2020, 8:54am UTC](https://in-thread.sonic-pi.net/t/psycho-killer-by-talking-heads/3998/4 "2020-06-05T08:54:53Z")

</div>

Sounds like a good idea, I’ll create a pinned post 🙂

---

<div class="post-metadata">

### Author: ![nlb](https://dub1.discourse-cdn.com/flex017/user_avatar/in-thread.sonic-pi.net/nlb/32/997_2.png) [@nlb](https://in-thread.sonic-pi.net/u/nlb)
#### Post date: [June 5, 2020, 10:16am UTC](https://in-thread.sonic-pi.net/t/psycho-killer-by-talking-heads/3998/5 "2020-06-05T10:16:12Z")

</div>

oups there is already this :

> [@Read First - Welcome To The Sonic Pi Community](https://in-thread.sonic-pi.net/t/read-first-welcome-to-the-sonic-pi-community/8):
>
> Hello there, Welcome to in\_thread, the Sonic Pi community. Here you’ll find lots of lovely folks sharing ideas, thoughts and good will. information_source In this guide: Say hello; Find help; Format text & code, and more! [P] - Patreon Supporters There are a number of categories that start with [P] in their name. This are free to read by anyone, but to create new conversations and get involved with existing ones, you need to become a Patreon supporter: [https://patreon.com/samaaron](https://patreon.com/samaaron). This sup…

---

<div class="post-metadata">

### Author: ![ethancrawford](https://avatars.discourse-cdn.com/v4/letter/e/a88e4f/32.png) [@ethancrawford](https://in-thread.sonic-pi.net/u/ethancrawford)
#### Post date: [June 5, 2020, 11:56am UTC](https://in-thread.sonic-pi.net/t/psycho-killer-by-talking-heads/3998/6 "2020-06-05T11:56:13Z")

</div>

Yes, I saw that too! Going to edit it to hopefully make formatting a little more obvious 🙂

---

<div class="post-metadata">

### Author: ![Martin](https://dub1.discourse-cdn.com/flex017/user_avatar/in-thread.sonic-pi.net/martin/32/157_2.png) [@Martin](https://in-thread.sonic-pi.net/u/Martin)
#### Post date: [June 5, 2020, 12:42pm UTC](https://in-thread.sonic-pi.net/t/psycho-killer-by-talking-heads/3998/7 "2020-06-05T12:42:18Z")

</div>

Actually I think [there is already one](https://in-thread.sonic-pi.net/t/read-first-welcome-to-the-sonic-pi-community/8) (see heading “Code blocks”).

In my experience this is a question candidate for the FAQ. But I believe this won’t help because FAQ are usually not the same as FRQaA (frequently read questions and answers).

😉

I help myself and have a bookmarked link which I can post [like here](https://in-thread.sonic-pi.net/t/dynamic-methodsmade-from-a-loop/3760/4)…
