| Author |
Message |
Rinko

Joined: Jun 03, 2008 Posts: 38 Location: UK
|
Posted: Fri Jun 06, 2008 2:13 pm Post subject:
running a program in miniaudicle |
 |
|
sorry to bother everyone with such a basic quetion but i can't figure this out!
if i write a program in chuck called 'example.ck', how do i run it in miniaudicle.
the chuck documentation says that to run a program all you need to do is enter:
%> chuck example.ck
but no matter what i try i get a parse error. is there a different way of doing this in miniaudicle? i couln't find anything in the miniaudicle guide or anywhere else and i've tried searching the forum and the net in general.
i have set my current directory in miniaudicle's prefs and tried entering the location of the file in the code both instead of and as well as this just in case e.g.
%> chuck home/applications/miniaudicle/mypatches/example.ck
but nothing works
any help appreciated.
thank you for your time! |
|
|
Back to top
|
|
 |
blue hell
Former site admin

Joined: Apr 03, 2004 Posts: 24864 Location: The Netherlands, Enschede
Audio files: 353
G2 patch files: 320
|
Posted: Fri Jun 06, 2008 4:12 pm Post subject:
|
 |
|
You have to open the file in mini audicle, or paste the file contents into a mini audicle window & then you can beam it to the sound engine. It's a sort of an IDE for ChucK, not a command line interface. I forgot the details .. it's not too hard though.
Basic questions are good and helpful & its way more silly to get stuck on 'm than to ask 'm. |
|
|
Back to top
|
|
 |
Kassen
Janitor


Joined: Jul 06, 2004 Posts: 7678 Location: The Hague, NL
G2 patch files: 3
|
Posted: Sat Jun 07, 2008 12:22 am Post subject:
|
 |
|
Yes. To summarise; The MiniAudicle is basically a simple text editor with a ChucK virtual machine built in. in it you get;
*Windows that hold ChucK code. The code can get there either by opening a file or by typing it in. From there on you can run it by using the "+" icon at the top, remove it again by using "-" or replace the last added shred with the current code using "=". You can also use hotkeys, particularly [alt] + [+] to add (replace and remove work with = and - respectively).
*A window to monitor what shreds are running and if needed to remove them.
*A window that prints feedback from the VM on what it's doing (adding shreds, etc) and where your <<<"printed statements">>> show up.
Because of those icons and the hotkeys there is no need to use command-line style syntax to run files, many people find that convenient. _________________ Kassen |
|
|
Back to top
|
|
 |
Rinko

Joined: Jun 03, 2008 Posts: 38 Location: UK
|
Posted: Sat Jun 07, 2008 2:54 am Post subject:
|
 |
|
ah got it!
i understood the basic principle of miniaudicle more or less but what threw me in the tutorial was the example where you run 3 dif progs at once to create a phased effect - i couldn't figure that out but now i see there's a shortcut to run all open windows.
haha cheers for your help guys - i'm enjoying this! |
|
|
Back to top
|
|
 |
kijjaz

Joined: Sep 20, 2004 Posts: 765 Location: bangkok, thailand
Audio files: 4
|
Posted: Sat Jun 07, 2008 11:24 pm Post subject:
|
 |
|
Rinko: It's great having you here and seeing you're gonna have fun starting ChucK.
I'll come by and see some of your new patches soon! heheh |
|
|
Back to top
|
|
 |
Rinko

Joined: Jun 03, 2008 Posts: 38 Location: UK
|
Posted: Tue Jun 10, 2008 7:01 am Post subject:
|
 |
|
cheers!
fraid between doin my postgrad dissertation and workin i don't have a lot of music time but i'll try and get summat up soon
i'm already finding chuck quite intuitive so hopefully head cracking futuristic generative drums are on the way... |
|
|
Back to top
|
|
 |
kijjaz

Joined: Sep 20, 2004 Posts: 765 Location: bangkok, thailand
Audio files: 4
|
Posted: Tue Jun 10, 2008 11:05 pm Post subject:
|
 |
|
Have you tried doing Cellular Automata and applying the result to the drumming patterns?
I really like the patterns that can be generated or controlled by the method,
although sometimes it can go very chaotic ..
(i love that too). |
|
|
Back to top
|
|
 |
Rinko

Joined: Jun 03, 2008 Posts: 38 Location: UK
|
Posted: Wed Jun 11, 2008 4:35 am Post subject:
|
 |
