by ryrobes on 12/6/13, 4:06 PM with 34 comments
by adrianh on 12/6/13, 7:33 PM
I talk about this a little bit toward the end of this tech presentation I gave: http://37signals.com/talks/soundslice
I definitely echo what some other comments have said -- if you made it based on intervals instead of "hard-coded" notes, it'd be a lot more flexible! That seems to be how our own brains store music -- if somebody sings "Happy Birthday," for example, you can instantly join in, regardless of what key it's in. Unless you're tone deaf... :-)
by ryrobes on 12/7/13, 2:35 AM
Just a short explanation of the (still very rudimentary) query "system" (using the term loosely here)...
Tab file gets scraped, broken down into individual passages based on how it's written (aka the "riffs", even though they might not technically be)..
P.M.---| h P.M. h
|---------------------------|
|---------------------------|
|--------7^8--7-------------|
|--------------------7^8--7-|
|-0---0-----------0---------|
|---------------------------|
becomes normalized / encoded to something like "5a 5a 3h 3i 3h 5a 4h 4i 4h"
and inserted into an ElasticSearch cluster, using a non-word analyzer for indexing (simplified a bit here for sake of argument - but I also save all spacing, symbol markup, bar sections and palm muting they just are not being utilized in search currently). "settings": {
"index.analysis.analyzer.nonword.type": "pattern",
"index.analysis.analyzer.nonword.pattern": "[^\\w]+"
}...
Upon search - the same encoding function is then applied to the incoming text, exploded and thrown in an ordered SPAN query with diff levels of 'slop'... "query": {
"span_near": {
"clauses": [
{
"span_term": {
"riff_code": "5a"
}
},
{
"span_term": {
"riff_code": "5a"
}
},
{
"span_term": {
"riff_code": "3h"
}
},
{
"span_term": {
"riff_code": "3i"
}
}
],
"slop": 6,
"in_order": true
} ....
I cut the score off at a >1.1 or something so that it doesn't show things that are way off.At the time it seemed like the best way to detect patterns that are mostly similar and look decent. I also experimented with MoreLikeThis and FuzzyLikeThis query variants, but ultimately the span query gave closer results to what one would EXPECT to see (but still has some scoring and clustering problems).
Any Lucene / ElasticSearch gurus feel free to suggest differently.
by snorkel on 12/6/13, 11:10 PM
by valtron on 12/6/13, 5:21 PM
by DigitalSea on 12/6/13, 11:50 PM
by dphnx on 12/6/13, 5:16 PM
I think that textarea input box is key - you should invest time making it look good and easy to use. Could you make it an insert-mode text input that replaces hyphens as you type? Could it auto-expand in width when you get to the end?
Can’t wait to see this evolve
by bryans on 12/6/13, 9:35 PM
Also, even though the bitly link ends up being the exact same URL, it sometimes adds a bunch more erroneous results prior to The Haunted, making it listed 8th. But clicking the search button will again return it as the 3rd result.
by sssbc on 12/6/13, 4:52 PM
by lightyrs on 12/6/13, 9:11 PM
by antonio0 on 12/7/13, 2:40 AM
by almosnow on 12/7/13, 2:11 AM
by bitlord_219 on 12/6/13, 4:37 PM
close tab