fbpx
  Monday, 29 June 2020
  2 Replies
  13.7K Visits
1
Votes
Undo
  Subscribe
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.
3 years ago
·
#5641
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?"
3 years ago
·
#5643
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
  • Page :
  • 1
There are no replies made for this post yet.