Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

refactor arpptr

  • Loading branch information...
commit 663b4b2943af5801d0115a71993240d166713f5a 1 parent db7376f
@dop3j0e authored
Showing with 3 additions and 4 deletions.
  1. +3 −4 win/main.cpp
View
7 win/main.cpp
@@ -117,11 +117,10 @@ static unsigned char voice_lead(unsigned long i, int voice_nr)
static inline unsigned char voice_arp(unsigned long i)
{
static uint16_t arp_osc = 0;
- uint8_t arpptr = i >> 13;
- uint8_t arpptr2 = arpseq1[arpseq2[arpptr >> 3]][(arpptr >> 1) & 3];
- if (!(arpptr & 1))
+ uint8_t arpptr2 = arpseq1[arpseq2[i >> 16]][(i >> 14) & 3];
+ if (!(i & (1 << 13)))
arpptr2 >>= 4;
- arpptr = arpeggio[arpptr2 & 0xF][(i >> 8) & 1];
+ uint8_t arpptr = arpeggio[arpptr2 & 0xF][(i >> 8) & 1];
if (!(i & 0x80))
arpptr >>= 4;
Please sign in to comment.
Something went wrong with that request. Please try again.