Replies created

 

Viewing 5 replies - 1 through 5 (of 5 total)
  • Robert
    Participant

    Dunno but maybe synchronise the visual delay to the audio latency? Something like:

    #include

    class VisualDelayAudioProcessor : public juce::AudioProcessor
    {
    public:
    VisualDelayAudioProcessor() {}
    ~VisualDelayAudioProcessor() override {}

    void prepareToPlay (double sampleRate, int samplesPerBlock) override
    {
    // Get the audio latency from the audio device (in seconds)
    audioLatencyInSeconds = getLatencySeconds();
    audioLatencyInSamples = static_cast(sampleRate * audioLatencyInSeconds);
    }

    void releaseResources() override {}

    void processBlock (juce::AudioBuffer& buffer, juce::MidiBuffer& midiMessages) override
    {
    // Process audio here (e.g., pass-through or modify audio)
    // In this example, we’re just passing the audio buffer as-is
    }

    bool isBusesLayoutSupported (const BusesLayout& layouts) const override
    {
    // We support a stereo input and output layout
    return layouts.getMainOutputChannelSet() == juce::AudioChannelSet::stereo() &&
    layouts.getMainInputChannelSet() == juce::AudioChannelSet::stereo();
    }

    const juce::String getName() const override { return “VisualDelayAudioProcessor”; }

    bool hasEditor() const override { return true; }
    juce::AudioProcessorEditor* createEditor() override { return new VisualDelayAudioProcessorEditor (*this); }

    // Get the audio latency in samples
    int getAudioLatencyInSamples() const { return audioLatencyInSamples; }

    private:
    double audioLatencyInSeconds = 0.0;
    int audioLatencyInSamples = 0;
    };

    class VisualDelayAudioProcessorEditor : public juce::AudioProcessorEditor
    {
    public:
    VisualDelayAudioProcessorEditor (VisualDelayAudioProcessor& p)
    : AudioProcessorEditor (&p), processor (p)
    {
    setSize (400, 300);

    // Set up the visual component (a simple rectangle that will move based on latency)
    addAndMakeVisible (visualDelay);
    }

    void resized() override
    {
    visualDelay.setBounds (10, 10, 50, 50); // Position of the visual object
    }

    void paint (juce::Graphics& g) override
    {
    g.fillAll (juce::Colours::black);

    // Synchronize the visual delay to the audio latency
    float delayXPosition = processor.getAudioLatencyInSamples() / 10.0f; // Scale the delay
    visualDelay.setBounds (10 + static_cast(delayXPosition), 10, 50, 50);

    g.setColour (juce::Colours::red);
    g.fillRect (visualDelay.getBounds()); // Draw the visual element
    }

    private:
    VisualDelayAudioProcessor& processor;
    juce::Rectangle visualDelay;
    };

    // Create the plugin instance
    juce::AudioProcessor* JUCE_CALLTYPE createPluginFilter()
    {
    return new VisualDelayAudioProcessor();
    }


    Operating system: macOS Sequoia (15)
    Robert
    Participant

    Spending most of my day figuring out why this is not possible…..??? I don’t want to chop up my midi performance in tiny blocks  just to be able to adjust velocity (ramp up etc.) If I can turn the velocity play-style knob real time, why not automate it with a macro? Most daws do this (midi velocity automation curves) Just not the one I’m using (Studio One 6)


    Reply To: Automating velocity? version: 3.3.6
    Operating system: macOS Sonoma (14)
    Robert
    Participant

    Amen… Visual feedback is not compensating for plugin latency.


    Reply To: Playback cursor out of sync! version: 3.1.7
    Operating system: macOS Mojave (10.14)
    Robert
    Participant

    Here is also the same Studio One sync problem still going strong… In Logic I need to use Low Latency mode to get everything in sync. Strange enough Cubase 10.5 is spot on, no delay visible, so it is possible. Please fix this… (MAC/Mojave everything latest updates)


    Reply To: Playback cursor out of sync! version: 3.1.5
    Operating system: macOS Mojave (10.14)
    Robert
    Participant

    I have got the samen error here… Used a tempo map for a brief moment but went for a straight  tempo, unable to interact with cubase and SD3

    edit: got it…Toggle timebase between musical an linear on the track header. The ( Cubase -> Preferences>Editing Default Track Time Type got me in the right direction)


    Reply To: Time Type Mismatch. version: 3.1.4
    Operating system: macOS Mojave (10.14)
    • This post was modified 5 years, 11 months ago by Robert.
Viewing 5 replies - 1 through 5 (of 5 total)

No products in the cart.

×