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

Search:

Type: Posts; User: JarkkoL

Page 1 of 2 1 2

Search: Search took 0.00 seconds.

  1. You only need to update pixels for the needle so...

    You only need to update pixels for the needle so there's no perf issue and the needle can also overlap the background graphics. You can even have a texture for the needle for some added visual flair....
  2. Yeah, the sample data is stored at the end of the...

    Yeah, the sample data is stored at the end of the file which takes bulk of the file, so you just cut some of that data out but memory past your buffer is still referred from the sample metadata....
  3. You could load the music data from SD card and...

    You could load the music data from SD card and store it in flash, but it must exists in the memory all at once. Unlike mp3 which can be streamed, the PMF data is randomly accessed based on the played...
  4. The format is actually documented in...

    The format is actually documented in doc/file_format_pmf.xlsx file. The signature is "pmfx" .. don't remember why I added "x" there but the signature must be 4 bytes to make the rest of the file data...
  5. You could do this with Teensy 3.2 by storing the...

    You could do this with Teensy 3.2 by storing the background image in flash and updating the needle with triangle rasterization on top of it. Since you don't need to actually update other than...
  6. Quote from ILI9341 page here (with link to the...

    Quote from ILI9341 page here (with link to the mentioned HW mod thread): https://www.pjrc.com/store/display_ili9341_touch.html

    "We do not recommend using the SD card socket on this display. It...
  7. Ported the TFT visualizer to Teensy 4, which...

    Ported the TFT visualizer to Teensy 4, which seems to work fine even when using hardware CS pin for the TFT. The audio shield uses the hardware CS pin for SD card so it doesn't conflict with the...
  8. Replies
    9
    Views
    200

    Unlikely if your memory manager isn't horrible,...

    Unlikely if your memory manager isn't horrible, but if you want to be particular about it, it's left as an exercise to the reader to do it without the heap :p
  9. Hey thanks Chris! Incidentally I worked on...

    Hey thanks Chris! Incidentally I worked on ILI9341 based visualizer for the project, currently running on Teensy 3.6, but I'm about to port it to Teensy 4 :D I think it should be quite...
  10. Replies
    3
    Views
    60

    You can do this already by dynamically...

    You can do this already by dynamically creating/deleting audio connection objects though.
  11. The problem with VMicro is that it copies all the...

    The problem with VMicro is that it copies all the dependent files needed for the project to a temp dir when you first time compile it, which can take a long time. After the initial compilation the...
  12. Any Teensy board should easily manage 8000 lines...

    Any Teensy board should easily manage 8000 lines project since the program is stored in the MCU flash memory. The dynamic memory usage is more likely to become a bottleneck, i.e. how you do heap and...
  13. Added stereo support for Teensy 3.5/3.6 as well,...

    Added stereo support for Teensy 3.5/3.6 as well, and better recording to demonstrate the audio quality of the 12bit onboard DAC's:


    https://www.youtube.com/watch?v=lHedBAKhhnM
  14. Replies
    6
    Views
    107

    You could use free OpenMPT (https://openmpt.org)...

    You could use free OpenMPT to do some basic sample editing, setup sample loops (forward/bidi), resample & adjust note pitch, convert to mono & bit depth and also setup instruments (note-sample...
  15. Replies
    6
    Views
    107

    Hurdy gurdy sounds like quite a simple instrument...

    Hurdy gurdy sounds like quite a simple instrument which should easily fit in Teensy 4 flash, but you would need to do some work to set it up properly, i.e. setup sample loops and potentially volume...
  16. Ah yes, I was wondering if it's a common practice...

    Ah yes, I was wondering if it's a common practice to have "soft clamping" for audio. We do this similar stuff in graphics where we use different tone mapping operators to map HDR image to SDR range,...
  17. Replies
    6
    Views
    107

    It sounds an overkill to have several tens of...

    It sounds an overkill to have several tens of megabytes for an instrument. Do you have a separate wavetable for every single note on the instrument?

    FYI, I posted to this another thread about...
  18. For polyphony all the audio channel mixing is...

    For polyphony all the audio channel mixing is done on Teensy and the final data is sent to a DAC (onboard DAC for <T4 or external). For mixing you need to make sure you don't under/overflow the final...
  19. Replies
    5
    Views
    115

    To convert a c-string to double try using atof()...

    To convert a c-string to double try using atof() function. Also %-operator doesn't work with floats (only ints like you found out) but you should use fmod() function
  20. Replies
    14
    Views
    802

    You can use Audio Adaptor Board...

    You can use Audio Adaptor Board (rev D) at least, that's directly pin compatible with Teensy 4. Not sure if you could also use the PT8211 Audio Kit as well with T4 if you wire it differently?
  21. Thanks! :D Added also stereo support ...

    Thanks! :D

    Added also stereo support


    https://www.youtube.com/watch?v=hCXwcoMfH8s
  22. Probably not a good idea to try to sync your...

    Probably not a good idea to try to sync your external data sampling frequency with output device interrupt frequency. You should instead hook your data sampling to a separate interrupt with required...
  23. Arduino Music Player on Teensy Audio Shield

    Ported my Arduino Music Player to the Teensy Audio Shield.


    https://www.youtube.com/watch?v=Qk2NLHaBOnQ

    You can download the project at: https://github.com/JarkkoPFC/arduino-music-player
    ...
  24. Replies
    18
    Views
    922

    I believe the best thing you can do is to build...

    I believe the best thing you can do is to build command buffer and use DMA to transfer the buffer to the TFT asynchronously. If you keep sending the data to the TFT over SPI synchronously as you draw...
  25. Replies
    4
    Views
    183

    When profiling performance, always make sure your...

    When profiling performance, always make sure your calculations have side effects (with minimal overhead) to prevent compiler optimizing out your profiling code. For example keep accumulating the...
  26. The default operator=() is deleted because you...

    The default operator=() is deleted because you have reference as a member (SkyPito& poti). Either write your code so that it doesn't require operator=() or change the member to pointer for example....
  27. Thanks for the detailed answer Paul! I was...

    Thanks for the detailed answer Paul!
    I was mainly worried that splitting the read to two would always issue two fetches over the bus. It's good to know Teensy actually has data cache. This is for...
  28. I mentioned _program_ memory (aka flash), not RAM

    I mentioned _program_ memory (aka flash), not RAM
  29. Performance of unaligned reads from program memory

    Hi,

    What's the performance hit of unaligned memory reads from program memory on Teensy? I'm porting some code to Cortex-M0+ which simply crashes upon unaligned reads and I have to write this code...
  30. Replies
    7
    Views
    702

    For a street organ you could use the same sample...

    For a street organ you could use the same sample for many pipes and just play it back in different frequencies to fit into the flash memory. I have mixed over 32 samples on Teensy 3.6 @ 44kHz without...
  31. Replies
    5
    Views
    1,203

    Very cool, nice job! Cheers, Jarkko

    Very cool, nice job!

    Cheers, Jarkko
  32. Replies
    5
    Views
    1,203

    Hi Frank, The player can't directly play from...

    Hi Frank,

    The player can't directly play from SD card since it needs random access to the music data, but it should be easy to copy the data from the card to MCU flash and start the playback
    ...
  33. Just change your function signature to: void...

    Just change your function signature to:


    void EBYTE::SendData(const void *data_, unsigned size_)
    {
    s_->write(data_, size_);
    }
  34. Replies
    5
    Views
    1,203

    Arduino Music Player

    Hi,

    Over the Christmas break I did some improvements to my Arduino Music Player that's able to play different MOD/S3M/XM/IT files. If you are not familiar, these music files contain sampled...
  35. Replies
    4
    Views
    1,571

    Thanks for clarifying the terminology...

    Thanks for clarifying the terminology GremlingWrangler. Yes indeed I was referring to a high impedance / floating pin. I have to do some adhoc soldering on my prototype circuit to add a connector to...
  36. Replies
    4
    Views
    1,571

    Oh right, I mean Pin 17 between Pin 12 and 3.3V....

    Oh right, I mean Pin 17 between Pin 12 and 3.3V. I didn't realize it's the same pin as pin between 16 and 18 (but at Vin voltage). I thought the pin 17 between pin 12 and 3.3V didn't support PWM, so...
  37. Replies
    4
    Views
    1,571

    Disabling pins on Teensy LC

    Hi,

    I have a situation where I need to solder a 4 pin connector to back of Teensy LC: pin 12, pin 17, 3.3V and GND. However, I need either of the output pins to support PWM, so I though of...
  38. Replies
    6
    Views
    1,997

    Thanks Paul, I'll try the PNP transistor setup. I...

    Thanks Paul, I'll try the PNP transistor setup. I was thinking of using PN2907 for the PNP since I can buy one from local electronic store and it seems to be able to handle current up to 0.8A. This...
  39. Replies
    6
    Views
    1,997

    High Powered LED matrix controller

    Hi,

    I'm trying to implement 3W HPL matrix (3x8) controlled with Teensy. I'm using ULN2803 to sink the power from HPL catodes in 8 rows which I believe works fine, but the problem is providing...
  40. Replies
    3
    Views
    2,196

    For this project I don't care about the...

    For this project I don't care about the efficiency that much but more about compactness and simplicity. It seems to be working well, thanks!
  41. Replies
    3
    Views
    2,196

    How to run Teensy with 9V battery?

    Hi,

    What's the recommended way to run Teensy (3.x/LC) with 9V battery? I found a guide to convert 9V to 5V, but would it work well with Teensy?

    Thanks, Jarkko
  42. Replies
    9
    Views
    7,629

    Ok, I was able to fix the Teensy 3.1 port! Now...

    Ok, I was able to fix the Teensy 3.1 port! Now it's using the built-in 12-bit DAC. I submitted the fix to Google Code if you want to try it out.


    https://www.youtube.com/watch?v=zFMUmE5CdrQ
  43. Replies
    9
    Views
    7,629

    Nice, I tried to use the DAC in Teensy 3.1 but...

    Nice, I tried to use the DAC in Teensy 3.1 but the sound quality wasn't very good for some reason. Maybe it's the missing interrupt disable/enable calls in get_mixer_buffer() because when I increase...
  44. Replies
    9
    Views
    7,629

    Cool, was thinking of R2R but wasn't sure if it...

    Cool, was thinking of R2R but wasn't sure if it would make any difference. I'll definitely try it out. Thanks.
  45. Replies
    9
    Views
    7,629

    Problem with Teensy3 resistor DAC

    I ported my 8-bit resistor DAC mod player from Arduino Uno to Teensy3 and the quality of the output is pretty poor in comparison. I suspect this has something to do with how voltage levels vary when...
  46. Before starting the playback I set the pins for...

    Before starting the playback I set the pins for PORTD like this:
    DDRD=0xff;
    and the timer interrupt is just:


    static bool s_val=false;
    s_val=!s_val;
    PORTD=s_val?0x01:0x00;
  47. Yes, I'm sure. I have the DAC connected to Teensy...

    Yes, I'm sure. I have the DAC connected to Teensy pins 0-7 (PORTD). If I only connect pin 0 and keep flipping bit 0 (other bits are 0) in PORTD at 20KHz, I hear high frequency sound (10KHz). Now if I...
  48. I got the XM/IT volume envelope support...

    I got the XM/IT volume envelope support implemented and ported the player to Teensy (no asm optimized yet though), but the audio quality on Teensy is pretty poor compared to Arduino. Is it possible...
  49. Thanks, I'll have a look at IntervalTimer. ...

    Thanks, I'll have a look at IntervalTimer.

    Both buffer size and mixing frequency are something I can easily configure. The buffer is double buffered actually, so that while the interrupt is...
  50. I'm planning to port my mod player to Teensy 3.0...

    I'm planning to port my mod player to Teensy 3.0 so that will give you some reference performance numbers at least. I optimized the mixing and interrupt routines in AVR asm, but there's also...
Results 1 to 50 of 68
Page 1 of 2 1 2