electro-music.com   Dedicated to experimental electro-acoustic
and electronic music
 
    Front Page  |  Articles  |  Radio
 |  Media  |  Forum  |  Wiki  |  Links  |  Store
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 
Live streaming at radio.electro-music.com

  host / artist show at your time
  EdisonRex Edison's Electronic Review
Please visit the chat
 Forum index » Discussion » Composition
Computer Language Song Description
Post new topic   Reply to topic Moderators: elektro80
Page 1 of 2 [33 Posts]
View unread posts
View new posts in the last week
Mark the topic unread :: View previous topic :: View next topic
Goto page: 1, 2 Next
Author Message
Inventor
Stream Operator


Joined: Oct 13, 2007
Posts: 5978
Location: San Antonio, Tx, USA
Audio files: 258

PostPosted: Sat Jan 22, 2011 11:29 pm    Post subject: Computer Language Song Description
Subject description: Must be an old idea
Reply with quote  Mark this post and the followings unread

This morning, well, around 1:20am here, I had a sudden insight. I was listening to a song and the singer kind of messed up and stumbled through the words, then when he finished that section of lyrics, the lead guitarist took off on a jam. It was as if someone had written code in an event based language that said when(singer ends segment 1) {lead guitar jam 1;}, like that. In fact, computer language could be used to describe the entire song.

Then I thought - that has got to be the oldest one in the book! So I guess I'm asking if you're familiar with such things and what you know about them?

Les

_________________
"Let's make noise for peace." - Kijjaz
Back to top
View user's profile Send private message Send e-mail
Antimon



Joined: Jan 18, 2005
Posts: 3744
Location: Sweden
Audio files: 277
G2 patch files: 97

PostPosted: Sun Jan 23, 2011 8:42 am    Post subject: Reply with quote  Mark this post and the followings unread

I think the MIDI file format is event-based, like this (simplified):

Code:
wait 100ms: note down C1
wait 200ms: note down G1
wait 300ms: note up C1
wait 0ms note up G1.


http://www.sonicspot.com/guide/midifiles.html

It's a good thought. I've always found sheet music kind of annoying, partly because you have to constantly turn pages, since it wastes space for parts where nothing much is happening, or long notes are being used. Though the greater part of my annoyance is due to my not being very good at reading sheet music in the first place... Embarassed

I haven't gotten to grips what bachus is doing with his Zylaphone project, maybe he's got some clever solution there.

_________________
Antimon's Window
@soundcloud @Flattr home - you can't explain music
Back to top
View user's profile Send private message Visit poster's website
nobody



Joined: Mar 09, 2008
Posts: 1687
Location: Not here

PostPosted: Sun Jan 23, 2011 9:45 am    Post subject: Reply with quote  Mark this post and the followings unread

I thought everyone knew music and mathematics are inextricably intertwined.
Back to top
View user's profile Send private message
Inventor
Stream Operator


Joined: Oct 13, 2007
Posts: 5978
Location: San Antonio, Tx, USA
Audio files: 258

PostPosted: Sun Jan 23, 2011 11:32 am    Post subject: Reply with quote  Mark this post and the followings unread

oh come on now Damien, you know that's an oversimplification... I was specifically talking about making songs by describing them with event based computer language. To make some broad all-encompassing statement like that is to diminish music and mathematics into the realm of semantics.

I could say "the earth contains you" and then be satisfied with my limited knowledge of what you are without bothering to even look at you once. Anyway i grow tired, it's sunday so chill out man!!!

_________________
"Let's make noise for peace." - Kijjaz
Back to top
View user's profile Send private message Send e-mail
Blue Hell
Site Admin


Joined: Apr 03, 2004
Posts: 20735
Location: The Netherlands, Enschede
Audio files: 158
G2 patch files: 318

PostPosted: Sun Jan 23, 2011 11:53 am    Post subject: Reply with quote  Mark this post and the followings unread

I once made this little time driven language ... as in :

<time-expression> function( params)

where time-expression would be an expression to evaluate to the time the function should be executed. The function then could specify other events to happen at times relative to the one passed ... some example code :

Code:

Include midi; // Include standard MIDI stuff
Include nm;   // Include standard Nord Modular stuff

Silence( aDevice);
(
  // Silence in the studio

  Loop( i, 1, 4);
  (
    0 SetVolume( aDevice, i, 0);
  );
);


FadeIn( aDevice, aCh);
(
  // Fade the Volume for aCh from 0 .. 127 - in 20 seconds

  Loop( i, 0, 127, 8);
  (
    20.0 * i / 127 SetVolume( aDevice, aCh, i + 7);
  );
);


FadeOut( aDevice, aCh);
(
  // Fade the Volume for aCh from 127 .. 0 - in 20 seconds

  Loop( i, 0, 127, 8);
  (
    20.0 * i / 127 SetVolume( aDevice, aCh, 120 - i);
  );
);



FadeInSynth( aDevice);
(
  // Assuming Synth uses midi channels 1 .. 4

  Loop( i, 1, 4);
  (
    0 FadeIn( aDevice, i);
  );
);

FadeOutSynth( aDevice);
(
  // Assuming Synth uses midi channels 1 .. 4

  Loop( i, 1, 4);
  (
    0 FadeOut( aDevice, i);
  );
);


// Ok a piece for 1 synth

StartPlay( aDevice, voice1, voice2, voice3, voice4);
(
  0.0 Silence    ( aDevice);                 // Silence all outputs
  0.0 SelectVoice( aDevice, 1, voice1);      // Switch in 4 new voices
  0.0 SelectVoice( aDevice, 2, voice2);
  0.0 SelectVoice( aDevice, 3, voice3);
  0.0 SelectVoice( aDevice, 4, voice4);
  7.0 FadeInSynth( aDevice);                 // Give voice switching 7 sec's
);

Play( aDevice, voice1, voice2, voice3, voice4);
(
   0.0 FadeOutSynth( aDevice);               // takes 20 sec's
  21.0 SelectVoice ( aDevice, 1, voice1);    // so start selecting voices at 21 s.
  21.0 SelectVoice ( aDevice, 2, voice2);
  21.0 SelectVoice ( aDevice, 3, voice3);
  21.0 SelectVoice ( aDevice, 4, voice4);    // which we assume to take 7 s, so
  28.0 FadeInSynth ( aDevice);               // after that we fade in
);

PlayPiece( aDevice);
(
        0.0  StartPlay   ( aDevice, 101, 102, 103, 104); // at  0:00 - start with patches 101 .. 104
   6 * 60.0  Play        ( aDevice, 102, 104, 107, 108); // at  6:00 - switch to new set
  12 * 60.0  Play        ( aDevice, 101, 102, 103, 110); // at 12:00 - after 6 minutes switch to new set
  18 * 60.0  Play        ( aDevice, 109, 110, 107, 108); // at 18:00 - switch to new set
  24 * 60.0  FadeOutSynth( aDevice);                     // at 24:00 - fade to silence
                                                         // at 24:20 - all done
);


0 PlayPiece( 1); // Do it all, at time 0, on device 1


I used this to control not only synths (with MIDI), but for a slide show as well.

_________________
Jan
Back to top
View user's profile Send private message Visit poster's website
bachus



Joined: Feb 29, 2004
Posts: 2921
Location: Up in that tree over there.
Audio files: 5

PostPosted: Sun Jan 23, 2011 1:37 pm    Post subject: Reply with quote  Mark this post and the followings unread

Antimon wrote:
I haven't gotten to grips what bachus is doing with his Zylaphone project, maybe he's got some clever solution there.


No, not me. Zylaphon isn't geared toward processes that evolve in real time. I guess I must not understand what Chuck does. I would have though that would be right up its ally.

_________________
The question is not whether they can talk or reason, but whether they can suffer. -- Jeremy Bentham
Back to top
View user's profile Send private message Visit poster's website
bachus



Joined: Feb 29, 2004
Posts: 2921
Location: Up in that tree over there.
Audio files: 5

PostPosted: Sun Jan 23, 2011 1:42 pm    Post subject: Reply with quote  Mark this post and the followings unread

If I were going to go that way I'd think about writing a language that would compile down into Chuck -- but again Chuck and I haven't really met. just a thought
_________________
The question is not whether they can talk or reason, but whether they can suffer. -- Jeremy Bentham
Back to top
View user's profile Send private message Visit poster's website
nobody



Joined: Mar 09, 2008
Posts: 1687
Location: Not here

PostPosted: Mon Jan 24, 2011 8:02 am    Post subject: Reply with quote  Mark this post and the followings unread

Inventor wrote:
oh come on now Damien, you know that's an oversimplification... I was specifically talking about making songs by describing them with event based computer language. To make some broad all-encompassing statement like that is to diminish music and mathematics into the realm of semantics.

I could say "the earth contains you" and then be satisfied with my limited knowledge of what you are without bothering to even look at you once. Anyway i grow tired, it's sunday so chill out man!!!


Cool No worries, my friend. I dig!
Back to top
View user's profile Send private message
Inventor
Stream Operator


Joined: Oct 13, 2007
Posts: 5978
Location: San Antonio, Tx, USA
Audio files: 258

PostPosted: Mon Jan 24, 2011 9:18 am    Post subject: Reply with quote  Mark this post and the followings unread

audiodef wrote:
Inventor wrote:
oh come on now Damien, you know that's an oversimplification... I was specifically talking about making songs by describing them with event based computer language. To make some broad all-encompassing statement like that is to diminish music and mathematics into the realm of semantics.

I could say "the earth contains you" and then be satisfied with my limited knowledge of what you are without bothering to even look at you once. Anyway i grow tired, it's sunday so chill out man!!!


Cool No worries, my friend. I dig!


My apologies Damien, I was in a very bad mood swing at the moment i wrote that I was trying to say F.U. politely, did that work? We good bro.

Les

_________________
"Let's make noise for peace." - Kijjaz
Back to top
View user's profile Send private message Send e-mail
nobody



Joined: Mar 09, 2008
Posts: 1687
Location: Not here

PostPosted: Mon Jan 24, 2011 2:08 pm    Post subject: Reply with quote  Mark this post and the followings unread

Inventor wrote:

My apologies Damien, I was in a very bad mood swing at the moment i wrote that I was trying to say F.U. politely, did that work? We good bro.

Les


We're good, dude. I took it in good humour. I knew you didn't mean anything (and neither did I). No apology necessary. Cool
Back to top
View user's profile Send private message
Cynosure
Site Admin


Joined: Dec 11, 2010
Posts: 738
Location: Toronto, Ontario - Canada
Audio files: 42

PostPosted: Mon Jan 24, 2011 5:29 pm    Post subject: Reply with quote  Mark this post and the followings unread

This is a really cool idea, though I think that you would have to put some randomization into it, or else it would either play the same thing every time or just exactly what you tell it to do. Maybe for every event there are several things that could be triggered (or none) and it makes a random selection.
Back to top
View user's profile Send private message
Inventor
Stream Operator


Joined: Oct 13, 2007
Posts: 5978
Location: San Antonio, Tx, USA
Audio files: 258

PostPosted: Mon Jan 24, 2011 5:47 pm    Post subject: Reply with quote  Mark this post and the followings unread

Cynosure wrote:
This is a really cool idea, though I think that you would have to put some randomization into it, or else it would either play the same thing every time or just exactly what you tell it to do. Maybe for every event there are several things that could be triggered (or none) and it makes a random selection.


Yes, good point. The dafaflow graph of such a program would have multiple destinations per source with random or other factors determining outcome. This is done with the rand() function and the if() statement or in other ways.

Actually any language with a full set of features could do it, and ChucK is a music programming language and I know ChucK, so if i do get to working on this, i'll prolly ChucK it.

