Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion grammars/extempore.cson
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ patterns: [
name: "constant.language.extempore"
}
{
match: "\\b(cons|car|cdr|cadr|caddr|cadddr|cond|lambda|quote|eval|append|list|vector|member|load|begin|map|apply|for-each|println|printf|print|rmatch|rsplit|rreplace|cosd|tand|sind|coshd|tanhd|sinhd|acosd|asind|atand|atan2d|ceild|floord|expd|fmodd|powd|logd|log2d|log10d|sqrtd|fabsd|clearerr|ctermid|fclose|fdopen|feof|ferror|fflush|fgetc|fgets|fileno|flockfile|fopen|fputc|fputs|fread|freopen|fseek|ftell|ftrylockfile|funlockfile|fwrite|getc|getchar|getc_unlocked|getchar_unlocked|gets|getw|pclose|perror|popen|putc|putchar|putc_unlocked|putchar_unlocked|puts|putw|remove|rename|rewind|setbuf|setvbuf|tempnam|tmpfile|tmpnam|ungetc|atof|atoi|atol|memccpy|memchr|memcmp|memcpy|memmove|memset|strcat|strchr|strcmp|strcoll|strcpy|strcspn|strdup|strerror|strlen|strncat|strncmp|strncpy|strpbrk|strrchr|strspn|strstr|strtok|strtok_r|strxfrm|base64_encode|base64_decode|cname_encode|cname_decode|swap64f|unswap64f|swap32f|unswap32f|swap64i|unswap64i|swap32i|unswap32i|thread_fork|thread_fork|thread_join|thread_kill|thread_self|thread_sleep|mutex_create|mutex_destroy|mutex_lock|mutex_unlock|mutex_trylock|callback|modulo|random |play-midi-note|mplay|inexact->exact|pm_send|min |max |cosr)\\b"
match: "\\b(cons|car|cdr|cadr|caddr|cadddr|cond|lambda|quote|eval|append|list|vector|member|load|begin|map|apply|for-each|println|printf|print|rmatch|rsplit|rreplace|cosd|tand|sind|coshd|tanhd|sinhd|acosd|asind|atand|atan2d|ceild|floord|expd|fmodd|powd|logd|log2d|log10d|sqrtd|fabsd|clearerr|ctermid|fclose|fdopen|feof|ferror|fflush|fgetc|fgets|fileno|flockfile|fopen|fputc|fputs|fread|freopen|fseek|ftell|ftrylockfile|funlockfile|fwrite|getc|getchar|getc_unlocked|getchar_unlocked|gets|getw|pclose|perror|popen|putc|putchar|putc_unlocked|putchar_unlocked|puts|putw|remove|rename|rewind|setbuf|setvbuf|tempnam|tmpfile|tmpnam|ungetc|atof|atoi|atol|memccpy|memchr|memcmp|memcpy|memmove|memset|strcat|strchr|strcmp|strcoll|strcpy|strcspn|strdup|strerror|strlen|strncat|strncmp|strncpy|strpbrk|strrchr|strspn|strstr|strtok|strtok_r|strxfrm|base64_encode|base64_decode|cname_encode|cname_decode|swap64f|unswap64f|swap32f|unswap32f|swap64i|unswap64i|swap32i|unswap32i|thread_fork|thread_fork|thread_join|thread_kill|thread_self|thread_sleep|mutex_create|mutex_destroy|mutex_lock|mutex_unlock|mutex_trylock|callback|modulo|random |play-midi-note|mplay|inexact->exact|pm_send|min |max |cosr|list-ref|real->integer|rotate|vector-set!|vector-ref|vector-length)\\b"
name: "support.function.extempore"
}
{
Expand Down
26 changes: 21 additions & 5 deletions snippets/xtlang-atom.cson
Original file line number Diff line number Diff line change
Expand Up @@ -294,13 +294,13 @@
body: "(metplay ${1:metro} ${2:device} ${3:pitch} ${4:vel} ${5:dur} ${6:ch})"
"mplay":
prefix: "mplay "
body: "(mplay ${1:device} ${2:pitch} ${3:vel} ${4:dur} ${5:0})"
body: "(mplay ${1:device} ${2:pitch} ${3:vel} ${4:dur} ${5:ch})"
"midi-play-chord":
prefix: "mpchord "
body: '''
(for-each (lambda (p)
(mplay ${1:device} p ${2:vel} ${3:dur} ${4:channel}))
(pc:make-chord ${5:lower} ${6:upper} ${7:voices} ${8:'(0 2 4 5 7 9 11)}))
(mplay ${1:device} p ${2:vel} ${3:dur} ${4:ch}))
(pc:make-chord ${5:lower} ${6:upper} ${7:voices} ${8:'(0 2 5 7 9)}))
'''
"nargs-test":
prefix: "ifnargs "
Expand Down Expand Up @@ -392,6 +392,9 @@
play:
prefix: "play "
body: "(play ${1:inst} ${2:60} ${3:80} ${4:dur})"
"pm-send":
prefix: "pms"
body: "(pm_send ${1:device} ${2:*midi-cc*} ${3:ch} ${4:a} ${5:b})"
pref:
prefix: "pref "
body: "(pref$1 ${2:dat} ${3:index})"
Expand Down Expand Up @@ -478,13 +481,26 @@
(define ${1:fun-name}
(lambda (beat dur lst inc)
$0
(mplay ${6:device} (car lst) 100 dur 0)
(mplay ${6:device} (car lst) 50 dur ${7:0})
(callback (*metro* (+ beat (* .5 dur))) '$1 (+ beat dur) dur
(rotate lst inc) inc)))

($1 (*metro* 'get-beat ${2:4}) ${3:1/4} ${4:'(60)} ${5:1})
($1 (*metro* 'get-beat ${2:4}) ${3:1/4} ${4:'(60)} ${5:-1})
'''
"temporal-recursion-rotate-velocity":
prefix: "trrv "
body: '''
(define ${1:fun-name}
(lambda (beat dur lst inc vel)
$0
(mplay ${7:device} (car lst) (cosr vel 10 1) dur ${8:0})
(callback (*metro* (+ beat (* .5 dur))) '$1 (+ beat dur) dur
(rotate lst inc)
inc
vel)))

($1 (*metro* 'get-beat ${2:4}) ${3:1/4} ${4:'(60)} ${5:-1} ${6:20})
'''
"temporal-recursion-metro-with-note-attributes":
prefix: "trmn "
body: '''
Expand Down