[Csnd] GPIO to MIDI (Raspberry Pi & Csound)
Date | 2020-04-23 11:23 |
From | Mark Ferguson |
Subject | [Csnd] GPIO to MIDI (Raspberry Pi & Csound) |
Hi all, I need to get a Raspberry Pi to convert GPIO input from a photoresistor (LDR) to MIDI data, and then use that MIDI data to modulate an instrument running in Csound on the Pi. Could anyone point me in the right direction about how to do this? Any existing examples, perhaps? The goal would be to have a sound file playing on the Pi via diskin2, and to have amplitude controlled through MIDI aftertouch values, which would be dictated by light intensity from the LDR. I'm thinking this would be the best way to do it, but would be grateful for any simpler methods to achieve the same thing. Any help greatly appreciated! Mark. Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here |
Date | 2020-04-23 11:54 |
From | Matti Koskinen |
Subject | Re: [Csnd] GPIO to MIDI (Raspberry Pi & Csound) |
Hi Mark, reading with Pi's GPIO
won't work. LDR and some resisor + voltage needs ADC. There are
surely plenty of those made for PI to connect to GPIO or I2C
etc. A simple solution could
be Arduino + Pi. I've used that kind of hack sometime. -m
On 23.4.2020 13.23, Mark Ferguson
wrote:
Hi all, I need to get a Raspberry Pi to convert GPIO input from a photoresistor (LDR) to MIDI data, and then use that MIDI data to modulate an instrument running in Csound on the Pi. Could anyone point me in the right direction about how to do this? Any existing examples, perhaps? The goal would be to have a sound file playing on the Pi via diskin2, and to have amplitude controlled through MIDI aftertouch values, which would be dictated by light intensity from the LDR. I'm thinking this would be the best way to do it, but would be grateful for any simpler methods to achieve the same thing. Any help greatly appreciated! Mark. Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here |