Page 2 of 2 FirstFirst 12
Results 16 to 23 of 23
  1. #16
    Micron is online now Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,801

    Also if you do not have a disc number in the tag,
    That seems to be the major shortcoming. Hard to edit titles from tags when the tags don't have values as I've already noted.

    Anyway, this software discussion is sort of hijacking the thread. Happy to review such suggestions but the main focus of my thread was to get info from anyone who had experience editing ID3 tags with VBA.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  2. #17
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    4,940
    Here is something from MrExcel
    https://www.mrexcel.com/board/thread...-tags.1104401/

    Not sure where you find that cddbControlLib though
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

  3. #18
    Micron is online now Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,801
    I used your friend to find it the other day...
    https://www.dlldownloader.com/cddbcontrol-dll/
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  4. #19
    davegri's Avatar
    davegri is offline Excess Access
    Windows 11 Access 2019
    Join Date
    May 2012
    Location
    Denver
    Posts
    3,413
    PAS FullscreenMusicPlayer-v08.zip

    Here's a MP3 player that shows how to extract and update metadata in mp3 files. The editing is not the main thrust (playing the music is), but it does show how to access the tags. I've included a lot of comments in the VBA, some control tips and a couple of right-click context menus to show the way.
    Note that the code uses Windows media player ActiveX dll. The MP3 files must exist in the native Windows Music library for the .dll code to work.
    Your computer must have this .dll available.

    Click image for larger version. 

