Cabbage Logo
Back to Cabbage Site

Cabbage and Arduino

Yes, just so! and yes I could translate this code using bit-wise operators, but I don’t know how to read in Csound the bytes from the serial port.
It’s just a test, because I still have problems with the serial opcodes. I will try…

I can verify the standard firmata route rocks for custom arduino serial communication.

@DeBord I am really surprised that the arduino fried your macbook pro. I did a bunch of experiments years ago with max/msp and using the standard firmata to sequence volatile circuit bending mayhem, I shorted the port tons of times and it would turn off that port until I disconnected and reconnected it. Maybe your 9v battery fried the port by applying 9v into the usb which is only rated for 5v and is maybe not reverse protected? What year was your MBP?

That sounds awesome, is there any more info on that online? like did they post any videos or have a website? Id be curious what the performance is like. I tried a headless pure data patch running on a pi and it suffered from some dropout issues mainly from the audio drivers, I forget if it was JACK or ASIO or something like that.

Big fan of that idea, I prototyped a hardware piece that takes uses both.

I just dropped that guy a mail. I’ve not heard from him in a while though. He probably retired to a dessert island, with solar panels and his RPi :joy:

2 Likes

I was surprised too when it frieds during a concert! It’s the latest macbook pro retina, I bought it in 2016. Other people have the same problem, but for me was the 9v into usb for sure.

Have you ever tried the serial opcodes to connect Csound to Arduino?

I have not, I am very n00b on the csound front, but very interesting possibilities

When you havesome free time can you try the examples on your Arduino and see if it works on your Csound? You just need a potentiometer or a photoresistor and a resistor connected to an Arduino’s analog pin.
http://write.flossmanuals.net/csound/b-csound-and-arduino/
It works for me but only starting the .csd from the command line and with a lots of delay between Arduino and Csound.

What kind of computer/OS are you using?

As cool as the standard firmata is, if I were to do something like this I would probably use MIDI or maybe OSC to make it more flexible and fit it in with my larger plans. I had fun playing with the circuit bending / Max / arduino combo 10 years ago but these days I am considerably more deliberate.

If I were you, I would grab an arduino teensy 3.2 and set it to class compliant midi mode, plugs in to usb and automatically shows up as a midi device. Works with just about anything, plenty of info / tutorials and examples… overall if you are into arduino and synthesis you should get a teensy… they are the bomb, I prototyped my omnimod eurorack module using teensy 3.1. https://youtu.be/cBUt_ciNYW8

1 Like

That looks like a neat module :wink:

:laughing: this is exactly why last week I bought an Arduino Pro Micro! I’d like to make a DIY midi controller with it.

I’ve also an Ethernet shield for the Arduino UNO and I already tried to connect them via OSC…[quote=“MacroMachines, post:28, topic:708”]
What kind of computer/OS are you using?
[/quote]

I’m working on Windows 10 on an old sony vaio (still waiting the repair of my macbook pro…)

the pro micro is ok, I have a couple in my bin, but the teensy is on another level from any microcontroller Arduino product that I have used. for one it uses a 32 bit arm microcontroller, default rate of 74Mhz if I recall, I overclock mine to 96Mhz and it still runs great and havent noticed any issues using them for many years overclocked and on continually. You can get an audio codec board for the 3.1-3.2 and even a nice “audio tutorial kit” with everything you need to make a bunch of audio related projects.

I’ve prototyped granular samplers, loopers, effects, 4op FM synths in hours just using the teensy 3.1 and audio codec thanks to their audio patch editor… and the community support is awesome, the forum is tons of people talking about any kind of audio / midi projects you could imagine… and usually people will help you out with figuring out that side of things quite readily.

You can even use them pretty easily as a class compliant audio interface.

The new teensy 3.5 and 3.6 are a bit more expensive but come with a built in SD card and more ADC/DAC IO and higher clock rate.

for sure if you are doing standard firmata or MIDI with a few pot knobs or buttons the arduino pro micro might work just fine. I don’t know for sure if it has the same ability to simply flip it in the arduino IDE to connect as a class compliant midi controller as the teensy does… but if it does let me know, maybe I can find a use for the ones in my bin :smiley:

Thanks @rorywalsh :smiley: . It came out quite a bit nicer than the prototypes in that video… you can check out the shipped final version on my instagram posts https://www.instagram.com/p/BSHlmgQgjqj/

That web based patcher looks interesting. I might check the source. Looks like it could be re-appropriated for any number of cool things!

Indeed @rorywalsh I thought the same thing when I first found it. Its based on NodeRed, which if I understand correctly is an “Internet of Things / Node.js visual programming tool” and the teensy audio patcher mainly just writes lines of code that define inputs and outputs for a block of setup/initialization code using the teensy audio library. I love visual programming, Ive used max/msp since 2001 and worked on beta testing / library patches / animation and concept design for Audulus 3 for iOs / OSX / Windows / AU / VST which is very pretty and worth checking out.