kopia lustrzana https://github.com/jameshball/osci-render
Remove osci_render.zip file, change some tooltip wording, revert modulo trick
rodzic
018771797d
commit
f699c185e2
|
@ -11,10 +11,9 @@ LineArtComponent::LineArtComponent(OscirenderAudioProcessor& p, OscirenderAudioP
|
|||
addAndMakeVisible(offsetLabel);
|
||||
addAndMakeVisible(offsetBox);
|
||||
|
||||
animate.setTooltip("Enable or disable animation for line art files");
|
||||
sync.setTooltip("Synchronize the animation's framerate with the BPM of the transport stream");
|
||||
rateBox.setTooltip("Set the animation's framerate in frames per second");
|
||||
offsetBox.setTooltip("Offset the animation's start point by a specified number of frames");
|
||||
animate.setTooltip("Enables animation for line art files.");
|
||||
sync.setTooltip("Synchronises the animation's framerate with the BPM of your DAW.");
|
||||
offsetLabel.setTooltip("Offsets the animation's start point by a specified number of frames.");
|
||||
|
||||
rateLabel.setText("Frames per Second", juce::dontSendNotification);
|
||||
rateBox.setJustification(juce::Justification::left);
|
||||
|
@ -73,16 +72,16 @@ void LineArtComponent::update() {
|
|||
offsetBox.setValue(audioProcessor.animationOffset->getValueUnnormalised(), false, 2);
|
||||
animate.setToggleState(audioProcessor.animateLineArt->getValue(), false);
|
||||
sync.setToggleState(audioProcessor.animationSyncBPM->getValue(), false);
|
||||
if (sync.getToggleState()) {
|
||||
rateLabel.setText("Frames per Beat", juce::dontSendNotification);
|
||||
rateLabel.setTooltip("Set the animation's speed in frames per beat.");
|
||||
} else {
|
||||
rateLabel.setText("Frames per Second", juce::dontSendNotification);
|
||||
rateLabel.setTooltip("Set the animation's speed in frames per second.");
|
||||
}
|
||||
}
|
||||
|
||||
void LineArtComponent::parameterValueChanged(int parameterIndex, float newValue) {
|
||||
if (sync.getToggleState()) {
|
||||
rateLabel.setText("Frames per Beat", juce::dontSendNotification);
|
||||
rateBox.setTooltip("Set the animation's framerate in frames per beat");
|
||||
} else {
|
||||
rateLabel.setText("Frames per Second", juce::dontSendNotification);
|
||||
rateBox.setTooltip("Set the animation's framerate in frames per second");
|
||||
}
|
||||
triggerAsyncUpdate();
|
||||
}
|
||||
|
||||
|
|
|
@ -200,8 +200,8 @@ public:
|
|||
|
||||
BooleanParameter* animateLineArt = new BooleanParameter("Animate", "animateLineArt", VERSION_HINT, true);
|
||||
BooleanParameter* animationSyncBPM = new BooleanParameter("Sync To BPM", "animationSyncBPM", VERSION_HINT, false);
|
||||
FloatParameter* animationRate = new FloatParameter("Animation Rate", "animationRate", VERSION_HINT, 30, -256, 256, 0.01);
|
||||
FloatParameter* animationOffset = new FloatParameter("Animation Offset", "animationOffset", VERSION_HINT, 0, -8192, 8192, 0.1);
|
||||
FloatParameter* animationRate = new FloatParameter("Animation Rate", "animationRate", VERSION_HINT, 30, -1000, 1000, 0.01);
|
||||
FloatParameter* animationOffset = new FloatParameter("Animation Offset", "animationOffset", VERSION_HINT, 0, -10000, 10000, 0.1);
|
||||
double animationTime = 0.f;
|
||||
|
||||
private:
|
||||
|
|
|
@ -83,8 +83,9 @@ void LineArtParser::parseJsonFrames(juce::String jsonStr) {
|
|||
}
|
||||
|
||||
void LineArtParser::setFrame(int fNum) {
|
||||
// Ensure that the frame number to set is within the bounds of the animation
|
||||
frameNumber = fNum % numFrames;
|
||||
// Ensure that the frame number is within the bounds of the number of frames
|
||||
// This weird modulo trick is to handle negative numbers
|
||||
frameNumber = (numFrames + (fNum % numFrames)) % numFrames;
|
||||
}
|
||||
|
||||
std::vector<std::unique_ptr<Shape>> LineArtParser::draw() {
|
||||
|
|
Plik binarny nie jest wyświetlany.
Ładowanie…
Reference in New Issue