electro-music.com   Dedicated to experimental electro-acoustic
and electronic music
 
    Front Page  |  Radio
 |  Media  |  Forum  |  Wiki  |  Links
Forum with support of Syndicator RSS
 FAQFAQ   CalendarCalendar   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   LinksLinks
 RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in  Chat RoomChat Room 
 Forum index » DIY Hardware and Software » ChucK programming language
Improved Chuck Ambiophonic Processor
Post new topic   Reply to topic Moderators: Kassen
Page 2 of 3 [62 Posts]
View unread posts
View new posts in the last week
Mark the topic unread :: View previous topic :: View next topic
Goto page: Previous 1, 2, 3 Next
Author Message
Inventor
Stream Operator


Joined: Oct 13, 2007
Posts: 6221
Location: near Austin, Tx, USA
Audio files: 267

PostPosted: Sun Jul 13, 2008 5:53 pm    Post subject: Reply with quote  Mark this post and the followings unread

Howard, do you have the latest version of the miniAudicle? The image below shows the pop-up window I get when I select "About miniAudicle" from the miniAudicle menu. You can download the latest version of the Mac miniAudicle here:

http://audicle.cs.princeton.edu/mini/mac/

MAUI is a very new feature, so you may not have it.


About_miniAudicle.jpg
 Description:
About miniAudicle window
 Filesize:  14.93 KB
 Viewed:  12297 Time(s)

About_miniAudicle.jpg



_________________
"Let's make noise for peace." - Kijjaz
Back to top
View user's profile Send private message Send e-mail
mosc
Site Admin


Joined: Jan 31, 2003
Posts: 18197
Location: Durham, NC
Audio files: 212
G2 patch files: 60

PostPosted: Sun Jul 13, 2008 6:38 pm    Post subject: Reply with quote  Mark this post and the followings unread

I have that version too. Windows, not Mac though.
_________________
--Howard
my music and other stuff
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address
Inventor
Stream Operator


Joined: Oct 13, 2007
Posts: 6221
Location: near Austin, Tx, USA
Audio files: 267

PostPosted: Sun Jul 13, 2008 7:01 pm    Post subject: Reply with quote  Mark this post and the followings unread

mosc wrote:
I have that version too. Windows, not Mac though.


Oh, Windows. That's the problem. Unfortunately MAUI continues to remain unavailable on Linux and Windows, much to the frustration of us all. I really want my electro-music.com ChucKist friends to check out my soft synth and guitar/drums song creation software but they simply cannot run it at this time. MAUI cross-platform compatibility is promised in the next release, however the weeks of waiting have become months now and still we wait.

Instead, I can code up a keyboard and/or mouse interface for you, Howard. Would you like the number keys to set the volume from 0 to 9 or perhaps the square bracket keys to step the volume up and down, with the backslash key as a mute? That latter interface would mimic the Apple built-in audio controls nicely. Just tell me what you'd like and I'll code it up for you.

Hmmm... now that I think of it, if you were typing say a forum message that needed a bracket or a backslash, your volume would change as you type it. I don't know if I can do control-bracket or whatever. Anyway, tell me your thoughts and I'll code it for us all to enjoy.

_________________
"Let's make noise for peace." - Kijjaz
Back to top
View user's profile Send private message Send e-mail
Inventor
Stream Operator


Joined: Oct 13, 2007
Posts: 6221
Location: near Austin, Tx, USA
Audio files: 267

PostPosted: Mon Jul 14, 2008 3:09 am    Post subject: Reply with quote  Mark this post and the followings unread

Well, I was up early this morning and I felt like coding so I created the keyboard interface. It mimics the Apple built-in audio volume change, and uses the left bracket ([) to lower volume by 5%, the right bracket (]) to raise volume by 5%, and the backslash (\) to mute the sound. These keys are in the upper right of the keyboard, all in a row, and graphically they look like what they do.

