Would you like to inspect the original subtitles? These are the user uploaded subtitles that are being translated:
1
00:00:00,256 --> 00:00:04,352
The last bit of our sound journey involves implementing
2
00:00:04,608 --> 00:00:05,120
Music
3
00:00:05,376 --> 00:00:07,424
And this is going to be a lot of fun
4
00:00:07,680 --> 00:00:08,960
It's going to be slightly
5
00:00:11,520 --> 00:00:13,312
We need to get our music
6
00:00:13,568 --> 00:00:14,080
Download
7
00:00:14,336 --> 00:00:14,848
So
8
00:00:15,104 --> 00:00:19,200
The website that I'm using for music is called free pdf
9
00:00:19,456 --> 00:00:22,272
The licence for all these songs
10
00:00:22,528 --> 00:00:23,552
Creative Commons zero
11
00:00:23,808 --> 00:00:27,392
Just public domain which is the same licence as the Kenney assets
12
00:00:27,648 --> 00:00:28,160
We've been using
13
00:00:28,416 --> 00:00:30,208
So that means that you can use
14
00:00:30,464 --> 00:00:30,976
The music
15
00:00:31,232 --> 00:00:32,000
However you want
16
00:00:32,256 --> 00:00:34,560
Without any promotion or address
17
00:00:35,072 --> 00:00:37,632
Required so what I did was I clicked on this
18
00:00:37,888 --> 00:00:38,656
Chronic sex
19
00:00:38,912 --> 00:00:41,216
Here and that brings up this page
20
00:00:41,472 --> 00:00:42,752
And I found this
21
00:00:43,008 --> 00:00:45,056
Bit of music here what they say
22
00:00:45,312 --> 00:00:47,104
Which I think matches the game really
23
00:00:47,360 --> 00:00:48,896
Sam is going to play this for a sec
24
00:00:54,784 --> 00:00:57,344
You can feel free to download whatever track you want
25
00:00:57,600 --> 00:01:00,397
This song will be attached as a resource
26
00:01:00,399 --> 00:01:02,747
Subtitled by
online-courses.club
We compress knowledge for you!
27
00:01:02,748 --> 00:01:03,232
To this lesson so you can download from
28
00:01:03,488 --> 00:01:06,816
Or you can go to 3 PD and shoes a music file that you
29
00:01:07,072 --> 00:01:07,840
Fits better
30
00:01:08,096 --> 00:01:10,144
And that you can just click on the menu here
31
00:01:10,400 --> 00:01:11,424
Download
32
00:01:11,680 --> 00:01:16,032
Once you've got that downloaded go ahead and dragged that into your Google file system
33
00:01:16,288 --> 00:01:19,104
Again sometimes it doesn't put it in the
34
00:01:19,360 --> 00:01:20,896
So you just have to make sure that
35
00:01:21,152 --> 00:01:22,432
That's going where you wanted to
36
00:01:22,688 --> 00:01:24,480
I actually don't know how it went
37
00:01:24,736 --> 00:01:25,248
Ok
38
00:01:26,272 --> 00:01:29,856
You again concert so if I said here it shows me where it is
39
00:01:30,112 --> 00:01:31,904
So there is my hair what they say
40
00:01:32,160 --> 00:01:38,048
What we're going to do for the music it's gonna make it in autoload know in the reason that we want to make the music and all alone
41
00:01:38,560 --> 00:01:42,144
Is because that means that no matter what scene were in in the current game
42
00:01:42,400 --> 00:01:43,680
The music will continue
43
00:01:43,936 --> 00:01:45,984
Play and that's the way that you want
44
00:01:46,496 --> 00:01:48,544
Right I'm going to create a scene
45
00:01:48,800 --> 00:01:49,312
News
46
00:01:49,568 --> 00:01:50,592
And I'm going to make
47
00:01:50,848 --> 00:01:51,616
The scene
48
00:01:51,872 --> 00:01:54,176
A root type of audio stream player
49
00:01:54,688 --> 00:01:55,456
And I'm going to call
50
00:01:55,712 --> 00:01:56,736
Music player
51
00:01:58,272 --> 00:01:59,296
I'm going to save this
52
00:01:59,552 --> 00:02:02,112
And I'm going to say this in seems Auto
53
00:02:02,624 --> 00:02:04,416
So seems an alert save it now
54
00:02:04,672 --> 00:02:09,024
Go ahead and drag over your song that you chose onto the stream property
55
00:02:09,280 --> 00:02:11,328
And make sure to change the bus to Muse
56
00:02:11,840 --> 00:02:15,168
Ok no music tends to be very very loud
57
00:02:15,680 --> 00:02:17,728
By default and so I'm going to turn down
58
00:02:17,984 --> 00:02:19,264
The volume here by 5
59
00:02:19,776 --> 00:02:24,384
Now I worry about volume so if we open up our busses again with the audio tab
60
00:02:24,640 --> 00:02:26,176
You have a bunch of different bites
61
00:02:26,432 --> 00:02:31,808
There's a volume slider on SFX bus a volume slider on the music by Santa volume slider on the master
62
00:02:32,064 --> 00:02:33,856
But there's also a volume
63
00:02:34,880 --> 00:02:37,184
The music player or the audio stream player
64
00:02:37,440 --> 00:02:38,464
Where you can set
65
00:02:38,720 --> 00:02:40,256
And basically
66
00:02:40,512 --> 00:02:42,816
What this volume DB represents
67
00:02:43,072 --> 00:02:44,096
Is Dad
68
00:02:44,352 --> 00:02:48,192
This changes sort of a natural volume of the sound another word
69
00:02:48,448 --> 00:02:50,496
Is everything is set to zero
70
00:02:50,752 --> 00:02:54,080
This sound will be -5 DB from what in
71
00:02:54,336 --> 00:02:54,848
This
72
00:02:55,104 --> 00:02:55,872
Sound file
73
00:02:56,128 --> 00:02:59,968
Install if I up the music volume here with this later
74
00:03:00,224 --> 00:03:03,040
They're still going to be a -5 DB offset
75
00:03:03,296 --> 00:03:08,160
Right so basically I'm saying take down the natural volume of the street
76
00:03:08,416 --> 00:03:09,440
By 5 DB
77
00:03:09,696 --> 00:03:10,464
And then
78
00:03:10,720 --> 00:03:13,792
You know the other additional volume changes will be applied
79
00:03:14,048 --> 00:03:17,888
To that so there's basically multiple levels of volume setting
80
00:03:18,144 --> 00:03:24,032
Assuming everything is set to zero this means that the volume of this sound will be at -5
81
00:03:24,288 --> 00:03:28,128
In other words you can think of this as like a relative offset this is basically saying
82
00:03:28,384 --> 00:03:29,920
Set it to 5 DB
83
00:03:30,176 --> 00:03:32,992
In addition to all of the other volume change
84
00:03:33,504 --> 00:03:34,272
Ride the bus
85
00:03:34,528 --> 00:03:37,088
How tall is all additive and cumulative
86
00:03:38,112 --> 00:03:39,136
So you've got a music
87
00:03:39,392 --> 00:03:42,464
What we're going to do is going to select auto play So turn that on
88
00:03:42,720 --> 00:03:43,488
And
89
00:03:43,744 --> 00:03:45,536
One thing that we want to do is
90
00:03:45,792 --> 00:03:47,584
This is not a looping
91
00:03:48,096 --> 00:03:49,888
It was a living track we were just
92
00:03:50,144 --> 00:03:50,656
Settle loop
93
00:03:50,912 --> 00:03:52,192
Anyway that we can do that
94
00:03:52,448 --> 00:03:56,288
Is there is a loop option here if you open up the stream where you can select
95
00:03:56,800 --> 00:03:57,824
So if you wanted to make
96
00:03:58,336 --> 00:04:01,920
You have to click on your hear what they say or whatever your song is called
97
00:04:02,176 --> 00:04:03,456
On the left-hand side
98
00:04:03,968 --> 00:04:04,480
And then
99
00:04:04,736 --> 00:04:06,016
Go to the import tab
100
00:04:06,272 --> 00:04:07,808
How do you have to sort out the loop
101
00:04:08,064 --> 00:04:08,576
Here
102
00:04:08,832 --> 00:04:11,136
To change the file to loop automatically
103
00:04:11,392 --> 00:04:12,160
And then play Cream
104
00:04:12,672 --> 00:04:15,488
And now you open up that stream you can do that loop is
105
00:04:15,744 --> 00:04:16,512
Set 2 on
106
00:04:16,768 --> 00:04:19,327
I don't want my name Luke but that is how you get it to
107
00:04:19,583 --> 00:04:20,351
If you want it to
108
00:04:20,607 --> 00:04:21,119
To do
109
00:04:22,399 --> 00:04:27,007
But since this is not a song I can smoothly I don't want to just keep playing it over and over
110
00:04:27,519 --> 00:04:28,287
So when I typically
111
00:04:28,799 --> 00:04:30,591
Is I like to add a little gap
112
00:04:30,847 --> 00:04:33,407
In-between the Replays of something like
113
00:04:34,431 --> 00:04:35,711
Santa at a timer
114
00:04:35,967 --> 00:04:37,247
Underneath this music player
115
00:04:37,503 --> 00:04:42,367
Wait I'm going to turn up to 15 seconds and I'm gonna turn on One Shot that's very
116
00:04:43,647 --> 00:04:44,159
Ok
117
00:04:44,415 --> 00:04:46,719
So I'm going to add a script to this music player
118
00:04:46,975 --> 00:04:48,767
So click and drop and click
119
00:04:50,303 --> 00:04:52,351
And then in the ready override
120
00:04:53,119 --> 00:04:56,191
All we want to do is we want to connect to the finish
121
00:04:56,447 --> 00:04:58,239
If I go to my new tab
122
00:04:58,495 --> 00:05:00,031
Where's my music player selector
123
00:05:00,287 --> 00:05:01,055
There is a fee
124
00:05:01,311 --> 00:05:01,823
Signal
125
00:05:02,079 --> 00:05:03,359
So I'm going to say finish
126
00:05:03,615 --> 00:05:04,639
Dartconnect
127
00:05:05,151 --> 00:05:05,663
On
128
00:05:05,919 --> 00:05:06,431
Finished
129
00:05:07,711 --> 00:05:08,479
And then
130
00:05:08,735 --> 00:05:09,759
I'm going to
131
00:05:10,271 --> 00:05:12,063
Create that method on fine
132
00:05:13,087 --> 00:05:14,623
And then I'm going to rest
133
00:05:14,879 --> 00:05:15,391
The timer
134
00:05:15,647 --> 00:05:17,695
And I'm gonna tell the timer to stop
135
00:05:18,975 --> 00:05:20,767
Now we need to connect to the time
136
00:05:21,279 --> 00:05:23,327
But now I need to connect to the timer timeouts
137
00:05:23,839 --> 00:05:26,143
I'm going to say in my ready method timer
138
00:05:26,655 --> 00:05:27,423
Time out
139
00:05:30,239 --> 00:05:31,263
On a timer
140
00:05:31,775 --> 00:05:32,287
Time out
141
00:05:34,591 --> 00:05:36,895
Let's Create that on timer timeout function
142
00:05:38,175 --> 00:05:42,015
And here we're going to tell the music player which is our route now to
143
00:05:42,271 --> 00:05:44,319
Play so sexy what's happening is
144
00:05:44,575 --> 00:05:46,879
It's going to autoplay cos we have auto plates
145
00:05:47,135 --> 00:05:47,647
2
146
00:05:47,903 --> 00:05:48,415
Truly
147
00:05:48,927 --> 00:05:50,719
Start playing as soon as the game starts
148
00:05:50,975 --> 00:05:53,023
When the when the I was done playing
149
00:05:53,279 --> 00:05:54,047
Is going to
150
00:05:54,303 --> 00:05:55,583
Call this on fine
151
00:05:56,095 --> 00:05:59,167
Method which is going to start the timer which is set to 15
152
00:05:59,679 --> 00:06:00,959
Then when the timer is done
153
00:06:01,215 --> 00:06:03,007
It's going to start playing the sound
154
00:06:03,519 --> 00:06:05,823
Essentially what we done if we have written code
155
00:06:06,079 --> 00:06:08,383
To introduce a 15-second delay
156
00:06:08,639 --> 00:06:09,919
Between Loops of the
157
00:06:10,431 --> 00:06:10,943
Ok
158
00:06:11,199 --> 00:06:15,551
So order lose all set up now the final thing is we need to add the auto load to our
159
00:06:15,807 --> 00:06:16,319
Configuration
160
00:06:16,575 --> 00:06:18,367
So I'm going to go after Project
161
00:06:18,623 --> 00:06:21,439
Project settings go to the auto load tab
162
00:06:21,695 --> 00:06:22,207
And I'm go
163
00:06:22,463 --> 00:06:23,231
Do you click the
164
00:06:23,743 --> 00:06:25,535
Open file button right
165
00:06:25,791 --> 00:06:27,583
And I'm going to go to scene
166
00:06:28,095 --> 00:06:28,863
Autoload
167
00:06:29,119 --> 00:06:32,703
And open up make sure it's like the music player dat tscm
168
00:06:32,959 --> 00:06:35,519
Not the dart GT so.gs
169
00:06:35,775 --> 00:06:36,287
Can opener
170
00:06:36,543 --> 00:06:37,055
And then
171
00:06:37,311 --> 00:06:37,823
Add
172
00:06:38,079 --> 00:06:39,871
And now we have our autoloading
173
00:06:40,383 --> 00:06:41,919
And every Run the game you should hear them
174
00:06:45,247 --> 00:06:49,087
Ok so I've got a couple of problems with your notice if you're playing a game for a little bit
175
00:06:49,343 --> 00:06:50,623
The music is still
176
00:06:50,879 --> 00:06:52,927
Really loud compared to the sound effects
177
00:06:53,183 --> 00:06:54,463
At least in my cases
178
00:06:54,719 --> 00:06:57,791
I'm going to turn down the volume even more to -10 DP
179
00:06:58,303 --> 00:06:59,327
And the other thing
180
00:06:59,583 --> 00:07:03,679
To do is we need to change the process mode down here on the musical
181
00:07:03,935 --> 00:07:04,703
To all
182
00:07:05,215 --> 00:07:09,311
Why because for parsing the seem tree when the upgrade screen is available
183
00:07:09,567 --> 00:07:12,127
And that is also parsing the music player
184
00:07:12,383 --> 00:07:13,151
The start of the scene
185
00:07:13,407 --> 00:07:16,991
But we can override that by telling it to ignore the past
186
00:07:17,503 --> 00:07:18,015
Bye
187
00:07:18,271 --> 00:07:19,295
Lightning process
188
00:07:19,551 --> 00:07:20,063
Always
189
00:07:20,319 --> 00:07:21,343
Sonos Run the game
190
00:07:24,415 --> 00:07:29,279
Ok I think that's much more reasonable I might even turn down my music to -12
191
00:07:29,535 --> 00:07:31,327
Just give it a little bit more
192
00:07:32,351 --> 00:07:33,887
More room for the sound of
193
00:07:34,655 --> 00:07:39,007
And I'm going to play the game and now when I get my upgrade I should be able to see
194
00:07:39,519 --> 00:07:41,055
That the music still plays
195
00:07:42,591 --> 00:07:46,431
Ok so how can we test that the music is
196
00:07:46,943 --> 00:07:47,711
Repeating
197
00:07:47,967 --> 00:07:48,479
When it is
198
00:07:49,503 --> 00:07:52,319
Well one way we can do that is we can just wait for
199
00:07:52,575 --> 00:07:53,599
To be done and
200
00:07:53,855 --> 00:07:54,367
Loops
201
00:07:54,623 --> 00:07:56,927
What's the weather I like to do that is I just
202
00:07:57,183 --> 00:07:58,719
To introduce
203
00:07:58,975 --> 00:08:04,863
Another sound effects I'll just drag over 4 instances impact mining here
204
00:08:06,143 --> 00:08:08,447
And then I'm just going to turn the volume up temporary
205
00:08:08,703 --> 00:08:11,263
Like 10 DB just annoyingly loud
206
00:08:11,519 --> 00:08:15,103
And then I should be able to hear this and then 15 seconds later hear it again
207
00:08:16,383 --> 00:08:18,175
Ok so it played on star
208
00:08:18,687 --> 00:08:19,711
And now I'm just going to wait
209
00:08:19,967 --> 00:08:21,759
15 seconds to see if it plays
210
00:08:23,039 --> 00:08:23,807
And it
211
00:08:24,063 --> 00:08:28,159
So that means it's working so I'm going to hit on do a couple times to undo
212
00:08:28,415 --> 00:08:29,183
All those changes
213
00:08:29,439 --> 00:08:31,743
And I verify that my music player will read
214
00:08:32,255 --> 00:08:34,815
Alright that's music implemented in our game
14610
Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.