Skip to content

Commit

Permalink
Update frequency scale
Browse files Browse the repository at this point in the history
  • Loading branch information
billthefarmer committed Jul 3, 2016
1 parent 27ad0b1 commit 1924101
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/org/billthefarmer/scope/FreqScale.java
Original file line number Diff line number Diff line change
Expand Up @@ -96,16 +96,19 @@ protected void onDraw(Canvas canvas)

// Draw ticks

// canvas.drawLine(0, 0, 0, height / 3, paint);
canvas.drawLine(0, 0, 0, height / 3, paint);

float fa[] = {1, 2, 5};
float sa[] = {1.1f, 1.2f, 1.3f, 1.4f, 1.5f, 1.6f, 1.7f, 1.8f,
1.9f, 2.2f, 2.5f, 3, 3.5f, 4, 4.5f, 6, 7, 8, 9};
float ma[] = {1, 10, 100, 1000, 10000};
float ma[] = {10, 100, 1000, 10000};
for (float m: ma)
{
for (float f: fa)
{
if ((f == 1) && (m == 10))
continue;

float x = (float) Math.log((f * m) / audio.fps) / scale;
canvas.drawLine(x, 0, x, height / 3, paint);

Expand Down

0 comments on commit 1924101

Please sign in to comment.