NullPointerExceptions with getTitles() and starter ques!

47 views
Skip to first unread message

albert...@gmail.com

unread,
Mar 16, 2015, 2:13:30 PM3/16/15
to ab...@googlegroups.com
Hi, I'm using Processing to analyse ABC files.

I was just curious as to how the tutorials work - specifically this one - 


Is the line - System.out.print("Title n°10 is " + aTune.getTitles[0]); - incorrect in how it calls getTitles()?

I am getting a NullPointerException at this point, 

my ABC file looks like this 

X: 1
T: Miller's Maggot, The
Z: Will Harmon
R: jig
M: 6/8
L: 1/8
K: Gmaj
|:G2 A B2 A|B2 A BGE|G2 A B2 A|Bee dBA|
|G2 A B2 A|B2 A BGE|gfe dBA|Bee dBA:|
|:e2 f fge|d2 B BAG|e2 f fgg|aga bge|
|e2 f fge|d2 B BAG|A2 B cBA|Bee dBA:|

Also, in the next part of the tutorial - 

Tune.Score score = aTune.getScore();
Iterator iter = score.iterator();
while (iter.hasNext())
System.out.println(iter.next());

What extra libraries do I need to load for Tune.Score to be recognised?

Thanks for any help.

ABC4j is great by the way!

iubito

unread,
Mar 17, 2015, 4:40:08 AM3/17/15
to ab...@googlegroups.com, albert...@gmail.com
Hi !
As usual, are you using SVN version or old downloadable JAR?
If you are using the SVN version, the tutorials in wiki are a bit outdated :-/ I have to understand how to upadte them...
Look an older topic on this group I explained the structure's changes I made.

Regards,
Sylvain

albert...@gmail.com

unread,
Mar 17, 2015, 4:46:53 AM3/17/15
to ab...@googlegroups.com
Hi, thanks for the response. I'm using the jar file. Is there a more recent file I should be using?

iubito

unread,
Mar 18, 2015, 3:12:19 AM3/18/15
to ab...@googlegroups.com, albert...@gmail.com
Hi, SVN is far more recent, but wiki documentation is not up to date yet.
you need a SVN client (e.g. Tortoise) or plug-in (in Eclipse, intelliJ...)
Reply all
Reply to author
Forward
0 new messages