gibber-cc / gibber

An audiovisual live coding environment for the browser

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Sequential and simultaneous notes

zwhitchcox opened this issue · comments

Is there any way I can basically type in sheet music? Like I just want to specify which notes to play and for how long.

I'm essentially trying to transcribe fireflies by owl city using gibber. This is mostly a learning experience for me, and I'm wondering the best way to do that.

This is what I've got so far:

b.play(['a#2','d5','c#6','d#5','b5','f5','d#3'],
       [ 1/8 ,1/16, 1/8,  1/16, 1/8, 1/16,1/2])

But as you can see by the sheet music, there are sometimes notes playing at the same time, and this does not allow me to do this. Also, at some point, when I have more notes, I think it might be difficult not having the notes right above the length of the note. So, is there any way where I can specify the length of the note (1/2,1/8,1/4) right after I specify the note?

First, my apologies for taking a while on this... I've been traveling.

You can play multiple streams of notes as follows:

b.note.seq( [0,1,2,3], [1/4,1/8,1/2], 0 ) // last value denotes '0' sequence
b.note.seq( [2,3,4,5], [1/4, 1/4, 1/4], 1 ) // this is the '1' sequence
b.note.seq( [7,9], [3/8,1/4], 2 ) // this is the '2' sequence

I'd like to have a way to do what you propose (having notes followed by durations in sequences) but I'm not sure what the syntax should be. Any ideas?

Last but not least, it might be better to continue this conversation on the mailing list... maybe other gibberers will have ideas about how the syntax should look. http://lurk.org/groups/gibber/

  • Charlie