How do I make a ear training kind of game

0 favourites
  • 8 posts
From the Asset Store
Game with complete Source-Code (Construct 3 / .c3p) + HTML5 Exported.
  • hello everyone! this is my first post,Hope everyone is healthy and happy

    i want to make a ear training game : something like one button that plays a random sound file(say 8 piano sample c3 d3 e3 f3 g3 a3 b3 c4 in a array or choose )

    and then answer with a touch tap on the 8 Piano keyboard(button or sprite)

    if the answer is correct a sprite or text show correct

    if the answer is wrong a sprite or text show wrong

    i think its a simple one But!I am an absolute newbie in construct and in programming

    and I searched the whole forum , there are two similar but the links to solve the problem are dead

    so Please help me, I would very appreciate a capx file example or explain in detail or Any helps are welcome

    Thanks

  • Use an array to store the names of notes you want to store, for example:

    C,C#,D,D#,E,F,F#,G,G#,A,A#,B

    Load your audio samples for each note and name them the same as the values in the array.

    Create keys sprites that match the notes in your array and give them an instance string variable called: var_note.

    Create a static local or global variable called: var_currentnote

    Create a text object to display the outcome.

    Whenever you want the note to play use the logic below:

    On play note action - Set var_currentnote to Array.At(choose(0,Array.Width-1))

    Sub Event - Play audio by name var_currentnote

    This will select a random note from those in your array and then play the correspondingly named audio file.

    Once the sound has played the player should click on the appropriate note sprite on screen. When this happens use this logic:

    On Mouse clicked on KeySprite

    Sub Event

    Evaluate expression: KeySprite.var_note=var_currentnote - Set text to "Correct"

    Else - Set Text to "Wrong"

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Thank you very much for your reply and help calminthenight

    But that's all I can do at the moment, following your instructions

    https://drive.google.com/file/d/19g-VFfHkK2FBxQeF4SXaalBbHsXIcOCJ/view?usp=sharing

    i dont know how todo this > Create keys sprites that match the notes in your array and give them an instance string variable called: var_note. (which i use buttons )

    and i cant get random note by your instructions but i find a way solved

    most important i think this i dont know how to do it >Once the sound has played the player should click on the appropriate note sprite on screen. When this happens use this logic:

    On Mouse clicked on KeySprite(which i use button "start")

    Sub Event

    Evaluate expression: KeySprite.var_note=var_currentnote - Set text to "Correct"

    Could you please help me to look at that c3p file and guide me to complete this, thanks in advance

    https://drive.google.com/file/d/19g-VFfHkK2FBxQeF4SXaalBbHsXIcOCJ/view?usp=sharing

  • Can anyone help me, please!Any helps are welcome

    Thanks

  • Sorry, I made a mistake in the answer before using "choose". I have done some of the basic parts and left notes for you so you can understand what is happening.

    I have deleted the different note buttons, and am just using multiple instances of the one note button with different values and variables.

    File here: 1drv.ms/u/s!AkmrWgxeuxlKhJt92B-pS2VKN6B87Q

  • Thank you verymuch calminthenight

    BUT! I don't know why I can't open that onedrive link here. Could you please send it to my email qnmapphahaxkd@gmail.com or Google drv or Dropbox? Please

  • Thank you very much calminthenight I learned a lot from your example ahahaha!

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)