<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On 17 February 2014 22:38, Chris Cain <span dir="ltr"><<a href="mailto:clcain@uncg.edu" target="_blank">clcain@uncg.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="">On Monday, 17 February 2014 at 04:00:08 UTC, Manu wrote:<br>
</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="">
Of course, I'd just write the above as:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
int difficulty = e.note.note.between(60,108) ? (e.note.note-60)/12 : -1;<br>
<br>
</blockquote>
<br></div><div class="">
Yes yes, very clever. Obviously it's an example and could come in any shape<br>
or form.<br>
Personally, I also wouldn't do that anyway; basic readability has<br>
definitely been lost.<br>
</div></blockquote>
<br>
<br>
I know I'm weird here, but I disagree. I had no idea what you were doing at the beginning of the topic, but that one line revealed to me that this is likely related to the music game thing you proposed awhile ago. I can't really explain why "note" was insufficient before to reveal that, but once I saw "12" explicitly on its own I immediately thought ~"12 ... semitones ... octaves ... note ... it's music ... he was working on a music game ... he came up with this while working on the music game".<br>
<br>
So, it's classifying difficulty based on which octave a note is for your music game?<br></blockquote><div><br></div><div>I'm dealing with arbitrary values as appearing in midi files.</div><div>There is a relationship that you made, kind of... but it's incidental. It's actually an abuse of the structure of a midi file to relate concepts to octaves; designers use the separation of octaves in midi composition software to separate some arbitrary data, because octaves often provide good visual separation in editors, making it easier to visualise the data they're authoring.</div>
<div>It's also just the one that was on my screen when I cut and pasted. There are lots of others that lead me to consider this as a frequently recurring pattern and become annoyed that my code was was uniformly ugly.<br>
</div><div><br></div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Of course, I might be wrong here. It just seems to me that the reducing of information made it clearer what the purpose is disregarding the other contextual information that probably exists outside of what you're trying to show us.<br>
</blockquote></div><br></div><div class="gmail_extra">The purpose is kinda unrelated conceptually. In reality, what has happened is that you have become confused.</div><div class="gmail_extra">You were searching for reason where there is none, and the algorithmic expression lead you to a false conclusion :)</div>
</div>