├── Build └── BlueWizard.app │ └── Contents │ ├── PkgInfo │ ├── MacOS │ └── BlueWizard │ ├── Resources │ ├── AppIcon.icns │ ├── Assets.car │ ├── Base.lproj │ │ └── Main.storyboardc │ │ │ ├── Info.plist │ │ │ ├── MainMenu.nib │ │ │ ├── keyedobjects.nib │ │ │ ├── keyedobjects-101300.nib │ │ │ └── keyedobjects-110000.nib │ │ │ ├── NSViewController-XfG-lQ-9wD.nib │ │ │ ├── keyedobjects.nib │ │ │ ├── keyedobjects-101300.nib │ │ │ └── keyedobjects-110000.nib │ │ │ └── XfG-lQ-9wD-view-m2S-Jp-Qdl.nib │ │ │ ├── keyedobjects.nib │ │ │ ├── keyedobjects-101300.nib │ │ │ └── keyedobjects-110000.nib │ ├── Credits.rtf │ └── tms5220.txt │ └── Info.plist ├── screenshot.png ├── unprocessed ├── ces.wav └── ces-filtered.wav ├── BlueWizard ├── lib │ ├── .DS_Store │ └── TMS5220 │ │ └── tms5220.txt ├── main.m ├── NibbleSwitcher.h ├── HexFormatter.h ├── HexByteBinaryEncoder.h ├── NibbleBitReverser.h ├── TimeMachine.h ├── WaveformView.h ├── FrameDataBinaryEncoder.h ├── Media.xcassets │ └── AppIcon.appiconset │ │ ├── blue-wizard-128.png │ │ ├── blue-wizard-16.png │ │ ├── blue-wizard-256.png │ │ ├── blue-wizard-32.png │ │ ├── blue-wizard-512.png │ │ ├── blue-wizard-64.png │ │ ├── blue-wizard-1024.png │ │ ├── blue-wizard-256-1.png │ │ ├── blue-wizard-32-1.png │ │ ├── blue-wizard-512-1.png │ │ └── Contents.json ├── HammingWindow.h ├── PitchEstimator.h ├── PreEmphasizer.h ├── Output.h ├── SpeechSynthesizer.h ├── Input.h ├── AppDelegate.h ├── ClosestValueFinder.h ├── SpeechDataReader.h ├── BitPacker.h ├── Processor.h ├── HexConverter.h ├── RMSNormalizer.h ├── BitHelpers.h ├── Reflector.h ├── SamplerDelegate.h ├── PlayheadView.h ├── HammingWindow.m ├── Segmenter.h ├── Filterer.h ├── Sampler.h ├── Autocorrelator.h ├── ClosestValueFinder.m ├── HexFormatter.m ├── NibbleSwitcher.m ├── FrameData.h ├── AudioHelpers.h ├── Credits.rtf ├── Buffer.h ├── TimeMachine.m ├── HexByteBinaryEncoder.m ├── PreEmphasizer.m ├── BitHelpers.m ├── CodingTable.h ├── NotificationNames.h ├── Info.plist ├── NibbleBitReverser.m ├── FrameDataBinaryEncoder.m ├── PlayheadView.m ├── SpeechDataReader.m ├── UserSettings.h ├── Autocorrelator.m ├── RMSNormalizer.m ├── Segmenter.m ├── Buffer.m ├── ViewController.h ├── HexConverter.m ├── Output.m ├── WaveformView.m ├── Reflector.m ├── Input.m ├── UserSettings.m └── PitchEstimator.m ├── processed └── ces-processed.aif ├── Podfile ├── lpc ├── elf-damage-5.lpc ├── valkrie-damage-2.lpc ├── elf-damage-2.lpc ├── 8.lpc ├── valkrie-damage-5.lpc ├── elf-damage-4.lpc ├── elf-damage-3.lpc ├── valkrie-damage-1.lpc ├── warrior-damage-1.lpc ├── wizard-damage-6.lpc ├── 6.lpc ├── elf-damage-6.lpc ├── elf-damage.lpc ├── warriror-damage-4.lpc ├── warriror-damage-3.lpc ├── warriror-damage-5.lpc ├── is-it.lpc ├── valkrie-damage-6.lpc ├── wizard-damage-13.lpc ├── haha.lpc ├── valkrie-damage-4.lpc ├── valkrie-damage-7.lpc ├── warriror-damage-6.lpc ├── 10.lpc ├── valkrie-damage-8.lpc ├── wizard-damage-4.lpc ├── wizard-damage-5.lpc ├── wizard-damage-7.lpc ├── valkrie-damage-3.lpc ├── 2.lpc ├── 7.lpc ├── valkrie-damage-10.lpc ├── wizard-damage-3.lpc ├── hah-hah.lpc ├── warriror-damage-2.lpc ├── elf-laugh.lpc ├── 4.lpc ├── valkrie-damage-12.lpc ├── warriror-damage-8.lpc ├── valkrie-damage-9.lpc ├── 3.lpc ├── 1.lpc ├── valkrie-damage-11.lpc ├── 9.lpc ├── dragon.lpc ├── 5.lpc ├── wizard-damage-2.lpc ├── 0.lpc ├── wizard-damage-8.lpc ├── valkrie-damage-13.lpc ├── disappear-fragment.lpc ├── elf-ooo.lpc ├── fooled-you.lpc ├── elf-damage-8.lpc ├── wizard-damage-10.lpc ├── yumm.lpc ├── blue-elf.lpc ├── elf-damage-7.lpc ├── hahaha.lpc ├── wizard-damage-1.lpc ├── green-elf.lpc ├── welcome.lpc ├── red-elf.lpc ├── red-wizard.lpc ├── wizard-damage-11.lpc ├── yellow-elf.lpc ├── you-cant-catch-me2.lpc ├── hehehe.lpc ├── better-hurry.lpc ├── wizard-damage-12.lpc ├── wizard-death.lpc ├── blue-valkrie.lpc ├── red-warrior.lpc ├── extra-armor.lpc ├── blue-warrior.lpc ├── now-has.lpc ├── can-you-make-it.lpc ├── shot-the-potion.lpc ├── just-kidding.lpc ├── reflective-shots.lpc ├── you-cant-catch-me.lpc ├── yellow-wizard.lpc ├── blue-wizard.lpc ├── green-wizard.lpc ├── red-valkrie.lpc ├── yellow-valkrie.lpc ├── green-warrior.lpc ├── is-now-it.lpc ├── shot-the-food.lpc ├── yellow-warrior.lpc ├── speech-chip-test.lpc ├── ha-ha-ha-ha.lpc ├── extra-speed.lpc ├── warriror-damage-7.lpc ├── wizard-damage-9.lpc ├── dont-shoot-the-potion.lpc ├── extra-shot-power.lpc ├── green-valkrie.lpc ├── better-luck-next-time.lpc ├── extra-shot-speed.lpc ├── times-running-out.lpc ├── valkrie-damage-14.lpc ├── extra-magic-power.lpc ├── valkrie-death.lpc ├── temporary-transportability.lpc ├── exits-may-move-around.lpc ├── extra-fight-power.lpc ├── needs-food-badly.lpc ├── elf-death.lpc ├── limited-invisibility.lpc ├── temporary-repulsiveness.lpc ├── looks-like-you-lose.lpc ├── this-treasure-chest-is-locked.lpc ├── find-the-hidden-potion.lpc ├── that-was-a-heroic-effort.lpc ├── has-eaten-all-the-food-lately.lpc ├── all-your-powers-will-be-lost.lpc ├── some-walls-are-invisible.lpc ├── you-have-found-my-treasure.lpc ├── times-on-my-side.lpc ├── someone-shot-the-food.lpc ├── welcome_blue_valkrie.lpc ├── remember-dont-shoot-food.lpc ├── try-this-level-now.lpc ├── lets-see-you-get-out-of-here.lpc ├── try-and-find-a-way-out.lpc ├── traps-make-walls-disappear.lpc ├── kill-thief-to-recover-stolen-item.lpc ├── some-walls-may-be-destroyed.lpc ├── welcome-to-treasure.lpc ├── valkrie_is_it.lpc ├── your-shots-now-hurt-other-players.lpc ├── skate_or_die.lpc ├── warrior-death.lpc ├── good_choice_kid.lpc ├── stuart-welcome-nb.lpc ├── ive-not-seen-such-bravery.lpc ├── dont-shoot-your-friends-on-this-level.lpc ├── save_keys_to_open_doors.lpc ├── shots-do-not-hurt-other-players-yet.lpc ├── your-life-force-is-running-out.lpc ├── your-shots-now-stun-other-players.lpc ├── you-just-shot-the-potion.lpc ├── stuart-congrats.lpc └── test.lpc ├── .gitignore ├── BlueWizard.xcodeproj ├── project.xcworkspace │ └── contents.xcworkspacedata └── xcuserdata │ └── patrick.xcuserdatad │ └── xcschemes │ └── xcschememanagement.plist ├── README.md ├── BlueWizard.xcworkspace ├── contents.xcworkspacedata └── xcshareddata │ └── BlueWizard.xccheckout ├── Podfile.lock ├── BlueWizardTests ├── Info.plist ├── ReflectorTests.m ├── NibbleSwitcherTests.m ├── NibbleBitReverserTests.m ├── HexConverterTests.m ├── ClosestValueFinderTests.m ├── HexByteBinaryEncoderTests.m ├── RMSNormalizerTests.m ├── SegmenterTests.m ├── BufferTests.m └── FrameDataBinaryEncoderTests.m └── license.txt /Build/BlueWizard.app/Contents/PkgInfo: -------------------------------------------------------------------------------- 1 | APPL???? -------------------------------------------------------------------------------- /screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patrick99e99/BlueWizard/HEAD/screenshot.png -------------------------------------------------------------------------------- /unprocessed/ces.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patrick99e99/BlueWizard/HEAD/unprocessed/ces.wav -------------------------------------------------------------------------------- /BlueWizard/lib/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patrick99e99/BlueWizard/HEAD/BlueWizard/lib/.DS_Store -------------------------------------------------------------------------------- /processed/ces-processed.aif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patrick99e99/BlueWizard/HEAD/processed/ces-processed.aif -------------------------------------------------------------------------------- /unprocessed/ces-filtered.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patrick99e99/BlueWizard/HEAD/unprocessed/ces-filtered.wav -------------------------------------------------------------------------------- /Podfile: -------------------------------------------------------------------------------- 1 | source 'https://github.com/CocoaPods/Specs.git' 2 | 3 | target :BlueWizardTests do 4 | pod 'OCMock' 5 | end 6 | -------------------------------------------------------------------------------- /BlueWizard/main.m: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | int main(int argc, const char * argv[]) { 4 | return NSApplicationMain(argc, argv); 5 | } 6 | -------------------------------------------------------------------------------- /Build/BlueWizard.app/Contents/MacOS/BlueWizard: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patrick99e99/BlueWizard/HEAD/Build/BlueWizard.app/Contents/MacOS/BlueWizard -------------------------------------------------------------------------------- /lpc/elf-damage-5.lpc: -------------------------------------------------------------------------------- 1 | 81,b,dd,34,33,9b,6,3c,9e,10,4b,77,12,b0,f4,53,28,db,6c,42,63,f,96,6e,61,1,8b,47,d9,3a,42,1b,da,37,35,cf,34,cc,c,ef,5b,c5,bd,d4,3 2 | -------------------------------------------------------------------------------- /Build/BlueWizard.app/Contents/Resources/AppIcon.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patrick99e99/BlueWizard/HEAD/Build/BlueWizard.app/Contents/Resources/AppIcon.icns -------------------------------------------------------------------------------- /Build/BlueWizard.app/Contents/Resources/Assets.car: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patrick99e99/BlueWizard/HEAD/Build/BlueWizard.app/Contents/Resources/Assets.car -------------------------------------------------------------------------------- /BlueWizard/NibbleSwitcher.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @interface NibbleSwitcher : NSObject 4 | +(NSArray *)process:(NSArray *)nibbles; 5 | @end 6 | -------------------------------------------------------------------------------- /BlueWizard/HexFormatter.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @interface HexFormatter : NSObject 4 | 5 | +(NSArray *)process:(NSArray *)nibbles; 6 | 7 | @end 8 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | BlueWizard.xcodeproj/project.xcworkspace/** 2 | BlueWizard.xcworkspace/** 3 | BlueWizard.xcodeproj/xcuserdata/* 4 | .DS_Store 5 | BlueWizard/.DS_Store 6 | Pods/** 7 | -------------------------------------------------------------------------------- /BlueWizard/HexByteBinaryEncoder.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @interface HexByteBinaryEncoder : NSObject 4 | +(NSArray *)process:(NSArray *)nibbles; 5 | @end 6 | -------------------------------------------------------------------------------- /lpc/valkrie-damage-2.lpc: -------------------------------------------------------------------------------- 1 | 4c,16,bd,45,23,6c,35,ad,63,89,e,8e,dd,3c,af,27,d1,73,65,b2,83,ec,86,cc,56,41,d,6a,a,32,1b,1a,ce,f1,1a,74,eb,22,68,52,ae,d5,2d,35,23,58,de,30,37,27,f 2 | -------------------------------------------------------------------------------- /BlueWizard/NibbleBitReverser.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @interface NibbleBitReverser : NSObject 4 | 5 | +(NSArray *)process:(NSArray *)nibbles; 6 | 7 | @end 8 | -------------------------------------------------------------------------------- /BlueWizard/TimeMachine.h: -------------------------------------------------------------------------------- 1 | #import 2 | @class Buffer; 3 | @interface TimeMachine : NSObject 4 | 5 | +(Buffer *)process:(Buffer *)buffer; 6 | 7 | @end 8 | -------------------------------------------------------------------------------- /BlueWizard/WaveformView.h: -------------------------------------------------------------------------------- 1 | #import 2 | @class Buffer; 3 | 4 | @interface WaveformView : NSScrollView 5 | @property (nonatomic, strong) Buffer *buffer; 6 | @end 7 | -------------------------------------------------------------------------------- /BlueWizard/FrameDataBinaryEncoder.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @interface FrameDataBinaryEncoder : NSObject 4 | +(NSArray *)process:(NSArray *)parametersList; 5 | @end 6 | -------------------------------------------------------------------------------- /BlueWizard/Media.xcassets/AppIcon.appiconset/blue-wizard-128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patrick99e99/BlueWizard/HEAD/BlueWizard/Media.xcassets/AppIcon.appiconset/blue-wizard-128.png -------------------------------------------------------------------------------- /BlueWizard/Media.xcassets/AppIcon.appiconset/blue-wizard-16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patrick99e99/BlueWizard/HEAD/BlueWizard/Media.xcassets/AppIcon.appiconset/blue-wizard-16.png -------------------------------------------------------------------------------- /BlueWizard/Media.xcassets/AppIcon.appiconset/blue-wizard-256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patrick99e99/BlueWizard/HEAD/BlueWizard/Media.xcassets/AppIcon.appiconset/blue-wizard-256.png -------------------------------------------------------------------------------- /BlueWizard/Media.xcassets/AppIcon.appiconset/blue-wizard-32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patrick99e99/BlueWizard/HEAD/BlueWizard/Media.xcassets/AppIcon.appiconset/blue-wizard-32.png -------------------------------------------------------------------------------- /BlueWizard/Media.xcassets/AppIcon.appiconset/blue-wizard-512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patrick99e99/BlueWizard/HEAD/BlueWizard/Media.xcassets/AppIcon.appiconset/blue-wizard-512.png -------------------------------------------------------------------------------- /BlueWizard/Media.xcassets/AppIcon.appiconset/blue-wizard-64.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patrick99e99/BlueWizard/HEAD/BlueWizard/Media.xcassets/AppIcon.appiconset/blue-wizard-64.png -------------------------------------------------------------------------------- /BlueWizard/HammingWindow.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @class Buffer; 4 | @interface HammingWindow : NSObject 5 | 6 | +(void)processBuffer:(Buffer *)buffer; 7 | 8 | @end 9 | -------------------------------------------------------------------------------- /BlueWizard/Media.xcassets/AppIcon.appiconset/blue-wizard-1024.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patrick99e99/BlueWizard/HEAD/BlueWizard/Media.xcassets/AppIcon.appiconset/blue-wizard-1024.png -------------------------------------------------------------------------------- /BlueWizard/Media.xcassets/AppIcon.appiconset/blue-wizard-256-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patrick99e99/BlueWizard/HEAD/BlueWizard/Media.xcassets/AppIcon.appiconset/blue-wizard-256-1.png -------------------------------------------------------------------------------- /BlueWizard/Media.xcassets/AppIcon.appiconset/blue-wizard-32-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patrick99e99/BlueWizard/HEAD/BlueWizard/Media.xcassets/AppIcon.appiconset/blue-wizard-32-1.png -------------------------------------------------------------------------------- /BlueWizard/Media.xcassets/AppIcon.appiconset/blue-wizard-512-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patrick99e99/BlueWizard/HEAD/BlueWizard/Media.xcassets/AppIcon.appiconset/blue-wizard-512-1.png -------------------------------------------------------------------------------- /BlueWizard/PitchEstimator.h: -------------------------------------------------------------------------------- 1 | #import 2 | @class Buffer; 3 | @interface PitchEstimator : NSObject 4 | 5 | +(double)pitchForPeriod:(Buffer *)buffer; 6 | 7 | @end 8 | -------------------------------------------------------------------------------- /BlueWizard/PreEmphasizer.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @class Buffer; 4 | @interface PreEmphasizer : NSObject 5 | 6 | +(void)processBuffer:(Buffer *)buffer; 7 | 8 | @end 9 | -------------------------------------------------------------------------------- /lpc/elf-damage-2.lpc: -------------------------------------------------------------------------------- 1 | 8a,37,a5,2a,95,33,1a,c2,8e,76,65,c9,a2,10,be,3b,22,22,b1,42,f8,e9,c8,8c,c4,6,65,73,c3,33,9c,8,9c,cd,49,73,4f,a3,28,36,c6,44,3d,ad,e2,e5,1a,63,16,27,c4,62,6d,d3,85,e5,3c 2 | -------------------------------------------------------------------------------- /BlueWizard/Output.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @class Buffer; 4 | @interface Output : NSObject 5 | 6 | +(void)createAIFFileFrom:(Buffer *)buffer URL:(NSURL *)URL; 7 | 8 | @end 9 | -------------------------------------------------------------------------------- /BlueWizard/SpeechSynthesizer.h: -------------------------------------------------------------------------------- 1 | #import 2 | @class Buffer; 3 | 4 | @interface SpeechSynthesizer : NSObject 5 | 6 | +(Buffer *)processSpeechData:(NSArray *)lpc; 7 | 8 | @end 9 | -------------------------------------------------------------------------------- /BlueWizard/Input.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @class Buffer; 4 | @interface Input : NSObject 5 | 6 | -(instancetype)initWithURL:(NSURL *)URL; 7 | -(Buffer *)buffer; 8 | 9 | @end 10 | -------------------------------------------------------------------------------- /Build/BlueWizard.app/Contents/Resources/Base.lproj/Main.storyboardc/Info.plist: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patrick99e99/BlueWizard/HEAD/Build/BlueWizard.app/Contents/Resources/Base.lproj/Main.storyboardc/Info.plist -------------------------------------------------------------------------------- /lpc/8.lpc: -------------------------------------------------------------------------------- 1 | a9,28,5e,d4,ab,ab,8c,74,38,13,c9,5a,33,92,11,5c,d8,73,c9,48,ba,37,91,ec,25,23,e9,4e,59,7a,e6,8c,7c,18,16,9e,99,dd,9a,15,4c,c0,67,4d,19,56,a,5,9a,d6,7a,0,0,6,4c,16,8a,80,61,59,10,d0,8c,29,2,b2,76,1,0,78 2 | -------------------------------------------------------------------------------- /lpc/valkrie-damage-5.lpc: -------------------------------------------------------------------------------- 1 | 45,4c,b6,1a,dd,af,35,ce,97,c,9a,8a,d2,58,1f,32,29,32,4c,11,4c,c8,c4,c8,50,49,d6,25,43,a2,22,25,55,d7,8,a9,ae,98,c,97,dc,b9,62,b6,73,5d,8c,e0,88,99,2e,8,26,8b,52,67,aa,38,4,37,72,9f,45,93,7 2 | -------------------------------------------------------------------------------- /BlueWizard/AppDelegate.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "SamplerDelegate.h" 3 | 4 | @interface AppDelegate : NSObject 5 | 6 | -(BOOL)hasInput; 7 | 8 | @end 9 | 10 | -------------------------------------------------------------------------------- /BlueWizard/ClosestValueFinder.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @interface ClosestValueFinder : NSObject 4 | 5 | +(NSUInteger)indexFor:(double)actual table:(float *)table size:(NSUInteger)size; 6 | 7 | @end 8 | -------------------------------------------------------------------------------- /lpc/elf-damage-4.lpc: -------------------------------------------------------------------------------- 1 | 46,8c,23,dd,75,42,17,36,7,db,a0,b6,93,c8,d4,62,39,2c,4e,c0,d3,89,92,f0,38,9,4b,23,46,c2,92,24,32,67,3b,d,b7,9d,98,3c,63,55,d2,75,10,72,b7,c1,4a,5b,4e,4d,d3,9a,b3,2d,19,27,75,1f,b6,72,8c,80,78,38,1f 2 | -------------------------------------------------------------------------------- /lpc/elf-damage-3.lpc: -------------------------------------------------------------------------------- 1 | 82,54,69,c2,44,9d,18,dc,ec,22,b1,cc,62,10,b1,2a,cc,62,8b,81,c5,a8,e,f1,2d,2,e1,6f,c2,3c,bb,8,94,9d,9,89,4a,23,70,36,c7,c5,33,8d,a0,58,9d,10,b1,b4,8c,17,6b,8c,d8,9c,30,8d,d7,d,65,71,8a,1c,e1,a7,42,55,f6,3 2 | -------------------------------------------------------------------------------- /lpc/valkrie-damage-1.lpc: -------------------------------------------------------------------------------- 1 | c1,e,2d,d5,7c,4a,17,35,c6,76,93,1a,d5,e4,68,d7,24,7c,72,93,83,1f,33,8b,59,4d,9,6e,5c,cd,67,37,3d,e8,ce,10,79,54,6c,ef,c6,8c,7d,96,f3,7c,19,55,ce,d3,26,50,65,d5,35,47,ab,48,ad,64,cf,ae,cd,62,51,c7,d4,32,d6,3 2 | -------------------------------------------------------------------------------- /lpc/warrior-damage-1.lpc: -------------------------------------------------------------------------------- 1 | 6d,2c,c2,a7,84,d7,ae,ae,72,ed,31,5c,b3,da,cc,7d,5a,70,ed,6a,13,cf,19,85,25,ad,4b,24,67,12,96,84,be,50,f6,75,88,e2,a6,cc,38,87,31,6a,58,a,95,68,96,28,6e,2d,d8,a2,89,2a,ab,3d,c2,f0,11,8f,ca,ae,c0,dc,c2,d2,ce,3 2 | -------------------------------------------------------------------------------- /BlueWizard.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /BlueWizard/SpeechDataReader.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @interface SpeechDataReader : NSObject 4 | 5 | +(NSArray *)speechDataFromFile:(NSString *)file; 6 | +(NSArray *)speechDataFromString:(NSString *)string; 7 | 8 | @end 9 | -------------------------------------------------------------------------------- /BlueWizard/BitPacker.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @interface BitPacker : NSObject 4 | 5 | +(NSString *)delimiter; 6 | +(NSString *)pack:(NSArray *)frameData; 7 | +(NSArray *)unpack:(NSString *)packedData; 8 | 9 | @end 10 | -------------------------------------------------------------------------------- /BlueWizard/Processor.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @class Buffer; 4 | @interface Processor : NSObject 5 | 6 | +(instancetype)process:(Buffer *)buffer; 7 | -(void)postNotificationsForFrames:(NSArray *)frames; 8 | 9 | @end 10 | -------------------------------------------------------------------------------- /Build/BlueWizard.app/Contents/Resources/Base.lproj/Main.storyboardc/MainMenu.nib/keyedobjects.nib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patrick99e99/BlueWizard/HEAD/Build/BlueWizard.app/Contents/Resources/Base.lproj/Main.storyboardc/MainMenu.nib/keyedobjects.nib -------------------------------------------------------------------------------- /lpc/wizard-damage-6.lpc: -------------------------------------------------------------------------------- 1 | c1,4d,53,22,d2,cb,14,2d,d,49,4b,2f,1b,94,d0,35,2c,35,72,90,43,d5,34,77,53,41,f2,4d,43,33,4d,7,d9,6c,f6,c8,8c,9a,34,d7,ac,28,2b,4e,f2,42,b1,24,ab,4a,29,f,d9,53,d8,17,84,d6,7,4f,53,ad,e5,86,e8,34,93,bc,a1,5a,42,8e,8,b1,58,f 2 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | Have you ever needed some good old fashioned linear predictive coding for your TMS5220 but just couldn't get it?!?! 2 | 3 | Now you can!!!! 4 | 5 | ![screenshot](https://raw.githubusercontent.com/patrick99e99/BlueWizard/master/screenshot.png) 6 | -------------------------------------------------------------------------------- /Build/BlueWizard.app/Contents/Resources/Base.lproj/Main.storyboardc/MainMenu.nib/keyedobjects-101300.nib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patrick99e99/BlueWizard/HEAD/Build/BlueWizard.app/Contents/Resources/Base.lproj/Main.storyboardc/MainMenu.nib/keyedobjects-101300.nib -------------------------------------------------------------------------------- /Build/BlueWizard.app/Contents/Resources/Base.lproj/Main.storyboardc/MainMenu.nib/keyedobjects-110000.nib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patrick99e99/BlueWizard/HEAD/Build/BlueWizard.app/Contents/Resources/Base.lproj/Main.storyboardc/MainMenu.nib/keyedobjects-110000.nib -------------------------------------------------------------------------------- /lpc/6.lpc: -------------------------------------------------------------------------------- 1 | 8,58,22,8d,0,47,55,10,e0,48,57,2,6c,dd,4e,80,29,53,4b,5c,bc,98,f8,d6,1d,71,31,c6,1e,3d,77,64,dd,87,a8,e6,93,51,76,1f,a2,96,4b,5a,df,53,b0,b8,af,31,47,5b,2c,e6,39,7,80,0,e5,50,10,60,a8,b,2,2c,35,41,80,a3,32,8,b0,54,3b,1,96,28,47,c0,e6,ee,8,b8,2a,1d,1e 2 | -------------------------------------------------------------------------------- /lpc/elf-damage-6.lpc: -------------------------------------------------------------------------------- 1 | 8a,e4,cd,2d,b2,6a,5,c2,67,57,b1,6a,14,f0,30,45,b4,aa,b1,c3,e3,43,f6,ad,d8,1,f,8b,49,af,62,1b,22,4c,21,9d,ae,ed,28,3f,84,b4,a6,b1,63,44,8a,10,ed,26,8e,97,35,44,2c,e2,28,49,16,67,8b,b4,23,74,96,d2,dc,dd,36,73,99,2f,53,f3,34,24,90,7a,c2,d4,92,3c 2 | -------------------------------------------------------------------------------- /lpc/elf-damage.lpc: -------------------------------------------------------------------------------- 1 | 89,29,d9,1a,cb,63,15,a2,b4,58,4c,8f,59,b0,92,78,a4,d4,49,41,6b,e1,b6,e1,38,5,6d,95,5b,46,62,17,ac,16,6a,bd,90,dc,88,5a,a4,74,ac,71,a3,4a,b5,65,97,26,85,2d,49,97,dd,12,27,31,17,6b,ac,8c,15,b4,54,ad,a8,ca,b2,71,62,b7,e2,6a,cb,2c,8c,cd,c3,a2,43,3d 2 | -------------------------------------------------------------------------------- /lpc/warriror-damage-4.lpc: -------------------------------------------------------------------------------- 1 | 21,88,22,27,14,bd,b6,30,b2,e8,76,e4,d6,92,60,7c,93,b1,75,49,6d,c8,35,b4,4e,29,93,ad,0b,c5,3b,b5,dc,eb,d8,50,e8,5c,2a,af,62,d3,c0,4f,6a,23,f7,0d,03,2d,a6,d7,ba,97,59,3c,99,81,87,e9,60,71,ad,66,5a,66,92,25,35,59,58,da,0c,51,39,0f,e8,32,0c 2 | -------------------------------------------------------------------------------- /lpc/warriror-damage-3.lpc: -------------------------------------------------------------------------------- 1 | a6,ad,d2,db,cc,e2,8c,ba,72,ef,c,ca,b6,9a,2c,73,dc,a5,cb,aa,b3,cc,35,e3,ae,ab,8a,ae,db,c4,d6,ac,2a,ea,ee,14,ed,ba,ea,cc,7b,d2,b0,eb,ea,2a,f3,9e,41,e7,63,28,dc,66,a,d5,97,29,a8,da,72,c8,1a,46,6f,7a,9c,29,b3,99,65,da,72,d4,56,62,d1,b6,3b,58,52,3f 2 | -------------------------------------------------------------------------------- /lpc/warriror-damage-5.lpc: -------------------------------------------------------------------------------- 1 | 21,8b,2e,ca,85,33,37,2f,b8,a,33,ee,5a,6c,1b,c3,d5,64,73,72,4c,c,33,b6,ae,c9,f6,c3,84,dd,5a,27,c7,77,13,65,eb,92,3c,5f,34,d,b9,4b,f2,6d,d,63,e7,2e,29,54,de,33,92,d2,85,48,eb,4c,6b,49,ea,72,97,2d,4c,29,ad,ab,9d,f7,8,47,6f,6c,d4,35,d4,44,b2,3e 2 | -------------------------------------------------------------------------------- /BlueWizard/HexConverter.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @interface HexConverter : NSObject 4 | 5 | +(NSArray *)process:(NSArray *)nibbles; 6 | +(NSString *)stringFromData:(NSData *)data; 7 | +(NSData *)dataFromString:(NSString *)string; 8 | 9 | @end 10 | -------------------------------------------------------------------------------- /lpc/is-it.lpc: -------------------------------------------------------------------------------- 1 | 69,28,82,cd,bb,46,f7,a1,4d,45,b3,59,ee,a8,b2,24,a6,91,9d,23,cb,5a,94,b1,eb,cc,28,fb,62,66,6c,d6,48,0,9,6a,70,80,2,8,88,d0,1c,52,57,24,9a,5f,da,29,e5,b0,24,3c,1b,ba,55,d5,91,f8,a4,ec,56,67,43,de,5b,8a,4a,5b,2,59,ed,a8,e,5d,8b,ce,a2,1d,7,80,0,45,98,23,60,42,a7,7 2 | -------------------------------------------------------------------------------- /lpc/valkrie-damage-6.lpc: -------------------------------------------------------------------------------- 1 | 41,28,3c,d6,4c,eb,16,de,db,5e,35,9f,5a,f8,10,a6,d1,63,6c,e1,42,e9,82,ac,a8,89,f3,b9,13,3c,83,25,de,e7,e,88,ac,5c,4,97,3b,20,32,71,92,5c,e8,2,b,37,41,15,a5,13,3c,1c,3b,4b,84,1e,c8,8c,69,5c,91,db,49,22,89,a,85,9d,16,f6,ba,22,55,a2,cb,4d,ad,d2,ec,1 2 | -------------------------------------------------------------------------------- /lpc/wizard-damage-13.lpc: -------------------------------------------------------------------------------- 1 | 8,28,55,d9,71,be,6a,56,47,c9,40,87,a2,9d,e5,5,3,1d,8a,74,a5,1a,2a,74,4a,12,d1,3e,b0,30,a9,50,e4,64,a9,c2,86,22,59,63,a5,a,17,b2,b4,75,96,69,42,c,1a,d1,5e,ba,28,a9,88,69,58,e9,60,c4,68,e2,c5,85,9d,1b,83,9a,97,86,32,51,2e,66,e2,52,4b,e4,c5,85,61,99,e5,7 2 | -------------------------------------------------------------------------------- /Build/BlueWizard.app/Contents/Resources/Base.lproj/Main.storyboardc/NSViewController-XfG-lQ-9wD.nib/keyedobjects.nib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patrick99e99/BlueWizard/HEAD/Build/BlueWizard.app/Contents/Resources/Base.lproj/Main.storyboardc/NSViewController-XfG-lQ-9wD.nib/keyedobjects.nib -------------------------------------------------------------------------------- /Build/BlueWizard.app/Contents/Resources/Base.lproj/Main.storyboardc/XfG-lQ-9wD-view-m2S-Jp-Qdl.nib/keyedobjects.nib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patrick99e99/BlueWizard/HEAD/Build/BlueWizard.app/Contents/Resources/Base.lproj/Main.storyboardc/XfG-lQ-9wD-view-m2S-Jp-Qdl.nib/keyedobjects.nib -------------------------------------------------------------------------------- /BlueWizard/RMSNormalizer.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @interface RMSNormalizer : NSObject 4 | 5 | +(void)normalizeVoiced:(NSArray *)frameData; 6 | +(void)normalizeUnvoiced:(NSArray *)frameData; 7 | +(void)applyUnvoicedMultiplier:(NSArray *)frameData; 8 | 9 | @end 10 | -------------------------------------------------------------------------------- /BlueWizard/BitHelpers.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @interface BitHelpers : NSObject 4 | 5 | +(NSString *)valueToBinary:(NSUInteger)value bits:(NSUInteger)bits; 6 | +(NSUInteger)valueForBinary:(NSString *)binary; 7 | +(NSUInteger)byteToValue:(NSString *)byte; 8 | 9 | @end 10 | -------------------------------------------------------------------------------- /Build/BlueWizard.app/Contents/Resources/Base.lproj/Main.storyboardc/XfG-lQ-9wD-view-m2S-Jp-Qdl.nib/keyedobjects-101300.nib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patrick99e99/BlueWizard/HEAD/Build/BlueWizard.app/Contents/Resources/Base.lproj/Main.storyboardc/XfG-lQ-9wD-view-m2S-Jp-Qdl.nib/keyedobjects-101300.nib -------------------------------------------------------------------------------- /Build/BlueWizard.app/Contents/Resources/Base.lproj/Main.storyboardc/XfG-lQ-9wD-view-m2S-Jp-Qdl.nib/keyedobjects-110000.nib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patrick99e99/BlueWizard/HEAD/Build/BlueWizard.app/Contents/Resources/Base.lproj/Main.storyboardc/XfG-lQ-9wD-view-m2S-Jp-Qdl.nib/keyedobjects-110000.nib -------------------------------------------------------------------------------- /Build/BlueWizard.app/Contents/Resources/Base.lproj/Main.storyboardc/NSViewController-XfG-lQ-9wD.nib/keyedobjects-101300.nib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patrick99e99/BlueWizard/HEAD/Build/BlueWizard.app/Contents/Resources/Base.lproj/Main.storyboardc/NSViewController-XfG-lQ-9wD.nib/keyedobjects-101300.nib -------------------------------------------------------------------------------- /Build/BlueWizard.app/Contents/Resources/Base.lproj/Main.storyboardc/NSViewController-XfG-lQ-9wD.nib/keyedobjects-110000.nib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/patrick99e99/BlueWizard/HEAD/Build/BlueWizard.app/Contents/Resources/Base.lproj/Main.storyboardc/NSViewController-XfG-lQ-9wD.nib/keyedobjects-110000.nib -------------------------------------------------------------------------------- /lpc/haha.lpc: -------------------------------------------------------------------------------- 1 | c,c8,55,7d,8,a5,7b,59,79,d5,c1,95,16,65,6d,55,7,5b,8b,8f,a5,55,19,6c,ab,9e,9e,e6,b4,71,b5,45,44,aa,1c,2,f8,40,16,84,52,2c,2c,d4,ce,10,6b,b6,8e,34,bb,43,6c,d9,26,4a,eb,c,a9,96,18,2d,9b,32,e4,d2,ad,ad,6c,f6,50,4a,b5,f6,b6,a9,43,2d,c5,da,db,ae,e,b5,14,2b,1f,bb,32,94,52,3d,6d,6d,4e,52,4a,8b,b0,72,3b,f 2 | -------------------------------------------------------------------------------- /lpc/valkrie-damage-4.lpc: -------------------------------------------------------------------------------- 1 | c3,6d,b6,5b,b3,ea,e,37,e7,72,db,8a,32,ac,94,a7,a4,23,ea,50,73,98,d6,ac,44,43,49,b9,8b,3d,1a,f,35,d6,74,4e,af,3d,8c,30,83,a9,bc,49,71,43,70,17,cb,73,25,2c,c6,c3,4,1f,9b,28,1b,49,37,59,82,0,5d,45,40,0,c3,48,30,e0,78,53,1,6c,ef,a1,80,9d,22,15,b0,82,bb,2,66,ca,10,c0,48,19,4,e8,5e,15,1,55,90,3e 2 | -------------------------------------------------------------------------------- /lpc/valkrie-damage-7.lpc: -------------------------------------------------------------------------------- 1 | 4c,d4,b5,43,c8,9d,28,81,e7,e,13,b3,63,78,d6,52,cd,32,49,e0,78,d,35,f7,b8,81,e3,39,4d,22,ed,5,8e,97,54,77,8f,1b,58,de,5c,3d,3c,69,60,59,b,f1,88,a4,81,e3,b9,c4,c2,eb,5,9e,55,57,73,4f,ea,4,d6,5c,cc,3d,a9,51,79,4b,11,b5,24,4a,67,b9,55,45,93,30,9b,85,9,57,b1,c3,7c,a9,3a,33,4d,e,a,94,88,ec,76,d9,f 2 | -------------------------------------------------------------------------------- /BlueWizard.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /lpc/warriror-damage-6.lpc: -------------------------------------------------------------------------------- 1 | c5,c8,3c,47,c5,16,17,2f,e9,6a,52,bf,34,d2,c2,a3,d5,ac,76,cb,92,eb,62,f6,d9,a5,48,be,9b,45,6b,97,2a,a4,c,ac,2e,33,ea,2c,63,44,ed,c9,a8,32,f7,75,97,d7,a3,cb,dc,47,4c,5f,8f,a1,73,99,70,da,32,c6,4a,65,33,79,4b,9b,82,ae,e1,88,c7,6d,9,ae,8a,22,2f,a7,35,f8,6a,f2,ba,18,b6,60,b3,31,6a,94,d8,a2,8e,61,a9,39,f 2 | -------------------------------------------------------------------------------- /BlueWizard/Reflector.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @interface Reflector : NSObject 4 | 5 | @property (nonatomic) double rms; 6 | 7 | +(instancetype)translateCoefficients:(double *)r numberOfSamples:(NSUInteger)numberOfSamples; 8 | -(BOOL)isVoiced; 9 | -(BOOL)isUnvoiced; 10 | -(double *)ks; 11 | 12 | @end 13 | -------------------------------------------------------------------------------- /BlueWizard/SamplerDelegate.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | #ifndef BlueWizard_SpeechSynthesizerDelegate_h 4 | #define BlueWizard_SpeechSynthesizerDelegate_h 5 | 6 | @class Buffer; 7 | @protocol SamplerDelegate 8 | 9 | -(void)didFinishStreaming:(Buffer *)buffer; 10 | 11 | @end 12 | 13 | #endif 14 | -------------------------------------------------------------------------------- /lpc/10.lpc: -------------------------------------------------------------------------------- 1 | c,18,c2,8d,0,4b,b8,a6,a4,c7,14,95,a8,52,c2,62,c5,23,27,ca,8,6b,e2,90,6e,3b,2b,68,59,5d,ad,2b,af,b0,65,57,d3,6e,bc,a2,96,43,4d,a6,ce,4a,6a,29,35,ae,3a,2b,ab,39,5d,a5,aa,ae,a2,46,57,d3,a9,32,ea,1a,8a,55,6a,4c,eb,9a,1d,62,f5,c9,a1,2f,d6,48,a8,ab,ba,a9,1a,15,85,ae,e6,a6,6a,44,15,bb,a9,9b,ab,32,36,8c,69,66,29,46,c5,28,e7,ea,e5,1 2 | -------------------------------------------------------------------------------- /lpc/valkrie-damage-8.lpc: -------------------------------------------------------------------------------- 1 | c3,2d,b1,d2,36,9a,c,2b,cd,88,5c,b3,32,f4,34,3d,7d,35,ca,50,d3,f2,88,d5,c4,43,8e,37,3d,c6,42,f,31,8d,9,6d,2b,d2,c4,78,d3,35,33,4c,11,e2,73,d3,4e,2b,41,c,df,43,aa,cd,24,29,ec,4c,ca,2c,55,d4,70,23,b0,2a,72,32,fd,9,a7,4a,cb,c1,f5,bd,12,a2,62,b9,c0,8d,76,f0,6a,62,22,73,53,38,a6,a9,4a,d4,2a,43,ef,26,22,d5,79,a,b9,92,d0,fc,1 2 | -------------------------------------------------------------------------------- /lpc/wizard-damage-4.lpc: -------------------------------------------------------------------------------- 1 | 42,cd,19,9d,d3,13,5,d5,27,ee,18,b1,58,54,9f,68,a3,d2,52,53,43,a4,89,ce,98,4d,cf,9,53,db,2b,36,23,67,2c,6d,f,d5,ec,94,a8,b4,ad,70,73,53,a6,f4,d1,d0,c5,cb,95,42,4b,87,94,20,15,2a,2b,ad,9c,e2,50,b8,dc,dd,52,48,53,a4,4a,73,53,21,cb,19,d3,2c,2c,b9,bc,34,74,f6,b4,e8,aa,3a,c9,89,c3,96,a9,cb,64,13,31,5b,a2,2e,9d,5d,d8,2c,3d 2 | -------------------------------------------------------------------------------- /lpc/wizard-damage-5.lpc: -------------------------------------------------------------------------------- 1 | ca,8a,5e,25,2c,a7,38,4b,55,a9,a9,8e,9c,14,1f,b5,c2,bb,64,92,5c,b0,4e,cd,8a,49,b4,d9,32,d4,6a,25,c1,37,75,d7,58,94,c4,b0,54,4d,73,51,12,5d,77,31,8f,99,49,34,c5,cd,c5,6b,27,49,e6,70,57,a9,9c,14,13,b2,da,70,72,30,54,f1,72,b6,cb,c6,d3,3a,c3,8c,62,bb,c0,16,2b,c5,68,63,12,b5,5c,cd,72,b5,a9,6c,b3,34,f2,45,6a,8,c6,23,45,dc,3c 2 | -------------------------------------------------------------------------------- /lpc/wizard-damage-7.lpc: -------------------------------------------------------------------------------- 1 | c1,8f,4d,d3,3a,85,5,37,c,c9,28,97,9a,94,34,25,a2,ca,58,51,d3,94,88,f6,70,45,8d,53,c3,db,cd,35,35,76,4b,e9,92,d6,f4,38,24,ad,d2,6a,b1,42,d7,b2,4a,73,c5,8f,53,dd,33,8d,a5,38,4c,33,cf,a,16,f2,90,22,dd,3d,68,68,52,b4,12,f1,22,a1,4f,d9,4a,2d,82,86,3e,25,4f,d1,8,92,a6,54,d2,cd,23,68,58,73,8e,54,8f,30,6a,49,a9,d2,3c,82,3e 2 | -------------------------------------------------------------------------------- /lpc/valkrie-damage-3.lpc: -------------------------------------------------------------------------------- 1 | cd,2b,29,3d,d6,2a,37,2f,a7,f4,58,8d,32,dc,ec,27,6d,24,4a,73,52,a9,8c,d5,c0,4d,4f,23,22,5a,ab,c,25,8d,8a,e8,2c,d3,e4,78,33,ad,2a,72,93,e3,8d,94,6e,cb,4d,8d,3b,8b,2a,23,15,3d,ec,2c,aa,ac,d5,9c,30,b3,20,72,56,f1,7d,af,82,8c,d9,29,74,37,c,ab,e3,a4,58,f7,e,b4,4e,92,52,99,bb,99,33,a9,cb,78,9f,42,cd,24,aa,54,ae,97,d8,93,d0,fa,1 2 | -------------------------------------------------------------------------------- /BlueWizard/PlayheadView.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @class Sampler, WaveformView; 4 | @interface PlayheadView : NSImageView 5 | 6 | @property (nonatomic) NSUInteger position; 7 | @property (nonatomic, weak) Sampler *sampler; 8 | @property (nonatomic, weak) WaveformView *waveformView; 9 | 10 | -(float)containerWidth; 11 | 12 | @end 13 | -------------------------------------------------------------------------------- /Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - OCMock (3.1.5) 3 | 4 | DEPENDENCIES: 5 | - OCMock 6 | 7 | SPEC REPOS: 8 | https://github.com/cocoapods/specs.git: 9 | - OCMock 10 | 11 | SPEC CHECKSUMS: 12 | OCMock: 4c2925291f80407c3738dd1db14d21d0cc278864 13 | 14 | PODFILE CHECKSUM: f281dd0fd3438478f61a1af03c19b6854a3a1b8b 15 | 16 | COCOAPODS: 1.5.2 17 | -------------------------------------------------------------------------------- /lpc/2.lpc: -------------------------------------------------------------------------------- 1 | 2,68,41,8d,1,25,39,27,37,47,36,b6,58,92,bc,14,59,d5,f3,4d,f2,bc,35,8b,f2,3b,c9,b7,26,22,4a,e7,a4,d0,d8,f4,8,99,1d,12,9d,dd,dc,ab,a1,cb,54,d4,31,ce,45,21,e7,c5,d3,34,17,85,92,d7,32,b7,6c,ed,6a,91,22,9d,7d,ab,6b,85,6b,4f,d6,b6,6e,90,a6,23,45,d2,9a,49,ba,89,10,4d,6a,16,69,3b,43,24,a9,da,94,1d,77,16,b7,ec,d0,66,d2,58,9d,92,9b,2c,63,8d,8a,f9,0 2 | -------------------------------------------------------------------------------- /lpc/7.lpc: -------------------------------------------------------------------------------- 1 | 8,98,26,8d,0,4b,86,12,60,89,d0,10,75,55,2c,5c,b5,4a,9c,a2,4a,4c,46,1d,71,c9,ee,e2,5d,67,c5,d5,95,b9,e6,9c,91,14,57,ea,9a,53,4a,9e,6d,aa,4b,5c,51,75,14,ae,61,51,29,95,39,b8,2a,c7,94,51,57,9b,ea,12,77,46,57,63,89,6a,2d,19,43,b,e5,22,b1,38,4d,4d,86,b2,c9,1c,37,55,25,6a,ec,f3,dc,54,8d,aa,52,cc,37,4b,d1,ac,2a,55,4f,ad,d9,88,a,57,3d,b5,25,2b,c2,52,4d,1f 2 | -------------------------------------------------------------------------------- /lpc/valkrie-damage-10.lpc: -------------------------------------------------------------------------------- 1 | cd,8f,a3,42,26,a3,e,2f,d5,4e,9e,c,33,bc,d4,3a,64,22,ec,70,53,e8,e6,8a,b0,c3,49,61,9a,2b,c2,e,3b,85,69,ce,c,3b,9c,14,a6,39,b3,ec,70,b3,9f,a6,8c,30,c3,cb,6e,9a,2a,a2,c,2f,96,9,29,f,3d,fc,c6,63,34,d5,f4,8,8a,ee,d6,90,c2,2d,2c,ba,4a,4d,4b,b7,a8,98,6a,33,2d,54,e2,aa,b2,d4,a5,70,49,8b,cb,56,b3,d2,25,2f,a6,5b,ca,82,aa,a2,2a,5f,13,29,fc,0 2 | -------------------------------------------------------------------------------- /lpc/wizard-damage-3.lpc: -------------------------------------------------------------------------------- 1 | 46,63,21,3c,c3,2d,3b,39,4,71,cb,90,ec,b8,98,25,b8,5d,66,92,b4,d7,d4,76,39,49,36,5e,dd,d2,e4,4,5e,25,d,5d,55,ec,38,5f,35,25,d9,49,92,b5,d7,b4,c,59,c9,30,4e,dc,32,6c,7,43,79,c9,8,53,e2,2c,6d,c5,bd,c2,b6,73,9d,61,97,4e,c5,ca,f7,46,4c,b2,1c,89,38,8,56,b,4b,cc,b2,24,54,cc,3d,31,8b,3d,57,b1,f0,d8,2c,e,4a,45,3d,12,b3,bc,cb,30,37,b3,fd,0 2 | -------------------------------------------------------------------------------- /lpc/hah-hah.lpc: -------------------------------------------------------------------------------- 1 | 4,c8,9a,73,29,ad,64,c8,b8,ed,25,b6,1a,61,65,76,96,d8,4b,85,b6,d9,5e,72,cf,93,9a,11,7b,e9,23,75,58,59,e4,61,f5,e8,66,61,76,93,3d,a2,9b,a8,c7,66,40,d2,64,c3,ec,25,9d,cb,e2,2c,bd,e7,4c,6e,8f,b3,cc,51,2a,b9,22,ee,b2,46,a9,a4,8c,b8,cb,1e,a5,92,d2,e3,2e,7b,94,4c,4a,8f,bb,ec,91,2b,29,23,ee,b2,47,a9,a0,f4,38,cb,19,a5,9c,d3,63,f,67,b4,70,d,af,92,dc,9e,cc,cc,dd,ea,3 2 | -------------------------------------------------------------------------------- /lpc/warriror-damage-2.lpc: -------------------------------------------------------------------------------- 1 | ae,4d,ce,c6,19,9c,84,39,b4,29,52,6c,93,76,ef,b3,c4,b0,4d,68,bc,cf,62,c7,76,69,f7,d1,53,05,db,86,39,06,1d,17,48,e2,8e,10,a3,43,c1,b1,6a,43,ee,0a,03,26,a6,ce,16,a3,02,d4,86,32,5a,c9,08,68,e3,62,1f,35,4d,a1,8b,2b,63,34,f7,04,af,6e,8d,5d,bd,0c,d8,85,cd,15,53,69,4a,e7,36,5f,5d,b8,45,59,58,7d,65,b1,21,67,61,8e,53,45,9b,a4,a9,3d,2d,63,d1,24,f2,80,2e,c3,00 2 | -------------------------------------------------------------------------------- /BlueWizard/HammingWindow.m: -------------------------------------------------------------------------------- 1 | #import "HammingWindow.h" 2 | #import "Buffer.h" 3 | 4 | @implementation HammingWindow 5 | 6 | +(void)processBuffer:(Buffer *)buffer { 7 | for (int i=0; i < buffer.size; i++) { 8 | double window = 0.54f - 0.46f * (double long)cos(2 * M_PI * i / (buffer.size - 1)); 9 | buffer.samples[i] *= window; 10 | } 11 | } 12 | 13 | @end -------------------------------------------------------------------------------- /BlueWizard/Segmenter.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @class Buffer; 4 | @interface Segmenter : NSObject 5 | 6 | -(instancetype)initWithBuffer:(Buffer *)buffer 7 | windowWidth:(NSUInteger)windowWidth; 8 | -(void)eachSegment:(void (^)(Buffer *buffer, NSUInteger index))block; 9 | -(NSUInteger)numberOfSegments; 10 | 11 | @end 12 | -------------------------------------------------------------------------------- /lpc/elf-laugh.lpc: -------------------------------------------------------------------------------- 1 | 6,cb,86,32,27,9c,14,b4,66,f4,a,4f,53,90,6c,71,b2,ac,49,c2,92,d2,cc,12,6b,8e,48,9a,aa,5a,ed,26,34,a,cf,58,ab,97,10,6f,75,a7,23,6d,43,b2,a1,ac,d1,68,86,8a,9a,aa,53,e2,4,2c,59,aa,cc,68,1a,30,2f,6d,66,bc,6e,c1,b3,c6,ac,b1,b8,8c,49,92,7d,96,e5,28,d2,c9,a8,1e,8d,6b,88,60,78,ae,b5,89,a2,94,e8,c9,d5,24,82,b1,4a,6b,57,13,33,d6,f0,a8,7e,57,4d,78,29,aa,7a,d2,31,11,d,cb,ea,4e,27,f 2 | -------------------------------------------------------------------------------- /lpc/4.lpc: -------------------------------------------------------------------------------- 1 | 8,c8,d6,9c,2,2e,96,ab,52,b8,aa,86,48,f5,57,76,9b,9a,22,35,36,8c,ad,6a,8a,65,df,74,d2,ba,29,51,69,2b,88,a7,a4,cc,fa,ad,24,9c,93,72,93,b7,82,68,76,29,74,9d,4a,92,25,a5,b4,b5,2b,50,57,97,da,a7,aa,14,5a,55,5a,df,23,52,74,55,e9,7d,37,2f,b5,55,65,8,43,ad,42,57,a6,31,76,8e,36,dd,98,a6,d4,b1,4a,6d,55,98,53,c7,2c,97,4d,61,4e,1d,2b,5d,36,b9,39,d,ac,74,dd,e5,d6,34,b0,d2,ac,37,59,7d,c1,75,d,93,f 2 | -------------------------------------------------------------------------------- /lpc/valkrie-damage-12.lpc: -------------------------------------------------------------------------------- 1 | 86,35,b3,9c,39,92,26,56,af,72,d6,88,94,18,b3,2a,c9,b4,72,a2,4d,ef,22,e5,d8,89,31,6d,8a,94,9c,24,c6,fa,19,30,56,92,18,ed,a7,c8,2d,4e,62,9d,e9,46,93,ba,89,93,b6,b,53,93,6,5e,e6,4a,8,ab,9b,44,ed,a6,21,35,76,92,65,ae,64,71,27,49,95,b1,8b,24,12,27,53,86,6e,d2,48,94,6c,6d,73,59,6d,65,72,44,c9,20,8f,da,c1,13,ae,da,dc,e4,6,8f,bb,cc,48,97,1d,22,eb,dc,3d,d5,b2,49,b8,af,74,31,27,f 2 | -------------------------------------------------------------------------------- /lpc/warriror-damage-8.lpc: -------------------------------------------------------------------------------- 1 | 6d,9f,96,3d,5b,d4,b6,25,d9,28,15,d9,b2,d6,a6,39,cb,d9,eb,3a,a2,f2,76,93,3d,ab,af,42,aa,92,b3,9e,a5,b,89,e,f1,77,e6,61,c4,ab,98,5b,e9,8b,f2,a,a1,7e,a1,8f,26,da,c4,f7,b4,a5,71,a9,4c,f5,32,c6,61,d5,26,99,eb,98,1b,57,df,30,3d,e7,18,52,22,8b,dd,8d,bd,4b,f6,6e,d5,ba,d6,2e,38,a6,c5,dd,98,bb,c6,ec,73,67,6b,5f,56,ad,53,99,ad,6d,1b,95,aa,40,5f,8e,2e,39,ab,d8,4b,d8,23,9f,3a,d7,2c,f 2 | -------------------------------------------------------------------------------- /BlueWizard/Filterer.h: -------------------------------------------------------------------------------- 1 | #import 2 | @class Buffer; 3 | 4 | @interface Filterer : NSObject 5 | 6 | -(instancetype)initWithBuffer:(Buffer *)buffer 7 | lowPassCutoffInHZ:(NSUInteger)lowPassCutoffInHZ 8 | highPassCutoffInHZ:(NSUInteger)highPassCutoffInHZ 9 | gain:(float)gain; 10 | 11 | -(Buffer *)process; 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /lpc/valkrie-damage-9.lpc: -------------------------------------------------------------------------------- 1 | ca,1d,86,18,27,aa,2a,37,11,89,5c,b1,e2,b4,28,d9,7b,38,4a,93,82,d1,ae,55,bb,43,ae,49,dd,26,cc,d,29,67,2d,ef,34,3f,e4,5c,bc,ed,dc,ca,90,f2,8c,b4,e,ab,43,89,bd,c2,da,a3,16,39,ce,4e,ee,a8,5a,e4,b0,ba,b0,b3,6a,d1,c2,ec,c6,88,31,c9,f2,6b,1a,c2,aa,24,c7,8f,69,c8,a8,95,3c,df,66,c0,b2,76,f0,6d,9d,1,8d,5a,2e,d4,a5,7,bc,6a,9b,48,9c,76,f4,b4,a3,62,99,a6,51,22,89,48,ac,ca,75,56,3b,34,7f 2 | -------------------------------------------------------------------------------- /lpc/3.lpc: -------------------------------------------------------------------------------- 1 | 4,48,c2,dc,a5,b1,92,bb,45,5a,13,85,81,56,a1,69,4c,18,3a,78,3b,67,9,41,6c,a8,35,dc,3a,84,79,a2,46,c8,a3,16,97,ac,24,ed,4d,5a,52,82,b0,6e,d6,6d,69,11,26,b6,55,65,64,4d,1b,73,f5,dc,91,f,69,4c,35,73,5a,d9,85,32,f7,d4,69,d5,10,46,54,53,a7,35,93,2b,51,cd,e2,d6,4f,6e,44,35,4d,ca,b0,b8,12,d6,d4,4e,d3,92,46,98,33,3b,4d,93,2b,71,cd,ec,34,f,ae,24,3d,93,dd,5a,99,92,cf,54,71,5b,15,4a,3e,5b,86,ec,56,71,56,3b,e9,7 2 | -------------------------------------------------------------------------------- /BlueWizard/Sampler.h: -------------------------------------------------------------------------------- 1 | #import 2 | @class Buffer, PlayheadView; 3 | @protocol SamplerDelegate; 4 | @interface Sampler : NSObject 5 | 6 | @property (nonatomic, weak) PlayheadView *playheadView; 7 | 8 | -(instancetype)initWithDelegate:(id)delegate; 9 | -(void)stream:(Buffer *)buffer; 10 | -(void)stop; 11 | -(NSUInteger)index; 12 | -(NSUInteger)bufferSize; 13 | 14 | @end 15 | -------------------------------------------------------------------------------- /lpc/1.lpc: -------------------------------------------------------------------------------- 1 | ac,53,a2,ab,52,4d,b3,4e,a8,ae,74,b3,cc,5a,6e,ba,ca,cc,16,ab,99,db,c,35,db,aa,60,b1,cb,d9,a3,98,84,e7,ed,24,9a,92,22,1b,de,c9,6d,76,89,22,ff,c6,b0,85,2d,a,e6,83,2a,6b,b7,38,9a,b,89,a8,32,d2,a4,cf,24,a3,ca,28,92,1f,f1,8c,aa,a3,ce,b1,d9,bc,ca,8e,be,a4,10,b6,89,12,86,ac,d8,59,27,8d,9b,b2,16,27,ed,ba,6e,ca,92,4d,b5,eb,ba,b9,68,56,91,6a,aa,d6,ac,59,45,aa,a9,da,b2,71,14,8b,26,6a,2f,c9,c1,3a,cb,a2,93,67,c9,36,a2,fb,0 2 | -------------------------------------------------------------------------------- /lpc/valkrie-damage-11.lpc: -------------------------------------------------------------------------------- 1 | cd,48,ae,56,4c,c7,36,3d,b9,5a,31,9d,db,cc,10,7b,38,6c,6e,33,42,ee,c2,b0,2a,4d,d,b9,b,d2,ca,34,25,9a,1e,48,9b,da,a4,68,6b,51,7d,4c,91,a3,ed,45,f5,31,45,89,a6,97,44,87,14,25,84,19,30,af,5c,b4,e0,7a,51,bd,72,d2,7d,9e,86,f0,b2,49,b3,79,a,c2,cb,26,c3,bb,19,30,2f,92,4c,ef,67,c0,7c,74,b2,bd,a9,45,b5,c9,c1,75,7e,6,cc,6b,39,3f,a8,3c,12,9d,65,42,af,f2,88,75,b6,89,bc,ae,23,d6,da,2e,f1,3a,97,58,e3,a8,d4,b8,1e,64,4b,fa,0 2 | -------------------------------------------------------------------------------- /lpc/9.lpc: -------------------------------------------------------------------------------- 1 | 6a,48,9c,b2,dc,6d,9b,d6,4b,2e,b3,8c,35,f2,16,3c,49,6c,f1,c8,4b,f1,24,cf,29,23,2b,a1,c2,25,c6,8e,34,db,8d,50,9d,32,d2,ec,d6,34,a3,ca,48,b3,5b,d3,88,2a,23,cb,76,4d,23,aa,8c,2c,db,35,cd,a8,32,f2,e2,d6,34,62,f2,a8,4a,6e,37,cd,b2,a3,69,a1,c2,d8,e7,8c,b6,87,70,35,5f,3c,fa,1e,52,c5,7c,c9,18,46,70,65,8b,45,63,1c,5e,45,22,66,b5,69,3a,65,9,5f,14,96,26,54,a4,bc,92,59,8a,22,b,cb,32,66,c9,9a,5c,ad,e3,a8,35,2b,36,b5,aa,2d,d6,62,44,44,b2,f2,3 2 | -------------------------------------------------------------------------------- /lpc/dragon.lpc: -------------------------------------------------------------------------------- 1 | 8,80,d7,82,0,bc,c2,aa,36,76,61,75,73,26,0,3a,68,14,a0,a,66,c8,55,91,a8,a9,68,6,10,95,c6,1,b2,f1,a4,c0,27,ad,9a,c,e7,0,33,74,3,10,a,4d,0,42,a2,49,40,c8,3c,1,30,cb,ba,14,31,4b,db,64,ed,0,e8,2d,93,c2,90,a9,aa,bc,6e,0,5c,a1,4a,80,cf,98,25,49,45,2,b3,ec,25,c0,17,4c,7,f0,4e,63,0,36,68,1d,20,2b,8c,2,f0,a6,56,0,ba,34,a,20,b,47,0,e0,71,99,52,25,15,cf,8a,c3,0,d6,a1,9,0,3e,17,3,f0,a3,62,0,3e,b8,4,0,5f,92,0,60,89,11,0,6d,6c,4,90,65,fc,0 2 | -------------------------------------------------------------------------------- /lpc/5.lpc: -------------------------------------------------------------------------------- 1 | 8,c8,c6,9c,2,4,8,33,2c,65,61,a5,46,4e,94,96,c5,15,6e,d9,51,46,96,f2,98,7b,56,19,59,f6,eb,16,59,67,14,29,b6,bb,f7,94,51,a5,52,16,d9,53,47,93,4a,a9,47,57,1d,7d,1e,66,5e,13,65,c,b9,b8,45,4d,99,31,e6,aa,61,3d,51,c6,98,93,7a,64,47,1d,63,89,6a,5e,5d,a5,4d,c5,a9,7b,f5,98,32,65,cf,56,53,65,da,5c,8c,6a,f4,4c,69,4b,f1,4a,d1,b5,b8,2d,d5,aa,b8,c7,e3,b0,d6,20,ea,e2,4b,d0,8a,83,44,45,9a,2,b2,98,20,69,d9,a2,c8,6a,a3,36,67,10,41,ab,4f,68,e5,42,ea,1 2 | -------------------------------------------------------------------------------- /lpc/wizard-damage-2.lpc: -------------------------------------------------------------------------------- 1 | 8,f0,e,4d,89,c9,51,64,46,4c,63,c7,c4,1d,55,96,93,1a,13,67,b6,85,49,a2,8f,32,3e,19,b6,88,be,c8,64,a6,95,22,86,c4,1d,55,96,93,18,32,4d,74,45,4e,82,af,bc,95,11,37,9,21,d3,44,45,d8,26,e5,4c,69,15,65,8a,94,32,55,94,87,49,b2,4f,3c,6e,11,bb,28,a9,60,59,7b,94,a2,e5,46,21,61,55,92,91,b,26,87,47,4e,76,29,94,1c,1e,29,b8,29,52,5b,79,c5,10,e4,46,21,11,16,4d,92,2b,bb,a6,5b,74,79,1d,6a,94,6a,d3,15,25,ab,4b,69,4c,56,d6,22,ca,ae,11,1e 2 | -------------------------------------------------------------------------------- /lpc/0.lpc: -------------------------------------------------------------------------------- 1 | 4,60,26,83,1,46,99,84,7e,e8,10,25,cb,54,8a,6a,8d,55,a7,ce,48,9a,63,e3,e8,35,23,28,49,c4,2a,57,37,3f,55,f4,4c,5f,59,82,d8,b0,32,6c,53,48,c2,40,af,b0,ac,21,f3,8d,b5,22,9c,b6,22,46,b,ca,70,36,aa,90,25,c2,a3,e9,ea,a2,b,af,d0,59,ab,cf,2a,3d,93,57,af,31,ab,8e,8,5e,35,a6,a8,c6,c3,65,d3,98,13,9f,f4,e0,4e,63,89,a2,33,9d,5b,97,25,8a,8e,34,5a,5d,d6,a0,2a,ca,79,51,59,83,9a,8,97,45,61,f3,76,22,54,57,87,c9,eb,4d,37,59,1d,76,6f,27,43,78,b3,59,bc,9d,c,d1,2d,f 2 | -------------------------------------------------------------------------------- /lpc/wizard-damage-8.lpc: -------------------------------------------------------------------------------- 1 | ce,4f,19,4a,bb,12,14,27,7a,6e,4b,b7,59,ec,e0,a4,b5,cd,66,72,a3,a5,d2,35,4b,29,88,8e,52,57,63,86,24,79,4c,eb,48,19,8a,e0,a9,bc,c3,66,a8,93,c3,f2,2a,8b,a1,2d,85,89,3d,eb,84,7e,a4,50,26,71,9c,ba,d1,dd,98,45,76,68,46,75,15,56,3b,a1,aa,89,85,2c,d2,98,3c,39,c8,a8,b6,15,b2,68,b0,6d,23,62,8a,82,e1,f6,35,5b,21,48,1e,da,c6,1b,85,b0,44,28,99,4c,14,d2,52,c1,b9,23,51,28,72,82,f0,4a,47,a1,ca,1,c3,32,63,b9,aa,4,34,f1,4e,a4,9a,56,94,59,34,d,2,bc,44,7d 2 | -------------------------------------------------------------------------------- /lpc/valkrie-damage-13.lpc: -------------------------------------------------------------------------------- 1 | 46,4e,21,b,23,c7,26,25,c7,2a,e,1f,db,b4,ec,b3,d9,a3,6c,d3,52,ce,e2,4a,ab,4d,8d,2d,42,3a,ad,35,35,f6,70,e9,b2,d6,d4,d0,c3,65,4a,6a,53,c3,74,d7,29,69,45,b,3d,92,a7,c4,16,2d,94,4c,ea,36,da,b4,50,32,39,cb,6c,d1,42,ad,10,2f,a3,45,f7,b5,52,bc,8d,34,2b,94,c,c9,e,d3,ec,90,33,b9,2a,cc,70,62,cc,e4,e8,28,c3,8d,31,8b,a3,c2,c,37,fa,2c,b1,2a,dd,bc,90,a2,a8,3a,74,f1,43,b3,a0,e9,30,25,c,d5,82,a7,43,a7,28,e4,8,ad,2c,12,92,90,d5,6d,c2,48,48,73,31,a3,88,b0,2c,cd,de,8c,34,2a,3d 2 | -------------------------------------------------------------------------------- /lpc/disappear-fragment.lpc: -------------------------------------------------------------------------------- 1 | 25,1a,2a,4c,3d,1b,b5,a4,5a,17,f6,7c,3a,92,66,c5,54,7b,69,c9,a6,49,71,d2,46,02,58,dc,59,00,4b,a5,a5,70,b0,70,51,6f,3c,a2,62,5c,d5,6a,8e,89,8b,13,93,dc,ba,20,80,96,9d,19,d0,43,4a,0a,76,2c,13,a3,b9,cd,5f,a1,94,d4,97,b6,60,fa,56,90,5c,db,c2,1e,93,20,b2,6d,8b,5b,0c,c2,f2,b6,2d,ab,d1,89,47,b7,b6,aa,56,27,2d,de,dc,ba,9a,92,b9,39,4f,9b,6a,09,d6,92,ac,6d,ce,c5,d9,4a,bb,b6,b5,8c,50,0d,6a,53,b6,32,4d,2d,a8,6d,da,73,17,31,97,35,61,2b,d3,2d,1c,3b,9b,ad,34,67,2b,ee,fd,00,00,00 2 | -------------------------------------------------------------------------------- /lpc/elf-ooo.lpc: -------------------------------------------------------------------------------- 1 | c2,73,c6,d2,34,22,19,d9,19,69,b6,8c,6d,28,5d,c4,bd,ca,92,c3,93,a3,21,8f,a6,e,4d,59,13,c3,36,39,38,79,1e,4a,4f,a4,a0,14,75,24,29,bd,1,53,b4,16,e7,74,6,4c,25,4a,42,e2,19,30,15,2f,75,49,6a,c0,9c,64,42,a9,4d,80,8a,d5,96,a6,b8,1,ce,46,87,c3,5d,5,24,45,69,91,4a,14,b0,18,ad,21,3a,b2,23,7c,d2,a2,6c,b9,86,56,c5,c3,2c,2d,2b,96,d7,48,d3,b4,ac,24,99,dc,d5,ca,92,d2,74,52,55,2f,db,ca,f0,c1,4c,3c,a3,28,cb,25,13,89,b4,ad,5c,ef,cd,d8,ca,8e,f2,bd,37,63,2f,c7,2a,c,de,8d,ad,6c,93,d4,7,17,f3,b4,fd,0 2 | -------------------------------------------------------------------------------- /lpc/fooled-you.lpc: -------------------------------------------------------------------------------- 1 | 8,28,2a,1d,1,d5,84,13,a0,59,f7,50,86,e4,69,ac,4d,4a,e5,7d,86,b2,b4,69,79,d0,99,c9,dc,a5,45,51,57,26,72,97,e6,47,59,55,84,9d,8b,eb,d4,76,a,b7,4e,76,60,3b,ae,d2,26,19,9,cd,8a,6a,db,e0,14,92,e9,24,6d,95,57,78,44,86,5a,6e,f9,52,ce,2a,de,75,e4,8d,b,47,56,ab,51,74,ab,64,9e,9d,46,5e,a3,b0,69,75,19,59,9,22,66,d1,a5,65,d9,1b,87,e4,d6,92,67,af,1e,ec,5d,42,16,9d,7a,b2,77,51,49,74,d2,ae,d6,55,c5,c9,89,a5,67,2d,95,25,6f,12,92,9b,59,9e,bc,5a,b0,77,21,59,74,1a,c1,de,85,a4,c1,69,86,58,97,7 2 | -------------------------------------------------------------------------------- /lpc/elf-damage-8.lpc: -------------------------------------------------------------------------------- 1 | 8c,32,79,cd,d8,da,30,4c,d4,23,cb,6c,aa,10,b1,4a,ad,a2,8b,81,c5,2d,cb,ca,c4,e,16,3b,b3,2a,6b,3a,58,dc,b4,8e,4c,ec,60,71,dc,d3,33,8e,43,cc,72,b5,88,ae,1,f5,ab,94,4d,5b,5,d4,f7,52,2a,69,e7,50,d3,4b,b8,bc,ab,41,6d,6f,a6,8e,2c,a,73,db,82,b8,66,1b,dc,ce,56,11,6d,6d,70,db,cb,95,74,93,c1,75,a9,8,b4,d5,86,30,2d,dd,58,56,29,4a,d6,32,31,6f,c9,58,95,9a,39,22,b,e3,58,ea,50,b5,2c,4a,32,b9,c2,59,5a,b,d3,e4,31,f6,c8,a2,3c,e3,ba,cc,d9,33,b,bd,ed,52,23,2f,22,72,b5,5d,58,b2,90,d8,a6,9,65,76,fb,0 2 | -------------------------------------------------------------------------------- /lpc/wizard-damage-10.lpc: -------------------------------------------------------------------------------- 1 | 86,d,ce,c5,33,63,15,2e,44,ce,cc,8c,d4,a4,10,79,34,2d,52,53,43,a4,b6,4e,53,25,2a,15,93,2b,5b,96,b2,54,48,a9,4c,98,86,9a,c1,b5,33,51,1a,ea,4,a7,8c,96,69,cc,5,83,22,1b,85,25,27,56,76,6d,63,d6,ea,9d,59,dd,49,18,eb,10,15,b1,b4,a1,2a,1e,4d,da,2b,85,a2,38,74,a9,88,6c,ba,96,48,51,2a,16,2,a2,46,43,40,59,24,4,28,c7,cd,24,d1,93,ba,79,e3,10,84,88,1d,1d,36,8b,97,3c,a5,6c,58,4a,6e,f4,58,31,69,2b,19,21,60,c7,b8,cd,a4,7,47,1d,9d,b2,92,9a,13,94,4f,5a,76,4a,8,18,de,61,89,69,ce,93,67,76,a4,7 2 | -------------------------------------------------------------------------------- /lpc/yumm.lpc: -------------------------------------------------------------------------------- 1 | 2c,f0,54,a3,da,12,ab,94,a9,9a,4e,8f,a4,32,cd,bd,6b,c2,96,ca,3d,91,a9,ce,c8,26,d7,dc,bb,c6,ed,a4,2c,31,8a,ba,28,dd,b2,a2,59,fd,b2,c8,c8,8a,17,d7,c9,22,23,2d,ce,83,23,86,8c,28,c5,8,ae,2c,3a,fc,14,32,b1,32,ec,70,62,c8,a4,ce,b0,cd,c,25,8d,d6,c2,36,23,e4,72,1c,b3,da,ac,e8,3b,a1,bc,58,f1,82,2b,c7,12,3b,29,b0,36,82,3d,a2,86,48,da,8,ad,88,12,62,61,2a,ac,bc,76,48,98,ad,8a,88,3a,26,65,36,ca,ab,aa,9a,c,c7,88,ac,8e,6d,a,1c,ca,b3,2b,92,a9,b8,75,8f,ec,48,a6,e2,ce,c2,6b,62,ab,ca,5b,31,ad,8e,43,6a,23,3c,3c,2a,f6,3 2 | -------------------------------------------------------------------------------- /lpc/blue-elf.lpc: -------------------------------------------------------------------------------- 1 | 61,f0,52,ba,cc,93,a6,29,a,ae,90,68,92,c6,28,b8,47,7d,49,99,82,d2,4a,8b,55,69,74,56,bd,b9,1b,a5,c1,78,f3,a2,5e,94,7a,6b,cd,8b,6d,75,6a,bd,31,6b,e4,2d,a1,75,c9,cc,20,ba,b8,da,6,73,d5,5e,1c,ba,e0,25,cc,a7,56,e9,73,60,37,9d,4a,a3,cf,5e,3d,b4,2b,8d,2a,79,d7,f4,9e,3c,b2,14,53,5c,7b,f2,88,43,18,b5,e8,2a,2d,a,79,95,6d,26,b7,38,f8,d,e6,9a,5c,72,17,2e,48,6a,76,28,4d,1b,57,f5,78,a1,34,a9,a2,3c,2,13,20,79,17,d3,44,df,6a,d1,55,4c,1b,fd,b8,9b,25,55,5d,b4,9d,a6,61,57,8d,51,77,64,aa,35,4,e8,98,81,0,13,cb,11,20,b3,fb,3 2 | -------------------------------------------------------------------------------- /lpc/elf-damage-7.lpc: -------------------------------------------------------------------------------- 1 | c6,6d,dc,d1,6d,aa,4,63,13,27,b4,9c,13,a4,45,8c,31,7b,8a,c1,ab,36,f2,1e,3b,9,4e,d2,bc,b3,93,14,28,5,cb,c8,4e,9a,d0,d4,bc,35,3b,59,42,d2,d3,e2,9a,86,1,4e,53,4b,b2,44,39,28,b6,1c,16,2f,6e,20,9d,66,b1,c6,9b,81,54,9a,65,ef,64,a,96,75,56,2d,ea,28,84,cf,69,8e,4c,ac,30,91,b7,70,d2,b1,21,e4,28,25,af,24,86,36,73,a,c9,e2,18,56,df,6b,52,51,6c,78,35,6f,54,d4,a6,12,65,df,16,e,4b,4a,96,75,c7,d8,62,2b,5d,d4,1b,65,4d,a5,1c,d1,37,99,bd,89,f2,59,be,c,35,d9,2a,11,63,5d,c8,9c,b0,9c,8d,4b,23,73,42,6a,63,67,5a,29,f1,3 2 | -------------------------------------------------------------------------------- /lpc/hahaha.lpc: -------------------------------------------------------------------------------- 1 | 4e,2d,9b,2b,2c,eb,14,be,6c,1a,ab,4a,32,98,72,b4,24,62,ce,60,4b,d6,f2,ca,a8,49,ca,c5,ad,2a,cc,20,20,26,f1,c1,96,6a,2d,13,71,6,53,a6,15,cf,c4,1e,6c,29,de,5c,93,7a,88,a5,45,53,57,d4,a2,a5,2e,65,1b,72,87,98,b7,a5,74,45,1b,5c,89,36,dc,93,64,8,a5,78,4b,56,bd,a1,a5,61,e9,5d,61,9d,93,ba,7b,46,49,1d,5a,ea,5a,de,15,75,48,a5,fa,50,55,dc,c1,d7,64,4b,31,69,87,50,b3,8d,44,d6,1b,72,ad,be,38,99,64,c8,a5,c7,50,65,93,a1,94,e2,8b,e3,49,86,5e,aa,d,4e,c6,19,66,a9,36,78,99,a4,d9,25,eb,d0,65,93,e4,96,62,8d,1f,a9,bc,a7,7d,1c,3e 2 | -------------------------------------------------------------------------------- /lpc/wizard-damage-1.lpc: -------------------------------------------------------------------------------- 1 | 22,b0,4e,53,ba,6c,6,d3,19,49,ed,88,99,74,a7,b5,b4,c3,66,51,ac,b5,b0,76,9b,45,e,4e,5d,27,14,16,39,38,e,cf,70,d0,e4,18,d8,34,b3,56,93,83,67,b3,8a,58,c9,10,da,3d,32,12,39,df,73,77,8f,88,65,8a,24,58,23,33,b5,4a,2,57,d,8f,34,c6,17,4e,dc,23,23,5,cb,4,36,8f,b4,9d,74,ed,39,22,c3,51,50,4d,10,b7,8e,58,49,b5,91,dd,2a,62,5,d5,44,f6,c8,b0,15,34,9b,d8,3d,cc,76,d2,75,50,77,77,39,49,37,c1,dc,42,94,4,43,47,71,4b,51,e2,4c,19,d4,ac,43,96,b1,a9,8b,88,4c,47,c6,e5,da,2c,b3,12,2b,df,6b,61,cd,4c,23,22,2f,4c,3c,32,31,c9,bb,c,73,33,db,f 2 | -------------------------------------------------------------------------------- /lpc/green-elf.lpc: -------------------------------------------------------------------------------- 1 | 62,d4,d,72,22,2c,ba,51,55,91,dc,88,1d,a6,54,20,d3,6c,51,99,6a,c1,a0,8c,c5,6d,6c,89,c,3b,26,8f,61,58,52,9a,a8,3c,86,69,51,79,b2,cc,e8,87,62,e5,32,eb,a5,cf,4c,c4,86,eb,a6,d6,6b,4e,b5,72,13,da,68,d1,d4,c7,6e,6b,aa,15,b1,a8,9a,65,c8,56,5d,27,2b,b6,36,6b,cb,28,af,38,f2,62,dc,52,7d,d2,48,b3,2e,77,8d,c9,23,8a,6e,5c,ad,2a,8f,28,e4,71,b6,a9,33,92,90,37,48,ab,49,2b,7c,d9,20,ad,ba,65,f6,79,8b,35,eb,32,40,6f,37,2,98,e0,ea,a2,a4,c7,cd,33,8e,b,a3,9b,34,89,e4,26,e,69,43,cd,da,10,c0,d5,4a,35,4,bb,15,ea,f6,10,a0,7a,2a,2,6c,d,46,80,8f,41,f 2 | -------------------------------------------------------------------------------- /lpc/welcome.lpc: -------------------------------------------------------------------------------- 1 | 2a,10,79,4c,c5,92,4,d7,4d,65,ab,58,59,9c,d8,5c,b4,a3,41,71,7d,71,cf,ea,c9,cd,d,d5,b5,aa,ad,36,2f,a4,a1,ac,9,d7,bc,e0,8f,3c,b7,6a,f3,82,78,17,a9,a9,25,b0,e6,43,34,eb,a6,34,a2,2f,51,6f,1c,ba,d8,82,9d,33,b1,eb,43,36,8f,ec,99,aa,f7,d5,ad,aa,e3,2a,a0,74,93,56,4,9f,d2,5e,76,46,9b,74,b9,46,2c,1a,7d,96,5d,a2,be,69,c,59,74,8b,da,ea,31,16,5e,2d,66,ab,da,9c,ec,6,ba,2f,6e,6b,a3,51,e2,dc,24,ad,c5,a8,b,85,dd,b0,55,a1,66,6c,75,c3,96,65,ba,69,d4,9,5b,e1,91,ae,d6,38,ec,45,64,99,58,13,33,16,9e,2d,6a,b3,cc,9c,75,a7,a8,d5,11,7b,a5,51,a2,92,f8,1 2 | -------------------------------------------------------------------------------- /BlueWizard/Autocorrelator.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @class Buffer; 4 | @interface Autocorrelator : NSObject 5 | 6 | +(void)getCoefficientsFor:(double *)coefficients forBuffer:(Buffer *)buffer; 7 | 8 | +(void)getNormalizedCoefficientsFor:(double *)coefficients 9 | forBuffer:(Buffer *)buffer 10 | minimumPeriod:(NSUInteger)minimumPeriod 11 | maximumPeriod:(NSUInteger)maximumPeriod; 12 | 13 | +(double)sumOfSquaresFor:(Buffer *)buffer; 14 | 15 | @end 16 | 17 | -------------------------------------------------------------------------------- /lpc/red-elf.lpc: -------------------------------------------------------------------------------- 1 | 6a,15,b1,4d,3d,9c,9a,41,e,91,4a,4b,93,5a,5f,59,ab,d2,c9,a8,72,26,b,9b,24,23,2f,ce,d9,2a,1e,8f,b8,86,44,b7,9c,3d,a2,ea,82,5c,bb,4e,c9,8a,36,36,99,28,a8,88,52,2c,6c,4d,b7,b6,58,51,8f,75,57,ca,e4,c4,b2,72,69,c9,b2,73,ae,aa,d9,63,29,51,24,bc,6a,8f,aa,26,31,ad,9a,b2,b2,1a,dd,4d,b2,ce,4a,52,4c,57,eb,3a,2b,49,b6,4b,b9,ea,ac,cc,87,d,95,ac,d7,5a,af,af,95,6d,5e,ab,22,9f,e,d5,70,29,4b,56,a3,2a,4c,b7,bc,46,75,b3,aa,d3,d2,1c,c2,cc,aa,4e,89,b3,ad,52,cd,78,29,b,76,4a,25,eb,86,26,8a,29,77,b7,1b,d6,cc,da,2b,3c,a,3,6c,8,27,80,f1,ee,4,d0,de,1d,3,8,70,2e,e4,1 2 | -------------------------------------------------------------------------------- /lpc/red-wizard.lpc: -------------------------------------------------------------------------------- 1 | 6a,51,29,55,cd,92,ba,de,74,8c,aa,70,53,9a,54,a1,cc,a6,ce,68,4b,a4,94,ca,d9,ab,ad,c1,54,3c,97,ac,a6,28,55,e9,58,6c,3a,a5,cc,b3,23,84,ea,99,72,af,aa,48,6e,4a,59,dc,91,93,84,39,26,91,34,4f,1c,86,14,29,34,33,54,19,b2,63,b7,c8,4a,a5,4b,4a,54,2b,2a,a6,da,c6,48,36,da,32,ca,18,35,59,65,d3,2a,b3,67,37,f7,ce,ab,2c,4e,d9,2c,9b,8c,ba,68,15,d7,98,53,ba,ca,5c,25,63,65,eb,1b,72,b5,8c,c4,a3,cf,d2,d5,32,1b,b5,21,65,b4,8c,8e,d3,c6,9c,d1,d3,ba,55,9b,52,42,eb,c8,26,6d,4d,49,d8,a3,9a,96,2d,37,66,cf,c8,62,ba,14,59,dc,a7,31,1a,72,65,4e,cd,45,6e,2b,ce,8c,32,d3,ba,35,7,27,b5,4c,fa,0 2 | -------------------------------------------------------------------------------- /lpc/wizard-damage-11.lpc: -------------------------------------------------------------------------------- 1 | a1,2e,91,34,46,22,95,b2,64,c,4f,2f,99,b2,14,68,3c,2c,72,c9,53,e4,8e,b0,ca,ad,48,99,3b,d2,ca,94,3c,25,ee,8,af,54,92,98,b8,3c,3d,56,9,62,e4,b2,b4,ca,29,8,89,d3,ca,6a,87,30,25,2c,ad,8c,e9,c2,18,31,3d,33,a6,48,b8,2e,8b,70,cb,2c,d5,dc,3c,2c,62,89,90,ab,88,32,8b,a4,7c,16,d3,dd,c3,b4,71,99,4f,8f,8,4b,c6,a5,36,23,3c,2c,29,df,19,d1,88,b0,ac,e2,e2,51,c4,32,9,4b,b2,41,76,cf,c4,c6,4d,e,32,aa,2c,3a,3b,3a,c8,ec,b0,e9,9c,e8,20,b3,c3,96,f1,5b,57,21,d6,24,4,a8,9e,18,1,35,92,98,3c,3a,8c,8a,aa,e4,f2,10,b0,3a,ab,b2,cb,ad,e7,ee,a,5b,aa,4c,1,32,63,62,8a,a6,75,51,36,57,f2,0 2 | -------------------------------------------------------------------------------- /lpc/yellow-elf.lpc: -------------------------------------------------------------------------------- 1 | a5,cf,54,da,27,2a,b7,b6,6,29,ce,98,3d,9a,9c,bc,d8,7d,ce,68,93,ab,64,f7,39,ad,89,7c,92,43,57,b7,36,9a,d,76,5f,dc,ba,10,da,c5,63,51,eb,a2,c9,72,e5,55,ad,f3,2e,cb,4d,6b,b7,3e,78,4f,f3,28,d5,fa,60,ab,4c,ac,66,e9,6d,9c,50,d6,d6,a5,f7,a6,cb,85,3b,95,2e,c4,76,65,5d,94,fa,e8,ac,dd,b2,54,eb,53,74,8b,a8,c1,ad,ce,31,52,35,a7,b4,2a,d9,49,35,9f,dd,ea,28,b7,d5,6c,71,69,83,d9,16,f6,c5,a5,f,76,5a,c8,96,94,31,c8,19,63,59,5d,3a,6f,27,39,2c,6a,aa,8b,8b,70,f1,c5,4,a8,b2,23,d4,49,77,b9,5b,d2,d0,24,51,15,e1,76,43,97,54,55,98,db,35,43,14,55,51,62,9b,8c,51,ba,57,9a,12,4,24,63,f2,0 2 | -------------------------------------------------------------------------------- /lpc/you-cant-catch-me2.lpc: -------------------------------------------------------------------------------- 1 | c1,e8,81,2,d6,13,37,b5,76,4e,d6,f4,1d,b4,3c,a8,c1,3b,2d,0,80,0,9a,36,1d,7c,2d,62,96,55,75,b0,2d,99,69,fb,b4,46,b7,6e,26,93,75,b,dd,6b,38,75,4c,d,7c,f5,6a,d6,5a,17,1,c1,aa,3,1,5a,d2,14,40,73,6c,43,2e,5e,b5,cb,8b,2c,a5,85,54,19,9f,bd,d4,1e,d2,34,7c,9c,b1,b3,12,53,8f,20,40,80,2a,42,5,70,7c,28,3,8a,66,61,4a,97,61,6e,66,db,48,d1,e3,b8,a4,95,46,96,c5,e1,1a,71,7,31,5c,3a,8d,4f,1a,c4,f1,9a,5c,99,68,10,37,68,48,56,b9,41,6e,3f,3,ba,51,6,75,5c,16,68,56,19,d4,f0,65,e0,55,79,50,3d,87,40,66,9c,41,f5,60,82,de,71,6,33,ac,b,65,44,1e,ec,70,4d,30,19,2b,88,4d,1b,c5,49,e4,7 2 | -------------------------------------------------------------------------------- /lpc/hehehe.lpc: -------------------------------------------------------------------------------- 1 | 89,ee,51,5c,32,a3,26,ba,f7,e,72,1b,db,e8,9e,cb,68,bc,72,62,9b,51,d3,8b,30,c,48,8a,d5,70,d5,b1,79,59,94,45,af,10,89,99,4d,12,3d,73,d,6a,8d,59,ec,a,9e,14,59,a5,48,9d,4b,78,a7,19,4,8,15,d5,c4,1e,45,b5,b2,dc,e2,7b,e,e3,f4,c9,45,e9,2e,98,ce,42,13,c0,b1,8,4,74,19,16,f4,ee,5d,b5,ac,f2,90,5a,4e,a1,f2,29,43,6e,4d,4d,32,ca,26,ab,45,17,39,8f,8c,0,67,38,10,40,6d,66,b1,db,74,e3,88,b1,c5,6c,dd,9c,3d,a6,6,b7,15,63,3d,8f,8c,80,64,c1,0,1,d6,5a,36,bf,f7,4e,a,99,dd,dc,76,b3,d8,75,6a,f1,da,f3,26,8f,ba,c3,6f,2f,4b,cc,aa,8e,b0,3d,4f,9,9b,da,e2,fa,ac,d8,7c,6e,c9,da,b6,62,b7,a9,2e,af,dd,9c,d3,a7,3c 2 | -------------------------------------------------------------------------------- /lpc/better-hurry.lpc: -------------------------------------------------------------------------------- 1 | a1,ae,46,5c,3d,bb,94,7a,14,4d,76,da,32,aa,91,ad,c8,79,f5,28,7b,d2,22,d3,d5,a3,68,41,13,23,56,9b,a2,59,4e,f6,58,33,f2,61,25,c4,65,ed,c8,ab,37,e7,d0,ad,23,2b,c9,8d,8a,db,b5,b4,d4,50,6a,4e,db,e2,d2,4d,64,a8,5b,4b,73,17,d5,96,b6,a5,c8,9d,dc,da,9a,96,2a,77,11,69,69,53,aa,32,4c,b5,29,61,29,f2,22,8d,94,d6,25,cd,93,2c,93,16,97,38,8f,60,69,f2,56,82,dc,9c,75,29,6b,f1,73,b,96,65,af,c9,4f,cb,d5,1a,bd,96,20,2d,53,6f,48,5b,c2,d4,55,a2,39,6b,89,f3,60,f1,92,2d,25,2d,c1,99,cb,bb,b4,ac,2a,71,89,ac,d3,b2,a6,d5,28,b2,4e,cb,9b,73,45,af,26,a5,e8,de,14,35,1b,a7,b2,1b,31,ca,5c,ac,aa,6e,4c,c9,bb,c9,3 2 | -------------------------------------------------------------------------------- /lpc/wizard-damage-12.lpc: -------------------------------------------------------------------------------- 1 | 8c,2f,56,d9,3c,12,17,31,65,2c,ad,b0,d5,c4,9c,29,65,34,76,53,52,e2,d0,d1,d0,c5,4a,5,cb,db,d,17,3f,57,2c,de,88,dc,92,5c,39,39,63,56,cb,63,a6,d2,ac,9a,a5,88,5,cb,63,6a,95,32,55,28,cb,6a,54,ea,5c,a0,79,2a,76,ea,52,c4,b2,d5,9a,a9,4f,11,da,3b,62,a6,31,27,c8,a8,8c,99,a6,92,20,75,32,56,58,4b,6,8f,8a,da,8,8,6,8c,0,3d,91,10,a0,3b,14,d3,64,83,e1,9b,11,5d,1d,35,65,8d,5b,72,79,32,14,59,69,c9,c5,c9,62,65,a7,a9,e0,47,4d,93,6d,96,83,eb,1d,4f,95,c6,4e,b6,73,d6,d5,22,3b,58,d9,42,e5,a4,28,e7,66,7,ee,5d,91,4c,50,1c,84,75,54,74,61,49,60,d6,11,db,a4,35,81,4a,66,2c,93,17,87,ca,66,b1,59,db,8c,2a,ab,46,7e 2 | -------------------------------------------------------------------------------- /lpc/wizard-death.lpc: -------------------------------------------------------------------------------- 1 | 8d,cd,d6,bd,52,d7,c,a1,24,ad,30,6f,32,f8,12,32,dc,69,c9,60,8b,37,cf,e0,b5,83,2d,de,ac,8a,d6,d,ae,3a,f1,2a,5e,3d,f8,12,3d,32,71,4d,11,73,b4,8c,e0,35,43,2a,51,33,83,96,c,b9,6,8b,4c,6c,3b,94,1a,2d,2b,b1,e9,50,4b,d2,4a,e7,35,4d,cb,49,3b,5c,56,37,35,47,ad,74,5e,dc,d4,12,35,b3,70,cd,d0,8a,b3,8c,a6,b5,43,ab,d6,c2,87,d3,35,3d,39,cf,28,69,57,f4,e8,a2,a2,3c,69,d1,93,cb,b4,f2,a4,45,cf,21,c2,5d,da,15,23,f9,70,4f,6b,9b,f4,12,34,c3,a5,49,32,93,b,d7,b0,a6,c9,48,c1,5d,c3,92,24,23,15,37,d,6d,52,8c,14,c2,35,ac,4d,32,52,4c,d3,b0,c6,c1,4a,2e,42,c2,53,3b,3b,eb,8,d,4b,ea,ec,62,d5,c3,38,8d,71,8b,56,cf,14,39,f 2 | -------------------------------------------------------------------------------- /lpc/blue-valkrie.lpc: -------------------------------------------------------------------------------- 1 | a6,f,8e,c3,cc,bb,b8,a1,68,a8,34,4f,56,7a,af,23,2d,72,71,e9,43,90,50,dd,c5,a5,f5,41,d2,b4,5a,b5,32,9a,90,62,e9,9b,52,cf,5a,db,a9,6f,8a,b5,68,6b,e3,ae,29,96,b6,a2,54,b3,b8,dc,8b,f0,54,4b,64,ea,e0,4c,cd,63,51,ec,4b,96,bc,a4,72,dc,19,69,f4,69,6e,71,69,84,31,45,98,d6,e4,e1,c7,1a,c9,d1,56,9a,17,7a,4,57,4b,29,ae,ef,e1,5c,69,3b,b8,2e,8d,b2,76,1c,e4,27,ab,99,ec,8b,52,96,6d,b8,ab,3d,a,61,8c,e9,ae,35,bb,f8,b9,95,73,45,ec,52,c5,60,16,a6,b1,53,ef,b3,73,b8,3b,71,93,a9,46,91,91,d6,2d,b6,88,a6,59,67,b7,c5,8c,19,5a,ab,5d,97,13,94,e6,c5,71,7d,a,6c,e1,d9,d4,f5,c5,92,56,66,5c,35,45,2d,51,66,ee,d8,1a,ad,5a,b8,67,79 2 | -------------------------------------------------------------------------------- /lpc/red-warrior.lpc: -------------------------------------------------------------------------------- 1 | 6c,8e,dc,dd,cc,e4,a8,89,c7,32,b,77,92,ba,50,b0,52,a6,76,6b,53,21,f3,ac,86,a3,ab,de,8d,c3,1e,8f,ae,6a,57,a9,58,3c,ba,2a,45,dd,73,31,ea,99,cc,ac,74,8b,a2,a7,2a,2d,bb,63,a9,c1,c4,60,55,73,a3,7a,a1,cb,dc,dc,b1,1a,84,a8,8,77,3b,6a,60,6e,22,4c,1c,a9,9e,94,ae,20,72,e3,5a,56,26,9c,d9,49,c8,79,1f,57,91,b6,25,36,fe,5d,92,b3,95,c0,e6,13,6e,cd,56,7c,17,9f,e5,cc,49,f3,7c,5a,aa,91,b4,25,8,3d,71,52,b3,96,30,74,a5,35,e9,5c,d2,90,99,27,ac,67,a9,6b,21,4e,f7,8e,69,c8,5c,d4,a6,63,a6,b9,8,45,df,76,98,d6,a2,95,62,ab,45,58,bd,8a,ec,d3,18,69,4f,46,25,cf,52,86,25,45,96,2e,eb,e0,b6,98,84,f3,34,93,39,62,62,e9,35,37,72,7d 2 | -------------------------------------------------------------------------------- /lpc/extra-armor.lpc: -------------------------------------------------------------------------------- 1 | 2b,ee,c1,43,22,96,ac,a0,86,54,cd,9c,bb,dc,9a,4c,d2,6b,76,72,6a,c3,70,eb,2a,4,48,9e,4c,0,b9,93,1b,a0,db,73,5,4c,95,6a,82,16,d2,34,72,ae,f2,6a,74,c9,c8,2a,2,68,39,2d,39,b1,a0,57,e8,ea,66,85,2c,56,29,ab,9a,15,bb,69,b8,2f,6c,6e,2c,e9,e1,3e,2b,4,b1,47,98,e7,1c,28,75,18,15,16,3e,bb,c5,b1,76,b8,eb,aa,16,86,e9,11,16,b,5b,10,47,6a,94,b5,6a,7e,1a,6e,99,ba,aa,5,b9,ab,57,c8,ca,16,e6,41,51,ae,8b,5c,1c,2a,56,8a,24,49,69,ac,aa,e1,6c,a5,64,a1,a9,a5,ab,ed,52,a7,c9,56,c9,a9,ca,90,6,6b,e,a7,2a,53,5a,ac,59,dc,2a,ad,f9,90,a7,eb,a2,b0,a6,83,de,49,bd,dd,96,e,44,7,6f,76,7b,ba,10,ed,d2,d9,1d,f9,90,57,48,16,75,a6,21,9c,6d,6e,1e 2 | -------------------------------------------------------------------------------- /BlueWizard/ClosestValueFinder.m: -------------------------------------------------------------------------------- 1 | #import "ClosestValueFinder.h" 2 | 3 | @implementation ClosestValueFinder 4 | 5 | +(NSUInteger)indexFor:(double)actual table:(float *)table size:(NSUInteger)size { 6 | if (actual < table[0]) return 0; 7 | 8 | for (int i = 1; i < size; i++) { 9 | if (table[i] > actual) { 10 | float previous = table[i - 1]; 11 | if (table[i] - actual < actual - previous) { 12 | return i; 13 | } else { 14 | return i - 1; 15 | } 16 | } 17 | } 18 | return size - 1; 19 | } 20 | 21 | @end 22 | -------------------------------------------------------------------------------- /lpc/blue-warrior.lpc: -------------------------------------------------------------------------------- 1 | aa,e,4e,4d,8d,bd,a6,a2,78,68,51,49,56,b2,ea,b0,5,a5,5d,4b,8a,a5,34,91,36,2d,c9,96,dd,8d,bb,b4,38,5a,f5,70,e9,5a,c2,60,cd,c2,39,6b,a,bc,71,4b,a3,2c,29,b0,26,7c,98,93,84,c8,1b,ed,4,8d,e3,32,af,a5,83,3c,76,a8,93,e5,70,e3,d5,a9,73,56,a3,5c,52,a5,da,58,9f,54,4c,5d,a,e5,b2,c3,31,4b,49,55,98,96,d0,2c,25,54,65,5d,52,bd,96,50,b7,b2,2c,4a,5b,42,37,4c,2b,a4,4b,89,fc,10,ab,90,de,29,a,9d,32,44,37,95,38,66,f4,d6,da,d4,b2,e4,58,bb,a2,45,2b,b3,61,c9,ce,4,ad,ae,99,44,33,66,96,36,46,f2,69,5d,90,ba,3c,20,5d,6a,51,ea,53,43,af,b0,d5,69,88,5,ad,3d,1b,87,31,16,11,cf,68,e5,a6,9c,c8,43,bc,8e,99,63,64,ad,d4,55,6a,4d,5,ad,dd,5b,3f 2 | -------------------------------------------------------------------------------- /lpc/now-has.lpc: -------------------------------------------------------------------------------- 1 | 62,b0,3c,b2,cc,ac,98,4e,6a,6f,17,b7,5d,b2,ac,a4,2c,d3,f2,8,4b,16,b7,2e,c7,c3,2d,dd,5d,b3,ac,c,2b,37,b,cd,b2,db,f4,dc,dc,bc,22,5a,53,d2,74,b3,8e,30,4d,49,2d,4d,c7,83,35,3d,d6,32,ed,a8,d2,dc,d8,c2,ac,a2,6a,b,42,37,f7,8c,78,a5,9,31,ca,2c,a3,84,21,56,b7,6c,b7,22,80,d4,42,cb,98,ab,b9,67,84,6d,53,ae,12,5d,6a,77,c,39,4b,44,79,d4,31,e6,c2,e9,dd,51,c6,54,7c,aa,77,ce,19,53,75,a5,56,39,67,cc,c5,97,5a,e5,9c,31,15,57,66,19,73,c6,54,6c,9b,56,cc,19,63,31,6d,96,31,7b,f4,c5,94,b9,e5,9d,d6,65,9b,ea,d6,93,4b,1e,6c,6a,c5,96,49,91,f7,29,53,1d,3a,4,89,87,a6,f6,28,e7,27,9e,e2,5a,b3,19,90,54,1a,3,b2,4d,65,40,d1,a5,4,88,7c,c,1,49,a6,3e 2 | -------------------------------------------------------------------------------- /lpc/can-you-make-it.lpc: -------------------------------------------------------------------------------- 1 | 4,18,b5,8d,1,dd,b0,14,bf,65,36,8b,a8,3d,9c,5e,ca,c4,75,c9,30,7b,1e,35,f5,25,c3,e8,a5,cd,c5,1a,f,73,84,14,65,5f,dc,9c,aa,c8,52,2b,4e,f1,8a,61,77,8e,28,c3,9f,ce,45,d5,6a,f,7f,f9,20,b6,68,3c,82,5e,8a,58,ad,cb,8,6b,34,9,91,36,23,2e,5e,22,94,db,b4,ac,6,b6,30,49,52,b2,16,49,d2,35,6e,cb,9b,15,8a,50,67,23,2b,59,dd,c8,da,8c,b4,95,34,13,6b,33,92,9e,d3,54,a2,cd,8,7b,74,15,eb,36,c3,1f,c9,94,ac,9b,34,bf,7,26,e9,6e,12,bc,9e,59,4d,d5,9,1,84,94,66,40,37,c4,c5,6a,81,d8,b3,9b,36,b3,58,d6,cc,6e,d2,8c,e2,44,23,26,49,33,8b,17,b1,18,27,ca,cd,8e,2d,7a,e4,2,2,16,9,53,46,33,ca,9e,95,c4,18,5d,7,99,e7,12,61,36,e3,6c,56,75,11,90,a4,e9,3 2 | -------------------------------------------------------------------------------- /lpc/shot-the-potion.lpc: -------------------------------------------------------------------------------- 1 | c,18,9a,55,1,2b,a5,8,60,ee,b4,94,65,4f,96,99,b5,5b,95,83,46,78,2c,69,5d,8e,51,ae,be,a4,b5,39,56,73,c6,9c,56,e7,50,a3,1a,4b,52,95,43,a7,6b,dc,21,80,6f,66,8,f0,59,3,10,10,7a,4,1,62,8f,1c,4e,72,21,ae,5d,79,38,c9,69,b9,74,95,e4,86,e4,6e,92,55,1,80,1,c5,a5,11,40,a6,88,64,f8,d8,a1,a2,65,8a,16,7a,38,fb,4,2d,6a,8,1b,a2,36,a6,28,a1,b4,89,fa,d4,a2,f8,9c,2e,56,53,8b,e8,7d,a4,49,2c,4a,72,72,54,aa,51,53,1,ad,a8,2b,a0,25,33,a3,36,27,59,e1,52,8c,52,8d,5a,44,c4,2e,69,8d,64,e6,d1,a4,e5,29,b2,59,e6,e2,51,56,93,46,19,4d,47,3f,94,27,99,ae,d,73,15,a2,ee,5a,c7,cd,55,91,86,7a,1d,b7,36,83,e6,e6,71,dd,96,ac,98,46,37,9,6b,31,a1,54,d9,e4,1 2 | -------------------------------------------------------------------------------- /lpc/just-kidding.lpc: -------------------------------------------------------------------------------- 1 | c,38,b5,53,0,dd,90,36,bb,18,63,cb,58,33,ec,e4,2d,2c,a2,d1,70,92,2d,37,ef,d4,c3,c9,b6,22,a4,5a,f,37,db,8e,90,6e,3c,dc,62,ca,83,ba,4e,f3,8b,4b,53,dc,24,4,98,24,84,0,87,bb,39,a7,98,8e,e0,6c,ec,dc,a2,3b,42,b3,b5,73,ab,1c,b,ae,26,ce,2f,a6,d4,69,eb,0,30,60,78,51,6,6c,6d,2c,80,15,55,19,30,b4,59,1b,67,d3,20,b3,75,6d,9c,45,82,dc,b6,b5,71,16,2b,32,dd,da,c6,91,ad,c8,6c,2b,1b,46,f6,66,a1,ad,6d,ea,d1,a,cc,9e,b6,a9,27,4d,b0,5c,db,c6,11,35,50,e3,5d,9b,46,f1,24,d1,65,6d,9a,c5,83,44,97,b6,79,64,57,32,9b,d3,e6,9e,44,39,ac,6e,9b,7b,92,20,b3,26,6d,ee,81,9d,c2,ea,b4,a5,7,76,a,af,5a,d6,11,c5,44,a4,6a,5a,9b,17,95,b0,28,6e,6b,8e,cc,d3,a2,3c 2 | -------------------------------------------------------------------------------- /lpc/reflective-shots.lpc: -------------------------------------------------------------------------------- 1 | 69,48,49,55,cd,e2,b4,3e,47,b4,8a,8c,d2,86,ec,88,bb,2a,56,99,5a,40,77,a9,c4,8,18,be,83,1,d5,98,10,a0,48,67,2,8c,da,da,ca,e,bd,28,34,cd,c8,b3,5a,93,8c,59,23,cb,dd,5c,bd,ac,8,a0,16,26,2,24,2e,86,80,2e,c3,10,d0,3c,73,a8,6,37,55,57,2b,2d,2b,a2,24,5c,a3,b6,a6,4,72,8e,b1,db,fa,60,d9,2a,bb,4c,58,a2,36,9,cb,da,6a,13,32,d4,23,13,bb,a6,bb,32,57,b3,2d,80,96,54,14,d0,8a,b1,2,46,de,50,c0,28,e3,2,18,79,b3,64,35,93,58,64,a2,91,c7,e4,da,19,95,47,9e,5a,ba,67,46,1e,65,9c,69,9e,69,65,b4,39,57,86,55,94,36,96,50,95,96,71,c6,5e,62,64,69,d9,56,40,d2,6c,2a,4f,c1,2d,2a,63,9b,3c,c5,55,cf,a8,cd,80,a4,4f,19,90,f5,19,1,6,de,a4,0,1,26,49,45,40,57,29,f 2 | -------------------------------------------------------------------------------- /lpc/you-cant-catch-me.lpc: -------------------------------------------------------------------------------- 1 | ce,9b,52,14,a7,e2,34,ab,97,60,74,9f,da,cc,f6,ac,88,bc,1e,73,b2,43,8e,cc,46,20,80,aa,35,92,5a,95,86,b6,4b,1e,ca,f0,1e,d8,1d,65,a8,33,45,51,56,b5,a1,8d,d2,8d,11,95,87,d6,4b,27,94,c7,16,56,b1,c4,3a,29,5,80,1,cd,6b,a,60,58,89,a6,d7,a0,e6,ab,b1,87,d6,63,17,66,56,1d,5a,4f,3d,94,51,75,e8,33,46,63,66,dc,64,c,eb,8e,15,b6,11,a0,a5,39,1,2a,b,55,c0,e,a9,c,30,5a,8b,c9,d1,a8,85,6b,22,23,66,2b,e6,41,2d,13,d3,9d,ab,b4,3b,59,f4,c9,11,64,d5,74,d1,b7,b9,78,44,ab,45,df,e6,e2,11,8d,6,f5,7a,8a,aa,35,1a,f4,4b,9d,84,59,65,30,bf,86,9,67,ed,c1,fe,12,4e,5c,55,7,ff,62,27,52,57,69,fc,4f,ae,a8,13,b7,88,d7,b0,48,95,12,23,37,a8,d5,1d,76,8d,de,a0,64,97,db,79 2 | -------------------------------------------------------------------------------- /lpc/yellow-wizard.lpc: -------------------------------------------------------------------------------- 1 | 26,eb,9a,85,32,16,bb,a9,18,12,9d,58,54,e6,2c,24,7d,73,71,5b,b3,95,92,8e,c5,6d,4d,d9,93,2b,47,97,25,86,4a,f4,9c,15,16,17,a2,98,6b,4e,9b,a2,ad,56,95,27,63,4a,ba,ca,8c,56,b7,21,d8,2a,57,de,d2,3a,af,b3,42,b9,75,6a,55,ac,34,b7,48,ae,95,a9,5d,35,43,9a,8e,a6,4e,57,8b,65,7a,e1,2b,44,a3,71,e8,82,ae,14,95,85,a1,52,3e,2b,58,1a,96,d4,79,cf,10,ee,94,82,9c,38,89,ba,75,f2,7c,a0,e8,1a,3b,29,d8,42,45,54,12,97,fc,3a,77,66,b1,9d,ca,1f,d4,48,d5,49,ab,9b,70,65,8b,4e,a5,4b,91,5c,bb,2a,95,39,6,8a,88,6a,14,3a,9f,b0,db,bb,51,ea,63,26,ed,f0,2e,69,88,5e,29,c7,dd,82,3b,4a,75,e4,8a,34,6e,c9,81,95,ad,1b,99,39,7a,f2,8c,ac,25,16,1f,d8,a6,a2,35,5b,63,10,b5,68,77,f 2 | -------------------------------------------------------------------------------- /lpc/blue-wizard.lpc: -------------------------------------------------------------------------------- 1 | a1,8,8e,33,54,3b,a7,bc,18,6a,25,4e,57,f2,ac,28,5c,d9,7d,cb,b2,a5,70,e5,2e,2d,8b,4e,83,8d,b7,b4,2c,58,73,4d,e9,d2,32,67,dd,3c,34,4b,49,8c,b,b,d3,74,29,92,39,34,d8,db,85,48,39,ab,56,75,1f,22,ed,74,82,25,4d,4a,8d,d7,72,f5,86,21,b7,46,23,92,3b,9b,3e,58,d7,50,71,eb,46,eb,d3,42,d5,4e,a8,6d,b0,c,c1,74,2d,f7,41,d2,cc,da,b6,24,5,4a,73,5f,3a,e2,e2,5c,45,7c,71,c9,1a,d,31,d3,8d,a9,79,46,94,cd,e4,96,ea,1b,33,35,57,dc,ca,aa,44,5d,b5,f3,28,93,53,93,f0,cd,a5,4a,5e,d4,5a,3b,b7,36,25,11,6f,ed,da,fa,94,59,a2,b4,6b,19,52,25,ae,d4,2e,69,49,8d,a8,c3,3a,83,2b,92,51,13,f7,ce,a6,8a,da,4c,c6,33,9b,26,46,96,68,ed,ec,ba,14,8c,b5,d3,ab,1b,b2,4f,e6,b2,a6,66,49,49,59,33,eb,3e 2 | -------------------------------------------------------------------------------- /lpc/green-wizard.lpc: -------------------------------------------------------------------------------- 1 | ae,37,4e,25,dc,13,99,de,34,91,8,6b,e3,7a,d7,d1,cb,6d,55,69,53,85,72,cd,85,ad,ad,15,4d,d3,67,8f,b6,25,61,2a,9f,3d,9a,e6,98,a9,a3,d2,68,9a,22,95,f5,d0,a3,69,92,44,d7,ad,8c,b6,b,12,d9,c,9d,da,24,59,2d,75,4e,6a,73,0,d5,a8,24,a9,2d,1e,4c,dd,aa,96,2e,6a,ca,2c,8e,13,fa,28,c8,62,25,4e,18,b2,60,8f,61,27,a9,73,3a,cb,9c,d3,8e,26,46,2e,93,5c,33,ea,e8,25,c3,f2,f1,68,a2,31,8d,f2,c7,a3,49,4a,3d,3d,6e,b5,be,38,71,27,bf,d3,86,6a,54,9d,75,b3,0,8a,e5,18,5d,e,e2,e2,be,78,74,39,b1,6a,e9,ea,d1,a7,c4,e2,2d,5d,c6,90,ab,b0,a6,36,6d,63,4c,a4,39,de,ac,4d,29,91,66,67,d3,34,e7,44,a2,99,4d,c3,52,bc,38,9b,2f,76,6b,8e,a2,92,ba,19,6d,2a,53,57,4a,49,b7,57,5b,22,66,75,cd,91,bd,b2,65,35,79 2 | -------------------------------------------------------------------------------- /lpc/red-valkrie.lpc: -------------------------------------------------------------------------------- 1 | ac,d5,ba,5c,2d,dc,a8,41,a4,52,73,77,12,1a,df,d9,52,34,4d,ab,ca,e1,64,b5,2c,a3,ac,49,5c,2c,d6,8c,b2,4,63,ab,5c,3c,aa,aa,82,b5,6a,8e,eb,bd,72,cf,e,83,6a,30,52,32,bd,42,a1,c9,f8,50,73,77,1a,ea,3c,58,9d,dd,69,29,6b,52,13,b3,36,a5,2c,ce,45,23,57,b7,36,69,33,ab,48,dc,da,58,c4,bd,b3,56,6b,53,b5,e2,e8,2a,a3,49,b6,cb,cc,e7,8c,3a,fa,d,b1,9c,3c,ea,a8,2f,55,7c,ce,68,13,9f,36,d2,c5,a9,8e,62,52,d5,62,3,2,52,b5,6c,6d,ce,e5,92,51,37,55,31,b6,69,44,9c,d4,fb,d8,a4,19,71,d3,e4,43,aa,46,d8,b,8b,c9,21,91,ee,34,6c,a1,61,a6,45,e7,74,a4,44,5a,91,9d,d3,9a,ad,b2,4e,a6,a,4b,b5,46,ea,9b,24,2c,59,33,47,b4,e3,b0,16,23,66,65,72,c3,d6,9c,b0,44,d9,36,7b,36,e6,66,ea,46,1d,d9,ab,68,46,1b,7e,3e 2 | -------------------------------------------------------------------------------- /BlueWizard/HexFormatter.m: -------------------------------------------------------------------------------- 1 | #import "HexFormatter.h" 2 | #import "UserSettings.h" 3 | 4 | @implementation HexFormatter 5 | 6 | +(NSArray *)process:(NSArray *)nibbles { 7 | if (![[self userSettings] includeHexPrefix]) return nibbles; 8 | NSMutableArray *nibblesWithPrefixes = [NSMutableArray arrayWithCapacity:[nibbles count]]; 9 | for (NSString *nibble in nibbles) { 10 | NSString *withPrefix = [NSString stringWithFormat:@"0x%@", nibble]; 11 | [nibblesWithPrefixes addObject:withPrefix]; 12 | } 13 | return [nibblesWithPrefixes copy]; 14 | } 15 | 16 | +(UserSettings *)userSettings { 17 | return [UserSettings sharedInstance]; 18 | } 19 | 20 | @end 21 | -------------------------------------------------------------------------------- /lpc/yellow-valkrie.lpc: -------------------------------------------------------------------------------- 1 | 61,e8,8c,94,a7,2b,97,b6,52,ce,98,2c,35,aa,6a,d8,bd,6b,f2,2a,aa,49,73,ab,c9,23,4b,aa,3d,b9,2b,97,34,e2,73,d5,6c,38,92,10,46,2c,ba,f2,48,43,6c,17,ab,45,23,f5,b9,92,b5,16,8d,d4,db,f2,d2,90,33,52,67,26,dc,23,72,c9,ad,9d,50,c9,58,61,8,62,dd,d8,53,a5,3e,f8,51,b7,ae,5d,ea,e0,23,55,6b,72,2b,63,8c,54,eb,ca,a3,48,31,4a,6d,2a,b7,2c,d6,74,8d,b1,d2,e2,50,57,3c,c6,4a,8b,7d,3a,76,df,2a,25,d,f1,98,63,aa,84,36,d8,51,a3,ac,d,4,c8,31,3c,25,29,a6,85,ba,ed,d2,c4,4c,15,32,b1,52,1b,b2,49,4b,a4,e,9d,c9,26,6d,9a,26,f4,21,93,87,c5,a6,36,e6,48,1e,99,ab,da,94,8c,58,4d,cd,2e,4b,31,a4,39,5d,d9,75,c5,a2,75,a5,33,d3,45,43,99,ae,49,4c,97,15,67,aa,38,35,7d,72,62,ee,91,54,d,d9,b1,66,e5,6a,35,25,c3,5e,d5,55,1e 2 | -------------------------------------------------------------------------------- /BlueWizard/NibbleSwitcher.m: -------------------------------------------------------------------------------- 1 | #import "NibbleSwitcher.h" 2 | 3 | @implementation NibbleSwitcher 4 | 5 | +(NSArray *)process:(NSArray *)nibbles { 6 | NSMutableArray *switched = [NSMutableArray arrayWithCapacity:[nibbles count]]; 7 | for (NSString *nibble in nibbles) { 8 | NSUInteger offset = [nibble length] == 4 ? 2 : 0; 9 | NSString *leftByte = [nibble substringToIndex:1 + offset]; 10 | NSString *rightByte = [nibble substringFromIndex:1 + offset]; 11 | 12 | NSString *switchedNibble = [NSString stringWithFormat:@"%@%@", rightByte, leftByte]; 13 | [switched addObject:switchedNibble]; 14 | } 15 | 16 | return switched; 17 | } 18 | 19 | @end 20 | -------------------------------------------------------------------------------- /lpc/green-warrior.lpc: -------------------------------------------------------------------------------- 1 | 21,4c,67,d4,cd,6c,bb,2c,c6,22,55,4b,1c,6a,5f,c8,ca,38,6b,aa,42,63,d,a7,ae,ad,8c,99,c5,9b,37,8f,bc,78,26,5d,4f,35,f2,aa,44,f8,22,d6,c8,3b,67,95,9,bb,23,eb,42,98,a7,a2,8e,ac,49,61,9d,34,5b,d2,ac,d8,aa,55,59,ca,8c,d3,48,8b,ca,21,8b,8e,d8,4b,63,a7,22,48,b6,68,8b,9d,aa,28,d4,34,a5,49,e9,b2,50,f5,66,79,69,4c,5c,2d,5b,e4,85,c9,6a,af,e,52,1a,3a,11,ab,4a,d9,71,aa,65,eb,30,15,2f,25,33,b5,8d,42,b3,95,54,f5,16,9a,48,9b,52,d5,4b,6d,34,4b,29,7c,53,ed,e0,de,a5,f2,93,ad,43,3a,97,26,74,f2,c,de,d4,ba,94,48,a3,75,d3,18,4a,64,e1,b6,99,6d,cc,96,d5,d7,43,b7,39,1b,d6,d8,ac,d4,e6,e2,45,74,7d,56,59,72,26,f1,d6,5b,65,49,95,34,5b,16,95,35,f,16,2f,5a,95,8e,54,d8,2c,75,4e,5a,53,63,b5,d4,26,6e,2a,4e,44,ca,ea,98,b6,64,66,2f,5b,f5,0 2 | -------------------------------------------------------------------------------- /lpc/is-now-it.lpc: -------------------------------------------------------------------------------- 1 | a3,ea,46,18,a7,ca,8c,b6,79,21,99,2e,33,ba,ec,88,7b,b3,d2,e8,93,32,8e,ad,d8,6d,48,ca,38,aa,22,b7,b1,49,13,b5,9c,39,96,c5,5d,c4,a2,71,9b,b7,76,21,cd,38,c,d8,da,85,1,5a,9a,a5,3e,18,d2,6a,b7,d2,aa,ec,c4,24,cb,72,2b,5a,f2,10,cf,c8,2d,ab,c5,53,22,e3,b4,a4,54,2f,aa,a8,da,92,92,bd,38,33,4e,4b,73,f3,a2,89,38,2d,c9,cd,8b,c6,e3,b4,38,f5,28,ea,88,d2,a2,d8,a2,24,3d,6e,8b,62,f6,d6,74,a9,2d,8e,49,4b,c6,ac,b4,34,44,2d,19,b7,52,aa,94,35,b8,dd,72,ca,53,b5,a4,a,db,26,4e,2d,8a,aa,e2,a8,28,ae,8,ce,8c,9c,92,a2,25,db,89,dd,48,bb,21,b6,6e,d9,23,6d,8e,54,2f,6d,8d,bc,39,16,99,b1,5d,ba,12,c8,a6,47,b1,2,94,8f,40,0,8,99,8,90,da,47,24,cd,90,58,8f,6d,93,76,c7,a2,13,4e,42,be,94,b,47,35,71,5d,d7,c1,1a,1d,9b,0,41,84,20,20,49,65,4,24,27,f4,0 2 | -------------------------------------------------------------------------------- /lpc/shot-the-food.lpc: -------------------------------------------------------------------------------- 1 | c,98,96,51,0,33,8,9,60,34,d1,16,f5,e6,a6,22,c9,5a,12,b3,69,64,57,6e,69,b6,13,c9,fe,b8,65,d9,4c,a4,fa,ed,96,66,bf,1e,96,53,42,12,53,a4,c5,44,61,40,96,5c,4,68,1e,cd,c5,31,ba,46,55,e5,92,66,db,91,12,73,5a,96,cd,44,aa,d5,6e,51,8c,66,6a,3b,a6,25,de,46,ba,47,23,53,64,63,a6,6a,76,11,10,a5,29,2,a2,36,43,40,d6,ae,8,b0,5c,3d,84,c9,86,5a,54,93,14,47,6f,6e,6e,b1,4b,1c,82,96,88,af,6a,99,8f,ee,8e,dd,b9,e5,ce,a5,27,55,e7,56,6,1b,96,e8,7d,5b,13,79,59,91,f9,6b,6d,d4,e1,41,e2,af,75,51,a4,15,ab,bf,d6,67,e5,5e,22,fa,da,98,54,78,31,fb,2f,53,14,ee,a9,aa,af,4c,c1,78,4,6b,be,34,47,65,e1,c6,fa,cb,12,b5,85,19,e7,2b,4b,36,62,1a,ea,2f,cc,39,8,99,87,6d,b2,24,e9,56,2c,5a,dd,da,ad,96,84,4b,56,73,55,1c,6e,1e,85,ad,59,a8,bb,bb,92,7 2 | -------------------------------------------------------------------------------- /lpc/yellow-warrior.lpc: -------------------------------------------------------------------------------- 1 | 6e,1a,12,8c,ab,27,a5,be,4a,16,da,ae,3c,aa,ea,58,b5,72,ca,2a,ab,e7,b0,f4,39,2b,cf,ce,c3,d5,e6,8c,34,aa,35,75,9f,55,a2,20,c6,5d,2c,ce,8,83,3d,27,af,56,2d,74,fe,92,3d,52,b6,c8,d5,4c,15,6f,d2,22,ef,bd,c3,34,4e,8b,a2,f1,88,b0,89,29,72,7e,d4,35,4a,85,98,bb,d,17,8d,13,32,63,d7,45,bd,a1,2b,ad,3b,27,77,7,ae,37,b9,5d,d5,1a,84,8e,c7,2b,15,76,1d,2a,e5,af,85,c5,4b,ca,74,9a,42,d1,3c,2d,91,7d,54,dc,d3,b4,c4,ed,a0,70,6f,5d,32,37,4d,22,65,53,29,dd,50,cd,94,4e,a5,f5,9d,bd,4c,7a,95,3e,54,8a,74,d9,d4,86,5c,c9,2c,64,d5,18,b3,16,b3,f1,99,63,ca,4a,d5,d6,c3,8c,a5,4,52,9b,8,33,d6,6c,45,6c,7d,51,db,4a,61,8d,d0,59,61,4d,19,c6,a3,26,85,25,35,f4,c,5f,19,f6,9c,54,25,b4,49,18,b3,33,e5,d2,a4,6e,2e,59,55,42,92,b9,25,7,16,2b,6b,fa,0 2 | -------------------------------------------------------------------------------- /lpc/speech-chip-test.lpc: -------------------------------------------------------------------------------- 1 | c,f8,21,9c,1,3f,a6,33,e0,a7,76,1,fc,d4,c,6,e8,32,ac,ec,43,28,e4,76,ad,b2,4e,a6,90,3b,95,ca,3c,99,40,dd,46,6e,e3,14,2,b9,1b,b9,f5,93,9,d6,5e,a5,d2,4e,ca,d8,bd,91,42,dd,65,98,9b,d9,36,c0,af,65,a,78,7b,d3,0,6f,6e,a,e0,b5,6d,6,dc,36,5,6,b8,d9,dd,0,ef,6c,19,e0,ad,eb,51,de,b6,e1,2,b2,47,be,1c,93,50,cc,1e,69,53,a2,91,53,69,c4,43,ba,b8,77,cd,16,36,11,9a,d6,95,9a,5f,79,6a,58,4e,1a,6e,96,e1,69,31,39,39,95,87,a5,66,6d,70,40,31,2e,a,28,36,84,1,c5,95,0,80,3,8e,50,72,40,3,22,c3,ce,ca,2c,b2,60,d,ab,ea,d0,8c,b5,b4,cc,a6,4a,d2,a7,d2,32,ba,6c,4d,ef,49,43,6f,72,24,ad,2b,35,2d,bb,f0,f0,15,9d,d4,a4,c3,c3,46,54,52,26,49,76,68,53,49,de,50,c8,49,13,6,e9,bb,90,60,b1,19,c4,1f,ca,4a,d4,b1,11,7e,2a,35,16,3a,20,80,ab,d2,9,f0,55,e8,3 2 | -------------------------------------------------------------------------------- /lpc/ha-ha-ha-ha.lpc: -------------------------------------------------------------------------------- 1 | 8,28,5e,cd,31,35,4a,9b,7b,ac,25,d4,e4,a3,e9,4e,16,df,b2,97,57,58,5d,5c,eb,5e,d6,11,76,71,bd,45,5b,5a,b4,c5,f5,9a,6d,61,51,17,db,6a,25,a7,3b,29,4c,6d,19,96,26,27,d1,b5,99,5b,88,53,27,d7,66,2e,aa,b2,93,9c,ab,15,b7,da,6a,4a,5e,96,b2,69,b9,a9,a9,7b,e9,74,e4,a6,a6,e1,a5,d3,91,9b,9a,bb,97,4c,d7,6e,6a,6e,51,3a,55,a7,a9,b9,47,c9,7a,dc,a6,e5,e9,a9,63,76,92,52,a7,b7,96,45,2a,62,ad,d6,52,6a,6b,f0,b5,5a,59,ab,93,c5,b5,e6,65,99,51,17,d7,ab,b7,65,46,5d,5c,6b,51,1a,11,75,71,ad,45,69,44,dc,c5,b5,16,a5,e1,76,17,57,9b,a5,a5,39,6d,7c,1d,9a,d1,a2,a4,88,a5,59,6b,89,cd,22,e5,69,49,6d,96,86,94,87,17,4f,58,1e,72,9e,9e,3a,65,b9,29,79,78,c9,b6,e5,a6,e6,e1,c5,db,91,9b,9a,9b,37,4f,d7,29,6a,ae,d1,d2,5d,27,69,b9,7a,c9,54,9c,a0,97,65,21,ed,89,1f 2 | -------------------------------------------------------------------------------- /BlueWizard/FrameData.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @class Reflector; 4 | @interface FrameData : NSObject 5 | 6 | @property (nonatomic, getter=shouldSkip) BOOL skip; 7 | 8 | +(FrameData *)stopFrame; 9 | +(FrameData *)frameForDecoding; 10 | -(instancetype)initWithReflector:(Reflector *)reflector 11 | pitch:(NSUInteger)pitch 12 | repeat:(BOOL)repeat; 13 | -(NSDictionary *)parameters; 14 | -(NSDictionary *)translatedParameters; 15 | -(void)setParameter:(NSString *)parameter 16 | value:(NSNumber *)value; 17 | -(void)setParameter:(NSString *)parameter 18 | translatedValue:(NSNumber *)translatedValue; 19 | -(Reflector *)reflector; 20 | 21 | @end 22 | -------------------------------------------------------------------------------- /lpc/extra-speed.lpc: -------------------------------------------------------------------------------- 1 | 6d,2f,46,d3,ba,6a,8f,b1,47,4b,71,5f,3a,fa,9a,3d,39,f4,69,1b,5a,d3,90,90,25,4,8,91,9a,1,a5,95,a,20,25,57,3,c,19,9a,da,65,2b,d4,24,6b,e8,5b,f2,64,b7,35,a6,6f,cd,92,43,56,33,20,44,d6,52,a7,4c,6e,21,ab,47,55,2a,99,9b,76,19,65,9,21,6e,b6,76,e4,39,84,b8,f7,9c,51,54,15,e2,96,93,15,30,89,a9,0,96,2c,17,c0,c2,e2,2,38,3a,4a,1,25,b9,80,0,4a,50,19,41,1b,2e,ca,9c,7a,4,2d,19,b2,d7,ea,e1,d,eb,4c,56,ab,87,3b,42,12,6a,35,1e,ee,b4,c1,a8,d5,66,f8,d3,17,13,e7,92,11,4e,17,44,5a,4b,46,34,42,20,79,cd,19,49,8b,2,9a,53,77,64,5d,29,6a,76,a3,91,37,a9,a8,33,b5,47,d5,83,21,6b,2f,19,4d,8f,1,a4,b5,24,74,c3,5,90,d5,d2,31,4c,13,c4,94,6f,54,da,94,a0,67,45,56,79,57,86,9a,3d,39,94,dd,bb,a8,bb,6d,d3,f4,a4,28,3a,75,4d,37,7c,2,5b,34,55,c3,b4,49,cc,59,e7,1 2 | -------------------------------------------------------------------------------- /lpc/warriror-damage-7.lpc: -------------------------------------------------------------------------------- 1 | 8e,49,26,32,38,6a,15,39,f8,48,b5,b8,53,8c,a0,b2,d4,f5,56,b2,7d,c,e5,c9,d1,c5,e,ce,5d,cc,9f,34,3b,b8,70,76,7b,92,2c,15,a3,cc,f3,52,b2,64,9c,94,f1,d9,c1,12,69,ca,d3,2e,7,5b,d9,e9,4c,ba,9d,1c,63,27,68,63,76,70,9d,9a,a4,f1,29,ce,b5,aa,ca,8b,2f,7,d7,e9,2a,2e,9b,1c,5c,af,aa,2d,65,76,70,83,4b,a7,b0,db,c1,d,3e,9d,c2,2f,27,2f,71,6f,b,5c,1c,bc,68,3a,a0,63,72,f0,83,ec,a6,f2,49,c1,cf,4c,bb,16,ea,84,c0,9b,2a,4d,bb,98,42,eb,3b,b9,e3,76,8a,82,cc,f6,94,27,29,a,2a,da,53,1e,97,38,ab,48,71,79,93,d2,ac,a2,d4,68,49,4a,92,cb,64,95,25,21,c9,36,52,94,9e,86,34,d9,48,51,99,e3,b2,50,4d,25,ab,b2,cb,42,71,a5,ac,9,2e,f,cd,44,aa,4b,ba,c2,e4,c,8b,98,68,a,53,c3,ad,6a,a4,29,74,a9,d0,cc,89,a6,72,21,53,3d,6e,9a,3a,6a,4f,51,5b,c4,ba,a0,a2,42,2d,e1,3 2 | -------------------------------------------------------------------------------- /BlueWizard/AudioHelpers.h: -------------------------------------------------------------------------------- 1 | #ifndef BlueWizard_AudioHelpers_h 2 | #define BlueWizard_AudioHelpers_h 3 | 4 | __unused static void CheckError(OSStatus error, const char *operation) 5 | { 6 | if (error == noErr) return; 7 | 8 | char str[20]; 9 | // see if it appears to be a 4-char-code 10 | *(UInt32 *)(str + 1) = CFSwapInt32HostToBig(error); 11 | if (isprint(str[1]) && isprint(str[2]) && isprint(str[3]) && isprint(str[4])) { 12 | str[0] = str[5] = '\''; 13 | str[6] = '\0'; 14 | } else 15 | // no, format it as an integer 16 | sprintf(str, "%d", (int)error); 17 | 18 | fprintf(stderr, "Error: %s (%s)\n", operation, str); 19 | 20 | exit(1); 21 | } 22 | 23 | #endif 24 | -------------------------------------------------------------------------------- /lpc/wizard-damage-9.lpc: -------------------------------------------------------------------------------- 1 | cc,31,ca,d4,23,e3,4,4f,3a,75,cf,94,e3,7c,65,c5,ad,4a,8e,8b,bc,12,d3,6c,39,26,55,da,35,2a,63,bb,c4,39,31,cd,94,53,82,e0,c4,a5,5d,4e,f1,a2,17,e3,36,27,c5,8f,41,94,cb,92,94,20,3a,51,69,8b,5b,e2,e4,c5,b8,24,4e,ca,63,44,d7,d4,da,a1,a,11,dd,22,12,85,3a,44,74,8d,48,14,ba,98,30,d4,32,56,18,42,40,77,ab,c4,61,a,81,5c,33,1a,85,29,78,72,8b,6c,14,46,1f,c4,bc,dc,51,e8,93,c3,f4,f4,98,ae,4c,16,22,3a,22,86,38,5a,ea,4c,b3,94,a2,e8,a8,ab,cd,72,9,a3,a3,ae,74,d3,29,8c,8e,26,d3,43,a7,28,7a,ea,48,f,9d,e2,e4,b1,b5,c2,74,ca,52,c0,f6,72,53,21,4f,1e,33,dd,43,a6,b2,44,4c,f7,34,15,ea,e4,b0,23,2c,a4,6b,73,80,f6,c,93,61,48,1e,2b,ca,6d,84,b9,64,8,af,4c,e0,96,da,45,59,2d,89,5b,ea,50,63,d3,b4,66,aa,37,9d,8d,1c,8b,b1,4d,55,31,8d,4d,86,5a,88,39,c2,e1,3 2 | -------------------------------------------------------------------------------- /BlueWizard.xcodeproj/xcuserdata/patrick.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | BlueWizard.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | CDBF22D31A99C916001E25AB 16 | 17 | primary 18 | 19 | 20 | CDBF22E91A99C917001E25AB 21 | 22 | primary 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /BlueWizard/Credits.rtf: -------------------------------------------------------------------------------- 1 | {\rtf1\ansi\ansicpg1252\cocoartf1404\cocoasubrtf470 2 | {\fonttbl\f0\fswiss\fcharset0 Helvetica;} 3 | {\colortbl;\red255\green255\blue255;} 4 | \margl1440\margr1440\vieww9000\viewh8400\viewkind0 5 | \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\qc\partightenfactor0 6 | 7 | \f0\fs24 \cf0 Written by Patrick J. Collins\ 8 | \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0 9 | \cf0 \ 10 | \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\qc\partightenfactor0 11 | \cf0 Special thanks to:\ 12 | \ 13 | Richard Wiggins\ 14 | Jonathan Gevaryahu\ 15 | Gene Frantz\ 16 | Frank Palazzolo} -------------------------------------------------------------------------------- /BlueWizard/Buffer.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @interface Buffer : NSObject 4 | 5 | -(instancetype)initWithSize:(NSUInteger)size 6 | sampleRate:(NSUInteger)sampleRate; 7 | 8 | -(instancetype)initWithSamples:(double *)samples 9 | size:(NSUInteger)size 10 | sampleRate:(NSUInteger)sampleRate; 11 | 12 | -(instancetype)initWithSamples:(double *)samples 13 | size:(NSUInteger)size 14 | sampleRate:(NSUInteger)sampleRate 15 | start:(NSUInteger)start 16 | end:(NSUInteger)end; 17 | 18 | -(double *)samples; 19 | -(NSUInteger)size; 20 | -(NSUInteger)sampleRate; 21 | -(double)energy; 22 | 23 | @end 24 | -------------------------------------------------------------------------------- /lpc/dont-shoot-the-potion.lpc: -------------------------------------------------------------------------------- 1 | ad,4e,56,dd,32,ac,b4,2a,65,35,ad,a8,da,b2,e4,a3,55,a5,4d,4b,93,f2,35,a5,34,2d,8,36,57,d4,1c,37,3f,38,6b,11,57,93,bc,e0,d5,d4,ca,b2,2,6a,8,45,c0,70,69,4,98,ad,9c,1,a3,b5,b,a0,f7,ea,96,e5,28,a2,ee,ad,47,55,2c,85,9a,f6,1e,6d,b1,a2,22,91,96,1,b3,a6,22,a0,39,66,4,d4,2a,52,fa,e4,9d,d2,7b,ca,e8,92,77,75,89,39,a6,4d,dc,55,d3,6b,3,30,20,58,e6,56,55,5d,1e,6a,51,5a,9d,6d,46,92,97,69,ad,6f,ed,62,39,7b,34,de,77,3a,d9,9a,51,fa,30,a1,ec,ad,47,ea,62,86,52,ac,4e,71,a8,a6,2c,51,9b,1,75,57,29,a0,f5,4e,3,b4,31,25,80,76,2a,47,97,3d,b9,8d,c7,1a,6d,a9,22,9a,d5,64,c,2d,a6,8b,c4,92,d1,b5,e0,29,14,89,47,55,c,8b,da,a8,6e,49,b6,ec,54,e1,b2,5,c9,b1,6a,94,ca,e6,67,2f,86,9d,b1,4b,58,b2,9,46,c7,76,59,c9,2e,48,1d,cb,14,59,8a,9b,8c,22,15,65,65,2a,1e,b1,85,1f,95,a9,59,3b,64,41,36,a6,e2,1d,8b,c4,c5,aa,92,77,a8,7 2 | -------------------------------------------------------------------------------- /Build/BlueWizard.app/Contents/Resources/Credits.rtf: -------------------------------------------------------------------------------- 1 | {\rtf1\ansi\ansicpg1252\cocoartf1404\cocoasubrtf470 2 | {\fonttbl\f0\fswiss\fcharset0 Helvetica;} 3 | {\colortbl;\red255\green255\blue255;} 4 | \margl1440\margr1440\vieww9000\viewh8400\viewkind0 5 | \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\qc\partightenfactor0 6 | 7 | \f0\fs24 \cf0 Written by Patrick J. Collins\ 8 | \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0 9 | \cf0 \ 10 | \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\qc\partightenfactor0 11 | \cf0 Special thanks to:\ 12 | \ 13 | Richard Wiggins\ 14 | Jonathan Gevaryahu\ 15 | Gene Frantz\ 16 | Frank Palazzolo} -------------------------------------------------------------------------------- /lpc/extra-shot-power.lpc: -------------------------------------------------------------------------------- 1 | 23,eb,2e,83,c2,97,8c,b0,c6,10,f3,5a,32,fc,da,c4,cd,a6,76,73,eb,ae,34,77,cb,6,a8,b1,d5,1,4b,4e,82,1,8a,31,1f,61,4d,a1,5a,d9,a6,f9,b5,aa,99,66,92,12,e4,8c,61,a1,ab,5a,90,b,a6,45,cd,1a,61,ce,ec,96,b9,b8,a5,35,8b,a8,e7,6c,5,cc,51,61,80,d9,2a,d,b0,46,7,3,d6,dd,60,c0,da,e3,2,98,39,ad,85,c5,a9,69,65,ed,16,e6,18,11,9e,73,5a,18,4b,a7,85,cf,69,61,9a,19,1e,55,a5,45,b9,66,9a,75,5d,7,54,a7,45,80,e1,c5,8,10,94,a4,8b,72,32,8f,a8,2a,2e,4c,a5,d2,23,66,9b,30,cd,4c,8b,aa,aa,c2,dc,32,dc,bb,aa,0,72,15,1d,55,29,59,2a,5d,b6,95,a9,65,6a,d4,d4,51,65,37,69,ee,4b,46,93,62,a7,85,cf,69,6d,ec,ad,d6,d1,b8,f5,61,46,b8,d4,94,36,f8,e6,99,e4,73,da,10,ba,a6,59,b8,2d,43,58,62,19,d6,74,4c,b1,a4,79,79,bd,31,a7,a2,96,a5,f1,cb,12,27,45,9b,ae,29,6b,9a,d8,a1,d5,24,2c,e9,62,a4,db,2c,37,e6,45,99,6a,8d,dc,90,3a,5b,95,a6,56,53,6e,54,a9,d6,f8,1 2 | -------------------------------------------------------------------------------- /lpc/green-valkrie.lpc: -------------------------------------------------------------------------------- 1 | 8,60,1d,3d,c,32,87,58,45,9a,32,f8,c2,56,61,5d,5a,9f,b,5a,a4,ad,1e,5d,cd,a4,32,36,7b,b4,4d,93,ca,44,a9,51,d,89,a6,1d,91,47,d9,39,9a,76,58,1d,45,63,64,ba,65,75,14,8d,92,6b,a7,b5,51,54,c6,aa,1d,71,4b,11,1d,aa,b7,c7,29,45,50,14,9e,56,a7,14,81,6a,79,59,ed,52,64,c6,a1,a9,49,4a,53,38,ab,8d,3a,29,43,e1,6c,d2,96,38,4d,95,8b,6a,9b,53,53,44,ae,16,65,89,4d,91,84,4a,86,b5,4e,75,b0,dc,ed,52,67,34,a1,b8,59,f8,ac,51,65,9d,95,4e,6b,46,16,cd,64,a8,2c,1e,51,b4,1b,26,b6,78,44,51,5f,aa,f8,a2,11,7,bd,25,e4,ad,4a,1a,64,a7,9,b7,e,4d,70,11,16,3a,a3,d4,d9,44,85,f1,6a,2,e4,92,4e,0,56,c5,47,1b,a2,72,8d,ba,6d,9d,cf,2a,d5,ea,b6,f4,be,92,76,48,d7,34,84,8a,9e,c1,9b,db,94,a,a9,37,6f,1a,4b,e,2c,ba,b6,66,6c,c5,89,48,fb,ec,76,d4,c0,a2,1e,b5,53,97,3,84,57,da,4d,63,d6,6a,16,9a,34,4c,39,88,a9,47,5d,b7,64,cf,ea,1d,6b,dc,56,bc,8,77,ac,7e 2 | -------------------------------------------------------------------------------- /lpc/better-luck-next-time.lpc: -------------------------------------------------------------------------------- 1 | 2d,18,3e,4d,54,d4,8c,a8,1a,4d,4d,df,32,c2,62,3d,a5,62,cd,f0,9b,b7,54,b7,c5,c3,af,ce,82,dd,ee,4,bf,44,b,b6,c8,d2,82,98,38,33,bd,4d,b,63,61,f7,b2,74,2d,4e,cd,d4,cd,9c,b5,38,9a,e6,70,6d,d6,e2,24,da,c2,65,ee,88,b2,ce,70,f1,6a,23,4a,6e,dc,2c,ee,8c,38,9b,71,37,bf,33,92,2a,db,53,ed,71,c8,6b,8a,50,b6,2c,8,d0,b1,4d,45,c9,4e,98,c5,63,13,27,37,e1,9c,77,4c,52,65,47,aa,dd,16,b9,57,52,6b,52,c7,94,d9,88,ba,44,6b,57,24,45,3e,ae,65,4b,de,55,88,1a,3f,1a,79,b3,61,66,fe,78,94,d5,a7,4b,c4,92,56,d7,64,2e,61,6b,52,d3,56,2a,bb,e4,6,2,94,c9,4e,80,29,47,10,b0,55,31,2,26,77,1,2,4c,e6,56,fa,ec,bc,39,63,4a,1b,aa,b5,51,b7,cd,6d,ac,d6,46,dd,37,f7,a9,4d,d5,da,a8,7b,97,b6,54,e7,c3,11,9b,db,d2,bc,8f,ba,6e,6e,6b,8f,31,6a,bc,b8,6d,35,66,72,d8,94,b6,57,17,c9,e9,93,cb,5e,ad,b7,b8,36,2a,47,73,d6,6c,da,b0,9e,e9,2a,ce,92,c3,2a,ba,3b,39,d,49,f,29,ef,7 2 | -------------------------------------------------------------------------------- /BlueWizardTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /BlueWizardTests/ReflectorTests.m: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | #import "Reflector.h" 4 | #import "CodingTable.h" 5 | 6 | @interface Reflector (ReflectorTests) 7 | @property (nonatomic, getter=shouldLimitRMS) BOOL limitRMS; 8 | @end 9 | 10 | @interface ReflectorTests : XCTestCase 11 | 12 | @end 13 | 14 | @implementation ReflectorTests { 15 | Reflector *subject; 16 | double *samples; 17 | } 18 | 19 | -(void)setUp { 20 | subject = [[Reflector alloc] init]; 21 | [super setUp]; 22 | } 23 | 24 | -(void)tearDown { 25 | [super tearDown]; 26 | } 27 | 28 | -(void)testItDoesNotAllowStopFramesToGetGenerated { 29 | subject.rms = [CodingTable rms][15]; 30 | XCTAssertEqual(subject.rms, [CodingTable rms][15]); 31 | subject.limitRMS = YES; 32 | XCTAssertEqual(subject.rms, [CodingTable rms][14]); 33 | } 34 | 35 | @end 36 | -------------------------------------------------------------------------------- /lpc/extra-shot-speed.lpc: -------------------------------------------------------------------------------- 1 | 23,ea,ae,55,d3,d6,8c,b0,d,e7,d4,98,23,80,52,cc,4,50,a7,99,2,ba,1f,15,c0,d2,a5,a0,80,ee,da,4,d0,4a,4a,9,72,c7,70,f7,d6,2d,48,15,33,d4,17,8d,20,26,f1,a,9f,35,c2,dc,cc,5c,63,f6,8,4b,e1,90,e8,b2,2d,6e,59,9c,3c,62,29,60,8e,29,3,cc,d5,e9,80,39,d3,1c,30,ba,89,2,46,75,6f,e1,18,61,66,96,76,a4,d9,aa,79,7b,e5,11,a7,ec,e1,51,53,46,9c,43,55,ba,2d,19,51,8e,15,69,31,67,a4,39,45,84,75,1d,97,d6,18,61,5c,69,14,30,44,27,3,52,10,37,71,4e,6e,e1,dd,c8,c5,c5,6e,a4,79,9b,10,15,33,91,ee,4d,18,30,44,27,3,16,8d,60,c0,f5,11,0,25,ed,d1,58,c5,62,8f,a4,57,13,34,9f,3b,e2,15,4c,41,7d,cd,88,46,a,3,cd,d5,23,19,c1,18,ac,5b,8f,7c,5a,65,94,ed,34,ca,e1,8d,41,a6,d3,a8,67,70,1,a9,ce,a3,9b,29,15,24,3a,8f,7e,a6,34,d0,d8,3c,c6,51,5a,41,22,f3,98,66,6e,7,f2,ce,6d,ee,d1,18,aa,17,87,72,44,55,e2,5c,ed,9a,e1,8c,40,27,13,6a,67,c,1,a9,4e,6e,6d,8a,85,a7,5a,87,b1,6a,51,dd,4c,24,a6,c4,d9,e2,cc,14,59,a3,62,af,25,cb,f 2 | -------------------------------------------------------------------------------- /lpc/times-running-out.lpc: -------------------------------------------------------------------------------- 1 | 4,98,a4,8c,0,dd,66,94,a4,a6,4a,d7,ac,dd,c2,e2,3a,dd,a2,f6,f0,8b,dc,74,f7,d9,c3,29,ea,42,23,ea,c,3b,87,35,cb,88,33,ec,12,db,dd,33,ca,70,6b,cc,74,c9,32,c3,ad,a5,dd,39,aa,c,b7,8d,74,96,a8,33,bc,9e,92,55,b2,ca,f0,87,f,72,cb,32,c5,1f,c6,d1,a2,66,15,bf,18,91,b6,48,92,fc,ea,48,8b,32,4e,a,b3,61,29,89,3a,29,2e,86,cc,24,6b,97,b2,59,55,95,a8,5d,ca,e9,93,45,3c,4e,ab,9a,53,75,95,34,25,cf,c1,d4,d5,9c,96,3c,26,75,37,4b,5a,d2,98,35,dc,b4,49,8b,63,f6,74,d7,26,2d,ca,31,52,43,9b,b4,28,7b,4d,73,6f,da,92,ea,cc,cd,ac,6e,4b,ba,b,31,d5,39,23,99,b6,84,5d,17,8f,64,fa,61,2c,ad,d5,d2,ee,9d,b2,a8,ec,48,5a,30,f1,a4,aa,23,aa,51,dd,2c,6b,8f,b0,14,b7,d0,aa,32,a2,dc,52,d2,ab,ec,88,73,4d,f,ab,2a,23,ce,35,dd,ad,eb,8c,24,d5,72,8b,9c,32,d2,14,ab,9c,b3,c9,c8,93,ad,4a,f2,26,ad,4c,2e,32,d8,63,b7,2a,79,8f,10,b7,d4,da,9c,dc,4c,d3,36,1,4a,2e,77,71,2e,15,66,5d,d7,a5,45,4f,a4,d8,12,91,55,5e,31,ca,4d,9,d0,65,d8,3 2 | -------------------------------------------------------------------------------- /BlueWizardTests/NibbleSwitcherTests.m: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | #import "NibbleSwitcher.h" 4 | 5 | @interface NibbleSwitcherTests : XCTestCase 6 | 7 | @end 8 | 9 | @implementation NibbleSwitcherTests { 10 | NSArray *subject; 11 | } 12 | 13 | -(void)setUp { 14 | [super setUp]; 15 | NSArray *hex = @[ @"90", @"4d", @"66", @"66", @"18", @"50", @"b4", @"5a", @"0a", @"a6", @"d5", @"5b", @"6b", @"e5", @"6a", @"54", @"71", @"8a", @"e5", @"c0" ]; 16 | subject = [NibbleSwitcher process:hex]; 17 | } 18 | 19 | -(void)tearDown { 20 | [super tearDown]; 21 | } 22 | 23 | -(void)testItSwitchesTheNibbles { 24 | NSArray *expected = @[@"09", @"d4", @"66", @"66", @"81", @"05", @"4b", @"a5", @"a0", @"6a", @"5d", @"b5", @"b6", @"5e", @"a6", @"45", @"17", @"a8", @"5e", @"0c" ]; 25 | XCTAssertEqualObjects(subject, expected); 26 | } 27 | 28 | @end 29 | -------------------------------------------------------------------------------- /lpc/valkrie-damage-14.lpc: -------------------------------------------------------------------------------- 1 | c9,48,be,8a,3d,c7,24,2d,e6,4e,8a,1a,92,94,38,43,65,ca,48,91,43,2f,93,c9,20,4d,8e,be,8b,3d,7,37,39,e6,4a,ca,2e,dc,e4,98,2b,39,ba,48,93,63,6e,e7,aa,22,4d,8e,a5,9c,b3,b,37,39,96,36,ee,2e,52,e4,58,cb,78,aa,48,51,62,2d,a7,ee,c2,45,8d,b9,83,b2,87,14,35,a6,4a,8a,1e,53,b4,98,3b,a8,6a,6c,d1,63,ee,a0,aa,71,c5,88,b1,93,a2,86,17,23,c6,2a,8a,1a,56,cc,50,ca,b9,7a,6c,b1,62,a9,a0,ea,b1,c5,8e,b9,12,73,c6,14,27,a6,2a,8c,19,53,dc,18,ab,30,7a,4c,71,a3,af,22,cb,33,c5,8b,3e,9b,bc,a6,14,2f,9a,1c,d1,98,5a,fc,68,62,cc,6c,4c,f1,43,c8,12,8f,31,c5,f,a1,52,32,c6,94,20,86,4a,f6,38,53,82,e4,ab,c8,fc,72,a,52,ac,22,f3,d3,29,8c,b1,8a,cc,2f,a7,30,86,2a,32,bf,92,c2,e8,ab,c9,fc,4a,8a,92,cb,66,b5,2b,29,4a,3e,87,c5,ae,a4,28,d9,18,11,bd,9d,a2,64,b3,55,f5,76,8a,93,cb,16,d5,db,29,4e,26,5b,8c,1e,a7,38,e9,6c,71,5a,9c,92,ac,b4,4d,79,72,4a,b2,f0,16,e3,d9,21,49,3a,13,45,66,bb,34,99,28,12,2e,6d,b2,62,a2,48,24,12,1,84,72,47,80,92,11,f 2 | -------------------------------------------------------------------------------- /BlueWizardTests/NibbleBitReverserTests.m: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | #import "NibbleBitReverser.h" 4 | 5 | @interface NibbleBitReverserTests : XCTestCase 6 | 7 | @end 8 | 9 | @implementation NibbleBitReverserTests { 10 | NSArray *subject; 11 | } 12 | 13 | -(void)setUp { 14 | [super setUp]; 15 | NSArray *hex = @[ @"9", @"2b", @"66", @"66", @"81", @"a0", @"d2", @"a5", @"05", @"56", @"ba", @"ad", @"6d", @"7a", @"65", @"a2", @"e8", @"15", @"7a", @"3" ]; 16 | subject = [NibbleBitReverser process:hex]; 17 | } 18 | 19 | -(void)tearDown { 20 | [super tearDown]; 21 | } 22 | 23 | - (void)testItReversesTheBitsInEachByte { 24 | NSArray *expected = @[ @"90", @"4d", @"66", @"66", @"18", @"50", @"b4", @"5a", @"0a", @"a6", @"d5", @"5b", @"6b", @"e5", @"6a", @"54", @"71", @"8a", @"e5", @"c0" ]; 25 | XCTAssertEqualObjects(subject, expected); 26 | } 27 | 28 | @end 29 | -------------------------------------------------------------------------------- /lpc/extra-magic-power.lpc: -------------------------------------------------------------------------------- 1 | ad,cf,85,3d,aa,e3,8e,a1,46,73,a9,5c,32,ba,5a,5c,d5,a3,75,e9,9a,4f,48,8f,c4,a0,80,b2,43,d,d0,f5,a8,2,9a,2a,1,5,b4,ec,c6,80,52,8c,53,9e,32,7a,98,6d,1a,59,6e,14,a6,f1,78,a4,a9,88,87,e6,ec,91,e6,18,5e,ea,8b,46,12,ab,a6,c7,58,6d,51,8a,e1,11,69,3a,c4,39,bb,5b,4c,10,0,d1,79,e9,1a,9e,b5,c5,a0,55,64,aa,47,a,43,30,1c,a6,15,7a,f4,39,6b,70,54,e5,35,d4,e4,c9,91,73,d6,50,73,24,47,cc,59,7d,2d,11,92,39,67,f5,2d,85,b1,d7,ec,d2,d4,20,8e,d1,55,19,90,90,84,2,56,14,1a,79,f3,ea,ac,59,7b,24,25,18,79,54,e7,92,b4,66,62,ea,a9,81,1,b1,7a,20,a0,cb,30,10,40,a,14,2d,2d,a9,2c,c3,7,b7,28,55,2f,d7,c,d3,82,dc,bc,cd,33,6a,73,53,f3,32,af,a8,cd,49,c3,53,bd,a2,36,27,e,4f,f5,9c,d2,dc,30,3c,cc,bd,66,f3,fc,90,72,f1,d9,25,f2,83,2b,c5,9a,94,32,4c,2a,f3,48,de,da,38,28,c2,23,59,1b,d3,a2,48,37,67,ad,4f,93,22,dc,93,3a,37,76,89,4c,8b,a2,bc,d0,a4,52,75,b6,8,43,a7,6c,d5,b6,aa,88,9d,32,55,5b,ab,36,e,f6,16,5b,23,c6,34,31,8b,a3,35,1b,52,63,ed,b0,2c,f 2 | -------------------------------------------------------------------------------- /BlueWizard/TimeMachine.m: -------------------------------------------------------------------------------- 1 | #import "TimeMachine.h" 2 | #import "Buffer.h" 3 | #import "UserSettings.h" 4 | 5 | @implementation TimeMachine 6 | 7 | +(Buffer *)process:(Buffer *)buffer { 8 | UserSettings *userSettings = [UserSettings sharedInstance]; 9 | 10 | float speedScale = [[userSettings speed] floatValue]; 11 | NSUInteger size = ceil(buffer.size / speedScale); 12 | 13 | Buffer *processed = [[Buffer alloc] initWithSize:size sampleRate:buffer.sampleRate]; 14 | 15 | float counter = 0.0f; 16 | float ratio = 1 * speedScale; 17 | for (int i = 0; i < size; i++) { 18 | NSUInteger index = floor(counter); 19 | processed.samples[i] = buffer.samples[index]; 20 | counter += ratio; 21 | } 22 | 23 | [userSettings setStartSample:@0]; 24 | [userSettings setEndSample:[NSNumber numberWithUnsignedInteger:size]]; 25 | return processed; 26 | } 27 | 28 | @end 29 | -------------------------------------------------------------------------------- /lpc/valkrie-death.lpc: -------------------------------------------------------------------------------- 1 | 4d,ae,be,13,bb,93,c,b1,9b,2e,b6,6d,3d,f8,ae,ab,c4,27,ce,e0,86,ae,51,cd,24,83,1d,a6,57,39,9d,c,66,e8,5e,92,6c,32,98,a1,67,50,33,e9,60,86,ee,41,ad,24,83,19,aa,1a,b2,92,c,66,c8,6a,ac,4c,3c,98,21,b3,b0,b3,f1,a0,7,cb,e6,ca,d4,83,6e,b4,4b,b2,da,34,ba,b2,49,ae,da,d2,e8,c2,36,b9,7a,f3,a0,2b,eb,a6,ce,35,83,ce,72,83,b3,d7,c,26,8b,75,e9,5a,da,98,c2,36,b8,6a,6d,63,a,dd,e4,aa,b5,83,ad,64,8a,ba,1a,f,b6,d1,2a,aa,6c,3d,b8,c6,3a,39,aa,f5,e0,1a,eb,e4,a8,c6,83,af,6c,92,32,6b,37,be,88,9,ea,aa,d3,f8,2c,26,a8,ab,4e,e3,33,9b,a2,a9,da,4d,a8,b8,1a,a7,1b,35,a1,e1,18,9c,69,d5,c4,42,ab,b1,a7,71,93,b2,1c,c7,9a,c6,45,ca,72,3,66,6a,17,b9,88,49,d8,49,52,e4,ac,d6,a1,b6,49,51,b2,3e,83,dc,c6,45,2d,62,a,7a,92,24,b5,f0,29,88,49,93,b4,2c,27,c1,d7,6d,d2,b3,da,80,a8,a4,c1,2c,74,1a,a3,ec,4,ab,91,5c,88,76,1c,ec,42,6a,c0,c7,49,b0,2b,ee,21,ed,38,c1,e9,c8,96,b4,ed,4,b7,e0,1e,b2,8e,e3,bc,44,b7,31,26,8e,f3,13,9d,c1,98,a4,21,a8,b4,86,24,9a,88,20,f1,1e,72,9f,fa,0 2 | -------------------------------------------------------------------------------- /lpc/temporary-transportability.lpc: -------------------------------------------------------------------------------- 1 | 2,e8,c9,6d,c4,35,aa,aa,97,c5,11,d6,62,a6,91,91,5b,58,bc,6a,b2,a5,36,89,97,a9,e9,e2,18,4,90,92,69,4a,a2,f3,70,33,25,a9,f1,c5,52,4d,ec,b6,36,24,8d,30,53,d6,5a,5f,38,c2,22,4d,eb,52,c7,c,f7,4e,ad,8f,9d,22,c3,56,95,2e,34,f6,a,6e,9d,5a,5f,d9,cb,64,d3,68,72,22,cb,b4,8d,a3,ae,51,51,23,1b,8d,a6,69,65,f1,8c,e2,ba,d4,c8,d3,3c,d,8,a0,95,54,6,94,5e,de,b2,5c,31,d5,3b,f2,c8,6b,56,73,cd,da,23,ab,a6,58,33,46,8f,a2,8a,62,33,1b,63,6a,2b,82,cb,33,36,3,9a,2a,12,40,41,11,2c,cb,99,3c,b5,2a,9b,bc,66,75,f3,68,c,4,a0,b1,a4,64,7e,ba,58,4a,ab,96,c5,ce,ee,62,ad,47,9a,3b,bb,8b,a5,51,49,4e,ac,26,9e,64,64,29,8a,5a,76,1d,57,47,27,e2,a2,89,55,e3,94,69,b8,3b,42,4d,8,1e,a1,6a,7b,64,d9,aa,59,d8,ed,91,26,e1,9e,e6,b7,5b,1a,54,85,8b,cf,6d,69,54,19,2e,69,b6,65,4e,77,1b,65,94,52,d9,b8,ce,1a,75,5b,17,d5,34,73,2c,69,7d,34,1e,e6,d1,24,d,49,ba,87,c5,ed,32,14,e1,1e,a6,75,ca,d8,98,6a,54,8c,4a,53,61,26,de,5d,c4,4d,85,a8,67,a6,50,33,27,91,e5,22,ce,d4,92,85,96,8b,b9,79 2 | -------------------------------------------------------------------------------- /lpc/exits-may-move-around.lpc: -------------------------------------------------------------------------------- 1 | 23,af,c1,4c,2b,a6,8c,a8,5a,57,af,98,33,fc,96,44,c3,ba,71,cb,7a,36,75,d7,26,20,80,d2,94,5,30,45,cb,c8,af,72,97,c8,34,23,1e,a2,d9,23,1a,8f,b6,5a,b6,b4,89,dd,9a,68,9d,ab,6a,4c,6a,a3,a,ce,e8,33,66,2b,ce,40,2d,9c,10,a0,f1,42,2,74,1e,c2,80,85,2c,4b,bb,99,9a,a5,a7,76,53,d2,ce,91,d5,c8,4c,41,5,67,d6,28,37,71,63,de,1e,b1,da,90,a3,a8,44,cc,1a,43,49,a2,92,39,6b,c,35,89,70,67,ad,31,f4,60,42,96,b3,db,50,3c,9b,59,d6,4e,bd,b5,e2,69,d1,24,74,c2,6a,a4,79,93,d4,8,ab,91,e6,b5,5a,e3,9d,a4,b9,da,69,b5,b7,1a,11,ec,b4,b5,51,6b,84,b3,bc,32,24,23,9e,26,72,43,97,a5,aa,a9,db,29,63,28,ae,2e,92,a6,75,a1,b1,87,78,97,d2,f9,46,95,62,59,52,67,27,46,ab,a7,49,ad,1b,2c,ad,e1,b4,d5,a1,8b,b4,5a,b3,51,c5,aa,69,56,8b,46,11,9b,69,7b,55,19,79,6e,92,92,6d,7b,94,a9,ab,a5,b5,95,d1,a6,e6,62,59,96,db,90,86,a9,54,59,2d,73,6c,a6,52,29,2b,cd,b1,6a,9a,fb,2a,53,a4,12,e6,19,b5,4d,91,ab,b9,79,46,56,65,6e,6a,ee,25,45,b4,a9,99,58,a6,65,b5,a4,e6,2a,59,96,c9,1e,5c,28,79,5a,42,80,f1,69,f 2 | -------------------------------------------------------------------------------- /lpc/extra-fight-power.lpc: -------------------------------------------------------------------------------- 1 | 23,19,d9,8b,dd,96,ae,b8,27,f,71,9f,3b,a2,56,53,24,75,a9,b,5a,15,b6,8c,9a,e,a8,dd,2d,0,cd,a7,28,60,9b,51,50,40,d,12,23,ea,b5,4c,cd,d2,b4,20,77,72,35,6d,d2,fc,98,45,23,e5,d1,8,52,8,cb,90,45,23,4c,be,d4,ca,16,8d,38,5,8f,b0,1c,ad,80,64,5d,5,90,ad,99,0,82,55,35,41,e,21,66,9e,d4,f9,d9,b9,45,5a,bd,10,66,57,e6,61,ab,9,90,5d,f8,70,93,9f,74,93,45,c3,cd,b1,c2,3d,e6,c,a7,44,f3,c8,9a,3a,ec,96,58,23,27,ea,70,9a,62,9a,ee,38,c5,1e,91,28,73,63,1,1,92,9f,70,4e,8e,95,ee,3e,c7,b8,25,79,78,d4,54,67,b7,28,92,d1,55,99,d3,14,49,77,db,11,40,d1,e6,a,70,42,62,e4,39,4e,a6,64,95,56,c6,96,a9,d9,55,46,51,5c,b5,b9,2d,19,55,31,d5,1e,ba,64,34,d9,4c,7b,f0,9a,d6,86,3c,15,ae,ab,5b,1b,52,54,1b,37,69,5d,28,e1,65,d4,a4,d,b1,a4,56,61,db,36,a4,1a,9a,69,f6,db,98,5a,98,97,da,6b,53,ae,29,3a,12,af,cd,b9,85,d8,52,d2,b2,a4,6e,e2,43,4d,42,97,16,6b,16,af,e,43,be,14,a9,b2,c5,ad,f9,8a,b7,f2,1c,b7,e7,25,d6,4e,4d,dc,54,26,5b,6,37,51,73,6c,58,ed,3a,5a,2c,a1,51,95,6b,65,b2,85,86,d9,61,b1,1f 2 | -------------------------------------------------------------------------------- /lpc/needs-food-badly.lpc: -------------------------------------------------------------------------------- 1 | aa,e,5c,2a,cd,63,9b,39,28,29,b3,b2,9c,c6,a6,d0,32,ad,72,1b,67,14,23,f3,c7,6d,5a,49,1d,c5,9e,8c,79,27,33,64,5d,33,e6,15,c3,81,74,cd,98,57,74,43,92,37,66,ab,9c,45,2d,67,21,0,84,6c,5,4,61,61,80,4a,d5,c,d0,ad,29,3,a,65,67,40,a6,ec,4,48,5c,cc,e4,c5,b8,b9,99,93,90,fb,a4,61,9c,ab,5b,16,7c,58,b0,77,29,51,f0,e1,ce,d6,a5,4,ce,87,7,7b,e6,12,38,5f,12,14,9d,4a,ec,d5,58,aa,64,2a,99,b7,a5,89,da,39,15,4e,b5,15,4b,a7,54,5b,9b,56,a4,9d,53,e3,65,6b,b1,b6,49,43,e4,29,c3,92,26,4c,d1,8b,14,7b,6a,33,7b,57,9a,e4,a9,c3,56,8d,9b,45,48,31,79,34,aa,19,29,d5,94,41,79,a4,85,15,55,7,63,56,e1,b6,45,eb,45,59,9a,b9,1,0,0,37,55,ef,6e,6c,b1,5b,9b,2b,b9,77,ce,1d,6d,49,1a,52,39,67,54,b5,78,72,c6,dc,91,97,64,a1,55,4b,46,5a,b2,a5,56,d5,19,51,c9,9a,3a,5d,67,84,29,49,c6,54,9c,11,e6,24,21,d7,b6,53,92,bd,ba,7a,35,86,56,d5,e4,21,1e,31,47,5d,7c,a8,5b,46,1c,6d,f1,21,61,15,69,75,c5,9b,8b,6d,e4,31,94,c4,1a,dd,51,da,54,22,8b,76,d5,4b,4b,d1,14,36,5b,25,6d,cd,b0,68,f5,54,73,14,49,16,d9,71,1f 2 | -------------------------------------------------------------------------------- /lpc/elf-death.lpc: -------------------------------------------------------------------------------- 1 | 43,19,7c,2,7b,93,d,79,d1,2c,ae,49,3a,a4,c5,b3,38,26,ee,90,96,e8,a2,18,bb,43,ea,72,1d,bb,dd,c,a9,e9,31,da,f0,34,a4,aa,db,78,dd,f5,90,9b,1c,e3,d,27,43,69,bc,83,36,93,e,b5,c8,31,bd,72,3b,d4,2c,c7,ec,33,ed,d0,a,9f,90,ef,a4,43,cf,62,4c,bf,9d,c,bd,c8,51,fe,4d,3a,8d,61,17,b9,4a,3b,6e,87,53,f9,1a,6d,3b,1d,4e,27,9d,38,e3,74,b8,8d,4e,e0,b6,93,e1,36,36,8e,33,4e,86,d7,d8,4,ce,b8,1e,7e,c7,dd,34,ed,66,f8,15,4f,ea,b6,e3,11,54,36,4e,b7,4e,46,58,e9,38,dd,26,1d,51,25,13,b4,9b,74,44,8d,76,c2,6e,d2,91,c,36,5,31,4d,47,f6,a4,b6,72,d5,19,f9,15,39,82,51,77,e4,57,c4,38,c4,dc,51,5c,65,1d,90,73,47,79,94,8f,63,36,19,d5,91,be,a,dd,74,54,47,e9,18,54,93,51,5d,65,63,d0,4d,46,75,95,8e,41,37,19,f5,33,d2,9,d5,64,d4,cf,c8,4,56,e3,d1,3c,23,13,98,4d,47,f3,8c,8c,63,2e,69,ed,93,3c,41,d5,64,b4,4f,c9,4,64,d3,d1,3c,a9,e3,58,4d,46,73,99,8f,e2,d4,69,cd,21,3e,82,53,a7,35,1b,e7,30,6d,9d,56,6f,14,a3,bc,71,5a,d5,e0,8c,f8,da,49,55,92,27,b2,ad,24,d5,95,4e,c2,94,e3,d4,74,d2,89,d9,8a,5d,db,d8,14,66,29,7e 2 | -------------------------------------------------------------------------------- /lpc/limited-invisibility.lpc: -------------------------------------------------------------------------------- 1 | aa,d7,71,d8,a2,62,9b,c6,96,c0,a8,b2,9d,f2,68,9a,d5,3b,ce,8,53,8,b1,98,a8,23,c8,2e,c4,a2,26,7,cf,5b,49,e7,aa,5d,dc,e8,c5,c4,a2,ce,f0,8a,33,35,ef,22,ce,4b,c6,34,6a,4c,3,3,9a,2c,2d,6e,65,a1,ae,59,b9,b9,c5,88,49,6d,d8,e6,15,2d,66,b1,65,86,57,a4,aa,fb,94,56,7e,d0,26,51,6d,18,85,56,86,67,97,a8,90,36,9d,a6,6a,56,4c,90,d,a9,cf,59,75,6e,36,62,5a,1b,35,78,59,8b,59,6e,99,56,35,a3,ec,d1,95,47,d1,75,90,66,8d,a,55,14,14,e5,59,26,34,51,60,57,a8,95,d6,b4,28,4e,a6,4d,4c,9e,b5,88,98,a6,15,79,d6,22,e6,9a,66,e4,25,99,b2,7b,e3,91,16,2b,a6,51,ab,47,5c,ac,9a,da,ce,6e,61,d5,21,c6,55,a6,84,4b,85,a8,48,e2,e6,56,59,ac,56,95,86,93,bc,89,e5,94,29,5e,ca,ac,1a,39,5,25,c5,8a,a9,e7,a2,e6,e5,a0,a6,9a,4d,86,97,bc,b9,79,8e,19,5e,34,19,a6,5d,a5,f9,3e,b5,98,4f,94,12,46,93,ea,1e,66,53,6a,e3,70,86,5b,6b,85,f7,1d,22,53,bb,74,59,46,19,d5,62,4,44,67,5e,fa,ac,3d,55,2b,ee,18,ba,71,31,a9,d9,ad,af,5e,59,72,eb,b4,a9,1b,15,f6,a9,55,96,a6,c5,ac,4b,4a,59,ab,34,b7,52,e5,61,ef,46,94,d3,a3,3e 2 | -------------------------------------------------------------------------------- /lpc/temporary-repulsiveness.lpc: -------------------------------------------------------------------------------- 1 | c,58,32,bd,74,dd,a4,aa,57,9d,16,8f,a0,ea,1a,95,5b,50,3c,7b,64,99,1a,5e,89,1c,da,55,d9,5,c1,89,87,58,22,60,40,74,ee,21,cc,c1,2d,44,e4,a4,da,97,48,61,57,96,7a,17,b5,cc,54,69,1b,a2,93,b2,30,a9,69,f4,95,3a,cc,33,a5,39,d,ec,30,5f,95,d6,34,b0,c3,72,75,5a,d3,c2,a8,d4,4d,61,89,b,bd,43,ba,84,d9,f,f4,9,e9,92,46,df,28,26,ac,73,e9,4b,43,73,d7,cd,a3,2d,56,d8,26,13,8f,ba,39,23,8a,8a,33,ea,16,8d,c4,3d,71,69,73,24,4d,d5,96,6e,88,95,dd,d8,62,9b,ce,57,36,27,4f,54,aa,9c,d1,4c,79,75,2b,6b,11,a2,f0,ae,a5,2a,41,48,dc,d3,ba,aa,5,23,f2,6c,d,4,8,81,35,44,59,b4,15,71,a2,16,fa,56,ae,1a,75,87,1f,cc,a6,b9,44,1f,5e,e4,37,e2,1a,b5,5,51,5c,8b,c8,e2,94,4d,62,11,6e,8e,18,d0,51,6,3,3a,74,2f,cd,40,31,ee,e6,b8,b5,51,97,9b,c6,a8,32,27,d6,49,1d,91,c2,14,c5,35,8b,36,36,4b,26,a1,62,1e,cb,cd,8d,1a,5b,6b,6d,b7,24,94,aa,15,35,cb,52,45,8a,68,c5,6a,7b,61,9e,96,59,a9,4c,c5,9a,99,6f,e5,30,d6,52,a2,5a,71,18,d0,a1,3a,1,2e,23,23,c0,80,94,4,68,50,13,1,5,46,21,a0,a0,4e,4,14,14,8a,80,82,52,1f 2 | -------------------------------------------------------------------------------- /lpc/looks-like-you-lose.lpc: -------------------------------------------------------------------------------- 1 | 61,19,1,4a,d9,f3,96,a9,6a,2e,45,eb,da,ba,62,ac,5c,bc,5b,6b,92,b1,a,93,ad,ad,a9,4a,b3,8c,b5,b9,3a,59,2d,13,4d,3,2,c8,a3,51,1,d5,96,29,a0,cb,31,5,74,11,82,1,d7,39,5b,5e,24,6d,4b,e7,dc,24,73,d4,69,6d,52,b9,c2,d1,b8,b5,55,e9,a9,db,9a,d6,36,63,6b,6e,ab,5b,db,6c,b4,84,2d,6b,4d,8d,e1,e2,39,37,34,23,a4,30,c7,52,2,44,c6,a9,da,24,b3,9d,dc,ae,6b,ab,d2,33,b7,d6,a1,6d,da,36,d4,db,10,20,10,e9,54,76,17,2e,a2,49,5a,d9,8a,13,6b,b4,6b,79,8d,ca,a6,96,ad,65,d9,4,bb,68,ba,92,24,59,e2,8e,ed,52,e2,6d,b8,8b,37,49,69,cc,26,ea,16,b7,65,59,a4,49,50,ba,96,55,6c,ae,cd,69,5a,5c,94,9b,2b,d5,69,61,56,a1,e6,b2,b8,f9,49,bb,78,e8,92,e6,25,e3,12,a1,4b,9b,97,8c,4b,b8,2c,6d,5e,b2,a6,a1,ba,ae,f9,d1,8b,7,5b,b7,16,44,a7,11,aa,ed,5a,18,9d,46,1a,b7,6b,49,8,ee,26,dc,b6,a5,d1,67,aa,62,b2,96,5,e3,19,ca,c9,5a,1e,ac,47,1a,a5,6d,79,70,16,a6,9a,b6,e5,d1,59,98,69,d3,52,64,ed,26,66,4d,53,dd,b9,8b,7,a7,61,40,63,19,26,1b,cc,ad,82,6d,9b,6c,13,73,4d,93,a3,b2,c9,cc,35,d9,35,cb,33,4b,75,53,b7,8,a8,54,e4,1 2 | -------------------------------------------------------------------------------- /BlueWizard/HexByteBinaryEncoder.m: -------------------------------------------------------------------------------- 1 | #import "HexByteBinaryEncoder.h" 2 | #import "BitHelpers.h" 3 | 4 | @implementation HexByteBinaryEncoder 5 | 6 | +(NSArray *)process:(NSArray *)nibbles { 7 | NSMutableArray *binary = [NSMutableArray arrayWithCapacity:[nibbles count] * 2]; 8 | for (NSString *nibble in nibbles) { 9 | NSString *leftByte = [nibble substringToIndex:1]; 10 | NSString *rightByte = [nibble substringFromIndex:1]; 11 | 12 | if (!rightByte) { 13 | [binary addObject:@"0000"]; 14 | [binary addObject:[self binaryForByte:leftByte]]; 15 | } else { 16 | [binary addObject:[self binaryForByte:leftByte]]; 17 | [binary addObject:[self binaryForByte:rightByte]]; 18 | } 19 | } 20 | return binary; 21 | } 22 | 23 | +(NSString *)binaryForByte:(NSString *)byte { 24 | NSUInteger value = [BitHelpers byteToValue:byte]; 25 | return [BitHelpers valueToBinary:value bits:4]; 26 | } 27 | 28 | @end 29 | -------------------------------------------------------------------------------- /lpc/this-treasure-chest-is-locked.lpc: -------------------------------------------------------------------------------- 1 | 61,4c,dc,94,43,13,b7,26,49,53,cd,8c,3d,ca,ae,c5,d8,7c,d5,28,86,52,31,b5,35,a3,6c,3a,59,39,e6,2a,60,c9,30,1,3c,53,a5,80,c3,5c,25,40,80,ab,45,41,1,43,ab,a,a0,b5,b1,91,5,13,5c,e9,ad,47,56,32,4b,a8,af,1e,59,2d,2c,ae,b5,78,24,ad,90,b8,cd,a2,11,b7,ca,22,96,ad,47,d6,2,b1,5a,35,36,40,6f,13,ad,6e,35,41,d9,92,8c,36,57,74,b7,6a,3d,fa,1c,c9,c2,aa,c9,98,4a,20,d,ad,24,6d,6f,85,59,24,5b,87,a3,6,62,f5,6a,24,80,d1,a7,14,30,c6,66,eb,6a,64,53,f3,d4,63,ad,91,dc,2a,5b,8d,a1,39,4a,5d,5f,35,86,62,25,65,72,d6,98,b2,93,b0,aa,44,63,28,da,3c,34,67,8f,b1,19,d3,50,4b,2c,80,6b,23,15,d0,91,6,38,a0,a9,94,d1,c,11,c6,66,ad,46,53,55,88,b1,3d,1a,4d,91,c9,a6,be,78,b4,83,78,b0,7a,eb,36,be,e0,ee,ca,52,da,72,7d,b8,a9,49,1e,4d,16,19,a1,ec,b4,d4,4e,6f,2a,c9,e2,56,79,3d,11,e2,41,5a,e5,dd,a7,a8,d6,69,59,88,67,6c,31,bb,a5,21,af,ab,54,ed,96,c5,de,a1,56,71,10,10,ae,aa,1,62,cf,10,40,4a,e5,c,48,31,2d,65,d9,8e,9b,47,22,97,c6,70,6e,12,75,4c,16,f3,84,4b,d5,56,55,ac,63,6e,5d,47,cd,b1,56,ba,4c,1c,2,34,6a,4e,80,c5,2c,10,50,78,e8,3 2 | -------------------------------------------------------------------------------- /lpc/find-the-hidden-potion.lpc: -------------------------------------------------------------------------------- 1 | 8,a8,2e,83,0,2d,44,10,a0,c5,f4,50,5,9f,a5,1a,4e,53,e5,77,98,d4,5a,69,55,8c,35,50,9d,78,54,c5,c4,8a,74,93,51,35,ad,93,1c,4d,46,59,75,b4,4b,d6,19,45,31,19,9a,59,67,14,c5,58,58,65,e5,91,b7,e0,c6,e1,b3,47,de,b2,aa,44,4e,19,79,f,ca,e2,55,65,64,c3,9,5b,44,d8,91,34,63,e2,ee,61,5b,9c,ad,b9,a9,c7,6a,71,31,6a,ee,51,ab,e5,d5,89,69,f8,a4,52,d4,c0,ca,19,65,42,de,bd,b0,44,56,19,45,f5,a1,4a,51,77,d4,45,97,b8,f6,9d,d1,d6,a0,a1,32,4d,c6,d0,b5,68,59,d5,6e,73,f,ae,ea,1d,32,2d,cb,ba,a8,79,14,2,74,81,c1,80,21,45,47,5e,b5,a9,59,a4,1d,49,8f,2a,e4,d5,64,c4,c5,88,78,4e,95,96,64,23,ea,d9,91,55,96,85,aa,78,47,72,51,e4,96,61,29,3b,5,5e,69,ab,a5,e5,10,58,6d,e5,1e,76,52,18,15,65,74,88,49,51,52,62,95,65,d8,25,25,a8,68,74,14,0,2,10,5d,52,a2,10,26,d8,6d,72,8b,83,ed,32,d1,45,25,76,a1,8b,d5,16,b5,d8,bb,6c,61,db,d2,d2,68,bd,59,ac,73,ca,83,33,57,8d,d6,2,68,bd,5a,0,7d,4c,9,a0,8f,8a,52,d5,c8,a6,19,4d,5a,53,d,9b,45,34,6d,43,53,61,14,31,3b,4c,25,b0,88,79,dc,30,d7,a2,c2,6a,49,dd,9a,23,9b,79,d8,36,7b,76,ec,96,19,9b,1d,d9,b0,6b,55,e3,7 2 | -------------------------------------------------------------------------------- /lpc/that-was-a-heroic-effort.lpc: -------------------------------------------------------------------------------- 1 | a2,8c,ca,d4,c3,6c,a7,3c,5a,73,ab,aa,3c,f2,ec,2d,a4,ea,f2,28,8b,f7,94,ca,2b,23,2f,21,8a,2b,6f,8f,24,fb,4c,ad,6a,34,fc,18,43,bb,db,ce,f0,8b,37,53,5f,27,c0,80,ec,34,52,59,bc,a7,54,5e,49,71,f1,51,5c,71,b9,c4,d9,47,70,45,c8,94,f8,18,56,1e,52,5a,16,92,97,a8,67,1e,79,48,96,66,b5,78,94,c1,87,66,56,e3,d6,14,e3,2e,1c,9b,4,10,51,88,0,22,2e,6d,55,f2,6e,aa,5d,7b,d4,29,86,89,77,e3,d1,26,1f,61,56,6d,46,9f,b2,27,57,36,6a,63,b6,5e,6e,11,b3,75,29,66,86,46,ac,d6,a6,1c,69,92,b6,5a,1d,9b,15,7b,36,6a,75,c8,9a,e6,de,b9,d5,be,a8,7b,86,d7,54,87,2a,21,e1,4a,53,15,6,b9,bb,7a,2b,55,c8,94,2d,d1,76,d4,31,59,9a,65,9b,d1,44,9b,19,62,4b,47,1b,6d,74,88,ad,19,5d,70,d1,c1,b6,75,74,c9,66,6,4b,b7,d1,25,17,69,ac,5b,47,9f,bd,87,99,6d,1e,43,b1,6a,9a,da,39,35,c9,7a,94,ea,52,d6,46,17,1d,e2,5b,4,90,ac,26,5,ca,94,83,ba,4d,4d,19,5d,d,1e,92,7e,65,74,25,5a,72,c5,94,31,94,6c,29,16,8d,43,9f,ad,99,bb,37,66,40,91,ae,2,a8,26,ad,b4,b5,ba,85,a8,d3,d2,c6,22,66,6d,f5,4a,93,3a,6b,a4,35,2b,65,6a,a4,99,be,26,25,b9,42,a6,e7,22,17,d7,28,ac,11,6d,80,0,c5,87,33,20,a8,52,4,f8,8c,f3,0 2 | -------------------------------------------------------------------------------- /lpc/has-eaten-all-the-food-lately.lpc: -------------------------------------------------------------------------------- 1 | 8,a8,d5,bc,14,35,ba,87,7b,e9,16,e7,62,ee,d1,55,5b,54,a2,4b,c4,4c,6d,71,b5,2e,ee,35,a5,e4,4d,6,9b,c6,e4,52,2d,97,aa,82,4e,5a,d2,62,8a,a2,57,6e,5e,8f,46,2c,3d,b7,d9,d3,38,89,65,94,66,76,ee,6c,e1,51,92,31,94,91,99,a7,1,4,30,5e,e9,c2,c4,8d,d3,2b,52,9,b2,62,cb,28,b3,2d,2a,52,bc,2d,22,b7,38,29,f1,d2,8c,d3,e2,6c,c5,43,2b,76,cb,92,c9,c,f1,56,25,4d,fa,da,45,3b,95,24,ea,6b,13,6b,5d,a2,e0,ae,5c,ac,69,9,7d,f8,30,c9,ba,29,e,ee,dc,29,e3,a4,34,ab,b6,14,af,55,a2,2c,3b,42,dc,76,89,a2,ea,70,f1,d9,29,8e,aa,d3,59,6f,97,38,9a,ad,30,8b,13,a2,68,3b,2a,c3,36,2,8a,72,47,40,f1,a1,4,c8,ce,d5,38,26,bb,99,55,ad,64,3a,ef,69,e2,b5,93,e5,bc,a7,89,cf,e,ae,f1,11,2e,be,38,f8,c6,97,9b,da,a2,10,9b,e8,a1,92,b5,43,e6,a3,aa,49,36,e,75,8a,aa,26,de,18,d5,99,9b,3a,7b,ed,d6,6d,14,2e,46,ad,da,70,60,26,2b,ed,6e,c3,60,19,29,bc,a4,8d,5d,97,3b,d9,d2,36,b5,d0,22,94,4b,da,34,62,a9,60,ac,69,f3,48,29,42,d1,1a,8,90,50,59,e8,6,a9,70,c1,25,6d,ec,3c,cd,59,67,b7,a9,cb,52,13,9b,da,96,6e,53,9d,7d,59,5b,9b,33,51,e9,35,6d,6d,de,98,ad,57,97,ad,6b,56,c9,9a,95,f6,ee,55,d0,ab,8e,bd,1e 2 | -------------------------------------------------------------------------------- /lpc/all-your-powers-will-be-lost.lpc: -------------------------------------------------------------------------------- 1 | 69,8c,36,16,c3,17,a7,3e,9a,38,74,9f,5d,ba,a4,fc,44,ad,75,69,8a,94,73,95,d6,ad,a9,52,db,54,b7,8c,ba,c8,70,8e,5c,d5,ea,26,55,29,62,f5,28,bb,36,a1,c8,46,2d,af,c1,48,2a,33,b7,2c,6,a3,8e,4a,d3,b2,94,d5,4a,ad,4b,cb,62,76,f3,b0,6c,c0,0,19,22,4,10,a5,7b,ca,73,50,4f,b3,88,29,cb,de,2d,c4,cb,94,28,75,4b,f5,b6,db,c2,d8,c3,32,aa,6c,8b,52,69,f1,8c,29,2d,8a,ad,24,32,26,b7,28,8c,d4,cc,98,dc,e2,d0,3d,52,62,51,8b,43,d3,68,91,d5,25,9,8d,a3,45,da,94,34,4e,f2,12,6b,5a,d2,34,c9,5b,6c,75,cb,62,a3,28,f5,26,2d,8b,8d,a2,a4,6a,8f,2c,f9,a4,b4,68,d2,f2,e4,cd,d4,3a,6a,a9,2b,ab,30,d7,d8,2,c8,ba,3d,34,a9,b8,5a,a8,53,97,fb,c2,51,a1,49,4a,e6,a2,87,85,b5,19,69,d2,16,29,b6,a6,a5,49,67,6,db,22,94,47,1a,ae,a6,ad,4b,da,bc,9b,b8,64,1a,49,33,ce,ec,b9,aa,25,cd,3a,51,d4,a2,91,34,e7,cc,96,b3,47,da,98,9b,aa,b7,1e,49,c5,a3,98,d9,68,c4,95,ac,b1,fb,a2,11,25,bd,6e,92,b3,46,18,dd,b9,69,2c,1e,61,88,eb,ae,31,a7,85,a1,4c,b8,d4,9c,16,87,da,ee,da,93,5b,1a,46,69,d8,54,69,79,18,69,e1,53,bb,15,b1,94,bb,d7,6c,2,b8,e1,46,80,68,37,18,10,ed,5,1,a2,bb,60,40,52,ef,4,48,e6,1c,8,10,b5,1b,2,2a,31,79 2 | -------------------------------------------------------------------------------- /lpc/some-walls-are-invisible.lpc: -------------------------------------------------------------------------------- 1 | 8,d8,cc,8d,0,57,79,10,60,4b,f7,94,26,99,e1,6a,8b,46,9a,d4,84,84,ad,1e,51,36,9b,62,d6,78,f8,d1,6c,92,59,ab,e4,6,93,66,e8,51,93,17,44,8b,b3,d8,9,41,22,e5,45,64,db,65,4e,a6,7,5b,ec,d4,6,dd,2e,ee,d,cb,18,f4,1a,a7,57,4a,8b,73,13,1c,d1,28,6c,d6,7f,b3,b8,a3,b0,d8,f0,cd,ea,a9,d2,64,e3,37,ab,a7,e,bd,8f,df,a4,99,2a,1c,2e,5d,b3,fa,2c,b7,da,7e,c5,12,b3,dd,62,eb,35,73,cc,76,9b,a9,1f,6c,1e,c7,4d,b6,7e,a2,79,d3,30,4,f9,43,ac,4d,42,15,c9,2f,b3,36,9,69,c0,b7,64,1a,bb,64,19,f6,b8,52,e2,54,4f,e0,65,1e,94,8,30,50,14,1,9c,78,47,0,af,2f,2a,8d,78,cb,4b,23,85,3e,a4,d,f1,f4,9c,fa,90,27,71,ad,71,e9,c3,f0,f0,e6,95,a5,f1,93,a3,c2,72,96,3a,c,f2,72,f3,92,ca,d8,99,47,b5,ed,c8,72,25,37,b5,4e,23,2e,49,d5,cc,3b,8f,a8,7a,b,e6,70,14,a2,a8,a5,8c,c2,76,8c,42,e2,b3,a9,59,5a,36,a5,af,a4,e5,e6,44,d5,be,32,47,9a,93,d4,e5,e8,6a,ac,49,47,56,82,aa,a8,ae,1a,41,f1,26,6c,b6,3a,79,da,59,5b,6d,95,e0,44,5a,96,11,33,19,70,95,58,8,bf,11,13,12,39,c9,cf,b8,55,23,63,8d,30,eb,32,91,58,5c,b2,e0,dc,55,bd,31,b8,ce,eb,72,23,af,1c,3a,a7,b6,45,bd,55,e8,83,dc,76,b6,d6,6e,f0,6a,c6,d9,1a,bb,31,eb,32,d5,ac,cd,a6,a8,db,c5,7d,d1,3 2 | -------------------------------------------------------------------------------- /BlueWizard/PreEmphasizer.m: -------------------------------------------------------------------------------- 1 | #import "PreEmphasizer.h" 2 | #import "Buffer.h" 3 | #import "UserSettings.h" 4 | 5 | @implementation PreEmphasizer 6 | 7 | +(void)processBuffer:(Buffer *)buffer { 8 | double preEnergy = [buffer energy]; 9 | 10 | double alpha = [self alpha]; 11 | double unmodifiedPreviousSample = buffer.samples[0]; 12 | double tempSample; 13 | for (int i = 1; i < buffer.size; i++) { 14 | tempSample = buffer.samples[i]; 15 | buffer.samples[i] += (alpha * unmodifiedPreviousSample); 16 | unmodifiedPreviousSample = tempSample; 17 | } 18 | 19 | [self scaleBuffer:buffer preEnergy:preEnergy postEnergy:[buffer energy]]; 20 | } 21 | 22 | +(float)alpha { 23 | return [[[UserSettings sharedInstance] preEmphasisAlpha] floatValue]; 24 | } 25 | 26 | +(void)scaleBuffer:(Buffer *)buffer preEnergy:(double)preEnergy postEnergy:(double)postEnergy { 27 | double scale = sqrt(preEnergy / postEnergy); 28 | 29 | for (int i = 0; i < buffer.size; i++) { 30 | buffer.samples[i] *= scale; 31 | } 32 | } 33 | 34 | @end 35 | -------------------------------------------------------------------------------- /license.txt: -------------------------------------------------------------------------------- 1 | Copyright 2015-2017 Patrick J. Collins / Collinator Studios Inc. 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 4 | 5 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 6 | 7 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 8 | -------------------------------------------------------------------------------- /BlueWizardTests/HexConverterTests.m: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | #import "HexConverter.h" 4 | 5 | @interface HexConverterTests : XCTestCase 6 | 7 | @end 8 | 9 | @implementation HexConverterTests { 10 | NSArray *subject; 11 | } 12 | 13 | -(void)setUp { 14 | [super setUp]; 15 | NSArray *binary = @[ @"1001", @"0000", @"0010", @"1011", @"0110", @"0110", @"0110", @"0110", @"1000", @"0001", @"1010", @"0000", @"1101", @"0010", @"1010", @"0101", @"0000", @"0101", @"0101", @"0110", @"1011", @"1010", @"1010", @"1101", @"0110", @"1101", @"0111", @"1010", @"0110", @"0101", @"1010", @"0010", @"1110", @"1000", @"0001", @"0101", @"0111", @"1010", @"0011", @"0000" ]; 16 | subject = [HexConverter process:binary];; 17 | } 18 | 19 | -(void)tearDown { 20 | [super tearDown]; 21 | } 22 | 23 | - (void)testItConvertsBinaryNibblesToHex { 24 | NSArray *expected = @[ @"90", @"2b", @"66", @"66", @"81", @"a0", @"d2", @"a5", @"05", @"56", @"ba", @"ad", @"6d", @"7a", @"65", @"a2", @"e8", @"15", @"7a", @"30" ]; 25 | XCTAssertEqualObjects(subject, expected); 26 | } 27 | 28 | @end 29 | -------------------------------------------------------------------------------- /lpc/you-have-found-my-treasure.lpc: -------------------------------------------------------------------------------- 1 | a2,2b,98,3a,2b,62,87,b6,18,52,ee,5c,dc,8a,92,49,39,75,53,ca,42,e0,54,8d,8d,2e,b3,5d,24,a2,1a,b,c0,15,c9,16,c5,22,ee,31,b1,47,98,b2,ba,fb,4e,1e,61,c8,c9,53,5d,78,24,21,25,f5,54,e5,92,7,1b,11,dc,53,42,96,7c,98,92,d7,d,49,74,e1,e6,99,34,c4,39,b8,a9,45,93,14,66,6f,e1,91,8d,43,18,43,6a,54,d7,e,71,f4,69,11,9d,26,24,45,bb,25,67,5c,2,f8,e9,51,fa,58,b2,31,a6,ce,e8,8b,8d,71,f6,26,a3,2b,3a,3b,59,e7,8e,36,cb,a9,10,7d,3c,9a,2c,af,4c,6c,d5,a8,a2,de,54,b2,45,ad,8,76,42,39,1a,97,3c,84,48,d2,72,5c,b2,94,3c,90,d3,49,c9,b2,f1,14,b4,2a,29,4f,b2,c2,58,26,a7,32,89,71,61,99,15,aa,60,da,94,25,49,29,bc,c9,2c,96,c6,a3,ca,a2,ab,44,56,8f,aa,e8,ca,e0,68,3c,aa,6a,23,4c,a3,d5,a8,6a,30,d3,c8,d5,a3,aa,4e,44,b3,17,a7,a6,46,16,8a,ae,84,2a,d0,3a,5d,34,b6,0,7a,90,14,40,f7,e6,c,c8,41,3c,55,25,a4,a9,59,9d,12,fb,28,91,15,69,5b,18,13,55,44,2e,1a,71,4e,a2,11,39,6b,c4,39,b0,46,f6,e2,91,d4,c0,62,d9,ab,47,de,bc,8,67,2d,69,75,b,a2,a8,b1,44,0,23,b,97,a5,7a,51,8b,4a,9a,86,14,d8,3c,a3,51,19,72,41,8b,c8,a6,65,ce,99,d5,d2,d3,a5,25,47,55,9,6f,96,b6,14,c4,a4,2a,59,58,53,65,b3,cc,a4,66,49,5e,cd,23,db,b8,23,77,56,77,4b,43,56,9b,a1,da,22,c6,3 2 | -------------------------------------------------------------------------------- /lpc/times-on-my-side.lpc: -------------------------------------------------------------------------------- 1 | 4,98,3c,d,1,c5,86,b7,b8,f8,c,8b,ac,33,c2,62,36,2c,62,f6,8,8a,da,f4,f0,d9,23,2c,66,d2,c3,27,8f,a8,b8,9,b,9f,32,e2,e6,37,cd,6d,f6,48,5a,1a,57,b3,39,23,ed,a5,5c,d4,9b,8c,b4,67,53,b5,8c,32,d2,91,9c,4d,32,ea,c8,9a,37,33,89,a8,23,ab,be,5c,54,2b,8f,ac,c5,50,51,ab,32,f2,e6,4d,d8,a3,76,ab,7a,54,11,cd,38,ad,e9,21,d8,c4,eb,b4,ae,eb,60,17,6f,d2,8a,14,cd,d5,ba,6e,ab,92,ad,c,8e,a9,ad,ca,7a,32,44,e7,b4,ba,e8,ae,12,99,d3,aa,6c,a7,5c,74,4a,ab,8b,ef,34,d1,3a,ad,ae,c9,8a,c9,9c,b6,a6,64,f,e2,b4,d3,9a,a2,25,9c,3d,6a,69,8a,d2,8,92,b0,a5,cd,46,23,88,eb,94,26,1b,37,25,9e,53,aa,6c,3d,8d,6d,4e,ab,b3,8b,31,c9,26,ad,2e,36,27,c4,eb,b4,ba,d8,18,37,ab,d3,ea,ea,72,dc,ad,4e,6b,aa,cb,76,f3,25,ad,ad,3e,cb,dc,d7,b4,b6,87,74,73,5b,d3,ba,11,d2,44,6d,4e,eb,a6,2b,63,95,c9,ad,6d,ae,5c,d4,2b,97,a6,e9,ae,54,6f,9c,da,66,27,43,7d,89,0,86,69,67,c0,f4,ed,c,58,ae,83,1,5d,85,a4,3e,56,75,a9,b1,53,86,14,bd,71,26,55,99,72,8c,e6,e8,ba,65,4e,25,8a,aa,13,97,a5,78,1f,ce,6c,52,96,9c,bd,68,aa,71,59,73,f3,e4,9e,54,69,4b,4d,dd,b6,92,a4,ad,54,77,9a,98,93,b6,9c,34,a5,2b,6a,da,8b,d1,d6,f0,29,69,2f,51,42,3a,ed,84,bd,3a,4d,aa,a8,a,ec,28,4e,5c,6a,aa,a0,23,69,b1,e8,9d,fc,0 2 | -------------------------------------------------------------------------------- /BlueWizardTests/ClosestValueFinderTests.m: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | #import "ClosestValueFinder.h" 4 | #import "CodingTable.h" 5 | 6 | @interface ClosestValueFinderTests : XCTestCase 7 | 8 | @end 9 | 10 | @implementation ClosestValueFinderTests { 11 | NSNumber *subject; 12 | NSInteger subj; 13 | } 14 | 15 | -(void)setUp { 16 | [super setUp]; 17 | } 18 | 19 | -(void)tearDown { 20 | [super tearDown]; 21 | } 22 | 23 | -(void)testItFindsTheClosestIndexGivenAnActualValueAndAListOfValues { 24 | NSUInteger size = 2; 25 | 26 | float floats[] = {1.0f, 2.0f}; 27 | subj = [ClosestValueFinder indexFor:1.25f table:floats size:size]; 28 | XCTAssertEqual(subj, 0); 29 | 30 | subj = [ClosestValueFinder indexFor:1.75f table:floats size:size]; 31 | XCTAssertEqual(subj, 1); 32 | 33 | floats[0] = 5.0f; 34 | floats[1] = 6.0f; 35 | subj = [ClosestValueFinder indexFor:-1.0f table:floats size:size]; 36 | XCTAssertEqual(subj, 0); 37 | 38 | subj = [ClosestValueFinder indexFor:8.0f table:floats size:size]; 39 | XCTAssertEqual(subj, 1); 40 | } 41 | 42 | @end 43 | -------------------------------------------------------------------------------- /BlueWizardTests/HexByteBinaryEncoderTests.m: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | #import "HexByteBinaryEncoder.h" 4 | 5 | @interface HexByteBinaryEncoderTests : XCTestCase 6 | 7 | @end 8 | 9 | @implementation HexByteBinaryEncoderTests { 10 | NSArray *subject; 11 | } 12 | 13 | -(void)setUp { 14 | [super setUp]; 15 | NSArray *hex = @[ @"90", @"2b", @"66", @"66", @"81", @"a0", @"d2", @"a5", @"05", @"56", @"ba", @"ad", @"6d", @"7a", @"65", @"a2", @"e8", @"15", @"7a", @"30" ]; 16 | subject = [HexByteBinaryEncoder process:hex]; 17 | } 18 | 19 | -(void)tearDown { 20 | [super tearDown]; 21 | } 22 | 23 | - (void)testItConvertsHexIntoBinaryNibbles { 24 | NSArray *expected = @[ @"1001", @"0000", @"0010", @"1011", @"0110", @"0110", @"0110", @"0110", @"1000", @"0001", @"1010", @"0000", @"1101", @"0010", @"1010", @"0101", @"0000", @"0101", @"0101", @"0110", @"1011", @"1010", @"1010", @"1101", @"0110", @"1101", @"0111", @"1010", @"0110", @"0101", @"1010", @"0010", @"1110", @"1000", @"0001", @"0101", @"0111", @"1010", @"0011", @"0000" ]; 25 | XCTAssertEqualObjects(subject, expected); 26 | } 27 | 28 | @end 29 | -------------------------------------------------------------------------------- /lpc/someone-shot-the-food.lpc: -------------------------------------------------------------------------------- 1 | 4,18,32,8c,0,5b,3b,13,60,ab,30,2,1c,11,9a,86,26,45,9b,6c,51,eb,9a,95,16,d3,cd,ad,6d,4e,47,45,fb,8c,a6,19,99,10,eb,3a,ea,aa,6c,92,b5,6d,ab,b3,c8,c,e2,26,a5,ca,8c,6d,4d,e3,96,2a,51,b6,33,89,db,ea,28,3d,83,2c,72,6b,a2,b6,31,89,9a,ad,8d,2a,37,d8,12,b7,2e,89,9c,22,59,da,fa,2c,63,92,74,ed,e8,ab,88,74,f5,d6,63,68,32,83,cd,5b,95,a1,28,e,e7,a8,52,86,a2,24,43,a3,4c,e9,b3,f0,a,b5,c8,65,28,52,ab,58,1d,97,a9,c8,a8,20,69,5c,86,c2,3d,4d,bc,56,e8,a7,d1,50,53,37,2,98,96,51,0,33,8,9,60,14,33,1,8c,26,da,a2,de,dc,54,24,59,4b,62,36,8d,ec,ca,2d,cd,76,22,d9,1f,b7,2c,9b,89,54,bf,dd,d2,ec,d7,c3,72,4a,48,62,8a,b4,98,28,c,c8,92,8b,0,cd,a3,b9,38,46,d7,a8,aa,5c,d2,6c,3b,52,62,4e,cb,b2,99,48,b5,da,2d,8a,d1,4c,6d,c7,b4,c4,db,48,f7,68,64,8a,6c,cc,54,cd,2e,2,a2,34,45,40,d4,66,8,c8,da,15,1,96,ab,87,30,d9,50,8b,6a,92,e2,e8,cd,cd,2d,76,89,43,d0,12,f1,55,2d,f3,d1,dd,b1,3b,b7,dc,b9,f4,a4,ea,dc,ca,60,c3,12,bd,6f,6b,22,2f,2b,32,7f,ad,8d,3a,3c,48,fc,b5,2e,8a,b4,62,f5,d7,fa,ac,dc,4b,44,5f,1b,93,a,2f,66,ff,65,8a,c2,3d,55,f5,95,29,18,8f,60,cd,97,e6,a8,2c,dc,58,7f,59,a2,b6,30,e3,7c,65,c9,46,4c,43,fd,85,39,7,21,f3,b0,4d,96,24,dd,8a,45,ab,5b,bb,d5,92,70,c9,62,ae,8a,c3,cd,a3,b0,35,b,75,77,57,f2,0 2 | -------------------------------------------------------------------------------- /lpc/welcome_blue_valkrie.lpc: -------------------------------------------------------------------------------- 1 | 2a,10,79,4c,c5,92,4,d7,4d,65,ab,58,59,9c,d8,5c,b4,a3,41,71,7d,71,cf,ea,c9,cd,d,d5,b5,aa,ad,36,2f,a4,a1,ac,9,d7,bc,e0,8f,3c,b7,6a,f3,82,78,17,a9,a9,25,b0,e6,43,34,eb,a6,34,a2,2f,51,6f,1c,ba,d8,82,9d,33,b1,eb,43,36,8f,ec,99,aa,f7,d5,ad,aa,e3,2a,a0,74,93,56,4,9f,d2,5e,76,46,9b,74,b9,46,2c,1a,7d,96,5d,a2,be,69,c,59,74,8b,da,ea,31,16,5e,2d,66,ab,da,9c,ec,6,ba,2f,6e,6b,a3,51,e2,dc,24,ad,c5,a8,b,85,dd,b0,55,a1,66,6c,75,c3,96,65,ba,69,d4,9,5b,e1,91,ae,d6,38,ec,45,64,99,58,13,33,16,9e,2d,6a,b3,cc,9c,75,a7,a8,d5,11,7b,a5,51,a2,92,f8,1,ff,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,60,a6,f,8e,c3,cc,bb,b8,a1,68,a8,34,4f,56,7a,af,23,2d,72,71,e9,43,90,50,dd,c5,a5,f5,41,d2,b4,5a,b5,32,9a,90,62,e9,9b,52,cf,5a,db,a9,6f,8a,b5,68,6b,e3,ae,29,96,b6,a2,54,b3,b8,dc,8b,f0,54,4b,64,ea,e0,4c,cd,63,51,ec,4b,96,bc,a4,72,dc,19,69,f4,69,6e,71,69,84,31,45,98,d6,e4,e1,c7,1a,c9,d1,56,9a,17,7a,4,57,4b,29,ae,ef,e1,5c,69,3b,b8,2e,8d,b2,76,1c,e4,27,ab,99,ec,8b,52,96,6d,b8,ab,3d,a,61,8c,e9,ae,35,bb,f8,b9,95,73,45,ec,52,c5,60,16,a6,b1,53,ef,b3,73,b8,3b,71,93,a9,46,91,91,d6,2d,b6,88,a6,59,67,b7,c5,8c,19,5a,ab,5d,97,13,94,e6,c5,71,7d,a,6c,e1,d9,d4,f5,c5,92,56,66,5c,35,45,2d,51,66,ee,d8,1a,ad,5a,b8,67,79 2 | -------------------------------------------------------------------------------- /BlueWizardTests/RMSNormalizerTests.m: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | #import "RMSNormalizer.h" 4 | #import "Reflector.h" 5 | #import "CodingTable.h" 6 | #import "UserSettings.h" 7 | #import "FrameData.h" 8 | #import 9 | 10 | @interface RMSNormalizer (Stubs) 11 | -(NSUInteger)maxRMSIndex; 12 | @end 13 | 14 | @interface RMSNormalizerTests : XCTestCase 15 | 16 | @end 17 | 18 | @implementation RMSNormalizerTests 19 | 20 | -(void)setUp { 21 | [super setUp]; 22 | } 23 | 24 | -(void)tearDown { 25 | [super tearDown]; 26 | } 27 | 28 | -(void)testItNormalizesRMSValues { 29 | Reflector *reflector = [[Reflector alloc] init]; 30 | reflector.rms = [CodingTable rms][2]; 31 | XCTAssertEqualWithAccuracy(reflector.rms, [CodingTable rms][2], 1.0f); 32 | 33 | id classMock = OCMClassMock([RMSNormalizer class]); 34 | OCMStub([classMock maxRMSIndex]).andReturn(3); 35 | 36 | FrameData *frameData = [[FrameData alloc] initWithReflector:reflector pitch:0 repeat:NO]; 37 | [RMSNormalizer normalizeVoiced:@[frameData]]; 38 | 39 | XCTAssertEqualWithAccuracy(reflector.rms, [CodingTable rms][3], 1.0f); 40 | } 41 | 42 | @end 43 | -------------------------------------------------------------------------------- /BlueWizard/BitHelpers.m: -------------------------------------------------------------------------------- 1 | #import "BitHelpers.h" 2 | 3 | @implementation BitHelpers 4 | 5 | +(NSString *)valueToBinary:(NSUInteger)value bits:(NSUInteger)bits { 6 | NSString *binary = @""; 7 | do { 8 | binary = [[NSString stringWithFormat: @"%lu", value & 1] stringByAppendingString:binary]; 9 | } while (value >>= 1); 10 | 11 | return [self leftZeroPadded:binary bits:bits]; 12 | } 13 | 14 | +(NSString *)leftZeroPadded:(NSString *)binary bits:(NSUInteger)bits { 15 | while ([binary length] < bits) { 16 | binary = [NSString stringWithFormat:@"0%@", binary]; 17 | } 18 | return binary; 19 | } 20 | 21 | +(NSUInteger)valueForBinary:(NSString *)binary { 22 | NSUInteger value = 0; 23 | const char *cString = [binary cStringUsingEncoding:NSUTF8StringEncoding]; 24 | 25 | int length = (int)[binary length] - 1; 26 | for (int i = length; i >= 0; i--) { 27 | if (cString[i] == '1') value += (1 << abs(i - length)); 28 | } 29 | return value; 30 | } 31 | 32 | +(NSUInteger)byteToValue:(NSString *)byte { 33 | int value; 34 | sscanf([byte UTF8String], "%x", &value); 35 | return value; 36 | } 37 | 38 | @end 39 | -------------------------------------------------------------------------------- /lpc/remember-dont-shoot-food.lpc: -------------------------------------------------------------------------------- 1 | a1,88,9d,d2,c8,bb,8c,b8,c,e,76,ed,3c,c2,96,4c,29,7d,f1,8,6b,51,15,f7,96,21,a8,9e,a4,29,6b,b7,a0,6,53,37,6d,34,82,92,5c,d5,73,f1,8,4b,72,33,ab,ba,23,2a,31,d5,2d,e7,8c,38,a7,30,53,6d,d2,e2,1a,55,43,24,55,4a,4a,60,69,92,cc,2c,4f,8e,b9,d9,d2,8e,b2,24,55,b,8b,3b,ca,5c,45,3d,b9,dd,a8,73,77,b1,e0,b4,ad,ce,53,34,9c,da,b4,3a,4f,b6,74,5e,5d,9a,34,d0,cb,74,55,6a,f3,c1,c,d1,45,66,ca,15,3d,dc,1b,a9,22,35,51,4f,da,62,aa,dc,55,3c,b9,b7,aa,f3,14,4d,a3,ce,aa,ce,53,34,9d,bb,a8,26,d,b2,52,6b,3,0,90,a2,a6,44,3d,7c,61,f3,53,a6,b4,ea,a8,cd,8d,c9,d3,2c,c6,36,27,d4,a,76,af,dd,2c,9f,26,d9,25,71,31,74,e9,54,53,25,41,53,39,4b,24,ed,8,2b,a,d,53,b,a3,fc,94,d9,ad,2a,8a,f2,62,f6,30,cf,b1,ce,29,dc,3b,dd,e4,28,60,7b,11,3,ac,56,aa,80,35,db,14,30,eb,94,0,c6,cc,2c,4e,cd,c2,a2,3e,a7,b8,59,b8,6a,c9,92,e2,26,ae,e1,2e,4d,93,5b,b9,58,98,c6,5,1,34,e7,c1,80,16,d5,9,e0,35,3b,1,84,d5,40,40,94,6e,8,28,ce,94,1,25,85,3b,af,58,f7,14,71,52,c2,98,2d,85,74,69,9,63,b4,30,d6,a5,25,e,de,dc,c5,96,86,d4,67,53,93,78,52,a,1b,2c,5c,63,4d,a9,bc,b1,68,d5,b6,a5,f5,26,3c,c5,ba,a6,de,db,88,10,cb,9a,a6,68,35,83,a4,6b,58,a2,b,37,96,a4,66,89,c9,52,49,3b,b3,3c,58,c9,14,dd,22,aa,18,d9,5c,bd,2d,aa,bd,a,2b,b3,b4,62,ab,5e,9c,65,62,d1,ed,1 2 | -------------------------------------------------------------------------------- /lpc/try-this-level-now.lpc: -------------------------------------------------------------------------------- 1 | 2,a8,d9,54,1,35,87,29,a0,d5,8c,d4,c5,24,6e,6e,89,4b,e3,7,b5,46,b6,6a,55,ac,da,ea,be,64,d4,c9,55,85,fa,dc,51,67,d7,15,9c,73,47,9d,7c,a7,4b,cd,1d,75,76,9d,2e,35,67,34,39,56,98,75,9d,d5,e6,90,61,5e,8d,57,57,7d,b8,47,ce,5e,5d,75,6e,9e,39,67,f5,d5,b9,78,55,95,d5,57,6d,1c,55,65,57,5f,8d,89,7b,44,6b,73,8e,e5,e6,5d,7b,74,d5,87,bb,e7,ec,d1,55,e7,e6,99,73,5a,5f,9d,89,57,cf,69,69,b1,2a,9e,55,65,44,39,b0,59,4d,9c,11,64,27,e6,b1,b1,4b,18,b5,96,d7,58,2e,f1,d6,69,6a,12,db,0,93,ba,2a,60,20,97,12,75,9e,22,9e,ab,5a,d0,ac,b3,47,b4,e,61,73,64,15,99,c4,b5,89,84,97,59,dc,30,46,54,e9,6e,71,d3,e0,65,bb,69,2d,69,63,88,e1,9a,5b,76,8c,59,b7,ab,d6,95,31,16,5d,6e,9a,77,c6,94,65,45,88,5f,9,4b,34,15,4e,7e,55,ed,5e,55,9a,78,9d,34,5,9f,43,3c,51,db,e4,d2,98,66,86,6b,b3,f7,6b,16,15,b4,cd,de,5c,ba,7a,e5,b4,58,b7,a1,9c,71,cd,ea,e4,98,4b,38,31,8b,b1,59,42,15,c5,cc,ce,55,19,45,95,36,15,eb,25,dc,b3,db,92,43,14,c5,c4,6a,4b,ca,91,d4,1d,b9,ad,a9,46,d2,b6,ed,b1,a6,14,4d,dd,71,da,96,52,c,e7,c4,69,7b,ca,d9,54,13,a5,6d,b1,47,6a,4e,95,b2,c5,96,a9,d9,51,d3,16,96,87,f6,c4,6d,7b,b6,d9,29,3e,a5,6d,59,65,b7,f0,d3,b0,c6,dc,69,5a,63,cd,e1,cb,98,67,55,31,7b,e8,e9,ea,1d,c6,ed,d1,66,3b,c6,64,77,44,3b,1d,cc,73,d4,1e,5d,97,a1,4d,7d 2 | -------------------------------------------------------------------------------- /BlueWizard/CodingTable.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | static NSString * const kParameterGain = @"gain"; 4 | static NSString * const kParameterRepeat = @"repeat"; 5 | static NSString * const kParameterPitch = @"pitch"; 6 | static NSString * const kParameterK1 = @"k1"; 7 | static NSString * const kParameterK2 = @"k2"; 8 | static NSString * const kParameterK3 = @"k3"; 9 | static NSString * const kParameterK4 = @"k4"; 10 | static NSString * const kParameterK5 = @"k5"; 11 | static NSString * const kParameterK6 = @"k6"; 12 | static NSString * const kParameterK7 = @"k7"; 13 | static NSString * const kParameterK8 = @"k8"; 14 | static NSString * const kParameterK9 = @"k9"; 15 | static NSString * const kParameterK10 = @"k10"; 16 | static NSUInteger const kParameterKeys = 13; 17 | static NSUInteger const kStopFrameIndex = 15; 18 | 19 | @interface CodingTable : NSObject 20 | 21 | +(NSArray *)parameters; 22 | +(int *)bits; 23 | +(float *)pitch; 24 | +(float *)rms; 25 | +(float *)kBinFor:(NSUInteger)k; 26 | +(NSUInteger)pitchBinLength; 27 | +(NSUInteger)pitchSize; 28 | +(NSUInteger)rmsSize; 29 | +(NSUInteger)kSizeFor:(NSUInteger)k; 30 | 31 | @end 32 | -------------------------------------------------------------------------------- /BlueWizard/NotificationNames.h: -------------------------------------------------------------------------------- 1 | #ifndef BlueWizard_NotificationNames_h 2 | #define BlueWizard_NotificationNames_h 3 | 4 | static NSString * const inputSignalReceived = @"inputSignalReceived"; 5 | static NSString * const playOriginalWasClicked = @"playOriginalWasClicked"; 6 | static NSString * const stopOriginalWasClicked = @"stopOriginalWasClicked"; 7 | static NSString * const playProcessedWasClicked = @"playProcessedWasClicked"; 8 | static NSString * const stopProcessedWasClicked = @"stopProcessedWasClicked"; 9 | static NSString * const byteStreamChanged = @"byteStreamChanged"; 10 | static NSString * const frameDataChanged = @"frameDataChanged"; 11 | static NSString * const byteStreamGenerated = @"byteStreamGenerated"; 12 | static NSString * const frameDataGenerated = @"frameDataGenerated"; 13 | static NSString * const bufferGenerated = @"bufferGenerated"; 14 | static NSString * const settingsChanged = @"settingsChanged"; 15 | static NSString * const frameWasEdited = @"frameWasEdited"; 16 | static NSString * const signalChanged = @"signalChanged"; 17 | static NSString * const speedChanged = @"speedChanged"; 18 | 19 | #endif 20 | -------------------------------------------------------------------------------- /lpc/lets-see-you-get-out-of-here.lpc: -------------------------------------------------------------------------------- 1 | 26,b2,7a,4c,a4,1b,87,20,13,cd,16,eb,3a,bc,e2,dd,85,37,c9,f2,b3,33,d7,9c,da,2b,2a,ce,42,72,ea,8c,b8,86,30,96,9e,aa,aa,28,4d,25,3a,a,8,a0,ea,34,5,64,13,e6,a2,e2,dc,d5,a6,89,8b,9b,b,17,ce,39,c,e8,d0,85,1,9d,bb,30,60,30,e7,94,36,63,2c,9a,b5,5b,dc,ad,31,6a,dd,69,e9,52,2c,a2,75,a7,e4,4b,b3,90,ce,e3,92,6f,4d,c2,3a,8b,53,b1,15,8a,da,2c,49,c5,b6,24,ac,bd,ba,e5,c3,a9,80,55,eb,96,17,cf,62,15,5d,4a,e1,ad,46,7a,74,49,65,50,95,62,9e,37,94,49,75,a2,a9,1b,54,55,ee,49,62,4e,4b,d3,72,85,6,db,19,55,cb,22,92,de,65,34,35,aa,69,c4,9a,d1,55,a7,ae,1e,4f,c4,d0,bc,bb,a,2e,19,5d,35,1a,1a,7e,7b,74,c5,79,aa,77,eb,d1,16,1b,19,52,4d,46,5b,5c,66,48,2d,1d,5d,b6,99,29,35,67,74,c9,67,b8,f5,94,36,64,23,c3,51,ad,c6,50,9c,16,5b,35,1e,7d,b1,1e,aa,d9,64,c,d9,86,9b,66,93,d6,26,1b,ee,5a,b5,4b,97,5d,7a,5a,56,d,5d,b1,d2,6a,d5,c4,f5,c9,a8,87,7b,98,d4,57,6b,69,9a,cd,d3,50,95,87,6b,b6,63,40,55,e6,ad,9f,5e,15,2d,e7,8c,6e,6,57,94,5c,33,da,19,c2,90,63,cd,68,47,2c,43,8e,ae,a3,eb,21,84,2c,db,8d,a1,a5,10,a,5f,37,c6,9a,5d,b8,6c,cb,98,6a,71,95,b4,ae,63,aa,d9,54,ca,ba,8d,b9,e4,50,49,4f,37,96,92,c3,24,3c,db,58,4b,75,93,d0,ee,6d,2d,cb,dd,9c,9b,a6,bd,14,33,4d,ed,62,f6,dc,d1,a3,bc,a6,3a,62,e4,c8,f6,86,ea,8a,89,23,cb,1b,92,27,16,8a,18,6f,f8,0 2 | -------------------------------------------------------------------------------- /BlueWizardTests/SegmenterTests.m: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | #import "Segmenter.h" 4 | #import "Buffer.h" 5 | #import "UserSettings.h" 6 | 7 | @interface SegmenterTests : XCTestCase 8 | 9 | @end 10 | 11 | @implementation SegmenterTests { 12 | Segmenter *subject; 13 | Buffer *mainBuffer; 14 | double *samples; 15 | } 16 | 17 | -(void)setUp { 18 | [super setUp]; 19 | NSUInteger size = 30; 20 | samples = malloc(sizeof(float) * size); 21 | for (int i = 0; i < size; i++) { 22 | samples[i] = 1.0f; 23 | } 24 | 25 | mainBuffer = [[Buffer alloc] initWithSamples:samples size:size sampleRate:8000]; 26 | [[UserSettings sharedInstance] setFrameRate:@1]; 27 | subject = [[Segmenter alloc] initWithBuffer:mainBuffer windowWidth:1]; 28 | } 29 | 30 | -(void)tearDown { 31 | [super tearDown]; 32 | free(samples); 33 | } 34 | 35 | -(void)testItYieldsBuffers { 36 | __block int sum = 0; 37 | [subject eachSegment:^(Buffer *buffer, NSUInteger index) { 38 | for (int i = 0; i < buffer.size; i++) { 39 | sum += buffer.samples[i]; 40 | } 41 | }]; 42 | 43 | XCTAssertEqual(sum, 30); 44 | } 45 | 46 | @end 47 | -------------------------------------------------------------------------------- /lpc/try-and-find-a-way-out.lpc: -------------------------------------------------------------------------------- 1 | 4,a8,45,82,1,b5,46,28,a0,94,70,6,a4,a2,11,34,7f,d5,79,24,55,d0,42,ab,a4,cd,58,c9,8c,33,4d,b2,a2,14,33,8e,52,ed,8c,5c,8c,b4,c2,34,b2,f1,30,53,c,f5,ca,d8,cb,ca,d6,2d,3a,1a,2e,a7,38,95,28,8f,3c,fc,9a,55,2c,a3,f2,88,4a,10,f5,cc,d9,23,29,de,4c,53,67,97,34,fb,70,75,4b,5d,b2,e2,d4,22,bc,62,ca,8b,37,f1,f4,5a,a9,ae,49,d4,c2,eb,86,a8,78,56,cf,5a,9c,d2,1a,d4,cc,6d,b1,ea,bd,53,b7,74,c5,8,f0,da,2,1,c1,a9,13,20,7a,55,93,47,95,99,2e,91,42,e1,fb,98,78,cc,6c,45,c,9d,6e,b2,a4,15,29,74,98,ea,ec,56,a4,d8,a6,e1,93,47,99,63,9a,86,cd,5e,55,f5,6e,9a,b6,7a,d4,2d,98,68,f8,ec,d1,74,69,62,ad,a5,52,9b,45,ba,5,c6,e,5d,74,a1,2a,52,29,74,c9,9b,aa,59,a5,d4,17,6b,2a,ae,35,c3,d8,bc,88,86,57,a,4e,f3,ae,2a,d4,a6,f5,c5,71,98,f4,e2,d6,27,27,e9,56,4b,da,90,9c,45,8a,ac,4d,63,30,91,a9,94,d5,4c,de,44,95,60,16,33,7a,5d,95,86,b6,dd,e0,ad,55,98,7,2e,43,b0,5e,ed,94,b8,d,29,64,b8,d1,ba,31,95,6c,ae,ae,dd,c7,54,b3,aa,44,74,1b,73,4f,61,64,be,76,cc,c3,bb,a1,f9,da,31,cf,e0,86,ea,6b,c7,32,9c,19,85,57,1e,4b,f,e6,14,de,74,ac,2d,67,88,e9,b2,b1,d7,e0,a1,e5,4b,db,56,a2,b7,86,2f,6d,53,89,d1,e1,ba,76,cc,c5,57,59,6a,d3,31,67,5f,65,a9,ed,c6,52,7c,54,6,b7,6d,4b,b1,56,95,dc,b4,ad,d9,79,a7,f1,d2,b2,27,1b,e5,8e,4b,dd,91,8c,67,b8,b4,1,20,40,e5,a5,8,98,2a,4,1,43,b8,3e 2 | -------------------------------------------------------------------------------- /lpc/traps-make-walls-disappear.lpc: -------------------------------------------------------------------------------- 1 | 2,a8,d3,5d,0,29,6a,10,20,64,49,17,c5,4c,95,21,2d,5b,94,ab,94,b9,cd,59,61,8d,65,9e,ba,66,45,35,a7,45,f8,d2,15,95,5c,16,e1,73,5b,9c,6b,58,44,ce,2d,71,aa,16,61,35,8f,0,be,70,31,a0,14,cd,10,d6,d4,66,65,6b,52,d4,fc,b8,a5,2e,15,40,f5,e3,2,c8,6e,45,0,8b,5b,30,e0,5a,55,4,64,a4,ad,aa,c4,4c,ad,dd,89,c9,a3,8,f6,f4,d4,25,cd,95,d5,ad,ea,b4,a4,16,13,cd,9a,3b,92,9e,93,a9,6b,ee,48,bb,b,a2,ae,a5,2d,1b,2d,89,cc,97,1,3,a2,17,13,40,c,ec,a5,6a,d1,84,ab,aa,a4,b6,c7,40,aa,9a,92,ea,a2,84,eb,22,74,ca,3,eb,9c,6,ab,25,8f,f4,26,1d,6b,b7,2c,d1,1b,37,ae,53,d2,a8,af,5d,78,6e,4b,93,b8,4e,e5,26,2d,4d,fc,26,94,1b,b7,34,ca,eb,14,5e,dc,d2,a8,ae,93,64,71,49,bc,bd,32,8a,c5,25,f1,e1,53,25,9b,96,d8,bb,2f,15,af,53,22,ef,3e,58,a3,6e,89,a3,98,71,d2,b9,2,28,64,5a,0,85,ce,30,20,c9,6d,2,78,fb,85,0,6f,af,4b,34,54,98,7a,36,6a,49,b5,2e,ec,f9,74,24,cd,8a,a9,f6,d2,92,4d,93,e2,a4,8d,4,b0,b8,b3,0,96,4a,4b,e1,60,e1,a2,de,78,44,c5,b8,aa,d5,1c,13,17,27,26,b9,75,41,0,2d,3b,33,a0,87,94,14,ec,58,26,46,73,9b,bf,42,29,a9,2f,6d,c1,f4,ad,20,b9,b6,85,3d,26,41,64,db,16,b7,18,84,e5,6d,5b,56,a3,13,8f,6e,6d,55,ad,4e,5a,bc,b9,75,35,25,73,73,9e,36,d5,12,ac,25,59,db,9c,8b,b3,95,76,6d,6b,19,a1,1a,d4,a6,6c,65,9a,5a,50,db,b4,e7,2e,62,2e,6b,c2,56,a6,5b,38,76,36,5b,69,ce,56,dc,fb,1 2 | -------------------------------------------------------------------------------- /BlueWizard/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIconFile 10 | 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | $(PRODUCT_NAME) 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | 1.5.0 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 8 25 | LSMinimumSystemVersion 26 | $(MACOSX_DEPLOYMENT_TARGET) 27 | NSHumanReadableCopyright 28 | Copyright © 2015-2017 Collinator Studios Inc. All rights reserved. 29 | NSMainStoryboardFile 30 | Main 31 | NSPrincipalClass 32 | NSApplication 33 | 34 | 35 | -------------------------------------------------------------------------------- /lpc/kill-thief-to-recover-stolen-item.lpc: -------------------------------------------------------------------------------- 1 | a,98,b1,5d,0,59,90,b6,aa,e7,d,62,6a,3f,aa,11,da,49,39,fd,28,87,8,e3,94,76,a3,9a,44,2a,8b,d3,8c,7a,22,e9,4e,f2,dc,ea,5,65,c6,48,49,6b,7,71,d5,a9,90,4,c8,5a,85,0,49,a4,12,20,f0,29,2,4,3e,2e,0,6f,c4,46,39,5c,29,48,6c,19,c5,b2,ae,a8,b1,75,64,cb,77,20,e8,96,16,8f,d8,86,64,5d,5a,d0,4b,9,8a,75,49,7e,eb,89,64,ba,96,0,bd,8c,33,20,2b,65,6,14,a1,4c,80,2c,85,10,90,d,31,30,a0,5,d3,92,97,8c,ee,e6,6d,5a,55,2a,59,a9,24,6d,75,71,25,da,a4,b6,d5,25,a5,68,b2,ba,d1,d4,1e,22,ce,5e,47,3b,62,39,8a,b5,f3,2d,30,a0,1c,56,6,94,c1,d2,b2,da,bc,82,2d,f1,c8,8a,ea,c,e7,a5,23,ab,bc,23,8a,bb,b4,3c,ab,76,6f,d8,e2,ca,62,5c,a2,48,4e,49,93,4f,d1,a6,2c,25,49,29,d8,8a,ba,94,38,55,27,2f,ea,52,e2,5c,1d,bd,35,4d,89,4b,73,71,93,34,2,d8,4a,4d,0,d,97,b,60,89,4a,2,4,53,84,80,90,d0,4b,70,bc,a7,88,24,6d,41,36,6e,99,b2,76,44,95,46,47,51,e6,16,26,d2,6b,2a,59,4b,90,f0,ac,b1,b4,29,41,c2,b3,81,d2,a6,4,89,e7,24,59,98,e6,15,d2,19,6a,e1,9a,57,c8,a4,99,35,69,fe,c0,15,6a,de,24,f9,49,b9,b9,45,d5,e4,67,19,e6,9e,55,5a,54,74,9b,5a,35,69,61,d1,1d,66,31,79,c4,45,77,b8,c7,ec,91,16,3d,11,1e,6b,46,58,5d,85,bb,2f,1d,41,f5,69,9e,31,67,f8,2d,85,68,e4,d2,e2,b7,12,cc,d6,4b,55,d2,52,89,48,c6,6a,6d,d,65,2a,d1,b4,b5,39,87,aa,47,d3,d6,57,17,e2,69,51,cb,d8,92,b1,66,45,d,4b,71,ea,ca,2e,37,ec,d5,5b,8,9b,94,b0,37,db,aa,1c,49,1e 2 | -------------------------------------------------------------------------------- /lpc/some-walls-may-be-destroyed.lpc: -------------------------------------------------------------------------------- 1 | 8,58,48,9d,1,1d,88,9,e0,8,37,1,1c,95,3e,92,a5,8d,2b,39,f3,8,a2,4b,77,ab,3a,c3,cf,62,c3,c3,e7,e,27,b3,4d,71,9f,3d,ac,24,da,4d,23,76,33,93,2a,37,a,d1,c9,89,b2,4d,d9,2d,a5,30,d9,72,35,8f,3d,aa,4c,aa,4d,2d,d6,68,13,9b,31,95,86,a3,cf,74,d7,54,1a,b5,b1,e0,3d,13,6e,33,c6,e,eb,42,b9,cd,98,1a,ec,2b,a3,36,63,2e,64,36,55,96,8e,b9,d0,d9,14,59,33,a6,42,67,4b,a4,c9,68,a,99,4d,96,26,a3,2b,68,37,59,96,8c,ba,c1,d9,11,5a,d2,b2,c,7f,54,bc,4e,4a,bc,fe,26,ca,26,29,f6,e2,93,a9,6a,97,b4,83,aa,36,13,53,ca,46,33,a2,33,4a,aa,1b,ae,88,ac,30,c,e8,a0,c3,34,41,8f,57,28,6d,d3,3a,55,3e,6a,92,43,9b,94,4a,72,d6,1e,cd,d0,e1,e4,d6,79,d4,d3,4d,a2,5a,9b,51,cf,30,81,6c,6b,47,b5,7c,27,21,af,1d,cd,f2,9b,88,d2,55,d,5d,87,b1,59,ea,39,8c,66,e4,9,64,71,37,ea,15,2b,11,a5,ef,a8,77,cc,44,e4,2d,a5,d9,ae,1c,50,d7,a8,ba,b9,40,b4,4a,3d,92,a9,4a,91,a2,f5,88,17,e,e3,f0,4d,23,69,2c,d4,dd,d7,b4,ea,98,70,13,75,aa,80,6b,d4,4,70,83,1a,1,1a,61,13,40,36,42,25,69,b9,54,2c,9c,b5,20,17,55,77,73,d6,bc,10,82,33,c5,59,73,a2,53,af,46,af,cd,4a,a2,87,53,3c,37,33,ca,1d,d,4b,dd,ac,24,bb,22,b9,73,73,93,9c,92,f0,d6,2d,88,66,ca,d2,16,8d,ac,aa,36,d,db,3c,f2,21,db,38,6d,cb,a8,bb,6f,16,f7,35,a3,eb,be,94,3d,1b,8f,be,87,32,8a,a8,3d,86,16,d3,28,bd,ca,18,bb,4d,15,f7,aa,6d,ec,b6,55,c2,b7,94,a9,db,11,e,df,2,62,1d,b6,3,44,d6,20,20,59,b6,7 2 | -------------------------------------------------------------------------------- /lpc/welcome-to-treasure.lpc: -------------------------------------------------------------------------------- 1 | 6e,32,25,82,24,56,b7,31,d9,68,15,e9,3a,fa,6c,a2,9c,7c,ed,e8,8a,b0,1e,96,35,a3,4d,dc,e7,88,9b,96,36,73,db,45,89,5b,ba,ca,64,1b,b5,8d,99,8b,e8,76,56,3b,40,0,1f,54,4a,95,bc,a9,7b,d5,1e,65,f4,16,66,d9,66,d4,51,55,b9,44,e3,51,47,33,2e,92,8b,4b,ed,c5,84,ab,c5,49,75,a0,e6,2d,19,27,54,56,58,a6,54,dc,50,6b,e1,99,d2,71,42,a5,a5,47,f1,d8,75,b9,d7,a6,a1,1b,27,e4,de,ba,86,b6,aa,54,c6,54,26,92,8d,43,1d,4d,b9,4a,54,71,75,d0,69,e1,61,47,d5,51,ab,79,84,1c,51,45,61,6e,54,75,58,e5,b9,7b,68,d5,11,55,e0,e6,ae,d5,18,0,40,0,d5,2b,bb,ba,26,13,32,6d,9d,fa,68,d4,ac,62,56,1b,b3,16,57,cb,d5,66,ca,4a,4d,c4,5a,b7,b1,5a,73,41,6f,3b,ba,aa,cc,9c,63,f5,e8,9b,72,75,8a,2d,6a,4f,5c,dc,3d,6b,81,0,7a,10,17,40,8d,22,29,2d,35,dc,4c,2d,87,cc,57,8a,a,f3,9a,b2,d0,30,c2,3d,6b,cb,53,25,77,ab,2e,a3,48,81,32,73,1a,8d,b2,66,16,ad,9a,3d,aa,ea,58,24,7b,c9,68,9a,13,21,ef,25,65,e8,cd,2,84,db,18,60,54,51,3,8c,55,51,86,9c,58,2c,bc,4e,1a,52,3,af,f0,56,6d,4e,9d,34,42,da,b4,39,56,72,37,4f,db,96,10,35,34,3c,69,59,93,d6,30,37,b9,69,2d,86,5c,c6,2d,9b,b5,1a,f4,74,89,d3,e6,6c,25,4d,22,76,99,42,d2,90,b2,ac,6d,c,de,83,d3,b6,8c,31,d8,48,9,eb,da,e6,60,23,d4,b4,5b,59,82,89,74,95,ed,61,b,35,82,c8,5b,bb,c3,db,2c,15,4d,63,56,67,ab,8c,2d,89,3b,a2,b6,56,9,cb,e6,8,d6,82,b5,94,b9,29,38,f,9,6f,e3,e6,68,3c,d5,ad,ab,9b,82,8e,30,b3,ae,6e,89,3a,d2,4d,d2,89,c9,bb,32,65,6b,cb,56,dc,5d,2c,dc,12,dd,f0,f1,0 2 | -------------------------------------------------------------------------------- /lpc/valkrie_is_it.lpc: -------------------------------------------------------------------------------- 1 | a6,f,8e,c3,cc,bb,b8,a1,68,a8,34,4f,56,7a,af,23,2d,72,71,e9,43,90,50,dd,c5,a5,f5,41,d2,b4,5a,b5,32,9a,90,62,e9,9b,52,cf,5a,db,a9,6f,8a,b5,68,6b,e3,ae,29,96,b6,a2,54,b3,b8,dc,8b,f0,54,4b,64,ea,e0,4c,cd,63,51,ec,4b,96,bc,a4,72,dc,19,69,f4,69,6e,71,69,84,31,45,98,d6,e4,e1,c7,1a,c9,d1,56,9a,17,7a,4,57,4b,29,ae,ef,e1,5c,69,3b,b8,2e,8d,b2,76,1c,e4,27,ab,99,ec,8b,52,96,6d,b8,ab,3d,a,61,8c,e9,ae,35,bb,f8,b9,95,73,45,ec,52,c5,60,16,a6,b1,53,ef,b3,73,b8,3b,71,93,a9,46,91,91,d6,2d,b6,88,a6,59,67,b7,c5,8c,19,5a,ab,5d,97,13,94,e6,c5,71,7d,a,6c,e1,d9,d4,f5,c5,92,56,66,5c,35,45,2d,51,66,ee,d8,1a,ad,5a,b8,67,79,ff,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,60,a3,ea,46,18,a7,ca,8c,b6,79,21,99,2e,33,ba,ec,88,7b,b3,d2,e8,93,32,8e,ad,d8,6d,48,ca,38,aa,22,b7,b1,49,13,b5,9c,39,96,c5,5d,c4,a2,71,9b,b7,76,21,cd,38,c,d8,da,85,1,5a,9a,a5,3e,18,d2,6a,b7,d2,aa,ec,c4,24,cb,72,2b,5a,f2,10,cf,c8,2d,ab,c5,53,22,e3,b4,a4,54,2f,aa,a8,da,92,92,bd,38,33,4e,4b,73,f3,a2,89,38,2d,c9,cd,8b,c6,e3,b4,38,f5,28,ea,88,d2,a2,d8,a2,24,3d,6e,8b,62,f6,d6,74,a9,2d,8e,49,4b,c6,ac,b4,34,44,2d,19,b7,52,aa,94,35,b8,dd,72,ca,53,b5,a4,a,db,26,4e,2d,8a,aa,e2,a8,28,ae,8,ce,8c,9c,92,a2,25,db,89,dd,48,bb,21,b6,6e,d9,23,6d,8e,54,2f,6d,8d,bc,39,16,99,b1,5d,ba,12,c8,a6,47,b1,2,94,8f,40,0,8,99,8,90,da,47,24,cd,90,58,8f,6d,93,76,c7,a2,13,4e,42,be,94,b,47,35,71,5d,d7,c1,1a,1d,9b,0,41,84,20,20,49,65,4,24,27,f4,0 2 | -------------------------------------------------------------------------------- /lpc/your-shots-now-hurt-other-players.lpc: -------------------------------------------------------------------------------- 1 | a9,6a,5e,98,32,1b,b7,ac,64,16,37,dd,d2,92,98,38,43,75,75,4b,62,75,29,a3,d5,25,8d,93,ad,59,16,97,24,2d,b2,66,59,9c,b2,f2,a8,84,6c,8e,2,c6,98,56,c0,6c,a5,a,58,7d,5d,1,a3,97,2b,a0,6f,8b,11,a5,ca,69,d1,51,47,9c,72,86,bb,cf,19,49,4a,1d,ee,b6,64,44,a9,74,98,c7,e2,11,c6,96,e6,55,75,5a,90,93,87,fa,54,5,1,a4,c2,8e,80,6c,36,15,50,e5,a6,2,aa,9a,60,40,a3,ee,8,e8,32,8c,15,9e,95,bb,b9,ed,92,b5,1c,c1,9c,51,47,5a,9b,7,47,c6,1d,69,ad,5e,ea,55,67,24,a5,45,99,65,9d,16,e7,12,69,5e,75,5b,98,52,a5,59,4e,69,61,c,5d,a6,31,bb,5,21,75,aa,79,dd,e6,87,90,e5,6e,e1,5a,10,83,66,44,86,6d,49,29,1e,a6,11,ba,e4,25,55,78,78,d9,94,e7,5c,69,1e,55,4b,98,52,86,65,54,4d,59,4c,e9,16,1e,35,25,b1,b2,65,59,b4,94,e4,83,56,c6,4b,53,9c,27,64,69,2c,4a,51,9e,90,a5,31,2b,85,e5,42,ba,44,2d,13,d6,4b,6e,62,1d,1,1,d5,57,84,a8,74,d6,8,4f,37,da,5c,24,bc,ab,ca,a8,72,f1,b0,ec,38,a3,c8,21,42,7d,e2,ba,2a,7b,75,95,b2,eb,52,a7,c3,cd,bc,ca,48,8b,49,35,f6,29,23,cd,49,d4,4d,57,97,34,55,b2,c,d9,9c,b2,58,d9,2d,5d,99,2b,72,88,30,9f,2a,c0,0,a8,3c,43,9a,6d,a8,58,24,4b,89,f,a5,15,21,ad,c5,51,5d,aa,f8,94,91,24,39,69,16,93,47,96,a3,87,59,37,19,45,cd,ae,ea,39,67,54,ad,84,88,c7,dc,d1,b4,9e,2c,e6,6b,46,d7,52,91,a4,ad,69,43,cd,8e,de,ba,b9,8d,a5,36,6b,61,97,36,95,5e,a4,85,5d,db,9c,4b,90,b6,b4,2b,4b,a9,c6,5a,da,2e,6c,35,3a,4b,78,dd,70,d4,50,cc,e5,dd,8,90,4d,92,4,18,90,5c,22,1,62,70,42,40,f0,4e,f 2 | -------------------------------------------------------------------------------- /BlueWizard/NibbleBitReverser.m: -------------------------------------------------------------------------------- 1 | #import "NibbleBitReverser.h" 2 | #import "BitHelpers.h" 3 | 4 | @implementation NibbleBitReverser 5 | 6 | +(NSArray *)process:(NSArray *)nibbles { 7 | NSMutableArray *reversed = [NSMutableArray arrayWithCapacity:[nibbles count]]; 8 | for (NSString *nibble in nibbles) { 9 | NSString *leftByte = [nibble substringToIndex:1]; 10 | NSString *rightByte = [nibble length] == 1 ? @"0" : [nibble substringFromIndex:1]; 11 | 12 | NSString *reversedNibble = [NSString stringWithFormat:@"%x%x", 13 | (int)[self reversedValueFor:leftByte], 14 | (int)[self reversedValueFor:rightByte]]; 15 | [reversed addObject:reversedNibble]; 16 | } 17 | 18 | return reversed; 19 | } 20 | 21 | +(NSUInteger)reversedValueFor:(NSString *)byte { 22 | NSUInteger value = [BitHelpers byteToValue:byte]; 23 | NSString *binary = [BitHelpers valueToBinary:value bits:4]; 24 | NSString *reversed = @""; 25 | const char *cString = [binary cStringUsingEncoding:NSUTF8StringEncoding]; 26 | 27 | for (int i = 3; i >= 0; i--) { 28 | reversed = [reversed stringByAppendingString:[NSString stringWithFormat:@"%c", cString[i]]]; 29 | } 30 | 31 | return [BitHelpers valueForBinary:reversed]; 32 | } 33 | 34 | @end -------------------------------------------------------------------------------- /BlueWizard/FrameDataBinaryEncoder.m: -------------------------------------------------------------------------------- 1 | #import "FrameDataBinaryEncoder.h" 2 | #import "CodingTable.h" 3 | #import "BitHelpers.h" 4 | 5 | @implementation FrameDataBinaryEncoder 6 | 7 | +(NSArray *)process:(NSArray *)parametersList { 8 | int *bits = [CodingTable bits]; 9 | 10 | __block NSString *binary = @""; 11 | 12 | for (NSDictionary *parameters in parametersList) { 13 | 14 | [[CodingTable parameters] enumerateObjectsUsingBlock:^(NSString *parameter, NSUInteger idx, BOOL *stop) { 15 | NSNumber *value = [parameters objectForKey:parameter]; 16 | if (value) { 17 | NSString *binaryValue = [BitHelpers valueToBinary:[value unsignedIntegerValue] 18 | bits:bits[idx]]; 19 | 20 | binary = [binary stringByAppendingString:binaryValue]; 21 | } else { *stop = YES; } 22 | }]; 23 | 24 | } 25 | return [self nibblesFrom:binary]; 26 | } 27 | +(NSArray *)nibblesFrom:(NSString *)binary { 28 | NSMutableArray *nibbles = [NSMutableArray arrayWithCapacity:[binary length] / 4]; 29 | while ([binary length] >= 4) { 30 | NSString *nibble = [binary substringToIndex:4]; 31 | binary = [binary substringFromIndex:4]; 32 | [nibbles addObject:nibble]; 33 | } 34 | return [nibbles copy]; 35 | } 36 | 37 | @end 38 | -------------------------------------------------------------------------------- /lpc/skate_or_die.lpc: -------------------------------------------------------------------------------- 1 | 4,98,a2,94,0,43,af,62,0,18,50,3d,79,89,86,33,7,b5,ae,23,a8,39,5,c3,d3,d,bf,74,16,cb,58,dd,fc,9c,b1,b2,aa,76,f3,73,c1,f4,a9,c5,2d,28,99,dc,2a,96,b4,b0,64,f2,a8,ac,d3,a2,52,c8,33,ab,72,8b,4b,66,b5,cc,d9,2d,ae,89,55,2b,d7,b4,a0,75,55,72,6f,d2,fc,5a,59,b8,62,4e,f1,4b,62,d3,f6,db,40,80,92,c9,5c,5c,32,99,67,d5,e,71,8d,ac,d6,b9,c6,5,ad,8a,72,44,63,e1,d7,c6,42,95,73,88,9f,a3,18,a5,af,16,a9,f,b9,a8,de,2a,a4,51,7b,af,72,f2,94,45,ad,b3,26,ce,53,12,6c,f6,28,c5,4f,51,8,d5,29,54,3f,85,a1,d6,38,4b,f3,14,86,56,63,a4,c9,53,10,6a,b6,b1,26,4f,7e,a8,d9,a6,9a,3e,f9,21,7b,85,73,fa,e2,c7,66,e5,ce,e9,8b,1f,9b,86,a7,a4,2d,41,6a,e4,15,96,b5,84,a9,91,66,5a,da,12,a4,c6,ea,69,76,53,90,a,a7,a7,59,9,7e,1c,96,66,9c,cd,f9,b1,69,78,48,56,e7,c7,c1,9e,2e,5d,5c,90,1a,79,85,e4,45,61,6c,c2,39,de,6e,24,cd,ba,b1,4b,ba,11,95,e8,c6,ee,e9,86,57,a2,7b,a8,a7,6b,56,e,11,a9,9e,75,e8,29,64,a4,46,d7,a6,a6,10,91,1a,5d,87,92,62,a5,5b,74,69,6a,4a,95,66,de,a5,e9,29,57,98,7b,eb,66,c5,5a,6e,19,8d,9a,13,72,76,9a,d5,6a,5e,c,95,9e,b6,ba,f9,c9,55,7a,da,ea,16,26,5f,99,a9,ab,5b,94,62,64,84,2d,19,49,ca,9e,11,b6,64,a4,39,7a,44,da,9c,96,e5,a2,65,91,93,5b,9e,ab,7a,44,4e,19,45,49,a1,5e,de,78,54,d5,85,59,79,93,51,17,ef,66,15,4d,46,53,bc,ab,55,34,1d,6d,d,ae,9a,d1,76,74,2d,b8,4a,44,9b,d1,b7,e8,2a,11,69,da,50,52,a8,97,37,e,55,d,61,9a,de,26,d5,c5,bb,59,45,93,d0,d4,60,aa,99,dd,52,5b,83,ab,66,b4,d,5d,b,ae,12,d1,c6,f5,2d,ba,4a,44,1a,35,94,14,ea,e5,8d,1f 2 | -------------------------------------------------------------------------------- /lpc/warrior-death.lpc: -------------------------------------------------------------------------------- 1 | 83,5b,9e,4b,5d,88,d,6e,5a,4d,2e,15,37,f8,e5,d5,31,23,ec,10,ba,16,93,71,6b,43,ec,8a,5d,27,ac,d,b1,b,a,9f,8c,36,c4,ee,d4,6d,54,ec,10,a6,61,97,e,63,43,98,56,9c,27,cc,d,61,59,71,1e,37,3b,a4,65,39,65,4d,ec,90,96,e1,d4,76,b3,43,9e,9a,52,d7,a4,e,65,8,69,1d,96,3f,94,21,a5,ad,59,fa,50,87,90,b6,66,f9,43,1b,82,db,5a,a4,f,bd,b,1d,6b,a2,3f,8c,26,6c,ac,89,fe,30,aa,b0,b1,26,fa,c3,6c,42,db,86,e8,f,ab,71,49,5b,95,3f,9c,c6,39,f4,42,da,70,bb,e0,b6,51,69,c3,6b,42,db,86,e5,f,b7,9,1b,6b,92,3f,bc,2a,6c,ac,50,fe,f0,8a,f4,b5,46,79,cd,cf,d2,c7,1a,95,b5,20,4b,6b,1f,52,d6,c2,c2,6d,ac,59,79,b,2b,97,b1,65,7b,2d,2c,dc,c6,47,9c,b5,b0,70,1d,5f,51,de,a2,2c,b4,fd,44,79,8b,b2,d4,8a,61,e5,23,ca,c2,c7,92,95,b7,38,b,1f,2b,72,de,e2,24,6c,7c,c8,7d,8b,13,d7,ce,f,69,2d,4d,4c,3b,2f,a4,b5,34,33,e9,d8,14,d7,d2,cc,a4,e3,5c,5a,4b,b,e3,f1,75,71,2d,ab,9c,db,c7,c4,b5,bc,a,29,6f,95,de,f2,2a,64,ac,59,7e,cb,1b,e7,f1,54,e9,2d,af,42,c6,4b,a4,b7,a2,70,69,1f,56,de,8a,ca,b9,a3,54,7a,2b,2b,e7,c9,54,e9,ad,ac,5c,26,43,a4,b7,b2,31,e9,4a,11,df,aa,c6,b8,b2,5d,78,ab,1a,e7,ca,9,e3,ad,ea,9c,aa,da,8d,b5,aa,73,ca,9a,30,d6,aa,ce,38,6b,c2,58,ab,3a,e5,aa,71,63,ad,ee,94,b3,26,82,b5,ba,53,ce,dc,30,d6,ea,46,39,73,c3,58,ab,3b,e3,c8,c9,60,ad,6e,44,aa,26,8c,b5,a6,62,e9,1e,33,de,ea,8a,a5,6b,cc,78,6b,2b,d6,ce,56,f3,ad,2d,c8,27,9c,e2,f7,b6,b5,5,c5,44,50,fc,d6,56,68,93,41,d1,5b,17,59,8d,7,25,6f,7d,c3,52,d5,6a,bc,c,59,64,57,b0,f4,30,24,95,95,85,f2,d4,d4,a8,96,f,49,7b 2 | -------------------------------------------------------------------------------- /lpc/good_choice_kid.lpc: -------------------------------------------------------------------------------- 1 | 8,8,6,b3,d4,d9,b1,57,67,c8,51,17,c7,5e,9d,a5,46,5d,1c,7b,75,56,1a,55,f3,ac,d1,59,6a,54,d5,b1,c4,44,a9,51,35,2b,ec,93,93,46,d3,ac,90,5d,54,2a,5d,f3,2,76,3e,51,8c,51,b2,dd,92,28,0,0,4,a4,62,50,f2,10,cc,2c,bd,63,cb,7c,76,b7,88,86,2d,f2,d9,3d,b4,1a,36,cf,e7,f0,94,6e,d8,dc,18,cc,53,7b,52,73,a3,57,aa,8c,2a,2a,8,8e,65,5b,2,a9,c2,5a,d6,dd,b0,cc,7a,cf,5c,a3,d2,34,1,6,11,67,c0,e0,ea,2,58,5a,54,1,5b,8b,29,a0,4a,93,96,c6,c4,da,1e,89,46,1a,b3,9b,7b,b4,1e,71,68,61,16,b6,6a,84,b1,86,9b,fb,aa,e1,c7,12,ee,ee,2b,87,97,a3,6b,a4,2d,1c,41,49,e4,e1,39,7b,c4,35,90,56,e7,c2,91,57,cb,18,9b,b5,5a,d3,2c,a3,67,8e,4e,e3,14,ce,64,91,8a,1,5d,b8,30,60,6b,71,2,14,ea,c,20,80,ca,d5,8,50,90,68,cb,b2,22,8f,aa,48,a3,a8,8e,d9,b3,6a,8d,b2,7a,e1,ac,ac,35,8a,1a,59,32,ab,d6,28,8a,67,a9,a8,ca,a5,2c,8e,c4,dd,a7,b0,8a,cb,88,ce,90,14,ba,e5,45,55,c2,52,29,57,75,c1,30,db,23,ae,5a,98,ba,5a,f,af,5a,43,ed,6c,3d,9c,9a,9c,2c,75,e5,b0,8b,2f,92,d6,96,c6,d,3a,28,db,16,1a,3f,aa,60,2f,5d,34,bc,ac,53,3d,64,e1,8,62,28,f7,88,96,23,8a,a9,4c,33,56,8f,34,86,a,2e,6f,d4,aa,4c,2d,22,d8,f1,68,93,1e,4f,d3,55,a3,8d,66,4b,c3,5a,96,2e,c8,2f,35,5a,54,fa,84,6f,58,a5,75,e8,13,be,25,f2,d4,a1,f,f4,7,39,92,a4,26,90,6f,e2,48,9a,ca,84,6e,90,aa,4e,4b,33,ba,46,cb,c4,2d,8,e1,5c,bc,2b,f,37,c5,35,f5,ae,d2,ac,94,c7,2c,ba,4a,b3,42,29,b5,c8,4a,c1,f,d1,45,5d,6b,85,24,78,17,73,a9,d3,8a,94,54,dd,bc,f2,a8,93,57,2f,ef,d2,65,48,5e,b2,e2,42,87,21,7a,c9,cc,b,cd,0,1d,b4,10,c0,6a,d9,3 2 | -------------------------------------------------------------------------------- /lpc/stuart-welcome-nb.lpc: -------------------------------------------------------------------------------- 1 | C5,6B,C2,CD,CC,6C,37,B7,72,53,33,B3,1D,62,4F,3C,23,DC,76,89,32,33,75,73,DB,2D,AB,DC,D5,CC,6C,87,D8,B2,CC,0C,B7,D4,C2,CC,CC,C2,3D,CE,08,12,0B,0F,77,DB,2D,F0,32,23,CD,12,97,30,68,AF,12,49,33,C2,A4,23,53,34,C9,08,93,C9,0C,B6,24,23,0C,3E,33,D8,92,AE,30,CB,88,34,B7,53,42,6F,B3,42,CD,6E,0B,A3,CC,2C,33,DB,2D,8C,A6,22,4C,E4,B4,30,AA,0A,17,B3,53,C2,A0,2A,5D,D5,4E,08,9D,C8,4C,33,3B,29,08,3C,3C,DC,ED,A4,AC,72,33,33,B3,0D,00,A0,80,D0,53,D2,92,4D,A7,A9,DA,69,49,E6,61,AE,6A,BB,64,51,66,04,AB,9D,91,65,E6,1E,E1,B6,47,96,58,78,46,38,2E,59,10,11,99,E1,B8,64,95,9B,99,BB,ED,94,15,66,6A,EE,B6,4B,56,B9,A9,9A,D9,4E,59,E5,AE,EA,66,3B,64,85,9A,AA,99,9D,90,15,66,AA,E6,B6,4B,DE,B8,99,99,D9,4E,79,65,A6,6A,66,3B,A4,85,99,A8,B9,9D,94,57,6E,AA,66,B2,43,5E,88,AA,BA,DB,69,75,94,EE,E1,91,B4,84,59,A7,99,A9,9D,52,25,ED,E6,61,52,4A,94,B4,5B,86,4A,6E,41,54,61,91,6E,27,05,5E,45,56,B8,14,47,7B,1D,51,2E,52,52,9E,B8,7B,A4,DB,0A,41,14,A1,56,2E,19,08,40,68,04,00,00,40,2A,9B,89,0C,63,CB,29,8B,C6,24,5C,E5,A6,2C,39,B7,08,96,9D,C2,AC,DC,C2,45,CE,58,93,2F,0F,37,27,AD,8B,D9,3B,C5,9C,36,36,F9,8C,32,49,5A,D8,E4,2A,C2,3C,49,E2,63,A8,08,B3,B4,41,8C,3E,23,4C,D2,A5,35,D9,4A,37,71,EB,9C,CA,D5,C3,34,49,E8,76,70,0B,53,3B,0A,28,8C,C4,00,2B,89,18,60,28,44,05,4C,A7,E2,80,A9,89,00,01,1E,8A,80,01,8A,56,69,41,F6,AE,EE,26,A7,2D,29,A6,BA,8B,94,B6,64,5D,A6,6E,B6,CB,92,4C,9B,98,DB,0E,59,34,6D,62,6E,A7,24,55,A6,BB,A9,9D,50,17,16,EE,66,76,04,C0,54,39,03,84,09,66,00,53,A9,0C,60,32,F5,01 -------------------------------------------------------------------------------- /lpc/ive-not-seen-such-bravery.lpc: -------------------------------------------------------------------------------- 1 | a9,8,2d,8b,b2,6b,b5,24,c5,2a,93,9a,33,a2,1c,32,cd,6a,f6,88,72,70,f3,e8,c5,23,2c,41,cc,bd,66,b7,20,39,8e,cc,9c,14,d2,a2,dc,dd,d5,76,4a,b3,cd,72,d7,38,25,ce,3e,d2,2c,2b,25,2f,7b,73,d5,2a,31,dc,ec,4d,d5,73,f2,70,92,d7,34,ef,2a,c3,cb,29,dd,22,2a,8f,20,e7,74,8f,98,3d,82,5c,cc,d5,bb,a,10,80,47,b,e3,64,67,e1,56,95,83,57,55,87,7b,c4,9,7e,55,eb,61,de,5a,0,49,2d,33,60,b2,30,6,6c,1e,ce,80,2d,c3,18,b0,55,5a,31,9a,67,51,9d,ca,cd,a8,52,a4,7a,2,15,ab,30,d1,9e,36,5c,ec,8c,35,7a,42,48,71,a,51,ed,73,2a,c5,ad,58,34,2f,a4,16,af,63,91,58,93,db,fc,21,95,62,4c,4e,9,9a,62,e9,36,3b,29,4a,4a,3d,cd,63,bb,38,28,8d,f2,a8,14,92,a0,dc,c2,b3,52,48,83,b4,48,8b,ca,21,8b,5c,62,5c,6b,87,22,71,b1,a,6d,1c,da,49,dc,49,3c,b5,0,1a,34,13,40,85,ae,c,28,50,cd,c5,9d,b9,b8,49,ed,52,86,6c,6e,31,51,5a,9d,75,65,a8,df,19,4d,32,e5,ee,79,7b,34,45,85,b9,d5,12,53,77,6d,ae,62,49,8,50,a1,84,2,a,b5,72,40,53,1a,c,48,36,9d,0,45,85,81,a9,bd,d3,70,57,27,a6,76,c3,c4,dd,9c,98,c6,1f,b4,6e,53,eb,ea,b0,21,db,25,6b,aa,e3,c4,4c,93,ac,ad,89,49,3d,2d,96,8e,36,3b,d3,88,58,32,ea,62,4d,ad,6a,c9,e8,ab,35,e5,ca,37,a3,ef,36,94,c2,d7,94,ae,24,36,4b,69,ec,9a,94,cc,dc,3d,6d,68,b3,37,d,8b,ca,a9,8f,de,d4,dc,ed,b6,3e,5a,77,4d,8b,db,fa,e8,c2,34,2d,6e,e8,43,23,cf,b4,c4,a1,8f,d,23,4b,b2,a4,21,55,8c,4c,eb,dc,c6,9c,44,2d,7d,cd,98,aa,35,95,88,25,63,6a,d6,95,bd,96,8c,a9,1b,33,8a,5c,d2,e6,ae,4d,29,72,49,99,87,54,95,c8,25,65,e9,4a,45,b2,e6,86,ad,3a,11,ee,a8,a7,f6,68,cd,ac,23,2a,3b,83,d2,88,71,43,f 2 | -------------------------------------------------------------------------------- /lpc/dont-shoot-your-friends-on-this-level.lpc: -------------------------------------------------------------------------------- 1 | 25,69,da,d4,c4,56,8f,28,45,49,f6,5e,32,a2,14,23,95,72,cd,8,a2,ce,2e,b2,34,c3,b,b6,da,20,9c,34,c7,ba,68,93,70,e3,1c,6b,ac,85,32,e,8,a0,69,b,5,34,99,69,80,69,55,c,b0,52,aa,2,56,2c,13,c0,28,93,c5,ae,39,9d,58,e3,34,37,7b,36,77,6e,9b,dc,e4,c8,3d,24,9d,f3,aa,34,57,e1,b4,c,e8,9c,49,1,3d,98,26,bf,b7,e,21,72,d2,e2,12,85,3c,a5,6b,8b,83,37,cb,e4,d5,2d,f5,29,35,83,16,b7,cc,d7,d4,4c,5c,5c,72,3f,38,53,65,71,6a,53,8c,30,37,bb,2,28,c1,55,0,c3,75,b8,b8,9b,30,35,77,a2,92,ac,c2,c3,dd,8e,c9,8a,f4,a8,70,ab,c,68,26,3c,85,61,73,84,ab,d3,12,84,4e,ed,29,9d,5a,10,33,97,45,34,1e,61,8e,66,66,b1,78,44,39,aa,79,56,ed,91,e4,24,61,d5,51,46,56,63,a8,49,d5,19,45,89,21,66,53,a5,55,c9,84,26,67,d4,d6,26,a7,1e,5a,6a,5a,57,82,99,72,26,6a,7d,31,1a,26,ed,a8,74,c5,69,b0,b5,ed,32,d6,e8,a6,5c,b1,cb,5c,7d,88,c9,44,76,6b,92,62,c9,15,d9,ac,91,ab,95,54,64,2,30,1d,21,80,4,dc,5,90,a1,ba,0,3a,54,23,80,35,66,8,90,d1,3d,4d,31,55,93,f6,9c,36,25,df,ad,6c,53,c7,94,75,b7,a9,ce,1d,53,72,9b,ac,31,b5,2c,59,97,1b,db,9c,30,17,29,6e,e8,6d,cc,1c,b9,9b,4b,b4,32,6b,74,99,c2,6e,d9,ad,31,ba,b3,59,e4,36,35,67,21,aa,b3,c6,dc,ad,b9,a8,6d,1a,4b,b3,ee,86,be,39,ad,d5,9a,2b,f4,1a,6,c,e8,c2,80,49,5d,5,70,45,98,0,36,11,b,63,35,e6,ca,d1,d0,4d,91,96,a5,46,69,37,7,76,c6,6e,4b,d2,1c,f5,38,7b,cd,2d,53,8a,15,6c,3b,b5,4d,d9,75,aa,d4,d5,32,a7,5c,a6,3e,e3,ca,92,42,bb,92,5f,31,4b,a,25,2c,5e,3b,ac,3e,4e,88,d4,d5,b0,fa,bc,ca,5e,63,dc,e6,db,88,58,4f,35,bb,2b,c7,1c,39,45,6d,b6,6e,88,64,9c,7 2 | -------------------------------------------------------------------------------- /lpc/save_keys_to_open_doors.lpc: -------------------------------------------------------------------------------- 1 | c,38,22,43,0,4b,a5,9,60,ab,f6,96,e,95,62,62,8d,5b,94,13,b9,cf,c4,1d,71,4b,2a,ea,53,77,84,d5,91,79,6d,9d,11,b4,28,14,d9,55,46,d0,1c,53,55,45,19,61,35,4c,d3,19,75,84,55,93,54,4f,98,11,b6,c0,1c,de,55,5a,d2,bc,b1,79,55,49,51,f3,22,96,5d,27,4,2d,8,5b,66,12,17,34,4f,1c,39,61,42,d8,9d,9a,ba,39,35,e1,50,22,5a,19,87,0,2b,99,8,60,48,b6,64,57,41,92,ed,b6,87,dd,1d,63,4d,5a,6e,f6,10,82,b9,69,a6,b9,5d,9,f6,86,95,e6,75,43,58,95,76,46,30,9d,a1,75,c5,6e,f1,d4,82,3e,6d,a7,a5,43,a,c6,76,dc,91,f,23,e8,3d,71,46,35,8c,a0,75,c7,1e,75,b7,8a,16,5b,7b,b4,dd,19,9a,de,9c,d6,f,57,68,30,b3,5d,38,a4,91,6b,a4,72,e9,52,cd,c2,da,c8,e5,4b,7,99,68,6a,57,4c,5d,a2,ac,89,5c,3d,4c,90,91,a7,26,40,f,8a,4,8,5c,5,18,d0,b5,5b,4a,4b,30,36,b1,b4,2d,f,51,52,b8,db,b4,dc,fb,32,67,db,52,aa,c8,27,53,29,77,e9,82,ba,72,a6,de,ad,c9,64,ba,1c,72,8f,32,ca,2b,13,ea,3c,f2,a0,ae,54,b8,f3,c8,82,ba,16,e1,cc,2d,f3,6a,db,44,52,99,3a,b0,8e,50,4e,4d,80,a0,2e,47,5c,5d,a4,9a,39,1d,69,e,1e,62,51,67,e4,29,9a,b1,67,ed,91,27,6d,19,ea,66,5a,9e,b4,84,79,da,2e,65,52,1c,66,65,27,d4,5e,72,a7,66,94,50,5b,69,61,91,89,a1,95,c3,a7,49,48,9c,51,a4,2c,26,56,75,46,19,b2,85,aa,2d,1e,a5,4b,ed,aa,d6,b9,55,b6,8c,ab,58,d7,51,db,32,66,22,5d,46,eb,43,45,b,76,1e,9d,8f,65,15,d4,75,8c,d1,97,64,63,ee,31,a7,18,d2,8d,9d,db,9a,aa,4a,17,2e,69,6b,aa,a2,9d,b4,a6,ac,a9,92,75,c8,e6,b6,e4,62,1c,a1,ab,db,56,6c,18,6b,4c,2e,7b,36,61,6e,55,36,ed,c9,86,7a,46,b8,b0,67,5f,ec,2d,ce,8,10,62,30,3,a2,f,26,40,54,25,4,48,bc,19,1,5e,95,3e 2 | -------------------------------------------------------------------------------- /lpc/shots-do-not-hurt-other-players-yet.lpc: -------------------------------------------------------------------------------- 1 | 8,68,55,9d,1,63,8d,b,60,f4,29,3,f4,19,d1,bc,52,c4,cd,bd,4e,b,52,aa,8,8d,39,cd,8f,65,cc,32,6b,37,3f,95,74,8b,aa,d3,fc,5c,3c,cc,bb,6e,b,4b,b0,a4,ec,a6,2,a8,6,45,79,35,a9,aa,5b,9d,14,14,3d,1e,1a,69,53,30,58,55,86,25,d,7e,15,db,aa,b1,d4,f8,b9,7a,68,74,1d,4,84,a4,99,bc,59,dc,d5,d4,72,9,4a,21,63,b7,cd,2d,c8,91,5c,5d,ba,94,30,17,72,13,77,57,82,92,25,18,ab,76,f3,73,90,d4,c8,3a,c3,cb,29,5c,3d,ab,c,27,15,f,f5,aa,da,ac,d4,2c,2c,ba,6c,b3,72,d2,92,ec,a8,c6,2e,51,42,a2,22,97,a0,bb,70,56,8f,5c,82,9a,d4,c4,ad,49,f1,4a,35,37,f7,3a,cd,cd,d9,cc,d2,c2,34,37,37,d6,4c,a9,5a,dc,dc,29,dc,b4,59,71,f3,c0,32,8e,36,c9,cd,7,dd,cd,d2,30,a0,15,9,6,d4,ac,56,b2,12,c4,bc,ab,ce,c8,4a,63,f3,9c,38,23,2d,55,dc,aa,ad,b6,38,46,b3,8c,b2,ea,f2,dc,51,23,d2,59,8b,b2,77,35,e9,38,2b,4e,51,dc,a2,16,b7,34,f,4a,63,5f,55,b2,d8,29,5c,2d,6d,a8,4a,15,b7,ec,38,c0,80,e2,24,8,90,24,54,8a,8a,72,57,8f,36,25,8c,de,cd,d3,6c,8f,20,86,34,cb,88,32,c2,98,4a,35,ab,ca,8,4b,70,53,cf,d9,23,ac,c9,54,3d,e7,8c,a8,46,65,cf,9a,33,b2,5a,8d,d5,63,f5,a8,6a,74,d2,f2,4e,ad,2b,d9,c9,4a,7a,b7,a1,14,23,6b,ee,5d,c6,dc,95,b5,a4,6d,99,4a,57,91,d4,b6,69,a9,c1,58,2b,3a,a7,a5,85,16,4e,f7,5a,96,e6,5a,38,bc,19,1,a2,77,22,40,4c,a4,4,88,11,3,1,2e,70,20,80,85,8,0,0,80,30,4d,ad,82,56,8d,db,30,bd,29,72,2e,19,6d,f7,21,a8,b9,66,d4,2d,86,88,d5,92,51,55,9f,62,51,4b,46,5d,6d,aa,47,2e,19,7d,9,c5,16,35,7,8,10,84,7,3,a2,14,33,75,f3,21,62,b9,c4,55,cd,96,a8,57,13,d7,34,dd,62,11,4b,54,5b,5d,89,79,4f,25,80,f,e6,f 2 | -------------------------------------------------------------------------------- /BlueWizard/PlayheadView.m: -------------------------------------------------------------------------------- 1 | #import "PlayheadView.h" 2 | #import "Sampler.h" 3 | #import "WaveformView.h" 4 | 5 | @interface PlayheadView () 6 | @property (nonatomic) float containerWidth; 7 | @property (nonatomic, strong) NSTimer *timer; 8 | @end 9 | 10 | @implementation PlayheadView 11 | 12 | -(instancetype)initWithCoder:(NSCoder *)coder { 13 | if (self = [super initWithCoder:coder]) { 14 | self.containerWidth = self.superview.frame.size.width; 15 | } 16 | return self; 17 | } 18 | 19 | -(void)setSampler:(Sampler *)sampler { 20 | _sampler = sampler; 21 | if (!sampler) { 22 | [self.timer invalidate]; 23 | self.timer = nil; 24 | return; 25 | } 26 | 27 | if (self.timer) return; 28 | self.timer = [NSTimer timerWithTimeInterval:1.0 / 60.0 target:self selector:@selector(updatePosition) userInfo:nil repeats:YES]; 29 | [[NSRunLoop mainRunLoop]addTimer:self.timer forMode:NSRunLoopCommonModes]; 30 | } 31 | 32 | -(void)drawRect:(NSRect)dirtyRect { 33 | [[NSColor purpleColor] setFill]; 34 | NSRectFill(NSMakeRect(dirtyRect.origin.x, dirtyRect.origin.y, 2.0f, dirtyRect.size.height)); 35 | [super drawRect:dirtyRect]; 36 | } 37 | 38 | -(void)updatePosition { 39 | float position = self.containerWidth / self.sampler.bufferSize * self.sampler.index; 40 | [self setFrameOrigin:NSMakePoint(position, 0)]; 41 | [self.waveformView setNeedsDisplay:YES]; 42 | } 43 | 44 | @end 45 | -------------------------------------------------------------------------------- /lpc/your-life-force-is-running-out.lpc: -------------------------------------------------------------------------------- 1 | 6a,e9,c,cd,a3,2a,a7,b1,5,32,cc,5a,5c,86,14,28,34,62,71,ea,42,96,50,8f,2d,69,a,55,53,d4,37,a7,29,34,2d,56,df,9c,a6,d8,a4,44,63,73,99,52,95,12,b7,cd,65,49,59,42,5a,37,97,36,39,49,ce,cc,53,ba,a2,a5,21,b2,57,99,8a,e2,41,ed,4e,61,8a,c6,1a,a5,9b,b4,31,e4,4e,ca,9a,33,fa,14,ba,d9,ab,e9,e8,4a,88,51,ab,35,a3,ae,3e,dd,22,d7,8c,bc,38,51,af,a9,3c,f2,a6,95,a5,7a,4e,2a,8b,3,8f,aa,28,2,a8,31,42,0,d5,65,86,ae,f8,2c,b7,68,2a,80,1a,22,4d,5e,bd,aa,65,cf,66,40,d7,c6,2,70,d9,3b,54,ba,67,1a,7a,92,56,d9,d8,91,22,49,5a,e9,62,5b,2b,75,29,85,6b,c1,6d,ba,39,95,be,b1,b7,fa,eb,54,c6,8a,d1,16,1b,53,95,a,a6,7b,36,4c,75,e7,1c,d9,e6,88,1,93,68,30,a0,e3,34,6,74,d0,69,8a,8a,d7,82,a3,a9,2a,2b,59,b2,cc,64,aa,6c,6a,c8,24,92,32,a0,92,60,2,4c,95,46,80,c9,53,cc,56,b8,71,54,57,4e,7d,56,22,51,3d,ba,74,59,98,7a,e5,c4,d4,17,a1,52,d2,b,c3,34,a5,89,b8,ac,62,40,e4,64,4,f0,56,14,1,3e,a3,99,2e,3b,13,33,8d,6a,aa,60,dc,22,cc,aa,2b,4d,72,73,4f,79,25,f1,95,da,b4,1a,b7,38,54,2b,89,2a,d3,e2,58,25,a5,3b,ea,88,52,92,e4,8b,2a,29,8c,9a,87,d3,65,95,20,1b,4e,f3,96,34,c2,6a,c5,bc,26,cc,8,9b,62,9b,8a,b0,25,4c,46,2a,25,ad,94,30,19,19,9,57,9c,82,68,a5,a4,c3,56,b1,4b,e0,d2,ee,da,2a,4c,41,52,a3,4d,a5,b0,78,75,f3,50,d6,aa,dc,c3,c3,b2,4a,cb,d2,74,77,af,aa,2d,4f,53,4b,aa,a3,b6,32,f6,8,8b,aa,32,ea,98,aa,cc,72,d1,e8,42,ec,70,8d,59,6d,c,a1,33,28,16,b7,d9,a7,28,95,4a,dc,f6,58,5d,c3,c2,32,3,c2,a0,72,65,ea,1e,e6,55,c5,d5,31,55,b9,e6,22,d3,86,58,69,9a,8b,d4,10,7c,55,51,2c,66,40,17,e1,4,88,b4,93,0,89,87,22,a0,38,c7,7 2 | -------------------------------------------------------------------------------- /lpc/your-shots-now-stun-other-players.lpc: -------------------------------------------------------------------------------- 1 | a6,ae,82,55,3a,1b,b9,26,5a,92,de,48,94,aa,10,c9,dd,63,75,ab,a2,4e,8b,90,6c,ad,8a,ba,dd,0a,bb,b6,2a,b8,d6,6c,e8,5c,aa,10,4b,a2,61,73,a9,63,73,ca,a2,5c,a9,cc,1b,a5,55,3b,32,a0,8e,30,06,8c,51,c6,80,d9,d3,19,30,73,1a,03,46,af,68,51,6f,26,a6,92,74,a4,29,5b,9a,f5,dc,91,67,5d,55,26,73,47,99,4d,57,98,3c,1d,75,b6,5d,e1,b2,64,d4,c5,4d,b8,f9,9d,d1,66,5b,1a,32,73,41,00,39,44,31,20,eb,2a,06,54,55,c9,80,26,a6,08,10,45,05,cb,3d,8b,c8,74,db,aa,d2,ca,33,35,23,b7,b2,06,75,b2,ae,32,f2,9a,3c,d4,72,ce,c8,4b,c9,30,cf,2a,23,2f,be,22,3c,e6,8c,2c,fb,aa,94,98,d3,b2,98,db,cd,6b,4a,cb,62,1e,17,ad,c9,2d,f3,a9,42,2d,e3,b6,34,7a,2b,d1,88,5a,f2,6a,db,35,ac,b4,00,8a,e8,64,40,16,1b,0c,48,66,82,01,49,75,12,20,91,69,04,c8,ae,0e,02,c8,dc,ad,79,c9,bb,59,66,95,16,86,e6,1a,5d,65,5b,1c,f3,28,67,55,69,69,f6,e7,14,51,a7,e5,c5,ac,b3,c7,ec,56,15,b3,c6,11,93,5b,5d,6d,b9,48,4c,6e,75,32,1a,66,15,bb,94,d1,87,ab,a5,e9,52,26,97,26,ea,61,46,5d,6d,86,b1,97,19,5d,09,e9,1a,31,7b,34,25,78,6a,46,ed,91,66,9f,61,de,b5,47,5c,6c,84,cb,cc,09,59,d5,a9,86,56,99,01,ca,85,95,30,b8,e4,a8,9c,9d,c2,50,28,2a,73,51,8a,42,21,cf,f0,26,31,72,a1,cb,62,11,6e,07,80,00,c9,58,ba,38,78,57,9d,8a,d3,a2,10,c6,c5,6a,ca,48,a2,6b,33,ab,c9,23,cd,c9,4d,35,67,8f,ac,44,55,8b,5c,3c,8a,5a,54,34,b2,f5,a8,6b,51,e6,f2,2d,a3,a9,c5,98,d3,b6,8c,b2,64,96,28,6f,d3,a6,32,44,c2,65,49,9b,72,17,89,92,b5,65,c9,83,d5,dd,9a,a5,2d,0f,31,35,6d,97,f6,d2,4c,d5,79,69,3a,4b,52,d1,90,2e,e6,c8,45,44,43,db,22,40,67,6a,02,84,68,42,80,a4,8b,11,10,6d,08,02,92,48,45,40,e4,2d,0f,e8,32,0c 2 | -------------------------------------------------------------------------------- /BlueWizardTests/BufferTests.m: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | #import "Buffer.h" 4 | 5 | @interface BufferTests : XCTestCase 6 | 7 | @end 8 | 9 | @implementation BufferTests { 10 | Buffer *subject; 11 | double *samples; 12 | } 13 | 14 | -(void)setUp { 15 | [super setUp]; 16 | samples = malloc(sizeof(double) * 3); 17 | samples[0] = 2.0f; 18 | samples[1] = 3.0f; 19 | samples[2] = 4.0f; 20 | subject = [[Buffer alloc] initWithSamples:samples size:3 sampleRate:8000]; 21 | } 22 | 23 | -(void)tearDown { 24 | free(samples); 25 | [super tearDown]; 26 | } 27 | 28 | -(void)testItCopiesTheSamples { 29 | XCTAssertEqual(subject.samples[0], 2.0f); 30 | XCTAssertEqual(subject.samples[1], 3.0f); 31 | XCTAssertEqual(subject.samples[2], 4.0f); 32 | } 33 | 34 | -(void)testItKnowsItsSize { 35 | XCTAssertEqual(subject.size, 3); 36 | } 37 | 38 | -(void)testItKnowsItsEnergy { 39 | XCTAssertEqual([subject energy], 29.0f); 40 | } 41 | 42 | -(void)testItKnowsItsSampleRate { 43 | XCTAssertEqual([subject sampleRate], 8000); 44 | } 45 | 46 | -(void)testItCanBeCopied { 47 | Buffer *buffer = [subject copy]; 48 | 49 | XCTAssertEqual(buffer.samples[0], 2.0f); 50 | XCTAssertEqual(buffer.samples[1], 3.0f); 51 | XCTAssertEqual(buffer.samples[2], 4.0f); 52 | XCTAssertEqual(buffer.size, 3); 53 | XCTAssertEqual([buffer energy], 29.0f); 54 | XCTAssertEqual([buffer sampleRate], 8000); 55 | 56 | buffer.samples[0] = 1.0f; 57 | 58 | XCTAssertEqual(subject.samples[0], 2.0f); 59 | } 60 | 61 | @end 62 | -------------------------------------------------------------------------------- /BlueWizard/SpeechDataReader.m: -------------------------------------------------------------------------------- 1 | #import "SpeechDataReader.h" 2 | 3 | @interface SpeechDataReader () 4 | 5 | @end 6 | 7 | @implementation SpeechDataReader 8 | 9 | +(NSArray *)speechDataFromFile:(NSString *)file { 10 | NSArray *dataFiles = [[NSBundle mainBundle] pathsForResourcesOfType:@"lpc" 11 | inDirectory:nil]; 12 | NSString *foundFile; 13 | for (NSString *dataFile in dataFiles) { 14 | NSString *key = [[dataFile componentsSeparatedByString:@"/"] lastObject]; 15 | key = [[[key componentsSeparatedByString:@"."] firstObject] lowercaseString]; 16 | 17 | if ([key isEqualToString:file]) { 18 | foundFile = dataFile; 19 | break; 20 | } 21 | } 22 | 23 | NSAssert(foundFile, @"file not found!"); 24 | file = foundFile; 25 | 26 | NSData *myData = [NSData dataWithContentsOfFile:file]; 27 | NSString *string = [[NSString alloc] initWithData:myData encoding:NSUTF8StringEncoding]; 28 | return [self speechDataFromString:string]; 29 | } 30 | 31 | +(NSArray *)speechDataFromString:(NSString *)string { 32 | NSArray *components = [string componentsSeparatedByString:@","]; 33 | NSMutableArray *speechData = [NSMutableArray arrayWithCapacity:[components count]]; 34 | for (NSString *component in components) { 35 | NSScanner *scanner = [NSScanner scannerWithString:component]; 36 | unsigned int hex; 37 | [scanner scanHexInt: &hex]; 38 | [speechData addObject:[NSNumber numberWithUnsignedInteger:hex]]; 39 | } 40 | return [speechData copy]; 41 | } 42 | 43 | @end 44 | -------------------------------------------------------------------------------- /BlueWizard/Media.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "size" : "16x16", 5 | "idiom" : "mac", 6 | "filename" : "blue-wizard-16.png", 7 | "scale" : "1x" 8 | }, 9 | { 10 | "size" : "16x16", 11 | "idiom" : "mac", 12 | "filename" : "blue-wizard-32-1.png", 13 | "scale" : "2x" 14 | }, 15 | { 16 | "size" : "32x32", 17 | "idiom" : "mac", 18 | "filename" : "blue-wizard-32.png", 19 | "scale" : "1x" 20 | }, 21 | { 22 | "size" : "32x32", 23 | "idiom" : "mac", 24 | "filename" : "blue-wizard-64.png", 25 | "scale" : "2x" 26 | }, 27 | { 28 | "size" : "128x128", 29 | "idiom" : "mac", 30 | "filename" : "blue-wizard-128.png", 31 | "scale" : "1x" 32 | }, 33 | { 34 | "size" : "128x128", 35 | "idiom" : "mac", 36 | "filename" : "blue-wizard-256-1.png", 37 | "scale" : "2x" 38 | }, 39 | { 40 | "size" : "256x256", 41 | "idiom" : "mac", 42 | "filename" : "blue-wizard-256.png", 43 | "scale" : "1x" 44 | }, 45 | { 46 | "size" : "256x256", 47 | "idiom" : "mac", 48 | "filename" : "blue-wizard-512-1.png", 49 | "scale" : "2x" 50 | }, 51 | { 52 | "size" : "512x512", 53 | "idiom" : "mac", 54 | "filename" : "blue-wizard-512.png", 55 | "scale" : "1x" 56 | }, 57 | { 58 | "size" : "512x512", 59 | "idiom" : "mac", 60 | "filename" : "blue-wizard-1024.png", 61 | "scale" : "2x" 62 | } 63 | ], 64 | "info" : { 65 | "version" : 1, 66 | "author" : "xcode" 67 | } 68 | } -------------------------------------------------------------------------------- /BlueWizard.xcworkspace/xcshareddata/BlueWizard.xccheckout: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDESourceControlProjectFavoriteDictionaryKey 6 | 7 | IDESourceControlProjectIdentifier 8 | CE606DBE-2FCD-4388-BD5E-57F4A111324D 9 | IDESourceControlProjectName 10 | BlueWizard 11 | IDESourceControlProjectOriginsDictionary 12 | 13 | 2724D4DC3CD9985B07409CCF2216DA037082B099 14 | github.com:patrick99e99/BlueWizard.git 15 | 16 | IDESourceControlProjectPath 17 | BlueWizard.xcworkspace 18 | IDESourceControlProjectRelativeInstallPathDictionary 19 | 20 | 2724D4DC3CD9985B07409CCF2216DA037082B099 21 | .. 22 | 23 | IDESourceControlProjectURL 24 | github.com:patrick99e99/BlueWizard.git 25 | IDESourceControlProjectVersion 26 | 111 27 | IDESourceControlProjectWCCIdentifier 28 | 2724D4DC3CD9985B07409CCF2216DA037082B099 29 | IDESourceControlProjectWCConfigurations 30 | 31 | 32 | IDESourceControlRepositoryExtensionIdentifierKey 33 | public.vcs.git 34 | IDESourceControlWCCIdentifierKey 35 | 2724D4DC3CD9985B07409CCF2216DA037082B099 36 | IDESourceControlWCCName 37 | BlueWizard 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /BlueWizard/UserSettings.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @interface UserSettings : NSObject 4 | 5 | @property (nonatomic, strong) NSNumber *preEmphasisAlpha; 6 | @property (nonatomic, strong) NSNumber *sampleRate; 7 | @property (nonatomic, strong) NSNumber *exportSampleRate; 8 | @property (nonatomic, strong) NSNumber *frameRate; 9 | @property (nonatomic, strong) NSNumber *maxPitchInHZ; 10 | @property (nonatomic, strong) NSNumber *minPitchInHZ; 11 | @property (nonatomic, strong) NSNumber *subMultipleThreshold; 12 | @property (nonatomic, strong) NSNumber *unvoicedThreshold; 13 | @property (nonatomic, strong) NSNumber *pitchValue; 14 | @property (nonatomic, strong) NSNumber *pitchOffset; 15 | @property (nonatomic, strong) NSNumber *rmsLimit; 16 | @property (nonatomic, strong) NSNumber *unvoicedRMSLimit; 17 | @property (nonatomic, strong) NSNumber *lowPassCutoff; 18 | @property (nonatomic, strong) NSNumber *highPassCutoff; 19 | @property (nonatomic, strong) NSNumber *speed; 20 | @property (nonatomic, strong) NSNumber *windowWidth; 21 | @property (nonatomic, strong) NSNumber *unvoicedMultiplier; 22 | @property (nonatomic, strong) NSNumber *gain; 23 | @property (nonatomic, strong) NSNumber *startSample; 24 | @property (nonatomic, strong) NSNumber *endSample; 25 | 26 | @property (nonatomic) BOOL overridePitch; 27 | @property (nonatomic) BOOL preEmphasis; 28 | @property (nonatomic) BOOL normalizeVoicedRMS; 29 | @property (nonatomic) BOOL normalizeUnvoicedRMS; 30 | @property (nonatomic) BOOL excitationFilterOnly; 31 | @property (nonatomic) BOOL skipLeadingSilence; 32 | @property (nonatomic) BOOL includeHexPrefix; 33 | @property (nonatomic) BOOL includeExplicitStopFrame; 34 | @property (nonatomic) BOOL translateParameters; 35 | 36 | +(instancetype)sharedInstance; 37 | 38 | @end 39 | -------------------------------------------------------------------------------- /BlueWizard/Autocorrelator.m: -------------------------------------------------------------------------------- 1 | #import "Autocorrelator.h" 2 | #import "Buffer.h" 3 | 4 | @implementation Autocorrelator 5 | 6 | +(void)getCoefficientsFor:(double *)coefficients forBuffer:(Buffer *)buffer { 7 | for (int i = 0; i <= 10; i++) { 8 | coefficients[i] = [self aForLag:i buffer:buffer]; 9 | } 10 | } 11 | 12 | +(double)sumOfSquaresFor:(Buffer *)buffer { 13 | return [self aForLag:0 buffer:buffer]; 14 | } 15 | 16 | +(double)aForLag:(NSUInteger)lag buffer:(Buffer *)buffer { 17 | NSUInteger samples = [buffer size] - lag; 18 | double sum = 0.0; 19 | 20 | for (int i = 0; i < samples; i++) { 21 | sum += buffer.samples[i] * buffer.samples[i + lag]; 22 | } 23 | return sum; 24 | } 25 | 26 | +(void)getNormalizedCoefficientsFor:(double *)coefficients 27 | forBuffer:(Buffer *)buffer 28 | minimumPeriod:(NSUInteger)minimumPeriod 29 | maximumPeriod:(NSUInteger)maximumPeriod { 30 | 31 | for (NSUInteger lag = 0; lag <= maximumPeriod; lag++) { 32 | if (lag < minimumPeriod) { 33 | coefficients[lag] = 0.0; 34 | continue; 35 | } 36 | 37 | double sumOfSquaresBeginning = 0; 38 | double sumOfSquaresEnding = 0; 39 | 40 | double sum = 0.0; 41 | NSUInteger samples = [buffer size] - lag; 42 | for (int i = 0; i < samples; i++) { 43 | sum += buffer.samples[i] * buffer.samples[i + lag]; 44 | sumOfSquaresBeginning += buffer.samples[i] * buffer.samples[i]; 45 | sumOfSquaresEnding += buffer.samples[i + lag] * buffer.samples[i + lag]; 46 | } 47 | 48 | coefficients[lag] = sum / sqrt(sumOfSquaresBeginning * sumOfSquaresEnding); 49 | } 50 | } 51 | 52 | @end 53 | -------------------------------------------------------------------------------- /lpc/you-just-shot-the-potion.lpc: -------------------------------------------------------------------------------- 1 | 42,4e,54,2d,bb,a3,24,a9,31,a5,e8,28,5c,a4,1a,58,52,7d,64,93,8a,35,d,e3,4b,45,8e,29,58,5c,27,25,2d,64,35,65,5f,e4,9c,14,30,54,d2,89,c9,b3,10,8e,ca,2a,4,98,89,4d,0,6b,a6,9,60,e,e7,11,17,a7,6c,91,4b,46,92,6d,48,64,ac,1e,79,d6,a3,9e,b1,68,d4,d9,b4,b9,e5,e5,d2,15,5d,e6,96,77,18,50,ac,39,3,aa,51,65,40,36,c1,26,6b,22,c3,3c,96,b8,6a,28,cb,8,dd,ec,ba,21,22,cd,bc,ad,0,86,66,55,c0,4a,29,2,98,3b,2d,65,d9,93,65,66,ed,56,e5,a0,11,1e,4b,5a,97,63,94,ab,2f,69,6d,8e,d5,9c,31,a7,d5,39,d4,a8,c6,92,54,e5,d0,e9,1a,77,8,e0,9b,19,2,7c,d6,0,4,84,1e,41,80,d8,23,87,93,5c,88,6b,57,1e,4e,72,5a,2e,5d,25,b9,21,b9,9b,64,55,0,60,40,71,69,4,90,29,22,19,3e,76,a8,68,99,a2,85,1e,ce,3e,41,8b,1a,c2,86,a8,8d,29,4a,28,6d,a2,3e,b5,28,3e,a7,8b,d5,d4,22,7a,1f,69,12,8b,92,9c,1c,95,6a,d4,54,40,2b,ea,a,68,c9,cc,a8,cd,49,56,b8,14,a3,54,a3,16,11,b1,4b,5a,23,99,79,34,69,79,8a,6c,96,b9,78,94,d5,a4,51,46,d3,d1,f,e5,49,a6,6b,c3,5c,85,a8,bb,d6,71,73,55,a4,a1,5e,c7,ad,cd,a0,b9,79,5c,b7,25,2b,a6,d1,4d,c2,5a,4c,28,55,36,79,00,6b,a6,09,60,0e,e7,11,17,a7,6c,91,4b,46,92,6d,48,64,ac,1e,79,d6,a3,9e,b1,68,d4,d9,b4,b9,e5,e5,d2,15,5d,e6,96,77,18,50,ac,39,03,aa,51,65,40,36,c1,26,6b,22,c3,3c,96,b8,6a,28,cb,08,dd,ec,ba,21,22,cd,bc,ad,00,86,66,55,c0,4a,29,02,98,3b,2d,65,d9,93,65,66,ed,56,e5,a0,11,1e,4b,5a,97,63,94,ab,2f,69,6d,8e,d5,9c,31,a7,d5,39,d4,a8,c6,92,54,e5,d0,e9,1a,77,08,e0,9b,19,02,7c,d6,00,04,84,1e,41,80,d8,23,87,93,5c,88,6b,57,1e,4e,72,5a,2e,5d,25,b9,21,b9,9b,64,55,00,60,40,71,69,04,90,29,22,19,3e,76,a8,68,99,a2,87,1e,ce,3e,41,8b,1a,c2,86,a8,8d,29,4a,28,6d,a2,3e,b5,28,3e,a7,8b,d5,d4,22,7a,1f,69,12,8b,92,9c,1c,95,6a,d4,54,40,2b,ea,0a,68,c9,cc,a8,cd,49,56,b8,14,a3,54,a3,16,11,b1,4b,5a,23,99,79,34,69,79,8a,6c,96,b9,78,94,d5,a4,51,46,d3,d1,0f,e5,49,a6,6b,c3,5c,85,a8,bb,d6,71,73,55,a4,a1,5e,c7,ad,cd,a0,b9,79,5c,b7,25,2b,a6,d1,4d,c2,5a,4c,28,55,36,79,40,97,61 2 | -------------------------------------------------------------------------------- /lpc/stuart-congrats.lpc: -------------------------------------------------------------------------------- 1 | 0C,E0,A6,32,B9,59,67,98,AB,9D,E0,56,E5,E6,A1,4E,00,00,08,A0,98,07,01,2C,71,67,40,8A,19,00,C1,2B,3C,33,C2,6C,27,2F,9A,49,77,B3,3D,FC,64,3B,DC,D4,F6,08,72,F4,28,57,DB,2B,2C,21,23,4D,9D,B4,28,E7,0C,53,89,D7,A2,12,22,CD,C4,69,0B,6B,70,37,51,BB,00,00,02,E8,B9,93,01,A5,77,96,B4,44,77,11,B3,53,B2,6C,CC,5D,D5,4E,C9,8A,70,33,77,CB,29,4B,32,CC,5D,6D,A7,2C,09,37,77,B7,9D,B2,C2,DD,3C,CC,76,CA,0A,37,F3,30,C7,25,AB,4E,A2,5D,E4,B4,2C,3B,4F,67,71,DA,EA,EA,C2,5D,54,5E,6B,5A,D2,64,31,A5,0E,08,16,DD,00,C1,90,B6,A1,15,4F,56,B1,5D,E4,96,32,84,55,8E,00,9C,64,55,40,4F,1C,02,18,53,43,00,BD,46,28,A0,67,1B,05,F4,66,2D,00,A3,C5,CA,DC,4C,BA,8A,D9,11,80,11,5A,C0,00,C0,2A,81,00,86,9A,02,00,00,00,00,84,6C,44,33,16,B7,1C,E2,96,42,58,DC,0E,00,B8,B0,10,8B,C8,B0,ED,92,C8,2B,A3,5C,72,C8,92,4C,F7,34,29,29,4B,AE,DC,43,A4,94,2C,E7,74,53,B3,52,B2,3C,23,4C,D4,72,C8,92,72,51,D3,D4,29,CB,CC,D4,DD,9C,A4,AC,30,35,0F,B7,1D,A4,42,CD,2C,CD,8E,00,40,AA,4C,76,D6,6A,AE,6A,C7,01,3A,AA,AD,A3,B8,C8,50,93,BB,B6,E6,75,3C,4C,EE,D8,9A,93,F6,30,39,6D,AF,46,BB,CC,A5,38,20,58,6F,07,B8,10,D9,F6,AA,65,DA,4C,AE,01,9C,8B,29,5B,51,B2,ED,26,A5,6C,59,CA,B4,9B,ED,A4,65,61,D9,E1,96,93,93,84,67,85,DB,4E,4D,66,6A,E9,1E,1B,18,80,65,05,01,A0,AC,00,50,00,0F,99,6D,2B,46,22,33,4C,8F,3D,3B,F7,4A,95,5C,8E,2A,C2,CC,55,8A,00,88,0D,53,00,F7,1E,6D,C9,5A,23,DD,E4,A6,B9,2A,F1,30,97,8A,00,8A,3D,08,20,91,05,A4,B6,28,0B,57,B5,6B,00,19,2C,C3,52,AD,6B,04,D3,45,80,40,E6,00,00,00,02,28,42,0D,40,00,DE,84,A5,BC,A8,F0,74,93,9C,D2,A4,2B,D3,4D,76,49,63,EA,4C,53,CB,A5,88,61,2A,49,63,EA,4C,53,CA,E5,4B,35,DB,2E,4B,3D,2D,44,9C,9B,28,D2,C3,3B,90,00,00,00,0C,00,02,20,00,00,0C,00,02,20,00,00,0C,00,02,77,56,06,B0,4E,DB,01,DA,5A,00,00,DB,01,DA,5A,00,00,DB,01,DA,5A,00,0E,2B,53,D5,C6,E5,97,3F,04,85,76,75,97,3F,04,85,76,75,97,3F,04,85,76,E6,90,11,26,72,19,80,45,28,01,3C,36,05,00,00,00,30,40,F4,E4,02,08,4E,4C,00,31,B0,08,20,04,61,06,04,6F,F4,00,FF -------------------------------------------------------------------------------- /BlueWizard/RMSNormalizer.m: -------------------------------------------------------------------------------- 1 | #import "RMSNormalizer.h" 2 | #import "Reflector.h" 3 | #import "UserSettings.h" 4 | #import "CodingTable.h" 5 | #import "FrameData.h" 6 | 7 | @implementation RMSNormalizer 8 | 9 | +(void)normalizeVoiced:(NSArray *)frameData { 10 | float max = 0.0f; 11 | for (FrameData *frame in frameData) { 12 | if (![frame.reflector isUnvoiced] && frame.reflector.rms > max) max = frame.reflector.rms; 13 | } 14 | 15 | if (max <= 0.0f) return; 16 | 17 | float scale = [CodingTable rms][[self maxRMSIndex]] / max; 18 | 19 | for (FrameData *frame in frameData) { 20 | if (![frame.reflector isUnvoiced]) frame.reflector.rms = frame.reflector.rms * scale; 21 | } 22 | } 23 | 24 | +(void)normalizeUnvoiced:(NSArray *)frameData { 25 | float max = 0.0f; 26 | for (FrameData *frame in frameData) { 27 | if ([frame.reflector isUnvoiced] && frame.reflector.rms > max) max = frame.reflector.rms; 28 | } 29 | 30 | if (max <= 0.0f) return; 31 | 32 | float scale = [CodingTable rms][[self maxUnvoicedRMSIndex]] / max; 33 | 34 | for (FrameData *frame in frameData) { 35 | if ([frame.reflector isUnvoiced]) frame.reflector.rms = frame.reflector.rms * scale; 36 | } 37 | } 38 | 39 | +(void)applyUnvoicedMultiplier:(NSArray *)frameData { 40 | float multiplier = [self unvoicedRMSMultiplier]; 41 | for (FrameData *frame in frameData) { 42 | if ([frame.reflector isUnvoiced]) frame.reflector.rms *= multiplier; 43 | } 44 | } 45 | 46 | +(NSUInteger)maxRMSIndex { 47 | return [[[UserSettings sharedInstance] rmsLimit] unsignedIntegerValue]; 48 | } 49 | 50 | +(NSUInteger)maxUnvoicedRMSIndex { 51 | return [[[UserSettings sharedInstance] unvoicedRMSLimit] unsignedIntegerValue]; 52 | } 53 | 54 | +(float)unvoicedRMSMultiplier { 55 | return [[[UserSettings sharedInstance] unvoicedMultiplier] floatValue]; 56 | } 57 | 58 | @end 59 | -------------------------------------------------------------------------------- /BlueWizard/Segmenter.m: -------------------------------------------------------------------------------- 1 | #import "Segmenter.h" 2 | #import "Buffer.h" 3 | #import "UserSettings.h" 4 | 5 | @interface Segmenter () 6 | @property (nonatomic, weak) Buffer *buffer; 7 | @property (nonatomic) NSUInteger size; 8 | @property (nonatomic) NSUInteger windowWidth; 9 | @end 10 | 11 | @implementation Segmenter 12 | 13 | -(instancetype)initWithBuffer:(Buffer *)buffer 14 | windowWidth:(NSUInteger)windowWidth { 15 | if (self = [super init]) { 16 | float milliseconds = [[[UserSettings sharedInstance] frameRate] floatValue]; 17 | self.size = ceil(([buffer sampleRate] / 1000.0f) * milliseconds); 18 | self.buffer = buffer; 19 | self.windowWidth = windowWidth; 20 | } 21 | return self; 22 | } 23 | 24 | -(void)eachSegment:(void (^)(Buffer *, NSUInteger))block { 25 | NSUInteger length = [self numberOfSegments]; 26 | for (int i = 0; i < length; i++) { 27 | double *samples = [self samplesForSegment:i]; 28 | Buffer *buffer = [[Buffer alloc] initWithSamples:samples 29 | size:[self sizeForWindow] 30 | sampleRate:[self.buffer sampleRate]]; 31 | 32 | free(samples); 33 | block(buffer, i); 34 | } 35 | } 36 | 37 | -(double *)samplesForSegment:(NSUInteger)index { 38 | NSUInteger length = [self sizeForWindow]; 39 | double *samples = malloc(sizeof(double) * length); 40 | for (int i = 0; i < length; i++) { 41 | NSUInteger sampleIndex = index * self.size + i; 42 | samples[i] = (sampleIndex < self.buffer.size) ? self.buffer.samples[sampleIndex] : 0.0; 43 | } 44 | return samples; 45 | } 46 | 47 | -(NSUInteger)sizeForWindow { 48 | return self.size * self.windowWidth; 49 | } 50 | 51 | -(NSUInteger)numberOfSegments { 52 | return ceil(self.buffer.size / (float)self.size); 53 | } 54 | 55 | @end 56 | -------------------------------------------------------------------------------- /Build/BlueWizard.app/Contents/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | BuildMachineOSBuild 6 | 21F79 7 | CFBundleDevelopmentRegion 8 | en 9 | CFBundleExecutable 10 | BlueWizard 11 | CFBundleIconFile 12 | AppIcon 13 | CFBundleIconName 14 | AppIcon 15 | CFBundleIdentifier 16 | collinatorstudios.BlueWizard 17 | CFBundleInfoDictionaryVersion 18 | 6.0 19 | CFBundleName 20 | BlueWizard 21 | CFBundlePackageType 22 | APPL 23 | CFBundleShortVersionString 24 | 1.5.0 25 | CFBundleSignature 26 | ???? 27 | CFBundleSupportedPlatforms 28 | 29 | MacOSX 30 | 31 | CFBundleVersion 32 | 8 33 | DTCompiler 34 | com.apple.compilers.llvm.clang.1_0 35 | DTPlatformBuild 36 | 13E500a 37 | DTPlatformName 38 | macosx 39 | DTPlatformVersion 40 | 12.3 41 | DTSDKBuild 42 | 21E226 43 | DTSDKName 44 | macosx12.3 45 | DTXcode 46 | 1331 47 | DTXcodeBuild 48 | 13E500a 49 | LSMinimumSystemVersion 50 | 10.10 51 | NSHumanReadableCopyright 52 | Copyright © 2015-2017 Collinator Studios Inc. All rights reserved. 53 | NSMainStoryboardFile 54 | Main 55 | NSPrincipalClass 56 | NSApplication 57 | 58 | 59 | -------------------------------------------------------------------------------- /BlueWizardTests/FrameDataBinaryEncoderTests.m: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | #import "CodingTable.h" 4 | #import "FrameDataBinaryEncoder.h" 5 | #import 6 | @interface FrameDataBinaryEncoderTests : XCTestCase 7 | 8 | @end 9 | 10 | @implementation FrameDataBinaryEncoderTests { 11 | NSArray *subject; 12 | } 13 | 14 | -(void)setUp { 15 | [super setUp]; 16 | NSArray *frameData = @[ 17 | @{ kParameterGain: @9, kParameterRepeat: @0, kParameterPitch: @0, kParameterK1: @21, kParameterK2: @22, kParameterK3: @6, kParameterK4: @6 }, 18 | @{ kParameterGain: @6, kParameterRepeat: @1, kParameterPitch: @0 }, 19 | @{ kParameterGain: @6, kParameterRepeat: @1, kParameterPitch: @0 }, 20 | @{ kParameterGain: @13, kParameterRepeat: @0, kParameterPitch: @10, kParameterK1: @18, kParameterK2: @16, kParameterK3: @5, kParameterK4: @5, kParameterK5: @6, kParameterK6: @11, kParameterK7: @10, kParameterK8: @5, kParameterK9: @3, kParameterK10: @2 }, 21 | @{ kParameterGain: @13, kParameterRepeat: @1, kParameterPitch: @11 }, 22 | @{ kParameterGain: @13, kParameterRepeat: @0, kParameterPitch: @12, kParameterK1: @22, kParameterK2: @17, kParameterK3: @7, kParameterK4: @4, kParameterK5: @0, kParameterK6: @10, kParameterK7: @11, kParameterK8: @6, kParameterK9: @4, kParameterK10: @3 }, 23 | @{ kParameterGain: @0 } 24 | ]; 25 | 26 | int *bits = [CodingTable bits]; 27 | bits[2] = 5; 28 | 29 | subject = [FrameDataBinaryEncoder process:frameData]; 30 | } 31 | 32 | -(void)tearDown { 33 | int *bits = [CodingTable bits]; 34 | bits[2] = 6; 35 | 36 | [super tearDown]; 37 | } 38 | 39 | -(void)testItConvertsFramesIntoBinaryNibbles { 40 | NSArray *expected = @[ @"1001", @"0000", @"0010", @"1011", @"0110", @"0110", @"0110", @"0110", @"1000", @"0001", @"1010", @"0000", @"1101", @"0010", @"1010", @"0101", @"0000", @"0101", @"0101", @"0110", @"1011", @"1010", @"1010", @"1101", @"0110", @"1101", @"0111", @"1010", @"0110", @"0101", @"1010", @"0010", @"1110", @"1000", @"0001", @"0101", @"0111", @"1010", @"0011", @"0000" ]; 41 | XCTAssertEqualObjects(subject, expected); 42 | } 43 | 44 | @end 45 | -------------------------------------------------------------------------------- /BlueWizard/Buffer.m: -------------------------------------------------------------------------------- 1 | #import "Buffer.h" 2 | #import "Autocorrelator.h" 3 | 4 | @interface Buffer () 5 | @property (nonatomic) double *samples; 6 | @property (nonatomic) NSUInteger size; 7 | @property (nonatomic) NSUInteger sampleRate; 8 | @property (nonatomic) NSUInteger start; 9 | @property (nonatomic) NSUInteger end; 10 | 11 | @end 12 | 13 | @implementation Buffer 14 | 15 | -(instancetype)initWithSize:(NSUInteger)size 16 | sampleRate:(NSUInteger)sampleRate { 17 | if (self = [super init]) { 18 | self.size = size; 19 | self.sampleRate = sampleRate; 20 | self.samples = malloc(sizeof(double) * self.size); 21 | } 22 | return self; 23 | } 24 | 25 | -(instancetype)initWithSamples:(double *)samples 26 | size:(NSUInteger)size 27 | sampleRate:(NSUInteger)sampleRate 28 | start:(NSUInteger)start 29 | end:(NSUInteger)end { 30 | if (self = [self initWithSize:end - start sampleRate:sampleRate]) { 31 | self.start = start; 32 | self.end = end; 33 | [self copySamples:samples]; 34 | } 35 | return self; 36 | } 37 | 38 | -(instancetype)initWithSamples:(double *)samples 39 | size:(NSUInteger)size 40 | sampleRate:(NSUInteger)sampleRate { 41 | return [self initWithSamples:samples size:size sampleRate:sampleRate start:0 end:size]; 42 | } 43 | 44 | -(void)copySamples:(double *)samples { 45 | for (int i = 0; i < self.size; i++) { 46 | if (i >= self.start) { 47 | NSUInteger index = i - self.start; 48 | self.samples[index] = samples[i]; 49 | } 50 | } 51 | } 52 | 53 | -(void)dealloc { 54 | free(self.samples); 55 | } 56 | 57 | -(double)energy { 58 | return [Autocorrelator sumOfSquaresFor:self]; 59 | } 60 | 61 | # pragma mark - NSCopying 62 | 63 | -(instancetype)copyWithZone:(NSZone *)zone { 64 | return [[[self class] alloc] initWithSamples:self->_samples 65 | size:self->_size 66 | sampleRate:self->_sampleRate]; 67 | } 68 | 69 | @end 70 | -------------------------------------------------------------------------------- /BlueWizard/ViewController.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @class PlayheadView, WaveformView; 4 | 5 | @interface ViewController : NSViewController 6 | 7 | @property (weak) IBOutlet PlayheadView *inputPlayheadView; 8 | @property (weak) IBOutlet PlayheadView *outputPlayheadView; 9 | 10 | @property (weak) IBOutlet WaveformView *inputWaveformView; 11 | @property (weak) IBOutlet WaveformView *processedWaveformView; 12 | 13 | @property (weak) IBOutlet NSTextField *minFrequencyTextfield; 14 | @property (weak) IBOutlet NSTextField *maxFrequencyTextfield; 15 | @property (weak) IBOutlet NSTextField *submultipleThresholdTextfield; 16 | @property (weak) IBOutlet NSTextField *pitchValueTextfield; 17 | @property (weak) IBOutlet NSTextField *unvoicedThresholdTextfield; 18 | 19 | @property (weak) IBOutlet NSTextField *sampleRateTextfield; 20 | @property (weak) IBOutlet NSTextField *frameRateTextfield; 21 | @property (weak) IBOutlet NSTextField *preEmphasisAlphaTextfield; 22 | @property (weak) IBOutlet NSTextField *rmsLimitTextfield; 23 | 24 | @property (weak) IBOutlet NSButton *overridePitchButton; 25 | @property (weak) IBOutlet NSButton *preEmphasisButton; 26 | @property (weak) IBOutlet NSButton *normalizeUnvoicedRMSButton; 27 | @property (weak) IBOutlet NSButton *normalizeRMSButton; 28 | @property (weak) IBOutlet NSButton *excitationFilterOnlyButton; 29 | @property (unsafe_unretained) IBOutlet NSTextView *byteStreamTextView; 30 | @property (weak) IBOutlet NSTableView *frameDataTableView; 31 | @property (weak) IBOutlet NSButton *translateParametersCheckbox; 32 | @property (weak) IBOutlet NSProgressIndicator *spinner; 33 | @property (weak) IBOutlet NSTextField *pitchOffsetTextField; 34 | @property (weak) IBOutlet NSTextField *highPassCutoffTextField; 35 | @property (weak) IBOutlet NSTextField *lowPassCutoffTextField; 36 | @property (weak) IBOutlet NSTableView *frameDataTable; 37 | @property (weak) IBOutlet NSTextField *unvoicedRMSLimitTextField; 38 | @property (weak) IBOutlet NSSlider *speedSlider; 39 | @property (weak) IBOutlet NSSlider *unvoicedMultiplierSlider; 40 | @property (weak) IBOutlet NSSlider *gainSlider; 41 | @property (weak) IBOutlet NSTextField *windowWidthTextfield; 42 | @property (weak) IBOutlet NSTextField *startSample; 43 | @property (weak) IBOutlet NSTextField *endSample; 44 | 45 | @end 46 | 47 | -------------------------------------------------------------------------------- /BlueWizard/HexConverter.m: -------------------------------------------------------------------------------- 1 | #import "HexConverter.h" 2 | #import "BitHelpers.h" 3 | #import "BitPacker.h" 4 | 5 | static char const *kHexChars = "0123456789ABCDEF"; 6 | static char const kTerminator = '\0'; 7 | 8 | @implementation HexConverter 9 | 10 | +(NSArray *)process:(NSArray *)nibbles { 11 | NSMutableArray *hex = [NSMutableArray arrayWithCapacity:[nibbles count]]; 12 | for (NSString *nibble in nibbles) { 13 | NSUInteger value = [BitHelpers valueForBinary:nibble]; 14 | [hex addObject:[NSString stringWithFormat:@"%x", (unsigned int)value]]; 15 | } 16 | return [self inGroupsOfTwo:hex]; 17 | } 18 | 19 | +(NSArray *)inGroupsOfTwo:(NSArray *)hex { 20 | NSMutableArray *grouped = [NSMutableArray arrayWithCapacity:[hex count] / 2]; 21 | for (int i = 0, length = (int)[hex count]; i <= length - 2; i += 2) { 22 | [grouped addObject:[NSString stringWithFormat:@"%@%@", [hex objectAtIndex:i], [hex objectAtIndex:i + 1]]]; 23 | } 24 | return [grouped copy]; 25 | } 26 | 27 | +(NSString *)stringFromData:(NSData *)data { 28 | NSUInteger bytesCount = [data length]; 29 | if (!bytesCount) return @""; 30 | char delimiter = [[BitPacker delimiter] characterAtIndex:0]; 31 | const unsigned char *dataBuffer = [data bytes]; 32 | char *chars = malloc(sizeof(char) * (bytesCount * 3 + 1)); 33 | char *s = chars; 34 | for (int i = 0; i < bytesCount; ++i) { 35 | *s++ = kHexChars[((*dataBuffer & 0xF0) >> 4)]; 36 | *s++ = kHexChars[(*dataBuffer & 0x0F)]; 37 | if (i < bytesCount - 1) *s++ = delimiter; 38 | dataBuffer++; 39 | } 40 | *s = kTerminator; 41 | NSString *hexString = [NSString stringWithUTF8String:chars]; 42 | free(chars); 43 | return hexString; 44 | } 45 | 46 | +(NSData *)dataFromString:(NSString *)string { 47 | const char *chars = [string UTF8String]; 48 | NSUInteger length = [string length]; 49 | NSMutableData *data = [NSMutableData dataWithCapacity:length / 2]; 50 | char byteChars[3] = {kTerminator, kTerminator, kTerminator}; 51 | unsigned long wholeByte; 52 | int i = 0; 53 | 54 | while (i < length) { 55 | byteChars[0] = chars[i++]; 56 | byteChars[1] = chars[i++]; 57 | wholeByte = strtoul(byteChars, NULL, 16); 58 | [data appendBytes:&wholeByte length:1]; 59 | } 60 | 61 | return data; 62 | } 63 | 64 | @end 65 | -------------------------------------------------------------------------------- /BlueWizard/Output.m: -------------------------------------------------------------------------------- 1 | #import "Output.h" 2 | #import 3 | #import 4 | #import "AudioHelpers.h" 5 | #import "Buffer.h" 6 | #import "UserSettings.h" 7 | 8 | @implementation Output 9 | 10 | +(void)createAIFFileFrom:(Buffer *)buffer URL:(NSURL *)URL { 11 | AudioStreamBasicDescription asbd = {0}; 12 | 13 | asbd.mSampleRate = [[[UserSettings sharedInstance] exportSampleRate] floatValue]; 14 | asbd.mFormatID = kAudioFormatLinearPCM; 15 | asbd.mFormatFlags = kAudioFormatFlagIsSignedInteger | kAudioFormatFlagIsBigEndian; 16 | asbd.mFramesPerPacket = 1; 17 | asbd.mChannelsPerFrame = 1; 18 | asbd.mBitsPerChannel = 16; 19 | asbd.mBytesPerPacket = 2; 20 | asbd.mBytesPerFrame = 2; 21 | 22 | AudioFileID file; 23 | CheckError(AudioFileCreateWithURL((__bridge CFURLRef)URL, 24 | kAudioFileAIFFType, &asbd, 25 | kAudioFileFlags_EraseFile, 26 | &file), 27 | "AudioFileCreateWithURL failed"); 28 | 29 | float ratio = buffer.sampleRate / asbd.mSampleRate; 30 | 31 | UInt32 outputSamples = (UInt32)buffer.size * ceil(asbd.mSampleRate / buffer.sampleRate); 32 | AudioBufferList ioData = {0}; 33 | ioData.mNumberBuffers = 1; 34 | ioData.mBuffers[0].mNumberChannels = 1; 35 | ioData.mBuffers[0].mDataByteSize = asbd.mBytesPerPacket * outputSamples; 36 | ioData.mBuffers[0].mData = malloc(ioData.mBuffers[0].mDataByteSize); 37 | 38 | NSUInteger scale = (1 << 15); 39 | NSUInteger i = 0; 40 | NSUInteger index = 0; 41 | while (index < buffer.size) { 42 | SInt16 sample = buffer.samples[index] * scale; 43 | sample = CFSwapInt16HostToBig(sample); 44 | ((SInt16 *)ioData.mBuffers[0].mData)[i] = sample; 45 | i += 1; 46 | index = floor(i * ratio); 47 | } 48 | 49 | CheckError(AudioFileWritePackets(file, 50 | FALSE, 51 | ioData.mBuffers[0].mDataByteSize, 52 | NULL, 53 | 0, 54 | &outputSamples, 55 | ioData.mBuffers[0].mData), 56 | "AudioFileWritePackets failed"); 57 | 58 | free(ioData.mBuffers[0].mData); 59 | AudioFileClose(file); 60 | } 61 | 62 | @end 63 | -------------------------------------------------------------------------------- /BlueWizard/WaveformView.m: -------------------------------------------------------------------------------- 1 | #import "WaveformView.h" 2 | #import "Buffer.h" 3 | 4 | @interface WaveformView () 5 | @property (nonatomic) BOOL inverse; 6 | @property (nonatomic) NSPoint mouseDown; 7 | @property (nonatomic) NSPoint mouseUp; 8 | @property (nonatomic, strong) NSImage *image; 9 | @end 10 | 11 | @implementation WaveformView 12 | 13 | -(instancetype)initWithCoder:(NSCoder *)coder { 14 | if (self = [super initWithCoder:coder]) { 15 | [self render]; 16 | } 17 | return self; 18 | } 19 | 20 | -(void)drawRect:(NSRect)dirtyRect { 21 | [self.image drawInRect:dirtyRect]; 22 | [super drawRect:dirtyRect]; 23 | } 24 | 25 | -(void)render { 26 | CGFloat scale = 1.0f; 27 | CGFloat width = self.bounds.size.width * scale; 28 | CGFloat height = self.bounds.size.height * scale; 29 | 30 | NSImage *image = [[NSImage alloc] initWithSize:NSMakeSize(width, height)]; 31 | 32 | [image lockFocus]; 33 | [[NSColor blackColor] setFill]; 34 | NSRectFill(self.bounds); 35 | 36 | float zero = height / 2.0f; 37 | [[NSColor blueColor] set]; 38 | 39 | NSPoint pointA = NSMakePoint(0, zero); 40 | NSPoint pointB = NSMakePoint(width, zero); 41 | [self drawLineFromPointA:pointA toPointB:pointB]; 42 | 43 | if (self.buffer) { 44 | float spacing = width / self.buffer.size; 45 | for (int i = 0; i < self.buffer.size - 1; i++) { 46 | NSPoint pointA = NSMakePoint(i * spacing, zero + (self.buffer.samples[i] * zero)); 47 | NSPoint pointB = NSMakePoint((i + 1) * spacing, zero + (self.buffer.samples[i + 1] * zero)); 48 | [self drawLineFromPointA:pointA toPointB:pointB]; 49 | } 50 | } 51 | 52 | [image unlockFocus]; 53 | 54 | self.image = image; 55 | } 56 | 57 | -(void)drawLineFromPointA:(NSPoint)pointA toPointB:(NSPoint)pointB { 58 | NSBezierPath *line = [NSBezierPath bezierPath]; 59 | [line moveToPoint:pointA]; 60 | [line lineToPoint:pointB]; 61 | 62 | [line setLineWidth:1.0f]; 63 | [line stroke]; 64 | } 65 | 66 | -(void)setBuffer:(Buffer *)buffer { 67 | _buffer = buffer; 68 | [self render]; 69 | [self setNeedsDisplay:YES]; 70 | } 71 | 72 | -(void)mouseDown:(NSEvent *)theEvent { 73 | self.inverse = YES; 74 | self.mouseDown = [theEvent locationInWindow]; 75 | [self setNeedsDisplay:YES]; 76 | } 77 | 78 | -(void)mouseUp:(NSEvent *)theEvent { 79 | self.inverse = NO; 80 | self.mouseUp = [theEvent locationInWindow]; 81 | [self setNeedsDisplay:YES]; 82 | } 83 | 84 | @end 85 | -------------------------------------------------------------------------------- /BlueWizard/Reflector.m: -------------------------------------------------------------------------------- 1 | #import "Reflector.h" 2 | #import "UserSettings.h" 3 | #import "CodingTable.h" 4 | 5 | static NSUInteger const kNumberOfKParameters = 11; 6 | 7 | @interface Reflector () 8 | @property (nonatomic, getter=shouldLimitRMS) BOOL limitRMS; 9 | @end 10 | 11 | @implementation Reflector { 12 | double *_ks[11]; 13 | } 14 | 15 | +(instancetype)translateCoefficients:(double *)r 16 | numberOfSamples:(NSUInteger)numberOfSamples { 17 | 18 | // Leroux Gueguen algorithm for finding K's 19 | 20 | double k[11] = {0}; 21 | double b[11] = {0}; 22 | double d[12] = {0}; 23 | 24 | k[1] = -r[1] / r[0]; 25 | d[1] = r[1]; 26 | d[2] = r[0] + (k[1] * r[1]); 27 | 28 | int i = 2; 29 | while (i <= 10) { 30 | double y = r[i]; 31 | b[1] = y; 32 | 33 | int j = 1; 34 | while (j <= i - 1) { 35 | b[j + 1] = d[j] + (k[j] * y); 36 | y = y + (k[j] * d[j]); 37 | d[j] = b[j]; 38 | j += 1; 39 | } 40 | 41 | k[i] = -y / d[i]; 42 | d[i + 1] = d[i] + (k[i] * y); 43 | d[i] = b[i]; 44 | i += 1; 45 | } 46 | 47 | double rms = [self formattedRMS:d[11] numberOfSamples:numberOfSamples]; 48 | return [[Reflector alloc] initWithKs:k rms:rms limitRMS:YES]; 49 | } 50 | 51 | +(double)formattedRMS:(double)rms numberOfSamples:(NSUInteger)numberOfSamples { 52 | return sqrt(rms / numberOfSamples) * (1 << 15); 53 | } 54 | 55 | -(instancetype)init { 56 | if (self = [super init]) { 57 | for (int i = 0; i <= kNumberOfKParameters; i++) { 58 | _ks[i] = 0; 59 | } 60 | } 61 | return self; 62 | } 63 | 64 | -(instancetype)initWithKs:(double *)ks rms:(double)rms limitRMS:(BOOL)limitRMS { 65 | if (self = [super init]) { 66 | _rms = rms; 67 | _limitRMS = limitRMS; 68 | memcpy(_ks, ks, sizeof(double) * kNumberOfKParameters); 69 | } 70 | return self; 71 | } 72 | 73 | -(double *)ks { 74 | return (double *)_ks; 75 | } 76 | 77 | -(double)rms { 78 | if (self.shouldLimitRMS && _rms >= [CodingTable rms][kStopFrameIndex - 1]) { 79 | return [CodingTable rms][kStopFrameIndex - 1]; 80 | } else { 81 | return _rms; 82 | } 83 | } 84 | 85 | -(BOOL)isVoiced { 86 | return ![self isUnvoiced]; 87 | } 88 | 89 | -(BOOL)isUnvoiced { 90 | return self.ks[1] >= [self unvoicedThreshold]; 91 | } 92 | 93 | -(float)unvoicedThreshold { 94 | return [[[UserSettings sharedInstance] unvoicedThreshold] floatValue]; 95 | } 96 | 97 | @end 98 | -------------------------------------------------------------------------------- /BlueWizard/Input.m: -------------------------------------------------------------------------------- 1 | #import "Input.h" 2 | #import 3 | #import "AudioHelpers.h" 4 | #import "Buffer.h" 5 | #import "UserSettings.h" 6 | 7 | @interface Input () 8 | @property (nonatomic, copy) NSURL *URL; 9 | @property (nonatomic, strong) Buffer *buffer; 10 | @end 11 | 12 | @implementation Input 13 | 14 | -(instancetype)initWithURL:(NSURL *)URL { 15 | if (self = [super init]) { 16 | self.URL = URL; 17 | } 18 | return self; 19 | } 20 | 21 | -(Buffer *)buffer { 22 | if (!_buffer) { 23 | ExtAudioFileRef inputFile; 24 | 25 | CheckError(ExtAudioFileOpenURL((__bridge CFURLRef)self.URL, 26 | &inputFile), 27 | "ExtAudioFileOpenURL failed"); 28 | 29 | AudioStreamBasicDescription asbd; 30 | UInt32 propSize = sizeof(asbd); 31 | CheckError(ExtAudioFileGetProperty(inputFile, kExtAudioFileProperty_FileDataFormat, &propSize, &asbd), "get description failed"); 32 | 33 | UInt32 numberOfFrames = 0; 34 | propSize = sizeof(SInt64); 35 | CheckError(ExtAudioFileGetProperty(inputFile, kExtAudioFileProperty_FileLengthFrames, &propSize, &numberOfFrames), "GetProperty failed"); 36 | 37 | AudioBufferList ioData = {0}; 38 | ioData.mNumberBuffers = 1; 39 | ioData.mBuffers[0].mNumberChannels = 1; 40 | ioData.mBuffers[0].mDataByteSize = asbd.mBytesPerPacket * numberOfFrames; 41 | ioData.mBuffers[0].mData = malloc(ioData.mBuffers[0].mDataByteSize); 42 | 43 | BOOL isStereo = asbd.mChannelsPerFrame == 2; 44 | 45 | ExtAudioFileRead(inputFile, &numberOfFrames, &ioData); 46 | 47 | double scale = 1.0f / (1 << 15); 48 | 49 | _buffer = [[Buffer alloc] initWithSize:numberOfFrames sampleRate:asbd.mSampleRate]; 50 | 51 | for (int i = 0; i < numberOfFrames; i++) { 52 | NSUInteger index = isStereo ? i * 2 : i; 53 | SInt16 val = ((SInt16 *)ioData.mBuffers[0].mData)[index]; 54 | if (asbd.mFormatFlags & kAudioFormatFlagIsBigEndian) { 55 | val = CFSwapInt16BigToHost(val); 56 | } 57 | _buffer.samples[i] = val * scale; 58 | } 59 | 60 | free(ioData.mBuffers[0].mData); 61 | ExtAudioFileDispose(inputFile); 62 | 63 | [[self userSettings] setStartSample:@0]; 64 | [[self userSettings] setEndSample:[NSNumber numberWithUnsignedInteger:numberOfFrames]]; 65 | } 66 | 67 | return _buffer; 68 | } 69 | 70 | -(UserSettings *)userSettings { 71 | return [UserSettings sharedInstance]; 72 | } 73 | 74 | @end 75 | -------------------------------------------------------------------------------- /lpc/test.lpc: -------------------------------------------------------------------------------- 1 | 00,80,8a,14,11,cd,dc,36,ab,b9,4d,f7,4e,99,a5,76,d1,dd,23,2d,96,5a,fb,8c,b4,94,6c,2a,9c,72,89,52,8e,aa,d0,ce,02,6f,39,c2,00,d7,43,3d,64,33,17,c4,9e,30,73,24,7c,64,2a,26,ca,8a,51,d3,35,e7,d4,28,a6,66,43,9a,d3,1b,8b,5a,1f,18,ce,68,11,0c,b3,29,d3,c3,cb,b0,62,95,e2,f4,8e,cb,4d,c9,92,27,4a,2e,37,25,35,eb,08,b5,dc,68,cd,3d,32,62,f3,82,e6,b2,6c,9b,6a,97,d6,d3,c2,2d,93,27,98,08,ad,94,18,de,19,23,d8,5c,76,72,47,ee,aa,50,45,c5,f3,46,3c,3a,12,16,5f,c4,48,eb,a8,59,7c,5e,d2,35,63,71,f0,e9,f4,d4,f2,54,21,a0,3d,8a,db,52,86,90,96,6c,2a,4f,d5,e2,60,a3,30,bb,f4,48,a3,73,d3,ae,d2,ab,88,52,dd,27,2a,8e,32,2b,d2,dc,a8,30,ea,24,59,72,23,e6,68,12,17,8d,cb,98,a1,73,9c,35,36,2b,a6,6d,3a,55,20,71,6a,80,dd,a3,0d,b0,5b,96,01,f6,88,4d,bd,97,a6,da,59,ab,8d,5e,ba,69,47,45,37,41,15,59,6e,23,cd,04,62,ae,b0,d9,12,33,e8,55,ca,2e,49,ad,42,a8,4a,a4,13,b3,0f,93,66,6a,8e,5d,34,6c,b9,a9,2b,34,91,33,16,91,59,10,85,29,92,45,ad,01,00,16,06,ac,35,1d,91,9d,6f,b1,d5,ac,0b,0e,5e,64,6c,7d,61,38,b8,4e,73,67,47,10,e3,d2,9a,a1,15,85,85,4b,5f,08,57,56,30,1e,7f,ac,d6,19,2b,04,72,99,8b,47,85,12,f9,26,ae,11,33,5a,1c,13,bb,96,4d,6c,71,0a,e8,3e,96,20,c4,a8,f6,b0,a7,94,90,c0,d6,23,9a,56,5c,0a,6b,af,88,5b,71,19,a8,b5,6c,21,7a,94,3e,88,7a,a7,91,35,44,e7,c6,11,81,cf,90,65,3a,99,95,5a,43,94,e9,e8,5a,7a,0c,51,97,83,5b,a8,d6,07,d3,0e,61,a1,5a,1f,f5,04,b8,87,6a,5d,30,93,60,56,aa,34,de,4f,80,79,a9,54,98,b8,01,16,91,53,2e,eb,38,64,46,36,19,1e,1b,10,11,59,64,60,bb,49,ab,55,55,82,1a,61,2d,b1,55,03,ea,34,1a,c7,36,0d,8b,5d,e2,50,bb,34,d6,57,92,d1,a2,d1,04,e7,45,ea,b5,43,4d,63,a4,44,17,09,15,77,5e,12,55,a8,d4,da,47,49,54,c8,52,6b,5b,69,ee,23,58,07,52,95,47,96,22,1d,a8,15,9e,59,d2,55,d2,ba,59,45,98,56,39,1b,a9,de,25,52,6b,b4,85,44,17,44,13,f0,95,da,15,0b,3d,5c,85,a9,47,2c,70,7b,77,66,e4,e6,d8,65,d9,a8,21,59,a5,94,58,6f,2a,e1,a1,5b,12,ba,84,78,18,6e,49,1c,ea,6c,19,b2,85,a1,59,90,a5,a9,11,c6,92,41,1e,a5,4a,14,4a,06,45,0e,26,21,f3,9e,e4,59,06,ed,be,84,8a,87,09,94,98,6c,a2,11,b1,d0,8d,8a,89,fb,58,22,19,78,15,aa,29,5a,c5,28,c6,f2,24,6d,15,c1,9c,87,ee,92,4c,0c,7b,2e,86,49,2e,a9,0f,12,34,15,a9,65,a1,68,50,57,e0,94,c9,21,a6,9b,96,42,c6,aa,07,55,d6,22,0f,58,9e,ec,2d,19,b9,b4,b8,78,a6,6d,94,31,17,aa,96,b6,00,d4,c8,83,96,3b,c7,09,a3,33,3e,2a,3c,b9,6d,c9,64,52,70,cd,b6,25,17,c1,2e,25,ca,16,93,19,85,16,28,5b,0c,6e,e4,5a,c2,ac,c4,aa,9a,5b,61,75,48,ec,a6,e6,b6,14,b0,94,86,02,ae,d3,50,c0,8d,56,0a,78,31,9d,00,57,a9,30,60,1b,89,b0,44,a6,61,65,93,c6,56,8c,38,47,d4,2e,47,b6,6c,dc,56,db,1d,c9,a1,eb,68,0d,77,a6,08,a1,e5,35,cd,95,02,84,b6,55,34,67,8a,10,5a,5e,c3,9c,31,80,4b,5b,4c,75,05,8f,2e,13,91,d4,63,1d,9b,54,85,66,2f,d7,2e,72,1e,80,dc,06,9b,71,d9,4c,06,2c,ce,cc,80,e3,dc,04,70,6c,24,03,8e,71,67,c0,72,15,e4,e9,36,4c,80,62,92,b7,f9,76,22,b2,89,ce,ce,3c,c0,dd,36,00,00 -------------------------------------------------------------------------------- /BlueWizard/lib/TMS5220/tms5220.txt: -------------------------------------------------------------------------------- 1 | ***************************** 2 | 3 | TI TMS5220 Emulator 4 | (c) Frank Palazzolo 5 | Updated by Raphael Nabet 6 | 7 | ***************************** 8 | 9 | The TI TMS5220 Speech chip uses Linear-Predictive decoding scheme to produce 10 | speech from very compact data. This scheme is very similar to the U.S. 11 | Federal Standard LPC-10e coding system, which was developed soon after 12 | this chip. 13 | 14 | It is virtually identical to the chip used in the landmark "Speak 'N Spell" 15 | toy produced in the '70s. 16 | 17 | Acknowledgements: 18 | ----------------- 19 | 20 | I would like to thank Larry Brantingham, the original designer of the chip, 21 | for his technical help. 22 | 23 | I would also like to thank Neill Cortlett, who first showed that this chip 24 | could be emulated in real-time in his Multi-Gauntlet Emulator. 25 | 26 | Theory of operation: 27 | -------------------- 28 | 29 | The TI speech chip contains a 128-bit parallel-in, serial-out FIFO, a 30 | 10-pole digital lattice filter which models the vocal tract, and a D/A 31 | converter. It was originally design to operate either with a microcomputer 32 | interface, or with a serial speech ROM. The Speech ROM functionality is 33 | now emulated, although no arcade games require it currently. 34 | 35 | The input data is writen a byte at a time into the chip, and it is 36 | decoded bitwise into variable length frames. 37 | 38 | Possible Frame Types are as follows: 39 | 40 | Energy RF Pitch K1 K2 K3 K4 K5 K6 K7 K8 K9 K10 41 | ----------------------------------------------------------------- 42 | 43 | Silent 0000 44 | Stop 1111 45 | Repeat XXXX 1 XXXXXX 46 | Unvoiced XXXX 0 000000 XXXXX XXXXX XXXX XXXX 47 | Voiced XXXX 0 XXXXXX XXXXX XXXXX XXXX XXXX XXXX XXXX XXXX XXX XXX XXX 48 | 49 | Stop Frame: Stops the current speech 50 | Repeat Frame: Uses the digital filter coefficients from the previous frame, 51 | with new Energy and Pitch values 52 | Unvoiced Frame: Uses Noise generator to feed 4 pole digital filter 53 | (All other coefficients are set to zero) 54 | Voiced Frame: Uses Pulse Generator to feed 10 pole digital filter 55 | 56 | All parameters (Energy, Pitch, K1-K10) are indexes into a lookup table for 57 | actual values (see TMS5220R.c) 58 | 59 | K1-K10 are reflection coefficients for the lattice filter. 60 | 61 | Each frame is used to generate 200 samples, and 8 times during each frame, 62 | (every 25 samples), these values are linearly interpolated to smooth out 63 | frame transitions. 64 | 65 | The Noise generator is based on a shift-register type random-bit generator. 66 | The Pulse generator is based on a lookup table. 67 | 68 | API: 69 | ---- 70 | 71 | TBD 72 | 73 | More: 74 | ----- 75 | 76 | For further technical info, the data sheet is floating around on the net. 77 | (I believe the name is TMS.PDF) If you can't find a copy, email me and 78 | I'll point you towards it. Feel free to contact me if you have a question. 79 | 80 | Frank Palazzolo 81 | 82 | palazzol@home.com 83 | 84 | 85 | 86 | 87 | -------------------------------------------------------------------------------- /BlueWizard/UserSettings.m: -------------------------------------------------------------------------------- 1 | #import "UserSettings.h" 2 | 3 | @implementation UserSettings 4 | 5 | +(instancetype)sharedInstance { 6 | static dispatch_once_t once; 7 | static id sharedInstance; 8 | 9 | dispatch_once(&once, ^{ sharedInstance = [[self alloc] init]; }); 10 | 11 | return sharedInstance; 12 | } 13 | 14 | -(NSNumber *)preEmphasisAlpha { 15 | if (!_preEmphasisAlpha) { 16 | _preEmphasisAlpha = @-0.93750f; 17 | } 18 | return _preEmphasisAlpha; 19 | } 20 | 21 | -(NSNumber *)sampleRate { 22 | if (!_sampleRate) { 23 | _sampleRate = @8000; 24 | } 25 | return _sampleRate; 26 | } 27 | 28 | -(NSNumber *)frameRate { 29 | if (!_frameRate) { 30 | _frameRate = @25.0f; 31 | } 32 | return _frameRate; 33 | } 34 | 35 | -(NSNumber *)exportSampleRate { 36 | if (!_exportSampleRate) { 37 | _exportSampleRate = @48000; 38 | } 39 | return _exportSampleRate; 40 | } 41 | 42 | -(NSNumber *)maxPitchInHZ { 43 | if (!_maxPitchInHZ) { 44 | _maxPitchInHZ = @500; 45 | } 46 | return _maxPitchInHZ; 47 | } 48 | 49 | -(NSNumber *)minPitchInHZ { 50 | if (!_minPitchInHZ) { 51 | _minPitchInHZ = @50; 52 | } 53 | return _minPitchInHZ; 54 | } 55 | 56 | -(NSNumber *)subMultipleThreshold { 57 | if (!_subMultipleThreshold) { 58 | _subMultipleThreshold = @0.9; 59 | } 60 | return _subMultipleThreshold; 61 | } 62 | 63 | -(NSNumber *)pitchValue { 64 | if (!_pitchValue) { 65 | _pitchValue = @0; 66 | } 67 | return _pitchValue; 68 | } 69 | 70 | -(NSNumber *)pitchOffset { 71 | if (!_pitchOffset) { 72 | _pitchOffset = @0; 73 | } 74 | return _pitchOffset; 75 | } 76 | 77 | -(NSNumber *)unvoicedThreshold { 78 | if (!_unvoicedThreshold) { 79 | _unvoicedThreshold = @0.3f; 80 | } 81 | return _unvoicedThreshold; 82 | } 83 | 84 | -(NSNumber *)rmsLimit { 85 | if (!_rmsLimit) { 86 | _rmsLimit = @14; 87 | } 88 | return _rmsLimit; 89 | } 90 | 91 | -(NSNumber *)unvoicedRMSLimit { 92 | if (!_unvoicedRMSLimit) { 93 | _unvoicedRMSLimit = @14; 94 | } 95 | return _unvoicedRMSLimit; 96 | } 97 | 98 | -(NSNumber *)lowPassCutoff { 99 | if (!_lowPassCutoff) { 100 | _lowPassCutoff = @48000; 101 | } 102 | return _lowPassCutoff; 103 | } 104 | 105 | -(NSNumber *)highPassCutoff { 106 | if (!_highPassCutoff) { 107 | _highPassCutoff = @0; 108 | } 109 | return _highPassCutoff; 110 | } 111 | 112 | -(NSNumber *)speed { 113 | if (!_speed) { 114 | _speed = @1.0f; 115 | } 116 | return _speed; 117 | } 118 | 119 | -(NSNumber *)unvoicedMultiplier { 120 | if (!_unvoicedMultiplier) { 121 | _unvoicedMultiplier = @0.5f; 122 | } 123 | return _unvoicedMultiplier; 124 | } 125 | 126 | -(NSNumber *)gain { 127 | if (!_gain) { 128 | _gain = @1.0f; 129 | } 130 | return _gain; 131 | } 132 | 133 | -(NSNumber *)windowWidth { 134 | if (!_windowWidth) { 135 | _windowWidth = @2; 136 | } 137 | return _windowWidth; 138 | } 139 | 140 | @end 141 | -------------------------------------------------------------------------------- /Build/BlueWizard.app/Contents/Resources/tms5220.txt: -------------------------------------------------------------------------------- 1 | ***************************** 2 | 3 | TI TMS5220 Emulator 4 | (c) Frank Palazzolo 5 | Updated by Raphael Nabet 6 | 7 | ***************************** 8 | 9 | The TI TMS5220 Speech chip uses Linear-Predictive decoding scheme to produce 10 | speech from very compact data. This scheme is very similar to the U.S. 11 | Federal Standard LPC-10e coding system, which was developed soon after 12 | this chip. 13 | 14 | It is virtually identical to the chip used in the landmark "Speak 'N Spell" 15 | toy produced in the '70s. 16 | 17 | Acknowledgements: 18 | ----------------- 19 | 20 | I would like to thank Larry Brantingham, the original designer of the chip, 21 | for his technical help. 22 | 23 | I would also like to thank Neill Cortlett, who first showed that this chip 24 | could be emulated in real-time in his Multi-Gauntlet Emulator. 25 | 26 | Theory of operation: 27 | -------------------- 28 | 29 | The TI speech chip contains a 128-bit parallel-in, serial-out FIFO, a 30 | 10-pole digital lattice filter which models the vocal tract, and a D/A 31 | converter. It was originally design to operate either with a microcomputer 32 | interface, or with a serial speech ROM. The Speech ROM functionality is 33 | now emulated, although no arcade games require it currently. 34 | 35 | The input data is writen a byte at a time into the chip, and it is 36 | decoded bitwise into variable length frames. 37 | 38 | Possible Frame Types are as follows: 39 | 40 | Energy RF Pitch K1 K2 K3 K4 K5 K6 K7 K8 K9 K10 41 | ----------------------------------------------------------------- 42 | 43 | Silent 0000 44 | Stop 1111 45 | Repeat XXXX 1 XXXXXX 46 | Unvoiced XXXX 0 000000 XXXXX XXXXX XXXX XXXX 47 | Voiced XXXX 0 XXXXXX XXXXX XXXXX XXXX XXXX XXXX XXXX XXXX XXX XXX XXX 48 | 49 | Stop Frame: Stops the current speech 50 | Repeat Frame: Uses the digital filter coefficients from the previous frame, 51 | with new Energy and Pitch values 52 | Unvoiced Frame: Uses Noise generator to feed 4 pole digital filter 53 | (All other coefficients are set to zero) 54 | Voiced Frame: Uses Pulse Generator to feed 10 pole digital filter 55 | 56 | All parameters (Energy, Pitch, K1-K10) are indexes into a lookup table for 57 | actual values (see TMS5220R.c) 58 | 59 | K1-K10 are reflection coefficients for the lattice filter. 60 | 61 | Each frame is used to generate 200 samples, and 8 times during each frame, 62 | (every 25 samples), these values are linearly interpolated to smooth out 63 | frame transitions. 64 | 65 | The Noise generator is based on a shift-register type random-bit generator. 66 | The Pulse generator is based on a lookup table. 67 | 68 | API: 69 | ---- 70 | 71 | TBD 72 | 73 | More: 74 | ----- 75 | 76 | For further technical info, the data sheet is floating around on the net. 77 | (I believe the name is TMS.PDF) If you can't find a copy, email me and 78 | I'll point you towards it. Feel free to contact me if you have a question. 79 | 80 | Frank Palazzolo 81 | 82 | palazzol@home.com 83 | 84 | 85 | 86 | 87 | -------------------------------------------------------------------------------- /BlueWizard/PitchEstimator.m: -------------------------------------------------------------------------------- 1 | #import "PitchEstimator.h" 2 | #import "Buffer.h" 3 | #import "UserSettings.h" 4 | #import "Autocorrelator.h" 5 | 6 | @interface PitchEstimator () 7 | @property (nonatomic, weak) Buffer *buffer; 8 | @property (nonatomic, strong) NSNumber *bestPeriod; 9 | @property (nonatomic) double *normalizedCoefficients; 10 | @end 11 | 12 | @implementation PitchEstimator { 13 | } 14 | 15 | +(double)pitchForPeriod:(Buffer *)buffer { 16 | return [[[self alloc] initWithBuffer:buffer] estimate]; 17 | } 18 | 19 | -(instancetype)initWithBuffer:(Buffer *)buffer { 20 | if (self = [super init]) { 21 | _buffer = buffer; 22 | _normalizedCoefficients = [self getNormalizedCoefficients]; 23 | } 24 | return self; 25 | } 26 | 27 | -(void)dealloc { 28 | free(self.normalizedCoefficients); 29 | } 30 | 31 | -(BOOL)isOutOfRange { 32 | NSUInteger bestPeriod = [self.bestPeriod unsignedIntegerValue]; 33 | return self.normalizedCoefficients[bestPeriod] < self.normalizedCoefficients[bestPeriod - 1] && 34 | self.normalizedCoefficients[bestPeriod] < self.normalizedCoefficients[bestPeriod + 1]; 35 | } 36 | 37 | -(double)interpolated { 38 | NSUInteger bestPeriod = [self.bestPeriod unsignedIntegerValue]; 39 | double middle = self.normalizedCoefficients[bestPeriod]; 40 | double left = self.normalizedCoefficients[bestPeriod - 1]; 41 | double right = self.normalizedCoefficients[bestPeriod + 1]; 42 | 43 | if (!(2 * middle - left - right)) 44 | return bestPeriod; 45 | else 46 | return bestPeriod + 0.5 * (right - left) / (2 * middle - left - right); 47 | } 48 | 49 | -(double)estimate { 50 | NSUInteger bestPeriod = [self.bestPeriod unsignedIntegerValue]; 51 | NSUInteger maximumMultiple = bestPeriod / [self minimumPeriod]; 52 | 53 | BOOL found = false; 54 | 55 | double estimate = [self interpolated]; 56 | if (estimate != estimate) return 0.0; 57 | 58 | while (!found && maximumMultiple >= 1) { 59 | BOOL subMultiplesAreStrong = YES; 60 | 61 | for (int i = 0; i < maximumMultiple; i++) { 62 | NSUInteger subMultiplePeriod = floor((i + 1) * estimate / maximumMultiple + 0.5); 63 | 64 | if (self.normalizedCoefficients[subMultiplePeriod] && 65 | self.normalizedCoefficients[subMultiplePeriod] < [self subMultipleThreshold] * self.normalizedCoefficients[bestPeriod]) { 66 | subMultiplesAreStrong = NO; 67 | } 68 | } 69 | 70 | if (subMultiplesAreStrong) { 71 | estimate /= maximumMultiple; 72 | found = YES; 73 | } 74 | 75 | maximumMultiple -= 1; 76 | } 77 | 78 | return estimate; 79 | } 80 | 81 | -(double *)getNormalizedCoefficients { 82 | NSUInteger minimumPeriod = [self minimumPeriod] - 1; 83 | NSUInteger maximumPeriod = [self maximumPeriod] + 1; 84 | 85 | double *normalizedCoefficients = malloc(sizeof(double) * maximumPeriod + 1); 86 | 87 | [Autocorrelator getNormalizedCoefficientsFor:normalizedCoefficients 88 | forBuffer:self.buffer 89 | minimumPeriod:minimumPeriod 90 | maximumPeriod:maximumPeriod]; 91 | return normalizedCoefficients; 92 | } 93 | 94 | -(NSNumber *)bestPeriod { 95 | if (!_bestPeriod) { 96 | NSUInteger bestPeriod = [self minimumPeriod]; 97 | NSUInteger startPeriod = bestPeriod + 1; 98 | NSUInteger maximumPeriod = [self maximumPeriod]; 99 | 100 | for (NSUInteger period = startPeriod; period < maximumPeriod; period++) { 101 | if (self.normalizedCoefficients[period] > self.normalizedCoefficients[bestPeriod]) { 102 | bestPeriod = period; 103 | } 104 | } 105 | _bestPeriod = [NSNumber numberWithUnsignedInteger:bestPeriod]; 106 | } 107 | return _bestPeriod; 108 | } 109 | 110 | -(UserSettings *)userSettings { 111 | return [UserSettings sharedInstance]; 112 | } 113 | 114 | -(NSUInteger)maximumPitchInHZ { 115 | return [[[self userSettings] maxPitchInHZ] unsignedIntegerValue]; 116 | } 117 | 118 | -(NSUInteger)minimumPitchInHZ { 119 | return [[[self userSettings] minPitchInHZ] unsignedIntegerValue]; 120 | } 121 | 122 | -(double)subMultipleThreshold { 123 | return [[[self userSettings] subMultipleThreshold] doubleValue]; 124 | } 125 | 126 | -(NSUInteger)minimumPeriod { 127 | return floor([self.buffer sampleRate] / [self maximumPitchInHZ] - 1); 128 | } 129 | -(NSUInteger)maximumPeriod { 130 | return floor([self.buffer sampleRate] / [self minimumPitchInHZ] + 1); 131 | } 132 | 133 | @end 134 | --------------------------------------------------------------------------------