# Rhythm-Based Attention Analysis: A Comprehensive Model for Music Hierarchy
## 3 Proposed Methods
### Quantization Scheme for Rhythmic Attention
#### 3.1.2 Attention Allocation at the Compound and Hierarchical Level  
After modeling attention allocation in musical basic beat types, we focus on the compound meter and allocation methods for each note in a composition.  
For basic beat types, the process is equally divided and allocates an attention value to each interval, and the intervals, including strong beats, are allocated a higher value. When it comes to the compound meter and hierarchical level, the allocation process can be regarded as an integral process over temporal, which means we transform the idea of a \"point\" (a value assigned to each beat) into a \"continuum\" (a process of integrating the time assigned to the location and duration of notes, but the density (intensity) is not equalized, and is higher on the beat point or the beginning of a cycle).  
While the density function for integration can be challenging to express directly due to its abstract nature and potentially infinite recursive allocation, we can utilize a practical approach based on a recursive division scheme. This approach draws inspiration from the basic beat types allocation scheme, using its duration as the initial integration value and then recursively dividing it. Here is a refined definition:  
Let \(D\) be the integral value over a period of one beat cycle \((0,t)\). Divide the interval \((0,t)\) into \(k\) equal sub-intervals \((0,\frac{1}{k}t)\), \((\frac{1}{k}t,\frac{2}{k}t)\) until \((\frac{k-1}{k}t,t)\), where \(k\) is a positive integer.  
Drawing upon the attention allocation scheme for basic beats, we define \(m_{k}\) as the power intensity of the master cycle and \(s_{k}\) as the power intensity of the sub-cycles. We then assign integral values to these sub-intervals as follows:  
* The first sub-interval, corresponding to the master cycle, has an integral value of \(m_{k}D\).
* The remaining sub-intervals, corresponding to the sub-cycles, each have an integral value of \(s_{k}D\).  
According to [PERSON]'s [30] study, the attentional intensity of a note is positively correlated with the rapidity of change. Recursively decomposing time implies an exponential increase in the rapidity. Therefore, when recursively dividing one interval, we will adjust the integral split ratio to \(m_{k}^{d}\) and \(s_{k}^{d}\), where \(d\) is the recursive depth and begins at \(1\).  
Let \(I(a,b)\) represent the integral value over the interval \((a,b)\). We divide this interval into \(k\) parts, then the value of \(I\) for \(i\)-th sub-interval can be expressed as Equation (4):  
\[I(0,t) =D \tag{4}\] \[I(a+\frac{i-1}{k}b,a+\frac{i}{k}b) =\begin{cases}\frac{m_{k}^{d}}{m_{k}^{d}+(k-1)\frac{1}{k}t}I(a,b )&\text{when $i=1$}\\ \frac{s_{k}^{d}}{m_{k}^{d}+(k-1)\frac{1}{k}t}I(a,b)&\text{when $i\geq 2$}\end{cases}.\]  
\begin{table}
\begin{tabular}{c c c c} \hline \hline \(\mathbf{k}\) & \(\mathbf{m_{k}}\) & \(\mathbf{s_{k}}\) & **Musical Scenarios** \\ \hline
2 & 0.5858 & 0.4142 & Duple meter, Duplet \\
3 & 0.4641 & 0.2679 & Triple meter, Triplet \\
5 & 0.3586 & 0.1604 & Quintuplet \\
7 & 0.3060 & 0.1157 & Septuplet \\ \hline \hline \end{tabular}
\end{table}
Table 2: Attentional intensities for common scenarios.  
Figure 3 shows the process of transformation of the primitive function with increasing value \(d\) from 0 to 4 for calculating \(I\) when the value of \(k\) is 2 or 3 throughout. The fractal structural characteristics can be clearly seen in the figure.