[PD] Creating music notation with GEM

patrice colet pat at mamalala.org
Fri Jul 18 00:55:30 CEST 2008


David Powers a écrit :
>> 1. (0 3 5 1 2 4) might make sense for an engineer because zero for him would
>> be the first note,
>> but a musician uses to start with one, not zero. If this notation is for
>> expressing some voicings,
>> that is a lot easier and free to read under jazz notation for a human,
>> unless the numbers represents guitar tablatures.
>>
>> It almost sounds like the machine will help classical musicians or
>> mathemusicians to do like if they were improvising, interesting...
>>     
>
> Ah, yes, well I only meant that is the internal representation. The
> interface would take that input and generate an appropriate output for
> a given instrument in the correct transposition, so a flute player
> would see the cell as noteheads on a treble clef.
>
> I'm wondering if I should use something like PyExt to do some of the
> mapping, as I don't know of any simple way to do hash dictionaries in
> PD itself. As a test last night, I built a simple abstraction to take
> notes C C# D etc. and output pitch numbers 0-11, and i found it quite
> tedius to do compared to a function in code such as (this is in PHP
> because that is what I do all day long at my day job):
> function note2number($note) {
>  $num = array ('C'=>0,'C#'=>1,'Db'=>1);
>  return $num[$note];
> }
>
>   
with python it would be very simple as well, AFAIU you would just need 
to declare a dictionnary
and read it through a defined function or a class exactly like you did 
in php ( http://docs.python.org/tut/node7.html )
, explicitely  it's called "Data Structure" in python documentation...

It' possible to use data structure in pure data as well, with using 
array elements for note names, and a pointer index value for the number.
 This kind of stuff is a lot easier to do with data structures, I've 
been able to do things very simply with,
 while it seemed impossible with list objects,
 for example a custom [poly] that is able to manage more than two 
arguments (I could extract and post it if it's necessary)
 and well it's a big advantage in regard of other dataflow applications...


>> 4. I imagine that puredata will have to transpose for each instrument, but
>> if only the key (or key modulation) is given it would be easy to do.
>> ----
>> A dictionnary of symbols is so easier to read than numbers for expressing
>> musical events, that's why I've asked if you used font files,
>> but maybe using gem geos or texture files would make it more elegant or
>> versatile?
>>     
>
> I'm not sure about fonts, I guess I don't know whether that would work
> on multiple operating systems... I just thought that GEM would allow
> it to work on any OS. I agree it might be nice to use already built
> musical symbols rather than reinventing the wheel. Then I would only
> need GEM to draw the staff lines and position the noteheads and
> symbols in relation to it.
>
> ~David
>
>   

Well I think that all the project wouldn't even need externals
but Gem will certainly give it a nice look and might have better 
performances.
Also, ttf files would work on any OS if I'm not mistaken,
 but maybe it would be less complicated with using image files,
I've only tried to draw musical score on Gem with [text] objects.
> _______________________________________________
> Pd-list at iem.at mailing list
> UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
>   





More information about the Pd-list mailing list