r4142 - trunk/bse



Author: timj
Date: 2006-12-11 20:05:22 -0500 (Mon, 11 Dec 2006)
New Revision: 4142

Modified:
   trunk/bse/bseprocedure.proc
Log:
Mon Dec 11 00:51:36 2006  Tim Janik  <timj gtk org>

	* bsesong.[hc]: added musical_tuning property. 

	* bseutils.h, bseutils.c:
	* bsenote.h, bsenote.c, bsenote.cc: converted bsenote to C++. added musical
	tuning argument to all note/freq API functions and adapted internal logic
	to cope with different tunings. removed unused BSE_FREQ*() macros.

	* bsecore.idl: introduce Bse::MusicalTuningType. added musical_tuning 
	field to NoteDescription.

	* bseserver.proc:
	* bseprocedure.proc: added musical tuning arguments to various note 
	related procedures, moved note procedures from bseserver.proc to
	bseprocedure.proc and got rid of their BseServer argument.

	* bsemathsignal.h, bsemathsignal.c: made semitone and transpose tables
	musical tuning sensitive.

	* bsepart.[hc]: allow per-part semitone tables, and changed macros so that
	part notes are converted to frequencies according to the musical tuning
	specific to a part.

	* bseitem.[hc]: provide bse_item_current_musical_tuning() and document
	its caveats.

	* bsesource.[hc]: added bse_source_prepared_musical_tuning() which 
	provides musical tuning setting for a source if and only if the
	source is prepared. the tuning stays constant while the source is prepared.

	* bsesequencer.cc: perform part specific note->freq conversion.

	* bsemidifile.[hc]: added musical_tuning to use the new note API,
	defaulting to equal temperament.

	* bsemididecoder.c: hard code musical tuning to equal temperament,
	since we have to provide notes to frequencies for MIDI events up front.

	* bseconstant.c:
	* bsestandardosc.c:
	* bseladspamodule.c:
	* bsebiquadfilter.c: adapt to new tuning relative note API, add a
	warning to tooltips that informs about the musical tuning specific 
	interpretation of note properties.

	* gsloscillator*.[hc]: changed configuration to contain a transpose_factor
	and not a transpose index which needs to be looked up in conjunction with
	a specific musical tuning.

	* bseglobals.h: removed unused macros.

	* bseinfo.c: adapt to new note API by defaulting to to equal temperament.

	* tests/misctests.cc: test various musical tuning system properties and
	note<->freq conversions.




