All 2520 Permutations of "The Lick" from "Farthest Away" to "Closest"

แชร์
ฝัง
  • เผยแพร่เมื่อ 21 ม.ค. 2024
  • Using the Kendall tau sequence distance to traverse all permutations of the lick from "farthest away" to "closest".
    Given a reordering of the notes of "the lick", how "far away" from the lick is that permutation of the notes?
    The Kendall tau sequence distance is one way to measure how “close” a given sequence is to the lick. This metric is the number of adjacent element swaps needed to transform a given sequence into the lick. Or in other words, the number of bubble sort swaps needed to reach the lick.
    There is a repeated note in the lick: the tonic (in this case, D). The E is also repeated, but each occurrence has a different duration, so the two E notes are considered two distinct elements.
    There are a total of 7 notes in the lick, with two notes being identical, meaning there are 7!/2 = 2520 distinct ways to reorder the notes.
    Since there is a repeated element, the traditional Kendall tau distance won't work well, because it's designed to work on sets (where every element is unique).
    Instead, we’re applying an extension of the Kendall tau rank distance to sequences proposed by Cicirello (2020) (see link to paper below) where repeated elements are allowed.
    This is all permutations of the lick played from "farthest away" to "closest" as measured by the Kendall tau sequence distance.
    ___
    Paper referenced in the video:
    V. Cicirello, “Kendall tau sequence distance: Extending Kendall tau from ranks to sequences,” EAI Endorsed Transactions on Industrial Networks and Intelligent Systems, vol. 7, no. 23, p. 163925, May 2020, doi: doi.org/10.4108/eai.13-7-2018....
    PDF: www.cicirello.org/publication...
    ____
    Other videos from ‪@AlgoMotion‬ you might enjoy:
    ▶ • Interactive TH-cam Gi...
    ▶ • Polyrhythms Visualized...
    ▶ • Bogosort Sheds Donna L...
    Interested in learning more about algorithms and how to program? Here are some useful and/or classic textbooks that I recommend (these are affiliate links, if you buy one, I get a small commission):
    ▶ “Algorithms” (4th Edition) by Robert Sedgewick & Kevin Wayne: amzn.to/3uo25xR
    ▶ “Effective Java” (3rd Edition) by Joshua Bloch: amzn.to/3HOnYJL
    ▶ “Python Crash Course, 3rd Edition: A Hands-On, Project-Based Introduction to Programming” by Eric Matthes: amzn.to/481jQ43
    ▶ “Design Patterns: Elements of Reusable Object-Oriented Software” by Erich Gamma, Richard Helm, Ralph Johnson, & John Vlissides: amzn.to/49fpr7R
    ▶ “Discrete Algorithmic Mathematics” by Stephen B. Maurer & Anthony Ralston: amzn.to/4bmsOvG
    #music #algorithm #metric #musictheory #meme #thelick #jazz #computerscience #programming #visualization #java #processing #hypnotic #studymusic #focusmusic
  • วิทยาศาสตร์และเทคโนโลยี

ความคิดเห็น • 14

  • @EntergeticalakaBot
    @EntergeticalakaBot 4 หลายเดือนก่อน +32

    this feels like trying to guess a number between 1 and 100 but you check every single number and guess the number last

  • @failedarchitect8990
    @failedarchitect8990 4 หลายเดือนก่อน +14

    exceptionally cool and well illustrated!! love the ~last 20 permutations feeling like such a grand flourishing buildup, and the filter opening up gradually throughout is a v nice touch :))

  • @MelodiousThunk
    @MelodiousThunk 4 หลายเดือนก่อน +25

    Very interesting to hear and see the results of this! I wonder what metric would best capture a person's perception of the distance. Some of the earlier sequences sound closer to The Lick than some of the later ones, e.g. 2494 (55:25) sounds closer than 2514 (55:52) even though their distances are 2 and 1, respectively. I think this is because 2494 has the right rhythm, and its melodic contour is almost the same, except for the first D, whereas the length of the second E in 2514 emphasises the fact that it's in the wrong place.

    • @shortForPychael
      @shortForPychael 4 หลายเดือนก่อน +5

      It might matter more for different people too? I noticed I thought the ones with the correct rhythm felt the “closest”

    • @gabrieltellez8148
      @gabrieltellez8148 4 หลายเดือนก่อน

      even 32 (0:43) sounded close

  • @RedstoneManiac13
    @RedstoneManiac13 4 หลายเดือนก่อน +17

    Neat video! Just an engraving tip though: you don't always need to show beats 2 or 4 like you have. If you have a quarter note on the and of 1 or the and 3, and it's immediately followed by an 8th note, it's very well understood that it's a syncopated hit.

    • @AlgoMotion
      @AlgoMotion  4 หลายเดือนก่อน +11

      Good point... The scrolling score you see is created from lilypond code generated by the sort visualization program. I programmed it to create a tie on any crossing of the beat, but as you pointed out, with quarter notes, only the ones that cross over beat 3 or the bar line really matter in 4/4 time. I'll update that for the next version (if ties are needed again).

  • @Pablo360able
    @Pablo360able 3 หลายเดือนก่อน +2

    It's interesting how this pretty much feels like C major even though the licc is in D minor

  • @mwagaha3343
    @mwagaha3343 4 หลายเดือนก่อน +9

    Curious as to how you coded this, very interesting

    • @AlgoMotion
      @AlgoMotion  4 หลายเดือนก่อน +7

      This was done in Java using a graphical library called Processing, with the javax.sound.midi package for writing out MIDI data. The scrolling score was generated by the program as lilypond code.

  • @trulyunknowable
    @trulyunknowable 4 หลายเดือนก่อน +4

    Sequence 236

  • @jeffayoe7468
    @jeffayoe7468 4 หลายเดือนก่อน +1

    damn what

  • @deathhzrd
    @deathhzrd 2 หลายเดือนก่อน

    Ok now make them phase