|
From: SourceForge.net <no...@so...> - 2009-04-22 16:42:03
|
Feature Requests item #2778142, was opened at 2009-04-21 23:03 Message generated for change (Comment added) made by richardneill You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=360706&aid=2778142&group_id=10706 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Richard Neill (richardneill) Assigned to: Nobody/Anonymous (nobody) Summary: Request for different tunings in synth Initial Comment: Using the synth effect for something like this: play -n -c1 synth sin %-7 sin %0 fade q 0.1 3 0.1 generates a chord of D + A (interval of a fifth). But is it a perfect fifth (just intonation; factor of 1.5 in frequency), or an equal tempered (chromatic) fifth (factor of 2^(7/12) i.e. 1.498 in frequency) or something else? 1. Presuming that sox currently uses equal temperament, please do actually state this in the soxeffect -> synth manpage. 2. It would be rather neat if sox supported various different tunings. See http://en.wikipedia.org/wiki/Just_intonation for some more details. ---------------------------------------------------------------------- >Comment By: Richard Neill (richardneill) Date: 2009-04-22 16:41 Message: Hi Rob - thanks for such a quick response. I've thought about this a bit more, and I think that a reasonably generic implementation will require 3 optional parameters: tuning, key, and a440. Tuning specifies which system the semitones should be calculated in. The default (if not specified) would be "equal", while the options should include (at least) equal, just, pythagorean, and as many others as you want to implement. An overview of the calculations required is here: http://en.wikipedia.org/wiki/Musical_tuning#Systems_for_the_twelve-note_chromatic_scale Key would be the note of the fundamental scale (eg "C" or "A" or F# or Bb). For sanity's sake you should probably model this on a piano where there are exactly 12 keys per octave (and you drop the distinction between F# and Gb). For equal-temperament, KEY doesn't matter, but for other schemes it does. Eg in J.I. we can tune the piano to have C-major sound "perfect" and result is that nearby keys (F major, G major etc) are close to right, and distant keys (C# major) will sound hideous. But one might want to have the perfect scale be another key such as A major. (If omitted, this value should default to C, I think). In all cases, the tuning must keep concert A at 440 Hz. Lastly we may in fact want to globally change the tuning, so I suggest a parameter "a440" which defaults to 440Hz, but may be a different number, such as 436. ---- While you're at it (if this complexity hasn't put you off!), I might suggest this requires some careful documenting of exactly how the implementation works. It might also be nice to add a different way of specifying semitones: as well as "%+3", could you support the standard way lilypond does it eg "c2" or "g4" (see http://lilypond.org/web/switch/howto ). [If necessary to make the syntax more regular, maybe %c2 ] ---------------------------------------------------------------------- Comment By: robs (robs) Date: 2009-04-22 06:44 Message: Hello Richard, I've updated the man page to explain the current situation. Yes, this would be nice to have. Can you suggest a notation that should be used to achieve this? Cheers, Rob ---------------------------------------------------------------------- Comment By: Richard Neill (richardneill) Date: 2009-04-21 23:13 Message: Here is an audible demo: 5ths (first in equal-temperament, then in just-intonation) play -n -c1 synth sin 440 sin 659.255 fade q 0.1 3 0.1 ; play -n -c1 synth sin 440 sin 660 fade q 0.1 3 0.1 3rds (first in equal-temperament, then in just-intonation) play -n -c1 synth sin 440 sin 544.599 fade q 0.1 3 0.1 ; play -n -c1 synth sin 440 sin 550 fade q 0.1 3 0.1 The difference in 5ths is very hard to hear; the difference in 3rds is dramatic! ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=360706&aid=2778142&group_id=10706 |