I looked into the control key. I think we could add control key functionality if we want, I just didn't mess with it for this first try, so if you type "[", "]", or "\" then your volume changes. I can add control key functionality if requested.

Also it makes a 200 Hz sinusoidal "boop" for 100 ms each time you adjust the volume up or down (but not for mute). Someone might want to add an ADSR to the boop or something like that to make it even more professional sounding. "boop boop boop" goes the volume!

One minor detail: when you start it up, before adjusting the volume, you must click on your OS background wallpaper (desktop) or some innocuous window to deselect the code window of the miniAudicle first. Otherwise your volume adjust characters will get inserted into the code, which is not what you want.

Making the world a teeny bit better by sharing ChucK code! Ahhh, more coffee now...


ambio4.ck
 Description:
Ambiophonic Processor, now with keyboard volume change and "boop" sound

Download
 Filename:  ambio4.ck
 Filesize:  3.59 KB
 Downloaded:  326 Time(s)


_________________
"Let's make noise for peace." - Kijjaz
Back to top
View user's profile Send private message Send e-mail
Inventor
Stream Operator


Joined: Oct 13, 2007
Posts: 6221
Location: near Austin, Tx, USA
Audio files: 267

PostPosted: Mon Jul 14, 2008 5:08 am    Post subject: Reply with quote  Mark this post and the followings unread

One minor fix: the volume was too low. The output gain buffers were set to a gain of 0.5, and I noticed that I couldn't crank up the volume to max anymore. I gotta rock out, you know!

The last line of the Ambiophonic Processor class should read:
Code:

    1.0 => L_out.gain => R_out.gain;


"It's getting better all the time..."

_________________
"Let's make noise for peace." - Kijjaz
Back to top
View user's profile Send private message Send e-mail
Kassen
Janitor
Janitor


Joined: Jul 06, 2004
Posts: 7678
Location: The Hague, NL
G2 patch files: 3

PostPosted: Mon Jul 14, 2008 6:26 am    Post subject: Reply with quote  Mark this post and the followings unread

Re; MAO slider;

Yes, true, but on Windows and Linux I think the master volume will also affect ChucK (not sure about ASIO on Windows there) so in this case there is less of a need for the solution the Mac needed.

Edit; also; this process is linear and time-invariant so it shouldn't matter *where* we tweak the volume, assuming we have sufficient bit-depth at all stages. I'm not sure what format is used inbetween these programs though. For plain 16 bit I'd want to use my full headroom all the time but with double-floats (or even plain 32 bit floats) you have lots of space to move.

_________________
Kassen
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Inventor
Stream Operator


Joined: Oct 13, 2007
Posts: 6221
Location: near Austin, Tx, USA
Audio files: 267

PostPosted: Mon Jul 14, 2008 6:44 am    Post subject: Reply with quote  Mark this post and the followings unread

Kassen wrote:
Yes, true, but on Windows and Linux I think the master volume will also affect ChucK (not sure about ASIO on Windows there) so in this case there is less of a need for the solution the Mac needed.

Well this may be one of those areas where either SoundFlower or the Apple misses the mark. I really like the keyboard volume adjust as opposed to sliders, so I'm glad to have it back. "boop boop boop!" Very Happy

_________________
"Let's make noise for peace." - Kijjaz
Back to top
View user's profile Send private message Send e-mail
Kassen
Janitor
Janitor


Joined: Jul 06, 2004
Posts: 7678
Location: The Hague, NL
G2 patch files: 3

PostPosted: Mon Jul 14, 2008 6:59 am    Post subject: Reply with quote  Mark this post and the followings unread

It kinda depends. I think there are advantages to hooking directly to the soundcard as opposed to going through the slider as well, for example if your application needs to be unity gain at all times for some reason. It's never clear to me what soundcard is affected by the slider if you use multiple cards.

I think Jack and ASIO may do the same as soundflower with consumer type audio architecture going through the slider. This makes sense to me. On Windows I don't ever use the OS's sliders because my soundcard has a far superior mixer

