5 ms·
Bach's prelude in C major written in sed
- notkaiho 7y agoI, uh, applaud the sheer chutzpah and will that would go into making something like this. Only after the piece finishes in full, not in between movements, of course.
- LessDmesg 7y agoMy compiler only supports C11, how do you compile C major?
- lelf 7y agoC11 (C—E—G—Bb—D—F) is a superset of C major (C—E—G), so just use it.
- del_operator 7y agoOh, wow. Is it common that Bach Prelude refers to Well Tempered Clavier or was I just biased by my obsession with Gould and his WTC book 1 prelude?
- pierrec 7y agoIt's correct, the WTC is a collection of preludes and fugues. The first one is the Prelude in C Major.
- fortran77 7y agoNot quite. This piece has three voices. There are two half notes in each measure, that start on beats 1 and 3, and there is a dotted eight tied to a quarter note that starts on beats 1+1/16th and 3+1/16th See: https://www.pianoshelf.com/sheetmusic/728/bach-bwv-846---wtc,-book-1--prelude-and-fugue-no.-1-728 https://www.pianoshelf.com/sheetmusic/728/bach-bwv-846---wtc...
- sramsay 7y agoDefinitely. I propose we do this properly using only GNU parallel and m4 macros.
- Wowfunhappy 7y agoCan this be made to work with OS X’s built-in SED? I’m getting: sed: 34: bach.sed: RE error: invalid repetition count(s)
- rubyn00bie 7y agoProbably gonna need to install gnu-sed... the system one isn't very good.
- sramsay 7y agoI love showing students sed, and then teaching them regular expressions, then showing them sed again, and then showing them stuff like this. sedtris is another fun example: https://github.com/uuner/sedtris https://github.com/uuner/sedtris
- codr7 7y agoI initially read that as "Bash's prelude in C", which still makes more sense to me.
- ShorsHammer 7y ago24 SLOC. Beautiful.
- andrei-mircea 7y agohttps://www.youtube.com/watch?v=jyNqHsN3pEc https://www.youtube.com/watch?v=jyNqHsN3pEc
- claudiawerner 7y agoAmazing; I love the way he describes the usage of the program from first principles, and the programmatic translation of musical techniques, which is quite ingenious. Well worth a watch (and listen).