Plugin Grabber - Intelligent grabbing of samples

Hi guys, I have a humble feature request. But before I explain the solution, first let me explain the problem…


When you use the Plugin Grabber with a sample-based instrument, you normally have to take a wild guess about the note range and step, the velocity range and step, and the loop point.

This causes several problems:

  1. You could well grab less samples than the VSTi contains, making your new instrument inferior.
  2. The alternative is you grab more samples than the VSTi contains, making your new instrument an unnecessarily large file.
  3. Plus, if you’ve grabbed more samples that the VSTi contains, you’re sampling samples that have already been pitch-shifted, which adds to the loss of quality
  4. Even if you think you know what the step is between samples, some VSTis don’t always follow a uniform step pattern, for example, having a smaller step in the middle and a larger step at the far ends
  5. You have similar problems with loop points - you’re either going to sample more than you need, or not enough.
  6. Plus your new loops will never sound as good as the original, since they’ll either cut the sample too short, or you’ll be looping within an existing loop. What a mess!
  7. Also, many VSTis feature ‘round robin’ samples - multiple samples for the exact same note - this is completely lost by the Plugin Grabber :frowning:


Each section of the Plugin Grabber’s settings (Note Range, Velocity Range, and Sampling Options) should feature an Intelligently grab samples checkbox.

When toggled, this will:

• Automatically detect the note range and step
• Automatically detect the velocity range and step
• Automatically detect the loop point
• Automatically detect round robins (a Round Robin section should be added)

This will give you a PERFECT 1:1 grab of all the samples contained in the VSTi - no more, no fewer!

How it works:
This may be fairly obvious, but here’s how I would do it…

  1. To find the loop point:
    • After a sample is grabbed, you go through the waveform in steps of (say) 1 second. At each point, you take a small portion of a few amplitudes and look back through the waveform to find a matching portion. If it matches then the comparison is taken back further until they stop matching, which is the loop start and end.

  2. To determine round robin:
    • Middle C is grabbed 10 times and the waveforms compared. Any duplicates are discarded, but the unique waveforms are retained. This also tells us how many round robins there are, so future notes will only be repeated until this number has been met.

  3. To determine note range/step
    • Having grabbed middle C, you then grab the next semitone up and shift its pitch down to match the original note
    • The new note’s waveform is compared with the original note’s waveform (or waveforms, if round robin is used)
    • It is noted whether the samples are duplicates, or both unique, and the process continues upwards, with the next note up being compared.
    • Each time a ‘block’ of duplicates is found, only the middle sample will be retained as this is most likely to be the true sample, all the other samples in the ‘block’ are deleted.
    • When no unique samples have been found for a whole octave, the upwards search ends
    • We assume the position of the final true sample to be the same distance into its ‘block’ as the previous true sample is into its block.
    • Having completed the upwards search, the same process is carried out downwards from middle C to find the lower notes
    • We now have a map of notes where all the true samples lie. From this point onwards, only those notes will be looked at.

  4. To determine velocity:
    • After all the above has been carried out (using full velocity), then we go to the most central of the notes containing true samples and begin playing the note in decreasing velocity.
    • The new sample’s waveform is compared with the previous waveform (or waveforms, for round robin). This is done by first adjusting its gain so that the amplitudes at a certain point match.
    • As before, it is noted whether the two are duplicates, or unique waveforms.
    • As before, the comparison process continues, decreasing in velocity.
    • When a block of duplicate samples, are found, the loudest is used for that block and the rest discarded.

What do you think of the idea?