Csound Csound-dev Csound-tekno Search About

[Csnd] random seed for score?

Date2014-04-17 08:55
FromRichard Dobson
Subject[Csnd] random seed for score?
It's been a while since I actually asked a question here, and this is a 
simple one which may become a feature request:

The score supports a snazzy random operator via the tilde symbol. 
Suffice it to say I can write a score such as:

; repeat with random start time, note, duration and amp
{ 40 CNT
i1 [$CNT +  ~ * 3 ]  [ ~ * 4 + 4]       [~ * 0.1 + 0.1]
}

for a simple random texture, with random start times. It works as 
expected (maybe even better), so I have not yet bothered to go to 
solutions using schedule, scripting, etc.

However, there is the usual problem using random stuff - each run 
generates the same sequence. Is there a score counterpart to the seed 
opcode? If not, could that be added to the list of feature requests?

Richard Dobson


Date2014-04-17 09:42
FromVictor Lazzarini
SubjectRe: [Csnd] random seed for score?
Sounds doable. 

May I suggest something to you? You probably know this, but you can ignore the score completely and
do all sorts of algorithmic event generation from the instr0 in the orchestra, where you would have access to all of its
random number generators (and loops etc.).

Lately, I have been writing scoreless pieces (CSDs with no  sections), and just using the orchestra
to schedule things. I am quite pleased with this method.

========================
Dr Victor Lazzarini
Senior Lecturer
NUI Maynooth, Ireland
victor dot lazzarini at nuim dot ie




On 17 Apr 2014, at 08:55, Richard Dobson  wrote:

> It's been a while since I actually asked a question here, and this is a simple one which may become a feature request:
> 
> The score supports a snazzy random operator via the tilde symbol. Suffice it to say I can write a score such as:
> 
> ; repeat with random start time, note, duration and amp
> { 40 CNT
> i1 [$CNT +  ~ * 3 ]  [ ~ * 4 + 4]       [~ * 0.1 + 0.1]
> }
> 
> for a simple random texture, with random start times. It works as expected (maybe even better), so I have not yet bothered to go to solutions using schedule, scripting, etc.
> 
> However, there is the usual problem using random stuff - each run generates the same sequence. Is there a score counterpart to the seed opcode? If not, could that be added to the list of feature requests?
> 
> Richard Dobson
> 
> 
> 
> Send bugs reports to
>       https://github.com/csound/csound/issues
> Discussions of bugs and features can be posted here
> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"
> 
> 
> 



Date2014-04-17 10:06
FromRichard Dobson
SubjectRe: [Csnd] random seed for score?
On 17/04/2014 09:42, Victor Lazzarini wrote:
> Sounds doable.
>
> May I suggest something to you? You probably know this, but you can
> ignore the score completely and do all sorts of algorithmic event
> generation from the instr0 in the orchestra, where you would have
> access to all of its random number generators (and loops etc.).
>

Indeed, and that is certainly the next step, but given there already is 
a random facility in the score, I think a seed option would find a 
number of uses and, so to speak, complete the facility. To do a run 
multiple times and choose the one I like the most, etc. I am not doing a 
mega composition project as such, just a short test/demo sound which the 
score solution fits perfectly (my sound will end up as an embedded track 
in a web page), save for the seed issue.

Richard Dobson