Well I thought I was making progress but I quickly hit a wall …
The above code, with the following lines
Dim HasField As Boolean
HasField = audioTags.RunMethod("hasField", Array("ALBUM"))
Log($"HasField = ${HasField}"$)
Log(audioTags.RunMethod("hasField", Array("ARTIST")))
Log(audioTags.RunMethod("hasField", Array("TITLE")))
Log(audioTags.RunMethod("hasField", Array("GENRE")))
Log(audioTags.RunMethod("hasField", Array("COMPOSER")))
yielded some positive results:
Jan. 24, 2019 11:24:20 A.M. org.jaudiotagger.audio.flac.FlacInfoReader read
INFO: C:\Buffers\CD-R\Ripped Files\Summer Side Of Life-11.flac BlockType:STREAMINFO DataLength:34 isLastBlock:false
Jan. 24, 2019 11:24:20 A.M. org.jaudiotagger.audio.flac.FlacInfoReader read
INFO: C:\Buffers\CD-R\Ripped Files\Summer Side Of Life-11.flac BlockType:SEEKTABLE DataLength:630 isLastBlock:false
Jan. 24, 2019 11:24:20 A.M. org.jaudiotagger.audio.flac.FlacInfoReader read
INFO: C:\Buffers\CD-R\Ripped Files\Summer Side Of Life-11.flac BlockType:VORBIS_COMMENT DataLength:258 isLastBlock:false
Jan. 24, 2019 11:24:20 A.M. org.jaudiotagger.audio.flac.FlacInfoReader read
INFO: C:\Buffers\CD-R\Ripped Files\Summer Side Of Life-11.flac BlockType:PADDING DataLength:8192 isLastBlock:true
(FlacTag) FLAC OGG Tag content:
VENDOR:reference libFLAC 1.2.1 20070917
ARTIST:Gordon Lightfoot
TITLE:Cabaret
ALBUM:Summer Side Of Life
DATE:1971
TRACKNUMBER:11
GENRE:Folk
COMMENT:
BAND:
ALBUMARTIST:
COMPOSER:
DISCNUMBER:1
TOTALDISCS:1
TOTALTRACKS:11
HasField = true
true
true
true
true
But I have yet to find a way to extract a single Tag "value". For instance, I want to pull the specific TITLE (Cabaret in the above example) and possibly change it, then write it back to the file.
The examples show several uses (in native java) of extraction using getTagField and getField methods, none of which have led me to any success - typical results are "Method not found" when I try to translate them into runmethod statements in B4J.
The only statement other than the "HasField" example above that has not produced an error is
Dim joFields As JavaObject
joFields = audioTags.RunMethodJO("getFields", Null)
Log(joFields)
which results in a message in the log:
() org.jaudiotagger.audio.generic.AbstractTag$1@32f0754
I have yet to extract anything from this. I feel as though I am really close, but skating all around the solution.
The documents and example also have references such as FieldKey.ALBUM whose relevance I don't fully understand. I would welcome any insights on where I go from here.