Let the number of boys in the choir be represented as \(5x\) and the number of girls as \(4x\) based on the given ratio of boys to girls (5:4).
Half of the boys left for practice, so the number of boys remaining is:
\[ \frac{5x}{2} \]
After these boys left, it is stated that there were 12 more girls than boys left. This gives us the equation:
\[ 4x = \frac{5x}{2} + 12 \]
Next, we will eliminate the fraction by multiplying every term by 2:
\[ 2(4x) = 5x + 24 \]
This simplifies to:
\[ 8x = 5x + 24 \]
Now, we isolate \(x\) by subtracting \(5x\) from both sides:
\[ 8x - 5x = 24 \]
This results in:
\[ 3x = 24 \]
Now we divide both sides by 3:
\[ x = 8 \]
Now that we have the value of \(x\), we can find the numbers of boys and girls in the choir originally:
Number of boys:
\[ 5x = 5 \times 8 = 40 \]
Number of girls:
\[ 4x = 4 \times 8 = 32 \]
Now, to find the total number of students in the choir before any boys left:
\[ \text{Total} = 5x + 4x = 40 + 32 = 72 \]
Thus, the total number of students in the choir before the boys left is:
\[ \boxed{72} \]