Taking the homework of the topic as an example, we need to concentrate on doing our homework, which is a casual concern. This is a state that needs a certain will to maintain. At the same time, other sounds in the environment, all the actions that are happening, will also enter your brain. This is unconscious attention, which refers to people's unconscious perception of the environment. For example, in a noisy environment, you usually don't take the initiative to listen, and you can't hear the other person's voice, but the voice has actually been noticed by you. If someone is calling your name, even in a low voice, you will immediately realize that someone is calling you. In other words, casual attention evokes casual attention.
Back to the topic of homework, listening to music changes the object of involuntary attention from various complex environments into background music, which is considered to reduce the way of involuntary attention to casual attention. Music never calls your name (▽), and other types of sounds are similar.
Therefore, doing homework and listening to music is not listening to songs, but reducing the transformation from unconscious attention to casual attention, making it easier for you to maintain a state of casual attention. So as to complete the goal of doing homework.
Finally, the volume of music should be appropriate, otherwise music itself will become a spacious way of transformation.
Above, I hope to help the subject do his homework.