Search code examples
javaandroidaudiorecordmidi

Record a audio file from a midi keyboard and store it with android studio


for an exam project i'm programming a 1 octave playable midi keayboard on phone. I managed, thank to things found here on SO, to make the keyboard work but i have no clue on what i can do to record what I'm playing. I should be able to play a melody ( record it by pressing a button, i guess) and save it on a folder as a .mp3 file. Is that possible by not using the device microphone or is it indispensable?


Solution

  • at the end, i made it by recording a plain file with byte data where every byte is an object of tipe "record" that is called by the midi controller that plays the note, with it it's saved the duration of all the notes, so when you open the file 'recorded' by the midicontroller it pays the note you recorded with the same timing you played them first. i can share code if anyone is interested.