HISE Logo Forum
    • Categories
    • Register
    • Login

    Granular Engine

    Scheduled Pinned Locked Moved General Questions
    55 Posts 8 Posters 3.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.
    • ?
      A Former User @Christoph Hart
      last edited by A Former User

      @Christoph-Hart :astonished_face: That's some interesting news... Well... The cpu consumption is reasonably low but I definitely look into this! I'm a bit scared of scriptnode tbh. But I'll have to get into this eventually...

      The problem with the scriptnode_codegen_rewrite branch is that it doesn't like loading my XML user presets (crashes almost every time) and that it sort of messes up all kinds of things (AHDSR Envelope, etc.) When switching to that branch would you generally recommend starting fresh with a project and set it up from scratch or shouldn't that make any difference?

      EDIT: I love the look of it as well (codegen_rewrite)!! The new font for the script editor etc. is really nice and also the subtle changes to the UI in general I really like!

      1 Reply Last reply Reply Quote 0
      • Christoph HartC
        Christoph Hart
        last edited by

        No, in the end this branch is supposed to be 100% compatible to existing projects so it doesn't matter which one you use, I just had to change so many things that it's inevitable that some things break (eg. the AHDSR module needed to be refactored so that I can use the DSP logic in a node that shares the code with the HISE modulator).

        What would help tremendously is if you try to make minimal example patches that works on the scriptnode branch, but fails to load / crashes or sound different on the scriptnode codegen rewrite branch. I've created a issue on GitHub for this so that we keep that all in one place:

        Link Preview Image
        scriptnode codegen regression tests · Issue #187 · christophhart/HISE

        This issue tries to collect all issues that occur when moving from the scriptnode branch to the scriptnode codegen rewrite branch (which is going to be the master branch for HISE 3 in the foreseeable future). If you notice a different be...

        favicon

        GitHub (github.com)

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

          @Christoph-Hart Sure! Of course! I’ll have to take things apart a bit and isolate the issue and see if it persists. I’ll have a look later today...

          Edit: At the moment it doesn't want to load any of my XML anymore... also the autosaves are crashing HISE...

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

            @Christoph-Hart said in Granular Engine:

            @UrsBollhalder this * 9000.

            It requires a bit of a brain warp coming from KONTAKT where you have to cram everything into one gargantomanic code sausage but this is one of the main design principles in HISE that I wanted to do differently.

            This being said, there‘s a granular synth available in scriptnode which you can modify (I wrote this as a real world use case for SNEX so if you want to change parameters, you can just copy the code and fiddle around with it inside a SNEX node), so abusing the (rather heavyweight) sampler module for these little grains might not be the smartest solution going forward).

            How do I get the granulator node to do its thing? I can setup a mod chain with a sine to modulate the grain size f.e. but how to get it going through the audio file? I have it set to scriptnode synth or what it’s called not fx... midi input is there and an audio file is loaded as well...

            1 Reply Last reply Reply Quote 0
            • Christoph HartC
              Christoph Hart
              last edited by Christoph Hart

              This is a bit counterintuitive, but the granular node is not polyphonic so you need to use it in the monophonic slot.

              Granular synthesis normally handles multiple notes by distributing the (fixed amount of) grains across all pressed notes. So if you press one, key, 100 grains will play the single note. If you press another key, 50 grains will play the first note and 50 grains will play the second note (in a random order of course).

              However this means that you do not require a polyphonic system which contain a state for each voice.

              So:

              • put in in the FX slot
              • put it into a container.midichain node (this will make it process the midi data which is disabled by default for effects)
              • use the Position parameter to scan the waveform.
              ? 2 Replies Last reply Reply Quote 2
              • ?
                A Former User @Christoph Hart
                last edited by A Former User

                @Christoph-Hart Ahh... Ok... I tried a bit today and was using it in the scriptnode synthesizer module... so midi was working already... But that note distribution that you are describing thing is interesting and will prevent it from blowing up the computer I guess... I'd love to have some control over the attack and release values of the grains, but for that I'd probably have to go down the rabbit hole a bit further...

                Edit: Does GrainSize alter the chunk of audio that is being played and adjust the triggering (timer) accordingly? So it'll play more audio but less often?

                1 Reply Last reply Reply Quote 0
                • Christoph HartC
                  Christoph Hart
                  last edited by

                  I'd love to have some control over the attack and release values of the grains,

                  Yes I also thought about adding that. I prototyped the entire node in SNEX and there you could just change the attack and release time as some internal parameters (similar to fiddling around with Shadertoy stuff lol), but that's certainly a useful parameter to expose.

                  I'm currently working on multisample support for this (and the other file-based nodes) so you can drop sample maps and SFZ files in there.

                  ? 1 Reply Last reply Reply Quote 1
                  • C
                    crd
                    last edited by

                    Is this node in the scriptnode_codegen_rewrite build? I am not finding it in the current scriptnode version of Hise...

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

                      @crd Yep it's in the codegen rewrite.

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

                        What I am noticing though when using the granulator module is that CPU is hovering around 20%... But maybe I am doing something wrong here. I’d love to have a look inside this thing...

                        1 Reply Last reply Reply Quote 0
                        • Christoph HartC
                          Christoph Hart
                          last edited by

                          Yeah it‘s not optimized yet so if you bump up the grain density it burns unnecessary CPU cycles...

                          1 Reply Last reply Reply Quote 0
                          • C
                            crd
                            last edited by

                            I just compiled codegen to experiment with this. It sounds interest but this type of fx would be way more useful to me applied to a sampler's sample map rather than embedded audio. I am having some success manipulating the midi into a sampler but just need to script some sort of voice stealing method to keep the number of voices down. As long as I don't play a 5 note chord everything works great.

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

                              @crd

                              I'm currently working on multisample support for this (and the other file-based nodes) so you can drop sample maps and SFZ files in there.

                              I think Christoph is working on this actually... This looks quite promising to me honestly... I mean the whole SNEX workbench thing is quite awesome I find... Not that I am on top of things yet, no, but there are tons of things you could do with it...

                              I was actually also trying to look into a more controlled way to handle voice count in my engine... still working on it.

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

                                @UrsBollhalder

                                whoops... sorry I missed that. yeah, that sounds amazing! The option of being able to work with all the DSP stuff is definitely exciting.

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

                                  Anyone know where I can find the code for the Granulator to paste into a SNEX node? :)

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

                                    @Christoph-Hart said in Granular Engine:

                                    This is a bit counterintuitive, but the granular node is not polyphonic so you need to use it in the monophonic slot.

                                    Granular synthesis normally handles multiple notes by distributing the (fixed amount of) grains across all pressed notes. So if you press one, key, 100 grains will play the single note. If you press another key, 50 grains will play the first note and 50 grains will play the second note (in a random order of course).

                                    However this means that you do not require a polyphonic system which contain a state for each voice.

                                    So:

                                    • put in in the FX slot
                                    • put it into a container.midichain node (this will make it process the midi data which is disabled by default for effects)
                                    • use the Position parameter to scan the waveform.

                                    When I do as you instructed, the granulator works just fine. As soon as I try the same thing in the scriptnode synthesizer, I get clicks and pops. Is there anything additional I need to do to make it work there?

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

                                      @UrsBollhalder

                                      Where exactly are you putting the granular fx when you get it to work? I am getting crazy noise wherever I put it using a script FX or script node synthesizer using a sample map as a source.

                                      (Unrelated, I have been getting good results with a script to limit the voices before a timer based granular script...)

                                      ? 1 Reply Last reply Reply Quote 0
                                      • NatanN
                                        Natan
                                        last edited by

                                        Have you Guys Exported Your Project With Granulator Node?

                                        Here Ableton Says That It Not Compatible 🤔

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

                                          @crd I just did what Christoph said in his post... so in the midichain container basically... That does the trick. Also for sample maps...

                                          Screenshot 2021-06-30 at 22.18.15.png

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

                                            @Natan said in Granular Engine:

                                            Have you Guys Exported Your Project With Granulator Node?

                                            Here Ableton Says That It Not Compatible 🤔

                                            No. Not yet... I am playing around with it but I am mainly using my own Midi Script Processor that I wrote for the granular stuff... which works like a charm I have to say. And also I just don't feel at home yet with the whole scriptnode thing. But working on it! So Ableton complains specifically about the granulator node??

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

                                            19

                                            Online

                                            1.7k

                                            Users

                                            11.8k

                                            Topics

                                            103.0k

                                            Posts