CreateTuning
Creates a tuning item.
Synopsis
Item CreateTuning( ufrac16 *Frequencies, int32 NumNotes,int32 NotesPerOctave, int32 BaseNote )
Description
This function creates a tuning item that can be used to tune an instrument.
NotesPerOctave is set to 12 for a standard western tuning system. For every octave's number of notes up or down, the frequency will be doubled or halved. You can thus specify 12 notes of a 12-tone scale, then extrapolate up or down for the other octaves. You should specify the entire range of pitches if the tuning does not repeat itself every octave. For more information, see the Music Programmer's Guide.
When you are finished with the tuning item, you should call DeleteTuning()
to deallocate the resources.
Arguments
- Frequencies
- A pointer to an array of 16.16 frequencies, which lists a tuning pattern.
- NumNotes
- The number of frequencies in the array.
- NotesPerOctave
- The number of notes in an octave (12 in a standard tuning scale).
- BaseNote
- The MIDI pitch (note) value of the first frequency in the array. If your array starts with the frequency of middle C, its MIDI
- pitch value would equal 60.
Return Value
The function returns the item number for the tuning or an error code (a negative value) if an error occurs.
Implementation
Folio call implemented in Audio folio V20.
Associated Files
audio.h
See Also
DeleteTuning
(), TuneInsTemplate(), TuneInstrument()