INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: Calling gurus of DB expressions  (Read 2348 times)

ozmael

  • Regular Member
  • Junior Woodchuck
  • **
  • Posts: 51
  • Change this by choosing profile
Calling gurus of DB expressions
« on: June 21, 2005, 06:38:40 pm »

I'm using MC 11 and I've got a large music library of mostly dance music. The vast majority of my songs have many different mixes of the same song. For naming these song, I've adopted what the CDDB lookup services do, which is to put the name of the mix in brackets in the [Name] field.

So my library looks something like this:

[Name]
Everlasting Night
Everlasting Night [Radio Edit]
Everlasting Night [Downtown Mix]
Jump For My Love
Jump For My Love [Mac Quayle Mix]
etc. etc.

I'm trying to create a SmartList which avoids duplicates regardless of the mix name (which is stored in the [Name] field).

Rating: >=4, Genre: Disco House, No Duplicates: [Artist],[Name]

I thought I could use DB expressions in MC 11 to create a calculated field that would return the song name without the mix name by parsing for the characters space plus left bracket ( [). According to the MC DB Expressions page (http://www.jrmediacenter.com/DevZone/DBExpressions.htm) I can't seem to find a Left() or Right() expression to be able to do this.

In my library, the name of the mix can be identified in all cases by the square brackets. No other part of the song name uses the square brackets.

Does anyone have a solution to my problem using DB expressions or a plugin?

I've also considered moving the mix name to a seperate custom field, but haven't been able to find a solution that can easily do it for several thousand songs.

Regards,

Ozmael
Logged

221bBS

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 703
Re: Calling gurus of DB expressions
« Reply #1 on: June 22, 2005, 12:35:29 am »

I use several fields to make searching and organizing my library easier...it takes a bit of work but once done it makes everything easier...I use the following fields to name my songs...

Name
Name (Version)
Live
Artist (Featuring)

I use a calculated field named "Name (Full)" to put it all together...

[Name] [[Artist (Featuring)]] [[Name (Version)]] [[Live]]

For Artist I have 3 fields...

Artist
Artist (Featuring)
Artist (List)

"Artist (List)" is a semicolon delimited field that contains "Artist" & "Artist (Featuring)"

Logged

ozmael

  • Regular Member
  • Junior Woodchuck
  • **
  • Posts: 51
  • Change this by choosing profile
Re: Calling gurus of DB expressions
« Reply #2 on: June 22, 2005, 03:22:44 am »

That's a great idea for organising my library moving forward. It makes a lot of sense to me.

My problem is that I have 4,200 existing songs that aren't organised that way.

I'm throwing my net out to see if I can find a tool (DB expression, plugin or otherwise) that can separate the data from the [Name] field into at least two fields - [Name] and [Mix Name].

Any ideas? Could this be done by creating a plugin with VB.Net?
Logged

Alex B

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 10121
  • The Cosmic Bird
Re: Calling gurus of DB expressions
« Reply #3 on: June 22, 2005, 05:12:07 am »

You can separate the track name parts by using the filenames on the disk as a "middleman".

Steps:

1. You may need to change the brackets temporally to some other character combinations, which are not used anywhere in the filenames. Because brackets are used for marking the Field Names it is safer to not use them elsewhere in the naming rules.

For example, find and replace in the Name field: first " [" (incl. the space) with  "£££" and then "]" with "&&&"

2. Rename files from properties:

rule: [Track #] - [Name]   (you can add more fields if needed because of duplicate names)

- If you like to preserve the exact original filenames you can first copy them to a custom field.

3. Make the Mix Name custom field.

4. Fill properties from filenames:

rule: [Track #] - [Name]£££[Mix Name]

5. Find and replace in the Mix Name field: "&&&" with empty.

6. Restore the filenames if you made a custom field for the original filenames or rename them using a rule.

This is the concept. Try the system first with a few test files and adjust if needed. You may need to divide the files in several groups if your original naming system is not exactly consistent.
Logged
The Cosmic Bird - a triple merger of galaxies: http://eso.org/public/news/eso0755

ozmael

  • Regular Member
  • Junior Woodchuck
  • **
  • Posts: 51
  • Change this by choosing profile
Re: Calling gurus of DB expressions
« Reply #4 on: June 22, 2005, 07:14:26 pm »

Hey Alex,

Your solution worked perfectly! Thanks for you help!

Ozmael
Logged

hit_ny

  • Citizen of the Universe
  • *****
  • Posts: 3310
  • nothing more to say...
Re: Calling gurus of DB expressions
« Reply #5 on: June 23, 2005, 05:17:28 am »

What does your smarlist look like now osmael ?

i just resigned my self to shifting the feat. part to the name filed so it looks like

track# - artist - name (feat. artist y) (x Mix)

This helps to use Locate-> Artist and find all tracks by that artist w/o the feat part skewing the results. If you want to know if a certain artist did a particular mix or track(s).

Ctrl+3 then in the search box enter the artist name.

min221bbs solution seems a bit tedious but very complete.
I question when you need the   [[Artist (Featuring)]] [[Name (Version)]] [[Live]] part. Do you have smartlists that make use of the individual custom fields ?

I usually find Artist with Name (as described above) seems to do the trick for me. It will not however do what osmael wants in a smartlist.

Logged

221bBS

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 703
Re: Calling gurus of DB expressions
« Reply #6 on: June 24, 2005, 07:24:11 am »

Quote
min221bbs solution seems a bit tedious but very complete.

Yeah it was...if you have a large collections like I do it will take you months to convert your library  :'( but once done it only takes a little more time to fill in the additional fields for new songs.


Quote
I question when you need the   [[Artist (Featuring)]] [[Name (Version)]] [[Live]] part. Do you have smartlists that make use of the individual custom fields ?

Except for the "Live" field I've never used "Artist (Featuring)" & " Name (Version)" for a smartlist. I mostly use those fields for organizing my library...but by using those fields I have no chance of getting a duplicate song on my play list using "No Duplicates: [Artist],[Name]" unless there is a typo
Logged
Pages: [1]   Go Up