electro-music.com   Dedicated to experimental electro-acoustic
and electronic music
 
    Front Page  |  Radio
 |  Media  |  Forum  |  Wiki  |  Links
Forum with support of Syndicator RSS
 FAQFAQ   CalendarCalendar   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   LinksLinks
 RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in  Chat RoomChat Room 
 Forum index » Clavia Nord Modular » Nord Modular G2 Discussion
Markov chains
Post new topic   Reply to topic Moderators: Nord Modular Editors
Page 1 of 1 [21 Posts]
View unread posts
View new posts in the last week
Mark the topic unread :: View previous topic :: View next topic
Author Message
Rix



Joined: Aug 08, 2004
Posts: 83
Location: Breda, the Netherlands
Audio files: 2
G2 patch files: 25

PostPosted: Mon Aug 09, 2004 3:55 am    Post subject: Markov chains Reply with quote  Mark this post and the followings unread

Has anyone ideas how to implement a Markov Shocked chain with the G2?
These are ideal for generation of musical patterns (rythm, note or chord sequences) based on simple statistics.

Take for instance 3 notes, c, d e. The system can be in any of these 'states', (c, d or e).

The chances of going from one state to the other are :

c -> c : 0.3 (from c to c: 30% chance..)
c -> d : 0.4
c -> e : 0.3

d -> d : 0.2
d -> e : 0.5
etc...
It is often depicted in a Markov diagram showing the states as circles and arrows pointing at the other (or same) state with the chances alongside it.

Markov chains (from communications theory) are also an excellent tool to analyse music. E.g. you could feed a Markov system with Bach and Prince pieces, and out comes a Bach/Prince composition!

But back to simple basics:
How would we do this in the G2?
We would need variable chances depending on the current state we are in.

Richard
Back to top
View user's profile Send private message Visit poster's website
egw
Stream Operator


Joined: Feb 01, 2003
Posts: 1569
Location: Asheville NC
Audio files: 18
G2 patch files: 8

PostPosted: Mon Aug 09, 2004 4:24 am    Post subject: Reply with quote  Mark this post and the followings unread

I did a markov chain on the classic NM. It would play a chord sequence and transition between states based on a probability matrix. The logic was quite convoluted, but it should be much easier on a G2.
Back to top
View user's profile Send private message Visit poster's website
Rix



Joined: Aug 08, 2004
Posts: 83
Location: Breda, the Netherlands
Audio files: 2
G2 patch files: 25

PostPosted: Mon Aug 09, 2004 4:57 am    Post subject: Reply with quote  Mark this post and the followings unread

Quote:
I did a markov chain on the classic NM.


Heey .. great!

Would you still have the NM patch as a reference?

Richard
Back to top
View user's profile Send private message Visit poster's website
mosc
Site Admin


Joined: Jan 31, 2003
Posts: 18197
Location: Durham, NC
Audio files: 212
G2 patch files: 60

PostPosted: Mon Aug 09, 2004 8:31 am    Post subject: Reply with quote  Mark this post and the followings unread

I'm not trying to discourage anyone from doing anything experimental things on the G2, but my take on these complex copositional algorithms is that it is more productive to use a computer program that is designed for this purpose. I use Keykit which is free and quite fantastic. It was written by Tim Thompson, AKA TJT, a memeber of the electro-music.com forum. There are other possibilities like MAX and ArtWonk, http://algoart.com/artwonk.htm. If an all-in-one system is desired, the Kyma system might be a better choice. http://www.symbolicsound.com/cgi-bin/bin/view/Company/WebHome

The are many more.

You can probably build a house with a Swiss Army Knife, or even a G2 for that matter, but there is something to be said about the right tool for the right job.

That said, let's see what the G2 can do with Markov chains.

BTW, I've heard lots of Markov chains music, but not much sounds very good to me. Intellecturally this stuff if facinating, but it doesn't seem to pan out. I would love to be proven wrong.
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address
egw
Stream Operator


Joined: Feb 01, 2003
Posts: 1569
Location: Asheville NC
Audio files: 18
G2 patch files: 8

