lylehaze

MIDIBox Mixer - A PGAx311 Audio Mixer

233 posts in this topic

No, it's still awesome.  ;D  Thanks for clarifying.  For the use case I've been imagining, I'd need to use one board per input channel then.  No problem :)

Share this post


Link to post
Share on other sites

With the "4 in to 4 out" option there is no mixing involved. Just simple audio level control of four separate channels. That might be useful for some projects, but it's not a mixer at that point.

It may not be a mixer, but it's fricken mixer Lego! it's fantastic!! totally awesome design man.

Share this post


Link to post
Share on other sites

This really is great work!  In particular I like the idea of using each PGA "card" as a channel input with 4 separate buss outputs.  Of course for a mixer this would mean a max of 8 channels (6 if you use 2 for an fx return) but the idea really captures my imagination!  Thanks for all the hard work lyle!

Share this post


Link to post
Share on other sites

I'm glad it is well received.

I was a bit busier today, so no eagle work, but I did put together the text part of "input options". I'm just going to describe 3 contrasting choices, and let each user refine the details from there.

I can see that I'll need to clean up the source code as well, or at least write a version that handles mono inputs into L,R,FX1,FX2.

One flaw in the boards: No mounting holes. And no room to put them, either! Oh well, I'll save "perfect" for my next design. I can use the 7805 tabs to mount the master end, anyway.

Thanks to everyone for the support and encouragement.

It helps a lot!

LyleHaze

Share this post


Link to post
Share on other sites

Of course for a mixer this would mean a max of 8 channels (6 if you use 2 for an fx return) but the idea really captures my imagination! 

OK either I've missed something or my imaginition is on fire... I don't see where the limitation is...

Split inputs as necessary, pga volume control to a massive mix for a buss, run the buss wherever (back into the mixer for send/returns, through another set of PGAs at least, for the subs)

You know what they say... ugly paintbrush pictures speak better than words:

uglymix_thumb.JPG

uglymix.JPG

Share this post


Link to post
Share on other sites

Stryd,

The limit is not an audio one, it's about two of the three digital signals that control the mixer. (CS and SCLK, I think)

The all the digital signals EXCEPT for SDI/SDO are daisy-chained together, so by the time you have eight boards attached, you have a single MidiBox digital out feeding eight inputs.

I have not looked deeper, but most TTL signals offer a max "fan-out" of ten. I'm guessing eight is a safe limit.

But I could be wrong, I have not tested it yet.

Better to stop too soon than to build a less reliable device.

Workarounds include:

1>Using buffers to "pump up" the digital signals before we use them.

2> Buffering them at every channel board (more chips, bigger board BOOoo!)

3> Using a separate pins for every group of eight. (easy to do)

4> Just keep adding on until it fails, then remove the last two channel boards for margin! (Unfortunately, this is likely to be the most popular)

As always, I'm open for suggestions, discussion or friendly debate.

LyleHaze

Share this post


Link to post
Share on other sites

This is good news actually :0)  I was thinking that the limitations stretched beyond the TTL fanning.  Even as it stands with 8 cards as the maximum I think the design is great, and I wouldn't want you loaded down with any more requirements :)  However, I have a feeling myself and stryd are "thinking big" so it's nice to know the limit of cards could be increased.. perhaps dramatically  ;) ;D 8)

Share this post


Link to post
Share on other sites

Some more thought..

Using "old school" 74XX buffers would have a much greater fan-out into CMOS inputs, though I'd have to check the "defined levels" for compatibility. I usually avoid the need by sticking to a single logic family.

If we run a lot more than eight, we might be better off running in groups of eight at a time, just for access time. The entire "line" has to be re-loaded for every change. I'm sure that eight boards is not a problem, but 16 will take twice as long. I wonder at what point it will become noticeable?

I have burned out on Eagle, so I switched over to MPLab today. I'm doing a re-write of the software to support using a single channel board for each mono input. I'm trying to add cool stuff, but I readily admit that I'm writing to serve needs that are far beyond my own.

