HISE Logo Forum
    • Categories
    • Register
    • Login

    Set Sampler Voice Amount (mono mode)

    Scheduled Pinned Locked Moved General Questions
    7 Posts 5 Posters 341 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.
    • LindonL
      Lindon
      last edited by

      IS there a way to set a named sampler to mono? if not could there be?

      HISE Development for hire.
      www.channelrobot.com

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

        Something like this might work

        const var Sampler1 = Synth.getChildSynth("Sampler1");
        Sampler1.setAttribute(Sampler1.VoiceLimit, 1);
        

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

        1 Reply Last reply Reply Quote 0
        • Tod SlaughterT
          Tod Slaughter
          last edited by

          Put it in a synthesizer group and use the force mono button?

          1 Reply Last reply Reply Quote 0
          • ustkU
            ustk
            last edited by

            I played with Voice Settings "Amount" and "Soft Limit" but it behaves strangely...
            Why not a simple MIDI Legato with retrigger?

            Can't help pressing F5 in the forum...

            FrankbeatF 1 Reply Last reply Reply Quote 0
            • FrankbeatF
              Frankbeat @ustk
              last edited by

              @ustk Oh… indeed, this behaved both strangely in my testing, too. I tried to switch between 1 and 4 on both VoiceAmount and VoiceLimit but it seems to just increase the Gain of my samples but not the number of voices either way. Is there nothing we can do about it?

              Using HISE from the develop branch (Feb '23)

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

                @Frankbeat Drop this script into the sampler and it should become a one voice sampler.

                 reg eventId = -99;
                 reg lastNote;function onNoteOn()
                {
                	if (eventId != -99)
                		return Message.ignoreEvent(true);
                		
                	eventId = Message.getEventId();
                	lastNote = Message.getNoteNumber();
                }
                 function onNoteOff()
                {
                	if (Message.getNoteNumber() == lastNote)
                		eventId = -99;
                }
                 function onController()
                {
                	
                }
                 function onTimer()
                {
                	
                }
                 function onControl(number, value)
                {
                	
                }
                

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

                FrankbeatF 1 Reply Last reply Reply Quote 1
                • FrankbeatF
                  Frankbeat @d.healey
                  last edited by

                  @d-healey Perfect. Thank you very much!

                  Using HISE from the develop branch (Feb '23)

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

                  59

                  Online

                  1.7k

                  Users

                  11.7k

                  Topics

                  101.8k

                  Posts