|
Beatmup
|
An audio signal. More...
#include <signal.h>
Classes | |
| class | IncompatibleFormat |
| Communicates an error when inserting a incompatible fragment into a Signal. More... | |
| class | Meter |
| Signal dynamics meter. More... | |
| class | Pointer |
| Implements a Sequence::Pointer for audio signals. More... | |
| class | Reader |
| Provides reading access to the signal. More... | |
| class | Source |
| Audio::Source reading samples from a given Signal. More... | |
| class | Writer |
| Provides writing access to the signal. More... | |
Public Member Functions | |
| Signal (Context &context, AudioSampleFormat format, int sampleRate, unsigned char channels, float defaultFragmentLenSec=DEFAULT_FRAGMENT_LENGTH_SEC) | |
| Creates an empty signal. More... | |
| void | insert (const Signal &signal, dtime time) |
| Inserts a Signal into the current signal at a specific time moment. More... | |
| void | reserve (dtime length) |
| Prolongates the sequence if necessary, to ensure given length. More... | |
| void | saveWAV (const char *filename) |
| Stores the signal to a PCM-encoded WAV file. More... | |
| unsigned char | getChannelCount () const |
| AudioSampleFormat | getSampleFormat () const |
| Context & | getContext () const |
Public Member Functions inherited from Beatmup::Fragments::SequenceToolkit< Signal > | |
| Signal * | copy (dtime fromTime, dtime toTime) const |
Public Member Functions inherited from Beatmup::Fragments::Sequence | |
| const dtime | getDuration () const |
| Returns sequence duration in number of samples. More... | |
| bool | isEmpty () const |
Returns true if sequence contains no samples. More... | |
| void | clear () |
| Removes the content of the sequence making it empty (of zero duration). More... | |
| void | shrink (dtime timeLeft, dtime timeRight) |
| Shrinks the sequence to given time bounds. More... | |
| Sequence * | copy (dtime fromTime, dtime toTime) const |
| Copies a given piece of the current sequence into new Sequence. More... | |
| void | insert (const Sequence &sequence, dtime time) |
| Inserts a Sequence at a given position in time. More... | |
| void | remove (dtime fromTime, dtime toTime) |
| Erases a part of the sequence between two given time moments. More... | |
| void | split (dtime time, Sequence *left, Sequence *right) const |
| Splits the sequence in two at a specific time. More... | |
Public Member Functions inherited from Beatmup::Object | |
| virtual | ~Object () |
Static Public Member Functions | |
| static Signal * | loadWAV (Context &ctx, const char *fileName) |
| static Signal * | loadWAV (Context &ctx, InputStream &inputStream) |
Static Public Attributes | |
| static const int | DEFAULT_FRAGMENT_LENGTH_SEC = 5 |
Protected Member Functions | |
| virtual Signal * | createEmpty () const |
| Initializes an empty sequence, used to bootstrap copying operations. More... | |
Protected Member Functions inherited from Beatmup::Fragments::Sequence | |
| Sequence () | |
| virtual | ~Sequence () |
| void | concatenate (Fragment &fragment, dtime offset, dtime length) |
| Adds a new fragment at the end of the sequence. More... | |
| void | syncPointers () |
| Resets pointers once the sequence changes to keep them consistent. More... | |
Private Attributes | |
| Context & | ctx |
| AudioSampleFormat | format |
| sample format More... | |
| const dtime | defaultFragmentSize |
| int | sampleRate |
| sampling frequency More... | |
| unsigned char | channelCount |
| number of channels More... | |
| Signal::Signal | ( | Context & | context, |
| AudioSampleFormat | format, | ||
| int | sampleRate, | ||
| unsigned char | channels, | ||
| float | defaultFragmentLenSec = DEFAULT_FRAGMENT_LENGTH_SEC |
||
| ) |
Creates an empty signal.
| context | A Context instance the new signal is associated to |
| format | Sample format of the new signal |
| sampleRate | Sample rate, Hz |
| channels | Number of channels |
| defaultFragmentLenSec | Default fragment length in seconds |
Definition at line 36 of file signal.cpp.
|
protectedvirtual |
Initializes an empty sequence, used to bootstrap copying operations.
Implements Beatmup::Fragments::Sequence.
Definition at line 31 of file signal.cpp.
Inserts a Signal into the current signal at a specific time moment.
| signal | The signal to insert |
| time | The time moment to insert the signal at |
Definition at line 47 of file signal.cpp.
| void Signal::reserve | ( | dtime | length | ) |
Prolongates the sequence if necessary, to ensure given length.
Definition at line 54 of file signal.cpp.
| void Signal::saveWAV | ( | const char * | filename | ) |
Stores the signal to a PCM-encoded WAV file.
Definition at line 117 of file signal.cpp.
Definition at line 64 of file signal.cpp.
|
static |
Definition at line 72 of file signal.cpp.
|
inline |
|
inline |
|
inline |
|
private |
|
private |
|
private |
|
private |
|
static |