Re: get current bar number

2018-03-29 Thread Kevin Barry
That worked perfectly! Thanks to all for responding. On 25 March 2018 at 19:46, Thomas Morley wrote: > 2018-03-25 0:04 GMT+01:00 Kevin Barry : > > Hi Jan/Wols, > > > > Thank you for responding. I have tinkered with \applyContext and > > cannot get

Re: get current bar number

2018-03-25 Thread Thomas Morley
2018-03-25 0:04 GMT+01:00 Kevin Barry : > Hi Jan/Wols, > > Thank you for responding. I have tinkered with \applyContext and > cannot get the property out of it to do anything useful with it. Since > it always returns music I can't feed it to a markup command or convert > it to

Re: get current bar number

2018-03-24 Thread Kevin Barry
Hi Jan/Wols, Thank you for responding. I have tinkered with \applyContext and cannot get the property out of it to do anything useful with it. Since it always returns music I can't feed it to a markup command or convert it to markup or set it as the value for a property (using a callback or

Re: get current bar number

2018-03-23 Thread Wols Lists
On 23/03/18 06:21, Jan-Peter Voigt wrote: > If you are going to write an engraver you can find some informations in > the archive. Also look at the rehearsal mark engraver. One of the options is to use the bar number as the rehearsal mark, so that might give you some ideas. Cheers, Wol

Re: get current bar number

2018-03-23 Thread Jan-Peter Voigt
Hi Kevin, yes, you need to get a context object. If you want to use it inside some music expression \applyContext is the key: doSomething = \applyContext #(lambda (context) (display

get current bar number

2018-03-22 Thread Kevin Barry
Hi All, I would like to be able to get the current bar number context property so that I can do something with it (like printing it in markup for example). I have tried the following scheme function: (ly:context-property 'Score 'currentBarNumber) but it errors out, telling me that Score is not a