HISE Logo Forum
    • Categories
    • Register
    • Login

    Invert polarity of sampler

    Scheduled Pinned Locked Moved General Questions
    44 Posts 8 Posters 4.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.
    • hisefiloH
      hisefilo @ustk
      last edited by

      @ustk oh I got it :)

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

        BTW, the most apparent difference between your sound examples is that the unshifted sample is clipping pretty badly so you're not really hearing phase distortion, but real distortion :)

        hisefiloH 2 Replies Last reply Reply Quote 2
        • hisefiloH
          hisefilo @Christoph Hart
          last edited by hisefilo

          @Christoph-Hart yeah. Sorry. Will send a leveled one. Are the same partials, same amplitude... But unphased raises some weird peaks.

          By the way. Having a hard time trying to calculate phase rotation. (since harmonics rotates differently based on #).
          alt text

          Any clue on how to calculate this?

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

            @Christoph-Hart is there a way to do sinewaves to start when they cross zero Y value? Got some artifacts when phase is not close to 180 or 360

            Despite this, results are amazing

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

              Lol, if you want them to start at zero, phase is either 0 or 180 degrees :)

              What you need in this case is a simple envelope with an attack time of about 3-5 ms to remove the click.

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

                @Christoph-Hart LOL I know. Doing this workaround alreay.But I'm guessing if there's a way to keep phase angle but delay the start n samples until sinewave crosses zero. Don't know if it makes sense.

                I measured phase as is and is doing what it's supposed to do. Just trying to do a custom trick since artifact are a problem for anyone using phase shift

                lalalandsynthL 1 Reply Last reply Reply Quote 0
                • C
                  Crystal Audio @Christoph Hart
                  last edited by

                  @Christoph-Hart said in Invert polarity of sampler:

                  I think I'll add this to the SimpleGain module

                  Has this been added to the SimpleGain module? I didn't see it when I had a look.

                  Dan KorneffD 1 Reply Last reply Reply Quote 0
                  • Dan KorneffD
                    Dan Korneff @Crystal Audio
                    last edited by

                    @Crystal-Audio It has been added. There isn't a button for it, but you can find it in the Simple Gain API

                    Dan Korneff - Producer / Mixer / Audio Nerd

                    C 1 Reply Last reply Reply Quote 2
                    • lalalandsynthL
                      lalalandsynth
                      last edited by

                      gain.jpg

                      https://lalalandaudio.com/

                      https://lalalandsynth.com/

                      https://www.facebook.com/lalalandsynth

                      https://www.facebook.com/lalalandsynth

                      1 Reply Last reply Reply Quote 1
                      • C
                        Crystal Audio @Dan Korneff
                        last edited by

                        @dustbro @lalalandsynth I'm having trouble locating Simple Gain in the api. I don't see it when I search for "Simple Gain" and I didn't notice it when I scrolled through the full list. Is there a special place to find the modules in the api browser?

                        Dan KorneffD 1 Reply Last reply Reply Quote 0
                        • Dan KorneffD
                          Dan Korneff @Crystal Audio
                          last edited by

                          @Crystal-Audio yeah it's in the module browser. Check the image above.

                          Dan Korneff - Producer / Mixer / Audio Nerd

                          1 Reply Last reply Reply Quote 0
                          • lalalandsynthL
                            lalalandsynth @hisefilo
                            last edited by

                            @hisefilo can you explain a bit how you go about additive synthesis ? I gather you have a sound that you want to recreate , you look at the partials and then add sines to recreate it ?

                            If i am correct , what do you use to analyse the partials and dont they all change per note?

                            Very interested and would love to hear how you approach this.

                            https://lalalandaudio.com/

                            https://lalalandsynth.com/

                            https://www.facebook.com/lalalandsynth

                            https://www.facebook.com/lalalandsynth

                            ? hisefiloH 2 Replies Last reply Reply Quote 0
                            • ?
                              A Former User @lalalandsynth
                              last edited by

                              @lalalandsynth You can use SPEAR to find modes:

                              Link Preview Image
                              SPEAR Homepage

                              SPEAR Homepage

                              favicon

                              (www.klingbeil.com)

                              Sine Wave - Set exact frequency (from array)

                              • Sound -> Analyze -> Select whatever sound you want.
                              • Edit -> Select Partials Below Threshold (mode-selection sensitivity).
                              • View -> Print Average Frequencies
                              • Window -> Console

                              You'll see a list of primary modes. If you want to bring them into HISE in a neat way you can use Google Sheets:

                              • Copy the values into a Google Sheet (as a vertical list).
                              • Data -> Split Text to Columns (select the Space operator).
                              • Save the sheet as a .csv with comma-separated values.
                              • Open it in whatever text editor, then just copy + paste the values into an array.

                              To get the residue file, which is whatever is left when the modes are removed, just hit delete with the modes still selected, and export that file.

                              Now you can import the array to HISE and setup Sine Wave Generators, using Ratio to setup the partials. Unfortunately there's no way to just read from the array, so you'll have to figure out the ratios (you can automate it with a for loop and something like this:

                              moderatio = (modes[i] / modes[0]) - 1; 
                              modules[i].setAttribute(modules[i].FineFreqRatio, moderatio);
                              

                              For each mode, it divides the current mode by the fundamental (mode[0]), which gives you a general ratio.

                              It's not 100% accurate, but it's free and definitely good enough to start experimenting. The main weakness is that you don't have a lot of information about decay times for each mode, which is where paid software might come in...

                              I'm praying HISE 3.0 gives us a way to just set sine wave frequencies exactly, so we can just read them from arrays. I could basically make any sound I want with that, with some tweaking... My favourite part of additive synthesis/physmod is once I have a sound, I can tweak it by just shifting the modes and their relationships around, eg: stiffness property involves sharpening certain modes, you can even script random robin on every note.

                              And yes, for some instruments, every note has different partials. This would again be a lot easier if we could set exact freqs ☺

                              lalalandsynthL 2 Replies Last reply Reply Quote 2
                              • lalalandsynthL
                                lalalandsynth @A Former User
                                last edited by lalalandsynth

                                @iamlamprey Thanks , looking into this. Do you need another instance of the sine gen for each partial ?

                                I am not great at programming , if you have a snippet I could look at that would be very helpful .

                                https://lalalandaudio.com/

                                https://lalalandsynth.com/

                                https://www.facebook.com/lalalandsynth

                                https://www.facebook.com/lalalandsynth

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

                                  @iamlamprey said in Invert polarity of sampler:

                                  decay times for each mode, which is where paid software might come in...

                                  What paid software is available for this purpose , I did not find anything in my search .

                                  https://lalalandaudio.com/

                                  https://lalalandsynth.com/

                                  https://www.facebook.com/lalalandsynth

                                  https://www.facebook.com/lalalandsynth

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

                                    @lalalandsynth yeh you need to stack a couple of sine wave gens, there is a built-in saturation if you just want to add harmonics but ideally we'd prefer control over each one :)

                                    Here's a simple Glock i was messing with. Check the init script for most of the stuff, and the NoteOn script for the RR. There's 1 slider setup for adjusting the gain of the modes, which kinda emulates material stiffness property, the convolution probably wont work but just use the basic hise reverb if you want reverb

                                    HiseSnippet 3730.3oc6c07ababEeWKwjXkXGmTmTen.kvHGjsYn3PN7K6DHYqOrUi+PQqiSKRLho3NRhvbI2RxUNJEAMsmJPODTzhVjdJG5kTTXj1lVjzCoFs.E8PJPK5khdJME8PPaAx+AsuYH2cI0tqztJ1RZkm8fvLuYdu4Mu2ad72LypkKDE5RhiCiJU9fWc85jRkeDgJqGjr5zq53ETZ9YJUdLgy6G5dSwo0Kct0q6DGSpVpb4QNOs8xGbzRrOe1jmyw2IvkzlToRWKzykbQuZdIsotvTOmmu+bNUIW0qVtdimZd2vfoC8Ca.5xHBJkp63dSmUHW1g1sCHTp7CLaUujvnJINIj3RkG8bgUWuxpg2JHs+WyK1aIeBsBpTEPPojmKzuJUioTKM8pd9UWn4bNtToxO5Bss.ijZANpvk7p50hdaKwQXMH1li71ixGXyTOTd0So+Uux4TuQSUuGSnhajW8j1sP0sGVX9fDRzxNfKHuZk12RG3a+DBSGB8HHQtlyMIyEAUZww3ZJJRhpJJm3LGZrCM1DmTb9.uDw0bh7b.cNlRbImXRsvpjXQuXQvIItD3eZTWRzaYwaQDCHjphIghqPRXsPKmrJQLLxaEu.GeQmnHm0koR5jSP+K3siYCgXaI+rhuDRQWS1Twz.qJgPZlxHUrhplDREYJqXiLL0kTUvXYUKrN1PREopC8QWEikTwZpx1V551.ccDPGaanaIoZXAkMsr0AdsLLjsMsM0f9.sJqnXngsjzTrMj0ULsPZRZpJlx5VZfTkzzUUkwZFJZ5RZlJpxV.AaZYaKYCKrEBKoYqfgwx.agkvJHUYccLx1VBivHnOl.IIrpERV0vvPAJq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K9wO+6e68MfEEO9Lu2j8.rXWu7p6Na3mCVbGFrn5POXwe56zOfEO56wAKxAKxAKdeEXQUNXQNXwcUvhZ8Br3cR99em8MfEuym7298SxOYw88fE0F5AK9Cdu9Ar3M94bvhbvhbvh2WAVTiCVjCVbWErHtmmr3n3u0PHXwiz8SV7S+Y292xAKtuGrHdnGr3a9t8CXwG4WyAKxAKxAKdeEXQLGrHGr3tJXwd9Suo3Iem38MfEei+q92iexh6+AKpOzCVb5eQ+.V769q3fE4fE4fEuuBrnAGrHGr3tJXQiMArn69Fvhkl9O7W4fE2+CVzXnGr3u418CXwex6vAKxAKxAKdeEXQcNXQNXwcUvhlaBXwJCgfEE2N+2P+mmjCVbeAXQygdvhJuUe8aOElCVjCVjCVjCVjCVjCVbGCrn0l.Vb5gPvhGefAK9F+6m+OxAKt+.rnEGrHGrHGrHGr39Qvh1bvhbvh6pfEs6EXwo9nej4PHXwmZfAK91m+e724fE2e.VzlCVjCVjCVjCVbXGr3S1semEU3nE4nE2oPK9E65uJ2J8Dt3QZ7kGBgKdrtBW7F+vO7X2g+sVb3Ct3naNbwGei+rbqvwKxwKxwKxwKN7fW7fMU1z2clMSkk8t2YFxxNM7SZ8SI68hDbsobzo5HQySM0EgGn5DcuKWS49zycr74ZD2S85jcv7gHtObn2Gpx8g6A8g7clt2amo6DiA6MU9q3l9dImFK+PLJv7Nf81x5fBrWb4hnlul0OpfhrNVg9QEg0MMLgrx0fMf8JttTq+SClqtKB0lhP.DgR+wi11fG71fG8sAOFaCdL2F7Xso7P266YajDVKckIPXgYSeArUd1Vu.1Foz+GWBMi4C
                                    

                                    Residue file: https://drive.google.com/file/d/1MeAAVGeAve4WwsbV3Q0zT0ejBwQRpHfI/view?usp=sharing

                                    Load the residue file into the Sampler and map it across every key, make sure it's not set to repitch

                                    What paid software is available for this purpose , I did not find anything in my search .

                                    I can't list any specific ones cause I haven't really put the time into searching for them. I think Melda Productions have a good analyzer, Izotope probably have something that could do it, you basically just need a good spectrogram and an efficient way to export the modes and residue. You could probably reach out to the support teams for those companies and ask if there's a way to export spectrogram information as a table before you purchase anything

                                    There's loads of papers on the topic but from what I've seen a lot of scholarly articles are just circle jerks for "hey look what we did" without actually sharing any software or methods.

                                    Either that, or just a wall of math 🤢

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

                                      Oh also I should mention that ScriptNode lets you set exact frequencies of the sine wave osc, but I couldn't get more than 2-3 oscillators before it crashed, you might have better luck ☺

                                      1 Reply Last reply Reply Quote 1
                                      • lalalandsynthL
                                        lalalandsynth @A Former User
                                        last edited by

                                        @iamlamprey said in Invert polarity of sampler:

                                        modes, which kinda emulates material stiffness property, the convolution probably wont work but just use the basic hise reverb if you want reverb

                                        Thanks mate , looking into this ! :)

                                        https://lalalandaudio.com/

                                        https://lalalandsynth.com/

                                        https://www.facebook.com/lalalandsynth

                                        https://www.facebook.com/lalalandsynth

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

                                          @lalalandsynth mate! Sure, take the CollaB3 we developed together as a primitive example. Basically it's everything you need there.

                                          Sine wave generators with pitch (frequency), amplitude and phase (see scripted phase modulator on each sine module)

                                          For analysis, Spear, as @iamlamprey said. And also SMS-TOOLS is a good way to get into the spectral peaks.

                                          I spent a lot of time here https://ccrma.stanford.edu/~jos/jnmr/Spectral_Modeling.html and following those rabbit-holes

                                          lalalandsynthL 1 Reply Last reply Reply Quote 1
                                          • lalalandsynthL
                                            lalalandsynth @hisefilo
                                            last edited by

                                            @hisefilo cool, will dive into this :)

                                            https://lalalandaudio.com/

                                            https://lalalandsynth.com/

                                            https://www.facebook.com/lalalandsynth

                                            https://www.facebook.com/lalalandsynth

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

                                            14

                                            Online

                                            1.7k

                                            Users

                                            11.8k

                                            Topics

                                            102.4k

                                            Posts