Csound Csound-dev Csound-tekno Search About

[Csnd] Is MIDI output timing accurate?

Date2017-10-01 15:55
FromTobiah
Subject[Csnd] Is MIDI output timing accurate?
Attachmentsdrums.wav  
I generated a repeating one measure drum score.  I run
it on an orchestra that just passes MIDI events to the
portaudio driver.  I chose a virtual MIDI cable as output
(LoopBe) that goes into a Reaper track with a Kontakt drum
instrument as the effect.  All goes well, but the timing
of the events seems a little erratic, and I suspect that
Csound is the culprit.  I remember reading on this list
long ago something about the uncertainty of when a MIDI
event may actually go out.  I'm setting ksmps=1 in case
that matters.

Here is some sample audio.  The score is timed correctly,
the values coming from a score generator program.  I believe
I'm hearing imperfect timing.


Thanks for any input.


Tobiah

Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here

Date2017-10-01 16:46
FromPMA
SubjectRe: [Csnd] Is MIDI output timing accurate?
Hi Tobiah --

FWIW, I've had the same issue with MIDI sans Csound.
In 4/4 perpetually alternating a single quarter-note
and four 16ths, the 16th-group takes longer than the
quarter.  Not by much -- just enough to "overstuff".

I've been feeding MIDI output to PianoTeq.  Whether
in process the latter compounds this time-bloating,
I can't quite tell.

Good luck!

Peter


On 10/01/2017 10:55 AM, Tobiah wrote:
> I generated a repeating one measure drum score.  I run
> it on an orchestra that just passes MIDI events to the
> portaudio driver.  I chose a virtual MIDI cable as output
> (LoopBe) that goes into a Reaper track with a Kontakt drum
> instrument as the effect.  All goes well, but the timing
> of the events seems a little erratic, and I suspect that
> Csound is the culprit.  I remember reading on this list
> long ago something about the uncertainty of when a MIDI
> event may actually go out.  I'm setting ksmps=1 in case
> that matters.
>
> Here is some sample audio.  The score is timed correctly,
> the values coming from a score generator program.  I believe
> I'm hearing imperfect timing.
>
>
> Thanks for any input.
>
>
> Tobiah
>
> Csound mailing list
> Csound@listserv.heanet.ie
> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
> Send bugs reports to
>         https://github.com/csound/csound/issues
> Discussions of bugs and features can be posted here

Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here

Date2017-10-01 19:38
FromRory Walsh
SubjectRe: [Csnd] Is MIDI output timing accurate?
Hi Tobiah. Why not simply run Csound inside Reaper rather than patching MIDI signals around the place? I can't say for certain the timing issues will disappear but I expect things might improve. 

On 1 October 2017 at 16:46, PMA <armstrng@eskimo.com> wrote:
Hi Tobiah --

FWIW, I've had the same issue with MIDI sans Csound.
In 4/4 perpetually alternating a single quarter-note
and four 16ths, the 16th-group takes longer than the
quarter.  Not by much -- just enough to "overstuff".

I've been feeding MIDI output to PianoTeq.  Whether
in process the latter compounds this time-bloating,
I can't quite tell.

Good luck!

Peter



On 10/01/2017 10:55 AM, Tobiah wrote:
I generated a repeating one measure drum score.  I run
it on an orchestra that just passes MIDI events to the
portaudio driver.  I chose a virtual MIDI cable as output
(LoopBe) that goes into a Reaper track with a Kontakt drum
instrument as the effect.  All goes well, but the timing
of the events seems a little erratic, and I suspect that
Csound is the culprit.  I remember reading on this list
long ago something about the uncertainty of when a MIDI
event may actually go out.  I'm setting ksmps=1 in case
that matters.

Here is some sample audio.  The score is timed correctly,
the values coming from a score generator program.  I believe
I'm hearing imperfect timing.


Thanks for any input.


Tobiah

Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here

Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
       https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here

Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here

Date2017-10-01 20:21
FromAnders Genell
SubjectRe: [Csnd] Is MIDI output timing accurate?
I seem to remember someone experiencing timing improvement by using the --sample-accurate. It was probably k-rate timing and if you're using ksmps=1 it might not make a difference but it's easy to try out. 

Regards
Anders

> 1 okt. 2017 kl. 16:55 skrev Tobiah :
> 
> I generated a repeating one measure drum score.  I run
> it on an orchestra that just passes MIDI events to the
> portaudio driver.  I chose a virtual MIDI cable as output
> (LoopBe) that goes into a Reaper track with a Kontakt drum
> instrument as the effect.  All goes well, but the timing
> of the events seems a little erratic, and I suspect that
> Csound is the culprit.  I remember reading on this list
> long ago something about the uncertainty of when a MIDI
> event may actually go out.  I'm setting ksmps=1 in case
> that matters.
> 
> Here is some sample audio.  The score is timed correctly,
> the values coming from a score generator program.  I believe
> I'm hearing imperfect timing.
> 
> 
> Thanks for any input.
> 
> 
> Tobiah
> 
> Csound mailing list
> Csound@listserv.heanet.ie
> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
> Send bugs reports to
>       https://github.com/csound/csound/issues
> Discussions of bugs and features can be posted here
> 

Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here

