Arpeggiator effect

This forum is for artists to post their music and graphics or discuss artistic matters that could be used in Uzebox games.
Post Reply
User avatar
uze6666
Site Admin
Posts: 4449
Joined: Tue Aug 12, 2008 9:13 pm
Location: Montreal, Canada
Contact:

Arpeggiator effect

Post by uze6666 » Mon Aug 06, 2018 3:40 am

As discussed in another thread, I checked to integrate some arpeggior code I made a long time ago. I found it and it's not as complete as I thought. Made me think the reason maybe was that's it's not required since you can somewhat do that already with the loop patch command. For example, something like this would yield a major chord sounding arpeggio:

Code: Select all

const char patch[] PROGMEM ={
0,PC_WAVE,8,
0,PC_ENV_SPEED,-4,
1,PC_NOTE_UP,4,
1,PC_NOTE_UP,3,
1,PC_NOTE_DOWN,7,
0,PC_LOOP_END,3 //go back 3 commands
1,PATCH_END
};
Making ADSR envelopes is a bit cumbersome but seems it can be done with a series of loops (apart for the sustain bit). So I think I will leave that old code out for now.

Also, the code for the sound engine is getting too big for my taste and I can see a lot of waste in ram and rom for unused patch command types. I'd look to add conditionals for the "extended" patch commands (tremolo, slide, loop). Just that can save 512 byte of flash and 32 byte of ram. By default they'd be on of course for backward compatibility.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest