Permalink
Browse files

Cleaned up the source code and project files.

  • Loading branch information...
1 parent 12bbad1 commit 2539045bf96f80b12caf9e64d0f2354896a794af @hollance committed Jun 23, 2012
Showing with 438 additions and 7,316 deletions.
  1. +0 −13 Classes/DemoAppDelegate.h
  2. +0 −24 Classes/DemoAppDelegate.m
  3. +0 −21 Classes/DemoViewController.h
  4. +0 −137 Classes/DemoViewController.m
  5. +71 −75 Demo.xcodeproj/project.pbxproj
  6. +8 −2 { → Demo}/Demo-Info.plist
  7. +9 −0 Demo/DemoAppDelegate.h
  8. +26 −0 Demo/DemoAppDelegate.m
  9. +4 −0 Demo/DemoViewController.h
  10. +140 −0 Demo/DemoViewController.m
  11. 0 { → Demo}/DemoViewController.xib
  12. +11 −0 Demo/Demo_Prefix.pch
  13. +10 −0 Demo/main.m
  14. +0 −4 Demo_Prefix.pch
  15. +0 −137 Docs/html/_sound_bank_player_8h.html
  16. +0 −139 Docs/html/_sound_bank_player_8h_source.html
  17. +0 −78 Docs/html/annotated.html
  18. BIN Docs/html/bc_s.png
  19. +0 −89 Docs/html/class_sound_bank_player-members.html
  20. +0 −78 Docs/html/classes.html
  21. BIN Docs/html/closed.png
  22. +0 −686 Docs/html/doxygen.css
  23. BIN Docs/html/doxygen.png
  24. +0 −74 Docs/html/files.html
  25. +0 −157 Docs/html/functions.html
  26. +0 −96 Docs/html/functions_func.html
  27. +0 −136 Docs/html/functions_vars.html
  28. +0 −84 Docs/html/globals.html
  29. +0 −84 Docs/html/globals_defs.html
  30. +0 −65 Docs/html/index.html
  31. +0 −117 Docs/html/installdox
  32. +0 −287 Docs/html/interface_sound_bank_player.html
  33. BIN Docs/html/nav_f.png
  34. BIN Docs/html/nav_h.png
  35. BIN Docs/html/open.png
  36. +0 −26 Docs/html/search/all_61.html
  37. +0 −43 Docs/html/search/all_62.html
  38. +0 −26 Docs/html/search/all_63.html
  39. +0 −32 Docs/html/search/all_64.html
  40. +0 −26 Docs/html/search/all_66.html
  41. +0 −26 Docs/html/search/all_69.html
  42. +0 −26 Docs/html/search/all_6d.html
  43. +0 −67 Docs/html/search/all_6e.html
  44. +0 −41 Docs/html/search/all_70.html
  45. +0 −65 Docs/html/search/all_73.html
  46. +0 −25 Docs/html/search/classes_62.html
  47. +0 −25 Docs/html/search/classes_6e.html
  48. +0 −30 Docs/html/search/classes_73.html
  49. BIN Docs/html/search/close.png
  50. +0 −26 Docs/html/search/defines_6d.html
  51. +0 −32 Docs/html/search/defines_6e.html
  52. +0 −25 Docs/html/search/files_73.html
  53. +0 −26 Docs/html/search/functions_61.html
  54. +0 −32 Docs/html/search/functions_6e.html
  55. +0 −26 Docs/html/search/functions_73.html
  56. BIN Docs/html/search/mag_sel.png
  57. +0 −12 Docs/html/search/nomatches.html
  58. +0 −240 Docs/html/search/search.css
  59. +0 −738 Docs/html/search/search.js
  60. BIN Docs/html/search/search_l.png
  61. BIN Docs/html/search/search_m.png
  62. BIN Docs/html/search/search_r.png
  63. +0 −38 Docs/html/search/variables_62.html
  64. +0 −26 Docs/html/search/variables_63.html
  65. +0 −32 Docs/html/search/variables_64.html
  66. +0 −26 Docs/html/search/variables_66.html
  67. +0 −26 Docs/html/search/variables_69.html
  68. +0 −38 Docs/html/search/variables_6e.html
  69. +0 −35 Docs/html/search/variables_70.html
  70. +0 −44 Docs/html/search/variables_73.html
  71. +0 −77 Docs/html/struct_buffer-members.html
  72. +0 −99 Docs/html/struct_buffer.html
  73. +0 −76 Docs/html/struct_note-members.html
  74. +0 −96 Docs/html/struct_note.html
  75. +0 −77 Docs/html/struct_source-members.html
  76. +0 −99 Docs/html/struct_source.html
  77. BIN Docs/html/tab_a.png
  78. BIN Docs/html/tab_b.png
  79. BIN Docs/html/tab_h.png
  80. BIN Docs/html/tab_s.png
  81. +0 −59 Docs/html/tabs.css
  82. +0 −1,630 Doxyfile
  83. +0 −444 MainWindow.xib
  84. +0 −3 MakeDocs.sh
  85. +7 −0 README.md
  86. +0 −8 README.txt
  87. +6 −6 {Classes → SoundBankPlayer}/OpenALSupport.c
  88. +3 −3 {Classes → SoundBankPlayer}/OpenALSupport.h
  89. +11 −71 {Classes → SoundBankPlayer}/SoundBankPlayer.h
  90. +132 −97 {Classes → SoundBankPlayer}/SoundBankPlayer.m
  91. +0 −8 main.m
