Cabbage Logo
Back to Cabbage Site

Code beautifier Csound / Cabbage

Does anyone knows a code beautifier (for reindenting the code of Csound) I could use ?
Everything I found was for java, C, php etc… but nothing for csound.
Thank you for your help

[EDIT] : Wrote a python script which does the job. If anyone interested, please reply to this message, I will publish it.

I don’t know of any Csound tools for that but I use astyle for my C++ code. I guess you could write a custom style for that?

Just made a little python script. Sure it is not the most beautiful code ever but it aims at indenting correctly the csound code. Hoe someone will find it useful.
Here it is in a zip file

Python_Beauty.zip (785 Bytes)

Not exactly what you’re looking for, but I write most of my code in sublime… you can indent the current line or highlight a group of lines to indent by hitting command-[ or command-] (probably ctrl instead on win/lin) depending on which direction I want to indent. It’s not automated, but it’s still handy to have.

Thank you @t_grey, I think I will use an external editor later for my next synth.
The idea was to reindent the whole bunch of code of my morpheur synth. I feel lazy when it is about going through more than a thousand lines of code by hand.
The little script above is doing the job in a simple way, indenting all if/ else/elseif , instr, opcodes etc…