_________________
Kassen
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Inventor
Stream Operator


Joined: Oct 13, 2007
Posts: 6221
Location: near Austin, Tx, USA
Audio files: 267

PostPosted: Mon Jul 14, 2008 7:15 am    Post subject: Reply with quote  Mark this post and the followings unread

Well, Jack crashed on my Mac. Probably because I don't have the latest OS, which is the same problem that sparked that horrible thread about Apple's Planned Obsolescence we all got up at arms about. I could have gone back and clicked on the link for prior versions of Jack, but SoundFlower worked and is backward compatible to 10.2.8 revision. If software isn't backward compatible, I just say forget it, you failed to win me over.

This kind of thing is why I'm planning to migrate to Ubuntu Linux. BTW, I have a free Ubuntu CD on order. It will be here sometime within two months from now. I'll set up that old Dell notebook as a music platform and then get familiar with Ubuntu. Eventually when I buy a new system, the plan is to go with Linux of some form.

But I digress. Off topic? Pfft!

_________________
"Let's make noise for peace." - Kijjaz
Back to top
View user's profile Send private message Send e-mail
Acoustic Interloper



Joined: Jul 07, 2007
Posts: 2067
Location: Berks County, PA
Audio files: 89

PostPosted: Mon Jul 14, 2008 5:49 pm    Post subject: Reply with quote  Mark this post and the followings unread

Kassen wrote:
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.

It has always done this for me on both XP and OSX. Also, when I started using the Chorus effect, miniAudicle would hang when I tried to stop a shred from the UI, and I'd have to reboot; even the Windows Task Manager couldn't stop it.

Now on XP I always just run "chuck WHATEVER.ck &" via Cygwin/bash so ChucK is backgrounded with the PID showing, so I can jut go back to that window and do a kill. No more miniAudicle reboots on Chorus and minimal fuss stopping ChucK. And, Chuck even manages to survive a Windows sleep.

I remember Ge saying he doesn't use miniAudicle in concert, and I took it to heart.

_________________
When the stream is deep
my wild little dog frolics,
when shallow, she drinks.
Back to top
View user's profile Send private message Visit poster's website
mosc
Site Admin


Joined: Jan 31, 2003
Posts: 18197
Location: Durham, NC
Audio files: 212
G2 patch files: 60

PostPosted: Mon Jul 14, 2008 6:59 pm    Post subject: Reply with quote  Mark this post and the followings unread

Thanks for all the effort to code up the chuck ambio coder. I'm able to use my version quite well, except for the hangs. The most important adjustment to have is the left/right balance control. It should be on the output of the processing stream.
_________________
--Howard
my music and other stuff
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address
Kassen
Janitor
Janitor


Joined: Jul 06, 2004
Posts: 7678
Location: The Hague, NL
G2 patch files: 3

PostPosted: Tue Jul 15, 2008 6:54 am    Post subject: Reply with quote  Mark this post and the followings unread

Acoustic Interloper wrote:

It has always done this for me on both XP and OSX. Also, when I started using the Chorus effect, miniAudicle would hang when I tried to stop a shred from the UI, and I'd have to reboot; even the Windows Task Manager couldn't stop it.


That's weird. Chorus has a serious bug, BTW, but last thing I heard of that was that a fix was in CVS. I can't say anything about the state on OSX but for Windows the Mini is ok for me and on Linux it's rock solid. My Linux coding tends to be more prototype stuff and interface less devices though.


Quote:
I remember Ge saying he doesn't use miniAudicle in concert, and I took it to heart.


Oh? It's my tool of choice for livecoding though I use a ASIO build of the terminal version for my sequencer. My XP install is decidedly non-standard though. Also; graphics are the main difference between the three versions, I think the Mac version uses a entirely different lib from the Linux/ Win ones.

