Skip to content

Instantly share code, notes, and snippets.

#import "OrbitViewController.h"
#import <stdio.h>
#import <math.h>
#import "orbManager.h"
#import "OrbView.h"
#import "OrbMaster.h"
#import "UIViewController+JASidePanel.h"
#import "JASidePanelController.h"
#import "Clock.h"
#import "AppDelegate.h"
-(void)newOrb:(UITapGestureRecognizer*)sender {
incrementName++;
AppDelegate* appDel = ((AppDelegate*)[UIApplication sharedApplication].delegate);
if (!appDel.containerViewController.isExpanded) {
CGPoint touch = [sender locationInView:self.view];
OrbView* anOrb = [[OrbView alloc] initWithFrame:CGRectMake(0,0,50,50)
andName:[NSString stringWithFormat:@"Orb%i", incrementName]];
anOrb.center = touch;
[self.view addSubview:anOrb];
-(void)newOrb:(UITapGestureRecognizer*)sender {
incrementName++;
AppDelegate* appDel = ((AppDelegate*)[UIApplication sharedApplication].delegate);
CGPoint touch = [sender locationInView:self.view];
if (!appDel.containerViewController.isExpanded) {
NSString* newName = [NSString stringWithFormat:@"Orb%i", incrementName];
-(void)loadPresetWithKey:(NSString*)theKey {
AppDelegate* appDel = ((AppDelegate*)[UIApplication sharedApplication].delegate);
OrbitViewController* orbitViewController = (OrbitViewController*)appDel.containerViewController.frontViewController;
[orbitViewController.view.subviews makeObjectsPerformSelector:@selector(removeFromSuperview)];
[self.orbModelMaster.orbModels removeAllObjects];
//
// AKStereoSoundFileLooper.h
// AudioKit
//
// Auto-generated on 2/19/15.
// Customized by Aurelius Prochazka to add type helpers
// Copyright (c) 2015 Aurelius Prochazka. All rights reserved.
//
#import "AKStereoAudio.h"
//
// AudioFilePlayer.m
// AudioKit Example
//
// Created by Aurelius Prochazka on 6/16/12.
// Copyright (c) 2012 Aurelius Prochazka. All rights reserved.
//
#import "AudioFilePlayer.h"
-(void)createSampleButtons {
NSArray *names = [NSArray arrayWithObjects:@"kick",@"snare",@"clap",@"hihat",@"hihat2",@"cymbal", @"tom1", @"tom2", nil];
self.sampleButtonsView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 250, 120)];
[self.view addSubview:self.sampleButtonsView];
self.sampleButtonsView.backgroundColor = [UIColor clearColor];
float sbWidth = self.sampleButtonsView.frame.size.width/4 - self.sampleButtonsView.frame.size.width/24;
float sbY = self.sampleButtonsView.frame.origin.y + 10;
- (void)flare {
CABasicAnimation *colorAnimation2 = [CABasicAnimation animationWithKeyPath:@"strokeEnd"];
colorAnimation2.fromValue = @0;
colorAnimation2.toValue = @1;
colorAnimation2.duration = 0.05;
[self.connectLayer addAnimation:colorAnimation2 forKey:nil];
CABasicAnimation *bgFlash = [CABasicAnimation animationWithKeyPath:@"backgroundColor"];
UIView *seq1View = [[UIView alloc] initWithFrame:CGRectMake(0,
(0)*heightRelative,
self.frame.size.width
,self.frame.size.height/4)];
seq1View.backgroundColor = [UIColor colorWithRed:0 green:1 blue:0 alpha:0.4];
[self addSubview:seq1View];
seq1View.tag = 32;
int countX = 0;
-(void)loadView {
CGRect frame = [[UIScreen mainScreen] bounds];
frame.size.height = frame.size.height/2.5;
UIView *initialView = [[UIView alloc] initWithFrame:frame];
self.view = initialView;
}