WARNING: somewhat pedestrian newbie stuff ahead. Coding anything is quite new to me. Other relative beginners may find this example interesting.
This will work essentially the same using scales.
Having just read the FLOSS manual section on tables, and based on an earlier example from Iain McCurdy using a function table to randomize notes, I decided to further explore using tables for scales and arpeggios etc.
My previous experiments with arpeggios often used score loops which have certain drawbacks, for example the inability to transpose as easily and especially not being able to alter the colour (major, minor, dominant, adding 7ths, 9ths etc.) without creating specific loops.
This example reads the Note tables incrementally. Instr 1 feeds either instr 2 or 3 depending on the value of p6. I found that, as the tables are read in order by instr 1, that when a new instance is called in the score it starts one increment from the index where the previous one ended, thereby creating a smoother transition between patterns as opposed to always starting on the first note (Root) of the arp.
To better hear the transitions, line 26:
kTrig metro 8/kDur
can be altered from 8 to 6 or 4 to slow it down.
Possibly not the most efficient method or coding but hey, that’s why I’m a newbie. Instr are full stereo,although it wasn’t really necessary, for further experimenting with adding panning etc.
Of course. I’ll take a quick look tonight and perhaps modify it a bit (I can’t remember if I put enough explanation via comments in it), haven’t looked at it in some time.
Is standard (original) or functional syntax preferred? Being new to coding that was one of the first things I attempted and I was mostly coding based on manual examples, but now I’m trying to get used to functional.
Wow, in hindsight I definitely missed some things with that first attempt, Csound was so new to me as it still is in many ways. I tried to clean up a few things for ex:
not best choice of ftgen routine for note tables as it required unnecessary amount of parameters (having to number each note index)
using 2 instr for arps when 1 will do. Especially as using 1 instr highlights the table opcode’s ability to use multiple tables
This version is a little more reflective of what I’ve learned since then. I find using names for instr instead of numbers makes the code easier or more self-explanatory to read.
And functional syntax seems to be the direction in which coding is moving so I added that.
If you have any other suggestions/preferences let me know.
A slightly updated file in case you ever use it. It also helps illustrate using the table. The note table has been scaled and used to pan, so the higher/lower the pitch is the notes are panned accordingly as if sitting in front of a harp. If you do use it feel free to edit the options as necessary. table_arps_new_2.csd (2.1 KB)