Duet3D Logo Duet3D
    • Tags
    • Documentation
    • Order
    • Register
    • Login

    MIDI to G-Code

    Scheduled Pinned Locked Moved
    General Discussion
    3
    23
    1.3k
    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.
    • A Former User?
      A Former User @fma
      last edited by

      @fma said in MIDI to G-Code:

      but some notes are missing on the Duet.

      In Duet web control of panelDue?

      Had mixed results with DWC but panelDue doesn't skip a beat as far as I can tell.

      Share g-code?

      1 Reply Last reply Reply Quote 0
      • fmaundefined
        fma
        last edited by

        I uploaded the midi/gcode file as a macro, and asked Duet to run it through PanelDue...

        Here is Mario:

        M300 P153 S659
        G4 P153
        M300 P149 S659
        G4 P149
        M300 P148 S0
        G4 P148
        M300 P148 S659
        G4 P148
        M300 P154 S0
        G4 P154
        M300 P149 S523
        G4 P149
        M300 P148 S659
        G4 P148
        M300 P149 S0
        G4 P149
        M300 P154 S784
        G4 P154
        M300 P446 S0
        G4 P446
        M300 P154 S392
        G4 P154
        M300 P452 S0
        G4 P452
        M300 P154 S523
        G4 P154
        M300 P298 S0
        G4 P298
        M300 P148 S392
        G4 P148
        M300 P304 S0
        G4 P304
        M300 P148 S330
        G4 P148
        M300 P303 S0
        G4 P303
        M300 P149 S440
        G4 P149
        M300 P149 S0
        G4 P149
        M300 P150 S494
        G4 P150
        M300 P154 S0
        G4 P154
        M300 P149 S466
        G4 P149
        M300 P149 S440
        G4 P149
        M300 P151 S0
        G4 P151
        M300 P103 S392
        G4 P103
        M300 P100 S0
        G4 P100
        M300 P100 S659
        G4 P100
        M300 P100 S0
        G4 P100
        M300 P97 S784
        G4 P97
        M300 P100 S0
        G4 P100
        M300 P154 S880
        G4 P154
        M300 P150 S0
        G4 P150
        M300 P148 S698
        G4 P148
        M300 P148 S784
        G4 P148
        M300 P154 S0
        G4 P154
        M300 P149 S659
        G4 P149
        M300 P148 S0
        G4 P148
        M300 P148 S523
        G4 P148
        M300 P154 S587
        G4 P154
        M300 P149 S494
        G4 P149
        M300 P302 S0
        G4 P302
        M300 P155 S523
        G4 P155
        M300 P298 S0
        G4 P298
        M300 P148 S392
        G4 P148
        M300 P304 S0
        G4 P304
        M300 P148 S330
        G4 P148
        M300 P303 S0
        G4 P303
        M300 P149 S440
        G4 P149
        M300 P149 S0
        G4 P149
        M300 P150 S494
        G4 P150
        M300 P154 S0
        G4 P154
        M300 P149 S466
        G4 P149
        M300 P149 S440
        G4 P149
        M300 P151 S0
        G4 P151
        M300 P103 S392
        G4 P103
        M300 P100 S0
        G4 P100
        M300 P100 S659
        G4 P100
        M300 P100 S0
        G4 P100
        M300 P97 S784
        G4 P97
        M300 P100 S0
        G4 P100
        M300 P154 S880
        G4 P154
        M300 P150 S0
        G4 P150
        M300 P148 S698
        G4 P148
        M300 P148 S784
        G4 P148
        M300 P154 S0
        G4 P154
        M300 P149 S659
        G4 P149
        M300 P148 S0
        G4 P148
        M300 P148 S523
        G4 P148
        M300 P154 S587
        G4 P154
        M300 P149 S494
        G4 P149
        M300 P603 S0
        G4 P603
        M300 P149 S784
        G4 P149
        M300 P153 S740
        G4 P153
        M300 P155 S698
        G4 P155
        M300 P149 S622
        G4 P149
        M300 P148 S0
        G4 P148
        M300 P148 S659
        G4 P148
        M300 P154 S0
        G4 P154
        M300 P149 S415
        G4 P149
        M300 P148 S440
        G4 P148
        M300 P148 S523
        G4 P148
        M300 P154 S0
        G4 P154
        M300 P149 S440
        G4 P149
        M300 P149 S523
        G4 P149
        M300 P150 S587
        G4 P150
        M300 P304 S0
        G4 P304
        M300 P148 S784
        G4 P148
        M300 P148 S740
        G4 P148
        M300 P154 S698
        G4 P154
        M300 P149 S622
        G4 P149
        M300 P148 S0
        G4 P148
        M300 P148 S659
        G4 P148
        M300 P154 S0
        G4 P154
        M300 P149 S1047
        G4 P149
        M300 P148 S0
        G4 P148
        M300 P148 S1047
        G4 P148
        M300 P154 S1047
        G4 P154
        M300 P752 S0
        G4 P752
        M300 P149 S784
        G4 P149
        M300 P153 S740
        G4 P153
        M300 P155 S698
        G4 P155
        M300 P149 S622
        G4 P149
        M300 P148 S0
        G4 P148
        M300 P148 S659
        G4 P148
        M300 P154 S0
        G4 P154
        M300 P149 S415
        G4 P149
        M300 P148 S440
        G4 P148
        M300 P148 S523
        G4 P148
        M300 P154 S0
        G4 P154
        M300 P149 S440
        G4 P149
        M300 P149 S523
        G4 P149
        M300 P150 S587
        G4 P150
        M300 P304 S0
        G4 P304
        M300 P148 S622
        G4 P148
        M300 P303 S0
        G4 P303
        M300 P149 S587
        G4 P149
        M300 P297 S0
        G4 P297
        M300 P154 S523
        G4 P154
        M300 P1356 S0
        G4 P1356
        M300 P149 S784
        G4 P149
        M300 P153 S740
        G4 P153
        M300 P155 S698
        G4 P155
        M300 P149 S622
        G4 P149
        M300 P148 S0
        G4 P148
        M300 P148 S659
        G4 P148
        M300 P154 S0
        G4 P154
        M300 P149 S415
        G4 P149
        M300 P148 S440
        G4 P148
        M300 P148 S523
        G4 P148
        M300 P154 S0
        G4 P154
        M300 P149 S440
        G4 P149
        M300 P149 S523
        G4 P149
        M300 P150 S587
        G4 P150
        M300 P304 S0
        G4 P304
        M300 P148 S784
        G4 P148
        M300 P148 S740
        G4 P148
        M300 P154 S698
        G4 P154
        M300 P149 S622
        G4 P149
        M300 P148 S0
        G4 P148
        M300 P148 S659
        G4 P148
        M300 P154 S0
        G4 P154
        M300 P149 S1047
        G4 P149
        M300 P148 S0
        G4 P148
        M300 P148 S1047
        G4 P148
        M300 P154 S1047
        G4 P154
        M300 P752 S0
        G4 P752
        M300 P149 S784
        G4 P149
        M300 P153 S740
        G4 P153
        M300 P155 S698
        G4 P155
        M300 P149 S622
        G4 P149
        M300 P148 S0
        G4 P148
        M300 P148 S659
        G4 P148
        M300 P154 S0
        G4 P154
        M300 P149 S415
        G4 P149
        M300 P148 S440
        G4 P148
        M300 P148 S523
        G4 P148
        M300 P154 S0
        G4 P154
        M300 P149 S440
        G4 P149
        M300 P149 S523
        G4 P149
        M300 P150 S587
        G4 P150
        M300 P304 S0
        G4 P304
        M300 P148 S622
        G4 P148
        M300 P303 S0
        G4 P303
        M300 P149 S587
        G4 P149
        M300 P297 S0
        G4 P297
        M300 P154 S523
        G4 P154
        M300 P1053 S0
        G4 P1053
        M300 P154 S523
        G4 P154
        M300 P149 S523
        G4 P149
        M300 P148 S0
        G4 P148
        M300 P148 S523
        G4 P148
        M300 P154 S0
        G4 P154
        M300 P149 S523
        G4 P149
        M300 P148 S587
        G4 P148
        M300 P149 S0
        G4 P149
        M300 P154 S659
        G4 P154
        M300 P149 S523
        G4 P149
        M300 P148 S0
        G4 P148
        M300 P148 S440
        G4 P148
        M300 P154 S392
        G4 P154
        M300 P446 S0
        G4 P446
        M300 P154 S523
        G4 P154
        M300 P149 S523
        G4 P149
        M300 P148 S0
        G4 P148
        M300 P148 S523
        G4 P148
        M300 P154 S0
        G4 P154
        M300 P149 S523
        G4 P149
        M300 P148 S587
        G4 P148
        M300 P148 S659
        G4 P148
        M300 P1200 S0
        G4 P1200
        M300 P154 S523
        G4 P154
        M300 P149 S523
        G4 P149
        M300 P148 S0
        G4 P148
        M300 P148 S523
        G4 P148
        M300 P154 S0
        G4 P154
        M300 P149 S523
        G4 P149
        M300 P148 S587
        G4 P148
        M300 P149 S0
        G4 P149
        M300 P154 S659
        G4 P154
        M300 P149 S523
        G4 P149
        M300 P148 S0
        G4 P148
        M300 P148 S440
        G4 P148
        M300 P154 S392
        G4 P154
        M300 P452 S0
        G4 P452
        M300 P155 S659
        G4 P155
        M300 P149 S659
        G4 P149
        M300 P148 S0
        G4 P148
        M300 P148 S659
        G4 P148
        M300 P154 S0
        G4 P154
        M300 P149 S523
        G4 P149
        M300 P148 S659
        G4 P148
        M300 P149 S0
        G4 P149
        M300 P154 S784
        G4 P154
        M300 P446 S0
        G4 P446
        M300 P154 S392
        G4 P154
        M300 P452 S0
        G4 P452
        M300 P155 S523
        G4 P155
        M300 P298 S0
        G4 P298
        M300 P148 S392
        G4 P148
        M300 P304 S0
        G4 P304
        M300 P148 S330
        G4 P148
        M300 P303 S0
        G4 P303
        M300 P149 S440
        G4 P149
        M300 P149 S0
        G4 P149
        M300 P150 S494
        G4 P150
        M300 P154 S0
        G4 P154
        M300 P149 S466
        G4 P149
        M300 P149 S440
        G4 P149
        M300 P151 S0
        G4 P151
        M300 P103 S392
        G4 P103
        M300 P100 S0
        G4 P100
        M300 P100 S659
        G4 P100
        M300 P100 S0
        G4 P100
        M300 P97 S784
        G4 P97
        M300 P100 S0
        G4 P100
        M300 P154 S880
        G4 P154
        M300 P150 S0
        G4 P150
        M300 P148 S698
        G4 P148
        M300 P148 S784
        G4 P148
        M300 P154 S0
        G4 P154
        M300 P149 S659
        G4 P149
        M300 P148 S0
        G4 P148
        M300 P148 S523
        G4 P148
        M300 P154 S587
        G4 P154
        M300 P149 S494
        G4 P149
        M300 P302 S0
        G4 P302
        M300 P155 S523
        G4 P155
        M300 P298 S0
        G4 P298
        M300 P148 S392
        G4 P148
        M300 P304 S0
        G4 P304
        M300 P148 S330
        G4 P148
        M300 P303 S0
        G4 P303
        M300 P149 S440
        G4 P149
        M300 P149 S0
        G4 P149
        M300 P150 S494
        G4 P150
        M300 P154 S0
        G4 P154
        M300 P149 S466
        G4 P149
        M300 P149 S440
        G4 P149
        M300 P151 S0
        G4 P151
        M300 P103 S392
        G4 P103
        M300 P100 S0
        G4 P100
        M300 P100 S659
        G4 P100
        M300 P100 S0
        G4 P100
        M300 P97 S784
        G4 P97
        M300 P100 S0
        G4 P100
        M300 P154 S880
        G4 P154
        M300 P150 S0
        G4 P150
        M300 P148 S698
        G4 P148
        M300 P148 S784
        G4 P148
        M300 P154 S0
        G4 P154
        M300 P149 S659
        G4 P149
        M300 P148 S0
        G4 P148
        M300 P148 S523
        G4 P148
        M300 P154 S587
        G4 P154
        M300 P149 S494
        G4 P149
        M300 P302 S0
        G4 P302
        M300 P155 S659
        G4 P155
        M300 P149 S523
        G4 P149
        M300 P148 S0
        G4 P148
        M300 P148 S392
        G4 P148
        M300 P304 S0
        G4 P304
        M300 P148 S415
        G4 P148
        M300 P149 S0
        G4 P149
        M300 P154 S440
        G4 P154
        M300 P149 S698
        G4 P149
        M300 P149 S0
        G4 P149
        M300 P150 S698
        G4 P150
        M300 P154 S440
        G4 P154
        M300 P449 S0
        G4 P449
        M300 P103 S494
        G4 P103
        M300 P100 S0
        G4 P100
        M300 P100 S880
        G4 P100
        M300 P100 S0
        G4 P100
        M300 P98 S880
        G4 P98
        M300 P102 S0
        G4 P102
        M300 P103 S880
        G4 P103
        M300 P100 S0
        G4 P100
        M300 P100 S784
        G4 P100
        M300 P100 S0
        G4 P100
        M300 P97 S698
        G4 P97
        M300 P100 S0
        G4 P100
        M300 P154 S659
        G4 P154
        M300 P149 S523
        G4 P149
        M300 P149 S0
        G4 P149
        M300 P150 S440
        G4 P150
        M300 P154 S392
        G4 P154
        M300 P452 S0
        G4 P452
        M300 P155 S659
        G4 P155
        M300 P149 S523
        G4 P149
        M300 P148 S0
        G4 P148
        M300 P148 S392
        G4 P148
        M300 P304 S0
        G4 P304
        M300 P148 S415
        G4 P148
        M300 P149 S0
        G4 P149
        M300 P154 S440
        G4 P154
        M300 P149 S698
        G4 P149
        M300 P149 S0
        G4 P149
        M300 P150 S698
        G4 P150
        M300 P154 S440
        G4 P154
        M300 P449 S0
        G4 P449
        M300 P154 S494
        G4 P154
        M300 P149 S698
        G4 P149
        M300 P150 S0
        G4 P150
        M300 P153 S698
        G4 P153
        M300 P104 S698
        G4 P104
        M300 P100 S0
        G4 P100
        M300 P100 S659
        G4 P100
        M300 P100 S0
        G4 P100
        M300 P97 S587
        G4 P97
        M300 P100 S0
        G4 P100
        M300 P154 S523
        G4 P154
        M300 P149 S330
        G4 P149
        M300 P150 S0
        G4 P150
        M300 P153 S330
        G4 P153
        M300 P155 S262
        G4 P155
        M300 P446 S0
        G4 P446
        M300 P154 S659
        G4 P154
        M300 P149 S523
        G4 P149
        M300 P148 S0
        G4 P148
        M300 P148 S392
        G4 P148
        M300 P304 S0
        G4 P304
        M300 P148 S415
        G4 P148
        M300 P149 S0
        G4 P149
        M300 P154 S440
        G4 P154
        M300 P149 S698
        G4 P149
        M300 P149 S0
        G4 P149
        M300 P150 S698
        G4 P150
        M300 P154 S440
        G4 P154
        M300 P449 S0
        G4 P449
        M300 P103 S494
        G4 P103
        M300 P100 S0
        G4 P100
        M300 P100 S880
        G4 P100
        M300 P100 S0
        G4 P100
        M300 P98 S880
        G4 P98
        M300 P102 S0
        G4 P102
        M300 P103 S880
        G4 P103
        M300 P100 S0
        G4 P100
        M300 P100 S784
        G4 P100
        M300 P100 S0
        G4 P100
        M300 P97 S698
        G4 P97
        M300 P100 S0
        G4 P100
        M300 P154 S659
        G4 P154
        M300 P149 S523
        G4 P149
        M300 P149 S0
        G4 P149
        M300 P150 S440
        G4 P150
        M300 P154 S392
        G4 P154
        M300 P452 S0
        G4 P452
        M300 P155 S659
        G4 P155
        M300 P149 S523
        G4 P149
        M300 P148 S0
        G4 P148
        M300 P148 S392
        G4 P148
        M300 P304 S0
        G4 P304
        M300 P148 S415
        G4 P148
        M300 P149 S0
        G4 P149
        M300 P154 S440
        G4 P154
        M300 P149 S698
        G4 P149
        M300 P149 S0
        G4 P149
        M300 P150 S698
        G4 P150
        M300 P154 S440
        G4 P154
        M300 P449 S0
        G4 P449
        M300 P154 S494
        G4 P154
        M300 P149 S698
        G4 P149
        M300 P150 S0
        G4 P150
        M300 P153 S698
        G4 P153
        M300 P104 S698
        G4 P104
        M300 P100 S0
        G4 P100
        M300 P100 S659
        G4 P100
        M300 P100 S0
        G4 P100
        M300 P97 S587
        G4 P97
        M300 P100 S0
        G4 P100
        M300 P154 S523
        G4 P154
        M300 P149 S330
        G4 P149
        M300 P150 S0
        G4 P150
        M300 P153 S330
        G4 P153
        M300 P155 S262
        G4 P155
        M300 P446 S0
        G4 P446
        M300 P154 S523
        G4 P154
        M300 P149 S523
        G4 P149
        M300 P148 S0
        G4 P148
        M300 P148 S523
        G4 P148
        M300 P154 S0
        G4 P154
        M300 P149 S523
        G4 P149
        M300 P148 S587
        G4 P148
        M300 P149 S0
        G4 P149
        M300 P154 S659
        G4 P154
        M300 P149 S523
        G4 P149
        M300 P148 S0
        G4 P148
        M300 P148 S440
        G4 P148
        M300 P154 S392
        G4 P154
        M300 P446 S0
        G4 P446
        M300 P154 S523
        G4 P154
        M300 P149 S523
        G4 P149
        M300 P148 S0
        G4 P148
        M300 P148 S523
        G4 P148
        M300 P154 S0
        G4 P154
        M300 P149 S523
        G4 P149
        M300 P148 S587
        G4 P148
        M300 P148 S659
        G4 P148
        M300 P1200 S0
        G4 P1200
        M300 P154 S523
        G4 P154
        M300 P149 S523
        G4 P149
        

        Frédéric

        1 Reply Last reply Reply Quote 0
        • A Former User?
          A Former User
          last edited by

          suppose the specific midi file for comparison would be good, almost feels like there are gaps here and there.

          come think if it midi would allow chords (or whatever they call "parallell" notes), the duet would struggle replicating that and the conversion would have to make compromises

          duet2wifi
          rrf2.05.1 wifi 1.23
          paneldue 1.23.2

          video: https://streamable.com/yxzs87

          A Former User? 1 Reply Last reply Reply Quote 0
          • fmaundefined
            fma
            last edited by

            Midi file is here: http://www.mariopiano.com/midi-sound-file-overworld-main-theme.html

            I selected the track 2. The thing is it works fine when previewed in the web tool; I guess it reads the gcode, and not the midi, as you can only preview after generating the file...

            Frédéric

            1 Reply Last reply Reply Quote 0
            • A Former User?
              A Former User
              last edited by

              I've previously only tested shorter sequences, maybe 8-10 lines and the duet 2 with paneldue was always working, while the duet 3 with dwc skipped a lot of them.

              I'll poke the midi file when i'm bored and compare it.

              1 Reply Last reply Reply Quote 0
              • A Former User?
                A Former User
                last edited by

                i'm no beethoven but can't detect any difference between the streamable video and previewing track2 in the web tool (admittedly i cut the video short, but )

                1 Reply Last reply Reply Quote 0
                • fmaundefined
                  fma
                  last edited by

                  Yes, the preview in the webtool is OK; but once uploaded on the Duet, the music is not OK anymore... The

                  Frédéric

                  1 Reply Last reply Reply Quote 0
                  • A Former User?
                    A Former User @A Former User
                    last edited by

                    @bearer said in MIDI to G-Code:

                    video: https://streamable.com/yxzs87

                    play this side by side the preview and see if you can tell a difference? i didn't go to the step of making videos of both to sync the audio to say left and right. in any case it was mostly meant as a "this is what is sounds like on my paneldue"

                    1 Reply Last reply Reply Quote 0
                    • fmaundefined
                      fma
                      last edited by

                      It seems to works fine on your Duet; I can ear missing notes in this small part, on mine... I'll dig further tomorrow to see what notes make problems.

                      Thanks.

                      Frédéric

                      A Former User? 1 Reply Last reply Reply Quote 0
                      • A Former User?
                        A Former User @fma
                        last edited by

                        no worries, it shouldn't make a difference but it was an 7i pandeldue (with a slightly MacGyver fix on the buzzer. can try an older regular 4.3 later, but with the same firmware i expect them to do the same thing.

                        1 Reply Last reply Reply Quote 0
                        • Phaedruxundefined
                          Phaedrux Moderator
                          last edited by

                          I just tested your mario code on my older V2 PanelDue and it ran fine. I couldn't get it to play over DWC and can't disconnect the PanelDue without some dissaembly.

                          Here's another version of the mario theme that's even faster that plays perfectly as well.

                          MarioTheme.g

                          Z-Bot CoreXY Build | Thingiverse Profile

                          1 Reply Last reply Reply Quote 0
                          • fmaundefined
                            fma
                            last edited by

                            This file has even more missing notes... Looks like a com issue between the Duet and the PanelDue, don't you think? Is there a checksum used for this com? Some commands seem to be drop...

                            Frédéric

                            A Former User? Phaedruxundefined 2 Replies Last reply Reply Quote 0
                            • A Former User?
                              A Former User @fma
                              last edited by

                              @fma said in MIDI to G-Code:

                              Is there a checksum used for this com

                              there is, could be a possible factor. shorter cable or lower baud rate are simple tests. i used the supplied 1 meter or so cable for the 7i test (i did twist the pairs a little just to tidy it up a little)

                              also took a stab at recording the preview but computer failed badly at recording its own audio (at least using the win10/xbox game thing)

                              1 Reply Last reply Reply Quote 0
                              • Phaedruxundefined
                                Phaedrux Moderator @fma
                                last edited by

                                @fma Can you provide a video of how it's playing on your end?

                                I am also using the 4 wire cable. It's about 1.2 to 1.5 meter long and I've braided the wires as it runs alongside some motor wiring.

                                Z-Bot CoreXY Build | Thingiverse Profile

                                1 Reply Last reply Reply Quote 0
                                • fmaundefined
                                  fma
                                  last edited by fma

                                  Ok, I'll do that. My cable is 1m long, and I also twisted the wires. I will try to use a shielded cable.

                                  Frédéric

                                  A Former User? 1 Reply Last reply Reply Quote 0
                                  • A Former User?
                                    A Former User @fma
                                    last edited by

                                    @fma said in MIDI to G-Code:

                                    I will try to use a shielded cable.

                                    trying lower baud rate may be simpler as a test?

                                    1 Reply Last reply Reply Quote 0
                                    • fmaundefined
                                      fma
                                      last edited by

                                      How do I do that?

                                      Frédéric

                                      1 Reply Last reply Reply Quote 0
                                      • Phaedruxundefined
                                        Phaedrux Moderator
                                        last edited by

                                        https://duet3d.dozuki.com/Wiki/Gcode#Section_M575_Set_serial_comms_parameters

                                        Z-Bot CoreXY Build | Thingiverse Profile

                                        1 Reply Last reply Reply Quote 0
                                        • fmaundefined
                                          fma
                                          last edited by

                                          It does not seem to work: as soon as I change the baudrate, the PanelDue is unable to communicate with the Duet...

                                          Frédéric

                                          1 Reply Last reply Reply Quote 0
                                          • Phaedruxundefined
                                            Phaedrux Moderator
                                            last edited by

                                            Did you change the baud rate at the PanelDue to match?

                                            Z-Bot CoreXY Build | Thingiverse Profile

                                            1 Reply Last reply Reply Quote 0
                                            • First post
                                              Last post
                                            Unless otherwise noted, all forum content is licensed under CC-BY-SA