Organelle~ running csound

http://csound.github.io/

3 Likes

Hey! This is great news! I am going to have a class in Csound next semester. Good timing!

@shreeswifty any updates on Csound?

I just saw this today:

Its an ā€œeditorā€ in Csound that lets you load Nord modular patches into CSound and let you tweek them. Pretty cool :slight_smile:

Csound is available in the patreon

@Jaffasplaffa , csound is available on pacman, so should be easy to install.

[root@organelle2 ~]# pacman -Ss csound
community/csound 6.10.0-8
    A programming language for sound rendering and signal processing.

if your interested in actually following this up, then I could quickly create an installer so csound is available to everyone.

how do you plan to use it?
Personally, I think Id prefer to use csound outside of PD, as running PD consumes extra resourcesā€¦ and now with OS 3.0 , you can run patches made with anything

anyway, If there is genuine interest then i can take a look, its quick to do , but only worthwhile if someone is actually going to use it :wink:

btw: unfortunately, it looks like Python3 is broken on the organelle, so you wont be able to run the G2 converter on the Organelle, itā€™ll have to be done on your desktopā€¦
(Iā€™ll ensure its fixed for the ā€˜linux upgrade projectā€™ , perhaps will also preinstall csound and a few others things ;))

Hey Patrick and Mark!

Thanks for the answers.

I was just curious about if it would be possible to run on Organelle. I got a Nord G2 so I all ready got some clavia sound covered in the studio :slight_smile:

regarding CSound , I dont know much about it, just thought that this looked like a cool thing :slight_smile:

So for me personally, @thetechnobear you donā€™t have to do anything about it, was just curious about it. But thank you for wanting to help :slight_smile:

yeah, I saw the same article in CDM the other day, and the same idea jumped into my head too :slight_smile:

however, whilst, I knew i could get Csound installed easily onto the Organelle (even if I had to build it myself).
my lack of familiarity with Csound, meant i was a little unsure how Id interface the controls of the patch with the LCD/Pots on the Organelle.

Id guess we could do this with the pd-csound object, and then use the PD stuff available, but I donā€™t like the overhead PD introduces.
so Id prefer to do it, as i did with SC, which is create some csound ā€˜objectsā€™ that directly uses OSC to talk to mother host directly - this would necessitate me learning a bit of csound, and then looking a how to ā€˜patch inā€™ this G2 csound conversionsā€¦ possible but not something Iā€™ve got a lot of time for .
hence my comments about if someone else would like to get involved - so it could be more a community effort.

anyway, Im in the middle of a couple of other things at the moment, so if your not eager to jump in on this, then Iā€™ll reconsider it laterā€¦ and definitely consider putting csound into the ā€˜linux upgrade projectā€™

2 Likes

yeah my G2 says Hi with all my old patches, but I donā€™t have what it takes to go near thisā€¦I think.
Iā€™m around :wink:

1 Like

TO be honest I dont have any experience with CSound at all. But I thought that this might be a reason to look into it. Think Iā€™ll just take it up on the laptop and be happy over there :slight_smile:

2 Likes

Csound works obviously though you can pac-man install it and start hacking away or play with some design patches so you have choices

cheers~

What is the price of entry for access to csound on your patreon?

Itā€™s tiered like all patreon and after next month itā€™s being revised to include Custom ETC, SuperCollider M4L and Organlle patches. We have a set of ETC pygame modes that are just astounding.

Send me a PM and iā€™ll get you some fun free pd/csound patches to play with with csound that get you going

Hello shreeswifty!

I would love to be running my Csound instruments and effects on my organelle M.

  • can you help me get things rolling?

Can I just run things as .csd files?
Do I need to use the csound6~ opcode and convert things into PD patches?

I would appreciate your advice and what you might be able to share.

Is there an installer?

Hope you are well. This is exciting news. I do love the Organelle M. Awesome.

Dr.B. (csounder)

Hello thetechnobear,

I donā€™t know if you ever created the Csound installer for the Organelle.

  • I hope that you did.

I love the Organelle M and I would love to be using Csound on it directly.

Any advice that you could offer would be great.

  • and, not only would I use it, but I would be using it to teach Csound at Berklee
  • I already show and use the unit in my Circuit-Bending class there and in my DSP class too
  • And, I have recommended it to many.

I just found out today, from my chairman Michael Bierylo, that you or others at Critter and Guitari are running Csound on the Organelle M. Hope so. And hope that there are some examples that you or others might be able to share about the process and about their progress.

Dr. B. (csounder)

I think Csound is already installed on the latest Organelle M OS, but Iā€™ll have to double checkā€¦ There should be a minor OS update coming soon anyway with some small fixes and Iā€™ll take a look at the Csound situation too if it isnā€™t installed already.

Thanks! Please keep me posted. Itā€™s a fantastic platform that will be even more amazing with Csound inside!

Dr. Richard Boulanger
Professor
Electronic Production and Design
Berklee College of Music

1 Like

Hi!
I just wanted to bump this thread and see if there are any news?

Like the esteemed Dr B above I would love to run Csound on the organelle.

In fact, I hooked up the organelle to a monitor and kbd and found Csound installed, and after a bit of searching found the example csd files on there too, so I have already successfully run Csound playing the obvious first-try composition Trapped in Convert by none other than the famous @csounder himself. Success!

