Forum

    • Register
    • Login
    • Search
    • Categories

    Monophonic behaviour ?

    General Questions
    3
    14
    142
    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.
    • lalalandsynth
      lalalandsynth last edited by lalalandsynth

      I am making a samplemap for a monophonic synth.

      If I set it to 2 voice it seems to behave monophonically somewhat but does not seem to change a lot when set to 5 voices , still being monophonic ? Can play 2 notes when the voice amount is 6 .Bit confusing ?

      What I would like to achieve as follows.

      1. low note priority , so playing and holding C and then playing C# will not play a note , playing and holding C and then B will play a note.

      2.If I play one C note , hold it, and then a play a lower note B it will override the first , but when I let go of B it will play the held C note.

      The Legato with Retrigger gets halfway there but has no note poriority.

      Is this possible somehow in Hise ?

      https://lalalandaudio.com/

      https://lalalandsynth.com/

      https://www.facebook.com/lalalandsynth

      https://www.facebook.com/lalalandsynth

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

        Sounds like you just need a note filter.

        Something like this:

        if (noteB > noteA)
            Message.ignoreEvent(true);
        

        You'll need to handle the setting and unsetting of the two variables in the on note on and on note off callbacks.

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

        lalalandsynth 1 Reply Last reply Reply Quote 1
        • lalalandsynth
          lalalandsynth last edited by

          I see, thanks !

          https://lalalandaudio.com/

          https://lalalandsynth.com/

          https://www.facebook.com/lalalandsynth

          https://www.facebook.com/lalalandsynth

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

            @d-healey Still struggling with this , I suck at programming !

            I get that I should program it so that is note B is ignored if it is higher then note A.
            But how do I implement that ? How can I ask HISE which note is played first ? I must be missing something here ?

            https://lalalandaudio.com/

            https://lalalandsynth.com/

            https://www.facebook.com/lalalandsynth

            https://www.facebook.com/lalalandsynth

            Lindon 1 Reply Last reply Reply Quote 0
            • Lindon
              Lindon @lalalandsynth last edited by

              @lalalandsynth - us e the note on call back and record the last played note...then compare lastPlayedNote against the current note

              HISE Development for hire.
              www.channelrobot.com

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

                Store the last note that was played in a variable.

                So in onNoteOn you'd have something like this

                    if (Message.getNoteNumber() > lastNote)
                        Message.ignoreEvent(true);
                
                    lastNote = Message.getNoteNumber();
                

                You need to declare lastNote as a reg variable in your on init callback. All of this should be in a separate realtime script (not in your interface script which should be deferred).

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

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

                  @d-healey said in Monophonic behaviour ?:

                  All of this should be in a separate realtime script (not in your interface script which should be deferred).

                  So to be clear when you say separate realtime script , does that mean just an external script and I point to that in the oninit of the Midiprocessor/scriptprocessor ? What exactly does the word deferred mean ?

                  https://lalalandaudio.com/

                  https://lalalandsynth.com/

                  https://www.facebook.com/lalalandsynth

                  https://www.facebook.com/lalalandsynth

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

                    @lalalandsynth

                    does that mean just an external scrip

                    No, it means you add another MIDI processor into your project

                    ? What exactly does the word deferred mean ?

                    https://forum.hise.audio/topic/79/scripting-best-practices

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

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

                      @d-healey ok, I think I understand. In this case I am not using any knobs from the interface script to enable or disable this function. I am assuming that is what the deferred thing is for?

                      https://lalalandaudio.com/

                      https://lalalandsynth.com/

                      https://www.facebook.com/lalalandsynth

                      https://www.facebook.com/lalalandsynth

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

                        @d-healey said in Monophonic behaviour ?:

                        if (Message.getNoteNumber() > lastNote)
                        Message.ignoreEvent(true);

                        lastNote = Message.getNoteNumber();
                        

                        This will only work for the first time , that is , I play and hold one note , then a higher note and it works .
                        But If I hold the first lower note , then play the upper note twice it will play the upper note on the second play.
                        Which makes sense when its only looking at the last note , but not true low note priority .

                        https://lalalandaudio.com/

                        https://lalalandsynth.com/

                        https://www.facebook.com/lalalandsynth

                        https://www.facebook.com/lalalandsynth

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

                          @lalalandsynth You should defer your UI script anyway, unless you have a good reason not to 😄

                          But If I hold the first lower note , then play the upper note twice it will play the upper note on the second play

                          Hmm this becomes more complicated because now you need to keep track of all held notes.

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

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

                            I have an idea, let me know if it works

                                if (Message.getNoteNumber() > lastNote)
                                    Message.ignoreEvent(true);
                            
                                if (Message.getNoteNumber() < lastNote)
                                    lastNote = Message.getNoteNumber();
                            

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

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

                              @d-healey said in Monophonic behaviour ?:

                              if (Message.getNoteNumber() > lastNote)
                              Message.ignoreEvent(true);

                              if (Message.getNoteNumber() < lastNote)
                                  lastNote = Message.getNoteNumber();
                              

                              No, I get no notes like that .

                              Also the first version does not take into account whether the note is held , so if I play a lower note, let go of it , it will not play an upper note until the second time I play it. So basically if I play from C1 to C2 I have to play each note twice to hear it.

                              What it should do is ignore an upper note only if an lower note is held .

                              https://lalalandaudio.com/

                              https://lalalandsynth.com/

                              https://www.facebook.com/lalalandsynth

                              https://www.facebook.com/lalalandsynth

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

                                @lalalandsynth With my previous example try intializing lastNote to 128 (probably still won't work but worth a try).

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

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

                                15
                                Online

                                1.1k
                                Users

                                6.7k
                                Topics

                                62.1k
                                Posts