Forum Rule: Always post complete source code & details to reproduce any issue!
Page 8 of 8 FirstFirst ... 6 7 8
Results 176 to 186 of 186

Thread: Audio Recording / Logging to SD card --> microSoundRecorder

  1. #176
    Junior Member
    Join Date
    Mar 2019
    Posts
    15
    Figured some waveforms for a couple of the above might help diagnose the issue. The shorter files almost always end with a loud sound....don't know what that means.
    Click image for larger version. 

Name:	QuietWaveform.jpg 
Views:	10 
Size:	33.8 KB 
ID:	22032
    Click image for larger version. 

Name:	NoisyWaveform.jpg 
Views:	9 
Size:	49.3 KB 
ID:	22033

  2. #177
    Senior Member
    Join Date
    Jul 2014
    Posts
    2,903
    I guess, I have to setup the hardware to test further
    can you confirm T3.6 and 2 I2S micros?

  3. #178
    Junior Member
    Join Date
    Mar 2019
    Posts
    15
    Yes T3.6. Two I2S mics (ICS43434). Filtering cap/resistor on power lines and source resistors (22 ohm) on other lines to account for longer wiring (~8cm).

  4. #179
    Senior Member
    Join Date
    Jul 2014
    Posts
    2,903
    An update
    I'm working on it
    There seems nothing wrong with detector in mProcess.h (even if I'm modifying it a little bit)
    BUT I found this
    Code:
      #include "mProcess.h"
      mProcess process1(&snipParameters);
    
      AudioConnection     patchCord1(acq,0, process1,0);
      AudioConnection     patchCord2(acq,1, process1,1);
        //
      #if MDEL <0
        AudioConnection     patchCord3(acq,0, queue[0],0);
        AudioConnection     patchCord4(acq,1, queue[1],0);
        
      #else
        AudioConnection     patchCord3(acq,0, delay1,0);
        AudioConnection     patchCord4(acq,1, delay1,1);
        AudioConnection     patchCord5(delay1,0, queue[0],0);
        AudioConnection     patchCord6(delay1,1, queue[1],0);
      #endif
    processing data (snippets detection) is in parallel to simply delaying.
    I will change this
    Reason for this bug is, IIRC, microSoundRecorder was derived from an Event Recorder, but never really used as event recorder.
    So, this was really not tested.
    if process is disabled then bug was not visible.
    Last edited by WMXZ; 10-10-2020 at 03:45 PM.

  5. #180
    Senior Member
    Join Date
    Jul 2014
    Posts
    2,903
    I cleaned up the code to get event driven logger working

    It turned out that the code in #179 could work:
    In order to allow pre-trigger delay the trigger process has to run in parallel.
    However, it was wrong that trigger process was queuing data also to recording queue.
    I updated the Github.

    For the time being the two modes time-based recording and event-based recording are exclusive
    For MDEL <0 , code for time-based recording is compiled allowing hibernating
    For MDEL>=0, code for event-based recording is compiled, without possibility of hibernating

  6. #181
    Junior Member
    Join Date
    Mar 2019
    Posts
    15
    Awesome! I will have to try it out today. Just to make sure I am understanding you correctly. When MDEL>=0 the teensy will never hibernate even if the time settings dictate that it should not be recording?

  7. #182
    Senior Member
    Join Date
    Jul 2014
    Posts
    2,903
    Quote Originally Posted by redscott View Post
    Awesome! I will have to try it out today. Just to make sure I am understanding you correctly. When MDEL>=0 the teensy will never hibernate even if the time settings dictate that it should not be recording?
    Yes, for the time being, there are #if MDEL<0 ....#endif around the calls to checkDutyCycle()
    But this is only to see if event-driven recording is working as expected.
    On the bench here it was working, but with real data, you have to tell us.
    In future I may activate hibernation again, as it can easily be controlled with acqParameters. But now it is de-activated.

  8. #183
    Junior Member
    Join Date
    Mar 2019
    Posts
    15
    Success! I can now confirm that the audio triggered recording is working. I tested it in my office and with very high threshold values (>1000) it would almost never record a file and if it did it would be less than a second long. I turned it down to a more reasonable 150 and placed it outside for a few hours. The files were of varying size and all had legitimate things to be recorded. We have a highway about a 0.5 km away so I got a recording each time traffic came by but also got recordings of crows and other birds. It took breaks from recording as anticipated during quieter times. I noticed the debugging data is now not very accurate to what the HW is actually doing (debugging does not always seem to show file close/open events). This is not overly important for me except that I was thinking to fine tune the settings it would be nice to have it record the debugging data to the SD card so I could compare the audio files to the triggering data for the audio file.

  9. #184
    Senior Member
    Join Date
    Jul 2014
    Posts
    2,903
    Quote Originally Posted by redscott View Post
    Success! I can now confirm that the audio triggered recording is working.
    Great to hear that.
    Sure, 'debugging' code is only that. it was done to give some feedback to user. It was not meant to be detection logging. Yous could be very useful indeed, but max be very application dependent. Feel free to modify code to your needs.

  10. #185
    Junior Member
    Join Date
    Oct 2020
    Posts
    1

    microSoundRecorder for Teensy 4.1

    Hi to all and thank you for this amazing library,
    I am new to audio logging, and I am trying to understand if it is possible to record audio on the SD card using only a Teensy without the Audio Board. Does microSoundRecorder need an Audio Board? I am reading the microSoundRecorder wiki and to my understanding, there are no references to the Audio Board. But in this forum, there are frequent references to the latter. In any case, can this library be modified to work for Teensy 4.1 paired with a single ICS43434?
    I'd appreciate any thoughts or comments.

  11. #186
    Senior Member
    Join Date
    Jul 2014
    Posts
    2,903
    Quote Originally Posted by jyviko View Post
    In any case, can this library be modified to work for Teensy 4.1 paired with a single ICS43434?
    No audioboard is needed, just edit config.h
    e.g. modify #define ACQ _I2S_32 // selected acquisition interface //<<<======>>>
    e.g #define ACQ _I2S_32_MONO
    and verify the microphone is connected correctly.

    If you have problems, please provide config.h and list on how you connected the microphone
    and what the Config.txt file on the uSD disk looks like

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •