|
Krotos Modules 3
|
#include <KrotosSynthesiserSound.h>
Classes | |
| struct | Listener |
Public Member Functions | |
| KrotosSampleOscillatorSound () | |
| KrotosSampleOscillatorSound (const String &soundName, AudioFormatReader &source, int midiNoteForNormalPitch, float dawSampleRate) | |
| void | Prepare (int midiNoteForNormalPitch, float dawSampleRate) |
| int | loadSounds (juce::Array< File > audioSampleFiles, bool getNearest) |
| bool | appliesToNote (int midiNoteNumber) override |
| bool | appliesToChannel (int midiChannel) override |
| void | setInterpolationType (KrotosAudioBuffer::InterpolationType interpType) |
| void | newBlockStart () override |
| SampleEngine * | getSampleEngine () override |
| void | canReadSpecificFiles (bool canRead) |
| void | addListener (Listener *l) |
| void | removeListener (Listener *l) |
| void | clearAndFreeBuffer () |
Public Member Functions inherited from krotos::KrotosSynthesiserSound | |
| KrotosSynthesiserSound () | |
Public Member Functions inherited from krotos::ResourceLock | |
| ResourceLock () | |
| bool | requestAccess (const StringRef id) |
| Called by a client to request access to the resource. | |
| bool | hasAccess (const StringRef id) const |
| Called by a client to enquire whether it has access to the resource. | |
| void | finishedAccessing (const StringRef id) |
| Called by a client to inform the resource that it no longer needs access. | |
| void | setAccessible (bool isAccessible) |
| Called by the resource to grant or deny access to clients. | |
Private Member Functions | |
| std::unique_ptr< MemoryBlock > | loadSample (const juce::File &path, int sampleCount) |
Private Attributes | |
| String | m_name |
| SampleEngine | m_sampleEngine |
| double | m_sourceSampleRate |
| int | m_midiRootNote {0} |
| ListenerList< Listener > | m_listeners |
| std::vector< std::array< unsigned char, BUF_SIZE > > | m_sampleData |
| String | m_specificExtension {""} |
| const float | DECIBELS_MINUS_0_1 {0.998763561f} |
Static Private Attributes | |
| static constexpr int64 | MAX_DATA_SIZE = 2147483648 |
| static constexpr int | MAX_NUMBER_SAMPLES = 250 |
| static constexpr size_t | BUF_SIZE = 32 |
Synth sound with sample data
| krotos::KrotosSampleOscillatorSound::KrotosSampleOscillatorSound | ( | ) |
| krotos::KrotosSampleOscillatorSound::KrotosSampleOscillatorSound | ( | const String & | soundName, |
| AudioFormatReader & | source, | ||
| int | midiNoteForNormalPitch, | ||
| float | dawSampleRate ) |
|
inline |
|
override |
|
override |
|
inline |
| void krotos::KrotosSampleOscillatorSound::clearAndFreeBuffer | ( | ) |
Used to reset sampleEngine to initial state. Clears buffer and frees allocated memory
|
inlineoverridevirtual |
Reimplemented from krotos::KrotosSynthesiserSound.
|
private |
| int krotos::KrotosSampleOscillatorSound::loadSounds | ( | juce::Array< File > | audioSampleFiles, |
| bool | getNearest ) |
Attempts to load a list of sounds from the paths in Array<File> audioSampleFiles Returns the number of files successfully loaded
|
inlineoverridevirtual |
Reimplemented from krotos::KrotosSynthesiserSound.
| void krotos::KrotosSampleOscillatorSound::Prepare | ( | int | midiNoteForNormalPitch, |
| float | dawSampleRate ) |
|
inline |
| void krotos::KrotosSampleOscillatorSound::setInterpolationType | ( | KrotosAudioBuffer::InterpolationType | interpType | ) |
|
staticconstexprprivate |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
staticconstexprprivate |
|
staticconstexprprivate |