Go Down

Topic: Mario jump sound with Tone (Read 546 times) previous topic - next topic

KawasakiZx10r

Hello, i have made Mario with an ESP32 and i have all the sounds except the jump sound small and super jump, I am using tone and a passive buzzer and a WAV or MP3 or any other format is to large, it must be using Tone.

The sounds can be heard here Mario sounds

I will pay £25 as i do not expect anyone to work for hours on it, preferably someone who knows exactly how to  create sounds with Tone and thus probably in 10 minutes work for someone as such, I can squeeze a tad more cash if you can get them perfect. :)
Only two things are infinite, the universe and human stupidity, and I'm not sure about the former.

Albert Einstein

martinius96

Try this:
Code: [Select]

//SMALL JUMP MARIO
int tonePin = 11;
void setup() {

}

void midi() {

    tone(tonePin, 391, 47.619047619);
    delay(47.619047619);
    delay(47.619047619);
    delay(23.8095238095);
    tone(tonePin, 415, 47.619047619);
    delay(47.619047619);
    tone(tonePin, 880, 47.619047619);
    delay(47.619047619);
    delay(23.8095238095);
    delay(23.8095238095);
    tone(tonePin, 1046, 23.8095238095);
    delay(23.8095238095);
    tone(tonePin, 554, 23.8095238095);
    delay(23.8095238095);
    delay(23.8095238095);
    tone(tonePin, 587, 23.8095238095);
    delay(23.8095238095);
    tone(tonePin, 622, 23.8095238095);
    delay(23.8095238095);
    tone(tonePin, 659, 47.619047619);
    delay(47.619047619);

}

void loop() {
    midi();
}


Arduino and website programmer

wvmarle

Delay and tone take only integers as parameters. All those decimals are ignored.
Quality of answers is related to the quality of questions. Good questions will get good answers. Useless answers are a sign of a poor question.

Go Up