Forum Rule: Always post complete source code & details to reproduce any issue!

Search:

Type: Posts; User: MarkT

Page 1 of 10 1 2 3 4

Search: Search took 0.01 seconds.

  1. Replies
    19
    Views
    300

    Well the simplest approach is an array of bool,...

    Well the simplest approach is an array of bool, one for each note. Maintain its state with the noteOn/noteOff
    events, scan it when you get a #18 CC event.
  2. Replies
    19
    Views
    300

    You need to keep track of the currently active...

    You need to keep track of the currently active notes in a datastructure so that when you get #18 CC you can call
    analogWrite again on all the active notes.
  3. Serial is USB serial only. You need Serial1 for...

    Serial is USB serial only. You need Serial1 for pins 0 and 1 (which are clearly labelled RX1 and TX1 on the pin-out guide)
  4. Replies
    13
    Views
    154

    The Arduino Uno was 5V, the Teensy is 3.3V, so...

    The Arduino Uno was 5V, the Teensy is 3.3V, so its likely your MOSFET won't be turning on properly - most logic-level
    MOSFETs require at least 4.5V to fully switch on, so the performance from 3.3V...
  5. Ah, yes I think you are right, this type of...

    Ah, yes I think you are right, this type of buffering needs at least blocks to work, will fix.
  6. Replies
    61
    Views
    2,097

    128x32 pixels is at most 12288 bytes for an RGB...

    128x32 pixels is at most 12288 bytes for an RGB bitmap which is a few ms at even 8MHz SPI.
    Its worth looking to see if there's a DMA version of a library that drives I2C - that would free the...
  7. Replies
    2
    Views
    161

    Sounds like you need to write an adboc parser. ...

    Sounds like you need to write an adboc parser. https://stackoverflow.com/questions/6899639/what-is-ad-hoc-parsing

    Start by drawing out a state-machine that can navigate this file format at a high...
  8. Replies
    61
    Views
    2,097

    I2C is very slow (for a bitmapped display), try...

    I2C is very slow (for a bitmapped display), try the SPI interface, perhaps try 8MHz in the first instance and when that works try faster.
  9. I've added a pull request for some improvements...

    I've added a pull request for some improvements to this class:
    https://github.com/PaulStoffregen/Audio/pull/410

    Added implementations for the two play() methods and created a new one,...
  10. Replies
    24
    Views
    501

    I'm pretty sure the sensor measures permittivity,...

    I'm pretty sure the sensor measures permittivity, not alcohol content directly - in other words its using permittivity as a
    proxy for ethanol content. Since petrol is non-polar it has a low and...
  11. Replies
    61
    Views
    2,097

    IE arm_fir_interpolate_f32 and...

    IE arm_fir_interpolate_f32 and arm_fir_decimate_f32?

    Doesn't seem to have a combined up-down FIR rate converter though, which is a shame as it is more general than either
    of those function...
  12. Replies
    61
    Views
    2,097

    Well maybe not, but the only step that needs a...

    Well maybe not, but the only step that needs a lot of coefficients is the first oversampling, as the anti-aliasing requirement is
    demanding - thereafter filter requirements are modest. Polyphase...
  13. Replies
    21
    Views
    387

    I don't know, I never mentioned transformations....

    I don't know, I never mentioned transformations.

    Transitions is what I was talking about. Logic signals transition between HIGH and LOW and back again. These
    are also known informally as edges...
  14. I've had a play with the class and realized it...

    I've had a play with the class and realized it would make sense for its max buffer to be a settable
    parameter, so that it can play nicely with other classes when being used like this.

    If you...
  15. Replies
    61
    Views
    2,097

    By common representation I meant something like...

    By common representation I meant something like 192kSPS/32bit, ie over-sampled and good bit depth. Computer audio
    sub-systems are pretty complex these days and aren't short of hardware DSP grunt.
  16. I think the whole class needs a good looking at -...

    I think the whole class needs a good looking at - there are two methods not implemented and the semantics seem
    hazy - I presume it should be blocking when the queue is full, and I would like the max...
  17. Replies
    61
    Views
    2,097

    Ive not looked the the USB audio code, its not a...

    Ive not looked the the USB audio code, its not a secret, but its probably quite complex low level DMA stuff.

    I suspect the computer internally is converting to a common representation (perhaps at...
  18. Replies
    21
    Views
    387

    Draw a square wave and count the transitions per...

    Draw a square wave and count the transitions per complete cycle. You'll see there are two transitions for each complete
    cycle. Hz is just cycles per second. So 8MHz has 16000000 transistions per...
  19. Judging from my digital camera over the years,...

    Judging from my digital camera over the years, yes data integrity is an issue - sometimes you get bad sectors appearing and
    damaging a file. I don't know if my camera verifies writes though. This...
  20. Replies
    21
    Views
    387

    The processor is clocked at 16MHz so can only...

    The processor is clocked at 16MHz so can only sense one transition every 62.5ns, 8MHz has one transition every 62.5ns.

    Use a faster processor. A Teensy springs to mind given which forum this is...
  21. Replies
    61
    Views
    2,097

    The spectrum suggests the host computer's audio...

    The spectrum suggests the host computer's audio system did some rate-conversion or similar that added a bit of extra quantization noise. That FIR
    filter is the null filter. If you save the result...
  22. You overflowed the queue. I think what you need...

    You overflowed the queue. I think what you need to do is ensure AudioMemory is 32 or less, so that getBuffer() will block before
    the queue can overflow, that will give you flow control. I note the...
  23. Replies
    8
    Views
    271

    voltage_ratio = 10^(dB/20) dB = 20 *...

    voltage_ratio = 10^(dB/20)
    dB = 20 * log10(voltage_ratio)

    power_ratio = 10^(dB/10)
    dB = 10 * log10(power_ratio)

    power_ratio = voltage_ratio^2, therefore log(power_ratio) = 2 *...
  24. Replies
    3
    Views
    106

    This is a job for a state machine. Any...

    This is a job for a state machine. Any multistage interaction with input or output would usually require
    a state machine to track state without locking out other features.
  25. Replies
    33
    Views
    872

    You need a style-checking tool like lint for...

    You need a style-checking tool like lint for catching this sort of mistake - there's nothing wrong with the C code as it stands,
    you are allowed to use empty statements and redundant block...
  26. Replies
    8
    Views
    271

    I think the anticipated use case is that you call...

    I think the anticipated use case is that you call inputSelect() and then either micGain() or lnputLevel() in setup().

    If you were to dynamically switch between mic and line inputs you'd have to...
  27. Replies
    8
    Views
    271

    Erm, that's how the chip is wired - both paths...

    Erm, that's how the chip is wired - both paths use the same switched attenuator. You cannot have both mic and line-in at once
    since there's only one ADC, the attenuator is for the ADC. Mic input...
  28. Replies
    8
    Views
    271

    micGain() and lineInLevel() both control it via...

    micGain() and lineInLevel() both control it via the CHIP_ANA_ADC_CTRL register. The micGain() method also sets the coarse mic gain.

    Source in...
  29. Replies
    2
    Views
    166

    Anything that waits for (lower priority)...

    Anything that waits for (lower priority) interrupts can be an issue, but more generally avoid anything
    that takes a lot of time or may block (ie does busy-waiting for anything that's not guaranteed...
  30. I presume the serial pin has pullups enabled as...

    I presume the serial pin has pullups enabled as high is the idle state for TTL serial lines. Try turning off the pull up
    for hibernation. The powered down sensor will pull the pin low while its...
  31. Replies
    31
    Views
    1,852

    integer variables in C are modular, so you need...

    integer variables in C are modular, so you need to do the subtraction modulo the relevant power of two. For instance with uint32_t:


    millis start millis-start
    0xFFFFFFF0 0xFFFFFFF0 ...
  32. Replies
    31
    Views
    1,852

    Complete aside: your MyDelay isn't safe from...

    Complete aside:
    your MyDelay isn't safe from wraparound, code it like this:


    void MyDelay(unsigned long WaitTime){
    unsigned long StartTime = millis();
    while (millis() - StartTime <...
  33. Replies
    3
    Views
    223

    Indeed, and if you use this you'd implement the...

    Indeed, and if you use this you'd implement the various filter sections using the AudioFilterBiquad class,
    but first you have to generate the filter coefficients - the original code just uses...
  34. Replies
    24
    Views
    501

    IPA is not the alcohol it is designed for, it is...

    IPA is not the alcohol it is designed for, it is for ethanol, not isopropanol - the clue really is in the name!!

    Reading a bit more it seems these sensors actually measure permittivity so its...
  35. Replies
    61
    Views
    2,097

    I was thinking save the output to the SDcard...

    I was thinking save the output to the SDcard too... If that works
  36. Replies
    24
    Views
    501

    Apparently there are counterfeits of this sensor...

    Apparently there are counterfeits of this sensor around. Do you have an indepedent means to check the output frequency
    such as a 'scope (some multimeters can do frequency too)?

    I believe its 5V...
  37. Replies
    3
    Views
    253

    The typical current draw of the screen is stated...

    The typical current draw of the screen is stated as 9mA. So the 2k2 resistor can't really be powering the display, its probably
    being phantom-powered via the I2C pins which is not a good idea at...
  38. Replies
    61
    Views
    2,097

    You mentioned Matlab before - surely it can...

    You mentioned Matlab before - surely it can generate whatever you want?
  39. Replies
    4
    Views
    279

    No, the latency is a fixed number of blocks, this...

    No, the latency is a fixed number of blocks, this is just like a pipeline.
  40. Replies
    4
    Views
    279

    I've had a quick scan of the code, and I think...

    I've had a quick scan of the code, and I think you need to use two blocks per FFT, so that the overlap
    is 50% of the FFT period - the current code seems to have no overlap.

    BTW a Hann window...
  41. Replies
    3
    Views
    223

    A wide-range bandpass filter is easiest to...

    A wide-range bandpass filter is easiest to realize as a high-pass filter and a low-pass filter chained together.
    Can you generate Butterworth low-pass and high-pass filters? There are many on-line...
  42. Sounds travels much faster in solids than air, so...

    Sounds travels much faster in solids than air, so you may have multiple paths for acoustic energy to travel to your sensors unless
    you go for the shortest path inside the solid target itself? In...
  43. That's what I mean - in software you can...

    That's what I mean - in software you can crossfade instantly as well as gradually.
  44. Thread: Measure mV

    by MarkT
    Replies
    3
    Views
    263

    You need to shift the signal to mid-way between...

    You need to shift the signal to mid-way between the voltage rails. The negative voltages cannot be measured by the ADC,
    and if more than 0.3V or so could damage the chip permanently.

    Normally a...
  45. Replies
    7
    Views
    201

    I'd advise always disabling file-hiding in any OS...

    I'd advise always disabling file-hiding in any OS you use, otherwise it will bite you one day.
  46. IC2 is used as a 4-bit address comparator I think...

    IC2 is used as a 4-bit address comparator I think - and is set by the (jumpers?) you've labelled CON. 2
    Until that matches the 245 won't drive anything - is that what writeBoardAddress(3) is...
  47. Replies
    13
    Views
    1,529

    Well as the MOSFET is logic level I'd expect it...

    Well as the MOSFET is logic level I'd expect it to work at any of those voltages no problem.
    I'd suggest careful checking of your circuit, especially the OUTL connection.

    Note the 100nF cap on...
  48. Like all CMOS chips a pair of Schottky diodes to...

    Like all CMOS chips a pair of Schottky diodes to the rails and a series resistor will do the job of protecting inputs.
    To my knowledge exceeding the rails in the inputs by more than a diode drop...
  49. Replies
    13
    Views
    1,529

    You haven't indicated any Vcc in the diagram so...

    You haven't indicated any Vcc in the diagram so its not at all clear what you mean.
  50. You seem to be turning wav file volume on at the...

    You seem to be turning wav file volume on at the same time as microphone volome on, rather than cross-fading -
    I thought you wanted to cross-fade between them?
Results 1 to 50 of 500
Page 1 of 10 1 2 3 4