Giter VIP home page Giter VIP logo

Comments (2)

stephenhensley avatar stephenhensley commented on May 30, 2024

This is more relevant in the libdaisy repo, but once MIDI clock has been added to the MIDI parser there, you could very easily send a trigger out based on the MIDI clock.

Here's what a simple clock-to-trigger example might look like once that's been added

// global/static variables in this example
dsy_gpio trigger_output;
uint32_t time_set;
uint32_t dur = 6; // 6ms gates

// Typical Switch case for Message Type.
void HandleMidiMessage(MidiEvent m)
{
    switch(m.type)
    {
        case NoteOn:
        // do something . . .
        break;
        case Clock:
            // Sets Trigger output high, and stores the time in ms that it was set high.
            dsy_gpio_write(&trigger_output, 1);
            time_set = dsy_system_getnow();
            break;
        default: break;
    }
}
// elsewhere (in callback or main)
// This shuts the trigger off after 6ms
if (dsy_system_getnow() - time_set > dur)
    dsy_gpio_write(&trigger_output, 0);

You could probably already do a work around where you do this on reception of a NoteOn message (using the above code, but moving it into the NoteOn section). And then just setting up a MIDI track that sends quarter notes or eighth notes for you to sync to on your eurorack.

from daisysp.

256k avatar 256k commented on May 30, 2024

Thank you, that makes sense the workaround you've mentioned. i could try to do that... would also be useful for transmitting the shuffle/swing of the master sequencer into euro as well coz often clocks don't transmit that shuffle.

from daisysp.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.