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

Please login or register.

Login with username, password and session length
Advanced search  

News:

Need a Schematic? Check the Vault *MP-1 Classic Schematics Just Added!!

Pages: 1 2 [3]   Go Down

Author Topic: midi foot controllers  (Read 18348 times)

0 Members and 1 Guest are viewing this topic.

WickedBlade

  • Newbie
  • *
  • Offline Offline
  • Posts: 32
Re: midi foot controllers
« Reply #30 on: Time Format »

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.
Logged

rnolan

  • Administrator
  • Superhero Member
  • ******
  • Offline Offline
  • Posts: 6034
Re: midi foot controllers
« Reply #31 on: Time Format »

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.
Logged
Studio Rig: Stuff; Live Rig: More Stuff; Guitars: A few

MarshallJMP

  • Superhero Member
  • ******
  • Offline Offline
  • Posts: 4702
    • marshalljmpmodshop.net
Re: midi foot controllers
« Reply #32 on: Time Format »

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?
Logged

WickedBlade

  • Newbie
  • *
  • Offline Offline
  • Posts: 32
Re: midi foot controllers
« Reply #33 on: Time Format »

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.
Logged

rnolan

  • Administrator
  • Superhero Member
  • ******
  • Offline Offline
  • Posts: 6034
Re: midi foot controllers
« Reply #34 on: Time Format »

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
Logged
Studio Rig: Stuff; Live Rig: More Stuff; Guitars: A few

MarshallJMP

  • Superhero Member
  • ******
  • Offline Offline
  • Posts: 4702
    • marshalljmpmodshop.net
Re: midi foot controllers
« Reply #35 on: Time Format »

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.
Logged

rnolan

  • Administrator
  • Superhero Member
  • ******
  • Offline Offline
  • Posts: 6034
Re: midi foot controllers
« Reply #36 on: Time Format »

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...
Logged
Studio Rig: Stuff; Live Rig: More Stuff; Guitars: A few

MarshallJMP

  • Superhero Member
  • ******
  • Offline Offline
  • Posts: 4702
    • marshalljmpmodshop.net
Re: midi foot controllers
« Reply #37 on: Time Format »

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?
Logged

WickedBlade

  • Newbie
  • *
  • Offline Offline
  • Posts: 32
Re: midi foot controllers
« Reply #38 on: Time Format »

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.
Logged

rnolan

  • Administrator
  • Superhero Member
  • ******
  • Offline Offline
  • Posts: 6034
Re: midi foot controllers
« Reply #39 on: Time Format »

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
Logged
Studio Rig: Stuff; Live Rig: More Stuff; Guitars: A few

MarshallJMP

  • Superhero Member
  • ******
  • Offline Offline
  • Posts: 4702
    • marshalljmpmodshop.net
Re: midi foot controllers
« Reply #40 on: Time Format »

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.
« Last Edit: Time Format by MarshallJMP »
Logged

WickedBlade

  • Newbie
  • *
  • Offline Offline
  • Posts: 32
Re: midi foot controllers
« Reply #41 on: Time Format »

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.
Logged

MikeB

  • Full Member
  • ***
  • Offline Offline
  • Posts: 247
Re: midi foot controllers
« Reply #42 on: Time Format »

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:
Logged
I don't feel tardy!
Pages: 1 2 [3]   Go Up