HISE Logo Forum
    • Categories
    • Register
    • Login

    Midi Player and drag to DAW...almost There...Speed Buttons Success!

    Scheduled Pinned Locked Moved Scripting
    31 Posts 7 Posters 2.2k Views
    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.
    • DimitrisSPD
      DimitrisSP
      last edited by

      After 2 days of trial and error trying to find a way to store the last values of the tempo buttons without any success, i managed to have everything setup correctly using a "not so elegand" way.

      I used 9 buttons instead of 3...(3 for the Half tempos, 3 for the Normal tempos and 3 for the Double tempos)
      Using Show-Hide functions and a rabbit hole of if statements i changed for every different button the callbacks accordingly so finally everything syncs to DAW and works as expected...

      I would prefer a more elegand way with less lines of code and stuff but for the moment it does exactly what it needs...

      Here is the snippet for anyone who need something like this

      HiseSnippet 2952.3oc6b0ubaabDGTRH1j1xwISlN8OugSmLTVLPjxzx10Uiokfnkp0GbDoccpGOdf.ORBaP.ZfiJRQQSyiReD5iPeD5iheCZ2C2AfCjffPL5qZGNYrMta261629a26CfK0cr0wtt1NRYx1739XoL2VtwwVjtq2UyvRZKUoLekbSrKQZsi6q45haIkIyrOmVWlryI486SOcMMSMKcbXQRRux1PGusQOCRXo0q9BCSyZZsvMM5IHckpaoaastso8.vNlUtjTeM8On0AuqFUrYjAiXiVFDamFDMB1UJybqY253Fcs+IKl7uxv03.SL8gxRMfFhUbMayVTKlVpz5cMLaU2e75JIkQtd3neV1n+6j2wnkQP4gnvc8p.EpgHdjYljLuxhlWozadyHXd2v243YdlZGic7LKnfsT2hWfnIs9.GGrEoA9iCvQbMe5o7pZ5.frX4aaa2eCKMvPaIVLswO.DsQebzJxLazQ8rieTK5TFcjJQGT0LLwzQcF+G.ooiPv6qpQzjxzR9gkUrZtxKdz5q82K8bEk2+h5MZ1o1Op.+poTWQQ8vJV+r5KOxsFTR6lJJas0har4AJ6ulxFqsw6Me8QcTdz5sMgZWbQnLEkOzUUQ4PsVpJ2m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t4Yk2g9Lpr+1kkkKoTRhdYYemtNEt+A.ehWmkmBct+TnSkoPmGLE5rxTnyCmBcdTh5PmL5YCH18XghPA02fsY6LA+eIgLyJ8+v4yovp
      

      If someone find a simpler solution will be welcome!
      Thanks a lot guys for your help!

      ulrikU 1 Reply Last reply Reply Quote 0
      • ulrikU
        ulrik @DimitrisSP
        last edited by

        @DimitrisSP I took a shot on this as well, I stored the original number of bars & timestamps in a panel, and used that information to switch between the tempos.
        Try it and see if you can use it

        HiseSnippet 2490.3oc6Z0taabiEcFaOscTh5lVTrX+Igvh.o5jwxtNNI0aPTr9HQM9CAKkrsHHHX7HJItYD4jYnTsqgA5iReD1Gg9HruD6+yavtWRNiFNRxxZ8hjcw1c9giFx6k7vy8bI4PlVgLObTDKzvztyYAXCyaZ09LJeP0AtDpQyZhBNfzkzx28LbnwdmE3FEg6ZXZt5SEVXZulg748OdOWeWpGNsHCiWxHd38ICI7zRaU44De+FtcwcHC0rd6JM8XzpLe1H.MqZU1Hv06st8wG5JLaEKCyOodWBmE1l6xwQFlqsGq6YsGv9Qpx9WRhHm3iEuroQangTE2f42UfXQoFUGP761JYTGYXXZ0JkCVUwAekZHmTdJWbKYEnTOz4CyUVD71TGdkWd3shF79zjPjVDIND0rVy4DhpNJLDS4swuaDNSn48ONtpNg.IqW99LVPcpK.zt5EKZ7S.SaGfyVg4pYG0qd4iZ8fxriTCwfpAwGKF0lIu.VKFgPzulK20v70V6riCsyNO+AUOt0AO0woyya0tS+F+fC7zvokiSswaS+oZu3znFPIi+NGmlMWu9yNw438bpuW8+h+2eZ+0cnMg5VejyXGmSNqpiyVk6cZaGCQOpjaErNu0wG8c0q14MMNZ+Z0O9h8biHdOMjwFi2zYHQvuBAbaRepKeTH3i0giFtmKLVznmCYCIP8xDr3BuUkZX57JVP8.MFx0SgTwiLTtgljXMkj3KrZ6ERB3o0HXsaX0jxwg8bgPutrPYqwJ+8aYUkAVP4NCceKtQH7xDOJtS4x2AcuxkKsat741XCkxWpwP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aSKWwsIt1+UeYme7lbX0kCtygAMaMyUleKPFOLvGWmNF6C6RQhwuD1VRO2Q97jRypqOfQYACXThmdP+XLOjzuONTG6yc.8DNOyE29UUNF6icixr929fvyMD3I70jK1b44hEEu9CVJ3hDIin+2XR8U+s4j5GyFI1T4AtfP8T0Ud2FlK0CKtcQX6hhOuxbEw7gp2Km7cEswztxW9GvSbkaJd2LtxMSp7iReLz0Kj8l3aqTnk+LYIv3lJu+eaqCDui1bxWGYU1org3hUdimmftuKvOy2mstF97MWCe19Z3y8tF9ry0vm6eM74AKzGwhQOYDmMTkJBEzpt5SJLm7+WE3au9m.vdL2n
        

        Hise Develop branch
        MacOs 15.3.1, Xcode 16.2
        http://musikboden.se

        ulrikU DimitrisSPD 2 Replies Last reply Reply Quote 1
        • ulrikU
          ulrik @ulrik
          last edited by

          @ulrik @Christoph-Hart btw, I tried and tried and tried to Console.print(trace(e)) the objects in eventList but I was not able to get any information about what they hide.
          I realise the properties are functions right?
          So, is there a way to Console.print those methods?

          Hise Develop branch
          MacOs 15.3.1, Xcode 16.2
          http://musikboden.se

          1 Reply Last reply Reply Quote 0
          • DimitrisSPD
            DimitrisSP @ulrik
            last edited by

            @ulrik A big bravo to you my friend and thanks a lot for your help.
            I checked your solution and it works like a charm.
            It works exactly like my solution in the level of a user experience but you achieved that with a lot less code and stuff...so it is a much more elegant solution...Great!

            By the way how you found some special callbacks like

            Storage.data.tStamps
            

            and/or

            Storage.data.numBars
            

            Are they located in some API?...I did not find something like this searching...Maybe i searched in wrong directions?

            ulrikU 2 Replies Last reply Reply Quote 0
            • ulrikU
              ulrik @DimitrisSP
              last edited by

              @DimitrisSP I'm glad it could be of use!
              All panel components have an object attached to them, named "data" so you can use them for storage of all kind of stuff, very handy indeed :)

              Hise Develop branch
              MacOs 15.3.1, Xcode 16.2
              http://musikboden.se

              1 Reply Last reply Reply Quote 1
              • ulrikU
                ulrik @DimitrisSP
                last edited by

                @DimitrisSP actually I could not find anything written about the panels object "data" in the documentation, I think I got it from some of Christoph examples.

                Hise Develop branch
                MacOs 15.3.1, Xcode 16.2
                http://musikboden.se

                d.healeyD 1 Reply Last reply Reply Quote 0
                • d.healeyD
                  d.healey @ulrik
                  last edited by

                  @ulrik https://docs.hise.audio/scripting/scripting-in-hise/scriptpanel.html#storing-data

                  Libre Wave - Freedom respecting instruments and effects
                  My Patreon - HISE tutorials
                  YouTube Channel - Public HISE tutorials

                  ulrikU 1 Reply Last reply Reply Quote 1
                  • ulrikU
                    ulrik @d.healey
                    last edited by

                    @d-healey of course I could not find it, I didn't look close enough đź‘€
                    thanks David

                    Hise Develop branch
                    MacOs 15.3.1, Xcode 16.2
                    http://musikboden.se

                    1 Reply Last reply Reply Quote 0
                    • ulrikU
                      ulrik @DimitrisSP
                      last edited by

                      @DimitrisSP

                      1. If you load a midi and drag n drop to any daw it works like a charm...but if you load another midi after that(or try to drag n drop the same midi for second time) it does not work...I noticed that if you close the interface from the edit button of the daw and load again the instrument you can drag n drop again any loaded midi file...and that story goes on...Or if you try it from Hise plugin in any daw the same thing happens...you can drag n drop any loaded midi file but in order to drag again a second midi file you have to close and open again the (interface preview, or Hit compile and it works...and so on)

                      Did you find a solution to this issue?

                      Hise Develop branch
                      MacOs 15.3.1, Xcode 16.2
                      http://musikboden.se

                      ustkU 1 Reply Last reply Reply Quote 0
                      • ustkU
                        ustk @ulrik
                        last edited by

                        @ulrik Just made a pull request that fixes the issue. The fix I've made isn't clean so this has to be reworked anyway. For now, it should work as expected for both drag in/out, but the externalDrag object of the LAF will always be true so is useless until a better solution is found.

                        PR: 170c3e02678e0696e857b7a4bf5d549164fe727b

                        Can't help pressing F5 in the forum...

                        ulrikU 1 Reply Last reply Reply Quote 3
                        • ulrikU
                          ulrik @ustk
                          last edited by

                          @ustk Beautiful! :)
                          It's not in the develop code yet I guess?

                          Hise Develop branch
                          MacOs 15.3.1, Xcode 16.2
                          http://musikboden.se

                          1 Reply Last reply Reply Quote 0
                          • ustkU
                            ustk
                            last edited by ustk

                            @ulrik I have fixed the externalDrag flag so it works now.
                            Just wait for the pull request to be merged or pick to your own branch from it

                            Can't help pressing F5 in the forum...

                            ulrikU 1 Reply Last reply Reply Quote 3
                            • ulrikU
                              ulrik @ustk
                              last edited by

                              @ustk It works great in a compiled plugin, thanks!

                              Hise Develop branch
                              MacOs 15.3.1, Xcode 16.2
                              http://musikboden.se

                              DanHD 1 Reply Last reply Reply Quote 1
                              • DanHD
                                DanH @ulrik
                                last edited by

                                @ulrik @ustk is there a way to script the notes in the midi player?

                                DHPlugins / DC Breaks | Artist / Producer / DJ / Developer
                                https://dhplugins.com/ | https://dcbreaks.com/
                                London, UK

                                ulrikU 1 Reply Last reply Reply Quote 0
                                • ulrikU
                                  ulrik @DanH
                                  last edited by

                                  @DanH You can create your own midi sequence
                                  https://docs.hise.audio/scripting/scripting-api/midiplayer/index.html

                                  If that was what you asked for?

                                  Hise Develop branch
                                  MacOs 15.3.1, Xcode 16.2
                                  http://musikboden.se

                                  DanHD 1 Reply Last reply Reply Quote 1
                                  • DanHD
                                    DanH @ulrik
                                    last edited by

                                    @ulrik yes I think so. Would be great to be able to write a sequence in a sliderpack and then drag it into DAW...

                                    DHPlugins / DC Breaks | Artist / Producer / DJ / Developer
                                    https://dhplugins.com/ | https://dcbreaks.com/
                                    London, UK

                                    ustkU 1 Reply Last reply Reply Quote 0
                                    • ustkU
                                      ustk @DanH
                                      last edited by

                                      @DanH Nothing prevents you from doing it, all the tools are there, just find/make the combination you need (sliderpack, panel, direct recording…)

                                      Can't help pressing F5 in the forum...

                                      1 Reply Last reply Reply Quote 2
                                      • CatABCC CatABC referenced this topic on
                                      • First post
                                        Last post

                                      15

                                      Online

                                      1.7k

                                      Users

                                      11.8k

                                      Topics

                                      102.4k

                                      Posts