From: Jonathan A. <joi...@gm...> - 2016-06-27 16:45:45
|
Hi all, Chiming in… Ultimately, we would like to be able to express time locations as a number of beats from the beginning of the score, as well as switch back and forth between this representation and GuidoDates. I found no trace of such representation in GuidoLib. As I get it, to get a beat-based time location for a given GuidoDate, we would have to get a specific GRVoice, and then iterate over its events, noting changes in meter along the way for those whose AR is a ARMeter, and accumulating durations converted to beats using the most recent meter information, up until the event's getRelativeTimePosition() corresponds to the one we'd like. Performing the reciprocal operation (getting a GuidoDate for an event whose beat-based time location is known) would follow a similar pattern. I'd also use a similar pattern to access to other score parameters (without the "accumulating" part), but maybe there's a better way? Thanks, Jonathan Aceituno > Hi Arshia, > > Actually, there is a minimal API to query a score, see at: > > http://guidolib.sourceforge.net/doc/guidolib/group__Pages.html <http://guidolib.sourceforge.net/doc/guidolib/group__Pages.html> > ; > It could be easily extended to provide more information e.g. something like GuidoGetMeterAt (int voicenum, const GuidoDate &date). > Any other useful contextual information that could be retrieved (while browsing a score up to a given date)? e.g a more general function to retrieve the meter, the current key signature, etc. > Any comment and proposal are welcome. > > Cheers, > — > Dominique > > > > Le 26 juin 2016 à 21:20, Arshia Cont <arshiacont@...> a écrit : > > > > Hello all and thanks for the great work on GuidoLib! > > > > I am wondering if there is any API for query of score parameters (such as Meter) from a specific location in the score. Basically, I need to know what is the Meter at a specific location in a rendered score. I see ARMeter and GRMeter classes but can’t seem to easily figure out how I can Get those stuff. > > > > Any hints would be appreciated. > > > > Cheers, > > > > > > Arshia Cont > > ------------------------------------------------------------------------------ > > Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San > > Francisco, CA to explore cutting-edge tech and listen to tech luminaries > > present their vision of the future. This family event has something for > > everyone, including kids. Get more information and register today. > > > http://sdm.link/attshape > > > _______________________________________________ > > Guidolib-devel mailing list > > Guidolib-devel@... > > > https://lists.sourceforge.net/lists/listinfo/guidolib-devel |