This article is the 18th day of iCARE Advent Calendar 2020.
"I was making music!" "I'm touching my DAW!" I think this is really the case in the engineering community. Why lol I am one of them, and I make songs of genres called electronica and IDM.
By the way, do you all know ** Sonic Pi **? When I learned that this tool can be used to make music in Ruby, I found it to be a very interesting and useful tool. And this article says ** If you keep this down, you can make something like that with Sonic Pi **.
Sonic Pi As mentioned above, download and use Sonic Pi. If you search on Qiita for an overview, you will find various information, so I will not introduce it in detail, but You can play sounds by writing and executing Ruby in this environment.
I feel that electronic music and experimental music are more songs that use sounds that are intentionally generated by chance than songs that are carefully calculated. Strange three-dimensional effect, mysterious sound, messy but comfortable rhythm, noise, etc. And Sonic Pi makes it easy to generate such random sounds. it's the best. Yes.
What is a glitch?
An error in a digital device, the noise caused by it, or a method of creating a work using them. This technique appeared in music in the mid-1990s and began to be referred to by the term "glitch", meaning accidental and minor flaws. https://artscape.jp/artword/index.php/%E3%82%B0%E3%83%AA%E3%83%83%E3%83%81
I will omit it in this article. It is written in detail in this article, so if you are interested, please. It is very easy to understand.
#Four beat of the kick
live_loop :kick do
use_bpm 60
sample :bd_haus, rate: 0.8, release: 0.4, amp: 0.5
sleep 1 #Rest one beat
end
#Hit the same kick by shifting the top
live_loop :kick2 do
sleep 0.75
sample :bd_haus, rate: 0.5, amp: 0.7
end
#Create an atmosphere with ambience and soft sounds
live_loop :ambi_dark do
sample :ambi_dark_woosh, rate: 0.5, finish: 0.2
sleep 0.5
end
#percussion
live_loop :perc do
#Apply distortion effect
with_fx :distortion do
sample :glitch_perc1, rate: 0.2, finish: 0.05, amp: 0.05
sleep 1.5
end
end
#Percussion 2
live_loop :perc2 do
#Randomize the rate and change the expression for each playback
sample :glitch_perc5, rate: rrand(0.1, 1.5), amp: 0.1, slice: 0.1
sleep 0.125
end
What you are doing is simple
Sonic Pi provides many sound samples by default
You can easily call the sample just by typing sample hoge
.
rate
rate can change the speed of the sound.
1 is the standard length, 0.5 is the sound played at half the standard speed.
Playing at half speed not only slows down, but also lowers the pitch.
When you hit the glass with chopsticks, it sounds like a chain
,
sample :chine, rate: 0.1
If so, it will sound as jiiiiiiiiiiiiiiiiiiiiinnnnn
.
Also, if you set a negative value, it will be a favorite of electronic musicians, reverse playback.
sample :chine, rate: -1
Nnnuuuuuuiiiiiiiii ↑↑
Is it like that? I'm sorry I'm not good at expressing.
It is an image that if you rate the cymbal: -1, it becomes a reverse cymbal.
The rate option that changes the tone and pitch at once is wonderful.
amp, release amp is the volume 1 is standard, 0.5 is half the volume. Release is the so-called ADSR (Attack, Decay, Sustain, Release) Release, which refers to the attenuated sound. Is it close to the afterglow?
At the beginning of the source above, I set release to 0.4. I aimed for a sharp kick with less lingering sound so as not to interfere with other elements that give a glitchy feeling.
#Basic kick
live_loop :kick do
use_bpm 60
sample :bd_haus, rate: 0.8, release: 0.4, amp: 0.5
sleep 1 #1 beat rest
end
As you can guess from the name, it is possible to randomize the number set with the rrand option. At the end of the source, I use it at the rate of percussion 2.
#Percussion 2
live_loop :perc2 do
sample :glitch_perc5, rate: rrand(0.1, 1.5), amp: 0.1, slice: 0.1
sleep 0.125
end
By setting rate: rrand (0.1, 0.5)
, a value between 0.1 and 0.5 will be set randomly each time you loop in one bar.
By doing this, you can change the sound in each measure ...
In other words, you can ** sublimate from a mechanically monotonous sound to a live sound **.
it's the best.
I recorded it for about 1 minute and uploaded it to soundcloud. (Earphone recommended) https://soundcloud.com/tenten1105/sonic_pi-beat
I think I made something very good! The Sonic Pi also has a recording function, and it is nice that the executed data is immediately written out with wav on the spot.
The Sonic Pi that can do this with that much code is really great.
I used sample this time, but of course you can also use a recording of data or environmental sounds created in your own DAW, process it with rrand, and then return it to your DAW for production. The possibilities are endless! Thank you, Ruby. Thank you, Sonic Pi.
Recommended Posts