Music#
Notes#
-
namespace YSE
Public API of libYSE — sound playback, mixing, and 3D positional audio.
Entry points:
YSE::System(lifecycle and audio device),YSE::Listener(3D origin),YSE::sound(a playable source),YSE::channel(mixing tree),YSE::reverb(positioned reverb zone),YSE::patcher(modular DSP graph),YSE::player(note sequencer). Sub-namespaces group domain-specific types:YSE::DSPfor signal processing,YSE::MIDIfor MIDI I/O,YSE::MUSICfor note / chord / motif primitives.Note
Apart from their constructors, the oscillator and
vcfclasses must only be invoked from inside a DSP callback /processbody.-
namespace MUSIC#
Music-theory primitives: notes, chords, positioned notes for motifs.
These types feed
YSE::scale,YSE::motif, andYSE::playerto drive generative composition.Functions
-
note operator+(Flt pitch, const note &n)#
Add a note’s pitch to a value.
The result carries the note’s velocity.
-
note operator-(Flt pitch, const note &n)#
Subtract a note’s pitch from a value.
The result carries the note’s velocity.
-
note operator*(Flt pitch, const note &n)#
Multiply a value by a note’s pitch.
The result carries the note’s velocity.
-
class note#
A single musical event — pitch, volume, length, and MIDI channel.
noteis the fundamental unit for the music subsystem: chords are collections of notes, motifs are sequences of pitched notes (pNote), and players generate notes within ascaleconstraint.The arithmetic operators (
+/-/*//) operate onpitchonly;volume,length, andchannelare preserved.See also
See also
See also
Subclassed by YSE::MUSIC::pNote
Public Functions
-
note &set(Flt pitch, Flt volume = 1.f, Flt length = 0.f, Int channel = 1)#
Replace all four fields in one call.
-
bool update()#
Advance the note one tick.
Returns
falseonce the note has finished.
-
note &set(Flt pitch, Flt volume = 1.f, Flt length = 0.f, Int channel = 1)#
-
note operator+(Flt pitch, const note &n)#
-
namespace MUSIC#
-
namespace YSE
Public API of libYSE — sound playback, mixing, and 3D positional audio.
Entry points:
YSE::System(lifecycle and audio device),YSE::Listener(3D origin),YSE::sound(a playable source),YSE::channel(mixing tree),YSE::reverb(positioned reverb zone),YSE::patcher(modular DSP graph),YSE::player(note sequencer). Sub-namespaces group domain-specific types:YSE::DSPfor signal processing,YSE::MIDIfor MIDI I/O,YSE::MUSICfor note / chord / motif primitives.Note
Apart from their constructors, the oscillator and
vcfclasses must only be invoked from inside a DSP callback /processbody.-
namespace MUSIC
Music-theory primitives: notes, chords, positioned notes for motifs.
These types feed
YSE::scale,YSE::motif, andYSE::playerto drive generative composition.
-
namespace MUSIC
-
namespace YSE
Public API of libYSE — sound playback, mixing, and 3D positional audio.
Entry points:
YSE::System(lifecycle and audio device),YSE::Listener(3D origin),YSE::sound(a playable source),YSE::channel(mixing tree),YSE::reverb(positioned reverb zone),YSE::patcher(modular DSP graph),YSE::player(note sequencer). Sub-namespaces group domain-specific types:YSE::DSPfor signal processing,YSE::MIDIfor MIDI I/O,YSE::MUSICfor note / chord / motif primitives.Note
Apart from their constructors, the oscillator and
vcfclasses must only be invoked from inside a DSP callback /processbody.-
namespace MUSIC
Music-theory primitives: notes, chords, positioned notes for motifs.
These types feed
YSE::scale,YSE::motif, andYSE::playerto drive generative composition.Functions
-
namespace MUSIC
Scales#
-
namespace YSE
Public API of libYSE — sound playback, mixing, and 3D positional audio.
Entry points:
YSE::System(lifecycle and audio device),YSE::Listener(3D origin),YSE::sound(a playable source),YSE::channel(mixing tree),YSE::reverb(positioned reverb zone),YSE::patcher(modular DSP graph),YSE::player(note sequencer). Sub-namespaces group domain-specific types:YSE::DSPfor signal processing,YSE::MIDIfor MIDI I/O,YSE::MUSICfor note / chord / motif primitives.Note
Apart from their constructors, the oscillator and
vcfclasses must only be invoked from inside a DSP callback /processbody.
-
namespace YSE
Public API of libYSE — sound playback, mixing, and 3D positional audio.
Entry points:
YSE::System(lifecycle and audio device),YSE::Listener(3D origin),YSE::sound(a playable source),YSE::channel(mixing tree),YSE::reverb(positioned reverb zone),YSE::patcher(modular DSP graph),YSE::player(note sequencer). Sub-namespaces group domain-specific types:YSE::DSPfor signal processing,YSE::MIDIfor MIDI I/O,YSE::MUSICfor note / chord / motif primitives.Note
Apart from their constructors, the oscillator and
vcfclasses must only be invoked from inside a DSP callback /processbody.-
class scale#
A set of allowed pitches.
Drives the
playerso its generated notes stay in key, and constrains the transpositions amotifcan take. Pitches are added with an optional step that controls automatic octave replication.See also
See also
Public Functions
-
scale()#
-
~scale()#
-
scale &add(Flt pitch, Flt step = 12)#
Add a pitch to the scale.
- Parameters:
pitch – The MIDI pitch to add.
step – Octave step.
12(default) replicates the pitch at every octave. Values <= 0 add only the exact pitch.
Friends
- friend class player
- friend class motif
-
scale()#
-
class scale#
Motifs#
-
namespace YSE
Public API of libYSE — sound playback, mixing, and 3D positional audio.
Entry points:
YSE::System(lifecycle and audio device),YSE::Listener(3D origin),YSE::sound(a playable source),YSE::channel(mixing tree),YSE::reverb(positioned reverb zone),YSE::patcher(modular DSP graph),YSE::player(note sequencer). Sub-namespaces group domain-specific types:YSE::DSPfor signal processing,YSE::MIDIfor MIDI I/O,YSE::MUSICfor note / chord / motif primitives.Note
Apart from their constructors, the oscillator and
vcfclasses must only be invoked from inside a DSP callback /processbody.
-
namespace YSE
Public API of libYSE — sound playback, mixing, and 3D positional audio.
Entry points:
YSE::System(lifecycle and audio device),YSE::Listener(3D origin),YSE::sound(a playable source),YSE::channel(mixing tree),YSE::reverb(positioned reverb zone),YSE::patcher(modular DSP graph),YSE::player(note sequencer). Sub-namespaces group domain-specific types:YSE::DSPfor signal processing,YSE::MIDIfor MIDI I/O,YSE::MUSICfor note / chord / motif primitives.Note
Apart from their constructors, the oscillator and
vcfclasses must only be invoked from inside a DSP callback /processbody.-
class motif#
A sequence of positioned notes — a re-usable phrase or pattern.
Add notes (with positions) via
add, optionally constrain the starting pitch with ascale, and hand the motif to aplayerwhich will trigger it at appropriate moments.See also
See also
Public Functions
-
motif()#
-
~motif()#
Private Functions
-
void sort()#
Friends
- friend class player
-
motif()#
-
class motif#