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

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:	32 
Size:	33.8 KB 
ID:	22032
    Click image for larger version. 

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

  2. #177
    Senior Member
    Join Date
    Jul 2014
    Posts
    3,120
    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
    3,120
    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 02:45 PM.

  5. #180
    Senior Member
    Join Date
    Jul 2014
    Posts
    3,120
    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
    3,120
    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
    3,120
    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
    3,120
    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

  12. #187
    Senior Member DD4WH's Avatar
    Join Date
    Oct 2015
    Location
    Central Europe
    Posts
    646
    Hi Walter,

    after a long time, I tried to upload the software to a newly built recorder.

    However, it does not work any more.

    * it seems the triggered recording mode is always enabled
    * it is not possible to make time-scheduled recordings any more
    * I am using I2S mic ICS43434

    Is there any clue how that could be repaired?

  13. #188
    Senior Member
    Join Date
    Jul 2014
    Posts
    3,120
    @DD4WH
    maybe a consequence of the work for redscott
    Will have a look

  14. #189
    Senior Member
    Join Date
    Jul 2014
    Posts
    3,120
    Quote Originally Posted by DD4WH View Post
    Hi Walter,

    after a long time, I tried to upload the software to a newly built recorder.

    However, it does not work any more.

    * it seems the triggered recording mode is always enabled
    * it is not possible to make time-scheduled recordings any more
    * I am using I2S mic ICS43434

    Is there any clue how that could be repaired?
    Just adjusted config.h to do dutycyle and eliminate detector
    corrected link to sdFat-beta (I'm using the latest TD)
    compiled and it is running as expected
    (github updated)

  15. #190
    Senior Member DD4WH's Avatar
    Join Date
    Oct 2015
    Location
    Central Europe
    Posts
    646
    Quote Originally Posted by WMXZ View Post
    Just adjusted config.h to do dutycyle and eliminate detector
    corrected link to sdFat-beta (I'm using the latest TD)
    compiled and it is running as expected
    (github updated)
    Thanks a lot, Walter, for your quick response and the clarification!

    I misunderstood the MDEL parameter, which seems to be a compile time define and not (as I wrongly assumed) a parameter that is given over to the recorder by the confog.txt on the SD card.

    So, I will investigate with the new version and the right compile time defines. However, I have to carefully test the new Teensyduino version, because the recent SD lib changes could potentially break all my other scripts. So it will need some careful work.

    Will keep you up-to-date on my advances!

    All the best,

    Frank DD4WH

  16. #191
    Senior Member
    Join Date
    Jul 2014
    Posts
    3,120
    Quote Originally Posted by DD4WH View Post
    So, I will investigate with the new version and the right compile time defines. However, I have to carefully test the new Teensyduino version, because the recent SD lib changes could potentially break all my other scripts. So it will need some careful work.
    in order not to change too much I only changed the include from SdFat-beta.h to SdFat.h so I access the SdFat library directly and not via SD interface.
    Maybe in the future I will change to SD interface.
    With new Teensyduino, you need to remove the SdFat-beta from the local library to avoid potential conflicts. with makefile I can control the libraries access directly

  17. #192
    Junior Member
    Join Date
    Feb 2021
    Posts
    2
    Good evening
    I am new to Teensy. I use Arduino and ESP32.
    Now i like to use this project for some testing for my Mems microphones.
    My Software:
    Windows 10
    Arduino 1.8.13
    Teensyduino from website
    Last project from Github
    Hardware Teensy 4.1

    When i compile the microSound recorder i get a bounch of errors.

    audio_mods.h:120: error: 'F_BUS' was not declared in this scope

    PDB_period = F_BUS/fsamp -1;
    float A=F_PLL/2.0f/i3/((float)nbits*fsamp);


    audio_hibernate.h:62: error: 'LLWU_F3' was not declared in this scope

    LLWU_F3 |= LLWU_F3_MWUF5_MASK; // clear source in LLWU Flag register
    'IRQ_LLWU' was not declared in this scope
    'LLWU_PE1' was not declared in this scope
    'LLWU_PE2' was not declared in this scope
    'LLWU_PE3' was not declared in this scope
    'LLWU_PE4' was not declared in this scope
    'LLWU_ME' was not declared in this scope

    INTERNAl is not declared.

    Maybe someone can help me what i missed to install.
    Thanks

  18. #193
    Senior Member+ Frank B's Avatar
    Join Date
    Apr 2014
    Location
    Germany
    Posts
    8,225
    Yes, you need a Teensy microcontroller - it does not work on a Esp32

  19. #194
    Senior Member
    Join Date
    Jul 2014
    Posts
    3,120
    Quote Originally Posted by ErichHeiz View Post
    Hardware Teensy 4.1
    SW was developed for T3.6. porting to T4.1 is possible but requires some low level adjustments (as indicated by the compile errors you indicated)

  20. #195
    Junior Member
    Join Date
    Feb 2021
    Posts
    2
    Quote Originally Posted by WMXZ View Post
    SW was developed for T3.6. porting to T4.1 is possible but requires some low level adjustments (as indicated by the compile errors you indicated)
    Ok thanks.

  21. #196
    Junior Member
    Join Date
    Mar 2021
    Posts
    1
    Hello

    I am interested in recording a 24bit 96k stereo i2s audio stream to uSD card -- nothing else like temperature or environmental data. This is an attempt to get close to high quality recording from some of the good audio adc's like akm 557x, cs5381, etc.

Posting Permissions

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