Javadocs and KeyToGrouping
Hi, I downloaded your javadocs and the source for the KeyToGrouping plugin. It's great work, thank you very much, other developers could learn from you. However I still can't find the info I need - more my fault that yours I'm sure.
I want to edit the plugin so that it adds the contents of the tuning tag after the key. Can you point me in the right direction please?
Thank you.
Comments are currently closed for this discussion. You can start a new one.
Keyboard shortcuts
Generic
? | Show this help |
---|---|
ESC | Blurs the current field |
Comment Form
r | Focus the comment reply box |
---|---|
^ + ↩ | Submit the comment |
You can use Command ⌘
instead of Control ^
on Mac
Support Staff 1 Posted by hendrik on 09 Nov, 2011 04:29 PM
Hey Rico,
com.tagtraum.audiokern.AudioSong
has a methodInteger getTuning()
, which will deliver the tuning in cents (if available).To get the tuning in Hz, do something like this:
Does that answer your question?
-hendrik
2 Posted by Rico on 09 Nov, 2011 05:26 PM
Thanks for the snappy response.
Am I right in thinking that this function generates the string that goes into the grouping tag:
If so how would I add the tuning (in cents please) after the KEY_END_MARKER
Thanks again.
Support Staff 3 Posted by hendrik on 09 Nov, 2011 05:37 PM
That function adds the key string to the existing grouping string. In order to easily replace the key string during updates, the key string is surrounded by two marker strings.
If you want to add the cents, they would also need to go in between the
KEY_START_MARKER
and theKEY_END_MARKER
.-hendrik
4 Posted by Rico on 09 Nov, 2011 05:41 PM
OK, so could I do something like this:
Where DIVIDER would be previously declared as, say, a colon.
Thanks again.
Support Staff 5 Posted by hendrik on 09 Nov, 2011 05:44 PM
Yep, that should work..
Note though, that
song
is not in scope - you need to callsong.getTuning()
whereaddGroupingKey(...)
is called and pass the results (i.e. the tuning) as a parameter.6 Posted by Rico on 09 Nov, 2011 05:53 PM
So I would call with this line:
and edit the addGroupingKey function as follows:
Thanks for your patience - I'm new to Java
Support Staff 7 Posted by hendrik on 09 Nov, 2011 05:56 PM
That looks about right.
I can only recommend to use an IDE, like e.g. http://www.jetbrains.com/idea/ Community Edition.
-hendrik
8 Posted by Rico on 09 Nov, 2011 07:06 PM
Thanks for the advice - will do.
A secondary question: what method or variable is the round coloured key indicator derived from please?
hendrik closed this discussion on 25 Sep, 2015 11:07 AM.