Forum Rule: Always post complete source code & details to reproduce any issue!
Tab Content
  • oddson's Avatar
    04-02-2020, 03:06 AM
    oddson replied to a thread calculator in Project Guidance
    I think pressing twice on mine would skip a field... the logic should check that ordinalNum has a digit already before incrementing.
    6 replies | 178 view(s)
  • oddson's Avatar
    04-01-2020, 07:22 AM
    oddson replied to a thread calculator in Project Guidance
    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> #include<Wire.h> //#include...
    6 replies | 178 view(s)
  • oddson's Avatar
    04-01-2020, 06:44 AM
    oddson replied to a thread calculator in Project Guidance
    if (newKey != NO_KEY && (newKey == '+' )) { if (secondNumState == true) { operatr = newKey; firstNumState = true; secondNumState = false; lcd.setCursor(8, 0); lcd.print(operatr); ...
    6 replies | 178 view(s)
  • oddson's Avatar
    04-01-2020, 06:09 AM
    oddson replied to a thread calculator in Project Guidance
    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 inherited). You test...
    6 replies | 178 view(s)
  • oddson's Avatar
    04-01-2020, 04:58 AM
    Looks awesome, can't wait to see the details and hear the result.
    3 replies | 159 view(s)
  • oddson's Avatar
    03-31-2020, 01:47 AM
    The guitars in OMB and this home build both have insulation steps for the strings to isolate them electrically.
    21 replies | 366 view(s)
  • oddson's Avatar
    03-30-2020, 10:56 PM
    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:
    9 replies | 177 view(s)
  • oddson's Avatar
    03-30-2020, 03:29 AM
    if (n5 != previousA4) { usbMIDI.sendControlChange(controllerA4, n5, 0); usbMIDI.sendControlChange(controllerA4, n5, 1); usbMIDI.sendControlChange(controllerA4, n5, 2); ...
    9 replies | 177 view(s)
  • oddson's Avatar
    03-29-2020, 03:35 PM
    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 the pin twice instead...
    9 replies | 177 view(s)
  • oddson's Avatar
    03-29-2020, 04:43 AM
    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 triggering works......
    21 replies | 366 view(s)
  • oddson's Avatar
    03-28-2020, 10:17 PM
    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?
    21 replies | 366 view(s)
  • oddson's Avatar
    03-28-2020, 09:36 PM
    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 different than if you...
    21 replies | 366 view(s)
  • oddson's Avatar
    03-27-2020, 04:56 PM
    oddson replied to a thread envelope follower in Project Guidance
    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 unresponsive. Paul...
    6 replies | 120 view(s)
  • oddson's Avatar
    03-27-2020, 04:23 AM
    oddson replied to a thread envelope follower in Project Guidance
    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 audio directly after...
    6 replies | 120 view(s)
  • oddson's Avatar
    03-21-2020, 01:44 PM
    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 reduced. On the...
    11 replies | 306 view(s)
  • oddson's Avatar
    03-20-2020, 05:15 PM
    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. I've just not...
    11 replies | 306 view(s)
  • oddson's Avatar
    03-19-2020, 02:02 PM
    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 dividers to get full...
    11 replies | 306 view(s)
  • oddson's Avatar
    03-17-2020, 06:36 AM
    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 or contact side? ...
    5 replies | 216 view(s)
  • oddson's Avatar
    03-17-2020, 02:41 AM
    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 that? Third, there...
    5 replies | 216 view(s)
  • oddson's Avatar
    03-14-2020, 12:48 PM
    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 pjrc.com site. ...
    5 replies | 309 view(s)
  • oddson's Avatar
    03-13-2020, 05:08 AM
    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 MIDI hosts but you...
    5 replies | 309 view(s)
  • oddson's Avatar
    03-13-2020, 04:15 AM
    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 that you're able to...
    12 replies | 359 view(s)
  • oddson's Avatar
    03-12-2020, 05:02 PM
    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 thing with harp...
    12 replies | 359 view(s)
  • oddson's Avatar
    03-11-2020, 06:17 PM
    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.
    7 replies | 376 view(s)
  • oddson's Avatar
    03-11-2020, 12:16 AM
    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?
    7 replies | 376 view(s)
  • oddson's Avatar
    03-09-2020, 09:14 PM
    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 very difficult (to...
    12 replies | 359 view(s)
  • oddson's Avatar
    03-08-2020, 05:39 AM
    A buffer from an op amp would make sense to me before the AD pin or the line in input.
    4 replies | 240 view(s)
  • oddson's Avatar
    03-07-2020, 04:06 PM
    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 stuff so are you capable...
    34 replies | 10953 view(s)
  • oddson's Avatar
    03-03-2020, 04:33 AM
    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.
    14 replies | 599 view(s)
  • oddson's Avatar
    02-24-2020, 12:14 PM
    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 hardware) MIDI and...
    3 replies | 219 view(s)
  • oddson's Avatar
    02-23-2020, 03:52 PM
    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 hardware. The LC makes...
    3 replies | 219 view(s)
  • oddson's Avatar
    02-20-2020, 05:38 AM
    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 should improve with...
    29 replies | 1096 view(s)
  • oddson's Avatar
    02-20-2020, 04:42 AM
    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. This won't slow your...
    29 replies | 1096 view(s)
  • oddson's Avatar
    02-19-2020, 04:45 PM
    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 to end states 1 and 2...
    36 replies | 1058 view(s)
  • oddson's Avatar
    02-18-2020, 11:08 AM
    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 >= 128){ pgcNum =...
    36 replies | 1058 view(s)
  • oddson's Avatar
    02-17-2020, 10:59 PM
    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 try to build a test...
    36 replies | 1058 view(s)
  • oddson's Avatar
    02-17-2020, 09:26 PM
    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 code... with the msec...
    36 replies | 1058 view(s)
  • oddson's Avatar
    02-17-2020, 09:15 PM
    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 function like yours I...
    36 replies | 1058 view(s)
  • oddson's Avatar
    02-17-2020, 07:27 PM
    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 that happens in each...
    36 replies | 1058 view(s)
  • oddson's Avatar
    02-17-2020, 12:50 AM
    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 identified that a hit...
    36 replies | 1058 view(s)
  • oddson's Avatar
    02-15-2020, 06:39 PM
    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.
    36 replies | 1058 view(s)
  • oddson's Avatar
    02-15-2020, 04:22 PM
    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 if you read them...
    36 replies | 1058 view(s)
  • oddson's Avatar
    02-15-2020, 03:37 PM
    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 variables. You can...
    36 replies | 1058 view(s)
  • oddson's Avatar
    02-14-2020, 12:44 PM
    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 test logic...
    36 replies | 1058 view(s)
  • oddson's Avatar
    02-14-2020, 12:33 PM
    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 you can't assume the...
    36 replies | 1058 view(s)
  • oddson's Avatar
    02-14-2020, 05:05 AM
    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.
    36 replies | 1058 view(s)
  • oddson's Avatar
    02-14-2020, 01:12 AM
    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 to and why you...
    36 replies | 1058 view(s)
  • oddson's Avatar
    02-14-2020, 12:50 AM
    I'll need some time to decipher your code. Do you have proper signal protection on your Teensy input from the piezo?
    36 replies | 1058 view(s)
  • oddson's Avatar
    02-13-2020, 05:23 AM
    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 = digitalRead(1);...
    36 replies | 1058 view(s)
  • oddson's Avatar
    02-12-2020, 12:52 PM
    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 can usually just read...
    36 replies | 1058 view(s)
  • oddson's Avatar
    02-09-2020, 02:01 PM
    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 so I assumed you'd...
    36 replies | 1058 view(s)
  • oddson's Avatar
    02-08-2020, 11:08 PM
    3.3v Even if fault tolerant you need the voltage divider to have the same range as the pin.
    3 replies | 153 view(s)
No More Results
About oddson

Basic Information

About oddson
Location:
Isle in the Salish Sea

Statistics


Total Posts
Total Posts
1,326
Posts Per Day
0.51
Last Post
calculator 04-02-2020 03:06 AM
General Information
Last Activity
Yesterday 07:52 AM
Join Date
02-24-2013