Audio Waveform Analysis

First of all again thanks for your devotion on my problem.
The program is called Avid Media Composer. It is possible to download a it and you can use it for all expands for 30 days without any obligations.
Of course shrinking down the sequence would help but I have the feeling that it might gets inaccurate, don't you tnink?
I know that I was probably a little naive in the first place and did not see that it seems to be more complicated than imagined, also having to do with the fact that I'm obviously lightyears away from understanding the ptential of KM.

Only testing would address that. You should test it. I think you'd be surprised how well it would work.

I enjoy making complex problems into simple solutions. I appreciate that your are tackling a moderately difficult problem. I've handled much worse.

I will research that product and decide whether I can get what I need from watching videos of it online or whether I have to download a copy. It could be that watching videos is enough.

I googled whether there are plugins that can solve this problem. I didn't see any.

But I've just come up with a new way that works during playback. (Although it should also work if you can playback the audio at faster speed, probably even 10x speed. Any faster than that might require some testing.) You may not want this solution, but you might, so I have to mention it.

What you need is the program called Audio Hijack. This program has the ability to trigger a signal to KM when a period of silence (from an app, or from macOS) is broken by noise. A KM macro could start up Audio Hijack, then start the Media Composer playback, then when it received the trigger, it can pause playback, back up a few seconds if you like, insert a marker, and then proceed with the rest of the file. This would be a pretty remarkable macro, and not really much harder than the approach we've been working on, but probably a lot more reliable.

Unless things have changed, I think you can get a free download for a limited time period. I'm not sure if it's fully featured for the free version. But I recommend that you pause for a minute to consider if this is a route you want to go.

Hey man,
Thats an excellent idea!
If it works like you think it should,I dont mind spending 70 dollars on a program that makes my professional life easier.
The trial version is obviously not restricted to a certain time period but to a certain amount of audio material (10 minutes) which should give us a reasonable amount of time to see whether it works of not.
Like I said earlier speed is not such a matter to me since I could run that routine on another machine or at night but of course its cool when it works with double/triple speed.

I'm glad you like this idea. I've performed all the elements of this problem before, so I'm sure we can work it out. I'm not sure if it will work at 10x speed, but it might. We'll try normal 1x speed for starters.

Hey man,
I downloaded the Audio HiJack trial.Pretty excited whether this works. When do you think you could modify your code to the new workflow?
Kind regards

I'm glad you are excited. I've used Audio Hijack to do something very similar before, but that was over 5 years ago. And I was extremely excited because I got it working to modify the behaviour of a physical robot I had built.

Let me abbreviate Audio Hijack as AH and Avid Media Compose as AMC.

The first think I want you to do is open AH and set it up so it reads/records audio from AMC, and configure AH so that it records all the audio from AMC and separates the audio into a separate file in a certain directory if more than X seconds of silence occurs. I might be able to explain this in more detail if you get stuck, but see if you can read the manual and figure this out. The first image below shows you the key dialog box you need to use. Notice the option that is checked off that says to start a new recording file after 2 seconds of silence. I'm not sure what your requirement is rather than "2 seconds" but I would guess "60 seconds" based on what you've said so far.

Then try playing a long file in AMC and see if a new file gets written to that folder after 2 seconds of silence (for now, start with 2 seconds, just to debug your AH configuration.) Once you have this working, then we can run a macro to take advantage of this setup. My macro will change because it will no longer be running in a loop, instead it will be activated by a trigger, which is a better design for any KM macro. The trigger will look like the second image below...

First image:

Second image:

Of course in the trigger you will substitute "~/Downloads" with the name of the folder where AH stores your AMC recordings. Then my macro will know when silence is broken and will trigger itself to do a few things, which will probably be: (still TBD)

  1. Stop AMC playback. (Or perhaps exit the macro if the AMC App is not running or perhaps also if nothing is playing.)
  2. Go back 5 seconds.
  3. Insert a marker.
  4. Start AMC playback.

Steps 1, 2, and 4 may not even be necessary if you are satisfied with a marker being placed one second AFTER the audio starts. In other words, the macro I write may be as simple as a single KM action like this: (!!!!!! :exploding_head: , but I'm not 100% sure yet.)

image

Isn't this amazing? About 98% of the work is being done by AH, not by KM. The only thing KM is needed for is to "type a keystroke when a file is created."

1 Like

Hey man,
it works! You're a genius. Such a simple but effective script. It needs certain setting adaptations in AH and AMC about silence threshold and how many seconds to go back but it is a very solid automized process macro.
Thanks so much!

Audio Hi Jack.kmmacros (4.8 KB)

You got it working that fast? That's fabulous. I always think that the wizards on this forum think I'm a noob who likes to tackle things I'm not qualified to answer, and that's partly true, but sometimes my solutions are indeed very good and they reflect many years of using KM to solve a wide variety of problems.

One time I tried to estimate how many lines of code I've written using KM, and the answer I got was one million.

And don't forget about my advice that you might be able to get this to work at 10x playback speed. That will require testing and finessing on your end.

Hey man,
I hope you are alive and well!
I've got one more little demand for that Audio HiJack Macro. It's probably really simple but I just don't get it to work. I want the marker setting operation in Avid to stop after 5 minutes and then switch application to Audio HiJack and cancel the recording process. I know there is the Set Action Timeout command but that refers to stop the whole macro or am I mistaken?
Cheers,
Simon

I've been taking some rest and relaxation which is why I haven't been here for a while. I need to get back into the swing of things before I can tackle your request.

1 Like