Forum
    • Categories
    • Register
    • Login

    suck notes with keyassigner script in silent synth

    Scheduled Pinned Locked Moved Scripting
    25 Posts 2 Posters 508 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.
    • David HealeyD
      David Healey @Morphoice
      last edited by

      @Morphoice Oh hang on, my current build doesn't include FAUST 🤦 I can't rebuild at the moment because I'm in the middle of something, but I think you've nailed down that it's a faust side issue.

      Free HISE Bootcamp Full Course for beginners.
      YouTube Channel - Public HISE tutorials
      My Patreon - HISE tutorials

      MorphoiceM 1 Reply Last reply Reply Quote 0
      • MorphoiceM
        Morphoice @David Healey
        last edited by

        @David-Healey oh yes, the pleasures of building with faust and ending up without faust .... ;)))

        im very strongly convinced the issues is within how hise implements faust as explained in the post before, not the faust dsp itself. then again that would only explains the issue that notes are not sustained even though the pedal is pressed...

        the other problems are the orphan notes that might still be a problem of the keyassigner... some never get released when the pedal is released.... could be some sort of orphans from a tretrigger of the same note...

        my forte is coding dsp, all that stuff around that makes the world tick -- no clue

        https://instagram.com/morphoice - 80s inspired Synthwave Music, Arcade & Gameboy homebrew!

        David HealeyD 1 Reply Last reply Reply Quote 0
        • David HealeyD
          David Healey @Morphoice
          last edited by

          @Morphoice Tell me what the key assigners role is.

          Free HISE Bootcamp Full Course for beginners.
          YouTube Channel - Public HISE tutorials
          My Patreon - HISE tutorials

          MorphoiceM 1 Reply Last reply Reply Quote 0
          • MorphoiceM
            Morphoice @David Healey
            last edited by

            @David-Healey handle polyphonic aftertouch and pitchbend by sending their values to a knob in the faust (not present in the snippet example)

            https://instagram.com/morphoice - 80s inspired Synthwave Music, Arcade & Gameboy homebrew!

            David HealeyD 1 Reply Last reply Reply Quote 0
            • David HealeyD
              David Healey @Morphoice
              last edited by

              @Morphoice Does that need to be scripted? Isn't there a way directly in scriptnode to get those values and forward them to the faust node?

              Free HISE Bootcamp Full Course for beginners.
              YouTube Channel - Public HISE tutorials
              My Patreon - HISE tutorials

              MorphoiceM 3 Replies Last reply Reply Quote 0
              • MorphoiceM
                Morphoice @David Healey
                last edited by

                @David-Healey nope, we had this discussion here a long time ago and this was the only working way

                https://instagram.com/morphoice - 80s inspired Synthwave Music, Arcade & Gameboy homebrew!

                1 Reply Last reply Reply Quote 0
                • MorphoiceM
                  Morphoice @David Healey
                  last edited by

                  @David-Healey i believe it was this thread
                  https://forum.hise.audio/topic/11793/polyphonic-aftertouch/34?_=1778856642370

                  https://instagram.com/morphoice - 80s inspired Synthwave Music, Arcade & Gameboy homebrew!

                  1 Reply Last reply Reply Quote 1
                  • MorphoiceM
                    Morphoice @David Healey
                    last edited by

                    @David-Healey there's also another bug in the hise/faust midi implementation.... if a key is held and the pedal released, the note stops. although the key is still held.... weird.

                    https://instagram.com/morphoice - 80s inspired Synthwave Music, Arcade & Gameboy homebrew!

                    David HealeyD 1 Reply Last reply Reply Quote 0
                    • David HealeyD
                      David Healey @Morphoice
                      last edited by

                      @Morphoice Does this happen if you swap your faust synth for a waveform gen, keeping everything else the same?

                      Free HISE Bootcamp Full Course for beginners.
                      YouTube Channel - Public HISE tutorials
                      My Patreon - HISE tutorials

                      MorphoiceM 3 Replies Last reply Reply Quote 0
                      • MorphoiceM
                        Morphoice @David Healey
                        last edited by

                        @David-Healey there is no waveform generator in a silent synth

                        https://instagram.com/morphoice - 80s inspired Synthwave Music, Arcade & Gameboy homebrew!

                        1 Reply Last reply Reply Quote 0
                        • MorphoiceM
                          Morphoice @David Healey
                          last edited by

                          @David-Healey i think i isolated the problem and filed an issue, it's in fact three problems
                          https://github.com/christophhart/HISE/issues/954

                          https://instagram.com/morphoice - 80s inspired Synthwave Music, Arcade & Gameboy homebrew!

                          1 Reply Last reply Reply Quote 1
                          • MorphoiceM
                            Morphoice @David Healey
                            last edited by

                            @David-Healey in the mean time i found a workaround to override the faust bug by handling the sustain logic in the keyassigner. this however breaks if more than 128 notes are played until the last pedal release. but i guess i could just reserve more slots

                            const globalRouting = Engine.getGlobalRoutingManager();
                            reg midiList = Engine.createMidiList();
                            reg pedalDown = false;
                            reg pendingReleases = [];
                            pendingReleases.reserve(128);
                            
                            inline function setPolyAfterTouch(eventId, slotIndex, value)
                            {
                            	globalRouting.setEventData(eventId, slotIndex, value);
                            }
                            
                            function onNoteOn()
                            {
                            	// Make the event artificial so Synth.noteOffByEventId can release it later.
                            	// The HISE API only accepts artificial event ids (see ScriptingApi.cpp:5499-5510).
                            	midiList.setValue(Message.getNoteNumber(), Message.makeArtificial());
                            }
                            
                            function onNoteOff()
                            {
                            	local n = Message.getNoteNumber();
                            	local id = midiList.getValue(n);
                            
                            	if (pedalDown)
                            	{
                            		// Defer: keep the voice alive until pedal release.
                            		pendingReleases.push(id);
                            		Message.ignoreEvent(true);
                            	}
                            	else
                            	{
                            		// Release the artificial voice. Let the real noteOff propagate too so
                            		// the synth can match older retriggered voices by note number.
                            		Synth.noteOffByEventId(id);
                            	}
                            }
                            
                            function onController()
                            {
                            
                            	if (Message.getControllerNumber() == 64)
                            	{
                            		if (Message.getControllerValue() >= 64)
                            		{
                            			pedalDown = true;
                            		}
                            		else
                            		{
                            			pedalDown = false;
                            			for (id in pendingReleases)
                            				Synth.noteOffByEventId(id);
                            			pendingReleases.clear();
                            		}
                            		Message.ignoreEvent(true);
                            	}
                            
                            }
                             function onTimer()
                            {
                            	
                            }
                             function onControl(number, value)
                            {
                            	
                            }
                             
                            

                            https://instagram.com/morphoice - 80s inspired Synthwave Music, Arcade & Gameboy homebrew!

                            David HealeyD 1 Reply Last reply Reply Quote 0
                            • David HealeyD
                              David Healey @Morphoice
                              last edited by

                              @Morphoice said in suck notes with keyassigner script in silent synth:

                              if more than 128 notes are played until the last pedal release.

                              Can't you kill previous voices if the same note is played more than once?

                              Free HISE Bootcamp Full Course for beginners.
                              YouTube Channel - Public HISE tutorials
                              My Patreon - HISE tutorials

                              MorphoiceM 1 Reply Last reply Reply Quote 0
                              • MorphoiceM
                                Morphoice @David Healey
                                last edited by

                                @David-Healey no they need to ring out. i will probably limit it around 16 voice cards or something like a real synth would have

                                https://instagram.com/morphoice - 80s inspired Synthwave Music, Arcade & Gameboy homebrew!

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

                                6

                                Online

                                2.4k

                                Users

                                13.8k

                                Topics

                                119.5k

                                Posts