## 3 System Overview  
According to musical standards, a chord is a set of three or more notes that are played together. When you play several chords, you generate a chord progression. The structure of a chord progression is a hierarchy that can be represented with a tree. The idea of chord progression and how to encode the tree structure is illustrated in Figure 1.  
Firstly, the tree is constructed following some instructions that, in this work, are proposed by [PERSON]'s theory. The first node in Figure 1 is a tonic region \(TR\) and it determines the key of the chord progression. Secondly, Rule (4b) is applied to get the nodes in level 2. Next, \(TR\) derives into \(t\) (Rule (4e)) and the second child employs Rule (4b). The last levels are obtained by applying Rules (4c), (4f) and (4g). Finally, each leaf node is replaced by a chord that complies with the same harmonic function (tonic, subdominant or dominant). Initially, in the algorithm, this replacement is made randomly. In this work, we must construct chord progressions that follow a concrete tonal tension profile given by the user. The tonal tension profile can be represented with a curve and usually depends on the musical features of the chords and the tree structure associated with the chord progression. The difficulty lies in capturing such subjective properties through a mathematical model. To address this issue, the chords will be encoded as points in topological spaces such as TIS, capable of capturing musical properties [13], and we apply some mathematical measures to capture all these musical properties. The four musical properties captured are: perceptual distance \(\delta\), dissonance \(\xi\), hierarchical tension \(\lambda\) and _voice leading_\(\phi\). All of them are linearly combined in an objective function \(M\). This function will give a score to each chord according to their musical properties. If you join the set of scores given by \(M\) to the chords that are part of the progression, you can generate a curve that represents the tonal tension profile of a chord progression. To know if the tonal tension profile of a chord progression adapts to a curve given by the user, we calculate the regression \(R^{2}\) between both curves. Higher values of \(R^{2}\) will be translated into chord progressions that adapt to the tonal tension profile that the user is looking for. Therefore, we are looking for an optimization of \(R^{2}\). Due to the wide amount of chord progressions that can be created manually, we need a heuristic algorithm to look for different optima according to the regression function, in this case, we used GP with some immune properties that improve its performance to create chord progressions. Consequently, in our work the selection of the chord progressions can be considered as a search problem in a geometrical space (in this case TIS [13]) and subjected to musical constraints. The regression \(R^{2}\) between the points \(M\) and the initial curve drawn by the user will constitute the fitness function of our bioinspired algorithm. The regression function \(R^{2}\) is the fitness of our bioinspired algorithm which, along with the constructed interface, constitutes a system that presents multiple options so that the user can choose among these chord progressions according to his/her preferences. Figure 2 shows an overview of ChordAIS. ChordAIS-Gen workflow is illustrated in Figure 2. In a first step, the user sets some initial parameters, such as the key, the number of chords and the tonal tension profile of the chord progression. The tonal tension profile is a function that should be drawn by the user, and can have any shape. This information will be stored in ChordAIS-Gen for the subsequent iterations. The bioinspired algorithm generates a population of chord progressions. Each chord progression is represented as a tree, which captures its specific hierarchical structure, which has been created following the grammar proposed by [35]. The leaf nodes will be the chords that are part of the chord progression.