Jump to content

Distance sensor (like "D-Beam" controler)


goule
 Share

Recommended Posts

So, it's done.

I completed the Sensorizer  8)

Please check out the Sensorizer Page and take a look at the features:

http://www.midibox.org/dokuwiki/doku.php?id=acsensorizer

I also posted a bunch of pics and two sample videos.

And of course the sourceCode is also downloadable!

It's just a first version, and as soon as I have the time, I'll mainly work on the HUI side;

think I'll add 5 more Encoders and get rid of the PLAY/SETUP mode... but as a first version, it's okay for a release...

Moreover anyone can compile the code with a bunch of different options, variing in size and features!

Especially the sensorizer class, which does the main work is quite stable...

Let me know what you think,

best regards,

AC

Link to comment
Share on other sites

  • Replies 65
  • Created
  • Last Reply

Top Posters In This Topic

Wow  :o :P :D !!!

Very nice job, indeed. I really love the harmonization + clock synchronized idea on the top of the multi-sensor concept ... also the hands movements, very musical, almost poetic  ;D

I guess it's very interresting when playing live, very impressive for the public (but which planet does this guy comes from ??  ;) 8))

I'll dive into your code as soon as I've time (I'm on holidays for 2 weeks at the en of the week so I got quite a lot of things to do before leaving).

Anyway your bitshifting explanations were very helpful to me, I can now use them into my code so thanks for that. Also, I have to congratulate you for the big work I suppose it was to update the sensorizer page. Sharing your work like you do honnours you (even if this expression might not be correct, I guess you understood)

By my side, the 2 GP2D12 are now connecting & running + the 2 SoftPots from SpectraSymbol which I have to say work very very well ! (the only thing needed if a 10k resistor between ground and output so that output value is 0 when you release your finger).

Keep up the good work, thanks again for that sharing, I guess when I'm back from holidays my only thinking will be for Midibox (my wife seems to be accustomed with that idea now  ;D)

Cheers,

Olivier

Link to comment
Share on other sites

AC does Tai Chi

indeed, I did do Tai Chi and I've been totally puzzled for over a minute asking myself where the hell you did knew that ;D

Thanks everyone for your comments and warm words :D

I really love the harmonization + clock synchronized idea on the top of the multi-sensor concept

I'm going to put all these functions into two or three midiBoxes :)

I am so tired of computer-sh*t, esp. about programs I buy... 99% of it is crap, not usable on stage or whenever you purely have to trust on this stuff.

(and I intend to release everything to give back to the community;))

I guess it's very interresting when playing live, very impressive for the public (but which planet does this guy comes from ?? 

right; last week I had a gig, where three people told me they thought I came from the woods and had a very strange dancing style  :-\  hmm.. not the way I intended to become a star  ;D

for the big work I suppose it was to update the sensorizer page. Sharing your work like you do honnours you

thanks, goule :)

It's been really hard to document all this stuff, but I think I'll have to give back.

And I've learned from my faults in the past; that I haven't managed to oss my last project, the harmonizer software. I started with this about 4 years ago, and (I don't know, but) it feels like I've been one of the pioneers of harmonized sensoric music... nowadays where you can find plugins in LIVE and scale features everywhere, I regret that I haven't made my sources public earlier. I listened too much to the people who were telling me I should keep my secrets. Now I know, it's my music that makes me special, not my programming lines :)  ::) huuu, glibberish words of wisdom. sorry.

By my side, the 2 GP2D12 are now connecting & running + the 2 SoftPots from SpectraSymbol which I have to say work very very well ! (the only thing needed if a 10k resistor between ground and output so that output value is 0 when you release your finger).

I'm not sure if I would do this by hardware. I can imagine there are cases where you whish it wouldn't snap back to 0 (eg. if you're controlling some filters or volume envelopes). If you'd implemented it by software, you can always disable this kind of behavior.

I wish you a nice holiday, goule :)

I hope we see us soon –

Cheers everyone,

Michael

Link to comment
Share on other sites

  • 1 month later...

hi

i ve sent 2 messages to goule and to audiocommander about this thread but then i realized it  would be better to write in the forum.. so guys answer me PMing only about music if you need so :-)

i am using those sharp sensors as well and i got the jittering down to 1 single value thanks to a capacitor (i am using a 2200 microF) between ground and Vin.

