Cherche de l'aide pour finir un programme de lecture de tram midi

petiflamand Messages postés 675 Date d'inscription samedi 31 mai 2003 Statut Membre Dernière intervention 26 mai 2013 - 16 juin 2011 à 18:43
petiflamand Messages postés 675 Date d'inscription samedi 31 mai 2003 Statut Membre Dernière intervention 26 mai 2013 - 16 juin 2011 à 21:45
Bonjour je cherche de l' aide pour finir un programme , le plus gros est fait.
Mais il me manque encore le sysex.
je recois bien quelque chose de mon synthé tyros4.
Le module
Option Explicit


Declare Function midiInGetNumDevs Lib "winmm.dll" () As Long
Declare Function midiInGetDevCaps Lib "winmm.dll" Alias "midiInGetDevCapsA" (ByVal uDeviceID As Long, lpCaps As MIDIINCAPS, ByVal uSize As Long) As Long


Declare Function midiInOpen Lib "winmm.dll" (lphMidiIn As Long, ByVal uDeviceID As Long, ByVal dwCallback As Any, ByVal dwInstance As Long, ByVal dwFlags As Long) As Long
Declare Function midiInClose Lib "winmm.dll" (ByVal hMidiIN As Long) As Long
Declare Function midiInStart Lib "winmm.dll" (ByVal hMidiIN As Long) As Long
Declare Function midiInStop Lib "winmm.dll" (ByVal hMidiIN As Long) As Long
Declare Function midiInReset Lib "winmm.dll" (ByVal hMidiIN As Long) As Long

Public ri As Long


Type MIDIINCAPS
        wMid As Integer
        wPid As Integer
        vDriverVersion As Long
        szPname As String * 32
End Type

Public Const CALLBACK_FUNCTION =  &H30000 

Public Function MidiIn_Event(ByVal MidiInHandle As Long, ByVal Message As Long, ByVal Instance As Long, ByVal dw1 As Long, ByVal dw2 As Long) As Long
     
    Form1.Text1 =  dw1
   
End Function


Le code
Private Sub Text1_Change()

Text3.Text   = Int("&H" + Right(Text1, 2))
 toto = Right$(Hex$(Val(Text1.Text)), 6)
List2.AddItem toto
Text5.Text = Text5.Text + toto
Text4.Text = Text4.Text & " " & Mid$(toto, 3, 2)
End Sub


Je reçois ceci
65B0164B04006B026B065B1164B14006B126B165B3164B34006B326B365B2164B24006B226B2FE
donc ça
B0 65 00 RPN MSB
B0 64 01 RPN LSB
B0 06 40 Data Entry MSB
B0 26 00 Data Entry LSB
B1 65 00 RPN MSB
B1 64 01 RPN LSB
B1 06 40 Data Entry MSB
B1 26 00 Data Entry LSB
B3 65 00 RPN MSB
B3 64 01 RPN LSB
B3 06 40 Data Entry MSB
B3 26 00 Data Entry LSB
B2 65 00 RPN MSB
B2 64 01 RPN LSB
B2 06 40 Data Entry MSB
B2 26 00 Data Entry LSB

et je cherche le
SYSX: F0 43 7E 01 00 1E 42 20 F7


Merci d'avance pour votre aide

2 réponses

cs_Jack Messages postés 14006 Date d'inscription samedi 29 décembre 2001 Statut Modérateur Dernière intervention 28 août 2015 79
16 juin 2011 à 20:11
Salut

Ton exemple n'est pas flagrant de clarté :
[i]Je reçois ceci
65B0164B04006B026B065B1164B14006B126B165B3164B34006B326B365B2164B24006B226B2FE
donc ça
B0 65 00 RPN MSB
B0 64 01 RPN LSB/i
Perso, je vois pas trop le rapport entre les deux.
Un minimum d'explication s'impose.

Donc, tu cherches une suite de codes hexa.
Quel est ton problème ?

Vala
Jack, MVP VB
NB : Je ne répondrai pas aux messages privés

Le savoir est la seule matière qui s'accroit quand on la partage (Socrate)
0
petiflamand Messages postés 675 Date d'inscription samedi 31 mai 2003 Statut Membre Dernière intervention 26 mai 2013 1
16 juin 2011 à 21:45
Bonsoir Jack,
normalement je devrais retrouver
ceci F0 43 7E 01 00 1E 42 20 F7
ces le sysex qui revient du synthé.
mais je ne le trouve pas quand j'utilise
Midi-ox je reçois
B0 65 00 RPN MSB
B0 64 01 RPN LSB
B0 06 40 Data Entry MSB
B0 26 00 Data Entry LSB
B1 65 00 RPN MSB
B1 64 01 RPN LSB
B1 06 40 Data Entry MSB
B1 26 00 Data Entry LSB
B3 65 00 RPN MSB
B3 64 01 RPN LSB
B3 06 40 Data Entry MSB
B3 26 00 Data Entry LSB
B2 65 00 RPN MSB
B2 64 01 RPN LSB
B2 06 40 Data Entry MSB
B2 26 00 Data Entry LSB
et la derniere ligne est le sysex
F0 43 7E 01 00 1E 42 20 F7
qui correspond bien
a cette chaine dans mon programme mais la derniere ligne ne vient pas
B0 65 00 RPN MSB
B0 64 01 RPN LSB
65B0164B04006B026B065B1164B14006B126B165B3164B34006B326B365B2164B24006B226B2FE
0
Rejoignez-nous