nicer bass + mix it

This commit is contained in:
Joachim Fenkes 2012-07-31 23:36:14 +02:00
parent 8105e4c333
commit 11712de1fb
1 changed files with 6 additions and 6 deletions

View File

@ -12,20 +12,20 @@ int arpeggio[][4] = {
{ 1, 3, 5, 8 },
{ 1, 3, 5, 10 },
};
int arpseq[8] = { 0, 0, 1, 1, 2, 2, 4, 3 };
int arpseq[16] = { 0, 0, 1, 1, 2, 2, 4, 3, 0, 0, 1, 1, 2, 3, 4, 4 };
static inline unsigned char voice_arp(unsigned long i)
{
return (((i << 1) / (notes[arpeggio[arpseq[(i >> 13) & 7]][(i >> 8) & 3]] >> 2)) & 1) << 7;
return (((i << 1) / (notes[arpeggio[arpseq[(i >> 13) & 15]][(i >> 8) & 3]] >> 2)) & 1) << 7;
}
int notes2[25] = { 134, 142, 150, 159, 169, 179, 189, 201, 213, 225, 239, 253, 268, 284, 301, 319, 338, 358, 379, 401, 425, 451, 477, 506, 536 };
int bassbeat[8] = { 0, 0, 1, 0, 0, 1, 0, 1 };
int bassline[8] = { 12, 12, 15, 10, 12, 12, 17, 10 };
int bassline[16] = { 12, 12, 15, 10, 12, 12, 17, 10, 12, 12, 15, 7, 8, 8, 3, 7 };
static inline unsigned char voice_bass(unsigned long i)
{
int note = notes2[bassline[(i >> 13) & 7]];
int note = notes2[bassline[(i >> 13) & 15]];
int beat = bassbeat[(i >> 10) & 7] ? 7 : 8;
return (((i * note) >> beat) & 0x7F) + (((i * note + i) >> beat) & 0x7F);
}
@ -36,7 +36,7 @@ void fill(char *data)
for (int j = 0; j < 4096; j++)
{
data[j] = voice_bass(i);
data[j] = (voice_bass(i) >> 1);// + (voice_arp(i) >> 2);
i++;
}
}