
Bach's prelude in C major written in sed - vitaut
https://github.com/laserbat/bach.sed
======
notkaiho
I, 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.

------
sramsay
I 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)

------
fortran77
Not 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...](https://www.pianoshelf.com/sheetmusic/728/bach-bwv-846---wtc,-book-1--
prelude-and-fugue-no.-1-728)

~~~
sramsay
Definitely. I propose we do this properly using only GNU parallel and m4
macros.

------
andrei-mircea
[https://www.youtube.com/watch?v=jyNqHsN3pEc](https://www.youtube.com/watch?v=jyNqHsN3pEc)

~~~
claudiawerner
Amazing; 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).

------
LessDmesg
My compiler only supports C11, how do you compile C major?

~~~
lelf
C11 (C—E—G—Bb—D—F) is a superset of C major (C—E—G), so just use it.

------
del_operator
Oh, 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
It's correct, the WTC is a collection of preludes and fugues. The first one is
the Prelude in C Major.

------
Wowfunhappy
Can 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
Probably gonna need to install gnu-sed... the system one isn't very good.

------
codr7
I initially read that as "Bash's prelude in C", which still makes more sense
to me.

------
ShorsHammer
24 SLOC. Beautiful.

