HISE Logo Forum
    • Categories
    • Register
    • Login

    Ring modulator below 20hz

    Scheduled Pinned Locked Moved ScriptNode
    16 Posts 2 Posters 480 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.
    • HISEnbergH
      HISEnberg @Morphoice
      last edited by

      @Morphoice Just add a faust node inside of Scriptnode. Click the square box on the node which will open a scripting window.

      Put this in there:

      declare id   "ring_modulator";
      declare name "Ring Modulator Mono";
      declare shortname "Ring Modulator";
      declare category "Modulation";
      
      import("stdfaust.lib");
      
      freq = hslider("freq[name:Freq]", 240, 120, 1600, 0.5);
      wet_dry = hslider("dry/wet[name:Mix]", 0.5, 0, 1, 0.05);
      
      process = ((1 - wet_dry)*_,(_*os.osc(freq))*wet_dry);
      

      Now it should operate just like any other node in Scriptnode. I am not sure if this snippet will work but here you go:

      HiseSnippet 1303.3ocuVstaaTDEdVmroDS4RAd.V4e4DEbsyklVpPIMNwfEjTqtgnJg.qI6Na7Hu6LKyLtIFD+mWg9O9KuE7nviPeCfyYmcs23XBMV.NRal4bYNey45vtxvDgrv9ZAOMkYHDmk5ojALsVpHNUOcbJi3beW+wByf1CnbAo6gDm228Xp1vTdVRGLNkp0rPhiyReARvY0kIY+dydGPioh.1TRDxYRd.6q4IbyTp81+q3wwcngrS4Ikjd686FHEskwxQ.dVxsIIkFLjdA6DJJVEWxWR0CHNq69jc1oEMLZ2nVa05ImGFEv1Z2lOZ6c2jtyiih1sYqs2Jb2nsAPtxQgbiT4anFlFNzCjgi8GHuTXMvYbM+7XFtoEwGrrkLo8.db3DmiFbUKWxUsj0U8ItGyC4SnO0k8gYL7lpQYmlSkaCRstCPxoDjV1BoG35Gn3olobP77ttcEPDLhBwlxPwJKw42caKAADlFIzgrNJXyDEp+nlM2vC9r1SiFIBLbovSJNQZXOWTesp+T0Uq9yU8lkUTzb4glQIiiYp4xFSGT2lh0EiRNmo1v6Uz3Qr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9tZa3s41vy1asI9I6E7MarCnHzCpOzKprp4slrZeL+JTYPX3CnJtrIpX07WX.ZVudKuO0K+jVa89aTu+5RcCoNnNBi0Va8BdOkP9KFTBC5A
      
      MorphoiceM 2 Replies Last reply Reply Quote 1
      • MorphoiceM
        Morphoice @HISEnberg
        last edited by

        @HISEnberg bloody brilliant! I remember Christoph saying somewhere shippets wont have faust scripts in them so I didnt try the snippet way but I got faust working and played with some examples. Your Ringmodulator is perfect! Thank you so much! Exactly what I wanted.... Now I have faust to learn. lol this is like dark magic

        https://instagram.com/morphoice - 80s inspired Synthwave Music, Arcade & Gameboy homebrew!

        HISEnbergH 1 Reply Last reply Reply Quote 0
        • MorphoiceM
          Morphoice @HISEnberg
          last edited by Morphoice

          @HISEnberg

          @HISEnberg said in Ring modulator below 20hz:

          process = ((1 - wet_dry)*,(*os.osc(freq))*wet_dry);

          how would I make this stereo?

          process = (_*os.osc(freq))*wet_dry,(_*os.osc(freq))*wet_dry);
          

          gives me a stereo ringmodulated signal but
          completely loses the dry signal. I don't fully get the syntax yet

          https://instagram.com/morphoice - 80s inspired Synthwave Music, Arcade & Gameboy homebrew!

          1 Reply Last reply Reply Quote 0
          • HISEnbergH
            HISEnberg @Morphoice
            last edited by

            @Morphoice Oh and I forgot to adjust it, but the hslider is presetned in this format: defaulValue, minValue, MaxValue, stepSize. So if you want to lower it all the way down to 1Hz just change the freq slider:

            freq = hslider("freq[name:Freq]", 240, 1, 1600, 0.5);
            
            MorphoiceM 1 Reply Last reply Reply Quote 0
            • MorphoiceM
              Morphoice @HISEnberg
              last edited by

              @HISEnberg that I got, just not how to make the signal stereo without losing the dry signal when dry/wet is turned down...

              https://instagram.com/morphoice - 80s inspired Synthwave Music, Arcade & Gameboy homebrew!

              HISEnbergH 1 Reply Last reply Reply Quote 0
              • HISEnbergH
                HISEnberg @Morphoice
                last edited by HISEnberg

                @Morphoice Yes sorry I am using my laptop speakers but I see how I messed that up, I think this should resolve it:

                declare id   "ring_modulator";
                declare name "Ring Modulator Stereo";
                declare shortname "Ring Modulator";
                declare category "Modulation";
                
                import("stdfaust.lib");
                
                // Parameters
                freq = hslider("freq[name:Freq]", 240, 1, 1600, 0.5);
                wet_dry = hslider("dry/wet[name:Mix]", 0.5, 0, 1, 0.05);
                
                // Ring mod function
                ring_modulate(input) = (1 - wet_dry) * input + wet_dry * (input * os.osc(freq));
                
                // Process stereo signal, the _, _ repersent the left and right input
                process = _, _ :> ring_modulate, ring_modulate;
                
                

                Also typically, I won't use the dry/wet within faust itself. Instead I would use the Scriptnode dry/wet template. It doesn't make it difference, but it could if you want to do further processing within Scriptnode. Either way works fine.

                MorphoiceM 1 Reply Last reply Reply Quote 0
                • MorphoiceM
                  Morphoice @HISEnberg
                  last edited by Morphoice

                  @HISEnberg said in Ring modulator below 20hz:

                  process = _, _ :> ring_modulate, ring_modulate;

                  works perfect thanks.
                  that process syntax is something I really have to look at.

                  "_" is the original signal, that I got.
                  "*" is self explanatory, but the rest... gotta binge some tutorials

                  https://instagram.com/morphoice - 80s inspired Synthwave Music, Arcade & Gameboy homebrew!

                  HISEnbergH 1 Reply Last reply Reply Quote 0
                  • HISEnbergH
                    HISEnberg @Morphoice
                    last edited by

                    @Morphoice This is how I got started with it, though I don't think it is the greatest tutorial series I have watched: https://www.kadenze.com/courses/real-time-audio-signal-processing-in-faust/info

                    Romain Michon is the GOAT when it comes to Faust resources so just finding his course lectures and online material is good place to start.

                    MorphoiceM 2 Replies Last reply Reply Quote 1
                    • MorphoiceM
                      Morphoice @HISEnberg
                      last edited by

                      @HISEnberg superb I'll work through that tonight.

                      I'm playing around with the examples

                      process =   dm.greyhole_demo;
                      

                      is a great one... How would I add a dry_wet slider to that?

                      https://instagram.com/morphoice - 80s inspired Synthwave Music, Arcade & Gameboy homebrew!

                      HISEnbergH 1 Reply Last reply Reply Quote 0
                      • HISEnbergH
                        HISEnberg @Morphoice
                        last edited by

                        @Morphoice Scriptnode dry wet template is what I would do. If you want to edit source code in Faust, you need to look through their libraries (lib) online and in github:

                        Link Preview Image
                        faustlibraries/reverbs.lib at 3e74c39a9fc7c00c1b4caceff2731af643706181 · grame-cncm/faustlibraries

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

                        favicon

                        GitHub (github.com)

                        MorphoiceM 2 Replies Last reply Reply Quote 0
                        • MorphoiceM
                          Morphoice @HISEnberg
                          last edited by

                          @HISEnberg scriptnode dry/wet. I feel stupid. ;)))))

                          https://instagram.com/morphoice - 80s inspired Synthwave Music, Arcade & Gameboy homebrew!

                          1 Reply Last reply Reply Quote 0
                          • MorphoiceM
                            Morphoice @HISEnberg
                            last edited by

                            @HISEnberg well the library looks easy enough.

                             greyhole(dt, damp, size, early_diff, feedback, mod_depth, mod_freq)
                                    = (si.bus(4) :> seq(i,3,diffuser_nested(4,ma.PI/2,(-1^i)*diff,10+19*i,size))
                                        : par(i,2,si.smooth(damp_interp)))
                                    ~((de.fdelay4(512, 10 + depth + depth*os.oscrc(freq)),de.fdelay4(512, 10 + depth + depth*os.oscrs(freq)))
                                        : (de.sdelay(65536,44100/2,floor(dt_constrained)),de.sdelay(65536,44100/2,floor(dt_constrained)))
                                        : par(i,2,*(fb)))
                                    with {
                                        fb = feedback:linear_interp;
                                        depth = ((ma.SR/44100)*50*mod_depth):linear_interp;
                                        freq = mod_freq:linear_interp;
                                        diff = early_diff:linear_interp;
                                        dt_constrained = min(65533,ma.SR*dt);
                                        damp_interp = damp:linear_interp;
                                        linear_interp(x) = (x+x')/2;
                                    };
                            

                            to design an entire reverb is wow. ofc the real magic happens in the diffusor and delay blocks but that needn't concern me

                            https://instagram.com/morphoice - 80s inspired Synthwave Music, Arcade & Gameboy homebrew!

                            1 Reply Last reply Reply Quote 0
                            • MorphoiceM
                              Morphoice @HISEnberg
                              last edited by

                              @HISEnberg said in Ring modulator below 20hz:

                              Romain Michon is the GOAT when it comes to Faust resources so just finding his course lectures and online material is good place to start.

                              funny enough I'm already subscribed to him on youtube lol

                              https://instagram.com/morphoice - 80s inspired Synthwave Music, Arcade & Gameboy homebrew!

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

                              26

                              Online

                              1.7k

                              Users

                              11.8k

                              Topics

                              103.0k

                              Posts