I can't think of the programming pattern for this, but, this is what I'm trying 
to do for a little side project I'm building.  I'll explain what I'm doing and 
then I ask you for the name of the programming pattern that most-closely solves 
this problem.  I'm not specifically asking you to code it for me, however.  
(Unless you want to give some clues.)  ;^)

I have a guitar signal processor that lets me store presets for each song.  
Each song will have, at least, one preset, but a song may also have two or 
three presets.  A song would never have more than five presets.  These presets 
will always be in the same order as our set lists.

I have a foot switch, that I use to select the presets for the songs.  The foot 
switch will let me choose one of five presets in 20 different banks.  For 
example Bank 1 consists of Presets 1-5.  Bank 2 consists of Presets 6-10. etc...

I have a database table of our songs.  Each record also stores how many presets 
are used for any particular song.  For example, "Born To Be Wild" uses only one 
preset.  "Feel Like Makin' Love" uses three presets.

I have another table that associates our songs with a show's set lists.

Currently, I have another table that maps each song with the preset number on 
my processor.  When I have to re-order the songs, in the set list, I have to 
also re-order them, in my processor, as well as modify the table that maps the 
songs to the presets.

This is where I want to go:

Rather than having a mapping table, I just want to make sure that my 
processor's presets match the set list's song order.  Then, as long as the 
database knows how many presets are used for each song, it would automatically 
tell me where to store the songs presets in my processor.  I have a utility 
that allows me to quickly move presets, in my processor, using a computer.

Here is the catch:  I don't want a multi-preset song to overlap a bank.

For example:  "Feel Like Makin' Love" uses three of the five presets in one 
bank.
One day, we may follow that song with another song that uses three presets.  
Therefore, I need it to start with the next bank, not in position four, five 
and then the first of the next bank.  That means the bank that holds "Feel Like 
Makin' Love" uses the first three presets and the last two are unused.

That said, what would be the closest programming pattern that would solve this 
problem?  I don't think it would be too difficult to loop and keep counters, 
but knowing when a bank is "full" because of the next preset would be the 
tricky part.

Thanks for any suggestions. 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:331889
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

Reply via email to