| Hi Art,
I don't use the "built-in" opcodes for Ambisonics encoding/decoding for
two/three reasons:
1a) Both for my own learning, and for teaching others, I'd rather rely
on building and understanding things out of a small reliable, core set
of opcodes.
1b) If Csound is ever optimized for SSE2/3/3DNOW/etc-type machine
instructions, those core opcodes will surely be the most likely
candidates for optimization, and so things built from them rather than
coded in C will benefit immediately.
2) "Special situations" arise almost as a rule, particularly for
decoding. Even with encoding, I find it useful to create opcodes fit to
the requirements of a particular piece or situation within a piece.
Here is an example of a horizontal-only encoding (to the edge of the
unit circle) opcode. If the k-rate azimuth argument (range 0 to 2pi; 0
is front and centre, pi is back and centre) changes quickly, the
parallel interpolation of the sin/cos functions will introduce momentary
spatial distortions - but then to move things quickly around the room is
already a kind of "distortion":
; usage: aw,ax,ay spatialize aMySignal, kposition
opcode spatialize,aaa,ak
ain,kazimuth xin
acos interp cos(kazimuth)
asin interp sin(kazimuth)
xout ain*0.707,ain*acos,ain*asin
endop
And here is an example of a decoding instrument that takes
horizontal-only input (W,X,Y) and decodes to a rig consisting of a
certain arrangement of six speakers plus two (identical) subwoofer feeds:
instr 1
aw inch 1
ax inch 2
ay inch 3
ax2 = ax * 0.707
ay2 = ay * 0.707
a1 = aw + ax
a2 = aw + ax2 - ay2
a3 = aw - ay
a5 = aw - ax
a7 = aw + ay
a8 = aw + ax2 + ay2
as1 butterlp aw, 100
as2 butterlp as1, 100
as3 butterlp as2, 100
asub balance as3,aw
outc a1,a2,a3,asub,a5,asub,a7,a8
endin
Hope that helps - I don't mind continuing to chat about this off-list
also...
Yours truly,
David
Art Hunkins wrote:
> Thanks to both you and Michael for the "thumbs up" about Ambisonics.
>
> The opcode docs don't show recommended or default values for the various
> input parameters when encoding. Do you have any? (I'm just looking for
> reasonable starting points.)
>
> Art Hunkins
>
> ----- Original Message -----
> From: "David Ogborn"
> To: "Art Hunkins" ; "Developer discussions"
>
> Sent: Saturday, October 28, 2006 12:46 AM
> Subject: Re: [Cs-dev] [Csnd] MIDI Pan Curve
>
>
>> Absolutely - I routinely do live electronic pieces with Ambisonics
>> functioning as an "abstraction layer" for the spatialization, decoding
>> to 2, 4, 6, or 8 channels depending on the gig. The decoding math is
>> just a multiplication or two and add per channel. The encoding math is
>> not much more involved. Very cheap operations.
>>
>> Yours truly,
>> David
>>
>> Art Hunkins wrote:
>>> Any idea whether an ambisonic B encode/decode for stereo or quad could
> be
>>> done in Csound in *real time*?
>>>
>>> Art Hunkins
>>>
>>> ----- Original Message -----
>>> From: "Victor Lazzarini"
>>> To: "Developer discussions" ; "Art
>>> Hunkins"
>>> Sent: Friday, October 27, 2006 7:17 PM
>>> Subject: Re: [Csnd] MIDI Pan Curve
>>>
>>>
>>> I'd say ambisonics. Even stereo reductions are
>>> quite impressive.
>>>
>>>> A general question about pan opcodes (including UDO's):
>>>>
>>>> Which of the available options give the clearest spatial
>>>> localization?
>>>>
>>>> I understand that many acoustical factors are involved in
>>>> achieving two- or three-dimensional imaging, but would
>>>> like advice as to which Csound opcodes create the *most
>>>> precise* positioning in the stereo (or quad) field.
>>>>
>>>> I've always been disappointed that my attempts to position
>>>> sounds have largely fallen flat, and not been perceptually
>>>> apparent in any very specific sense. (I've used the pan
>>>> opcode.) In a nutshell, I'm looking for Csound code that
>>>> can better project perceptual space.
>>>>
>>>> Thanks for sharing your experience.
>>>>
>>>> Art Hunkins
>>>>
>>>> ----- Original Message -----
>>>> From: "Steven Yi"
>>>> To:
>>>> Sent: Friday, October 27, 2006 3:27 PM
>>>> Subject: Re: [Csnd] MIDI Pan Curve
>>>>
>>>>
>>>> Hi All,
>>>>
>>>> Just wanted to note that I did a bug fix of this panning
>>>> UDO today (hard left gave NaN for right channel signal)
>>>> and have renamed it to pan_gm2 as it's a recommendation
>>>> for General Midi 2 implementors. If you've downloaded
>>>> this UDO please try downloading again here:
>>>>
>>>>
>>> http://www.csounds.com/udo/displayOpcode.php?opcode_id=90
>>>> Thanks!
>>>> steven
>>>>
>>>>
>>>> On 10/26/06, Steven Yi wrote:
>>>>> Hi All,
>>>>>
>>>>> I came across a document today called "Default Pan
>>>> Curve" on the MIDI website:
>>>>> http://www.midi.org/about-midi/specshome.shtml
>>>>>
>>>>> and have implemented it as a UDO here:
>>>>>
>>>>>
>>> http://www.csounds.com/udo/displayOpcode.php?opcode_id=90
>>>>>> It's described in the spec as:
>>>>> Over the course of the development of MIDI, different
>>>>> manufacturers have implemented
>>>>> their own responses to CC#10. In addition, various
>>>>> AMEI/MMA Specification (such as GM2 and
>>>>> DLS2) have recommended response curves that are not all
>>>>> the same. The different pan curves produce
>>>>> an equal power distribution between the left and right
>>>>> channels, but in some cases, a true center could
>>>>> not be achieved by following the recommended equation
>>>>> directly. The formula in this RP does achieve a
>>>>> true center and uses an equal power distribution, which
>>>> is desirable. >
>>>>> The formula given is:
>>>>>
>>>>> Left Channel Gain [dB] = 20*log (cos (Pi/2*
>>> max(0,CC#10
>>>>> - 1)/126) Right Channel Gain [dB] = 20*log (sin (Pi
>>> /2*
>>>> max(0,CC#10 - 1)/126) >
>>>>> I realized just now that I've rescaled the values to be
>>>>> between -1 and 1 which is what I'm accustomed to, but
>>>>> then naming it pan_midi doesn't make that much sense
>>>>> then. Would anyone have a recommendation on what to
>>>> call this? And should a pan_midi which takes in 0-127 be
>>>> added? >
>>>>> Thanks!
>>>>> steven
>>>>>
>>>> --
>>>> Send bugs reports to this list.
>>>> To unsubscribe, send email to
>>>> csound-unsubscribe@lists.bath.ac.uk
>>>>
>>>> --
>>>> Send bugs reports to this list.
>>>> To unsubscribe, send email to
>>>> csound-unsubscribe@lists.bath.ac.uk
>>>
>> -------------------------------------------------------------------------
>>> Using Tomcat but need to do more? Need to support web services,
> security?
>>> Get stuff done quickly with pre-integrated technology to make your job
> easier
>>> Download IBM WebSphere Application Server v.1.0.1 based on Apache
> Geronimo
>>> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
>>> _______________________________________________
>>> Csound-devel mailing list
>>> Csound-devel@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>> -------------------------------------------------------------------------
>> Using Tomcat but need to do more? Need to support web services, security?
>> Get stuff done quickly with pre-integrated technology to make your job
> easier
>> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
>> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
>> _______________________________________________
>> Csound-devel mailing list
>> Csound-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>
>
> -------------------------------------------------------------------------
> Using Tomcat but need to do more? Need to support web services, security?
> Get stuff done quickly with pre-integrated technology to make your job easier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net |