CsoundUnity 4.0.0-alpha.3
Loading...
Searching...
No Matches
Csound.Unity.Utilities Namespace Reference

Namespaces

namespace  Components
namespace  MonoBehaviours

Classes

class  AudioSamplesUtils
 Utility class that provides various methods for working with audio samples. It includes methods to convert between different audio data types, extract channel data, and retrieve audio sample data from different sources. More...
class  FFTUtils
 Utility class for real-time FFT spectrum analysis. More...
class  MusicUtils
 Static utilities for music theory calculations: scale intervals, frequency conversion, tempo math. These are shared across CsoundUnity features (Timelines, standalone components, etc.). More...
class  RemapUtils
 Utility class for remapping numeric values between ranges, with optional clamping and exponential skewing. More...
class  SceneObjectUtils
 Finds objects in loaded scenes and provides runtime lookup keys across supported Unity versions. More...
class  WriteAudioFileUtils
 Utility class for writing WAV and AIFF audio files from Unity AudioClip data. More...

Enumerations

enum  Scale {
  Chromatic , Major , Minor , Pentatonic ,
  Dorian , Phrygian , Lydian , Mixolydian ,
  HarmonicMinor
}
 Musical scale types. Defines the set of semitone intervals used within one octave. More...
enum  ArpDirection { Up , Down , UpDown , Random }
 Direction for an arpeggio or melodic pattern. More...
enum  ArpNoteSource { Scale , Chord }
 Selects the note source for an arpeggio: a predefined scale or a predefined chord. More...
enum  Chord {
  Unison , MinorThird , MajorThird , Fourth ,
  Fifth , Major , Minor , Diminished ,
  Augmented , Sus2 , Sus4 , Major7 ,
  Minor7 , Dominant7 , Diminished7 , HalfDiminished7 ,
  MinorMajor7 , Augmented7 , AugmentedMajor7 , Major9 ,
  Minor9 , Dominant9 , Add9 , Major11 ,
  Minor11 , Dominant11 , Major13 , Minor13 ,
  Dominant13 , Custom
}
 Chord types defined as semitone intervals from the root. Use MusicUtils.GetChordIntervals to get the interval array. More...
enum  RhythmicDivision {
  Whole , Half , Quarter , Eighth ,
  Sixteenth , Thirtysecond
}
 Rhythmic division relative to a BPM tempo. More...

Enumeration Type Documentation

◆ ArpDirection

Direction for an arpeggio or melodic pattern.

Enumerator
Up 

Plays notes in ascending pitch order, looping back to the lowest after the top.

Down 

Plays notes in descending pitch order, looping back to the highest after the bottom.

UpDown 

Bounce: ascends to the top then descends back to the bottom, then repeats.

Random 

Selects a random pitch from the array on each step.

◆ ArpNoteSource

Selects the note source for an arpeggio: a predefined scale or a predefined chord.

Enumerator
Scale 

Pitches are built from a Scale interval table.

Chord 

Pitches are built from a Chord interval table.

◆ Chord

Chord types defined as semitone intervals from the root. Use MusicUtils.GetChordIntervals to get the interval array.

Enumerator
Unison 

Single root note (interval: 0). Repeats the root across octaves.

MinorThird 

Minor third dyad (intervals: 0, 3).

MajorThird 

Major third dyad (intervals: 0, 4).

Fourth 

Perfect fourth dyad (intervals: 0, 5).

Fifth 

Perfect fifth dyad (intervals: 0, 7).

Major 

Major triad (intervals: 0, 4, 7).

Minor 

Minor triad (intervals: 0, 3, 7).

Diminished 

Diminished triad (intervals: 0, 3, 6).

Augmented 

Augmented triad (intervals: 0, 4, 8).

Sus2 

Suspended 2nd triad (intervals: 0, 2, 7).

Sus4 

Suspended 4th triad (intervals: 0, 5, 7).

Major7 

Major seventh chord (intervals: 0, 4, 7, 11).

Minor7 

Minor seventh chord (intervals: 0, 3, 7, 10).

Dominant7 

Dominant seventh chord (intervals: 0, 4, 7, 10).

Diminished7 

Diminished seventh chord (intervals: 0, 3, 6, 9).

HalfDiminished7 

Half-diminished seventh chord (intervals: 0, 3, 6, 10).

MinorMajor7 

Minor-major seventh chord (intervals: 0, 3, 7, 11).

Augmented7 

Augmented seventh chord (intervals: 0, 4, 8, 10).

AugmentedMajor7 

Augmented major seventh chord (intervals: 0, 4, 8, 11).

Major9 

Major ninth chord (intervals: 0, 4, 7, 11, 14).

Minor9 

Minor ninth chord (intervals: 0, 3, 7, 10, 14).

Dominant9 

Dominant ninth chord (intervals: 0, 4, 7, 10, 14).

Add9 

Add9 chord — major triad with added 9th, no 7th (intervals: 0, 4, 7, 14).

Major11 

Major eleventh chord (intervals: 0, 4, 7, 11, 14, 17).

Minor11 

Minor eleventh chord (intervals: 0, 3, 7, 10, 14, 17).

Dominant11 

Dominant eleventh chord (intervals: 0, 4, 7, 10, 14, 17).

Major13 

Major thirteenth chord (intervals: 0, 4, 7, 11, 14, 17, 21).

Minor13 

Minor thirteenth chord (intervals: 0, 3, 7, 10, 14, 17, 21).

Dominant13 

Dominant thirteenth chord (intervals: 0, 4, 7, 10, 14, 17, 21).

Custom 

User-defined chord. Intervals must be provided separately (e.g. via arpCustomIntervals).

◆ RhythmicDivision

Rhythmic division relative to a BPM tempo.

Enumerator
Whole 

Whole note (1/1): 4 beats.

Half 

Half note (1/2): 2 beats.

Quarter 

Quarter note (1/4): 1 beat.

Eighth 

Eighth note (1/8): half a beat.

Sixteenth 

Sixteenth note (1/16): quarter of a beat.

Thirtysecond 

Thirty-second note (1/32): an eighth of a beat.

◆ Scale

Musical scale types. Defines the set of semitone intervals used within one octave.

Enumerator
Chromatic 

All 12 semitones of the chromatic scale.

Major 

Ionian (natural major) mode: W W H W W W H.

Minor 

Aeolian (natural minor) mode: W H W W H W W.

Pentatonic 

Major pentatonic scale: 5 notes per octave, omitting the 4th and 7th degrees.

Dorian 

Dorian mode: natural minor with a raised 6th.

Phrygian 

Phrygian mode: natural minor with a lowered 2nd.

Lydian 

Lydian mode: major scale with a raised 4th.

Mixolydian 

Mixolydian mode: major scale with a lowered 7th.

HarmonicMinor 

Harmonic minor scale: natural minor with a raised 7th.