Aristos Queue Posted August 20, 2010 Report Share Posted August 20, 2010 Ok, this is cool. It's not exactly LV, but it is computer science, and since LabVIEW is dedicated to making CS more accessible to non-programmers, I decided this fits the Design & Architecture theme. Background: There are different processes that can be used to sort data. Some LV users may just know the Sort 1D Array primitive, but under the hood, that primitive implements a particular sorting algorithm. Different sorting algorithms have different performance characteristics. Some algorithms are categorically worse than the others. Some are really efficient on different types of data -- some work well when the data is completely random, others when the data is already nearly sorted, some are very efficient when the data is too large to fit in memory and has to be occasionally loaded from disk. Understanding what is actually going on with each algorithm is sometimes hard to grasp for students, especially if they're just reading source code. Someone has taken various sorting algorithms and set them to music and video. How? He sorts an array of randomized numbers, and every time two values are compared, he plays a tone of the frequency of the value. For some sorts, as the array gets closer to sorted, you can hear the sound becoming ever more like a single rising scale. For other sorts, it gets closer to silence since those sorts don't have to keep checking back to see if they have all the data sorted. Here are the Youtube links: Insert, bubble, selection, merge, and a gnome sort: Heap sort: 1 Quote Link to comment
COsiecki Posted August 20, 2010 Report Share Posted August 20, 2010 That was fun to watch and listen to! Thanks for sharing Quote Link to comment
crelf Posted August 21, 2010 Report Share Posted August 21, 2010 Brilliant! I remember doing a similar thing at college (physics), but with colors instead of sounds. Quote Link to comment
Fab Posted August 27, 2010 Report Share Posted August 27, 2010 Ok, I am officially a geek now... I loved this ! It made me thing of R2D2. That is probably how it would sound if he was doing those algorithms Thanks for sharing... Quote Link to comment
Michael Aivaliotis Posted August 27, 2010 Report Share Posted August 27, 2010 Something related: <iframe class="youtube-player" type="text/html" width="640" height="385" src="http://www.youtube.com/embed/1QHzI5HmXl4" frameborder="0"></iframe> Quote Link to comment
Yair Posted August 29, 2010 Report Share Posted August 29, 2010 Something related: <iframe class="youtube-player" type="text/html" width="640" height="385" src="http://www.youtube.com/embed/1QHzI5HmXl4" frameborder="0"></iframe> Yeah, I know those as well. Always preferred Bach's Toccata and Fugue in D minor: One thing which helps connect these even better is to place a piece of paper on the screen which shows you exactly where the music is currently (i.e. the edge of the paper is on the center of the screen). Quote Link to comment
altenbach Posted August 29, 2010 Report Share Posted August 29, 2010 Seems a bit simplistic, with all these quantizations and missing higher harmonics. Who needs youtube for this? Just get the Advanced Signal Processing toolkit and do the JTFA in realtime on any music you like.. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.