Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

less arp data, step 1

  • Loading branch information...
commit 3ecbbc5ff41b380bfe5b2f9a5f779d382cfacb52 1 parent c69b604
Joachim Fenkes authored

Showing 1 changed file with 8 additions and 12 deletions. Show diff stats Hide diff stats

  1. +8 12 win/main.cpp
20 win/main.cpp
@@ -30,18 +30,13 @@ int arpeggio[][4] = {
30 30
31 31 #define ARPSIZE 76
32 32
33   -int arpseq[ARPSIZE] = {
34   - 0, 0, 1, 2, 0, 0, 6, 2,
35   - 0, 0, 1, 2, 0, 0, 1, 7,
36   - 0, 0, 1, 2, 0, 0, 6, 2,
37   - 0, 0, 1, 2, 0, 0, 1, 7,
38   - 0, 0, 1, 2, 0, 0, 6, 2,
39   - 0, 0, 1, 2, 0, 0, 1, 7,
40   - 0, 0, 1, 2, 0, 0, 6, 2,
41   - 0, 0, 1, 2, 0, 0, 1, 2,
42   - 3, 3, 2, 2, 0, 0, 4, 5,
43   - 3, 3, 2, 2,
  33 +uint8_t arpseq1[4][8] = {
  34 + { 0, 0, 1, 2, 0, 0, 6, 2, },
  35 + { 0, 0, 1, 2, 0, 0, 1, 7, },
  36 + { 0, 0, 1, 2, 0, 0, 1, 2, },
  37 + { 3, 3, 2, 2, 0, 0, 4, 5, },
44 38 };
  39 +int arpseq2[] = { 0, 1, 0, 1, 0, 1, 0, 2, 3, 3 };
45 40 //int arptiming[32] = { 4, 2, 4, 2, 4, 2, 4, 5, 1, 2, 2 }
46 41 const uint32_t arptiming = B32(00001100,00110000,11111011,00001100);
47 42
@@ -117,7 +112,8 @@ static unsigned char voice_lead(unsigned long i, int voice_nr)
117 112 static inline unsigned char voice_arp(unsigned long i)
118 113 {
119 114 static uint16_t arp_osc = 0;
120   - int note = notes[arpeggio[arpseq[i >> 13]][(i >> 7) & 3]];
  115 + uint8_t arpptr = i >> 13;
  116 + int note = notes[arpeggio[arpseq1[arpptr >> 3][arpptr & 7]][(i >> 7) & 3]];
121 117 arp_osc += note;
122 118 return ((arptiming & (1 << (31 - (i >> 9)))) && (arp_osc & (1 << 12)) && ((i >> 13) > 15)) ? 0 : 140;
123 119 //return ((arp_osc >> 5) & 128) - 1;

0 comments on commit 3ecbbc5

Please sign in to comment.
Something went wrong with that request. Please try again.