Author |
Message |
mosc
Site Admin
Joined: Jan 31, 2003 Posts: 18195 Location: Durham, NC
Audio files: 211
G2 patch files: 60
|
Posted: Tue Jul 08, 2008 9:06 pm Post subject:
Improved Chuck Ambiophonic Processor |
|
|
Here's an improved Ambiophonic processor. After much experimentation, this is the best algorithm I have tried. This one had no feedback or filters.
Don't forget, this is not for headphones. Speakers should be placed closely, about 20 degrees apart and listen directly on the center axis.
I have one problem with it. Whenever the audio stream changes (track change or volume change) the Chuck program (shell window or MiniAudicle) must be reselected. Anyone have any idea about that? BTW, the other ambiophonic processors written by inventor have that same problem.
July 12, 2008 - update:, fixed bug. Don't multiply the delay signals by -0.5. Should be -1.0
July 24, 2008 - update, fixed error in the drawing. There must be inverters after the two delays.
Oct 25, 2009 - update: This algorithm has been greatly enhanced and improved as a result of work with Robin Miller. The new AmbiophonicDSP, available for download at the electro-music.com store incorporated these improvements.
Description: |
Mosc's Ambio Processor (MAP)
Updated July 24, 2008 to correct missing inverters after the delay modules. |
|
Filesize: |
82.19 KB |
Viewed: |
780 Time(s) |
This image has been reduced to fit the page. Click on it to enlarge. |
|
Description: |
Improved ambiophonic processor updated July 12, 2008 |
|
Download |
Filename: |
ambio1.ck |
Filesize: |
1.17 KB |
Downloaded: |
830 Time(s) |
_________________ --Howard
my music and other stuff Last edited by mosc on Tue Oct 27, 2009 9:28 pm; edited 8 times in total |
|
Back to top
|
|
|
Kassen
Janitor
Joined: Jul 06, 2004 Posts: 7678 Location: The Hague, NL
G2 patch files: 3
|
Posted: Wed Jul 09, 2008 8:09 am Post subject:
|
|
|
Now *that* is "strongly timed"!
:¬p _________________ Kassen |
|
Back to top
|
|
|
mosc
Site Admin
Joined: Jan 31, 2003 Posts: 18195 Location: Durham, NC
Audio files: 211
G2 patch files: 60
|
Posted: Wed Jul 09, 2008 4:47 pm Post subject:
|
|
|
Thanks for catching that compilation error... _________________ --Howard
my music and other stuff |
|
Back to top
|
|
|
Inventor
Stream Operator
Joined: Oct 13, 2007 Posts: 6221 Location: near Austin, Tx, USA
Audio files: 267
|
Posted: Sat Jul 12, 2008 4:10 am Post subject:
|
|
|
Kassen wrote: |
Now *that* is "strongly timed"!
:¬p |
Wow, this Ambiophonic Processor is far more advanced than I reaized! It is from the future! _________________ "Let's make noise for peace." - Kijjaz |
|
Back to top
|
|
|
mosc
Site Admin
Joined: Jan 31, 2003 Posts: 18195 Location: Durham, NC
Audio files: 211
G2 patch files: 60
|
Posted: Sat Jul 12, 2008 9:27 am Post subject:
|
|
|
Glad you like it. I can't bear conventional 60 degree stereo anymore.
Any ideas about how to fix that reset glitch in ChucK. Do you experience that or is it a local thing here? _________________ --Howard
my music and other stuff |
|
Back to top
|
|
|
Inventor
Stream Operator
Joined: Oct 13, 2007 Posts: 6221 Location: near Austin, Tx, USA
Audio files: 267
|
Posted: Sat Jul 12, 2008 10:02 am Post subject:
|
|
|
I can only guess at the solution. Perhaps one thing to try is using the command line version of ChucK? It has no GUI that needs to be selected, so maybe it will not have that problem. Sounds like a bug to me...
_________________ "Let's make noise for peace." - Kijjaz |
|
Back to top
|
|
|
Inventor
Stream Operator
Joined: Oct 13, 2007 Posts: 6221 Location: near Austin, Tx, USA
Audio files: 267
|
|
Back to top
|
|
|
Kassen
Janitor
Joined: Jul 06, 2004 Posts: 7678 Location: The Hague, NL
G2 patch files: 3
|
Posted: Sat Jul 12, 2008 10:07 am Post subject:
|
|
|
I'm not sure what "reset glitch"? I took the liberty of doing a little cleanup so I could understand the signal chain. I'm fairly sure this version has the exact same signal chain. I still don't see any "reset". How does it glitch?
To be perfectly clear; this wasn't done because because I feel my style is "better", I just found the signal hard to trace and now I can. Sorry but I don't feel like moving speakers ATM.
Code: | // ambiophonic processor
//
// Improved phase cancelation using subtraction
// of the channels first tried by Howard Moscovitz,
// No filters, no feedback. I have found it sounds
// better this way
// July 8, 2009
// Howard Moscovitz
/*
July 12, 2008
code cleanup by Kas mainly to clarify the signal chain
which I found hard to understand.
also ripped out a pair of gains that wasn't doing anything
and dito MIDI
*/
//dry signal
adc.left => dac.left;
adc.right => dac.right;
//wet chain
adc.left => Gain L_minus => Gain R_prime => DelayA R_delay => dac.left;
adc.right => Gain R_minus => Gain L_prime => DelayA L_delay => dac.right;
//wet chain X-feed
adc.left => L_prime;
adc.right => R_prime;
//invert phase
-1 => L_minus.gain => R_minus.gain;
0.080::ms => dur delay;
10::delay => L_delay.max;
10::delay => R_delay.max;
delay => L_delay.delay;
delay => R_delay.delay;
//relative gain of delay
-0.5 => L_delay.gain => R_delay.gain;
//master gain
0.5 => dac.gain;
//run forever
while(true) hour => now; |
_________________ Kassen Last edited by Kassen on Sat Jul 12, 2008 10:38 am; edited 2 times in total |
|
Back to top
|
|
|
mosc
Site Admin
Joined: Jan 31, 2003 Posts: 18195 Location: Durham, NC
Audio files: 211
G2 patch files: 60
|
Posted: Sat Jul 12, 2008 10:07 am Post subject:
|
|
|
Inventor wrote: | I can only guess at the solution. Perhaps one thing to try is using the command line version of ChucK? It has no GUI that needs to be selected, so maybe it will not have that problem. Sounds like a bug to me... |
I tried the command line version as well as miniAudicle. I have to click on the Cygwin window that is running the shell as well. It feels like a bug. _________________ --Howard
my music and other stuff |
|
Back to top
|
|
|
Kassen
Janitor
Joined: Jul 06, 2004 Posts: 7678 Location: The Hague, NL
G2 patch files: 3
|
Posted: Sat Jul 12, 2008 10:09 am Post subject:
|
|
|
Sorry, Les, X-ing posts and the preview of your post didn't tell me you had attached a file. For a class implementation the "in" gains are of course quite useful. _________________ Kassen |
|
Back to top
|
|
|
Kassen
Janitor
Joined: Jul 06, 2004 Posts: 7678 Location: The Hague, NL
G2 patch files: 3
|
Posted: Sat Jul 12, 2008 10:14 am Post subject:
|
|
|
mosc wrote: |
I tried the command line version as well as miniAudicle. I have to click on the Cygwin window that is running the shell as well. It feels like a bug. |
Oh, wait, that reset glitch. Hmmmm, I have no idea. What are you using to pipe audio into it? I use my soundcard's mixer for that kind of thing so stream interruptions should be undetectable at ChucK's end. I heard of similar glitches on some systems. Could be related to the way different soundcards interface with the audio system? _________________ Kassen |
|
Back to top
|
|
|
mosc
Site Admin
Joined: Jan 31, 2003 Posts: 18195 Location: Durham, NC
Audio files: 211
G2 patch files: 60
|
Posted: Sat Jul 12, 2008 10:20 am Post subject:
|
|
|
Kassen:
Thanks for the rewrite. I had take the parens out of lines 33 and 34 to get it to run. Something about RHS not mutable.
It seems to work as well as my version. Give it a try.
BTW, WTF, this version doesn't have a glitch when I change volume and what ever. Thanks.
Please explain...
I use Virtual Audio Cable. Maybe some changes I made to that config has fixed it. Anyway, now I'm free from streoe. Everying I listen too, includings mp3s on the site, will sound great. Woopie...
_________________ --Howard
my music and other stuff |
|
Back to top
|
|
|
mosc
Site Admin
Joined: Jan 31, 2003 Posts: 18195 Location: Durham, NC
Audio files: 211
G2 patch files: 60
|
Posted: Sat Jul 12, 2008 10:32 am Post subject:
|
|
|
Les, please repost your version and I'll check it out on my system to verify it works the same as mine. _________________ --Howard
my music and other stuff |
|
Back to top
|
|
|
mosc
Site Admin
Joined: Jan 31, 2003 Posts: 18195 Location: Durham, NC
Audio files: 211
G2 patch files: 60
|
Posted: Sat Jul 12, 2008 10:34 am Post subject:
|
|
|
One thing I notice that is bad is that my miniAudicle keeps running even after I stop the shred or even kill the window. I see it in the Windows Task Manager process list. If I kill it there is goes away. _________________ --Howard
my music and other stuff |
|
Back to top
|
|
|
Kassen
Janitor
Joined: Jul 06, 2004 Posts: 7678 Location: The Hague, NL
G2 patch files: 3
|
Posted: Sat Jul 12, 2008 10:37 am Post subject:
|
|
|
mosc wrote: |
Thanks for the rewrite. I had take the parens out of lines 33 and 34 to get it to run. Something about RHS not mutable. |
OOPS! Yes, My fault, I'll edit it. Those come from me carefully cutting and pasting to make sure I lost no data but clearly I should've lost some more :¬)
Quote: | It seems to work as well as my version. Give it a try. |
I just realised I have some spare small speakers I could try with later so I won't have to move the big ones.
Quote: | BTW, WTF, this version doesn't have a glitch when I change volume and what ever. Thanks. |
That's quite weird. I'm saving some CPU thanks to removing two gains and the MIDI but that couldn't explain what you are seeing unless you CPU is old enough for that to matter. I find that hard to imagine. Quite strange.
Quote: |
Please explain... |
Erm.... ? Erm.... If that's a real phenomenon we definitely need Ge himself to explain that because if my edit changed anything internal to the VM then that's beyond my knowledge of ChucK's workings.
Quote: |
I use Virtual Audio Cable. Maybe some changes I made to that config has fixed it. Anyway, now I'm free from streoe. Everying I listen too, includings mp3s on the site, will sound great. Woopie...
|
I think the "pull through" model of Ugens may depend on calls from the sound device so a interruption there could possibly affect that? There are some comandline settings to change the way ChucK interfaces with those but that too is a bit beyond me. I don't know enough about the details of audio drivers... For me the defaults there are fine so I never bothered beyond trying the non-default once. I think the other setting was slightly more expensive on the CPU.
Anyway; end good all good. Maybe the VM simply likes putting as much of the audio graph as possible into as few lines as possible for clarity as well :¬) _________________ Kassen |
|
Back to top
|
|
|
Kassen
Janitor
Joined: Jul 06, 2004 Posts: 7678 Location: The Hague, NL
G2 patch files: 3
|
Posted: Sat Jul 12, 2008 10:39 am Post subject:
|
|
|
mosc wrote: | One thing I notice that is bad is that my miniAudicle keeps running even after I stop the shred or even kill the window. I see it in the Windows Task Manager process list. If I kill it there is goes away. |
Yes, it sometimes does that. It's a reported bug, I think. Spencer was going to do a update and I hope this will be a part of it. It's quite annoying. _________________ Kassen |
|
Back to top
|
|
|
Inventor
Stream Operator
Joined: Oct 13, 2007 Posts: 6221 Location: near Austin, Tx, USA
Audio files: 267
|
|
Back to top
|
|
|
mosc
Site Admin
Joined: Jan 31, 2003 Posts: 18195 Location: Durham, NC
Audio files: 211
G2 patch files: 60
|
Posted: Sat Jul 12, 2008 4:58 pm Post subject:
|
|
|
Sorry, I just discovered a small error in my version which I just fixed.
-0.5 => L_delay.gain => R_delay.gain;
should read
-1 => L_delay.gain => R_delay.gain;
That's more effective. _________________ --Howard
my music and other stuff |
|
Back to top
|
|
|
Inventor
Stream Operator
Joined: Oct 13, 2007 Posts: 6221 Location: near Austin, Tx, USA
Audio files: 267
|
Posted: Sat Jul 12, 2008 6:33 pm Post subject:
|
|
|
I wish I could make ChucK accept my iTunes output and process it ambiophonically, then send it to my eMac's speakers. They are close together and then all my tunes would be enhanced as well.
Although I must admit, the effect is rather lost on me, my ears are made of lead, heck I'm listening to rock music from my fender amp which is mono and positioned to my right hand side and it doesn't bother me a bit. Shows what an audiophile I am.
Well, to each his own. Maybe someday I'll splurge another $60 and have stereo Fender amps for listening. Heh. Love my new toys. _________________ "Let's make noise for peace." - Kijjaz |
|
Back to top
|
|
|
Inventor
Stream Operator
Joined: Oct 13, 2007 Posts: 6221 Location: near Austin, Tx, USA
Audio files: 267
|
Posted: Sun Jul 13, 2008 10:17 am Post subject:
|
|
|
Well, good news. I posted to the ChucK Users Group and received recommendation of Jack and SoundFlower for routing audio. Jack wouldn't run, quitting unexpectedly, but SoundFlower is working just fine!
So now I'm listening to my iTunes music through Howard's Ambiophonic Processor! The eMac's speakers are kinda close together which I gather is optimal for Ambiophonic processing, so that's good.
It does makes wispy sounds when a web page is loading but I can live with that. Also the Apple built-in audio volume controls no longer work but I can use the iTunes volume control I guess and then if I get tired of that I'll code up a MAUI volume slider for the Ambiophonic Processor. Yay, it works! _________________ "Let's make noise for peace." - Kijjaz |
|
Back to top
|
|
|
Inventor
Stream Operator
Joined: Oct 13, 2007 Posts: 6221 Location: near Austin, Tx, USA
Audio files: 267
|
|
Back to top
|
|
|
Kassen
Janitor
Joined: Jul 06, 2004 Posts: 7678 Location: The Hague, NL
G2 patch files: 3
|
Posted: Sun Jul 13, 2008 1:09 pm Post subject:
|
|
|
Inventor wrote: |
So now I'm listening to my iTunes music through Howard's Ambiophonic Processor! The eMac's speakers are kinda close together which I gather is optimal for Ambiophonic processing, so that's good.
|
I think they are supposed to be aimed outwards as well though. _________________ Kassen |
|
Back to top
|
|
|
mosc
Site Admin
Joined: Jan 31, 2003 Posts: 18195 Location: Durham, NC
Audio files: 211
G2 patch files: 60
|
|
Back to top
|
|
|
Inventor
Stream Operator
Joined: Oct 13, 2007 Posts: 6221 Location: near Austin, Tx, USA
Audio files: 267
|
Posted: Sun Jul 13, 2008 3:15 pm Post subject:
|
|
|
OK, then things are set up just about right, cool! Ahhh listening to "Take theLong Way Home" by Supertramp, dreamy ending... and Abiophonically enhanced! _________________ "Let's make noise for peace." - Kijjaz |
|
Back to top
|
|
|
mosc
Site Admin
Joined: Jan 31, 2003 Posts: 18195 Location: Durham, NC
Audio files: 211
G2 patch files: 60
|
Posted: Sun Jul 13, 2008 5:20 pm Post subject:
|
|
|
Inventor wrote: | I added the volume slider, here is the code. |
I get this error when I load this in miniaudicle
Code: | [unnamed1]:line(76): undefined type 'MAUI_View'...
[unnamed1]:line(76): ... in declaration ... |
_________________ --Howard
my music and other stuff |
|
Back to top
|
|
|
|