11namespace tracktion {
inline namespace engine
22 int getNumSounds()
const;
27 int getKeyNote (
int index)
const;
28 int getMinKey (
int index)
const;
29 int getMaxKey (
int index)
const;
30 float getSoundGainDb (
int index)
const;
31 float getSoundPan (
int index)
const;
32 bool isSoundOpenEnded (
int index)
const;
33 double getSoundStartTime (
int index)
const;
34 double getSoundLength (
int index)
const;
35 void setSoundExcerpt (
int index,
double start,
double length);
39 double startTime,
double length,
float gainDb);
40 void removeSound (
int index);
41 void setSoundParams (
int index,
int keyNote,
int minNote,
int maxNote);
42 void setSoundGains (
int index,
float gainDb,
float pan);
43 void setSoundOpenEnded (
int index,
bool isOpenEnded);
44 void setSoundMedia (
int index,
const juce::String& sourcePathOrProjectID);
50 static const char* getPluginName() {
return NEEDS_TRANS(
"Sampler"); }
51 static const char* xmlTypeName;
54 juce::String getPluginType()
override {
return xmlTypeName; }
55 juce::String getShortName (
int)
override {
return "Smplr"; }
57 bool isSynth()
override {
return true; }
58 bool needsConstantBufferSize()
override {
return false; }
66 bool takesMidiInput()
override {
return true; }
67 bool takesAudioInput()
override {
return true; }
68 bool producesAudioWhenNoAudioInput()
override {
return true; }
72 void reassignReferencedItem (
const ReferencedItem&, ProjectItemID newID,
double newStartTime)
override;
81 double startTime,
double length,
float gainDb);
83 void setExcerpt (
double startTime,
double length);
89 int keyNote = -1, minNote = 0, maxNote = 0;
90 int fileStartSample = 0, fileLengthSamples = 0;
91 bool openEnded =
false;
92 float gainDb = 0, pan = 0;
93 double startTime = 0, length = 0;
113 void valueTreeChanged()
override;
114 void handleAsyncUpdate()
override;
void applyToBuffer(const PluginRenderContext &) override
Process the next block of data.
bool hasNameForMidiNoteNumber(int note, int midiChannel, juce::String &name) override
If it's a synth that names its notes, this can return the name it uses for this note 0-127.
void sourceMediaChanged() override
Called when ProjectItem sources are re-assigned so you can reload from the new source.
void deinitialise() override
Called after play stops to release resources.
juce::String getSelectableDescription() override
Subclasses must return a description of what they are.
int getNumOutputChannelsGivenInputs(int numInputChannels) override
This must return the number of output channels that the plugin will produce, given a number of input ...
juce::String getName() const override
The name of the type, e.g.
#define TRANS(stringLiteral)
#define NEEDS_TRANS(stringLiteral)
constexpr Type jmin(Type a, Type b)
Passed into Plugins when they are being initialised, to give them useful contextual information that ...
The context passed to plugin render methods to provide it with buffers to fill.