I think we have to have objects called "musicians" and "instruments" too, and model the thinking of a musician. Like Angus Young is thinking: "Just as soon as he gets done singing this section, I jam this jam or something like it" and that's modeled by the program.

Les

_________________
"Let's make noise for peace." - Kijjaz
Back to top
View user's profile Send private message Send e-mail
Blue Hell
Site Admin


Joined: Apr 03, 2004
Posts: 20735
Location: The Netherlands, Enschede
Audio files: 158
G2 patch files: 318

PostPosted: Mon Jan 24, 2011 6:01 pm    Post subject: Reply with quote  Mark this post and the followings unread

Inventor wrote:
I think we have to have objects called "musicians" and "instruments" too, and model the thinking of a musician.


That experiment is called CSound I think Wink

_________________
Jan
Back to top
View user's profile Send private message Visit poster's website
bachus



Joined: Feb 29, 2004
Posts: 2921
Location: Up in that tree over there.
Audio files: 5

PostPosted: Mon Jan 24, 2011 6:23 pm    Post subject: Reply with quote  Mark this post and the followings unread

Blue Hell wrote:
Inventor wrote:
I think we have to have objects called "musicians" and "instruments" too, and model the thinking of a musician.


That experiment is called CSound I think Wink


model the thinking of a musician

CSound must have progressed a long way since I last looked at it Shocked

_________________
The question is not whether they can talk or reason, but whether they can suffer. -- Jeremy Bentham
Back to top
View user's profile Send private message Visit poster's website
Inventor
Stream Operator


Joined: Oct 13, 2007
Posts: 5978
Location: San Antonio, Tx, USA
Audio files: 258

PostPosted: Mon Jan 24, 2011 6:30 pm    Post subject: Reply with quote  Mark this post and the followings unread

OK, here is my musican thought model:

If (wantChicks) {
while (!gotChicks) {
play(guitar);
}
}

or something like that. but what i meant by that poorly prhased reference was, well you know what i meant. grrr!

Les

_________________
"Let's make noise for peace." - Kijjaz
Back to top
View user's profile Send private message Send e-mail
bachus



Joined: Feb 29, 2004
Posts: 2921
Location: Up in that tree over there.
Audio files: 5

PostPosted: Mon Jan 24, 2011 8:24 pm    Post subject: Reply with quote  Mark this post and the followings unread

Sorry, my post was not a response to you, Les, rather it was to Mr Hell.

Blue Hell wrote:
That experiment is called CSound I think Wink


I just checked out CSound and can't tell that it has moved in any new directions in years. Did look at Rosegarden again too and it has been spiffed up quite a bit in the past few years. But still, no banana.

_________________
The question is not whether they can talk or reason, but whether they can suffer. -- Jeremy Bentham
Back to top
View user's profile Send private message Visit poster's website
dewdrop_world



Joined: Aug 28, 2006
Posts: 858
Location: Guangzhou, China
Audio files: 4

PostPosted: Tue Jan 25, 2011 8:07 am    Post subject: Reply with quote  Mark this post and the followings unread

I did something like this in SuperCollider.

After a couple of false starts, I made a framework for live performance pieces. The main problem that the framework addresses is that the objects to produce complex musical behavior are themselves complex, and I wanted a way to invoke them using simple commands. That's been working well enough for me that I haven't had to redesign in the last 5+ years.

Then I needed to work on a couple of pieces that would be performable without my presence. That is, the things I would do in performance (loading processes and other resources, starting and stopping musical activities, adjusting controllers) needed to be automated.

It's based loosely on the Design Pattern called "Command." A command is an object that represents an activity to be carried out, and it holds information about the current state of that activity. It's commonly used when a task has to go through multiple stages -- you can just pass the command into the first stage, that stage updates the command's state and then passes it into the next stage etc.

I didn't need multiple states, but I did need to know at every moment everything that's happening. So a command answers isPlaying with true or false. You create the command, 'play' it, and when it finishes, it broadcasts a notification to say "I'm done." Commands can end by themselves if their child activity runs out of things to do, or they can run for a fixed duration, or they can set up a user trigger to stop (could be GUI, could be MIDI, could be OSC or anything else). So you're not limited to preset, deterministic sequences. (A command's activities need not be deterministic, either, though they could be.)