The maximum CC i can get is about 80 (decimal)

I ve bought sensors from farnell last year for about 15 euros

i d like to insert the code to get full range on CC values and for the gating stuff in my application but i program in assembler while as far as i know that code is written in C .. is it possible to insert C code in an assembler application? or is it time to learn some C ?

last year i solved the problem in another way: i used MidiOX to map the incoming midi, very easy but now i got a Powerbook and no midiox.. anyway this is a fast way at least for testing new sensors etc. if you work on PC just map the incoming (from the sensor) MIDI to get full use of the CC range.

thanks

simone

Link to comment
Share on other sites

hi all

so far

stepped into C with a long list of errors as a first result  ???

set up the C enviroment on virtualPC

started to peer into all the C applications just to get a first glimpse

picked up the 128in_64out_64pots example for its similarity to mb64 and my project

added the "gate" code written by Goule

got a bunch of errors

i guess it is because that code is written for a specific MIDIbox and some values have to be adapted to the current project i will try to figure out myself but if anybody can point me to the right direction .. feel free!!

guess what? keeping the room s light on improves the jittering problem, it actually stops it in my case

to resume:

1 if i pick up the C skeleton and add the Assembler code in main.c to fit my project (11 pots, 12 encoders, 23 buttons plus 1 GP sensor) that should be it to have a functional box right?

2 what about groups and meta events ? i didn t see anything about that in the C examples, hasn t it be implemented yet or am i missing something?

(my guess is that i have to put the usual xxx_meta.inc in the mios_wrapper folder and link it somehow in mios.c)

3 (for audiocommander) which portion of the code of the sensorizer is handling the bit shifting (yes i am using a word which i don t really understand ;) ) and where should i put it ?

4 drinking orange juice will help me understanding C coding ?

greetings from somewhere (or better nowhere) in the middle of the atlantic ocean

simone

Link to comment
Share on other sites

ah, I already answered you, 'cause I'm working over my messages in the past few days, so with your permission, I'm posting, what I answered you by PM:

Hi Cimo,

sorry about my delayed answer; I've been travelling (unfortunately working and not recreating :-\ )

There are several possibilities for you:

1. Use a Capacitor to reduce the jittering (search for a posting by goule in the forums!). This does not interpolate the range, though;

although there are some postings around that recomment to use an op-amp to increase the signal range to full 5 volts. However, I never found the right op-amp for this, there are just too many without datasheets out there

2. To interpolate the range, you have to use some calculations. I recommend, that you download my sensorizer code and see if something can be used.

The principle is also described here, as well as the download links:

http://www.midibox.org/dokuwiki/doku.php?id=acsensorizer

The Sharp sensors provide a signal voltage of ~0.5 to 2.4 V (AFAIR!), if you read that as 10-bit value (MIOS_AIN_PinGet) you'll receive:

((1024/5)*0.5 = 103) as zero and

((1024/5)*2.4 = 492) as max value.

If you want a 7bit value (0-127), you still have 492-103 = 389 steps that you can now use to calculate the 0..127.

If you have only the same sensors, you can hard-calculate these values; if you want to connect different sensors, I just can give you the answer to use the Sensorizer, because that's exactly why I built this thing

It has an auto-sense MIN/MAX, so the minimum and maximum 10-bit values and also(!) the factor used to interpolate the perfect range are calculated automatically!!!

In a few days I will release another sensorizer, the sensorizer mini, a much smaller version, with just 4 encoder + 4 buttons and 2x16 LCD; a much improved interface...

And here's another hint: I would recommend to use only encoders for surface controls. I had terrible results when I tried to mix AIN-Pots to control values along with Sensors on the same AIN-board, because it introduced jittering on the AIN-pots which really makes the whole thing quite unuseable...

hope this helps as a first answer

Michael

Edit:

