StuC_Ovine wrote:Ok - all the ZIPs are loading fine and playing - a couple of them sound like they are not looping 100% - not sure if its the player or the sample tbh
Actually you bring up a good point and although the samples should be effectively an 8 beat loop running @ 114BPM. For the test pack I thought that I had "wrapped" the loop meaning that the FX (Delay, Reverb, etc) get merged at the beginning of the sample which is why they all abruptly end but you can hear tailing FX at the start of the sample.
Ideally what we need is for the player to have an alternating player for the lead and bass so that the samples can have the tailing FX. For example:
Code: Select all
Time @114BPM: [1-2-3-4-5-6-7-8[1-2-3-4-5-6-7-8][1-2-3-4-5-6-7-8][1-2-3-4-5-6-7-8][1-2.....
LEAD Player 1: [Lead1.WAV----------] [Lead3.WAV-----------]
LEAD Player 2: [Lead2.WAV----------] [Lead1.WAV-----------]
BASS Player 1: [Bass1.WAV----------] [Bass3.WAV-----------]
BASS Player 2: [Bass2.WAV----------] [Bass1.WAV-----------]
So as you can see your routine will need to keep time (114BPM) and if possible maybe fade out the out going sample by the second or third beat of the sample coming in. Does that make sense?
This way the Lead and Bass samples can have their tailing FX left in tact so the transition between sequences is not so harsh.
I don't think we need this on the drumloop because as long as we export them in a "wrapped" fashion (i.e. tailing fx get put at the front) then the transitions will not be so harsh.
StuC_Ovine wrote:Note: Inside the zip, I first check for WAV, then OGG so upto the user which format they want to use. As its zipped the uncompressed WAV would be smaller in size, probably about the same as the OGG anyhoo without loss.
Excellent and as I mentioned the only reason those WAV files were so huge is that I encoded them @24-Bit - my bad
StuC_Ovine wrote:Also Ive put in a 75% chance of a key change between samples.
Excellent!
StuC_Ovine wrote:It now scans the PACKS folder and looks for BASS-*.zip, LEAD-*.zip and DRUM-*.zip, adds them
Excellent!!
StuC_Ovine wrote:Be warned though, the samples have to be cached as playing from the zip file would cause a slight delay as its unziped and decoded. As they are loaded into memory it will take a fair chunk of RAM if there are masses of PACKS
Id suggest only copying in the packs you actually require. The amount of RAM would depend on the quality of the samples of course.
How quickly can you unzip a pack and load it's samples into the cache? In theory the only time you need to perform this action is when the user changes the lead, bass or drum selection. If you listen to the original demo these actually only change after a given sequence is completed (i.e. when you switch from FUNKY to ARPEGGIO it doesn't actually change to ARPEGGIO until the current FUNKY sequence is complete). Again this all depends on the demo keeping time (114BPM) and how long it takes to unpack and load the samples but could you not simply raise a "flag" that the user wants to change the LEAD, BASS or DRUM and have a "FIFO" based caching system?
For example when first loaded the demo will only cache in MAINSHUM, BLAHBLAH and WHINE which are the defaults in the original. Now the user will immediately get really fucking annoyed with the WHINE and instantly switch to say RUMBA. At that point you immediately unzip and cache in the RUMBA Drumloop and then on the next sequence cycle you switch to this.
Depending on how long it takes to unzip and load the samples into cache would still mean there is a small chance that a user switches too close to the next sequence cycle so I guess you would need two flags - one to say the user has switched something and another to say that the unzip and load into cache of that change is completed and is ready for playing. Worst case it would mean the newly selected sequence would have to wait another 8beat cycle.
This way you would could maintain say 4 sample caches per part (lead, bass and drum) and just clear them out based on a First In First Out approach - is this possible?
I bet you thought this was going to be easy!