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 racket | |
(require ffi/vector | |
ffi/unsafe | |
(rename-in racket/contract [-> c->]) | |
(planet clements/portaudio/portaudio) | |
(planet clements/portaudio/callback-support)) | |
;; this module provides a function that plays a sound. |
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
JSONOBJECT = {code : CODE, trace : TRACE} | |
TRACE = {ordered_globals : VARARRAY, | |
stdout : STDOUT, | |
} |
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/universe) | |
(require 2htdp/image) | |
; Copyright 2012, John Clements ([email protected]) | |
; | |
; Licensed under the Apache License, Version 2.0 (the "License"); | |
; you may not use this file except in compliance with the License. | |
; You may obtain a copy of the License at | |
; | |
; http://www.apache.org/licenses/LICENSE-2.0 |
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 racket | |
(require net/url | |
#;html | |
(planet neil/htmlprag)) | |
#;(string->url "https://dev.twitter.com/oauth/request_token") | |
(define the-port | |
(post-pure-port |
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/universe) | |
(require 2htdp/image) | |
; Copyright 2012, John Clements ([email protected]) | |
; | |
; Licensed under the Apache License, Version 2.0 (the "License"); | |
; you may not use this file except in compliance with the License. | |
; You may obtain a copy of the License at | |
; | |
; http://www.apache.org/licenses/LICENSE-2.0 |
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 (planet clements/rsound:4:3)) | |
(define SONG (rs-read "/tmp/wenceslas.wav")) | |
(define my-ding (rs-append ding (silence (* 4 44100)))) | |
(define (looper sound) | |
(local [(define len (rs-frames sound))] | |
(network () | |
[ctr ((loop-ctr len 1))] |
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/universe) | |
(require 2htdp/image) | |
; Copyright 2012, John Clements ([email protected]) | |
; | |
; Licensed under the Apache License, Version 2.0 (the "License"); | |
; you may not use this file except in compliance with the License. | |
; You may obtain a copy of the License at | |
; | |
; http://www.apache.org/licenses/LICENSE-2.0 |
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 (planet clements/rsound:4:3)) | |
(require (planet clements/rsound:4:3/filter)) | |
(define SONG (rs-read "/tmp/bette-davis-eyes.wav")) | |
(define (looper sound) | |
(local [(define len (rs-frames sound))] | |
(network () | |
[ctr ((loop-ctr len 1))] | |
[out (/ (+ (rs-ith/left sound ctr) |
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/universe) | |
(require 2htdp/image) | |
; Copyright 2012, John Clements ([email protected]) | |
; | |
; Licensed under the Apache License, Version 2.0 (the "License"); | |
; you may not use this file except in compliance with the License. | |
; You may obtain a copy of the License at | |
; | |
; http://www.apache.org/licenses/LICENSE-2.0 |
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 (planet clements/rsound:4)) | |
(require "event-channel.rkt") | |
(require 2htdp/image) | |
(require 2htdp/universe) | |
(define ec (make-event-channel)) | |
(send-event ec 400) | |
;; an event is either |