This forum is now locked and moved (back) to Plogue's forum
Is the end point the last sample to be played or is it the next one?
  • The defintion of the end opcode (and also loop_end) seems a bit unclear to me. The specs says something in the line of "the sample should play to the end position". But is it upto and including the end sample or just upto? If the sample sequence is 1000 long, is the end opcode 999 or is it 1000?

    The range value given for the end opcode of 0..4GB (4294967296) also seems a bit strange, while it implicates a range of 4GB +1 if the end sample were supposed to play. It makes more sense to me if the range is 0..4294967295, meaning the last valid value for end would be 4GB-1.

    So, is end the last sample to be be played or is it end-1 that is the last?

  • In RenĂ©'s spec, everything is a bit loose - that was his approach.  The range for end also included -1 which meant "don't even start playing" (i.e. a region with end=-1 would never play the sample - other processing could happen, though).  So start=0 end=0 means play only one sample (not no samples).

    In a word: "inclusive".
  • davidvdavidv
    Posts: 453

    Inclusive indeed.  There's been lots of debate on how its interpreted from SFZs to WAV files (with smpl chunks)

    The official WAV format's smpl extension has been added to the WAV format in  11/09/93 
    by Digidesign, Sonic Foundry and Turtle Beach, but it omits telling if dwEnd is inclusive or exclusive.

    When stuff like that happens we have to live with what "people did before" and it seems making the endpoint inclusive makes much less clicks than if you make it exclusive. This is really empirical from my experience. I dont know which editor started what.  IIRC (its been a while) sfz.dll, dimension, Kontakt and ARIA all interpret the end as inclusive. If we ever do a better documention for SFZ this will be in bold letters. Not only that, but with a concrete example.

  • Well, if you call it the last sample then I'd say the only reasonable interpretation would be that it is the last sample to be played indeed. End sample, hmm, sounds a bit more loose, but I'd interpret that too as the last sample being played. End-point or loop-point is too vague, I would never use them. Strangely enough, some samples I've tested sounds better if you loop them one additional sample that is lastsample +1. But that's probably due to poor loop-point definitions or poor samplerate conversion.

    Thanks for your answer anyway.
  • davidvdavidv
    Posts: 453
    yes, there are cases where a nudge in either side does improve loops.
  • kinwiekinwie
    Posts: 61
    hi DV,

    just want to make sure of this.
    the loop_end point is inclusive.
    but the end= is exclusive, am i correct?
    i check it from the sforzando's sf2 auto-conversion.
  • Given both loop_start and loop_end start at 0, that would mean a single sample loop starting at the start of the file would need loop_start equal to loop_end equal to zero, meaning loop_start and loop_end must be inclusive.

    As stated above, end is also inclusive.
  • kinwiekinwie
    Posts: 61
    so there are mistakes in my sfz files, but hope that different of 1 sample won't harm the sound :)

    thanks, jones
  • davidvdavidv
    Posts: 453

    Current ARIA ends the layer if the playhead is greater or equal than end=

    In any case I would add a few zero sample padding at the end of each file for interpolation and general click safety, it doesn't need much memory...

  • 1 sample to much might or might not hurt you sound depending on the sample file(s). And your looping points of course.

    If you read a sampe to much and like in sforzando all samples are concatenated to big mammut file, you don't know what's coming next. If your last read loop sample is at max level, then you'll most probably hear a click if you wrongfully read the next sample as the first sample from another instrument (which will probably be very near zero).

    And if even if you read 1 sample to little you might get a click if it's to far away from the first loop sample. And if you resample (as you most probably do if you don't have one sample file / note) the audibility of the artifacts introduced will vary depending on the note played. Some notes might not be affected at all, while some others will be overlaid with a smattering sound.

    I know this from my own experience  :)
  • kinwiekinwie
    Posts: 61
    hello klodvig,

    i was following sforzando auto-conversion's end-point which i thought was exclusive. i only use several 'end=' in that Fluid SFZ for some one_shot regions but it seems they just okay, maybe 1 sample more but still at the zero-crossing.

    and luckily, all the loop_start/end that i made in that fluid sfz are just correct, which i adjust several bad loops in the original files.
  • davidvdavidv
    Posts: 453

    Just a precision:

    "If you read a sampe to much and like in sforzando all samples are concatenated to big mammut file"

    This is just the way my SF2 -> SFZ converter works, since an .sf2 file has a big audio chunk like this, and it was easy to just dump that part as wav, and not have to create a truckload of wav files. 

    (helps with memory and cache efficiency also)

  • kinwiekinwie
    Posts: 61
    so i see that's the advantage of your converter works,
    yeah i like it better than having thousand of sf2 samples.
    but since i've got so many free sf2 converted in old traditional way and in sfz v1, i just update them to match sforzando sound engine.
    could be a wasted time to re-convert them :)

    talk about sf2, in the past there are tons of downloadable sf2 on the net, but a lot of them are not good programmed/error/bad loops etc. but some are quite good and useful to nowaday, e.g. for quick choosing sound when making a demo or guide tracks.

    and most of the so called GM sf2 are just ripped samples from one to another :))
    very few build with authentic samples, one example that i'm sure is fluid gm (although some samples maybe belongs to Ethan Winer)

    now we are out of this thread's topic, lol
  • Having one big file makes it difficult to replace an instrument. Or part of.
    What's an authentic sample?
    Do you know of a sample with aftertouch implemented in some way?

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!