infinity-player

infinite jukebox clone using librosa
git clone https://git.ce9e.org/infinity-player.git

commit
edbc50214ea72c2869010d5c16c6b141615b72cc
parent
1b78521fc4cbe7acb8cd1accd2178bfe5ba35727
Author
Tobias Bengfort <tobias.bengfort@posteo.de>
Date
2025-03-06 13:39
privilege back jumps over normal progression

Diffstat

M player.py 12 ++----------

1 files changed, 2 insertions, 10 deletions


diff --git a/player.py b/player.py

@@ -95,18 +95,10 @@ def enhance(jumps, threshold):
   95    95     y_max = x_max ** 0.5
   96    96     jumps = (jumps - x_min) / (x_max - x_min) * y_max
   97    97     jumps *= jumps > 0
   -1    98     jumps += numpy.eye(n)
   98    99 
   99   100     # privilege jumps back in order to prolong playing
  100    -1     jumps *= numpy.ones((n, n)) - numpy.tri(n, k=-1).T * 0.5
  101    -1 
  102    -1     # privilege wide jumps
  103    -1     m = numpy.zeros((n, n))
  104    -1     for i in range(1, n):
  105    -1         m += numpy.tri(n, k=-i)
  106    -1         m += numpy.tri(n, k=-i).T
  107    -1     jumps *= (m / (n - 1)) ** 0.4
  108    -1 
  109    -1     jumps += numpy.eye(n)
   -1   101     jumps[:] *= numpy.linspace(numpy.ones(n), numpy.ones(n) * 0.5, n)
  110   102 
  111   103     return jumps
  112   104