Modified: trunk/bse/bseprocedure.proc
===================================================================
--- trunk/bse/bseprocedure.proc	2006-12-12 00:26:58 UTC (rev 4141)
+++ trunk/bse/bseprocedure.proc	2006-12-12 01:05:22 UTC (rev 4142)
@@ -31,7 +31,7 @@
 PROCEDURE (bse-note-to-freq, "Note to Freq") {
   HELP  = "Retrieve the frequency of a certain note.";
   IN    = bse_param_spec_enum ("musical_tuning", "Musical Tuning", NULL,
-			       BSE_MUSICAL_TUNING_EQUAL_TEMPERAMENT, BSE_TYPE_MUSICAL_TUNING_TYPE, SFI_PARAM_STANDARD);
+			       BSE_MUSICAL_TUNING_12_TET, BSE_TYPE_MUSICAL_TUNING_TYPE, SFI_PARAM_STANDARD);
   IN    = bse_pspec_note_simple ("note", "Note", NULL, SFI_PARAM_STANDARD);
   IN    = bse_param_spec_fine_tune ("fine_tune", "Fine Tune", NULL);
   OUT   = sfi_pspec_real ("frequency", "Frequency", NULL,
@@ -65,7 +65,7 @@
 PROCEDURE (bse-note-from-freq, "Note from Freq") {
   HELP  = "Retrieve the note of a certain frequency.";
   IN    = bse_param_spec_enum ("musical_tuning", "Musical Tuning", NULL,
-			       BSE_MUSICAL_TUNING_EQUAL_TEMPERAMENT, BSE_TYPE_MUSICAL_TUNING_TYPE, SFI_PARAM_STANDARD);
+			       BSE_MUSICAL_TUNING_12_TET, BSE_TYPE_MUSICAL_TUNING_TYPE, SFI_PARAM_STANDARD);
   IN    = sfi_pspec_real ("frequency", "Frequency", NULL,
 			  BSE_KAMMER_FREQUENCY, 0, BSE_MAX_FREQUENCY, 0.1,
 			  SFI_PARAM_STANDARD);
@@ -87,7 +87,7 @@
 PROCEDURE (bse-note-describe, "Describe Note") {
   HELP	= "Describe a note, providing information about its octave, semitone, frequency, etc.";
   IN    = bse_param_spec_enum ("musical_tuning", "Musical Tuning", NULL,
-			       BSE_MUSICAL_TUNING_EQUAL_TEMPERAMENT, BSE_TYPE_MUSICAL_TUNING_TYPE, SFI_PARAM_STANDARD);
+			       BSE_MUSICAL_TUNING_12_TET, BSE_TYPE_MUSICAL_TUNING_TYPE, SFI_PARAM_STANDARD);
   IN    = bse_pspec_note_simple ("note", "Note", NULL, SFI_PARAM_STANDARD);
   IN    = bse_param_spec_fine_tune ("fine_tune", "Fine Tune", NULL);
   OUT   = bse_param_spec_boxed ("note-description", "Note Description", NULL,
@@ -111,7 +111,7 @@
 PROCEDURE (bse-note-describe-from-freq, "Describe Note From Freq") {
   HELP	= "Describe a note, given its frequency.";
   IN    = bse_param_spec_enum ("musical_tuning", "Musical Tuning", NULL,
-			       BSE_MUSICAL_TUNING_EQUAL_TEMPERAMENT, BSE_TYPE_MUSICAL_TUNING_TYPE, SFI_PARAM_STANDARD);
+			       BSE_MUSICAL_TUNING_12_TET, BSE_TYPE_MUSICAL_TUNING_TYPE, SFI_PARAM_STANDARD);
   IN    = sfi_pspec_real ("freq", "Frequency", NULL,
 			  BSE_KAMMER_FREQUENCY,
 			  0, BSE_MAX_FREQUENCY,
@@ -138,7 +138,7 @@
 PROCEDURE (bse-note-from-string, "Note From String") {
   HELP	= "Describe a note, given its name and octave offset.";
   IN    = bse_param_spec_enum ("musical_tuning", "Musical Tuning", NULL,
-			       BSE_MUSICAL_TUNING_EQUAL_TEMPERAMENT, BSE_TYPE_MUSICAL_TUNING_TYPE, SFI_PARAM_STANDARD);
+			       BSE_MUSICAL_TUNING_12_TET, BSE_TYPE_MUSICAL_TUNING_TYPE, SFI_PARAM_STANDARD);
   IN    = sfi_pspec_string ("name", "Name", NULL,
 			    "", SFI_PARAM_STANDARD);
   OUT   = bse_param_spec_boxed ("note-description", "Note Description", NULL,
@@ -163,7 +163,7 @@
 PROCEDURE (bse-note-construct, "Note Construction") {
   HELP	= "Describe a note, given its semitone, octave and fine tune.";
   IN    = bse_param_spec_enum ("musical_tuning", "Musical Tuning", NULL,
-			       BSE_MUSICAL_TUNING_EQUAL_TEMPERAMENT, BSE_TYPE_MUSICAL_TUNING_TYPE, SFI_PARAM_STANDARD);
+			       BSE_MUSICAL_TUNING_12_TET, BSE_TYPE_MUSICAL_TUNING_TYPE, SFI_PARAM_STANDARD);
   IN    = sfi_pspec_int ("semitone", NULL, NULL,
 			 9, 0, 11, 1,
 			 SFI_PARAM_STANDARD);




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]