Similarity Forum

General Category => News => Topic started by: Admin on February 03, 2015, 17:45:41

Title: Beta version 2.0.0 (Technical preview)
Post by: Admin on February 03, 2015, 17:45:41
Similarity 2.0.1 build 2055 (Updated 2015.07.05)

Download (http://www.music-similarity.com/downloads/similarity.beta.zip) (32/64-bit Windows)

Main feature of new 2.0 version will be support of Javascript scripting. We already added some support in this beta version, you can try it.
Many users ask very specific features that don't suitable as main feature of program, to not overload program interface most of this request will be implemented via scripting. You can write almost all you need to compare/analyse/tag your collection with Similarity.

Similarity JavaScript API reference (http://www.similarityapp.com/scripting)
Any comments and suggestions are welcomed.

(http://www.music-similarity.com/forum/data/similarity_2.0.0_script_dialog.png)

(http://www.music-similarity.com/forum/data/similarity_2.0.0_script_progress.png)

Known limitations:

Example of analysis script with user defined rating:

Code: [Select]
// after preparing analysis data (asynchronous)
function onprepare(file, result) {
    // skip all not audio files
    if (!result) return;
    // add to results list
    results.analysis.add(file, 'rating', myrating(file.analysis));
}

// file processing callback (asynchronous)
function onfile(file) {
    // just try to receive analyse data, if it has such data this is audio file
    analysis.prepare(file, onprepare)
}

// folder processing callback (asynchronous)
function onfolder(folder) {
    // recursively process subdir with same callbacks
    process(folder, onfile, onfolder);
}

function myrating(data) {
    var score = 1.0;
    // sample rate
    score *= 0.5 + 0.5 * (Math.min(44100, Math.max(22050, data.samplerate)) - 22050) / 22050;
    // bitrate
    if (data.bitrate > 0) score *= 0.5 + 0.5 * (Math.min(128000, Math.max(64000, data.bitrate)) - 64000) / 64000;
    // max.freq
    score *= 0.5 + 0.5 * (Math.min(18500, Math.max(12000, data.maxFreq)) - 12000) / 6500;
    // stereo/mono
    if (data.channels == "mono") score *= 0.5;
    // clipping
    score *= 0.7 + 0.3 / (0.01 * data.clips + 1.0);
    // dynamic range
    if (data.absMax < 0.75) score *= 0.7 + 0.3 * (Math.max(0.25, data.absMax) - 0.25) * 2.0;
    // dc offset
    if (data.absMean >= 0.05) score *= 0.7 + 0.3 * (0.1 - Math.max(0.1, data.absMean)) * 20.0;

    if (data.minStep >= 0.00004) score *= 0.5;
    return score;
}

// clear all results in program
results.analysis.clear();

// start processing files via callbacks
var folders = settings.folders;
for (var idx = 0; idx < folders.length; ++idx) {
    process(folders[idx], onfile, onfolder);
}

Changes 2015.02.17:

Changes 2015.07.05:
Title: Re: Beta version 2.0.0 (Technical preview)
Post by: producer on July 13, 2015, 00:48:10
Hi support,

I am a Mac OS X 10.8.5 user: will there be a new beta for this version soon? Thanks for the support.
Title: Re: Beta version 2.0.0 (Technical preview)
Post by: Admin on July 29, 2015, 00:44:57
Hi support,

I am a Mac OS X 10.8.5 user: will there be a new beta for this version soon? Thanks for the support.
We release new version soon (August month) for OSX too.