4 ms·
Good question. When I teach programming to musicians I find that they can learn programming from a functional perspective very quickly and they take a long time
by kroger 14y ago
Good question. When I teach programming to musicians I find that they can learn programming from a functional perspective very quickly and they take a long time to "get" object oriented programming (or maybe I'm not good at teaching OOP ;-).
Usually I start with a SICP-like [1] approach, but focused on musical, instead of mathematical problems. I show them some basics of the language and ask them to implement musical operations they already know, such as transposition and inversion. Then, I show how they can simplify their code.
If you want to learn programming, I suggest SICP [1]. The videos [2] are also very good.
[1] http://mitpress.mit.edu/sicp/ http://mitpress.mit.edu/sicp/
[2] http://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-001-structure-and-interpretation-of-computer-programs-spring-2005/video-lectures/ http://ocw.mit.edu/courses/electrical-engineering-and-comput...
- kafkaesque 14y agoYou have no idea how helpful you've been. :) Thank you for taking the time for this.
- squidsoup 14y agoThat's an interesting observation - as a musician, functional programming has somehow always felt more intuitive to me than OOP. What characteristics of functional programming do you think are similar to music?
- kroger 14y agoTo be honest, I think both paradigms are good for music. You can have a Note as an object with attributes such as pitch, octave, name, etc. Maybe musicians like FP at first because it's somewhat simpler (I'm not talking about Monads here ;-). They already know about functions from high school and function composition translates directly to how they may think about music operations: retrogradation(transposition(inversion([0, 4, 7])))
- kafkaesque 14y agoDo the musical terms in this analogy: retrogradation(transposition(inversion([0, 4, 7]))) also explain the relationship between each part of this function as retrogradation does with transposition and inversion? E.g., if you start with a triad, transpose it to another key, and then create an inverted chord out of it? Or were the musical terms chosen merely to indicate that they can be a "subset" of a particular general idea ("chord" or "function"?)?