a simple sample machine (as independent as possible) - any ideas ?

Post here about your Arduino projects, get help - for Adafruit customers!

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
User avatar
soerena
 
Posts: 57
Joined: Fri Nov 16, 2012 7:00 am

a simple sample machine (as independent as possible) - any ideas ?

Post by soerena »

Hi!

I want to build a box with 12 big buttons (http://www.arcadeshop.de/Illum-Buttons- ... d_505.html), that when you push a button, a sample is triggered and played and while the sample is playing the respective button is lid up. This is meant to be used by children from 4 - 15 to "jam" with a jazz band.

So my initial thought on how to approach this was to make a sturdy wooden box with an arduino uno inside that would connect via USB to a laptop (hidden somewhere else) and trigger samples through a max patch I've made. I also need to be able to change the samples that are being triggered (between each gig).

Before I go ahead and order these rather expensive buttons and components, I just wanted to hear if anyone here has any suggestions on this. Would there be a not-too-complex way to make these boxes more independent and maybe even without a laptop and Max? I thought about using a Raspberry Pie, but I'm not quite sure if what I want to do is possible with a Raspberry.

Any ideas, suggestions or thought are very very welcome.

Thank you,
Søren

User avatar
adafruit_support_bill
 
Posts: 88093
Joined: Sat Feb 07, 2009 10:11 am

Re: a simple sample machine (as independent as possible) - any ideas ?

Post by adafruit_support_bill »

You could do it with a Wave Shield and an Arduino Uno. We have example code for a 6-button stand-alone version of what you describe. It could easily be extended to 12 buttons using a voltage divider to stack multiple buttons on an analog pin.

http://www.ladyada.net/make/waveshield/examples.html

User avatar
soerena
 
Posts: 57
Joined: Fri Nov 16, 2012 7:00 am

Re: a simple sample machine (as independent as possible) - any ideas ?

Post by soerena »

Wow, thanks! I didn't know about that. I think that really does what I need :-)

tldr
 
Posts: 466
Joined: Thu Aug 30, 2012 1:34 am

Re: a simple sample machine (as independent as possible) - any ideas ?

Post by tldr »

saw somewhere that no less than miller puckette, himself, has been running pd on a pi.

aaaah, here.

User avatar
soerena
 
Posts: 57
Joined: Fri Nov 16, 2012 7:00 am

Re: a simple sample machine (as independent as possible) - any ideas ?

Post by soerena »

hey Bill,

Will the waveshield only be able to play one audio file at a time? No polyphony in any way, or?

Regards

User avatar
adafruit_support_rick
 
Posts: 35092
Joined: Tue Mar 15, 2011 11:42 am

Re: a simple sample machine (as independent as possible) - any ideas ?

Post by adafruit_support_rick »

soerena wrote:Will the waveshield only be able to play one audio file at a time? No polyphony in any way, or?
Sorry - no polyphony. Strictly one .wav file at a time

User avatar
soerena
 
Posts: 57
Joined: Fri Nov 16, 2012 7:00 am

Re: a simple sample machine (as independent as possible) - any ideas ?

Post by soerena »

ah bummer.

do you know if there's some kind of way to get around this? i just ordered 4 of them, but of course i should have made sure before i ordered.

User avatar
adafruit_support_rick
 
Posts: 35092
Joined: Tue Mar 15, 2011 11:42 am

Re: a simple sample machine (as independent as possible) - any ideas ?

Post by adafruit_support_rick »

There's no simple way around it. You might be able to develop an algorithm to merge multiple wav files, but it's not something you'll find off-the-shelf.

You can refuse delivery, or return the wave shields for a refund. Email [email protected] with a link to this thread to ask for a refund.

User avatar
soerena
 
Posts: 57
Joined: Fri Nov 16, 2012 7:00 am

Re: a simple sample machine (as independent as possible) - any ideas ?

Post by soerena »

Okay I think I'll have to go with a chipkit uno32 instead, but on your website you only have an uc32.

Can you tell me if uc32 and uno32 are the same model or not? Thanks

User avatar
adafruit_support_rick
 
Posts: 35092
Joined: Tue Mar 15, 2011 11:42 am

Re: a simple sample machine (as independent as possible) - any ideas ?

Post by adafruit_support_rick »

According to the product page:
The chipKIT uC32™ development board is the same form factor and has the same connectors and features of chipKIT Uno 32™ but with larger microcontroller. The uC32 board has the larger Microchip® PIC32MX340F512H microcontroller featuring 80 Mhz 32-bit MIPS, 512K Flash, and 32K SRAM. Compared to the Uno32 that has Microchip® PIC32MX320F128 processor, 80 Mhz 32-bit MIPS, and 128K Flash, 16K SRAM.

User avatar
soerena
 
Posts: 57
Joined: Fri Nov 16, 2012 7:00 am

Re: a simple sample machine (as independent as possible) - any ideas ?

Post by soerena »

OK, So I've build the waveshield and connected it to 12 buttons on A0 with a resistor ladder, and then I have connected 12 I/O's to control transistor that switch lamps on and off for each button.

I'm ALMOST there, but it seems I just need ONE more output pin (for the transistors) for this to work. I've used these:
0, 1, 6, 7, 8, 9, 15, 16, 17, 18, 19... I tried using pin 11 (someone mention here that he succeeded doing so: http://forums.adafruit.com/viewtopic.php?f=31&t=40614) but it seems to always have an output of HIGH - i don't know why.

Does anyone have a suggestion to an easy way to get 1 more output IO? It would really be nice if don't have to go with IO expanders and such now.

Søren

User avatar
adafruit_support_bill
 
Posts: 88093
Joined: Sat Feb 07, 2009 10:11 am

Re: a simple sample machine (as independent as possible) - any ideas ?

Post by adafruit_support_bill »

You can use analog pins as digital pins also. If all your buttons are on A0, you can use one of the other analog pins for your transistor.

User avatar
soerena
 
Posts: 57
Joined: Fri Nov 16, 2012 7:00 am

Re: a simple sample machine (as independent as possible) - any ideas ?

Post by soerena »

thanks, but i'm already doing that (15, 16, 17, 18, 19) :-)

User avatar
soerena
 
Posts: 57
Joined: Fri Nov 16, 2012 7:00 am

Re: a simple sample machine (as independent as possible) - any ideas ?

Post by soerena »

hmm, perhaps I could simply remove the pin 11 (MOSI) from the waveshield.. I mean, if it's only used for writing to the sd card, there's not reason for using up that pin in my setup since I only read from the card. right?

User avatar
adafruit_support_rick
 
Posts: 35092
Joined: Tue Mar 15, 2011 11:42 am

Re: a simple sample machine (as independent as possible) - any ideas ?

Post by adafruit_support_rick »

You have to be able to write commands to the card in order to read it.

EDIT: I've been trying to think of a way to squeeze out another output, but I'm coming up empty. You've got 20 GPIO pins, and you're using 9 for SD, DAC, and analog input.

It's time to think about charlieplexing or some other method of multiplexing the outputs.

If you don't already know what charlieplexing is, it's based on the idea that you can drive pairs of output ports at opposite levels to drive multiple LEDs. In the simplest case, you can connect two LEDs to, say D0 and D1, with opposite polarities. To light LED1, you drive D0 LOW and D1 HIGH. To light LED2 instead, you drive D0 HIGH and D1 LOW.

If I remember correctly, the number of LEDs you can drive with n pins is (n * (n-1)). So, you should be able to do your 12 LEDs with only 4 GPIO pins.

The trick, of course, is that you can't light all 12 at the same time, and that's where the multiplexing comes in. You will have to rapidly cycle through all 12 combinations, lighting or not lighting each LED, as appropriate.

The effect is just like PWM - if your cycle time is fast enough, the blinking of each individual LED will not be perceptible.

Check out the LOLShield and its tutorial links for more details on charlieplexing

Locked
Please be positive and constructive with your questions and comments.

Return to “Arduino”