I know there's a current clean-up spree of the Mini that's directed at issues that affect Plork/Slork in particular so that should take care of many of the OSX issues.

_________________
Kassen
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Acoustic Interloper



Joined: Jul 07, 2007
Posts: 2067
Location: Berks County, PA
Audio files: 89

PostPosted: Tue Jul 15, 2008 7:02 am    Post subject: Reply with quote  Mark this post and the followings unread

Howard, do you have a good, quick reference for ambiophonics? I want to play with this inside the chess game tone generator, and I need to figure out how it fits.

Currently the algorithmic component emphasizes the most recent player's move on one stereo channel and the previous player's on the other, where emphasis means that 75% of that channel's gain comes from the dominant player for the channel and 25% of the channel's gain from the other player. The intent is to have the moves feel as though they are moving left-to-right across the field. Sometimes it has that effect, although the relationships of the two players "implied move graph" get intertangled enough at times that the directionality then gets washed out. That's OK; having spacial effects pop out occasionally has more dramatic effect in the game than having them constantly.

I want to see if there is a way to use ambiophonics to take this up a notch.

Also, do you think the acoustics of the demo room in EM08 will be well suited for this? You must, since you will be giving a seminar! I'll be using a pair of Roland KC-150 amps unless there is something better already set up in there.

See you soon!

_________________
When the stream is deep
my wild little dog frolics,
when shallow, she drinks.
Back to top
View user's profile Send private message Visit poster's website
Acoustic Interloper



Joined: Jul 07, 2007
Posts: 2067
Location: Berks County, PA
Audio files: 89

PostPosted: Tue Jul 15, 2008 7:05 am    Post subject: Reply with quote  Mark this post and the followings unread

Kassen wrote:
Chorus has a serious bug, BTW, but last thing I heard of that was that a fix was in CVS. I can't say anything about the state on OSX but for Windows the Mini is ok for me and on Linux it's rock solid.

I've been running the prepacked executables from last year's release. I reckon I should download and build. I assume the process is pretty painless; the issue is always time.

_________________
When the stream is deep
my wild little dog frolics,
when shallow, she drinks.
Back to top
View user's profile Send private message Visit poster's website
Kassen
Janitor
Janitor


Joined: Jul 06, 2004
Posts: 7678
Location: The Hague, NL
G2 patch files: 3

PostPosted: Tue Jul 15, 2008 7:16 am    Post subject: Reply with quote  Mark this post and the followings unread

I'm not sure how you'd get the CVS version though.

Unless there's some pressing issue I think I'd prefer to always be on the latest mainstream build because I discuss bugs so much that it would get confusing otherwise.

We need to get the release-cycle to go down but Ge is so busy....

_________________
Kassen
Back to top
View user's profile Send private message Send e-mail Visit poster's website
radarsat1



Joined: Mar 14, 2008
Posts: 85
Location: Montreal

PostPosted: Tue Jul 15, 2008 8:46 am    Post subject: Reply with quote  Mark this post and the followings unread

Kassen wrote:
I'm not sure how you'd get the CVS version though.


cvs -d:ext:anon-chuck@cvs.cs.princeton.edu:/cvs co chuck-dev

personally though I track it with git-cvsimport, which lets you work on your own branch without needing permission from cvs.

(Not that I've done any work on chuck lately, but I've poked around with the code a little.)
Back to top
View user's profile Send private message
mosc
Site Admin


Joined: Jan 31, 2003
Posts: 18197
Location: Durham, NC
Audio files: 212
G2 patch files: 60

PostPosted: Tue Jul 15, 2008 10:25 am    Post subject: Reply with quote  Mark this post and the followings unread

Acoustic Interloper wrote:
Howard, do you have a good, quick reference for ambiophonics?


At the moment, I'd suggest Wikipedia. Ambiophonics.org is another site, but Ralph has mixed up ambiophonics with a lot of convolution BS.

I wouldn't put an ambiophonics processor in your application. It should be part of the playback system. It is really just an improved method of playing back "regular" stereo.