At some point in the next few days I hope to diagram what I'm putting together, and again request feedback and suggestions. I don't even know the right terminology to describe the signal path. Mono input has gain and level, then panned into the main stereo pair. Also support for two separate mono effects busses, each may be selected as pre or post-fader, each has it's own associated FX send level.

Mute control. How far does mute go? Just the main, Just the FX, one for each?

I'll plot out the CC numbers for each control tonight.

Code more tomorrow.

If you can contribute to the above description, please do!

LyleHaze

Edit: CC7 = Channel Volume. For the "main stereo mix" and "Post Fader FX"

CC8 / 10 = Pan/balance (combined) for the main stereo mix

CC11 Expression. A "secondary" volume control, sometimes used for fading without altering the mix levels.

CC12 FX1 level

CC13 FX2 Level

CC80 to 83: "General Purpose" buttons, possibly we could use to select FX1 Pre/Post, FX2 Pre/Post, FX1Mute,FX2Mute

CC96 "Increment".. Channel Volume?

CC97 "Decrement".. Channel Volume?

CC120 "All Sound Off".. By mutes, or full preset?

After an "All Sound Off", how do we get it back "On"??

CC121 "Reset All Controllers". Sounds like we could load a "preset all to default state". User defines that state!

I'm gonna have fun with this one!

I still need to research "SysEx Master Volume". I saw it somewhere around here.

Lyle

LyleHaze

Share this post


Link to post
Share on other sites

The limit is not an audio one, it's about two of the three digital signals that control the mixer. (CS and SCLK, I think)

The all the digital signals EXCEPT for SDI/SDO are daisy-chained together, so by the time you have eight boards attached, you have a single MidiBox digital out feeding eight inputs.

Bah we can get around those kind of problems.... However I'm still trying to nut out how you've done it... I can't find anything in the doc about the digital signals....

I would have thought that the way you'd do it is to chain the serial IO and clock, buffered up if necessary (which it should not be for the SDI/O, but maybe for the clock), and have an SR driving the chip selects?

I wonder at what point it will become noticeable?

As for the latency concerns if it gets really big...well if people like moogah and I want to be stupid about things then we can figure out a multi-core design. Don't sweat about making your design work with my little dreams ;) If you really want to know, you'll hear it at about 2ms, so divide that by the time it takes to load a PGA chip.

How far does mute go? Just the main, Just the FX, one for each?

Mute = Mute, kill it all.

CC96 "Increment".. Channel Volume?

CC97 "Decrement".. Channel Volume?

Yeh but I wouldn't bother, pretty much nothing else uses these CC's

CC120 "All Sound Off".. By mutes, or full preset?

Mute the master out

After an "All Sound Off", how do we get it back "On"??

Unmute

CC121 "Reset All Controllers". Sounds like we could load a "preset all to default state". User defines that state!

Default should really be all at 0.... Keeps the monitors safe ;)

I still need to research "SysEx Master Volume". I saw it somewhere around here.

Err, I forget... http://www.borg.com/~jglatt/tech/midispec.htm ;)

Share this post


Link to post
Share on other sites

(I screwed up the quoting.. Work with me here!)

Bah we can get around those kind of problems.... However I'm still trying to nut out how you've done it... I can't find anything in the doc about the digital signals....

You probably won't. Signal "Fan Out" is a property of the technology used. TTL, LSTTL, HCT, CMOS etc. It's a very "old school" kind of problem. Most families have a fan-out of 10 within the same family. Between different families you have to make sure that "high" is high enough, "Low" is low enough, and then figure fan-out based on strength.

Because it's common to entire families, it's not usually even mentioned in the datasheets.

[edit] Oh, Duh again. In MY doc.

The eight stackpins on the right side carry digitals.

Six pass straight through, common to all boards.

(in no particular order) MUTE,ZCEN,+5V,GND,CS,SCLK

