Тёмный

Bogosort Sheds Bach's Prelude in C Major (BWV 846) Until it Sorts the List 

AlgoMotion
Подписаться 41 тыс.
Просмотров 2,8 тыс.
50% 1

Bogosort is taking it back to the early 18th century with some J.S. Bach, Prelude in a C Major (BWV 846) from the Well-Tempered Clavier.
The Bogosort algorithm is as follows:
1. Randomly shuffle the list.
2. Check if the list is sorted.
3. If not, go back to 1.
For a list of n elements, there is a 1/n! chance that Bogosort successfully sorts the list on any given pass, since there are n! (n factorial) possible permutations of the list. So with eight elements, the probability of the list being sorted on any given pass is 1/8! = 1/40,320 ≈ 0.0000248.
In this instance, the algorithm took 3154 passes to sort the list.
The eight elements of the list are mapped to notes of a specific scale or chord, depending on which chord is being played in the progression.
The shuffling algorithm used is the Fisher-Yates Shuffle, from lowest index to highest. The note played is the value of the element at the current index in the outer for-loop of the shuffle algorithm.
________
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
#bach #algorithm #music #musictheory #classical #baroque #meme #prelude #random #randomness #improvisation #bogosort #arpeggio #arpeggios #sortingalgorithm #sorting #visualization #computerscience #programming #code #satisfying #asmr #scrollingscore #transcription #hypnotic #studymusic #focusmusic

Опубликовано:

 

29 сен 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 21   
@deusexmaximum8930
@deusexmaximum8930 6 месяцев назад
I see the pattern...
@lordchameleon2650
@lordchameleon2650 7 месяцев назад
What is this forgive my ignorance.
@cranberry312
@cranberry312 7 месяцев назад
"Bogosort" is a sorting algorithm specifically designed to be the worst possible sorting algorithm. It randomly shuffles the things in the set and then checks to see if they're sorted. If they arent, it shuffles again. In this video, its sorting a set and the specific notes and bass tones are set to be similar to those in the song in the title, so its essentially a randomly arranged music piece based on a separate music piece. They have many more videos like this on their channel. Hope this helps!
@lordchameleon2650
@lordchameleon2650 7 месяцев назад
@@cranberry312 thank you very much. So it creates a music by randomly fed fragments of sheet music by shuffling?
@cranberry312
@cranberry312 6 месяцев назад
​@@lordchameleon2650More or less. Thanks for your appreciation!
@stalemate9730
@stalemate9730 7 месяцев назад
At 0:55 the root note started giving me anxiety lol
@stalemate9730
@stalemate9730 7 месяцев назад
Especially at 1:03
@yat_ii
@yat_ii 6 месяцев назад
This is my new favourite
@foop145
@foop145 6 месяцев назад
It's interesting that this isn't unpleasant to listen to lol
@Toztabud
@Toztabud 4 месяца назад
Sorry. I thought this video was fake clickbait. I was wrong. I'm amazed at how bogosort doesn't ruin the melody.
@Altered_Aether
@Altered_Aether 7 месяцев назад
holy crap this is a whole hour I cannot sit all the was through this 😢😔
@felixfourcolor
@felixfourcolor 6 месяцев назад
What exactly is it sorting? Surely not the entire piece, because the probability is 1/8! meaning it's has 8 elements. So which 8 elements are they?
@foop145
@foop145 6 месяцев назад
It's sorting the notes in groups of eight. I assume it's every half measure, though I'm not sure what the time signature is. Regardless, it's attempting to sort all the notes between chord changes, and moving on after one failed attempt. That's why it sounds pretty okay; the notes all harmonize properly, so the order they're in doesn't matter terribly.
@AubreyViola
@AubreyViola 6 месяцев назад
Bogosort is attempting to sort "8 pitches" in ascending order, but those pitches change to a pitch collection corresponding with the current chord. You could conceptualize it as 1. Bogosort is given a new set of 8 pitches every time chord changes or 2. Bogosort is sorting the numbers 1-8 (or some other placeholder) and then the relevant pitches get assigned to each number
@felixfourcolor
@felixfourcolor 6 месяцев назад
@@AubreyViola Thanks, I sort of get it now. But the setup is so complicated for me to enjoy it.
@intrinsic.creative
@intrinsic.creative 5 месяцев назад
What program are you using to run this for the music aspect?
@GoldenMonkeyWarrior
@GoldenMonkeyWarrior 6 месяцев назад
This has nothing to do with bogosort and you've made me angry putting up with your clickbait
@foop145
@foop145 6 месяцев назад
The whole thing is using bogosort, wdym lol
@Tulanir1
@Tulanir1 6 месяцев назад
The whole thing is bogosort. If you can't see how, that's not the uploader's problem
@BlackMoonMaster
@BlackMoonMaster 6 месяцев назад
lol
@DanielBaes-o4q
@DanielBaes-o4q 4 месяца назад
Here let me explain: So the bogo sort shuffles the list checks the list to see if it's correct and then finishes If not it will shuffle the list again and again until it's sorted. This person uses random root chords and then makes the bogo sort play a melody (this is 8 elements so the total of melodies per sort is 8) with the additional of putting a bass note (which is a violin) playing the root key. Hope that helps but it's not free you need to pay a like
Далее
How To Play Bach C Major Prelude
24:48
Просмотров 73 тыс.
The invention that broke English spelling
22:47
Просмотров 171 тыс.
С какого года вы со мной?
00:13
Просмотров 210 тыс.
Qalpoq - Amakivachcha (hajviy ko'rsatuv)
41:44
Просмотров 312 тыс.
Watermelon magic box! #shorts by Leisi Crazy
00:20
Просмотров 18 млн
A Bach prelude in three different temperaments.
17:12
Просмотров 384 тыс.
What If The Universe DID NOT Start With The Big Bang?
18:24
Harder Drive: Hard drives we didn't want or need
36:47
HP’s $99 Tablet Fiasco
28:55
Просмотров 175 тыс.
Bogosort Sheds Arabesque No. 1 Until it Sorts the List
35:20
Conway's Game of Life as a Musical Instrument
11:55
Просмотров 163 тыс.