Well, I can certainly access the port with:
julia> inp = mido.open_input("Q25 MIDI 1")
PyObject <open input 'Q25 MIDI 1' (PortMidi/ALSA)>
but for pulling the received messages out, I'm finding it impossible to
translate the following python function:
def iter(x):
vel = []
nute = []
for msg in x.iter_pending():
if (msg.type == 'note_off'):
msg.velocity = 0
vel.append(msg.velocity)
nute.append(msg.note)
n = len(vel)
return n, vel, nute
-------------
I gather that msg[:type] would work if I could receive one in the first
place -- but julia doesn't recognize the mido method "port.iter_pending" in
any notation I've found so far
How to say that, please?
On Tue, Dec 1, 2015 at 6:29 PM, Forrest Curo <[email protected]> wrote:
> >I'm not sure what you mean by "taking someone else's objects apart". >
> >Usually there are straightforward rules for converting Python code into
> >the corresponding Julia code. In your example, of calling mymod.myf(x)
> >to access x.theirmethod, you could just call x[:theirmethod].
>
> Okay, thanks!
>
> On Tue, Dec 1, 2015 at 6:25 PM, Steven G. Johnson <[email protected]>
> wrote:
>
>> (And if there are types that PyCall does not translate well, pull
>> requests for PyCall are welcome.)
>>
>
>