|
ah! not yet - its a subject i've come across but not researched properly yet. stuff like that really interests me though.
do you have any resources you could recommend please?
i've not found any tutorials or such on doing generative stuff in chuck - have noted that you and others have posted examples of related stuff though so will give them a look.
cheers! |
|
|
Back to top
|
|
 |
kijjaz

Joined: Sep 20, 2004 Posts: 765 Location: bangkok, thailand
Audio files: 4
|
Posted: Wed Jun 11, 2008 8:37 pm Post subject:
|
 |
|
to Rinko:
You can read on wikipedia or other academic resources,
but just start with some very simple idea..
http://en.wikipedia.org/wiki/Cellular_automata#Simplest
(and this can still be pretty funky for music already!)
- - -
You might want to start from preparing drum sounds (or samples) that you can trigger any time you'd like it to play,
then set up one array of integer, initialize it (or randomize heheh)
in its simplest form, you can just have binary value only: only 0 or 1 (off or on)
Then each iteration, copy all the values of the array to a "dummy" array,
then do the automata, apply your rules depending on the data on "dummy",
then put the result in the same array.
The result can be used as drum patterns.
Some rules can be chaotic and some create repeatable cycles,
So you can experiment quite a lot just from this start.
let me show you a little of the idea:
| Code: | SinOsc BD_s => Gain BD_env => SinOsc BD_drive => dac;
3 => BD_env.op;
1 => BD_drive.sync;
// bass drum main osc (Sine) to Amp Envelope to Overdrive (sine-based) to DAC
Impulse BD_i => Gain BD_g => BD_g => BD_env;
// create an exponential envelope
60 => BD_s.freq; // set bass drum frequency
.999 => BD_g.gain; // set decay
.4 => BD_i.gain; // set attack volumn
.5 => BD_drive.gain; // set overall max volumn
// - - -
Noise SD_s => Gain SD_env => SinOsc SD_drive => dac;
3 => SD_env.op;
1 => SD_drive.sync;
// snare drum main osc (Sine) to Amp Envelope to Overdrive (sine-based) to DAC
Impulse SD_i => Gain SD_g => SD_g => SD_env;
// create an exponential envelope
.999 => SD_g.gain; // set decay
.4 => SD_i.gain; // set attack volumn
.5 => SD_drive.gain; // set overall max volumn
// - - -
int table[16]; // array for cellular automata
table.cap() => int N; // array size
int dummy[N]; // a dummy array the same size of 'table'
// change this value to make it play an entirely different patterns
1 => table[4] => table[15]; // initialize the array
110.0 => float BPM;
minute / BPM * .25 => dur Beat; // play as 16 notes with tempo 110
while(true)
{
float velocity; // note velocity
// copy from table to dummy
for(int i; i < N; i++) table[i] => dummy[i];
// apply some funny rules
// if all are 0, re-initialize it.
0 => int sum;
for(int i; i < N; i++)
{
dummy[i] ^ dummy[(i + 1) % N] => table[i];
table[i] +=> sum;
}
// change this value to make it play an entirely different patterns
if (sum == 0) 1 => table[4] => table[15]; // (re-initialize)
// play them out as BD or SD
for(int i; i < N; i++)
{
if (i == 0) 1.5 => velocity; else .5 => velocity;
if (table[i] == 0) velocity => BD_i.next;
else velocity => SD_i.next;
Beat => now;
}
} |
This program creates an int array to be used as a drum machine.
it'll play bassdrum if the cell is 0, or snaredrum if it's 1.
Now it applies a simple XOR operation on the values of the table,
but each time it's processed, a funky transformation happens.
it doesn't look totally cool if printed out as graphics,
but sounds cool as a drum solo hahahah...
I'm enjoying the patterns from this thing ohh... -_-"
if you initialize it with a different set of 0's and 1's,
you'll get a different drum solo.
or if you change the size of the array,
you'll get a different pattern with as much beats as you'd like.
like 19-beat funk hahahah -_- for example. |
|
|
Back to top
|
|
 |
Rinko

Joined: Jun 03, 2008 Posts: 38 Location: UK
|
Posted: Sun Jun 15, 2008 4:40 am Post subject:
|
 |
|
than you for that!
i'll have a play around when i get some time.
cheers! |
|
|
Back to top
|
|
 |
|