Command classes inherit from an abstract superclass, so this is all extensible. If you need a command that isn't supported, write a new one based on a pretty simple API ('fire' method to start, 'done' to stop and cleanup).

Above that, I have a command iterator, which takes a list of commands and some other tokens. It keeps track of which commands are still active, and removes them from the active list when it gets the "done" notification. That means, if you tell the iterator to stop, it can tell all its children to stop. It also handles timing.

Code:
[
   bpCmd: (name: \kick),
   16,  // 4 bars later
   bpCmd: (name: \snare)
   ...
]


Since \kick doesn't say to stop after 4 bars, both commands will run together and the iterator keeps both of them in the activeCmds set.

You can also have the iterator synchronize: wait for all active commands to finish before going on to the next thing, or wait for only the immediately preceding one. Iterators can also be nested, like sporking shreds in ChucK -- so this kind of synchronization can get really complex -- nest another iterator inside, then \cmdSync so that it will wait for everything inside the subiterator and let everything else run on its own.

Then I put a section object on top of that, which can play one or more iterators. It's also responsible for loading the resources needed for that section, and keeping instructions to release those resources later. The top level is a section sequencer, which runs one section after the other in order, and allows you to start at any section (like rehearsal markers in a score).

I started on that in 2008 for a scored violin/computer piece and pushed it a lot further within the last year. It's now handling an hour-long interactive dance piece! (I don't have to tell you the number of obscenities uttered to bring the framework up to that point... yes, a whole lot of thinking, testing and sweat went into this... but it works!)

James

_________________
ddw online: http://www.dewdrop-world.net
sc3 online: http://supercollider.sourceforge.net
Back to top
View user's profile Send private message Visit poster's website AIM Address
dewdrop_world



Joined: Aug 28, 2006
Posts: 858
Location: Guangzhou, China
Audio files: 4

PostPosted: Tue Jan 25, 2011 8:14 am    Post subject: Reply with quote  Mark this post and the followings unread

For grins, this is what a short section looks like:

Code:
[
   // start "BP(\op)"; reset its ampCtl
   bpCmd: (name: \op, dur: 35, shouldSync: false, prepareBP: { |bp|
      bp.ampCtl.value = 0.68;
      // if(d.class == DDWTimer) { d.reset };
   }),

   // wait 12 beats
   12,

   // fade out BP(\op) -- automate its ampCtl down
   gcAutoSynthCmd: (gc: BP(\op).ampCtl, name: \ctlPoint, outName: \outbus,
      value: 0, time: 22, curve: -2, shouldSync: false),

   // start BP(\st) at volume 0
   // and reset a [bleep]load of its parameters
   bpCmd: (name: \st, shouldSync: false, prepareBP: { |bp|
      bp.ampCtl.value = 0;
      bp.gest = Pseq([Pn(\slowSteps, { rrand(2, 4) }), \slowStepStretch], inf);
      bp.numEv = Pwhite(4, 7, inf);
      bp.gDelta = Pwhite(2.5, 4.0, inf);
      bp.slowRate = Pwhite(0.5, 0.8, inf);
      bp.defaultParms = nil;
      bp.kdecay = Pexprand(0.014, 0.017, inf);
      bp.makeStreamForKey(\kfreq);   // reset this one
      bp.autoRun = true;
      
      bp.gestures.oneKlankStepsCallback = { |parms|
         CleanupStream(~gestures[\oneKlankSteps].(parms).asStream, parms[\callback])
      };
   }),

   // fade it up
   gcAutoSynthCmd: (gc: BP(\st).ampCtl, name: \ctlPoint, outName: \outbus,
      shouldSync: false,
      value: 0.7, time: 14, curve: 2)
]

_________________
ddw online: http://www.dewdrop-world.net
sc3 online: http://supercollider.sourceforge.net
Back to top
View user's profile Send private message Visit poster's website AIM Address
Blue Hell
Site Admin


