Csound Csound-dev Csound-tekno Search About

[Csnd-dev] Setting tempo through the API

Date2022-03-19 20:15
FromIain Duncan
Subject[Csnd-dev] Setting tempo through the API
Hi devs, I would like csound6~ for Max to receive t score events, but I see that in the API manual: " 'type' is the score event type ('a', 'i', 'q', 'f', or 'e')". 

Questions: 
- why is the t event not supported? (curious)
- is the only way to do this through the csoundInputMessage call or is there some other way of setting the tempo?

thanks
iain

Date2022-03-19 20:27
FromIain Duncan
SubjectRe: [Csnd-dev] Setting tempo through the API
Further to this, I am getting an error when I try to send "t 0 120"  to csound through csoundInputMessage, even though this is a valid score line. I get:

unknown opcode
illegal RT scoreline:
t 0 60

Any suggestions most welcome!
iain

On Sat, Mar 19, 2022 at 1:15 PM Iain Duncan <iainduncanlists@gmail.com> wrote:
Hi devs, I would like csound6~ for Max to receive t score events, but I see that in the API manual: " 'type' is the score event type ('a', 'i', 'q', 'f', or 'e')". 

Questions: 
- why is the t event not supported? (curious)
- is the only way to do this through the csoundInputMessage call or is there some other way of setting the tempo?

thanks
iain

Date2022-03-19 22:52
FromVictor Lazzarini
SubjectRe: [Csnd-dev] [EXTERNAL] [Csnd-dev] Setting tempo through the API
because it's a score preprocessor event that is done before Csound starts running. Tempo is an interpretation of score p2 and p3 and not
something that the engine does.

On 19 Mar 2022, at 20:27, Iain Duncan <iainduncanlists@GMAIL.COM> 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.
Further to this, I am getting an error when I try to send "t 0 120"  to csound through csoundInputMessage, even though this is a valid score line. I get:

unknown opcode
illegal RT scoreline:
t 0 60

Any suggestions most welcome!
iain

On Sat, Mar 19, 2022 at 1:15 PM Iain Duncan <iainduncanlists@gmail.com> wrote:
Hi devs, I would like csound6~ for Max to receive t score events, but I see that in the API manual: " 'type' is the score event type ('a', 'i', 'q', 'f', or 'e')". 

Questions: 
- why is the t event not supported? (curious)
- is the only way to do this through the csoundInputMessage call or is there some other way of setting the tempo?

thanks
iain


Date2022-03-19 23:10
FromIain Duncan
SubjectRe: [Csnd-dev] [EXTERNAL] [Csnd-dev] Setting tempo through the API
oh interesting. So is there no way to change csound's tempo from the API as it plays? Or do people just translate everything into seconds from the host?

thanks for the explanation Victor.


On Sat, Mar 19, 2022 at 3:53 PM Victor Lazzarini <Victor.Lazzarini@mu.ie> wrote:
because it's a score preprocessor event that is done before Csound starts running. Tempo is an interpretation of score p2 and p3 and not
something that the engine does.

On 19 Mar 2022, at 20:27, Iain Duncan <iainduncanlists@GMAIL.COM> 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.
Further to this, I am getting an error when I try to send "t 0 120"  to csound through csoundInputMessage, even though this is a valid score line. I get:

unknown opcode
illegal RT scoreline:
t 0 60

Any suggestions most welcome!
iain

On Sat, Mar 19, 2022 at 1:15 PM Iain Duncan <iainduncanlists@gmail.com> wrote:
Hi devs, I would like csound6~ for Max to receive t score events, but I see that in the API manual: " 'type' is the score event type ('a', 'i', 'q', 'f', or 'e')". 

Questions: 
- why is the t event not supported? (curious)
- is the only way to do this through the csoundInputMessage call or is there some other way of setting the tempo?

thanks
iain


