隨著人們對音樂的需求不斷增長,使得許多研究致力於音樂生成,其中在音樂的多樣性以及個人對音樂的共鳴是生成音樂最大的課題。在這項研究中,我們提出了GENPIA,一種基於音樂類別的鋼琴音樂生成系統。該系統涵蓋了動漫、R&B、爵士和古典音樂等多種音樂類別。為了構建此系統,我們收集和標記了各種音樂類型的音頻數據以實現我們研究的具體目標。在數據預處理過程中,我們應用了帶有擴展音樂類型信息的REMI音頻表示,以呈現具有更好數據結構的音頻數據。我們採用Transformer-XL作為模型,學習關於擴展音頻表示的知識,並生成所需的音頻。我們還利用名為Ailabs.tw 1K7的外部音樂資料集進行預訓練的需求。最終實驗結果可以從一個音樂鈴聽問卷得知,相比之前最先進的研究,GENPIA能夠在不同的音樂類別條件下生成更好的鋼琴作品。;With the demand for music continuing to grow as people seek variety and personal resonance, many works focus on music generation. In this research, we propose GENPIA, a genre-conditioned piano music generation system. The system encompasses Anime, R$\and$B, Jazz, and Classical music genres. To build our system, we collect and label audio data of various genres for the specific objective of our research. REMI audio representation with genre information extension is applied during data pre-processing to present the audio data with a better data structure. Transformer-XL is implemented as the model to learn knowledge about the extended audio representation and generate the desired output audio. An external dataset, called Ailabs.tw 1K7, is utilized for pre-training purposes. The results obtained from a listening questionnaire show that GENPIA can generate better piano pieces conditioned on different genres compared to the prior state-of-the-art work.