Skip to content

Commit

Permalink
foo
Browse files Browse the repository at this point in the history
  • Loading branch information
Louis Sobel committed Apr 2, 2012
1 parent caf81b1 commit e7cacd4
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 8 deletions.
2 changes: 1 addition & 1 deletion sample_abc/barbieGirl.abc
Expand Up @@ -7,7 +7,7 @@ V:3
V:4
M:4/4
L:1/8
Q:126
Q:252
K:E

V:1
Expand Down
1 change: 0 additions & 1 deletion src/player/ABCParser.java
Expand Up @@ -115,7 +115,6 @@ public static ABCEnvironment parse(ArrayList<ABCToken> tokenList) {
//ASSUMING NO MID-BAR VOICE CHANGES
env.barDuration = new Fraction(0,1);

System.out.println("Voice "+env.inBody + "-"+token.voiceName+'-');
if (!env.inBody) {
env.createVoice(token.voiceName);
}
Expand Down
21 changes: 16 additions & 5 deletions src/player/ABCParserTest.java
Expand Up @@ -35,7 +35,7 @@ public class ABCParserTest {
Fraction three = new Fraction(3,1);
Fraction four = new Fraction(4,1);

boolean playAll = true;
boolean playAll = false;


//so i can hear things!
Expand Down Expand Up @@ -375,10 +375,6 @@ public void basicAccidentalTest() {
//basic headers put us in C
l.readLine("F F ^F F _F F =F F");

for (ABCToken t : l.tokens) {
print(t);
}

ABCEnvironment e = ABCParser.parse(l.tokens);

if (playAll) play(e);
Expand Down Expand Up @@ -442,7 +438,22 @@ public void multiVoiceTest() {
}

//tests still to write:

//repeat, single, left and right
@Test
public void singleLeftRight() {
Lexer l = getBasicHeaderLexer();
//basic headers put us in C
l.readLine("|: C E G c G E C [C2E2G2] :|");

for (ABCToken t : l.tokens) {
print(t);
}
ABCEnvironment e = ABCParser.parse(l.tokens);
print(e);
play(e);
}

//repeat, single, start of piece, right
//repeat, single, section, right
//repeat, multi, left
Expand Down
2 changes: 1 addition & 1 deletion src/player/ABCPlayerTest.java
Expand Up @@ -46,7 +46,7 @@ public void playTest3() {

@Test
public void barbieGirl() {
printAndPlay("sample_abc/barbieGirl.abc");
printAndPlay("sample_abc/little_night_music.abc");
}

@Test
Expand Down

0 comments on commit e7cacd4

Please sign in to comment.