From 28dae6acba357fecd7aca30f025a1d4e626b568c Mon Sep 17 00:00:00 2001
From: Lorenz Lehmann <lorenz.lehmann@students.muho-mannheim.de>
Date: Thu, 28 Mar 2024 00:09:22 +0100
Subject: [PATCH] fix (sources): gen-harmonies

---
 sources/gen-harmonies.lisp |   46 +++++++++++++++++++---------------------------
 1 files changed, 19 insertions(+), 27 deletions(-)

diff --git a/sources/gen-harmonies.lisp b/sources/gen-harmonies.lisp
index 161f32d..aeb553c 100644
--- a/sources/gen-harmonies.lisp
+++ b/sources/gen-harmonies.lisp
@@ -1,13 +1,3 @@
-
-;======================================
-;OM-Lead, 2022-2024
-;
-;Library for Rule-based Voice-Leading
-;Author: Lorenz Lehmann
-;Supervision: Marlon Schumacher
-;======================================
-
-
 (in-package :omlead)
 
 
@@ -37,8 +27,9 @@
                                    
                                    
                                    ;;;;;;;;;;;;;;;;;;negativ
-                                   (reverse (loop for i in (if (or (eq 'hold mode) (eq 'hold-mirror mode)) 
-                                                      (hold_oml negativ) (circular_oml negativ))  ;;endless down-list
+                                   (reverse (loop for counter
+                                               for i = (if (or (eq 'hold mode) (eq 'hold-mirror mode)) 
+                                                      (hold-list negativ counter) (circular-list negativ counter))  ;;endless down-list
                                          sum i into total
                                          until (> range-min (- fundamental total))
                                          collect (- fundamental total)
@@ -48,8 +39,9 @@
                                    
                                    ;;;;;;;;;;;;;;;;;;positiv
                                    
-                                   (loop for i in (if (or (eq 'hold mode) (eq 'hold-mirror mode)) 
-                                                      (hold_oml positiv) (circular_oml positiv)) ;;endless up-list
+                                   (loop for counter
+                                      for i = (if (or (eq 'hold mode) (eq 'hold-mirror mode)) 
+                                                      (hold-list positiv counter) (circular-list positiv counter)) ;;endless up-list
                                          sum i into total
                                          until (< range-max (+ fundamental total))
                                          collect (+ fundamental total)))))))
@@ -100,20 +92,15 @@
                        
                        (harmonies 
                         (if (car filter-harmonies)
-                        (let ((filter-list harmonies))
+                            (remove nil (loop for filter-box in filter-harmonies 
+                                              append (loop for rule in (second filter-box)
+                                                           append (loop for harmony in harmonies
+                                                                        collect (if (tester_oml 
+                                                                                     (lambda (x) (and (<= (list-min_oml (third filter-box)) x) (>= (list-max_oml (third filter-box)) x)))
+                                                                                     harmony)
+                                                                                    (if (funcall rule (first filter-box) harmony) harmony) harmony)))))
                                     
-
-                                    (loop for filter-box in filter-harmonies 
-                                          do (loop for rule in (second filter-box)
-                                                     
-                                                   do (loop for harmony in filter-list
-                                                            do (if (tester_oml 
-                                                                    (lambda (x) (and (<= (list-min_oml (third filter-box)) x) (>= (list-max_oml (third filter-box)) x)))
-                                                                    harmony)
-                                                              (if (not (funcall rule (first filter-box) harmony))
-                                                                   (delete harmony filter-list))))))
-                                    filter-list)
-                          harmonies))
+                                    harmonies))
            
 ;++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 
@@ -369,3 +356,8 @@
 
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
+
+
+(let ((a '(1)))
+  (delete 1 a))
+      
\ No newline at end of file

--
Gitblit v1.9.1