Date2022-03-24 08:43
FromVictor Lazzarini
SubjectRe: [Csnd-dev] [EXTERNAL] [Csnd-dev] Setting tempo through the API
I don't think the Csound language (i.e. the "orchestra") has the concept of tempo. That is something that exists in the numeric score (by the way of its preprocessor) and gets interpreted there. It's a controller-specific thing. You would need to use Cscore (etc) to do any extra preprocessing, but that has nothing to do with the Csound language or engine per se.

Once Csound is running any score events sent to it are taken as realtime events. The csoundReadScore() function can do a certain amount of
preprocessing and send in the corresponding score events (to be taken as realtime events), but off the top of my head I am not sure tempo or
sections are available.


On 19 Mar 2022, at 23:10, Iain Duncan <iainduncanlists@GMAIL.COM> wrote:

oh interesting. So is there no way to change csound's tempo from the API as it plays? Or do people just translate everything into seconds from the host?

thanks for the explanation Victor.


On Sat, Mar 19, 2022 at 3:53 PM Victor Lazzarini <Victor.Lazzarini@mu.ie> wrote:
because it's a score preprocessor event that is done before Csound starts running. Tempo is an interpretation of score p2 and p3 and not
something that the engine does.

On 19 Mar 2022, at 20:27, Iain Duncan <iainduncanlists@GMAIL.COM> 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.
Further to this, I am getting an error when I try to send "t 0 120"  to csound through csoundInputMessage, even though this is a valid score line. I get:

unknown opcode
illegal RT scoreline:
t 0 60

Any suggestions most welcome!
iain

On Sat, Mar 19, 2022 at 1:15 PM Iain Duncan <iainduncanlists@gmail.com> wrote:
Hi devs, I would like csound6~ for Max to receive t score events, but I see that in the API manual: " 'type' is the score event type ('a', 'i', 'q', 'f', or 'e')". 

Questions: 
- why is the t event not supported? (curious)
- is the only way to do this through the csoundInputMessage call or is there some other way of setting the tempo?

thanks
iain



Date2022-03-24 14:44
FromIain Duncan
SubjectRe: [Csnd-dev] [EXTERNAL] [Csnd-dev] Setting tempo through the API
Ah ok, thanks for the explanation.

iain

On Thu, Mar 24, 2022 at 1:43 AM Victor Lazzarini <Victor.Lazzarini@mu.ie> wrote:
I don't think the Csound language (i.e. the "orchestra") has the concept of tempo. That is something that exists in the numeric score (by the way of its preprocessor) and gets interpreted there. It's a controller-specific thing. You would need to use Cscore (etc) to do any extra preprocessing, but that has nothing to do with the Csound language or engine per se.

Once Csound is running any score events sent to it are taken as realtime events. The csoundReadScore() function can do a certain amount of
preprocessing and send in the corresponding score events (to be taken as realtime events), but off the top of my head I am not sure tempo or
sections are available.


On 19 Mar 2022, at 23:10, Iain Duncan <iainduncanlists@GMAIL.COM> wrote:

oh interesting. So is there no way to change csound's tempo from the API as it plays? Or do people just translate everything into seconds from the host?

thanks for the explanation Victor.


On Sat, Mar 19, 2022 at 3:53 PM Victor Lazzarini <Victor.Lazzarini@mu.ie> wrote:
because it's a score preprocessor event that is done before Csound starts running. Tempo is an interpretation of score p2 and p3 and not
something that the engine does.

On 19 Mar 2022, at 20:27, Iain Duncan <iainduncanlists@GMAIL.COM> 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.
Further to this, I am getting an error when I try to send "t 0 120"  to csound through csoundInputMessage, even though this is a valid score line. I get:

unknown opcode
illegal RT scoreline:
t 0 60

Any suggestions most welcome!
iain

On Sat, Mar 19, 2022 at 1:15 PM Iain Duncan <iainduncanlists@gmail.com> wrote:
Hi devs, I would like csound6~ for Max to receive t score events, but I see that in the API manual: " 'type' is the score event type ('a', 'i', 'q', 'f', or 'e')". 

Questions: 
- why is the t event not supported? (curious)
- is the only way to do this through the csoundInputMessage call or is there some other way of setting the tempo?

thanks
iain