9 x 14bit midi controllers from one basic stamp 2?
vibrations
Posts: 3
looking at putting together a little project, to make an 9-channel midi pitchbend sending box
this is to send 9 channels of 14bit midi volume information to a daw (emulating the Mackie Control protocol)
so it will have to send a fair amount of data over one midi cable
each pitchbend signal has to be on its own midi channel (1 - 9)
has anyone put together a similar project? any data bottlenecking issues?
is there a potentiometer i can use that will send a greater range of values?
the pots i've looked at seem to only send a range of 0-1023 to the basic stamp...
this is to send 9 channels of 14bit midi volume information to a daw (emulating the Mackie Control protocol)
so it will have to send a fair amount of data over one midi cable
each pitchbend signal has to be on its own midi channel (1 - 9)
has anyone put together a similar project? any data bottlenecking issues?
is there a potentiometer i can use that will send a greater range of values?
the pots i've looked at seem to only send a range of 0-1023 to the basic stamp...
Comments
I know nothing about Midi, but the following applications notes from past Nuts and Volts Magazine articles may prove to be helpful:
http://www.parallax.com/html_pages/downloads/nvcolumns/Nuts_Volts_Downloads_V4.asp
There may be other Midi articles in some of the other Nuts and Volts columns as well. I did not do a thorough search of them. Thanks go to Jon Williams, a former Parallax employee.
Regards,
Bruce Bates
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
i have Jeff Mann's code for 14 bit midi output from basic stamp 2, just no examples of anyone using it 'in parallel'
anyone out there outputting more than one midi pitchbend stream?
Jeff Mann's code is what you need - he doesn't split the word correctly and he doesn't tell you what to rem out and his use of PIN would have caused errors - that could be why you are confused - I simplified it for your needs below:
' {$STAMP BS2}
' {$PBASIC 2.5}
baud CON 32780· '31.25kb, 8n1, non-inverted, open collector
'declare variables
value VAR Word········· 'holds the 16-bit value read from the pot
MPIN VAR Nib············ 'which pin/pot we are reading at the moment
statusbyte VAR Byte···· 'MIDI status fo pitchbend
data1 VAR Byte
data2 VAR Byte
'user configuration - adjust these to suit you
'set unused pins to outputs
DIRS = %1111111000000000 'all outs
midioutpin CON 9······· 'pin connected to MIDI out connector cause 0 thru 8 are your pots
DO
·· FOR MPIN = 0 TO 8
···· 'read the value of the pot
···· HIGH MPIN
···· PAUSE 1
···· RCTIME MPIN, 1, value
···· 'debug will slow the process down - loose it
···· statusbyte = $e0 |MPIN········ 'sending controller message
···· data1 =value & $7F··········· 'least significant 7 bits
···· value=value<<1················· 'shift 8th bit into upper byte
···· data2 = value.HIGHBYTE & $7F················ 'most significant 7 bits
···· SEROUT midioutpin, baud, [noparse][[/noparse]statusbyte, data1, data2]
·· NEXT
LOOP
with this code the·pot may not be an issue but...
MORE TO COME ON THE SUBJECT OF POTS
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Have Fun
TR
Post Edited (TechnoRobbo) : 9/15/2007 4:08:43 PM GMT
So, for the sake of sanity·, a 10k pot and .1µF cap should do fine.
"How do I get full range out of my mackie fader?", you ask. Well, you do pot scaling.
Pot Scaling
Let's say your max value from a 10k pot is 665 and your max pitchbend output is 16383 you do this math:
take the remainder of 423 and divided by 665,multiply by 66536 this equals 41687
put it all together like this:
x=x*24 + (x**41687)
This will evenly scale 0 to 665 into 0 to 16383. If you do achieve an rctime greater than 16383 (and I don't recommend it) just treat it as a remainder and do the remainder portion of the math.
If you need higher resolution·look into·this 8 channel 12 bit·A to D converter.·
http://www.parallax.com/detail.asp?product_id=604-00026
Post edited after I put the code on a scope and found out some of my math was off.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Have Fun
TR
Post Edited (TechnoRobbo) : 9/16/2007 7:31:01 AM GMT
i'll look into the MAX1270 12-bit A\D
lo res volume controllers tend to sound a little zippery/steppy when changing values...
And you can't beat the price. Here's some documentation from Nuts & Volts
http://www.parallax.com/dl/docs/cols/nv/vol5/col/nv105.pdf
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Have Fun
TR
Post Edited (TechnoRobbo) : 9/16/2007 4:16:57 PM GMT