Skip to content

Commit

Permalink
lowered largest-fast leap from 10 to 8 for double-bass
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Edwards committed Jul 15, 2024
1 parent deefbeb commit 7f830c5
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 43 deletions.
4 changes: 2 additions & 2 deletions src/instruments.lsp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
;;;
;;; Creation date: 30th December 2010
;;;
;;; $$ Last modified: 22:04:42 Tue Dec 19 2023 CET
;;; $$ Last modified: 20:10:53 Mon Jul 15 2024 CEST
;;;
;;; SVN ID: $Id$
;;;
Expand Down Expand Up @@ -550,7 +550,7 @@
(:staff-name "double bass" :staff-short-name "db"
:lowest-written e2 :highest-written g5 :transposition-semitones -12
:prefers-notes low
:largest-fast-leap 10
:largest-fast-leap 8 ; 10
:clefs (bass tenor treble) :starting-clef bass
:chords nil
:microtones t :harmonics t
Expand Down
22 changes: 10 additions & 12 deletions src/slippery-chicken.lsp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
;;;
;;; Creation date: March 19th 2001
;;;
;;; $$ Last modified: 15:15:58 Thu Jun 27 2024 CEST
;;; $$ Last modified: 20:29:49 Tue Jul 2 2024 CEST
;;;
;;; ****
;;; Licence: Copyright (c) 2010 Michael Edwards
Expand Down Expand Up @@ -4876,14 +4876,13 @@ seq-num 5, VN, replacing G3 with B6
;; are we setting snd-transitions by default with finonacci-transitions or
;; with a custom envelope?
(if (and snd-transitions sound-file-palette-ref2)
(setf snd-transitions
(setq snd-transitions
(loop for num-events in events-per-player
collect
(loop for n below num-events
collect
(round (interpolate n (new-lastx snd-transitions
num-events))))))
(setf snd-transitions (loop for num-events in events-per-player
(loop with sts = (new-lastx snd-transitions num-events)
for n below num-events collect
(round (interpolate n sts)))))
(setq snd-transitions (loop for num-events in events-per-player
collect (fibonacci-transition num-events))))
(when (and check-overwrite (probe-file output))
(setf output-ok
Expand Down Expand Up @@ -5728,17 +5727,16 @@ seq-num 5, VN, replacing G3 with B6
No sounds for reference ~a"
sound-file-palette-ref2)))
;; DJR Mon 16 Sep 2019 01:26:11 BST
;; are we setting snd-transitions by default with finonacci-transitions or
;; are we setting snd-transitions by default with fibonacci-transitions or
;; with a custom envelope?
(if (and snd-transitions sound-file-palette-ref2)
(setq snd-transitions
(loop for num-events in events-per-player
collect
(loop for n below num-events
collect
(loop with sts = (new-lastx snd-transitions num-events)
for n below num-events collect
(round
(interpolate n (new-lastx snd-transitions
num-events))))))
(interpolate n sts)))))
(setq snd-transitions (loop for num-events in events-per-player
collect (fibonacci-transition num-events))))
(when (and check-overwrite (probe-file output))
Expand Down
59 changes: 30 additions & 29 deletions src/utilities.lsp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
;;;
;;; Creation date: June 24th 2002
;;;
;;; $$ Last modified: 17:01:31 Sat Jun 29 2024 CEST
;;; $$ Last modified: 20:38:20 Tue Jul 2 2024 CEST
;;;
;;; ****
;;; Licence: Copyright (c) 2010 Michael Edwards
Expand Down Expand Up @@ -1627,29 +1627,29 @@
be raised to."
;; MDE Thu Jul 14 21:29:59 2016 -- could happen...
(if (not env)
point
(let ((lastx (lastx env))
(lasty (first (last env))))
(cond ((> point lastx)
(when warn
(warn "interpolate: ~a is off the x axis of ~%~a~
~%returning last y value: ~a"
point env lasty))
lasty)
((< point (car env))
(let (y1)
;; (error "interpolate: Can't interpolate ~a in ~a" point env))
;; MDE Thu Apr 23 09:48:57 2020, Heidhausen -- if our x values
;; start > the point we're looking for, return the first y value
(warn "utilities::interp-aux: envelope starts later than point!~
point
(let ((lastx (lastx env))
(lasty (first (last env))))
(cond ((> point lastx)
(when warn
(warn "interpolate: ~a is off the x axis of ~%~a~
~%returning last y value: ~a"
point env lasty))
lasty)
((< point (car env))
(let (y1)
;; (error "interpolate: Can't interpolate ~a in ~a" point env))
;; MDE Thu Apr 23 09:48:57 2020, Heidhausen -- if our x values
;; start > the point we're looking for, return the first y value
(warn "utilities::interp-aux: envelope starts later than point!~
~%Returning first y value: ~a" (setq y1 (second env)))
y1))
(t (interp-aux point env scaler exp))))))
y1))
(t (interp-aux point env scaler exp))))))

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defun interp-aux (point env scaler exp)
(let ((here (loop for i in env by #'cddr and j from 1 do
(if (<= point i) (return (+ j j -2))))))
(if (<= point i) (return (+ j j -2))))))
;; rounding in making the new-env with new-lastx can cause the very last
;; event to be just a little bigger than the last x value in the new-env.
;; If this is the case, <here> will be nil so we better deal with this:
Expand All @@ -1666,16 +1666,16 @@
numbers: ~a"
env))
(if (= x1 x2)
(progn
(warn "utilities::interp-aux: weird values for interp-aux: ~a in ~a."
point env)
(nth (1- here) env))
(get-interpd-y point
x1
(* scaler (nth (- here 1) env))
x2
(* scaler (nth (+ here 1) env))
exp)))))
(progn
(warn "utilities::interp-aux: weird values for interp-aux: ~a in ~a."
point env)
(nth (1- here) env))
(get-interpd-y point
x1
(* scaler (nth (- here 1) env))
x2
(* scaler (nth (+ here 1) env))
exp)))))

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defun get-interpd-y (point x1 y1 x2 y2 exp)
Expand Down Expand Up @@ -6552,6 +6552,7 @@ yes_foo, 1 2 3 4;
(helper (rescale (rationalize selector) 0 1 0 (loop for i in weights sum
(rationalize i)))
(cdr weights) 0 (rationalize (car weights)))))

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; ****f* utilities/visualize
;;; AUTHOR
Expand Down

0 comments on commit 7f830c5

Please sign in to comment.