soundio / sequence-json

A way of creating music sequence data in JSON
135 stars 5 forks source link

Transforms #3

Open stephband opened 8 years ago

stephband commented 8 years ago

@danigb

So, can I start a discussion about possible transforms? Do you have an idea of the transforms you would like to see? Some obvious transforms that spring to mind ...

'transpose', n

Where n is a positive or negative float that describes the number of semitones to transpose by.

'diatonic-transpose', mode, n

Where mode describes a scale and key, and n the number of steps to transpose by. It is not clear to me what to do with notes that lie between notes in the defined mode in a way that makes musical sense.

'invert', note

Where note defines a pitch that a note or sequence of notes is inverted around.

'diatonic-invert', mode, note

Where mode describes the scale and key and note defines a pitch that a note or sequence of notes is inverted around diatonically. Again, it is not clear to me what to do with notes that lie between notes in the defined mode.

'translate', time

Where time is a positive or negative float that describing a shift in time.

'quantize', ref, strength

Where ref references another sequence of events, and strength defines how much time shift to apply to align the current event or events with the events in the referenced sequence.

'velocity-curve', ...

...

danigb commented 8 years ago

Hi! I'm outside, so I send a quick reply: last week i've been implementing similar ideas in scorejs (branch "v4"). It's not documented but test and examples are self-explanatory. I'm not sure if a list of transformations is useful without a way to combine them into new ones or a different extension mechanism. Anyway i would think in your proposal and try to get a "core" transformation list.

Regards, Dani

El 02/04/2016, a las 13:16, stephband notifications@github.com escribió:

@danigb

So, can I start a discussion about possible transforms? Do you have an idea of the transforms you would like to see? Some obvious transforms that spring to mind ...

'transpose', n Where n is a positive or negative float that describes the number of semitones to transpose by.

'diatonic-transpose', mode, n Where mode describes a scale and key, and n the number of steps to transpose by. It is not clear to me what to do with notes that lie between notes in the defined mode in a way that makes musical sense.

'invert', note Where note defines a pitch that a note or sequence of notes is inverted around.

'diatonic-invert', mode, note Where mode describes the scale and key and note defines a pitch that a note or sequence of notes is inverted around diatonically. Again, it is not clear to me what to do with notes that lie between notes in the defined mode.

'translate', time Where time is a positive or negative float that describing a shift in time.

'quantize', ref, strength Where ref references another sequence of events, and strength defines how much time shift to apply to align the current event or events with the events in the referenced sequence.

'velocity-curve', ... ...

— You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub

danigb commented 8 years ago

Hi @stephband,

thanks for including me in this issue. After my experiments with scorejs, I'm not sure if it's useful to create a specification with some transform functions if they can't be combined in new ways to create more complex ones. For example, the diatonic-transpose may cover most of the cases, but what you do with the rest? For me, the most exciting part of transformations is the one that let you create fragments of music programatically, but this can't be achieved without some kind of transformation extension mechanism.

I can imagine two solutions:

1) Embrace the performance-oriented view in music-json, remove all semantic structures (like chords) and encourage an event system with less abstraction (for example, allow pitch in hz). This is like we discuss in issue #1 where music-json would be the output of other libraries (with more transformation/generation options).

2) Create a specification of how to apply transformations to groups of events, but leave the transformations to be implemented as vendor specific

Anyway, to your list of transformations I would add:

Do you have an idea of how to express those transformations (the syntax, I mean) inside the music-json data?