merlinhimself
Senior Member
What is the best way to achieve listener beat accuracy when it comes to pressing play on your transport and ticks sync up perfectly to the beat as well as when the transport is stopped playing a note and listener starting on that?
Basically, I have an issue now that my sequencer is occasionally starting late 1/64th note because the listener may or may not be in the middle of a tick when a note is called, so it waits till the next time it gets its signal and then goes through it all causing a delay. Right now the listener is running every 64th as soon as kontakt starts not in relation to the transport activating or a note being played.
(I rephrased this whole thread as it started out as me having no clue what or why, and slowly i figured it out lol. Just making it easier for anyone willing to help! At this point I know whats happening but stuck on how to fix it)
Heres a general sum of my code (please pardon my mess, I was trying to figure it out)
Basically, I have an issue now that my sequencer is occasionally starting late 1/64th note because the listener may or may not be in the middle of a tick when a note is called, so it waits till the next time it gets its signal and then goes through it all causing a delay. Right now the listener is running every 64th as soon as kontakt starts not in relation to the transport activating or a note being played.
(I rephrased this whole thread as it started out as me having no clue what or why, and slowly i figured it out lol. Just making it easier for anyone willing to help! At this point I know whats happening but stuck on how to fix it)
Heres a general sum of my code (please pardon my mess, I was trying to figure it out)
Code:
function playseq1
if ($seqmute1 = 0)
if ($tick_counter mod %rate_ticks[$notevalue1] = 0)
$velocity1 := %steps1[$counter1]
if ($velocity1 > 80)
select ($RR_F1)
case 0
$Magic_Note_ID := play_note($key_seq1, 83, 0, -1)
call groupswitch1
case 1
$Magic_Note_ID := play_note($key_seq1, 88, 0, -1)
call groupswitch1
case 2
$Magic_Note_ID := play_note($key_seq1, 93, 0, -1)
call groupswitch1
ETC
ETC
ETC
end select
change_vol($Magic_Note_ID, (($velocity1 - 128) * $velnum), 1)
inc($RR_F1)
if($RR_F1 = 8)
$RR_F1 := 0
end if
DOES OTHER VELOCITIES ETC ETC
end if
end function
on listener
if ($note_count = 0)
$tick_counter := 0
end if
if ($seq1_note_count > 0)
call playseq1
end if
on note
ignore_event($EVENT_ID)
if ($EVENT_NOTE = 48 )
$note := $EVENT_NOTE
$note1 := $EVENT_NOTE
$count := 0
while ($count < 8)
if ($EVENT_NOTE = %seq1_notes[$count])
%seq1_note_held[$count] := $EVENT_NOTE
$seq1_note_held := $EVENT_NOTE
inc($seq1_note_count)
end if
inc($count)
end while
inc($note_count)
end if
message($note_count)
end if
end on
on release
ignore_event($EVENT_ID)
message($note_count)
if ($EVENT_NOTE = 48)
dec($note_count)
$note_released := $EVENT_NOTE
$count := 0
while ($count < 8)
if ($note_released = %note_held[$count])
%note_held[$count] := 0
end if
inc($count)
end while
$count := 0
while ($count < 8)
if ($note_released = %seq1_notes[$count])
%seq1_note_held[$count] := 0
dec($seq1_note_count)
end if
inc($count)
end while
if ($NOTE_HELD = 0)
$counter1 := 0
$counter2 := 0
$counter3 := 0
$counter4 := 0
if ($seq1_note_count = 0)
$note1 := 0
end if
end if
$count := 0
if ($note_count = 0)
while ($count < 8)
%note_held[$count] := 0
inc($count)
end while
wait(1)
$note := 0
$note1 := 0
$note2:= 0
$note3 := 0
$note4 := 0
$tick_counter := 0
$note_count := 0
end if
end if
end on
Last edited: