Permalink
Browse files

dots

  • Loading branch information...
1 parent cf67dca commit 2065d66868fe5bf6eebeb29bd6e38f076528065f @cnharris10 cnharris10 committed May 6, 2012
View
57 Staff.xcodeproj/project.pbxproj
@@ -33,6 +33,10 @@
08E618C71544E86A00A366B5 /* flat.gif in Resources */ = {isa = PBXBuildFile; fileRef = 08E618C61544E86A00A366B5 /* flat.gif */; };
2A94A4D61542517F00766EAF /* graybutton.png in Resources */ = {isa = PBXBuildFile; fileRef = 2A94A4D51542517F00766EAF /* graybutton.png */; };
2A94A4E01542622000766EAF /* AccidentalsController.m in Sources */ = {isa = PBXBuildFile; fileRef = 2A94A4DF1542622000766EAF /* AccidentalsController.m */; };
+ 2AAF8E811555B39C00F31082 /* notassmallflat.png in Resources */ = {isa = PBXBuildFile; fileRef = 2AAF8E7F1555B39C00F31082 /* notassmallflat.png */; };
+ 2AAF8E821555B39C00F31082 /* notassmallsharp.png in Resources */ = {isa = PBXBuildFile; fileRef = 2AAF8E801555B39C00F31082 /* notassmallsharp.png */; };
+ 2AAF8E841555B6B200F31082 /* papyrus.jpg in Resources */ = {isa = PBXBuildFile; fileRef = 2AAF8E831555B6B200F31082 /* papyrus.jpg */; };
+ 2AAF8E861555B9F900F31082 /* scaledot.png in Resources */ = {isa = PBXBuildFile; fileRef = 2AAF8E851555B9F900F31082 /* scaledot.png */; };
2AB9BF6A154795C9001E756E /* InstrumentsController.m in Sources */ = {isa = PBXBuildFile; fileRef = 2AB9BF69154795C9001E756E /* InstrumentsController.m */; };
2ACB96DD1552EC04002F9FCE /* crsynth.dlsc in Resources */ = {isa = PBXBuildFile; fileRef = 2ACB96D51552EC04002F9FCE /* crsynth.dlsc */; };
2ACB96DE1552EC04002F9FCE /* libcrmpd.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 2ACB96D71552EC04002F9FCE /* libcrmpd.a */; };
@@ -55,11 +59,6 @@
A765348B15276051001885E9 /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A765348A15276051001885E9 /* AudioToolbox.framework */; };
A785F7801553096400191D36 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A785F77F1553096400191D36 /* QuartzCore.framework */; };
A785F78715530EB400191D36 /* CircleView.m in Sources */ = {isa = PBXBuildFile; fileRef = A785F78615530EB400191D36 /* CircleView.m */; };
- A785F78A1553244F00191D36 /* crsynth.dlsc in Resources */ = {isa = PBXBuildFile; fileRef = A785F7891553244F00191D36 /* crsynth.dlsc */; };
- A785F7911553245B00191D36 /* libcrmpd.a in Frameworks */ = {isa = PBXBuildFile; fileRef = A785F78C1553245B00191D36 /* libcrmpd.a */; };
- A785F7921553245B00191D36 /* libcrse.a in Frameworks */ = {isa = PBXBuildFile; fileRef = A785F78D1553245B00191D36 /* libcrse.a */; };
- A785F7931553245B00191D36 /* libcrmpd.a in Frameworks */ = {isa = PBXBuildFile; fileRef = A785F78F1553245B00191D36 /* libcrmpd.a */; };
- A785F7941553245B00191D36 /* libcrse.a in Frameworks */ = {isa = PBXBuildFile; fileRef = A785F7901553245B00191D36 /* libcrse.a */; };
A7A180C4154EF70600712D92 /* solidVerticalLine.m in Sources */ = {isa = PBXBuildFile; fileRef = A7A180C3154EF70600712D92 /* solidVerticalLine.m */; };
/* End PBXBuildFile section */
@@ -102,6 +101,10 @@
2A94A4D51542517F00766EAF /* graybutton.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = graybutton.png; sourceTree = "<group>"; };
2A94A4DE1542622000766EAF /* AccidentalsController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AccidentalsController.h; sourceTree = "<group>"; };
2A94A4DF1542622000766EAF /* AccidentalsController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AccidentalsController.m; sourceTree = "<group>"; };
+ 2AAF8E7F1555B39C00F31082 /* notassmallflat.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = notassmallflat.png; sourceTree = "<group>"; };
+ 2AAF8E801555B39C00F31082 /* notassmallsharp.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = notassmallsharp.png; sourceTree = "<group>"; };
+ 2AAF8E831555B6B200F31082 /* papyrus.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = papyrus.jpg; sourceTree = "<group>"; };
+ 2AAF8E851555B9F900F31082 /* scaledot.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = scaledot.png; sourceTree = "<group>"; };
2AB9BF68154795C9001E756E /* InstrumentsController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InstrumentsController.h; sourceTree = "<group>"; };
2AB9BF69154795C9001E756E /* InstrumentsController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = InstrumentsController.m; sourceTree = "<group>"; };
2ACB96D31552EC04002F9FCE /* crmd.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = crmd.h; sourceTree = "<group>"; };
@@ -136,12 +139,6 @@
A785F77F1553096400191D36 /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; };
A785F78515530EB400191D36 /* CircleView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CircleView.h; sourceTree = "<group>"; };
A785F78615530EB400191D36 /* CircleView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CircleView.m; sourceTree = "<group>"; };
- A785F7881553244F00191D36 /* crmd.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = crmd.h; sourceTree = "<group>"; };
- A785F7891553244F00191D36 /* crsynth.dlsc */ = {isa = PBXFileReference; lastKnownFileType = file; path = crsynth.dlsc; sourceTree = "<group>"; };
- A785F78C1553245B00191D36 /* libcrmpd.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libcrmpd.a; sourceTree = "<group>"; };
- A785F78D1553245B00191D36 /* libcrse.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libcrse.a; sourceTree = "<group>"; };
- A785F78F1553245B00191D36 /* libcrmpd.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libcrmpd.a; sourceTree = "<group>"; };
- A785F7901553245B00191D36 /* libcrse.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libcrse.a; sourceTree = "<group>"; };
A7A180C2154EF70600712D92 /* solidVerticalLine.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = solidVerticalLine.h; sourceTree = "<group>"; };
A7A180C3154EF70600712D92 /* solidVerticalLine.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = solidVerticalLine.m; sourceTree = "<group>"; };
/* End PBXFileReference section */
@@ -255,10 +252,14 @@
A7A180C3154EF70600712D92 /* solidVerticalLine.m */,
08C951281550CB0A00D44C3E /* Circleof5thsController.h */,
08C951291550CB0A00D44C3E /* Circleof5thsController.m */,
+ 2AAF8E831555B6B200F31082 /* papyrus.jpg */,
+ 2AAF8E7F1555B39C00F31082 /* notassmallflat.png */,
+ 2AAF8E801555B39C00F31082 /* notassmallsharp.png */,
2AF14AB41547132600C899B2 /* solidlineAccidental.h */,
2AF14AB51547132600C899B2 /* solidlineAccidental.m */,
2AF14AB7154715A200C899B2 /* dashedlineAccidental.h */,
2AF14AB8154715A200C899B2 /* dashedlineAccidental.m */,
+ 2AAF8E851555B9F900F31082 /* scaledot.png */,
0826BDCF1523E5C2004A9B22 /* StaffController.h */,
0826BDD01523E5C2004A9B22 /* StaffController.m */,
2A94A4DE1542622000766EAF /* AccidentalsController.h */,
@@ -305,35 +306,6 @@
name = "Supporting Files";
sourceTree = "<group>";
};
- A76534921527B777001885E9 /* crsynth */ = {
- isa = PBXGroup;
- children = (
- A785F78B1553245B00191D36 /* Release-iphoneos */,
- A785F78E1553245B00191D36 /* Release-iphonesimulator */,
- A785F7881553244F00191D36 /* crmd.h */,
- A785F7891553244F00191D36 /* crsynth.dlsc */,
- );
- path = crsynth;
- sourceTree = "<group>";
- };
- A785F78B1553245B00191D36 /* Release-iphoneos */ = {
- isa = PBXGroup;
- children = (
- A785F78C1553245B00191D36 /* libcrmpd.a */,
- A785F78D1553245B00191D36 /* libcrse.a */,
- );
- path = "Release-iphoneos";
- sourceTree = "<group>";
- };
- A785F78E1553245B00191D36 /* Release-iphonesimulator */ = {
- isa = PBXGroup;
- children = (
- A785F78F1553245B00191D36 /* libcrmpd.a */,
- A785F7901553245B00191D36 /* libcrse.a */,
- );
- path = "Release-iphonesimulator";
- sourceTree = "<group>";
- };
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
@@ -400,7 +372,10 @@
0890CDAD155231FA00D0CF36 /* corkBoard.png in Resources */,
2ACB96DD1552EC04002F9FCE /* crsynth.dlsc in Resources */,
2ACB96E21552EC04002F9FCE /* sample.mid in Resources */,
- A74531581552388200BF3E43 /* crsynth.dlsc in Resources */,
+ 2AAF8E811555B39C00F31082 /* notassmallflat.png in Resources */,
+ 2AAF8E821555B39C00F31082 /* notassmallsharp.png in Resources */,
+ 2AAF8E841555B6B200F31082 /* papyrus.jpg in Resources */,
+ 2AAF8E861555B9F900F31082 /* scaledot.png in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
View
BIN ...oject.xcworkspace/xcuserdata/christopherharris.xcuserdatad/UserInterfaceState.xcuserstate
Binary file not shown.
View
1 Staff/StaffController.h
@@ -40,6 +40,7 @@ typedef struct image_view_metadata {
NSMutableDictionary *spaces;
NSMutableDictionary *sharps;
NSMutableDictionary *flats;
+ NSMutableDictionary *dots;
NSArray *notes;
UIImage *wrinkledPaper;
}
View
59 Staff/StaffController.m
@@ -51,10 +51,13 @@ - (void)buildStaff
{
self.canvas = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 400, 748)];
self.staffView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 400, 748)];
- [self.staffView setBackgroundColor:[UIColor colorWithPatternImage:[UIImage imageNamed:@"wrinkledPaper.png"]]];
+ [self.staffView setBackgroundColor:[UIColor clearColor]];
+ [[staffView layer] setZPosition:1];
//[self.staffView.layer setBorderWidth:1];
//[self.staffView.layer setBorderColor:[UIColor colorWithRed:0/255.0 green:0/255.0 blue:0/255.0 alpha:1.0].CGColor];
self.view = self.canvas;
+
+ [self.canvas setBackgroundColor:[UIColor colorWithPatternImage:[UIImage imageNamed:@"papyrus.jpg"]]];
[self.canvas addSubview:staffView];
wrinkledPaper = [UIImage imageNamed:@"CrinkledPaper.png"];
@@ -189,7 +192,7 @@ - (void)buildLines
while ((key = [enumerator nextObject])) {
UIView *line = [lines objectForKey:key];
[line setBackgroundColor:[UIColor clearColor]];
- [staffView addSubview:line];
+ [canvas addSubview:line];
}
}
@@ -269,7 +272,7 @@ - (void)buildSpaces
while ((key = [enumerator nextObject])) {
UIView *space = [spaces objectForKey:key];
[space setBackgroundColor:[UIColor clearColor]];
- [staffView addSubview:space];
+ [canvas addSubview:space];
}
}
@@ -320,6 +323,7 @@ - (BOOL)changeScale:(NSArray *)notesFromDataController
[self findAccidentalNote:pos + 2];
}
}
+
return TRUE;
}
@@ -391,51 +395,78 @@ - (BOOL)setFlatOrSharpOnSpecificLineOrSpace:(int)num withNotePosition:(int)pos
- (void)setFlatsAndSharps
{
- IVM sharpData, flatData;
- int d_width = 30;
- int d_height = 30;
- int d_x = 10;
+ IVM sharpData, flatData, dotData;
+ int d_width = 40;
+ int d_height = 40;
+ int d_x = 5;
sharpData.width = d_width;
sharpData.height = d_height;
sharpData.x = d_x;
- sharpData.y = 120;
+ sharpData.y = 117;
flatData.width = d_width;
flatData.height = d_height;
flatData.x = d_x;
- flatData.y = 213;
+ flatData.y = 201;
+
+ dotData.width = d_width;
+ dotData.height = d_height;
+ dotData.x = 380;
+ dotData.y = 164;
int sharpNoteCount = 3;
int flatNoteCount = 5;
+ int dotCount = 3;
sharps = [[NSMutableDictionary alloc] initWithCapacity:ICON_COUNT];
flats = [[NSMutableDictionary alloc] initWithCapacity:ICON_COUNT];
for (int i = 0; i < ICON_COUNT; i++) {
//Add sharp icons to staffView, hide all
- UIImageView *sharp = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"smallsharp.gif"]];
+ UIImageView *sharp = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"notassmallsharp.png"]];
[sharp setFrame:CGRectMake(sharpData.x, sharpData.y, sharpData.width, sharpData.height)];
[sharp setHidden:TRUE];
+ [[sharp layer] setZPosition:0];
//[self fadeOut : sharp withDuration: 3 andWait : 1 ];
[sharps setValue:sharp forKey:[NSString stringWithFormat:@"%d",sharpNoteCount]];
- [staffView addSubview:sharp];
+ [canvas addSubview:sharp];
//Add flat icons to staffView, hide all
- UIImageView *flat = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"smallflat.gif"]];
+ UIImageView *flat = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"notassmallflat.png"]];
[flat setFrame:CGRectMake(flatData.x, flatData.y, flatData.width, flatData.height)];
[flat setHidden:TRUE];
+ [[flat layer] setZPosition:0];
//[self fadeOut : flat withDuration: 3 andWait : 1 ];
[flats setValue:flat forKey:[NSString stringWithFormat:@"%d",flatNoteCount]];
- [staffView addSubview:flat];
+ [canvas addSubview:flat];
flatData.y += 46;
flatNoteCount +=1;
- sharpData.y += 47;
+ sharpData.y += 46;
sharpNoteCount += 1;
}
+
+ //Aaron, configure dots here
+ for(int i = 0; i < ICON_COUNT+2; i++){
+ //Add dot icons to staffView, hide all
+ UIImageView *dot = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"scaledot.png"]];
+ [dot setFrame:CGRectMake(dotData.x, dotData.y, dotData.width, dotData.height)];
+ [dot setHidden:TRUE];
+ [[dot layer] setZPosition:0];
+ //[self fadeOut : flat withDuration: 3 andWait : 1 ];
+ [dots setValue:dot forKey:[NSString stringWithFormat:@"%d",dotCount]];
+ [canvas addSubview:dot];
+
+ dotData.y += 46;
+ if(i == 2 || i == 4 || i == 6){
+ dotData.y -= 1;
+ }
+ dotCount += 1;
+ }
+
}
- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event

0 comments on commit 2065d66

Please sign in to comment.