4 piezo to usb?

Anything about hardware musical instruments.
RELATED
PRODUCTS

Post

spacedad wrote:what controller do you mean,software or hardware?
Im talking about the Arduino, or whatever microcontroller board you use, if that's how you decide to do it.
i was thinking plug in to usb on laptop and energyXT/asio4all would recognise it as aodio or midi.
Yeah, that can be done, like I say; some microcontroller board, like the Teensy, can be made to act like class-compliant USB MIDI devices.

But some (eg Arduino Uno) cant act as MIDI devices - when connecting them, your PC is 'talking' to the Arduino via an onboard USB-to-serial connection but that only ever looks to the PC like a serial (COM) port. If that's the case, you'd have to be sending messages over serial, and converting them to MIDI on the PC end (eg with something like this...http://projectgus.github.io/hairless-midiserial/)

As an alternative to both of those, though, you could build old-style 5-pin DIN MIDI connectors onto the microcontroller board, and plug it in via a MIDI interface, but you have to get the software you write sending properly-formed MIDI messages. There are 'shield' boards for the Arduino family that are prebuilt DIN MIDI boards that plug into an Arduino controller if you dont want to have to work out how the electronics would work.

Examples of all of these are all over the place, FWIW.

asio4All is for audio only. If you were going down the route of directly hooking up your drumpads to a soundcard, and avoiding using a microcontroller board completely, then you'd need one audio input channel per drumpad. But then you'd probably need to turn the signal into MIDI by some plugin or other inside eXT, and you'd start running into issues with the soundcard you actually want to use for your audio, since ASIO is funny about multiple connections etc.
An idiot on Set Theory:
"In some cases there is an object called red that contains everything that is red. In much the same way a pot is a plate."

Post

whyterabbyt wrote:the Arduino, or whatever microcontroller board you use, if that's how you decide to do it.
Yes i was heading towards the Uno,decent compatibles are affordable,can't afford teensy atm.
But some (eg Arduino Uno) cant act as MIDI devices - when connecting them, your PC is 'talking' to the Arduino via an onboard USB-to-serial connection but that only ever looks to the PC like a serial (COM) port. If that's the case, you'd have to be sending messages over serial, and converting them to MIDI on the PC end (eg with something like this...http://projectgus.github.io/hairless-midiserial/)

I'd not heard of that,thanks for explaining,I didn't realise the data is 'serial',I'm not familiar with it.I was thinking it was 'audio' data.So the serial2midi converter looks like the best route for me.

So is it possible to convert the serial data to audio? I'm still not getting my head around this.
As an alternative to both of those, though, you could build old-style 5-pin DIN MIDI connectors onto the microcontroller board, and plug it in via a MIDI interface, but you have to get the software you write sending properly-formed MIDI messages. There are 'shield' boards for the Arduino family that are prebuilt DIN MIDI boards that plug into an Arduino controller if you dont want to have to work out how the electronics would work.
So then Arduino would convert the signal from the piezos to midi out info and I'd need a midi input on a soundcard,is that right?

do you mean make something like this prebuilt one? http://www.ebay.co.uk/itm/SHIELD-MIDI-A ... SwQYZWzlmO

(We don't have a midi/soundcard,atm)
asio4All is for audio only. If you were going down the route of directly hooking up your drumpads to a soundcard, and avoiding using a microcontroller board completely, then you'd need one audio input channel per drumpad.
Yes I realise asio4all is audio only. I was thinking that the microcontroller would send the piezo audio through usb and be seen by asio4all as 4 seperate audio ins.
But then you'd probably need to turn the signal into MIDI by some plugin or other inside eXT, and you'd start running into issues with the soundcard you actually want to use for your audio, since ASIO is funny about multiple connections etc.
Yes, i was going to use an 4 x audio2midi trigger vst inside eXT.

Post

spacedad wrote: I'd not heard of that,thanks for explaining,I didn't realise the data is 'serial',I'm not familiar with it.I was thinking it was 'audio' data.So the serial2midi converter looks like the best route for me.

So is it possible to convert the serial data to audio? I'm still not getting my head around this.
Im slightly confused here, Im afraid. Ive been going on the premise that you wanted to create a MIDI-generating drumpad 'thingy', not anything that generates or process audio. So if its something audio you want to do, none of what Ive said so far particularly pertains to doing that.

In the situation Im predominantly talking about, where there's a microcontroller board involved, the behaviour using piezos as pads would be

1. hitting the piezo generates a votage
2. the microcontroller receives the voltage on a pin, and its onboard ADC measures it
3. the microcontroller either
A. acts like a MIDI device (over USB or 5-pin serial MIDI) and sends on a MIDI message corresponding to a note on/off with a velocity derived from the measured voltage
or B. sends on a text string over its serial connection to the computer, corresponding to the measured voltage, some bit of software on the computer turns that into a MIDI message and sends it to a virtual MIDI port on the computer
As an alternative to both of those, though, you could build old-style 5-pin DIN MIDI connectors onto the microcontroller board, and plug it in via a MIDI interface, but you have to get the software you write sending properly-formed MIDI messages. There are 'shield' boards for the Arduino family that are prebuilt DIN MIDI boards that plug into an Arduino controller if you dont want to have to work out how the electronics would work.
So then Arduino would convert the signal from the piezos to midi out info and I'd need a midi input on a soundcard,is that right?
Yes, that's correct/
do you mean make something like this prebuilt one? http://www.ebay.co.uk/itm/SHIELD-MIDI-A ... SwQYZWzlmO
Yes, although that's actually the first one Ive seen that has piezo inputs on it too. Usually they dont have that.

https://www.sparkfun.com/products/12898
http://www.rugged-circuits.com/midi-shi ... -top-mount

(We don't have a midi/soundcard,atm)
Yes I realise asio4all is audio only. I was thinking that the microcontroller would send the piezo audio through usb and be seen by asio4all as 4 seperate audio ins.
No, there's no way Im aware of to make one of these microcontroller boards appear like an audio device to the computer.
Yes, i was going to use an 4 x audio2midi trigger vst inside eXT.
If you used a soundcard instead of a microcontroller, that'd be the way to go. But the point of using a microcontroller board is that it has the requisite ADCs to read the piezos, and its capable of doing the conversion to MIDI itself (or something similar).
An idiot on Set Theory:
"In some cases there is an object called red that contains everything that is red. In much the same way a pot is a plate."

Post

ok,thanks.
it's just me getting confused,thinking the piezo is a mic so it must pass this signal through to the usb out.
so the microcontroller immediately converts audio from the piezo into digital data,and isn't capable of sending 8bit audio to pc.

i understand.
but yes,all you've said is still good.
piezo>controller>usb>serial converter>midiloop

well that's the cheapest way for now.

Post

spacedad wrote:ok,thanks.
it's just me getting confused,thinking the piezo is a mic so it must pass this signal through to the usb out.
so the microcontroller immediately converts audio from the piezo into digital data,and isn't capable of sending 8bit audio to pc.
Hopefully this wont confuse things, but strictly speaking, it might be capable of sending 8bit audio to the pc, as you can program it to do whatever you want. However, I really dont think it would be fast enough to send it at any kind of sample rate anyone would want audio at, (I'd be kinda surprised if you could guarantee a 2K samplerate!) , and certainly not for multiple channels of audio, and it still wouldnt be able to appear as a soundcard device.
And for the purpose of a drumpad, you absolutely dont need continuous audio, just a value for how hard the pad was struck.
i understand.
but yes,all you've said is still good.
piezo>controller>usb>serial converter>midiloop

well that's the cheapest way for now.
yup, it is indeed. its probably the closest to most of the projects you'll find online, so there'll be the most prior examples and code to Google.
An idiot on Set Theory:
"In some cases there is an object called red that contains everything that is red. In much the same way a pot is a plate."

Post

thanks whyterabbyt.

do you know what type of zener diodes i need?
i may have some 1m resistors in the cupboard.
piezos and yoghurt pots.
can you use any old glue or maybe some would melt the piezo?
choosing circuit board looks confusing too.

Post

spacedad wrote:thanks whyterabbyt.

do you know what type of zener diodes i need?
i may have some 1m resistors in the cupboard.
piezos and yoghurt pots.
can you use any old glue or maybe some would melt the piezo?
choosing circuit board looks confusing too.
any 5v zener should be fine, as far as I know.

most glues should be fine, Ive found hotglue works well for piezos used as contact mics so Ive always used that, but anything slightly flexible should do. (superglues might not cope with any flexing, for example)
An idiot on Set Theory:
"In some cases there is an object called red that contains everything that is red. In much the same way a pot is a plate."

Post

like these?
BZX55-C5V1 5.1V Zener Diode
http://www.ebay.co.uk/itm/25-x-BZX55-C5 ... SwPhdU3SgQ

Post

spacedad wrote:like these?
BZX55-C5V1 5.1V Zener Diode
http://www.ebay.co.uk/itm/25-x-BZX55-C5 ... SwPhdU3SgQ
They look fine to me. :shrug:
An idiot on Set Theory:
"In some cases there is an object called red that contains everything that is red. In much the same way a pot is a plate."

Post

:help: do i need vero strip board?
i've never used it,and i know i could just string them together without it,but thought it maybe easier with a board,there's also solderable breadboard.
i don't understand how they join things,wouldn't the strip be a bad idea for serial connections?

Post

and what are those things connecting the pcb to the arduino,some kind of pin?

Post

This might be too OT but Korg is discontinuing the ClipHit and we're blowing out our last ones for $109.99:

www.jrrshop.com/korg-cliphit

Post

thanks,but a little over budget atm!

Post

well i've ordered the uno,piezos 20mm,diodes,a breadboard and some small vero board.don't know if i'll need it.
i have resistors and tools hopefully.total £13.80.a little over but the breadboard should come in handy.

Post

Good luck! You'll need it (and lots of time...)
We are the KVR collective. Resistance is futile. You will be assimilated. Image
My MusicCalc is served over https!!

Post Reply

Return to “Hardware (Instruments and Effects)”