Just read about Midi-OX and your new Powerbook: you can use MidiPipe (http://homepage.mac.com/nicowald/SubtleSoft/ ) for all kinds of midi-manipulations ;)

Link to comment
Share on other sites

mmmm midipipe... sounds interesting at least i can get full CC range while i am working around a software/hardware solution

thanks for the bunch of infos guys .. this forum is an amazing place !!

1. Use a Capacitor to reduce the jittering (search for a posting by goule in the forums!). This does not interpolate the range, though;

although there are some postings around that recomment to use an op-amp to increase the signal range to full 5 volts. However, I never found the right op-amp for this, there are just too many without datasheets out there

yes i got a good result with a 2200 microfarad and light in the room now i will also try the AIN_BAND_SET function ... about the opamp yes i agree it seems to be quite difficult to find a proper opamp project for this and i can t really do it myself..

2. To interpolate the range, you have to use some calculations. I recommend, that you download my sensorizer code and see if something can be used.

The principle is also described here, as well as the download links:

http://www.midibox.org/dokuwiki/doku.php?id=acsensorizer

again i have to repeat myself because there is something which is not entirely clear to me: your code is in C, my application is in Assembler, you can t put C code into an Assembler application right? So first i have to rewrite my application in C eventually with Assembler in it (because that it is possible) and add your interpolation C code to use with the GP

btw i have only 1 GP and 10 pots and the GP doesn t affect the pots behaviour, supplying the MB with the USB s 5 volts (no lcd)

at this point i believe we/i could start a new thread about "how to implement a GP sensor into a MB application" step by step guide because i do believe there are a lot of people here wishing so

saludos y abrazos de tenerife

simone

Link to comment
Share on other sites

Hi Cimo,

I answered to your PM, that's why some points are missing:

You cannot insert C code into ASM, but you can insert ASM into C code.

And you can of course translate C into ASM; from what I've read here, it's the recommended way to develop complex ASM applications: prototype it in C, then translate it piece by piece to ASM.

Unfortunately I can't help you with that, because I understand a bit, but don't "talk" ASM  :-[

Altering the AIN-Deadband can reduce jitter, but be aware of the fact that it also reduces the overall resolution ;)

If you want to put that GP-Sensor into a MB app, I'd think you could search for a fitting op-amp, this might be the easiest solution without touching the software at all!

Can anybody recommend an opamp that can increase 2.4V to 5V?

Regards,

Michael

Link to comment
Share on other sites

hi

i am smoking my midipipe with great appreciation for this little piece of sotware!!

let s say i am almost tempted to forget about all this C thing and be happy with having midipipe translating and doing all the job, anyway i am stubborn and curious by nature and will try to implement the stuff either software or hardware side.

i have now a full CC range with the GP

considering that a brighter enviroment will help the jittering problem i wouldn t be surprised if those smd leds you have in those ikea lamps are actually giving you a more stable value.That would be an hardware solution for the jittering problem, placing a couple of leds around each GP.But i am not sure for the moment i will try later on and write back.

So here s a "temporary solution" for all those using GPs, midiOX if you re on PC and MidiPipe for OSX.

simone

Link to comment
Share on other sites

Cimo,

Have you also tried the MIOS_AIN_DeadBandSet(x) function in order to reduce the jittering ? with x=7 you got values from 0 to 127, with smaller values you get more precision but more jittering, and the opposite for greater values.

Give it a try if you still havn't

Seeya,

Goule

Link to comment
Share on other sites

to say it all...

after installing MidiPipe and having the sensor working properly i didn t even bother myself with going any forward with that.... i ve been waving my hand, my feet and even placed the sensor orizontally and danced in front of it!!!

But now it s time to get serious again and i will try the MIOS_AIN_DeadBandSet(x) function.. i ll do it right now and report asap.

Sorry for repeating myself but i have an unanswered question.

Let s say i want to rewrite my application (custom MB64e) in C so that i can add your (Goule) gating code and Audiocommander s expanded range code, can i get all the features found on MB64E in C app.? Or , at least, can i find C code for Meta event and Group switching?

txx

simone

Link to comment
Share on other sites

hi all

yes it helps a lot but i had to go all the way to 0x1e to get a good result, and with such a big value the precision is not so good but still usable.

>> i have to admit that i can see the GP project clearly getting better and better every passing day thanks to you guys <<<

next step will be to add a smaller 0,1 microF bypass caps in parallel with the 2200 microF, building a metal housing for the GP and clamp it to the ground, and try to place a couple of bright leds around the GP.

I also had another idea about power supplies but i fear i am going out of topic not only in this post but also in the forum s section so please come to the design concept section if you are interested in Firewire and self supplied MBs i will post it there.

simone

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share


×
×
  • Create New...