Giter Club home page Giter Club logo

epssampler's Introduction

EPSSampler

EPSSampler is a wrapper around AUSampler functionality, based on Apple’s Sampler Unit Presets sample code.

Requirements

  • iOS 5.0 or later

Setup

  1. Add AudioToolbox, AVFoundation, and CoreAudio to your project’s linked libraries.
  2. Add EPSSampler.h and EPSSampler.m to your project.

Usage

Create an aupreset file in AU Lab and add it to your project. (See Session 411 from WWDC 2011 for more details.) Add all the sound files needed by the preset to a folder named Sounds in your project. Create an instance of EPSSampler with the preset file:

NSURL *presetURL = [[NSBundle mainBundle] URLForResource:@"Preset" withExtension:@"aupreset"];
EPSSampler *sampler = [[EPSSampler alloc] initWithPresetURL:presetURL];

To play and stop notes, use these methods:

- (void)startPlayingNote:(UInt32)note withVelocity:(double)velocity - (void)stopPlayingNote:(UInt32)note

The note parameters should be the MIDI index of the note you want to start/stop. The velocity parameter should be a value between 0 and 1.

Notes

AU Lab is no longer included with Xcode. It can be downloaded by choosing Xcode->Open Developer Tools->More Developer Tools… in Xcode, and then choosing Audio Tools for Xcode. There isn’t much document on AUSampler—watch Session 411 from WWDC 2011, and read Technical Note TN2283 for more information.

epssampler's People

Contributors

peterstuart avatar

Stargazers

 avatar Gen Kiyooka avatar Anton Domnikov avatar rerezczc avatar Hidetaka Matsumoto avatar  avatar Mathew Sanders avatar Tim Fletcher avatar  avatar Mark Stultz avatar Indrajit Chakrabarty avatar  avatar Todd Reed avatar Charles Martin avatar Salim Benabbou avatar tangkk avatar

Watchers

 avatar James Cloos avatar  avatar

Forkers

salimlou qwhuang

epssampler's Issues

- (AUGraph)processingGraph problems

Hi,

Sorry, I'm quite a newbie to iOS, but if I try to compile I get a lot of errors about AUGraph with your code.

schermafbeelding 2014-02-22 om 15 00 26

I'm working on XCode 5.0.2

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.