Date2017-10-03 00:56
FromTobiah
SubjectRe: [Csnd] Is MIDI output timing accurate?
You mean with cabbage, right?  I've never gotten the vst version
of csound to run in Reaper.


Tobiah



On 10/1/2017 11:38 AM, Rory Walsh wrote:
> Hi Tobiah. Why not simply run Csound inside Reaper rather than patching 
> MIDI signals around the place? I can't say for certain the timing issues 
> will disappear but I expect things might improve.
> 
> On 1 October 2017 at 16:46, PMA  > wrote:
> 
>     Hi Tobiah --
> 
>     FWIW, I've had the same issue with MIDI sans Csound.
>     In 4/4 perpetually alternating a single quarter-note
>     and four 16ths, the 16th-group takes longer than the
>     quarter.  Not by much -- just enough to "overstuff".
> 
>     I've been feeding MIDI output to PianoTeq.  Whether
>     in process the latter compounds this time-bloating,
>     I can't quite tell.
> 
>     Good luck!
> 
>     Peter
> 
> 
> 
>     On 10/01/2017 10:55 AM, Tobiah wrote:
> 
>         I generated a repeating one measure drum score.  I run
>         it on an orchestra that just passes MIDI events to the
>         portaudio driver.  I chose a virtual MIDI cable as output
>         (LoopBe) that goes into a Reaper track with a Kontakt drum
>         instrument as the effect.  All goes well, but the timing
>         of the events seems a little erratic, and I suspect that
>         Csound is the culprit.  I remember reading on this list
>         long ago something about the uncertainty of when a MIDI
>         event may actually go out.  I'm setting ksmps=1 in case
>         that matters.
> 
>         Here is some sample audio.  The score is timed correctly,
>         the values coming from a score generator program.  I believe
>         I'm hearing imperfect timing.
> 
> 
>         Thanks for any input.
> 
> 
>         Tobiah
> 
>         Csound mailing list
>         Csound@listserv.heanet.ie 
>         https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
>         
>         Send bugs reports to
>         https://github.com/csound/csound/issues
>         
>         Discussions of bugs and features can be posted here
> 
> 
>     Csound mailing list
>     Csound@listserv.heanet.ie 
>     https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
>     
>     Send bugs reports to
>     https://github.com/csound/csound/issues
>     
>     Discussions of bugs and features can be posted here
> 
> 
> Csound mailing list Csound@listserv.heanet.ie 
>  
> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to 
> https://github.com/csound/csound/issues Discussions of bugs and features 
> can be posted here

Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here

Date2017-10-03 10:11
FromRory Walsh
SubjectRe: [Csnd] Is MIDI output timing accurate?
What was the problem?  

On 3 October 2017 at 00:56, Tobiah <toby@tobiah.org> wrote:
You mean with cabbage, right?  I've never gotten the vst version
of csound to run in Reaper.


Tobiah



On 10/1/2017 11:38 AM, Rory Walsh wrote:
Hi Tobiah. Why not simply run Csound inside Reaper rather than patching MIDI signals around the place? I can't say for certain the timing issues will disappear but I expect things might improve.

On 1 October 2017 at 16:46, PMA <armstrng@eskimo.com <mailto:armstrng@eskimo.com>> wrote:

    Hi Tobiah --

    FWIW, I've had the same issue with MIDI sans Csound.
    In 4/4 perpetually alternating a single quarter-note
    and four 16ths, the 16th-group takes longer than the
    quarter.  Not by much -- just enough to "overstuff".

    I've been feeding MIDI output to PianoTeq.  Whether
    in process the latter compounds this time-bloating,
    I can't quite tell.

    Good luck!

    Peter



    On 10/01/2017 10:55 AM, Tobiah wrote:

        I generated a repeating one measure drum score.  I run
        it on an orchestra that just passes MIDI events to the
        portaudio driver.  I chose a virtual MIDI cable as output
        (LoopBe) that goes into a Reaper track with a Kontakt drum
        instrument as the effect.  All goes well, but the timing
        of the events seems a little erratic, and I suspect that
        Csound is the culprit.  I remember reading on this list
        long ago something about the uncertainty of when a MIDI
        event may actually go out.  I'm setting ksmps=1 in case
        that matters.

        Here is some sample audio.  The score is timed correctly,
        the values coming from a score generator program.  I believe
        I'm hearing imperfect timing.


        Thanks for any input.


        Tobiah

        Csound mailing list
        Csound@listserv.heanet.ie <mailto:Csound@listserv.heanet.ie>
        https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
        <https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND>
        Send bugs reports to
        https://github.com/csound/csound/issues
        <https://github.com/csound/csound/issues>
        Discussions of bugs and features can be posted here


    Csound mailing list
    Csound@listserv.heanet.ie <mailto:Csound@listserv.heanet.ie>
    https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
    <https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND>
    Send bugs reports to
    https://github.com/csound/csound/issues
    <https://github.com/csound/csound/issues>
    Discussions of bugs and features can be posted here


