[gst-devel] a GstType for a musical note
Steve Baker
steve at stevebaker.org
Fri Apr 15 21:23:01 CEST 2005
Its not as easy as that. There needs to be some way to map a note number
to an actual frequency, and the frequency can't be hard-coded.
Here is an intro to tunings:
http://home.earthlink.net/~kgann/histune.html
Also there should be a way to transpose each note by an arbitrary
frequency to keep in tune with other instruments (or change the key).
Because of this, managing tuning mappings within elements could get real
complicated real quick. I suggest that elements should just have
frequency params and you manage note/frequency mappings from your app.
The alternative is that you'll have to write a whole new subsystem to
handle frequency mappings that all musical elements can use.
cheers
On Fri, 2005-04-15 at 09:18 +0200, Stefan Kost wrote:
> hi hi,
>
> in gstreamer/gst/gstvalue.{c,h} we define custom g_value_types for e.g.
> GST_TYPE_FOURCC, GST_TYPE_INT_RANGE, GST_TYPE_DOUBLE_RANGE, GST_TYPE_LIST,
> GST_TYPE_FIXED_LIST, GST_TYPE_FRACTION
>
> For audio-synth plugins instead of a frequency one usually supplies a keyboard
> note, either as a number or in a 3 char notation (C-0, D#5).
> I'd prefer to have GValue Type for it, rather that using a normal integer or a
> direct frequency.
>
> Again the question is where to put it. There core does not really need to know
> about it (besides gst-inspect showing the proper param type of an elemnt).
> Having this in plugins would be good, so that multiple plugins can use the same
> type and apps can rely on the type.
>
> Any ideas, comments.
>
> Stefan
More information about the gstreamer-devel
mailing list