Name:	rcDll.png 
Views:	25 
Size:	16.1 KB 
ID:	51286

    Some code in modEditMetaData shows some tags captured:

    Code:
        'frmMetaData is unbound. The below code loads a UDT with the data for the required fields
        'on the form.
        Meta.mdArtist = wmp.currentMedia.getItemInfo("Artist")
        Meta.mdAlbum = wmp.currentMedia.getItemInfo("Album")
        Meta.mdTrack = wmp.currentMedia.getItemInfo("WM/TrackNumber")
        Meta.mdGenre = wmp.currentMedia.getItemInfo("Genre")
        Meta.mdTitle = wmp.currentMedia.getItemInfo("Title")
        Meta.mdYear = wmp.currentMedia.getItemInfo("ReleaseDateYear")
        Meta.mdSourceURL = wmp.currentMedia.getItemInfo("SourceURL")
        Meta.mdBitrate = wmp.currentMedia.getItemInfo("Bitrate")
        DoCmd.OpenForm "frmMetadata"
    Also, if your Windows Music Library folder is not on drive C:\, check this code in the form_load event of frmPlayer
    Code:
    '>>> If your music library is not on drive C:\ then modify below for your windows login username and drive letter
        Select Case fcnMyUserName
            Case "Davegri"
                MPath = Replace(MPath, "C:\", "E:\")
            Case "Stephen"
                MPath = Replace(MPath, "C;\", "D;\")
        End Select
    '>>>
    Here's how to use context menus:

    Click image for larger version. 

Name:	rcEdit.png 
Views:	24 
Size:	47.7 KB 
ID:	51284

    Click image for larger version. 

Name:	rcImage.png 
Views:	25 
Size:	29.3 KB 
ID:	51285

  5. #20
    Micron is online now Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,801
    Maybe I gave this thread the wrong title. It's not about editing tags as much as it is about creating them when they don't exist. I haven't seen any suggestions yet that provide for "editing" tags when the tag properties exist but the tag property values do not.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  6. #21
    davegri's Avatar
    davegri is offline Excess Access
    Windows 11 Access 2019
    Join Date
    May 2012
    Location
    Denver
    Posts
    3,413
    In the DB in post 19, frmMetaData has a button click event that updates metadata:
    The Meta. values are the existing values(which may be blank) in the mp3 file's attributes. The txt(boxes) contain values you typed in.
    Code:
    Private Sub cmdUpdate_Click()
        If (txtArtist & "") = "" Then
            MsgBox "Blank Artist not allowed!", vbInformation, " C A N N O T  B E  B L A N K "
            Exit Sub
        End If
        If txtArtist <> Meta.mdArtist Then
            wmp.currentMedia.setItemInfo "Artist", Me.txtArtist
        End If
        If txtTitle <> Meta.mdTitle Then
            wmp.currentMedia.setItemInfo "Title", Me.txtTitle
        End If
        If txtGenre <> Meta.mdGenre Then
            wmp.currentMedia.setItemInfo "Genre", Me.txtGenre
        End If
        If txtTrack <> Meta.mdTrack Then
            wmp.currentMedia.setItemInfo "WM/TrackNumber", Me.txtTrack
        End If
        If Len(txtAlbum & "") = 0 Then
            wmp.currentMedia.setItemInfo "Album", vbNullString
        ElseIf txtAlbum <> Meta.mdAlbum Then
            wmp.currentMedia.setItemInfo "Album", Me.txtAlbum
        End If
        DoCmd.Close acForm, Me.Name
    End Sub
    Last edited by davegri; 12-31-2023 at 06:26 PM. Reason: addl infoA

  7. #22
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    4,940
    Quote Originally Posted by Micron View Post
    Maybe I gave this thread the wrong title. It's not about editing tags as much as it is about creating them when they don't exist. I haven't seen any suggestions yet that provide for "editing" tags when the tag properties exist but the tag property values do not.
    For that to happen you have to have something to refer to, surely.

    That Scan option in MusicBrainz seems to be the solution, as that can make the best guess from the audio, not knowing any tags? Not perfect admittedly, but better than nothing?

    If you could at least enter the artist and title, that MusicBrainz might be able to get the rest?
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

  8. #23
    Micron is online now Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,801
    After examining lots of code posts, 2 tag editing apps and the like I got some help from Mr. Excel when I posted to an old thread. To reiterate my explanation as to why I wanted to do this:
    My car lists music files by artist, album, folder (thus by file name) or song title, and maybe others I can't recall. All I wanted was for the track position number to match the value of the leading numeric characters in the file name. So "02 Song Name Here" track position would be 2 and not 7 as published/released. That way the order would always be the same regardless of which view option I used, and the file name orders are as I want them, not as published. Consider also that if I group 2 songs from this album and 2 from that, and 3 from that (same artist/band) it makes no sense to me to have multiple folders as opposed to one. In that case, multiple songs can have the same track number. Yes the tag apps can do this editing - one at a time. Not an option.

    I have only tested on one folder but here is code that worked flawlessly once I modified it to suit my filename string syntax. I'm posting a link in case it is of interest to anyone in the future since it solves this thread. As noted in the linked thread, the code only seems to work in Excel (an API caused a "no such function" compile error, or something like that). Maybe that's due to a missing Access reference but I might not play with that. I'll use Access to loop through all folders and format the file names, then use Excel to edit the position tag. I'd still like to have a db as a catalogue and I'm not inclined to use Excel for that.

    Thanks for the suggestions thus far.
    EDIT - bad paste of url. Hang on...
    OK, fixed

    https://www.mrexcel.com/board/thread...1/post-6157709
    Last edited by Micron; 02-22-2024 at 10:58 AM. Reason: added info
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

Page 2 of 2 FirstFirst 12
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Normalization of Titles
    By Western_Neil in forum Database Design
    Replies: 4
    Last Post: 12-12-2019, 12:47 PM
  2. Replies: 3
    Last Post: 10-19-2013, 10:21 AM
  3. Getting ID's when I need titles
    By zero3ree in forum Access
    Replies: 1
    Last Post: 06-26-2012, 10:24 PM
  4. Tab Titles...
    By jlclark4 in forum Forms
    Replies: 3
    Last Post: 04-08-2011, 12:25 PM
  5. Column Titles
    By chum in forum Reports
    Replies: 1
    Last Post: 01-20-2010, 01:01 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums