HISE Logo Forum
    • Categories
    • Register
    • Login

    Is there already a way to get sample properties by mapping?

    Scheduled Pinned Locked Moved Scripting
    1 Posts 1 Posters 74 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.
    • SimonS
      Simon
      last edited by

      The isNoteNumberMapped() function is a bit unique, as it operates on the sample map level which is generally more "ground truth" than getting samples via the createSelection() type functions.

      For example, in a legato script, I want to be able to adjust the SampleStart and SampleEnd of each legato sample, and automatically have my script play the sample for just that amount of time before fading in to the sustain, leaving some buffer for the envelope to release of course. I want to get the sample length when the sample is played, without worrying about how things are mapped, so I added a function that accepts rrGroup, velocity, and note, and returns the SampleEnd, which works great.

      However, when I tried to expand this to a getSamplePropertyByMapping() function that accepts any Sample parameter, calling it crashes HISE.

      I ran into some issues building HISE debug, so in the interest of (my) time I come to you asking if anyone wants to glance at my newbish modification for anything obviously wrong: https://github.com/davidhealey/HISE/compare/development...minosimo:HISE:development

      Otherwise, I can just add separate functions for each parameter I need to get and call it a day.

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

      20

      Online

      1.8k

      Users

      12.0k

      Topics

      104.8k

      Posts