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 could try Arduino Music Player...

    You could try Arduino Music Player to play music on LC.
  2. Replies
    6
    Views
    187

    It's fine to define constructor (and any member...

    It's fine to define constructor (and any member function for that matter) as a template function though, but I guess that's not the behaviour what the OP is after.

    i.e. this is just fine:

    ...
  3. @KurtE Ok, it's perhaps too difficult of a change...

    @KurtE Ok, it's perhaps too difficult of a change to an existing API with various drawing functions which assume random access to the frame buffer. I'm just working on a graphics project which can...
  4. For more compact memory usage, you could double...

    For more compact memory usage, you could double buffer the sub-frames. Just let client to define in how many slices they want to update the screen, and then just call "flip" as many times. E.g. if I...
  5. Replies
    5
    Views
    166

    Thanks for checking it out. Cheers, Jarkko

    Thanks for checking it out.

    Cheers, Jarkko
  6. This is handled by graphics API's by client code...

    This is handled by graphics API's by client code calling flip() once it's done drawing a frame. Then you can decide to start DMA transfer or stall depending on the state of the previous DMA transfer.
  7. Replies
    5
    Views
    166

    Had some problems trying to upload hex & elf, but...

    Had some problems trying to upload hex & elf, but attached is the project. I'm compiling on Win10 & Arduino IDE 1.8.10 (uploading via Visual Micro also fails), Teensyduino 1.48. This is also using...
  8. Replies
    5
    Views
    166

    Teensy 4 probs with >1MB elfs

    I have an issue with >1MB elfs on Teensy 4. If I have >1MB program running on T4 and I want to upload another elf, regardless of the size of the new elf, this upload always fails (gives "Download...
  9. Thread: 3D graphics

    by JarkkoL
    Replies
    0
    Views
    84

    3D graphics

    Hi,

    Is there a low-level 3D graphics library for Arduino (along the lines of DirectX/Vulkan/Metal/etc.) to render 3D graphics? I checked around and found only quite primitive 3D rendering...
  10. Replies
    6
    Views
    128

    Well, if you absolutely want to take a trip to...

    Well, if you absolutely want to take a trip to the syntax crazy land:


    #define KEY(name__, ...) unsigned int pulse##name__[]=__VA_ARGS__;\
    Key key##name__={#name__,...
  11. Replies
    6
    Views
    128

    you could do something along the lines of: ...

    you could do something along the lines of:


    struct Key {
    char Name[8];
    unsigned int *Pulse;
    };

    unsigned int pulseOn[]={9070,4480, 610,530, 600,530, 610,520, 600,530, 00};
    Key keyOn =...
  12. 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....
  13. 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....
  14. 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...
  15. 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...
  16. 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...
  17. 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...
  18. 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...
  19. Replies
    9
    Views
    294

    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
  20. 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...
  21. Replies
    3
    Views
    149

    You can do this already by dynamically...

    You can do this already by dynamically creating/deleting audio connection objects though.
  22. 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...
  23. 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...
  24. 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
  25. Replies
    6
    Views
    152

    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...
  26. Replies
    6
    Views
    152

    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...
  27. 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,...
  28. Replies
    6
    Views
    152

    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...
  29. 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...
  30. Replies
    5
    Views
    167

    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
  31. Replies
    14
    Views
    999

    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?
  32. Thanks! :D Added also stereo support ...

    Thanks! :D

    Added also stereo support


    https://www.youtube.com/watch?v=hCXwcoMfH8s
  33. 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...
  34. 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
    ...
  35. Replies
    18
    Views
    950

    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...
  36. Replies
    4
    Views
    193

    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...
  37. 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....
  38. 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...
  39. I mentioned _program_ memory (aka flash), not RAM

    I mentioned _program_ memory (aka flash), not RAM
  40. 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...
  41. Replies
    7
    Views
    730

    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...
  42. Replies
    5
    Views
    1,264

    Very cool, nice job! Cheers, Jarkko

    Very cool, nice job!

    Cheers, Jarkko
  43. Replies
    5
    Views
    1,264

    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
    ...
  44. 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_);
    }
  45. Replies
    5
    Views
    1,264

    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...
  46. Replies
    4
    Views
    1,588

    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...
  47. Replies
    4
    Views
    1,588

    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...
  48. Replies
    4
    Views
    1,588

    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...
  49. Replies
    6
    Views
    2,031

    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...
  50. Replies
    6
    Views
    2,031

    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...
Results 1 to 50 of 79
Page 1 of 2 1 2