Good question, the meta message doesn't contain a reference to the tick of it's related event or the event itself. I would suggest that you try building a list of all metaevents in the target track and increment a pointer with each metamessage received to the appropriate item in the list. You could create a custom type to hold additional information such as the tick value or if the message is actually a text or lyric message or both if necessary as you need it2) In the Meta Meta_Event how can I retrieve the ticks?
the whole base is slowed down
What error do you get using the transpose function?
For pitchbend values see the midi spec Or : https://sites.uci.edu/camp2014/2014/04/30/managing-midi-pitchbend-messages/#:~:text=The MIDI protocol specifies that,16,383 means maximum upward bend. The relationship between the pitchbend value and the number of semitone or cents is I believe dependent on the synthesizers implementation.
Good question, the meta message doesn't contain a reference to the tick of it's related event or the event itself. I would suggest that you try building a list of all metaevents in the target track and increment a pointer with each metamessage received to the appropriate item in the list. You could create a custom type to hold additional information such as the tick value or if the message is actually a text or lyric message or both if necessary as you need it
Were you running in Debug mode?
2) In vanbasco the transpose ranges from -12 to +12.
If I consider 8192 (midi specifications) the 0 (zero) 8192 the -12 and 16383 the +12 it means that I have to increase or decrease by 682 every semitone.
Da dove viene questo 8192? Se ho capito bene 1 significa un semitono in nota midi, quindi dalla chiave C a D basta aggiungere 2 a ciascuna nota, +12 un'ottava più alta. Correggimi se sbaglio.
Where is this 8192 coming from? If I understand correctly 1 means a semitone in midi note, so from key C to D just add 2 to each note, +12 one octave higher. Correct me if I am wrong.
You shouldn't use pitchbend to transpose a track, the result will be dependant on how the synthesizer handles the pitch bend and is likely to be different on different synths.2) In vanbasco the transpose ranges from -12 to +12.
If I consider 8192 (midi specifications) the 0 (zero) 8192 the -12 and 16383 the +12 it means that I have to increase or decrease by 682 every semitone.
If ChoiceDevice.Items.Size > 0 Then ChoiceDevice.SelectedIndex = 0
at line 764 which is why the device is selected as opposed to the internal synth when the app starts.tAHNKOK, la prima cosa è capire un po' meglio la libreria javaxmidi.
Il sintetizzatore restituito da MidiSystemStatic.GetSynthesizer è il sintetizzatore predefinito per il sistema e può essere controllato utilizzando l'oggetto Synth e viene fornito come un modo rapido per accedere al generatore di suoni interno e/o per caricare i soundfont.
Se stai usando dispositivi midi, è più semplice gestire il mute e l'assolo a livello di traccia anziché a livello di canale, ho modificato il progetto allegato per farlo e funziona ancora con i soundfont.
Stavi ricevendo 2 dispositivi poiché il tuo codice in SelezionaMidiOut utilizzava MidiSystemStatic.GetSequencer invece di MidiSystemStatic.GetSequencer2(False) che collegava il sintetizzatore predefinito e il dispositivo midi out selezionato. Ho anche aggiunto il codice a quel metodo per disabilitare tutti i trasmettitori e ricevitori esistenti prima di assegnare un nuovo dispositivo.
SelezionaMidiOut viene chiamato daIf ChoiceDevice.Items.Size > 0 Then ChoiceDevice.SelectedIndex = 0
alla riga 764 motivo per cui il dispositivo viene selezionato al posto del synth interno all'avvio dell'app.
Ho anche modificato il metodo Variatono per inviare AllnotesOff al MidiDevice o al sintetizzatore come richiesto in modo che la trasposizione funzioni ancora come previsto.
Which is why I explained the change to the Variotono method, you need to do something similar for the program change if the synth object is not initialized.But i now select a change strument, the software goes into error.
When the instrument is changed a new sequencer object is obtained, you need to add the listener again:META_EVENT is blocked
private Sub SelezionaMidiOut ' Per cambiare il midi out
If Seqr.IsInitialized Then Seqr.Stop
ResetDevices
Dim Md() As MidiDeviceInfo= MidiSystemStatic.GetMidiDeviceInfo
MidiDev = MidiSystemStatic.GetMidiDevice(Md(ChoiceDevice.SelectedIndex))
MidiDev.Open
Dim midioutrec As MidiReceiver = MidiDev.GetReceiver
Dim Seqr As MidiSequencer = MidiSystemStatic.GetSequencer2(False)
Seqr.GetTransmitter.SetReceiver(midioutrec)
Seqr.Open
Seqr.AddMetaEventListener(Me,"Meta") 'Add the meta listener to the new sequencer instance.
If Seq.IsInitialized Then Seqr.SetSequence2(Seq)
End Sub