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

by soerena on Wed May 29, 2013 11:00 am

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
soerena
 
Posts: 51
Joined: Fri Nov 16, 2012 6:00 am

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

by adafruit_support_bill on Wed May 29, 2013 11:23 am

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
adafruit_support_bill
 
Posts: 25431
Joined: Sat Feb 07, 2009 9:11 am

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

by soerena on Wed May 29, 2013 4:44 pm

Wow, thanks! I didn't know about that. I think that really does what I need :-)
soerena
 
Posts: 51
Joined: Fri Nov 16, 2012 6:00 am

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

by tldr on Thu May 30, 2013 10:08 pm

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

aaaah, here.
"If I had known it was harmless, I would have killed it myself." - Phillip K. Dick, A Scanner Darkly
User avatar
tldr
 
Posts: 464
Joined: Thu Aug 30, 2012 12:34 am

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

by soerena on Sun Jun 16, 2013 12:17 pm

hey Bill,

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

Regards
soerena
 
Posts: 51
Joined: Fri Nov 16, 2012 6:00 am

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

by adafruit_support_rick on Sun Jun 16, 2013 12:58 pm

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
adafruit_support_rick
 
Posts: 8510
Joined: Tue Mar 15, 2011 10:42 am
Location: Buffalo, NY

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

by soerena on Sun Jun 16, 2013 1:28 pm

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.
soerena
 
Posts: 51
Joined: Fri Nov 16, 2012 6:00 am

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

by adafruit_support_rick on Sun Jun 16, 2013 1:57 pm

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 support@adafruit.com with a link to this thread to ask for a refund.
User avatar
adafruit_support_rick
 
Posts: 8510
Joined: Tue Mar 15, 2011 10:42 am
Location: Buffalo, NY

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

by soerena on Sun Jun 16, 2013 2:37 pm

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
soerena
 
Posts: 51
Joined: Fri Nov 16, 2012 6:00 am

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

by adafruit_support_rick on Sun Jun 16, 2013 3:28 pm

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
adafruit_support_rick
 
Posts: 8510
Joined: Tue Mar 15, 2011 10:42 am
Location: Buffalo, NY

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

by soerena on Sat Jun 22, 2013 8:50 am

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: 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
soerena
 
Posts: 51
Joined: Fri Nov 16, 2012 6:00 am

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

by adafruit_support_bill on Sat Jun 22, 2013 9:06 am

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
adafruit_support_bill
 
Posts: 25431
Joined: Sat Feb 07, 2009 9:11 am

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

by soerena on Sat Jun 22, 2013 9:15 am

thanks, but i'm already doing that (15, 16, 17, 18, 19) :-)
soerena
 
Posts: 51
Joined: Fri Nov 16, 2012 6:00 am

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

by soerena on Sat Jun 22, 2013 9:35 am

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?
soerena
 
Posts: 51
Joined: Fri Nov 16, 2012 6:00 am

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

by adafruit_support_rick on Sat Jun 22, 2013 9:48 am

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
User avatar
adafruit_support_rick
 
Posts: 8510
Joined: Tue Mar 15, 2011 10:42 am
Location: Buffalo, NY