ADA Depot - A Forum To Support Users of ADA Amplification Gear

Miscellaneous => Discussions => Topic started by: MikeB on April 22, 2014, 05:11:51 PM

Title: midi foot controllers
Post by: MikeB on April 22, 2014, 05:11:51 PM
I'm curious to know what you guys are using to control your midi stuff.  I was happily cruising along for years with an MP1 and no effects at all (budgetary constraints) so the MC-1 was perfect.  However, I have recently added a TC-electric G Major 2 to my rack and this thing can do a lot more than just change programs; continuous control of parameters using an expression pedal, for example.  So, I started looking for an alternative to the MC-1.  Ideally, something just like the MXC that came with the MP-2.  Couldn't find a lot out there and in the end I settled on the Behringer FCB-1010.  In fact, I couldn't really find anything else that had what I wanted.  I'm pretty happy with this controller.  It has its faults but ultimately it can drive the G Major the way it was meant to be driven.  Reasonable price too.

The thing that I am interested in particularly, is what alternatives are out there.  Am I just crap at searching the internet?  What do you guys use?
Title: Re: midi foot controllers
Post by: Dante on April 22, 2014, 08:59:51 PM
I guess I'm not gonna be much help, I use the ADA MXC with a Quad switch and the CC pedal.

I don't know for sure but, I would think the G-major would be able to accept controls from the Quad switch on an MXC controller. That is a Godsend for me. I have a friend who uses a Ground Control, but those are kinda pricey.
Title: Re: midi foot controllers
Post by: MikeB on April 22, 2014, 09:39:00 PM
The MXC would be ideal.  The main advantage it has over the FCB-1010 is the quad switch for sending CCs.  The FCB can still do it, but it gets messy and you end up sacrificing a program change for a Control Change.  That I don't mind so much (who needs 10 different patches in a song anyway) but it bugs me that if I do that then the light stays on next to the switch that did the CC rather than illuminating switch for the patch that I am currently on.  This is also a nit-pick, because who really loses track of which patch they are currently using.  My setup is a long way from being so complex that this becomes an issue.  I just think that for neatness it would be good to have some separate switches that I could use for CC and for tapping etc.  The Ground Control looks good.  Probably a good thing for my bank account that I didn't find it first.

