Fyp Report
Fyp Report
Jnana Sangama,Belgaum-590018
A PROJECT REPORT
ON
”AI approach to discover similar music pattern and build a
recommendation System”
Submitted in partial fulfilment of the requirements for the award of the degree of
BACHELOR OF ENGINEERING
IN
INFORMATION SCIENCE AND ENGINEERING
Submitted by
CERTIFICATE
Certified that the project work entitled ”AI approach to discover similar music
pattern and build a recommendation System” is a bonefide work carried out by
Shristi Purusarthi 1CR20IS152
Shruti Sagar 1CR20IS153
Vishnu Shriya 1CR20IS189
NAME:
USN:
ABSTRACT
To determine how similar two songs are, an algorithm has been created. Knowing the
note structures and fundamental frequencies of each note in the two songs under ex-
amination allowed for the determination of how similar the song patterns were. This
study makes use of the statistical concept known as Correlation of Coefficient. Using
the 16 Note-Measure Method yields the correlation of Coefficient. The patterns of
the two songs under consideration are comparable if the correlation coefficient is close
to 1. If not, there is just a specific amount of resemblance. A number of songs with
an Indian Classical Music (ICM) background make use of this fundamental idea.
To fully comprehend musical compositions, one must grasp the intricate link that
exists between statistical analysis and music theory. This research attempts to ex-
plore the essence of music via a mathematical lens by comparing songs according to
their basic frequencies and pitch using the correlation coefficient. By deconstructing
compositions into its fundamental pitch and frequency elements, scholars and artists
may assess how similar various musical works are to one another, providing insight
into the underlying structures and patterns of musical expression.In Indian Classi-
cal Music (ICM), where improvisation within well-known ragas and talas forms the
fundamental basis of the genre, this method has particular importance. ICM turns
as a productive research platform that offers insight into the intricate interactions
between.
i
ACKNOWLEDGMENT
We consider it a privilege and honour to express our sincere gratitude to our in-
ternal guide Prof. Deepa Harish , Assistant Professor, Department of Information
Science and Engineering, CMRIT, Bangalore, for their valuable guidance throughout
the tenure of this project work.
We would like to thank all the faculty members who have always been very co-
operative and generous. Conclusively, we also thank all the nonteaching staff and all
others who have done immense help directly or indirectly during our project.
Shristi Purusarthi
Shruti Sagar
Vishnu Shriya
ii
Contents
Abstract i
Acknowledgment ii
Table of Content iv
List of Figures v
1 PREAMBLE 1
1.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.2 Existing System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
1.2.1 Drawbacks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
1.3 Proposed System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
1.4 Plan of Implementation . . . . . . . . . . . . . . . . . . . . . . . . . . 6
1.5 Problem Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
1.6 Objective of the System . . . . . . . . . . . . . . . . . . . . . . . . . 7
2 LITERATURE SURVEY 9
3 THEORETICAL BACKGROUND 15
3.1 Python . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
3.2 Django . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
3.3 SQL Workbench . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
5 System Analysis 26
5.1 Feasibility Study . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
5.1.1 Economical Feasibility . . . . . . . . . . . . . . . . . . . . . . 26
5.1.2 Technical Feasibility . . . . . . . . . . . . . . . . . . . . . . . 26
5.1.3 Operational Feasibility . . . . . . . . . . . . . . . . . . . . . . 26
5.2 Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
5.2.1 Performance Analysis . . . . . . . . . . . . . . . . . . . . . . . 27
iii
5.2.2 Technical Analysis . . . . . . . . . . . . . . . . . . . . . . . . 27
5.2.3 Economical Analysis . . . . . . . . . . . . . . . . . . . . . . . 27
6 System Design 28
6.1 System Development Methodology . . . . . . . . . . . . . . . . . . . 28
6.2 Flow Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
6.3 Methodology . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
6.4 Tools Used . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
6.5 Dataset Explaination . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
7 Implementation 37
7.1 Authentication : Login-Sigup . . . . . . . . . . . . . . . . . . . . . . 37
7.2 About Page . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
7.3 Django framework . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
7.4 Configuration page . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
7.5 Views.py(API Calls and Page rendering . . . . . . . . . . . . . . . . . 45
7.6 URL Configuration of APIs . . . . . . . . . . . . . . . . . . . . . . . 48
7.7 Registration configuration from backend . . . . . . . . . . . . . . . . 49
7.8 Server Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
7.9 Javascript Configuration . . . . . . . . . . . . . . . . . . . . . . . . . 50
7.10 Views.py(API Calls and Page rendering . . . . . . . . . . . . . . . . . 55
8 Testing 58
8.1 Testing Methodologies . . . . . . . . . . . . . . . . . . . . . . . . . . 58
8.1.1 White Box Testing . . . . . . . . . . . . . . . . . . . . . . . . 58
8.1.2 Black box testing . . . . . . . . . . . . . . . . . . . . . . . . . 59
8.2 Unit Testing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
8.3 System Testing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
8.4 Quality Assurance . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
8.5 Quality Factor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
8.6 Functional Test . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
11 Conclusion 69
iv
List of Figures
2.1 Relationship between music recommendation and therapy . . . . . . . 11
6.2 Waterfall model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
6.3 Flow daigram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
6.4 System architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
6.5 System architecture flow . . . . . . . . . . . . . . . . . . . . . . . . . 32
6.6 ER Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
8.7 white box testing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
8.8 black box testing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
9.9 User Authentication . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
9.10 Home page after login . . . . . . . . . . . . . . . . . . . . . . . . . . 64
9.11 A search space for user for recommendation on songs . . . . . . . . . 65
9.12 List Of songs Recommendation . . . . . . . . . . . . . . . . . . . . . 65
9.13 Mood search for user . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
9.14 Recommendation for mood search . . . . . . . . . . . . . . . . . . . . 66
v
1 PREAMBLE music recommendation system
1 PREAMBLE
1.1 Introduction
The correlation coefficient will be used in this study to compare songs based on
their basic frequencies and pitch structures in order to shed light on the intricate link
between statistical analysis and music theory. Scientists and musicians can quantify
the degree of resemblance between various pieces of music by reducing them down into
their most fundamental components, notes and frequencies. This analytical technique
not only uncovers the compositions’ underlying links, but it also serves as a frame-
work for comprehending the complexities of music production.This study focuses on
the notion of Indian Classical Music (ICM), a genre renowned for its profundity and
intricacy. In ICM, improvisation is an essential component of creative expression in
established ragas and houses. The correlation coefficient approach is applied here.
The purpose of this study is to shed light on the intricate link between statistical
analysis and music theory by comparing songs based on their basic frequencies and
pitch structures. Scientists and musicians can quantify the degree of resemblance
between various pieces of music by reducing them down into their most fundamental
components - notes and frequencies. This analytical technique not only uncovers the
compositions’ underlying links, but it also gives a foundation for comprehending the
complexities of music creation.This study focuses on the notion of Indian Classical
Music (ICM), which is noted for its tremendous depth and intricacy. Improvisation
is an important aspect of creative expression in established ragas and houses in ICM.
The correlation coefficient approach is used here.
1.2.1 Drawbacks
The existing music recommendation system and applications presents several chal-
lenges and shortcomings that hinder users experience and not designed according to
the user’s need and requirement:
1. Variety of recommendations.: Many existing music recommendation sys-
tems tend to prioritize popular or mainstream content, resulting in a lack of recom-
mendation diversity. As a result, users may be exposed to a narrow range of artists,
genres or songs, limiting opportunities for research and discovery.
2. Context settings capture inability: Contextual preferences, which can
greatly impact music listening decisions, such as mood, activity level, or time of day,
may be difficult for existing recommendation algorithms to quantify. Recommenda-
tions that don’t fit the user’s present environment or mood may arise from ignoring
these elements.
3. Inefficient use of dynamic settings: Due to a variety of circumstances,
including mood, life events, and changing musical interests, user preferences and tastes
are dynamic and subject to change over time. Because existing recommendation
algorithms may find it difficult to adjust to these changing preferences, users may
receive recommendations that are out of date or do not reflect their current interests.
4. Restricted investigation of long-tail or specialized content: Current
recommendation algorithms could prioritize popular or mainstream information over
long-form or specialty content, which could be relevant to specific user groups. This
may result in lesser-known performers, genres, or forms of cultural expression going
unnoticed, which might lead to exciting discoveries.
In order to clarify the complex relationship between statistical analysis and music
theory, the correlation coefficient will be employed in this study to compare songs
based on their fundamental frequencies and pitch structures. When it comes to mu-
sic, scientists and musicians can measure how similar different pieces are to one other
by breaking each song down into its most basic elements: notes and frequencies. This
analytical method provides a foundation for understanding the intricacies of mu-
sic production in addition to revealing the compositions’ underlying connections.The
concept of Indian Classical Music (ICM), a genre recognized for its depth and com-
plexity, is the main subject of this study. In traditional ragas and houses in Indian
classical music, improvisation is a crucial part of the creative process. The method of
correlation coefficients.
5. Indian Classical Music (ICM) being the main focus: The study par-
ticularly focuses on Indian Classical Music (ICM), which is renowned for its richness
and nuance. ICM is a perfect place to investigate the correlation coefficient technique
since improvisation is essential to creative expression in the school’s traditional ragas
and music houses.
A. Phase I:
B. Phase II:
mobile app to recommend alternate songs for therapeutic purposes by leveraging em-
bedded raga patterns. Specifically, the system aims to achieve the following objectives:
2. Empowering Users: Enable users to explore and engage with music in mean-
ingful ways.Provide tools and resources that empower users to create, discover, and
share music according to their interests and preferences.
2 LITERATURE SURVEY
Finding similar musical patterns using natural language processing (NLP) techniques
is a major difficulty in music exploration. Together, artists and enthusiasts are at-
tempting to bridge the gap between computational linguistics and music in order to
analyze and interpret musical data across a wide range of genres and styles. They
refer to influential scholarly works for direction when negotiating this difficult terrain.
Serra, Xavier, and colleagues’ ”Text Mining for Music Analysis: A Survey” offers
an introduction to text mining methods used in music analysis. Although it is not
exclusively centered around NLP, it emphasizes the possibility of deriving insightful
information from musical texts, such lyrics and reviews.
Tzanetakis and Cook’s ”Automatic Music Genre Classification of Audio Signals”
is the result of more investigation. This paper explores genre classification, which is
a critical first step in finding patterns across a variety of musical styles, even though
it is not specifically related to NLP. Knowing how genres are classified paves the way
for using NLP to find minute parallels.
Last but not least, Sengupta et al.’s ”Analyzing Musical Content of Indian Classi-
cal Music: A Survey” provides insightful techniques for feature extraction, similarity
assessment, and pattern detection that are relevant to all musical styles. Even though
it is unique to Indian classical music, its findings are universal and have motivated
the use of NLP approaches to the complex musical data analysis process. Overall,
Equipped with knowledge gained from these pieces, artists and connoisseurs set out to
create a dependable algorithm that facilitates the investigation and identification of
related melodic patterns in a variety of genres and styles. They see a future in which
music, in all its forms, is understood, valued, and celebrated through this confluence
of creativity and computing.
A. Evolution of Music Therapy and Its Importance
Similar to other sectors utilizing cutting-edge technologies, music therapy has seen
tremendous evolution in recent years [1].A major actor in mental healthcare, music
therapy has emerged while other industries, such as healthcare, music directors, and
retail, have embraced digital disruption. Music therapy has progressively adopted
strategies to optimize mental health issues and handle a variety of challenges as tech-
nology advances. The advent of music therapy has been sparked by the confluence
of technologies like the Internet of Things (IoT), Wireless Sensor Networks (WSN),
and Cyber-Physical Systems (CPS), which present previously unheard-of chances to
transform mental health issues[2].
It has long been recognized that music has the power to evoke emotions, pro-
mote relaxation, and enhance wellbeing. A structured framework for using music’s
therapeutic potential in medical settings has also emerged concurrently with the for-
malization of music therapy.[3]. In line with the principles of music therapy, the effort
seeks to assist musicians and music enthusiasts in discovering and analyzing similar
musical patterns. The project uses natural language processing (NLP) techniques to
analyze and interpret musical data with the goal of creating algorithms that can bet-
ter comprehend musical patterns in a variety of genres and styles.[4]. It is impossible
to overestimate the significance of music therapy in spite of these difficulties.
The project’s incorporation of music therapy ideas highlights the comprehensive
approach to music appreciation and inquiry. The project aims to create algorithms
that both discover comparable musical patterns and resonate with the human expe-
rience, so creating stronger connections between music and its listeners, by taking
into account the emotional and psychological aspects of music. [5].The process of
identifying related musical patterns was completely transformed with the advent of
computational techniques. In order to automatically evaluate musical data and ex-
tract characteristics like pitch, duration, and timbre, researchers started creating algo-
rithms. Large-scale music collection analysis was made possible by these algorithms,
which made it easier to spot trends among different genres, styles, and cultural con-
texts. [6].
In general, the process of identifying commonalities in musical patterns is indica-
tive of the fusion of conventional musicology, computer methods, and cognitive science
concepts. The search for comparable musical patterns is set to take off, expanding
our knowledge and appreciation of music across generations and cultures as interdis-
ciplinary cooperation and technology continue to grow.[7].
B. Transformative Potential of similar music patters
Similar music patterns can be found using NLP techniques, opening doors to a vast
musical universe. They facilitate the seamless transition across genres and styles for
both musicians and audiences, which extends their horizons and fosters a deeper ap-
preciation for many musical traditions. Instead of being limited to well-known places,
people can embark on audio experiences that transcend cultural boundaries and his-
torical periods.The discovery of recurrent musical patterns can serve as a source of
inspiration for composers, producers, and performers. Composers can gain a greater
understanding of the basic ideas of musical expression by recognizing recurring themes
in melody, harmony, rhythm, and structure throughout a wide range of musical com-
positions. This new insight fuels their capacity to produce, investigate, and push the
bounds of artistic discovery.
Similar musical patterns found using NLP approaches offer scholars, educators,
and students useful instructional tools. Educators can demonstrate basic ideas in
music theory, composition, and analysis by examining the underlying structures and
motifs shared by a variety of musical works. This nurtures the next generation of
artists and music lovers by facilitating a deeper understanding and enjoyment of mu-
sical workmanship. [8].
Furthermore, our research shed light on the transformative potential of the In-
ternet of Things (IoT) in finding similar music patterns. By seamlessly connecting
physical devices and leveraging existing communication technologies, IoT facilitates
the automation and control of musical processes [2]. The exponential growth of IoT-
connected devices underscores its burgeoning importance in driving efficiency and
productivity across various sectors, including music industry.
Moreover, we explored the diverse array of IoT applications in similar music pat-
terns, ranging from precision farming to livestock monitoring [9]. These applications,
underpinned by IoT’s connectivity and data analytics capabilities, hold immense
promise in enhancing musical productivity and sustainability. With projections in-
dicating significant growth in the global IoT market, the potential for IoT-driven
innovations in musical industry or healthcare is boundless.
In conclusion, our research illuminates the transformative potential of IoT, WSNs,
and CPS in revolutionizing musical patterns. By harnessing the power of these tech-
nologies, similar music patterns promises to usher in a new era of efficiency, sustain-
ability, and resilience in musical operations [4].
Here are our insights from the referred papers as a part of our literature survey:
[10] Customized Music Suggestion Through Collaborative FilteringWriters: H. Ning
and Q. Li; IEEE Journal; 2020. Results: This paper focuses on collaborative filter-
ing approaches for personalized music recommendation systems. Though unrelated to
NLP, it emphasizes how crucial recommendation engines are in helping consumers find
music that suits their tastes. Creating efficient algorithms requires an understand-
ing of user behavior and preferences, which may influence the creation of NLP-based
methods for identifying related musical patterns.
[8] In particular, the use of NLP approaches to music lyrics is examined in this
work. The study looks for stylistic characteristics, sentiment, and thematic patterns
in songs by examining the textual content of the lyrics. The study shows how NLP
may be applied to musical texts in order to extract significant insights, which may
help create methods for identifying related musical patterns based on lyrical content.
[1] The goal of this research is to use topic modeling techniques to identify trends
in music collections. Using the thematic content of music metadata and annotations,
the research aims to categorize and cluster musical works according to their under-
lying themes and motifs. The findings show how latent patterns in music collections
can be found using topic modeling. This is helpful when looking for patterns in music
that are similar across different genres and styles using natural language processing
(NLP) approaches.
[2] This study looks into sentiment analysis techniques used on music reviews to
find trends in people’s perceptions and responses to music. By analyzing the tone
of evaluations, the research attempts to identify common themes, listeners’ prefer-
ences, and trends. The findings demonstrate the potential of sentiment analysis to
detect patterns in music consumption behaviors. This information could be useful in
developing algorithms that use natural language processing (NLP) to locate similar
musical patterns.
[4] This paper focuses on collaborative filtering approaches for personalized mu-
sic recommendation systems. Though unrelated to NLP, it emphasizes how crucial
recommendation engines are in helping consumers find music that suits their tastes.
Creating efficient algorithms requires an understanding of user behavior and prefer-
ences, which may influence the creation of NLP-based methods for identifying related
musical patterns.
[9] By examining song similarity networks, this study explores patterns in the
evolution of musical genres. It highlights the significance of examining similarity re-
lationships between songs, albums, and singers even though it has nothing to do with
NLP specifically. One of the main challenges of the research is find and interpret pat-
terns across many musical styles, and this understanding is essential for that purpose.
[11] In particular, the use of NLP approaches to music lyrics is examined in this
work. The study looks for stylistic characteristics, sentiment, and thematic patterns
in songs by examining the textual content of the lyrics. This research is very per-
tinent to the project since it shows how natural language processing (NLP) may be
utilized to glean insightful information from musical texts, which could help in the
identification of related musical patterns based on lyrical content.
[8] In order to identify trends in how people perceive and react to music, this study
investigates sentiment analysis techniques used on music reviews. The study tries to
find common themes, preferences, and trends among listeners by assessing the mood
expressed in reviews. In the context of the project, this research may shed light on
the patterns in music consuming behavior that sentiment analysis might reveal, which
may help develop algorithms for identifying similar patterns in music using natural
[7] In exploring the field of personalized music recommendation systems, this study
highlights the importance of collaborative filtering methods. Collaborative filtering al-
gorithms can efficiently propose music based on user preferences and actions, thereby
catering to individual tastes. The research findings can offer significant direction for
creating algorithms that identify comparable musical patterns. Comprehending the
functioning of collaborative filtering might provide valuable perspectives for devel-
oping algorithms that efficiently detect trends in music consumption habits, thereby
enabling customized musical exploration.
[6] Using song similarity networks, this study aims to understand trends in the de-
velopment of musical genres. The study illuminates disruptions within these networks
and offers insights into modifications and innovations within musical compositions by
examining similarity relationships between songs, albums, and artists. The project’s
objective of identifying comparable music patterns using NLP approaches can be
improved by comprehending disruptions in song similarity networks. This study em-
phasizes how crucial it is to examine similarity links in order to find and understand
patterns across a variety of musical genres.
[3] This essay investigates the use of natural language processing (NLP) methods
to the analysis of song lyrics, with the goal of identifying stylistic components, sen-
timent, and thematic patterns. The project can benefit greatly from the research’s
discoveries, which show how NLP can glean valuable information from musical compo-
sitions. Comprehending the emotional and thematic elements of song lyrics can offer
more profound understandings of the underlying patterns in musical compositions, so
enriching the knowledge of music patterns and augmenting the efficacy of the project.
[12] The purpose of this study is to find patterns in music collections using topic
modeling approaches. The study intends to classify and cluster musical compositions
according to underlying themes and motifs by examining the thematic content of mu-
sic metadata and annotations. The research’s conclusions provide a useful way for
applying NLP techniques to find recurring musical patterns in a variety of genres and
styles. Gaining a grasp of the subject organization of music collections helps enhance
one’s comprehension of musical patterns by illuminating the similarities and differ-
ences across musical compositions.
[13] This study investigates the use of sentiment analysis tools to music reviews
in order to identify trends in how music is perceived and received. The study tries to
find common themes, preferences, and trends among listeners by assessing the mood
expressed in reviews. By showing how sentiment analysis can reveal patterns in music
consumption behavior, the study’s insights can guide the creation of computers that
find comparable music patterns using natural language processing (NLP) approaches.
Gaining an understanding of the affective and perceptual components of music eval-
uations might help reveal the underlying trends in music consumption.
[14] This study sets out to explore the intricate world of song similarity networks
in an effort to unravel the evolution of musical genres. Through examining the rela-
tionships between songs, albums, and performers, the research reveals breaks in these
networks and illuminates the transformational changes in musical works. The knowl-
edge gained by studying song similarity network disruptions provides a strong basis
for the project’s goal of identifying comparable musical patterns through the applica-
tion of natural language processing. Exploring the nuances of similarity connections
opens up new avenues for pattern recognition and interpretation across a range of
musical genres, enhancing the process of musical discovery.
[5] This study explores the field of natural language processing (NLP) as it re-
lates to song lyrics, aiming to decipher the sentiment, thematic layers, and stylistic
subtleties that are present in songs. The project is expected to benefit greatly from
the insights gained from this initiative, which demonstrate the transformative power
of NLP in obtaining meaningful insights from musical texts. Exploring the thematic
and emotional depths of song lyrics reveals hidden patterns in musical compositions,
increasing the project’s effectiveness in identifying patterns in music.
By critically analyzing these papers, it becomes evident that there is a growing
body of research on the integration of technology in musical patterns. These studies
provide valuable insights into the benefits, challenges, and potential applications of
digital solutions in musical therappy practices, highlighting the importance of tech-
nological innovation in addressing global food security and sustainability challenges.
3 THEORETICAL BACKGROUND
Theoretical background highlighting some topics related to the project work is given
below. The description contains several topics which are worth to discuss and also
highlight some of their limitation that encourage going on finding solution as well as
highlights some of their advantages for which reason these topics and their features
are used in this project.
3.1 Python
In general, developing an application is a multifaceted and demanding endeavor.
There exist various frameworks tailored , each with its own set of strengths and
weaknesses. While Android offers a native framework based on Java, and iOS pro-
vides one based on Objective-C / Swift, Python presents an alternative approach to
mobile app development through several frameworks and tools.
Features of Python
Advantages of Python
Disadvantages of Python
1. Python may run more slowly and use more memory, especially when running
computationally demanding or performance-critical applications.
2. In situations when extensive concurrent processing is required, the performance
of multithreaded applications may be impacted by Python’s Global Interpreter Lock,
which can restrict concurrency and parallelism.
3. Managing dependencies in Python can be difficult, particularly when handling
incompatible versions, conflicting dependencies, or problems with package installation.
Virtual environments and dependency resolution tools like pip assist to lessen these
difficulties, but they might need more work.
3.2 Django
Django is a great option for creating dependable and scalable online applications
because of its broad ecosystem, built-in functionality, clear design principles, quick
development speed, and friendly community. Whether creating a basic blog or a
sophisticated business solution, Django offers the resources and tools required to op-
timize the development process and produce web applications of excellent quality
quickly.
Among high-level web frameworks developed in Python, Django stands out for its
pragmatic, clean design and quick development time. Its fundamental tenet, ”Don’t
Repeat Yourself” (DRY), promotes the use of reusable components and makes it an
effective tool for developing intricate online applications. Django’s built-in adminis-
trative interface is one of its most remarkable features; it facilitates data management
duties by automatically generating an admin interface based on the models of the
application. With its great degree of customization, this administrative interface may
be made to meet the demands of any kind of project.
Features of Django
1. An extensive admin interface that comes ready to use, saving developers from
having to write special code to handle users, permissions, and site content.
2. The Model-View-Template (MVT) architectural pattern, which improves code
maintainability and encourages a distinct division of responsibilities.
3. Makes it simple to design and handle HTML forms securely by including built-in
form classes and validation features.
4. Web applications with integrated authentication and authorization procedures,
which simplify the management of user accounts, permissions, and access control.
Advantages of Django
1. Django adheres to best practices and the ”Don’t Repeat Yourself” (DRY)
philosophy, which helps developers create web applications more rapidly by reusing
code components.
2. A vast array of online applications, including intricate enterprise-level apps and
APIs, as well as basic blogs and content management systems (CMS), may be created
using Django.
3. Django is incredibly scalable and easily manages heavy traffic loads. It facili-
tates both vertical and horizontal scaling by utilizing more potent hardware and load
balancing.
Disadvantages of Django
1. Django has a steep learning curve, especially for people who are not familiar
with Python or web development. It could take some time and effort to comprehend
its ORM ideas and MVC (Model-View-Template) architecture.
2. Because Django is an opinionated framework with preset conventions and pat-
terns, developers who prefer greater freedom in their development approach may find
that their options for flexibility and customization are limited.
ing MySQL, PostgreSQL, Oracle, and Microsoft SQL Server. This broad compatibility
ensures developers can efficiently manage and interact with databases regardless of
the backend technology.
2. Efficient SQL Query Development: A user-friendly interface for creating,
running, and troubleshooting SQL queries is offered by SQL Workbench. This fea-
ture allows Python and Django developers to write sophisticated queries to access,
modify, and examine data contained in their databases, improving the functionality
and efficiency of their applications.
3. Data Visualization: SQL Workbench offers built-in tools for visualizing
query results, enabling developers to analyze and interpret data more effectively. By
presenting query results in tabular or graphical formats, developers can gain valuable
insights into the database contents, facilitating informed decision-making during the
development process.
4. Cloud Messaging: Firebase Cloud Messaging (FCM) enables developers to
send push notifications to their Flutter apps across platforms. It provides reliable
message delivery and powerful targeting options to engage users effectively.
SQL Workbench seamlessly integrates with Python and Django projects, allowing
developers to execute SQL queries and manage databases directly from their preferred
development environment. This tight integration streamlines the database-related
aspects of Python and Django development, improving productivity and collaboration
among team members.
Correctness: It computes using a clearly defined set of steps and guidelines, and
thorough testing is done to verify that the data is accurate.
Modularity: The complete product is broken up into many modules, and well-
defined interfaces are developed to explore the benefit of the flexibility of the product.
Scalability: Design the platform to accommodate a growing user base and evolv-
ing agricultural needs over time.
1. It should be possible for users to establish profiles with their favorite artists,
genres, and moods.
2. It should be possible for users to search for music using a variety of parameters,
including lyrical themes, pace, mood, and genre.
3.Based on user input and preferences, the system ought to suggest related songs
or artists.
4. Personalized recommendations based on each user’s listening history and pref-
erences should be provided by the system.
5. It is important to protect and maintain users’ listening history and personal
information.Data protection laws should be followed, and the system should be trans-
parent about how data is used and stored.
The eight main roles of systems engineering are performed by the customers, with
particular attention paid to the operator as the prime customer. Operational require-
ments will specify the fundamental necessity and will, at the very least, pertain to
the following aspects:-
Mission profile or scenario: It explains the steps taken to achieve the mission’s
goal. It also determines the system’s efficacy or efficiency.
Data Security: Prioritize the security and privacy of user data, adhering to
industry-standard encryption protocols and data protection regulations.
Mobile Compatibility:
Ensure that the application is optimized for mobile devices, allowing farmers to
access critical information and features while working in the field.
Online Functionality:
Crop Connect relies on online connectivity for real-time weather updates, crop
management resources, and seamless communication among users. This infrastruc-
ture ensures farmers stay informed and connected, accessing agricultural insights any-
where, anytime.
5 System Analysis
The process of analyzing an issue involves determining its optimal solution. System
analysis is the process by which we identify the issues that now exist, specify the needs
and goals, and assess the potential solutions. It is a way of looking at the company
and the issue it faces, as well as a collection of tools that aid in resolving these issues.
A feasibility study is crucial to system analysis because it provides the goal for design
and development.
• ECONOMICAL FEASIBILITY
• TECHNICAL FEASIBILITY
• SOCIAL FEASIBILITY
Determine the cost of buying gear, obtaining software licenses, hiring individuals
with skills in machine learning, signal processing, and natural language processing,
and acquiring datasets.
The purpose of this study is to evaluate the system’s technical requirements, or its
technical feasibility. Any system that is created must not place a heavy burden on
the technical resources that are available. As a result, the client will face strict re-
quirements. Since deploying the designed system will only require minimum or null
changes, it must have modest requirements.
Determine whether or not musicians, music lovers, and music streaming services are
willing to accept and use the method to find comparable musical patterns.Think
about how the project might affect current workflows, procedures, and systems in
communities or organizations that are part of the music industry.
5.2 Analysis
5.2.1 Performance Analysis
The system will only be useful if it can be transformed into an information system that
satisfies the technological needs of the company. There are a few things to consider
in relation to all of these technical analysis issues:
• Changes to bring in the system: All changes should be in a positive direction,
there will be increased levels of efficiency and better customer service.
• Required skills: Platforms tools used in this project are widely used. So the
skilled manpower is readily available in industry.
• Acceptability:The system’s architecture is kept practical enough that there
shouldn’t be any issues from the user’s perspective.
Ensure that the app’s architecture and design facilitate seamless integration with
existing agricultural information systems and databases.
Consider scalability to accommodate potential future expansions of the app’s fea-
tures and user base.
Evaluating the costs and benefits of creating a system for finding comparable musi-
cal patterns is part of the economic analysis process. Purchasing hardware, hiring
qualified staff, licensing software, and obtaining datasets are among the expenses.The
costs are compared to the advantages, which include better music recommendations
and higher user involvement.
6 System Design
A useful engineering depiction of a proposed construction is called a design. It is
the most important stage of a system’s development. The process of converting the
requirements into a software representation is known as software design. In software
engineering, design is where it is nurtured. The new system needs to be built based
on the needs of the users and a thorough analysis of the current system. This stage
of the system design process is it.
Model phases
The music recommendation system’s data flow between its various modules is
depicted in the block diagram. The User Input Module is where it starts, where
users provide the necessary data, including song titles, or preferred moods. The Data
Parsing Module processes the input data to extract pertinent song-related information
after the inputs are successfully supplied. Subsequently, in order to analyze song
patterns, the Feature Extraction Module finds important musical elements including
note structures and fundamental frequencies.
6.3 Methodology
The development of our music recommendation system is structured into two major
phases, as illustrated in [Figure 6.4]. Each phase is meticulously designed to achieve
specific objectives and ensure a seamless user experience.
The first stage of our development process is the thorough management of music
data, which entails the following crucial actions:
1. **Music Data Processing**: We collect and get ready to analyze musical data.
Users receive the recommendations. Customers are guaranteed a unique and in-
teresting user experience since they can input the name of an album to obtain a list
of songs with comparable raga patterns or based on mood searches.
After development is finished, testing and quality assurance are the next steps.
The functionality, security, and performance of the music recommendation system
are rigorously tested to make sure they live up to the highest expectations. The
fastest possible resolution of any problems or errors found during this stage ensures
that the user experience is perfect.
After testing successfully, we make the music recommendation system available
to the whole audience. As the technology becomes available to consumers and of-
fers tailored music recommendations based on raga patterns and mood searches, this
represents a big milestone.
B. Phase II
In Phase II, our objective shifts towards integrating advanced features that enhance
the music recommendation system’s capabilities. This phase involves several integra-
tion stages:
1. Django:
-Django is a high-level Python web framework that encourages effective development
and clear, uncomplicated design. A group of talented developers built Django, which
takes care of many of the bothers involved with web development so you can focus on
building your project instead of having to start from scratch.
Significance: Django is appropriate for many different types of online applica-
tions, such as scientific computing platforms, social networks, and content manage-
ment systems.
Advantages:
- Django is designed to help developers scale from simple to complex web applica-
tions. Its modular design and reusability of components allow for better scalability.
- Django’s automated admin interface is one of its best qualities. Without needing
to create any more code, managing site content is made simple with this dynamic and
customized admin panel.
-The Model-View-Controller (MVC) architectural paradigm, which Django ad-
heres to, helps to manage and scale applications by separating the functionality from
the user interface.
1. Python:
Python is a object-oriented language which provied high end built-in functionality to
the programmers. Significance: Python is a versatile and powerful programming
language that simplifies complex software development tasks and is renowned for its
readability and ease of use.
Advantages:
- Python’s simple and intuitive syntax promotes faster learning and reduces the
time needed to develop and debug code.
- A vast standard library and extensive collection of third-party packages allow
developers to implement a wide range of functionalities without having to write code
from scratch.
- Python supports multiple programming paradigms, including procedural, object-
oriented, and functional programming, offering flexibility in designing and organizing
code.
- The language’s integration capabilities with other technologies, such as C/C++,
Java, and .NET, enable seamless incorporation of Python into existing systems.
3. Django API: - The Django framework has an interface called the Django API
that lets programmers design and administer web APIs for their apps.
Significance: In web applications developed with Django, the Django API is
essential for enabling connection between frontend and backend components, guaran-
teeing smooth data interchange and interaction.
Advantages:
- Full support for creating RESTful APIs, which enables programmers to specify end-
points, serialize data, and effectively process HTTP requests.
- Developers may implement user authentication and permissions efficiently thanks to
integration with Django’s authentication and authorization system, which guarantees
secure access to API endpoints.
- The development process is streamlined by built-in capabilities like the Django Rest
Framework (DRF).
4. Music Pattern Dataset: Advantages of Utilizing Music Pattern Datasets:
Comprehensive datasets including a broad variety of musical patterns are beneficial
to our endeavor. system.
Advantages:
- The robustness of our approach for identifying comparable music patterns is im-
proved by having access to a variety of datasets with different music patterns. Exten-
sive datasets provide efficient training of models across many musical genres, hence
enhancing the precision of pattern identification.
1. Dataset Origin:
-The main forum for data sharing and cooperation between researchers, hobbyists,
and data scientists is Kaggle. It provides access to a huge library of datasets from
many different fields, including agriculture.
2. Composition:
To enable effective model creation and evaluation, the dataset is organized in
compliance with industry best practices, dividing samples into distinct sets for training
and testing.
3. Structure:
Subfolders with audio samples from diverse genres and styles facilitate thorough
model learning, making it possible to identify subtle patterns in music from a variety
of categories.
4. Audio Variety:
By exposing the model to a wide range of musical genres, this diversity ensures the
model’s robustness and promotes accuracy and adaptability in tasks involving genre
categorization and mood analysis.
5. Machine Learning Training:
- The dataset enables machine learning algorithms to identify underlying patterns
and structures in music through platforms such as Teachable Machine Learning.
- Through the process of extracting pertinent information from audio recordings,
models are trained so that algorithms can be trained to correlate particular musical
attributes, genres, or moods with these features.
6. Numpy Implementation:
- Numpy, a potent Python numerical computing toolkit, is used to process the
recommendations after the recommendation model training is complete.
- Numpy’s fast computation of musical pattern similarities is made possible by
its effective array operations and mathematical functions, which provide precise and
timely recommendations.
7. Quality Assurance:
- Rigorous testing and validation procedures are essential to ensure the reliability
7 Implementation
7.1 Authentication : Login-Sigup
{{ l o g i n f o r m }}
</t a b l e >
</h4>
</c e n t e r >
<button type=”submit ” c l a s s =”btn btn−primary ” >Submit</button
</div>
</form>
</p>
</b l o c k q u o t e >
<d i v c l a s s =”d−f l e x ” data−aos=”fade −up” data−aos−d e l a y =”200”>
<a
h r e f =”h t t p s : / /www. youtube . com/ watch ?v=LXb3EKWsInQ”
c l a s s =” g l i g h t b o x btn−watch−v i d e o d−f l e x a l i g n −items−c e n t e r ”
>
</div>
</div>
</div>
</div>
</ s e c t i o n >
</form>
<!−− End Hero S e c t i o n −−>
{% e n d b l o c k %}
.
Album Page
<!DOCTYPE html>
<html l a n g=”en”>
<head>
<meta c h a r s e t =”u t f −8” />
<meta c o n t e n t=”width=d e v i c e −width , i n i t i a l −s c a l e =1.0” name=”v i e w p o r t
<!−− F a v i c o n s −−>
<l i n k h r e f =”/ s t a t i c / a s s e t s /img/ f a v i c o n . png” r e l =”i c o n ” />
<l i n k
h r e f =”/ s t a t i c / a s s e t s /img/ apple−touch−i c o n . png”
r e l =”apple−touch−i c o n ”
/>
/>
<l i n k h r e f =” a s s e t s / vendor / aos / aos . c s s ” r e l =” s t y l e s h e e t ” />
<l i n k
h r e f =”/ s t a t i c / a s s e t s / vendor / g l i g h t b o x / c s s / g l i g h t b o x . min . c s s ”
r e l =” s t y l e s h e e t ”
/>
<l i n k
h r e f =”/ s t a t i c / a s s e t s / vendor / s w i p e r / swiper −bundle . min . c s s ”
r e l =” s t y l e s h e e t ”
/>
<l i n k
h r e f =”/ s t a t i c / a s s e t s / vendor / r e m i x i c o n / r e m i x i c o n . c s s ”
r e l =” s t y l e s h e e t ”
/>
<!−− =======================================================
∗ Template Name : Nova − v1 . 3 . 0
∗ Template URL: h t t p s : / / bootstrapmade . com/ nova−b o o t s t r a p −b u s i n e s s −t e m p
∗ Author : BootstrapMade . com
∗ L i c e n s e : h t t p s : / / bootstrapmade . com/ l i c e n s e /
======================================================== −−>
</head>
”””
Django s e t t i n g s f o r music p r o j e c t .
For more i n f o r m a t i o n on t h i s f i l e , s e e
h t t p s : / / docs . d j a n g o p r o j e c t . com/ en / 4 . 0 / t o p i c s / s e t t i n g s /
For t he f u l l l i s t o f s e t t i n g s and t h e i r v a l u e s , s e e
h t t p s : / / docs . d j a n g o p r o j e c t . com/ en / 4 . 0 / r e f / s e t t i n g s /
”””
# Quick−s t a r t development s e t t i n g s − u n s u i t a b l e f o r p r o d u c t i o n
# See h t t p s : / / docs . d j a n g o p r o j e c t . com/ en / 4 . 0 / howto / deployment / c h e c k l i s t /
ALLOWED HOSTS = [ ]
# Application d e f i n i t i o n
INSTALLED APPS = [
’ django . c o n t r i b . admin ’ ,
’ django . c o n t r i b . auth ’ ,
’ django . c o n t r i b . c o n t e n t t y p e s ’ ,
’ django . c o n t r i b . s e s s i o n s ’ ,
’ django . c o n t r i b . messages ’ ,
’ django . c o n t r i b . s t a t i c f i l e s ’ ,
’ musicapp ’ ,
]
MIDDLEWARE = [
’ django . middleware . s e c u r i t y . S e c u r i t y M i d d l e w a r e ’ ,
’ django . c o n t r i b . s e s s i o n s . middleware . S e s s i o n M i d d l e w a r e ’ ,
’ django . middleware . common . CommonMiddleware ’ ,
’ django . middleware . c s r f . CsrfViewMiddleware ’ ,
’ django . c o n t r i b . auth . middleware . A u t h e n t i c a t i o n M i d d l e w a r e ’ ,
’ django . c o n t r i b . messages . middleware . MessageMiddleware ’ ,
’ django . middleware . c l i c k j a c k i n g . XFrameOptionsMiddleware ’ ,
]
TEMPLATES = [
{
’BACKEND’ : ’ django . t e m p l a t e . backends . django . DjangoTemplates ’ ,
’ DIRS ’ : [ ] ,
’APP DIRS ’ : True ,
’OPTIONS ’ : {
’ context processors ’ : [
’ django . t e m p l a t e . c o n t e x t p r o c e s s o r s . debug ’ ,
’ django . t e m p l a t e . c o n t e x t p r o c e s s o r s . r e q u e s t ’ ,
’ django . c o n t r i b . auth . c o n t e x t p r o c e s s o r s . auth ’ ,
’ django . c o n t r i b . messages . c o n t e x t p r o c e s s o r s . messages ’ ,
],
},
},
]
# Database
# h t t p s : / / docs . d j a n g o p r o j e c t . com/ en / 4 . 0 / r e f / s e t t i n g s /#d a t a b a s e s
DATABASES = {
’ default ’ : {
# Password v a l i d a t i o n
# h t t p s : / / docs . d j a n g o p r o j e c t . com/ en / 4 . 0 / r e f / s e t t i n g s /#auth−password−v a l i d
# Internationalization
# h t t p s : / / docs . d j a n g o p r o j e c t . com/ en / 4 . 0 / t o p i c s / i 1 8 n /
USE TZ = True
# S t a t i c f i l e s (CSS , J a v a S c r i p t , Images )
# h t t p s : / / docs . d j a n g o p r o j e c t . com/ en / 4 . 0 / howto / s t a t i c − f i l e s /
STATIC URL = ’ s t a t i c / ’
c l a s s MusicappConfig ( AppConfig ) :
d e f a u l t a u t o f i e l d = ’ django . db . models . BigAutoField ’
name = ’ musicapp ’
# Cr eate your v i e w s h e r e .
d e f about ( r e q u e s t ) :
r e t u r n r e n d e r ( r e q u e s t , ’ about . html ’ )
# R e g i s t e r page
def r e g i s t e r ( request ) :
i f r e q u e s t . method == ”POST” :
form = NewUserForm ( r e q u e s t .POST)
i f form . i s v a l i d ( ) :
form . s a v e ( )
messages . s u c c e s s ( r e q u e s t , ” R e g i s t r a t i o n s u c c e s s f u l . ” )
return r e d i r e c t (” l o g i n ”)
messages . e r r o r (
request , ” Unsuccessful r e g i s t r a t i o n . Invalid information . ” )
form = NewUserForm ( )
r e t u r n r e n d e r ( r e q u e s t=r e q u e s t , template name=” r e g i s t e r . html ” , c o n t e x
# Login page
# u s e r Home page
d e f userhome ( r e q u e s t ) :
r e t u r n r e n d e r ( r e q u e s t , ’ userhome . html ’ )
# r e s u l t page
def r e s u l t ( request ) :
i f r e q u e s t . method == ”GET” :
g l o b a l data , b
data = pd . r e a d c s v ( ” musicapp / l a t a m a n g e s h k a r s o n g s . c s v ” )
data . drop ( ’ ID ’ , a x i s =1, i n p l a c e=True )
data . drop ( ” Length (ms ) ” , a x i s =1, i n p l a c e=True )
data . drop ( ” A c c o u s t i c n e s s ” , a x i s =1, i n p l a c e=True )
data . drop ( ” D a n c e a b i l i t y ” , a x i s =1, i n p l a c e=True )
data . drop ( ” Energy ” , a x i s =1, i n p l a c e=True )
data . drop ( ” I n s t r u m e n t a l n e s s ” , a x i s =1, i n p l a c e=True )
data . drop ( ” Valence ” , a x i s =1, i n p l a c e=True )
data . drop ( ” L i v e l i n e s s ” , a x i s =1, i n p l a c e=True )
data . drop ( ” Loudness ” , a x i s =1, i n p l a c e=True )
data . drop ( ” S p e e c h i n e s s ” , a x i s =1, i n p l a c e=True )
data . drop ( ”Tempo” , a x i s =1, i n p l a c e=True )
data . drop ( ” Time S i g n a t u r e ” , a x i s =1, i n p l a c e=True )
data [ ” c o m b i n e d f e a t u r e s ” ] = data [ ” Name ” ] + ” ” + \
data [ ” Album”]+” ”+data [ ” R e l e a s e Date ”]+” ”+data [ ’ L y r i c s ’ ]
# f o r song i n s i m i l a r s o n g s o r t e d [ 1 : 1 1 ] :
# s i m i l a r s o n g s = data [ data . i n d e x == song [ 0 ] ] [ ” Album ” ] . v
# print ( similar songs )
r e t u r n r e n d e r ( r e q u e s t , ’ r e s u l t . html ’ , { ’ r e s ’ : c })
r e t u r n r e n d e r ( r e q u e s t , ’ r e s u l t . html ’ )
# album page
d e f album ( r e q u e s t ) :
i f r e q u e s t . method == ”POST” :
global b
b = r e q u e s t .POST[ ’ t e x t ’ ]
r e t u r n r e n d e r ( r e q u e s t , ’ album . html ’ , { ’ a ’ : ”View th e Recomendend
r e t u r n r e n d e r ( r e q u e s t , ’ album . html ’ )
from . import v i e w s
urlpatterns = [
path ( ” ” , v i e w s . index , name=’ index ’ ) ,
path ( ” about / ” , v i e w s . about , name=’ about ’ ) ,
path ( ” r e g i s t e r / ” , v i e w s . r e g i s t e r , name=’ r e g i s t e r ’ ) ,
path ( ” l o g i n / ” , v i e w s . l o g i n , name=’ l o g i n ’ ) ,
path ( ” userhome / ” , v i e w s . userhome , name=’ userhome ’ ) ,
path ( ” album / ” , v i e w s . album , name=’album ’ ) ,
path ( ” r e s u l t / ” , v i e w s . r e s u l t , name=’ r e s u l t ’ ) ,
path ( ” r e s u l t 2 / ” , v i e w s . r e s u l t 2 , name=’ r e s u l t 2 ’ ) ,
path ( ” r e s u l t 2 / m o o d r e s u l t . html ” , v i e w s . m o o d r e s u l t , name=’ r e s u l t 2 m
]
c l a s s NewUserForm ( UserCreationForm ) :
e m a i l = forms . E m a i l F i e l d ( r e q u i r e d=True )
c l a s s Meta :
model = User
f i e l d s = ( ” username ” , ” e m a i l ” , ” password1 ” , ” password2 ” )
d e f s a v e ( s e l f , commit=True ) :
u s e r = s u p e r ( NewUserForm , s e l f ) . s a v e ( commit=F a l s e )
u s e r . e m a i l = s e l f . c l e a n e d d a t a [ ’ email ’ ]
i f commit :
user . save ( )
return user
d e f main ( ) :
”””Run a d m i n i s t r a t i v e t a s k s . ” ” ”
o s . e n v i r o n . s e t d e f a u l t ( ’DJANGO SETTINGS MODULE’ , ’ music . s e t t i n g s ’ )
try :
from django . c o r e . management import e x e c u t e f r o m c o m m a n d l i n e
e x c e p t ImportError as exc :
r a i s e ImportError (
” Couldn ’ t import Django . Are you s u r e i t ’ s i n s t a l l e d and ”
” a v a i l a b l e on your PYTHONPATH environment v a r i a b l e ? Did you
” f o r g e t t o a c t i v a t e a v i r t u a l environment ?”
) from exc
e x e c u t e f r o m c o m m a n d l i n e ( s y s . argv )
if name == ’ main ’:
main ( )
/∗∗
∗ Template Name : Nova − v1 . 3 . 0
∗ Template URL: h t t p s : / / bootstrapmade . com/ nova−b o o t s t r a p −b u s i n e s s −t e m p l a
∗ Author : BootstrapMade . com
∗ L i c e n s e : h t t p s : / / bootstrapmade . com/ l i c e n s e /
∗/
document . a d d E v e n t L i s t e n e r ( ’ DOMContentLoaded ’ , ( ) => {
” us e s t r i c t ” ;
/∗∗
∗ Preloader
∗/
c o n s t p r e l o a d e r = document . q u e r y S e l e c t o r ( ’# p r e l o a d e r ’ ) ;
i f ( preloader ) {
window . a d d E v e n t L i s t e n e r ( ’ load ’ , ( ) => {
p r e l o a d e r . remove ( ) ;
});
}
/∗∗
∗ S t i c k y header on s c r o l l
∗/
c o n s t s e l e c t H e a d e r = document . q u e r y S e l e c t o r ( ’# header ’ ) ;
i f ( selectHeader ) {
document . a d d E v e n t L i s t e n e r ( ’ s c r o l l ’ , ( ) => {
window . s c r o l l Y > 100 ? s e l e c t H e a d e r . c l a s s L i s t . add ( ’ s t i c k e d ’ ) : s e l e
});
}
/∗∗
∗ Mobile nav t o g g l e
∗/
c o n s t mobileNavShow = document . q u e r y S e l e c t o r ( ’ . mobile−nav−show ’ ) ;
c o n s t mobileNavHide = document . q u e r y S e l e c t o r ( ’ . mobile−nav−hide ’ ) ;
f u n c t i o n mobileNavToogle ( ) {
document . q u e r y S e l e c t o r ( ’ body ’ ) . c l a s s L i s t . t o g g l e ( ’ mobile−nav−a c t i v e ’ )
mobileNavShow . c l a s s L i s t . t o g g l e ( ’ d−none ’ ) ;
mobileNavHide . c l a s s L i s t . t o g g l e ( ’ d−none ’ ) ;
}
/∗∗
∗ Toggle mobile nav dropdowns
∗/
c o n s t navDropdowns = document . q u e r y S e l e c t o r A l l ( ’ . navbar . dropdown > a ’
navDropdowns . f o r E a c h ( e l => {
e l . addEventListener ( ’ c l i c k ’ , function ( event ) {
i f ( document . q u e r y S e l e c t o r ( ’ . mobile−nav−a c t i v e ’ ) ) {
event . preventDefault ( ) ;
this . c l a s s L i s t . toggle ( ’ active ’ ) ;
t h i s . n e x t E l e m e n t S i b l i n g . c l a s s L i s t . t o g g l e ( ’ dropdown−a c t i v e ’ ) ;
l e t dropDownIndicator = t h i s . q u e r y S e l e c t o r ( ’ . dropdown−i n d i c a t o r ’
dropDownIndicator . c l a s s L i s t . t o g g l e ( ’ bi−chevron−up ’ ) ;
dropDownIndicator . c l a s s L i s t . t o g g l e ( ’ bi−chevron−down ’ ) ;
}
})
});
/∗∗
∗ S c r o l l top button
∗/
c o n s t s c r o l l T o p = document . q u e r y S e l e c t o r ( ’ . s c r o l l −top ’ ) ;
i f ( scrollTop ) {
const togglescrollTop = function () {
window . s c r o l l Y > 100 ? s c r o l l T o p . c l a s s L i s t . add ( ’ a c t i v e ’ ) : s c r o l l T o
}
window . a d d E v e n t L i s t e n e r ( ’ load ’ , t o g g l e s c r o l l T o p ) ;
document . a d d E v e n t L i s t e n e r ( ’ s c r o l l ’ , t o g g l e s c r o l l T o p ) ;
s c r o l l T o p . a d d E v e n t L i s t e n e r ( ’ c l i c k ’ , window . s c r o l l T o ({
top : 0 ,
b e h a v i o r : ’ smooth ’
}));
}
/∗∗
∗ I n i t i a t e glightbox
∗/
c o n s t g l i g h t b o x = GLightbox ({
selector : ’ . glightbox ’
});
/∗∗
∗ I n i t s w i p e r s l i d e r with 1 s l i d e a t once i n d e s k t o p view
∗/
new Swiper ( ’ . s l i d e s −1 ’ , {
speed : 6 0 0 ,
loop : true ,
autoplay : {
delay : 5000 ,
disableOnInteraction : f a l s e
},
s l i d e s P e r V i e w : ’ auto ’ ,
pagination : {
e l : ’ . swiper −p a g i n a t i o n ’ ,
type : ’ b u l l e t s ’ ,
c l i c k a b l e : true
},
navigation : {
n e x t E l : ’ . swiper −button−next ’ ,
p r e v E l : ’ . swiper −button−prev ’ ,
}
});
/∗∗
∗ I n i t s w i p e r s l i d e r with 3 s l i d e s a t once i n d e s k t o p view
∗/
new Swiper ( ’ . s l i d e s −3 ’ , {
speed : 6 0 0 ,
loop : true ,
autoplay : {
delay : 5000 ,
disableOnInteraction : f a l s e
},
s l i d e s P e r V i e w : ’ auto ’ ,
pagination : {
e l : ’ . swiper −p a g i n a t i o n ’ ,
type : ’ b u l l e t s ’ ,
c l i c k a b l e : true
},
navigation : {
n e x t E l : ’ . swiper −button−next ’ ,
p r e v E l : ’ . swiper −button−prev ’ ,
},
breakpoints : {
320: {
slidesPerView : 1 ,
spaceBetween : 40
},
1200: {
slidesPerView : 3 ,
}
}
});
/∗∗
∗ P o r f o l i o i s o t o p e and f i l t e r
∗/
l e t p o r t f o l i o n I s o t o p e = document . q u e r y S e l e c t o r ( ’ . p o r t f o l i o −i s o t o p e ’ ) ;
i f ( portfolionIsotope ) {
l e t p o r t f o l i o F i l t e r = p o r t f o l i o n I s o t o p e . g e t A t t r i b u t e ( ’ data−p o r t f o l i o −
l e t p o r t f o l i o L a y o u t = p o r t f o l i o n I s o t o p e . g e t A t t r i b u t e ( ’ data−p o r t f o l i o −
l e t p o r t f o l i o S o r t = p o r t f o l i o n I s o t o p e . g e t A t t r i b u t e ( ’ data−p o r t f o l i o −s
l e t m e n u F i l t e r s = document . q u e r y S e l e c t o r A l l ( ’ . p o r t f o l i o −i s o t o p e . p
menuFilters . forEach ( f u n c t i o n ( e l ) {
e l . addEventListener ( ’ c l i c k ’ , function () {
document . q u e r y S e l e c t o r ( ’ . p o r t f o l i o −i s o t o p e . p o r t f o l i o − f l t e r s .
t h i s . c l a s s L i s t . add ( ’ f i l t e r −a c t i v e ’ ) ;
p o r t f o l i o I s o t o p e . a r r a n g e ({
f i l t e r : t h i s . g e t A t t r i b u t e ( ’ data−f i l t e r ’ )
});
i f ( t y p e o f a o s i n i t === ’ f u n c t i o n ’ ) {
aos init ();
}
}, false );
});
});
/∗∗
∗ Animation on s c r o l l f u n c t i o n and i n i t
∗/
function aos init () {
AOS. i n i t ({
duration : 800 ,
easing : ’ slide ’ ,
once : t r u e ,
mirror : f a l s e
});
}
window . a d d E v e n t L i s t e n e r ( ’ load ’ , ( ) => {
aos init ();
});
});
import m a t p l o t l i b . p y p l o t as p l t
from s k l e a r n . f e a t u r e e x t r a c t i o n . t e x t import C o u n t V e c t o r i z e r
from s k l e a r n . f e a t u r e e x t r a c t i o n . t e x t import T f i d f V e c t o r i z e r
from s k l e a r n . m e t r i c s . p a i r w i s e import c o s i n e s i m i l a r i t y
import r e
from n l t k . c o r p u s import stopwords
d e f r e a d d a t a s e t ( path ) :
data = pd . r e a d c s v ( path )
data . drop ( ’ ID ’ , a x i s =1, i n p l a c e=True )
data . drop ( ” Length (ms ) ” , a x i s =1, i n p l a c e=True )
data . drop ( ” A c c o u s t i c n e s s ” , a x i s =1, i n p l a c e=True )
data . drop ( ” D a n c e a b i l i t y ” , a x i s =1, i n p l a c e=True )
data . drop ( ” Energy ” , a x i s =1, i n p l a c e=True )
data . drop ( ” I n s t r u m e n t a l n e s s ” , a x i s =1, i n p l a c e=True )
data . drop ( ” Valence ” , a x i s =1, i n p l a c e=True )
data . drop ( ” L i v e l i n e s s ” , a x i s =1, i n p l a c e=True )
data . drop ( ” Loudness ” , a x i s =1, i n p l a c e=True )
data . drop ( ” S p e e c h i n e s s ” , a x i s =1, i n p l a c e=True )
data . drop ( ”Tempo” , a x i s =1, i n p l a c e=True )
data . drop ( ” Time S i g n a t u r e ” , a x i s =1, i n p l a c e=True )
data [ ” c o m b i n e d f e a t u r e s ” ] = data [ ” Name ” ] + ” ” + \
data [ ” Album”]+” ”+data [ ” R e l e a s e Date ”]+” ”+data [ ’ L y r i c s ’ ]
r e t u r n data
d e f p r e p r o c e s s ( data ) :
data [ ” c o m b i n e d f e a t u r e s ” ] = data [ ” c o m b i n e d f e a t u r e s ” ] . apply (
f u n c=c l e a n i n g )
t f v = T f i d f V e c t o r i z e r ( m a x f e a t u r e s =10000)
t f v m a t r i x = t f v . f i t t r a n s f o r m ( data [ ” c o m b i n e d f e a t u r e s ” ] )
cosine sim = cosine similarity ( tfv matrix )
d e f recommended songs ( s o n g u s e r l i k e s ) :
s o n g i n d e x = data [ data . Album == s o n g u s e r l i k e s ] . i n d e x [ 0 ]
s i m i l a r s o n g s = l i s t ( enumerate ( c o s i n e s i m [ s o n g i n d e x ] ) )
similar song sorted = sorted (
s i m i l a r s o n g s , key=lambda x : x [ 1 ] , r e v e r s e=True )
f o r song i n s i m i l a r s o n g s o r t e d [ 1 : 1 1 ] :
s i m i l a r s o n g s = data [ data . i n d e x == song [ 0 ] ] [ ” Album ” ] . v a l u e s [ 0 ]
print ( similar songs )
8 Testing
8.1 Testing Methodologies
There are many different types of testing methods or techniques used as part of the
software testing methodology. Some of the important testing methodologies are:
White box testing creates test cases based on internal structure by looking at the
system from the inside out. Programming knowledge is necessary to recognize every
route within the software. To workout paths through the code, the tester selects test
case inputs and ascertains the proper outputs.
1. There is no need to wait for the user interface (UI) to be finished before
beginning white box testing of the intended application. It covers every conceivable
code route, guaranteeing exhaustive testing.
2. It facilitates coding standard verification.
Black box testing concentrates on the software’s functional needs. Another name for
it is functional testing. This is a method of software testing in which the tester is
blind to the internal operations of the object under test.
1. Because the tester and the designer are unrelated to one another, the test is
objective.
2. The tester is not required to be familiar with any particular programming lan-
guage.
1. A wide sample space must be used for the test inputs. That is, it will take time
to process such a large amount of data.
2. It is also challenging to find every potential input in the constrained testing
period. Writing test cases is therefore challenging and slow.
Two major categories can be used to classify the elements influencing the quality:
Ones that are measurable directly.
2. Elements that are amenable to indirect measurement
5. Controlling Emotions: The method helps people with mental illnesses reg-
ulate their emotions by finding similar music patterns that provide them with a tool
for self-expression, relaxation, and emotional release.
9.2 Advantages
- Enhanced communication and collaboration among farmers.
- Customized music therapy recommendations honor patient preferences and in-
crease the efficacy of treatment for mental health issues.
- Listeners can extend their musical horizons by finding new music that speaks to
their emotions.
- Stress and anxiety symptoms can be effectively managed by listening to music
that follows a similar rhythm.
- Regular involvement and favorable results are encouraged by the platform’s easy
access to therapeutic music material.
9.3 Limitations
-The system’s capacity to offer thorough recommendations may be hampered by
the lack of a wide variety of musical genres.
- NLP algorithms may have biases or errors that result in suggestions that are not
as good as they could be.
- Obstacles such a lack of technology literacy may prevent users from adopting the
system, which would reduce its impact and reach.
- In order to preserve user integrity and confidence, privacy and data security
issues need to be addressed.
A. Expansion of Features:
11 Conclusion
To sum up, the creation of a platform that uses natural language processing (NLP)
to identify recurring musical patterns has great potential to transform how people
listen to and experience music. We have investigated many aspects of the plat-
form during this project, such as its usefulness, functionality, and possible effects on
users—especially those with mental health issues. Several significant conclusions have
been drawn from a thorough examination of the system’s capabilities, constraints, and
prospects for the future.
First off, the platform shows a lot of promise for offering therapeutically appropri-
ate music selections based on personal tastes. The platform is able to provide users
with a wide range of music choices that connect with their emotions and experiences
by utilizing natural language processing (NLP) algorithms to evaluate and interpret
musical data.
References
[1] Martin Mabeifam Ujakpa, Abner Kristof, Augusto Domingos, Valerianus
Hashiyana, Nalina Suresh, Jude O. Osakwe, and Gloria Iyawa. Personalized
music recommendations simulation based on improved collaborative algorithm.
In 2021 IST-Africa Conference (IST-Africa), pages 1–7, 2021.
[2] Sai Sree Laya Chukkapalli, Priyanka Ranade, Sudip Mittal, and Anupam Joshi. A
privacy preserving anomaly detection framework for music therapy. In 2021 Third
IEEE International Conference on Trust, Privacy and Security in Intelligent
Systems and Applications (TPS-ISA), pages 340–347, 2021.
[7] Ahmad Ali AlZubi and Kalda Galyna. Artificial intelligence and internet of
things for similar music patterns. IEEE Access, 11:78686–78692, 2023.
[9] Neetu Mittal and Ankit Kumar. Music recommendation using content and con-
text information mining. In 2023 4th International Conference on Intelligent
Engineering and Management (ICIEM), pages 1–6, 2023.
[10] Muhammad Shoaib Farooq, Shamyla Riaz, Adnan Abid, Kamran Abid, and
Muhammad Azhar Naeem. A survey on the role of iot in music therapy for
pshycatric disorder. IEEE Access, 7:156237–156271, 2019.
[11] Ramide Augusto Sales Dantas, Milton Vasconcelos da Gama Neto, Ivan Dim-
itry Zyrianoff, and Carlos Alberto Kamienski. Analysic frequency of similar mu-
sic patterns. In 2020 IEEE International Workshop on Raga patterns of similar
Music, pages 109–113, 2020.
[12] Hetal Patel and Dharmendra Patel. Reckoning of music rhythm density and
complexity through mathematical measures. International Journal of Informa-
tion Sciences and Techniques, 6:61–67, 03 2016.