Joined: Apr 03, 2004
Posts: 20735
Location: The Netherlands, Enschede
Audio files: 158
G2 patch files: 318

PostPosted: Tue Jan 25, 2011 9:39 am    Post subject: Reply with quote  Mark this post and the followings unread

bachus wrote:
model the thinking of a musician


Was afraid already I quoted a bit much Rolling Eyes

_________________
Jan
Back to top
View user's profile Send private message Visit poster's website
bachus



Joined: Feb 29, 2004
Posts: 2921
Location: Up in that tree over there.
Audio files: 5

PostPosted: Tue Jan 25, 2011 10:09 am    Post subject: Reply with quote  Mark this post and the followings unread

Blue Hell wrote:
Was afraid already I quoted a bit much Rolling Eyes


I was glad to be prodded to look at those again Very Happy

_________________
The question is not whether they can talk or reason, but whether they can suffer. -- Jeremy Bentham
Back to top
View user's profile Send private message Visit poster's website
Blue Hell
Site Admin


Joined: Apr 03, 2004
Posts: 20735
Location: The Netherlands, Enschede
Audio files: 158
G2 patch files: 318

PostPosted: Tue Jan 25, 2011 10:13 am    Post subject: Reply with quote  Mark this post and the followings unread

How was it again with shit and roses?

Laughing

_________________
Jan
Back to top
View user's profile Send private message Visit poster's website
nobody



Joined: Mar 09, 2008
Posts: 1687
Location: Not here

PostPosted: Tue Jan 25, 2011 10:14 am    Post subject: Reply with quote  Mark this post and the followings unread

Don't roses like being fertilised with shit? Laughing
Back to top
View user's profile Send private message
dewdrop_world



Joined: Aug 28, 2006
Posts: 858
Location: Guangzhou, China
Audio files: 4

PostPosted: Tue Jan 25, 2011 9:09 pm    Post subject: Reply with quote  Mark this post and the followings unread

Should I apologize for making an on-topic post?

Maybe this is better: Oh goddess, I had an epic dump yesterday. What a difference a good poo makes.

Rolling Eyes

_________________
ddw online: http://www.dewdrop-world.net
sc3 online: http://supercollider.sourceforge.net
Back to top
View user's profile Send private message Visit poster's website AIM Address
bachus



Joined: Feb 29, 2004
Posts: 2921
Location: Up in that tree over there.
Audio files: 5

PostPosted: Wed Jan 26, 2011 6:59 am    Post subject: Reply with quote  Mark this post and the followings unread

Creative inteligence often does not operate in a linear manner.

Or, quoth another,

She who would have roses most often walks on compost.

Or to quote Wilhelm Reich on the anal character structure ... ahh on second thought ... nuff said ...

_________________
The question is not whether they can talk or reason, but whether they can suffer. -- Jeremy Bentham
Back to top
View user's profile Send private message Visit poster's website
bachus



Joined: Feb 29, 2004
Posts: 2921
Location: Up in that tree over there.
Audio files: 5

PostPosted: Wed Jan 26, 2011 7:09 am    Post subject: Reply with quote  Mark this post and the followings unread

dewdrop_world wrote:
Should I apologize for making an on-topic post?

Maybe this is better: Oh goddess, I had an epic dump yesterday. What a difference a good poo makes.

Rolling Eyes


As to the code you posted I found the mapping between the lexical layout (formatting on the page) and the syntax delimiting tokens -- (,),{, and } -- to be impenetrable. Perhaps you could reformat it to make its structure more clear?

_________________
The question is not whether they can talk or reason, but whether they can suffer. -- Jeremy Bentham
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: elektro80
Page 1 of 2 [33 Posts]
View unread posts
View new posts in the last week
Goto page: 1, 2 Next
Mark the topic unread :: View previous topic :: View next topic
 Forum index » Discussion » Composition
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
e-m mkii

Please support our site. If you click through and buy from
our affiliate partners, we earn a small commission.


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