Recently, there has been a notable increase in interest surrounding the utilization of Deep Learning Approaches for AMCS in recent times. However, current methods often lack coherence and authenticity in the generated music. This study proposes a new approach that utilizes RNNs to bridge the gap between traditional compositional methods and modern deep learning techniques. The goal is to produce expressive and coherent musical pieces. Our methodology involves designing and implementing a customized RNN architecture that can effectively capture the complex temporal dependencies present in musical sequences. We experiment with different types of including LSTM networks, RNNs, and GRUs, to overcome challenges such as vanishing gradients and better model longer-term dependencies in music. To train the neural network efficiently and improve model convergence, various deep learning optimizers are utilized in our system. Specifically, we use SGD optimizer to improve the hyper parameters of LSTM and GRUs. The data for training is converted into MIDI format and analyzed, with music lines being identified through a similarity matrix technique. The MIDI data is then prepared for use in the LSTM and GRUs networks. The resulting music is assessed using both objective measures, such as mean squared error, and subjective approaches. This research adds to the advancements in automatic music composition by demonstrating the capability of RNNs in capturing and producing complex musical arrangements.