Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

less arp data, step 1

  • Loading branch information...
commit 3ecbbc5ff41b380bfe5b2f9a5f779d382cfacb52 1 parent c69b604
Joachim Fenkes authored
Showing with 8 additions and 12 deletions.
  1. +8 −12 win/main.cpp
20 win/main.cpp
View
@@ -30,18 +30,13 @@ int arpeggio[][4] = {
#define ARPSIZE 76
-int arpseq[ARPSIZE] = {
- 0, 0, 1, 2, 0, 0, 6, 2,
- 0, 0, 1, 2, 0, 0, 1, 7,
- 0, 0, 1, 2, 0, 0, 6, 2,
- 0, 0, 1, 2, 0, 0, 1, 7,
- 0, 0, 1, 2, 0, 0, 6, 2,
- 0, 0, 1, 2, 0, 0, 1, 7,
- 0, 0, 1, 2, 0, 0, 6, 2,
- 0, 0, 1, 2, 0, 0, 1, 2,
- 3, 3, 2, 2, 0, 0, 4, 5,
- 3, 3, 2, 2,
+uint8_t arpseq1[4][8] = {
+ { 0, 0, 1, 2, 0, 0, 6, 2, },
+ { 0, 0, 1, 2, 0, 0, 1, 7, },
+ { 0, 0, 1, 2, 0, 0, 1, 2, },
+ { 3, 3, 2, 2, 0, 0, 4, 5, },
};
+int arpseq2[] = { 0, 1, 0, 1, 0, 1, 0, 2, 3, 3 };
//int arptiming[32] = { 4, 2, 4, 2, 4, 2, 4, 5, 1, 2, 2 }
const uint32_t arptiming = B32(00001100,00110000,11111011,00001100);
@@ -117,7 +112,8 @@ 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;
- int note = notes[arpeggio[arpseq[i >> 13]][(i >> 7) & 3]];
+ uint8_t arpptr = i >> 13;
+ int note = notes[arpeggio[arpseq1[arpptr >> 3][arpptr & 7]][(i >> 7) & 3]];
arp_osc += note;
return ((arptiming & (1 << (31 - (i >> 9)))) && (arp_osc & (1 << 12)) && ((i >> 13) > 15)) ? 0 : 140;
//return ((arp_osc >> 5) & 128) - 1;
Please sign in to comment.
Something went wrong with that request. Please try again.