Hi Jos,

> I can fill the Temporal Memory with a lot of nice sounding note-chord
> combinations from Bachs chorals. But then I have to find a new chord with a
> given note. How do I do that?


What about entering each chord as a sequence of notes. Then "resetting"
after each chord - entering each note of the chord; resetting then entering
in the next chord in a song? That way, it will predict a series of
subsequent notes for each note entered.

But remember, the HTM is not a "creative" entity, it predicts or
generalizes. A "generalization" can be composed of elements not previously
combined in a given way, but those individual elements (not the combination
of them), will always be what it has seen before... AFAIK

And what happens with the Temporal Memory when I do that? Does that trying
> somehow change the Temporal Memory?


Once you enter the notes, turn off learning.

On Sat, Oct 10, 2015 at 6:28 AM, Jos Theelen <[email protected]> wrote:

> Yes, I have seen that video.
>
> I hope I can solve the problem before the enddate of the HTM-challenge.
> What I still don't understand is how to get a prediction of a chord, when
> the note is known. I can fill the Temporal Memory with a lot of nice
> sounding note-chord combinations from Bachs chorals. But then I have to
> find a new chord with a given note. How do I do that?
>
> Should I just try to put the combination of that note with a random chord
> in the Temporal Memory and look if it is an anomaly? And try that for all
> the possible chords? And pick the chord with the lowest anomaly-value? That
> could be a very slow solution. And what happens with the Temporal Memory
> when I do that? Does that trying somehow change the Temporal Memory?
>
> greetings: Jos Theelen
>
>
> On 2015-10-09 20:27, Matthew Taylor wrote:
>
>> That is a very interesting problem. I hope you've seen this video
>> about music theory with Charlie Gillingham?
>>
>> https://www.youtube.com/watch?v=tGfDjwSORaw
>> ---------
>> Matt Taylor
>> OS Community Flag-Bearer
>> Numenta
>>
>>
>> On Fri, Oct 9, 2015 at 11:21 AM, Jos Theelen <[email protected]> wrote:
>>
>>> That probably means, they used a scalarencoder. But their problem was
>>> different than mine. They had to remember the notes and to learn which
>>> note
>>> came after which other note. For me the combination of melody and chords
>>> have to sound "nice". Somehow a system has too learn or remember that.
>>>
>>> greetings: Jos Theelen
>>>
>>>
>>> On 2015-10-09 17:19, Matthew Taylor wrote:
>>>
>>>>
>>>> They actually didn't create a NoteEncoder (the codebase was much less
>>>> extensible 2.5 years ago). They wrote a preprocessing script that
>>>> turned the MIDI song file into a scalar input stream. I don't remember
>>>> the
>>>> details, and their codebase is lost now. But I do remember that they
>>>> needed to remove the "rests" from the input.
>>>>
>>>> ---------
>>>> Matt Taylor
>>>> OS Community Flag-Bearer
>>>> Numenta
>>>>
>>>>
>>>> On Fri, Oct 9, 2015 at 3:15 AM, Jos Theelen <[email protected]> wrote:
>>>>
>>>>>
>>>>> Yes, I know it and looked at it. I wondered how they made a
>>>>> NoteEncoder,
>>>>> I
>>>>> am still struggling with that. Nupic says that notes that are "close"
>>>>> to
>>>>> each other should have the most overlapping bits. But what is "close"
>>>>> in
>>>>> music?
>>>>>
>>>>> 1) a scalarencoder, where the number of the note is encoded. In this
>>>>> case
>>>>> "close" means almost the same frequency.
>>>>> 2) 2 scalarencoders, one for the note and a different one for the
>>>>> octave.
>>>>> This because a note sounds almost the same as that same note an octave
>>>>> lower
>>>>> or an octave higher.
>>>>> 3) a typical noteencoder and a scalarencoder for the octave. The
>>>>> noteencoder
>>>>> should take the notes in the following cyclical order:
>>>>> C,G,D,A,E,.....Es,Bes,F,C, each a quint apart. In this case notes that
>>>>> are
>>>>> close together sound better together. C-G sounds better together than
>>>>> C-Cis
>>>>>
>>>>> Probably I should make all 3 encoders, just to test.
>>>>>
>>>>> greetings: Jos Theelen
>>>>>
>>>>> On 2015-10-08 15:14, Marek Otahal wrote:
>>>>>
>>>>>>
>>>>>>
>>>>>> Hi Jos,
>>>>>>
>>>>>> On Thu, Oct 8, 2015 at 3:06 PM, Jos Theelen <[email protected]
>>>>>> <mailto:[email protected]>> wrote:
>>>>>>
>>>>>>       I am working on a model, that reads melodies and chords from
>>>>>>       midifiles, mainly chorales from JS Bach. When the model is
>>>>>> given a
>>>>>>       new melody without chords, it should find the chords, that sound
>>>>>>       correct, conform what it learned from the midifiles.
>>>>>>
>>>>>> Nice, I love classical music and music related examples :)
>>>>>> You probably know, but just in case: check out nupic.audio project
>>>>>> and a
>>>>>> former hackathon submission that composed song on trained MIDI music.
>>>>>>
>>>>>>
>>>>>>       greetings: Jos Theelen
>>>>>>
>>>>>> No virus found in this message.
>>>>>> Checked by AVG - www.avg.com <http://www.avg.com>
>>>>>> Version: 2015.0.6140 / Virus Database: 4435/10780 - Release Date:
>>>>>> 10/08/15
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>> -----
>>>> No virus found in this message.
>>>> Checked by AVG - www.avg.com
>>>> Version: 2015.0.6140 / Virus Database: 4435/10783 - Release Date:
>>>> 10/08/15
>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>> -----
>> No virus found in this message.
>> Checked by AVG - www.avg.com
>> Version: 2015.0.6140 / Virus Database: 4435/10790 - Release Date: 10/10/15
>>
>>
>>
>
>


-- 
*With kind regards,*

David Ray
Java Solutions Architect

*Cortical.io <http://cortical.io/>*
Sponsor of:  HTM.java <https://github.com/numenta/htm.java>

[email protected]
http://cortical.io

Reply via email to