Forum
    • Categories
    • Register
    • Login

    Devlog #2 - Smart Pedal & Key Release Mechanics

    Scheduled Pinned Locked Moved Newbie League
    3 Posts 2 Posters 20 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.
    • O
      omerdal
      last edited by

      Hey everyone!

      Time for another update on my Grand Piano VST project. After getting the core samples mapped, I realized the piano felt a bit too clinical. It was time to get my hands dirty with the mechanical noises and body resonances that make a virtual instrument truly breathe.

      Demo VIDEO

      a971e6a3-d647-4ef7-bedb-ac27e0d4ec21-image.png

      1. Note Off Mechanic: 5 RR - 2 VELOCITY

      -I created a separate sampler for pure mechanical Key Up (wood/felt) sounds. Since many MIDI keyboards send a Note On with a velocity of 0 instead of a true Note Off, I scripted a memory array (const var onVels = [];) to store the strike velocity.

      -Inside the onNoteOff, the script recalls the exact velocity of the initial strike and triggers the Note Off sample accordingly. This ensures the mechanical clack dynamically matches the intensity of the performance.

      • I set a natural AHDSR fade-out (500ms) for the main piano samples upon Note-Off. Simultaneously, a dedicated mechanical sampler set to One-Shot triggers the pure wood/felt release sounds.
      1. Building a 3-Pedal Engine (CC 64, 66, 67) - 5 RR

      I didn't want to stop at just the Sustain pedal. I wanted Sostenuto and Una Corda to physically behave differently.

      -Sustain (CC 64): Triggers the massive resonance and damper lift noise, followed by a heavy "thump" upon release.

      -Soft / Sostenuto (CC 67, 66): These pedals don't lift all the dampers. For these, I mapped dry mechanical action samples to dummy keys.

      1. Integrating the Sympathetic Resonance Engine

      To simulate the true sympathetic string resonance, I built an algorithmic engine rather than relying on heavy samples. When you hold a chord and strike a new note, the undamped strings should naturally vibrate. To replicate this massive web of possibilities, the engine generates pure Sine Waves tuned to the appropriate harmonic frequencies of the active notes. I then run these sine waves through custom saturation and EQ to turn them from digital beeps into warm, vibrating steel strings but it feels like WUU sound xd. It perfectly masks the fadeouts and makes the instrument feel incredibly alive

      f9a452b3-efe5-4bf6-ada2-aac680d1ef79-image.png

      2afc0eb0-a4e1-402e-ac5f-dd733bd99600-image.png

      Triggers: If the new note has a harmonic relationship with any of the un-damped strings (specifically the 1st Octave, 5th, 2nd Octave, and Major 3rd defined in the Triggers array), it excites a targeted sine wave at that exact frequency.

      1. UI & Acoustic Masking

      Added Key Noise and Pedal Noise knobs to the UI. The biggest mixing challenge was finding the default dB values. I applied the Acoustic Masking rule: when you play a pianissimo chord, you should clearly hear the mechanics. When you smash a fortissimo chord, the string resonance should completely swallow the mechanical clicks. I locked these sweet spots in as the defaultValue properties in the UI.

      The piano is finally starting to feel like a massive, 500kg wooden beast living inside the DAW.

      O David HealeyD 2 Replies Last reply Reply Quote 2
      • O
        omerdal @omerdal
        last edited by

        I'll keep the future updates in my main topic to keep things organized. I accidentally created a new topic 😥

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

          You've been busy :)

          @omerdal said in Devlog #2 - Smart Pedal & Key Release Mechanics:

          (const var onVels = [];)

          You can use a MIDI list here.

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

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

          26

          Online

          2.3k

          Users

          13.6k

          Topics

          118.6k

          Posts