Csound mailing list Csound@listserv.heanet.ie <mailto:Csound@listserv.heanet.ie> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here

Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
       https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here

Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here

Date2017-10-04 16:32
FromTobiah
SubjectRe: [Csnd] Is MIDI output timing accurate?
On 10/03/2017 02:11 AM, Rory Walsh wrote:
> What was the problem?

It just can't load the .dll.  I'm talking about
csoundVST though, not cabbage.  I guess I'll have to
give cabbage a go.  With cabbage, can I just edit the
score and orc files without reloading anything from Reaper?

How does cabbage react when I manipulate the transport, pausing,
rewinding, etc.?


Thanks

Tobiah



> On 3 October 2017 at 00:56, Tobiah  > wrote:
> 
>     You mean with cabbage, right?  I've never gotten the vst version
>     of csound to run in Reaper.
> 
> 
>     Tobiah
> 
> 
> 
>     On 10/1/2017 11:38 AM, Rory Walsh wrote:
> 
>         Hi Tobiah. Why not simply run Csound inside Reaper rather than
>         patching MIDI signals around the place? I can't say for certain
>         the timing issues will disappear but I expect things might improve.
> 
>         On 1 October 2017 at 16:46, PMA                    >> wrote:
> 
>              Hi Tobiah --
> 
>              FWIW, I've had the same issue with MIDI sans Csound.
>              In 4/4 perpetually alternating a single quarter-note
>              and four 16ths, the 16th-group takes longer than the
>              quarter.  Not by much -- just enough to "overstuff".
> 
>              I've been feeding MIDI output to PianoTeq.  Whether
>              in process the latter compounds this time-bloating,
>              I can't quite tell.
> 
>              Good luck!
> 
>              Peter
> 
> 
> 
>              On 10/01/2017 10:55 AM, Tobiah wrote:
> 
>                  I generated a repeating one measure drum score.  I run
>                  it on an orchestra that just passes MIDI events to the
>                  portaudio driver.  I chose a virtual MIDI cable as output
>                  (LoopBe) that goes into a Reaper track with a Kontakt drum
>                  instrument as the effect.  All goes well, but the timing
>                  of the events seems a little erratic, and I suspect that
>                  Csound is the culprit.  I remember reading on this list
>                  long ago something about the uncertainty of when a MIDI
>                  event may actually go out.  I'm setting ksmps=1 in case
>                  that matters.
> 
>                  Here is some sample audio.  The score is timed correctly,
>                  the values coming from a score generator program.  I
>         believe
>                  I'm hearing imperfect timing.
> 
> 
>                  Thanks for any input.
> 
> 
>                  Tobiah
> 
>                  Csound mailing list
>         Csound@listserv.heanet.ie 
>                  >
>         https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
>         
>                           >
>                  Send bugs reports to
>         https://github.com/csound/csound/issues
>         
>                           >
>                  Discussions of bugs and features can be posted here
> 
> 
>              Csound mailing list
>         Csound@listserv.heanet.ie 
>                  >
>         https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
>         
>                       >
>              Send bugs reports to
>         https://github.com/csound/csound/issues
>         
>                       >
>              Discussions of bugs and features can be posted here
> 
> 
>         Csound mailing list Csound@listserv.heanet.ie
>         
>                  >
>         https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
>          Send bugs
>         reports to https://github.com/csound/csound/issues
>          Discussions of bugs
>         and features can be posted here
> 
> 
>     Csound mailing list
>     Csound@listserv.heanet.ie 
>     https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
>     
>     Send bugs reports to
>     https://github.com/csound/csound/issues
>     
>     Discussions of bugs and features can be posted here
> 
> 
> Csound mailing list Csound@listserv.heanet.ie 
>  
> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to 
> https://github.com/csound/csound/issues Discussions of bugs and features 
> can be posted here

Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here

Date2017-10-04 19:39
FromRory Walsh
SubjectRe: [Csnd] Is MIDI output timing accurate?
Re Cabbage, you'll have to re-instantiate the plugin if you make changes to its code. You can query what the host is doing at any time by using some reserved channels. For instance, this code will give you all the info the host provides to plugins:

