aboutsummaryrefslogtreecommitdiff
path: root/sonics/sequencing_melodic.udo
diff options
context:
space:
mode:
authorRichard <richard@1bpm.net>2022-10-04 21:46:41 +0100
committerRichard <richard@1bpm.net>2022-10-04 21:46:41 +0100
commitcd457011be1e053f154d1d78b0e733c131470dca (patch)
tree3e6fe072c9bd9b8bb5b279f740b6c496d066b172 /sonics/sequencing_melodic.udo
parent3c531249028207afa1255bd6c2b9c3486228613d (diff)
downloadcsd-partialemergence-cd457011be1e053f154d1d78b0e733c131470dca.tar.gz
csd-partialemergence-cd457011be1e053f154d1d78b0e733c131470dca.tar.bz2
csd-partialemergence-cd457011be1e053f154d1d78b0e733c131470dca.zip
now using soundxdb extract rather than database opcodes directly
Diffstat (limited to 'sonics/sequencing_melodic.udo')
-rwxr-xr-xsonics/sequencing_melodic.udo11
1 files changed, 6 insertions, 5 deletions
diff --git a/sonics/sequencing_melodic.udo b/sonics/sequencing_melodic.udo
index 05fb614..69f6a70 100755
--- a/sonics/sequencing_melodic.udo
+++ b/sonics/sequencing_melodic.udo
@@ -10,11 +10,8 @@
http://1bpm.net
*/
-
-#include "sonics/__config__.udo" ; using fftsize for tuning
#include "sonics/chords.udo" ; chord data
#include "sonics/sequencing.udo" ; sequencer base
-#include "sonics/wavetables.udo" ; for tuning
; if these are set, then don't launch the manager automatically. sequencing_melodic_persistence will load accordingly
#ifdef MEL_INITPATH
@@ -48,6 +45,7 @@ gimel_next_notes ftgen 0, 0, -13, -7, 0 ; next notes: index 0 is the length
gimel_temp_random ftgen 0, 0, -gimel_number, -7, 0 ; temp storage for pattern randomisation
gkmel_section_change init 0 ; section change trigger
+gkmel_section_change_due init 0 ; how many beats until next section change
gkmel_futures_refresh_trig init 0 ; trigger to set if futures are to be recalculated
gkmel_pause init 0 ; pause progression changes
@@ -536,12 +534,15 @@ instr _mel_manager
gkmel_section_change = 1
endif
- if (kstep < table:k(_mel_currentsectionget:k(), gimel_lengths) - 1) then ; current step < current length
+ ksectionlength = table:k(_mel_currentsectionget:k(), gimel_lengths)
+ gkmel_section_change_due = ksectionlength - kstep
+
+ if (kstep < ksectionlength - 1) then ; current step < current length
kstep += 1
else
kstep = 0
endif
-
+
endif ; end each beat