Csound Csound-dev Csound-tekno Search About

[Csnd] miditempo not working for score?

Date2014-05-30 22:10
Fromzappfinger
Subject[Csnd] miditempo not working for score?
The miditempo opcode is described as:
Returns the current tempo at k-rate, of either the MIDI file (if available)
or the score

It works for a midi file, but not for a score...

Richard 



--
View this message in context: http://csound.1045644.n5.nabble.com/miditempo-not-working-for-score-tp5735611.html
Sent from the Csound - General mailing list archive at Nabble.com.

Date2014-05-30 22:29
Fromzappfinger
Subject[Csnd] Re: miditempo not working for score?
I have made a simple Python utility to convert midi drum files to score.
With the midi file playing, miditempo prints the correct tempo:

miditempo = 120

the score file is then imported into another csd and played back. It sounds
ok, but the miditempo output is weird:

miditempo = 2646000


Richard



--
View this message in context: http://csound.1045644.n5.nabble.com/miditempo-not-working-for-score-tp5735611p5735612.html
Sent from the Csound - General mailing list archive at Nabble.com.

Date2014-05-30 22:30
FromVictor Lazzarini
SubjectRe: [Csnd] miditempo not working for score?
It does work here:

csound -t 60 mtempo.csd

new alloc for instr 1:
miditempo = 60

(with no midi file, but the score)

Csound needs to be running on beat mode for the tempo to be detected from the score (-t N).

========================
Dr Victor Lazzarini
Senior Lecturer
NUI Maynooth, Ireland
victor dot lazzarini at nuim dot ie




On 30 May 2014, at 22:10, zappfinger  wrote:

> The miditempo opcode is described as:
> Returns the current tempo at k-rate, of either the MIDI file (if available)
> or the score
> 
> It works for a midi file, but not for a score...
> 
> Richard 
> 
> 
> 
> --
> View this message in context: http://csound.1045644.n5.nabble.com/miditempo-not-working-for-score-tp5735611.html
> Sent from the Csound - General mailing list archive at Nabble.com.
> 
> 
> Send bugs reports to
>        https://github.com/csound/csound/issues
> Discussions of bugs and features can be posted here
> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"
> 
> 
> 



Date2014-05-30 23:22
Fromzappfinger
Subject[Csnd] Re: miditempo not working for score?
I tried that in my case, first with -t 120, which is what the midi file
reported.
It prints out 120 ok, but the score file (playing fluidsynth) sounds much
too fast.

When I set it to -t 60, it sounds ok to start with, for a short while.
It prints 60, but then Python/csound crashes:
...
...
miditempo = 60
miditempo = 60
miditempo = 60
Python(14448,0x10d1a0000) malloc: *** error for object 0x2f0d19fa20: pointer
being freed was not allocated
*** set a breakpoint in malloc_error_break to debug
Csound tidy up: Abort trap
inactive allocs returned to freespace 

Richard



--
View this message in context: http://csound.1045644.n5.nabble.com/miditempo-not-working-for-score-tp5735611p5735615.html
Sent from the Csound - General mailing list archive at Nabble.com.

Date2014-05-30 23:31
Fromzappfinger
Subject[Csnd] Re: miditempo not working for score?
The crash might be a one timer, it did not happen again.
But what about the t 120 one? It seems that csound is defaulting to 60
internally, and then playing the score at 120 doubles it?

Richard  



--
View this message in context: http://csound.1045644.n5.nabble.com/miditempo-not-working-for-score-tp5735611p5735616.html
Sent from the Csound - General mailing list archive at Nabble.com.

Date2014-05-30 23:34
FromVictor Lazzarini
SubjectRe: [Csnd] miditempo not working for score?
That’s probably something else, but the opcode works as expected (tempo reporting). The manual should mention the need
for running on beat mode.

If you can isolate the crash in a simple CSD, then it would help us to track any existing bug. Then you can open an issue
for it.
========================
Dr Victor Lazzarini
Senior Lecturer
NUI Maynooth, Ireland
victor dot lazzarini at nuim dot ie




On 30 May 2014, at 23:22, zappfinger  wrote:

> I tried that in my case, first with -t 120, which is what the midi file
> reported.
> It prints out 120 ok, but the score file (playing fluidsynth) sounds much
> too fast.
> 
> When I set it to -t 60, it sounds ok to start with, for a short while.
> It prints 60, but then Python/csound crashes:
> ...
> ...
> miditempo = 60
> miditempo = 60
> miditempo = 60
> Python(14448,0x10d1a0000) malloc: *** error for object 0x2f0d19fa20: pointer
> being freed was not allocated
> *** set a breakpoint in malloc_error_break to debug
> Csound tidy up: Abort trap
> inactive allocs returned to freespace 
> 
> Richard
> 
> 
> 
> --
> View this message in context: http://csound.1045644.n5.nabble.com/miditempo-not-working-for-score-tp5735611p5735615.html
> Sent from the Csound - General mailing list archive at Nabble.com.
> 
> 
> Send bugs reports to
>        https://github.com/csound/csound/issues
> Discussions of bugs and features can be posted here
> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"
> 
> 
>