Csound Csound-dev Csound-tekno Search About

[Csnd] Problems with -F

Date2024-03-20 18:51
FromRisto Kuusisto
Subject[Csnd] Problems with -F
Might be that I simply don't understand (quite a new one with Csound). I understood from the explanation that with -F the behaviour is the same as if the midi-events would come from a real midi-source. Also that the timing of the events when executed correspond to the (relative) time points in the midi-file.
My environment is
- XUbuntu 22.04 with Ubuntu Studio installation. 
--Csound version 6.17 (double samples) 2022-04-08
        libsndfile-1.0.31

I have a simple midi-test-file with a few midiCC's.
The piece of simple test csd-code that prints information (taken from some example case) looks like this:

  sr = 44100
  ksmps = 441
  nchnls = 2
  0dbfs = 1
...

  instr 1

  kStatus, kChan, kData1, kData2 midiin

  if kStatus != 0 then ;print if any new MIDI message has been received
    printk 0, kStatus
    printk 0, kChan
    printk 0, kData1
    printk 0, kData2

  endif
  endin

From sr and ksmps values it follows that kr = 100 (10ms).
Csound works with no problems and gives the expected output, e.g:
 ...
i   1 time     5.95000:   176.00000
 i   1 time     5.95000:     1.00000
 i   1 time     5.95000:    40.00000
 i   1 time     5.95000:    51.00000
 ...

That looks also correct. The time points in [s] look correct and also the interpretation of the events is OK.The only problem is with the timing of the
realtime-events. 
As you can see in the example above, that event in question should happen in real-time at about 6 s from the beginning.
Unfortunately csound shows all the events immediately successively without any kind of time between the events.

Is there something wrong in my understanding or should Ii use some additional flag in addition to -F?

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

Date2024-03-20 19:47
FromVictor Lazzarini
SubjectRe: [Csnd] [EXTERNAL] [Csnd] Problems with -F
Can you copy here the complete CSD so we can see what you want to do?

Prof. Victor Lazzarini
Maynooth University
Ireland

> On 20 Mar 2024, at 19:02, Risto Kuusisto  wrote:
>
> *Warning*
>
> This email originated from outside of Maynooth University's Mail System. Do not reply, click links or open attachments unless you recognise the sender and know the content is safe.
>
> Might be that I simply don't understand (quite a new one with Csound). I understood from the explanation that with -F the behaviour is the same as if the midi-events would come from a real midi-source. Also that the timing of the events when executed correspond to the (relative) time points in the midi-file.
> My environment is
> - XUbuntu 22.04 with Ubuntu Studio installation.
> --Csound version 6.17 (double samples) 2022-04-08
>        libsndfile-1.0.31
>
> I have a simple midi-test-file with a few midiCC's.
> The piece of simple test csd-code that prints information (taken from some example case) looks like this:
>
>  sr = 44100
>  ksmps = 441
>  nchnls = 2
>  0dbfs = 1
> ...
>
>  instr 1
>
>  kStatus, kChan, kData1, kData2 midiin
>
>  if kStatus != 0 then ;print if any new MIDI message has been received
>    printk 0, kStatus
>    printk 0, kChan
>    printk 0, kData1
>    printk 0, kData2
>
>  endif
>  endin
>
> From sr and ksmps values it follows that kr = 100 (10ms).
> Csound works with no problems and gives the expected output, e.g:
> ...
> i   1 time     5.95000:   176.00000
> i   1 time     5.95000:     1.00000
> i   1 time     5.95000:    40.00000
> i   1 time     5.95000:    51.00000
> ...
>
> That looks also correct. The time points in [s] look correct and also the interpretation of the events is OK.The only problem is with the timing of the
> realtime-events.
> As you can see in the example above, that event in question should happen in real-time at about 6 s from the beginning.
> Unfortunately csound shows all the events immediately successively without any kind of time between the events.
>
> Is there something wrong in my understanding or should Ii use some additional flag in addition to -F?
>
> 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