Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: Music: Calculate Chord Progression Triads

by johngg (Canon)
on Jan 26, 2007 at 23:27 UTC ( [id://596801]=note: print w/replies, xml ) Need Help??


in reply to Music: Calculate Chord Progression Triads

Sadly, I never took up a musical instrument, something I now regret very much. I wonder if it is too late to do so now that I am in my fifties.

Moving back to Perl, I would just like to bring the qw{ ... } construct to your attention, which could save you some typing when setting up your arrays. Instead of

my @notes = ('C', 'C#/Db', 'D', 'D#/Eb', 'E', 'F', 'F#/Gb', 'G', 'G#/Ab', 'A', 'A#/Bb', 'B');

you could do

my @notes = qw{C C#/Db D D#/Eb E F F#/Gb G G#/Ab A A#/Bb B};

And one slight niggle. You use meaningful variable names throughout your script except for the my $i = shift;. It seems a shame to make this omission when the rest of the script is so very clear.

I hope this is of interest.

Cheers,

JohnGG

Replies are listed 'Best First'.
Re^2: [OT] Music: Calculate Chord Progression Triads
by wazoox (Prior) on Jan 27, 2007 at 12:43 UTC
    Sadly, I never took up a musical instrument, something I now regret very much. I wonder if it is too late to do so now that I am in my fifties.

    It's never too late if you want to. I've taught people in their 40s, 50s and 60s the piano, and sure they won't ever be virtuosos but they make progress, and enjoy playing. So ... just do it!

      So ... just do it!

      That's what I must do. I love listening to all kinds of music so I should start making my own. I could think of it as giving something back to the musical community ... whether they would want it back is another matter :)

      Thanks for the encouragement,

      JohnGG

Re: Music: Calculate Chord Progression Triads
by jonadab (Parson) on Jan 27, 2007 at 19:18 UTC
    I wonder if it is too late to do so now that I am in my fifties.

    Perhaps not. I'm in my thirties, and I recently took up piano, and it's proving to be rather easier than I expected. I expected to have to spend twice as long as a child would spend to learn the same amount, but that appears not to be the case. Something about having already learned other stuff, apparently, makes it go quicker. I started in December, and I'm already playing pieces with chords, and beginning to play with a key signature, which typically comes much more than two months in for a young piano student, OSIAT. And I'm only practicing about fifteen minutes a day, average.

    YMMV, but give it a shot. What have you got to lose?

    -- 
    We're working on a six-year set of freely redistributable Vacation Bible School materials.
      What have you got to lose?

      Nothing at all, of course. I have no excuse, nowhere to hide. Perhaps I'll make it a belated New Year's resolution.

      Cheers,

      JohnGG

Re^2: Music: Calculate Chord Progression Triads
by zeno (Friar) on Jan 30, 2007 at 14:23 UTC

    Hi JohnGG,

    Sorry I took so long to reply. Thanks for your suggestions, I'll try and put them into the code.

    As for taking up music, I'd say yes, yes, yes. I was very lucky to take up guitar when I was 11. That said, I played a long time before I understood what I was playing at an emotional level. You already have that at 50.

    I also was more concerned about just getting some nice songs out than in understanding music theory. I have more patience for that type of thing now at 42, and probably would have made better progress had I gotten more interested in it. You have the benefit of wisdom to allow you to understand better what you are doing.

    Anyway, even if you never end up playing for anyone else, it is self-actualizing to take it up. I hope you decide to learn how to play something. My music is one of the most rewarding things I do, and I do it just for me.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://596801]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (4)
As of 2024-03-29 11:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found