PostPosted: Mon Aug 09, 2004 9:22 am    Post subject: Reply with quote  Mark this post and the followings unread

Yes I still have the patch. If you want to contact me off-line I'll send it to you. It might even be in the NM archive, it's called "progger."
But I'm not sure it's worth the effort to study (unless you're highly motivated) due to it's complexity. It uses a set of S&H modules for each bit of the state register. And a bunch of compare modules to encode the probability matrix. The more sophisticated logic modules, flip-flops, controlled switches, A/D converters etc. will make this much easier on the G2. Unfortunately it will be a few weeks before I have a chance to do any G2 programming.
Anyway I agree with Howard that the results of this sort of thing are often less than satisfying. Now I mostly use pseudo-random patterns, you can specify the length you want, then just dial through them until you find one that sounds good. It's alot easier (and more fun) than entering sequences one note at a time.
Back to top
View user's profile Send private message Visit poster's website
Rix



Joined: Aug 08, 2004
Posts: 83
Location: Breda, the Netherlands
Audio files: 2
G2 patch files: 25

PostPosted: Mon Aug 09, 2004 10:03 am    Post subject: Reply with quote  Mark this post and the followings unread

Thanks guys.

Mosc, you are probably right: it is far more easy to do Markov chains in a programming language than on a modular system. I might write some Delphi midi code for that, when I have time...
BTW, interesting links about these music systems!

Is this Kyma system and the hardware box represented in Europe?

cheers,
Richard
Back to top
View user's profile Send private message Visit poster's website
blue hell
Site Admin


Joined: Apr 03, 2004
Posts: 24079
Location: The Netherlands, Enschede
Audio files: 278
G2 patch files: 320

PostPosted: Mon Aug 09, 2004 10:54 am    Post subject: Reply with quote  Mark this post and the followings unread

Rix wrote:
TIs this Kyma system and the hardware box represented in Europe?


It never was, all transaction went with Symbolic Sound corporation directly, and I don't think this changed as it seems to be their way of doing bussiness. But from what I heard I think they are very friendly and helpfull people to deal with.

Jan.
Back to top
View user's profile Send private message Visit poster's website
mosc
Site Admin


Joined: Jan 31, 2003
Posts: 18197
Location: Durham, NC
Audio files: 212
G2 patch files: 60

PostPosted: Mon Aug 09, 2004 11:41 am    Post subject: Reply with quote  Mark this post and the followings unread

Blue Hell wrote:
But from what I heard I think they are very friendly and helpfull people to deal with.

There are many Kyma systems in Europe, but I'm not sure if there is a dealer or representative. I think Jan is right. I have one and am ashamed I've never gotten much done with it. The people at Kyma are the best. Customer support is as good as it can get. The only problem with Kyma is that the system is pretty expensive, and the learning curve is steep. It's very open too. I have used it for auto panning in surround sound. Kyma is used by sound designers and producers for major Hollywood movies and commericals. Also, game designers are big into Kyma.
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address
pstnotpd



Joined: Apr 09, 2004
Posts: 34
Location: Netherlands
G2 patch files: 5

PostPosted: Mon Aug 09, 2004 12:38 pm    Post subject: Reply with quote  Mark this post and the followings unread

> I have one and am ashamed I've never gotten much done with it.

Hmm, have you got the Kyma X software up already? I was asking around here but it's pretty well unknown over here.

Patrick
Back to top
View user's profile Send private message
mosc
Site Admin


Joined: Jan 31, 2003
Posts: 18197
Location: Durham, NC
Audio files: 212
G2 patch files: 60

PostPosted: Mon Aug 09, 2004 1:59 pm    Post subject: Reply with quote  Mark this post and the followings unread

Yes, I have Kyma X.
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address
blue hell
Site Admin


Joined: Apr 03, 2004
Posts: 24079
Location: The Netherlands, Enschede
Audio files: 278
G2 patch files: 320

PostPosted: Tue Aug 10, 2004 11:29 am    Post subject: Re: Markov chains Reply with quote  Mark this post and the followings unread

Rix wrote:
Has anyone ideas how to implement a Markov :shock: chain with the G2?


I'd try something along the lines in the patch attached. It's not correct now as a state currently is made up four states and the sum of the transition probabilities is not enforced to add up to 1.

And it's limited to only eight states, which sounds pretty boring still to me

Jan.


mkv_try.pch2
 Description:
an idea for Markov chains

Download
 Filename:  mkv_try.pch2
 Filesize:  6.39 KB
 Downloaded:  2552 Time(s)

Back to top
View user's profile Send private message Visit poster's website
Rix



Joined: Aug 08, 2004
Posts: 83
Location: Breda, the Netherlands
Audio files: 2
G2 patch files: 25

PostPosted: Tue Aug 10, 2004 12:34 pm    Post subject: Reply with quote  Mark this post and the followings unread

Hey ... nice!

kind of minimal music indeed.

Richard
Back to top
View user's profile Send private message Visit poster's website
mosc
Site Admin


Joined: Jan 31, 2003
Posts: 18197
Location: Durham, NC
Audio files: 212
G2 patch files: 60

PostPosted: Tue Aug 10, 2004 3:57 pm    Post subject: Reply with quote  Mark this post and the followings unread

It certainly sounds Markovian, but yikes, it's not really intuitive looking at your patch. Laughing
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address
blue hell
Site Admin


Joined: Apr 03, 2004
Posts: 24079
Location: The Netherlands, Enschede
Audio files: 278
G2 patch files: 320

PostPosted: Tue Aug 10, 2004 5:04 pm    Post subject: Reply with quote  Mark this post and the followings unread

mosc wrote:
It certainly sounds Markovian, but yikes, it's not really intuitive looking at your patch.


... and it should be more complex even ... to account for note length, tempo & all those other interesting details.

Instead of more of the same complexity I added some different semi-random treatments, it might end up as a noodle some day.

Jan.

(Who couldn't find the magic Bach setting for the knobs)
Back to top
View user's profile Send private message Visit poster's website
blue hell
Site Admin


Joined: Apr 03, 2004
Posts: 24079
Location: The Netherlands, Enschede
Audio files: 278
G2 patch files: 320

PostPosted: Sun Aug 06, 2006 3:56 pm    Post subject: Reply with quote  Mark this post and the followings unread

To answer a question raised in http://electro-music.com/forum/topic-12698.html

I think I'd do it a bit different nowadays, the synching seemed wrong.


mkv_try_2.pch2
 Description:
Another go at Markov chains, well not that different really, just fixed some synching.

Download
 Filename:  mkv_try_2.pch2
 Filesize:  6.95 KB
 Downloaded:  2236 Time(s)


_________________
Jan
also .. could someone please turn down the thermostat a bit.
Posted Image, might have been reduced in size. Click Image to view fullscreen.
Back to top
View user's profile Send private message Visit poster's website
blue hell
Site Admin


Joined: Apr 03, 2004
Posts: 24079
Location: The Netherlands, Enschede
Audio files: 278
G2 patch files: 320

PostPosted: Mon Aug 07, 2006 2:41 pm    Post subject: Reply with quote  Mark this post and the followings unread

And another go, the cheapest one I could come up with, and it may be the most correct as well.

It is assumed that the speed osc and the select osc run asynchronously, so that the zero crossing of the speed osc can be used to take a sample at a time that can be considered to be randomly distributed.

Meanwhile the select osc is speed modulated by the sequencers such that a low current setting of a sequencer step will make the select osc run slower, which corsesponds to a higher chance that an asynchronous zero crossing on the speed osc will select that step as the new state.

So remember: a low setting for a sequencer setting corresponds to a high chance.

A chance can not however be set to "1", for that to happen the select-osc should be linearly speed modulated, using the shape LFO (speed modulating it on it's dir input) should make that possible, but more expensive and possibly too slow. Maybe a PM audio osc ?


mkv_try_3.pch2
 Description:
Yet another go at the Markov thing

Download
 Filename:  mkv_try_3.pch2
 Filesize:  4.52 KB
 Downloaded:  2221 Time(s)


_________________
Jan
also .. could someone please turn down the thermostat a bit.
Posted Image, might have been reduced in size. Click Image to view fullscreen.
Back to top
View user's profile Send private message Visit poster's website
astroid power-up!



Joined: Mar 23, 2004
Posts: 334

G2 patch files: 15

PostPosted: Mon Aug 07, 2006 3:00 pm    Post subject: Reply with quote  Mark this post and the followings unread

whoa. that is really cheap. looks good.
_________________
Astroid Power-Up!: "googleplex" available at:
http://cdbaby.com/cd/googleplex
Back to top
View user's profile Send private message Visit poster's website
ian-s



Joined: Apr 01, 2004
Posts: 2669
Location: Auckland, New Zealand
Audio files: 42
G2 patch files: 626

PostPosted: Tue Aug 08, 2006 11:04 pm    Post subject: Reply with quote  Mark this post and the followings unread

Here is an expensive way to implement a Markov chain, so zero page hungry that I can only get a 6 state example into one slot Sad

The variations are setup as follows…

    1.Each state has equal probability, just random.
    2.Each state gives 100% probability to next state, simple forward sequence.
    3.Varying probabilities including repeating same state for timing variation.
    4.Same state is zero probability, no note repeat. Spare percentage is given to next state in sequence so it is twice as likely as others



sixstate.pch2
 Description:
6X6 state matrix

Download
 Filename:  sixstate.pch2
 Filesize:  5.71 KB
 Downloaded:  1686 Time(s)

Back to top
View user's profile Send private message
Kassen
Janitor
Janitor


Joined: Jul 06, 2004
Posts: 7678
Location: The Hague, NL
G2 patch files: 3

PostPosted: Wed Aug 09, 2006 6:32 am    Post subject: Reply with quote  Mark this post and the followings unread

I know one shop that used to sell Kyma's, not sure they still do.

For just doing a markov chain and sending notes over MIDI I think it's a bit overkill I'd go with PureData, SupperCollider or ChucK; all of those are very good at that sort of thing and are free. Doesn't need to be hard on the cpu either.

Just write the chance stuff as a function, then loop over alplying that function to the curent note and sending the note over MIDI.

_________________
Kassen
Back to top
View user's profile Send private message Send e-mail Visit poster's website
lamarcph



Joined: Oct 21, 2004
Posts: 40
Location: Montreal, Canada
G2 patch files: 4

PostPosted: Wed Aug 09, 2006 6:25 pm    Post subject: Reply with quote  Mark this post and the followings unread

I am supposed to be studying dynamic/linear programming (as in tabular method, not writing code), I passed last weekend deep into numeric methods for a exam on monday. For five minutes, I am taking a break from all this non-sense, escaping the reality of the summers final exams and what are we talking about?

Markov chains...
Rolling Eyes

Ok, maybe I started an engineering degree to understand all this. But, now that I do start to understand, my G2 is collecting dust.
Patching season resumes friday 11th, 1:30pm.
Back to top
View user's profile Send private message
astroid power-up!



Joined: Mar 23, 2004
Posts: 334

G2 patch files: 15

PostPosted: Wed Aug 09, 2006 10:31 pm    Post subject: Reply with quote  Mark this post and the followings unread

hahaha!

sorry about that

_________________
Astroid Power-Up!: "googleplex" available at:
http://cdbaby.com/cd/googleplex
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic Moderators: Nord Modular Editors
Page 1 of 1 [21 Posts]
View unread posts
View new posts in the last week
Mark the topic unread :: View previous topic :: View next topic
 Forum index » Clavia Nord Modular » Nord Modular G2 Discussion
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Forum with support of Syndicator RSS
Powered by phpBB © 2001, 2005 phpBB Group
Copyright © 2003 through 2009 by electro-music.com - Conditions Of Use