October for iOS

About

October is music editor for iOS using AVAudioEngine, modeled after NES sound capabilities. It can export to an AAC audio file, an .NSF (NES Sound Format) file, or an NES ROM file. It can also export to ASM6 code (.s), which can later be built into an NES ROM using the ASM6 assembler by Loopy, or by sharing the code to the NES IDE app for iOS.

Songs

Songs can be a linear timeline of notes (note-based), or a linear timeline of loops (loop-based).

Loops

A loop is a sequence of notes and noise events, exactly N measures long, where N is >= 1. Loop-based songs can have up to 16 loops defined.

Loop Instances

A loop instance is a loop that has been added to the timeline. Loop instances start at a given measure, and can be set to repeat a number of times, as long as the loop instance does not overlap with other loop instances on the timeline.

Channels

4 channels are available:
1. Square Wave 1
2. Square Wave 2
3. Triangle Wave
4. Noise

Each channel can only play one note (or noise event) at a time.

Square Wave

__--__--__--__--

Pitch
Individual Square channel notes have a defined pitch A-G (with sharps and flats if needed) and octave 0-9. The pitch affects the period length, or frequency, of the square wave.

Duty Cycle
Square Channels have 4 Duty Cycle settings, that affect the timbre or voice of the square wave. The duty cycle is the percentage of time for which the output is 1 during a wave period. Individual square notes can optionally have their own duty cycle settings to override the channel duty cycle setting.
_-_______-______
12.5%
_--______--_____
25%
_----____----___
50%
_------__------_
75% (sounds the same as 25%)

Triangle Wave

/\/\/\/\/\/\/\/\

Pitch
Individual Triangle channel notes have a defined pitch A-G (with sharps and flats if needed) and octave 0-9. The pitch affects the period length, or frequency, of the triangle wave.

Noise

_-__--___-_---_-

The noise wave resembles a square wave, but with an adjustable pseudorandom sequence of -1 and 1 output values. It is often used for drums or sound effects.

Noise Preset
Noise presets consist of a loop mode toggle, which controls whether the pseudorandom sequence of -1 and 1 output values is shortened, and one of 16 period values. Effectively there are 32 different possible noise presets. The Noise Channel has a configurable Noise Preset setting at the channel level. Individual noise events can optionally have their own noise preset settings to override the channel noise preset setting.

Volume
The noise channel has a configurable volume at the channel level. Individual noise events can optionally have their own volume setting to override the channel volume.

ASM6 Code Output

Music data is converted into an event array of event / value bytes. Events are 1 byte long, each have their own unique code with some associated data. Values are also 1 byte long, and they contain a period table lookup value used to reference a pitch value.
The code will iterate through the event array, consuming event array items such as delays, channel setting changes, channel start events, channel stop events, etc. If a start channel event is encountered for a square or triangle channel, an additional item(s) from the array are consumed as needed to set the pitches of any channels started by the event.

Event Byte Codes

Delay Event
1xxxxxxx
delay amount = last 7 bits, resulting in a number from 1-128, equal to the number of 1/60 second "ticks" to wait

Start Channel(s) Event
0001cccc
bits 4-7 = channels 1-4
For each square or triangle channel started, another event array item is also consumed. The additional array item(s) contain the channel pitch (or noise preset) data for the channel to be set to upon starting.

Stop Channel(s) Event
0000cccc
bits 4-7 = channels 1-4

Square Wave Channel 1 Volume Change Event
0010vvvv
bits 4-7 = volume 0-15

Square Wave Channel 2 Volume Change Event
0011vvvv
bits 4-7 = volume 0-15

Noise Channel Volume Change Event
0100vvvv
bits 4-7 = volume 0-15

Duty Cycle Change Event
0101ddDD
dd = square channel 1 duty cycle bits
DD = square channel 2 duty cycle bits

Noise Preset Change Event
011LPPPP
L = loop mode on / off
PPPP = period value

Contact

If you have questions regarding the October app for iOS, please email us.