Sending SOUND into the USB port?

Hi.

I realize Arduboy is too small to have a proper ‘jack’ port as oudio-out.

Still, some of us would like to use it as an instrument too.
Except of games, that are cool. :wink:

Well, I bought Arduboy recently (but waited for it much longer, heh) and I wonder whether it is possible somehow to send the sound 9in a software way) to the USB port, to be able to record it.

I’m not a coder myself, but I have several friends who might be able to do it when instructed properly.

OK, thx in advance.
Y

You could look at the Pocket Operator Sync Hack it shouldn’t be too hard to find something to make a port inside the arduboy if your not keen on having a cable dangle out.

1 Like

You can send pretty much anything over serial (providing there aren’t any time constraints for doing so).

What sort of thing were you thinking?
Making different Arduboy buttons play sound combinations like an instrument or a more fully featured sound production suite?

Thanks guys, I do appreciate Your suggestions.

Well, sounds effect related with special keys (hehe, like in Kraftwerk :slight_smile: ), is a very good idea for concerts, yes.
(For now I use a micro-synth Korg Monotron for it http://tiny.pl/gl9f7 but change of used devices brings an interesting diversity indeed. Or even adding something new. And good-looking, like Arduboy).

For now, however, I was thinking more about making full songs for Arduboy and be able to record them from it.
the existing software is that far from Protracker or Famitracker that it’s not achievable for me, still - other methods are probably possible to construct - as long as we have the sound on the USB. :slight_smile:
Hence my question.

Might be a bit difficult.
Since the Arduboy doesn’t have many buttons it would either have to be fairly menu-heavy or very simplified.
Timing would also be a bit of an issue.

Anything can be sent over USB but you’d need something suitable for receiving it at the other end and something that can play what you send.
So you’ll need to think about how the sound data will be formatted.

There’s also not much RAM on the Arduboy so there would be a limit to how big the piece of music could be.

It’s doable but I hope your friends are experienced because it’ll be a fiddly task.

Before you go any further I’d suggest looking at how the Arduboy does sound in-depth and looking at existing sound libraries so you have an idea of what they do and what sound formats they use.

1 Like

I just came up with the following untested idea for audio out. You’ll need some fine soldering skills though to add it to Arduboy.

You could make a 2 bit R-2R DAC by soldering resistors to the speaker pads as shown in the diagram below and connect it to the unused pin 4 of the micro usb connector. This pin is not connected on normal USB cables (iirc its used on OTG cables for ID) so you have to get a male micro USB plug to make your own special audio cable. I think the piezo will also give some unique distortion to the sound.

audio-output

1 Like

OK guys. Thanks a lot.

So it seems like there’s no other way to record music from Arduboy, but to make an internal modifications anyway.

Meanwhile I asked a friend about porting sound engines from ZX Spectrum and he said it has been actually done (well, for the Arduino itself, but still) and here are some threads:
http://randomflux.info/1bit/viewtopic.php?id=126
http://randomflux.info/1bit/viewtopic.php?id=121

Tritone sounds like this:

and octode sounds like this:

Once again thanks,
Y

Mr.Blinky: I will actually ask some of my friends about it - maybe somebody might be able to make it.
Thank You so much.

Cool. I recommend to first solder wires to the pads and tinker with regular resistors and capacitor around first as you may want to try different values to get the sound you want. Here’s an updated diagram. I’ve added a small decoupling capacitor in the audio USB cable. You may wan’t to increase the value if there’s too much noise.


2-bit DAC version

2 channel version

Edit:

Removed the 2 channel schematic. It wasn’t correct. the 2-bit DAC version also functions as two channel version.

…and meanwhile I found this and it seems like a user-friendly thing (based on well-known MOD format).
Probably I will give it a try.
All the best.
Y

I think your link didn’t work. You made me curious about what you found. I like mod files.

Amigaaaa… :upside_down_face:

…or maybe I should drink less, who knows.
Just in case - trying to put the link here again:


Seems like it might work with Arduboy too.
It’s 100% based on Amiga MOD (although I used MilkyTracker to test it, hehe) and all the rules seem to be quite clear and familiar.

Of course I have no idea what to do later with the *.sqm final file and whether Arduboy would play it or not but one step at the time. :wink:

Ah, and YouTube btw.


Also useful - it sounds nice and can even better. Hmmmmm. Most interesting.

1 Like

Hey @Mr_Y

In case you had not seen it there is a small footprint derivative of Squawk made by Team ARG ATMlib. It doesn’t use a popular tracker format in order to reduce program memory usage.

Work is being done (by me and others) to fix bugs and improve it here ATMlib2 (no idea what we will call it, it depends on what Team ARG tell us when we are done). In the latter repo there is a new demo MIDI sketch showing how to turn the arduboy into an USB midi synth. An experimental (but already working :wink: ) effort to implement phase distortion synthesis as in Casio CZ series synths is also under way.

As for the audio via USB thing, even if it may not be what you were after, a few years ago I made a LUFA based Arduino “USB sound card” synth which would be seen as an USB audio class input device. The idea was to send commands in via serial or MIDI and get audio out via USB into a PC. If I can find the code I’ll try to mash it with the MIDI demo at some point.

1 Like

The MIDI idea is most tempting but for different purposes (for instance as an instrument to play live).

Trackers/MODs are another thing. To make some Arduboy album would be really cool.

Do You guys think anybody could help such old Amiga guys like me and make some PC/Win converter from original Arduino’s *.sqm song (Squawk engine) into Arduboy’s *.hex or *.arduboy auto-starting file with playing song?

Kind regards.

Midi over usb looks to have been done by someone here? There maybe other sources

From:
http://forum.arduino.cc/index.php?PHPSESSID=6il8465g6k0bmscn64h9kfdtg7&topic=108577.msg1178921#msg1178921

I thought about implementing something like this but I was too afraid of messing up USB communications. However, in the future it is interesting to look at USB-C because within the profile is support for an analog output for sound. So any standard USB-C to audio out cable could work.

This product in particular is interesting because it gives a subsystem that isn’t actually doing USB-C negotiation access to some of the features. So you could pair this chip with a microchip like what we are using and get all the cool bells and whistles.
http://www.microchip.com/wwwproducts/en/UTC2000

I just installed the MIDIUSB library using the library manager and build my simple test sketch on that. The API could be better but it works fine.

1 Like