Building musical chords starting from (a lot of) rules

Paul McNett p at ulmcnett.com
Fri Nov 14 13:26:33 EST 2008


Mr.SpOOn wrote:
> Anyway, I think I can use a chain of  if-clauses, one per rule and at
> the end remove the notes marked with "no". But this seems to me a very
> bad solution, not so pythonic. Before I proceed for this way, do you
> have any suggestion? Hope the problem is not too complicated.

I say, start with what you can think of (the chain of if clauses). Get it working. 
Then, you'll likely find ways to refactor if needed.

Get it working first.
Make it "right" iteratively over time.

At least that's what I do. And it works for me.

Paul



More information about the Python-list mailing list