From 3ecbbc5ff41b380bfe5b2f9a5f779d382cfacb52 Mon Sep 17 00:00:00 2001 From: Joachim Fenkes Date: Fri, 10 Aug 2012 21:38:19 +0200 Subject: [PATCH] less arp data, step 1 --- win/main.cpp | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/win/main.cpp b/win/main.cpp index 6961226..ea7285a 100644 --- a/win/main.cpp +++ b/win/main.cpp @@ -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;