Before a patient undergoes surgery, they are likely to complain of anxiety to various degrees. To address this issue, we designed and implemented a composition program using TensorFlow Recurrent Neural Networks (RNNs) to select music for learning. The nurses’ preferences and needs were assessed using the Geneva Emotional Music Scales-9 (GEMS-9) tool and focus group interview (FGI) methods for currently used sound sources and nurses at the operating room entrance. An FGI and GEMS-9 for preference analysis were conducted by nurses who currently work in the operating room, had experience with managing the operating room’s background music, and wished to participate voluntarily in this study on 31 January 2019 in an operating room simulation center. Interviews were held with a total of three nurse. The data were analyzed using a qualitative thematic analysis. Using GEMS-9 to evaluate 16 sample sources, the average of the sad–happy values was highest at four points, with a lower tension of 1.48. Happy, Joy, and Peaceful were classified as appropriate for background music in the operating room. Additionally, the top six songs were selected as suitable songs by calculating the difference in values among Sad, Tension, Tender, Nostalgia, and Trance, which were judged to be inappropriate along with Power and Wonder. The songs selected were two jazz songs, three bossa nova songs, and two piano classical songs. The results of this study show that music used in the operating room should contain a slow tempo such as slow classical, piano, strings, natural acoustics, and new age music. Music consisting of only musical instruments (preferably containing smaller arrangements of less than five instruments) is preferred over music containing human vocals. Based on the study findings, the conditions of the sound source to be used for learning were suggested after consulting with a music expert.