octave-patch-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-patch-tracker] [patch #9868] midi functions


From: Lars Kindermann
Subject: [Octave-patch-tracker] [patch #9868] midi functions
Date: Mon, 25 Nov 2019 22:50:31 -0500 (EST)
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:70.0) Gecko/20100101 Firefox/70.0

Follow-up Comment #7, patch #9868 (project octave):

Sending generated midi messages works ok now,
but re-transmitting received messages still fails:


pkg load midi

mididevinfo
devin  = mididevice ('input' ,'VMPK Output 128:0')
devout = mididevice ('output','FLUID Synth (10094) 130:0')

msg = midimsg("note", 0, 60, 127, 1.2)
midisend(devout, msg)

while 1 
 msg = midireceive(devin);
 if length(msg)
  msg 
  midisend(devout,msg)
 end 
endwhile 



>> miditest

MIDI devices available
ID Direction Interface  Name
 0       output       Alsa Midi Through 14:0
 1       output       Alsa VMPK Input 129:0
 2       output       Alsa FLUID Synth (10094) 130:0
 3       output       Alsa RtMidi Input Client 132:0
 4        input       Alsa Midi Through 14:0
 5        input       Alsa VMPK Output 128:0
 6        input       Alsa RtMidi Output Client 133:0
devin =

  mididevice connected to
    input: 'VMPK Output 128:0' (5)


devout =

  mididevice connected to
    output: 'FLUID Synth (10094) 130:0' (2)


MIDI message:
 NoteOn     Channel:  0 Note:  60 Velocity: 127 Timestamp: 0.000000 [ 0x90
0x3C 0x7F ]
 NoteOn     Channel:  0 Note:  60 Velocity:   0 Timestamp: 1.200000 [ 0x90
0x3C 0x00 ]
ans = 04:27:58.173
MIDI message:
 NoteOn     Channel:  0 Note:  55 Velocity:  70 Timestamp: 0.000000 [ 0x90
0x37 0x46 ]
error: scalar cannot be indexed with {
error: called from
    midisend at line 55 column 9
    miditest at line 17 column 3
>>


And how do I access the data?


>> msg.type
ans = NoteOn

>> msg.timestamp
ans = 0

>> msg.data
error: unimplemented midimsg.subsref property
error: called from
    subsref at line 344 column 13
>>



    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/patch/?9868>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]