I am trying to use this nice library but I am having problems
1) I can't read the instruments in the tracks
2) I can't mute a channel
3) Are there any explanations or examples online? If so, where can I get them?
Thank you
if I compile with java8 everything is fine.
But now I have another problem.
If I compile the program in Jar I get the error you see.
I had to use ISO-8859-16 to show the words with the accent, otherwise utf-8 puts me a wrong character.
If I launch the program from inside B4J it works, but when I compile and launch the Jar it crashes and the error is what you see.
How can I do?
Make a thread based timer to manage ticks in milliseconds to dispatch events to midi receiver?
steve, I am trying to make a midi sequencer (just use Windows internal midi to playback) and I found the simple chord example you shared doesn't compile. I tried clone receiver code in that example and it also doesn't work. Now I am using sequencer but during playing any parameter changes in real-time like bpm or event I will have to stop the sequencer, regenerate the midi sequence and play again. Any advice? Thanks.
You said you tried ISO-8859-16, This was generally ignored because of the bug. The fix is to allow the character set to be specified when a text event is required to be read. Unfortunately it appears that ISO-8859-16 is not supported by the java encoding methods.
The encoding used in the midifile should be specified at the beginning of the Lyric track, you'll have to read the midi spec to find the specifics.
steve, I am trying to make a midi sequencer (just use Windows internal midi to playback) and I found the simple chord example you shared doesn't compile. I tried clone receiver code in that example and it also doesn't work. Now I am using sequencer but during playing any parameter changes in real-time like bpm or event I will have to stop the sequencer, regenerate the midi sequence and play again. Any advice? Thanks.
Can you start a new thread for this issue so that this one doesn't become a spaghetti thread. It's easier to follow issues in their own thread. I will look at the old simple chord app, thanks for reporting that.
A bit more investigation and apparently ISO-8859-16 is supported in java 10+, I tried compiling with java 11 and it doesn't crash. I can't tell if it's working correctly as I don't have a midi file encoded using it. You will then need to create a package to run it stand alone.
Hi Stevel,
I have finished the first release of the karaoke software made with your library and your precious help and advice.
I would love to hear from you, although I know there are many things still to be done.
The program is bigger than 1 MB and it doesn't let me post it (JAR).
I would have liked to have your opinion.
If I can get it to you somehow just tell me.
Thank you.
Hi Luca, could you send me the jar by email kimstudio@163.com if convenient as I can't access googledrive or dropbox. I am interested in midi and would like to try your work, thanks.
Thank you, it's nice to hear from you.
I tried with several midi files (0 and 1) Kar and Mid, and I fixed some problems (not all files are done correctly).
There are still some problems to solve, and I'll solve them in time, maybe I'll bother you again, if it doesn't bother you.
Replace the MidiData_Event sub in the MidiTransmitter Class with:
B4X:
Private Sub MidiData_Event (MethodName As String, Args() As Object)
Dim Msg As MidiMessage
Msg.Initialize
Msg.SetObject(Args(0))
For Each LT As MidiListenerClass In ListenerMap.Keys
CallSub3(LT.Callback,LT.EventName & "_Received",Msg,Args(1))
Next
End Sub
Create a listener on the Sequencer Transmitter after the sequencer is opened:
B4X:
Seqr.GetTransmitter.AddListener(Me,"Trans")
Add this sub in the module that the listener is created in:
B4X:
Private Sub Trans_Received(Msg As MidiMessage, TimeStamp As Long)
If Msg.IsShortMessage Then
Dim SM As MidiShortMessage = Msg.AsShortMessage
If SM.GetCommand = MidiStatus.NOTE_ON Or SM.GetCommand = MidiStatus.NOTE_OFF Then
Log(SM.GetCommand & " : " & SM.GetChannel & " : " & SM.GetData1 & " : " & SM.GetData2)
End If
End If
End Sub