Forum Rule: Always post complete source code & details to reproduce any issue!

Search:

Type: Posts; User: oddson

Page 1 of 10 1 2 3 4

Search: Search took 0.02 seconds.

  1. Apologies... yet again not reading carefully ...

    Apologies... yet again not reading carefully

    The controller should be fine and the library doesn't look difficult to use.

    Gibbedy's comments appear correct except the colour values are 12 bit...
  2. D'oh… didn't notice the colour comments... kinda...

    D'oh… didn't notice the colour comments... kinda undermines my comments on direct control.

    Unless you really just want to alternate, in which case you can use the same signal and source one and...
  3. You have a choice... you can figure out how to...

    You have a choice... you can figure out how to program that part for SPI control or you can figure out how to control LED load currents via transistor switches.

    No offence, but your programming...
  4. Replies
    9
    Views
    220

    //************LIBRARIES USED************** //...

    //************LIBRARIES USED**************
    // include the Bounce library for 'de-bouncing' switches -- removing electrical chatter as contacts settle
    #include <Bounce.h>
    #include <EEPROM.h>
    //...
  5. Replies
    9
    Views
    220

    I was adding comments to your code and thought...

    I was adding comments to your code and thought I'd try to graft on SysEx preset config.

    I don't recommend you even trying to compile this yet but I think it's only a few typos and brain-farts...
  6. Replies
    50
    Views
    428

    //************LIBRARIES USED************** //...

    //************LIBRARIES USED**************
    // 'include the Bounce library for 'de-bouncing' switches -- removing electrical chatter as contacts settle'
    #include <Bounce.h>
    //'usbMIDI.h library is...
  7. Replies
    50
    Views
    428

    if (flashcount>= -1*waitClocks){ // counts into...

    if (flashcount>= -1*waitClocks){ // counts into negative values to supress tempo flash longer
    if (flashcount> 0){ //
    if (flashTimer>(flashOnTime+flashOffTime)){
    //was here??
    ...
  8. Replies
    50
    Views
    428

    //************LIBRARIES USED************** //...

    //************LIBRARIES USED**************
    // 'include the Bounce library for 'de-bouncing' switches -- removing electrical chatter as contacts settle'
    #include <Bounce.h>
    //'usbMIDI.h library is...
  9. Welcome You're not the first to miss this...

    Welcome
    You're not the first to miss this little nugget.

    You need to read incoming midi even if you are not using them. It stops an event queue on the computer from getting bogged down with...
  10. Replies
    50
    Views
    428

    I'm rethinking what's needed in flashing...

    I'm rethinking what's needed in flashing behaviour when Tap/Bank button is used and posting this to confirm whether my intuition on the user interface agrees with yours -- and of anyone else with...
  11. Replies
    50
    Views
    428

    I've been downright dangerous lately. I'd like...

    I've been downright dangerous lately.

    I'd like to blame cut and paste programming but that's just admitting laziness.

    And the increment thing is stupid... even if it works it's unnecessarily...
  12. Replies
    50
    Views
    428

    //************LIBRARIES USED************** //...

    //************LIBRARIES USED**************
    // 'include the Bounce library for 'de-bouncing' switches -- removing electrical chatter as contacts settle'
    #include <Bounce.h>
    //'usbMIDI.h library is...
  13. Replies
    50
    Views
    428

    Hey... nicely spotted. I think there's some...

    Hey... nicely spotted.

    I think there's some confusion on my part. I figured it was safe to keep the light off but it would turn it off while you are in bank select.

    So yes to your insight but...
  14. Replies
    50
    Views
    428

    The code in 15 is tested to work with the built...

    The code in 15 is tested to work with the built in LED with both a MIDI utility and two DAW...

    I've rewritten your program to abstract out the active low LED wiring. The code can be set to active...
  15. Replies
    50
    Views
    428

    ...and I forgot how powers are written... how...

    ...and I forgot how powers are written... how increment's work... and that two data bytes in MIDI is only 14 bits. Even by my standards I'm making a lot of gaffs today.

    @Aussie_CrocHunter
    Try...
  16. Replies
    50
    Views
    428

    It can't since its effective limit is 16^2*6 but...

    It can't since its effective limit is 16^2*6 but your point is taken...

    Learned a lot here... including the commutative rule for modulo division

    Thanks so much.
  17. Replies
    50
    Views
    428

    int ledPin = 13; int ClockCount; void...

    int ledPin = 13;
    int ClockCount;

    void setup() {
    pinMode(ledPin, OUTPUT);
    usbMIDI.setHandleSongPosition(onSongPosition);
    usbMIDI.setHandleClock(onClock);
    ...
  18. Replies
    4
    Views
    82

    Bone-head is the reason... I should think a bit...

    Bone-head is the reason... I should think a bit before posting
  19. Replies
    4
    Views
    82

    Right. Bone-head I knew it works with locals...

    Right. Bone-head

    I knew it works with locals but that's 'cause I use correctly there.
  20. Replies
    4
    Views
    82

    increment operator bug with globals?

    int i;

    void loop() {
    i=i++;
    Serial.println(i);
    delay(1000);
    }
    Doesn't increment.

    Ard. 1.8.5/ Td1.48
  21. Replies
    50
    Views
    428

    Yeah I should have thought about units and that...

    Yeah I should have thought about units and that the result needs to jump by six with each semiquaver.

    Isn't there a risk of overloading the variable by doing the multiplication before the modulus?...
  22. Replies
    50
    Views
    428

    I think you were right the first time -->...

    I think you were right the first time --> (SPP*6)%24 = SPP%4

    Consider: by taking modulo 4 of the SPP we are effectively truncating to the number of 1/16 notes since the last quarter. Which is...
  23. Replies
    50
    Views
    428

    int ledPin = 13; uint16_t Clock; void...

    int ledPin = 13;
    uint16_t Clock;

    void setup() {
    pinMode(ledPin, OUTPUT);
    usbMIDI.setHandleSongPosition(onSongPosition);
    usbMIDI.setHandleClock(onClock);
    ...
  24. Replies
    50
    Views
    428

    So then it's zero on start and never pause? ...

    So then it's zero on start and never pause?

    And the convention is to run the master clock at the current tempo and to pick-up after a resume/continue command?

    I feel like you can pause some...
  25. Replies
    50
    Views
    428

    So set a counter to zero on myStart and increment...

    So set a counter to zero on myStart and increment on myClock and flash when the modulus by 24 is zero (and reset the counter if we're not tracking the beat/measure).
    Pause counting on myStop and...
  26. So what did you want with the clock? -- you'll...

    So what did you want with the clock? -- you'll need an override on the clock flash from the first TAP fallingEdge until after the second TAP is sent and for some delay time if the bank threshold is...
  27. for (int i = 0; i < D_PINS ; i++){ ...

    for (int i = 0; i < D_PINS ; i++){
    digitalWrite(GREEN_LED_PINS[i], !state[bank][i]);
    digitalWrite(RED_LED_PINS[i], state[bank][i]);
    }

    Add this before flashcount = bank + 1;

    The negation...
  28. ok .. I'll need to think of to update states on...

    ok
    .. I'll need to think of to update states on bank change
  29. oops. broke D2 on the other pins... ...

    oops. broke D2 on the other pins...



    //************DIGITAL SECTION**************
    void getDigitalData(){
    for (int i=0;i<D_PINS;i++){
    digital[i].update();
    if...
  30. Try this code buy check the pin and CC values...

    Try this code buy check the pin and CC values first.

    //************LIBRARIES USED**************
    // 'include the Bounce library for 'de-bouncing' switches -- removing electrical chatter as...
  31. Ummm... I think I just forgot to make the arrays...

    Ummm... I think I just forgot to make the arrays two-dimensional. The same logic that works for which button states is which should work for banks too.


    That is how it was working for me. Does...
  32. I likely haven't thought it through... but I...

    I likely haven't thought it through... but I thought you connect a sink or source to the common side and switch the mux connections when needed.

    ...don't bother to explain if this is nonsense. I...
  33. If you are looking to stay with a mux here's a...

    If you are looking to stay with a mux here's a latching example. http://www.ti.com/product/CD74HC4351
  34. I did have the PINs configured for my test rig...

    I did have the PINs configured for my test rig but it looks like I put them back to how I thought yours are working but I don't know where you put the mode switch or it's LED.

    Can you share the...
  35. //************LIBRARIES USED************** //...

    //************LIBRARIES USED**************
    // 'include the Bounce library for 'de-bouncing' switches -- removing electrical chatter as contacts settle'
    #include <Bounce.h>
    //'usbMIDI.h library is...
  36. Replies
    15
    Views
    262

    That's fairly slick... I haven't been using...

    That's fairly slick...

    I haven't been using structures with Teensyduino but seeing how easy it looks I think I might start.



    @OP
    The delay(5); is likely keeping this code fairly stable in...
  37. Yeah well I think I'd have been more surprised if...

    Yeah well I think I'd have been more surprised if it had worked. The switch logic is really all that can be wrong. Once we can set bank value then the rest will work as before... The taps we'll sort...
  38. Got a chance to compile the code changes I wrote...

    Got a chance to compile the code changes I wrote -- yikes I really need to compile as I go.

    There's two major mistakes just in the matrix declaration I quoted above...

    You can try this if you...
  39. If the TAP CC message can be sent on every...

    If the TAP CC message can be sent on every downstroke and it can be the same D2 value (doesn't need off and on values) then the code should be fairly simple.
    Here's an untested bit of code I'll be...
  40. Replies
    6
    Views
    178

    Any chance you have connectors 4 and 5 switched...

    Any chance you have connectors 4 and 5 switched at the DIN connector?

    There is always some ambiguity in sorting out if the connector is shown from the face or connection side.
  41. Replies
    9
    Views
    220

    This would be ideal. Reading a few bytes of sysex...

    This would be ideal. Reading a few bytes of sysex and storing it in eeprom is not difficult.

    I did it years ago......
  42. Here's a thing.... send no CC at tap 1 and send...

    Here's a thing.... send no CC at tap 1 and send cc at implied location of tap three based on the interval between one and two.....

    But, as you've alluded, what to do if there is a third tap as...
  43. If you want a CC sent exactly when you detect the...

    If you want a CC sent exactly when you detect the first fallingEdge you have to be OK with it being sent when it turns out your user is just trying to scroll through banks.

    So when you're changing...
  44. Ah... well that's outside this thread topic isn't...

    Ah... well that's outside this thread topic isn't it ;)

    The logic isn't all that hard. If there is a risingEdge within x milliseconds after the fallingEdge change the mode (recall with...
  45. This sound's like I have the HIGH/LOW backwards...

    This sound's like I have the HIGH/LOW backwards as I thought I might. Try this:

    digitalWrite(RED_LED_PINS[i], state[i]);
    digitalWrite(GREEN_LED_PINS[i], !state[i]);

    The...
  46. Forgot to switch the LEDs with the toggle... ...

    Forgot to switch the LEDs with the toggle...

    Something like this



    //************DIGITAL SECTION**************
    void getDigitalData(){
    for (int i=0;i<D_PINS;i++){
    ...
  47. I don't imagine the LED thing is a problem but is...

    I don't imagine the LED thing is a problem but is worth a note in the code so anyone working on the code down the road understands why.

    Have you tried the code with state[i] = !state[i] ; active...
  48. To have it read changes from software but not be...

    To have it read changes from software but not be dependant on feedback otherwise we just need to leave the toggle code active but still allow the state to be set in the onControlChange().


    I...
  49. I assumed you have MIDI feedback available and...

    I assumed you have MIDI feedback available and active in your software.

    But I think I see how it should work if feedback is not running... but I have to work now...
  50. Well its all based on the assumption that the daw...

    Well its all based on the assumption that the daw sends back confirmation... the whole point of not just letting the switch state determine off and on.

    But it could be I've messed up the logic on...
Results 1 to 50 of 500
Page 1 of 10 1 2 3 4