user29454: I am playing note tone with CapacitiveSensor and an output of tone
like this
void loop() {   
    time_before = millis(); 

    long total1 =  cs_2_3.capacitiveSensor(30);
    long total2 =  cs_2_4.capacitiveSensor(30);


    if((total1>200)||(total2>200)) {

        if(total1>200) {

            tone(12,261); 
            time_after = millis();
            Serial.print("Time: ");
            Serial.println(time_after-time_before);
        }
        if(total2>200) {   
             tone(12,294);   
             time_after = millis();
             Serial.print("Time: ");
             Serial.println(time_after-time_before);
        }
    }
}

How can I read how many seconds I play this note par example

user6936: Your code currently will only measure the code execution time and not the duration of the note(s) being played. 
You need to follow uint128_t's suggestion and rewrite the code to detect the "button release", at which point you measure the time with millis(), and call noTone(). Only then will you be able to measure the note's duration. 
I believe that the source of confusion is that you seem to think that tone() acts like delay() and waits for the note to finish - it does not. tone() merely starts the note and then the next instruction is executed, without waiting for the note to end.
So, using millis() straight after calling tone() will actually only measure the time it takes to execute the tone() statement (and a few if statements - depending on whether you use your original code, or Maximus's code).

29454: <p>I am playing note tone with CapacitiveSensor and an output of tone
like this</p>

<pre><code>void loop() {   
    time_before = millis(); 

    long total1 =  cs_2_3.capacitiveSensor(30);
    long total2 =  cs_2_4.capacitiveSensor(30);


    if((total1&gt;200)||(total2&gt;200)) {

        if(total1&gt;200) {

            tone(12,261); 
            time_after = millis();
            Serial.print("Time: ");
            Serial.println(time_after-time_before);
        }
        if(total2&gt;200) {   
             tone(12,294);   
             time_after = millis();
             Serial.print("Time: ");
             Serial.println(time_after-time_before);
        }
    }
}
</code></pre>

<p>How can I read how many seconds I play this note par example</p>
 6936: <p>Your code currently will only measure the code execution time and <strong>not</strong> the duration of the note(s) being played. </p>

<p>You need to follow <a href="https://arduino.stackexchange.com/questions/32715/how-can-i-read-delay-of-a-note-that-i-am-playing#comment64941_32715">uint128_t's suggestion</a> and rewrite the code to detect the "button release", at which point you measure the time with <code>millis()</code>, <strong>and</strong> call <code>noTone()</code>. Only then will you be able to measure the note's duration. </p>

<p>I believe that the source of confusion is that you seem to think that <code>tone()</code> acts like <code>delay()</code> and waits for the note to finish - it <strong>does not</strong>. <code>tone()</code> merely starts the note and then the next instruction is executed, without waiting for the note to end.</p>

<p>So, using <code>millis()</code> straight after calling <code>tone()</code> will actually only measure the time it takes to execute the <code>tone()</code> statement (and a few <code>if</code> statements - depending on whether you use your original code, or <a href="https://arduino.stackexchange.com/questions/32715/how-can-i-read-delay-of-a-note-that-i-am-playing#answer-32718">Maximus's code</a>).</p>
