Skip to content

Instantly share code, notes, and snippets.

View georgejwright's full-sized avatar

George J Wright georgejwright

View GitHub Profile
@georgejwright
georgejwright / callback_nodes.xtm
Last active May 18, 2024 22:37
AN extempore example of node switching
;; callback_nodes.xtm
;; Following Andrew Sorensen's
;; A Short Solo Piano Example - aa-cell
;; see: http://impromptu.moso.com.au/icmc-examples.html
;; also see section: 3.5.3.Temporal graphs in:
;; https://www.researchgate.net/profile/Andrew-Sorensen-2/publication/228344047_aa-cell_in_practice_An_approach_to_musical_live_coding/links/543fa1120cf27832ae8bab97/aa-cell-in-practice-An-approach-to-musical-live-coding.pdf
;; For other relevant Sorensen links see end of this file:
;; The original "A Short Solo Piano Example" was written in 'impromptu'
@georgejwright
georgejwright / playing_real_midi_extempore.xtm
Last active October 28, 2023 20:53
Experiments with real midi notes on extempore pattern language
;; playing_real_midi_extempore.xtm
;; George Wright 10/04/2023
;; I did some experimenting in pattern language playing vectors of pairs of real midi
;; notes which differ by small amounts. Like this for example:
; (:> test1 4 0 (play samp1 @1 80 dur) '(#(63.5 64.5) #(61.5 62.5) #(59.5 60.5)))
;; Rather than manually change '(64 62 60) into '(#(63.5 64.5) #(61.5 62.5) #(59.5 60.5))
;; I wanted to be able to do it on the fly.
;; I had to learn quite a lot about deep recursion in Scheme!
;; And I had to learn something about currying in scheme!
@georgejwright
georgejwright / My_currying1.xtm
Last active May 18, 2024 23:25
Follow a Scheme YouTube tutorial about currying
;; Learning about currying.
;; George Wright 07/04/2023
;; Trying to learn something about currying in Scheme.
;; Following this tutorial by "Logic Lambda":
;; https://www.youtube.com/watch?v=kOT44AC-x7s
;; Logic Lambda Scheme Racket
;; https://www.youtube.com/playlist?list=PLm8dSOaqLPHKVPwBkk9UeAB2Lokl1xMJM
;; Tutorial uses Racket scheme but here I use Scheme in the extempore setup
;; which is close to R5RS
@georgejwright
georgejwright / testing_gpc_ivl.xtm
Last active December 12, 2023 20:55
Testing extempore functions handling real midi number from the file "gpc_ivl.xtm" that extends "extempore/libs/core/pc_ivl.xtm"
;; In Jan 2023 I discussed with Ben and Minoru the possibility of using
;; non-integer midi numbers in extempore.
;; see: https://groups.google.com/g/extemporelang/c/1Ne2dHIXLW4/m/RKw4HL_sAgAJ
;; The first thing I discovered was that standard vanilla extempore scheme functions
;; play and play-note work fine with non-integer midi notes.
;; We then found quantizing and related functions from "libs/core/pc_ivl.xtm"
;; have been deliberately constructed to handle only integer midi numbers
;; and integer pc sets.
;;
;; We generated a new library file which, in my system, I have placed in the
@georgejwright
georgejwright / gpc_ivl.xtm
Created February 15, 2023 03:46
An extension of the extempore pitch class and interval sets library "extempore/libs/core/pc_ivl.xtm"
;;; gpc_ivl.xtm -- pitch class and interval sets for real midi numbers
;; Adapted from the original work of Andrew Sorensen
;; by Minoru and George Wright
;; https://github.com/digego/extempore/blob/accbe7e0abb13567ecdcc25ccf9a54c92b0eb8c9/libs/core/pc_ivl.xtm
;; Keywords: extempore real midi
;;; Commentary:
;; In the original libs/core/pc_ivl.xtm library
;; a pitch class is taken to be a list of integer MIDI note values
@georgejwright
georgejwright / extempore_synth_tutorial.xtm
Last active October 3, 2022 20:46
An introduction to the sharedsystem synths of extempore.
;; Experiments with extempore synths.
;; George Wright 21/08/2022, 04/10/2022
;; An introduction to the sharedsystem synths of extempore.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; While hunting for ideas about synths I came across an excellent series by "Chalk Walk" explaining
;; signal flow in several different hardware synths. Highly recommended.
;; https://www.youtube.com/playlist?list=PLuh4CHo4ShJeyS7uawkbOtbDTqCpF0REC
;; I had no experience with modular synths and I found the "Chalk Walk" videos very helpful.
@georgejwright
georgejwright / fourPartHamonies.xtm
Last active September 10, 2023 07:54
Four-voiced harmony chord progressions in extempore
; fourPartHamonies.xtm
; Four-voiced harmony chord progressions
; George Wright 29/06/2020
; Following Jake Lizzio and his "Voice Leading" video
; https://www.youtube.com/watch?v=UkatcvIuF4U;
; Just using the Extempore built-in salamander-piano samples
(sys:load "libs/core/pc_ivl.xtm")
(sys:load "libs/external/instruments_ext.xtm")
@georgejwright
georgejwright / play_5_notes_in_temp.xtm
Last active June 30, 2022 22:18
Some experiments with audiobuffers in extempore
;; play_5_notes_in_temp.xtm
;; Some experiments with audiobuffers in which I attempt to:
;; Load and play a sequence of five piano notes saved in a stereo wav file.
;; Create an array of sample/frame positions of silence between notes.
;; Use AudioBuffer_set_playhead to change which notes are played
;; Select random playback starting positions in the sequence of notes.
;; Fiddle with parameters of "AudioBuffer_read_interp" and "AudioBuffer_read_interp_pw"
;; Select playback loop start and loop frames.
@georgejwright
georgejwright / piano_3_notes_in_assets.xtm
Last active May 27, 2022 22:01
Experiments with extempore audiobuffers
;; piano_3_notes_in_assets.xtm
;; Some experiments with audiobuffers in which I attempt to:
;; Load audio buffers. Print buffer component values. Play buffers.
;; Externally from the dsp, change the note played.
;; Concatenate two buffers. Concatenate three buffers.
;; Mix two buffers to sound together.
;; Using a different file from assets:
;; Some experiments with AudioBuffer_read_interp
@georgejwright
georgejwright / extemp_lang_revise.xtm
Last active May 28, 2022 21:56
Replacing lines 60 to 84 in extempore_lang.xtm
;; https://github.com/digego/extempore/blob/0368489bbacdb4cdd8d4da83f4be13e0516ee8da/examples/core/extempore_lang.xtm#L60
;; replacing lines 60 to 84 in extempore_lang.xtm
;; xtlang performs type inferencing. This means that when you compile a function with bind-func
;; you don't necessarily have to spell out explicitly the type of every argument/variable.
;; Keep in mind that functions are first-class citizens in xtlang.
;; They are actually closures that have a specific type, something like [returntype,inputtype1,inputtype2]*.
;; In the case of the next example "int-or-double-literal", the compiler has enough clues to figure out