Skip to content

Commit

Permalink
Add bypass to AutoPan allowing Stereo EXS sources
Browse files Browse the repository at this point in the history
  • Loading branch information
analogcode committed Mar 1, 2018
1 parent f353e25 commit 59fb808
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 12 deletions.
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -14,7 +14,7 @@ Video introduction for this app and project:
The AudioKit FM Player is built with this code:
[Download in App Store here](https://itunes.apple.com/us/app/fm-player-classic-dx-synths/id1307785646?ls=1&mt=8).

**Update Feb 2, 23, 2018**
**Update Feb 23, 2018**
I made a video tutorial on how to add Attack & Release to EXS and AUSampler instruments:
[Video Tutorial: Building iOS Sample Instruments Visually w/ Attack & Release](https://audiokitpro.com/rom-player-tutorial-video-envelopes/)

Expand Down
2 changes: 1 addition & 1 deletion RomPlayer/AudioSystem/AutoPan.swift
Expand Up @@ -16,7 +16,7 @@ class AutoPan: AKNode {
}
}

var mix = 0.0 {
var mix = 1.0 {
didSet {
output.parameters = [freq, mix]
}
Expand Down
11 changes: 3 additions & 8 deletions RomPlayer/AudioSystem/Conductor.swift
Expand Up @@ -19,9 +19,7 @@ class Conductor {
var fatten: Fatten
var filterSection: FilterSection

// AutoPan Section
var autoPanMixer: AKDryWetMixer
var limiter: AKStereoFieldLimiter
var autopan: AutoPan

var multiDelay: PingPongDelay
Expand Down Expand Up @@ -57,14 +55,11 @@ class Conductor {
filterSection = FilterSection(decimator)
filterSection.output.stop()

limiter = AKStereoFieldLimiter(filterSection)
limiter.amount = 1
autopan = AutoPan(limiter)

autopan = AutoPan(filterSection)
autoPanMixer = AKDryWetMixer(filterSection, autopan)
autoPanMixer.balance = 0
autoPanMixer.balance = 0

fatten = Fatten(autopan)
fatten = Fatten(autoPanMixer)

multiDelay = PingPongDelay(fatten)

Expand Down
4 changes: 2 additions & 2 deletions RomPlayer/Controllers/AUMainController.swift
Expand Up @@ -268,10 +268,10 @@ class AUMainController: UIViewController {
autoPanToggle.callback = { value in
if value == 0 {
self.outputLabel.text = "Auto Pan Off"
self.conductor.autopan.mix = 0
self.conductor.autoPanMixer.balance = 0
} else {
self.outputLabel.text = "Auto Pan On"
self.conductor.autopan.mix = 1
self.conductor.autoPanMixer.balance = 1
}
}

Expand Down

0 comments on commit 59fb808

Please sign in to comment.