Chulalongkorn University Theses and Dissertations (Chula ETD)
Other Title (Parallel Title in Other Language of ETD)
การสร้างสรรค์ดนตรีด้วยโมเดลภาษาขนาดใหญ่ : กรณีศึกษาจากเพลงไทยเดิม
Year (A.D.)
2025
Document Type
Thesis
First Advisor
Pittipol Kantavat
Second Advisor
Yos Vaneesorn
Faculty/College
Faculty of Engineering (คณะวิศวกรรมศาสตร์)
Department (if any)
Department of Computer Engineering (ภาควิชาวิศวกรรมคอมพิวเตอร์)
Degree Name
Master of Science
Degree Level
Master's Degree
Degree Discipline
Computer Science
DOI
10.58837/CHULA.THE.2025.193
Abstract
This study presents a framework for music generation using Large Language Models (LLMs), focusing on the creation of symbolic compositions in the style of traditional Thai music. The framework integrates prompting techniques, retrieval-augmented generation (RAG), and multi-agent collaboration to guide the model in producing melodies that reflect Thai musical characteristics. ABC notation is used as the primary representation, allowing LLMs to process musical structure in a text-based format. The system incorporates curated Thai musical examples and theoretical knowledge to support culturally informed generation, while multiple agents work together to compose, evaluate, and refine musical ideas using rubric-based criteria adapted from traditional Thai music pedagogy. Experimental results show that the proposed framework improves rhythmic coherence and enhances aspects of melodic structure compared to a single-agent baseline, although challenges remain in modeling pitch distribution, partly due to limited symbolic traditional Thai music data. Overall, this research demonstrates the potential of LLMs to support the preservation and study of traditional Thai music while providing an accessible tool for users without expertise in artificial intelligence or music theory, offering a practical approach for integrating modern AI techniques into culturally significant musical traditions.
Other Abstract (Other language abstract of ETD)
การศึกษาครั้งนี้นำเสนอกรอบแนวคิดสำหรับการสร้างสรรค์ดนตรีโดยใช้โมเดลภาษาขนาดใหญ่ (Large Language Models - LLMs) โดยมุ่งเน้นไปที่การประพันธ์เพลงในรูปแบบสัญลักษณ์ตามขนบดนตรีไทยเดิม กรอบแนวคิดนี้บูรณาการเทคนิคการใช้คำสั่ง (Prompting) การสร้างข้อความโดยอาศัยการค้นคืนสารสนเทศ (Retrieval-Augmented Generation - RAG) และการทำงานร่วมกันของตัวแทนปัญญาประดิษฐ์หลายตัว (Multi-agent collaboration) เพื่อชี้นำให้โมเดลสามารถสร้างท่วงทำนองที่สะท้อนถึงอัตลักษณ์ของดนตรีไทย โดยระบบนี้เลือกใช้ ABC notation เป็นรูปแบบหลักในการแทนข้อมูล ซึ่งช่วยให้ LLMs สามารถประมวลผลโครงสร้างทางดนตรีได้ในรูปแบบข้อความ ทั้งนี้ ระบบได้รวบรวมตัวอย่างเพลงไทยเดิมที่คัดสรรมาอย่างดีและองค์ความรู้ทางทฤษฎีเพื่อสนับสนุนการสร้างสรรค์ที่ถูกต้องตามบริบททางวัฒนธรรม ในขณะเดียวกัน ตัวแทนปัญญาประดิษฐ์หลายตัวจะทำงานร่วมกันเพื่อประพันธ์ ประเมิน และปรับปรุงแนวคิดทางดนตรี โดยใช้เกณฑ์การประเมินแบบ Rubric ที่อ้างอิงจากหลักการดนตรีไทยเดิม ผลการทดลองแสดงให้เห็นว่ากรอบแนวคิดที่นำเสนอช่วยปรับปรุงความสอดคล้องทางจังหวะและช่วยให้โครงสร้างทำนองบางด้านดีขึ้นเมื่อเปรียบเทียบกับระบบที่ใช้ตัวแทนเดี่ยว (Single-agent baseline) แม้ว่าจะยังคงมีความท้าทายในการสร้างแบบจำลองการกระจายตัวของระดับเสียง ซึ่งเป็นส่วนหนึ่งของสาเหตุที่เกิดจากความจำกัดของข้อมูลดนตรีไทยในรูปแบบสัญลักษณ์ แต่โดยภาพรวม งานวิจัยนี้แสดงให้เห็นถึงศักยภาพของ LLMs ในการสนับสนุนการอนุรักษ์และส่งเสริมความเข้าใจในดนตรีไทยเดิม พร้อมทั้งเป็นเครื่องมือที่เข้าถึงได้ง่ายสำหรับผู้ใช้งานที่อาจไม่มีความเชี่ยวชาญด้านปัญญาประดิษฐ์หรือทฤษฎีดนตรี ซึ่งถือเป็นการนำเสนอแนวทางปฏิบัติจริงในการบูรณาการเทคนิคปัญญาประดิษฐ์สมัยใหม่เข้ากับมรดกทางดนตรีที่มีความสำคัญทางวัฒนธรรม
Creative Commons License

This work is licensed under a Creative Commons Attribution-NonCommercial-No Derivative Works 4.0 International License.
Recommended Citation
Kunasorn, Sutusta, "Music generation using large language models : a case study on traditional Thai music" (2025). Chulalongkorn University Theses and Dissertations (Chula ETD). 75115.
https://digital.car.chula.ac.th/chulaetd/75115