Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7186225
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T18:35:13+00:00 2026-05-28T18:35:13+00:00

I will simulate a piano key-board in android pad. When use press one key,

  • 0

I will simulate a piano key-board in android pad. When use press one key, I would like play some sound, I know JetPlayer can play midi file, but in this case, I have no mid file, just one single note, how to do it?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T18:35:14+00:00Added an answer on May 28, 2026 at 6:35 pm

    MIDI and using MP3s are completely different things. You could program MIDI to sound like a piano but you will have to do a lot of work to get a good result and you need to be aware that the result will depend on the sound hardware of the phone. Android support for MIDI is also very poor and you’ll need a lot of code to do the plumbing work. I recommend that you stick with MP3s. 100x20k files is not really that big. You could possibly make them smaller with some additional compression. For things like single notes, you really don’t need high quality audio. Try it out on your phone with 16kbps, 32kbps and 64kpbs.

    If you go with MP3, You might want to consider using the SoundPool classes. Take a look at the tutorial here

    This enables you to create a HashMap with an index for each sound which you can then use to play each individual note. The index could be the key number for example. To play a note, you would simply call the playSound method of the SoundPool with the relevant index.

    I’m assuming that you have a limited number of piano keys and therefore, the overhead of loading multiple sound files (your MP3s) is acceptable. If you have a large number, you might need to think about only loading the sound files for keys which are visible to the user in order to keep your memory usage under control.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to write an app that will, given some network input, simulate mouse
I use the following lines to simulate a Control_A [ select all ] key
Are there any plugins out there that will simulate a double click in any
I want to make a program that will simulate a user browsing a site
I need to simulate how my application will look when a user is driving
Will limiting a query to one result record, improve performance in a large(ish) MySQL
Will .Net 4.0 use a new version of the CLR (v2.1, 3.0) or will
Are there tools available that will simulate going to a web site, clicking links,
I'm trying to test some scripting that will run on non-English Windows installations. I'm
I'm trying to develop an application that will simulate a route through Google's Navigation

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.