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. That's not USB midi code... you don't need the...

    That's not USB midi code... you don't need the library MIDI.h but you need to compile as Mark indicates and the call the usbMIDI object to read and write according to this page:...
  2. STATUS is a bad name for that array. Maybe...

    STATUS is a bad name for that array.

    Maybe TYPE[bank][i].

    The type and channel nibbles together are called the status byte but it's both wrong and misleading here where one might think it's...
  3. Until you want to try custom data structures the...

    Until you want to try custom data structures the best way is as vjmuzik says, another array to track what type of message.


    Integers act as stand-ins for types of messages (you can use the...
  4. Replies
    4
    Views
    88

    https://forum.pjrc.com/threads/43699-teensy-3-6-se...

    https://forum.pjrc.com/threads/43699-teensy-3-6-serial-TX-buffer-size

    Looks like your path isn't correct. Teensy after Hardware...
  5. Replies
    4
    Views
    116

    A hardware serial MIDI in connection is usually...

    A hardware serial MIDI in connection is usually protected by an optoisolator that is current based so it will work with 5v or 3.3v provided the resistor values are such that the current is still...
  6. Sound like you've got way more DIN MIDI...

    Sound like you've got way more DIN MIDI experience than I do... I have a Sparkfun MIDI board somewhere -- 5 volt only version I think but as I found my old T2.0 that would be perfect. Maybe I need to...
  7. ...I didn't test so there may be a problem with...

    ...I didn't test so there may be a problem with my code but it did compile and it pretty simple so if there's an error one of us should be able to spot it.

    edit- tested on a T2 and it the usb...
  8. #include const int...

    #include <ResponsiveAnalogRead.h>

    const int channel = 1; // MIDI channel
    const int ANALOG_PIN = A0;
    const int CCID = 15;


    byte data;
    byte dataLag; // when lag and new are not the same then...
  9. Thanks for that info. I think i knew that once...

    Thanks for that info. I think i knew that once but I don't really use UART MIDI much and never two ports.
  10. So no USB MIDI and no sysex... should be very...

    So no USB MIDI and no sysex... should be very simple.

    The 'easier still' option might be from the MIDI Soft Thru feature.

    Since it's a software thru you may be able to still send your midi in...
  11. Merge used to be very difficult if you wanted to...

    Merge used to be very difficult if you wanted to merge DIN with USB but with the 'new' USB MIDI library I believe it's very simple (but I've not bothered to try it).

    I'd be happy to help with...
  12. BTW - Both the voltage divider that is the...

    BTW - Both the voltage divider that is the expression pedal and the MIDI DIN can be driven with 3.3 v or 5 v and if you are really keen on 5 volt inputs or you did need it for some reason the Teensy...
  13. What else does the Teensy connect to and what...

    What else does the Teensy connect to and what kind of connection? (DIN/USB?)

    Is the foot-switcher DIN only?

    Any Teensy will do unless you need to be a USB host. But if you want to connect a...
  14. I think you need a pass-through sketch to test...

    I think you need a pass-through sketch to test once you have the USB host set up on Teensy... to do your MIDI testing with both as USB devices you will need the computer to echo MIDI between both...
  15. Replies
    5
    Views
    309

    Hairless is not needed because Teensy supports...

    Hairless is not needed because Teensy supports USB MIDI directly when you compile as a MIDI device (or MIDI device combined with another USB protocol).

    I don't think you can declare multiple ports...
  16. Replies
    5
    Views
    309

    You need smaller value resistors -- 47 Ohm by...

    You need smaller value resistors -- 47 Ohm by Paul's schematic (see https://www.pjrc.com/teensy/td_libs_MIDI.html).

    MIDI spec says 10 Ohm on pin and 33 Ohm to the pullup but Paul's value work too....
  17. Thread: calculator

    by oddson
    Replies
    6
    Views
    409

    I think pressing [+] twice on mine would skip a...

    I think pressing [+] twice on mine would skip a field... the logic should check that ordinalNum has a digit already before incrementing.
  18. Thread: calculator

    by oddson
    Replies
    6
    Views
    409

    untested alteration to your code will likely need...

    untested alteration to your code will likely need a few fixes to even compile but hopefully shows the alternate state variable scheme.
    #include<Keypad.h>
    #include<LiquidCrystal_I2C.h>...
  19. Thread: calculator

    by oddson
    Replies
    6
    Views
    409

    if (newKey != NO_KEY && (newKey == '+' )) { ...

    if (newKey != NO_KEY && (newKey == '+' )) {
    if (secondNumState == true) {
    operatr = newKey;
    firstNumState = true; secondNumState = false;
    lcd.setCursor(8, 0);
    ...
  20. Thread: calculator

    by oddson
    Replies
    6
    Views
    409

    It's actually very difficult to troubleshoot a...

    It's actually very difficult to troubleshoot a complex bit of code without the hardware.

    But I'm pretty sure you are not setting the state variable you've added correctly (or the others you've...
  21. Replies
    3
    Views
    436

    Looks awesome, can't wait to see the details and...

    Looks awesome, can't wait to see the details and hear the result.
  22. Replies
    21
    Views
    662

    The guitars in OMB and this home build both have...

    The guitars in OMB and this home build both have insulation steps for the strings to isolate them electrically.
  23. For some reason I thought MIDI libraries are zero...

    For some reason I thought MIDI libraries are zero indexed for channel even though I must have known better as some point in the past. :confused:
  24. if (n5 != previousA4) { ...

    if (n5 != previousA4) {
    usbMIDI.sendControlChange(controllerA4, n5, 0);
    usbMIDI.sendControlChange(controllerA4, n5, 1);
    usbMIDI.sendControlChange(controllerA4, n5,...
  25. You are a bit light with symptoms of the problem....

    You are a bit light with symptoms of the problem. (From what I see the values should almost always be the same.)

    From the code the two values are not necessarily the same because you are reading...
  26. Replies
    21
    Views
    662

    I think the OMB might be using electrical...

    I think the OMB might be using electrical reflection timing looking for the earliest electrical reflection on each string but I can not see the a how-it-works section.

    Not sure how the per-string...
  27. Replies
    21
    Views
    662

    Yes... that's my point.. could you even play...

    Yes... that's my point.. could you even play mono-phonically in any usable way or would you need to adopt a very clean 'zero-barre' playing that would be very limiting?
  28. Replies
    21
    Views
    662

    Doesn't this require the player to avoid contacts...

    Doesn't this require the player to avoid contacts other than the one they are intending to make with one fret and one string?

    And if they do make a second contact won't the read voltage be...
  29. Replies
    6
    Views
    291

    You need a VERY low cutoff as you're effectively...

    You need a VERY low cutoff as you're effectively trying to get below any fundamental so the corner frequency needs to be 50Hz or lower (and maybe much lower) and that makes the attack pretty...
  30. Replies
    6
    Views
    291

    I haven't used the audio library much... so...

    I haven't used the audio library much... so hopefully I get this correct.

    Envelope effect is a generator not a detector/follower.

    The RMS or peak objects could be used or you can filter the...
  31. Replies
    11
    Views
    530

    All my usual 'not an EE' caveats; but as I...

    All my usual 'not an EE' caveats; but as I understand it the internal reference is optional way to measure when you are interested in the absolute voltage of a signal ...when you use it the range is...
  32. Replies
    11
    Views
    530

    I realized 'fixing in software' is was wrong...

    I realized 'fixing in software' is was wrong right after posting - if it's clipped it's gone and you have a dead zone on your pot you cannot map to anything.

    That said I'm still a bit sceptical. ...
  33. Replies
    11
    Views
    530

    What's wrong with powering a mux at 5v for a...

    What's wrong with powering a mux at 5v for a voltage divided signal. Where is the overvoltage risk coming from?

    I've had very little experience with mux but I didn't find a need to pad the...
  34. Replies
    5
    Views
    427

    You don't need it if you never need it. ...

    You don't need it if you never need it.

    Getting that wiring wrong on an out or thru circuit is really easy as it's not immediately clear which direction the wiring diagram is meant to show; face...
  35. Replies
    5
    Views
    427

    First, there is only one as the second is inside...

    First, there is only one as the second is inside the PC900. The inside one is a current switch on the internal buffer

    Second, that's schematic is specifically for T2.0 and are you really using...
  36. I'm not expert but I think 3.2 never quite got to...

    I'm not expert but I think 3.2 never quite got to a working host solution and I think 3.6 or 4 are the only viable options for hosting (without a shield).

    Hosting is not properly documented on the...
  37. Decidedly 'yes' in that both your Teensy and the...

    Decidedly 'yes' in that both your Teensy and the keyboard are likely set up as USB devices rather than hosts and with there needs to be one of each.

    Some Teensy can play USB host and in particular...
  38. Replies
    12
    Views
    601

    But in the Harp as controller you only need to...

    But in the Harp as controller you only need to detect sudden attack as a note event. Sympathetic resonance should have an onset too slow to mimic a pluck. The signal should have transient qualities...
  39. Replies
    12
    Views
    601

    For 'professional' version I'd think the piezo...

    For 'professional' version I'd think the piezo would be integrated into the eyelets on the soundboard. If the pedals are mostly 'digital' info (barring anything fancy like note-bending... is that a...
  40. If the first 1000 in the OP was meant to be 100...

    If the first 1000 in the OP was meant to be 100 that's a lot of load (33 mA by my oft faulty calculations) - I've heard 25 is the limit.

    So 500 Ohm or greater I think to be safe.
  41. I think that might work... you could just try...

    I think that might work... you could just try it...

    .... is it to turn off the current when you're not going to be reading it?
  42. Replies
    12
    Views
    601

    yeah... from audio you are unlikely to get the...

    yeah... from audio you are unlikely to get the results you are after. Polyphony would be somewhere between very tricky and nearly impossible.

    A MIDI harp with detectors on each string wouldn't be...
  43. Replies
    4
    Views
    447

    19299 A buffer from an op amp would make sense...

    19299
    A buffer from an op amp would make sense to me before the AD pin or the line in input.
  44. Replies
    36
    Views
    11,878

    I'm nearly certain the T2.0 would handle three...

    I'm nearly certain the T2.0 would handle three more outs.

    The challenge in extending this application isn't only from the coding but also from the analog circuit.

    This is fairly advanced...
  45. Replies
    14
    Views
    809

    By convention in Arduino (and Teensyduino) A6 is...

    By convention in Arduino (and Teensyduino) A6 is understood when '6' is called for analogRead... handy in control loops where a incremented variable can be used directly in the read.
  46. 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...
  47. 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...
  48. Replies
    29
    Views
    1,387

    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...
  49. Replies
    29
    Views
    1,387

    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.
    ...
  50. Replies
    36
    Views
    1,259

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