HISE Logo Forum
    • Categories
    • Register
    • Login

    Simple ML neural network

    Scheduled Pinned Locked Moved General Questions
    134 Posts 18 Posters 11.1k 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.
    • Matt_SFM
      Matt_SF @Christoph Hart
      last edited by

      @Christoph-Hart Awesome. My knowledge of Neural Networks is close to 0 but this is a good opportunity to learn something new. Thank you genius!

      Develop branch
      Win10 & VS17 / Ventura & Xcode 14. 3

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

        checking this out now, very exciting stuff. I also appreciate you skipping over MNIST in the roundtrip example 😉

        1 Reply Last reply Reply Quote 1
        • orangeO
          orange @Christoph Hart
          last edited by

          @Christoph-Hart Thanks for this 🎉

          develop Branch / XCode 13.1
          macOS Monterey / M1 Max

          hisefiloH 1 Reply Last reply Reply Quote 0
          • hisefiloH
            hisefilo @orange
            last edited by

            Link Preview Image
            - added RTNeural & neural network API · christophhart/HISE@a295c6c

            The open source framework for sample based instruments - - added RTNeural & neural network API · christophhart/HISE@a295c6c

            favicon

            GitHub (github.com)

            :beaming_face_with_smiling_eyes:

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

              @Christoph-Hart said in Simple ML neural network:

              A very powerful boost for this functionality could be the Loris library, I can imagine that having an array of highly precise time-varying gain values associated to the harmonic index is a much better input data than these few pixels from a spectrogram

              Have you had a chance to play around with this particular use-case? Having the neural node handle the greyishbox modelling sounds a lot more streamlined than fine tuning an additive synth 🤠

              Christoph HartC 1 Reply Last reply Reply Quote 0
              • Christoph HartC
                Christoph Hart @A Former User
                last edited by

                @iamlamprey nope, I‘ve suspended my journey into ML until I have a real use case for it :)

                If anyone is using this stuff I‘m happy to implement new features or fix issues, but now that the „hello world“ is implemented I expect it to grow with actual projects and their requirement.

                ? LindonL 2 Replies Last reply Reply Quote 0
                • ?
                  A Former User @Christoph Hart
                  last edited by

                  @Christoph-Hart yeah fair enough, i'll keep noodling on this additive synth but i'll definitely be trying the neural & loris pairing at some point

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

                    @Christoph-Hart do you happen to have the training/dataloader for the sine model handy? the repo only has tanh

                    i'm currently migrating the example over to pure torch because torchstudio keeps uninstalling my local packages and in general is kinda gross

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

                      @d-healey is there a Rhapsody update coming soon? I just tried loading the example as a rhapsody library and (duh) it broke everything, i assume the next version of Rhapsody will be built with the latest version of HISE?

                      d.healeyD 1 Reply Last reply Reply Quote 0
                      • d.healeyD
                        d.healey @A Former User
                        last edited by

                        @iamlamprey said in Simple ML neural network:

                        is there a Rhapsody update coming soon?

                        Probably next month.

                        @iamlamprey said in Simple ML neural network:

                        i assume the next version of Rhapsody will be built with the latest version of HISE?

                        Yup

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

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

                          @d-healey i am excited to ignite everyone's CPUs 😀

                          d.healeyD 1 Reply Last reply Reply Quote 1
                          • d.healeyD
                            d.healey @A Former User
                            last edited by

                            @iamlamprey I thought the ML stuff is only in scriptnode?

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

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

                              @d-healey uncompiled networks work in Rhapsody, the snex and expr stuff doesn't though

                              d.healeyD 1 Reply Last reply Reply Quote 0
                              • d.healeyD
                                d.healey @A Former User
                                last edited by

                                @iamlamprey Aha ok that's good to know

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

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

                                  This post is deleted!
                                  1 Reply Last reply Reply Quote 0
                                  • ?
                                    A Former User
                                    last edited by

                                    This post is deleted!
                                    1 Reply Last reply Reply Quote 0
                                    • LindonL
                                      Lindon @Christoph Hart
                                      last edited by

                                      @Christoph-Hart said in Simple ML neural network:

                                      @iamlamprey nope, I‘ve suspended my journey into ML until I have a real use case for it :)

                                      If anyone is using this stuff I‘m happy to implement new features or fix issues, but now that the „hello world“ is implemented I expect it to grow with actual projects and their requirement.

                                      Well speak of the devil and he will appear.... I now have a customer who would like to make Amp sims using Neural Net ML....

                                      So I've spent some time with the research papers, the youTube Videos and the blogs. It would seem I might need a statetful LSTM model - but I could easily be wrong.

                                      My understanding of how I(we) might approach this is very very poor, but I think there any number of ways to get to the json code that would be needed to "make it work", but wow do I have a bunch of questions.... here's some of them:

                                      1. is this even possible in HISE? (I mean the playback not the modelling or learning)
                                      2. Can I "just" use (say) this stuff : https://www.youtube.com/watch?v=xkrqF0D8pfQn and take the .json output and load it into RTNeural and expect it to "sort of" work?
                                      3. If not what's the best way to get from a bunch of guitar recordings to a set of .json files that I can then load into math.neural?
                                      4. I assume all these Learned models are in fact static snapshots of dynamic processes, so every time the user changes the distortion control on the plugin I will need to load another model - if so how practical is that?

                                      HISE Development for hire.
                                      www.channelrobot.com

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

                                        @Lindon said in Simple ML neural network:

                                        So I've spent some time with the research papers, the youTube Videos and the blogs. It would seem I might need a statetful LSTM model - but I could easily be wrong.

                                        Yeh any recurrent network is fine for a guitar amp, Jatin prefers GRU's but all of the guitarML stuff is LSTM if i remember correctly, i think GRUs are a bit easier on the CPU

                                        My understanding of how I(we) might approach this is very very poor, but I think there any number of ways to get to the json code that would be needed to "make it work", but wow do I have a bunch of questions.... here's some of them:

                                        1. is this even possible in HISE? (I mean the playback not the modelling or learning)

                                        if the entire RTNeural framework is implemented, recurrent models should be supported

                                        1. Can I "just" use (say) this stuff : https://www.youtube.com/watch?v=xkrqF0D8pfQn and take the .json output and load it into RTNeural and expect it to "sort of" work?

                                        if he's just using regular old pytorch and building simple models, you should be able to load the state_dict and run the export script, then bring the JSON into HISE

                                        1. If not what's the best way to get from a bunch of guitar recordings to a set of .json files that I can then load into math.neural?

                                        this is where training a model comes in, you'd need to learn some basic Python and familiarize yourself with packages like Torch or Tensorflow, as well as some audio-handling ones like Librosa

                                        the short version is:

                                        • load and preprocess/augment the audio data
                                        • convert it into a dataset that can be read by a model
                                        • create the model & train it on the data
                                        • export the model's state_dict using the RTNeural export script
                                        • load it into a Math.Neural node
                                        1. I assume all these Learned models are in fact static snapshots of dynamic processes, so every time the user changes the distortion control on the plugin I will need to load another model - if so how practical is that?

                                        recurrent models aren't really "static", they can only estimate a single function at a given time, but that function can change depending on the "state" of the network, it basically has a short memory (literally in the name of LSTMs) so the function it's estimating is dependant on that memory

                                        that being said, for a guitar amp the typical process is to train several models on various settings of the amp, then crossfade between them

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

                                          @iamlamprey said in Simple ML neural network:

                                          Ok so first: thank you - this is very helpful, but of course it just leads to more questions - and Im slightly afraid this might turn into some sort of ML primer at your time expense, so - I will try and keep to a minimum...

                                          @Lindon said in Simple ML neural network:

                                          So I've spent some time with the research papers, the youTube Videos and the blogs. It would seem I might need a statetful LSTM model - but I could easily be wrong.

                                          Yeh any recurrent network is fine for a guitar amp, Jatin prefers GRU's but all of the guitarML stuff is LSTM if i remember correctly, i think GRUs are a bit easier on the CPU

                                          Ok so fine GRU or plain old LSTM - is the "kind of" model yes?

                                          My understanding of how I(we) might approach this is very very poor, but I think there any number of ways to get to the json code that would be needed to "make it work", but wow do I have a bunch of questions.... here's some of them:

                                          1. is this even possible in HISE? (I mean the playback not the modelling or learning)

                                          if the entire RTNeural framework is implemented, recurrent models should be supported

                                          here's one for @Christoph-Hart then: is GRU or LTSM implemented in the HIse implementation currently?

                                          1. Can I "just" use (say) this stuff : https://www.youtube.com/watch?v=xkrqF0D8pfQn and take the .json output and load it into RTNeural and expect it to "sort of" work?

                                          if he's just using regular old pytorch and building simple models, you should be able to load the state_dict and run the export script, then bring the JSON into HISE

                                          Well of course I have no idea what he's doing - but interestingly what do you mean by "simple model"?

                                          1. If not what's the best way to get from a bunch of guitar recordings to a set of .json files that I can then load into math.neural?

                                          this is where training a model comes in, you'd need to learn some basic Python and familiarize yourself with packages like Torch or Tensorflow, as well as some audio-handling ones like Librosa

                                          OK well unlike Christoph I once upon a time did a fair bit of Python work _ I really like it as a language...

                                          the short version is:

                                          • load and preprocess/augment the audio data

                                          So here I think (correct me if Im wrong) this means ; playing about 5 mins of guitar thru the amp - and capturing the output as well as capturing the DI-ed guitar signal - then making sure these are edited nicely to phase align with each other. Is that about it?

                                          • convert it into a dataset that can be read by a model

                                          making it a pickle data set? Or perhaps NumPy

                                          • create the model & train it on the data
                                          • ha here we get to the bit Im most fuzzy on...-- create the model? So is this just set up a big set of neural net nodes which I can build with something like TensorFlow and Keras yes? no? maybe?

                                          As an aside there seems to be a lot of parms I can set up for this - I guess more research..

                                          • export the model's state_dict using the RTNeural export script

                                          I get a .json file yes?

                                          • load it into a Math.Neural node

                                          Which I load into here...

                                          1. I assume all these Learned models are in fact static snapshots of dynamic processes, so every time the user changes the distortion control on the plugin I will need to load another model - if so how practical is that?

                                          recurrent models aren't really "static", they can only estimate a single function at a given time, but that function can change depending on the "state" of the network, it basically has a short memory (literally in the name of LSTMs) so the function it's estimating is dependant on that memory

                                          that being said, for a guitar amp the typical process is to train several models on various settings of the amp, then crossfade between them

                                          Ok so I need to load up these .json "models" dynamically as the user fiddles with the UI controls...

                                          HISE Development for hire.
                                          www.channelrobot.com

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

                                            @Lindon said in Simple ML neural network:

                                            playing about 5 mins of guitar thru the amp - and capturing the output as well as capturing the DI-ed guitar signal

                                            Is the NN result noticeably better than using an IR derived from the same recordings?

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

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

                                            26

                                            Online

                                            1.7k

                                            Users

                                            11.8k

                                            Topics

                                            102.4k

                                            Posts