[Gambas-user] Developing MIDI app with Gambas

Benoit Minisini gambas at ...1...
Mon Apr 25 14:42:37 CEST 2005


On Friday 22 April 2005 03:55, Juan Jose Costello Levien wrote:
> Hi,
>
> I want to receive MIDI signals on a MIDI port connected to a MIDI
> device, and process them as I need. Is there a way to do that? Something
> related to SDL?
>
> Thanks.
>
> Juan
>

Maybe watching the midi file descriptor works ?

OPEN "/dev/midi" FOR READ WATCH AS #hMidi

...

PUBLIC SUB File_Read()

  DIM sBuffer AS String

  READ #hMidi, sBuffer, -255

  FOR iInd = 1 TO Len(sBuffer)
    PRINT Hex$(Asc(sBuffer, iInd), 2)
  NEXT

END

-- 
Benoit Minisini
mailto:gambas at ...1...




More information about the User mailing list