HISE Logo Forum
    • Categories
    • Register
    • Login

    c++ callback for voice stop?

    Scheduled Pinned Locked Moved C++ Development
    5 Posts 2 Posters 131 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.
    • griffinboyG
      griffinboy
      last edited by griffinboy

      I want to find out when voices have stopped (note off AND release phase has finished) in a c++ synth node.
      Is there a way to do that?

      I'm wanting to save the phase of each voice, at the moment a voice stops playing, which requires detection of voice stop.

      I'm guessing noteOff is not a reliable way to detect this, since hise envelopes may keep the voice playing during the release phase.

      griffinboyG 1 Reply Last reply Reply Quote 0
      • griffinboyG
        griffinboy @griffinboy
        last edited by

        @griffinboy

        (it's possibly not so important... for my use case I realised if I can keep track of global time, I can calculate the phase by looking at how much time has passed since the Noteoff and other factors)
        Still, it would be simpler if I could.

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

          @griffinboy can you use an envelope inside the network? then you could attach a global_cable to the CV output which will be shut off when the actual release is done.

          another option would be to just use the internal voice state of the voice: once it stops rendering it will not be incremented further, so you should be able to pick that up at any time.

          griffinboyG 1 Reply Last reply Reply Quote 0
          • griffinboyG
            griffinboy @Christoph Hart
            last edited by griffinboy

            @Christoph-Hart said in c++ callback for voice stop?:

            once it stops rendering it will not be incremented further, so you should be able to pick that up at any time.

            Where is this dealt with? Or is the burden on my code?

            I don't really understand how voices are dealt with in Hise! I've not managed to locate the scripts that manage voices.

            I guess another question I'd like to ask you then is if there is a clock I can tap into? because I don't know if Process() always runs and can be used for a clock. I have the feeling it gets optimized and doesn't always run, from behaviour that I've seen. I might be wrong. But if that's the case, it's probably what's been tripping up my efforts.

            griffinboyG 1 Reply Last reply Reply Quote 0
            • griffinboyG
              griffinboy @griffinboy
              last edited by

              @griffinboy

              edit* Rephrased into a more answerable question hopefully!

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

              27

              Online

              1.7k

              Users

              11.8k

              Topics

              102.8k

              Posts