shithub: ft2-clone

Download patch

ref: c0d8c8d6057aaf54f72a72c632fd0b94f33710e4
parent: b967ab547d4f99098f3e62866b1bd3c76dc722cf
author: Olav Sørensen <[email protected]>
date: Wed Oct 14 07:52:40 EDT 2020

Scope fix

Kill scope if instrument is set to an empty instrument in the pattern data

--- a/src/ft2_scopes.c
+++ b/src/ft2_scopes.c
@@ -570,6 +570,13 @@
 				lastChInstr[i].instrNr = ch->instrNr;
 				lastChInstr[i].sampleNr = ch->sampleNr;
 			}
+			else
+			{
+				// empty instrument, shut down scope
+				scope[i].active = false;
+				lastChInstr[i].instrNr = 255;
+				lastChInstr[i].sampleNr = 255;
+			}
 		}
 	}
 }