HISE Logo Forum
    • Categories
    • Register
    • Login
    1. HISE
    2. Casmat
    3. Best
    • Profile
    • Following 1
    • Followers 0
    • Topics 117
    • Posts 536
    • Groups 0

    Posts

    Recent Best Controversial
    • For You: Soft Saturation in ScriptNode

      Hey!

      As a way to express my thanks for the massive help in this community, I'm making this post along with another hard saturation post to share my saturation! All the original dsp was based off of:

      Soft saturation — Musicdsp.org documentation

      favicon

      (www.musicdsp.org)

      x < a:

      f(x) = x

      x > a:

      f(x) = a + (x-a)/(1+((x-a)/(1-a))^2)

      x > 1:

      f(x) = (a+1)/2

      To create the saturation, add the snex_shaper node in scriptnode to your project, press the three dots -> Create new file. Name it and then add a parameter the same way and name it something like drive. Then open the code editor from the snex node

      The main course:

      template <int NumVoices> struct snex_softsat
      {
      	SNEX_NODE(snex_softsat);
      	
      	// Implement the Waveshaper here...
      	
      	float gain = 0.0f;
      	float out = 0.0f;
      	
      	float saturate(float input)
      	{
      		if(input < gain)
      		{
      			out = input;
      		}
      		else if(input > gain)
      		{
      			out = gain + (input-gain) / 				(1.0f+Math.pow(((input-gain)/(1.0f-gain)), 2.0f));
      		}
      		else if(input > 1.0f)
      		{
      			out = (gain + 1.0f) / 2.0f;
      		}
      		return out;
      	}
      	
      	float getSample(float input)
      	{
      		if(input>0.0f)
      		{
      			saturate(input);
      		}
      		else
      		{
      			input = input * -1.0f;
      			saturate(input);
      			out = out * -1.0f;
      		}
      		return out;
      	}
      	// These functions are the glue code that call the function above
      	template <typename T> void process(T& data)
      	{
      		for(auto ch: data)
      		{
      			for(auto& s: data.toChannelData(ch))
      			{
      				s = getSample(s);
      			}
      		}
      	}
      	template <typename T> void processFrame(T& data)
      	{
      		for(auto& s: data)
      			s = getSample(s);
      	}
      	void reset()
      	{
      		
      	}
      	void prepare(PrepareSpecs ps)
      	{
      		
      	}
      	
      	void setExternalData(const ExternalData& d, int index)
      	{
      	}
      	template <int P> void setParameter(double v)
      	{
      		if(P==0)
      		{
      			gain = (float)v;
      		}
      	}
      };
      

      What I recommend is just downloading snex_softsat.zip and then in your project folder -> DspNetworks -> CodeLibrary -> snex_shaper (create one if not there) and place the .h and .xml files in there.. they should show up in the dropdown in the snex shaper all ready to go.

      There you go! Feel free to use it however you want and enjoy!

      Note: this isn't going to give you the full saturation, just the waveshaping (hard part). You still would need to wrap the shaper node in an oversampling node as well as having filters, gain staging, xfaders, etc to make a release ready saturation, shouldn't be too hard to do however since they're all nodes in scriptnode

      Thanks!

      posted in Presets / Scripts / Ideas
      CasmatC
      Casmat
    • For You: Searching a Viewport

      Hey!

      Here's a handy dandy simple viewport search snippet I used for my plugin! Thought it'd be helpful to put out there just in case!

      HiseSnippet 1278.3ocsW0uSabDD+NCWTtqIUMU8AXqU+iiVvXBozJgZJfwjZEfXEmfhDPiVtar8VNu6oc2CvphGi9zz+oOR8MfN68guyfgVY0fPVdmu1e6uc1YF2UJB.kRHsrce23Xvx9IN8Fy0CaMjx3Vc10x9ycNfpzfjjIZmwwTkBBsrsW3UFA1tKZk92e+y6Pin7.nTjk0QBV.rOaDSWJs6VulEEsGMDdGaTEqewVcBD7VhHQBhmEbZZESCNmN.NjZLqlik8iZGxzBYOMUCJK6E2QDNt2Pwk7L6OhoXmEAlEqY0CCTl38DQgFDajZ0ZHKJraw4VYgQoaIKrPFK7UNGvBYSjWxFeQpBRoGU4C6ZSCuElBdqUEdMq.uY.I6JPZwLH8LmdARVrtTiAOelSGNd4zmhzdUnjYqUs+vwY0U2gpXAjiXvkwBolzCnxfgjcDW80ddsDn+bciQzyg8j3hIwy+4MatLY80atzld38hRStfJIQmEk6+OQJ7c.naIFEK33B+5Srn9TNdQr9sfJIRqtWOKMw3pm6pq1UBqzCzjinQIfxaRnan.zdMbkt9xj5yZ6Bg9TLRs4ZICLa4w0+E5Efw7sMe7JIPScdW535mtIY0UwKY9.fnGBJ.CgYCIZAIHS7EErGjEQuRvlAFlFFov.N8F232DLte8S30WJ+HUv9HFaQihNCSw8X7HFGH8S3AZlfSD7ImTCSIEQ9AEzzxYXaIue2yMRDPiHpTCKI2iOcyBURX.b0qgwER8bmGXitw562lO.AIlnnCPJ5slH6mBEjD+0SNQ8seCZLxic5miHBSQfQw5wKaHUNBFbGmvetH9mOzbsmKDo.LBHvb6Kj93cjjFXJRw3YzSCsXewkfrEUA9K0PEGwvvmAvCvTcUF0PNG4F7RtOiGRBPaWgwU.WwzrK.R9QE2DCVcKHyFwIpg90OtN46Hk6bkuia96iiK1bTS8SMImttWa9n.zlyZJdK4fAkbvDLmdpQT2MAubSQDiOnH+jwQvygKITojNt.n2ykkIvKOIkHmTwfujwmTGcmJUJ6bZ7JE7FdO6D3caCwpQ5Co5DIMxeoMIOvE6z9cq60M8v+89WqpXhX9yhhWP928ECFwJumNTng2v8Se03csG41p52el5xiUDHmoZS+K4C4nOOYzYfr5aVigXQ8o6T3b+cJp1HKHiZpXnf2gyzuIF32W6Mqb9D+166rKUSMsWxkg1gooZlAB16BWf8pyZ135rKnNWKhw1tStDPw5TsOMuUz9zyfHKVnoMzD525pp8+GWcwkrP8vRArsNaPQ2d2GswFabiQ5PfMXXkoEd4Vlx7V1O1IO9lkktcyM27mo1cWX9k4vDBKZ8kh0m3Tlbduf8kacGvdKf8WxsRT3nMJTjcME1aoCuaZINS+2z7cCDLMc711KsciG1qAG+4Ns1wgJDgIQT8zSZXFuJWAlTMU6cSSZSUpwUG+5+swO9uBwm4zkg0WlMFqMCLhodeJvX9PaO0oc+9PftDfK5r2G9zLgl0aEIZrP7ATrCElD4bXxndXJY.XFifi8mPY10L4kYqaZVaXfd.OLcAl4dStx0LqsyUtVgRqQz.o3iAYkRLiE93TIHl3oSD6hiliqIqYkVdA8yoYilVivIT+XPf43uBVQX19774vm0mCedwb3y2OG9rwb3yOLG97iOnOlebv1IZwnrmCnftsSq4Za2lSwLqzrPq+APj7wcd
      

      Feedback and search algorithm suggestions welcome!

      posted in Presets / Scripts / Ideas search viewport snippet
      CasmatC
      Casmat
    • RE: Mono-ize

      @Casmat did it! 188688b1-98ab-4270-b942-f46986867116-image.png

      posted in ScriptNode
      CasmatC
      Casmat
    • RE: Modulating Oscillator

      @alhug @Lindon @Matt_SF Thanks guys for your help, didn't think it was this easy haha, might need @Matt_SF to teach me how to use math nodes more

      posted in ScriptNode
      CasmatC
      Casmat
    • RE: The worlds most annoying bug

      Yeah, I've had this happen to me really sporadically, when playing the keys, sometimes one note would hold until its tapped again. For me it happened most often when mashing some chords really fast.

      posted in General Questions
      CasmatC
      Casmat
    • RE: SVG Help!

      @d-healey For anyone else with general hise svgs looking wonky, after fiddling around basically to get the svg to properly display, all the render data has to be specified in the path data for hise to correctly render it. Since the svg im using above stores many of its render properties in attributes when taking the path data, those attribute data will be lost.

      To fix this, I saved the svg data in a .svg file and opened it within inkscape. Clicked the path on the canvas and went to Path -> Stroke to Path which basically took all those attributes/what we see and generated a new path that outlines the stroke, then save as optimized svg and take the path out of that svg file and use that within hise to get:

      0772d786-b6b7-48bd-bcc1-b695c84414d8-image.png

      also had to change area to match size of svg path dimensions in inkscape. And used fillPath instead of drawPath in hise

      HiseSnippet 3608.3ocsYu1ihikdG.mZltVscmrQ6Jk88klWUiXjE2unUqRar4NFrAiASTzFiswXvXSgMWi1uq4iP9Fj7+uouT8L8NIpU1Qyr6Od34b7wmyy4.3R8PjsabbzgLO7V8q6cy7v+3iStFlrVZskeXltxYd3e5QEq3D2COcOTiq6shiccx7vCeeaF3g29lLo+y+0+RCq.qPa2OGJSFiHea2A967S9bT0222OHnkkiqt+tWkco220NJTJJH5HFOe+i4xr2xdqkm6PKl128XlG9MMc7ShNLIwJwMNyCuoQjy0IqiNGdOeC+X+kAt7E4yLAcz8vshBb3HlQyHs1OvQ8i22wYPun94Ygu+9rv+7iJ9N9eJ9mmM98ouwSetEud93gu6KGde+WL7x+5gWtWM79JCoGd0P5M2GR+gGmXeveexmeGNd9GdraHVbVYgo8WOTtmalu6c+wGkhPFgIB6r1515.dwmZwyUxk6mdB+O+3e5cuCS8wIOs+o+7SerA1Gbw8gpUx5mQB2e+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A4On.2e0rD6+J439tRMsfmjSJMNFOabxw8okFav6w7b+a7jIvEJx80cqh6qMyqlteev.DepXp06g3iBp+q3tRsvb05XdFxTKQ3c444L0rqxe0hH849EvbdzPdVTzV7ME1TvlmQYd3E34GSO6xaKVuzknijcQ7yl7rttymi9I+EdFn2R74Qa1OL87vI8P7ww7LybUw2cZysgzhVUjztoekmwdN4JbgEzlkdA0XdMoEq5CO8JOqtaQKXiMomymLA0p6lmddtWeXrEisUSB4Tq2sJeXuf7nt+L6Os0O7md2dgfHKmVGh1wGZ1ye7om8i7cvpaniTzgP2CwOm+0OHN9f1TsBcCx+pmHmmahTzt8Qg3EO+C2e6efs4NEhcSTs7CSFGcLwOz84UGCsS7iBe16Ge2+w6dK6S9T6RV6Gy9ZPjsUPCNDheN8R+VO1E2eBrOe++KVHv2ach2A2qHCjvJ+ffzmI39e5o+0749I9u0v+UH2+FR3u9ie7Z9TT3vnD2QgOmdse2e8cO8yeqUq9puGuaODED3d3q917gFe3WqgOGdb2R2C+DlCCN59oDy7va9xGO6i+se7ru9oGaeex+UIFE1MzOYzd2v+VOS4LeXECZZWtZymo6Ghg716dHwmCgGjcO4a6d+I791Gkci2lDsOM2OrLm4geSR569693y+kK0Y7cx7vu8w6K6Yt7omg96W89qe9Ap288m8cRV+o.+6wuesKWM+Tj+y8uOyu7QM+6eTIx4XfUxW9ju4i6+CuAlu+hG2Lejxgw9IWe8eNf+e6wg++0g3e3QU+D60e8w328UFiXU4uGiwO7GQ328XyUqbsS97.7MO1Z9ee9KFj49VdOEqjC9nd3wgG2MAaescwUODUIrd+guiUl2ecN9ZNCLwMzI8E+23e9valmu9gO7l4+3alYmk8gn+h88cY7OSwuMMBFSgo+EZd6iJ70OkOS5NuWOOuy2w+uXa+kc0ungE9VaXwu0FV5asgk+VaXku0FV8asg09eug7Opk3wjnc221jIihZyzisd3gl3qVFbuZMy+CXZD9FJ
      
      posted in General Questions
      CasmatC
      Casmat
    • HiseScript Questions

      Hey!

      I’m just starting with HISE and I looked around the community, videos (thanks David Healey!), and docs! I got to say, it’s a great platform and I can’t wait to learn more about it! I do have some beginner questions though. Everything in HISE seems intimidating and I can’t seem to build something functional. I felt that learning the HiseScript would be the best thing to do first. To learn HiseScript I would need to learn JS, right? I found that codecademy had a free course on JS and was wondering if that would be enough to learn what I need: https://www.codecademy.com/learn/introduction-to-javascript

      After that, should I go look at the scripting docs? What’s the best course of action and how did you guys go about learning and mastering Hise to create audio plugins. My main goal here is to complete a project. The best example would be David’s player, Rhapsody and his LibreWave plugins. I would like to create a plugin which would play all my different instruments with things such as ADSR for filters and amp and fxs like delay and reverb. If you would like, you can check out my website and the screenshots of the kontakt instruments are what I’d like my plugin instruments to be:
      https://nestacoustics.com/instruments

      Just would like an overview and some tips to how I would go about this tremendous project and how I would create this. Thanks again for reading this far! I have some development experience, but now is when I’m venturing off into the audio plugin realm!

      posted in General Questions
      CasmatC
      Casmat
    • For You: Hard Saturation in ScriptNode

      Hey!

      To express my gratitude, I'm making this post along with another soft saturation post to share my saturation! All the original dsp was based off of:

      https://www.hackaudio.com/digital-signal-processing/distortion-effects/hard-clipping/
      (Site seems to be ridden with popups and ads now so I'll put the main dsp below)

      out = thresh, when in > thresh

      out = -thresh, when in < -thresh

      out = in, otherwise

      To create the saturation, add the snex_shaper node in scriptnode to your project, press the three dots -> Create new file. Name it and then add a parameter the same way and name it something like thresh. Then open the code editor from the snex node

      Here's the fun stuff:

      template <int NumVoices> struct snex_hardsat
      {
      	SNEX_NODE(snex_hardsat);
      	
      	// Implement the Waveshaper here...
      	float thresh = 0.0f;
      	float out = 0.0f;
      	
      	float getSample(float input)
      	{
      		if(input > thresh)
      		{
      			out = thresh;
      		}
      		else if(input < thresh*-1.0f)
      		{
      			out = thresh * -1.0f;
      		}
      		else
      		{
      			out = input;
      		}
      		return out;
      	}
      	// These functions are the glue code that call the function above
      	template <typename T> void process(T& data)
      	{
      		for(auto ch: data)
      		{
      			for(auto& s: data.toChannelData(ch))
      			{
      				s = getSample(s);
      			}
      		}
      	}
      	template <typename T> void processFrame(T& data)
      	{
      		for(auto& s: data)
      			s = getSample(s);
      	}
      	void reset()
      	{
      		
      	}
      	void prepare(PrepareSpecs ps)
      	{
      		
      	}
      	
      	void setExternalData(const ExternalData& d, int index)
      	{
      	}
      	template <int P> void setParameter(double v)
      	{
      		if(P==0)
      		{
      			thresh = (float)v;
      		}
      	}
      };
      

      What I recommend is just downloading snex_hardsat.zip and then in your project folder -> DspNetworks -> CodeLibrary -> snex_shaper (create one if not there) and place the .h and .xml files in there.. they should show up in the dropdown in the snex shaper all ready to go.

      There you go! Feel free to use it however you want and enjoy!

      Note: this isn't going to give you the full saturation, just the waveshaping (hard part). You still would need to wrap the shaper node in an oversampling node as well as having filters, gain staging, xfaders, etc to make a release ready saturation, shouldn't be too hard to do however since they're all nodes in scriptnode

      Thanks!

      posted in Presets / Scripts / Ideas
      CasmatC
      Casmat
    • RE: Create Simple Saturation Effect

      @DanH Yup! It’s still hard for me to understand it completely but I can piece together the dsp better now after trying to convert existing waveshaping models out there:

      For my hard saturation I used the basic algo in this site:
      https://www.hackaudio.com/digital-signal-processing/distortion-effects/hard-clipping/

      It’s not the most detailed but it’ll get the job done.

      On the other hand my soft sat I just used musicdsp code which in my usecase sounded better than some other algorithms i found on the internet. I just ported that over to snex in the shaper node and it sounds amazing!

      Check the forum for a new post in 15-20 minutes, I'll post some goodies! 😊

      Edit: Just posted!
      https://forum.hise.audio/topic/8958/for-you-hard-saturation-in-scriptnode/1
      https://forum.hise.audio/topic/8959/for-you-soft-saturation-in-scriptnode/1

      posted in ScriptNode
      CasmatC
      Casmat
    • RE: ScriptNode Can't Compile

      @ulrik just recompiled for the fourth time and somehow works.. Thanks!

      posted in ScriptNode
      CasmatC
      Casmat
    • RE: Clone Not Working...

      I'll give you 10 HISE doubloons if you can help, promise :astonished_face:

      posted in ScriptNode
      CasmatC
      Casmat
    • RE: Phaser Gone Wrong!

      @Casmat fixed!!!

      Link Preview Image
      PHASERR!

      favicon

      (justpaste.it)

      posted in ScriptNode
      CasmatC
      Casmat
    • Create Simple Saturation Effect

      Hey!

      I was wondering how you could make a saturation effect in scriptnode, I noticed the that math operators can be used, but how do I use these operators to change the sound?

      Thanks!

      posted in ScriptNode
      CasmatC
      Casmat
    • RE: Is there a size limit for SVG to BASE64 files?

      @Mighty23 I'm just curious to what the benefit of using an svg would be here for your use case? The hollow mooon svg holds an image element inside it with png data. Hise's converter tool only supports path data (that I know of), hence why its not working.

      posted in General Questions
      CasmatC
      Casmat
    • RE: Setup BG Images or Custom Button etc theme for Inno setup

      Found this, may be of use: http://graphical-installer.com/web/

      Edit: has 30 day free trial…

      Edit: shoot I just double read your post haha

      Other than that, there’s plenty YouTube vids I saw on creating a custom ui, could be handy!

      posted in General Questions
      CasmatC
      Casmat
    • RE: Mono Sampler

      @d-healey Woohoo!! After some long fought trial and error, I got the retriggering working for when the glide time is below zero:

      /*
      The MIT License (MIT)
      
      Copyright © 2017, 2018, 2019, 2020, 2021, 2022 David Healey
      
      Permission is hereby granted, free of charge, to any person obtaining
      a copy of this file (the “Software”), to deal in the Software without
      restriction, including without limitation the rights to use, copy,
      modify, merge, publish, distribute, sublicense, and/or sell copies of
      the Software, and to permit persons to whom the Software is furnished
      to do so, subject to the following conditions:
      
      The above copyright notice and this permission notice shall be included
      in all copies or substantial portions of the Software.
      
      THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS
      OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
      FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
      THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
      LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
      OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
      */
      
      Content.setWidth(650);
      Content.setHeight(50);
      
      reg lastNote = -1;
      reg retrigger = -1;
      reg eventId;
      reg lastTuning = 0;
      reg vel;
      reg retriggerHold;
      
      //GUI
      const var bypass = Content.addButton("Bypass", 10, 10);
      
      const var time = Content.addKnob("Time", 160, 0);
      time.setRange(0, 2000, 0.01);
      function onNoteOn()
      {
      	vel = Message.getVelocity();
      	
          if (!bypass.getValue())
          {
              if (lastNote == -1)
              {
                  lastNote = Message.getNoteNumber();
                  eventId = Message.makeArtificial();
              }
              else
              {
                  if (time.getValue() > 0 && eventId != -1)
                  {
                      Message.ignoreEvent(true);                
                      Synth.addPitchFade(eventId, time.getValue(), lastTuning + Message.getNoteNumber()-lastNote, 0);                    
                      lastTuning = lastTuning + Message.getNoteNumber()-lastNote;
                  }
                  else
                  {
                      if (eventId != -1) Synth.noteOffByEventId(eventId);
                          
                      eventId = Message.makeArtificial();
                  }
                  retrigger = lastNote;
                  lastNote = Message.getNoteNumber();
              }
          }
      }
      function onNoteOff()
      {
          if (!bypass.getValue())
          {
              Message.ignoreEvent(true);
      
              if (eventId != -1 && Message.getNoteNumber() == lastNote)
              {
                if (Synth.isKeyDown(retrigger))
                {
                    if(time.getValue() == 0)
                    {
      	              Synth.noteOffByEventId(eventId);
      	              Synth.addNoteOn(1, retrigger, vel, 0);
      	              lastTuning = 0;
      	              retriggerHold = retrigger;
      	              lastNote = retrigger;
      	              retrigger = -2;
      			  }
      			  else
      			  {
      	              Synth.addPitchFade(eventId, time.getValue(), 0, 0);
      	              lastTuning = 0;
      	              lastNote = retrigger;
      	              retrigger = -1;
                    };
                }
                else
                {
                    Synth.noteOffByEventId(eventId);
                    if (retrigger == -2)
                    {
                    	Synth.addNoteOff(1, retriggerHold, 0);
                    }
                    eventId = -1; 
                }
              }
      
              if (!Synth.getNumPressedKeys())
              {
                  lastNote = -1;
                  lastTuning = 0;
              }
          }
          else if (eventId != -1 && eventId != undefined)
          {
              Synth.noteOffByEventId(eventId);
              eventId = -1;
              lastNote = -1;
              lastTuning = 0;
          }
      }
      
      function onController()
      {
      	
      }
       function onTimer()
      {
      	
      }
       function onControl(number, value)
      {
      	
      }
       
      

      I definitely feel like I overcomplicated things and is not the most efficient way haha

      If the note continues playing that makes me think you have a long release time or the sampler is in one shot mode.

      Yup, the oneshot mode was the problem, the script still is very buggy and needs work as the retrig pitch shifts an octave lower and whatnot

      posted in General Questions
      CasmatC
      Casmat
    • RE: Mono Sampler

      @d-healey aye-aye!

      posted in General Questions
      CasmatC
      Casmat
    • RE: Mono Sampler

      @d-healey just implemented it and I am shook, the script is perrrrrrfecttt for my use case and feels amazing! Man, I need your hiseing skills!

      posted in General Questions
      CasmatC
      Casmat
    • RE: Using LFO in scriptnode best practice

      @ForeverLive January February march April may June July august September October November December

      Who else sings the song while trying to recall months, or is it just me..

      posted in General Questions
      CasmatC
      Casmat
    • RE: remove HTML from JSON

      @d-healey couple weeks late, but heres it in case anyone needs it:
      https://forum.hise.audio/topic/6308/hise-regex-is-wierd-how-to-select-html-tags/7

      posted in General Questions
      CasmatC
      Casmat