HISE Logo Forum
    • Categories
    • Register
    • Login

    How to make a guitar tuner

    Scheduled Pinned Locked Moved General Questions
    20 Posts 9 Posters 1.5k 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.
    • G
      goldee
      last edited by

      Hi everyone I am very new to coding in hise can anyone teach me how to make a guitar tuner in hise

      C pluginboiP JulesVJ 3 Replies Last reply Reply Quote 0
      • C
        clevername27 @goldee
        last edited by

        @goldee If memory serves, there's a pitch detector somewhere…perhaps in ScriptNode? Take a look at the list of all nodes.

        1 Reply Last reply Reply Quote 0
        • pluginboiP
          pluginboi @goldee
          last edited by pluginboi

          @goldee this is an older snippet of mine but it uses detect pitch and scriptnode to get note names sorta like a tuner

          HiseSnippet 2122.3oc2X0sbabaEdWIAEKZqj5LY5zq5fg8mgJwllTQ0sMdTBk3O1LQ+vPRqDmLYbf1EjDU6BrYWPIw5wy3a5L4wHOF8x7HzY5k8MnSuHuAsG.rK2conjkYZ7EgWrbwAmyAe37Cv4rcBENznHQnk8Z8mDPsruEp2DtbT8QDF2pcCK6kQUs1cR.IJh5ZYau7CUSXu1JV5e+vGsKwivcnojrrNRvbn6w7YxTpcp8ILOuVDWZeleFt2pVaGAutvSLNTsXUrBHNmPFROfnXaIjk8pMcYRQXOIQRirrWYWg6jdiDmwM7eDKhcrG0fzdfhLjaI7bUHV8tU8QLO2NIa1HKKaTmzs9xls96f1m4xlRO0D7KzSfSkHq8vdo7va4bvq5kAu4.I6LPZECjtMpmSHKPlNiBO2D0lKogCHfYOKTL7ZszNqhpK.N3xx9jSnsBgASknz8qT4NX3wFOnPgBfsORhOkDhMB25yqh2FqCAJOjJaNX.0QVpnYRLLaQkX26d3VToyHLA6xhB7HSNdLvYHNB7hNTbHEFPgnBrTfkin3F85f4T4YhvSxrjtAYWqFFMsqVS8zJZdK7CoRsJGvBA0TjdNru3Duh3FYQRlUYXHrJtAWXIJUUa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49KfL+wEPl+zUJi5xncFKE9lTQfPmll5ZraxUcapi5s9e.8M+aNB
          
          
          1 Reply Last reply Reply Quote 1
          • JulesVJ
            JulesV @goldee
            last edited by

            Don't we still have a solid tuner that we can use to tune the guitar?

            d.healeyD C 2 Replies Last reply Reply Quote 0
            • d.healeyD
              d.healey @JulesV
              last edited by

              @JulesV Enjoy! https://x42-plugins.com/x42/x42-tuner

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

              JulesVJ 1 Reply Last reply Reply Quote 1
              • C
                ccbl @JulesV
                last edited by

                @JulesV GVST GTUNE is still incredible. I'm assuming OP is asking though because they want to build a tuner into part of a larger plugin, not because they think there's a gap in the market for a standalone.

                TBH if we come up with a good solution, I'd love to use that code too.

                ustkU JulesVJ 2 Replies Last reply Reply Quote 1
                • ustkU
                  ustk @ccbl
                  last edited by ustk

                  I've read and watched quite a lot on tuner dsp, and as simple as it seems at start, things are going exponentially complicated. having the pitch of a buffer is one thing, but getting a smooth response (not erratic) and good tracking especially with lower notes becomes incredibly complicated. Not speaking about the time response for lower notes... Especially for guitars where useful pitch can be hard to discriminates from overtones

                  That being said, there might be a free library existing somewhere 🤷

                  Hise made me an F5 dude, browser just suffers...

                  A JulesVJ 2 Replies Last reply Reply Quote 1
                  • A
                    aaronventure @ustk
                    last edited by aaronventure

                    @ustk Just use the pitch tracker in Faust and call si.smoo on it twice. It's incredibly fast and its error is consistent and correctable with an almost linear function (slightly higher at low freqs than at high freqs).

                    iamlampreyI 1 Reply Last reply Reply Quote 1
                    • JulesVJ
                      JulesV @d.healey
                      last edited by

                      @d-healey said in How to make a guitar tuner:

                      @JulesV Enjoy! https://x42-plugins.com/x42/x42-tuner

                      Sweet. But since it's GPL, I can't use it on a commercial project, right?

                      d.healeyD 1 Reply Last reply Reply Quote 0
                      • JulesVJ
                        JulesV @ccbl
                        last edited by

                        @ccbl I'll take a look at that, thanks

                        1 Reply Last reply Reply Quote 0
                        • JulesVJ
                          JulesV @ustk
                          last edited by

                          @ustk said in How to make a guitar tuner:

                          I've read and watched quite a lot on tuner dsp, and as simple as it seems at start, things are going exponentially complicated. having the pitch of a buffer is one thing, but getting a smooth response (not erratic) and good tracking especially with lower notes becomes incredibly complicated. Not speaking about the time response for lower notes... Especially for guitars where useful pitch can be hard to discriminates from overtones

                          That being said, there might be a free library existing somewhere 🤷

                          I agree. I hope it will be available in the future.

                          @aaronventure said in How to make a guitar tuner:

                          @ustk Just use the pitch tracker in Faust and call si.smoo on it twice. It's incredibly fast and its error is consistent and correctable with an almost linear function (slightly higher at low freqs than at high freqs).

                          Thanks for the tip. Although I am new to Faust, I'll give it a try.

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

                            @JulesV said in How to make a guitar tuner:

                            Sweet. But since it's GPL, I can't use it on a commercial project, right?

                            You can, as long as your project is gpl

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

                            1 Reply Last reply Reply Quote 1
                            • iamlampreyI
                              iamlamprey @aaronventure
                              last edited by

                              @aaronventure said in How to make a guitar tuner:

                              @ustk Just use the pitch tracker in Faust and call si.smoo on it twice. It's incredibly fast and its error is consistent and correctable with an almost linear function (slightly higher at low freqs than at high freqs).

                              Would you mind making a quick example of this? I've been trying to get the Pitch Tracker to do anything besides throw errors at me and it is now 5:50 am 🤗

                              A 1 Reply Last reply Reply Quote 0
                              • A
                                aaronventure @iamlamprey
                                last edited by

                                @iamlamprey

                                Hiyya go bud. I even piped it to the UI for ya.

                                HiseSnippet 2302.3oc0Y8zaabbEeVIsRVLx1IEFE43.cIzsxzjzxRtwPPx5eNDMRlPTQH.8fvvcGRNPK2Y6NCkDaQ.JPujS8dtkC8Pu1dqeH5o9EweCZeuY1k6tjTRVJVAsxFRbm27dyu88meuYFxuTyC849mpBEQQbMg3LayXoGWojwDmRGOLhSbVxs0vPcuc5wDgjF6Rbdj6ALklGSsCs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GueStrni4WXcL4kOo6on92PfblB0EWUBEVjw8TEAyicYgrfgJdEqvoWahRtAL3LQsYxx9X2HN6rSGDpfDIvvEV9mX8EEmwjXXbabCXYtBXIay4ihTlCzGx8ra22Pf.YGNttLe+L+WCyA0sw+668Sl2iYgQA+TI29vewKrZJdG67uFexeAx2i31KWC7i3UzYtxSkDuaSyMH1M4x2.KkdidlSAZuNOXplSNToToTEXAf1pzqrCsp458f5RPHzbjGC4UTUfTCC3SksQRKyMCdc4qPZTVG7R2W66vZfOh663MCzRH.kdwFFaYBPEq+7B3r3wYIMAVqjo1VxH4ZBtq4hgDeY3WnoW.jiLH1xhMgE3z1P+ozq90v2RMjdlDzOrfvC9+lfPw5oOvG1VJOqOybIA2oq66mkqznOyKVdpm8VZv.zCLi.88BMYIK5d.9LsF47wcJ8E9hS87JZpITr9cUwWbWUb06phu7tp3Z2UEW+tp3qtYEwuBuDxCrUDTY0bOaOBm8BYsCRXQ3IsOrWMHlqNZjP9k6KBr6fC+NpfBa7OVj7Ksax54Ya2ohuJJ8ZwIN+UW76YxvKXSZons9RZ17wuXF6WthOE1sSO5W0n0d3lwpWs9KeV0W8r5unjnejLVWdYk12rbUBDsMeoNQZ5F.6eEi4N1R7Tt1JzpUpV6ozujpDUT8kxrOg5XuuP76TQuB8zWWhP9uhjUkT.
                                

                                It's pretty accurate and ridiculously fast.

                                iamlampreyI 1 Reply Last reply Reply Quote 2
                                • iamlampreyI
                                  iamlamprey @aaronventure
                                  last edited by

                                  @aaronventure Much appreciated! I'll play around with it, it seems really good for most cases but low-tuned guitars seem to throw it off a bit, probably because of the overtones.

                                  A 1 Reply Last reply Reply Quote 0
                                  • A
                                    aaronventure @iamlamprey
                                    last edited by

                                    @iamlamprey youll want to try different orders and time windows in the call in faust.

                                    Also at certain settings it might be accurate, just off for a fixed amount, like off for a few cents in lower freqs. You can easily test this and write a fixing function.

                                    iamlampreyI 1 Reply Last reply Reply Quote 1
                                    • iamlampreyI
                                      iamlamprey @aaronventure
                                      last edited by

                                      @aaronventure Would you mind copy+pasting the contents of the Faust node here? The imported snippet doesn't let me view / edit it

                                      A 1 Reply Last reply Reply Quote 0
                                      • A
                                        aaronventure @iamlamprey
                                        last edited by

                                        @iamlamprey

                                        import("stdfaust.lib");
                                        
                                        pt = an.pitchTracker(1, 0.01) : si.smoo : si.smoo;
                                        
                                        process = pt, _;
                                        
                                        iamlampreyI 1 Reply Last reply Reply Quote 1
                                        • iamlampreyI
                                          iamlamprey @aaronventure
                                          last edited by

                                          @aaronventure Ah nice and simple, thank you.

                                          Also no wonder I couldn't find anything about it lol

                                          4f6a1501-cd27-4db6-b2e0-2c7365e526cd-{3B907412-760B-40C0-820B-52B396E53F28}.png

                                          A 1 Reply Last reply Reply Quote 0
                                          • A
                                            aaronventure @iamlamprey
                                            last edited by aaronventure

                                            @iamlamprey Faust library search is hot trash. Your best bet is to go through all the libraries a couple of times and sorta learn all that's there. Also, use the github version for proper search (you can also learn how it was done). That's kind of where all their dev resources seem to be going.

                                            Link Preview Image
                                            analyzers - Faust Libraries

                                            favicon

                                            (faustlibraries.grame.fr)

                                            Link Preview Image
                                            GitHub - grame-cncm/faustlibraries: The Faust libraries

                                            The Faust libraries. Contribute to grame-cncm/faustlibraries development by creating an account on GitHub.

                                            favicon

                                            GitHub (github.com)

                                            1 Reply Last reply Reply Quote 1
                                            • First post
                                              Last post

                                            22

                                            Online

                                            1.9k

                                            Users

                                            12.4k

                                            Topics

                                            107.7k

                                            Posts