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

Search:

Type: Posts; User: el_supremo

Page 1 of 10 1 2 3 4

Search: Search took 0.02 seconds.

  1. The default sample rate is 44100Hz. You can...

    The default sample rate is 44100Hz. You can change that rate at startup but I don't think you can change it on the fly and AFAIK you can only change it to a small range of frequencies (e.g. 8kHz,...
  2. Replies
    5
    Views
    122

    @ Beserker When you return the switch to the...

    @ Beserker
    When you return the switch to the neutral position, you will have just turned either the "left" (pin 0) or "right" (pin 1) side of the switch off. If you use the Bounce library, it is...
  3. I posted a (fairly) simple example of using...

    I posted a (fairly) simple example of using readBuffer/freeBuffer and getBuffer/Playbuffer here which might help you. It simply reads the stereo input (MIC or LINEIN) and plays it back to the...
  4. I vote for isodate too. Pete

    I vote for isodate too.

    Pete
  5. getBuffer returns NULL if a buffer isn't...

    getBuffer returns NULL if a buffer isn't available. Try this:

    int16_t *p = audio.getBuffer();

    if(p)audio.playBuffer();

    EDIT. AND you need to copy the samples...
  6. The AudioPlayQueue object is used to "play" 128...

    The AudioPlayQueue object is used to "play" 128 samples at a time.

    Pete
  7. Replies
    5
    Views
    122

    Use the bounce library to handle pins 0 and 1 and...

    Use the bounce library to handle pins 0 and 1 and wire them normally high with pinMode INPUT_PULLUP. When either of them goes low you handle that button "press". When either of them goes high, that...
  8. Have you tried any of the SD or SDFat examples?...

    Have you tried any of the SD or SDFat examples? Try the SD|listfiles example - you may have to set chipSelect to 10.

    Pete
  9. I tried your code on a T3.2 with an audio board....

    I tried your code on a T3.2 with an audio board. I had to remove your code which uses the display and use setMOSI and setSCK for the audio board, but your code has no problem finding the uSD card and...
  10. Actually, it might be that the release time is...

    Actually, it might be that the release time is too long. I looked at the waveform and the click/crackle might also be caused by the release time being interrupted by the next note on. In many of the...
  11. Increase the attack: try 50. Pete

    Increase the attack: try 50.

    Pete
  12. I've just realized that you also have the gains...

    I've just realized that you also have the gains of the first two inputs to mixer1 set to 1. The sum of the gains of the inputs to a mixer should be 1 unless you know that the inputs are attenuated....
  13. It appears to be a problem with optimizations....

    It appears to be a problem with optimizations. The default Optimize option of "Faster" uses -O2 and this produces the strange result, as does the smallest code which uses -On. Changing Optimize to...
  14. I suspect that you need a non-zero value for the...

    I suspect that you need a non-zero value for the envelope's attack. Try

    envelope1.attack(10);

    Pete
  15. A single-precision floating point multiply takes...

    A single-precision floating point multiply takes one instruction cycle. So once every 2 milliseconds, the 10 FP multiplications will take 17 nanoseconds.
    Right now, it's a waste of your time to be...
  16. You can only call receiveReadOnly once in an...

    You can only call receiveReadOnly once in an update. When you call it a second time, it will return NULL. This will cause your code to always return from the update function on the second call to...
  17. What are these sensors measuring? Pete

    What are these sensors measuring?

    Pete
  18. Moving the global variables to local (within a...

    Moving the global variables to local (within a function) has probably also moved the bug. It may still be clobbering memory but at the moment it is not clobbering something that is critical. It might...
  19. uint32_t might speed up your code a bit but lack...

    uint32_t might speed up your code a bit but lack of speed isn't your problem right now. It appears to be lack of space. Currently, the uint8_t arrays that you've shown in your message take up nearly...
  20. The symptoms suggest that you are running out of...

    The symptoms suggest that you are running out of memory or having a problem indexing outside an array.

    How many and how big? Are you using malloc or new to allocate them?
    It might be best to post...
  21. Or use printf. Instead of ...

    Or use printf. Instead of

    Serial.println("stuff");
    use

    Serial.printf("stuff\n");

    Pete
  22. I'd still like to see the code you are using to...

    I'd still like to see the code you are using to compute the time differences.

    Pete
  23. That "shouldn't happen", but how do you know it...

    That "shouldn't happen", but how do you know it is also triggering on the rising edge?
    Post some demo code.

    Pete
  24. FYI: Accessing GPIO6_PSR takes 10 cycles. Getting...

    FYI: Accessing GPIO6_PSR takes 10 cycles. Getting the same info from GPIO1_PSR takes up to 30 cycles - it varies from 27 to 30.

    Pete
  25. You could put together some pins for the second...

    You could put together some pins for the second 16 bits that would minimize the amount of bit manipulation that is required.
    On GPIO7 use bits 0-3 (pins 10,12,11,13), on GPIO9 use bits 4-8 (pins...
  26. I'm at home - here's a fix :) PIN GPIOn-BITm...

    I'm at home - here's a fix :)

    PIN GPIOn-BITm | GPIOn-BITm PIN

    ------------------|-------------------

    00 ->...
  27. @ vjmuzik A minor problem: GIPO in the right...

    @ vjmuzik
    A minor problem: GIPO in the right hand column should be GPIO.

    Pete
  28. Replies
    15
    Views
    374

    I think this bit of code at the beginning of...

    I think this bit of code at the beginning of main() is going to make life difficult, if not impossible, even on a T4.1

    int sample_rate = 12000;
    int num_samples = 15 * sample_rate;
    ...
  29. Replies
    15
    Views
    374

    You can use the setI2Sfreq function in this...

    You can use the setI2Sfreq function in this message: https://forum.pjrc.com/threads/60886-Teensyduino-1-52-Beta-6?p=239417&viewfull=1#post239417

    Pete
  30. Replies
    15
    Views
    374

    I had a look at decoding ft8 and ft4 on a teensy4...

    I had a look at decoding ft8 and ft4 on a teensy4 and concluded that there was wasn't enough memory. But I've had a look at the ft8_lib that you linked and it might fit on a T4.1. I've compiled it...
  31. While testing your code I realized that what...

    While testing your code I realized that what you've implemented is a half-wave rectifier. I had needed a full-wave rectifier and got confused. Sorry about that.
    However, if you are doing a half wave...
  32. @ boxxofrobots I don't see how your latest...

    @ boxxofrobots
    I don't see how your latest version is any better. The problem is that you are copying an int16_t into an int32_t and apparently assuming that the 16-bit integer is copied into the...
  33. There's a bug in the rectifier code. It appears...

    There's a bug in the rectifier code. It appears to work for all input values except 0x8000. In this case it should return 0x7fff (maximum positive value) but it returns 0x8000.
    I used a rectifier...
  34. I have one T3.5 which still has the original...

    I have one T3.5 which still has the original Blink sketch in it and it is recognized by Win 10 Pro x64 after the recent update. I can also program it.
    Does the LED on your T3.5 blink when power is...
  35. Replies
    6
    Views
    152

    In that case you don't need to set played = true...

    In that case you don't need to set played = true after every if statement. Set it once.

    Pete
  36. Replies
    6
    Views
    152

    Without seeing all your code it is hard to know...

    Without seeing all your code it is hard to know what is happening but *after* each if statement you set played = true. But this sets played to true whether or not you sent the note on and off. Each...
  37. Replies
    4
    Views
    130

    The AudioConnection class is in...

    The AudioConnection class is in hardware\teensy\avr\cores\teensy4\AudioStream.h

    Pete
  38. Replies
    9
    Views
    173

    Your code does not tell you how fast you are...

    Your code does not tell you how fast you are "getting values onto the PC". It is only measuring how long it takes Serial.println to buffer the characters and initiate the transfer.

    If you change...
  39. I can't test ethernet stuff right now but I found...

    I can't test ethernet stuff right now but I found this ssl client. One of the examples, ethernetHTTPS, compiles for T4.1. One compiler warning may be a problem:

    WARNING: library SSLClient-1.6.6...
  40. Replies
    8
    Views
    222

    No. The pinMode is INPUT_PULLUP. The PULLUP means...

    No. The pinMode is INPUT_PULLUP. The PULLUP means that if the button (*) is not pushed, the pullup will keep the pin HIGH. When the button is pushed (and it is wired correctly) it connects the pin to...
  41. Ignore. Took me too long to post the solution :)...

    Ignore. Took me too long to post the solution :)

    Pete
  42. Replies
    2
    Views
    129

    Hi Bob, Nice work! TestFIRGeneralLarge5_I16...

    Hi Bob,
    Nice work!
    TestFIRGeneralLarge5_I16 runs without any problems.
    TestFIRGeneralLarge4_I16 doesn't compile. AudioFilterFIRGeneral_F32 and AudioMemory_F32 aren't declared.

    Pete
  43. Replies
    4
    Views
    74

    There is an oddity in the output here: ...

    There is an oddity in the output here:

    Multiple libraries were found for "Adafruit_GFX.h"
    Used: C:\Program
    This implies that you have a copy of the file Adafruit_GFX.h in C:\Program instead of...
  44. Replies
    4
    Views
    74

    Which board did your friend compile the code for?...

    Which board did your friend compile the code for?
    CP_Boards.h doesn't appear to know about the Teensy 3.5. It only has Teensys up to T3.2.

    Pete
  45. Replies
    8
    Views
    222

    Follow through what your code does when all three...

    Follow through what your code does when all three buttons are pushed.
    Pin 8 is LOW so turn on 11
    Pin 9 is LOW so turn on 12
    pin 10 is LOW so turn on 14.
    All three pins are LOW (all pushed) so the...
  46. Replies
    3
    Views
    132

    In setup, remove this statement: ...

    In setup, remove this statement:

    digitalWrite(SENSORPIN, HIGH); // turn on the pullup HIGH
    and replace it with this:

    pinMode(SENSORPIN,INPUT_PULLUP);
    It should now wait for the SENSORPIN to...
  47. I'd second the Hakko. I have the FX888 which was...

    I'd second the Hakko. I have the FX888 which was on sale when I bought it. They were just introducing the FX888D which is identical to the FX888 except that the FX888D has a digital temperature...
  48. Variables which are used both inside and outside...

    Variables which are used both inside and outside the interrupt routine must be declared volatile.

    int cycles;
    volatile int cyclesLast,cyclesTime ;

    Pete
  49. This code in oscManager: ...

    This code in oscManager:

    waveform1.frequency(noteFreqs[noteBuffer[bufferLen - 1]]);
    waveform2.frequency(noteFreqs[noteBuffer[bufferLen - 2]]);
    ...
  50. Replies
    13
    Views
    146

    You're welcome. Glad it's sorted :) Pete

    You're welcome. Glad it's sorted :)

    Pete
Results 1 to 50 of 500
Page 1 of 10 1 2 3 4