HISE Logo Forum
    • Categories
    • Register
    • Login

    set VoiceLimit of sine Wave Generator

    Scheduled Pinned Locked Moved Scripting
    23 Posts 4 Posters 226 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.
    • ChazroxC
      Chazrox @rglides
      last edited by

      @rglides lol.

      I think Voice Limit does falls into the category of one of those features that cause zipping if you adjust in real time.

      rglidesR 1 Reply Last reply Reply Quote 0
      • ChazroxC
        Chazrox @rglides
        last edited by

        @rglides oh SWEET! so its not what I said. Thats great news. haha.

        1 Reply Last reply Reply Quote 0
        • rglidesR
          rglides @Chazrox
          last edited by rglides

          @Chazrox that could be true, I know setting to 1 probably isn't a good idea too. But no, I was getting some really strange sounds cos of the max saturation for sure - EDIT changing in real-time sounds fine actually, very smooth

          ChazroxC 2 Replies Last reply Reply Quote 1
          • ChazroxC
            Chazrox @rglides
            last edited by

            @rglides I was just playing with it and it doesnt have a problem with zero even so I really dont know. hahaha

            rglidesR 1 Reply Last reply Reply Quote 0
            • ChazroxC
              Chazrox @rglides
              last edited by

              @rglides shiiid. You're all good then!

              1 Reply Last reply Reply Quote 0
              • rglidesR
                rglides @Chazrox
                last edited by rglides

                @Chazrox oh interesting, yeah I would have thought that'd be some kind of mute hack but nope

                1 Reply Last reply Reply Quote 0
                • d.healeyD
                  d.healey @Chazrox
                  last edited by

                  @Chazrox said in set VoiceLimit of sine Wave Generator:

                  Voice Limit" is paramter [2]

                  Avoid the magic number, use the parameter name instead OSC1.VoiceLimit

                  Libre Wave - Freedom respecting instruments and effects
                  My Patreon - HISE tutorials
                  YouTube Channel - Public HISE tutorials

                  ChazroxC 1 Reply Last reply Reply Quote 1
                  • ChazroxC
                    Chazrox @d.healey
                    last edited by Chazrox

                    @d-healey ah, are these the proverbial "magic numbers" I hear about? It worked either way, I just chose the short version obviously thinking it was better. Thank You!

                    d.healeyD 1 Reply Last reply Reply Quote 0
                    • d.healeyD
                      d.healey @Chazrox
                      last edited by

                      @Chazrox Yeah a magic number means you're using the value of a constant instead of the constant itself. So to anyone else looking at your code - or you in the future when you've forgotten what your code does - they just see a number that magically does something but have no idea what it refers to.

                      Libre Wave - Freedom respecting instruments and effects
                      My Patreon - HISE tutorials
                      YouTube Channel - Public HISE tutorials

                      ChazroxC dannytaurusD 2 Replies Last reply Reply Quote 1
                      • ChazroxC
                        Chazrox @d.healey
                        last edited by

                        @d-healey That makes sense. Now I know wth that means. haha Ty. 🙏 Hope all is blessed!

                        1 Reply Last reply Reply Quote 0
                        • rglidesR
                          rglides
                          last edited by rglides

                          Yeah it's true, I did update to this

                          inline function onknb_OSC1_VoiceLimitControl(component, value)
                          {
                          		OSC1.setAttribute(OSC1.VoiceLimit, value);
                          };
                          Content.getComponent("knb_OSC1_VoiceLimit").setControlCallback(onknb_OSC1_VoiceLimitControl);
                          

                          but it was very helpful to discover that the function was always working, just not updating in real-time in module window, so the help was massive 🙏 edit: 'update' I mean revert hehe

                          1 Reply Last reply Reply Quote 1
                          • dannytaurusD
                            dannytaurus @d.healey
                            last edited by

                            @d-healey It would be even better if instead of this:

                            OSC1.setAttribute(OSC1.VoiceLimit, value);
                            

                            we could do this:

                            OSC1.VoiceLimit = value;
                            

                            but I'm guessing that's too dynamic (or something) for C++?

                            Meat Beats: https://meatbeats.com
                            Klippr Video: https://klippr.video

                            d.healeyD 1 Reply Last reply Reply Quote 0
                            • d.healeyD
                              d.healey @dannytaurus
                              last edited by

                              @dannytaurus OSC1.VoiceLimit is a constant with a value of 2. So what you're suggesting wouldn't work.

                              Libre Wave - Freedom respecting instruments and effects
                              My Patreon - HISE tutorials
                              YouTube Channel - Public HISE tutorials

                              dannytaurusD 1 Reply Last reply Reply Quote 1
                              • dannytaurusD
                                dannytaurus @d.healey
                                last edited by

                                @d-healey Yeah, it's quite different to what I'm used to in Ruby and Rails.

                                Meat Beats: https://meatbeats.com
                                Klippr Video: https://klippr.video

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

                                21

                                Online

                                1.8k

                                Users

                                12.0k

                                Topics

                                104.8k

                                Posts