In the other two holes, SDI and SDO, we need to chain each output to the next input. We cannot do this "straight through" as that would be a common buss. So we install one stack socket facing UP, and the other facing DOWN, both with their tails cut off. then take about 3/4" long .025 square post(cut off a WW socket?) and bend into a slight "Z" shape. Cut to finished length of about 1/2", and insert between successive boards from the bottom SDO to the top SDI. Repeat for every level.

I hope that explains it. [end edit]

I would have thought that the way you'd do it is to chain the serial IO and clock, buffered up if necessary (which it should not be for the SDI/O, but maybe for the clock), and have an SR driving the chip selects?

Close, but CS and Clock are  common to all in the line. The SDO/SDI line needs no buffering, as each has a load of 1.

All the CS lines are supposed to go low at once (for a given set of 8/16)

We can buffer CS and Clock, heck, we may not need to if the PIC outputs are strong enough. The next obstacle to a long chain is the MIDI standard. Unless you want to adopt a private messaging system, we have only 16 channels to work with. (or 16 per series stack)

As for the latency concerns if it gets really big...well if people like moogah and I want to be stupid about things then we can figure out a multi-core design. Don't sweat about making your design work with my little dreams ;) If you really want to know, you'll hear it at about 2ms, so divide that by the time it takes to load a PGA chip.

Thanks, I'll do the math later. :-)

Mute = Mute, kill it all.

I can do that. But having separate mutes to toggle means we don't lose the level setting, it will go back to where it was when unmuted. Maybe that's good, maybe not.

CC96 "Increment".. Channel Volume?

CC97 "Decrement".. Channel Volume?

Yeh but I wouldn't bother, pretty much nothing else uses these CC's

I'm planning an IR receiver for standard remote controls.

That will need INC and DEC to operate.

CC120 "All Sound Off".. By mutes, or full preset?

Mute the master out

After an "All Sound Off", how do we get it back "On"??

Unmute

Yeah, I guess it can be turned on and off. Duh.

CC121 "Reset All Controllers". Sounds like we could load a "preset all to default state". User defines that state!

Default should really be all at 0.... Keeps the monitors safe ;)

I started the math today. It's coming well.

I will be leaving town next week for 10 days, so there will be a break in my work. Don't worry, I'm going to finish this.

Make Beautiful Music,

LyleHaze

Share this post


Link to post
Share on other sites

Heheh yeh, so it's what I said, except no individually driven chip selects :) I did learn a cool thing from all this: fan-out has a name! hehehe ... I still don't see the limitation though.....doh.

The next obstacle to a long chain is the MIDI standard. Unless you want to adopt a private messaging system, we have only 16 channels to work with. (or 16 per series stack)

Use a midi note to select the stack? Use NRPN's? I dunno though, 16*126 CC's is a lot! Might be worth looking at some digi mixer manuals to see how they do it?

having separate mutes to toggle means we don't lose the level setting, it will go back to where it was when unmuted. Maybe that's good, maybe not.

Can't you store the original level in ram, so it's all controllable?

I'm planning an IR receiver for standard remote controls.

That will need INC and DEC to operate.

Groovy! I'd say volume then, yeh.

Yeah, I guess it can be turned on and off. Duh.

Yeh, I dunno how the chip works but worst case is that you have to save the level before you mute...

I will be leaving town next week for 10 days, so there will be a break in my work. Don't worry, I'm going to finish this.

Enjoy your break man!

Share this post


Link to post
Share on other sites

The fan-out limitation: I'll go a little deeper.

A single pin on the PIC18F chip (on the core) is

driving.. let's say SCLK for the PGA chain.

It connects via J10 (I think) to the first channel

board, and the second, and the third, and the forth

et-cetera.. That signal moves pretty fast, as it "clocks" all the data being moved through the chain. Each channel board "loads" the signal a little more. At some point, it's not strong enough to carry cleanly to all the channel boards listening to it. The "Fan-Out" has been exceeded, and the signal integrity is lost.

