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.01 seconds.

  1. Replies
    48
    Views
    372

    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??
    ...
  2. Replies
    48
    Views
    372

    //************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...
  3. 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...
  4. Replies
    48
    Views
    372

    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...
  5. Replies
    48
    Views
    372

    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...
  6. Replies
    48
    Views
    372

    //************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
    48
    Views
    372

    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...
  8. Replies
    48
    Views
    372

    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...
  9. Replies
    48
    Views
    372

    ...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...
  10. Replies
    48
    Views
    372

    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.
  11. Replies
    48
    Views
    372

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

    int ledPin = 13;
    int ClockCount;

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

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

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

    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.
  14. Replies
    4
    Views
    77

    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
  15. Replies
    48
    Views
    372

    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?...
  16. Replies
    48
    Views
    372

    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...
  17. Replies
    48
    Views
    372

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

    int ledPin = 13;
    uint16_t Clock;

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

    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...
  19. Replies
    48
    Views
    372

    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...
  20. 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...
  21. 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...
  22. ok .. I'll need to think of to update states on...

    ok
    .. I'll need to think of to update states on bank change
  23. 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...
  24. 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...
  25. 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...
  26. 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...
  27. 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
  28. 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...
  29. //************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...
  30. Replies
    15
    Views
    244

    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...
  31. 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...
  32. 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...
  33. 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...
  34. Replies
    6
    Views
    175

    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.
  35. Replies
    7
    Views
    159

    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......
  36. 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...
  37. 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...
  38. 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...
  39. 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...
  40. 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++){
    ...
  41. 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...
  42. 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...
  43. 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...
  44. 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...
  45. Tested with a ground wire on pins 0 to 3 and the...

    Tested with a ground wire on pins 0 to 3 and the toggle worked with the negated assignment uncommented (and missing semicolon added and single equal sign changed to assignment double).

    Don't have...
  46. The LEDs are at least in part from failing to put...

    The LEDs are at least in part from failing to put the pins in output mode.

    It was optimistic to think it would be close but it was in part to make it easier to get at from a machine I can get...
  47. Replies
    29
    Views
    559

    If it's only a problem when the output from the...

    If it's only a problem when the output from the guitar is "quiet" and the noise source is from the ADC then one could use an envelop follower from the input level and gate the signal when quiet.
    ...
  48. Here's the bit you need to comment out if the DAW...

    Here's the bit you need to comment out if the DAW thing doesn't work to set the toggle state.


    // usbMIDI.setHandleControlChange(OnControlChange)

    Alternately you can leave the handler run...
  49. //************LIBRARIES USED************** //...

    //************LIBRARIES USED**************
    // 'include the Bounce library for 'de-bouncing' switches -- removing electrical chatter as contacts settle'
    #include <Bounce.h>
    //'usbMIDI.h library...
  50. Some latching footswitches don't sit as high when...

    Some latching footswitches don't sit as high when latched and releasing it feels different from setting it.

    Personally I would make the DAW listen to the switch instead. If the switch is on, set...
Results 1 to 50 of 500
Page 1 of 10 1 2 3 4