If you have a problem or need to report a bug please email : support@dsprobotics.com
There are 3 sections to this support area:
DOWNLOADS: access to product manuals, support files and drivers
HELP & INFORMATION: tutorials and example files for learning or finding pre-made modules for your projects
USER FORUMS: meet with other users and exchange ideas, you can also get help and assistance here
NEW REGISTRATIONS - please contact us if you wish to register on the forum
Users are reminded of the forum rules they sign up to which prohibits any activity that violates any laws including posting material covered by copyright
different starttime for host sequence and ticker bug!?
23 posts
• Page 2 of 3 • 1, 2, 3
Re: different starttime for host sequence and ticker bug!?
Nubeat7 wrote:does anyone know another way to get the time difference between 2 ruby events?
This one might be of use....checks time difference between methods...
- Code: Select all
class Timer
def self.time(&block)
start_time = Time.now
result = block.call
end_time = Time.now
@time_taken = end_time - start_time
result
end
def self.elapsedTime
return @time_taken
end
end
Timer.time { output 0, "Hello, World" }
output 1,Timer.elapsedTime
BV MUSIC SYDNEY AUSTRALIA..Songwriting and Software development
Headquartershttps://www.bvmusicsydneyaustralia.com/
Spotifyhttps://open.spotify.com/artist/7JO8QM40mVmHb7pAwKPJi0
Donatationhttps://www.paypal.com/donate/?hosted_button_id=HEUR8R7K8GZ4L
Headquartershttps://www.bvmusicsydneyaustralia.com/
Spotifyhttps://open.spotify.com/artist/7JO8QM40mVmHb7pAwKPJi0
Donatationhttps://www.paypal.com/donate/?hosted_button_id=HEUR8R7K8GZ4L
- billv
- Posts: 1157
- Joined: Tue Aug 31, 2010 3:34 pm
- Location: Australia
Re: different starttime for host sequence and ticker bug!?
Exo wrote:Works in the VST here.
Often when it start is says 1 millisecond and then the next is often a lot shorter than the others, but the sync is definitely not stable there is often a few milliseconds difference, but some time the difference is quite a lot.
for instance at BPM 30 time in milliseconds averages 2010.000 milliseconds , occasionally it is 1900.000 milliseconds
and the first is usually 1899.000 or thereabouts. So not stable at all.
I would be wondering if there isn't a difference! The not stable thing there is the measurement. That's because of the Time method itself and the fact that 2 events happening at the same time will get processed one after the other by the method. The Time methods works with the schematic clock, which counts in 1/100 steps or 100 Hz.
With these conditions it's impossible to measure exactly to a millisecond. It will even be imprecise in the 100th.
"There lies the dog buried" (German saying translated literally)
- tulamide
- Posts: 2714
- Joined: Sat Jun 21, 2014 2:48 pm
- Location: Germany
Re: different starttime for host sequence and ticker bug!?
@Nubeat7
There's a shorter way to wrap the numbers. Instead of calling a method after having added 1 do this:
Just replace 4 with the number of steps (8 for 8th notes, 16 for 16th notes, etc.)
There's a shorter way to wrap the numbers. Instead of calling a method after having added 1 do this:
- Code: Select all
#Not needed anymore
#@count += 1
#@count = wrap(@count,1,5)
#Better way
@count = (@count % 4) + 1
Just replace 4 with the number of steps (8 for 8th notes, 16 for 16th notes, etc.)
"There lies the dog buried" (German saying translated literally)
- tulamide
- Posts: 2714
- Joined: Sat Jun 21, 2014 2:48 pm
- Location: Germany
Re: different starttime for host sequence and ticker bug!?
damn, the time difference between the ticks doesn't work here as vst, tested it in cubase, FL, live and renoise....
about the unstable times, tulamide could be right because when you test it in FL there is (should be) no difference between the notes and the ticks, so they would get triggered at the same time but if you simply test it without notes (so no trigger at input 1) it should just show the time between each trigger from the counter which should be accurate when using asio drivers if we trust FS user guide!
wondering why it doesn't work on my machine....
about the unstable times, tulamide could be right because when you test it in FL there is (should be) no difference between the notes and the ticks, so they would get triggered at the same time but if you simply test it without notes (so no trigger at input 1) it should just show the time between each trigger from the counter which should be accurate when using asio drivers if we trust FS user guide!
wondering why it doesn't work on my machine....
-
Nubeat7 - Posts: 1347
- Joined: Sat Apr 14, 2012 9:59 am
- Location: Vienna
Re: different starttime for host sequence and ticker bug!?
ok i tested it now on my other computer with asio 4 all driver, and there it works
maybe its my presonus firewire interface which mess it up on the other machine!?
tested it in renoise and like exo said if i just run the ticker there is a difference between each tick - it varies between 470 and 515 ms while it should be 500 at 120 bpm..
but if i also set a note on each beat it constantly shows 1000, 0 or 2000 ms which shows me that it is tight! and there are no gaps between note and ticker...
the strange thing is when just one of both counts it shows different times with each tick!?
maybe its my presonus firewire interface which mess it up on the other machine!?
tested it in renoise and like exo said if i just run the ticker there is a difference between each tick - it varies between 470 and 515 ms while it should be 500 at 120 bpm..
but if i also set a note on each beat it constantly shows 1000, 0 or 2000 ms which shows me that it is tight! and there are no gaps between note and ticker...
the strange thing is when just one of both counts it shows different times with each tick!?
-
Nubeat7 - Posts: 1347
- Joined: Sat Apr 14, 2012 9:59 am
- Location: Vienna
Re: different starttime for host sequence and ticker bug!?
anyway now that the time works, the schematic could be simplyfied, and only triggers needed to be sent instead of counting, with this schematic if you run the original test wit 4 notes on each beat, setting the songposition to start and press play it measure the time between tick and note correct, its between 0 and 1 ms constantly (tested in renoise)
also if only the ticker or the only the sequence is runnung in host it just differs with 2 ms up or down the value it should be... which i think is because it sends the actual time - the last time to output and then it sets the new last time so it can differ a little bit
this schematic works also on the other machine! and it shows me an offset in cubase from 160 ms between ticker and sequence! (pretty constant) while the ticker starts earlier then the notesequence!
which has nothing to do with the soundcard latency because this is 21 ms for input and 25 ms for output.
Edit: updated schematic using FS the internal time system which makes it all accurate now! thanks tronic
also if only the ticker or the only the sequence is runnung in host it just differs with 2 ms up or down the value it should be... which i think is because it sends the actual time - the last time to output and then it sets the new last time so it can differ a little bit
this schematic works also on the other machine! and it shows me an offset in cubase from 160 ms between ticker and sequence! (pretty constant) while the ticker starts earlier then the notesequence!
which has nothing to do with the soundcard latency because this is 21 ms for input and 25 ms for output.
Edit: updated schematic using FS the internal time system which makes it all accurate now! thanks tronic
- Attachments
-
- ticktest.fsm
- (137.59 KiB) Downloaded 801 times
Last edited by Nubeat7 on Wed Oct 08, 2014 8:19 am, edited 1 time in total.
-
Nubeat7 - Posts: 1347
- Joined: Sat Apr 14, 2012 9:59 am
- Location: Vienna
Re: different starttime for host sequence and ticker bug!?
It doesn't work like you described for me. Tested in Reaper:
120 bpm, 4 quarter notes
Running the sequence with 'ticker play' off results in pretty stable 500 ms, where sometimes it's one 1/128th note earlier (484.375) and sometimes one 1/128th note later (515,625). This can't be a result of Reaper's resolution, since ppq is 960. So, it's 15.625 ms difference sometimes.
Running the sequence with 'ticker play' on switches to unstable with values changing so fast that I can't tell the in between numbers, only those that rest for a while. And those are 31.250 (which apparently is 2* 15.625), 46.875 (which is 3* 15.625) and sometimes 62.5 (guess what, 4* 15.625)
At least there is some kind of rule, in the case of Reaper it's exactly 15.625 ms.
EDIT: Forgot to mention that the ticker starts right in time with the sequence.
120 bpm, 4 quarter notes
Running the sequence with 'ticker play' off results in pretty stable 500 ms, where sometimes it's one 1/128th note earlier (484.375) and sometimes one 1/128th note later (515,625). This can't be a result of Reaper's resolution, since ppq is 960. So, it's 15.625 ms difference sometimes.
Running the sequence with 'ticker play' on switches to unstable with values changing so fast that I can't tell the in between numbers, only those that rest for a while. And those are 31.250 (which apparently is 2* 15.625), 46.875 (which is 3* 15.625) and sometimes 62.5 (guess what, 4* 15.625)
At least there is some kind of rule, in the case of Reaper it's exactly 15.625 ms.
EDIT: Forgot to mention that the ticker starts right in time with the sequence.
"There lies the dog buried" (German saying translated literally)
- tulamide
- Posts: 2714
- Joined: Sat Jun 21, 2014 2:48 pm
- Location: Germany
Re: different starttime for host sequence and ticker bug!?
don't use Time.now
use the internal time event
def event i,v,t
case i
when 0
output t - @last
@last = t
when 1
output t - @last
@last = t
end
end
This is more precise bucouse it not call any system function, but i think it is an internal call of class event in C side.
use the internal time event
def event i,v,t
case i
when 0
output t - @last
@last = t
when 1
output t - @last
@last = t
end
end
This is more precise bucouse it not call any system function, but i think it is an internal call of class event in C side.
- Tronic
- Posts: 539
- Joined: Wed Dec 21, 2011 12:59 pm
Re: different starttime for host sequence and ticker bug!?
thank you very much tronic, thats what i was searching for! so when using asio its also the asio clock then!
i updated the last schematic with your suggestion...
@tulamide
could you try the new version with reaper please? if there is a offset between notes and ticks?
the offset in cubase is 156ms (tested with the new version) but if i change the soundcard latency from 20 to 2 ms the offset is 178and when i set the latency of the soundcard to 40 ms the offset is 140ms...
btw am i the only one who's using cubase around here?
i updated the last schematic with your suggestion...
@tulamide
could you try the new version with reaper please? if there is a offset between notes and ticks?
the offset in cubase is 156ms (tested with the new version) but if i change the soundcard latency from 20 to 2 ms the offset is 178and when i set the latency of the soundcard to 40 ms the offset is 140ms...
btw am i the only one who's using cubase around here?
-
Nubeat7 - Posts: 1347
- Joined: Sat Apr 14, 2012 9:59 am
- Location: Vienna
Re: different starttime for host sequence and ticker bug!?
The less soundcard latency, the bigger the buffers. That might be the reason (The computer has to do a lot more work when latency is at 2 ms than at 40 ms)Nubeat7 wrote:@tulamide
could you try the new version with reaper please? if there is a offset between notes and ticks?
the offset in cubase is 156ms (tested with the new version) but if i change the soundcard latency from 20 to 2 ms the offset is 178and when i set the latency of the soundcard to 40 ms the offset is 140ms...
Just tested it. 120bpm, 4 quarter notes, Asio4all @13ms
ticker play without a sequence = 500ms stable.
ticker play with a sequence playing = a different value each time I try (but that value stays stable while playing). Lowest was 6 ms, highest somewhere at 380ms.
There was no delay, although the numbers tell something else. There's a quick value change at the beginning of each tick, and this change happened exactly at note positions.
Nubeat7 wrote:btw am i the only one who's using cubase around here?
600€ for the full version? When Reaper offers the same (and more) for 48€?
"There lies the dog buried" (German saying translated literally)
- tulamide
- Posts: 2714
- Joined: Sat Jun 21, 2014 2:48 pm
- Location: Germany
23 posts
• Page 2 of 3 • 1, 2, 3
Who is online
Users browsing this forum: No registered users and 77 guests