Simple sampler block

Discussion in 'REAKTOR' started by willieraylewis, Aug 15, 2017.

  1. ANDREW221231

    ANDREW221231 NI Product Owner

    Messages:
    347
    wouldnt that just require two separate core cells one of which was monophonic and the other poly routed by a primary switch? which obviously wouldnt be considered an ideal solution but i dont know how else you could do it with one core cell without needlessly wasting resources
     
  2. aboxclaude

    aboxclaude NI Product Owner

    Messages:
    92
    Well.. For string sounds and very clean instruments polyphony is great. But it would be nice if there were a way to choose the number of voices from the front panel with a knob. 1-8 voices. This opens up clever possibilities I have exploited in Kontakt and the Reason Samplers (both of which are bloated beyond belief IMHO). For example, by selecting 3 voices, you get effects like paraphonic play, where the fourth note cuts off the third, but there is this idea that you can still play chords.. but in interesting ways. When you sequence stuff like that.. it opens up the imagination.

    As far as single voice.. While there can be clicks, this is still useful, because in the case of triggering a sampled musical loop it adds to the idea that it is a sample, and not a sequenced passage. And with a single note you can almost stutter the sample, or play it staccato while changing the pitch.
     
  3. aboxclaude

    aboxclaude NI Product Owner

    Messages:
    92
    That sounds cool! The version I edited took out the filter and its envelope. I feed it directly to a Stereo Paul filter in my ENS. For visual purposes, I made a big knob for pitch and was thinking of adding a background skin to it. My only reason for removing the filter and its ENV was that I thought people would confuse the functionality. Of course, I can leave the filter wide open and let the other filter do the work.

    It does not alter your code significantly at all, and I would def respect your wishes on not sharing it. As such, it would remain my private 'remix'. When I'm done, I could PM it to you to check out, Colin!

    Cheers,

    Claude
     
    Last edited: Aug 8, 2018
  4. aboxclaude

    aboxclaude NI Product Owner

    Messages:
    92
    I have been playing around with the edited version I made (based on yours, Colin) quite a bit. Thus far I am really enjoying the ensembles I've made with your Simple Sampler. I will pm you a .zip link soon (still making cool patches for it).

    Meanwhile, in really honing in on using this sampler, I must say that my only wish for it is a feature to control the start time of the sample via midi, the way I do the ADSR. Is there a way to add this without messing up the looping aspect?

    For the monophonic stuff, I have been using this block: https://www.native-instruments.com/en/reaktor-community/reaktor-user-library/entry/show/9155/

    ... And I love the ability to control the start/end time. On the Simpler Sampler, I love the polyphony of course! But ... being able to nudge that start time would be nice. Clue? I can experiment!

    Cheers
     
  5. colB

    colB NI Product Owner

    Messages:
    3,073
    I'll have a look at it. Right now, it uses the built in loop points. The issue with controls for start and end is avoiding glitches. If you just start a sample from an arbitrary position, you are likely to get clicks. Adding a short fade will reduce this. So will locating zero crossings. Both of these things require work and particularly searching zero crossings is not a trivial thing to add from both design and implementation perspectives.
    When I get back to the sampler block offshoot, I might add this as it would make a lot of sense. Then if its a good fit, I could stick it in to (not so) simpler sampler.
    A lot of other features are interesting me in terms of a sample player, so it might be a while before I get anything uploaded.
     
    • Like Like x 1
  6. colB

    colB NI Product Owner

    Messages:
    3,073
    I've been checking out the options for start and end points, and as I suspected, it's a right old can of worms :)

    My current version has a feature not in the current UL version: there is a selector knob that can choose between samples as an alternative to the GUI list. For this to be useful it fades between the samples as you select them (fade time is another control parameter). This works pretty well, either for a poor mans wavetable type thing fading between pads or suchlike... or for beat loop, with a short fade time, its easy to chop between different loops to add variety.
    I added start and end times, and this work better than I expected in terms of getting smooth looping. The shift+knob 'fine tuning factor feature in Reaktor combined with up and down keys to nudge the knob means it's not too tricky to get acceptable loop points.

    The problems are more to do with all the other stuff that becomes necessary:
    It's great having multiple samples, but unfortunately manual loop points only make sense for a particular sample. So there has to be some sort of system to record the knob values on a per sample basis. And of course these must save in snapshots... ouch, so that's done (roughly anyhow).

    Then there's another annoying issue:
    I enjoyed flicking between beat loops, and this works fine when all loops have exactly the same length, but due to the current implementation, if a loop with a different length is included, and selected in sequence with the others, all the timing falls apart. So a redesign is required there. However, that will likely involve other compromises.

    And there's more:
    Start and end points are all very well, but there are different ways to use them.
    #1 Start at the start point and end at the end point - or loop back to the start point if loop is on
    #2 Start at the beginning of the sample and when end is reached, loop to the start point (assuming loop is on)
    #3 Start at the beginning of the sample and when end is reached, loop to the start point, until the gate is released then continue to the end of the sample

    So really, for a fully featured unit, there need to be at least start, end, loop_start and loop_end and a mode selector. And its all starting to get very complicated.

    At the moment, I have implemented #1 (although with start on minimum, it will revert to embedded start point and similar for end point), and if I can find a way to get around the synching problems that I'm happy with, I'll upload it. But I really think it would make more sense to have different machines for different purposes rather then trying to do it all with one unit. Particularly as the Table Framework stuff requires quite a lot of Primary level coding which is horrible - just extremely unpleasant. Every feature you try to add just makes the whole thing more and more messy and 'read only'.
    Debug Much.PNG
     
    • Like Like x 1
    • Informative Informative x 1
  7. colB

    colB NI Product Owner

    Messages:
    3,073
    More thoughts on possible features.

    So my current WIP has a selector that choses a specific sample from the list, and fades between the current one and the new selection. Useful for various applications. e.g. for drum loops, you can fade (very fast fade possible) between any sample and any other sample without trapesing though the intervening samples. Call this type #1
    But There's another approach that I think would be really good but for different applications. That is a continuous control That can be left half way between two samples. This would be cool along with manual start and end points, using a multi-stage envelope to control the selector and creating sounds where the attack is from one sample, and the sustain part from another... Or just for setting up a sequence of sounds and morphing between them with fine control over the morph position and speed... this is type #2

    First thought is to try an have a mode switch and have best of both worlds, but then thinking about the supporting widgets and code that each type requires that don't make sense for the other, it seems like they are mutually exclusive - at least from a good design point of view

    Does anyone else have experience using these kind of features and have anything to add? or ideas about additional features or use cases?
     
  8. colB

    colB NI Product Owner

    Messages:
    3,073
    I uploaded an updated version to the UL.
    It has a selector knob with cross fading, and manually editable loop points.
    simplish sampler.PNG
     
    • Like Like x 2
  9. tenandtracer

    tenandtracer NI Product Owner

    Messages:
    163
    Another phenomenal piece of work, colB! I'm always so inspired by your thoughtful/thorough development.

    As an aside, I recently going through my many years of forum downloads and was reminded of MvKeinen's absolutely mind-boggling developments - one of which is well pertinent here. The Zero-Detect Sampler prototype that he developed is among the best loop-point/zero-detect implementations that I know of (at least in its day). Perhaps you'll find some solutions to these issues that meet your criteria.

    In any case, thank you for posting this wonderful, useful tool!
     

    Attached Files:

  10. colB

    colB NI Product Owner

    Messages:
    3,073
    Thanks.

    Zero detection is something I don't fully buy into. It helps, but it's not ideal.

    The basic problem it tries to solve is that when looping back to a different part of the waveform, you get discontinuities that cause clicks and glitches.
    The idea of zero detection is that if you find a two places in the sample - one near the loop start and one near the loop end - where the signal crosses zero (in the same direction), then you can splice these together and you wont get a glitch. This sounds like great solution, but in reality it's more complicated.
    The main issue is that the signal rarely actually hits zero - the actual crossing is between samples, and sample values after a zero crossing can vary a lot, one could be near zero, and another could be much higher. Depending on the angle/steepness of the two signals, you can still get a glitch or click. Sure it will usually be quieter than without zero detection, but it's not a fix, and it's a lot of work to implement for something that doesn't really work as well as you would like.

    I think a better approach (that I haven't done here) is to have very sensitive manual fine-tune controls, and do it by ear. This is easy to implement and relies on actual perception of the user - when it's good enough, its good enough. This requires better more complex GUI design. The problem for simpler sampler is that it just has a knob for each loop point, So with a very short sample, the knob can get precise enough to find a really good loop point, but with e.g. a longer beat loop, it loses precision. I guess maybe some fancy trickery to improve the controls for finding loop points might help...

    For an auto system, rather than zero detection, it would be better to search near the selected loop points for matching slopes and matching values, these might be at zero crossings, but they might not. The problem is that it's a more difficult search, if done in a brute force manner, instead of just searching/comparing zero crossings, you're searching/comparing every samples value and trajectory with every one in the other loop points vicinity... maybe an improvement over brute force would I be cross-correlation within a limited range. Anyway, this approach is closer to what we do manually by ear with fine tune controls.

    There's also short cross-fading, or a combination of cross-fading and zero crossing detection...

    And there's an another idea I have that _might_ work as an improvement on basic zero crossing detection, but haven't fully explored yet so... ;)
     
  11. aboxclaude

    aboxclaude NI Product Owner

    Messages:
    92
    I'm off to a rehearsal then a gig for the weekend but will mess with this new version when I get back. It looks brilliant. I like the idea of selecting the samples via a knob. And having an editable start/end time? Great! Does this mean that embedded loop points are used until you mess with the start/end time?
     
  12. aboxclaude

    aboxclaude NI Product Owner

    Messages:
    92
    Your work is VERY appreciated Colin. If you have a paypal, please post the link. I will glady buy you a few beers!
     
  13. colB

    colB NI Product Owner

    Messages:
    3,073
    The way it *should* work is if the manual start is at zero it will use embedded if available, and if the end knob is at max, it will use embedded end when available. This is not exhaustively tested though, so if there's anything that seems odd or doesn't work like it should, post a report and I'll have a look at it.
     
    Last edited: Aug 29, 2018
  14. colB

    colB NI Product Owner

    Messages:
    3,073
    Hey that would be great thanks :)

    paypal.me/colB123
     
  15. aboxclaude

    aboxclaude NI Product Owner

    Messages:
    92
  16. colB

    colB NI Product Owner

    Messages:
    3,073
    cheers:)
     
  17. aboxclaude

    aboxclaude NI Product Owner

    Messages:
    92
    Hi Colin! I was playing with the new version quite a bit today. Noticed that the amplifier envelope's "Release" is not working. I tried everything, but R does nothing. :(
     
  18. colB

    colB NI Product Owner

    Messages:
    3,073
    Thanks for the report.
    I broke this while updating some other features. It's fixed now - new update in the UL. The manual loop points were also broken - now fixed. The new version also has a 'per sample' pitch control.
     
    • Like Like x 2
  19. aboxclaude

    aboxclaude NI Product Owner

    Messages:
    92
    I just tried it and it is a really beautiful instrument... but something else may have happened (as it always does when we tinker with stuff). Unless you meant this to happen, stereo samples are no longer in stereo. Going to keep messing to see if I spot anything. Love this thing, man.
     
    • Informative Informative x 1
  20. colB

    colB NI Product Owner

    Messages:
    3,073
    Thanks for the report. It was a silly copy/paste error - so an easy fix :)
    New version is uploaded to UL
     
    • Like Like x 2