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. You can share a switch on two Teensies but it...

    You can share a switch on two Teensies but it might need an external pullup as I'm not sure how using one or both Teensies' internal pullups would work.

    A single Teensy could send regular (series...
  2. What do you mean by 'redundancy' in having two...

    What do you mean by 'redundancy' in having two USB ports?

    Any Teensy will work as a controller without needing a breakout board. Get one with soldered headers if you are new to electronics...
  3. Replies
    19
    Views
    323

    Arrays make multi channel things much easier. ...

    Arrays make multi channel things much easier.

    Your code does check-for-change after rounding 3 bits so it's likely stable unless the voltage is very near a rounding threshold at 7 bits.

    It...
  4. Replies
    19
    Views
    323

    Nice answer.... I suspect the midi code is a...

    Nice answer....

    I suspect the midi code is a problem too.

    Have you checked how much midi noise it's generating?

    I suspect there will be a lot of alternating and adjacent CC messages.
    ...
  5. Replies
    36
    Views
    538

    void peakDetect(int voltage) { static int...

    void peakDetect(int voltage) {
    static int state; // 0=idle, 1=looking for peak, 2=ignore aftershocks
    static int peak; // remember the highest reading
    static elapsedMillis msec; // timer...
  6. Replies
    36
    Views
    538

    Then it really should not be added to an existing...

    Then it really should not be added to an existing and crucial test.

    You should spit it off as I believe it will interfere with functionality when the counter is at max.


    pgcNum++
    if (pgcNum...
  7. Replies
    36
    Views
    538

    Well at some point there's bound to be a bit of...

    Well at some point there's bound to be a bit of debugging and some error is likely to be in my code too... (usually my code doesn't compile without a bunch tweaks and add-semi-colons).

    I could...
  8. Replies
    36
    Views
    538

    STOP! -- this is just wrong... the Mod0 and Mod1...

    STOP! -- this is just wrong... the Mod0 and Mod1 code will test every time the averaging section of the code is run...

    You really only want to fire stuff from exactly where it was in Paul's...
  9. Replies
    36
    Views
    538

    I've only picked up something like the default...

    I've only picked up something like the default style for C code and the object.model stuff from context... But as long as the eye can see what you mean it's ok.

    While the code I've posted should...
  10. Replies
    36
    Views
    538

    I haven't looked at the details yet but will...

    I haven't looked at the details yet but will mention it's hard to read without the indenting being done carefully to match the braces.

    Also, you shouldn't repeat code unnecessarily. The stuff...
  11. Replies
    36
    Views
    538

    You're in the default case ...where you would...

    You're in the default case ...where you would send note off if you are also sending note values under case 1.

    Case 1 is where the note event in Paul's method is sent. It's where you have...
  12. Replies
    36
    Views
    538

    I didn't notice your reply between mine... it...

    I didn't notice your reply between mine... it will be a while before I can have a look... I don't laugh at code... unless it's meant to be funny.
  13. Replies
    36
    Views
    538

    I'd say you switch inside his case instead as...

    I'd say you switch inside his case instead as there is only one spot where it matters.

    You don't wait to check the footswitches as they are always available whether you read them on every pass or...
  14. Replies
    36
    Views
    538

    Ignore the second message... that's for later....

    Ignore the second message... that's for later. Macros are good to understand when you read code but you don't need to use them.

    Do it in steps and use serial print to check on the state of...
  15. Replies
    36
    Views
    538

    Given this test is very infreqently run; you...

    Given this test is very infreqently run; you would do better to test the pin directly here.

    if (!digitalRead(0) && pgcNum < 127) ..,

    I think this is where a pro would define a macro to make the...
  16. Replies
    36
    Views
    538

    You're getting warmer. I think you are...

    You're getting warmer.

    I think you are generally very close.

    First, the falling edges return True or False on there own, you don't need to test them.

    Second, we don't want to test them as...
  17. Replies
    36
    Views
    538

    The line pgcNum < 127; reads True or False but...

    The line pgcNum < 127; reads True or False but does nothing... or if it does it's news to me.

    I assumed you were attempting to deal with incrementing beyond 127.
  18. Replies
    36
    Views
    538

    pgcNum < 127; pgcNum++; I don't think...

    pgcNum < 127;
    pgcNum++;
    I don't think this does what you want...
    https://www.cprogramming.com/tips/tip/increment-and-decrement-counters-with-rollover.

    I'm still not sure what you're up...
  19. Replies
    36
    Views
    538

    I'll need some time to decipher your code. Do...

    I'll need some time to decipher your code.

    Do you have proper signal protection on your Teensy input from the piezo?
  20. Replies
    36
    Views
    538

    RE:PM If the modifier switches are to be only...

    RE:PM

    If the modifier switches are to be only active while held then you don't need to debounce the signal for the modifier action.

    Within each loop set variables for the modifiers

    Mod1 =...
  21. Replies
    36
    Views
    538

    I meant to reply sooner. Do debounce anytime...

    I meant to reply sooner.

    Do debounce anytime you are taking action based on a change, that's what it's for.

    But if you are only testing the state of a pin in a conditional statement then you...
  22. Replies
    36
    Views
    538

    My bad... as usual I didn't read the original...

    My bad... as usual I didn't read the original post carefully and I thought you were looking for latching with momentarily switches.

    In my defence your original code does not scan for rising edges...
  23. Replies
    3
    Views
    84

    3.3v Even if fault tolerant you need the...

    3.3v

    Even if fault tolerant you need the voltage divider to have the same range as the pin.
  24. Replies
    36
    Views
    538

    I have examples on the forum... try 'toggle' and...

    I have examples on the forum... try 'toggle' and 'midi'



    You're really close now...

    One thing, I think you want to declare these outside the main loop

    int ledPin = 13;
    int btn0State =...
  25. Replies
    36
    Views
    538

    You need to store the 'state' and toggle it in...

    You need to store the 'state' and toggle it in your code...
  26. Doesn't appear to be a code problem (I did not...

    Doesn't appear to be a code problem (I did not compile).


    Try much higher bounce times and see if it's better.

    If that fixes it try slightly higher than 5 until it's stable.

    If it doesn't...
  27. Replies
    6
    Views
    187

    So the bug is the set command is not setting...

    So the bug is the set command is not setting Teensy3Clock?
  28. Replies
    6
    Views
    187

    When it hits the sync interval it syncs!? That's...

    When it hits the sync interval it syncs!?
    That's a bug??
  29. Replies
    20
    Views
    3,063

    Paul is saying DAC pins are not meant to drive...

    Paul is saying DAC pins are not meant to drive any real load, i.e. small resistance value... 32, 8, 4 ohm are all way to low but they are not all the same.
  30. Have you got a gut shot of the controls? How...

    Have you got a gut shot of the controls?

    How they're soldered will tell if you are only using the case.

    If so it could be done with just the Teensy and very careful wiring.
  31. Are you're sure it's toast... A T3.5 should...

    Are you're sure it's toast...

    A T3.5 should hit the 22 analog signals I see without needing expanders or multiplexers... I think you are one shy for getting them all from the easy edges.

    Do...
  32. That was the problem... your code was pretending...

    That was the problem... your code was pretending that the bits were meaningful.

    ResponsiveAnalogRead has settings for resolution and other control factors that will help you get as good a signal...
  33. No… I guess you don't if you enable the pin...

    No… I guess you don't if you enable the pin that's reading the mux with an internal pullup.

    (Note you need to connect the switch to pull to ground instead of to 3.3v if you want to skip a...
  34. ...non-qualified personnel answer: The data...

    ...non-qualified personnel answer:

    The data sheet shows LEDs without current limiting resistors in the 'typical application' schematic.

    The pot setup is OK but you might want to consider a...
  35. You are trying to fire off two MIDI messages on...

    You are trying to fire off two MIDI messages on every loop and you will eventually crash the event que on the receiving machine (at least if its Windows and I believe Mac too).

    The serial calls...
  36. Btw... This is an ancient thread and you don't...

    Btw... This is an ancient thread and you don't seem to be asking about CV for modular synths which I take to be the original topic.

    But six buttons should be fairly simple.

    A DIN output is...
  37. That post covers how to initialize the bounce and...

    That post covers how to initialize the bounce and ResponsiveAnalogRead object. It's multiplex code uses a delay immediately after setting the mux controls to give the signal time to stabilize after...
  38. You need separate bounce items because you will...

    You need separate bounce items because you will get different readings between each switch and you would mistake those for a bouncing switch....

    So you need multiple objects with the same pin...
  39. My engineer's hat is blue and white striped and...

    My engineer's hat is blue and white striped and has a brim and a puffy top.. choo woooo…

    But even I know the ground belongs on the sleeve (even if I don't know how to spell it).

    ...Re: on one...
  40. I could not find a semantic for it online and...

    I could not find a semantic for it online and mine is elsewhere but I recall the ground is the sleave in both.

    An ohm reading across the tip and sleave while you move the pedal will tell you if ts...
  41. Sundry observations... not an EE and prone to...

    Sundry observations... not an EE and prone to blunders so I may have any number of things wrong here.

    The m audio issue is likely due to the wiring not being a simple cross of Vcc and GND. I...
  42. Until someone that understands the arcane details...

    Until someone that understands the arcane details posts the full answer; i believe it relates to the device name string, the vender ID and product ID settings.

    See "Customizing the MIDI Name" near...
  43. Replies
    31
    Views
    10,279

    Analog portamento is typically a lowpass filter...

    Analog portamento is typically a lowpass filter (with a very low cutoff) or slew limiter to retard the voltage shift on note changes.

    It can be done fairly easly in either digital or analog...
  44. just scanned this.... don't know why the...

    just scanned this.... don't know why the arithmetic didn't jump out.

    Edit.... was going to ask where F_BUS rates are listed but I get what Paul is saying now.
  45. Umm... if it's four times faster, why divide by...

    Umm... if it's four times faster, why divide by three?
  46. https://www.pjrc.com/teensy/td_libs_FreqMeasure.ht...

    https://www.pjrc.com/teensy/td_libs_FreqMeasure.html

    The raw value is the number of cpu clock cycles per signal period that must be converted to Hz.

    FreqMeasure.countToFrequency(count);
  47. The analog section of my original midi project ...

    The analog section of my original midi project uses a mostly usable moving deadband hysteresis system

    //************ANALOG SECTION**************
    void getAnalogData(){
    v0 = analogRead(0);
    ...
  48. If you leave the pot near a threshold between two...

    If you leave the pot near a threshold between two rounding points in the 12 bit data then even modest noise will cause alternation between two midi values.

    A better approach is to write the raw...
  49. Your variable names puzzle me, is it on A10 or...

    Your variable names puzzle me, is it on A10 or A1? Do you care in the code?

    Other than that it's passable MIDI code well written by my amature standards. You may occasionally find your code still...
  50. I'm not sure it's a bad idea;. I'm not qualified...

    I'm not sure it's a bad idea;. I'm not qualified to say either way.

    With a serial-register based IC I think you track the state of your leds with bit logic and write the full register at some...
Results 1 to 50 of 500
Page 1 of 10 1 2 3 4