Since each SDO pin goes only to the next boards SDI input, there is no fan-out problem, but the SCLK and CS may have issues. (or WILL have issues when enough boards are attached)

Regarding memory, it's not in the PGAs, it's in the core. The current plan includes (all RAM)

64 bytes of ram to support the "output image" for 16 channel boards. (I don't know if the hardware will support it, but the software will! :-)

An array of ram sized at maxchannels (16?) * at least 6 bytes.

The bytes of ram include the most recently received values for that channel:

CC7 volume

CC8or10 Bal/Pan

CC11 Expression

CC12 FX1

CC13 FX2

A byte of "flag bits" holding FX1 Pre/Post, FX2 Pre/Post,FX1 Mute, FX2 Mute

(The previous all controlled by CC80 through CC83)

Then some other choice bits, does this channel follow master volume? Will this channel follow ANY channels Expression settings? (for ganging faders) And whatever else I dream up.

The program will use the values in the CC registers to "create" an image to send out to the PGA chips. It's the same as the current program, just a bit more complex. As a last step it also does a lin to log conversion, so the feel of the controls is correct.

Example gain setting for the left channel is:

((128-Pan)*Volume*Expression*16)/65536

saturate at 255, then convert to Log by LUT and

put the result in the output image table for the left channel.

The right is just slightly different:

Pan*Vol*Exp*16/65536.

Obviously pan takes one up and the other down.

I like the idea of being able to select each Effect as Pre or Post "on the fly". I can picture a "perfect" control deck for this, but I know there are people here with MUCH better skills than I to build that.

I need to go find code for multiplying 3 8 bit numbers into a 24 bit result.

Party On,

LyleHaze

Share this post


Link to post
Share on other sites

Argh browser crash, just as I was finishing my reply. Minefield is living up to it's name...

The fan-out limitation

Still seems to me that it could be avoided by buffering though... MTE and I bumped into this when doing his 8-nokia-screen thing... I was trying to find the bug in my code for days until (i think it was seppo) pointed it out.... buffering it fixed it right up :)

Of course, there will be limitations in the PIC as far as how many it can handle in software, but, in theory, the fan-out limit should be avoidable?

Regarding memory, it's not in the PGAs, it's in the core.

Yeh that's perfect - you'll have CC7 stored, so 'software unmuting' would just be returning to that level :)

I like the idea of being able to select each Effect as Pre or Post "on the fly".

Would be nice :)

I need to go find code for multiplying 3 8 bit numbers into a 24 bit result.

First stop for me is always www.piclist.com 's source code repository.

MULWF will get you 8b*8b into 16b, so you just need a 16b*8b...

Check out the theory here: http://www.8052.com/mul16.phtml

Or there's actually a lot of good google hits (for a change): http://www.google.com.au/search?hl=en&as_q=8bit+16bit+multiply

Maybe scope out the microchip site for an appnote too, or even atmel's, because some of them use a 8*8 hardware mult too.... Or write it in C and see what the output .asm file looks like... The later versions of SDCC seem to make better use of the MULWF instruction so you might get lucky :)

Share this post


Link to post
Share on other sites

I am happy to announce that Version 2 of the MidiBox Mixer is now ready.

Circuit boards have been designed and tested. The new software is ready.

As described previously, we now support optional Effects Loops, balanced and unbalanced inputs and outputs, save and load up to 64 full banks of presets, Effects pre/post switching (even on the fly!).

MIDI support for Volume, Balance/Pan, Expression, Master Volume, effects muting, channel and bank load and save, and a command to transmit all current settings, to support C.S. synchronization or algorithmic manipulation.

Also included is ANSI C source for a command-line program to easily create MIDI files that can configure or preset the mixing board.

This is a MIDI controlled analog audio mixer. It is completely "solid state". It has no pots or sliders, and so it should never get "scratchy" with age. The audio path is all analog. The audio signals are never digitized. It can be configured for any combination of line level and high impedance inputs, balanced or unbalanced, as you wish. It is modular and expandable. so everyone gets to do it their own way.

