Sound Doesn't Play from Name in List


I'm trying to make a digital piano with a feature to "record" the notes you played.

I have a procedure (keyPressed) that adds the note pressed to a list, but when I play use the play button (when it gives an error "Error 703: Unable to play [Note].mp3" where [Note] is the last note item in the list

Update: I changed it so all the notes in variable notes are "[Number].mp3", and removed the join in the set NoteSound.Source so its just the select list item. Now if I enable the recording, it works but only if there is one note in the list. If there are multiple, it does not make a sound.

Where do the MP3s come from? Where and how are they recorded?
Create a small example, show all blocks and post also the aia.

The MP3's were uploaded to the media

Heres the AIA:


1 Like

Btw, the sound (note) has a lenght of 2.5 sec, but mp3 track is 40.5 sec (38 sec silence):

Any deep meaning behind it?

I downloaded the mp3 from a website with piano samples

Ok, you should trim these down.

I would've but I downloaded them on a school computer so I couldn't trim it. I have the minimum intervals for the players set to 1 second so it doesn't cause an issue.

There is no Minimum Interval for the Player component, which I used in my blocks.

The min interval has to be at least 2500ms.

Ok, I have cropped them to be 2500 ms and will be replacing the files on my project with them

Side effect: the app will be a lot smaller ...

1 Like

So I tried this, and it does play notes now, but instead of playing the notes that I had pressed it plays the list of notes from top to bottom, and if I change it so its if get global Index < length of list list get global notesPlayed it just plays the list of notes for however many keys were pressed (for example, if I played 4 notes it'll play the first 4 notes of the piano

EC_Create2 (2).aia (516.2 KB)

When you run one sound. The event "Player1.Completed" is fired, then the procedure "nextNote" is started. In the procedure "keyPressed" use the variable-flag you set to "false". In the event "player1.completed" use "If" and put this flag here. At the end of this event, set the flag to "true".

I don't think that would change anything. When the player is played, it's already set to true because the user would turn off the record mode

Don't think, just do as I wrote. Otherwise, why are you asking :grin:. Unless you have not understood what I am writing about. I use google translator so sometimes something may be incomprehensible.

because you are using the wrong list...


Trying to push the limits! Snippets, Tutorials and Extensions from Pura Vida Apps by icon24 Taifun.


In that image it's set to global notesPlayed. If it's set to global notesPlayed it only plays from top to bottom for however many notes were pressed (If i pressed 5 notes it'll play the first 5 notes of the piano)

If I set it to get global Notes it'll just play the entire piano.

I think it might have got lost in translation. It sounds like you want me to add the if Record_mode_on.Enabled = false block into when Player1.completed but change the = to true. But I'm not sure what would go into the if then statement.

It was me who misunderstood your problem. Taifun is right, but the solution looks like this:

1 Like