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. I get why Pete's code it preferable but it looks...

    I get why Pete's code it preferable but it looks functionally equivalent to me... looked to me like your modulo math should do the same thing in resetting on reaching the inter-accent count (ie --...
  2. My bad... lots wrong with the theory beside being...

    My bad... lots wrong with the theory beside being incorrect. It would not compile, and it would not explain the result....

    doesn't this really imply it's resetting because it's getting a start...
  3. I think you are missing the setHandleStart() in...

    I think you are missing the setHandleStart() in setup so that handleStart is called when an start message is recieved....
  4. Not sure I understand the problem... you want the...

    Not sure I understand the problem... you want the accent on the third pulse?


    if (accentPattern == 0)
    velocity = accentVelocity; // we want it on this step
    ...
  5. Using filtering to pass all but the three-byte...

    Using filtering to pass all but the three-byte stuff appears to pass everything else so you'd only need to handle the basic messages from the controller and in the process alter the the note values...
  6. https://github.com/FortySevenEffects/arduino_midi_...

    https://github.com/FortySevenEffects/arduino_midi_library

    I think you call turnThruOff() during setup.

    But then you have to pass all the other stuff manually if you want the other MIDI to pass...
  7. ...er… how can an optocoupler work if reversed?...

    ...er… how can an optocoupler work if reversed? Is that possible?
  8. Those two messages are only different from what...

    Those two messages are only different from what you're expecting by the note values... are you sure it pulses middle-C (note=60)?

    edit... I didn't notice they both say 'off'
  9. Untested code changes... not even compiled so...

    Untested code changes... not even compiled so there may well be an error or two!



    /************LIBRARIES USED**************
    // include the ResponsiveAnalogRead library for analog smoothing...
  10. I'm writing a more detailed reply but in the...

    I'm writing a more detailed reply but in the meantime… you are assuming some things that are just names have meaning to the compiler.

    CCID is just the name of an array of data... so is notes…

    ...
  11. // initialize the ReponsiveAnalogRead objects...

    // initialize the ReponsiveAnalogRead objects
    ResponsiveAnalogRead analog[]{
    {A14,true}
    };This also should work and is likely what you were attempting. With this the defined constants are not...
  12. ok.... since that's my code you're starting with...

    ok.... since that's my code you're starting with and the project is certainly worthy so I guess I should step up.

    Not sure why you're using Many Knobs... for one knob and one button.

    But...
  13. Replies
    14
    Views
    556

    I think that's supposed to be from the greater...

    I think that's supposed to be from the greater high-frequency content -- which entails greater power levels. It's only going to be a factor at levels already near the physical limits of the speaker...
  14. Yeah sorry... like I said I didn't compile. I...

    Yeah sorry... like I said I didn't compile.

    I used a different name for the ON value being sent.

    usbMIDI.sendControlChange(note[i], ON_VELOCITY, channel);

    Change this line by replacing...
  15. You have three switches and two wires to your...

    You have three switches and two wires to your Teensy?

    Assuming you know what you're doing with the wiring here's the above code with the digital section altered to CC messages and the analog stuff...
  16. What this guy was doing is pretty specific... ...

    What this guy was doing is pretty specific...

    ...maybe spell out what YOU are trying to do and I'll see if I can help :)
  17. My post had some additional stuff in it that was...

    My post had some additional stuff in it that was somewhat confused because I forgot you were making a synth and not a controller.

    Are you short of memory? I would think keeping it all in an array...
  18. If these are always in sequence, why do you need...

    If these are always in sequence, why do you need them in an array? Why not just add one or two to the first parameter's address for the second and third parameters when you dereference them?
  19. It does stereo in and out but only one MIC level...

    It does stereo in and out but only one MIC level input. With a two-channel preamp you could address the gain issue and use both line-level inputs... but listen to experts on how and not me. ;)
    ...
  20. I think it's tricky to use two audio boards......

    I think it's tricky to use two audio boards... why two?
  21. Replies
    2
    Views
    190

    Any chance your code is pointing at a floating...

    Any chance your code is pointing at a floating pin on the other boards? Get one pin number wrong and you will read garbage on every pass.

    The nature of the MIDI you consider 'wrong' should tell...
  22. ...yeah... I should have stayed quite.

    ...yeah... I should have stayed quite.
  23. what they said

    what they said
  24. Do you know about the audio board? ...

    Do you know about the audio board?

    https://www.pjrc.com/store/teensy3_audio.html
  25. Yes... D1, obtained with MIDI.getData1(), is the...

    Yes... D1, obtained with MIDI.getData1(), is the note value that you take mod-12 to get the index.

    On the clock thing... some details in this thread:...
  26. ...so what was wrong with your initial attempts? ...

    ...so what was wrong with your initial attempts?

    Glad to see your having success now.



    Hints:
    Modulo division by 12 on MIDI notes gives you an zero-based array index for note names from...
  27. Oh... are you getting the setup message on the...

    Oh... are you getting the setup message on the serial monitor?

    FYI - You don't want to select MIDI for USB type as you are just sending serial to the computer for this sketch.
  28. I've looked that breadboard over several times...

    I've looked that breadboard over several times and keep thinking I see the problem but then it's just me...

    The Tx line isn't clear (at the resistor) but you say that's working and I can't see...
  29. Replies
    4
    Views
    302

    Wiring diagrams for MIDI DIN connectors show can...

    Wiring diagrams for MIDI DIN connectors show can show the plug or the socket and the notch up or down.... you are not the first to get it wrong.

    FYI resistor values are not crucial so tolerance...
  30. Replies
    3
    Views
    329

    Teensy 3.5, 3.6 or 4.1 have enough pins to...

    Teensy 3.5, 3.6 or 4.1 have enough pins to support that many switches without having to use a multiplexer or some other means of handling so many signals.

    Wiring so many switches will be very...
  31. Replies
    12
    Views
    507

    I've not used Metro but maybe it's stopping...

    I've not used Metro but maybe it's stopping bounce from seeing the tranistions.

    I think you would test timing limit after transitions but bounce is usually sufficient on its own to avoid multiple...
  32. Replies
    2
    Views
    325

    Details are at the bottom of this page...

    Details are at the bottom of this page https://www.pjrc.com/teensy/td_midi.html
  33. Replies
    4
    Views
    447

    did you handle incoming events to clear the...

    did you handle incoming events to clear the queue? That's the most common hang where Teensy's buffer fills with unhandled messages.

    https://www.pjrc.com/teensy/td_midi.html
  34. Why waste the extra speed waiting for you MUX to...

    Why waste the extra speed waiting for you MUX to settle.. set them for the next read right after the last and then go do other things... by the time you go to read it will have settled.
    ...
  35. No... reading again it sounds like you want...

    No... reading again it sounds like you want selection of a new CC value as ON to send OFF for the previous CC?

    Edit
    ...just noticed it's sending program changes and not CC...
  36. This is code I helped with.... ...

    This is code I helped with....
    https://forum.pjrc.com/threads/58017-Sending-MIDI-CC-value-based-on-last-received-value-with-midi-read

    Note if you bought his controller the switches are toggles...
  37. Replies
    6
    Views
    397

    Expression pedals used with MIDI keyboards etc....

    Expression pedals used with MIDI keyboards etc. are effectively just voltage dividers oftenwith a floor side-circuit to set the range of the sweep (on the lower end).

    There are two common...
  38. Replies
    4
    Views
    332

    ANY delay is usually enough, I've started at five...

    ANY delay is usually enough, I've started at five microseconds but one seems to do it.
  39. Replies
    14
    Views
    800

    I'm surprised to see it track a DC voltage like...

    I'm surprised to see it track a DC voltage like that but if there is no connection to A8 then even the tiniest parasitic current could charge the pin.

    I suspect your original problem was in the...
  40. Replies
    8
    Views
    1,536

    At the top of a pot used as a voltage divider...

    At the top of a pot used as a voltage divider there is no significant resistance to the pin from the Vcc. The current is almost entirely going out the bottom of the divider and only the smallest...
  41. Replies
    8
    Views
    1,536

    I'm more baffled than before... it sounds like...

    I'm more baffled than before... it sounds like you will be reading a constant 1.65 volts ...where is the signal part?

    Almost no current will actually flow into your Teensy... but if the voltage...
  42. Replies
    8
    Views
    1,536

    My amateur understanding of input pins it they...

    My amateur understanding of input pins it they are like op-amp inputs... very high input impedance means you can mostly ignore it provided your output impedance in on the order of KOhms.

    The risk...
  43. 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:...
  44. 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...
  45. 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...
  46. Replies
    4
    Views
    330

    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...
  47. Replies
    4
    Views
    429

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