I have zipped all the files for this project into a single file, including documentation in HTML format. It is under 3 Meg in size. So far I have been only clumsy in editing the WIKI. I'll try to get this file uploaded, or I'll ask for help like I did last time. The new file is MBMixV2.zip.

I want to thank everyone for your patience as I have worked through all the details.

Please post any questions or comments here in the forum if possible.

Make Beautiful Music,

LyleHaze

[edit] file attachments in this forum are limited to 1 Meg. The best place to put it is in the WIKI, but I can't figure out how to add new files to my namespace. Suggestions would be welcomed.

Share this post


Link to post
Share on other sites

great, i have still 8 pgas here already !

Share this post


Link to post
Share on other sites

While I'm waiting for some uploads to the WIKI, I thought I'd post a picture.

This is a stack of (from the bottom), 1 regulator board, 1 output board, and four channel boards.

These are built for a "Line Mixer" with unbalanced inputs, you can tell because each channel board has four input caps. If you look close, you'll see the output board is only populated for two output channels, meaning no effects loops here.

The stack fits well inside a 1U rack mount case. This was a requirement of the original design.

3561_StackinVise_png964978cbe869e8ac73e7

Share this post


Link to post
Share on other sites

Wow, great work - that looks good!

For the WIKI upload, go to the page you want to modify, click "Edit this page" on the bottom left, then an editor view will open. Place the cursor at the position in the text where you want your file/picture to appear. Then click the second button from the right "Add images and other files" (the one with the mountain and sun). A file selection dialog will pop up, scroll to the bottom, select the file to upload from your hard disk, press the "Upload" button - voilá. Now, too, a link to your file has been inserted at the text position where your cursor was located. When you save the modification it is visible for all.

Best regards, ilmenator

[edit: apparently, moderator status is needed to upload files to the Wiki?]

Share this post


Link to post
Share on other sites

Sooo nice, got to find my stack of PGAs...

/offe

Share this post


Link to post
Share on other sites

ilmenator:

Thanks for the reply. I tried it again in the playground, no luck.

When I "Add Image and Other files" I get a namespace selector.

I am allowed only to use files already in my namespace.

Unless maybe I have rights in the MBMix space that I do NOT

have in the playground. I'll get back to you on that.

Thanks Again,

LyleHaze

[edit] I tried the playground and the MBMixer docs, with Firefox and IE6.

I can edit text and include existing images, but I cannot upload new ones.

I'm going to cut and paste hte new docs into the WIKI (text) and add the

pictures after I get them uploaded.. Thanks Anyway!

Share this post


Link to post
Share on other sites

All:

The WIKI has been updated with the latest docs.

Lots of photos and drawings have been added.

The source code to MBMix ver 2 is there, as well as the source to configmixer, lots of assorted help files, and the most complete build guide I have written yet.

If you're interested, please take a look

http://www.midibox.org/dokuwiki/midiboxmixer

as always, comments are welcomed.

LyleHaze[me=lylehaze]is tired of typing.[/me]

Share this post


Link to post
Share on other sites

lookin good, lh

need some syrup on that stack...

Share this post


Link to post
Share on other sites

Awesome

Share this post


Link to post
Share on other sites

I've been browsing the wiki and must say this project look really cool and extencive. I will read through the complete thread now to gain some more understanding. What is the future plans for the mb mixer? In the wiki I read: "Circuit boards are available." I'd love to build my own. PCB's are not available yet, are thay? Are the .brd files available?

Share this post


Link to post
Share on other sites

I don't know if anybody has some pcbs. I did some layout and have 2 protos lying around. bUT i didnt had the time to test them. And I dont want to publish non working pcbs ;P

outdated ... i am arranging a bulk for Lyles great pcbs. Look under Bulk orders.

greetz

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now