From ca4a5fbb114ef59d7629b853142d9124e053cf9c Mon Sep 17 00:00:00 2001 From: mahal raskin Date: Thu, 28 Dec 2023 17:16:30 +0100 Subject: [PATCH 1/2] Reading of SFZ improved so it follows more the standard: loop_mode=no_loop will no longer loop the sample --- Sources/DunneAudioKit/Sampler+SFZ.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/DunneAudioKit/Sampler+SFZ.swift b/Sources/DunneAudioKit/Sampler+SFZ.swift index 391965d..d8f531b 100644 --- a/Sources/DunneAudioKit/Sampler+SFZ.swift +++ b/Sources/DunneAudioKit/Sampler+SFZ.swift @@ -90,7 +90,7 @@ extension SamplerData { maximumNoteNumber: Int32(highNoteNumber), minimumVelocity: Int32(lowVelocity), maximumVelocity: Int32(highVelocity), - isLooping: loopMode != "", + isLooping: loopMode != "no_loop", loopStartPoint: loopStartPoint, loopEndPoint: loopEndPoint, startPoint: 0.0, From 01b9d9c009a7389460fc15af71bf7466d9384fa6 Mon Sep 17 00:00:00 2001 From: mahal raskin Date: Fri, 12 Jan 2024 10:07:51 +0100 Subject: [PATCH 2/2] Reading SFZ to default to no_loop --- Sources/DunneAudioKit/Sampler+SFZ.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/DunneAudioKit/Sampler+SFZ.swift b/Sources/DunneAudioKit/Sampler+SFZ.swift index d8f531b..803b01b 100644 --- a/Sources/DunneAudioKit/Sampler+SFZ.swift +++ b/Sources/DunneAudioKit/Sampler+SFZ.swift @@ -30,7 +30,7 @@ extension SamplerData { var lowVelocity: MIDIVelocity = 0 var highVelocity: MIDIVelocity = 127 var sample = "" - var loopMode = "" + var loopMode = "no_loop" var loopStartPoint: Float32 = 0 var loopEndPoint: Float32 = 0