_________________
--Howard
my music and other stuff
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address
mosc
Site Admin


Joined: Jan 31, 2003
Posts: 18197
Location: Durham, NC
Audio files: 212
G2 patch files: 60

PostPosted: Tue Jul 15, 2008 10:28 am    Post subject: Reply with quote  Mark this post and the followings unread

I just added a diagram of my algorithm which I took the liberty of naming MAP. It's on the first post of this topic.
_________________
--Howard
my music and other stuff
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address
Acoustic Interloper



Joined: Jul 07, 2007
Posts: 2067
Location: Berks County, PA
Audio files: 89

PostPosted: Tue Jul 15, 2008 11:21 am    Post subject: Reply with quote  Mark this post and the followings unread

mosc wrote:
I wouldn't put an ambiophonics processor in your application. It should be part of the playback system. It is really just an improved method of playing back "regular" stereo.

This discussion has got me to to thinking about the spatialization in the chess program, and given me the idea of ramping the left-right channel bias in a 75%-to-25% or 25%-to-75% sawtooth instead of leaving it constant after a given move. When the sustain is down, the "same note" gets played within a (dare I saw "banjo-like") pointillistic arpeggio, so this enhancement would move the notes of the arpeggio around in the sound field. Thanks for the idea!

Pete Seeger wrote:
And the banjo is so wonderfully adapted to sparkling -- a commonplace melody becomes quite subtle when surrounded with many other notes. Then it becomes like trying to pick out a constellation from all the other glittering stars in the sky.

_________________
When the stream is deep
my wild little dog frolics,
when shallow, she drinks.
Back to top
View user's profile Send private message Visit poster's website
Inventor
Stream Operator


Joined: Oct 13, 2007
Posts: 6221
Location: near Austin, Tx, USA
Audio files: 267

PostPosted: Tue Jul 15, 2008 4:39 pm    Post subject: Reply with quote  Mark this post and the followings unread

Wow. Ambiophonics meets ChucK meets the Chess Program. Is it synthesis, random chaos, or a meeting of the minds? "roll roll whack! roll roll ding!" goes the pinball game of electro-music.com! "Tilt!" I say, "Tilt!"
_________________
"Let's make noise for peace." - Kijjaz
Back to top
View user's profile Send private message Send e-mail
mosc
Site Admin


Joined: Jan 31, 2003
Posts: 18197
Location: Durham, NC
Audio files: 212
G2 patch files: 60

PostPosted: Thu Jul 24, 2008 2:18 pm    Post subject: Reply with quote  Mark this post and the followings unread

Yikes, I found a rather serious error in my drawing. There MUST be an inverter after the two delay modules. Otherwise, it will not work at all. I just updated the drawing.
_________________
--Howard
my music and other stuff
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address
Kassen
Janitor
Janitor


Joined: Jul 06, 2004
Posts: 7678
Location: The Hague, NL
G2 patch files: 3

PostPosted: Thu Jul 24, 2008 4:03 pm    Post subject: Reply with quote  Mark this post and the followings unread

mosc wrote:

At the moment, I'd suggest Wikipedia. Ambiophonics.org is another site, but Ralph has mixed up ambiophonics with a lot of convolution BS.


Hmmm, I don't think convolution is BS at all but I don't see how you're going to do this with a off-the-shelf convolution reverb. One could estimate the effect using a four channel impulse-response for stereo signals; it's linear and time-invariant so convolving it will work but not the regular way because of the crossing signals.

BTW, you posted a VST implementation but I was under the impression that VST-based systems typically use block-processing which wreaks havoc on short timing-critical feedback paths. how does that work out in practice?

_________________
Kassen
Back to top
View user's profile Send private message Send e-mail Visit poster's website
mosc
Site Admin


Joined: Jan 31, 2003
Posts: 18197
Location: Durham, NC
Audio files: 212
G2 patch files: 60

