UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome to UtterAccess! Please ( Login   or   Register )

Custom Search
 
   Reply to this topicStart new topic
> Windows 10 Flac Tags Bug, Access 2016    
 
   
RLG
post Jul 9 2019, 05:41 PM
Post#1



Posts: 40
Joined: 9-March 10



Thanks to help from kind members here, I finally got my music database to import flac tags and insert them into a pretty form. I have been working on this DB for 11 years now, and it helps me to find everything I need among my 14,000 CDs.

BUT, as I received notification from Microsoft that they were phasing out Windows 7 support, I took the plunge and installed Windows 10. At the same time, being by nature adventurous, I also changed to Office 2019.

I have managed to get almost everything to work now, but Windows 10 has a known bug which curtails flac tags to the first x characters, which has screwed up my lovely module totally. And apparently there is no urgency to correct it, so I have to change the way I attack this.

Flac format, which is actually Vorbis, holds the tag information at the very beginning of the file, and so should not be difficult to parse. But I don't know how to import a flac music file into an Access table as text in ASCII format.

Please can someone help?


Go to the top of the page
 
DanielPineault
post Jul 9 2019, 05:44 PM
Post#2


UtterAccess VIP
Posts: 6,710
Joined: 30-June 11



Any chance you can post a file and the expected extract?

What about http://www.devhut.net/2012/05/14/vba-read-file-into-memory/

--------------------
Daniel Pineault (2010-2019 Microsoft MVP)
Professional Help: http://www.cardaconsultants.com
Free MS Access Code, Tips, Tricks and Samples: http://www.devhut.net

* Design should never say "Look at me". It should always say "Look at this". -- David Craib
* A user interface is like a joke, if you have to explain it, it's not that good! -- Martin LeBlanc


All code samples, demonstration databases, links,... are provided 'AS IS' and are to be used at your own risk! Take the necessary steps to check, validate ...(you are responsible for your choices and actions)
Go to the top of the page
 
RLG
post Jul 9 2019, 05:56 PM
Post#3



Posts: 40
Joined: 9-March 10



Thanks for the quick response, Daniel.

Your suggested code is fine for any type of text file, but I need to read a .flac music file as text, in other word convert it.

It's the conversion method which has stumped me.

Richard
Go to the top of the page
 
DanielPineault
post Jul 9 2019, 06:11 PM
Post#4


UtterAccess VIP
Posts: 6,710
Joined: 30-June 11



I'd need to see a file.

That said, why not use something like https://xiph.org/flac/documentation_tools_metaflac.html to get the data and get it from there?

--------------------
Daniel Pineault (2010-2019 Microsoft MVP)
Professional Help: http://www.cardaconsultants.com
Free MS Access Code, Tips, Tricks and Samples: http://www.devhut.net

* Design should never say "Look at me". It should always say "Look at this". -- David Craib
* A user interface is like a joke, if you have to explain it, it's not that good! -- Martin LeBlanc


All code samples, demonstration databases, links,... are provided 'AS IS' and are to be used at your own risk! Take the necessary steps to check, validate ...(you are responsible for your choices and actions)
Go to the top of the page
 
RLG
post Jul 10 2019, 03:06 AM
Post#5



Posts: 40
Joined: 9-March 10



Thanks for the link, Daniel. I am investigating how I can invoke the command line editor under the control of VBA and import the results into a table.

In the meantime, here is a link to a typical flac file from my collection: https://mega.nz/#!EBZhhAxJ!49yX_U4I...osTcsPdY-mkKla8. You can download this as-is without a password. I have about 200,000 of these.

This is a mid-size file of 92MB as an example. Some are much larger as they are in higher resolution flac.

As a point of interest, I use Notepad++ for quite a lot of coding, and it imports the flac files as text without problems, but of course metaflac should be able to identify the tags without my having to parse the whole header.

Much appreciate your help and suggestions.

Richard

Go to the top of the page
 
gemmathehusky
post Jul 10 2019, 04:10 AM
Post#6


UtterAccess VIP
Posts: 4,722
Joined: 5-June 07
From: UK


How much data do you need to read from the file. Is it a fixed amount or a variable? do you need to determine where the "header" ends? If so, how do you do this?

Can you give an example of what you end up with as a "header" from the sample file?

--------------------
Dave (Male)

(Gemma was my dog)
Go to the top of the page
 
RLG
post Jul 10 2019, 06:00 AM
Post#7



Posts: 40
Joined: 9-March 10



This is the header in ASCII of the file I included:

fLaC "   P
ÄCp‘ý0iÏS…2Y„8× f­Hz š reference libFLAC 1.3.0 20130526
 COPYRIGHT=2015 Warner Classics TOTALTRACKS=091
Artist=Mischa Maisky (vlc), Martha Argerich (pno) Artist=Mischa MaiskyI
Title=Beethoven 7 Variations on Mozart's 'Bei Männern' in E flat, WoO 46
COMPOSER=Beethoven-
Album=Martha Argerich and Friends 2014 Disc 1
Genre=Classical DATE=2014 TRACKNUMBER=04
ALBUMARTIST=Martha Argerich and Friends Y_ 
image/jpeg

There is no fixed length for the header, as there are additional tags which i have not used in this case. An example is COMMENT, which has no maximum defined length.
However, each individual tag is actually completed by three successive NULS, and the header (after the image, which is always last) is ended with a row of at least 10 NULS.

This whole file in Notepad++ is 753,242 lines long, which is why we need to parse out the very short header immediately.

The Metaflac utility which Daniel directed me to actually has an instruction to strip out the tags and export them to a text file, so that way would be the easiest if I could find out how to control it in VBA.

Thanks for your interest.

Richard
Go to the top of the page
 
gemmathehusky
post Jul 11 2019, 06:59 AM
Post#8


UtterAccess VIP
Posts: 4,722
Joined: 5-June 07
From: UK


I imagined you could read the data a char at a time, and extract the header that way. In that case is there a way of identifying the Header End, so you know when you have read the entire header. Is there a particular char value that would mark the header end? It obviously needs to be something that wouldn't accidentally occur elsewhere in the header.

--------------------
Dave (Male)

(Gemma was my dog)
Go to the top of the page
 
DanielPineault
post Jul 11 2019, 07:10 AM
Post#9


UtterAccess VIP
Posts: 6,710
Joined: 30-June 11



I could be wrong, but I believe 'zExif' can be used to restrict to meta data extraction.

--------------------
Daniel Pineault (2010-2019 Microsoft MVP)
Professional Help: http://www.cardaconsultants.com
Free MS Access Code, Tips, Tricks and Samples: http://www.devhut.net

* Design should never say "Look at me". It should always say "Look at this". -- David Craib
* A user interface is like a joke, if you have to explain it, it's not that good! -- Martin LeBlanc


All code samples, demonstration databases, links,... are provided 'AS IS' and are to be used at your own risk! Take the necessary steps to check, validate ...(you are responsible for your choices and actions)
Go to the top of the page
 


Custom Search


RSSSearch   Top   Lo-Fi    16th July 2019 - 01:24 PM