Skip to content

AkTuningTable proposal#860

Closed
marcus-w-hobbs wants to merge 4 commits intoAudioKit:developfrom
marcus-w-hobbs:aktuningtable_proposal
Closed

AkTuningTable proposal#860
marcus-w-hobbs wants to merge 4 commits intoAudioKit:developfrom
marcus-w-hobbs:aktuningtable_proposal

Conversation

@marcus-w-hobbs
Copy link
Contributor

@marcus-w-hobbs marcus-w-hobbs commented Apr 25, 2017

Hi Aure,

New in this pull request:
Modified subclasses of AKPolyphonicNode to use AKTuningTable as default noteOn implementation.
Frequency from AKTuningTable is passed to C++/Soundpipe as a new noteOn function with frequency parameter.
Ideally should have no impact to existing users of AudioKit.
Added Scala file support to AKTuningTable.
I started adding a Microtonal playground page under Synthesis.

override func setup() {
addTitle("Morphing Oscillator Bank")

let presets = ["Highland BagPipes", "Recurrence Relation 01", "Madhubanti", "Hexany 1,45,135,225", "Hexany 1,5,9,15"]

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line Length Violation: Line should be 120 characters or less: currently 125 characters (line_length)

AKLog("playing \(note) at frequency:\(frequency)")
osc.play(noteNumber: note, velocity: 127, frequency:Float(frequency))
}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Trailing Whitespace Violation: Lines should not have trailing whitespace. (trailing_whitespace)

}
})
}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Trailing Whitespace Violation: Lines should not have trailing whitespace. (trailing_whitespace)

keyboard.polyphonicMode = false
keyboard.delegate = self
addSubview(keyboard)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Trailing Whitespace Violation: Lines should not have trailing whitespace. (trailing_whitespace)

) { multiplier in
osc.detuningMultiplier = multiplier
})

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Trailing Whitespace Violation: Lines should not have trailing whitespace. (trailing_whitespace)

class PlaygroundView: AKPlaygroundView, AKKeyboardDelegate {

var keyboard: AKKeyboardView!

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Trailing Whitespace Violation: Lines should not have trailing whitespace. (trailing_whitespace)

AKPolyphonicNode.tuningTable.twelveToneEqualTemperament()

class PlaygroundView: AKPlaygroundView, AKKeyboardDelegate {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Trailing Whitespace Violation: Lines should not have trailing whitespace. (trailing_whitespace)


var keyboard: AKKeyboardView!

override func setup() {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function Body Length Violation: Function body should span 40 lines or less excluding comments and whitespace: currently spans 59 lines (function_body_length)

case "Hexany 1,45,135,225":
AKPolyphonicNode.tuningTable.scalaFile("hexany_1_45_135_225.scl")
case "Hexany 1,5,9,15":
AKPolyphonicNode.tuningTable.hexany(1,5,9,15)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comma Spacing Violation: There should be no space before and one after any comma. (comma)

open override func play(noteNumber: MIDINoteNumber, velocity: MIDIVelocity) {
internalAU?.startNote(noteNumber, velocity: velocity)
// Function to start, play, or activate the node at frequency
open override func play(noteNumber: MIDINoteNumber, velocity: MIDIVelocity, frequency:Float) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Colon Violation: Colons should be next to the identifier when specifying a type and next to the key in dictionary literals. (colon)

open override func play(noteNumber: MIDINoteNumber, velocity: MIDIVelocity) {
internalAU?.startNote(noteNumber, velocity: velocity)
// Function to start, play, or activate the node at frequency
open override func play(noteNumber: MIDINoteNumber, velocity: MIDIVelocity, frequency:Float) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Colon Violation: Colons should be next to the identifier when specifying a type and next to the key in dictionary literals. (colon)

<page name='Telephone'/>
</pages>
</playground> No newline at end of file
<playground version='6.0' target-platform='ios' display-mode='rendered'/> No newline at end of file
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you revert this change? Good to have the pages in there and it looks like your Xcode just accidentally bashed this.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For sure...Trying to figure out how to revert this change only.

manually reverting the clobbering of contents
internalAU?.startNote(noteNumber, velocity: velocity)
// Function to start, play, or activate the node at frequency
open override func play(noteNumber: MIDINoteNumber, velocity: MIDIVelocity, frequency:Float) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Colon Violation: Colons should be next to the identifier when specifying a type and next to the key in dictionary literals. (colon)

/// Function to start, play, or activate the node, all do the same thing
open override func play(noteNumber: MIDINoteNumber, velocity: MIDIVelocity) {
internalAU?.startNote(noteNumber, velocity: velocity)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Trailing Whitespace Violation: Lines should not have trailing whitespace. (trailing_whitespace)

}
}
}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Trailing Whitespace Violation: Lines should not have trailing whitespace. (trailing_whitespace)


fileprivate var waveform: AKTable?


Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Trailing Whitespace Violation: Lines should not have trailing whitespace. (trailing_whitespace)



open var waveform: AKTable? {
//TODO: Add error checking for table size...needs to match init()

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Todo Violation: TODOs should be avoided (Add error checking for table s...). (todo)

@aure
Copy link
Member

aure commented Apr 26, 2017

I manually merged this

@aure aure closed this Apr 26, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants