HISE Logo Forum
    • Categories
    • Register
    • Login

    Recreate Bitcrusher Module in Scriptnode

    Scheduled Pinned Locked Moved General Questions
    31 Posts 7 Posters 1.9k 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.
    • B
      blezzbeats
      last edited by

      Kinda related: Is there any way to access the in-between sample rates of the bitcrusher effect with an integer or float? To get at the rates between 22-44khZ for example, and not just jump that big notch.

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

        @blezzbeats Do you mean the sample and hold module? The bitcrusher allows float bit rates.

        B 2 Replies Last reply Reply Quote 0
        • B
          blezzbeats @Christoph Hart
          last edited by

          @Christoph-Hart I mean the Degrade processor, the samplerate parameter takes big leaps first. Is there another module that has that option? Where I can decide to set the samplerate to 24504 Hz instead of 24000 Hz for example

          1 Reply Last reply Reply Quote 0
          • orangeO
            orange @Casey Kolb
            last edited by orange

            @Casey-Kolb Have you tried processing for the L - R channels individually?

            float getSampleL(float input)
            {
            	
            }
            
            float getSampleR(float input)
            {
            	
            }
            
            
            // Process the signal here
            template <typename ProcessDataType> void process(ProcessDataType& data)
            {
            	auto frame = data.toFrameData();
            	    
            	while(frame.next())
            	{
            		frame[0] = getSampleL(frame[0]);
            		frame[1] = getSampleR(frame[1]);
            	}
            }
            
            

            Also I reckon that in the above example, float getSample(float input) is used.

            With an extra "s", float getSamples(float input) is working here for both channels.

            develop Branch / XCode 13.1
            macOS Monterey / M1 Max

            1 Reply Last reply Reply Quote 1
            • B
              blezzbeats @Christoph Hart
              last edited by

              @Christoph-Hart Nevermind I misunderstood, sample and hold will do it for me! Didn't realize we were talking ScriptFX so I just learned that. Sorry for cluttering the thread .

              1 Reply Last reply Reply Quote 0
              • langermarc19L
                langermarc19
                last edited by

                @Christoph-Hart where in the codebase is polyphonic_base located? Want to look at how prepare is implemented to see if I can write breakpoints/debug output to find where this is getting reduced to mono. Thanks!

                langermarc19L 1 Reply Last reply Reply Quote 0
                • langermarc19L
                  langermarc19 @langermarc19
                  last edited by

                  @Christoph-Hart nevermind I found FXNodes_impl and I think that has what I need

                  1 Reply Last reply Reply Quote 0
                  • Casey KolbC
                    Casey Kolb
                    last edited by

                    @Christoph-Hart After a lot of debugging, we realized it's not the bitcrusher node but actually the split node that's creating issues in certain DAWs and only allowing the left channel to pass through. We're using the exact configuration of this dry/wet example, just with the bitcrusher instead of the reverb: https://docs.hise.audio/scriptnode/101/drywet.html

                    When you add a second chain the split container, it won't properly split the channels and the chain on the right will only output the left channel in certain DAWs, including Cubase and Bitwig. This only seems to happen with the node below.

                    We've tried removing everything and added every node back until the right channel broke. The instant we added a split container with another chain, one of the chains would stop outputting a right signal. This doesn't happen in standalone, and this only seems to happen with the following configuration. Any ideas for things we could try?

                    Screen Shot 2022-09-07 at 9.34.51 PM.png

                    Matt_SFM 2 Replies Last reply Reply Quote 1
                    • Matt_SFM
                      Matt_SF @Casey Kolb
                      last edited by

                      @Casey-Kolb I've created a bitcrusher here, with almost the exact same structure. I didn't face any problems (ableton, reaper) but I didn't try the plugin with Cubase or Bitwig (plugin still in development stage). I'll be able to try tomorrow and I'll report back.

                      Develop branch
                      Win10 & VS17 / Ventura & Xcode 14. 3

                      1 Reply Last reply Reply Quote 1
                      • Matt_SFM
                        Matt_SF @Casey Kolb
                        last edited by

                        @Casey-Kolb Just tested my plugin with Cubase 12 and Bitwig and didn't face any problem with the bitcrusher. The only thing I made differently from your graph is I added a saturation node, and put the bitcrush node before the sample&hold node :

                        66ae179a-6874-4bff-9ccc-20272a5854a9-image.png

                        Develop branch
                        Win10 & VS17 / Ventura & Xcode 14. 3

                        Casey KolbC 2 Replies Last reply Reply Quote 1
                        • Casey KolbC
                          Casey Kolb @Matt_SF
                          last edited by

                          @Matt_SF Thanks for sharing Matt! Something funky is going on with our project. I can't see why the split node would break only this effect for our plugin. We'll do some more digging.

                          1 Reply Last reply Reply Quote 1
                          • Casey KolbC
                            Casey Kolb @Matt_SF
                            last edited by

                            This post is deleted!
                            1 Reply Last reply Reply Quote 0
                            • Casey KolbC
                              Casey Kolb
                              last edited by Casey Kolb

                              We've confirmed this is not just specific to our project but happens with any project on both Mac and PC in certain DAWs (Cubase, Bitwig, Live) using the most recent develop branch. We've tested on many different computers with all the permutations. I'm really not sure what's going on here, but it doesn't have anything to do with the bitcrusher. It happens when using the split node in any project. In certain DAWs, the VST will only Output the left channel, regardless of the effects in the chains.

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

                              18

                              Online

                              1.7k

                              Users

                              11.9k

                              Topics

                              103.3k

                              Posts