kBPM chnget "HOST_BPM"
kIsPlaying chnget "IS_PLAYING"
kIsRecording chnget "IS_RECORDING"
kTimeInSeconds chnget "TIME_IN_SECONDS"
kPPQPosition chnget "HOST_PPQ_POS"
kTimeInSamples chnget "TIME_IN_SAMPLES"
kTimeSigNum chnget "TIME_SIG_NUM"
kTimeSigDenom chnget "TIME_SIG_DENOM"



On 4 October 2017 at 16:32, Tobiah <toby@tobiah.org> wrote:
On 10/03/2017 02:11 AM, Rory Walsh wrote:
What was the problem?

It just can't load the .dll.  I'm talking about
csoundVST though, not cabbage.  I guess I'll have to
give cabbage a go.  With cabbage, can I just edit the
score and orc files without reloading anything from Reaper?

How does cabbage react when I manipulate the transport, pausing,
rewinding, etc.?


Thanks

Tobiah



On 3 October 2017 at 00:56, Tobiah <toby@tobiah.org <mailto:toby@tobiah.org>> wrote:

    You mean with cabbage, right?  I've never gotten the vst version
    of csound to run in Reaper.


    Tobiah



    On 10/1/2017 11:38 AM, Rory Walsh wrote:

        Hi Tobiah. Why not simply run Csound inside Reaper rather than
        patching MIDI signals around the place? I can't say for certain
        the timing issues will disappear but I expect things might improve.

        On 1 October 2017 at 16:46, PMA <armstrng@eskimo.com
        <mailto:armstrng@eskimo.com> <mailto:armstrng@eskimo.com
        <mailto:armstrng@eskimo.com>>> wrote:

             Hi Tobiah --

             FWIW, I've had the same issue with MIDI sans Csound.
             In 4/4 perpetually alternating a single quarter-note
             and four 16ths, the 16th-group takes longer than the
             quarter.  Not by much -- just enough to "overstuff".

             I've been feeding MIDI output to PianoTeq.  Whether
             in process the latter compounds this time-bloating,
             I can't quite tell.

             Good luck!

             Peter



             On 10/01/2017 10:55 AM, Tobiah wrote:

                 I generated a repeating one measure drum score.  I run
                 it on an orchestra that just passes MIDI events to the
                 portaudio driver.  I chose a virtual MIDI cable as output
                 (LoopBe) that goes into a Reaper track with a Kontakt drum
                 instrument as the effect.  All goes well, but the timing
                 of the events seems a little erratic, and I suspect that
                 Csound is the culprit.  I remember reading on this list
                 long ago something about the uncertainty of when a MIDI
                 event may actually go out.  I'm setting ksmps=1 in case
                 that matters.

                 Here is some sample audio.  The score is timed correctly,
                 the values coming from a score generator program.  I
        believe
                 I'm hearing imperfect timing.


                 Thanks for any input.


                 Tobiah

                 Csound mailing list
        Csound@listserv.heanet.ie <mailto:Csound@listserv.heanet.ie>
        <mailto:Csound@listserv.heanet.ie
        <mailto:Csound@listserv.heanet.ie>>
        https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
        <https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND>
                 <https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
        <https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND>>
                 Send bugs reports to
        https://github.com/csound/csound/issues
        <https://github.com/csound/csound/issues>
                 <https://github.com/csound/csound/issues
        <https://github.com/csound/csound/issues>>
                 Discussions of bugs and features can be posted here


             Csound mailing list
        Csound@listserv.heanet.ie <mailto:Csound@listserv.heanet.ie>
        <mailto:Csound@listserv.heanet.ie
        <mailto:Csound@listserv.heanet.ie>>
        https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
        <https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND>
             <https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
        <https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND>>
             Send bugs reports to
        https://github.com/csound/csound/issues
        <https://github.com/csound/csound/issues>
             <https://github.com/csound/csound/issues
        <https://github.com/csound/csound/issues>>
             Discussions of bugs and features can be posted here


        Csound mailing list Csound@listserv.heanet.ie
        <mailto:Csound@listserv.heanet.ie>
        <mailto:Csound@listserv.heanet.ie
        <mailto:Csound@listserv.heanet.ie>>
        https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
        <https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND> Send bugs
        reports to https://github.com/csound/csound/issues
        <https://github.com/csound/csound/issues> Discussions of bugs
        and features can be posted here


    Csound mailing list
    Csound@listserv.heanet.ie <mailto:Csound@listserv.heanet.ie>
    https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
    <https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND>
    Send bugs reports to
    https://github.com/csound/csound/issues
    <https://github.com/csound/csound/issues>
    Discussions of bugs and features can be posted here


Csound mailing list Csound@listserv.heanet.ie <mailto:Csound@listserv.heanet.ie> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here

Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
       https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here

Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here