MP3 Editting

hatman

Well-known Member
Joined
Apr 8, 2005
Messages
2,664
So I am wrestling with the additional security protocols that our Computer Services Vendor have applied to the latest platform they rolled out with the computer I got last month. Running Windows 7, and to install ANYTHING you need admin prviledges... along with this is a list of 7500+ software packages that our COmputer Services Vendor shall not install on any machine because of some legal mumbo-jumbo. Bottom line: I can't install MP3TagEdit, nor WavePad, nor any other psuedo-reputble, psuedo-useful freeware packages that allow editting of MP3 Tags, nor MP3 Audio Content. I overcame the Tag Edit challenge by writing some VBA code using the specifications available at ID3.org. Works well (though by no means exhaustively complete), and happy to share with anyone interested... That leaves me with no way to edit the MP3 audio content... really, all I want to be able to do is to be able to delete content from the beginning, end, or both and save what's left... I am toying with ripping into the MP3 binary encoding, and manipulating the raw data in VBA to get what I want... but smarter people than me have probably already done this and may even have VBA code available for sharing... any thoughts?
 

Excel Facts

Whats the difference between CONCAT and CONCATENATE?
The newer CONCAT function can reference a range of cells. =CONCATENATE(A1,A2,A3,A4,A5) becomes =CONCAT(A1:A5)
Wow... that sounds like a bit of a task, or maybe should say a byte of a task. I've never worked with MP3 but done some mixing in the past with .wav files using Sonar6. Going after the binary encoding of the MP3 would have to be quite a lot of audio data even for a few seconds would imagine. Curious as to why you want to get rid of ends and just work with the middle portion? Do you want to modify the sound for your own type of mixing effects?

I have seen some experts here on MrExcel using VBA to handle serial communications data. They did it with ease it seemed and likely there would be some similarities there. John_w is one I think knows the serial data handling using VBA. Not sure how much of it might apply though.
 
Why amputate sections of an MP3? I am a member of website that puts out several "talk radio" style podcasts each week, which I download to listen to while I work. Depending upon the DJ, the podcats vary in length from 1-3 hours, and each show is made up of individual segments varying in length from15 minutes to 1 hour each. Occassionally, I want to extract an individual song from amongst a file containing several songs and a bunch of talking, and then append Tag information, and add it to my library as an stand-alone file.

The file manipulations are't that bad... so far I have found a specification for the file format here (still exploring the other links). Looks like each frame is 0.026 seconds long, so theoretically, as long as I split the file at frame boundaries, this should be manageable. I think the most challenging part will be the user interface, and how to interpret the "audio content" of each frame in order to locate audio landmarks that will be used to determine where the splits should happen in the sequence.

It's progress...
 
My wild guess on how I might approach it is: I'd need to be able to somehow listen to the audio while watching the data so I could cut and paste etc. Can't figure how I would do that with VBA but it would not be so hard to do with music mixing software such as years ago when I used Sonar6. I would RIP the song along with everything else into a .wav file that would then be imported into Sonar6. The whole song etc would be one long file you could see the .wav form of on the screen via Sonar6. Then cut, paste, modify (sound levels, frequencies, effects etc) right there. Your cutting out the ends and just saving the song would be pretty easy to do. But using VBA to somehow do it, I cannot see how it could cover your audible monitoring the data. Unless you did something along the lines of using something similar to Application.Speech.Speak?
 
My wild guess on how I might approach it is: I'd need to be able to somehow listen to the audio while watching the data so I could cut and paste etc. Can't figure how I would do that with VBA but it would not be so hard to do with music mixing software such as years ago when I used Sonar6. I would RIP the song along with everything else into a .wav file that would then be imported into Sonar6. The whole song etc would be one long file you could see the .wav form of on the screen via Sonar6. Then cut, paste, modify (sound levels, frequencies, effects etc) right there. Your cutting out the ends and just saving the song would be pretty easy to do. But using VBA to somehow do it, I cannot see how it could cover your audible monitoring the data. Unless you did something along the lines of using something similar to Application.Speech.Speak?

I have some ideas on how to display the graphical waveform directly in the cells. I think I'll end up with vertical orientation rather than horizontal, but I can get used to it. If I display the data from each 0.026 second frame in a row, then I have a maximum of 8 hours of audio that I display over 1.2 million rows... should be plenty.

I haven't gotten far enough to figure out if a wrappered function like Application.Speech.Speak would work... probably not. I fully anticipate using a WinAPI function call directly (Jafaar, this is your cue to chime in and offer advice <|;O)

Right now I am struggling to find any kind of detailed documentation on how the data in the audio frames in encoded... last night, I found this article http://blog.bjrn.se/2008/10/lets-build-mp3-decoder.html</SPAN>, which looks promising... have not had any time to delve into it and see if it's useful at all, and looks like it's blocked here at work.
 
Using the gift of being creative can be fun. Interestingly, your link talks about ripping a .wav file. I'd have a hard time with the cells vertical orientation Excel might do if any .wav file visualizing was used, but could be transposed if did not run out of col's. Some sort of API call might work for "sampling" some sections of cells you could hear the content of for audio location monitoring. Actual looking at a .wav file can help with finding location of your song for instance in the whole section. You would be building your own kind of audio mixing software via VBA.
 
Exactly. It'll be rough, I admit, insofar as the user interface, visualization and audio will probably suck... but I am enjoying the challenge as a change of pace. Who knows, it may turn out better than I expect. I am reminded of a file that came across my radar screen about 8 years ago where someone had written Pac Man in VBA, using one worksheet cell as a pixel, and changing the background colors to generate the animation... it was neat just to see it done in that venue, even though there were no advantages, and even some detriments to the environment.
 
I like doing that kind of stuff you are trying to do. Some people can really get into perfecting the details and become experts at it. Some like to take a concept and start putting that together which is how I kind of am, that bigger picture stuff, being creative. So I can totally relate to what you are trying to do. It sounds like fun and if I had the time I'd likely take a try at it some too.

Am off on vacation now, finally. Hope you keep us posted as I am curious how it might work.
 
Haven't had a chance to touch this since my last post. I have a pretty stable set of code that edits the Tags, which I "use" regularly. No progess on parsing and editting the actual audio portion of a file, yet... I hope things around here slacken up a little bit soon.
 
hello hatman, have you figured out a way to edit mp3s in VBA?
 

Forum statistics

Threads
1,223,721
Messages
6,174,091
Members
452,542
Latest member
Bricklin

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top