The MIDI Forum

  1. Carlo
  2. MIDI Software
  3. Monday, 29 June 2020
  4.  Subscribe via email
Hi everyone, i'm a programming college student from Italy and i need help for a project that involves midi.
The thing: I created a midi keyboard using java and i developed it on android studio, the keyboard works well and i can easily play that keyboard without any issue.
The problem: I now am trying to record what i play on the keyboard on some kind of midi file but i have no clue on where to start to do this part.

What i would like to do is: the user play a note or a melody on the midi keyboard, then when he plays "record" the midi are written in a file that can be riproduced as an audio when played, is that possible, do you know anyone that managed to to this already? Thanks in advance for your answers.
Comment
There are no comments made yet.
Accepted Answer Pending Moderation
0
Votes
Undo
I guess you send some signal/command when the the virtual keyboard pressed and released?
And Java must have some sort of timer/clock. Isn't it simplest for a virtual keyboard, that just write the integer notevalue into a two dimensional array together with the clock timestamp after "rec" pressed and notes start to be pressed.and released. You could use 0-127 for pressed and 128-255 for released notes.
And then save these to a simple textfile?

I guess since you use a virtual keyboard there really is no other information to save or?
At playup you just read in file again to array, and from it generate/calculate a time difference array between notes. This differences between timed events is then used in a thread that sleeps x milliseconds and then send the next array element command to playup or release next note in array?

JT

"Or do i missunderstand you is there a hardware keyboard connected over midi? That play up tonegenerator or samples on computer?"
Comment
There are no comments made yet.
  1. one week ago
  2. MIDI Software
  3. # 1
Accepted Answer Pending Moderation
0
Votes
Undo
I just try to keep things simple myself, doing a sequenser in Javascript, it is alot of work "fiddle" create midifiles and reading them so i kept it simple doing it textfile fashion.
https://midisequenser.000webhostapp.com/
Comment
There are no comments made yet.
  1. one week ago
  2. MIDI Software
  3. # 2
Accepted Answer Pending Moderation
0
Votes
Undo
Ok i didin't think about that but i believe that it's a possible solution, i'll now try to implement this idea that seems kinda easy.

btw it's a virtual keyboard, it uses simple buttons note-shaped and for the rest you guesset right
Comment
There are no comments made yet.
  1. one week ago
  2. MIDI Software
  3. # 3
  • Page :
  • 1


There are no replies made for this post yet.
Be one of the first to reply to this post!