Shop OBEX P1 Docs P2 Docs Learn Events
How to put a value into a string by shiftin a Fader? — Parallax Forums

How to put a value into a string by shiftin a Fader?

HannesHannes Posts: 2
edited 2006-05-29 20:07 in BASIC Stamp
Hello,
for the 1st time here, i have an interresting question: I use a BS2 and soon a BSp40, to solve a MIDI Project.
MIDI deals with values from 0 to 127. I want to create a map by shifting two Faders - one for the position in the map and
one for the value.
The LOOKUP cmd is able to read a string like:

LOOKUP value,(0,1,2,.....,127),value

How can I say write a 32 to cell 84 of this 128 cells long string?
I need about 40 of these maps - is that possible with any BS?

I dont want to use a DATAmap by PUT and GET, because the Editor-Help said, that works 10 Billion times and the RAM is faster.

Could anyone help me?

Thanks and Greetings
Hannes

Comments

  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2006-05-29 17:16
    Are you sure you need lookup tables?· How do the values correspond to the range you're talking?· Could a formula be used instead.· You won't be able to do this without a BS2p series module due to memory requirements and it would have to be EEPROM since there is not enough RAM (26 bytes).

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com
  • SSteveSSteve Posts: 808
    edited 2006-05-29 17:21
    Do the tables change as the program goes along? If not, you're fine because the EEPROM is good for 10 million (not billion) writes but you can read it as many times as you need.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    OS-X: because making Unix user-friendly was easier than debugging Windows
  • HannesHannes Posts: 2
    edited 2006-05-29 20:07
    Thanks for the help
    - so I need to go with EEPROM and hope that I don't exceed 10 Million times. For example I want to map a little game-pad joystick which has 4 directions with 128 values each, to maps like the pic below. So I think one formula wouldnt be enough.
    Greetings
    Hannes
    524 x 157 - 1K
Sign In or Register to comment.