omz:forum

    • Register
    • Login
    • Search
    • Recent
    • Popular

    Welcome!

    This is the community forum for my apps Pythonista and Editorial.

    For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.


    Midi

    Pythonista
    5
    8
    6581
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • robertiii
      robertiii last edited by

      Is there a Way to receive midi notes from another app?

      1 Reply Last reply Reply Quote 0
      • robertiii
        robertiii last edited by

        Is there no midi with Pythonista?

        Phuket2 1 Reply Last reply Reply Quote 0
        • Phuket2
          Phuket2 @robertiii last edited by

          @robertiii , I am not trying to answer your question, but I found one topic about it, here is the link. But i did a search on tags. So i just wanted to mention, when you write something on the forum here, its helpful if you also take the time to add tags to the post. I am sure I have seen more about midi on the forums, but its not so easy to search here. Tags are pretty good though

          1 Reply Last reply Reply Quote 0
          • ccc
            ccc last edited by ccc

            Go to google.com and paste this into the search box (not the URL bar):

            • site:forum.omz-software.com midi
            1 Reply Last reply Reply Quote 0
            • Phuket2
              Phuket2 last edited by Phuket2

              @cook, hey are you still around. We lost touch when I took a break from coding. But I still use the the tool you made to search the Pythonista forums. It wasnt entirely finished but its still quite functional and useful. Just wondered did you repo the code, do updates etc? I know it was a long time ago, but I think it had real promise. Love to hear what happened with it.

              1 Reply Last reply Reply Quote 0
              • ccc
                ccc last edited by ccc

                site://forum.omz-software.com midi

                1 Reply Last reply Reply Quote 0
                • rs2000
                  rs2000 last edited by rs2000

                  I guess I have found a solution.
                  By MIDI we're talking about MIDI messages, not handling standard MIDI files (which isn't a problem in Pythonista).

                  The most viable option I see atm is using a proxy app like MidiFire from Audeonic (available on the iOS App Store).

                  Open the "other app", run MidiFire and add an OSC module and a MIDI source or destination, depending on your use case.
                  Then connect the modules you've just added.

                  To communicate with MIDI messages between Pythonista and your app of choice, all you have to do is send and/or receive UDP packets containing MIDI wrapped in OSC messages.

                  Have fun :)

                  1 Reply Last reply Reply Quote 0
                  • machinehistory
                    machinehistory last edited by

                    Here is a quick example for sending midi from pythonista. I am using MidiFire to process the messages as discussed here. https://audeonic.boards.net/thread/734/adding-scripting-languages-using-midifire. My midifire setup to send out midi consists of an osc block connected to an event monitor connected to a midi output block.

                    import socket
                    
                    # addressing information of target
                    #fill in your ip and port
                    IPADDR = '127.0.0.1'
                    PORTNUM = 8051
                    
                    # enter the data content of the UDP packet as hex
                    msg1 = bytearray([0x90, 0x40, 0x60])
                    msg2 = bytes.fromhex('903e70')
                    #or using variable for midi note message
                    midi_message = '903c50'
                    midi_packet = bytes.fromhex(midi_message)
                    
                    # initialize a socket, think of it as a cable
                    # SOCK_DGRAM specifies that this is UDP
                    s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM, 0)
                    
                    # connect the socket, think of it as connecting the cable to the address location
                    s.connect((IPADDR, PORTNUM))
                    
                    # send the command
                    s.send(midi_packet)
                    s.send(msg1)
                    s.send(msg2)
                    # close the socket
                    s.close()
                    1 Reply Last reply Reply Quote 1
                    • First post
                      Last post
                    Powered by NodeBB Forums | Contributors