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
    18
    Views
    466

    Other than getting the index for the terminating...

    Other than getting the index for the terminating character wrong the code from post 11 worked and I got the ACK back from a Teensy 2.0.


    void onSysEx(byte *sysExBytes, unsigned int length){
    if...
  2. Replies
    18
    Views
    466

    I was playing with HTML today... didn't have a...

    I was playing with HTML today... didn't have a MIDI capable browser so I focused on building the string to paste into a MIDI utility... just leaving the WIP code here for further development.

    ...
  3. Replies
    33
    Views
    246

    You need a voice management system to steal the...

    You need a voice management system to steal the least objectionable running voice or the first available free one. (I don't know of any examples.)

    If you want to keep the built-in buttons and...
  4. Sorry... I can offer code for pots but not for...

    Sorry... I can offer code for pots but not for encoders.

    The voltage coming off a pot as a voltage divider is dead simple to use as proxy for the physical position of a pot.

    Encoders have lots...
  5. The code in this post could be merged with the...

    The code in this post could be merged with the standard features of my Many buttons and knobs example to provide the feature set you indicated you want.
    ...
  6. Replies
    3
    Views
    104

    100 kOhm is very high especially for mux'd pots....

    100 kOhm is very high especially for mux'd pots.

    It could also be insufficient settling time between setting and reading the mux.

    A cap on a mux'd pot is bad as it slows settling time.
    ...
  7. Good to know, but isn't either fast enough to...

    Good to know, but isn't either fast enough to record mono audio provided you are buffering enough data?

    For a data logging project is that fussy soldering or breakout boards really necessary? And...
  8. Replies
    18
    Views
    466

    I could build you a Flowstone based editor .exe...

    I could build you a Flowstone based editor .exe file that will work on any Windows machine like I made for my Footsy controller.... it's really easy especially as I can use mine as a template so I...
  9. Perhaps powering the second Teensy without...

    Perhaps powering the second Teensy without connecting it to the USB of the PC might get rid of it as it seems likely (to me anyway) that the compiler is finding the wrong Teensy connected after the...
  10. Do you need the audio library at all? Since...

    Do you need the audio library at all? Since you've started with the audio library, we can assume the frequency you're interested in is not too high. You could just take raw analog readings every...
  11. Replies
    18
    Views
    466

    It should be dead simple as a JavaScript goes....

    It should be dead simple as a JavaScript goes. You just need to assemble the editable bytes from object.value properties into a sequence and send it on the press of a button or other object that can...
  12. 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...
  13. 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...
  14. 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...
  15. Replies
    18
    Views
    466

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

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

    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...
  17. Replies
    50
    Views
    480

    //************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...
  18. Replies
    50
    Views
    480

    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??
    ...
  19. Replies
    50
    Views
    480

    //************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...
  20. 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...
  21. Replies
    50
    Views
    480

    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...
  22. Replies
    50
    Views
    480

    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...
  23. Replies
    50
    Views
    480

    //************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...
  24. Replies
    50
    Views
    480

    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...
  25. Replies
    50
    Views
    480

    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...
  26. Replies
    50
    Views
    480

    ...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...
  27. Replies
    50
    Views
    480

    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.
  28. Replies
    50
    Views
    480

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

    int ledPin = 13;
    int ClockCount;

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

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

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

    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.
  31. Replies
    4
    Views
    89

    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
  32. Replies
    50
    Views
    480

    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?...
  33. Replies
    50
    Views
    480

    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...
  34. Replies
    50
    Views
    480

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

    int ledPin = 13;
    uint16_t Clock;

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

    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...
  36. Replies
    50
    Views
    480

    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...
  37. 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...
  38. 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...
  39. ok .. I'll need to think of to update states on...

    ok
    .. I'll need to think of to update states on bank change
  40. 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...
  41. 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...
  42. 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...
  43. 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...
  44. 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
  45. 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...
  46. //************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...
  47. Replies
    15
    Views
    328

    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...
  48. 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...
  49. 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...
  50. 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...
Results 1 to 50 of 500
Page 1 of 10 1 2 3 4