diff --git a/rnsutils/instrument.py b/rnsutils/instrument.py index 820145f..a350ef6 100644 --- a/rnsutils/instrument.py +++ b/rnsutils/instrument.py @@ -95,6 +95,7 @@ class RenoiseModulationSet(ObjectifiedElement): class RenoiseInstrument(object): OVERLAP_CYCLE = "Cycle" OVERLAP_ALL = "Play All" + OVERLAP_RANDOM = "Random" LOOP_NONE = "Off" LOOP_FORWARD = "Forward" diff --git a/rnsutils/sfztoxrni.py b/rnsutils/sfztoxrni.py index cab9a74..b5b0206 100644 --- a/rnsutils/sfztoxrni.py +++ b/rnsutils/sfztoxrni.py @@ -257,6 +257,14 @@ class SfzToXrni(object): renoise_instrument.root.SampleGenerator.KeyzoneOverlappingMode = RenoiseInstrument.OVERLAP_CYCLE elif key == 'seq_length': pass + elif key == 'lorand': + if float(value) > 0: + logging.info("Switch the entire instrument to random sample round robin") + renoise_instrument.root.SampleGenerator.KeyzoneOverlappingMode = RenoiseInstrument.OVERLAP_RANDOM + elif key == 'hirand': + if float(value) < 1: + logging.info("Switch the entire instrument to random sample round robin") + renoise_instrument.root.SampleGenerator.KeyzoneOverlappingMode = RenoiseInstrument.OVERLAP_RANDOM elif key == 'group': logging.info("Ignoring mute group info") elif key == 'off_by':