Arp documentation

Official support for: audjoo.com
Post Reply New Topic
RELATED
PRODUCTS

Post

Hi, folks. I'm a newcomer here but I wanted to post something I hope might be somewhat useful to others. I've had Helix for a while now and am just starting to really delve into it in earnest now. Part of that was attempting to learn the ARP language. I saw the prior post from Jonas about the language but that was a little incomplete. There was also a reference to a Google Doc that may have been taken down. As such, I set about looking at the included ARPs and pieced together this document. As people give feedback, I can update it as needed. If Jonas feels it useful enough to pin I'm OK with that. :wink:

No, these are not precisely in alphabetical order. Instead, I tried to keep a somewhat logical grouping/sub-grouping to keep related commands together. Those with better organizational skills are certainly welcome to suggest alternatives, although the command list is short enough one should easily be able to browse through the entire list fairly quickly.

Tone commands:
lo $var - The lowest note of the chord
hi $var - The highest note of the chord
up $note - Assign $note the next highest note in the chord sequence
down $note - Assign $note the next lowest note in the chord sequence
retune $note1 $note2 $vel - Retune $note1 to pitch denoted by $note2 without “releasing” and “pressing” the note, thus preserving the position in the envelope generator. (Akin to a legato movement)
on $var $vel <$offset> - Sound note $var at velocity $vel (optional offset denoted by $offset - based on 12-tone chromatic scale)
off $var <$offset> - Turn off note $var (optional offset denoted by $offset)
wait n - Wait for a time denoted by the numerical value n. This is n times the base duration (ticks).

Variable management/mathematical commands
set $var n - Set the variable to numeric value n
add $var $val - Equivalent to $var = $var + $val
mod $var $val - Returns the remainder of $var / $val
mul $var $val - Equivalent to $var = $var * $val
sub $var $val - Equivalent to $var = $var - $val

Logic branching/comparison
goto @target - Go to location in code denoted by @target
eq $var $val @target - If $var is equal to $val then go to @target
ge $var $val @target - If $var is greater than or equal to $val then go to @target
gt $var $val @target - If $var is greater than $val then go to @target
le $var $val @target - If $var is less than or equal to $val then go to @target
lt $var $val @target - If $var is less than $val then go to @target
invalid $note @target - If $note is an invalid node in the chord, go to @target
valid $note @target - If $note is a valid node in the chord, go to @target

Miscellaneous
/ - A comment indicator

Post

Thanks for disinterring this interresting topic!
I emailed Jonas to request that lost Google Doc
F E E D
Y O U R
F L O W

Post

Somehow the google doc was moved...
Here is the contents:



Helix arpeggiator Script

The arpeggiator in Helix is an unconventional little beast. It consists of a simple virtual machine executing compiled byte code. The script controls the synth by calling certain functions, and can get informations about pressed keys from other functions.

Variables are named with a leading dollar sign ($) and are all numbers (no advanced data types). They are automatically created when referenced.

Labels start with an at sign (@) and are the only places you can "goto" or conditional jump to.

Comments start with a slash sign ( / ) and are used to remember the meaning of what you wrote.

If there is any problems when translating your script into bytecode a file called assembler.log will be created in the same directory as the script

Reading keys from the keyboard:

// set $a to lowest pressed key
lo $a

// set $a to highest pressed key
hi $a

// find the pressed key up from $note
up $note

// find the pressed key down from $note
down $note


//When you call "up" enough times you will pass the highest pressed key. The variable you pass in to "up" will be set to a special state called invalid. You can test //against that state like this:


// if $note is valid jump to @label
valid $note @label

// if $note is not valid jump to @label
invalid $note @label


Playing note:

on $note $vel
retune $note $newnote $vel
off $note
on $note $vel 12
off $note 12



Other:

// copy $b to $a
set $a $b

// set $a to 7
set $a 7

// set $a to $a + $b
add $a $b

// set $a to $a - $b
sub $a $b

// set $a to $a * $b
mul $a $b

// set $a to $a / $b
div $a $b

// set $a to $a % $b
mod $a $b

// less then
lt $var $var @label

// less than or equal
le $var $var @label

// equal to
eq $var $var @label

// greater than
gt $var $var @label

// greater than or equal
ge $var $var @label

// not equal
ne $var $var @label

goto @label


Progress time:

// return control to Helix, not calling this, more or less hang the synth
wait $ticks
wait 1


Example:

// The script below play the press notes from bottom to high then restarts.

// create a variable named $vel and set it to 0.5
set $vel .5

// create a variable named $n and set it to the lowest pressed key
lo $n

// this is a label called "loop"
@loop

// send a note-on to Helix, specifies a note and a velocity
on $n $vel

// wait one "tick"
wait 1

// send a note-off to Helix
off $n

// find the next higher pressed key from $n
up $n

// if the note is still valid, then goto @loop
valid $n @loop

// when reaching this point start over



I hope this helps at all.

Jonas

Post

Also, here are the "hardcoded" arps:

Up:

Code: Select all

 set $vel .5
 lo $n
 @loop
 on $n $vel
 wait 1
 off $n
 up $n
 valid $n @loop
Down:

Code: Select all

 set $vel .5
 hi $n
 @loop
 on $n $vel
 wait 1
 off $n
 down $n
 valid $n @loop

Post

Awesome! Thank you, Jonas. I was a bit unsure of the retune and I'm glad to see that example. That's quite helpful.

I appreciate you posting the document here.

Post

AUTO-ADMIN: Non-MP3, WAV, OGG, SoundCloud, YouTube, Vimeo, Twitter and Facebook links in this post have been protected automatically. Once the member reaches 5 posts the links will function as normal.
So, to be perfectly honest, part of what I want to use the arp for may be a little unconventional.

Several times I find myself wanting to have a repeated pattern for bass chords, not arpeggiation. This allows for fast entry of a rhythmic bass line without requiring repeated key entries.

Perhaps the simplest form might be the following:

Code: Select all (#)

set $vel 1

lo $note

@onloop
on $note $vel
up $note
valid $note @onloop

wait 1

lo $note
@offloop
off $note
up $note
valid $note @offloop

wait 1
This will perform a basic chord on alternating clicks.

I'll be experimenting more - I am thinking of also attempting pseudo-random patterns as well.

I'll keep posting here if people are interested in examples.

Cheers!

Post Reply

Return to “Audjoo”