But I would really like to interact with Csound using the keyboard and knobs/buttons. Csound has excellent OSC support, so if there is a list of OSC adresses for the keys, knobs and display, that would really be easy.

The thing that remains would then be to be able to start Csound like a patch from the menu. Maybe a small c++ program utilizing the Csound lib and pointing to a simple default csd file would be a way? Unfortunately Iā€™m not a programmer, so I wouldnā€™t know how to do thatā€¦

Regards,
Anders

You can get the Organelle to run things other than a Pd patch by creating a patch folder and inside place a run.sh. So it would look like this:

Patches/
    Csound Synth/
        run.sh
        csound and other files ...

It would show up in the Organelle menu as ā€˜Csound Synthā€™ and it would execute the run.sh file when you selected it. So in the run.sh is where you want to start Csound and do whatever configurations.

The best place to understand the OSC messages being sent and received is in the mother.pd patch that opens with any Pd patch. You can download the mother.pd patch here

Also look at the Graphics Demo patch that has OSC messages for controlling the OLED screen.

I wonder how to most easily handle shutting Csound down when switching to some other patch?
It seems the overall main.pd or similar is running because when I turn the encoder knob I immediately scroll through the patches and other items, but when I press the encoder to choose e.g. a synth patch, Csound is still running in the background. I could add a kill command to my script, and then restart when Csound shuts down, perhaps?
But what process should I kill when starting csound?
ā€¦or I could try to trap the signal to the dash script. The question then is what signal is sent to kill the run.sh script?
It doesnā€™t seem to be SIGINT, because when starting run.sh manually from terminal, Csound automatically quits too, when pressing ctrl+c to quit the run.sh script, but when turning the encoder and choosing some other patch, the run.sh script quits, but Csound keeps running. So it is most likely some other signal. I hope it isnā€™t SIGKILL because that cannot be trapped.

EDIT: It is SIGTERM thatā€™s being sent. Now that I actually bothered to learn some more about how shell scripts behave, I managed to trap the SIGTERM signal and shut down csound. Now for some proof of concept sound generation.

SUCCESS!
Well, here is a proof of concept for Csound running (without using the Csound pd wrapper) on the organelle m.

My run.sh script contains

#!/bin/bash -e

cleanup() {
  kill $(pidof csound)
}

trap cleanup TERM HUP INT

/usr/bin/csound organelle.csd > /dev/null 2>&1 &

wait $(pidof csound)

and the accompanying csd file (organelle.csd in this case) contains

<CsoundSynthesizer>
<CsOptions>
-odac           -iadc     -d     
</CsOptions>
<CsInstruments>

sr      =  44100
ksmps   =  128
nchnls  =  2
0dbfs   =  1



; Organelle OSC -> Csound inbound messages port 4000
;
;    /key ii 
; keys send two values - the key number (0-24) and the key value (0 or 100)

;    /knobs iiiiii 
; knobs have vaules between 0 and 1023
;
;
; Csound -> Organelle OSC outbound messages port 4001
;
;    /led i
; the led accepts values between 0 and 7:
; 0=off
; 1=red
; 2=yellow
; 3=green
; 4=cyan
; 5=blue
; 6=magenta
; 7=white
;
; Lines of text and values can be sent to the oled screen:
;    /oled/line/1
;    /oled/line/2
;    /oled/line/3
;    /oled/line/4
;    /oled/line/5
;    
; There is also the /oled/vumeter OSC address, as well as /oled/gSetPixel and other versatile functions to explore
; which can be found in the graphics demo patch at https://patchstorage.com/graphics-demo/
; From that demo patch we can identify an address for clearing the screen: /oled/gClear 
; the inputs of which seems a bit unclear but two integers 3 and 1 seems to do the trick (copied from the demo patch).

gilisten OSCinit 4000   ;keys and knobs send OSC data on port 4000
                        ;the display and led receives OSC data on port 4001

turnon 1

        instr 1
        gkkey1 init 1
        gkkey2 init 1
        gkkn1 init 1
        gkkn2 init 1
        gkkn3 init 1
        gkkn4 init 1
        gkkn5 init 1
        gkkn6 init 1

kmsg    OSClisten gilisten, "/key", "ii", gkkey1, gkkey2
kmsg2   OSClisten gilisten, "/knobs", "iiiiii", gkkn1, gkkn2, gkkn3, gkkn4, gkkn5, gkkn6

        OSCsend     kmsg+kmsg2, "127.0.0.1", 4001, "/oled/gClear", "ii", 3, 1
        OSCsend     kmsg+kmsg2, "127.0.0.1", 4001, "/oled/line/1", "sisi", "KEY", gkkey1, "VOLUME", gkkn5
        OSCsend     kmsg, "127.0.0.1", 4001, "/led", "i", 7*gkkey2/100

gic     = 440/2^(9/12)

kcps    = gic*2^(gkkey1/12)             ;the first key value is the key numeber
                                        ;from 1 (low c) to 24 (high b)

kamp    = 0.01*gkkn5/1024*gkkey2/100    ;knob5 is the volume knob
                                        ;the second key value toggles
                                        ;between 0 and 100, lika a simple
                                        ;velocity level


a1      vco2 kamp, kcps                
        out a1, a1                         
 
       endin

</CsInstruments>
<CsScore>
</CsScore>
</CsoundSynthesizer>

I hope this is useful for someone!

Regards,
Anders

1 Like