Forum Rule: Always post complete source code & details to reproduce any issue!
Tab Content
  • tomas's Avatar
    02-17-2021, 09:27 AM
    CMSIS provides ready-to-use implementation. For interpolation you need call arm_fir_interpolate_init_f32 (once) and arm_fir_interpolate_f32 ( in the loop) For decimation you need call arm_fir_decimate_init_f32 (once)...
    202 replies | 6521 view(s)
  • tomas's Avatar
    02-17-2021, 12:08 AM
    If you did oversampling "by the book" you would need polyphase FIR interpolator at the input and polyphase FIR decimator filter at the output. These are costly. Not doing things by the book results in aliasing. FWIW...
    202 replies | 6521 view(s)
  • tomas's Avatar
    02-14-2021, 07:32 PM
    With max resonance you can clearly hear that analog filter has some "gritty" quality to it (2:52 of your video), while digital is sterile and lacks this effect completely.
    202 replies | 6521 view(s)
  • tomas's Avatar
    02-14-2021, 01:00 PM
    I noticed that you are using copy of the same input sample when oversampling and averaging output. You may consider using linear interpolation on input and dropping on output.
    202 replies | 6521 view(s)
  • tomas's Avatar
    02-14-2021, 12:41 PM
    Sorry, I did not want to sound harsh, I realised that I was too quick to post feedback, so I deleted it as it requires more time. I will run newest code and do more tests. UPDATE: Now I am running your newest code...
    202 replies | 6521 view(s)
  • tomas's Avatar
    02-13-2021, 04:08 PM
    For obvious (performance) reasons nobody uses math library tanhf for audio. It is way too slow. And if you read previous posts, you would see that I earlier wrote to use float everywhere, not double as it was used in...
    202 replies | 6521 view(s)
  • tomas's Avatar
    02-13-2021, 02:43 PM
    For what it is worth soft saturation (distortion) is absolutely essential to Moog sound. https://www.youtube.com/watch?v=5sAq0FjRUI4 And using tanh() in simultation is not random choice. Moog ladder filter consist of...
    202 replies | 6521 view(s)
  • tomas's Avatar
    02-12-2021, 04:39 PM
    Was busy with other stuff, but over the weekend I intend to pull that code and check against analog 4pole "moog" filter simulation in hardware Virus TI synthesiser. Guys from Kemper Music are famous from good sounding...
    202 replies | 6521 view(s)
  • tomas's Avatar
    02-12-2021, 02:53 PM
    Here you can find the document that describes from where the delays come from: https://www.ti.com/lit/wp/slyy095a/slyy095a.pdf?ts=1613141458124
    24 replies | 742 view(s)
  • tomas's Avatar
    02-12-2021, 02:29 PM
    For what it is worth it is not possible to exactly simulate non-linear analog filter with feedback in digital domain because of the delay introduced by digitization. So called "zero delay" filters were developed to...
    202 replies | 6521 view(s)
  • tomas's Avatar
    02-11-2021, 12:21 AM
    Sorry. Apparently I need to get my eyes checked.
    126 replies | 10918 view(s)
  • tomas's Avatar
    02-10-2021, 04:15 PM
    For better reliability of your MIDI IN consider 10k resistor between pin 7 and ground of optocoupler as explained here: https://electronics.stackexchange.com/questions/165255/midi-in-many-circuits?noredirect=1&lq=1
    126 replies | 10918 view(s)
  • tomas's Avatar
    02-10-2021, 11:07 AM
    As I wrote in my earlier post, I advise to keep attention to those little details such as using floating point constants: 4.0 is a DOUBLE (64-bit) constant. It causes your computations to be done in 64-bit, not 32-bit....
    202 replies | 6521 view(s)
  • tomas's Avatar
    02-08-2021, 07:48 PM
    Two performance suggestions: 1. Use f for constants: like 0.9892f instead of 0.9892. Constants by default are double. Float is twice as fast even on hardware FPU 2. Use float instead of double (for audio 32bit float...
    202 replies | 6521 view(s)
  • tomas's Avatar
    01-23-2021, 05:31 PM
    SNR is measured in dB. And it was observation / comment / remark (hence "approx" word), not measurement. PT8211 is so bad, not only with regards to noise but mainly to distortion that I wonder why would anyone use it....
    35 replies | 1223 view(s)
  • tomas's Avatar
    01-23-2021, 11:11 AM
    tomas replied to a thread Raspberry Pi Pico in General Discussion
    "Brand" effect. Everything that has name "Raspberry Pi" on it gets media coverage. Every web site talks circles about it and praises it as it was the best thing since sliced bread. They don't mention things like Black...
    172 replies | 9978 view(s)
  • tomas's Avatar
    01-23-2021, 12:15 AM
    tomas replied to a thread Raspberry Pi Pico in General Discussion
    The other person could say: Focus on your core product/business. High-performance microcontrollers in tiny user-friendly package. Why would anyone bother to think about yet another 12-year old Cortex M0? Did you guys...
    172 replies | 9978 view(s)
  • tomas's Avatar
    01-22-2021, 07:23 PM
    tomas replied to a thread Raspberry Pi Pico in General Discussion
    Cortex M0 was introduced in 2009. So it is 12 year old tech. CPU in Raspberry PI 1 wasn't 12 years old. But typical user does not program (majority of) them using APIs (yet), of course except washing machines ;-)...
    172 replies | 9978 view(s)
  • tomas's Avatar
    01-22-2021, 05:21 PM
    tomas replied to a thread Raspberry Pi Pico in General Discussion
    +1. That is my sentiment too. I have seen such hype so many times in the past. Don't waste time on platform that is not bringing anything new. M0 is old tech, underpowered, lacking crucial features like FPU. The only...
    172 replies | 9978 view(s)
  • tomas's Avatar
    01-21-2021, 09:19 PM
    tomas replied to a thread Raspberry Pi Pico in General Discussion
    Yes, I have been running it at 750MHz super stable, but decreased longevity https://www.nxp.com/docs/en/nxp/application-notes/AN12253.pdf worries me a bit.
    172 replies | 9978 view(s)
  • tomas's Avatar
    01-21-2021, 08:35 PM
    tomas replied to a thread Raspberry Pi Pico in General Discussion
    And it is 5 times as useful :-) Seriously. I am making project that requires LOT of horse power and will probably use 5 or more Teensy 4s. And I need bare metal, so Linux based things like Raspberry Pi are not an...
    172 replies | 9978 view(s)
  • tomas's Avatar
    01-21-2021, 08:20 PM
    tomas replied to a thread Raspberry Pi Pico in General Discussion
    +1. and 600MHz T4 is even better :D There is detailed chart on page 180 of reference manual for F401. FIFO has four 32-bit words that can act as 16 bytes or 8 half-words (16-bit).
    172 replies | 9978 view(s)
  • tomas's Avatar
    01-21-2021, 07:55 PM
    tomas replied to a thread Raspberry Pi Pico in General Discussion
    It does. Page 166 and page 180 of STM32F401 Reference manual: "Four-word depth 32 first-in, first-out memory buffers (FIFOs) per stream." FIFO in STM32F401 is universal that handles not only I2S but ALL streams....
    172 replies | 9978 view(s)
  • tomas's Avatar
    01-21-2021, 04:12 PM
    Exactly, noise floor approx -58dB that is less than 10 bits. Good cassette decks in '80s were able to get >70dB.
    35 replies | 1223 view(s)
  • tomas's Avatar
    01-21-2021, 03:32 PM
    tomas replied to a thread Raspberry Pi Pico in General Discussion
    I2S without masterclock limits the number of DACs you can connect to those that don't need MCLK. Also since this PIO seems to be implementing I2S in software the question arises about clock jitter and availability (or...
    172 replies | 9978 view(s)
  • tomas's Avatar
    01-21-2021, 03:25 PM
    Now do the same with PT8211 and you will see how bad it really is. I would say it is no better than '80s compact cassette.
    35 replies | 1223 view(s)
  • tomas's Avatar
    01-21-2021, 11:48 AM
    tomas replied to a thread Raspberry Pi Pico in General Discussion
    I also hate Arduino IDE, but there is a solution already. I strongly recommend taking a look at PlatformIO (Visual Studio Code addon). It is night and day compared to Arduino. I used various IDEs for various families...
    172 replies | 9978 view(s)
  • tomas's Avatar
    01-21-2021, 10:23 AM
    I am using studio grade ADC AK5394A (123dB SNR/ 123dB DR) with Visual Analyser. With regards to your results, your power supply may be the culprit too. Disconnect USB and try running from some high quality low noise...
    35 replies | 1223 view(s)
  • tomas's Avatar
    01-20-2021, 12:04 AM
    I would actually say that pretty much ALL current high quality sigma-delta audio DACs have oversampling built-in with multistage decimator and FIR filters that have quality way above what is offered by library and zero...
    35 replies | 1223 view(s)
  • tomas's Avatar
    01-18-2021, 04:24 PM
    Yes it would be very handy to have SDRAM option on board. Note that this Daisy board uses STM32H750 microcontroller at @480MHz so it is already significantly slower than existing Teensy 4 @600MHz, and nowhere near to...
    361 replies | 41259 view(s)
  • tomas's Avatar
    01-12-2021, 12:06 PM
    First, in almost all practical cases you use windowed sinc. Second, as I wrote, its better to do range reduction yourself.
    4 replies | 333 view(s)
  • tomas's Avatar
    01-12-2021, 01:39 AM
    Range reduction of large arguments in trigonometric functions is always problematic because PI constant used is inherently inaccurate. There is infamous bug in Intel x87 FPU hardware that causes sin to be inaccurate for...
    4 replies | 333 view(s)
  • tomas's Avatar
    01-08-2021, 09:34 AM
    Yes see: https://www.mathworks.com/help/dsp/ug/optimized-fixed-point-fir-filters.html
    22 replies | 776 view(s)
  • tomas's Avatar
    01-08-2021, 09:30 AM
    It works because you have converted (rescaled) floating point coefficients to fixed point. If you use short data type (16 bit), coefficients are supposed to be in the range of -32768 upto 32767 and that values represent...
    22 replies | 776 view(s)
  • tomas's Avatar
    01-07-2021, 07:49 PM
    Datatype short is 16 bit - it is too low resolution for coefficients of a good filter. Also if you just change the data type from int to short, you will likely overflow the range, as short has only +/-2^15 range...
    22 replies | 776 view(s)
  • tomas's Avatar
    01-07-2021, 07:32 PM
    tomas replied to a thread Led strip in Project Guidance
    I did that already in the past. True power issues are a problem if you want to light up entire strip, but to light up only a few leds out of say 4 octave keyboard (48 leds) (usually you don't have more than 10 FINGERS...
    2 replies | 222 view(s)
  • tomas's Avatar
    01-07-2021, 07:27 PM
    Just my 2 cents worth: I also faced problem that I needed a decent and FAST debugger for complex programs written for embedded systems (not only Teensy but STM32 too). Although I got debugger with STM32 I find it too...
    37 replies | 10820 view(s)
  • tomas's Avatar
    01-07-2021, 07:04 PM
    Soldering Teensy is not rocket science. Certainly not more complicated than soldering Arduino Nano or Micro. Keep temperature in check, don't use too much tin and heat the pad and the pin not more than 1 second. That's...
    3 replies | 332 view(s)
  • tomas's Avatar
    01-07-2021, 06:57 PM
    I got Access Virus TI hardware synth (virtual analog) and you can pretty easily get bass/tom/snare drums with it with self-oscillating 4 pole resonant filter that has its cutoff frequency modulated to get characteristic...
    26 replies | 4176 view(s)
No More Results
About tomas

Basic Information

Statistics


Total Posts
Total Posts
51
Posts Per Day
0.13
Last Post
Porting moog ladder filters to audio objects? 02-17-2021 09:27 AM
General Information
Last Activity
02-17-2021 11:24 AM
Join Date
02-24-2020