View
@@ -1,13 +0,0 @@
-
-@class DemoViewController;
-
-@interface DemoAppDelegate : NSObject <UIApplicationDelegate>
-{
- UIWindow* window;
- DemoViewController* viewController;
-}
-
-@property (nonatomic, retain) IBOutlet UIWindow* window;
-@property (nonatomic, retain) IBOutlet DemoViewController* viewController;
-
-@end
View
@@ -1,24 +0,0 @@
-
-#import "DemoAppDelegate.h"
-#import "DemoViewController.h"
-
-@implementation DemoAppDelegate
-
-@synthesize window;
-@synthesize viewController;
-
-- (BOOL)application:(UIApplication*)application didFinishLaunchingWithOptions:(NSDictionary*)launchOptions
-{
- [window addSubview:viewController.view];
- [window makeKeyAndVisible];
- return YES;
-}
-
-- (void)dealloc
-{
- [viewController release];
- [window release];
- [super dealloc];
-}
-
-@end
@@ -1,21 +0,0 @@
-
-#import "SoundBankPlayer.h"
-
-@interface DemoViewController : UIViewController
-{
- SoundBankPlayer* player;
- NSTimer* timer;
- BOOL playingArpeggio;
- NSArray* arpeggioNotes;
- int arpeggioIndex;
- double arpeggioStartTime;
- double arpeggioDelay;
-}
-
-- (IBAction)strumCMajorChord;
-- (IBAction)arpeggiateCMajorChord;
-
-- (IBAction)strumAMinorChord;
-- (IBAction)arpeggiateAMinorChord;
-
-@end
@@ -1,137 +0,0 @@
-
-// The sounds in this demo project were taken from Fluid R3 by Frank Wen,
-// a freely distributable SoundFont.
-
-#import <QuartzCore/CABase.h>
-#import "DemoViewController.h"
-
-@interface DemoViewController ()
-- (void)playArpeggioWithNotes:(NSArray*)notes delay:(double)delay;
-- (void)startTimer;
-- (void)stopTimer;
-@end
-
-@implementation DemoViewController
-
-- (id)initWithCoder:(NSCoder*)decoder
-{
- if ((self = [super initWithCoder:decoder]))
- {
- playingArpeggio = NO;
-
- // Create the player and tell it which sound bank to use.
- player = [[SoundBankPlayer alloc] init];
- [player setSoundBank:@"Piano"];
-
- // We use a timer to play arpeggios.
- [self startTimer];
- }
- return self;
-}
-
-- (void)dealloc
-{
- [self stopTimer];
- [player release];
-
- [super dealloc];
-}
-
-- (IBAction)strumCMajorChord
-{
- [player queueNote:48 gain:0.4f];
- [player queueNote:55 gain:0.4f];
- [player queueNote:64 gain:0.4f];
- [player playQueuedNotes];
-}
-
-- (IBAction)arpeggiateCMajorChord
-{
- NSArray* notes = [NSArray arrayWithObjects:
- [NSNumber numberWithInt:48],
- [NSNumber numberWithInt:55],
- [NSNumber numberWithInt:64],
- nil];
-
- [self playArpeggioWithNotes:notes delay:0.05];
-}
-
-- (IBAction)strumAMinorChord
-{
- [player queueNote:45 gain:0.4f];
- [player queueNote:52 gain:0.4f];
- [player queueNote:60 gain:0.4f];
- [player queueNote:67 gain:0.4f];
- [player playQueuedNotes];
-}
-
-- (IBAction)arpeggiateAMinorChord
-{
- NSArray* notes = [NSArray arrayWithObjects:
- [NSNumber numberWithInt:33],
- [NSNumber numberWithInt:45],
- [NSNumber numberWithInt:52],
- [NSNumber numberWithInt:60],
- [NSNumber numberWithInt:67],
- nil];
-
- [self playArpeggioWithNotes:notes delay:0.1];
-}
-
-- (void)playArpeggioWithNotes:(NSArray*)notes delay:(double)delay
-{
- if (!playingArpeggio)
- {
- playingArpeggio = YES;
- arpeggioNotes = [notes retain];
- arpeggioIndex = 0;
- arpeggioDelay = delay;
- arpeggioStartTime = CACurrentMediaTime();
- }
-}
-
-- (void)startTimer
-{
- timer = [NSTimer scheduledTimerWithTimeInterval: 0.05 // 50 ms
- target: self
- selector: @selector(handleTimer:)
- userInfo: nil
- repeats: YES];
-}
-
-- (void)stopTimer
-{
- if (timer != nil && [timer isValid])
- {
- [timer invalidate];
- timer = nil;
- }
-}
-
-- (void)handleTimer:(NSTimer*)timer
-{
- if (playingArpeggio)
- {
- // Play each note of the arpeggio after "arpeggioDelay" seconds.
- double now = CACurrentMediaTime();
- if (now - arpeggioStartTime >= arpeggioDelay)
- {
- NSNumber* number = (NSNumber*)[arpeggioNotes objectAtIndex:arpeggioIndex];
- [player noteOn:[number intValue] gain:0.4f];
-
- ++arpeggioIndex;
- if (arpeggioIndex == [arpeggioNotes count])
- {
- playingArpeggio = NO;
- [arpeggioNotes release];
- arpeggioNotes = nil;
- }
- else // schedule next note
- {
- arpeggioStartTime = now;
- }
- }
- }
-}
-
-@end
Oops, something went wrong.

0 comments on commit 2539045

Please sign in to comment.