This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(require rsound) | |
(require 2htdp/universe) | |
(require 2htdp/image) | |
(define SR 44100.0) | |
(define (s sec) (* sec SR)) | |
;(define beat-frames (round (/ (* SR 60) 128))) | |
;(define (beat b) (* beat-frames b)) | |
(define LEAD-FRAMES (s 1/14)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(require rsound) | |
(require 2htdp/universe) | |
(require 2htdp/image) | |
(define SR 44100) | |
(define (s sec) (* sec SR)) | |
(define beat-frames (round (/ (* SR 60) 128))) | |
(define (beat b) (* beat-frames b)) | |
(define LEAD-FRAMES (beat 0.5)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(require rsound) | |
;; the sample rate | |
(define SR 44100) | |
;; a helper function to simplify specifying the number of seconds | |
(define (s seconds) (* seconds SR)) | |
;; read in a clip of a sound | |
(define samp | |
(rs-read/clip "/path/to/your/sound.wav" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(require rsound) | |
(require rsound/piano-tones) | |
(require 2htdp/universe) | |
(require 2htdp/image) | |
;(play (piano-tone 62)) | |
(define (both a b) b) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
#| -*- scheme -*- | |
exec gracket -tm "$0" "$@" | |
|# | |
#lang racket/gui | |
;; =========================================================================== | |
(define (insert-to-editor editor . xs) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(require 2htdp/image) | |
(require 2htdp/universe) | |
(require rsound) | |
;; a world is an integer. | |
;; rep. the "x" position of the mouse | |
(define SCREENWIDTH 400) | |
;; draw the world |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#lang typed/racket | |
(: fir-filter ((Listof (List Nonnegative-Fixnum Real)) -> Any)) | |
(define (fir-filter params) | |
(match params | |
[`((,delays ,amplitudes) ...) | |
(+ 1 (apply max delays))] | |
[other (error 'ouch)])) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#lang typed/racket | |
(: fir-filter ((Listof (List Nonnegative-Fixnum Real)) -> Any)) | |
(define (fir-filter params) | |
(match params | |
[`((,delays ,amplitudes) ...) | |
(: max-delay Index) | |
(+ 1 (apply max delays))] | |
[other (error 'ouch)])) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fn f() -> int { | |
macro_rules! a (() => (3)); | |
return a!(); | |
} | |
fn main() { | |
a!(); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
run codegen [x86_64-apple-darwin]: x86_64-apple-darwin/stage2/bin/compiletest | |
running 9 tests | |
test [codegen] codegen/iterate-over-array.rs ... | |
error: extracting 'test' function failed | |
command: /Users/clements/rust/build/x86_64-apple-darwin/llvm/Release+Asserts/bin/llvm-extract -func=test -o=x86_64-apple-darwin/test/codegen/iterate-over-array-clang-extract.bc x86_64-apple-darwin/test/codegen/iterate-over-array-clang.bc | |
stdout: | |
------------------------------------------ | |
------------------------------------------ |