skip to content
AdaWiki
User Tools
Log In
Site Tools
Search
Tools
Show page
Old revisions
Backlinks
Recent Changes
Media Manager
Sitemap
Log In
>
Recent Changes
Media Manager
Sitemap
You are here:
start
»
x0x
»
pattern_play.c
Trace:
x0x:pattern_play.c
===== Pattern Play Mode ===== ==== Initialization ==== (fill in here) ==== Pattern Play Loop ==== The pattern play loop looks like this: - Read any input from the switches - If the function has changed, stop and exit - If we are in master sync mode, handle tap tempo - Start a new chain if the chain key was just pressed - Finalize chain mode once chain is released - Display Somthing... - If we are in the middle of chain mode, then display the current chain and add patterns/tracks **OR** -If up/down is pressed handle pitch shift **OR** -Display the current data - Or Handle Playback - If the pitch shift keys are released, stop blinking the leds - If they changed the pattern/track build a chain one pattern long to the new pattern/track - Display the current (and next if applicable) track - If we are playing and have midi or din sync handle the sync through clock ticks and play the note with [[do_tempo]] - if we get a Midi Song Select message, set it to the current pattern/track - if we get a stop message (midi, dyn, r/s) then stop - if we get a go message then start playing - toggle slide if slide button pressed - toggle accent if accent button pressed - toggle rest if rest button pressed <note classic> CodeRefactoring: This function seems rather smelly (large method, lots of complex conditionals). From a maintainability and readability standpoint it would be nice to do the "Replace conditional with function" and "Decompose Function" on this monster function to turn it into a bunch of small pieces. </note>
/home/ladyada/public_html/wiki/data/pages/x0x/pattern_play.c.txt
· Last modified: 2016/01/28 18:05 (external edit)
Page Tools
Show page
Old revisions
Backlinks
Back to top