PostPosted: Sat Jul 26, 2008 10:33 am    Post subject: Reply with quote  Mark this post and the followings unread

Every type of convolution based ambient processor I have heard, except for some special exceptions, sound like reverb to me. I'm not against convolution processors as a musical effect or as a piece of kit in the electro-musicians tool set. The reference to BS was that convolution itself is separate from ambiophonic reproduction. It's something Ralph adds to get an effect he likes, but convolution is a completely independent process and it can added to straight stereo and straight 5.1. It really shouldn't be included in a discussion of ambiophonics.

My concern is that on the Ralph's site, convolution is mixed in and the result is unclear.

Now, as for the VST block processing problem, you are right about that. In my version of the ambiophonic processor, MAP, I don't use feedback at all, so there is no problem with the block processing, except perhaps for a little latency.

I didn't remove the feedback (recursion) in order to get the VST to work, but because I think it colors the sound by creating a peak filter at 1/80 microseconds, or about 12500 Hz. Actually, due to the structure of the RACE feedback the peak sounds more like 6250 Hz. I also find the bandpass filters distort the sound slightly too, so I removed them. What I did add to the algorithm was sending L-R and R-L to the delays. That part is my contribution, AFAIK.

One more thing, that might interest Kassen especially. I developed the processor on the G2. It's very easy to experiment. There are two problems with the G2. One is that I don't like using such a valuable piece of hardware for processing my music. The other is that piping music out of my MOTU, through the G2 and back, causes a slight, but definite, audio distortion. I assume this is caused by the DA - AD - DA - AD chain one experiences when using any outboard analog processor. (Well, technically the middle conversions aren't there with analog, but you get the analog distortion of anyhow). Kassen has stated that he finds the G2 converters aren't. well, let's say, as good as they could be. In this case, it's certainly a noticeable effect.

This was my motivation for developing my ambiophonic processor in ChucK and as a VST. Also, I want to enable as many people as possible to give ambiophonics a try. For me and several friends, it has completely changed the way we listen to audio and spaciality - but that's for another topic.

_________________
--Howard
my music and other stuff
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address
DrJustice



Joined: Sep 13, 2004
Posts: 2114
Location: Morokulien
Audio files: 4

PostPosted: Sat Jul 26, 2008 10:45 am    Post subject: Reply with quote  Mark this post and the followings unread

Kassen wrote:
...I was under the impression that VST-based systems typically use block-processing which wreaks havoc on short timing-critical feedback paths. how does that work out in practice?

mosc wrote:
Now, as for the VST block processing problem, you are right about that.

Surely, inside your own VST wrapped algorithms you can use feedback all you like. It would be across VST's the block processing presents a problem. Or am I missing something?

DJ
--
Back to top
View user's profile Send private message Visit poster's website
mosc
Site Admin


Joined: Jan 31, 2003
Posts: 18197
Location: Durham, NC
Audio files: 212
G2 patch files: 60

PostPosted: Sat Jul 26, 2008 10:53 am    Post subject: Reply with quote  Mark this post and the followings unread

I think you are correct, but you have to handle it very carefully. So far, I've tried SynthEdit and Usine and both have built in checks to stop you from doing it, but they have also some tricks to help you get away with it. It's a pain no matter how you look at it.

What would be cool, IMHO, is if one could develop VSTs with ChucK.

_________________
--Howard
my music and other stuff
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address
Display posts from previous:   
Post new topic   Reply to topic Moderators: Kassen
Page 2 of 3 [62 Posts]
View unread posts
View new posts in the last week
Goto page: Previous 1, 2, 3 Next
Mark the topic unread :: View previous topic :: View next topic
 Forum index » DIY Hardware and Software » ChucK programming language
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Forum with support of Syndicator RSS
Powered by phpBB © 2001, 2005 phpBB Group
Copyright © 2003 through 2009 by electro-music.com - Conditions Of Use