HISE Logo Forum
    • Categories
    • Register
    • Login

    How to build SNEX Playground?

    Scheduled Pinned Locked Moved General Questions
    38 Posts 4 Posters 1.7k 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.
    • Christoph HartC
      Christoph Hart @Casmat
      last edited by

      @Casmat if imgur is over capacity then there‘s nothing we can do except for stop uploading images :)

      ustkU 1 Reply Last reply Reply Quote 2
      • ustkU
        ustk @Christoph Hart
        last edited by

        @Christoph-Hart Yeah I though it was somehow related to the forum... Or use another provider 😛

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

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

          @Casmat

          SOS image provider

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

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

            @Casmat You definitely need to declare a
            At first, make it 0.0
            Then add a parameter to control it

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

            CasmatC 2 Replies Last reply Reply Quote 0
            • CasmatC
              Casmat @ustk
              last edited by Casmat

              @ustk shouldn’t the a be from 0-1? And there were some comments under that music dsp post, do we have to do normalization or am I yapping away at nothing?

              i make music

              CasmatC 1 Reply Last reply Reply Quote 0
              • CasmatC
                Casmat @Casmat
                last edited by Casmat

                @Casmat and as for the image, isn’t that how the saturation should look like

                i make music

                1 Reply Last reply Reply Quote 0
                • CasmatC
                  Casmat @ustk
                  last edited by

                  @ustk hmm, seems like im missing part of the picture, im not really understanding the whole use of the soft saturation function vs other common saturation functions like a tanh function, have you got any resources that can help me learn more about saturation dsp or dsp in general a bit more? I feel like getting a better understanding would help me ease my way into Snex cause I have little clue what all this dsp does. Thanks for your help so far, opened my eyes to the vastness amount of info I’m missing and I’m pretty eager to learn more! After taking some time to research, it may be right to jump back at this, right?

                  i make music

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

                    @Casmat A good sounding distortion unit is much more than just the saturation function. It needs clever filtering, oversampling to remove aliasing, etc... Tanh is a good starting point, but you need to understand if you want more or less of the odd or even harmonics, or asymmetric distortion. And this is only the beginning, as a "true analog sounding" algorithm is much more... You might find some literature about this in your fav search engine. The first steps you've made is a good start! Just go for a simpler equation until you know what it does 😉

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

                    CasmatC 3 Replies Last reply Reply Quote 0
                    • CasmatC
                      Casmat @ustk
                      last edited by

                      @ustk Thanks! Will definitely take a look!

                      i make music

                      1 Reply Last reply Reply Quote 0
                      • CasmatC
                        Casmat @ustk
                        last edited by Casmat

                        @ustk Think I'm ready to try again with the saturator, did some research on the topics and I feel much more confident going forward! Seriously, thank you haha! Instead of going for that other formula, i found a more simpler cubic formula: https://www.hackaudio.com/digital-signal-processing/distortion-effects/soft-clipping/

                        So with the formula, would the equation in snex look something like this?

                        out = in - a * (1.0 / 3.0) * Math.pow(in, 3);
                        

                        Edit: All the filtering/oversampling should be done with other nodes in scriptnode, right? or is it within the snex shaper node itself?

                        HiseSnippet 1321.3oc2X0sSbaDEdLvPxRRpZhRT6k9hdAQJEsKMMsR8h.rvlrpYAKLkj6PSrmkczNdFKOiA1V066iUeD5iPeDxaP643wK1FVQgsoIsEjf87yLy24+CDjoi3FiNi305fIobh2cogST1QcGwDJR+sIdeBc.yX4Y9NVaMIkYL7Xhm2hu.Y30ZIRwWu64awjLUDuhEgbnVDwekHQXq3Frw2KjxdrX9AhjZZ+zM5GoUc0RcNfmEosIornwri46xP0VfR7VdmXgUmEZYVtAzYKc7jvQ5SUN8OTXDuUxQhNjP3hbrIcGIjwASsUCg3QCpr7EcV9CoCDwhy4W4A9zBA9UmntOvagqBRctAPxqFjVxAo6SCixDo1JIHdtCsuBBHCYfqtNTb5R79UZWMnfxtVBaLuWFPb9AV8Ysa+De3GO96FlqhrBsxWq1Ua46oV8wq7SqzZkedE+KJZ3vYJCelLsTxyloXL5lcUGbUUdxa4YOw+DlLmethf42zmt70ymF4r5ZJpU8UB6do7R5dZYL5qv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+v+cGE+LJzWdc+hPo+GmX4GhUm+P7FIrnL8QQt+hCrn+1Eb.6VU7+moEc.R62gbha6EJt+MIAFWbTTDlu9kvzmYel0miy7UywYd5bbludNNyyliy7MywY91q7L3j5Mys5DWNOvHXG2JxdtMWJR+I+I5asV1C
                        

                        Thanks!

                        i make music

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

                          @Casmat for these simple one liners you can also use the math.expr node, just rename your variables to input and value and you can use the single parameter as drive parameter:

                          output = input - value * (1.0f / 3.0f) * Math.pow(input, 3.0f);
                          

                          and yes, the filtering and oversampling can be done with dedicated nodes.

                          CasmatC 2 Replies Last reply Reply Quote 0
                          • CasmatC
                            Casmat @Christoph Hart
                            last edited by

                            @Christoph-Hart ooh! That's definitely useful! Thanks Christoph!

                            i make music

                            1 Reply Last reply Reply Quote 0
                            • CasmatC
                              Casmat @Christoph Hart
                              last edited by

                              @Christoph-Hart Oops tried it, but it seems to not make a distorting sound, am I supposed to do more than adding the math.expr node?

                              HiseSnippet 1591.3oc0X0sTaaDEdkMKDbn+jNIS6zqzjoWP5PnVNo.o4hvuNgIwfGDgvMcxrHs1dGj1UizJ.2L499XkGg9HzGg7FPO6tRHIvCAbSosjYB97yt642uywzMV3QSRDwHqo2cXDEYMC1cHWNXsADFGs45HquD2gjHow1FVqNLhjjP8QVV0ethg0zSfz+7wmsJIfv8nErPn8DLO5qXgLYA2tK+RVPPahOcWVXIse7xa5I3qIBDof8TG2DEQ7NjzmtEQoVMLxZxM7YRQrqjHoIfNqJ7G5NPbL2n+drD1AATEgCxEtHCazZCXA9cy80DDxB2svyqa776h6v7YmwuHB70ZA1EmnbLvp1kYRNWCSxpjIMgwjtC10KlEIKjnrmai2jCIjdDHTW1TL5hr9.dMAn.WNeH4PZ6Xf3rCL6BMaNmM7eO3o8R4dRlfaK3aIjzs4y9fFuqwzMdeC6yKpWuQJS8Lwhf.Z7HEqxtwW1AmkmF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oGaBRk0zXAlK3BWSEKAUI3XcNuXF7lI6oj5QBNyUpgVUHNLjnqkGqcSJCGdOivaieCLjVurutF6dZ5dh3P6mSgxOEVtykrt+ebUW2O5JutuYugcg46IQhDXqnR274j0prr0oxTdU0Mrpnkx8ZCtmS4TSNyRZdqk6R3UtLftxM0gUZcs+7YavI.7mKE7F+sS7.mkTo5.tfTXW.81RNkOXA6VkY+BXABHu3UYvX8pXvSb0vfqtiPI8GwHqI+m5qDMwUaJ5mX47+6uWTkg9SmaitL0v5M3GQCf1TsM9M3r0Yy4VsOqifKxGmTTArCEFZ1uOsJrynbnUjRXe3BN2c4cnATRRodueX4WAiXHwczC.FqXw0+ayNx702gMlqsBbv9uSd6FsL6R2ss9UZ21O6163um6MbGJfe9+mL82hAL8V15zs8+946ahUnuIdiPhWr3sdlu4gBv3VZNfey0+09lF2QQa6fNxrEDVsGNJDF67VOOUM8Cg3ynOSqw3LOZLNyiGiy7yiwYVXLNyhiwYV5ROiZh+JoRQno9GXzcC8lnVVlMfzsBn+BToL8JA
                              

                              i make music

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

                                @Casmat sure it does, it's just subtle. Drive the synth at 0dB and play multiple notes.

                                CasmatC 1 Reply Last reply Reply Quote 1
                                • CasmatC
                                  Casmat @Christoph Hart
                                  last edited by

                                  @Christoph-Hart thanks Christoph!

                                  i make music

                                  1 Reply Last reply Reply Quote 0
                                  • CasmatC
                                    Casmat
                                    last edited by Casmat

                                    @ustk @d-healey @Christoph-Hart Tried to implement the original musicdsp.org formula, but it seems to be affecting the top half of the wave, I tried doing

                                    return out * -1.0f;
                                    

                                    and it worked for just the bottom, but How do I make it so the top and bottom of the wave is being affected? Basically making an odd symetrical curve on the shaper

                                    HiseSnippet 1771.3oc0X0rTbaDDVhkAav3jXG6jT4jJW4.tJGpUDG+SxAVfk0lxdgsPXr8gTNCRyt6THMiJoYA13xWxobKmys7Hjq4leGxKPdDxaf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37ZIv4Vn+dumlzFG63ZsmowGB9RTqH3Zmm46i4zeM3eF8bVXLly2LFy4liwb91wXN2ZLlysGi4bmSbN3M9KMPIiL4+ffNqZdPisooGcof0+BpxhvJC
                                    

                                    Edit: Don't know if it'd be useful, but here's a cpp script of the same music dsp code being implemented into a program called psycle: SourceForge

                                    Note: Since the snippet probably doesn't work, you'd have to create a new file and copy/paste the get sample function and paramemter callbacks from here: https://justpaste.it/3iopy

                                    i make music

                                    1 Reply Last reply Reply Quote 0
                                    • CasmatC
                                      Casmat @ustk
                                      last edited by

                                      @ustk @d-healey @Christoph-Hart quick bump/update, on the other cpp code in my last post, the code had this:

                                      		if (sl > 0) {
                                      			ProcessChannel(sl);
                                      		}
                                      		else {
                                      			sl = -sl;
                                      			ProcessChannel(sl);
                                      			sl = -sl;
                                      		}
                                      

                                      which I think is what gives them the odd symmetrical waveshaping effect, tired to implement this in hise, swapping the sl for input and I got an even symmetrical waveshaping effect, I'm lost haha!

                                      i make music

                                      CasmatC 1 Reply Last reply Reply Quote 0
                                      • CasmatC
                                        Casmat @Casmat
                                        last edited by

                                        @Casmat nvm got it! Had to tinker and multiply a couple values by negatives and add if statements!

                                        i make music

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

                                        25

                                        Online

                                        1.7k

                                        Users

                                        11.8k

                                        Topics

                                        102.7k

                                        Posts