Not sure if the G-Major 2 will accept the quad switch directly.  My impression is that it is intended for an expression pedal.
Title: Re: midi foot controllers
Post by: rnolan on April 23, 2014, 06:01:21 AM
Not sure if the G-Major 2 will accept the quad switch directly.  My impression is that it is intended for an expression pedal.
The Quad switch works through the MXC (as does the expression pedal), that's not to say it (quad switch) wouldn't work with other midi CC pedals that accept a stereo lead in for CC chages, just haven't come across that except with the MXC.  The TC wants/needs midi CC messages, so 5 pin midi lead, or otherwise, generally not talking midi...  The pedal and the quad switch need their signals turned into midi/midi CC data, that's done in the MXC and also in the FCB-1010, the MXC probably has a Zialog Z80 CPU (hey Mike, we know how to program one of those  ;) , albeit in Pascal...), I'm pretty sure that's what's in the MC1 pedal to make it tick/midi etc.
Title: Re: midi foot controllers
Post by: rnolan on April 23, 2014, 06:28:08 AM
After a sip of wine and a quick cigarette (Mike will understand, it's where I do my thinking at 11pm...) I'd proffer this:
Midi is just another (allbit quite specific) network protocol (like UDP, TCP, NTP etc), it's probably more like UDP than anything else ?? (i.e trusted packets).  What comes out of the quad switch or CC pedal gets turned into (by some code running on a CPU) midi data streams/messages which are then sent and received, acknowledged (2 way hand shake), interpreted and used at the other end (e.g. Mikes TC or my MP2).  So these smarts/CPU etc are in the pedal circuit (MXC, FCB-1010 etc).  In Mikes case, the FCB-1010 has the switches/CCs' built in, with the MXC they are plug ins (CC pedal/quad switch) but the program change buttons are built in.  Also the software/firmware that runs it all is quite a bit different (more versatile is my understanding) in the FCB-1010 (more options).
Title: Re: midi foot controllers
Post by: MarshallJMP on April 23, 2014, 01:47:01 PM
The MXC and MXP use a 8051 µcontroller,no eprom,the 8051 has 4kB internal memory..The MC-1 has a Z80,with eprom.

Midi is actually a serial 8 bit protocol with a baudrate of 31.25kb/s.It will send out 2 or 3 bytes.

For us guitar players only 2 things from the protocol are used,program change and control change (and some midi sysex,but that depends on the manufacturer).

Program change uses only 2 bytes,control change uses 3 bytes.

First byte is the status byte,the first nibble (or 4 bits) of the status byte is the event.In case of program change it will be 1100,control change is 1011.The second nibble is the midi channel (0000 =channel 1,1111 = channel 16).

Second and thirt byte are the data bytes.So for program change there is only one,the first bit is always 0,the other 7 bits represent the program number.So for example 00000000 will be program nr 1,altough it's actually 0 most effect will add a 1 to this number so it's actually program change nr one.0111111 will be nr 128.This is why midi only goes to 128,altough you can always do a bank select to go higher but usually this is not supported on older gear.

Control change uses 2 databytes,first byte also starts with a 0 bit ,the other 7 bits are the controller nr.There are 120 control nrs,nr 120 to 127 are reserved as channel mode messages.The last byte starts again with a 0 and the other 7 bits are the value of the controller which goes from 0 to 127.

So if you sent 11000000 00000001 that means a program change on midi channel 1 program 1

11010000 00000011 01111111 means control change mid channel 1 controller nr 3 value 127

Does this make any sense  :banana-rasta:
Title: Re: midi foot controllers
Post by: MikeB on April 23, 2014, 04:38:14 PM
Oh.  Well that clears that up then.  Thanks guys.   :dunno:

Richard, I'm afraid to say that MJMP made much more sense than you.  Perhaps he is doing his posting pre-wine.   ;)

So the MXC Quad switch is a stereo lead into the MXC itself.  Then it is unlikely that it will work directly on the TC.  The FCB-1010 will take a midi-in so that I can daisy chain more midi controllers.  If I could find one that was like the Quad Switch but that output midi CC messages then I would be in business.  Then there is only the power supply to consider.  No phantom power on the 1010.  One day when the warranty runs out I might look at hacking it.
Title: Re: midi foot controllers
Post by: MarshallJMP on April 24, 2014, 03:57:41 AM
The quad switch will only work on the MXC pedal.

So why don't we build a ADAdepot midi switcher.Everybody can join in.I just bought this experiment board from mikroelektronika.It's pic based. http://www.mikroe.com/easypic/ .I also have a license for picbasic  http://www.mikroe.com/mikrobasic/pic/ .This software can be downloaded for free and you can use it for free up to 2 k words of output code.

This way i can make something that will resemble the MXC.But with  build in buttons for program change and control change and for 2 or even more swell pedals.The case,well you can make what ever suits you. I would suggest 12 buttons for the program change (up,down and 0-9) and let's say 8 buttons for control change and 2 swell pedals.
Title: Re: midi foot controllers
Post by: rnolan on April 24, 2014, 06:26:03 AM
Go MJMP, man I'm in, this is a goood project. BTW many thanks for the Midi protocol brief/summary, and yes it's makes lots of sense  :thumb-up: well I get it...so to me anyway,  well I spose both Mike (in his former life) and I are computer dudes (these days I do ICT Security).  When Mike and I were at Uni together (him straight from school, me as a 36 y/o mature age entry) we had to write a Pascal program to emulate/simulate a Z80, kind of developed a soft spot for it.... Anyway I'm happy to help!!  Maybe Mike and I can do some programming together again (guitar playing is probably more fun but we were a good team...)
I would suggest 12 buttons for the program change (up,down and 0-9) and let's say 8 buttons for control change and 2 swell pedals.
Sounds like a good place to start, plenty of versatility, 2 swell pedals is good (hey mike similar to the Behringer, is there any thing/features it offers we should consider ?)
Of course it needs a 7 pin lead and would be good if it ran on the same power supply set up as the ADA pedals (minimal fuss).
Title: Re: midi foot controllers
Post by: MarshallJMP on April 24, 2014, 06:44:00 AM
The Z80 is a good controller but it's kinda ancient.I would go for a modern pic controller like a PIC18F45K22.It has 32kB intern flash memory,cpu speed 16 MIPS which is mooooooooooore then enough for a midi pedal.It has 2 UARTS (we only need one) and every input can be used as a ADC (analog -digital convertor).For the rest 1536 RAM bytes and 256 EEPROM bytes.

http://www.microchip.com/wwwproducts/Devices.aspx?dDocName=en546239

So any help is welcome especially in the programming section.


Title: Re: midi foot controllers
Post by: rnolan on April 24, 2014, 07:12:25 AM
Hey MJMP, totally agree (the Z80 is ancient), and absolutely happy to help with the programming (or any other way I can).  So point us (I assume Mike is in, but his call) where you need/like us to help  :thumb-up:
Another project worth doing simultaneously IMHO (and Machinator sort of dobbed you in for, coz he's to busy...well he said you were eminently suited for the task) is to develop my tube rack mount line mixer idea (~ 8 in, 6 sends, (maybe some aux returns) make connecting every thing easier and keep the analogue signal path) (so e.g. 4 12AX7s (1 triode per channel)).  Mike's comment on this line mixer idea was can it be Midi programable, well sure, but why/how, I was thinking of something a bit more simple.
Title: Re: midi foot controllers
Post by: MarshallJMP on April 24, 2014, 07:26:29 AM
Wow making a tube mixer is an all other thing then making a midi controller.The R&D will be quite expensive.Making a controller is nothing,it's just a small pcb,not many (inexpensive)parts,no expensive transformers.It's not that i don't want to help you out but you should consider that it will cost around 500 to 1000 euro's to make something like that.This is only for parts.You need to know that usually the first few prototypes will have buggs in them and it's not cheap to make prototype pcb's,since you only buy one pcb.
Title: Re: midi foot controllers
Post by: rnolan on April 24, 2014, 07:53:46 AM
Hey MJMP, many thanks for the perspective (and you are quite right, the R&D will be ex$ve), but hey on one hand one can dream  >:D but I'd be ok with putting some $'s toward it, the idea is good I recon, can we do it (in any way) more cost effectively ?  I just want us to all have access to something to plug our stuff together in the best way possible. (good for keyboard players as well)
Title: Re: midi foot controllers
Post by: MarshallJMP on April 24, 2014, 08:49:49 AM
Problem is you know where you start but you don't know where it's going to end if you know what i mean.The chance that it will work perfect the first time is slim,especially with the thing you want to build.Alot of things could go wrong.Let's say you have a nasty hum or groundloop somewhere,you need to rebuild it all,so that means a new pcb plus all new parts (unless for the really expensive ones).To give you an example.Years ago i builded a midi patchbay,when it was finished it costed around 500 euro.See pics.
Title: Re: midi foot controllers
Post by: rnolan on April 24, 2014, 09:04:12 AM
Hey MJMP, I get where you are coming from, and you are totally correct, but does that mean we shouldn't try ?  Hey not that we need to do it, the midi pedal would be a good starting point though (and maybe we could build in your midi patch bay  >:D )
Title: Re: midi foot controllers
Post by: MarshallJMP on April 24, 2014, 02:03:46 PM
Let's start with the midi pedal and we'll see how that works out. ;D

BTW these guys sell what you need  http://www.manley.com/m162l.php
Title: Re: midi foot controllers
Post by: MikeB on April 24, 2014, 04:24:16 PM
Oooh, a project.  I like that idea.  I'll put together a wish list.  However, I did think: are we not just building a ground control?

So, this project got me to thinking about stuff that I like about the FCB-1010.  One of the features that I use is the ability for a switch to send on multiple channels at once.  That way I don't have to do any mapping in my units, the combinations of ADA patches and effects patches are dealt with by the pedal.  This seems to work pretty well but there is one thing that I have noticed and now I'm wondering if its because of this multiple channel thingy.  When I change programs, the G-Major is always just a tiny little bit behind the ADA.  Is this because the pedal is sending two messages and so the second one is delayed (I would have thought that it would be pretty much instantaneous) or just that the TC has more to do in changing programs and so takes longer.  The upshot of this delay is that I have to be a bit early on my program changes or else I end up missing the attack on my first distorted note/chord.  This is one of the reasons why I am going to setup a parallel loop so that the ADA signal can't get held up by something else.
Title: Re: midi foot controllers
Post by: WickedBlade on April 25, 2014, 12:25:19 AM
As some already know, I built my own MIDI controller a few years back, based on the MIDIBOX project (using an 8-bit PIC controller).
I've stopped documenting it midway unfortunately, you can find some info there (http://www.midibox.org/dokuwiki/doku.php?id=wickedblade).

It works but I had to cut out the loop switcher side of it because there was electromagnetic noise (from the PIC I think) that induced a 1KHz noise in the audio, very noticeable. The MIDI controller side is perfect for my needs, basically I can control my MP-1, Replifex, and Voodoo Labs GCX any way I want (99 banks of 5 patches), and with 2 expression pedals that I can assign freely.

I've started working on a PC Editor and SYSEX dialog with the unit, but I'm apparently too lazy to finish it.

I think if I had to start it all over I would go Arduino-based now.
Title: Re: midi foot controllers
Post by: rnolan on April 25, 2014, 04:22:44 AM
Let's start with the midi pedal and we'll see how that works out. ;D

BTW these guys sell what you need  http://www.manley.com/m162l.php
Good idea  :thumb-up: , I checked out the manley page, nice gear (5hz to 100khz (nice), you can do sony super audio as it goes flat to 100khz (2GHz sampling rate)).  I'd need to go for the big one to get enough aux sends ($25k ouch) and I only want/need 8 channels.  Also my dreamy idea is 2 RU max so it can go in an ADA rack rig.  I did a face plate layout a while ago (pencil on paper).  The idea also suffered from lots of scope creep (handle mic inputs/48v/phase reverse etc).  But from what the manley guys are doing, there is a market for it. So maybe one day..
Title: Re: midi foot controllers
Post by: rnolan on April 25, 2014, 04:43:33 AM
This one would work (http://www.manley.com/mmbb.php), 3 x stereo ins, run all the effects as inserts (8)  :whoohoo!:
Title: Re: midi foot controllers
Post by: WickedBlade on April 25, 2014, 10:21:24 AM
I found an old picture of my DIY MIDI controller, I'm guessing it's quite close to what you're all aiming for, except that I gave a different role to some switches (I have basically 5 for patch selection, 2 for bank selection, one for Tap Tempo, and the 4 remaining ones are 'modifiers', basically they can send control changes to activate effects or pedals on the fly).

Not on picture but you can plug 2 expression pedals (you can see the labels for the inputs), and I have room for amp channel switching which I never got around to actually implement in software (can't remember if I actually did the hardware part).

And of course there are 2 buttons and 2 rotary encoders for parameter edition (knobs missing on the picture), an LCD screen and 2 digits LED display.
Title: Re: midi foot controllers
Post by: MarshallJMP on April 25, 2014, 11:08:05 AM
Hey Rnolan,why would like to have a tube based mixer?Just wondering how you did get this idea,did you try one and did you like it so much or....

WB,well i remember this project.We did discuss some solutions how you could try to get rid of the 1kHz signal.
Just a quick question,do you display the program number on the led or lcd display ,or both?Just wondering of the lcd is big enough to read the number.
Title: Re: midi foot controllers
Post by: WickedBlade on April 25, 2014, 11:28:39 AM
Yeah MJMP you were a big help with this issue. I think I understand where it comes from now.

Back to your question, the LCD display shows the name of the bank on the first line and the name of the patch on the second line. I find that quite legible, though small, but in a live situation it's faster to have a quick look at the 7-segment LED display. The LCD however is invaluable when it comes to edition.
Title: Re: midi foot controllers
Post by: MarshallJMP on April 25, 2014, 11:50:23 AM
What did you find out?
Title: Re: midi foot controllers
Post by: MarshallJMP on April 25, 2014, 11:57:13 AM
Just found this

http://www.mikroe.com/ready/pic/

Very cheap and it even has a bootloader so you can do updates with a pc and a usb connection.Would be nice to use it for a midi pedal.
Title: Re: midi foot controllers
Post by: WickedBlade on April 26, 2014, 12:15:26 PM
What did you find out?
IIRC, I believe the issue is electromagnetic, not a problem of actual signal noise. From what I gather, it is due to the fact that the PIC is programmed to regularly poll the 74HC165 in the Digital In module (DIN), to get the status of the switches/encoders and see if anything has changed. The polling is done at a 1kHz frequency which is the pitch of the noise I hear.

I'm not sure I've really eliminated all other possible causes, but I seem to remember that taking the DIN module out of the circuit eliminated the noise, whereas taking the Digital Out module (which uses 74HC595 chips to refresh the various leds and relays just as frequently) wasn't helping.

I've since thought of ways to be more clever in finding out if the 74HC165 need to be polled, but that would mean reprogramming the core software of MIDIBOX (the kernel, basically), which I have no desire to do (I have the skill and know-how, but I'm a lazy person :) )
Title: Re: midi foot controllers
Post by: WickedBlade on April 26, 2014, 12:22:45 PM
Just found this

http://www.mikroe.com/ready/pic/

Very cheap and it even has a bootloader so you can do updates with a pc and a usb connection.Would be nice to use it for a midi pedal.

I believe that using a PIC is more painful than necessary though. Some ARM chip or something like that would be easier to program. The PICs have many limitations, and I couldn't find a decent C compiler (SDCC is working but incomplete) let alone a C++ compiler, and this makes the programming side difficult. And I know from experience that programming the edition interface for that kind of pedal is actually quite a job (not difficult, but complex), and if you cannot use a decent language and are stuck with assembly you're basically missing a whole bunch of helpers and checks that a full-fledged language can provide.

It's still feasible (I did it in that limited C language that SDCC supports on PIC) but what would have been a breeze on many platforms was a tedious process here.

(And don't get me started on the Basic language, I'm talking decent language here)
Title: Re: midi foot controllers
Post by: MarshallJMP on April 26, 2014, 01:35:28 PM
Check out this C compiler for pic  http://www.mikroe.com/mikroc/pic/ it's free if you don't have more then 2k words of code.

The new 18F pics are alot better then the older 16F series.I just want to keep it very cheap and easy so anyone can build one and with the bootloader it's easy to update.

I use the basic compiler from mikroelektronika  because i hate programming in C,works like a charm.I wanted the pascal version but my son was also interested in programming (he doesn't had any experience) so i decided to go for the basic compiler,since it's quite easy to learn.
Now these compilers have alot of library's,this makes programming alot easier.Alot easier then the basic compiler i used for my midi patcher.
I'm actually making the hardware schematic now.How did you read the switches?I'm thinking of using a 5 x 5 matrix so you can hookup 25 switches,just hope it's quick enough.Did you use a 74LS165?
Title: Re: midi foot controllers
Post by: WickedBlade on April 26, 2014, 03:11:07 PM
You make good points MJMP, and I do hope I'm not so proud as too change my mind when good arguments come into play :)

That C compiler might be nice. I see it has its own IDE as well. I must admit I went with SDCC because that's what MIDIBOX advises. Also the other compilers I've looked at were all free/open source, so MikroC wasn't one of them.

That being said, out of curiosity I had a look at the program I wrote for my board, and it's 175 kbytes. And that's without even the core of the MIDIBOX software there, so we might get a surprise regarding the actual amount of code that your project requires.

Your point on the various families of PICs is very valid. But I used a 18F4620, which is still very basic, kind of like a Z80, but the most frustrating was the way it accesses memory, I also had to be wary of the executable size which is pretty limited on my PIC. The rest was mostly ok. I don't think you need much power anyway (except to do fancy stuff for playing with the expression pedals curves).

I understand your pain dealing with C, but as my daily job involves programming in C++, this is not daunting to me, and I appreciate the power of the language compared to Basic. But if you can get useful libraries it's still doable. In my opinion though, the executable produced with a Basic compiler would be much slower and bigger than the equivalent written in C/C++, and that is something to consider with PIC chips.
I did start with Basic when I was very young though, it's a nice and easy first step into programming.

All that being said, "if it works for you, then it's the right tool". Did I mention that I'm a software engineer? That may shed some light on my stance...

Anyway, as for the hardware, which is clearly not my field of expertise, all I can say is that I used cascaded 74HC165 chips, and that's only because it's what the MIDIBOX project is using.. I'm pretty lost when it comes to finding the right chip for an electronics project. I understand the basics of datasheets (part of my education, where I studied a wee bit in electronics) but that's about all. I don't know how to go about finding out a chip to get a job done.

While I'm at it, a word on the power supply. You're probably more aware of this than I, but using a 780x voltage regulator turned out to be a bad idea, because with the various LEDs and the LCD display, the current drawn makes the regulator go very hot, even with a heatsink attached. So I had to swap that for a chip I found on ebay, it takes almost the same space and the same pinouts as a 780x. I suspect it's just a cleverly packaged circuit using more traditional circuit (I cannot remember the chips involved right now, sorry!), not using a switching technique. That works well. Why did I use that obscure chip, you may ask? Because I didn't want to make a whole new PCB board just to change the power section (I'm lazy, I tell you!).

All this was so long ago! It appears I have not documented my project as well as I should have! Anyway, if you have more questions I'll be happy to oblige. Just remember that I'm a software guy, not a hardware guy :)
Title: Re: midi foot controllers
Post by: MarshallJMP on April 26, 2014, 04:07:59 PM
175kB!!! is that the program code or the hex file?I know for my midi switcher i had a hex code of 4kB and i used 129 bytes of eeprom to store the patches.128 patches and one byte to remember the last patch.I used 12 inputs directly for the buttons and 8 outs through a ULN2008 to drive the relais.And then Rx and Tx for midi out and midi in.Also attached was the LCD in 4 bit mode.I also used the 7805 and didn't even had to cool it extra.

I don't think you can compare a 18F4620 with a Z80,the pic is faster,has flash,ram and eeprom memory,uart i²c spi etc...
A Z80 was very basic even a 8051 had more altough it wasn't faster then Z80 at the time.

C is a language that you need to maintain,if you don't work with it on daily base it hard to get familiar with it.That's why i like pascal and basic i guess.I'm more of a hardware guy ::)

Now the ready for pic board has a power supply on board,both 3.3 and 5V and you just need to hook up a wall adaptor (ac or dc).

Anyway gonna try the matrix thing for the switches (less ic's altough the 165 is a good idea).Look at this pic,it will give you an idea what i mean  http://www.extremenxt.com/matrix.html

As for the 7 seg led display I'll think i will go for a serial display like this one  http://www.mikroe.com/add-on-boards/display/serial-7seg-display/ The advantage is less connections and you don't need to refresh it,it's all done by the on board chip.

Don't know if we need an LCD or not,but it's easy to implement.
Title: Re: midi foot controllers
Post by: WickedBlade on April 27, 2014, 02:48:26 AM
I like this conversation we're having, it's interesting.

175kB!!! is that the program code or the hex file?I know for my midi switcher i had a hex code of 4kB and i used 129 bytes of eeprom to store the patches.128 patches and one byte to remember the last patch.
That's 175kB of C code. The hex file itself is 77kB. The bulk of the code is actually the part dealing with live edition. Reading the memory for patches and applying them is not complex and takes little code space, but dealing with menus and submenus and what to change in the patch at what time is what takes more code to implement.

For storing the patches I used one external 24LC512 chip which is 64kB. In them I store some global data too.
The global data is 70 bytes long. It contains mostly the names of my MIDI devices, so it actually depends on the maximum number of devices supported (I went for 4). It also contains the data saying which control change to send to which device for tap tempo, and the calibration data for the expression pedals.

The patches themselves are 112 bytes long (including 16 bytes for the patch name), which might seem big but keep in mind this includes space for my 'modifier' switches data. Finally the banks themselves take 16 bytes each, because I store a name for each of them.

So all in all, I've made the calculus and for 100 banks of 5 patches this takes 58331 bytes in memory. With the EPROM chip I have, I could support up to 12 devices, though. Another possibility would be to support up to 21 devices but with only 64 banks, but I don't see the point of supporting that many devices.

Quote
I used 12 inputs directly for the buttons and 8 outs through a ULN2008 to drive the relais.And then Rx and Tx for midi out and midi in.Also attached was the LCD in 4 bit mode.I also used the 7805 and didn't even had to cool it extra.
I use ULN chips too for the delays. I think what draws the most current is actually the 7-segment display.
BTW my power section is designed to support all kinds of power input, be they AC or DC, and if DC, any polarity, and basically any voltage higher than 5V (though more means more heat from the voltage regulator of course). That's kind of a relief, it means I can plug whatever power supply I have at hand.
And of course I wired a phantom power feature, using the 2 unused pins in a MIDI cable (ala VoodooLabs). A simple homemade adapter on the MP-1 side makes it easy to convert from 7 to 5 pin and transfer the phantom power to the correct pins.

Quote
I don't think you can compare a 18F4620 with a Z80,the pic is faster,has flash,ram and eeprom memory,uart i²c spi etc...
A Z80 was very basic even a 8051 had more altough it wasn't faster then Z80 at the time.
True, I was thinking more of the instruction set which is similar, because it's 8 bits. So that means mostly that you can add, subtract and multiply 8b registers and 16b registers, but if you need some kind of division operation, you're on your own.

Quote
C is a language that you need to maintain,if you don't work with it on daily base it hard to get familiar with it.That's why i like pascal and basic i guess.I'm more of a hardware guy ::)
Different perspectives, I maintain my C/C++ skills 5 days a week :)

Quote
Now the ready for pic board has a power supply on board,both 3.3 and 5V and you just need to hook up a wall adaptor (ac or dc).

Anyway gonna try the matrix thing for the switches (less ic's altough the 165 is a good idea).Look at this pic,it will give you an idea what i mean  http://www.extremenxt.com/matrix.html

As for the 7 seg led display I'll think i will go for a serial display like this one  http://www.mikroe.com/add-on-boards/display/serial-7seg-display/ The advantage is less connections and you don't need to refresh it,it's all done by the on board chip.
These would sure make life easier. I only went with what I did because of my limited knowledge in electronics and because I used standard modules from the MIDIBOX project. I like the idea of the matrix (but can it handle the case where the user pushes 2 switches at the same time for instance?) and the serial 7s display seems nice, that's not so far from my implementation which basically uses 2 74HC165, each driving one of the digits. Of course the serial 7s has the advantage of being able to handle more digits.

Quote
Don't know if we need an LCD or not,but it's easy to implement.
If you want to setup the board easily in a live situation, I think it's better to have some kind of sophisticated output. You could make do with a higher number of digits using a 7-segment dsplay (or more segments actually) as my old Zoom GFX-8 does, but an LCD nowadays doesn't cost much and it's so much better for interfacing with the user.
Title: Re: midi foot controllers
Post by: rnolan on April 27, 2014, 02:58:09 AM
Hey Rnolan,why would like to have a tube based mixer?Just wondering how you did get this idea,did you try one and did you like it so much or....
Good question MJMP, short answer: to complement the MP1/2 and to warm the digital effects (and smooth the signal after it being A/Ded and D/Aed (put some analogue reality back in))
Long answer  :)
From the start I've always used a mixer for my ADA set up, I still use the same Yamaha AM802 (8 in, 3 post aux sends) which was perfect for MP1, Quadverb, IPS33 (mono in 2 pitched notes out).  I don't recall ever using the MP1 loop.  So I run it like a PA, (not surprising I spose as I'm an audio engineer) and for various reasons (mostly gain structure, A/D converters), I don't like to chain gear together.  I'm also quite partial to tube input stages (I like the sound and warmth) but very much depends on what the signal is (from).  I probably wouldn't use a tube preamp for drums (maybe cymbals... worth trying ?), but definitely for vocals and guitar.
So back when Machinator was on the depot, I had this idea that I'd like to replace the Yamaha with a 2RU rack mixer and I'd prefer the inputs to be tube to complement the MP1/2 and to warm the digital effects (and smooth the signal after it being A/Ded and D/Aed (put some analogue reality back in and compensate for the vagaries of "what" goes in between the samples)).  So we started to chat about the idea, eventually I sat down and came up with a face plate layout (which suffered from serious scope creep as I decided to make it do everything from Mic ins with 48v, phase reverse, inserts, direct out, pre/post on sends, eq... etc (all the stuff I like on a good recording console)).  What I "need" for my ADA rig is a 2RU 8 in, 6 sends (bit of a cross between a stage monitor mixer and small mixer).  While there are lots of mixer offerings, when they get smaller, they generally have less sends so I've not found anything that has what I want.
Title: Re: midi foot controllers
Post by: MarshallJMP on April 28, 2014, 03:17:42 PM
RNolan,I'm not really convinced that a tube mixer will give you the desired effect,but i could be wrong.IMO a tube amp will give you a lot more tone wise.

WB,I'm curious how did you manage the pedal calibration,software wise?

Also you talk about different devices,do you mean sending stuff over different midi channels?
Title: Re: midi foot controllers
Post by: WickedBlade on April 29, 2014, 12:46:46 AM
WB,I'm curious how did you manage the pedal calibration,software wise?
I copied the behavior of my Zoom pedalboard: ask the user to put the pedal in the up and down positions, and note which values we read for each, this will give boundaries that should be mapped to 0.0-1.0 (or 0-127, whatever). In my case the MIDIBOX API reads voltage values encoded as a 12 bits integer, IIRC.
Also I think I tweak the boundaries a bit to get some stability, so there's a bit of a dead zone at each extreme position, but you don't really feel it.

Quote
Also you talk about different devices,do you mean sending stuff over different midi channels?
Yes, that's it, sorry I wasn't clearer. My pedal is able to send different program changes on different channels, thus removing the need to do some extra MIDI mapping on each of the devices themselves.
Title: Re: midi foot controllers
Post by: rnolan on April 29, 2014, 06:17:18 AM
RNolan,I'm not really convinced that a tube mixer will give you the desired effect,but i could be wrong.IMO a tube amp will give you a lot more tone wise.
Mmm you may be right, answering you question certainly got me thinking about it more.  E.g. I've always been happy with the B200s (MP1 and 2) so I'm not anti SS, now I have a Carvin TS100 all tube (6L6s'), and love it, does it add tone, maybe a little ?, bit like my old stereo, Mullard 20w mono blocks (EL34s') with QUAD 22 tube pre-amp (nice!).  What I can do is use my TLA Ivory 5001 quad valve preamp to feed the desk inputs and get an idea of the difference (if any discernable), should give me some idea.  Although tube or SS, I still need/want a 2RU 8 channel 6 post send desk so I can replace the old Yamaha AM802, and even if I could use a monitor mixer i.e. plenty of sends, they tend to be pre fader (or with switchable pre/post sends, expensive and large).  BTW I'm not really chasing tone, got that in spades with fingers/basswood body Anderson, Ultrasonic PUs, MP2, (more just trying to preserve it), just wanting good clean headroom for the MP2 and try to restore some (a little) analogue reality to the digitised stuff.  Make sense ??  Cheers R
Title: Re: midi foot controllers
Post by: MarshallJMP on April 29, 2014, 07:54:35 AM
Well what i'm trying to explain is that will it give you value for your money.You're in for some big $$$ and maybe the result will be very thin.
Title: Re: midi foot controllers
Post by: rnolan on April 29, 2014, 08:47:43 AM
Absolutely MJMP, it's in many ways a crazy idea (well maybe? a potentially good idea but probably quite expensive.... and you raised some very sobering points particularly re how much it would/could cost, and may I say thanks for that  :thumb-up: , although if I had the $s I would (attempt to) do it).  Part of the reason for the (almost endless) scope creep was that I wanted it to be a really versatile 2RU mixer that could be commercially produced and satisfy a range of applications.  E.g. you could build in noise gates for each channel (while you can buy this, it's not 2RU rack friendly), my tack is something that complements the average ADA rack set up and helps make it BETTER...
Title: Re: midi foot controllers
Post by: MarshallJMP on April 29, 2014, 03:44:23 PM
RN.
Well i look from a tech point of view,and i know what the aprox cost will be and you will never get value for the money you will put into it.But that said i'm always willing to help you out should you want to attempt to make one.

WB.
Can you explain a bit more in detail on how you did solve the pedal calibration?How did you do this in the software?
Title: Re: midi foot controllers
Post by: WickedBlade on April 30, 2014, 01:01:27 AM
WB.
Can you explain a bit more in detail on how you did solve the pedal calibration?How did you do this in the software?

Sure.
First a bit of background on the hardware side. Basically my expression pedals are wired 'directly' to pins of the PIC: pin 2 (RA0) for expr. pedal #1 and pin 3 (RA1) for pedal #2. This makes the PIC able to collect a 16 bits value from these, I think. When these values change significantly, the MIDIBOX kernel notifies might code, providing a value on 10bits (they remove the 'noise' by removing the least significant bits, a simple division by 2^6=64 I guess).

So how does the calibration work? I have a menu that asks the user to put the pedal in the minimum (up) position, and then click a button, at which point I read the value and store it in a variable named pedalMin. I then do the same for the maximum (down) position and note that in pedalMax.

My patches say that the user wants to map this to a range between valueMin (usually 0) and valueMax (usually 127). So when I want to send an expression value, I read the current 'position' of the pedal, let's call it pedalNow.

Now all there is left to do is a linear interpolation, i.e. the value to send is this:
Code: [Select]
valueNow = valueMin + (valueMax - valueMin) * (pedalNow - pedalMin) / (pedalMax - pedalMin)
If we note a range instead of a max value, then this becomes
Code: [Select]
valueNow = valueMin + valueRange * (pedalNow - pedalMin) / pedalRange

Note that you have to be careful when implementing because it is easy to go overbound (the intermediate values are greater than what a 16b register can store) and get incorrect results. For example in the 'worst' case you have valueRange * (pedalNow-pedalMin) that's equal to 127 * (2^10-1) = 127*1024 = 129921, which needs 17 bits to be encoded, when we have only 16bits in the registers.

An easy fix is to divide all our pedal values by 2, which makes them store on 9 bits, and then everything fits on 16b. This works, but as always you have to be careful not to lose too much precision in your calculus otherwise the behavior of the pedal would not feel linear but would go by leaps and bounds instead.

Also as I said, you can tweak the pedalMin and pedalMax values to make sure they always get reached even with small inconsistencies in the readings: add a tiny value to pedalMin and subtract the same to pedalMax. In practice this is unnoticeable to the user but makes sure we do not go out of bound. Also when reading the correct value I clamp it first for the same reason.

I hope this is not too complicated an explanation, that's about as simple as I can explain this...

In future work I'd like to include some curve simulation (i.e. have the values act as a log curve instead of linear) which is not that simple if you want to make it fast.
Title: Re: midi foot controllers
Post by: rnolan on April 30, 2014, 07:04:26 AM
RN.
Well i look from a tech point of view,and i know what the aprox cost will be and you will never get value for the money you will put into it.But that said i'm always willing to help you out should you want to attempt to make one.
Thanks MJMP. I appreciate it  :thumb-up:   see where we go, it's good to see the pedal getting legs  :whoohoo!: and WB seems to be in his element (as are you :-) ) Cheers R
Title: Re: midi foot controllers
Post by: MarshallJMP on May 03, 2014, 03:02:39 AM
Hey WB

Thanks for explaining.This ( valueNow = valueMin + (valueMax - valueMin) * (pedalNow - pedalMin) / (pedalMax - pedalMin) ) was what i was looking for.Now i checked the datasheet of the 18F pic and i saw the A/D convertor is only 10 bits.This value is stored in 2 registers called ADRESH and ADRESL.Maybe it would be best to use on the contect of the ADRESH register which holds the 8 MSB bits.This way the value of the above formula can never be higher then 16 bits.
Title: Re: midi foot controllers
Post by: WickedBlade on May 11, 2014, 02:31:22 AM
Hey MJMP,

I was having a few days off, hence my late reply.

I think it would not be a good idea to use only 8bits as the value read for the expression pedals. My reasoning is that if you throw away some of the precision (actually, that's a lot of it) you will have trouble when computing the resulting value. It should be ok in many cases, but for some people who have pedals that need 'drastic' calibration, you run the risk of not being able to sweep all the (resulting) range, i.e. the values will jump by more than one sometimes. Also you might get cases where the values won't spread uniformly across the course of the pedal.

For all these reasons I believe it is best to run at the highest possible precision, and 9bits seems better than 8bits, while still keeping the intermediate numbers fitting on 16bits.
Title: Re: midi foot controllers
Post by: MikeB on June 09, 2014, 06:05:49 PM
Well, this thread quickly evolved into something waaaaay beyond where I can legitimately contribute.  :dunno:

I just wanted to mention that I have managed to overcome some of the original issues that I have with the FCB1010.  I have just installed the UnO firmware and this has changed the way the board works.  Now instead of 10 banks of 10 patches.  I have 19 banks of 5.  The other 5 switches have been re-purposed to be CC messages to turn on/off various components in my G Major 2.  Also, there is a great PC editor to go with it all.  I now have pretty much everything that I want from this thing (other than phantom power - but there is a commercially available mod for that too). 

Although, I'm sure that what you guys have in mind will be even better still.  :bow: