Csound Csound-dev Csound-tekno Search About

[Cs-dev] sample-accurate score time

Date2008-03-09 19:15
FromAlex Weiss
Subject[Cs-dev] sample-accurate score time
Hi,

Since Csound processes audio in blocks, I'm not sure if the following is
possible, but maybe someone can help: Is there a way to get a
sample-accurate score time (without having to set kr=sr)? The only thing I
can think of is to implement a custom real-time audio playback function with
csoundSetRtplayCallback. Is there an easier way?

Thanks,
Alex
-- 
View this message in context: http://www.nabble.com/sample-accurate-score-time-tp15945166p15945166.html
Sent from the Csound - Dev mailing list archive at Nabble.com.


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2008-03-09 20:07
Frommatt ingalls
SubjectRe: [Cs-dev] sample-accurate score time
the rtplaycallback is usually called even less frequently
(as -b is often > ksmps )


all score events occur at the krate resolution anyway so
"sample-accurate score time" seems strange to me --

maybe i don't understand what  you are trying to do, but
i would just use times opcode and send the value through
the api bus, if needed..

-m

On Mar 9, 2008, at 12:15 PM, Alex Weiss wrote:

>
> Hi,
>
> Since Csound processes audio in blocks, I'm not sure if the  
> following is
> possible, but maybe someone can help: Is there a way to get a
> sample-accurate score time (without having to set kr=sr)? The only  
> thing I
> can think of is to implement a custom real-time audio playback  
> function with
> csoundSetRtplayCallback. Is there an easier way?
>
> Thanks,
> Alex
> -- 
> View this message in context: http://www.nabble.com/sample-accurate-score-time-tp15945166p15945166.html
> Sent from the Csound - Dev mailing list archive at Nabble.com.
>
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2008.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel

matt ingalls
development@gvox.com




-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2008-03-09 22:08
FromAlex Weiss
SubjectRe: [Cs-dev] sample-accurate score time
Hi Matt,

I'm sorry that I wasn't clear enough. I'm trying to sync real-time csound
output with video playback. To maintain a tight sync, I wanted to obtain the
current location of the csound playback in samples and increment the current
video frame as soon as the sample count equals one frame (i.e. sr/fps). I've
never done that before, so is there maybe an easier way? Everything else
(such as getting the score time in seconds) seems to be dependent on
ksmps...

Alex



matt ingalls-2 wrote:
> 
> the rtplaycallback is usually called even less frequently
> (as -b is often > ksmps )
> 
> 
> all score events occur at the krate resolution anyway so
> "sample-accurate score time" seems strange to me --
> 
> maybe i don't understand what  you are trying to do, but
> i would just use times opcode and send the value through
> the api bus, if needed..
> 
> -m
> 

-- 
View this message in context: http://www.nabble.com/sample-accurate-score-time-tp15945166p15947272.html
Sent from the Csound - Dev mailing list archive at Nabble.com.


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2008-03-09 22:29
FromJonatan Liljedahl
SubjectRe: [Cs-dev] sample-accurate score time
Perhaps if you use JACK you could use the jack_transport opcode and use
a video player with JACK transport support, like xjadeo.

Alex Weiss wrote:
> Hi Matt,
> 
> I'm sorry that I wasn't clear enough. I'm trying to sync real-time csound
> output with video playback. To maintain a tight sync, I wanted to obtain the
> current location of the csound playback in samples and increment the current
> video frame as soon as the sample count equals one frame (i.e. sr/fps). I've
> never done that before, so is there maybe an easier way? Everything else
> (such as getting the score time in seconds) seems to be dependent on
> ksmps...
> 
> Alex
> 
> 
> 
> matt ingalls-2 wrote:
>> the rtplaycallback is usually called even less frequently
>> (as -b is often > ksmps )
>>
>>
>> all score events occur at the krate resolution anyway so
>> "sample-accurate score time" seems strange to me --
>>
>> maybe i don't understand what  you are trying to do, but
>> i would just use times opcode and send the value through
>> the api bus, if needed..
>>
>> -m
>>
> 


-- 
/Jonatan         [ http://kymatica.com ]

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net